-
Notifications
You must be signed in to change notification settings - Fork 0
Enable stylelint-suitcss
#50
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
base: main
Are you sure you want to change the base?
Enable stylelint-suitcss
#50
Conversation
| uses: ./.github/workflows/test-package.yml | ||
| name: latest | ||
| with: | ||
| package: stylelint-suitcss | ||
| stylelint-version: stylelint@latest | ||
| install-command: yarn | ||
| list-installed-versions-command: yarn list --pattern stylelint |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium test
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 3 months ago
To fix the problem, add a permissions block to the workflow file. This block should be placed at the root level (top-level, alongside name, on, etc.) to apply to all jobs in the workflow, unless a job overrides it. The minimal safe default is contents: read, which grants read-only access to repository contents. If the workflow or any called workflow requires additional permissions, those can be added as needed, but starting with contents: read is the recommended baseline. The change should be made at the top of .github/workflows/test-package-stylelint-suitcss-968.latest.yml, after the name field and before on:.
-
Copy modified lines R2-R3
| @@ -1,2 +1,4 @@ | ||
| name: stylelint-suitcss | ||
| permissions: | ||
| contents: read | ||
| on: |
| uses: ./.github/workflows/test-package.yml | ||
| name: next | ||
| with: | ||
| package: stylelint-suitcss | ||
| stylelint-version: stylelint/stylelint | ||
| install-command: yarn | ||
| list-installed-versions-command: yarn list --pattern stylelint |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium test
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 3 months ago
To fix the problem, add a permissions block to the workflow file to explicitly set the minimum required permissions for the GITHUB_TOKEN. Since the workflow only calls another workflow and does not appear to require any write permissions, the safest minimal starting point is to set permissions: read-all at the root of the workflow. This ensures that all jobs in the workflow, unless overridden, will only have read access. The change should be made at the top level of .github/workflows/test-package-stylelint-suitcss-968.next.yml, after the name and before the on block (or after the on block, but before jobs).
-
Copy modified line R2
| @@ -1,2 +1,3 @@ | ||
| name: stylelint-suitcss | ||
| permissions: read-all | ||
| on: |
See #39
Blocked on suitcss/stylelint-suitcss#16