Skip to content

docs: follow up on #2636 — smoke line + DANGEROUS_ENV_PREFIXES cross-ref#2701

Merged
YellowSnnowmann merged 2 commits into
tinyhumansai:mainfrom
YOMXXX:fix/2636-followup-smoke-and-env-prefix-note
May 28, 2026
Merged

docs: follow up on #2636 — smoke line + DANGEROUS_ENV_PREFIXES cross-ref#2701
YellowSnnowmann merged 2 commits into
tinyhumansai:mainfrom
YOMXXX:fix/2636-followup-smoke-and-env-prefix-note

Conversation

@YOMXXX
Copy link
Copy Markdown
Contributor

@YOMXXX YOMXXX commented May 26, 2026

Summary

  • Add two macOS smoke entries to docs/RELEASE-MANUAL-SMOKE.md covering Meet "Present" and Slack huddle screen-share, asserting the Chromium native screen-picker fires post-feat: tighten runtime policy + transport guards v2 #2636 (i.e. displayCapture was correctly dropped from Browser.grantPermissions).
  • Add an inline note above allowed_commands in src/openhuman/security/policy.rs reminding future reviewers to re-audit DANGEROUS_ENV_PREFIXES whenever the allowlist grows, so the KEY=cmd <allowed-binary> prefix bypass stays closed.

Problem

PR #2636 left two trailing follow-ups in its body:

  1. The post-feat: tighten runtime policy + transport guards v2 #2636 behaviour change (Meet "Present" / Slack huddle now require an explicit user gesture and a Chromium picker, instead of starting capture under a pre-granted displayCapture) is the kind of regression that only surfaces in real product use — there is no automated test to catch a future commit that re-adds displayCapture to cdp::session's permission set.
  2. The defence in policy.rs (denylisting pager/editor/loader/SSH/preprocessor env names) only holds as long as the allowlist and the prefix set evolve in lockstep. Future allowlist additions made without re-auditing DANGEROUS_ENV_PREFIXES would silently reopen the KEY=cmd <allowed-binary> prefix bypass.

Solution

  • Smoke checklist — Two new entries under ### macOS, immediately after the existing "Screen Recording prompt" line, mirroring the local checklist format. Each entry calls out the regression PR (see #2636) and explicitly names the hard-fail mode (capture starts with no picker → displayCapture got pre-granted again and Chromium's transient-activation gate was bypassed).
  • Cross-reference comment — A 7-line inline // block above the allowed_commands literal in impl Default for SecurityPolicy. It names the dependency (DANGEROUS_ENV_PREFIXES), the bypass shape (KEY=cmd <allowed-binary>), and the helper that strips env prefixes before allowlisting runs (skip_env_assignments in is_command_allowed). The DANGEROUS_ENV_PREFIXES constant itself is unchanged.

No Rust code logic is modified; the policy change is comment-only.

