Skip to content

Commit 2c1863f

Browse files
Potential fix for code scanning alert no. 8: Workflow does not contain permissions (#6)
Potential fix for [https://github.com/hyperpolymath/ubicity/security/code-scanning/8](https://github.com/hyperpolymath/ubicity/security/code-scanning/8) To resolve the problem, add a `permissions` block to the `snyk` job in `.github/workflows/security.yml`. The minimal recommended permission for Snyk scans is `contents: read`, which enables the job to read the repository files necessary for scanning. Place the `permissions:` line at the same level as `runs-on:` and above `steps:` in the `snyk` job definition (which currently lacks such a block) and do not alter existing functionality of the job. No new imports or external definitions are required; this change is purely a configuration addition to the workflow YAML. _Suggested fixes powered by Copilot Autofix. Review carefully before merging._ Signed-off-by: Jonathan D.A. Jewell <6759885+hyperpolymath@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 312db5e commit 2c1863f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

.github/workflows/security.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ jobs:
7474
name: Snyk Security Scan
7575

7676
runs-on: ubuntu-latest
77+
permissions:
78+
contents: read
7779

7880
steps:
7981
- name: Checkout code

0 commit comments

Comments
 (0)