Skip to content

Potential fix for code scanning alert no. 2: Workflow does not contain permissions#15

Merged
sleipi merged 1 commit into
mainfrom
alert-autofix-2
May 30, 2026
Merged

Potential fix for code scanning alert no. 2: Workflow does not contain permissions#15
sleipi merged 1 commit into
mainfrom
alert-autofix-2

Conversation

@sleipi

@sleipi sleipi commented May 30, 2026

Copy link
Copy Markdown
Owner

Potential fix for https://github.com/sleipi/opencode-usage-stats-plugin/security/code-scanning/2

Add an explicit permissions block in .github/workflows/ci.yml at the workflow root so it applies to both quality and e2e jobs.
Best minimal fix without changing functionality: set:

permissions:
  contents: read

This is sufficient for actions/checkout and test/lint/typecheck steps that only read code.
Change location: directly below the on: trigger block (before jobs:), so all jobs inherit it unless overridden later.

No imports, methods, or extra definitions are needed (YAML workflow-only change).

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…n permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@sleipi sleipi marked this pull request as ready for review May 30, 2026 08:04
@sleipi sleipi merged commit ddb4bcd into main May 30, 2026
6 checks passed
@sleipi sleipi deleted the alert-autofix-2 branch May 30, 2026 08:06
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.

1 participant