npm-audit-action icon indicating copy to clipboard operation
npm-audit-action copied to clipboard

Jobs failing with a 422 status code error when dev dependency vulnerabilities found

Open kopijunkie opened this issue 3 years ago • 0 comments

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.

Screenshot 2021-05-07 at 15 22 30

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.

Screenshot 2021-05-07 at 15 23 53

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

kopijunkie avatar May 07 '21 14:05 kopijunkie