fix(eval): emulate Actions ::add-mask:: on functional-test artifacts#184
Conversation
Post-scripts echo ::add-mask::<token> for the Actions log viewer; the eval harness archives that stdout into case logs. Redact those payloads (and common GitHub token shapes) before upload-artifact, and fail if any remain. Signed-off-by: Adam Scerra <ascerra@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com> (cherry picked from commit 8b088ff)
Collect secrets from ::add-mask::<value> lines and replace those values with *** across text artifacts (same contract as the GHA log viewer), instead of only regex-redacting the mask line itself. Signed-off-by: Adam Scerra <ascerra@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
|
🤖 Finished Review · ✅ Success · Started 5:08 PM UTC · Completed 5:18 PM UTC |
PR Summary by QodoScrub eval artifacts by emulating GitHub Actions ::add-mask:: redaction
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
Code Review by Qodo
Context used✅ Compliance rules (platform):
55 rules 1.
|
ReviewAll six prior findings have been addressed: FindingsHigh
Low
Previous runReview of PR #184 —
|
Gate artifact upload on scrub success, align leak verification with TOKEN_RES, match Actions EOL add-mask semantics, and avoid printing secret snippets in CI logs. Signed-off-by: Adam Scerra <ascerra@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Verification regex matched x-access-token:***@ after redaction; exclude the redacted form with a negative lookahead. Signed-off-by: Adam Scerra <ascerra@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
|
🤖 Review · |
|
🤖 Finished Review · ✅ Success · Started 5:25 PM UTC · Completed 5:41 PM UTC |
Match existing secrets-check naming for multi-word step IDs. Signed-off-by: Adam Scerra <ascerra@redhat.com> Co-authored-by: Cursor <cursoragent@cursor.com>
|
🤖 Finished Review · ✅ Success · Started 5:53 PM UTC · Completed 6:03 PM UTC |
|
Review skipped — this PR is already merged. The Posted by fullsend post-review check |
Summary
eval-results-*artifacts, scrub eval output trees by emulating GitHub Actions::add-mask::handling: register values from mask lines, replace them with***everywhere, rewrite mask lines to::add-mask::***x-access-tokenURLs and deletes.eval-envWhy
post-review/post-code/post-fixecho::add-mask::<token>for the Actions job UI. Eval archives raw stdout without the runner’s masking, which leakedEVAL_GH_TOKENinto artifacts. Production review logs are masked by Actions; eval needs the same treatment on the artifact path. Triage never prints tokens, so it was already clean.Test plan
bash eval/scripts/scrub-eval-results.sh <dir>turns::add-mask::ghp_…+ later uses of that value into***::add-mask::ghp_/ghp_payloadsStandalone from #177 / #183 — merge this first; rebase those eval PRs onto
mainafterward to pick it up.