SecDrift: Measuring Sector-Conditioned Security Drift in AI-Generated Code
- URL: http://arxiv.org/abs/2607.25225v1
- Date: Tue, 28 Jul 2026 02:57:19 GMT
- Title: SecDrift: Measuring Sector-Conditioned Security Drift in AI-Generated Code
- Abstract summary: Security drift is the change in static-analysis vulnerability rates when prompts are conditioned on industry contexts.<n>We present SecDrift, a benchmark measuring sector-conditioned security drift.<n>We release the framework, prompts, generated code, findings, human-validation verdicts, and analysis scripts.
- Score: 0.0
- License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/
- Abstract: LLMs are increasingly used for code generation in critical infrastructure, yet the security effect of domain-specific prompting is understudied. We present SecDrift, a benchmark measuring sector-conditioned security drift: the change in static-analysis vulnerability rates when prompts are conditioned on industry contexts versus neutral baselines. We evaluate 7 LLMs (6 producing analyzable code) across 8 CISA critical infrastructure sectors and 9 CWE categories with 5 replicates (5,355 evaluations), using a 5-dimension transformation with a matched-baseline condition that holds the task fixed while substituting only domain terminology. Industry prompts naively appear more secure (14.0% vs. 11.4%, -2.7pp), but the gap is not statistically significant (Fisher's exact p = 0.24, Cohen's h = -0.08) and is a composition artifact of two CWE categories: excluding CWE-502 and CWE-22 eliminates and slightly reverses it (+0.4pp, p = 1.00). A mixed-effects logistic regression confirms sector identity is not a moderator and localizes the only detectable condition effect to those two vulnerability types. 0 of 8 sectors show drift distinguishable from baseline, corrected or uncorrected (|h| < 0.15). A placebo on two non-CISA sectors (e-commerce, online education) reproduces the CISA industry rate almost exactly (10.5% vs. 11.4%, p = 0.63): the small pooled pattern reflects generic industry-framing specificity, not critical-infrastructure identity. In contrast, model selection has a large and consistent effect: among full-output models vulnerability rates range from 11.6% to 16.1%, and these differences persist across conditions. Model choice, not prompt framing, is the more reliable security lever. We release the framework, prompts, generated code, findings, human-validation verdicts, and analysis scripts.
Related papers
- EvoSafeHarness: Evolving Model- and Domain-Specific Harnesses for Securing Agents [74.54929751174289]
EvoSafeHarness is a safety-specific optimization framework that synthesizes a deployable harness for a frozen model in a target domain.<n>It reduces average attack success rate from 45.6% to 10.0% at a 3.3-point utility cost.<n>It also achieves the best score on Agent-SafetyBench for every victim.
arXiv Detail & Related papers (2026-09-05T05:56:41Z) - Robust and Personalized Federated Learning for Aircraft-Engine Prognostics under Benign and Adversarial Client Heterogeneity [0.4776836972093627]
Federated learning (FL) enables aircraft fleet operators to jointly train remaining-usefullife (RUL) models from engine sensor telemetry without sharing raw data.<n>This study examines two complementary challenges: benign heterogeneity, where honest operators observe different operating conditions and fault modes, and adversarial heterogeneity, where compromised operators submit poisoned updates.<n>We evaluate five attacks against four aggregation methods, including a physically motivated sensor-value backdoor designed to mask engine degradation.
arXiv Detail & Related papers (2026-08-04T06:54:29Z) - Beyond Resilience: Antifragility in Critical Infrastructure Cybersecurity [0.0]
This paper develops a Theory of Antifragility (AFT) for critical infrastructure cybersecurity.<n> OTadja sectors show significantly higher shares of disruptive mixed events than comparison sectors.<n>Findings establish two prerequisites for future antifragility testing: differentiated burden and adaptive observability.
arXiv Detail & Related papers (2026-07-31T15:42:18Z) - Beyond Refusal: A Same-Lineage Study of Aligned and Abliterated LLMs for Vulnerability Analysis [31.25049774595995]
We study whether refusal behavior remains intact (Aligned) or has been refusalablated (Abliterated) within same-lineage models.<n>We evaluate Aligned and Abliterated states on vulnerability detection, CWE attribution, vulnerableline localization, root-cause localization, and executable patch validation.
arXiv Detail & Related papers (2026-07-07T05:04:48Z) - From CVE to CWE: Syscall-Based HIDS Generalisation [41.99844472131922]
In operational settings, defenders need to recognise new exploits of an already known type of weakness.<n>We empirically examine whether a one-class anomaly detector trained on the normal behaviour of a set of CVEs that share a Common Weaknession (CWE) class generalises to a different, unseen CVE inside the same class.
arXiv Detail & Related papers (2026-06-21T16:34:39Z) - Unpredictable Safety: Domain-Dependent Compliance and the Transparency Gap in Open-Weight LLMs [0.0]
We study domain-dependent safety behavior in open-weight LLMs.<n>We find compliance rates vary from 14.7% (human trafficking) to 85.7% (surveillance design)<n>Results show current safety mechanisms lack the transparency and consistency required for trustworthy AI deployment.
arXiv Detail & Related papers (2026-06-01T22:41:32Z) - Error-Decomposed Class-Conditional Fusion for Statistically Guaranteed Hard-Category Robust Perception [3.4563147061792527]
This paper formally defines this pervasive vulnerability as the Hard-Category Reliability Problem (HCRP)<n>We propose Error-Decomposed Class-Conditional Fusion (ED-CCF), an elegant decision-layer inference framework.
arXiv Detail & Related papers (2026-05-17T18:39:05Z) - Distributional Energy-Based Models for Uncertainty-Aware Structured LLM Reasoning [40.342912574072024]
Large Language Models produce structured outputs such as travel plans or code solutions.<n>Individual reasoning steps may appear correct while the output as a whole violates budgets, fails test cases, or contradicts earlier deductions.<n>We propose a learned quality scorer with deterministic analytical constraint penalties for verifying structured LLM outputs.
arXiv Detail & Related papers (2026-05-15T17:08:27Z) - SCAFFOLD-CEGIS: Preventing Latent Security Degradation in LLM-Driven Iterative Code Refinement [12.69450437027072]
This paper reveals the iterative refinement paradox: specification drift during multi-objective optimization causes security to degrade gradually over successive iterations.<n>We propose the SCAFFOLD-CEGIS framework that transforms security constraints from implicit prompts into explicit verifiable constraints.
arXiv Detail & Related papers (2026-03-09T15:54:18Z) - From Black Box to Glass Box: Cross-Model ASR Disagreement to Prioto Review in Ambient AI Scribe Documentation [43.148402136307716]
Cross-model disagreement among heterogeneous ASR systems can act as a reference-free uncertainty signal.<n>We transcribed 50 publicly available medical audio clips with eight ASR systems spanning commercial APIs and open-source engines.<n>Low-agreement regions were enriched for content disagreements, with the content fraction increasing from 53.9% to 73.9% across quintiles of high-risk mass.
arXiv Detail & Related papers (2026-03-02T13:02:13Z) - Eigen-1: Adaptive Multi-Agent Refinement with Monitor-Based RAG for Scientific Reasoning [53.45095336430027]
We develop a unified framework that combines implicit retrieval and structured collaboration.<n>On Humanity's Last Exam (HLE) Bio/Chem Gold, our framework achieves 48.3% accuracy.<n>Results on SuperGPQA and TRQA confirm robustness across domains.
arXiv Detail & Related papers (2025-09-25T14:05:55Z) - VISION: Robust and Interpretable Code Vulnerability Detection Leveraging Counterfactual Augmentation [6.576811224645293]
Graph Neural Networks (GNNs) can learn structural and logical code relationships in a data-driven manner.<n>GNNs often learn'spurious' correlations from superficial code similarities.<n>We propose a unified framework for robust and interpretable vulnerability detection, called VISION.
arXiv Detail & Related papers (2025-08-26T11:20:39Z) - SafetyAnalyst: Interpretable, Transparent, and Steerable Safety Moderation for AI Behavior [56.10557932893919]
We present SafetyAnalyst, a novel AI safety moderation framework.<n>Given an AI behavior, SafetyAnalyst uses chain-of-thought reasoning to analyze its potential consequences.<n>It aggregates effects into a harmfulness score using 28 fully interpretable weight parameters.
arXiv Detail & Related papers (2024-10-22T03:38:37Z) - ScionFL: Efficient and Robust Secure Quantized Aggregation [36.668162197302365]
We introduce ScionFL, the first secure aggregation framework for federated learning.
It operates efficiently on quantized inputs and simultaneously provides robustness against malicious clients.
We show that with no overhead for clients and moderate overhead for the server, we obtain comparable accuracy for standard FL benchmarks.
arXiv Detail & Related papers (2022-10-13T21:46:55Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.