Pith. sign in

REVIEW 3 cited by

SecCoder: Towards Generalizable and Robust Secure Code Generation

Not yet reviewed by Pith; the record is open.

This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.

SPECIMEN: schema-true, not a live event

T0 review · schema-true

One-sentence machine reading of the paper's core claim.

pith:XXXXXXXX · record.json · timestamp

arxiv 2410.01488 v1 pith:XHJUUSGD submitted 2024-10-02 cs.PL

classification cs.PL
keywords codegenerationseccodersecuritysecuregeneralizableimprovementrobust
verification ladder T0 review T1 audit T2 compute T3 formal
0 comments
read the original abstract

After large models (LMs) have gained widespread acceptance in code-related tasks, their superior generative capacity has greatly promoted the application of the code LM. Nevertheless, the security of the generated code has raised attention to its potential damage. Existing secure code generation methods have limited generalizability to unseen test cases and poor robustness against the attacked model, leading to safety failures in code generation. In this paper, we propose a generalizable and robust secure code generation method SecCoder by using in-context learning (ICL) and the safe demonstration. The dense retriever is also used to select the most helpful demonstration to maximize the improvement of the generated code's security. Experimental results show the superior generalizability of the proposed model SecCoder compared to the current secure code generation method, achieving a significant security improvement of an average of 7.20% on unseen test cases. The results also show the better robustness of SecCoder compared to the current attacked code LM, achieving a significant security improvement of an average of 7.74%. Our analysis indicates that SecCoder enhances the security of LMs in generating code, and it is more generalizable and robust.

Discussion (0). Continue with ORCID to comment.

Forward citations

Cited by 3 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score. Full citation record

  1. Training Language Models to Generate Quality Code with Program Analysis Feedback

    cs.CL 2025-05 conditional novelty 7.0 of 10

    REAL trains LLMs with rewards from program analysis and unit tests, improving joint functionality and code quality over prior methods.

  2. GoodVibe: Security-by-Vibe for LLM-Based Code Generation

    cs.CR 2026-02 conditional novelty 6.0 of 10

    Retraining only the neurons most responsive to security judgments raises a code LLM's default safe-code rate to 87.5% on C++ (average) with about 1.9 million trainable parameters.

  3. Position: Intelligent Coding Systems Should Write Programs with Justifications

    cs.SE 2025-08 conditional novelty 4.0 of 10

    A position paper advocating that intelligent coding systems should accompany code with justified explanations that are cognitively aligned and semantically faithful.

Pith tools