Picture an HR app demo. The login works. The dashboard loads. The tests pass. Then an HR officer opens an employee record from another office, and the API returns it. The demo looked complete because nobody checked where that officer's access should end.
That's what I mean by AI slop in software engineering. Generated code can look polished and work in a demo while missing the security guarantees the application depends on. The more code a team can generate, the more behavior it has to verify.
What the demo misses
A functional test can prove that an HR officer gets the record they need. A security test also has to prove that the API denies access to records outside the officer's scope and leaves sensitive fields out of responses.
The same gap appears throughout a web app. A login screen can work without rate limiting. Audit events can be recorded with sensitive data attached. A release can pass its tests while inheriting permissive development settings. Each feature needs checks for the ways it can fail.
What the benchmark shows
Veracode tested 18 models in its Fall 2026 update, using four programming languages and four vulnerability categories. The models received no security-specific guidance.
- Previous snapshot
- 56%
- Fall 2026
- 62%
About 38% of tasks in the fall benchmark still produced code with a detectable vulnerability. That figure applies to the tested tasks and categories. Production web apps have additional risks tied to their architecture, permissions, and dependencies.
Confidence can also get ahead of evidence. In a 2023 study, Perry and colleagues found that participants using the assistant were more likely to believe they had written secure code. A plausible explanation from the tool can make an implementation feel settled before anyone has checked it. Read the study.
The employee-record test
Authentication establishes the officer's identity. The API still has to decide what that officer can do to the specific record. Imagine a regional HR policy that allows officers to read employee records within their assigned office.
- North office record
- Allow Within the officer's assigned scope
- South office record
- Deny Outside the officer's assigned scope
Enforce that decision on the server for each record and operation. The policy can account for roles, resource ownership, office hierarchy, and organization boundaries. A missing record-level check can lead to broken object level authorization (BOLA), a form of broken access control. OWASP ranks Broken Access Control first in its 2025 Web Application Security Top 10. See OWASP's access control guidance.
When controls are for show
Seeing a safeguard in the interface or a test suite tells you it exists. Review what it actually protects.
- Audit logging. Can the audit trail be altered? Are passwords and tokens excluded?
- Role checks. Does the API enforce the same permissions the interface shows?
- Input and output handling. Where does the server validate input? Is output encoded for its rendering context?
- Encryption. Who can access the keys, and where are they stored?
- Security tests. Which tests demonstrate that restricted actions are denied?
Security debt at agent speed
A coding agent can edit application code, tests, configuration, and dependencies in one change. That makes the whole diff part of the security review. A passing integration test offers little assurance if the same change relaxed the permission check the test was supposed to exercise.
Look for changes that widen CORS, duplicate a central authorization policy, or change the meaning of a failed test. When code generation outpaces independent verification, those decisions can accumulate as security debt.
Build verification into the workflow
- Before generation. Define sensitive data, trust boundaries, and the authorization rules. Give the agent your approved patterns for authentication, database access, error handling, logging, and dependencies.
- Before merge. Review the diff against those requirements. Run relevant static and dynamic analysis, dependency and secret scans, and configuration checks. Test that out-of-scope users are denied and that protected data and workflow states stay intact.
- Before release. Assign a human owner who understands the change and can explain the evidence that it is ready. Use OWASP ASVS to turn security expectations into verifiable requirements.
For a practical companion, see How to Secure AI-Assisted Software Development.
Measure the cost to ship
A feature generated in an hour can still take days to review and remediate. Track the time spent on security review, which permission boundaries have regression tests, what issues reach production, and how long fixes take. Include unresolved risks from dependencies in the picture.
AI can speed up implementation. The evidence you collect through review and testing should decide when the result is ready for production.
References
- Veracode · Fall 2026 GenAI Code Security Update
- OWASP Top 10:2025 · Broken Access Control
- OWASP API Security Top 10 · Broken Object Level Authorization
- OWASP Application Security Verification Standard 5.0
- Perry et al. (2023) · Do Users Write More Insecure Code with AI Assistants?
I build web apps, APIs, and internal systems with security in mind from the start.
All articles · Explore my work