Repository navigation
muninn: scan only the PR path filter on pull_request (Part of #5499) - #5612
Merged
Merged
Conversation
…hedule/dispatch (Part of #5499) checkov is 84% of the "Run Muninn" step and walks the whole checkout. On a PR, sparse-check-out only the paths the workflow's own filter triggers on; schedule and dispatch keep the full tree. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Owner
Author
|
No description provided. |
squid-protocol
marked this pull request as ready for review
October 19, 2026 11:38
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #5499 (does not close it: the after-time needs this PR's own CI run, see Open items).
Owner decisions
Owner OK (2026-10-19) to edit workflows.
Note: the queue item carries no
allow_workflows; the OK above came in the launch brief. This PR edits.github/workflows/muninn.yml, so the owner must confirm it before merge.What
.github/workflows/muninn.yml: onpull_requestthe checkout is a non-cone sparse checkout of exactly the paths the workflow's own filter triggers on (gitgalaxy/,.github/,.claude/,ci/,templates/,pyproject.toml,requirements*.txt,action.yml) plus the scanners' root configs (muninn.yml,zizmor.yml). Schedule andworkflow_dispatchuse a separate full-tree checkout step, unchanged. Paths are kept at their real locations, so SARIF locations andmuninn.ymlsuppressions still match.Why: per the issue investigation, checkov is 6m18s of the 7m28s step (84%) and walks all ~5,100 files; ~480 are in the PR filter. The action has no changed-files mode, and
targetwould rewrite SARIF paths. Two steps, not one expression, because a multi-line string inside${{ }}is folded to spaces by YAML.tests/tools/test_muninn_scope.pypins that every PR path-filter entry is covered by the sparse list and that the full-tree step stays for schedule/dispatch. (It also caught my first YAML error: a colon in a step name.)Coverage
No loss: every file the PR filter matches is still scanned on the PR; the weekly full scan is untouched. Caveat: a PR touching only
gitgalaxy/**is not scanned againsttests//docs/content, buttests/is fully suppressed inmuninn.ymlanddocs/is not in the PR filter."Run Muninn" step time
Before (last 6 PR runs, 2026-10-19, step started->completed): 7m31s, 4m00s, 5m18s, 4m25s, 7m24s, 5m12s (median ~5m15s; the issue measured 7m28s on run 39159017208).
After: TBD, filled in from this PR's own run once it is ready (a draft skips Muninn, #5104). Equal-findings check:
gh workflow run muninn.yml --ref churn/5499-20261018T1941Z(full tree, same SHA) vs the PR run.Class sweep
Class: PR-time CI scan walks the whole tree although the workflow's path filter covers a small part. Sibling gaps: none found for Muninn; other workflows (
main-watch.ymlmentions Muninn) not audited.Gates:
pr_gates.py --fast6/6 pass; new test +test_workflow_inputs.py+test_tested_tree_workflows.py19 passed.--ratchetsnot run (no engine/golden input touched).🤖 Generated with Claude Code