Open
Conversation
Prevents information disclosure by truncating long API error messages in exception strings. Raw response data remains available via response_data for programmatic access. Adds bandit security linter as a dev dependency with a new CI workflow. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The initial sanitization only truncated long messages. This adds regex-based redaction of credential patterns (api_key=, token=, secret=, password=, authorization:, bearer, credential) so they never appear in exception messages or logs. Also sanitizes httpx.HTTPError messages which can contain URLs with key query params. Raw response_data is preserved for programmatic access. Adds 4 tests covering redaction behavior. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
007adfd to
4741c2f
Compare
Adds a justfile wrapping common tasks, with 1Password CLI injecting secrets for integration tests. Adds explicit permissions blocks to all GitHub Actions workflows to restrict GITHUB_TOKEN scope. Updates README development docs to reflect just-based workflow. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
client.py): API error responses can echo back credentials (e.g.api_key=...,token=...). Exception messages now redact patterns matching API keys, tokens, secrets, passwords, bearer tokens, and credentials via regex. Long messages are also truncated to 200 chars. Rawresponse_dataremains available for programmatic access. Also applies tohttpx.HTTPErrormessages which can contain URLs with sensitive query params.security.ymlworkflow runs bandit on every push/PR tomain/develop.test.yml,lint.yml,security.yml,publish.yml) now have explicitpermissions: contents: readblocks.publish.ymlalso getsid-token: writefor PyPI trusted publishing.op runinjecting secrets for integration tests. No more API keys on disk.just-based workflow andop-managed secrets.Test plan
tango/(0 issues)just --listandjust testwork locally🤖 Generated with Claude Code