Skip to content

Conversation

@kdinev
Copy link
Member

@kdinev kdinev commented Oct 15, 2025

Potential fix for https://github.com/IgniteUI/igniteui-angular/security/code-scanning/11

To fix the issue, we need to add an explicit permissions block at the workflow level (top-level, before jobs:) to restrict the permissions provided to GITHUB_TOKEN to the minimal required for the workflow, typically contents: read. This prevents unintended write access to the repository, adhering to the principle of least privilege. Based on the visible steps, the workflow does not modify the repository or open issues/pull requests, so contents: read is sufficient.

To implement:

  • Insert a permissions: block directly after the workflow name: section, and before the on: or jobs: sections in .github/workflows/npm-publish.yml.
  • The block should be:
    permissions:
      contents: read
  • No other code modifications, imports, or dependency changes are necessary.

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

…in permissions

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@kdinev kdinev marked this pull request as ready for review October 15, 2025 12:47
@kdinev kdinev merged commit ea7bb2a into master Oct 15, 2025
6 checks passed
@kdinev kdinev deleted the alert-autofix-11 branch October 15, 2025 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants