security
Count remediated findings across repeat scans
Count each security finding once per closure event and require evidence of the verified fix, even if multiple scanners or reruns report the same change.
TrustIvan · · 10 min read
The first security scan found an affected package in the inventory service. The team changed the dependency and deployed the corrected image. Four subsequent scans show the same clean result. The raw data contains four observations of the updated image, while the remediation report has one verified closure. If the dashboard counts clean rows, a busy scanner can appear to fix more findings than the service team addressed.
Count the event that matches the question the report needs to answer. For a weekly remediation report, count verified transitions into a closed state at a documented scope. Keep scan volume, current exposure, reopened findings, and approved exceptions visible as separate measurements. Each describes a different part of the work.
Pick a finding identity that survives rescans
A scan run has its own identity. A finding should have an identity durable across equivalent observations of the same affected instance. Choose fields that make sense for your environment. For a dependency finding, that can include the advisory or normalized finding type, package coordinate, service, deployment environment, and a location or instance key. Keep scanner IDs and affected artifact digests in the observation history. An artifact update can be evidence of a lifecycle transition under the same finding.
In a large repository, one package can appear in separate runtime roles. A digest might be deployed to two environments with different release schedules. Decide whether the metric tracks the vulnerable package fleet-wide, the service-level rollout, or each affected deployment. For a service-by-environment metric, the API in production and staging has separate lifecycle records even when both ran the same vulnerable image. Two scanners reporting the same verified package occurrence within production can belong to the same lifecycle record.
Normalize cautiously where your ingestion maps identifiers. Advisory aliases can help link scanner results when they cover the same package and scope. Similar names and descriptions do not establish equality. A second packaged copy in a different path may need its own evidence. Preserve raw observations and the rationale for a merge so somebody can undo an incorrect association without losing the affected scope.
When an asset is renamed, moved, or replaced, use stable asset history where available. If the associated environment or ownership changes, retain what was true at event time. This keeps a historical report intelligible months later when a repository has a different URL. If you cannot determine whether observations refer to the same affected instance, give them a review state and defer a merge.
Take closure evidence from what actually changed
Agree on the evidence requirement for each finding class. A dependency fix may need the original package location, proof of the corrected version or removal, a matching rescan, and verification that the updated artifact runs in the affected environment. An inventory-only finding may require a different observation appropriate to the control. NIST describes verification of installation as part of enterprise patch management. Use that principle to specify what counts as verified for a particular deployment. NIST SP 800-40 Rev. 4.
Separate a potential fix from a verified closure. A pull request can establish intent. A published image with a clean scan shows that a candidate artifact exists. The deployed artifact provides the corresponding runtime evidence where the finding concerns a running service. The original affected instance is the starting point of the check. A clean report for a different platform, artifact, or environment cannot establish that the original scope is fixed.
Keep other dispositions distinct. An invalid finding may close after confirming false-positive evidence. A retired asset can exit scope after documented removal and verification of its lifecycle. An exception can authorize a temporary state with an expiration time. If the report asks how many findings were remediated, count only outcomes that meet its verified remediation definition. Report the other outcomes alongside the figure when readers need to understand changes in backlog.
Sometimes the original detector loses coverage, such as when a migration leaves part of the fleet unscanned. Build dashboards should make that absence visible. Require equivalent scope or independent evidence supporting the correction before treating a missing observation as a fixed finding. Otherwise a broken integration can produce a large apparent increase in remediation.
Model events that can be repeated and reversed
Use the lifecycle record to hold state and attach dated observations. Record explicit events for transitions that matter. Typical examples are opened, fixed candidate available, verified closed, reopened, and exception approved. Keep changes to assignment and due date in the history without treating them as remediation events.
Give each closure event an identity so repeated imports can refer to it. A practical model is a finding identifier plus a closure sequence number saved when the verified state changes. The first verified transition creates closure sequence one. A new observation that agrees with the existing closed state updates supporting evidence. It does not add sequence two. If a rollback restores the affected package, a qualified observation can reopen the finding. A later verified correction can then create a second closure event.
For concurrent imports, make closure idempotent. Keep the unique event identity and state update within the same durable operation. If two scanners report the same verified correction close together, one transition should win while the second observation attaches to the same finding history. If a scan arrives out of order, check the timestamp and artifact lineage before using it to reopen or close the current instance. A late observation of an older deployment should remain historical evidence unless something establishes that the artifact is active again.
Use the time of the verified transition to anchor the reporting period, and choose consistently how backfilled records appear. Store original observation time and ingestion time so you can explain changes to a previously issued report. A metric grouped by the first time the data reached your system can distort how operations unfolded. Reporting periods should be based on documented event time using a consistent time zone or explicit cutover convention.
Calculate an example from observations
This fictional example follows a production API and worker that use a shared dependency. The reporting unit is an affected package at one service and environment. The parent advisory is a coordination record and does not add a closure to that metric.
| Time in reporting week | Observation or decision | Verified closure events |
|---|---|---|
| Monday 09:00 | Original scan observes affected API and worker artifacts | 0 |
| Tuesday 11:00 | New API image rescanned clean, old production deployment still active | 0 |
| Wednesday 10:00 | API deployment and package evidence verified | 1 |
| Wednesday 10:02 | Second provider confirms same API artifact and package evidence | 0 |
| Thursday 07:45 | Production API rollback restores previously affected artifact and reopens finding | 0 |
| Thursday 12:30 | Worker package explicitly covered by approved short exception | 0 |
| Friday 09:20 | API deploys a corrected artifact and a reviewer verifies the fix again | 1 |
| Friday 16:00 | Both providers reconfirm the Friday API artifact | 0 |
This report shows two verified closure events, one reopened event, and one active exception at the end of the period. One distinct service finding was remediated at least once. The worker still needs a decision before its exception expires. If the leadership question is “How many distinct findings had a verified fix this week?”, report one. If the operational question is “How many verified transitions did we perform?”, report two. The unit label should answer which question the number addresses.
Also show the point-in-time status. At the end of Friday, the API finding is verified closed and the worker's exception is active. On Thursday morning the API reopening returned it to active remediation. A cumulative closure count cannot represent either snapshot on its own. Keep a dated backlog view so you can see whether reopened items or newly found issues offset the week's verified work.
Reconcile the metric with related reporting
Maintain a small table of related figures and their units. The closure report counts transitions over a period. The backlog report counts findings at a point in time. The recurrence report counts valid reopens, and the coverage report measures whether the eligible inventory was observed. A team can improve verification throughput while uncovering more accumulated risk. These figures help explain why backlog increased even after a week with many closures.
For a shared dependency, keep the campaign parent and deployment rows at different levels. A parent may close after all scoped children are verified or appropriately resolved. If you need to report parent initiatives completed, say so and count each parent once. If you present service-level closure events, leave the campaign parent out of that number. Apply the same rule to a single image reused by multiple services. Shared artifact evidence can support several checks while the service-level verification record still represents the distinct runtime scope.
When changing scanners or matching rules, document the cutover. Choose several old and new observations and reconcile their scopes side by side. Ask whether a stable key changed, an alias was introduced, or coverage expanded. If you need to revise historical totals, retain the original and revised report with a note on the metric definition and affected periods. This keeps comparisons usable after integration changes.
Choose a reporting owner who can explain the denominators and a service owner who can correct the underlying state. If a team reports a verified closure without sufficient evidence, amend the underlying event through the existing review process and preserve the earlier decision in the audit trail. Correcting the chart by editing its totals leaves the next export inconsistent. When reporting by team, use the ownership recorded at the time when that answers the operational question, or explicitly choose current ownership for a present-day responsibility view. These views may legitimately produce different group totals.
Verify the reporting system with a harmless fixture
Before using the number for performance review or risk decisions, run a synthetic sequence and compare expected results against the actual export. Use an authorized test project with harmless packages and simulated findings or fixture responses. Make the inputs cover both happy paths and predictable accounting errors.
- Send two observations for one affected artifact and verify both attach to one open finding.
- Supply a clean scan for an undeployed replacement and verify it creates evidence without a runtime closure.
- Record a rollout to that artifact and confirm one verified closure appears.
- Repeat the clean scan and replay the original rollout event. The closure total stays at one.
- Record a rollback to the previously affected version and verify a reopened event appears without erasing the earlier closure.
- Redeploy a corrected artifact and verify a second closure event while the distinct-finding total remains one.
- Add a second affected environment and simulate a coverage failure there. Confirm the report retains a separate open or indeterminate record at that scope.
Give a second reviewer the event export and ask them to reproduce the totals without querying the dashboard. Capture the metric definitions, cutoff, and inclusion rules with the report. If the reviewer cannot understand why a clean scan did not close a record, preserve the decision evidence and next owner in the export itself. The accounting stays reliable when the event history can explain both verified changes and the work still waiting for verification. Why a finding needs a memory.