-
Notifications
You must be signed in to change notification settings - Fork 0
Update 8hobbies/workflows digest to 6ffa892 #277
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 5 days ago
To fix this problem and adhere to the principle of least privilege, add a permissions block to the root of the workflow file .github/workflows/lint.yml. This block should specify the minimum permissions required by the workflow. Since this is a linting workflow and most static analysis tools only require read access to the repository contents, set contents: read. If the workflow requires other permissions (for example, to update status checks or comment on pull requests), they can be added, but starting with contents: read is safe and minimal. Place the permissions block after the name field and before the on: trigger for clarity.
-
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 5 days ago
The recommended fix is to set an explicit permissions block to the workflow in .github/workflows/publish-dry-run.yml. The block can be set at the root level (applies to all jobs unless a job explicitly overrides it) or at the job level to specifically limit the permissions for that job. Since this workflow delegates all work to a single job via uses:, adding the block at the root is the simplest and most robust option.
Steps:
- Insert a
permissions:block right after thename:field and before theon:trigger. - Assign the most restrictive permissions possible to start (e.g.,
contents: read), and extend only if future operations require more. - The edit only affects the
.github/workflows/publish-dry-run.ymlfile, at the root/initial lines.
-
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 5 days ago
To address this problem, you should explicitly add a permissions block to the workflow. This can be done at the workflow root (which applies to all jobs not otherwise overridden) or at the job level. Since the workflow shown contains only one job (test), either location is appropriate. The minimal secure default is typically contents: read, which covers nearly all routine needs safely. If the underlying workflow requires more permissions (for example, pull-requests: write or similar), adjust as minimally as necessary, but you should not assume this unless documented. For now, the correct minimal change is to insert:
permissions:
contents: readimmediately after the name: key and before the on: key (i.e., between line 15 and 16). This will limit the GITHUB_TOKEN scope for this workflow to only read operations on repository contents unless a job warrants higher privileges.
-
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.