Action dependencies not pinned to full-length commit SHAs
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 76/100
Research direction
Start with PyCQA/bandit-action's action.yml and inspect any composite steps or reusable workflows it calls. Replace each mutable action tag, including setup-python, checkout, and upload-sarif, with the corresponding full-length commit SHA while preserving version comments. Done means all internal action references satisfy the required SHA-pinning policy.
Written by the indexing model from the issue text.
Description
Problem
PyCQA/bandit-action itself can be pinned to a full-length commit SHA (e.g.
PyCQA/bandit-action@67a458d90fa11fb1463e91e7f4c8f068b5863c7f), but the internal dependencies it references are pinned only to mutable version tags, not full-length commit SHAs:
actions/setup-python@v6actions/checkout@v6github/codeql-action/upload-sarif@v4
Impact
Many organisations and enterprises enforce a policy requiring all actions , including transitive/internal dependencies to be pinned to a full-length commit SHA. When bandit-action is used in such an environment, the workflow fails at the "Prepare all required actions" step with an error like:
Error: The actions actions/setup-python@v5, actions/checkout@v4, and github/codeql-action/upload-sarif@v3
are not allowed in <org>/<repo> because all actions must be pinned to a full-length commit SHA.
Even though the caller has correctly pinned PyCQA/bandit-action to a SHA, the action itself violates the policy because its own action.yml uses tag-based references internally.
Expected behaviour
All action references inside PyCQA/bandit-action's action.yml (and any composite steps or reusable workflows it calls) should be pinned to full-length commit SHAs, for example:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
- uses: github/codeql-action/upload-sarif@v3@... # pin to SHA
This is also a security best practice recommended by StepSecurity and OpenSSF Scorecard (the "Pinned-Dependencies" check).
Suggested fix
Replace all mutable tag references inside the action's source files with their corresponding full-length commit SHAs.
Environment
- Runner version: 2.332.0
- Observed when
bandit-actionis used in an organisation with mandatory SHA-pinning policy
- Dominant language
- No language data
- Stars
- 30
- Forks
- 15
- Avg merge
- 2h 11m
- Merged PRs (30d)
- 3
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PyCQA/bandit-action
-
New tag/release Openenhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
PyCQA/bandit-action#31 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
PyCQA/bandit-action#27 · 1 comment · 1 reaction ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 58/100
PyCQA/bandit-action#16 · 2 comments · 5 reactions ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 35/100
PyCQA/bandit-action#14 ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
PyCQA/bandit-action#13 · 1 reaction ·
All issues in PyCQA/bandit-action
Similar issues
-
kind/bug Ubuntu 24
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
kubernetes-sigs/kubespray#13532 ·
-
Needs Design Priority: Wishlist
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
elementary/flatpak-platform#253 ·
-
tagbot-manual
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100