DOCOPS-160 Harden docs-deploy-surge.yml against artifact poisoning (sync from docs-template)#312
Merged
Merged
Conversation
…cs-template)
Syncs .github/workflows/docs-deploy-surge.yml to the canonical neo4j/docs-template
version to resolve the critical CodeQL artifact-poisoning alert. Adds:
- validate-changelog step (rejects a symlinked changelog before it is read into
the PR comment – prevents arbitrary-file-read from a poisoned artifact)
- process.env.RUN_ID instead of ${{ env.RUN_ID }} in the github-script step
(avoids GitHub Actions expression injection)
- extended zipinfo suspicious-path-check: rejects empty archives, absolute paths,
path traversal (..), and Windows-style backslash separators
No branch or path filters changed.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Collaborator
|
Thanks for the documentation updates. The preview documentation has now been torn down - reopening this PR will republish it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Syncs
.github/workflows/docs-deploy-surge.ymlto the canonicalneo4j/docs-templateversion, resolving the critical CodeQL artifact poisoning alert on this repo.The sync brings in three hardening changes this repo was missing:
validate-changelogstep – rejects a symlinkedchangelogbefore its contents are read into the PR comment (blocks arbitrary-file-read from a poisoned fork artifact).process.env.RUN_IDinstead of${{ env.RUN_ID }}in thegithub-scriptstep (avoids GitHub Actions expression injection).suspicious-path-check(zipinfoloop underset -euo pipefail) – rejects empty archives, absolute paths, path traversal (..), and Windows-style backslash separators.Why
docs-deploy-surge.ymlruns onworkflow_runand unpacks/deploys an artifact built from (potentially fork) PR content. See docs-template#59 and neo4j/neo4j-spark-connector#1042 for the upstream hardening.No branch or path filters were changed – the result is byte-identical to the canonical template.