-
Notifications
You must be signed in to change notification settings - Fork 0
Update 8hobbies/workflows digest to 23566a1 #273
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
| jobs: | ||
| lint: | ||
| uses: 8hobbies/workflows/.github/workflows/npm-lint.yml@44f843881a46dc28b2d66c154b1231649b43498a | ||
| uses: 8hobbies/workflows/.github/workflows/npm-lint.yml@23566a16aca822bf91e20bf57b5715869e181339 |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 2 months ago
To fix this problem, explicitly add a permissions: block at the root level of the workflow file (.github/workflows/lint.yml). This will ensure that any jobs in the workflow (including those using reusable workflows) have clearly limited permissions for the GITHUB_TOKEN according to least privilege. The best starting point is to use the minimal contents: read permission, which allows jobs to read repository contents without being able to perform any write operations, since the workflow's purpose is linting and should not require write permissions. Place the permissions: section after the workflow name: and before any triggers or jobs.
-
Copy modified lines R16-R17
| @@ -13,6 +13,8 @@ | ||
| # limitations under the License. | ||
|
|
||
| name: Lint | ||
| permissions: | ||
| contents: read | ||
|
|
||
| on: | ||
| push: |
| jobs: | ||
| run: | ||
| uses: 8hobbies/workflows/.github/workflows/npm-publish-dry-run.yml@44f843881a46dc28b2d66c154b1231649b43498a | ||
| uses: 8hobbies/workflows/.github/workflows/npm-publish-dry-run.yml@23566a16aca822bf91e20bf57b5715869e181339 |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 2 months ago
To fix this issue, you should explicitly add a permissions: block at the workflow level (top-level, after name: and before on:) in .github/workflows/publish-dry-run.yml. This ensures that the workflow applies the principle of least privilege, preventing jobs from inheriting excessive repository-level permissions. As this workflow appears to only need to perform a dry-run for publishing (and does not require write access), the minimal recommended permissions are contents: read. Add the following block:
permissions:
contents: readThis change should be applied directly after the workflow’s name: definition.
-
Copy modified lines R16-R17
| @@ -13,6 +13,8 @@ | ||
| # limitations under the License. | ||
|
|
||
| name: Publish Dry Run | ||
| permissions: | ||
| contents: read | ||
|
|
||
| on: | ||
| push: |
| jobs: | ||
| test: | ||
| uses: 8hobbies/workflows/.github/workflows/npm-runtime.yml@44f843881a46dc28b2d66c154b1231649b43498a | ||
| uses: 8hobbies/workflows/.github/workflows/npm-runtime.yml@23566a16aca822bf91e20bf57b5715869e181339 |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 2 months ago
To fix the problem, add a permissions: block that limits the privileges granted to the GITHUB_TOKEN. The safest default is contents: read, which is sufficient for many workflows and is the minimal permission recommended unless the workflow specifically needs additional privileges (e.g., to create PRs or modify issues).
How to fix:
Add the following block near the top level of the workflow, after the name: (so it applies to all jobs unless individually overridden):
permissions:
contents: readNo changes are needed to the reusable workflow usage or elsewhere.
Lines to change:
Between lines 15 and 16, insert the above block.
What is needed:
No extra methods, imports, or definitions are needed — only a YAML permission block in the correct place.
-
Copy modified lines R16-R17
| @@ -13,6 +13,8 @@ | ||
| # limitations under the License. | ||
|
|
||
| name: Runtime | ||
| permissions: | ||
| contents: read | ||
|
|
||
| on: | ||
| push: |
This PR contains the following updates:
44f8438->23566a1Configuration
📅 Schedule: Branch creation - "on Sunday" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.