security: adopt supply chain security defaults - #153
Conversation
- dependabot.yml: add 7-day cooldown (cooldown.default-days: 3) to the github-actions updates entry; all other config preserved unchanged. - ci.yml: add explicit least-privilege GITHUB_TOKEN permissions (workflow default contents: read, with pull-requests: write/read overrides only where gh pr comment / gh pr view are used). - update-release.yml: add explicit contents: read permissions (PR creation already uses a scoped GitHub App token, not GITHUB_TOKEN). - hotspots.yml: add TODO comment flagging the unpinned, non-hash-checked pip install for human review. No Ruby/Go/npm application dependency manifests exist in this repo (only CodeQL qlpack.yml packs and Go/CodeQL test fixtures), so npm ci/bundler frozen mode/go -mod=readonly/.npmrc min-release-age/uv exclude-newer changes do not apply. No pull_request_target usage found. All third-party Actions are already pinned to full commit SHAs. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
@copilot fix this todo ... this is a general plan to resolve: run something like pip install pip-tools && pip-compile --generate-hashes ql/hotspots/requirements.txt (or uv pip compile --generate-hashes) to produce a fully pinned, hashed lockfile. Update the workflow step to pip install -r ql/hotspots/requirements.txt --require-hashes (or better, pip install --require-hashes -r ), dropping the ad hoc pip install pandas. Add pyyaml explicitly to that install path (fixing the latent gap) and confirm the job still succeeds end-to-end (a real workflow_dispatch run, since there's no test harness for this path). |
There was a problem hiding this comment.
Pull request overview
This PR tightens supply-chain/security defaults for the repository’s GitHub automation by explicitly scoping GITHUB_TOKEN permissions, throttling Dependabot update PRs, and flagging a non-deterministic Python dependency install for follow-up.
Changes:
- Add explicit least-privilege
permissions:blocks to workflows (workflow-level defaults plus job overrides where PR interactions are needed). - Add a Dependabot cooldown setting for GitHub Actions updates.
- Add a TODO note in the hotspots workflow calling out an unpinned/non-hash-checked
pip install.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/ci.yml |
Sets workflow/job GITHUB_TOKEN permissions defaults and PR-specific overrides. |
.github/workflows/update-release.yml |
Adds explicit contents: read permissions for the release-update workflow. |
.github/workflows/hotspots.yml |
Adds a TODO comment documenting supply-chain risk around unpinned pip install. |
.github/dependabot.yml |
Adds a cooldown setting for Dependabot GitHub Actions updates. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 4/4 changed files
- Comments generated: 3
- Review effort level: Low
…in workflow - Add ql/hotspots/requirements.in (abstract, unpinned deps) - Generate ql/hotspots/requirements.txt with pip-compile --generate-hashes (fully pinned versions + SHA-256 hashes for all transitive deps) - Update hotspots.yml: replace unpinned `pip install pandas` with `pip install --require-hashes -r ql/hotspots/requirements.txt`
Done. Changes in commit
To update deps in the future, edit |
No Ruby/Go/npm application dependency manifests exist in this repo (only CodeQL qlpack.yml packs and Go/CodeQL test fixtures), so npm ci/bundler frozen mode/go -mod=readonly/.npmrc min-release-age/uv exclude-newer changes do not apply. No pull_request_target usage found. All third-party Actions are already pinned to full commit SHAs.