Engineering-Focused Evaluation of Open-Source LLMs for Coding and Security

    This article argues that coding models should be judged on whether they can complete real engineering tasks in a repository, not on whether they can write isolated code. It covers three sources of capability differences (task decomposition, tool use, and long-task consistency), a six-step workflow for observing a model's closed-loop behavior, guidance on automated fixing and terminal operations, a code security review example, and a reusable evaluation protocol that teams can run on their own repositories. The article does not report results for specific models.

    Coding models are now judged less on whether they can produce code and more on whether they can finish an engineering task. The standard is concrete. A model should be able to read a repository, find the places that need changes, run the tests, fix problems based on the errors, and state the scope of its changes. This article does not give results for specific models. Instead, it provides a verification method that readers can run directly in their own repositories.

    1. Where Capability Gains Come From

    Parameter scale remains a basic requirement, but it explains delivery ability only partly. A model can generate syntactically correct code and still ignore project conventions, break other modules, or loop without progress after a test fails.

    In real engineering work, capability differences usually appear in three areas.

    First, task decomposition. Consider adding a “coupon expiration check” to an order service. A capable model first searches for coupon-related functions and test cases, confirms that the validation logic is called by two services, and only then decides where to make the change. The acceptance criterion: every planned step maps to a real file in the repository.

    Second, tool use. The model must call search, file-read, test-run, and log-view tools correctly, and adjust its plan based on what the tools return. The acceptance criterion: tool call arguments are correct, and conclusions are backed by tool output rather than inferred from memory.

    Third, long-task consistency. Complex tasks can run for tens of minutes and accumulate a large amount of context. In sessions with more than twenty turns, the model should still follow constraints set at the start, such as “do not change public interface signatures.” The acceptance criterion: the final patch does not violate the initial constraints.

    2. A Verification Workflow for Coding Ability

    Single-turn coding questions cannot show these abilities. The article recommends observing the model’s closed-loop behavior through six steps.

    1. Scan the project structure and build entry points. Input: the repository root. Tools: directory listing and build configuration reading. Acceptance: the model can state the build command and test framework. If this fails, request startup instructions from a person.
    2. Find the relevant interfaces, data structures, and call chains. Acceptance: the listed call sites match the code search results.
    3. Read existing tests and exception-handling logic. Acceptance: the model identifies which branches the existing tests cover.
    4. Identify upstream and downstream impact. Acceptance: the model can state which modules the change will affect.
    5. Design a minimal change and apply it. Acceptance: the number of changed files matches the plan, and there are no unrelated formatting changes.
    6. Run static checks and tests, and compare results before and after the change. If the checks still fail, the model should explain what is blocking it, not start a wide-ranging refactor.

    Skipping the first two steps and writing code directly often produces changes that are locally correct but break the whole system. For this reason, evaluators should check whether the model can explain the basis for each change.

    3. Automated Fixing and Terminal Operations

    The key to automated fixing is what happens after the first failure. The model should read the error message, classify it as a syntax, type, dependency, logic, or environment problem, change only what is necessary, and rerun the relevant checks. Each change should be verifiable where possible.

    Terminal operations also include identifying the operating system and runtime version, handling dependency installation failures, recording command results so that commands are not run repeatedly, and cleaning up temporary files and secrets when the task ends. Deleting or overwriting files, opening ports, and changing production configuration should all require confirmation first.

    4. Scope and Limits of “Emergent Security Capability”

    Here, “emergence” refers to a model’s ability to reason jointly across code semantics, data flow, and permission relationships. Taken alone, each factor is not dangerous. Combined, they let the model identify where an input comes from, where it flows, and under what conditions it would trigger a risky operation.

    This capability has clear limits. Model output is a lead to be verified, and a person must confirm it before it can be treated as a conclusion. The approach applies only to code the user owns and to authorized environments. This article does not discuss probing or exploiting unauthorized systems, and it does not assume that a model can carry out an attack on its own.

    5. Code Security Review Example

    Consider an avatar upload endpoint. It accepts a filename and file content and saves them under the uploads directory. The review should check five points.

    1. Whether the filename is normalized, keeping only the file name portion and removing path separators.
    2. Whether the final write path, after resolution, is still under the uploads root directory.
    3. Whether file content type is validated in addition to an extension allowlist.
    4. Whether script execution is disabled in the upload directory.
    5. Whether error responses expose the server’s absolute paths.

    After a fix, verify it with unit tests. When the input filename contains path separators, the test asserts that the endpoint returns 400 and that no file is written outside the target directory. Keep the normal avatar upload test case as well, to confirm the fix does not introduce regressions.

    False positives and false negatives carry different costs. False positives increase the review burden on developers. False negatives can leave real risks in place. Teams should record true positives, false positives, and false negatives, and have a person review all security conclusions.

    6. A Reusable Evaluation Protocol

    The following protocol can be run in a team’s own repositories.

    1. Task set: select 30 to 50 tasks from merged historical requirements. Each task includes a requirement description, the tests it must pass, and a record of manual acceptance.
    2. Environment record: save the model name, version or hash, inference parameters, available tool list, operating system, and dependency lock file version.
    3. Execution conditions: start each task from the same commit, and limit the maximum number of tool calls and the runtime.