You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
guardrails: block credential-reading commands on a Bash|PowerShell PreToolUse matcher #5305
Found by the 2026-09-29 audit of the Cursor agent run (follow-up to #4244).
Incident (#4244): a researcher ran git credential fill and captured a live GitHub OAuth token into its transcript. plugins/guardrails/hooks/hooks.json registers secret-pattern-detection.sh only on Write|Edit|MultiEdit|NotebookEdit and the GitHub-MCP write matcher, so the Bash pool is unguarded, and that detector scans written content, not command shapes. Rung 3 of #4244 was deferred by PR #4745 to a closed issue with no tracker.
Acceptance:
A PreToolUse hook on Bash|PowerShell that denies the command shapes named in parent-contract.md "Credentials stay unread": git credential fill, gh auth token, printenv or echo of token-shaped variables, cat of .git-credentials, .netrc, .env.
Activity
feat(guardrails): wire block-credential-read into hooks, userConfig, …
fix(guardrails): block-credential-read sees backtick substitutions an…