<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: C1 </title>
    <description>The latest articles on DEV Community by C1  (@c1run).</description>
    <link>https://dev.to/c1run</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4279199%2Fc736b481-2e05-4c75-8c08-b1fb398b2f3f.png</url>
      <title>DEV Community: C1 </title>
      <link>https://dev.to/c1run</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/c1run"/>
    <language>en</language>
    <item>
      <title>I let OpenCode write 500 lines. Here's what Selo caught</title>
      <dc:creator>C1 </dc:creator>
      <pubDate>Wed, 02 Dec 2026 20:16:21 +0000</pubDate>
      <link>https://dev.to/c1run/i-let-opencode-write-500-lines-heres-what-selo-caught-130h</link>
      <guid>https://dev.to/c1run/i-let-opencode-write-500-lines-heres-what-selo-caught-130h</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fh7q9b10vfw30peoyq2a1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fh7q9b10vfw30peoyq2a1.png" alt="Selo" width="800" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I use OpenCode on real projects every day. After a few months of that, I noticed a pattern.&lt;/p&gt;

&lt;p&gt;The agent finishes. It says "all done, tests pass." I glance at the diff, it looks roughly right, and I merge. Three days later I find it quietly edited &lt;code&gt;.env&lt;/code&gt;, or deleted an assertion that was inconvenient, or wrote "no breaking changes" in the commit message while breaking three things.&lt;/p&gt;

&lt;p&gt;The agent wasn't lying exactly. It was optimizing for sounding done.&lt;/p&gt;

&lt;p&gt;The problem isn't that Claude Code is bad — it's genuinely useful. The problem is that "the agent said it's done" is not evidence. It's the agent's self-report. I wanted something different: a record of what the agent &lt;em&gt;actually&lt;/em&gt; touched, signed so that a third party can check it without trusting me.&lt;/p&gt;

