
arthurpanhku/dvalincode
Developer toolsScanners find. Agents fix. Dvalin decides whether the fix is real.
Overview
Scanners find. Agents fix. Dvalin decides whether the fix is real.
README
English · 中文 · dvalincode.dev
Scanners find. Agents fix. Dvalin decides whether the fix is real.
The open-source, vendor-neutral referee for security fixes.Every verdict is reached on your machine, and stays there.
Your coding agent says it fixed the vulnerability. Dvalin checks. It re-scans with the scanners your CI gate already runs, runs your project’s own tests itself, and reads the exit codes. No model has a say in the verdict, least of all the one that wrote the fix. You get a Verified Fix Record: a small JSON file anyone can re-check offline.
npx dvalincode security scan . # 30 seconds: no install, no account, no API key
The loop it ends
A scanner blocks your pull request. You hand the finding to a coding agent. Its patch goes back to CI, and the scanner blocks it again: the finding is still there, the patch added a new one, or the agent silenced the scanner instead of fixing the code. Someone relays scanner output and rebases by hand, round after round.
Dvalin takes the referee’s seat in that loop. It tells the fixer exactly what is still wrong, judges every round with the yardstick CI uses, and stops only when the fix holds up.
Where Dvalin sits
| Finds issues | Writes the fix | Decides the fix is real | |
|---|---|---|---|
| Scanners: Semgrep, Snyk, CodeQL, Trivy, OSV-Scanner | ✓ | ||
| Coding agents: Claude Code, Codex, Cursor, Copilot, or a person | ✓ | ||
| Security agents from model vendors: Codex Security, Claude Security | ✓ | ✓ | inside their product |
| Dvalin | runs your scanners | hands the work to your agent | ✓ in the open, on your machine |
Dvalin is not another scanner and not another coding agent. It is the referee between them, and its verdict is the same whichever agent wrote the fix. Built-in rules make the first scan work with nothing installed, and a built-in agent that ships with Dvalin’s security skills can act as the fixer; both are optional.
Security agents from model vendors find, fix and validate inside one product, built on that vendor’s models and API. Dvalin can import their findings and judge their fixes like anyone else’s. Its own verdict differs in three ways:
- Open source. The code that reaches the verdict is MIT-licensed, and the default scanners are open source too. You can read every rule the referee applies, run it yourself, and fork it.
- Vendor-neutral. Any agent, any scanner, any model provider, or no model at all. Reaching a verdict needs no account, no API key and no vendor’s cloud.
- Kept on your machine. The scans, the checks Dvalin ran, the fix record and
the hash-chained log of how the verdict was reached stay in your repository
and
~/.dvalincode/. By default the verdict sends no code anywhere; engines that upload source, such as Snyk Code, run only when you name them.
Why the verdict holds up
- No model in the verdict. Dvalin decides from the exit codes of processes it started and from a re-scan by the engines your CI gate runs. It never asks the fixer how it went.
- The fixer can’t move the goalposts. Ignores that a change adds (
.snyk,nosemgrep,nosec, …) don’t count when that change is judged. In CI, the checks, gate and scanners come from the base commit, so a pull request can’t relax the rules it is judged by. - Silencing the scanner is not a fix. Moving a sink to a sibling
(
eval→new Function), deleting the vulnerable file, deleting tests or removing assertions all fail. - Reproduce, then fix. For code findings, a test must fail on the unfixed code and pass after the fix, unchanged.
- Proof that travels. The record re-derives offline, with no workspace and no network. In CI, the runner can re-execute the verification and sign what it observed.
dvalin verify-fix fix-record.json
Fix record 2c9d71ac03e0 · VERIFIED · scan-and-checks
executor: claude-code (recorded, not consulted)
targets: 1 before · 0 remaining
coverage: complete → complete
introduced: 0 (gate high/new)
outcome: verified
✓ test: npm run test (exit 0)
audit: run verify-36509f42 @ 414644c75af0
What “verified” means, and what it doesn’t
A record says something narrow on purpose: these findings were present; after
the change, a re-scan no longer reported them; these commands ran, and Dvalin
observed these exit codes. It does not say the code is safe. Every record
carries what the scan covered (complete, partial or unknown). A fix no
check could confirm does not pass. A fix that removes one finding and introduces
another is recorded as regressed. Evasion checks match known patterns; their
limits are listed under honest gaps.
The open profile, FVP-1 →
Use it where you already work
In your coding agent. Dvalin is an MCP server. Connect it to the agents on this machine (Claude Code, Codex, Cursor, VS Code, Gemini CLI, OpenCode):
npx dvalincode agents connect # preview what each agent would get
npx dvalincode agents connect --yes # apply it
After writing a repair, the agent calls dvalin_verify_findings and gets a
Verified Fix Record back.
Claude Code and Codex can also load Dvalin’s security-gate skill. It tells the agent to call Dvalin after security-sensitive edits (input handling, auth, secrets, queries, commands, dependencies), to fix with the smallest change and a regression test, never to suppress a finding, and not to call a fix done until the verdict passes. Claude Code skill → · Codex and Claude Code plugin →
On every pull request. The GitHub Action needs no API key and no model:
- uses: arthurpanhku/[email protected]
with:
fail-on: high
diff: true # gate only what this pull request adds
Pass fix-record: and the runner re-derives the record and posts it beside the
diff. Add reverify: true and the runner re-executes the verification itself.
GitLab CI and pre-commit are in the CLI guide.
In the terminal. Let Dvalin drive the fixer until the gate would pass:
dvalincode dvalin . --until-clean --max-rounds 3 --executor codex
Each round, Dvalin re-scans, runs your checks, and sends the executor only what is still wrong. The loop stops when the fix verifies, the round budget runs out, or progress stalls. Every outcome issues a fix record.
A real run
Recorded from the real application, not a mock. The input is adapted from OWASP NodeGoat (Apache-2.0), whose contribution route evaluated user-controlled text.
| Before | After | |
|---|---|---|
| Security health (triage heuristic) | 22 / 100 · F | 100 / 100 · A |
| Findings | 10 (eval across 3 rules, 2 engines) |
0 |
| Tests | 2 passing | 3 passing, including an injection regression test |
| Scanner fleet | 4 / 4 completed | 4 / 4 completed |
Install
Dvalin ships in the dvalincode package with two commands: dvalin for the
security workflow, and dvalincode for everything, including the built-in
agent.
CLI (macOS · Linux · Windows):
curl -fsSL https://raw.githubusercontent.com/arthurpanhku/dvalincode/main/scripts/install.sh | bash
Homebrew, Windows and manual downloads are in the CLI guide.
Desktop app (macOS · Windows): the same engine in a window, with the Dvalin security workspace and the built-in agent. See the desktop app guide.
Code signing policy · Privacy notice. Free Windows signing through SignPath Foundation is being prepared; approval and production signing have not been confirmed.
Is Dvalin for you?
Yes, if
- coding agents fix what your scanners report;
- you run more than one agent or scanner and want one verdict across them;
- you have to show an auditor that a repair worked;
- the verdict must be open, independent of any one AI vendor, and stay on your own machines.
Probably not, if
- you want a coding agent: use Claude Code, Codex or opencode, then connect Dvalin;
- you want the widest vulnerability discovery: use a dedicated scanner or AI security agent;
- you run one scanner with its own platform autofix, and nobody asks for proof.
Documentation
- CLI guide: gates, the fix loop, CI, MCP and headless runs
- Desktop app guide
- How verification works (FVP-1)
- Dvalin security workspace: scanners, SARIF and Codex Security import
- The built-in agent: modes, skills, tools, providers, architecture and FAQ
- Trust and governance: org policy, audit trail, threat model and evidence
- Security strategy: what Dvalin competes on, and what it doesn’t
Contributing
Contributions are welcome. CONTRIBUTING.md covers setup, the governance rules and building from source. Thanks to everyone who has helped so far: @arthurpanhku, @shivasb42, @adity982, @weed33834, @webdevsamran, @dchaudhari7177 and @TayfurYldz (full history).
License and attribution
MIT, see LICENSE. DvalinCode is an independent project. It is not affiliated with, sponsored by, or endorsed by any vendor or project named here, including Anthropic, OpenAI and GitHub. The public research, open-source projects and standards that informed it are credited in docs/REFERENCES.md.
Install
npx dvalincode security scan . # 30 seconds: no install, no account, no API key