Update README.md #10
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: Full Snyk Analysis | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
permissions: | |
contents: read | |
security-events: write | |
jobs: | |
security: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
# Caching npm modules | |
- name: Cache node modules | |
uses: actions/cache@v3 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install npm dependencies | |
run: npm install | |
# Snyk Code Test and SARIF output | |
- name: Snyk Code Test | |
id: snyk_code | |
uses: snyk/actions/node@master | |
env: | |
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | |
with: | |
args: --sarif-file-output=snyk-code-results.sarif | |
# Snyk Open Source monitor | |
- name: Snyk Open Source Monitor | |
uses: snyk/actions/node@master | |
env: | |
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | |
with: | |
command: monitor | |
# Build Docker image for Snyk Container scanning | |
- name: Build Docker image | |
run: docker build -t novel-scraper/image . | |
# Snyk Container monitor | |
- name: Snyk Container Monitor | |
uses: snyk/actions/docker@master | |
continue-on-error: true | |
env: | |
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | |
with: | |
image: novel-scraper/image | |
args: --file=Dockerfile | |
# Upload Snyk Code results to GitHub Code Scanning | |
- name: Upload Snyk Code Results to GitHub Code Scanning | |
uses: github/codeql-action/upload-sarif@v2 | |
with: | |
sarif_file: snyk-code-results.sarif |