
An agent can prepare a security change without holding the authority to accept its risks, approve enforcement or authorize deployment.
AI coding agents may propose security changes, but they should not approve their own work. For changes that affect security enforcement, require service-owner accountability and independent security review before merge, followed by release-owner authorization to deploy. Changes to bypass rules or failure behavior need explicit authorization.
This separates permission to write code from authority to accept its consequences.
What Turnstile Spin changes, and what remains unproven
In its September 25, 2026 excerpt, Cloudflare describes Turnstile Spin as using a preferred AI coding agent to add server-side verification to incomplete Turnstile setups. Cloudflare identifies omitted backend validation as a misconfiguration that leaves sites exposed to bots. These are publisher claims, not an independent assessment of the tool. See Cloudflare’s Turnstile Spin announcement.
For engineering leaders, the approval question is concrete: if an agent adds the missing check, who establishes that the protected action actually depends on it?
The excerpt does not establish that Spin independently verifies correctness, supplies approval controls or guarantees protection. Completing an integration and demonstrating that it enforces the intended rule are different deliverables. An agent can draft both the implementation and its tests. Human reviewers still need to judge whether those tests cover the intended security boundary.
Classify the effect, not the size of the diff
A one-line configuration change can determine whether a request is rejected. A large documentation change may have no runtime effect. Assign the approval tier by what the change can do:
- Nonfunctional edits: Text or comments that do not affect runtime behavior, generated configuration or automated deployment behavior.
- Enforcement-path changes: Code or configuration that determines whether a protected action requires a successful security check.
- Bypass or failure-behavior changes: Exceptions, disable switches, fallback behavior or decisions about what happens when verification fails or cannot complete.
If a reviewer cannot establish that an edit is nonfunctional, treat it as potentially functional until that uncertainty is resolved. For changes spanning tiers, apply the stricter requirement.
A permission-and-approval matrix to adopt
This is a recommended policy template, not a description of Turnstile Spin’s capabilities. “Agent permission” means authority granted through repository, pipeline and environment permissions, not merely instructions in a prompt.
| Change class | Permitted agent actions | Accountable owner | Required evidence | Human approval | Release-blocking conditions |
|---|---|---|---|---|---|
| Nonfunctional edit | Draft and open a pull request. A merge bot may execute the merge after required human approval and checks. No independent deployment authority. | Component owner | Diff review showing no effect on execution, enforcement, generated configuration or deployment behavior | Component maintainer | Functional effect is unclear, or the edit changes an executable artifact |
| Enforcement-path change | Draft implementation and tests; run checks in an isolated environment. No authority to approve, merge or deploy | Service owner responsible for the protected action | Defined security invariant; positive and negative tests; evidence that rejection prevents the protected action; reviewed failure behavior | Service owner accepts scope; independent security reviewer approves enforcement before merge; release owner authorizes deployment | A required negative case is untested, an alternate path is unresolved, or failure behavior is unspecified |
| Bypass or failure-behavior change | Propose alternatives and tests. Implement only after the intended behavior is explicitly authorized. No authority to approve, merge or deploy | Named owner authorized to accept the service’s security risk | Exact exception or fallback conditions; affected actions; failure tests; monitoring and rollback plan; expiry for temporary exceptions | Accountable owner and independent security reviewer explicitly authorize the behavior; release owner authorizes deployment | Implicit fail-open behavior, an unbounded exception, missing risk acceptance, or rollback that silently removes enforcement |
Separate authorization need not mean a separate committee. It means the bypass or fallback decision is visible and approved as a security decision, not buried inside an implementation review.
Roles can overlap where staffing requires it, but the human responsible for authoring the change should not be its sole security approver. If an independent reviewer is unavailable, hold the change or use an established exception process with a named risk-accepting owner. Agent-generated review comments are not independent authorization.
Make the boundary enforceable
“The agent must ask first” is weaker than permissions that prevent unauthorized actions. Separate approval authority from the agent’s execution identity, restrict its access to production credentials, and require the relevant approvals in merge and deployment workflows.
A deployment system can execute an approved release. The agent must not be able to grant itself approval, remove required checks or expand its own permissions.

In the hypothetical signup example, backend verification must control account creation, not merely run alongside it. A timeout policy that creates no account would require explicit human approval.
Worked example: adding verification to signup
Hypothetical assumptions: A signup service displays a challenge but does not validate its result on the backend. Creating an account is the protected action. An agent is asked to add server-side verification. All tests below use mocked verification responses and an isolated account store, not live customer data.
1. The service owner defines the invariant
Write the requirement before reviewing the implementation:
The signup handler must not create an account unless the backend has accepted verification for that signup request under the agreed validation rules.
“Calls the verification service” is not enough. The application could make the call, ignore the result and create the account anyway.
2. The change author supplies observable evidence
The author, assisted by the agent if useful, attaches the revision tested, test configuration and results. The reviewer should expect evidence such as:
| Test condition | Required observation |
|---|---|
| Verification is accepted | An otherwise valid signup can create an account |
| Verification input is missing | No account is created |
| Verification is rejected | No account is created |
| A request reaches signup without the browser challenge flow | The backend still enforces verification |
| Verification times out, is unavailable or returns an unusable response | Behavior matches an explicitly approved failure policy |
Negative tests should inspect the protected side effect, not just an HTTP status. A handler that creates an account and then returns an error has violated the invariant.
The security reviewer also traces the relevant routes and account-creation calls. Tests covering only one route cannot establish that every route to the protected action is covered.
3. Hold the release when failure behavior is unspecified
Suppose successful signup, missing verification and rejected verification all behave as required. But the change has no defined behavior for verification-service timeouts.
Decision: hold. A passing normal flow does not resolve whether an outage blocks signup, defers it or bypasses the check.
For this example, the service owner could choose a retryable rejection that creates no account. The author would add a mocked-timeout test, and the security reviewer would assess the behavior and its evidence. A temporary bypass to preserve signup availability would instead require a separate risk decision under the highest tier. It would also change the stated invariant. Neither decision belongs to the agent.
The hold identifies an unresolved decision, its owner and a path to resolution. It does not demand proof that the entire application is secure.
Attach a short decision record to each security change
Use this approval block in the pull request or change record:
- Protected action and invariant: What must not happen without successful enforcement?
- Risk tier and owner: Who is accountable, and does the change affect bypass or failure behavior?
- Evidence: Which revision was checked, under what assumptions, and what results support the invariant?
- Unresolved cases: What remains untested or uncertain?
- Authorization: Who approved the enforcement, any exception, and deployment?
- Rollback: What behavior will rollback restore, and has that behavior been accepted?
Reverting a newly added control may restore the original enforcement gap. “We can revert” is not, by itself, a security recovery plan.
What approval does and does not establish
Passing these checks supports confidence in this integration under the reviewed assumptions. It does not prove bot resistance, complete application security or the correctness of other agent-generated changes. Mocked tests also do not establish the real verification service’s behavior or the correctness of production configuration.
Let the agent assist with implementation. Keep the security requirements, evidence standard and acceptance of exceptions under accountable human control.