Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decouples security scanning analysis and add FOSSA #330

Merged
merged 2 commits into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Security Scanning

on:
pull_request_target:
branches:
- main

push:
branches:
- main

# Run every day at 5am UTC
schedule:
- cron: "0 5 * * *"

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
snyk:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- name: Install Snyk
uses: snyk/actions/setup@master

- name: Snyk VULN and License Check Test
run: snyk test --all-projects --sarif-file-output=snyk.sarif
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}

- name: Upload SARIF result to GitHub Code Scanning
uses: github/codeql-action/upload-sarif@v2
if: always()
with:
sarif_file: snyk.sarif

fossa:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- name: Run FOSSA Scan
uses: fossas/fossa-action@main
with:
api-key: ${{ secrets.FOSSA_API_KEY }}

- name: Run FOSSA Test
uses: fossas/fossa-action@main
with:
api-key: ${{ secrets.FOSSA_API_KEY }}
run-tests: true
20 changes: 0 additions & 20 deletions .github/workflows/tests-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,29 +23,9 @@ jobs:
with:
node-version: 18

- name: Install latest npm
run: npm install -g npm@latest

- name: Install dependencies
run: npm ci

- name: Install Snyk
uses: snyk/actions/setup@3e2680e8df93a24b52d119b1305fb7cedc60ceae # latest master (no released tag)

- name: Snyk VULN and License Check Test
run: snyk test --all-projects --sarif-file-output=snyk.sarif
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}

- name: Report known vulnerabilities
run: npm audit

- name: Upload SARIF result to GitHub Code Scanning
uses: github/codeql-action/upload-sarif@74483a38d39275f33fcff5f35b679b5ca4a26a99 # v2.22.5
if: always()
with:
sarif_file: snyk.sarif

test-with-node:
runs-on: ubuntu-latest
steps:
Expand Down