-
Notifications
You must be signed in to change notification settings - Fork 0
Update 8hobbies/workflows digest to 6ffa892 #276
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@23566a16aca822bf91e20bf57b5715869e181339 | ||
| uses: 8hobbies/workflows/.github/workflows/npm-lint.yml@6ffa892638c05b08601b32c5baa4bbf9a858b620 |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 26 days ago
To fix the problem, add a permissions block at the workflow root level in .github/workflows/lint.yml. This will set explicit, least-privilege permissions for all jobs unless they define overrides. For a lint-only workflow, the minimum required permission is most likely contents: read, since no writing to the repository, issues, or other resources is expected.
The change should be made directly under the workflow name and before the on: block (typically lines 15-16).
No imports or external definitions are required; just add a YAML mapping.
-
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@23566a16aca822bf91e20bf57b5715869e181339 | ||
| uses: 8hobbies/workflows/.github/workflows/npm-publish-dry-run.yml@6ffa892638c05b08601b32c5baa4bbf9a858b620 |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 26 days ago
To fix this issue, you should add a permissions block at the root of the workflow file, directly under the workflow name: and before the on: block. This restricts the default token permissions for all jobs (including any jobs/external workflows run via uses:). For most publish "dry-run" workflows, contents: read will suffice unless the workflow, or the reusable workflow it calls, explicitly needs additional permissions (such as for creating pull requests or writing packages). Since we don't have details on additional permissions required, the safest minimal starting point per the recommendation is:
permissions:
contents: readIf in the future the reusable workflow requires additional permissions, you can add them as needed.
Where to edit:
In .github/workflows/publish-dry-run.yml, add the above block after the name: field (line 15 or 16), just before the on: block.
-
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@23566a16aca822bf91e20bf57b5715869e181339 | ||
| uses: 8hobbies/workflows/.github/workflows/npm-runtime.yml@6ffa892638c05b08601b32c5baa4bbf9a858b620 |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 26 days ago
To fix this problem without changing the workflow's existing logic or functionality, add a permissions block near the top of the workflow file, immediately after the name: field and before the on: field. This block should specify the least privilege necessary. If you are unsure what is required, the absolute lowest privilege would be contents: read, which permits actions like checking out code but not writing back. If the reusable workflow needs more than read access to repository contents, you would adjust accordingly, but it's always safest to start restrictive.
Steps:
- Add a
permissions:block at the workflow root (aftername:). - For minimal privilege, use
permissions: contents: read.
-
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:
23566a1->6ffa892Configuration
📅 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.