Demo: SGCode: A Flexible Prompt-Optimizing System for Secure Generation of Code

Khiem Ton, Nhi Nguyen, Mahmoud Nazzal, Abdallah Khreishah, Cristian Borcea +4 more
9/11/2024
cs.CRcs.AI

No confident code implementation found for this paper.

Abstract

This paper introduces SGCode, a flexible prompt-optimizing system to generate secure code with large language models (LLMs). SGCode integrates recent prompt-optimization approaches with LLMs in a unified system accessible through front-end and back-end APIs, enabling users to 1) generate secure code, which is free of vulnerabilities, 2) review and share security analysis, and 3) easily switch from one prompt optimization approach to another, while providing insights on model and system performance. We populated SGCode on an AWS server with PromSec, an approach that optimizes prompts by combining an LLM and security tools with a lightweight generative adversarial graph neural network to detect and fix security vulnerabilities in the generated code. Extensive experiments show that SGCode is practical as a public tool to gain insights into the trade-offs between model utility, secure code generation, and system cost. SGCode has only a marginal cost compared with prompting LLMs. SGCode is available at: https://sgcode.codes/.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{ton2024demo,
  title  = {Demo: SGCode: A Flexible Prompt-Optimizing System for Secure Generation of Code},
  author = {Khiem Ton and Nhi Nguyen and Mahmoud Nazzal and Abdallah Khreishah and Cristian Borcea and NhatHai Phan and Ruoming Jin and Issa Khalil and Yelong Shen},
  year   = {2024},
  eprint = {2409.07368},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2409.07368v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2409.07368.svg)](https://codeofpaper.com/paper/2409.07368)

Discussion