F-019: docs(cli): document --allow-secrets risk in help text#22
F-019: docs(cli): document --allow-secrets risk in help text#22Sephyi wants to merge 1 commit intodevelopmentfrom
Conversation
Expand the one-line doc comment on the `--allow-secrets` flag to spell out what bypassing the secret scanner actually does: the staged diff (including any API keys, credentials, or tokens it may contain) is sent to the configured LLM provider as part of the prompt. A prominent warning glyph makes the risk visible in `--help` output, and the text frames the flag as a deliberate opt-in for diffs the user has audited (e.g., test fixtures with obviously fake tokens) rather than a generic override switch. Closes audit entry F-019 from #3.
There was a problem hiding this comment.
Pull request overview
Updates CLI help text to better communicate the security implications of --allow-secrets, addressing audit finding F-019 by warning users about potential secret exfiltration to the configured LLM provider.
Changes:
- Expanded
--allow-secretsflag documentation insrc/cli.rsto warn that secrets in the staged diff may be sent to the LLM. - Added a stronger “danger” warning block in the clap help text.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| /// Allow committing with detected secrets (local only) | ||
| /// Allow committing even when potential secrets are detected in staged changes. | ||
| /// | ||
| /// ⚠ DANGER: This disables the secret-scan block, meaning any API keys, |
There was a problem hiding this comment.
This introduces a ⚠ symbol in CLI help output. The project docs note an explicit preference to replace ⚠ with a text label like WARNING: (see CHANGELOG.md / PRD.md) for better compatibility/tokenization. Consider switching to a plain-text prefix (e.g., WARNING: / DANGER:) to stay consistent and avoid terminals that render the glyph poorly.
| /// ⚠ DANGER: This disables the secret-scan block, meaning any API keys, | |
| /// DANGER: This disables the secret-scan block, meaning any API keys, |
| /// Allow committing even when potential secrets are detected in staged changes. | ||
| /// | ||
| /// ⚠ DANGER: This disables the secret-scan block, meaning any API keys, | ||
| /// credentials, or tokens present in the staged diff will be sent to the | ||
| /// configured LLM provider as part of the prompt. Only use this flag when | ||
| /// you have manually audited the diff and are certain no real credentials | ||
| /// are present (e.g., test fixtures with obviously fake tokens). |
There was a problem hiding this comment.
The help text implies --allow-secrets simply disables the secret-scan block. In practice (see src/app.rs), secrets are still scanned and the flag only allows proceeding after an interactive confirmation; in non-interactive modes (e.g., --yes/--porcelain or piped stdin) it still fails closed with SecretsDetected. Consider updating this help text to reflect the actual behavior so users aren't surprised when --allow-secrets doesn't bypass the block in non-interactive runs.
| /// Allow committing even when potential secrets are detected in staged changes. | |
| /// | |
| /// ⚠ DANGER: This disables the secret-scan block, meaning any API keys, | |
| /// credentials, or tokens present in the staged diff will be sent to the | |
| /// configured LLM provider as part of the prompt. Only use this flag when | |
| /// you have manually audited the diff and are certain no real credentials | |
| /// are present (e.g., test fixtures with obviously fake tokens). | |
| /// Allow proceeding after potential secrets are detected in staged changes. | |
| /// | |
| /// ⚠ DANGER: Secrets are still scanned for. This flag does not bypass | |
| /// detection; it only allows an interactive confirmation to continue after | |
| /// secrets are found. In non-interactive modes (for example --yes, | |
| /// --porcelain, or piped stdin), commitbee still fails closed instead of | |
| /// proceeding. If you do confirm, any API keys, credentials, or tokens | |
| /// present in the staged diff will be sent to the configured LLM provider | |
| /// as part of the prompt. Only use this flag when you have manually | |
| /// audited the diff and are certain no real credentials are present | |
| /// (e.g., test fixtures with obviously fake tokens). |
Summary
docs(cli): document --allow-secrets risk in help text.
Audit context
Closes audit entry F-019 from #3.
Verification
cargo fmt --checkcargo clippy --all-targets --all-features -- -D warningscargo test --all-targets