Flagged as Fixed: Why a Disabled Code Path Is Not a Remediated Vulnerability
Photo: Tim1965 / Tim from Washington, D.C., United States of America, CC BY-SA 3.0, via Wikimedia Commons
A vulnerability does not disappear when a conditional evaluates to false. Yet across American engineering organizations, the feature flag has become the most convenient substitute for remediation: a toggle flipped to off, a ticket closed as mitigated, a risk register entry turned green, and a code path that sits intact in production waiting for someone to switch it back on.
Off Is Not Gone
Feature flags are a legitimate and often admirable engineering tool. They decouple deployment from release, they enable canary rollouts, and they let teams ship incrementally without long-lived branches. None of that is in dispute.
What deserves scrutiny is the moment a flag stops being a release mechanism and starts functioning as an alibi.
When a team disables a vulnerable path instead of repairing it, the underlying defect remains. The route still exists. The handler still compiles. The authorization check that was never written is still not written. The database column holding the sensitive field is still populated. Flags govern execution, not existence — and they govern it through configuration that lives outside code review, frequently in a vendor dashboard no security engineer has ever audited.
The failure modes compound. A flag default can be inverted by a deployment. A stale flag can be resurrected by an on-call engineer during an incident, hours after the person who understood its history has logged off. A growth experiment can re-enable a cohort. An acquisition can migrate configuration without migrating context. The vulnerability was never fixed, so the only thing standing between it and production is a boolean maintained by people who may never have read the ticket that created it.
Why the Switch Is So Attractive Upstairs
The appeal to management is not mysterious. Removing a vulnerable feature properly requires a refactor, a data migration, customer communication, and possibly a deprecation announcement. Flipping a flag requires a meeting that ends early.
A flag also produces better-looking artifacts. The remediation ticket closes. The scanner finding becomes a false positive or a mitigated risk. The security questionnaire gets answered affirmatively, because the feature is disarmed at this moment. The risk register moves to accepted — often without a named acceptor, a date, or any stated authority to accept anything.
The pattern is resilient precisely because it diffuses responsibility. The product manager believes security approved the mitigation. Security believes product owns the follow-up work. The engineer who flagged the issue has a ticket that says resolved. By the time anyone asks why the vulnerable code still ships, the answer is a document trail that agrees with itself and disagrees with reality.
What It Looks Like From the Inside
Engineers who push for actual removal describe a predictable sequence. First, the fix is deemed out of scope for the sprint. Second, the flag is proposed as an interim control. Third, the interim control is recorded as permanent in a spreadsheet nobody revisits. Fourth, when the engineer raises the issue again, they are told the risk has been accepted — a phrase that ends conversations in most organizations and starts them in very few.
The frustration is not merely technical. It is the knowledge that a colleague's legitimate question has been converted into a closed Jira item, that a customer-facing claim of security is resting on a shortcut, and that raising the matter a third time will be read as obstinacy rather than diligence.
The Evidence Worth Preserving
If you are the person who knows a flag is standing in for a fix, build a record before you need one:
- Export the flag's configuration history and audit log, including who toggled what and when. Note the time zone.
- Preserve the ticket thread in which remediation was deferred, especially any written statement that the risk is accepted and by whom.
- Save pull request discussions where the vulnerable logic was introduced or reviewed.
- Keep evidence that the code is still compiled, deployed, and reachable — routes, handlers, scheduled jobs, background workers.
- Record test coverage of the disabled path, or the absence of it.
- Capture release notes, status page entries, or sales materials claiming the issue was fixed.
- Note roles and dates rather than speculation about motives.
Keep records in sanctioned systems where policy requires it, and consult employment counsel before moving anything outside company infrastructure. Whistleblower protections vary by state, and the safest evidence is contemporaneous, factual, and free of editorializing.
The Line Between Mitigation and Misrepresentation
A flag becomes a reportable concern when the story told about it diverges from the story the code tells. That divergence shows up in audit attestations, contractual security schedules, customer notifications, and regulatory filings. Federal disclosure expectations for public companies, tightened through rules adopted in 2023, make the difference between a mitigated risk and an unresolved one material in ways that a dashboard toggle cannot paper over.
It also matters when the disabled path still exposes data through adjacent systems: analytics pipelines, backups, third-party integrations, and export jobs that never consulted the flag.
What to Ask For Instead
Engineers who want to change the habit should ask for structures rather than arguments: expiry dates on every flag, a named owner, a remediation ticket with a service-level commitment attached to any security-motivated toggle, and a postmortem requirement that removal plans be documented. A flag that guards a vulnerability should be treated as a loan, not a settlement.
The kill switch can stay. It simply should not be allowed to impersonate a fix.