Adaptive Trust-Oriented Runtime Security for AI-Generated Shell Scripts

The widespread adoption of AI-assisted code generation tools has dramatically increased the volume of shell scripts deployed in production environments, often with insufficient security review. This paper presents ACTE (Adaptive Context-aware Trust Engine), a runtime security framework that combines static lexical analysis with dynamic behavioral profiling and adaptive trust scoring to detect malicious or unsafe AI-generated shell scripts. We introduce a formal trust model based on a multi-dimensional risk vector, and evaluate ACTE on a dataset of 420 shell scripts (210 benign, 210 malicious) generated by large language models. Experimental results demonstrate F1-score of 0.915, ROC-AUC of 0.976, mean inference latency of ~0.51 ms per script, and a 93.8% reduction in false positives compared to ShellCheck. Ablation studies confirm that the adaptive trust weighting mechanism is the primary contributor to detection performance. The prototype implementation and dataset are publicly available at https://github.com/yakden/acte-secure-ai-shell-scripts under MIT License.

Authors

Institutions

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-06-30
DOI
https://doi.org/10.5281/zenodo.21072887
Primary Topic
Security and Verification in Computing
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Adaptive Trust-Oriented Runtime Security for AI-Generated Shell Scripts

Denys Yakymov
Zenodo (CERN European Organization for Nuclear Research)
Security and Verification in Computing
article

Adaptive Trust-Oriented Runtime Security for AI-Generated Shell Scripts

Denys Yakymov
article en

Abstract

The widespread adoption of AI-assisted code generation tools has dramatically increased the volume of shell scripts deployed in production environments, often with insufficient security review. This paper presents ACTE (Adaptive Context-aware Trust Engine), a runtime security framework that combines static lexical analysis with dynamic behavioral profiling and adaptive trust scoring to detect malicious or unsafe AI-generated shell scripts. We introduce a formal trust model based on a multi-dimensional risk vector, and evaluate ACTE on a dataset of 420 shell scripts (210 benign, 210 malicious) generated by large language models. Experimental results demonstrate F1-score of 0.915, ROC-AUC of 0.976, mean inference latency of ~0.51 ms per script, and a 93.8% reduction in false positives compared to ShellCheck. Ablation studies confirm that the adaptive trust weighting mechanism is the primary contributor to detection performance. The prototype implementation and dataset are publicly available at https://github.com/yakden/acte-secure-ai-shell-scripts under MIT License.

Zenodo (CERN European Organization for Nuclear Research)
Kielce University of Technology (PL)
Peace, Justice and strong institutions
Openalex Percentile: Top 8%
Security and Verification in Computing
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.