Skip to content

Commit

Permalink
added actions for node and semgrep
Browse files Browse the repository at this point in the history
  • Loading branch information
maoo authored and sbenmoussati committed Dec 14, 2022
1 parent 9fc2f17 commit 6b2abe7
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/cve-scanning-node.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: CVE Scanning for Node.js

on:
push:
paths:
- 'package.json'
- 'package-lock.json'
- 'allow-list.json'
- '.github/workflows/cve-scanning-node.yml'

jobs:
scan:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm ci --prod
- run: npx --yes auditjs ossi --whitelist allow-list.json
15 changes: 15 additions & 0 deletions .github/workflows/semgrep.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Static code analysis

on: [push, pull_request]

jobs:
semgrep:
name: run-semgrep
runs-on: ubuntu-latest
container:
image: returntocorp/semgrep
steps:
- uses: actions/checkout@v3
- run: semgrep scan --error --config auto
env:
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
4 changes: 4 additions & 0 deletions allow-list.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"ignore": [
]
}

0 comments on commit 6b2abe7

Please sign in to comment.