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 2 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.
| (.issues // [])[] | select(.remediation.trustedContent.ref != null) | | ||
| {ref: $t.ref, tc: .remediation.trustedContent.ref, cves: ((.cves // [.id]) | join(", "))} | ||
| ] | ||
| ] | flatten | unique_by(.ref + .tc) | .[] | |
There was a problem hiding this comment.
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:
unique_by({ref, tc})This keeps the intended behavior while ensuring correct deduplication.
| ] | flatten | unique_by(.ref + .tc) | .[] | | |
| ] | flatten | unique_by({ref, tc}) | .[] | |
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% 91.01%
=======================================
Files 38 38
Lines 8001 8001
Branches 1395 1395
=======================================
Hits 7282 7282
Misses 719 719
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
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: