d01270779879e873ab1304e7e5561c41585cd189
Bumps the npm-development group with 7 updates: | Package | From | To | | --- | --- | --- | | [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js) | `9.26.0` | `9.27.0` | | [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) | `20.17.46` | `20.17.48` | | [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) | `8.32.0` | `8.32.1` | | [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) | `8.32.0` | `8.32.1` | | [eslint](https://github.com/eslint/eslint) | `9.26.0` | `9.27.0` | | [eslint-import-resolver-typescript](https://github.com/import-js/eslint-import-resolver-typescript) | `4.3.4` | `4.3.5` | | [rollup](https://github.com/rollup/rollup) | `4.40.2` | `4.41.0` | Updates `@eslint/js` from 9.26.0 to 9.27.0 - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/commits/v9.27.0/packages/js) Updates `@types/node` from 20.17.46 to 20.17.48 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Updates `@typescript-eslint/eslint-plugin` from 8.32.0 to 8.32.1 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.32.1/packages/eslint-plugin) Updates `@typescript-eslint/parser` from 8.32.0 to 8.32.1 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.32.1/packages/parser) Updates `eslint` from 9.26.0 to 9.27.0 - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/compare/v9.26.0...v9.27.0) Updates `eslint-import-resolver-typescript` from 4.3.4 to 4.3.5 - [Release notes](https://github.com/import-js/eslint-import-resolver-typescript/releases) - [Changelog](https://github.com/import-js/eslint-import-resolver-typescript/blob/master/CHANGELOG.md) - [Commits](https://github.com/import-js/eslint-import-resolver-typescript/compare/v4.3.4...v4.3.5) Updates `rollup` from 4.40.2 to 4.41.0 - [Release notes](https://github.com/rollup/rollup/releases) - [Changelog](https://github.com/rollup/rollup/blob/master/CHANGELOG.md) - [Commits](https://github.com/rollup/rollup/compare/v4.40.2...v4.41.0) --- updated-dependencies: - dependency-name: "@eslint/js" dependency-version: 9.27.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: npm-development - dependency-name: "@types/node" dependency-version: 20.17.48 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: npm-development - dependency-name: "@typescript-eslint/eslint-plugin" dependency-version: 8.32.1 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: npm-development - dependency-name: "@typescript-eslint/parser" dependency-version: 8.32.1 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: npm-development - dependency-name: eslint dependency-version: 9.27.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: npm-development - dependency-name: eslint-import-resolver-typescript dependency-version: 4.3.5 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: npm-development - dependency-name: rollup dependency-version: 4.41.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: npm-development ... Signed-off-by: dependabot[bot] <support@github.com>
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 |
| create_issues | false | true | Flag to create issues when vulnerabilities are found |
| create_pr_comments | false | true | Flag to create pr comments when vulnerabilities are found |
| dedupe_issues | false | false | Flag to de-dupe against open issues |
| github_context | false | ${{ toJson(github) }} |
The github context |
| github_token | true | N/A | GitHub Access Token. ${{ secrets.GITHUB_TOKEN }} is recommended. |
| 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 |
| json_flag | false | false | Run npm audit with --json |
| production_flag | false | false | Run npm audit with --omit=dev |
| working_directory | false | N/A | The directory which contains package.json |
Outputs
| Parameter name | Description |
|---|---|
| npm_audit | The output of the npm audit report in a text format |
Example Workflow
name: npm audit
on:
pull_request:
push:
branches:
- main
- 'releases/*'
# on:
# schedule:
# - cron: '0 10 * * *'
jobs:
scan:
name: npm audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install dependencies
run: npm ci
- uses: oke-py/npm-audit-action@v3
with:
audit_level: moderate
github_token: ${{ secrets.GITHUB_TOKEN }}
issue_assignees: oke-py
issue_labels: vulnerability,test
dedupe_issues: true
Development
Running Tests
This project uses Vitest for testing. To run the tests, use the following command:
npm run test
Vitest will execute all test files and provide a detailed report of the results. For coverage reports, you can use:
npm run test:coverage
Ensure all dependencies are installed before running the tests:
npm ci
This action is inspired by homoluctus/gitrivy.
Languages
TypeScript
91.9%
JavaScript
8.1%
