fix: upload trivy report to step summary and truncate PR comment if too large#246
Conversation
Agent-Logs-Url: https://github.com/chgl/.github/sessions/ff21aff2-540b-439a-903d-a441c8f82a5d Co-authored-by: chgl <5307555+chgl@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the Trivy PR-report publishing flow to avoid marocchino/sticky-pull-request-comment failing when the generated report exceeds GitHub’s PR comment size limits, while still preserving access to the full report via the workflow run UI.
Changes:
- Adds a step to append the full
trivy-pr-report.mdcontent toGITHUB_STEP_SUMMARY. - Adds logic to overwrite
trivy-pr-report.mdwith a short fallback message linking to the workflow run when the report is too large for a PR comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
✅MegaLinter analysis: Success
See detailed reports in MegaLinter artifacts Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining
|
Trivy image scan report
|
| Package | ID | Severity | Installed Version | Fixed Version |
|---|---|---|---|---|
libc-bin |
CVE-2026-4046 | MEDIUM | 2.41-12+deb13u2 | 2.41-12+deb13u3 |
libc-bin |
CVE-2026-4437 | MEDIUM | 2.41-12+deb13u2 | 2.41-12+deb13u3 |
libc-bin |
CVE-2026-4438 | LOW | 2.41-12+deb13u2 | 2.41-12+deb13u3 |
libc6 |
CVE-2026-4046 | MEDIUM | 2.41-12+deb13u2 | 2.41-12+deb13u3 |
libc6 |
CVE-2026-4437 | MEDIUM | 2.41-12+deb13u2 | 2.41-12+deb13u3 |
libc6 |
CVE-2026-4438 | LOW | 2.41-12+deb13u2 | 2.41-12+deb13u3 |
libcap2 |
CVE-2026-4878 | HIGH | 1:2.75-10+b8 | 1:2.75-10+deb13u1 |
libsystemd0 |
CVE-2026-29111 | MEDIUM | 257.9-1~deb13u1 | 257.13-1~deb13u1 |
libsystemd0 |
CVE-2026-40225 | MEDIUM | 257.9-1~deb13u1 | 257.13-1~deb13u1 |
libsystemd0 |
CVE-2026-40226 | MEDIUM | 257.9-1~deb13u1 | 257.13-1~deb13u1 |
libsystemd0 |
CVE-2026-4105 | MEDIUM | 257.9-1~deb13u1 | 257.13-1~deb13u1 |
libudev1 |
CVE-2026-29111 | MEDIUM | 257.9-1~deb13u1 | 257.13-1~deb13u1 |
libudev1 |
CVE-2026-40225 | MEDIUM | 257.9-1~deb13u1 | 257.13-1~deb13u1 |
libudev1 |
CVE-2026-40226 | MEDIUM | 257.9-1~deb13u1 | 257.13-1~deb13u1 |
libudev1 |
CVE-2026-4105 | MEDIUM | 257.9-1~deb13u1 | 257.13-1~deb13u1 |
sed |
CVE-2026-5958 | MEDIUM | 4.9-2 | 4.9-2+deb13u1 |
No Misconfigurations found
Python
2 known vulnerabilities found (CRITICAL: 0 HIGH: 0 MEDIUM: 2 LOW: 0)
Show detailed table of vulnerabilities
| Package | ID | Severity | Installed Version | Fixed Version |
|---|---|---|---|---|
pip |
CVE-2026-3219 | MEDIUM | 26.0.1 | 26.1 |
pip |
CVE-2026-6357 | MEDIUM | 26.0.1 | 26.1 |
No Misconfigurations found
Trivy image scan report
|
| Package | ID | Severity | Installed Version | Fixed Version |
|---|---|---|---|---|
libc-bin |
CVE-2026-4046 | MEDIUM | 2.41-12+deb13u2 | 2.41-12+deb13u3 |
libc-bin |
CVE-2026-4437 | MEDIUM | 2.41-12+deb13u2 | 2.41-12+deb13u3 |
libc-bin |
CVE-2026-4438 | LOW | 2.41-12+deb13u2 | 2.41-12+deb13u3 |
libc6 |
CVE-2026-4046 | MEDIUM | 2.41-12+deb13u2 | 2.41-12+deb13u3 |
libc6 |
CVE-2026-4437 | MEDIUM | 2.41-12+deb13u2 | 2.41-12+deb13u3 |
libc6 |
CVE-2026-4438 | LOW | 2.41-12+deb13u2 | 2.41-12+deb13u3 |
libcap2 |
CVE-2026-4878 | HIGH | 1:2.75-10+b8 | 1:2.75-10+deb13u1 |
libsystemd0 |
CVE-2026-29111 | MEDIUM | 257.9-1~deb13u1 | 257.13-1~deb13u1 |
libsystemd0 |
CVE-2026-40225 | MEDIUM | 257.9-1~deb13u1 | 257.13-1~deb13u1 |
libsystemd0 |
CVE-2026-40226 | MEDIUM | 257.9-1~deb13u1 | 257.13-1~deb13u1 |
libsystemd0 |
CVE-2026-4105 | MEDIUM | 257.9-1~deb13u1 | 257.13-1~deb13u1 |
libudev1 |
CVE-2026-29111 | MEDIUM | 257.9-1~deb13u1 | 257.13-1~deb13u1 |
libudev1 |
CVE-2026-40225 | MEDIUM | 257.9-1~deb13u1 | 257.13-1~deb13u1 |
libudev1 |
CVE-2026-40226 | MEDIUM | 257.9-1~deb13u1 | 257.13-1~deb13u1 |
libudev1 |
CVE-2026-4105 | MEDIUM | 257.9-1~deb13u1 | 257.13-1~deb13u1 |
sed |
CVE-2026-5958 | MEDIUM | 4.9-2 | 4.9-2+deb13u1 |
No Misconfigurations found
Python
2 known vulnerabilities found (CRITICAL: 0 HIGH: 0 MEDIUM: 2 LOW: 0)
Show detailed table of vulnerabilities
| Package | ID | Severity | Installed Version | Fixed Version |
|---|---|---|---|---|
pip |
CVE-2026-3219 | MEDIUM | 26.0.1 | 26.1 |
pip |
CVE-2026-6357 | MEDIUM | 26.0.1 | 26.1 |
No Misconfigurations found
Trivy image scan report
|
| Package | ID | Severity | Installed Version | Fixed Version |
|---|---|---|---|---|
libc-bin |
CVE-2026-4046 | MEDIUM | 2.41-12+deb13u2 | 2.41-12+deb13u3 |
libc-bin |
CVE-2026-4437 | MEDIUM | 2.41-12+deb13u2 | 2.41-12+deb13u3 |
libc-bin |
CVE-2026-4438 | LOW | 2.41-12+deb13u2 | 2.41-12+deb13u3 |
libc6 |
CVE-2026-4046 | MEDIUM | 2.41-12+deb13u2 | 2.41-12+deb13u3 |
libc6 |
CVE-2026-4437 | MEDIUM | 2.41-12+deb13u2 | 2.41-12+deb13u3 |
libc6 |
CVE-2026-4438 | LOW | 2.41-12+deb13u2 | 2.41-12+deb13u3 |
libcap2 |
CVE-2026-4878 | HIGH | 1:2.75-10+b8 | 1:2.75-10+deb13u1 |
libsystemd0 |
CVE-2026-29111 | MEDIUM | 257.9-1~deb13u1 | 257.13-1~deb13u1 |
libsystemd0 |
CVE-2026-40225 | MEDIUM | 257.9-1~deb13u1 | 257.13-1~deb13u1 |
libsystemd0 |
CVE-2026-40226 | MEDIUM | 257.9-1~deb13u1 | 257.13-1~deb13u1 |
libsystemd0 |
CVE-2026-4105 | MEDIUM | 257.9-1~deb13u1 | 257.13-1~deb13u1 |
libudev1 |
CVE-2026-29111 | MEDIUM | 257.9-1~deb13u1 | 257.13-1~deb13u1 |
libudev1 |
CVE-2026-40225 | MEDIUM | 257.9-1~deb13u1 | 257.13-1~deb13u1 |
libudev1 |
CVE-2026-40226 | MEDIUM | 257.9-1~deb13u1 | 257.13-1~deb13u1 |
libudev1 |
CVE-2026-4105 | MEDIUM | 257.9-1~deb13u1 | 257.13-1~deb13u1 |
sed |
CVE-2026-5958 | MEDIUM | 4.9-2 | 4.9-2+deb13u1 |
No Misconfigurations found
Python
2 known vulnerabilities found (LOW: 0 CRITICAL: 0 HIGH: 0 MEDIUM: 2)
Show detailed table of vulnerabilities
| Package | ID | Severity | Installed Version | Fixed Version |
|---|---|---|---|---|
pip |
CVE-2026-3219 | MEDIUM | 26.0.1 | 26.1 |
pip |
CVE-2026-6357 | MEDIUM | 26.0.1 | 26.1 |
No Misconfigurations found
|
🎉 This PR is included in version 1.11.33 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |

marocchino/sticky-pull-request-commentfails with a GitHub API validation error when the Trivy report exceeds the 65,536-character PR comment limit. Large images with many vulnerabilities reliably hit this ceiling.Changes
GITHUB_STEP_SUMMARYwc -contrivy-pr-report.mdexceedsMAX_PR_COMMENT_SIZE=65536, overwrites the file with a short fallback message linking to the workflow run summarytrivy-pr-report.md, which is now guaranteed to be within the API limit