Skip to content

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

Merged
rkaraivanov merged 2 commits intomasterfrom
alert-autofix-1
Oct 14, 2025
Merged

Potential fix for code scanning alert no. 2: Workflow does not contain permissions#1891
rkaraivanov merged 2 commits intomasterfrom
alert-autofix-1

Conversation

@kdinev
Copy link
Member

@kdinev kdinev commented Oct 14, 2025

Potential fix for https://github.com/IgniteUI/igniteui-webcomponents/security/code-scanning/2

To resolve this issue, add a permissions block to the workflow. It should be added at the top level (root) of the workflow file, so it applies to all jobs by default. For typical npm publish workflows, only contents: read is needed because publishing to npm uses an external token in NODE_AUTH_TOKEN, and no GitHub APIs that require write access are being called. To implement this, insert the following at the top (after the name: line but before on:):

permissions:
  contents: read

No other changes, imports, or method definitions are 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>
@kdinev kdinev requested a review from rkaraivanov October 14, 2025 11:54
@kdinev kdinev marked this pull request as ready for review October 14, 2025 11:54
@rkaraivanov rkaraivanov merged commit 017f0e1 into master Oct 14, 2025
6 checks passed
@rkaraivanov rkaraivanov deleted the alert-autofix-1 branch October 14, 2025 12:53
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.

2 participants