277fc872da01b7e56c031ef938e784c7c99e6a76
* npm update * npm i jest@26.0.1 jest-circus@26.0.1 ts-jest@26.0.0 * npm i @types/node@14.0.5 * npm i eslint@7.1.0 @typescript-eslint/parser@3.0.0
npm audit action
GitHub Action to run npm audit
Feature
Create a Pull Request comment
If vulnerabilities are found by npm audit, Action triggered by PR creates a comment.
Create an Issue
If vulnerabilities are found by npm audit, Action triggered by push, schedule creates the following GitHub Issue.
Usage
Inputs
| Parameter | Required | Default Value | Description |
|---|---|---|---|
| audit_level | false | low | The value of --audit-level flag |
| issue_assignees | false | N/A | Issue assignees (separated by commma) |
| issue_labels | false | N/A | Issue labels (separated by commma) |
| issue_title | false | npm audit found vulnerabilities | Issue title |
| token | true | N/A | GitHub Access Token. ${{ secrets.GITHUB_TOKEN }} is recommended. |
Outputs
N/A
Example Workflow
name: npm audit
on:
pull_request:
push:
branches:
- master
- 'releases/*'
# on:
# schedule:
# - cron: '0 10 * * *'
jobs:
scan:
name: npm audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: install dependencies
run: npm ci
- uses: oke-py/npm-audit-action@v1.3.1
with:
audit_level: moderate
github_token: ${{ secrets.GITHUB_TOKEN }}
issue_assignees: oke-py
issue_labels: vulnerability,test
This action is inspired by homoluctus/gitrivy.
Languages
TypeScript
91.9%
JavaScript
8.1%
