Skip to content

Security

Security #60

Workflow file for this run

name: Security
on:
push:
branches: ['main']
pull_request:
branches: ['main']
schedule:
- cron: '23 23 * * 6'
jobs:
analyze:
name: CodeQL analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: ['javascript']
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: Autobuild
uses: github/codeql-action/autobuild@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: '/language:${{matrix.language}}'
test:
name: Snyk test
runs-on: ubuntu-latest
steps:
- name: Checkout git repository
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 19.3.x
cache: 'npm'
- name: Clean installation
run: npm ci
- name: Run test suite
run: npm test
- name: Build (if present)
run: npm run build --if-present
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/node@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}