Vibeleaderboard
← All Intel
Intel / article

Applying Security by Design at the Point of Execution: How Governed Security Requirements Affect the Security of AI-Generated Code

Source
arxiv.org
Author
Pedro Farinha
Date

Context

Giving a coding model explicit security requirements improved security scores in this small study, but did not establish an overall gain in working, secure software. Requirements were selected from a security knowledge base and delivered through a connection when the model generated code.

On 28 backend scenarios tested with working exploits, the share of functionally correct solutions resisting every exploit rose from 65% to 86%. That denominator matters: solutions that failed functional tests were excluded from this security comparison. The prespecified measure requiring both functionality and security did not improve significantly. Each experiment used one model and one generation per task, making the result evidence for supplying requirements at generation time, with the broader outcome still unresolved. Reported findings and limits.

Key takeaways · AI-distilled
  • Requirements came from the author's governed security-by-design knowledge base (SbD-ToE) served over an ; typical secure-code benchmarks give the task without requirements and score it with unseen security tests.
  • On DualGauge (59 Python tasks, scored by a language-), tasks passing all security tests rose from 44.1% to 78.0%, and the share of security tests passed rose from 77.4% to 93.0%.
  • BaxBench's 86% exploit-free rate roughly matched the authors' Oracle Security Reminder (85%), which they call an unrealistic upper bound, and was reached without knowledge of the tests.
  • The pre-specified joint secure-and-functional metric did not improve significantly on either benchmark: the stricter code failed functional tests that fix values the task never states.
  • Each experiment used one model and one generation per task, and the manual's completeness was not assessed. The author proposes measuring conformance with applicable requirements, not just detected weaknesses.
Terms in this piece · Glossary
  • Tool — An operation that the software around a model makes available for the model to request, with a name, expected inputs and a kind of result.
  • MCP server — A program that provides tools, resources and prompt templates to an MCP client; it may run on the same machine as the application or remotely.
  • Model judge — A model asked to read an output and say whether it meets a criterion.
  • Benchmark — A fixed set of tasks with a stated way of scoring them, used to compare models or setups.
Recommended reads
Comments

Checking sign-in…

Loading comments…