Compared to What? A Human-Anchored Security Benchmark for LLM-Generated Infrastructure-as-Code
Abstract
Large language models increasingly author Infrastructure-as-Code (IaC), where one insecure default is provisioned straight into production. Prior evaluations report vulnerability counts for models only, and so cannot say whether models are worse than the engineers they assist. We present GenIaC-SecBench: 100 deployment scenarios across 12 model configurations from six vendors, open and closed weights, yielding 1,196 artifacts scanned by three policy engines (Checkov, Trivy, KICS) at complete coverage. Crucially we scan 634 human-authored IaC templates with the identical toolchain, giving the first size-matched human security baseline for this task. Vulnerability density is strongly inverse to artifact size (Spearman , ), so unmatched comparisons measure size, not security. Size-matched, every configuration exceeds the human baseline at to , and the gap widens as tasks get simpler ( at one resource, at twenty or more). A majority of scenarios prescribe a security state rather than specifying function alone, so we stratify by prompt class: pooled the gap is , and excluding every scenario that explicitly requests an insecure configuration still leaves all configurations above baseline ( to ). The corpus cannot isolate unprompted default posture, and we say so. Decomposing "reasoning" into standard generation, prompted chain-of-thought, and vendor extended-thinking APIs, extended thinking beats prompted CoT (, ) while prompted CoT alone is indistinguishable from standard (, n.s.); it consumes under of the output budget, bounding the effect. Two negative results: more deployable models are not more vulnerable (, ), and complete-case Friedman is uncomputable here, motivating Skillings-Mack. All code and data are released.