Abstract
Vibe coding makes software prototyping more accessible, but code that satisfies a functional request can still contain exploitable weaknesses.
This study compares baseline and security-oriented prompts on ten Python tasks inspired by OWASP Top 10 and CWE categories. It evaluates GPT-OSS 20B across ten random seeds and compares GPT-OSS 20B with Gemma-3 27B in a three-seed cross-model study.
Bandit static analysis and lightweight runtime probes show that security-informed prompts can reduce vulnerability prevalence and severity, particularly for command execution and unsafe deserialization. Persistent failures in file upload and authentication demonstrate that prompting mitigates risk rather than eliminating it.
Methods
Controlled security evaluation
Two prompt conditions are evaluated across ten security-sensitive coding tasks, multiple random seeds, and two locally served language models.
Results
Security prompts help unevenly
Across ten GPT-OSS 20B seeds, the strongest change appears in command execution: vulnerability presence falls from 60% to 10%. File upload and JWT authentication remain vulnerable in every sample.
Lower prevalence does not always mean complete remediation. Security-oriented prompts reduced the severity-weighted count for unsafe deserialization from 4.6 to 1.8, while file-upload vulnerability presence stayed at 100% and email validation became less reliable in this sample.
Cross-model study
Improvements do not transfer uniformly
Under the improved prompt condition, GPT-OSS 20B produced fewer vulnerable samples than Gemma-3 27B in unpickling and secrets management, while both models remained vulnerable in SQL and file-upload tasks.
The evidence supports a layered workflow: security-aware prompts should be combined with static analysis, runtime checks, review, and verification. The study reports descriptive trends across two models and a limited task set, not a guarantee that a particular prompt or model is secure.