AntFleet

Disagreement · 44a066f2-anthropic-2

apiKey is echoed to stdout in human-readable mode with no redaction option

solo Opus
repo 799b2361·PR #1·reviewed 5 days ago

Opus finding

apiKey is echoed to stdout in human-readable mode with no redaction option

lowsecuritymedium
  • src/commands/register-agent.ts:111-118
The persistent Bearer token is printed in plaintext to stdout in human mode. While this is intentional (the user must capture it), it is the kind of secret that commonly ends up in shell history files, terminal scrollback, CI logs, and screenshots. The output banner warns users to save it but offers no `--no-print-secret` / `--key-file <path>` alternative for safer capture, and `--json` is the agent-recommended mode but also writes apiKey to stdout. This is a known design tradeoff but worth flagging because the credential is non-recoverable (each register creates a new identity).

Recommendation

Consider supporting an opt-in `--output-file <path>` that writes credentials with mode 0600, and/or a `--mask-apikey` mode that prints only a prefix in human mode (full value still available via --json). At minimum, document that running in shared terminals/CI logs will persist the apiKey.

Other reviewer

The other reviewer flagged nothing in this file/line range.

Why this didn't post

This finding didn't meet AntFleet's unanimous agreement threshold. Both frontier models review every PR independently; only findings they both flag with the same severity and category are posted to the PR. This one fell through.

read the methodology →

From the same review

These findings passed the unanimous gate on the same PR review. The disagreement above was filtered out; the findings below were posted.