Skip to content

Commit c23da43

Browse files
authored
chore: update CI workflows to pin pip packages and go packages (#6498)
* Pin pip dependencies by hash in docs workflow Generate a locked requirements.txt with full SHA256 hashes for all dependencies (direct and transitive) using pip-compile --generate-hashes. Add --require-hashes to pip install commands in the workflow. Keep the original version-pinned requirements as requirements.in for future updates via pip-compile. * Verify golangci-lint install script integrity with SHA256 Download the install script to a temp file and verify its SHA256 checksum before executing, replacing the curl-pipe-to-sh pattern. This satisfies the OpenSSF Scorecard pinned-dependencies check. * Pin helm-docs to v1.14.2 in helm-tools.sh Replace @latest with a specific version to satisfy the OpenSSF Scorecard pinned-dependencies check. Go modules with full semantic versions are treated as pinned since the Go tool verifies downloaded content against the checksum database. Add a renovate comment for automated version updates.
1 parent 9bb899c commit c23da43

5 files changed

Lines changed: 576 additions & 13 deletions

File tree

.github/workflows/docs.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ jobs:
3535
cache: "pip"
3636
cache-dependency-path: "./docs/scripts/requirements.txt"
3737

38-
- run: pip install -r docs/scripts/requirements.txt
38+
# To update dependencies, edit docs/scripts/requirements.in and run:
39+
# pip-compile --generate-hashes --strip-extras --output-file=docs/scripts/requirements.txt docs/scripts/requirements.in
40+
- run: pip install --require-hashes -r docs/scripts/requirements.txt
3941

4042
- name: lint and build docs
4143
run: mkdocs build --strict
@@ -58,7 +60,7 @@ jobs:
5860
cache: "pip"
5961
cache-dependency-path: "./docs/scripts/requirements.txt"
6062

61-
- run: pip install -r docs/scripts/requirements.txt
63+
- run: pip install --require-hashes -r docs/scripts/requirements.txt
6264

6365
- name: Configure Git user
6466
run: |

docs/scripts/requirements.in

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
mkdocs-git-revision-date-localized-plugin == 1.5.2
2+
mkdocs == 1.6.1
3+
mkdocs-macros-plugin == 1.5.0
4+
mkdocs-material == 9.7.6
5+
mkdocs-literate-nav == 0.6.3
6+
mkdocs-same-dir == 0.1.5
7+
mdx-truly-sane-lists == 1.3
8+
mike == 2.2.0

0 commit comments

Comments
 (0)