-
Notifications
You must be signed in to change notification settings - Fork 0
Update 8hobbies/workflows digest to 23566a1 #274
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 13 days ago
To fix the issue, add a permissions block at the root level of .github/workflows/lint.yml. Place it before the jobs: key, after the name: or on: section. Set the permission(s) required for linting to the least privileged. In almost all cases for linting jobs, only contents: read should be needed, unless the lint process comments on PRs (then you might need pull-requests: write). Since we cannot see any evidence in this snippet that write permissions are needed, the best and safest default is contents: read, which restricts the GITHUB_TOKEN to only read repository contents.
-
Copy modified lines R23-R24
| @@ -20,6 +20,8 @@ | ||
| pull_request: | ||
| branches: ["master"] | ||
|
|
||
| permissions: | ||
| contents: read | ||
| jobs: | ||
| lint: | ||
| uses: 8hobbies/workflows/.github/workflows/npm-lint.yml@23566a16aca822bf91e20bf57b5715869e181339 |
| 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 13 days ago
To fix this problem, add an explicit permissions block to .github/workflows/publish-dry-run.yml. This block should specify the minimum required permissions for GITHUB_TOKEN. Since the workflow only uses a reusable workflow for running an npm publish dry run, in most cases read-only access to repository contents is sufficient. The block can be added at the top level (after the name: and before jobs:) to apply to all jobs, unless individual jobs require different permissions. In this case, add:
permissions:
contents: readjust beneath the name: ... line and before on:. This grants only read access to repository contents, which is a safe default. If the workflow requires additional permissions (e.g., for pull-requests), those can be added, but based on the current code, contents: read suffices.
-
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 13 days ago
To fix the problem, add a permissions block to the workflow to restrict the GITHUB_TOKEN permissions to the minimal necessary. Since the workflow calls a reusable workflow, and we do not know exactly which permissions are required by npm-runtime.yml, the safest starting point is to specify permissions: {} at the root level. This sets all permissions to none unless the called workflow or jobs override it. If you know which exact permissions are needed (such as contents: read), you can specify those, but adding {} ensures no unnecessary permissions are granted by default.
Edits:
- In
.github/workflows/runtime.yml, add the following block after thename: Runtime(line 15), or you may add it between thenameandon(line 17). - The block should be:
permissions: {}
- No other changes, imports, or dependencies are needed.
-
Copy modified line R16
| @@ -13,6 +13,7 @@ | ||
| # limitations under the License. | ||
|
|
||
| name: Runtime | ||
| permissions: {} | ||
|
|
||
| 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.