-
Notifications
You must be signed in to change notification settings - Fork 1
Update 8hobbies/workflows digest to d98caf4 #149
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 |
|---|---|---|
|
|
@@ -17,6 +17,6 @@ | |
| tags: ["v*"] | ||
| jobs: | ||
| build: | ||
| uses: 8hobbies/workflows/.github/workflows/npm-publish.yml@aeea4ef82ae99732c467d6245294bbed0e0fa426 | ||
| uses: 8hobbies/workflows/.github/workflows/npm-publish.yml@d98caf412242294b1c9060cab2e30ecc9c55a0f7 | ||
| 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 | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -20,4 +20,4 @@ | ||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||
| jobs: | |||||||||||||||||||||||||||||
| test: | |||||||||||||||||||||||||||||
| uses: 8hobbies/workflows/.github/workflows/npm-runtime.yml@aeea4ef82ae99732c467d6245294bbed0e0fa426 | |||||||||||||||||||||||||||||
| uses: 8hobbies/workflows/.github/workflows/npm-runtime.yml@d98caf412242294b1c9060cab2e30ecc9c55a0f7 | |||||||||||||||||||||||||||||
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 3 months ago To fix the problem, add an explicit Specifically, insert the following block under the permissions:
contents: readNo methods, imports, or additional definitions are required; just update the YAML.
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 3 months ago
The best fix is to add a
permissions:block to the workflow, granting only those privileges required for the workflow to operate. Since the job only runs linting (and uses a reusable workflow) and does not appear to require any token-based write actions (such as creating issues or PRs, pushing code, etc.), the minimal permission would be read-only access to the repository contents. Thus, adding the following near the top of the workflow file, just after thename:declaration and beforeon:, ensures the workflow tokens are limited to the least privilege needed:If the reusable workflow needs more (e.g., to update PRs), this can be adjusted, but
contents: readis correct as a minimal starting point.Edit location:
.github/workflows/lint.ymlname: Lintand beforeon:).