npm-audit-action
npm-audit-action copied to clipboard
Jobs failing with a 422 status code error when dev dependency vulnerabilities found
What happened: Getting a 422 status code error when dev dependencies are found to have vulnerabilities (see screenshot below) and comment on PR does not get created.
What you expected to happen:
It should fail with Error: This repo has some vulnerabilities
message instead like in the screenshot below, which I was able to get after adding json_flag: true
in the workflow config. The comment also does get created this time with the JSON format info which is fine but also not very readable in comparison.
How you configured .github/workflows/:
- name: npm audit action
if: matrix.NODE_ENV == 'production'
uses: oke-py/[email protected]
with:
audit_level: moderate
github_token: ${{ secrets.GITHUB_TOKEN }}
issue_assignees: kopijunkie
issue_labels: vulnerability
dedupe_issues: true
Anything else we need to know?:
The other solution was to enable production_flag
. I don't think I'm missing any other configuration settings for the workflow based on the documentation.
BTW in the documentation for the accepted inputs the required parameter for the Github Access Token is listed as token
but it should be github_token