fix(ci): include root action.yml in pinact and pre-commit checks - #2622
Conversation
PR Summary by QodoFix CI tooling to scan root action.yml with pinact and pre-commit Description
Diagram
High-Level Assessment
Files changed (2)
|
Site previewPreview: https://8f0f626d-site.fullsend-ai.workers.dev Commit: |
|
🤖 Finished Review · ✅ Success · Started 5:52 PM UTC · Completed 6:02 PM UTC |
Code Review by Qodo
1. Workflows .yaml not scanned
|
| - pattern: ".github/workflows/*.yml" | ||
| - pattern: "internal/scaffold/fullsend-repo/.github/workflows/*.yml" |
There was a problem hiding this comment.
1. Workflows .yaml not scanned 🐞 Bug ≡ Correctness
.pinact.yaml only matches .github/workflows/*.yml, but the repo contains .github/workflows/fullsend.yaml, so pinact will never scan that workflow and unpinned uses: refs in .yaml workflows can bypass the SHA-pin gate. This is especially risky because CI runs pre-commit run --all-files, which will run pinact, but pinact itself still ignores .yaml workflows due to the configured files: patterns.
Agent Prompt
## Issue description
`.pinact.yaml` scopes pinact to `*.yml` workflows only, but the repo contains at least one `.yaml` workflow. Because pinact v3+ treats `files:` as an override scope, `.yaml` workflows are skipped entirely, allowing unpinned `uses:` refs in those files to slip through.
## Issue Context
CI runs `make lint-all` which executes `pre-commit run --all-files`. The pinact hook runs, but pinact only scans files matched by `.pinact.yaml`’s `files:` list.
## Fix Focus Areas
- .pinact.yaml[5-9]
- Add an additional pattern for `.github/workflows/*.yaml` (and consider the same for the internal scaffold workflows for consistency), or replace with a glob that matches both extensions if supported (e.g., two explicit patterns).
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| - pattern: ".github/actions/*/action.yml" | ||
| - pattern: "action.yml" |
There was a problem hiding this comment.
2. New scan breaks lint-all 🐞 Bug ☼ Reliability
By adding root action.yml to pinact’s scan scope, CI (make lint-all) will now fail because action.yml currently contains tag-based uses: references (e.g., actions/setup-go@v6) that pinact flags as unpinned. This change introduces a new failing lint gate unless those references are SHA-pinned (or explicitly ignored).
Agent Prompt
## Issue description
The PR expands pinact coverage to include the repository root `action.yml`. That file currently contains unpinned `uses: owner/repo@vX` references, which will cause `pinact run --fix=false` (invoked by pre-commit in CI) to fail.
## Issue Context
CI runs `make lint-all` → `pre-commit run --all-files`, and the pinact hook executes `pinact run --fix=false --no-api`.
## Fix Focus Areas
- action.yml[230-235]
- action.yml[281-284]
- action.yml[424-427]
- Replace tag-based refs with SHA-pinned refs (optionally retaining the tag in a trailing comment, consistent with other workflows in the repo).
- .pinact.yaml[5-9]
- Keep `action.yml` in scope once the file is compliant.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
ReviewFindingsHigh
Previous runReviewFindingsHigh
Labels: PR modifies CI tooling configuration (pinact and pre-commit hooks) to fix a coverage gap. |
waynesun09
left a comment
There was a problem hiding this comment.
LGTM. Patterns are correctly scoped — pinact glob matches only root action.yml, pre-commit regex is properly anchored by ^(...). No over-matching or under-matching.
The pinact config and pre-commit hook only covered .github/workflows/, .github/actions/, and the scaffold workflow directory. The root action.yml was never scanned, which allowed unpinned tag refs to slip through in PR #2508 (fixed by #2621). Add action.yml to both .pinact.yaml file patterns and the pre-commit hook's file regex so unpinned refs are caught automatically. Assisted-by: Claude claude-opus-4-6 <noreply@anthropic.com> Signed-off-by: Ralph Bean <rbean@redhat.com>
The repo contains .github/workflows/fullsend.yaml which was not matched by the *.yml-only patterns. Add *.yaml patterns for both the root and scaffold workflow directories so pinact scans all workflow files regardless of extension. Assisted-by: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Ralph Bean <rbean@redhat.com>
e4280c7 to
52f61ba
Compare
|
Rebased onto main and pushed 52f61ba. CI fix: The unpinned
Protected path: The fullsend-ai-review bot flagged |
|
🤖 Review · ❌ Terminated · Started 8:56 PM UTC · Ended 9:05 PM UTC |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
🤖 Finished Review · ✅ Success · Started 8:56 PM UTC · Completed 9:05 PM UTC |
|
🤖 Finished Retro · ✅ Success · Started 9:10 PM UTC · Completed 9:16 PM UTC |
Retro: PR #2622 — fix(ci): include root action.yml in pinact and pre-commit checksTimeline: Human-authored PR by What happened
AssessmentThe main friction point was the review agent re-issuing Existing coverageAll improvement opportunities identified are already tracked by open issues:
No new proposals filed — the improvements are well-covered. Resolving #1583 and #1922 would directly eliminate the friction observed on this PR. |
Summary
action.ymlto.pinact.yamlfile patternsaction\.yml$to the pinact pre-commit hook's file regexContext
PR #2508 pinned actions across
.github/workflows/and.github/actions/but missed the rootaction.ymlbecause neither pinact nor the pre-commit hook was configured to scan it. PR #2621 fixes the unpinned refs themselves; this PR closes the gap in the tooling so future unpinned refs are caught automatically.Test plan
pinact run --fix=false --no-apinow flags unpinned refs in rootaction.ymlmake lintpasses🤖 Generated with Claude Code