Skip to content

8670: Mark advisories as not affected per git repo - #169

Merged
turegjorup merged 15 commits into
developfrom
feature/8670-advisory-assessments
Oct 26, 2026
Merged

turegjorup merged 15 commits into
developfrom
feature/8670-advisory-assessments

Conversation

@turegjorup

Copy link
Copy Markdown
Contributor

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:

  • AdvisoryAssessment entity and migration: a mark per git repo (provider, organization, name) and advisory id, with a required reason and who marked it.
  • AdvisoryAssessor lists 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.
  • Site detail page: the advisories table has a Mark button per advisory and Mark all below it. Both open a modal that asks for the reason. Marked rows are faded and show the reason, who marked it and when, with an Unmark button. Forms disable their buttons on submit, so a slow page load does not send them twice.
  • The open count replaces the total everywhere it is shown: the site index badge and sort, the Repo advisories page, and a new red pill on the Sites menu item counting sites with open advisories.
  • The site index sorts by the open count by default. AdvisoryCountSort drops the entity.advisoryCount order 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

  • My code is covered by test cases.
  • My code passes our test (all our tests).
  • My code passes our static analysis suite.
  • My code passes our continuous integration process.

@github-actions

Copy link
Copy Markdown

API Specification - Non-breaking changes

No changelog changes

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.63014% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.77%. Comparing base (6b42c15) to head (a30d9b5).

Files with missing lines Patch % Lines
src/Entity/AdvisoryAssessment.php 92.85% 2 Missing ⚠️
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     
Flag Coverage Δ
unittests 76.77% <98.63%> (+1.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Base automatically changed from chore/8670-advisory-fixtures to develop October 26, 2026 15:34
@turegjorup turegjorup self-assigned this Oct 26, 2026
@turegjorup
turegjorup merged commit 6b2adee into develop Oct 26, 2026
17 checks passed
@turegjorup
turegjorup deleted the feature/8670-advisory-assessments branch October 26, 2026 15:35
@turegjorup turegjorup mentioned this pull request Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants