AI Security

From CVE To PR: The Full Remediation Pipeline

A complete walkthrough of the modern remediation pipeline, from advisory ingestion through merged and deployed fix, with every stage that actually matters.

Nayan Dey
Senior Security Engineer
8 min read

A vulnerability remediation pipeline is a chain of stages that turns an upstream advisory into a deployed fix in production. Each stage has its own design decisions, its own failure modes, and its own opportunities to lose hours or days. The pipelines that perform well in 2026 are not the ones that have a single brilliant component. They are the ones where every stage has been thought through, instrumented, and connected cleanly to the next. This post is a guided walk through the whole chain.

Stage One: Advisory Ingestion

Everything starts with knowing about the vulnerability. The pipeline subscribes to a broad set of advisory sources: the National Vulnerability Database, GitHub Security Advisories, OSV, vendor-specific feeds for major ecosystems, and commercial intelligence services that often surface issues days before public disclosure. Ingestion is continuous, not scheduled. A new advisory is processed within minutes of publication.

Ingestion also normalises. The same vulnerability can appear with different identifiers across sources, different affected-version expressions, different severity scores. The pipeline reconciles these into a single canonical record per vulnerability and keeps the source-specific details available for audit. When a later source updates a score or expands an affected-version range, the canonical record is updated and downstream stages see the new information.

Stage Two: Affected-Project Resolution

An advisory is interesting only if it affects something the organisation runs. The pipeline maintains a current SBOM and dependency graph for every project, refreshed on every push. When a new advisory lands, the affected packages and version ranges are matched against every project's graph in seconds. The output is a list of findings, one per project-vulnerability pair.

The matching is more careful than a literal version comparison. It accounts for vendored dependencies, pinned forks, build-time-only packages, and the difference between development and production dependency trees. A library used only in test fixtures should not produce a finding flagged with the same urgency as one used in production code.

Stage Three: Reachability And Risk Scoring

Each finding goes through reachability analysis. The pipeline traces from the project's entry points through its dependency graph to determine whether the affected code path is invoked. The result is reachable, unreachable, or unknown. Reachability is recomputed on every push so the classification stays honest as the codebase evolves.

In parallel, the finding is scored. EPSS gives the exploit probability. Asset criticality, drawn from a tag the project owner sets, weights findings on customer-facing or revenue-critical assets above internal tools. CVSS contributes as a tie-breaker. The combined score determines the tier the finding lands in, which drives every downstream decision.

Stage Four: Triage And Tiering

Tier assignment is automatic but not silent. Every finding is logged with its tier and the inputs that produced it. A reviewer who later questions why a finding was assigned tier two instead of tier one can see the reasoning in plain prose. The transparency is what makes the system trusted.

Findings whose tier indicates active SLA tracking start a clock. Findings classified as deprioritised, typically unreachable findings on non-critical assets, are documented as such with the analysis that supports the classification. Deprioritised findings are revisited periodically because reachability and EPSS can change.

Stage Five: Fix Planning

Findings that need action enter the planning stage. The planner determines what version of the affected package fixes the vulnerability, whether the fix requires a transitive cascade, what breaking changes the fix introduces, and what source-level edits the application will need to absorb those breaking changes.

The planner produces one of three outputs. A tier-one fix plan: routine bump, no source edits, ready for automated authoring. A tier-two fix plan: bump plus assisted source edits, ready for automated authoring with extra review. A tier-three planning issue: change too large or too risky for automation, scoped for human attention.

The split is honest. The pipeline does not pretend tier three is tier one. The PR queue stays clean.

Stage Six: Authoring

Tier-one and tier-two plans go to the authoring stage. The AI authoring layer takes the plan and generates the change: lockfile updates, manifest edits, source-level changes, and a draft PR description with the evidence sections pre-populated. The model annotates each edit with its confidence, which propagates to the reviewer pane later.

Authoring runs against a copy of the project, not against the live branch. Generated changes are committed to a verification branch where the next stage can run safely.

