Skip to content

Commit

Permalink
add code scanning
Browse files Browse the repository at this point in the history
  • Loading branch information
TheJuanAndOnly99 committed Dec 5, 2023
1 parent 14c9755 commit 50a326d
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/cve-scanning.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: CVE Scanning
on:
push:

jobs:
node-modules-scan:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Build project with NPM
run: npm install --omit=dev
working-directory: .
- name: Depcheck
uses: dependency-check/Dependency-Check_Action@1b5d19fd4a32ff0ff982e8c9d8e27dbf7ac8a46c
id: Depcheck
with:
project: 'legend-engine-ide-vscode'

This comment has been minimized.

Copy link
@josspo

josspo Dec 5, 2023

@TheJuanAndOnly99 You forgot to change project name

This comment has been minimized.

Copy link
@TheJuanAndOnly99

TheJuanAndOnly99 Dec 5, 2023

Author Member

@josspo good catch! fixed

path: '.'
format: 'HTML'
out: 'reports'
args: >
--suppression allow-list.xml
--nodeAuditSkipDevDependencies
--nodePackageSkipDevDependencies
--failOnCVSS 7
--enableRetired
- name: Upload Test results
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: Depcheck report
path: ${{ github.workspace }}/reports
30 changes: 30 additions & 0 deletions .github/workflows/license-scanning.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: License Scanning

on:
schedule:
- cron: '0 8,18 * * 1-5'
push:
paths:
- 'package-json.lock'
- 'package.json'
- '.github/workflows/license-scanning.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: yarn install --production --frozen-lockfile
working-directory: .
- run: npm install -g node-license-validator
working-directory: .
- run: node-license-validator . --allow-licenses Apache-2.0 MIT BSD-2-Clause BSD BSD-3-Clause Unlicense
working-directory: .
3 changes: 3 additions & 0 deletions allow-list.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<suppressions xmlns="https://jeremylong.github.io/DependencyCheck/dependency-suppression.1.3.xsd">
</suppressions>

0 comments on commit 50a326d

Please sign in to comment.