feat(report): add remediation and recommendation details to pipeline summary - #586
feat(report): add remediation and recommendation details to pipeline summary#586a-oren wants to merge 3 commits into
Conversation
…summary The Tekton task console output now surfaces trusted-content remediations and recommendations that were previously only available in the JSON report. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Reviewer's GuideAdds remediation and recommendation details to the Trustify dependency analytics Tekton console summary, including counts and detailed listings sourced via jq from the JSON report. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="docker-image/scripts/trustify-da.sh" line_range="118" />
<code_context>
+ (.issues // [])[] | select(.remediation.trustedContent.ref != null) |
+ {ref: $t.ref, tc: .remediation.trustedContent.ref, cves: ((.cves // [.id]) | join(", "))}
+ ]
+ ] | flatten | unique_by(.ref + .tc) | .[] |
+ " \(.ref)\n → \(.tc)\n CVEs: \(.cves)"
+ ' <<< "$report"
</code_context>
<issue_to_address>
**suggestion (bug_risk):** Avoid potential collisions in `unique_by(.ref + .tc)` by using a composite key.
Concatenating `ref` and `tc` can cause collisions when different `(ref, tc)` pairs produce the same string (e.g. `"ab" + "c"` vs `"a" + "bc"`). Use a composite key instead:
```jq
unique_by({ref, tc})
```
This keeps the intended behavior while ensuring correct deduplication.
```suggestion
] | flatten | unique_by({ref, tc}) | .[] |
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Use `while IFS= read -r` instead of `for ... in` to iterate over source names, preventing names like "Red Hat Product Security" from being split on whitespace. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #586 +/- ##
==========================================
- Coverage 91.01% 90.84% -0.18%
==========================================
Files 38 39 +1
Lines 8001 8363 +362
Branches 1395 1453 +58
==========================================
+ Hits 7282 7597 +315
- Misses 719 766 +47
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
ruromero
left a comment
There was a problem hiding this comment.
The second commit correctly fixes word-splitting for source names (while IFS= read -r), but the new code added in the same PR repeats the original anti-pattern:
for rec_source in $rec_sources; do # ← same word-splitting problemIf recommendation source names contain spaces, this will break the same way. Should use while IFS= read -r rec_source; do ... done <<< "$rec_sources" for consistency.
Use while IFS= read -r for recommendation source iteration to handle
names with spaces, and use unique_by({ref, tc}) to avoid key collisions
from string concatenation.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
Changes
docker-image/scripts/trustify-da.sh: Added two new sections to the console summary:trustedContentreplacements and their CVEsTest plan
trustify-dependency-analyticstest data (report.json) — correct output with remediations and recommendationstrustify-da-java-clienttest data (analysis-report.json) — handles empty remediations gracefully🤖 Generated with Claude Code
Summary by Sourcery
Surface trusted-content remediation and recommendation details in the Trustify dependency analytics pipeline summary output.
New Features: