-
Notifications
You must be signed in to change notification settings - Fork 0
Update 8hobbies/workflows digest to 067ef9a #302
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@593ea3eb002451d046b787891d190896b45068e3 | ||
| uses: 8hobbies/workflows/.github/workflows/npm-publish.yml@067ef9a5f26017da21acc0f647d0f505951dcdf5 | ||
| 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@593ea3eb002451d046b787891d190896b45068e3 | ||||||||||||||||||||||||||||||||
| uses: 8hobbies/workflows/.github/workflows/npm-runtime.yml@067ef9a5f26017da21acc0f647d0f505951dcdf5 | ||||||||||||||||||||||||||||||||
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 2 days ago In general, the fix is to explicitly restrict the For this workflow, the least invasive and clearest fix is to add a top-level permissions:
contents: readbetween 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 2 days ago
In general, to fix this type of issue you add an explicit
permissionsblock either at the top level of the workflow (applies to all jobs) or under the specific job. For a lint workflow that should not modify repository contents, a minimalcontents: readis typically sufficient. This constrains theGITHUB_TOKENto read-only access to the repo contents unless more is needed.For this specific file, the simplest, nonβdisruptive fix is to add a workflowβwide
permissionsblock right after theon:section and beforejobs:. That keeps the reusable workflow call intact while ensuring any job that doesnβt override permissions (including thislintjob) runs with only read access to repository contents. Unless the reusable workflowβs implementation requires broader permissions (which weβre not told and must not assume),contents: readis the safest choice aligned with least privilege.Concretely:
Edit
.github/workflows/lint.yml.After line 21 (the last line of the
on:section), insert:No imports or additional methods are required, as this is pure YAML configuration.