docker / docker/scout-action

GitHub API error when comment exceeds max limit of characters allowed

Open
#66 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

upstream
Dominant language
JavaScript
Stars
141
Forks
53
PR merge metrics
No merged PRs in 30d

Description

We have a repo that is receiving the following error from the cves command:

422 Validation Failed [{Resource:IssueComment Field:data Code:unprocessable Message:Body is too long (maximum is 65536 characters)}]

I understand that this is a limitation of the GitHub API, but could the Action handle the error more gracefully? A couple of options could include:

  • separating out the report across multiple comments
  • truncating the report with a note that the results have been truncated

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the cves command's GitHub API comment creation and reproduce the 65,536-character validation failure with an oversized report. Review the available handling options in the issue, then verify that the report is either split across comments or truncated with a clear note and that the API error no longer escapes unhandled.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, github-actions, javascript
Domain
ci-cd, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.