AIDB Daily Papers
SecureForge:プロンプト最適化でLLM生成コードの脆弱性を発見・防止
※ 日本語タイトル・ポイントはAIによる自動生成です。正確な内容は原論文をご確認ください。
ポイント
- LLMはコードを大量生成するが、意図せずセキュリティ脆弱性を混入させる問題があった。
- SecureForgeは、脆弱性を生むプロンプトを特定・増幅し、安全なプロンプトへと最適化する。
- この手法により、LLM生成コードの脆弱性を最大48%削減し、テスト性能も維持することに成功した。
Abstract
LLM coding agents now generate code at an unprecedented scale, yet LLM-generated code introduces cybersecurity vulnerabilities into codebases without human involvement. Even when frontier models are explicitly asked to write secure production code with relevant weaknesses to avoid in context, we find that they still produce verifiable vulnerabilities on average 23% of the time across a corpus of 250 benign coding prompts. We introduce SecureForge, an automated pipeline that both audits security risks of frontier models and produces auditing-informed secure system prompts that reduce output security vulnerabilities while maintaining unit test performance. SecureForge first identifies benign prompts that produce statically detectable vulnerabilities, and then amplifies them into a large synthetic prompt corpus of diverse scenarios using a Markovian sampling technique to jointly maintain error rates and prompt diversity. This corpus is then used to iteratively optimize the system prompts to reduce output security vulnerabilities. On frontier models, SecureForge yields a statistically significant Pareto improvement in both unit test success and output security, with output vulnerabilities reduced by up to 48%. The resulting system prompts transfer zero-shot to in-the-wild coding agent prompts, without any exposure to real user prompt distributions during optimization.
Paper AI Chat
この論文のPDF全文を対象にAIに質問できます。
質問の例: