Skip to content

fix(ci): redact package URL query strings - #492

Merged
rahuls-db merged 1 commit into
mainfrom
rahul-singhal_data/fix/redact-presigned-install-urls
Nov 24, 2026
Merged

rahuls-db merged 1 commit into
mainfrom
rahul-singhal_data/fix/redact-presigned-install-urls

Conversation

@rahuls-db

Copy link
Copy Markdown
Collaborator

What did you change, and why?

Why: Bot dependency installation can print JFrog redirects containing AWS presigned query parameters into GitHub Actions logs. These credentials are short-lived, but complete signed URLs should not be logged.

Change: Route the bot engine's pip and npm installs through a shared output filter that preserves URL host/path while replacing query strings with ?[REDACTED]. The wrapper preserves the underlying command's exit code, and the focused test is included in PR checks.

How do you know it works?

Testing: The shell test verifies that AWS-style query parameters are removed while host/path remain visible, and that a wrapped command exiting with status 37 still returns status 37. Also ran Bash syntax checks and git diff --check locally.


This PR was created with GitHub MCP.

@rahuls-db
rahuls-db marked this pull request as ready for review November 21, 2026 06:04
@rahuls-db
rahuls-db requested a review from a team as a code owner November 21, 2026 06:04

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).

Verdict: 1 Low · 2 Nit

Looks good, with 2 low concerns. The wrapper keeps the command's exit status under set -e, and errexit is turned back on correctly afterwards. The two notes are about passing the action path into the script safely and adding a few more regex test cases.

This overview is Claude Opus 5.5's initial take; GPT-6.1 Sol added findings it doesn't mention — see the findings below.

Other findings

  • ⚪ Nit — github.action_path is interpolated straight into the script text, while the other values in this step come in through env. The risk is small because the runner sets the path. Pass it as an env var, such as ACTION_PATH, and source "$ACTION_PATH/...". (Found by Claude Opus 5.5 · confirmed by the judge)
  • ⚪ Nit — The tests cover only one signed URL per line. They don't check that text without a query passes through unchanged, or that several URLs on one line are all redacted. Add a pass-through case and a two-URL case. (Found by Claude Opus 5.5 · confirmed by the judge)


set +e
"$@" 2>&1 \
| sed -E 's#([Hh][Tt][Tt][Pp][Ss]?://[^?[:space:]]+)\?[^[:space:]]+#\1?[REDACTED]#g'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Low — The sed filter only redacts queries on URLs that start with http(s)://. urllib3 and pip error lines such as Max retries exceeded with url: /pkg.whl?X-Amz-Signature=... have no scheme, so signed queries can still reach the logs. Add a rule for url: /path?query and test it.

🔀 Found by GPT-6.1 Sol · confirmed by the judge

@rahuls-db

Copy link
Copy Markdown
Collaborator Author

/merge

@rahuls-db
rahuls-db force-pushed the rahul-singhal_data/fix/redact-presigned-install-urls branch from 6e45b68 to 664008f Compare November 23, 2026 20:58

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).

Verdict: 1 High

The redaction approach is sound and I found no correctness bugs, just two low-severity items: sed buffers the install logs, and github.action_path is pasted straight into the run: script. The function returns the wrapped command's exit status, restores set -e, and has tests in PR checks.

This overview is Claude Opus 5.5's initial take; some of its points were set aside by the cross-check judge and GPT-6.1 Sol added findings it doesn't mention — see the findings below.

🔀 1 finding considered and dismissed by the judge
  • 🔵 Low .github/actions/install-bot-engine/action.yml:116 — ${{ github.action_path }} is inserted directly into the script text, the expression-in-run pattern that hardened-GHA guidance flags. A runner path with spac
    Judge's evidence: source "${{ github.action_path }}/redact-command-output.sh"

Signed-off-by: rahul.singhal <rahul.singhal@databricks.com>
@rahuls-db
rahuls-db force-pushed the rahul-singhal_data/fix/redact-presigned-install-urls branch from 664008f to 40b5522 Compare November 23, 2026 22:54

@oss-reviewer-bot oss-reviewer-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔀 Cross-reviewed: two independent reviews (Claude Opus 5.5 · GPT-6.1 Sol), checked by a judge model (Claude Sonnet 5.5).

Verdict: 1 Low

Looks good, with one low-severity test gap. The redaction regex, the exit-code capture via PIPESTATUS, and the way the wrapper is called in action.yml all look correct for the pip and npm installs.

@rahuls-db
rahuls-db added this pull request to the merge queue Nov 24, 2026
Merged via the queue into main with commit fcff5af Nov 24, 2026
24 of 28 checks passed

This branch was previously deployed

1 inactive deployment
azure-prod — 40b5522c Deployed Nov 23, 2026 by oss-reviewer-bot[bot] via followup #4214
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants