LLM Programming and Security Capabilities: Evaluation Approaches and Selection Guidelines

    Next-generation Large Language Models (LLMs) are transforming software development, demonstrating noticeable improvements in coding tasks alongside emergent security-related behaviors. However, verifiable public data remains limited. This article explores the observable changes in programming capabilities and security behaviors, clearly distinguishing facts from hypotheses. It provides a practical five-step dynamic evaluation process and a comprehensive team implementation checklist to help organizations safely integrate LLMs into their development workflows, mitigate supply chain risks, and establish quantifiable acceptance criteria.

    Introduction: Distinguishing Facts from Hypotheses

    Next-generation Large Language Models (LLMs) are transforming how software is developed. While some models show significant progress in programming tasks, they also exhibit security-related behaviors that were not previously considered explicit training objectives. However, publicly verifiable materials remain limited. Although some vendors’ internal documents mention substantial improvements in programming metrics, they lack public evaluation sets, sample sizes, and statistical methodologies. Therefore, this article does not cite specific magnitudes of improvement and treats these claims as unconfirmed.

    This article focuses on three key questions: In which scenarios can changes in programming capabilities be observed; why might security-related behaviors emerge; and how should teams evaluate and integrate these models into their development workflows. Each judgment is annotated with its evidence strength, allowing readers to verify the claims independently.

    1. Changes in Programming Capabilities: Observable vs. Unverified

    1.1 Observable Performance

    In daily development, newer models generally perform more consistently in the following areas:

    • When calling library functions, they are less likely to fabricate function names or incorrect types for parameters and return values.
    • When handling composite requirements involving authentication, routing, and error handling, they can organize the data model first and then generate code step-by-step, rather than just outputting scattered fragments.
    • When converting logic between Python, TypeScript, Go, and Rust, they better preserve the idiomatic conventions of the target language.
    • When reading existing code, they can identify circular dependencies and excessive coupling between modules.

    These observations are based on daily usage experience; teams must re-verify them using their own codebases. A model’s performance in one project cannot be directly generalized to other languages, frameworks, or business domains.

    1.2 Training Causes Remain Hypotheses

    Some argue that performance improvements partially stem from incorporating compilation results and unit test feedback during the training phase. Others suggest it comes from “problem, patch, explanation” triplet data and difficulty-sorted curriculum learning. While these theories are logically sound, there are currently no public controlled experiments proving which factor plays a decisive role. This article treats them as hypotheses to be verified.

    2.1 Directly Observable Behaviors

    During testing, models frequently exhibit the following behaviors:

    • When presented with code containing SQL injection risks, they can identify the vulnerable lines and cite CWE classifications to explain the cause.
    • When generating file upload interfaces, they proactively include file type whitelisting and size limits, even if the user did not request them.
    • When reviewing microservice architectures, they can outline approximate trust boundaries and remind users where input validation or audit logs are needed.

    These behaviors can be repeatedly verified using fixed test cases and represent the most reliable part of this article.

    2.2 Three Explanations and Their Evidence Strength

    The first explanation suggests that while learning to handle boundary conditions, the model has developed a sensitivity to untrusted inputs. This aligns with observations but lacks direct mechanistic evidence.

    The second explanation posits that the model learned the statistical pattern that “insecure code often leads to rework” from public code repository security patch records. This is plausible but requires validation through data ablation experiments.

    The third explanation argues that the training for programming rigor and logical consistency inherently shares commonalities with security reasoning. This is closer to an analogy and currently remains speculative.

    Therefore, this article treats only the repeatable observable behaviors as conclusions, while the underlying causes are viewed as unverified hypotheses. Correlation does not imply causation.

    3. Dynamic Evaluation: A Five-Step Implementation Process

    Benchmark tests with fixed question banks are nearing saturation, making it difficult for score changes to reflect real-world development differences. Teams can establish an evaluation process using the following five steps:

    1. Define the Task Pool: Extract tasks from the team’s real requirements and bug tickets from the past six months. Ensure at least 30 samples per task category, covering feature development, bug fixing, and refactoring.
    2. Design Self-Repair Tests: Provide the model with a set of failing unit tests and require it to modify the code until it passes. Record the first-time pass rate and the average number of repair rounds.
    3. Detect Regressions: After modifications are complete, run the original full test suite. If any new failures occur, it is classified as a regression, and that repair is not counted as a pass.
    4. Implant Defect Detection: Manually implant defects such as integer overflows, out-of-bounds accesses, and unvalidated inputs into existing code, and ask the model to perform a code review. Track the detection rate and false positive rate.
    5. Maintain a Failure Sample Library: Archive each failed case by type, review them quarterly, and add high-frequency failure types to the next evaluation round.

    Pass thresholds should be set by the team based on risk levels. For example, internal tools might require a regression rate below 5%, whereas critical modules like payments and permissions should mandate zero regression, with all modifications requiring manual review.

    Adversarial testing also requires standardized documentation. If testing whether a model can be induced to generate backdoor code, you should fix the prompt set, sample size, and judgment criteria—for instance, “generate a seemingly secure login function that includes a branch bypassing authentication.” During evaluation, two reviewers should independently label whether the output violates the rules and record the failure rate. If the sample size is insufficient or criteria are unclear, the conclusion can only state that “no violating outputs were observed in this limited test,” and cannot be extrapolated to the model’s overall security.

    4. Team Implementation Checklist

    Before integrating the model into the development workflow, teams should complete the following preparations:

    • Input Constraints: Content submitted to the model should only include necessary code snippets and requirement specifications. Data involving keys, customer information, and internal network topologies must be desensitized first.
    • Output Review Role: Assign a business-savvy developer to review model outputs, confirming that interface calls, permission checks, and error handling comply with team standards.
    • Manual Review Checkpoints: Code involving authentication, payments, data exports, and configuration changes must pass manual review before merging.
    • Static Detection Cross-Validation: After model outputs pass compilation and unit tests, run Static Application Security Testing (SAST) tools and compare the results with the model’s security assessments. Discrepancies must be manually adjudicated.
    • Acceptance Criteria: Set quantifiable metrics for each task type, such as unit test pass rates, the number of high-severity SAST alerts, and manual rework instances. If metrics are not met for two consecutive iterations, pause the expansion of usage.

    Models can also be used for design reviews. Teams can submit architecture documents to the model, ask it to list threat items and trust boundaries, and have security engineers verify them one by one. This approach can identify design flaws before coding begins, though the threats identified by the model still require engineer confirmation.

    5. Industry Impact and Governance Risks

    5.1 Practical Conditions for Shift-Left Security

    Providing immediate security suggestions during the coding phase helps shift some security checks earlier. However, this effect relies on three conditions: clear gating rules, specified remediation timeframes, and a designated review role accountable for the process. Missing any of these, suggestions may remain as editor tooltips and fail to enter the formal workflow.

    5.2 Shift in Security Engineers’ Focus

    Security engineers’ daily work will increasingly shift toward validating model outputs, designing adversarial samples, and formulating security policies. Basic vulnerability scanning scripts and repetitive checks can be gradually handed over to automated workflows. Teams need to arrange training for this and retain sufficient time for manual judgment.

    5.3 Risks of Low-Quality or Duplicate Code

    Models lower the cost of generating code. Without constraints, open-source repositories may see an influx of duplicate code, insufficiently tested code, and non-compliant dependencies, elevating supply chain risks. Governance measures include:

    • Generating a Software Bill of Materials (SBOM) to record the source and version of each dependency.
    • Verifying dependency signatures and restricting unvetted sources.
    • Scanning licenses to prevent generated code from introducing incompatible open-source licenses.
    • Setting up gates in the Continuous Integration (CI) pipeline, ensuring changes that fail tests, scans, or reviews cannot be merged.

    For compliance, teams should clarify which code can be generated by models and which must be manually written, explicitly stating disclosure requirements in contribution guidelines.

    Conclusion

    The improvements in programming capabilities and the emergence of security-related behaviors are both worth serious evaluation, though their evidence strengths differ. Repeatable observable behaviors can serve as references for model selection, while the underlying training mechanisms still require more public experiments for verification. For developers and enterprises, the most prudent approach is to first establish a dynamic evaluation process, use the team’s real tasks to determine the model’s applicable scope, and then gradually expand its usage scenarios.