Skip to content

[Hermes] Remove npm-publish.yml and harden CI workflow security#20

Closed
Coding-Dev-Tools wants to merge 1 commit into
masterfrom
hermes/schemaforge/remove-npm-publish-harden-ci
Closed

[Hermes] Remove npm-publish.yml and harden CI workflow security#20
Coding-Dev-Tools wants to merge 1 commit into
masterfrom
hermes/schemaforge/remove-npm-publish-harden-ci

Conversation

@Coding-Dev-Tools

Copy link
Copy Markdown
Owner

Summary

Remove wrong-language npm-publish.yml workflow and add security hardening (persist-credentials: false) to all GitHub Actions workflows.

Why this change

  • npm-publish.yml is wrong for Python repos: This repo is a Python package published to PyPI via publish.yml. The npm-publish.yml is a template artifact that would fail on release since there is no package.json.
  • Missing persist-credentials: false: By default, actions/checkout stores GITHUB_TOKEN in .git/config, which can be exfiltrated by compromised later steps. Adding persist-credentials: false prevents this.
  • Outdated checkout@v4 in pages.yml: All other workflows already use @v6.

What changed

  • Removed .github/workflows/npm-publish.yml (Python repo, not Node.js)
  • Added persist-credentials: false to checkout steps in ci.yml (2 steps), publish.yml (1 step), pages.yml (1 step)
  • Updated actions/checkout@v4 → @v6 in pages.yml

Validation performed

  • ruff check: All checks passed
  • pytest: 298/298 tests passed
  • No code changes — only CI workflow modifications

Risks/rollback

  • Zero code risk — only workflow files changed
  • npm-publish.yml removal: Safe — publish.yml already handles PyPI releases
  • persist-credentials: false: Safe — no workflow step uses git push from checkout

Follow-ups

  • deploydiff and apighost also have npm-publish.yml to remove (same pattern)

- Remove npm-publish.yml (wrong-language workflow for Python repo;
  publish.yml already handles PyPI publishing)
- Add persist-credentials: false to all checkout steps (ci, publish, pages)
- Update checkout@v4 to checkout@v6 in pages.yml
@Coding-Dev-Tools

Copy link
Copy Markdown
Owner Author

Closing: This repo has a legitimate npm wrapper (package.json + cli.js). The npm-publish.yml workflow should be kept. See configdrift#9 for rationale.

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