Skip to content

fix: avoid blocking AgentGuard status key placeholders - #146

Merged
Mr-Lucky merged 1 commit into
mainfrom
fix/codex-status-output-self-block
Oct 16, 2026
Merged

Mr-Lucky merged 1 commit into
mainfrom
fix/codex-status-output-self-block

Conversation

@Mr-Lucky

Copy link
Copy Markdown
Contributor

Summary

Allow the documented TYPESAFE_API_KEY=<key> placeholder in agentguard status output without blocking the Codex post-tool hook. Keep blocking output that contains an unmasked secret. Add a regression test using real status output.

Type

  • Bug fix
  • New feature / detection rule
  • Refactoring
  • Documentation

Testing

  • npm run build passes
  • npm test passes (32 tests)
  • Manually tested the change

node --test dist/tests/codex-hooks.test.js passes (18/18 tests).

Related Issues

Closes #

@github-actions

Copy link
Copy Markdown

AgentGuard PR Review

  1. medium — src/runtime/protect.ts:212-217
    The new placeholder bypass only normalizes the exact string TYPESAFE_API_KEY=<key>. If the status help output uses a different documented placeholder form (for example a different key name, spacing, quotes, or multiple placeholders), redactText(normalized) === normalized will still fail and the hook will block valid status output.
    Fix: normalize the full set of documented placeholder variants explicitly, or change the status-output check to validate against a structured allowlist for the known help text rather than a single literal replacement.

@Mr-Lucky
Mr-Lucky merged commit 0d43864 into main Oct 16, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants