Skip to content

Conversation

@karle0wne
Copy link
Contributor

No description provided.

@karle0wne karle0wne requested a review from a team as a code owner November 15, 2025 06:38
jobs:
lint:
uses: valitydev/base-workflows/.github/workflows/basic-linters.yml@v2
uses: valitydev/base-workflows/.github/workflows/basic-linters.yml@v1

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 2 months ago

To address this, you should add a permissions block at the root level of the workflow (top-level in the YAML file), so it applies to all jobs in this workflow unless individually overridden. Since most linters require, at most, contents: read and not write access, the safe minimal setting is:

permissions:
  contents: read

This setting provides only the minimum access required for the workflow to read repository contents and does not permit any write operations. Place this block after the name: and before or after the on: section for consistency and clarity, ideally just after the name: entry.

Required changes:

  • Add a permissions block with contents: read at the top level (after name: and before or after on:).
  • No new imports, definitions, or methods are required.

Suggested changeset 1
.github/workflows/basic-linters.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/basic-linters.yml b/.github/workflows/basic-linters.yml
--- a/.github/workflows/basic-linters.yml
+++ b/.github/workflows/basic-linters.yml
@@ -1,4 +1,6 @@
 name: Vality basic linters
+permissions:
+  contents: read
 
 on:
   pull_request:
EOF
@@ -1,4 +1,6 @@
name: Vality basic linters
permissions:
contents: read

on:
pull_request:
Copilot is powered by AI and may make mistakes. Always verify output.
@karle0wne karle0wne merged commit 2c0d26b into master Nov 17, 2025
10 checks passed
@karle0wne karle0wne deleted the bump-sd3 branch November 17, 2025 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants