Files
my-rook-config/.github/workflows/synk.yaml
T
neilnaveen 2e2eca672a ci: set permissions for github actions
Restrict the GitHub token permissions only to the required ones;
this way, even if the attackers will succeed in compromising your workflow,
they won’t be able to do much.

Included permissions for the action.
https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions

https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

Signed-off-by: neilnaveen <42328488+neilnaveen@users.noreply.github.com>
2022-08-04 11:07:00 -06:00

27 lines
489 B
YAML

name: Security scanning
on:
push:
tags:
- v*
branches:
- master
- release-*
permissions:
contents: read
jobs:
security:
if: github.repository == 'rook/rook'
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: run Snyk to check for code vulnerabilities
uses: snyk/actions/golang@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}