Repository navigation
fix(ci): redact package URL query strings - #492
Conversation
There was a problem hiding this comment.
🔀 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_pathis 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' |
There was a problem hiding this comment.
🔵 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
|
/merge |
6e45b68 to
664008f
Compare
There was a problem hiding this comment.
🔀 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-runpattern 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>
664008f to
40b5522
Compare
There was a problem hiding this comment.
🔀 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.
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 --checklocally.This PR was created with GitHub MCP.