fix(errors): redact supported provider API keys - #524
Open
sylvesterkaczmarek wants to merge 4 commits into
Open
Conversation
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
Recognize supported Linear and Fireworks API-key prefixes in the shared credential-bearing error redactor.
Fixes #521.
Reproduction / evidence
safeErrorMessage()is the persistence/display boundary for errors. Current upstreammainat37bf87a692fc72d41f7312cc48808d699d204fbarecognizes several credential prefixes, but not the supported Linearlin_api_or Fireworksfw_forms.Deterministic examples on the unfixed implementation:
Both messages can pass through unchanged because neither token is presented as a
Bearervalue or a named assignment.The Linear prefix is already represented by this repository's integration fixtures. Fireworks is also an explicit Codex Security inference provider (
FIREWORKS_API_KEY), and Fireworks' API-key documentation shows issued keys using thefw_prefix.Expected result for both examples:
[redacted].Root cause
The shared redactor uses a finite known-prefix branch. Linear and Fireworks support were added without adding their bare credential prefixes to that branch, leaving callers dependent on incidental formatting or caller-specific secret comparisons.
Fix
lin_api_to the known credential-prefix branch;fw_to the same branch;Tests / validation
The existing table-driven error-redaction regression now includes synthetic Linear and Fireworks credentials and requires both complete messages to become
[redacted].The original branch was created from upstream
mainat99c85613b0c4b8202b33dfbd80f41884fb9eac11. I re-verified the same missing-prefix behavior on current upstreammainat37bf87a692fc72d41f7312cc48808d699d204fbabefore adding the Fireworks case.Full repository tests cannot be run in this execution environment because the repository cannot be cloned here. Pushed-head CI remains the authoritative full-suite validation.
Risk
Low. Newly redacted messages are limited to strings containing supported credential prefixes. Ordinary words and existing redaction behavior are unchanged.