The Effect of Security-Focused Prompts on Reported Findings: A Controlled Experiment on 400 AI-Generated Web Applications
Abstract
Agentic coding tools turn a specification into a running web application, so their defaults for authentication, sessions, input validation, and dependencies become its security posture. This study asks whether appending a fixed block of OWASP-aligned security requirements to the prompt changes what such tools produce, by how much, and with what side effects. Each of 100 frozen specifications was realized four times: two agentic tools (Claude Code, Codex CLI) crossed with two prompts sharing a byte-identical functional core, without (A) and with (B) the security block. A fixed static and dynamic pipeline scanned the 400 applications, yielding 6,721 triaged findings, analyzed with count and logistic mixed models and with a dependency diff. The block cut findings per application by a third (incidence-rate ratio 0.65, 95% CI 0.60-0.71), equally through both tools, and roughly doubled the declared dependency surface, so variant-B applications carried more high-severity dependency advisories. Adjusted for that surface the advisory rate did not rise (flat per application, 18% lower in aggregate), while high-severity findings in first-party source fell by nearly half. Security-focused prompting is therefore an inexpensive and portable improvement, but it enlarges the dependency surface that has to be audited against it, an effect of library selection rather than of the security requirements themselves.
Create a lesson
Related papers
Feedback-Driven Prompt Refinement for Educational AI: Affective Trajectory Estimation and Bloom's Taxonomy Classification
Shared title terminology · Josh Dean, Karan Patel, Gaurangi Raul et al.
Integrating Generative Artificial Intelligence with Learning Style Models: Opportunities, Challenges, and Future Directions
Shared title terminology · Malithi Nawarathne, Prasanna Haddela, Nuwan Kodagoda
Beyond Self-Critique: Epistemic Convergence Control for Multi-Agent Research Verification
Shared title terminology · Chrisantus Eze
Trained on Harm, Still Refusing: A Training-Time Defense for Code Generation
Shared title terminology · Miaoqing Tian, Ruohan Li, Qian Lu et al.
From Manufacturing Event Logs to Simulation: Enabling SMEs with Agentic AI for SimPy Simulation Generation
Shared title terminology · Richard Reider, Lina Döring, Sebastian Lang et al.
Evidence sufficiency assessment enables cost-effective review allocation in on-premise clinical AI agents
Shared title terminology · Yiwen Qiu, Che Sun, Shu Shen et al.