Repository navigation
feat: reuse weekly Trivy issues and close superseded reports - #438
Merged
Britania Rodriguez Reyes (britaniar) merged 1 commit intoOct 30, 2026
Merged
Britania Rodriguez Reyes (britaniar) merged 1 commit into
Britania Rodriguez Reyes (britaniar) merged 1 commit into
Conversation
Adapt weekly report reuse and cleanup from kubefleet-dev/kubefleet@60dea36. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #438 +/- ##
==========================================
- Coverage 67.21% 67.06% -0.16%
==========================================
Files 34 34
Lines 3859 3859
==========================================
- Hits 2594 2588 -6
- Misses 1085 1091 +6
Partials 180 180 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Wei Weng (weng271190436)
approved these changes
Oct 30, 2026
Britania Rodriguez Reyes (britaniar)
merged commit Oct 30, 2026
60a9cad
into
Azure:main
9 of 10 checks passed
Britania Rodriguez Reyes (britaniar)
deleted the
britaniar-trivy-issue-reuse
branch
October 30, 2026 18:22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
/kind feature
What this PR does / why we need it:
Ports the weekly Trivy issue reuse and supersession behavior from kubefleet-dev/kubefleet@60dea36.
security,trivyreport created in the current ISO week, even if its title has been edited.Preserves the daily schedule, image scans, pinned actions, networking security-team mention, remediation instructions, and vulnerability enforcement on non-scheduled runs.
Which issue(s) this PR fixes:
N/A.
Requirements:
make reviewablefor basic local testHow has this code been tested
Focused checks were kept in session-local artifacts to leave this PR scoped to the workflow:
node --test "$env:TRIVY_REGRESSION_TEST": passed, 16 checks against the actual embedded JavaScript with mocked GitHub APIs. Covers weekly reuse, new-week creation, duplicate cleanup, pagination over 205 reports, PR exclusion, ISO year boundaries, and failure propagation before report closure. On the original implementation, 14 checks failed and two passed.& "$env:PYTHON_EXE" "$env:TRIVY_WORKFLOW_CHECK": passed. Parses workflow YAML with PyYAML, validates every scan-job shell step usingbash -n, and compares against upstream to ensure only report formatting and issue-management logic changed.git -c core.whitespace=cr-at-eol diff --check: passed. The workflow retains its existing CRLF line endings.The test environment variables above point to session-local regression and workflow-validation scripts, which are not committed;
PYTHON_EXEselects the local Python installation.make reviewable, Go tests, and live image scans were not run for this workflow-only change. GitHub API calls were mocked; no real security reports were changed during validation.Special notes for your reviewer
Like the reference implementation, reports are identified by their
securityandtrivylabels and grouped by creation date, not mutable title text. Existing daily reports created during the current ISO week are reused. Other matching open reports are closed asnot_plannedonly after the current report is successfully created or updated.