Skip to content

Conversation

@JamieSinn
Copy link
Member

Potential fix for https://github.com/DevCycleHQ/assemblyscript-regex/security/code-scanning/1

To fix the problem, you should add a permissions block to the workflow or to each job. Since CodeQL suggests starting with contents: read, and because the workflow runs steps related to releases that may require additional write permissions (such as creating releases or pushing tags), be as restrictive as possible but allow necessary function. The single best way to fix is to add to the release job (line 12), immediately before runs-on, the following block:

permissions:
  contents: write

If more granular permissions are required (e.g., writing to releases or pull requests), you may add those. However, based on common releases via semantic-release and minimal starting point, contents: write is likely sufficient.

  • Edit .github/workflows/release.yml in the job release (line 12), inserting the permissions block after the job name and before runs-on.
  • No imports, methods, or variable changes required.

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>
@JamieSinn JamieSinn closed this Dec 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants