Commit e7abcd4
Potential fix for code scanning alert no. 1: Workflow does not contain permissions (#170)
This PR fixes
[AB#379924](https://dev.azure.com/EquinorASA/bb9bd8cb-74f7-4ffa-b0cb-60eff0a0be58/_workitems/edit/379924)
Potential fix for
[https://github.com/equinor/Dexpi2Imf/security/code-scanning/1](https://github.com/equinor/Dexpi2Imf/security/code-scanning/1)
To fix this CodeQL warning, add an explicit `permissions` block to the
workflow file `.github/workflows/rdf_tests.yml`. The correct location is
at the root level, above `jobs:`; this will apply the permissions to all
jobs in the workflow. Since none of the steps modify the repo, raise
issues, or interact with pull requests, the minimal required permission
is likely `contents: read`. This limits the GITHUB_TOKEN such that it
can only read the repository contents, reducing the attack surface in
case of malicious actors or missteps within the workflow. No changes to
steps or logic are required, only the addition of the permissions block
at the root of the YAML.
_Suggested fixes powered by Copilot Autofix. Review carefully before
merging._
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Dag Hovland <dhovl@equinor.com>1 parent ceda695 commit e7abcd4
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
10 | 12 | | |
| |||
0 commit comments