Skip to content

security: redact query strings from URLs in reports#278

Open
ronaldtse wants to merge 1 commit into
v5from
fix/redact-urls-in-reports
Open

security: redact query strings from URLs in reports#278
ronaldtse wants to merge 1 commit into
v5from
fix/redact-urls-in-reports

Conversation

@ronaldtse

Copy link
Copy Markdown
Contributor

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

  1. A formula URL with pre-signed S3 credentials was checked by check_urls.rb
  2. The URL (including credentials in query params) was stored in the failure record
  3. render_report.rb printed the raw URL verbatim in the PR comment
  4. GitHub secret scanning detected the AWS key pattern

Actions taken

Fix

New method redact_url(url) strips everything after ? and replaces with (query redacted). Applied to format_failure_detail() — renders URLs in failure tables (PR comments, issue bodies, step summaries). Normal URLs without query strings are unaffected.

Verification

  • URL with credentials: https://example.com/file.exe?X-Amz-Credential=ASIA... → redacted to https://example.com/file.exe?…(query redacted)
  • Normal URL: https://example.com/file.zip → unchanged

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).
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