-
Notifications
You must be signed in to change notification settings - Fork 0
Update 8hobbies/workflows digest to 816c71c #317
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,6 +19,6 @@ | |
| tags: ["v*"] | ||
| jobs: | ||
| build: | ||
| uses: 8hobbies/workflows/.github/workflows/npm-publish.yml@ad34dcf4277cc2e1f3ee68482120e6cfe9033655 | ||
| uses: 8hobbies/workflows/.github/workflows/npm-publish.yml@816c71c37d500c15bb9f7681c9230d4a0ef63a66 | ||
| secrets: | ||
| npm-auth-token: ${{ secrets.NPM_TOKEN }} | ||
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -22,4 +22,4 @@ | |||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||||||||
| test: | ||||||||||||||||||||||||||||||||
| uses: 8hobbies/workflows/.github/workflows/npm-runtime.yml@ad34dcf4277cc2e1f3ee68482120e6cfe9033655 | ||||||||||||||||||||||||||||||||
| uses: 8hobbies/workflows/.github/workflows/npm-runtime.yml@816c71c37d500c15bb9f7681c9230d4a0ef63a66 | ||||||||||||||||||||||||||||||||
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
Copilot AutofixAI 5 days ago Generally, the fix is to add an explicit permissions:
contents: readThis documents that the workflow only expects read access to repository contents unless further scopes are added later. The best minimally invasive fix here is to add a root-level
Suggested changeset
1
.github/workflows/runtime.yml
Copilot is powered by AI and may make mistakes. Always verify output.
Refresh and try again.
|
||||||||||||||||||||||||||||||||
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Copilot Autofix
AI 5 days ago
In general, to fix this kind of issue, you add a
permissions:block either at the top level of the workflow (to apply to all jobs) or under the specific job, specifying the minimalGITHUB_TOKENscopes needed. For a lint job that only needs to read the repository to run lint checks,contents: readis typically sufficient; if it needs to read from GitHub Packages,packages: readcan also be included.For this specific workflow, we should add a root‑level
permissionsblock just below thename:(or abovejobs:) to document and enforce least privilege across all jobs (currently justlint). Since the job is a reusable workflow invocation and there is no evidence it needs write access, we will setcontents: read. This does not change any functional behavior other than restricting any unintended write capabilities ofGITHUB_TOKEN. No imports or additional methods are needed, as this is purely a YAML configuration change in.github/workflows/lint.yml.Concretely:
Edit
.github/workflows/lint.yml.Insert:
between the
on:block and thejobs:block (or just aftername: Lintand beforeon:; both are valid, but placing it afteron:keeps the structure clear).Leave the existing
jobs.lint.usesline unchanged.