From 5577d38738554e8c2c4fb38913d7470f9e03c73c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9d=C3=A9ric=20Hurier=20=28Fmind=29?= Date: Mon, 10 Aug 2026 18:34:31 +0200 Subject: [PATCH] fix(check): stop trivy from scanning caches and racing pip-audit `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. --- trivy.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/trivy.yaml b/trivy.yaml index 1e60fd8..283e94f 100644 --- a/trivy.yaml +++ b/trivy.yaml @@ -7,5 +7,12 @@ scan: - misconfig - secret - vuln + # Caches and virtualenvs are not source. `.cache` in particular is written by + # `check:vuln` (pip-audit) while this scan runs in parallel, and trivy aborts when a + # temporary file disappears mid-walk. + skip-dirs: + - .cache + - .venv + - .git vulnerability: ignore-unfixed: true