aiqbench analysis
This research demonstrates that current LLMs fail to generate secure authentication code by default and cannot rely on single-shot prompts for compliance with standards like NIST SP 800-63B. The study concludes that achieving a robust security architecture requires iterative reprompting strategies that force models into continuous self-auditing loops rather than static prompt engineering. Consequently, enterprise deployments must integrate these verification pipelines to mitigate risks in brute-force resistance and session management inherent to AI-generated software.
The Illusion of Secure LLM Code: Closing the Security Gap via Iterative Reprompting
arXiv:2607.23710v1 Announce Type: cross Abstract: Large Language Models (LLMs) are increasingly integrated into software development workflows, yet their ability to autonomously generate secure authentication code remains uncertain. This paper evaluates the security architecture of authentication systems generated by five prominent AI coding assistants through a bi-modal assessment framework combining static code analysis and dynamic penetration testing, mapped to NIST SP 800-63B guidelines. The study examines model behavior across four prompting strategies Basic, Secure, NIST-Based, and Reprompting to reflect varying levels of developer guidance. Empirical results demonstrate that code generated from functional or generically secure prompts consistently omits critical protections, particularly concerning brute-force resistance, session management, and robust password handling. While providing explicit, single-shot NIST context significantly improves compliance, the findings reveal that this remains structurally inadequate. Instead, iterative Reprompting: forcing models into a contextual self-auditing loop is strictly required to achieve a comprehensive, defense-in-depth security architecture. Ultimately, this study proves that current AI coding assistants do not produce secure-by-default applications, dictating that enterprise deployments must transition from single-shot prompt engineering to continuous, standards-driven verification pipelines.
Abstract:Large Language Models (LLMs) are increasingly integrated into software development workflows, yet their ability to autonomously generate secure authentication code remains uncertain. This paper evaluates the security architecture of authentication systems generated by five prominent AI coding assistants through a bi-modal assessment framework combining static code analysis and dynamic penetration testing, mapped to NIST SP 800-63B guidelines. The study examines model behavior across four prompting strategies Basic, Secure, NIST-Based, and Reprompting to reflect varying levels of developer guidance. Empirical results demonstrate that code generated from functional or generically secure prompts consistently omits critical protections, particularly concerning brute-force resistance, session management, and robust password handling. While providing explicit, single-shot NIST context significantly improves compliance, the findings reveal that this remains structurally inadequate. Instead, iterative Reprompting: forcing models into a contextual self-auditing loop is strictly required to achieve a comprehensive, defense-in-depth security architecture. Ultimately, this study proves that current AI coding assistants do not produce secure-by-default applications, dictating that enterprise deployments must transition from single-shot prompt engineering to continuous, standards-driven verification pipelines.
Cryptography and Security (cs.CR); Artificial Intelligence (cs.AI); Human-Computer Interaction (cs.HC); Machine Learning (cs.LG); Multiagent Systems (cs.MA)
arXiv:2607.23710 [cs.CR]
(or arXiv:2607.23710v1 [cs.CR] for this version)
https://doi.org/10.48550/arXiv.2607.23710 arXiv-issued DOI via DataCite (pending registration)
Full text under the publisher's open licence · 201 words
Related coverage

Frontier Risk Report (February to March 2026)
METR · May 19, 2026

Frontier AI Risk Report (February–March 2026)
METR · May 19, 2026

Informe de riesgos de la IA de frontera (febrero–marzo de 2026)
METR · May 19, 2026

[AINews] Reality Checks on AI News (Yegge shuts down Gas Town, Databricks’ +60% Astra cost)
Latent Space · Sep 17, 2026