security: redact query strings from URLs in reports#278
Open
ronaldtse wants to merge 1 commit into
Open
Conversation
A formula URL containing AWS temporary credentials (ASIA6KOSE3BNEPKIWAEW) was exposed in a formula-checks PR comment on PR #276. The URL's query string contained pre-signed S3 credentials that check_urls.rb captured in failure records, which render_report.rb then printed verbatim. Fix: new redact_url() method strips everything after '?' and replaces with '(query redacted)'. Applied to all URL display in failure tables. Normal URLs without query strings are unaffected. Also: resolved GitHub secret scanning alert #2 (comment deleted, key was temporary STS credential with automatic expiry).
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.
Security fix — URGENT
GitHub secret scanning detected an AWS Temporary Access Key ID (
ASIA6KOSE3BNEPKIWAEW) in a PR comment on #276. The formula-checks job (from PR #270) posted a sticky comment that included a formula URL with credentials in its query string.What happened
check_urls.rbrender_report.rbprinted the raw URL verbatim in the PR commentActions taken
redact_url()method added torender_report.rb— strips query strings from all URLs in outputFix
New method
redact_url(url)strips everything after?and replaces with(query redacted). Applied toformat_failure_detail()— renders URLs in failure tables (PR comments, issue bodies, step summaries). Normal URLs without query strings are unaffected.Verification
https://example.com/file.exe?X-Amz-Credential=ASIA...→ redacted tohttps://example.com/file.exe?…(query redacted)https://example.com/file.zip→ unchanged