Sync Snyk GitHub issues #358
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Sync Snyk GitHub issues | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 */4 * * *' | |
jobs: | |
sync: | |
if: github.repository == 'backstage/backstage' # prevent running on forks | |
runs-on: ubuntu-latest | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5 | |
- name: use node.js 18.x | |
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | |
with: | |
node-version: 18.x | |
registry-url: https://registry.npmjs.org/ # Needed for auth | |
- name: yarn install | |
uses: backstage/actions/yarn-install@af61233abb88019335b07ab855873d991f43d25a # v0.6.7 | |
with: | |
cache-prefix: ${{ runner.os }}-v18.x | |
- name: Create Snyk report | |
uses: snyk/actions/node@8349f9043a8b7f0f3ee8885bf28f0b388d2446e8 # master | |
continue-on-error: true # Snyk CLI exits with error when vulnerabilities are found | |
with: | |
args: > | |
--yarn-workspaces | |
--org=backstage-dgh | |
--strict-out-of-sync=false | |
--json-file-output=snyk.json | |
--debug | |
json: true | |
env: | |
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | |
NODE_OPTIONS: --max-old-space-size=7168 | |
- name: Update Github issues | |
run: ./scripts/snyk-github-issue-sync.ts | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |