Repository navigation
8670: Mark advisories as not affected per git repo - #169
Merged
Merged
Conversation
On a site's detail page, an advisory can be marked as not affected with a reason, one at a time or all current ones at once, and a mark can be removed. A mark belongs to the git repo, so it covers every checkout of it, and sites without a repo cannot be marked. Marked advisories no longer count on the site list, in its sort or on the repo advisories page. Marks are stored by repo and advisory name, so truncating derived data and replays leave them in place.
API Specification - Non-breaking changesNo changelog changes |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## chore/8670-advisory-fixtures #169 +/- ##
==================================================================
+ Coverage 75.74% 76.77% +1.03%
- Complexity 1300 1346 +46
==================================================================
Files 168 172 +4
Lines 3987 4121 +134
==================================================================
+ Hits 3020 3164 +144
+ Misses 967 957 -10
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Merged
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.
Link to ticket
https://leantime.itkdev.dk/#/tickets/showTicket/8670
Description
Let developers mark a site's current advisories as not affected, so they stop counting towards the site's advisories. A mark applies to the git repo, so it covers every checkout of that repo. New advisories count again until they are marked too.
Stacked on #168, which adds the fixtures the tests use.
Changes:
AdvisoryAssessmententity and migration: a mark per git repo (provider, organization, name) and advisory id, with a required reason and who marked it.AdvisoryAssessorlists a site's advisories with their marks, counts the open ones, and marks or unmarks them. Only advisories open on the site can be marked, and a site without a git repo cannot mark any.AdvisoryCountSortdrops theentity.advisoryCountorder EasyAdmin adds for the default sort, since that column does not exist.Why: some advisories do not apply to how a site uses a package, and they stayed in the count forever. Keying marks on the git repo means a repo checked out for stg and prod is assessed once.
No screenshots yet: the dev database holds a production dump, and the fixtures need loading first.
Checklist