Papers for

software security analysts

Papers whose findings have a practical use for this group, as judged from the abstract. Open a paper to read what it means in practice.

Static tools miss Python calls that dynamic runs reveal

When Static Reachability Says No: Checking Joern-Based Negative Verdicts for Python Against Execution

Abstract: A negative reachability verdict removes a finding from human review. We check such verdicts against execution. Our pipeline, SourceLens, maps Semgrep findings to a Python program's call graph, whose edges a query takes from the calls that Joern links in its code property graph. We ran two command-line programs from the PyCG macro-benchmark, in which the benchmark's manual call graph and Joern disagree, under coverage and recorded the calls between their functions. On these edges, 123 functions of asciinema are unreachable from the program's entry points. The project's own integration script executes 86 of them, and all our runs 113. In Sublist3r, 19 of 24 are executed. The latest Joern release gives the same verdicts. The missing calls go through values, such as classes and functions passed around, or have no call expression, as in with blocks and property reads. In asciinema, four missing edges make 50 of the 113 executed functions reachable. The manual call graphs also lack observed calls, in asciinema many of them property reads and with blocks, which the benchmark may not count as calls. A rule that turns negative verdicts into unknown recovers 62 of the 113 and 15 of the 19, mostly through dunder and private method names. It recovers 0 of the 5 security findings with a negative verdict, all in executed functions. Its selectivity cannot be measured, as only 10 and 5 negative verdicts were not executed, and under library entry-point models it degrades every negative verdict.

Thu 29 OctSoftware EngineeringCryptography and Security
The gist
Sometimes, computer tools that check if parts of a Python program can be reached miss paths that actually happen when the program runs. The authors compared a static analysis tool called Joern with real program execution and found many functions marked unreachable were actually used. This mismatch happens because some calls happen in tricky ways, like passing functions around or using special Python code structures. Their tests showed that current static methods can give wrong negatives, and fixing this is tricky.
Open → 2610.39504v1

LLM code generation gains real-time security scanning and repair

SecReason: Vulnerability Detection and In-Stream Self-Repair for LLM Code Generation

Abstract: Large language models (LLMs) may introduce security vulnerabilities into generated code, which can persist into production when verification focuses on functional correctness. Existing defenses act before, during, or after generation, but none inspects the code during generation. Security prompts and retrieved security knowledge act before any code exists, constrained decoding limits token choices but cannot guide repair, and post-hoc repair must regenerate the full response. Reasoning LLMs draft code early in their streamed chain of thought, and in this pre-delivery window the code exists only inside the reasoning stream. We present SecReason, an in-stream defense that monitors this window. Dual-track incremental scanning applies security rules, checking each statement as it is emitted and tracing dataflows across the accumulated code. When a security rule fires, SecReason interrupts generation, inserts an in-stream warning, and resumes decoding, so the model repairs the draft within the same reasoning trace without regenerating the full response. On tasks where unassisted generation introduces vulnerabilities, \system raises the share of runs delivering secure and functionally correct code from below 15\% to 72.8\%--98.1\% on \tool{CWEval} and \tool{SecCodeBench}. \system consumes fewer tokens than post-hoc repair, and when security rules misfire on secure code, it limits the functional regressions from false warnings.

Sat 10 OctCryptography and SecuritySoftware Engineering
The gist
Code generated by large language models (LLMs) can unexpectedly have security bugs that are hard to catch if we only check if code works. The authors propose SecReason, a method that watches the code as the LLM writes it, spotting security issues right when they appear. Instead of fixing problems later by rewriting everything, SecReason pauses the LLM, warns it, and lets the model fix the issue immediately in the same flow. This approach greatly improves how often the generated code is both safe and functionally correct without wasting extra resources.
Open → 2610.14453v1

Context aware method models improve Android library detection accuracy

Context-Aware Functional Modeling for Android Third-Party Library Detection

Abstract: Third-party libraries (TPLs) are widely used in Android apps, but their reuse can introduce security risks and interfere with downstream program analyses. Existing Android TPL detection approaches face two key limitations: their hand-crafted features are fragile under aggressive code transformations, and their whole-library matching strategies are ineffective when apps retain only part of a TPL. In this paper, we propose LibFan, a learning-based Android TPL detection approach based on context-aware functional modeling. It realizes this modeling through two complementary components: context-aware contrastive learning at the method level and functional partitioning at the library level. At the method level, it learns semantic representations through contrastive training while incorporating outgoing call relationships and class-level context, improving robustness to obfuscation, shrinking, and optimization. At the library level, it partitions each TPL into functionally coherent units and determines library presence using the best-matching partition, thereby accommodating partial library reuse. To evaluate LibFan, we construct a new benchmark comprising 200 apps and 46 vulnerable TPLs, with each app compiled under four transformation configurations. Under the most challenging R8 full mode, LibFan achieves F1 scores of 81.3% at the library level and 47.6% at the version level, representing relative improvements of 64.9% and 35.6% over the state of the art, respectively.

Fri 25 SeptCryptography and SecuritySoftware Engineering
The gist
Android apps often reuse pieces of code from third-party libraries, but this can cause security problems and make analysis harder. The authors made a tool called LibFan that better detects these libraries, even when parts are changed or only some parts are used. LibFan learns about how functions relate to each other and breaks libraries into smaller meaningful parts to identify them more accurately. Their tests showed that LibFan outperforms existing methods, especially on apps that have been heavily modified.
Open → 2609.31409v1

Test guided repair improves accuracy of decompiled C programs

Recompilation Is Not Enough: Test-Guided Decompiled-C Repair

Abstract: Decompiled C often becomes recompilable only after repair, but recompilation alone does not establish test-observed behavior. A recompiled command-line binary can still parse options incorrectly, print different bytes, or return a different exit status. We present a few-step workflow for repairing decompiled C using compiler feedback and related official tests. Compiler and linker diagnostics first guide build repair. Once the repaired C recompiles into a binary, smoke checks and related official tests expose behavioral discrepancies for semantic repair. In a preliminary static-enriched evaluation on 104 Coreutils 9.5 binaries with available decompiler exports and deterministic exact-output smoke comparisons, 91 binaries (87.5%) recompile and pass the test gate; 9 do not recompile within the repair budget, and 4 recompile but still fail the test gate. The result suggests that test-gate feedback can make LLM-assisted repair of decompiled C more auditable than compile-only recovery.

Mon 7 SeptSoftware EngineeringArtificial Intelligence
The gist
When C programs are decompiled back into code, simply fixing them so they compile again is not enough to guarantee they behave the same as before. The authors show a step-by-step way to fix these programs by using feedback from compilers and running tests to catch any differences in behavior. Their method was tested on 104 common utility programs, where most were successfully repaired to run correctly and pass tests. This approach helps ensure repaired programs not only compile but work as originally intended.
Open → 2609.07201v1