2026-11-17Gunner Technology
Security Is a Line, Not a Last Look
Security checks should run before an AI agent starts, while it changes the code, before the change ships and after production talks back. A final scan is still useful, but it cannot carry the whole job. Put each control where it can stop the mistake it understands.
Why is the final security scan too late?
A final scan is too late because some unsafe choices have already shaped the change. The agent may have selected a dependency, copied an insecure pattern across several files or designed an authorization path around the wrong assumption. Finding that at release turns prevention into reconstruction.
The answer is not to remove the release scan. It is to stop pretending that one scanner can understand every boundary. Dependency policy, secret detection, static analysis, authorization tests and deployed-configuration checks answer different questions. They belong at different points on the line, with a shared power to refuse the work.
This is the narrower operating question behind security running at generation speed. Faster security does not mean asking one tool to race the agent. It means placing small, enforceable checks beside the decisions they govern.
What should run before the agent writes code?
Before coding begins, enforce the route: which repository, data, network destinations, packages and credentials this job may use. A policy gate is a machine-enforced decision about whether an action is allowed. Give the agent the approved choices, then block everything outside them at the tool or network boundary.
Dependency rules belong here as well as later. If a package family, license or source is forbidden, do not wait for a completed pull request to mention it. Constrain the package manager and the agent's network access before selection. The best unsafe dependency finding is the one that never becomes part of the solution.
People still decide the policy. They choose which risks are acceptable and which work needs an exception. But the agent should receive that decision as machinery, not a paragraph it can overlook. If a machine can check the rule, make the machine carry it every time.
Which security checks belong in the build loop?
Run fast, specific checks after every meaningful change: secret detection, dependency inspection, static analysis and tests for the trust boundary being edited. Static analysis examines code without running it. It can catch known dangerous patterns quickly, but it cannot prove the product grants the right person the right access.
Make the agent repair a failed check before it continues piling work on top. Return the file, rule and consequence in the failure so the next attempt is narrow. A report that lands in a separate inbox creates a second queue; a failing gate keeps the defect attached to the work that caused it.
Do not let the builder define all the proof. For an authorization change, test both sides: forbidden access fails and permitted access still works. Keep those checks outside the agent's authority to weaken. Security tooling helps only when a passing result comes from a boundary the builder cannot quietly rewrite.
What must run again before release?
Before release, rerun the required checks against the exact artifact that will ship and verify the deployed configuration around it. Earlier feedback made repair cheaper; the release gate proves nothing changed, disappeared or passed only in the builder's workspace.
This gate should fail closed when evidence is missing. A skipped scanner, expired result or broken test runner is not a pass. Keep missing evidence distinct from a clean result, just as a release must refuse missing proof. A green summary cannot inherit a check that never ran.
Route deeper checks by consequence. A copy change and a new credential path do not need identical treatment. The factory should know which boundaries changed, select the required evidence and stop when any required result is absent. That gives high-risk work more scrutiny without turning every small edit into a human security review.
How do production failures change the line?
Production failures should create a new rule at the earliest point that could have prevented them. If a dependency behaved badly, tighten admission. If an authorization case escaped, add the independent test. If configuration drift opened the path, verify the deployed state before the next release.
Do not answer every incident by buying another scanner. More tools can create duplicate findings, contradictory severity labels and an alert queue nobody owns. Name the missed decision first. Then add or change the smallest control that can make the next attempt fail for the right reason.
Gunner Technology's position is simple: security is not a review stage behind AI coding. It is the set of boundaries that decides what the agent may choose, what its change must prove, what may ship and what the factory learns afterward. Build that line first, and speed becomes something you can safely use.
Quick answers
Should every security tool run after every edit?
No. Run fast checks close to the edit and reserve slower checks for the work and release boundaries they protect. Every required check should still run before its evidence is needed.
Who can approve a security exception?
A named person with authority over that risk should approve it with a scope and an expiration. The agent should never grant its own exception.
Can an AI security reviewer replace deterministic checks?
No. It can find issues that fixed rules miss, but its findings need reproducible evidence and it cannot replace controls with a reliable pass or fail.