Stage Seven: Verification

Verification is where most automated remediation tools fail. The pipeline runs the verification stack against every authored change before any PR is opened. The stack has four layers. Resolve: confirm the lockfile produces a clean result. Build: run the project's build command in a sandbox that mirrors its CI image. Test: run the project's existing test suite. Diff: compute the runtime API diff between old and new versions of the bumped packages, scoped to symbols the application actually imports.

Each layer has a hard timeout. Changes that pass all four layers proceed to the PR stage. Changes that fail are either retried with a refined plan or routed to planning issues with the failure diagnostic attached. A reviewer never sees a PR that has not gone green.

Stage Eight: PR Creation

Verified changes become pull requests. Each PR is opened with the full evidence panel inline: vulnerability summary, change summary, build and test results, runtime API diff, model confidence signals, rollback path. The PR is routed to the appropriate review queue based on its tier.

Throttling is enforced here. A repository receives no more than the configured number of PRs per day. Related fixes are bundled into single PRs where the bundle reduces total work. The aim is a steady cadence of small, reviewable, green-build changes.

Stage Nine: Human Review

Human review is the gate. Tier-one PRs go to the standard reviewer rotation with a target time-to-decision of one to three minutes. Tier-two PRs go to a designated reviewer pool with a longer SLA and a written sign-off requirement. The reviewer sees the evidence panel inline, makes a decision, and clicks approve or request changes.

The review pane records the decision, the reviewer identity, the timestamp, and the evidence available at the time of approval. This is the audit trail. It is searchable later for postmortem or audit purposes.

Stage Ten: Merge And Deployment

Approved PRs merge using the project's normal merge policy: squash, rebase, or merge commit, depending on configuration. The pipeline does not impose a merge style. Post-merge hooks pick up the change in the project's deployment pipeline. The remediation clock continues to run until the change is deployed to the affected environment.

Post-deployment, the pipeline confirms that the running asset no longer contains the vulnerability. This is the closing of the SLA loop. A change that merges but does not deploy is not yet remediated.

Stage Eleven: Post-Mortem And Calibration

Every closed finding feeds the calibration loop. Approved PRs that produced no regressions confirm the model's confidence calibration. Rolled-back PRs adjust it. SLA breaches are categorised by cause and feed pipeline tuning. Findings that turned out to be reachable when the analysis classified them unreachable feed reachability tuning.

The pipeline is not static. It improves over months as the organisation's data accumulates. The improvements are empirical, driven by observed outcomes, not by guesswork.

Where The Pipeline Connects To The Rest Of The Programme

The remediation pipeline is one component of a larger software supply chain security programme. It connects to SBOM generation, license compliance, secrets detection, and policy gating. The same dependency graph that drives remediation drives those other functions. The same audit trail that supports remediation review supports compliance reporting. The same dashboards that show SLA compliance show overall security posture.

This integration matters because organisations that run remediation in isolation tend to duplicate work and drift between tools. A pipeline that shares its data model with the rest of the programme gets the benefit of consistency for free.

Where It Does Not Help

The full pipeline is honest about its limits. It does not handle vulnerabilities for which no fix exists, architectural redesigns that span multiple sprints, or the need for security expertise on the team. What it does is take the routine remediation work, the vast majority that is mechanical and slow, and run it as a fast, reviewable, auditable flow. The hard problems become visible because the noise is gone.

How Safeguard Helps

Safeguard implements the full remediation pipeline described above as a single integrated platform. Continuous advisory ingestion, current dependency graphs, reachability and EPSS-driven prioritisation, tiered planning, AI-assisted authoring with confidence signals, layered verification, evidence-attached PR creation, human review with a clean audit trail, merge and deployment tracking, and a calibration loop that improves the system over time. Each stage is instrumented, each handoff is clean, and the whole flow is visible on a single dashboard. Teams that adopt it close vulnerabilities at a cadence and quality that ad-hoc tooling cannot match.

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.