Web Security in the Build and Deploy Pipeline

Web Security in the Build and Deploy Pipeline

A site secured once is secured for one day. A CTO-altitude view of where each check belongs, why a gate is a decision not a wall, and why the pipeline is a surface.

A site secured once at launch is secured for exactly one day; everything after that is the pipeline's job. This article reframes web security as something that happens continuously between commit and production rather than as a pre-launch event — where the static-analysis, dependency, dynamic, and infrastructure checks belong, why a gate is a decision and not a wall, and why the pipeline that runs all of this is itself an attack surface, not only a control. The CTO question is not which scanner; it is whether the gate posture is owned and tuned, and that question does not have an engineering answer.

Why pre-launch security does not hold

A common security model in a legacy delivery setup is a date. The site was reviewed before it shipped, it passed, and the result was treated as a property of the system rather than a snapshot of one moment. That model was never quite true, and it is now actively misleading. A site secured the day it launched is secured for that day. The dependency graph it pulled in changes quickly, the code changes with every release, and the threat landscape it was assessed against moves continuously while the assessment stays frozen at the launch date.

What makes this dangerous in older delivery pipelines specifically is that many of them have no security gate at all between a developer's commit and production. There is a build step, possibly a test step, and a deploy step, and security is something that happened once, before any of those existed in their current form. Every change since then has gone to production without passing anything that asked a security question. The site is not insecure because someone attacked it. It is insecure because a long run of unreviewed changes accumulated in the gap between the last review and now, each one small enough to seem safe and the sum of them never assessed by anyone.

The accumulation is invisible in the same way a "stable" site's security drift is invisible, as this topic's enterprise web security guide describes. Nothing in the deployment dashboard turns red as the gap widens, because the deployment dashboard measures whether the build succeeded and the site is up, not whether what was deployed was reviewed. A team can ship cleanly and continuously for two years and have, at the end of it, a production system whose security posture no one has actually looked at since the launch review — and discover that fact at the worst possible moment, which is when someone else looks first.

There is a second, less comfortable point. The pipeline that builds and ships the site is not only the place security checks live — it is itself an attack surface. OWASP's DevSecOps Guideline notes that CI/CD tools used for automation often expand the attack surface, and it calls for security controls on building, deployment, and automation software. A pipeline with broad credentials, the ability to write to production, and access to signing material is a single point through which an attacker can compromise every future release at once, without ever touching the application code. A posture that treats the pipeline purely as a control, and never as a surface that needs its own hardening, is auditing the lock while leaving the keys on the table.

Where each check belongs

Continuous security is not a single tool bolted to the end of the build. It is a small set of distinct checks, each of which catches a different class of problem and each of which belongs at a specific point in the flow. The placement matters as much as the presence: a check run too late catches the problem after the cost of fixing it has multiplied, and a check run everywhere can catch little, because the noise drowns the signal.

Check classWhere it belongs in the pipelineWhat it catches
Static analysis (SAST)Fast advisory rules at commit time; a scan of the changed code on every pull request that blocks new high- or critical-severity findings; deeper full-codebase scans nightlyInsecure patterns in code the team wrote, caught while the author still has context
Dependency / component analysis (SCA)At build time, against the resolved dependency graphKnown-vulnerable imported components, code the team ships but did not write
Infrastructure-as-code (IaC) checksAt build time, against the deployment definitionMisconfigured infrastructure before it is provisioned, not after it is live
Dynamic analysis (DAST)Against a deployed pre-production environmentRuntime behavior a static read cannot see, on a running instance that is not production

Placement is not a preference, and the cost of getting it wrong is asymmetric in a way worth stating plainly. A static-analysis finding caught on the commit that introduced it costs the author a few minutes while the change is still in their head. The same finding caught by a dynamic check against a pre-production environment costs a context reload, a re-test, and a redeploy. The same finding discovered in production costs an incident. It is the identical defect at every stage; only the price changed, and it changed because of where the check was, not because the defect got worse. A pipeline that runs every check at the end is not thorough — it is a pipeline that has chosen to pay the highest available price for every problem it finds.

