Two small supply-chain observations on the dev tooling. Neither is urgent and neither
is a bug; I'm raising them as a decision, because the fix touches CI image inputs and
that is yours to schedule.
What I found
requirements-dev.txt pins the six direct tools with == but has no hashes and no
constraints file. Their transitive dependencies resolve fresh on every install
(scripts/dev-setup.sh locally, and the slow path in lint.yml/build.yml when a PR
changes the pin files).
.pre-commit-config.yaml pins hook repos by tag (rev: v8.30.1, v1.7.12, ...).
Tags can be moved. pre-commit install --install-hooks builds the code at that tag, on
a contributor's machine and in the ci image build.
Why it might matter
Lint and Build only use the baked tools while the pin files match the ci image; any PR
that edits them makes the job pip install from PyPI inside the job container. Hashes
would make that path reproducible. SHA-pinned hook revisions would make a moved tag
visible instead of silent.
Possible fix (for you to judge)
pip-compile --generate-hashes into a lockfile, and pip install --require-hashes.
rev: set to commit SHAs (Renovate's pre-commit manager can keep # frozen: vX.Y.Z
comments updated).
Both are inputs of the ci/molecule images, so they follow the two-PR loop in CONTRIBUTING.md
(image version bump, rebuild on main, then the digest pin PR). That is why I have not
opened a PR for it.
Not in scope
scripts/dev-setup.sh itself looks sound: it derives the repo from its own location,
restores core.hooksPath on interruption, and limits rm -rf to the clone's .venv.
Happy to help with a PR if you want one; tell me which of the two (or both) you prefer.
Two small supply-chain observations on the dev tooling. Neither is urgent and neither
is a bug; I'm raising them as a decision, because the fix touches CI image inputs and
that is yours to schedule.
## What I found
1. **`requirements-dev.txt` pins the six direct tools with `==` but has no hashes and no
constraints file.** Their transitive dependencies resolve fresh on every install
(`scripts/dev-setup.sh` locally, and the slow path in `lint.yml`/`build.yml` when a PR
changes the pin files).
2. **`.pre-commit-config.yaml` pins hook repos by tag** (`rev: v8.30.1`, `v1.7.12`, ...).
Tags can be moved. `pre-commit install --install-hooks` builds the code at that tag, on
a contributor's machine and in the ci image build.
## Why it might matter
Lint and Build only use the baked tools while the pin files match the ci image; any PR
that edits them makes the job `pip install` from PyPI inside the job container. Hashes
would make that path reproducible. SHA-pinned hook revisions would make a moved tag
visible instead of silent.
## Possible fix (for you to judge)
- `pip-compile --generate-hashes` into a lockfile, and `pip install --require-hashes`.
- `rev:` set to commit SHAs (Renovate's `pre-commit` manager can keep `# frozen: vX.Y.Z`
comments updated).
Both are inputs of the ci/molecule images, so they follow the two-PR loop in CONTRIBUTING.md
(image version bump, rebuild on main, then the digest pin PR). That is why I have not
opened a PR for it.
## Not in scope
`scripts/dev-setup.sh` itself looks sound: it derives the repo from its own location,
restores `core.hooksPath` on interruption, and limits `rm -rf` to the clone's `.venv`.
Happy to help with a PR if you want one; tell me which of the two (or both) you prefer.
Opened #124 for both halves: SHA-pinned hook revisions and a hashed lock (requirements-dev.lock, installed with --require-hashes). Open point for you in the PR: Renovate cannot regenerate the lock, so pip bumps need scripts/lock-requirements.sh until that is wired (or accepted as manual).
Opened #124 for both halves: SHA-pinned hook revisions and a hashed lock (requirements-dev.lock, installed with --require-hashes). Open point for you in the PR: Renovate cannot regenerate the lock, so pip bumps need scripts/lock-requirements.sh until that is wired (or accepted as manual).
This looks already shipped: the hashed requirements-dev.lock and SHA-pinned hooks landed in #124. Recommend the maintainer closes it. (From Order of the implementation backlog, #198.)
This looks already shipped: the hashed `requirements-dev.lock` and SHA-pinned hooks landed in #124. Recommend the maintainer closes it. (From Order of the implementation backlog, #198.)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Two small supply-chain observations on the dev tooling. Neither is urgent and neither
is a bug; I'm raising them as a decision, because the fix touches CI image inputs and
that is yours to schedule.
What I found
requirements-dev.txtpins the six direct tools with==but has no hashes and noconstraints file. Their transitive dependencies resolve fresh on every install
(
scripts/dev-setup.shlocally, and the slow path inlint.yml/build.ymlwhen a PRchanges the pin files).
.pre-commit-config.yamlpins hook repos by tag (rev: v8.30.1,v1.7.12, ...).Tags can be moved.
pre-commit install --install-hooksbuilds the code at that tag, ona contributor's machine and in the ci image build.
Why it might matter
Lint and Build only use the baked tools while the pin files match the ci image; any PR
that edits them makes the job
pip installfrom PyPI inside the job container. Hasheswould make that path reproducible. SHA-pinned hook revisions would make a moved tag
visible instead of silent.
Possible fix (for you to judge)
pip-compile --generate-hashesinto a lockfile, andpip install --require-hashes.rev:set to commit SHAs (Renovate'spre-commitmanager can keep# frozen: vX.Y.Zcomments updated).
Both are inputs of the ci/molecule images, so they follow the two-PR loop in CONTRIBUTING.md
(image version bump, rebuild on main, then the digest pin PR). That is why I have not
opened a PR for it.
Not in scope
scripts/dev-setup.shitself looks sound: it derives the repo from its own location,restores
core.hooksPathon interruption, and limitsrm -rfto the clone's.venv.Happy to help with a PR if you want one; tell me which of the two (or both) you prefer.
Opened #124 for both halves: SHA-pinned hook revisions and a hashed lock (requirements-dev.lock, installed with --require-hashes). Open point for you in the PR: Renovate cannot regenerate the lock, so pip bumps need scripts/lock-requirements.sh until that is wired (or accepted as manual).
@Dragonish didnt you close this already?
This looks already shipped: the hashed
requirements-dev.lockand SHA-pinned hooks landed in #124. Recommend the maintainer closes it. (From Order of the implementation backlog, #198.)