fix: add explicit permissions to TypeScript SDK test workflow#32
fix: add explicit permissions to TypeScript SDK test workflow#32adnanrhussain wants to merge 2 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses a GitHub code scanning alert by explicitly declaring least-privilege GITHUB_TOKEN permissions for the TypeScript SDK test workflow, rather than relying on repository defaults.
Changes:
- Add an explicit top-level
permissionsblock to the TypeScript SDK CI workflow. - Grant
contents: read(for checkout) andactions: write(to support cancelling prior runs).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| permissions: | ||
| contents: read | ||
| actions: write | ||
|
|
There was a problem hiding this comment.
This repo’s other workflows set permissions at the job level (e.g. .github/workflows/publish-typescript-sdk.yml:11, release-please.yml:10, conventional-commits.yml:16). To stay consistent and keep future least-privilege tighter, consider moving this workflow-level permissions block down into each job (or only jobs that require elevated scopes).
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Summary
least-privilege permissions
actions: write(whichstyfle/cancel-workflow-actionrequires), we replaced it with nativeconcurrency— keeping the final permission scope tocontents: readonly