-
Notifications
You must be signed in to change notification settings - Fork 0
Update 8hobbies/workflows digest to 7a5030f #284
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@d98caf412242294b1c9060cab2e30ecc9c55a0f7 | ||
| uses: 8hobbies/workflows/.github/workflows/npm-lint.yml@7a5030fa297abb7a4eac4a015cc0186fd4809ba7 |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 4 days ago
The best way to fix the problem is to explicitly add a permissions block near the top of the workflow file .github/workflows/lint.yml to restrict the workflow’s access to only what is strictly necessary. Because this workflow appears to only run linting via a reusable workflow (with no indications of publishing, writing to issues, or PRs), the minimal required permission should be contents: read—which is the lowest required for most read-only tasks. You should add the following under the name field (above on:), unless your lint workflow specifically requires broader permissions. No other files need to be changed, and no imports are required.
-
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@d98caf412242294b1c9060cab2e30ecc9c55a0f7 | ||
| uses: 8hobbies/workflows/.github/workflows/npm-publish-dry-run.yml@7a5030fa297abb7a4eac4a015cc0186fd4809ba7 |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 4 days ago
To fix the problem, you should add a permissions block to the workflow, ideally at the root level, since only one job is declared. This block should explicitly restrict the GITHUB_TOKEN to only the permissions required by the workflow. As we do not know the exact requirements of the reusable workflow being invoked, the safest and recommended minimal starting point is contents: read, which only allows read access to repository content. If more permissions are needed, those can be added as required after consulting the documentation for the reusable workflow. The change should be done by inserting a permissions: section immediately after the name: field and before the on: section in the .github/workflows/publish-dry-run.yml file.
-
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@d98caf412242294b1c9060cab2e30ecc9c55a0f7 | ||
| uses: 8hobbies/workflows/.github/workflows/npm-runtime.yml@7a5030fa297abb7a4eac4a015cc0186fd4809ba7 |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 4 days ago
To fix this issue and meet best practices for GitHub Actions security, the workflow should be amended to explicitly set the permissions for the GITHUB_TOKEN.
The most robust and future-proof fix is to add a permissions block at the top level of the workflow (permissions: directly after name: but before on:), since this will apply the permissions setting to all jobs that do not have their own permissions.
Unless the job being called (via uses) requires more than read access, the minimal permission would be contents: read, meaning jobs can only read repository contents. If additional permissions are required by the reusable workflow, these can be adjusted accordingly (for example, granting pull-requests: write if writes to PRs are required).
Changes needed:
- Edit
.github/workflows/runtime.ymland insert a block
after thepermissions: contents: readname:block and beforeon: - No imports or additional dependencies are needed.
-
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:
d98caf4->7a5030fConfiguration
📅 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.