Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

Commit

Permalink
use pull_request_target instead of pull_request
Browse files Browse the repository at this point in the history
GitHub Actions run when a PR is raised, should use the SYNK_TOKEN from the base repo instead of the forked repo. Also making sure that this action runs only for authorized users.
  • Loading branch information
ashwindasr committed Mar 29, 2023
1 parent e6774dd commit 08578bb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/snyk_security.yaml
@@ -1,6 +1,10 @@
name: Snyk Scan

on: [ push, pull_request ]
on:
push: { }
pull_request_target:
types: [ opened ]
if: github.actor in ['jupierce', 'sosiouxme', 'thiagoalessio', 'joepvd', 'thegreyd', 'vfreex', 'locriandev', 'Ximinhan', 'ashwindasr']

jobs:
snyk:
Expand All @@ -18,4 +22,4 @@ jobs:
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
command: code test
command: code test

0 comments on commit 08578bb

Please sign in to comment.