fix(ci): repair the two quality gates that #88 exposed - #90
Conversation
Making the file parse (previous commit) revealed two REAL failures in
jobs that had never once executed in this repo's history. Both are
genuine defects, not regressions.
1. `license` job — glob matched a DIRECTORY.
`head -5 LICENSE*` also matches the LICENSES/ directory. `head` exits
1 on a directory, and `2>/dev/null` hides the message but NOT the
exit code, so the step died under `bash -e` immediately after
printing "License file present".
Reproduced locally:
$ bash -e -c 'head -5 LICENSE* 2>/dev/null'; echo $?
==> LICENSE <== ... ==> LICENSES <== ... 1
Same family as the `target/release/*` glob trap: a glob silently
matching a directory.
NOTE: the obvious fix `[ -f "$f" ] && head -5 "$f"` inside a loop is
ALSO broken — as the last statement, a false test makes the step exit
1 under `bash -e`. Verified, then replaced with an explicit `if`.
Now exits 0.
2. `security` job — the semgrep pin did not exist.
`returntocorp/semgrep-action@73f3246...` was unresolvable:
##[error]Unable to resolve action ... unable to find version 73f3246...
The repo IS alive (last push 2024-01-22), so this was an INVENTED
SHA, not a dead action repo. Re-pinned to v1 = 713efdd..., verified
against the tags API and confirmed resolvable.
Worth recording: an unresolvable `uses:` ref fails during action
RESOLUTION, before the step body runs, so the `continue-on-error:
true` on that step could not and did not rescue it.
The action is deprecated and the step is non-blocking, so SAST here
is advisory only. Flagged in the PR rather than silently swapped for
a different scanner.
Verified: actionlint reports 0 findings on this file; both shell forms
exercised locally under `bash -e`.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Note Automatic reviews are paused because your trial's included automatic processing has been used for this period. Upgrade now, or comment "Gitar review" to run a review anytime. Code Review ✅ ApprovedCI workflow quality gate fixes correcting the LICENSE glob directory check and updating the deprecated semgrep action pin. No issues found.
OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Important Your trial ends in 7 days — upgrade now to keep code review, CI analysis, auto-apply, custom automations, and more. Was this helpful? React with 👍 / 👎 | Gitar |
The previous runs on this branch were all startup_failure — repo-level, not caused by this change. Root cause: allowed_actions=selected with an EMPTY patterns_allowed, which rejects every non-github-owned uses: at parse time. Repaired via gitbot-fleet fix-actions-policy.sh (non-widening path): allowed_actions stays 'selected', sha_pinning_required stays true, only the empty patterns_allowed was populated (0 -> 118, mirroring standards). startup_failure runs cannot be retried, so this empty commit re-triggers CI. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Follow-up to #88. Making
comprehensive-quality.ymlparse turned 0 jobs into11 — and two of those jobs then failed for real. They are genuine defects in
gates that had never once executed, not regressions from #88.
Both are still present on
maintoday.1.
license— the glob matched a directoryhead -5 LICENSE*also matches theLICENSES/directory.headexits 1 ona directory, and
2>/dev/nullsuppresses the message but not the exit code,so the step died under
bash -eimmediately after printing "License file present".Reproduced locally:
Same family as the
target/release/*trap: a glob silently matching a directory.A trap inside the fix, worth recording. The obvious repair —
[ -f "$f" ] && head -5 "$f"in a loop — is also broken: as the last statementin the loop body, a false test makes the whole step exit 1 under
bash -e. I hitexactly that and only caught it because I ran the form before pushing:
Shipped with the explicit
if.2.
security— the semgrep pin did not existThe repo is alive (last push 2024-01-22), so this was an invented SHA, not
a dead action repo — the same class as the estate's ~80 invented pins.
Re-pinned to
v1=713efdd345f3035192eaa63f56867b88e63e4e5d, taken from thetags API and confirmed resolvable via
repos/.../commits/<sha>. I did not guess.Worth recording: an unresolvable
uses:ref fails during actionresolution, before the step body runs — so the
continue-on-error: trueonthat step could not and did not rescue it.
continue-on-errornever protectsagainst a bad pin.
Caveat, deliberately not hidden: this action is deprecated (last push
2024-01) and the step is non-blocking, so SAST here is advisory only. Fixing the
pin makes it resolve; it does not make it a real gate. Replacing it with a
maintained scanner is a separate call and I have not made it for you.
Verification
actionlint→ 0 findings on the file.bash -e(outputs above).Note on scope
Test on Racket currentalso failed on #88's branch (30m14s, a hang). That istest.yml, untouched here, and it passes consistently onmain— so it is notcaused by this change. Flagging it, not fixing it blind.
🤖 Generated with Claude Code