npm-audit-reporter-teamcity
Version:
generate TeamCity code inspections from the output of `npm audit`
37 lines (31 loc) • 1.28 kB
Markdown
## npm audit reporter for TeamCity
[](https://github.com/cy6erskunk/npm-audit-reporter-teamcity/actions/workflows/nodejs.yml)
[](https://www.npmjs.com/package/npm-audit-reporter-teamcity)
Generates TeamCity inspections from the [npm audit](https://docs.npmjs.com/cli/audit.html) report

### Installation
1. Install packages
```
npm i npm-audit-reporter-teamcity
```
2. Add npm scripts to run checks locally and in a CI server, e.g.:
```
"audit:ci": "npm audit --json|npm-audit-reporter-teamcity"
```
3. Configure build step in TeamCity
e.g. Command Line runner with script to install dependencies and run checks:
```
npm install
npm run audit:ci
```
### Configuration
Put `npm-audit-reporter.conf.json` config file in a project root directory to override any of the dafault values:
```json
{
"inspectionTypeId": "npm-audit-security-inspection",
"inspectionName": "NPM audit security inspection",
"inspectionCategory": "security",
"inspectionSeverity": "WARNING",
}
```
- To debug provide truthy `DEBUG` env variable (e.g. `DEBUG=1 npm run audit:ci`)