Skip to content

Commit

Permalink
adding npm audit actions on PR for api and frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
akroon3r committed Feb 14, 2023
1 parent 986498f commit a45a2f4
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/npm-audit-api.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: NPM Audit - API

on:
pull_request:
branches:
- main

jobs:
scan:
name: npm audit
runs-on: ubuntu-latest
steps:
# Checkout Repository
- uses: actions/checkout@v3

# Install API Dependencies
- name: install dependencies
run: |
cd src/backend/
npm ci
# Checkout for moderate or higher vulnerabilities in Frontend package.json
- uses: oke-py/npm-audit-action@v2
with:
audit_level: moderate
github_token: ${{ secrets.GITHUB_TOKEN }}
working_directory: src/backend
27 changes: 27 additions & 0 deletions .github/workflows/npm-audit-frontend.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: NPM Audit - Frontend

on:
pull_request:
branches:
- main

jobs:
scan:
name: npm audit
runs-on: ubuntu-latest
steps:
# Checkout Repository
- uses: actions/checkout@v3

# Install Frontend Dependencies
- name: install dependencies
run: |
cd src/frontend/
npm ci
# Checkout for moderate or higher vulnerabilities in Frontend package.json
- uses: oke-py/npm-audit-action@v2
with:
audit_level: moderate
github_token: ${{ secrets.GITHUB_TOKEN }}
working_directory: src/frontend

0 comments on commit a45a2f4

Please sign in to comment.