Dependency scanning deserves a specific note, because teams often file it as a separate idea — a checkbox labeled "we scan dependencies" sitting next to the application checks. It is not a separate idea. It is the pipeline's view of the same software supply-chain posture the rest of this security model treats as a primary surface; the dependency scanner is where that posture becomes a gate rather than a principle. The stakes of vulnerabilities in general are measurable: according to Verizon's 2026 Data Breach Investigations Report, exploitation of vulnerabilities was the most common initial access vector, at 31% of breaches. That figure covers exploited vulnerabilities in general, not dependency vulnerabilities specifically. The depth of supply-chain provenance — how component integrity is verified, what a software bill of materials is for — is covered by a dedicated article on this topic and is referenced here as the concept the pipeline check enforces, not re-derived. The guidance on where each check sits is laid out in the OWASP DevSecOps Guideline, and the dependency check class maps to tools in the lineage of OWASP Dependency-Check.

One dimension the table does not show is the one teams skip and regret: signal-to-noise. Signal-to-noise is not a tuning detail; it is the difference between a gate that protects the site and a gate that trains the team to ignore it. A check that fails on every build, most of the time for findings nobody will act on, is functionally the same as no check — worse, because it consumes attention and produces the false confidence of a step that runs. A gate the team has learned to click past is a gate that is already disabled in every way that matters, and it will report green to the audit while protecting nothing.

Gates that block the right things

A gate is a decision, not a wall. The instinct, when security is finally added to a pipeline, is to make every finding blocking — to treat the gate as an absolute barrier and any failure as a stop. That instinct produces exactly the ignored-gate failure mode the previous section described, because real codebases generate findings continuously and a wall that stops every release on every finding is a wall the organization is likely to route around, for example by adding an override that then becomes the default. OWASP's DevSecOps Guideline warns that gates that are too noisy or too strict get disabled, ignored, or bypassed.

The posture that holds is a graded one. A small set of findings — a critical, exploitable vulnerability in a path that reaches production; a known-compromised component with no mitigation — is blocking, and blocking means the release does not proceed until the finding is resolved or an accountable owner explicitly accepts the risk with a record. Everything else is advisory: surfaced, tracked, owned, and visible, but not a stop. The discipline is not "block more." It is deciding, deliberately and in advance, which findings are worth stopping a release for, and being honest that the answer is a short list. A long blocking list does not by itself produce a more secure site; it risks producing a team that has memorized the bypass, which can leave a less secure site with more steps.

Two things belong inside the gate that teams often leave outside it. The first is build provenance and artifact integrity: the gate should verify that the thing being deployed is the thing the pipeline built, from the source it claims, and not an artifact substituted somewhere in between. The framework for reasoning about that integrity is published as SLSA, and the relevant point at CTO altitude is that "did this artifact come from our pipeline, unmodified" is a question the gate should be able to answer, not assume. The second is the pipeline's own credentials and access. The gate that checks the application should not run with standing access broad enough to be the breach it is meant to prevent; the pipeline's identity, scope, and secret handling are a first-class part of the posture, not infrastructure trivia beneath it.

What a CTO funds and owns

The posture shift a CTO is funding here has one name: continuous over point-in-time. The deliverable is not a scanner license. It is the decision that security is a property the pipeline maintains on every change, not a property the site acquired once and has been spending down ever since. That decision has a cost — pipeline time, finding triage, the engineering work to make gates meaningful rather than noisy — and pricing it is the CTO's job, because the alternative cost, an unreviewed change reaching production for a long time, arrives on a date nobody chooses and with a number nobody set.

A common reason a pipeline security program decays is that no one owns the gate policy. The checks get installed, the gates get configured once, and then the policy — what blocks, what is advisory, what the thresholds are, when they get retuned — has no owner, so it ossifies into whatever the defaults were and slowly drifts back into noise or irrelevance. An owned gate policy with a named role responsible for its tuning is the difference between a pipeline that stays a control and one that becomes a step everyone has learned to ignore. The framework a CTO can hold the program against is the NIST Secure Software Development Framework, which is a posture reference, not a tool manual.

The tool choice is genuinely not the CTO decision, and treating it as one is how this program goes wrong. Which static analyzer, which dependency scanner, which dynamic tool — those are engineering decisions made on engineering criteria, and they can change before the next rebuild does. The decisions that do not change, and that therefore belong at this altitude, are three: that the pipeline has a security gate at all, that the gate posture is graded rather than absolute, and that the policy has an owner who tunes it. Get those three decided and owned, and the pipeline becomes the place security is continuous. Leave them implicit, and the site goes back to being secured on a date — which is to say, secured for one day, and exposed for every one after it.

Project Inquiry