Skip to content

security: npm ci for the docs image; no unpinned npm install in the docs preview job - #1291

Merged
michalharakal merged 1 commit into
developfrom
security/pin-docs-image-and-action
Sep 20, 2026
Merged

michalharakal merged 1 commit into
developfrom
security/pin-docs-image-and-action

Conversation

@michalharakal

Copy link
Copy Markdown
Contributor

Clears the two OpenSSF Scorecard Pinned-Dependencies code-scanning alerts (#80 docs/.docker/Dockerfile:55, #54 .github/workflows/documentation.yml:105). The base image and all actions were already pinned by hash; what Scorecard flags is the two npm install commands.

  • Docs image: the five toolchain inputs (Antora CLI + site generator 3.1.15, lunr extension, mermaid-cli, asciidoctor-kroki — same versions/commits as before) move into docs/.docker/package.json; package-lock.json pins all 443 packages by integrity hash and the RUN becomes npm ci. Git dependencies are recorded as git+https:// so the build never depends on npm's ssh→https fallback. The lockfile was generated inside the same pinned node:20-alpine digest.
  • Docs preview job: npm install -g servepython3 -m http.server 3000; the setup-node step that existed only for it is gone.

Verified locally: two docker build --no-cache runs green; antora 3.1.15 and mmdc 11.16.0 present, extensions resolvable; the real site builds with the image (antora-playbook.yml, exit 0, 0 errors).

…review-server install

Scorecard Pinned-Dependencies flagged two npm installs. The docs image now declares its five
inputs in package.json and installs them with npm ci from a committed package-lock.json, which
pins every transitive package by integrity hash (git dependencies by commit over https). The
docs preview job serves the artifact with python3 -m http.server instead of a freshly
downloaded, unpinned serve package, which also removes its setup-node step.
@github-actions

Copy link
Copy Markdown

📖 Documentation Preview

The documentation has been built successfully for this PR.

Generated Files:

  • Operator documentation: docs/modules/operators/_generated_/
  • JSON schema output: operators.json

Artifacts:

  • Download the documentation-preview-1291 artifact to view the complete documentation locally.

This comment will be updated automatically when the PR is updated.

@michalharakal
michalharakal merged commit e96c857 into develop Sep 20, 2026
18 checks passed
@michalharakal
michalharakal deleted the security/pin-docs-image-and-action branch September 20, 2026 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant