Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not run snyk pr comment workflow on forks #11240

Merged
merged 5 commits into from
Nov 16, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions .github/workflows/vulnerability-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,19 @@ on: pull_request

permissions:
pull-requests: write
contents: write
issues: write

jobs:
snyk:
name: Snyk Scan
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
if: ${{ !github.event.pull_request.head.repo.fork }}
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/golang@master
continue-on-error: true # To make sure that PR comment is made
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
command: test
args: --severity-threshold=high --json-file-output=snyk.json
Expand Down Expand Up @@ -50,9 +46,7 @@ jobs:
trivy:
name: Trivy Scan
runs-on: ubuntu-20.04
permissions:
issues: write
pull-requests: write
if: ${{ !github.event.pull_request.head.repo.fork }}
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand Down
Loading