Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@

jobs:
lint:
uses: 8hobbies/workflows/.github/workflows/npm-lint.yml@0addb4a5f6d2598854f617fae0b907a0ecd34a1e
uses: 8hobbies/workflows/.github/workflows/npm-lint.yml@4443153b7f57ef7295e48bb1f73e90cb8b28a0c4

Check warning

Code 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 Autofix

AI about 2 months ago

To fix the problem, you should add a permissions block to .github/workflows/lint.yml either at the root levelβ€”so it applies to all jobs in the workflow that do not have their own permissions keyβ€”or inside the lint job. Since the only job is lint, and it uses a reusable workflow, you can add the permissions block either right under jobs:, or the root of the workflow (after name, usually). The minimally required permission for a linting workflow is typically contents: read, but if you know it needs additional permissions (like commenting on pull requests), you can add those. Since you only have access to this job, it is safest to add a minimal block: permissions: contents: read.

Edit .github/workflows/lint.yml to add:

permissions:
  contents: read

immediately after the name: block (before on:), or within the lint: job as:

permissions:
  contents: read

The fix does not require any imports, definitions, or further changes.

Suggested changeset 1
.github/workflows/lint.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -13,6 +13,8 @@
 # limitations under the License.
 
 name: Lint
+permissions:
+  contents: read
 
 on:
   push:
EOF
@@ -13,6 +13,8 @@
# limitations under the License.

name: Lint
permissions:
contents: read

on:
push:
Copilot is powered by AI and may make mistakes. Always verify output.
2 changes: 1 addition & 1 deletion .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ jobs:
permissions:
pages: write
id-token: write
uses: 8hobbies/workflows/.github/workflows/npm-doc-pages.yml@0addb4a5f6d2598854f617fae0b907a0ecd34a1e
uses: 8hobbies/workflows/.github/workflows/npm-doc-pages.yml@4443153b7f57ef7295e48bb1f73e90cb8b28a0c4
2 changes: 1 addition & 1 deletion .github/workflows/publish-dry-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@

jobs:
run:
uses: 8hobbies/workflows/.github/workflows/npm-publish-dry-run.yml@0addb4a5f6d2598854f617fae0b907a0ecd34a1e
uses: 8hobbies/workflows/.github/workflows/npm-publish-dry-run.yml@4443153b7f57ef7295e48bb1f73e90cb8b28a0c4

Check warning

Code 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: {}
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
tags: ["v*"]
jobs:
build:
uses: 8hobbies/workflows/.github/workflows/npm-publish.yml@0addb4a5f6d2598854f617fae0b907a0ecd34a1e
uses: 8hobbies/workflows/.github/workflows/npm-publish.yml@4443153b7f57ef7295e48bb1f73e90cb8b28a0c4
secrets:
npm-auth-token: ${{ secrets.NPM_TOKEN }}

Check warning

Code 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: {}
2 changes: 1 addition & 1 deletion .github/workflows/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@

jobs:
test:
uses: 8hobbies/workflows/.github/workflows/npm-runtime.yml@0addb4a5f6d2598854f617fae0b907a0ecd34a1e
uses: 8hobbies/workflows/.github/workflows/npm-runtime.yml@4443153b7f57ef7295e48bb1f73e90cb8b28a0c4

Check warning

Code 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 Autofix

AI about 2 months ago

To fix the problem, you should add an explicit permissions block at the root level of the workflow in .github/workflows/runtime.yml. This block should minimally restrict permissions for the entire workflow unless a job overrides it. Since the job delegates all execution to a reusable workflow using uses:, and unless there are requirements for write access (such as creating releases, updating issues, etc.), the safest baseline is contents: read. This reduces GITHUB_TOKEN access to read-only. If workflow functionality requires elevated or more granular permissions, the block should be adjusted accordingly. To implement, insert the permissions: block after the name: and before the on: section (ideally line 16 or 17).

Suggested changeset 1
.github/workflows/runtime.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/runtime.yml b/.github/workflows/runtime.yml
--- a/.github/workflows/runtime.yml
+++ b/.github/workflows/runtime.yml
@@ -13,6 +13,8 @@
 # limitations under the License.
 
 name: Runtime
+permissions:
+  contents: read
 
 on:
   push:
EOF
@@ -13,6 +13,8 @@
# limitations under the License.

name: Runtime
permissions:
contents: read

on:
push:
Copilot is powered by AI and may make mistakes. Always verify output.