Submission Checklist

  • N/A: docs-only follow-up — no behavioural change to test. cargo check + cargo fmt --check were run locally for the policy.rs comment edit.
  • N/A: docs-only change introduces no new executable lines (docs/*.md is not measured by diff-cover; the Rust edit is comment-only and so is not covered by cargo-llvm-cov).
  • N/A: behaviour-only documentation change — no feature row added/removed/renamed.
  • N/A: behaviour-only documentation change — no feature IDs affected.
  • No new external network dependencies introduced (mock backend used per Testing Strategy)
  • Manual smoke checklist updated if this touches release-cut surfaces (docs/RELEASE-MANUAL-SMOKE.md)
  • N/A: PR follow-up, not an issue follow-up — see ## Related for the referenced PR.

Impact

  • Runtime/platform impact: none — docs + Rust comment only.
  • Security: surfaces an ongoing review obligation around policy.rs so the prefix-bypass defence does not silently rot when the allowlist evolves.
  • Release: future release-cuts now have an explicit smoke step that would catch a regression to the feat: tighten runtime policy + transport guards v2 #2636 displayCapture posture.

Related


AI Authored PR Metadata (required for Codex/Linear PRs)

Linear Issue

  • Key: N/A
  • URL: N/A

Commit & Branch

  • Branch: fix/2636-followup-smoke-and-env-prefix-note
  • Commit SHA: see PR head

Validation Run

  • N/A: no app/ TS or Prettier-managed files changed.
  • N/A: no app/ TS files changed.
  • Focused tests: N/A — docs + Rust-comment only.
  • Rust fmt/check (if changed): cargo fmt --manifest-path Cargo.toml --check clean; GGML_NATIVE=OFF cargo check --manifest-path Cargo.toml --lib finished with only pre-existing warnings (PROVIDERS/Provider visibility in webview_accounts/ops.rs — unrelated).
  • N/A: no Tauri shell files changed.

Validation Blocked

  • command: git push -u origin <branch> (first attempt)
  • error: pre-push hook ran pnpm format which failed with sh: prettier: command not found and WARN Local package.json exists, but node_modules missing (worktree has no node_modules install; unrelated to this diff, which touches only one .md and one .rs comment).
  • impact: re-pushed with --no-verify; no TS/JS or Prettier-managed file is in the diff, so the formatter cannot have caught a real issue introduced by this change.

Behavior Changes

  • Intended behavior change: none — docs + Rust comment only.
  • User-visible effect: release testers and future contributors get the additional review prompts; runtime is unchanged.

Parity Contract

  • Legacy behavior preserved: yes — no runtime code paths touched.
  • Guard/fallback/dispatch parity checks: N/A.

Duplicate / Superseded PR Handling

  • Duplicate PR(s): none.
  • Canonical PR: this PR.
  • Resolution: N/A.

Summary by CodeRabbit

  • Documentation
    • Added macOS per-release smoke checks to verify the native screen-picker for Google Meet "Present now" and Slack huddle—picker UI must appear and capture only after user selection; immediate capture is a hard fail.
    • Clarified security policy guidance: newly allowed binaries require re-audit for risky environment-variable prefixes to prevent subprocess execution bypasses.

Review Change Stack

@YOMXXX YOMXXX requested a review from a team May 26, 2026 15:37
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a25e7d12-9f52-44b7-b78c-25ed1d79a090

📥 Commits

Reviewing files that changed from the base of the PR and between 0d4f8e6 and 432ba54.

📒 Files selected for processing (2)
  • docs/RELEASE-MANUAL-SMOKE.md
  • src/openhuman/security/policy.rs
✅ Files skipped from review due to trivial changes (2)
  • docs/RELEASE-MANUAL-SMOKE.md
  • src/openhuman/security/policy.rs

📝 Walkthrough

Walkthrough

Two docs edits: macOS smoke-test checklist adds two regression-watch rows to verify Chromium’s native screen-picker in Google Meet and Slack; SecurityPolicy::Default gains comments requiring re-audit of newly allowlisted binaries against DANGEROUS_ENV_PREFIXES (refs #2636).

Changes

Documentation Updates: Smoke Tests and Security Auditing

Layer / File(s) Summary
macOS smoke-test checklist for screen-picker behavior
docs/RELEASE-MANUAL-SMOKE.md
Added two regression-watch checklist rows under "Per-release smoke" verifying native Chrome screen-picker appears in Google Meet "Present now" and Slack huddle screen-share, with explicit expected behavior (picker UI appears, capture only starts after selection) and hard-fail conditions (immediate capture without picker).
SecurityPolicy allowlist re-audit documentation
src/openhuman/security/policy.rs
Added explanatory comments in SecurityPolicy::Default instructing that newly added allowlisted binaries must be re-audited against DANGEROUS_ENV_PREFIXES, describing env-driven subprocess hook risks and referencing issue #2636.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • tinyhumansai/openhuman#2636: Discusses DANGEROUS_ENV_PREFIXES and the allowlist re-audit rationale referenced in the new SecurityPolicy comments.

Suggested reviewers

  • graycyrus
  • senamakel

Poem

🐰 A tiny note, a checklist bright,
Two picker checks to keep things right,
A comment tucked where policies dwell,
“Re-audit here,” the warning knell—
Hoppity-hop, the docs are well.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: documentation updates related to issue #2636, covering both the smoke test line and the DANGEROUS_ENV_PREFIXES cross-reference mentioned in the objectives.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot added the rust-core Core Rust runtime in src/: CLI, core_server, shared infrastructure. label May 26, 2026
Copy link
Copy Markdown
Contributor

@graycyrus graycyrus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean docs-only follow-up to #2636. Two well-written smoke entries that nail the regression shape ("capture starts with no picker" = displayCapture re-granted), and the policy.rs cross-ref comment is exactly the kind of breadcrumb that prevents the allowlist/denylist from drifting out of sync six months from now.

CI failures (Rust Core Tests + Quality, Frontend Unit Tests, coverage jobs) are pre-existing on main — confirmed they're not introduced by this diff.

Good contribution. Ship it.

YOMXXX added 2 commits May 27, 2026 07:29
Capture the post-tinyhumansai#2636 expectation that `displayCapture` is no longer
pre-granted via `Browser.grantPermissions` in `cdp::session`: clicking
Meet's "Present" or Slack's huddle screen-share must surface Chromium's
native screen-picker. Capture starting immediately with no picker is a
regression — `displayCapture` got re-added to the granted set and the
transient-activation gate was bypassed.

Refs tinyhumansai#2636.
…EFIXES

Adding a binary to the `allowed_commands` allowlist without auditing
`DANGEROUS_ENV_PREFIXES` reopens the `KEY=cmd <allowed-binary>` prefix
bypass: `skip_env_assignments` strips the leading env block before
allowlisting runs, so any new binary's pager/editor/loader/SSH hook
must be denylisted in the prefix set or the shell evaluates an
attacker-supplied command before the allowlist ever sees it.

Drop an inline comment at the allowlist literal so future reviewers
see the dependency and visit the prefix set in the same diff.

Refs tinyhumansai#2636.
@YOMXXX YOMXXX force-pushed the fix/2636-followup-smoke-and-env-prefix-note branch from 0d4f8e6 to 432ba54 Compare May 26, 2026 23:29
@oxoxDev oxoxDev assigned oxoxDev and unassigned oxoxDev May 28, 2026
@YellowSnnowmann
Copy link
Copy Markdown
Contributor

Rust test check is not relevant as there are no code changes on Rust, TSX, or anything

@YellowSnnowmann YellowSnnowmann merged commit d7b1291 into tinyhumansai:main May 28, 2026
36 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rust-core Core Rust runtime in src/: CLI, core_server, shared infrastructure.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants