Skip to content

Commit 72574b7

Browse files
ci(lint-workflows): hash-pin pip install to close Sonar S8541/S8544 (#12)
* ci(lint-workflows): hash-pin pip install to close Sonar S8541/S8544 Mirrors Abblix/Oidc.Server#70 — identical pip install line, same finding, same fix. PyYAML moved to .github/workflows/requirements/lint-workflows.txt with ==6.0.2 + sha256 hashes (x86_64 + aarch64 manylinux wheels). Install via --only-binary :all: --require-hashes -r ... Rule codified in Abblix/Docs/wiki/github-actions-security-checklist.md (commit 91e09d2). * chore(gitignore): keep CLAUDE.md untracked (mirrors Docs/AuthSvc/Oidc.Server)
1 parent a221132 commit 72574b7

3 files changed

Lines changed: 22 additions & 1 deletion

File tree

.github/workflows/lint-workflows.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,15 @@ jobs:
3131
with:
3232
python-version: '3.12'
3333

34+
# --only-binary :all: skips arbitrary setup-script execution at install
35+
# time (closes Sonar S8541). --require-hashes + pinned requirements file
36+
# locks both the resolved version and the artifact bytes — a malicious
37+
# PyPI release with the same version cannot pass the hash check (closes
38+
# Sonar S8544).
3439
- name: Install PyYAML
35-
run: pip install --disable-pip-version-check pyyaml
40+
run: |
41+
pip install --disable-pip-version-check --only-binary :all: \
42+
--require-hashes -r .github/workflows/requirements/lint-workflows.txt
3643
3744
- name: "Block inline untrusted-input interpolation in run: blocks"
3845
run: python .github/scripts/lint-no-inline-secrets.py
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Pinned dependency for the lint-workflows GitHub Actions job.
2+
# Hashes are for the exact wheels resolved on the runner (ubuntu-latest +
3+
# Python 3.12). x86_64 is the canonical runner image; aarch64 included so a
4+
# future runner-class switch does not break CI silently.
5+
#
6+
# Bumping: rerun `pip download --only-binary :all: --no-deps pyyaml==<v> -d /tmp/`,
7+
# read sha256 of each .whl, replace below.
8+
9+
pyyaml==6.0.2 \
10+
--hash=sha256:80bab7bfc629882493af4aa31a4cfa43a4c57c83813253626916b8c7ada83476 \
11+
--hash=sha256:1f71ea527786de97d1a0cc0eacd1defc0985dcf6b3f17bb77dcfc8c34bec4dc5

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,3 +111,6 @@ out/
111111
# Ignore JetBrains project files
112112
.idea/
113113
*.cmd
114+
115+
# Local AI/dev guidance — kept untracked, mirrors policy in Docs/AuthSvc/Oidc.Server
116+
**/CLAUDE.md

0 commit comments

Comments
 (0)