-
Notifications
You must be signed in to change notification settings - Fork 0
Update 8hobbies/workflows digest to aeea4ef #280
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@6ffa892638c05b08601b32c5baa4bbf9a858b620 | ||
| uses: 8hobbies/workflows/.github/workflows/npm-lint.yml@aeea4ef82ae99732c467d6245294bbed0e0fa426 |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 2 months ago
To fix the issue, we should explicitly add a permissions key at the root of the workflow file (.github/workflows/lint.yml), just below the name: field (and above on:), specifying the minimal set of GitHub token permissions needed for this workflow. Since the workflow is strictly for linting and delegates all work to a reusable workflow, the safest/best choice is likely to set all permissions to read or to use the minimal starting point of permissions: {}
as recommended by CodeQL (which grants no access). If linting requires no writing (no PR creation, no issue writing), then contents: read will be sufficient as a common pattern. If the downstream workflow expects to update PRs, you might add pull-requests: write; but the secure default is to set contents: read.
Therefore, insert the following block after name: Lint:
permissions:
contents: readNo methods/imports or other code changes are needed; this is a single block YAML addition.
-
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@6ffa892638c05b08601b32c5baa4bbf9a858b620 | ||
| uses: 8hobbies/workflows/.github/workflows/npm-publish-dry-run.yml@aeea4ef82ae99732c467d6245294bbed0e0fa426 |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 2 months ago
To fix the issue, add a permissions block at the workflow root right under the name field (or, optionally, under the jobs.run block if granular job-level control is needed). Since the workflow is for a "Publish Dry Run" and only calls a reusable workflow, it probably does not need broad write access. Unless the underlying reusable workflow requires more, the safest minimal value is contents: read (the lowest permissions for most operations). If the reusable workflow needs more, the permissions should be increased per its documentation. For now, to follow the minimal starting point as per the CodeQL recommendation, add:
permissions:
contents: readright after the name field. No imports, methods, or definitions are required since this is a YAML configuration change.
-
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@6ffa892638c05b08601b32c5baa4bbf9a858b620 | ||
| uses: 8hobbies/workflows/.github/workflows/npm-runtime.yml@aeea4ef82ae99732c467d6245294bbed0e0fa426 |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 2 months ago
To fix this problem, you should explicitly declare a permissions block at the top level of the workflow (beneath the name: but before on: or jobs:), or inside each job. Since this workflow delegates all logic to a single job (test), the minimal and most effective fix is to add a root-level permissions key. If you are unsure which permissions are required, the default safe setting is permissions: { contents: read }. Build on this if the reusable workflow needs additional write permissions (e.g., for pull requests), but in the absence of such requirements, contents: read is the safest baseline.
You must:
- Insert the following lines after
name: Runtimeon line 15:
permissions:
contents: readThis grants the GITHUB_TOKEN only read access to repository contents for every job unless a job overrides it.
-
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:
6ffa892->aeea4efConfiguration
📅 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.