Skip to content

ci(security): SHA-pin third-party actions, move dev host to secrets - #820

Closed
AndriiPasternak31 wants to merge 1 commit into
devfrom
ci/sha-pin-third-party-actions
Closed

ci(security): SHA-pin third-party actions, move dev host to secrets#820
AndriiPasternak31 wants to merge 1 commit into
devfrom
ci/sha-pin-third-party-actions

Conversation

@AndriiPasternak31

Copy link
Copy Markdown
Contributor

Summary

deploy-dev.yml referenced tailscale/github-action@v2 and appleboy/ssh-action@v1 — both unpinned third-party actions handling TAILSCALE_AUTH_KEY (tailnet join) and DEV_SSH_KEY (sudo SSH on dev host). A single supply-chain hijack (account takeover, malicious forced retag) exfils both credentials on the next push to dev. SHA-pinned to mitigate.

Same workflow hardcoded the dev Tailscale CGNAT IP and SSH username in a PUBLIC repo, leaking the dev host's tailnet topology. Moved both to GitHub repo secrets (DEV_HOST, DEV_USER) — must be set in repo secrets before merge or the next deploy fails fast. CLAUDE.md forbids internal addresses in this public tree.

While here, SHA-pinned the other two workflows with third-party actions (pypa/gh-action-pypi-publish, google-github-actions/*) for defense in depth. First-party actions/* keep their major-tag pins per GitHub's documented recommendation (GitHub itself signs and re-tags those).

After-state: zero unpinned third-party uses: lines across .github/workflows/.

What changed

  • .github/workflows/deploy-dev.yml: SHA-pin tailscale + ssh-action; move DEV_HOST / DEV_USER to secrets
  • .github/workflows/publish-cli.yml: SHA-pin pypa/gh-action-pypi-publish
  • .github/workflows/sync-docs-to-vertex.yml: SHA-pin google-github-actions/*

Required before merge (admin)

Two new repo secrets must be set:

  • DEV_HOST — the dev tailnet IP
  • DEV_USER — the SSH username

Without these, the next deploy-dev run fails fast (which is the safer failure mode than silently exposing the values in workflow logs).

Test plan

  • All SHAs verified against current v2 / v1 tag pointers (no version drift)
  • grep'd .github/workflows/ for uses: [^a-z] patterns (no remaining unpinned third-party)
  • Validated YAML structure — workflows parse cleanly

Out of scope

This PR was previously bundled into #798 (circuit-breaker fix) — split out for isolated security review.

Companion PR #819 adds Dependabot + CODEOWNERS to keep these SHAs current and gate future changes to .github/.

🤖 Generated with Claude Code

deploy-dev.yml referenced tailscale/github-action@v2 and
appleboy/ssh-action@v1 — both unpinned third-party actions handling
TAILSCALE_AUTH_KEY (tailnet join) and DEV_SSH_KEY (sudo SSH on dev host).
A single supply-chain hijack (account takeover, malicious forced retag)
exfils both credentials on the next push to dev. SHA-pinned to mitigate.

Same workflow hardcoded the dev Tailscale CGNAT IP and SSH username in
a PUBLIC repo, leaking the dev host's tailnet topology. Moved both to
GitHub repo secrets (DEV_HOST, DEV_USER) — must be set before merge or
the next deploy fails fast. CLAUDE.md forbids internal addresses in this
public tree.

While here, SHA-pinned the other two workflows with third-party actions
(pypa/gh-action-pypi-publish, google-github-actions/*) for defense in
depth. First-party actions/* keep their major-tag pins per GitHub's
documented recommendation (GitHub itself signs and re-tags those).

After-state: zero unpinned third-party uses: lines across .github/workflows/.
@AndriiPasternak31

Copy link
Copy Markdown
Contributor Author

Closed by branch rename. Continuation: #826.

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