-
Notifications
You must be signed in to change notification settings - Fork 0
Update 8hobbies/workflows digest to 00e8456 #285
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@7a5030fa297abb7a4eac4a015cc0186fd4809ba7 | ||
| uses: 8hobbies/workflows/.github/workflows/npm-lint.yml@00e84568aa8441faba7d53d88666b78e19c677d7 |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 22 days ago
The best solution is to explicitly set the permissions key at the root of the workflow (global level), ensuring that any job (including the delegated lint job) runs with only the required permissions. For a linting workflow that checks code but does not need to modify the repo, the minimum safe value is likely contents: read. This should be added after the name: declaration and before the on: block (i.e., before any jobs or triggers), to reduce token privileges for all jobs unless overwritten.
No additional methods, imports, or variable definitions are needed. The only change is to add a YAML block.
-
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@7a5030fa297abb7a4eac4a015cc0186fd4809ba7 | ||
| uses: 8hobbies/workflows/.github/workflows/npm-publish-dry-run.yml@00e84568aa8441faba7d53d88666b78e19c677d7 |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 22 days ago
To fix this problem, we should explicitly set the permissions block in the workflow file. The preferred location is at the root level, just after the name: and before the on: block, which will apply the permissions to all jobs unless overridden. The safest minimal setting is typically to restrict all permissions unless the workflow or its jobs require more for a specific reason. Since this workflow only includes a single job that calls a reusable workflow, and it likely doesn't need write access, the best practice is to set permissions: {} at the root. This sets all permissions to none. If future jobs need more, they can override at the job level.
No additional methods, imports, or definitions are needed: just insertion of a simple YAML block.
-
Copy modified line R16
| @@ -13,6 +13,7 @@ | ||
| # limitations under the License. | ||
|
|
||
| name: Publish Dry Run | ||
| permissions: {} | ||
|
|
||
| on: | ||
| push: |
| jobs: | ||
| test: | ||
| uses: 8hobbies/workflows/.github/workflows/npm-runtime.yml@7a5030fa297abb7a4eac4a015cc0186fd4809ba7 | ||
| uses: 8hobbies/workflows/.github/workflows/npm-runtime.yml@00e84568aa8441faba7d53d88666b78e19c677d7 |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 22 days ago
To fix this problem, you should add an explicit permissions: block to the workflow file, specifying only the required permissions for jobs in this workflow. The safest minimal starting point is contents: read, meaning the workflow can only read repository contents by default, which is generally sufficient for CI, linting, and test jobs that do not need to write back to the repo or interact with issues.
Add the following block immediately after name: and before on: in .github/workflows/runtime.yml:
permissions:
contents: readThis ensures jobs run with read-only access and narrows the risk of accidental or malicious modification of repository state. If more permissions are needed by the underlying workflow or specific steps, they can be granted as needed—otherwise, read-only is safest.
To implement:
- Add the
permissionsblock after thename:on line 15. - No other code, methods, or dependencies are required.
-
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:
7a5030f->00e8456Configuration
📅 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.