Spec-Laundering
Revathi Prasad · Team Spec-Laundering
Submitted to The Secure Program Synthesis Hackathon. Sprint projects are early-stage work by participants, not Apart Research publications.
A Benchmark and Severity Measure for Adversarial Specification Cheating in Dafny
Reviews
The core idea, “spec laundering,” is a useful and memorable framing for an important secure program synthesis failure mode: a verifier can certify code against a specification that has been deliberately weakened to admit a backdoored implementation. That threat model feels especially relevant as LLMs increasingly generate both code and specifications.
The strongest parts of the work are the clear threat model, the concrete Dafny attack catalog, the AWS Digest case study, and the honesty about limitations. The project does not overstate the detector as a finished classifier. It reports threshold tradeoffs, false positives, construction overfit, and the small adversarial sample size. The structural argument about why postcondition mutation testing cannot detect axiom-based cheating is also a valuable contribution, because it explains why an orthogonal scan for assume, {:axiom}, and related constructs is needed.
The detector itself is promising but still early. The six-attack benchmark is small, and five of the attacks were designed around patterns the detector explicitly checks. The non-adversarial DafnyBench comparison is helpful, but the overlap between adversarial and non-adversarial severity scores shows that calibration is not solved yet. The false positives on honest single-clause equality specs are also important, because that pattern is common and could create review fatigue if used directly in practice.
For the next version, I would focus on three things. First, expand the adversarial benchmark with attacks designed by someone who knows the detector but is trying to evade it. Second, build a labeled calibration set of Dafny specifications so the severity score can be tuned against real tight/loose/ambiguous cases. Third, run the detector on a larger real Dafny codebase, ideally the full AWS Dafny library, and manually inspect the flags.
Overall, this is a well-presented, security-relevant project with a clear theory of impact. It is not yet a production-ready detector, but it names a real failure mode, builds a reproducible benchmark, and gives a concrete starting point for future work on adversarial specification validation.
Read full reviewShow less
Good work. I like this angle of mutating specs and detecting these mutations. This work could be a bit more grounded in concrete attack scenarios.
Cite this project
@misc{prasad2026speclaundering,
title = {{Spec-Laundering}},
author = {Revathi Prasad},
year = {2026},
month = may,
note = {Submitted to The Secure Program Synthesis Hackathon, an Apart Research Sprint},
howpublished = {\url{https://apartresearch.com/sprints/projects/speclaundering-u95l}},
url = {https://apartresearch.com/sprints/projects/speclaundering-u95l}
}More from The Secure Program Synthesis Hackathon
- View project: Vibe-Coding Specs: Eliciting, Editing, and Verifying Specifications for AI Coding Agents
Vibe-Coding Specs: Eliciting, Editing, and Verifying Specifications for AI Coding Agents
Lida Safety
Specifications for real systems do not exist as one-shot artifacts: the user's intent emerges as they discover edge cases, rewrite drafts, and react to failing tests. We present an iterative pipeline that takes this …
- View project: AgentSpecGap
AgentSpecGap
solo-team
This prototype extracts rules from system prompts, tool descriptions, and runtime config. Rules are classified into one of interface validation, authorization check, workflow ordering validation, runtime validation, …
- View project: SpecGap Arena
SpecGap Arena
Obligation Cartographers
SpecGap Arena is a benchmark and framework that exposes how incomplete specifications let plausible but incorrect code pass public tests. It synthesizes missing semantic obligations (security boundaries, invariants, …