Skip to content

Redact CodeArtifact auth token from command stderr#10367

Open
dfgvaetyj3456356-hash wants to merge 1 commit into
aws:developfrom
dfgvaetyj3456356-hash:fix/codeartifact-redact-stderr
Open

Redact CodeArtifact auth token from command stderr#10367
dfgvaetyj3456356-hash wants to merge 1 commit into
aws:developfrom
dfgvaetyj3456356-hash:fix/codeartifact-redact-stderr

Conversation

@dfgvaetyj3456356-hash
Copy link
Copy Markdown

Summary

  • redact the CodeArtifact authorization token from captured stderr when a package manager command fails
  • add a regression test that covers tokens appearing in both the command args and stderr

Why

CommandFailedError already redacted the token from the CalledProcessError string, but then appended decoded stderr without applying the same redaction. Some package managers include command details or authentication material in error output, so this keeps the failure message from re-exposing the token after the command string has been masked.

Testing

  • python -m pytest tests/unit/customizations/codeartifact/test_adapter_login.py -q

@dfgvaetyj3456356-hash dfgvaetyj3456356-hash requested a review from a team as a code owner May 31, 2026 16:34
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