-
Notifications
You must be signed in to change notification settings - Fork 0
Update 8hobbies/workflows digest to b912c36 #305
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,6 +19,6 @@ | |
| tags: ["v*"] | ||
| jobs: | ||
| build: | ||
| uses: 8hobbies/workflows/.github/workflows/npm-publish.yml@067ef9a5f26017da21acc0f647d0f505951dcdf5 | ||
| uses: 8hobbies/workflows/.github/workflows/npm-publish.yml@b912c36872c2ee7c67d5a8a8478382301e9e3060 | ||
| secrets: | ||
| npm-auth-token: ${{ secrets.NPM_TOKEN }} | ||
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -22,4 +22,4 @@ | |||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||
| test: | ||||||||||||||||||||||||||||||||
| uses: 8hobbies/workflows/.github/workflows/npm-runtime.yml@067ef9a5f26017da21acc0f647d0f505951dcdf5 | ||||||||||||||||||||||||||||||||
| uses: 8hobbies/workflows/.github/workflows/npm-runtime.yml@b912c36872c2ee7c67d5a8a8478382301e9e3060 | ||||||||||||||||||||||||||||||||
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
Copilot AutofixAI about 2 months ago To fix the problem, explicitly define a The best minimal fix without changing existing functionality is to add a root-level permissions:
contents: readright after the
Suggested changeset
1
.github/workflows/runtime.yml
Copilot is powered by AI and may make mistakes. Always verify output.
Refresh and try again.
|
||||||||||||||||||||||||||||||||
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Copilot Autofix
AI about 2 months ago
To fix this, explicitly declare least-privilege
permissionsfor the workflow so that theGITHUB_TOKENused by thelintjob is limited. Since this workflow just invokes an npm lint reusable workflow and does not appear to need to write to the repository or other resources, we can safely set read-only permissions on repository contents (and optionally packages, which is also read-only by default). The best, minimal change is to add apermissionsblock at the workflow root level (betweenon:andjobs:), which will apply to all jobs that do not override it, includinglint.Concretely, in
.github/workflows/lint.yml, insert:after the
on:section and beforejobs:. This does not alter the workflow’s behavior from a functional perspective (linting still runs as before) but ensures the token cannot perform unintended writes. No additional imports, methods, or other definitions are required; this is purely a YAML configuration change in the workflow file.