&lt;p&gt;That's what I built. It's called [&lt;a href="https://github.com/C1-run/Selo" rel="noopener noreferrer"&gt;Selo&lt;/a&gt;].&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Selo does?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Every time you run Selo, your coding agent runs in a throwaway Git worktree. Your actual checkout is never touched. After the agent finishes, Selo audits the real diff — not the agent's summary of it — against rules you configure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Forbidden file edits (&lt;code&gt;.env&lt;/code&gt;, key files, anything you name)&lt;/li&gt;
&lt;li&gt;Scope violations (files outside your &lt;code&gt;permission_allowlist&lt;/code&gt; globs)&lt;/li&gt;
&lt;li&gt;Secret scan (with leetspeak and zero-width character folding)&lt;/li&gt;
&lt;li&gt;Forbidden claims (agent wrote "tests pass" or "no errors" when they don't)&lt;/li&gt;
&lt;li&gt;Test tampering (deleted, skipped, or weakened assertions)&lt;/li&gt;
&lt;li&gt;Required commands (&lt;code&gt;go test ./...&lt;/code&gt; exits non-zero → run is rejected)&lt;/li&gt;
&lt;li&gt;Patch and round limits&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every outcome — pass or fail — gets an Ed25519-signed receipt. Anyone can verify it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;selo verify receipt.json --pubkey &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;fingerprint&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That includes your teammate, your CI pipeline, or your client's tech lead. They don't need to trust you. They run one command.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A real receipt&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Here's what a catch looks like. This is actual verifier output from a rehearsal run against a deliberate offender:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Receipt:    c1f-1795016097433669000
Verdict:    FAILED_SAFETY
Checks:     checks_version 1 — required-commands gate semantics (0.7.0+)
Hash:       OK
Signature:  OK
Provenance: PINNED
Result:     VALID
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The findings: the offender edited &lt;code&gt;.env&lt;/code&gt; (a forbidden path) and wrote &lt;code&gt;SECURE_BY_DESIGN&lt;/code&gt; and &lt;code&gt;BATTLE_TESTED&lt;/code&gt; in a summary file (forbidden claims). The worktree was rejected. The receipt is tamper-evident — flipping one byte makes verification fail.&lt;/p&gt;

&lt;p&gt;The signing key fingerprint is &lt;code&gt;e9512c4fc525598a7d8187cef80455d33a7dc9600920a9adaf9396ab0579cbaf&lt;/code&gt;. That string is the commitment. If a reviewer has it, they can prove the receipt wasn't modified after the fact.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Try it yourself in 10 seconds&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No repo. No account. No API key.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Install — verifies SHA-256 + cosign signature, fails closed&lt;/span&gt;
curl -fsSL https://raw.githubusercontent.com/C1-run/Selo/main/install.sh &lt;span class="o"&gt;|&lt;/span&gt; bash

&lt;span class="c"&gt;# Prove all safety controls fire&lt;/span&gt;
selo selftest
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;selftest&lt;/code&gt; plants a secret, a &lt;code&gt;.env&lt;/code&gt; edit, a forbidden claim, and a deleted test — then runs all four through the pipeline. You get four &lt;code&gt;FAILED_SAFETY&lt;/code&gt; receipts and four clean &lt;code&gt;selo verify&lt;/code&gt; results. That's Selo's guarantee about itself.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Wire it into OpenCode (or any MCP client)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Add to &lt;code&gt;~/.config/opencode/opencode.json&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"selo"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"/usr/local/bin/selo"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"mcp"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"serve"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For Claude Code: &lt;code&gt;claude mcp add selo -- selo mcp serve&lt;/code&gt;. Works with Cursor, Kiro, and anything else that speaks stdio MCP.&lt;/p&gt;

&lt;p&gt;Once connected, &lt;code&gt;opencode mcp list&lt;/code&gt; shows &lt;code&gt;selo [x] connected&lt;/code&gt;. The three tools — &lt;code&gt;selo_preflight&lt;/code&gt;, &lt;code&gt;selo_check_diff&lt;/code&gt;, &lt;code&gt;selo_scan_path&lt;/code&gt; — are now callable from inside any agent session.&lt;/p&gt;

&lt;p&gt;One thing to know about &lt;code&gt;selo_scan_path&lt;/code&gt;:** don't point it at a large repo root. The tool scans every file and dumps all hits into one JSON-RPC response — on a repo with hundreds of files that's &amp;gt;16 MiB of stdout, which crashes the MCP stdio transport. Use it on small dirs (config files, a single package). For a whole repo, use &lt;code&gt;selo_check_diff&lt;/code&gt; on the actual diff instead — it only scans changed files and never overflows the transport. I hit this live on the prism repo and &lt;a href="https://github.com/C1-run/Selo/commit/49bf49d" rel="noopener noreferrer"&gt;fixed it&lt;/a&gt; with a 500-file guard: the tool now refuses with a clear message and directs you to &lt;code&gt;selo_check_diff&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The honest limits&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is in the README's "Why not Selo" section, and I'm repeating it here because trust tools live and die on not overselling.&lt;/p&gt;

&lt;p&gt;Post-run audit, not prevention.** The violating change is contained in the worktree and rejected before merge — but it did happen. Selo documents and rejects it; it doesn't intercept the agent mid-run.&lt;/p&gt;

&lt;p&gt;Worktree containment, not a Docker sandbox.** If you need container isolation, pair Selo with one.&lt;/p&gt;

&lt;p&gt;Heuristic checks, not SAST. It governs agent &lt;em&gt;behavior&lt;/em&gt; — scope violations, test tampering, secret smuggling, forbidden claims. It won't find SQL injection or CVEs.&lt;/p&gt;

&lt;p&gt;Operator-signed by default, not non-repudiable. Under the default &lt;code&gt;~/.selo/signing-key&lt;/code&gt;, the honest ceiling is "tamper-evident evidence of what Selo observed." For stronger provenance you need an external signer (&lt;code&gt;--require-keysource=command&lt;/code&gt;), RFC3161 timestamps (&lt;code&gt;--tsa&lt;/code&gt;), and a Rekor log entry (&lt;code&gt;--rekor&lt;/code&gt;). The README explains all three.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why this matters for shipping AI-assisted code to clients?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The gap I kept running into: a client's tech lead looks at the PR and asks "which parts did the AI write, and did it stay in scope?" There's no good answer to that today. Human code review catches what the reviewer catches. The agent's own summary is optimistic by design.&lt;/p&gt;

&lt;p&gt;A Selo receipt changes the question. Instead of "do you trust that the agent behaved?" it becomes "here's a signed record of what it touched — verify it yourself." The client's reviewer runs &lt;code&gt;selo verify&lt;/code&gt; and gets &lt;code&gt;Provenance: PINNED, Result: VALID&lt;/code&gt; in their own terminal.&lt;/p&gt;

&lt;p&gt;That's not a sales pitch. It's the actual thing the tool does, with the actual caveats. Receipt cards also post into GitHub job summaries and PR comments if you want them in the review workflow automatically.&lt;/p&gt;

&lt;p&gt;What's next&lt;/p&gt;

&lt;p&gt;Selo is v0.7.2, Apache-2.0, one maintainer. The near-term focus is tighter checks and independent receiver co-signing — the piece that moves a receipt from "tamper-evident" to non-repudiable. Config may shift before 1.0. The &lt;a href="https://github.com/C1-run/Selo/blob/main/CHANGELOG.md" rel="noopener noreferrer"&gt;changelog&lt;/a&gt; tracks what's shipped.&lt;/p&gt;

&lt;p&gt;Two fixes landed during this integration test and are already on &lt;code&gt;main&lt;/code&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/C1-run/Selo/commit/49bf49d" rel="noopener noreferrer"&gt;&lt;code&gt;selo_scan_path&lt;/code&gt; transport guard&lt;/a&gt; — file-count limit (500) + hit cap (200) so the MCP transport never overflows.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/C1-run/Selo/commit/9f2889f" rel="noopener noreferrer"&gt;Runner stderr persistence&lt;/a&gt; — when a run exits &lt;code&gt;-1&lt;/code&gt;, &lt;code&gt;runner-stderr.txt&lt;/code&gt; now lands in the run dir so you can see the real error without reading logs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The two things I'm most interested in feedback on: the receipt format/trust model, and what rules you'd actually configure if you tried it on a real repo. If you've thought about what "agent-authored code" means for handoff and accountability, I'd genuinely like to hear it.&lt;/p&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/C1-run/Selo" rel="noopener noreferrer"&gt;github.com/C1-run/Selo&lt;/a&gt;&lt;br&gt;
Landing: &lt;a href="https://selo.c1.run" rel="noopener noreferrer"&gt;selo.c1.run&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Content note: all receipt output in this post is from a real signed rehearsal run, not fabricated. The offender is a deterministic shell script, not an LLM agent — that's stated in the receipt itself (&lt;code&gt;c1_runtime_is_mock: true&lt;/code&gt;). The binary sha256 and signing fingerprint in this post match the verification log at &lt;a href="https://github.com/C1-run/Selo/tree/main/pilot/rehearsal" rel="noopener noreferrer"&gt;github.com/C1-run/Selo/tree/main/pilot/rehearsal&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>opencode</category>
      <category>ai</category>
      <category>opensource</category>
      <category>security</category>
    </item>
  </channel>
</rss>
