Skip to content

Commit 8b6eae7

Browse files
julian-rischclaude
andcommitted
ci: pin container, go and npm dependencies (OpenSSF Scorecard)
Improves the OpenSSF Scorecard Pinned-Dependencies check: - docker/Dockerfile.base: give build_image/base_image pinned digest defaults and reference them as ${...} so scorecard resolves the FROM images by hash (containerImage 1/3 -> 3/3). docker-bake.hcl still overrides them at build time. - workflows_linting.yml: pin actionlint to v1.7.12 instead of @latest (goCommand 0/1 -> 1/1; scorecard treats full semver as pinned). - docs_search_sync.yml: use `npm ci` instead of `npm install` so the install verifies the committed lockfile (npmCommand 0/1 -> 1/1). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 6aa6f34 commit 8b6eae7

3 files changed

Lines changed: 9 additions & 6 deletions

File tree

.github/workflows/docs_search_sync.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
- name: Install Docusaurus and build docs-website
3737
working-directory: docs-website
3838
run: |
39-
npm install --ignore-scripts
39+
npm ci --ignore-scripts
4040
npm rebuild sharp
4141
npm run build
4242

.github/workflows/workflows_linting.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
go-version: ">=1.24.0"
2323

2424
- name: Install actionlint
25-
run: go install github.com/rhysd/actionlint/cmd/actionlint@latest
25+
run: go install github.com/rhysd/actionlint/cmd/actionlint@v1.7.12
2626

2727
- name: Run actionlint
2828
env:

docker/Dockerfile.base

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
ARG build_image
2-
ARG base_image
1+
# Pinned digest defaults so the base images are resolvable by hash even when
2+
# the args are not passed (e.g. by supply-chain scanners or a plain `docker build`).
3+
# docker/docker-bake.hcl overrides these at build time; keep the digests in sync.
4+
ARG build_image=python:3.12-slim@sha256:090ba77e2958f6af52a5341f788b50b032dd4ca28377d2893dcf1ecbdfdfe203
5+
ARG base_image=python:3.12-slim@sha256:090ba77e2958f6af52a5341f788b50b032dd4ca28377d2893dcf1ecbdfdfe203
36

4-
FROM $build_image AS build-image
7+
FROM ${build_image} AS build-image
58

69
ARG DEBIAN_FRONTEND=noninteractive
710
ARG haystack_version
@@ -25,7 +28,7 @@ ENV PATH="/opt/venv/bin:$PATH"
2528
RUN uv pip install --no-cache-dir -U setuptools && \
2629
uv pip install --no-cache-dir .
2730

28-
FROM $base_image AS final
31+
FROM ${base_image} AS final
2932

3033
COPY --from=build-image /opt/venv /opt/venv
3134

0 commit comments

Comments
 (0)