-
-
Notifications
You must be signed in to change notification settings - Fork 2
chore: configure npm trusted publishing #26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR configures npm trusted publishing using OpenID Connect (OIDC) authentication, enhancing security by eliminating the need for long-lived NPM_TOKEN secrets. The changes also improve GitHub Actions security posture by pinning actions to commit SHAs, adding explicit permission controls, and introducing automated security linting tools.
Key changes:
- Migrated npm publishing from token-based authentication to OIDC trusted publishing
- Pinned all GitHub Actions to specific commit SHAs for supply chain security
- Added GitHub Actions security linting tools (actionlint, ghalint, zizmor) with toolchain configuration
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
.tool-versions |
Added security linting tools (pinact, zizmor, actionlint, ghalint) and reformatted for better alignment |
.github/workflows/publish.yaml |
Configured OIDC permissions, pinned actions to commit SHAs, removed NPM_TOKEN secret dependency, added timeouts and security settings |
.github/workflows/ci.yaml |
Pinned actions to commit SHAs, added explicit permissions, timeouts, persist-credentials: false, and new github-actions security linting job |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
.github/workflows/publish.yaml
Outdated
| bun-version-file: ".tool-versions" | ||
| - run: bun install --frozen-lockfile | ||
| - run: npm run build | ||
| - run: npm publish |
Copilot
AI
Dec 31, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The provenance option should be explicitly set to true when using npm trusted publishing with OIDC. Add 'provenance: true' to the npm publish command to ensure package provenance is generated and published.
| - run: npm publish | |
| - run: npm publish --provenance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
cf. https://efcl.info/2025/09/07/npm-oidc/