Archived
Watch
2
1
Fork
You've already forked embodied-ai
0

supply-chain: Python pins in requirements/constraints.txt are never vulnerability-scanned #41

Open
opened 2026-10-29 13:02:40 +01:00 by turnercore · 1 comment
Contributor

Problem

The Python pins in requirements/constraints.txt (138 == pins, locked with scripts/lock-python-dependencies.sh) are never scanned for vulnerabilities as source.

  • The supply-chain job runs scripts/verify-supply-chain.sh filesystem, which runs trivy fs. Trivy's pip analyzer only reads files named exactly requirements.txt. The root requirements.txt lists names without versions, and requirements/*.txt and constraints.txt have other names. Trivy reports Number of language-specific files num=3: Cargo.lock and the two package-lock.json files. Main's runs 5620, 5254, 4694 and 3126 show the same.
  • No pip-audit or 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: services/brain, services/body/communication, services/body/mcp, services/pi_harness;
  • modules: modules/core/ears, modules/core/voice, flower, hud, airplay, automaticity, automaticity-training, mood, tapo-c200;
  • modules/Dockerfile.python-module.

Partial cover today: container-build runs trivy image on 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

## Problem The Python pins in `requirements/constraints.txt` (138 `==` pins, locked with `scripts/lock-python-dependencies.sh`) are never scanned for vulnerabilities as source. - The `supply-chain` job runs `scripts/verify-supply-chain.sh filesystem`, which runs `trivy fs`. Trivy's pip analyzer only reads files named exactly `requirements.txt`. The root `requirements.txt` lists names without versions, and `requirements/*.txt` and `constraints.txt` have other names. Trivy reports `Number of language-specific files num=3`: `Cargo.lock` and the two `package-lock.json` files. Main's runs 5620, 5254, 4694 and 3126 show the same. - No `pip-audit` or 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: `services/brain`, `services/body/communication`, `services/body/mcp`, `services/pi_harness`; - modules: `modules/core/ears`, `modules/core/voice`, `flower`, `hud`, `airplay`, `automaticity`, `automaticity-training`, `mood`, `tapo-c200`; - `modules/Dockerfile.python-module`. Partial cover today: `container-build` runs `trivy image` on 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](https://claude.com/claude-code)
Author
Contributor

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.

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.
Commenting is not possible because the repository is archived.
No labels
No milestone
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
daisy/embodied-ai#41
No description provided.