Skip to content

[DOCS]: Pin npm packages with their commit hash in Dockerfile#848

Open
MacOS wants to merge 11 commits into
SKaiNET-developers:developfrom
MacOS:Dockerfile/pin-npm-packages-with-hash
Open

[DOCS]: Pin npm packages with their commit hash in Dockerfile#848
MacOS wants to merge 11 commits into
SKaiNET-developers:developfrom
MacOS:Dockerfile/pin-npm-packages-with-hash

Conversation

@MacOS

@MacOS MacOS commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

This PR pins all npm package installations in the Dockerfile used in the docs directory with their commit hash to increase security (#847).

The OpenSSF Score should increase after this PR has been merged.

@MacOS
MacOS requested review from Copilot and michalharakal July 20, 2026 14:00
@MacOS MacOS self-assigned this Jul 20, 2026
@MacOS MacOS added documentation Improvements or additions to documentation enhancement New feature or request labels Jul 20, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to improve the supply-chain security posture of the documentation build container by pinning the Node tooling installed in docs/.docker/Dockerfile, aligning with issue #847’s goal of reducing mutable dependency references and improving OpenSSF Scorecard signals.

Changes:

  • Replaces semver/tag-based npm installs for Antora/Mermaid/Kroki tooling with commit-SHA-like specifiers.
  • Adds inline comments documenting the intended mapping from SHA to package version.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/.docker/Dockerfile Outdated
Comment on lines +56 to +60
@antora/cli@aa33c8283f9cbc76df93201bec5f8421e8f59a43 \
@antora/site-generator@aa33c8283f9cbc76df93201bec5f8421e8f59a43 \
@antora/lunr-extension@41975fc8f62cb2219a2de2f618de1ae1482bd0ce \
@mermaid-js/mermaid-cli@a85b11df7064498d5b6b97ee9b2d4a7c10cb42ae \
asciidoctor-kroki@d02fbf06cdb837524f5e4e12537c05e0bb83c715 \

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will fix this tomorrow.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed this by using URLs

Comment thread docs/.docker/Dockerfile Outdated
Comment on lines +49 to +53
# @antora/cli@aa33c8283f9cbc76df93201bec5f8421e8f59a43 -> v3.1.15
# @antora/site-generator@aa33c8283f9cbc76df93201bec5f8421e8f59a43 -> v3.1.15
# @antora/lunr-extension@41975fc8f62cb2219a2de2f618de1ae1482bd0ce -> v1.0.0-alpha.8
# @mermaid-js/mermaid-cli@a85b11df7064498d5b6b97ee9b2d4a7c10cb42ae -> v11.16.0
# asciidoctor-kroki@d02fbf06cdb837524f5e4e12537c05e0bb83c715 -> v0.18

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

npm pack mathjax@3 is a good point - will be a separate PR because it is not an install but a download.

documenation.yml will be a separate PR.

michalharakal
michalharakal previously approved these changes Jul 21, 2026

@michalharakal michalharakal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @MacOS

Note: the failing preview-documentation check is not related to this change — it's a known limitation where fork PRs get a read-only GITHUB_TOKEN, so the "post preview comment" step can't run. Docs build fine and the artifact uploads correctly. Safe to ignore here; a fix to skip that step on fork PRs is coming separately.

@michalharakal michalharakal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thnak you @MacOS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants