Skip to content
Tech Atlas, home
Search
Esc
  • All roadmapsBrowse every learning path
  • ExploreFind a technology area
  • ProjectsGuided projects and builds
  • My AtlasYour learning dashboard
Lesson 4 of 6 · Concept · 20 min · revision 2

Remediation Workflows, Exceptions and Verification

Set remediation SLAs by risk tier, choose between patching, a compensating control and a documented risk acceptance, write exceptions with an owner, an expiry and a tested control, and close findings only on rescan evidence.

Contentsand lesson path

On this page

  1. Why it matters
  2. Deadlines that follow risk
  3. Fix, reduce exposure or accept
  4. Checking SLAs and exceptions in code
  5. Closing on evidence
  6. Check your understanding
  7. Apply it
  8. Review prompt

Lessons of Vulnerability Management

  1. From Asset Inventory to Scan Coverage Concept · 20 min
  2. Running and Reading an Authenticated Scan Lab · 30 min
  3. Prioritising with CVSS, EPSS and KEV Worked example · 25 min
  4. Remediation Workflows, Exceptions and Verification Concept · 20 min
  5. Metrics That Show Exposure Going Down Worked example · 15 min
  6. Vulnerability Management Check Knowledge check · 8 questions

What you will learn

  • Define remediation SLAs, patch and compensating-control workflows and risk-acceptance exceptions, and verify closure with a rescan.

01. Why it matters

A ranked list of findings does not reduce risk by itself. Someone has to change the vulnerable system, and someone has to check that the change worked. Between the scan and the fix there are many ways for a finding to get stuck: the owner is unclear, the patch breaks something, no patch exists yet, or the ticket is closed but the server still runs the old package.

A remediation workflow makes each of these cases explicit. It sets a deadline for every finding, offers three legitimate outcomes (fix, reduce exposure, or accept the risk for a limited time), and demands evidence from the asset before a finding counts as closed. NIST SP 800-40 Rev. 4 describes the same cycle for patching: plan the risk response, prepare it, implement it, verify it, and keep monitoring that it stays in place.

02. Deadlines that follow risk

A remediation SLA (service level agreement) is the maximum time allowed between first detecting a finding and fixing it. A single deadline for everything fails in both directions. If every finding gets 30 days, a flaw that attackers already exploit stays open for a month, while a minor issue on an isolated test box consumes the same effort as the VPN gateway. If fixes wait for a quarterly patch window, the most dangerous findings wait longest.

The alternative is to tie the deadline to the risk tier from prioritisation. The example policy in this lesson continues the tiers from the prioritisation lesson: act now 7 days, next 30 days, scheduled 90 days and backlog 180 days. The numbers are a local choice. They must match what the teams can deliver, or every report becomes a list of missed deadlines that nobody acts on.

A public example of a risk-tiered policy is CISA's Binding Operational Directive 26-04, issued on 10 June 2026 for US federal agencies. It moved away from the flat deadlines of earlier directives such as BOD 22-01 to a decision table, published as an SSVC decision model, that uses four questions: is the CVE in KEV, is the asset publicly exposed, is exploitation automatable, and is the technical impact partial or total? The answers give one of five outcomes: 3 days with a forensic triage of the asset, 3 days, 14 days, 60 days, or "fix on system upgrade". For example, a KEV entry with total impact on a publicly exposed asset gets 3 days plus forensic triage, while a flaw that is not in KEV, not exposed and not automatable waits for the next scheduled upgrade or rebuild. CISA's kev-data repository states that KEV additions rely on the directive's authority, and the CVSS v4.0 FAQ describes it as a model that other organisations can adapt.

Two details decide whether an SLA means anything. First, the clock starts when the finding is first detected, not when a ticket is opened or assigned. Second, the tier can change while the finding is open: if a CVE enters KEV or an asset becomes internet-facing, the finding moves to a stricter tier. Counting the new tier from first detection would make a finding seen 60 days ago overdue the moment it enters a 7-day tier. A common rule is that the new due date is the earlier of the original deadline and the escalation date plus the new tier's days. The checker below assumes that no tier has changed; the Apply section extends it.

03. Fix, reduce exposure or accept

NIST SP 800-40 Rev. 4 lists four risk responses: accept, mitigate, transfer and avoid. In daily vulnerability work they become three paths.

Remediate. Install the fixed package, upgrade the software, change the vulnerable configuration, or rebuild and redeploy the container image. Remediation is the only path that removes the flaw itself without removing the feature. It is the default whenever a fix exists and can be deployed.

Mitigate with a compensating control. A compensating control reduces the chance or the impact of exploitation while the flaw stays in place. Examples are a firewall rule that limits who can reach the port, a web application firewall (WAF) rule that blocks the vulnerable request, disabling the affected feature, or moving the asset to an isolated segment. A control only counts if it is tested: a firewall rule that nobody has checked since a network change may no longer exist. The test must be specific and repeatable, for example "a connection to port 5432 from 10.20.3.0/24 must fail".

Accept the risk with an exception. Sometimes the fix is not available, as with the glibc finding in the scanning lab, or the patch breaks a business application. An exception (also called a risk acceptance) records a decision that the finding will stay open past its SLA. A defensible exception has:

  • a named owner who answers for the risk, and an approver whose authority matches the risk level;
  • a reason that a reviewer can check, such as "no fixed package released";
  • the compensating control, with its test method and the date it last passed;
  • an expiry date, after which the finding is treated as overdue again, plus triggers that end it early, such as a KEV listing or a fix becoming available.

An exception without an expiry quietly turns into permanent risk. An exception without a tested control is only a promise that an exploit will not happen.

04. Checking SLAs and exceptions in code

The files below continue the lab estate. findings.csv has the tier, the date of first detection, the status and, for closed findings, the type of closure evidence.

CSV · remediation/findings.csv
id,asset,tier,first_seen,status,closed_on,closure_evidence
LAB-2026-0101,vpn-gw-01,act now,2026-11-12,open,,
LAB-2026-0105,web-01,act now,2026-11-02,open,,
LAB-2026-0103,payroll-01,next,2026-10-20,closed,2026-11-10,rescan
LAB-2026-0102,test-07,backlog,2026-09-01,open,,
LAB-2026-0104,wiki-01,backlog,2026-08-15,closed,2026-11-01,ticket
LAB-2026-0106,db-01,scheduled,2026-07-01,open,,
LAB-2026-0107,wiki-01,next,2026-08-01,open,,
LAB-2026-0108,build-01,next,2026-10-25,open,,

exceptions.json holds three exception records. Read them before running the checker and predict which ones it will accept.

JSON · remediation/exceptions.json
[
  {"id": "EXC-12", "finding": "LAB-2026-0106", "owner": "data-team: R. Osei",
   "approver": "CISO", "reason": "no fixed package released by the vendor",
   "control": "port 5432 reachable only from app subnet 10.20.1.0/24",
   "control_test": {"method": "connection attempt from 10.20.3.0/24 must fail",
                    "last_passed": "2026-11-03"},
   "expires": "2026-12-31"},
  {"id": "EXC-09", "finding": "LAB-2026-0107", "owner": "it-ops: J. Park",
   "approver": "Head of IT", "reason": "plugin update breaks page templates",
   "control": "WAF rule blocks the vulnerable endpoint",
   "control_test": {"method": "request to endpoint must return 403",
                    "last_passed": "2026-10-02"},
   "expires": "2026-10-31"},
  {"id": "EXC-14", "finding": "LAB-2026-0108", "owner": "platform: A. Diaz",
   "approver": "Head of Platform", "reason": "build agents pinned until release",
   "control": "agents run only signed jobs",
   "control_test": null,
   "expires": "2027-01-15"}
]

The checker calculates each due date from the tier, accepts an exception only if it has an owner and a control, has not expired and its control passed a test in the last 30 days, and accepts a closure only when the evidence came from the asset itself (a rescan or a targeted check). The date is a parameter, so the output is reproducible.

Python · remediation/sla_check.py
"""Check SLA due dates, exceptions and closure evidence for findings."""
import csv
import json
import sys
from datetime import date, timedelta

SLA_DAYS = {"act now": 7, "next": 30, "scheduled": 90, "backlog": 180}
RETEST_DAYS = 30  # a compensating control must have passed a test this recently
VERIFIED = ("rescan", "targeted-check")  # evidence that comes from the asset itself


def exception_problem(exc, today):
    """Return why an exception cannot be relied on, or None if it is valid."""
    if not exc.get("owner") or not exc.get("control"):
        return "no owner or no control"
    if date.fromisoformat(exc["expires"]) < today:
        return f"expired {exc['expires']}"
    test = exc.get("control_test")
    if not test:
        return "control never tested"
    if (today - date.fromisoformat(test["last_passed"])).days > RETEST_DAYS:
        return f"control last tested {test['last_passed']}"
    return None


def state_of(f, exceptions, today):
    due = date.fromisoformat(f["first_seen"]) + timedelta(days=SLA_DAYS[f["tier"]])
    if f["status"] == "closed":
        if f["closure_evidence"] in VERIFIED:
            return due, "closed, verified"
        return due, "REOPEN: closed without rescan evidence"
    exc = exceptions.get(f["id"])
    if exc:
        problem = exception_problem(exc, today)
        if problem is None:
            return due, f"excepted by {exc['id']} until {exc['expires']}"
        late = "overdue" if due < today else "within SLA"
        return due, f"INVALID {exc['id']}: {problem}, {late}"
    if due < today:
        return due, f"OVERDUE by {(today - due).days} days"
    return due, f"open, {(due - today).days} days left"


if __name__ == "__main__":
    today = date.fromisoformat(sys.argv[1]) if len(sys.argv) > 1 else date.today()
    exceptions = {e["finding"]: e for e in json.load(open("exceptions.json"))}
    print(f"as of {today}")
    for f in csv.DictReader(open("findings.csv")):
        due, state = state_of(f, exceptions, today)
        print(f"{f['id']} {f['tier']:<9} due {due} {state}")
Terminal
mkdir remediation && cd remediation
# save findings.csv, exceptions.json and sla_check.py here
python3 sla_check.py 2026-11-16
Expected output
as of 2026-11-16
LAB-2026-0101 act now   due 2026-11-19 open, 3 days left
LAB-2026-0105 act now   due 2026-11-09 OVERDUE by 7 days
LAB-2026-0103 next      due 2026-11-19 closed, verified
LAB-2026-0102 backlog   due 2027-02-28 open, 104 days left
LAB-2026-0104 backlog   due 2027-02-11 REOPEN: closed without rescan evidence
LAB-2026-0106 scheduled due 2026-09-29 excepted by EXC-12 until 2026-12-31
LAB-2026-0107 next      due 2026-08-31 INVALID EXC-09: expired 2026-10-31, overdue
LAB-2026-0108 next      due 2026-11-24 INVALID EXC-14: control never tested, within SLA

Two findings are open past their deadline: LAB-2026-0105 has no exception at all, and LAB-2026-0107 had one that expired, so it is overdue again. EXC-14 is rejected even though it has not expired, because its control has never been tested. LAB-2026-0104 is reopened because it was closed on the word of a ticket. EXC-12 is the one exception that holds, and the verified closure of LAB-2026-0103 passes too. Both of these are negative cases: a policy check that flags valid records teaches people to ignore it.

Policy code needs tests of its own, including the boundaries: a control tested exactly 30 days ago, and an exception that expires today.

Python · remediation/test_sla.py
"""Positive and negative tests for sla_check.py."""
from datetime import date

from sla_check import exception_problem, state_of

TODAY = date(2026, 11, 16)
good = {"id": "EXC-1", "owner": "team: name", "control": "ACL",
        "expires": "2026-12-31",
        "control_test": {"method": "probe must fail", "last_passed": "2026-10-17"}}
cases = [
    ("valid exception, tested 30 days ago", exception_problem(good, TODAY), None),
    ("tested 31 days ago",
     exception_problem({**good, "control_test": {"last_passed": "2026-10-16"}}, TODAY),
     "control last tested 2026-10-16"),
    ("expires today is still valid",
     exception_problem({**good, "expires": "2026-11-16"}, TODAY), None),
    ("no owner", exception_problem({**good, "owner": ""}, TODAY),
     "no owner or no control"),
]
row = {"id": "X", "tier": "next", "first_seen": "2026-11-01", "status": "closed",
       "closed_on": "2026-11-10", "closure_evidence": "rescan"}
cases.append(("closed with rescan", state_of(row, {}, TODAY)[1], "closed, verified"))
row = {**row, "closure_evidence": "ticket"}
cases.append(("closed on a ticket only", state_of(row, {}, TODAY)[1],
              "REOPEN: closed without rescan evidence"))
failed = 0
for name, got, want in cases:
    failed += got != want
    print(f"{'ok  ' if got == want else 'FAIL'} {name}: {got}")
print("all SLA tests passed" if not failed else f"{failed} tests failed")
Terminal
python3 test_sla.py
Expected output
ok   valid exception, tested 30 days ago: None
ok   tested 31 days ago: control last tested 2026-10-16
ok   expires today is still valid: None
ok   no owner: no owner or no control
ok   closed with rescan: closed, verified
ok   closed on a ticket only: REOPEN: closed without rescan evidence
all SLA tests passed

05. Closing on evidence

A finding is closed when the asset shows that the vulnerable version is gone, not when someone says so. The evidence is a rescan of the asset, or a targeted check that reads the installed version directly. In the scanning lab, the rescan after the first upgrade showed that musl-utils was still at the old version, which a ticket update would have missed.

Several situations look like a fix but are not:

  • The rescan could not reach the asset or log in. "Not detected" from a failed scan is not evidence. Keep the finding open until a successful authenticated scan.
  • The package changed but the old code still runs. A library update such as glibc or OpenSSL only takes effect when the processes that use it restart, and a kernel update usually needs a reboot, or a live patch, before it takes effect.
  • A container was patched in place. The image is unchanged, so the next container starts vulnerable. Fix the image and redeploy.
  • The fix was rolled back or restored from a backup. Keep scanning closed findings, and reopen a finding when the vulnerable version returns.

Compensating controls need the same treatment. Retest them on a schedule and after network changes, and record the date of the last passing test in the exception, as the checker expects.

06. Check your understanding

Practice check · 3 questions

Deadlines, exceptions and closure

Three questions about the workflow and the checker.

Q1. You run `python3 sla_check.py 2026-12-05` without changing any file. What does the line for `LAB-2026-0106` say?
Q2. `web-01` runs as a container. A team fixes `LAB-2026-0105` by running `apt-get upgrade` inside the running container, and a rescan of that container shows the fixed version. The orchestrator replaces the container the next morning. What should the programme expect?
Q3. The glibc finding from the scanning lab has no fix, needs a local account and a setuid program, and has an EPSS value near 0.001. Which exception terms are the most defensible?
Practice only: not graded, not saved, not evidence.

07. Apply it

For the skill project:

  • Write the SLA table for your lab, one deadline per tier, and give the reason for each number.
  • Patch two hosts, rescan them, and attach the rescan output to each closed finding.
  • For every finding you cannot fix, write an exception record with owner, approver, reason, compensating control, control test and expiry, then run the test (for example a connection attempt that must fail) and record the date.
  • Extend sla_check.py so that it ends an exception early when the finding's CVE appears in the KEV catalogue.
  • Add an escalated_on date and a new tier to findings.csv, apply the escalation rule in sla_check.py, and test it with a finding that enters KEV 60 days after detection.

08. Review prompt

Without looking back:

  1. Why do flat deadlines and fixed patch windows both fail, and what decides the deadline in a risk-tiered policy?
  2. What is the difference between remediating a finding and mitigating it with a compensating control?
  3. Which fields does a defensible exception need, and why does each one matter?
  4. Name three situations in which a finding looks fixed but is not.

References

Your progress

Reading state

Sign in to save that you finished reading this lesson.

Sign in to mark reading complete

Prove this skill

8 questions · about 6 minutes · scored automatically. Marking a lesson as read never demonstrates a skill.
Take the skill check