Skip to content

Commit

Permalink
SNOW-871839: Fix snyk permissions (#583)
Browse files Browse the repository at this point in the history
Fix snyk

Co-authored-by: Dominik Przybysz <[email protected]>
  • Loading branch information
sfc-gh-pbulawa and sfc-gh-dprzybysz authored Sep 22, 2023
1 parent fe8144c commit 5dcb8fc
Showing 1 changed file with 27 additions and 20 deletions.
47 changes: 27 additions & 20 deletions .github/workflows/snyk-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,36 @@ on:
pull_request:
branches:
- master

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

jobs:
whitesource:
snyk:
permissions: write-all
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.user.login == 'sfc-gh-snyk-sca-sa' }}
steps:
- name: checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0
- name: checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0

- name: checkout action
uses: actions/checkout@v3
with:
repository: snowflakedb/whitesource-actions
token: ${{ secrets.WHITESOURCE_ACTION_TOKEN }}
path: whitesource-actions
- name: checkout action
uses: actions/checkout@v3
with:
repository: snowflakedb/whitesource-actions
token: ${{ secrets.WHITESOURCE_ACTION_TOKEN }}
path: whitesource-actions

- name: PR
uses: ./whitesource-actions/snyk-pr
env:
PR_TITLE: ${{ github.event.pull_request.title }}
with:
jira_token: ${{ secrets.JIRA_TOKEN_PUBLIC_REPO }}
gh_token: ${{ secrets.GITHUB_TOKEN }}
amend: false # true if you want the commit to be amended with the JIRA number
- name: PR
uses: ./whitesource-actions/snyk-pr
env:
PR_TITLE: ${{ github.event.pull_request.title }}
with:
jira_token: ${{ secrets.JIRA_TOKEN_PUBLIC_REPO }}
gh_token: ${{ secrets.GITHUB_TOKEN }}
amend: false # true if you want the commit to be amended with the JIRA number

0 comments on commit 5dcb8fc

Please sign in to comment.