Skip to content

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

Open
YOMXXX wants to merge 2 commits into
tinyhumansai:mainfrom
YOMXXX:fix/2636-followup-smoke-and-env-prefix-note
Open

docs: follow up on #2636 — smoke line + DANGEROUS_ENV_PREFIXES cross-ref#2701
YOMXXX wants to merge 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
    • Updated smoke testing procedures with new verification steps for screen-picker functionality in Google Meet "Present now" and Slack huddles.
    • Enhanced security policy documentation regarding binary auditing procedures.

Review Change Stack

YOMXXX added 2 commits May 26, 2026 23:36
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 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: a1f9fffc-75d1-4f56-b33b-5e7afcf304fc

📥 Commits

Reviewing files that changed from the base of the PR and between 87f8ef4 and 0d4f8e6.

📒 Files selected for processing (2)
  • docs/RELEASE-MANUAL-SMOKE.md
  • src/openhuman/security/policy.rs

📝 Walkthrough

Walkthrough

Two documentation updates: macOS smoke-test checklist adds regression-watch items for Chromium screen-picker behavior in Meet and Slack; SecurityPolicy comments document re-auditing requirements for allowed binaries against dangerous environment prefixes.

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 describing the requirement to re-audit any newly added allowed binary against DANGEROUS_ENV_PREFIXES to prevent env-assignment bypasses, cross-referencing issue #2636.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • tinyhumansai/openhuman#2399: Updates the SecurityPolicy allowed binaries allowlist; this PR adds documentation comments about re-auditing requirements for that same block.
  • tinyhumansai/openhuman#2636: Referenced in the security policy comments as the issue motivating re-audit of DANGEROUS_ENV_PREFIXES in the allowlist.

Suggested labels

rust-core

Suggested reviewers

  • graycyrus
  • senamakel

Poem

🐰 A little doc update, safe and sound,
Two new smoke tests for screens around,
And audit notes to keep us tight—
Chromium pickers shining bright!

🚥 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 clearly summarizes the main changes: documentation updates (smoke line and DANGEROUS_ENV_PREFIXES cross-reference) as a follow-up to issue #2636.
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
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.

1 participant