Skip to content

Comments

Redact API token from JSON output envelope#10

Merged
turian merged 1 commit intomainfrom
fix/redact-api-token-from-output
Feb 7, 2026
Merged

Redact API token from JSON output envelope#10
turian merged 1 commit intomainfrom
fix/redact-api-token-from-output

Conversation

@turian
Copy link
Member

@turian turian commented Feb 7, 2026

Summary

  • Security fix: The envelope() function included the raw api_token in every JSON response's "args" field, leaking the token to stdout. Added _sanitize_args() to replace sensitive values with "**REDACTED**" before output.
  • AGENTS.md: Expanded with project structure, running instructions, output format docs, and security conventions.

Test plan

  • Run fastmail-cli session.get --api-token fmu1-test and confirm args.api_token shows "**REDACTED**"
  • Run fastmail-cli help and confirm output is unchanged
  • Verify no raw token appears anywhere in stdout for any command

🤖 Generated with Claude Code

The envelope() function included the raw api_token in every response's
"args" field. Add _sanitize_args() to replace sensitive values with
"**REDACTED**" before output. Expand AGENTS.md with project structure
and security guidance.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@turian
Copy link
Member Author

turian commented Feb 7, 2026

@codex review

@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@turian
Copy link
Member Author

turian commented Feb 7, 2026

@codex review

@chatgpt-codex-connector
Copy link

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@turian
Copy link
Member Author

turian commented Feb 7, 2026

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. 🎉

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@turian turian merged commit b9f7617 into main Feb 7, 2026
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.

1 participant