DOCOPS-160 Harden docs-deploy-surge.yml against artifact poisoning (sync from docs-template) - #171
Merged
Merged
Conversation
…cs-template)
Syncs .github/workflows/docs-deploy-surge.yml with the canonical version in
neo4j/docs-template to resolve the critical CodeQL "artifact poisoning" alert:
- add a validate-changelog step that rejects a symlinked changelog before it is
read into the PR comment (prevents arbitrary-file-read from a poisoned artifact)
- use process.env.RUN_ID instead of ${{ env.RUN_ID }} in the github-script step
(avoids GitHub Actions expression injection)
- comment/whitespace tidy-ups to match the template
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…emplate) Refreshes the sync to the now-canonical docs-template version (docs-template#59): replaces the old `unzip -l | grep '../'` suspicious-path-check with the zipinfo loop that also rejects empty archives, absolute paths, and Windows-style backslash separators. No branch/path filters changed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.ymlwith the canonical version inneo4j/docs-templateto resolve the critical CodeQL Artifact poisoning alert (#1) ondev.Why
docs-deploy-surge.ymlruns onworkflow_run(completion of Verify docs PR) and downloads/handles artifacts built from PR content, which can originate from an untrusted fork. The template version adds hardening that the copy in this repo was missing:validate-changelogstep — rejects a symlinkedchangelogfile before its contents are read into the PR comment, preventing arbitrary-file-read from a poisoned artifact.process.env.RUN_IDinstead of${{ env.RUN_ID }}in thegithub-scriptstep — avoids GitHub Actions expression injection into the inline JS.This matches the same fix already merged and marked fixed in the public
neo4j/docs-toolsrepo.Not changed
approve-forkenvironment gate is left commented out, matching the template.docs-toolsenables it, but doing so requires first creating apreviewenvironment (with required reviewers) in this repo's settings — worth considering as a follow-up for defence-in-depth, but out of scope here to avoid breaking deploys.Verification
Reconciled against
neo4j/docs-template@main; the resulting file is byte-identical to the template. Re-scan ondevafter merge should clear alert #1.🤖 Generated with Claude Code