supply-chain: Python pins in requirements/constraints.txt are never vulnerability-scanned #41
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The Python pins in
requirements/constraints.txt(138==pins, locked withscripts/lock-python-dependencies.sh) are never scanned for vulnerabilities as source.supply-chainjob runsscripts/verify-supply-chain.sh filesystem, which runstrivy fs. Trivy's pip analyzer only reads files named exactlyrequirements.txt. The rootrequirements.txtlists names without versions, andrequirements/*.txtandconstraints.txthave other names. Trivy reportsNumber of language-specific files num=3:Cargo.lockand the twopackage-lock.jsonfiles. Main's runs 5620, 5254, 4694 and 3126 show the same.pip-auditor osv-scanner step exists anywhere in CI.Are the pins on a production path?
Yes. Every Python service and module image installs with
pip install --constraint requirements/constraints.txt --requirement requirements/<x>.txt:services/brain,services/body/communication,services/body/mcp,services/pi_harness;modules/core/ears,modules/core/voice,flower,hud,airplay,automaticity,automaticity-training,mood,tapo-c200;modules/Dockerfile.python-module.Partial cover today:
container-buildrunstrivy imageon the images it builds in that run, which sees installed site-packages. That covers only the images selected for that run. It doesn't fail a PR that bumps a vulnerable pin used by an image the run didn't select. It also doesn't cover the test and dev pins.Suggested fix
Add a step to
supply-chain, either of:pip-audit --strict -r requirements/constraints.txt(with--no-deps, since the file is a full lock);osv-scanner --lockfile requirements.txt:requirements/constraints.txt.Run it in a container, as the trivy step already does, and fail on known vulnerabilities, like the npm and trivy gates. Found while reviewing #38. Kept out of that PR on purpose.
🤖 Generated with Claude Code
Parked: embodied-ai is shelved for now, and Forgejo Actions is being turned off on this repo so it stops using shared runner slots. Pick this up again when the repo is unshelved.