Skip to content

DOCOPS-160 Harden docs-deploy-surge.yml against artifact poisoning (sync from docs-template)#14

Merged
recrwplay merged 1 commit into
devfrom
security/deploy-surge-artifact-poisoning
Jul 21, 2026
Merged

DOCOPS-160 Harden docs-deploy-surge.yml against artifact poisoning (sync from docs-template)#14
recrwplay merged 1 commit into
devfrom
security/deploy-surge-artifact-poisoning

Conversation

@recrwplay

Copy link
Copy Markdown
Contributor

What

Syncs .github/workflows/docs-deploy-surge.yml to the canonical neo4j/docs-template version, resolving the critical CodeQL artifact poisoning alert on this repo.

The sync brings in three hardening changes this repo was missing:

  • validate-changelog step – rejects a symlinked changelog before its contents are read into the PR comment (blocks arbitrary-file-read from a poisoned fork artifact).
  • process.env.RUN_ID instead of ${{ env.RUN_ID }} in the github-script step (avoids GitHub Actions expression injection).
  • Extended suspicious-path-check (zipinfo loop under set -euo pipefail) – rejects empty archives, absolute paths, path traversal (..), and Windows-style backslash separators.

Why

docs-deploy-surge.yml runs on workflow_run and 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.

🤖 Generated with Claude Code

…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) <noreply@anthropic.com>
@neo4j-docops-agent

neo4j-docops-agent commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Thanks for the documentation updates.

The preview documentation has now been torn down - reopening this PR will republish it.

@recrwplay
recrwplay merged commit 8ada04f into dev Jul 21, 2026
4 checks passed
@recrwplay
recrwplay deleted the security/deploy-surge-artifact-poisoning branch July 21, 2026 11:19
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.

2 participants