Skip to content

fix(check): stop trivy from scanning caches and racing pip-audit - #132

Merged
fmind merged 1 commit into
mainfrom
fix/trivy-cache-race
Aug 10, 2026
Merged

fix(check): stop trivy from scanning caches and racing pip-audit#132
fmind merged 1 commit into
mainfrom
fix/trivy-cache-race

Conversation

@fmind

@fmind fmind commented Aug 10, 2026

Copy link
Copy Markdown
Owner

check:scan and check:vuln run in parallel under mise run check. pip-audit writes temporary files into .cache/pip-audit while trivy fs . walks the same tree, and trivy aborts fatally when one disappears mid-walk. Reproduced on the cookiecutter harness, which runs the identical task pair.

Caches and virtualenvs are not source, so trivy.yaml skips them outright rather than serialising the two checks.

Test plan

mise run check three consecutive times — exit 0 each time (it failed intermittently before).

`check:scan` and `check:vuln` run in parallel under `mise run check`. pip-audit
writes temporary files into `.cache/pip-audit` while `trivy fs .` is walking the
same tree, and trivy aborts with a fatal "no such file or directory" when one of
them disappears mid-walk. Reproduced on the cookiecutter harness, which runs the
identical task pair.

Caches and virtualenvs are not source, so skip them outright rather than
serialising the two checks.
@fmind
fmind merged commit 6786cf1 into main Aug 10, 2026
1 check passed
@fmind
fmind deleted the fix/trivy-cache-race branch August 10, 2026 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant