<?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: IdoGol24</title>
    <description>The latest articles on DEV Community by IdoGol24 (@idogol24).</description>
    <link>https://dev.to/idogol24</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%2F569686%2F7c2e5b97-c136-46b1-866d-aeb04c8ad266.jpeg</url>
      <title>DEV Community: IdoGol24</title>
      <link>https://dev.to/idogol24</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/idogol24"/>
    <language>en</language>
    <item>
      <title>Weir: API key leak detection for the agents you build and the coding agent you use</title>
      <dc:creator>IdoGol24</dc:creator>
      <pubDate>Tue, 27 Oct 2026 18:37:49 +0000</pubDate>
      <link>https://dev.to/idogol24/weir-api-key-leak-detection-for-the-agents-you-build-and-the-coding-agent-you-use-4end</link>
      <guid>https://dev.to/idogol24/weir-api-key-leak-detection-for-the-agents-you-build-and-the-coding-agent-you-use-4end</guid>
      <description>&lt;p&gt;&lt;strong&gt;API key leak detection for the agents you build and the coding agent you use.&lt;/strong&gt; Test any agent with planted fake keys, or see which of your real keys a Claude Code session exposed.&lt;/p&gt;

&lt;p&gt;Agent frameworks can copy keys into traces and logs, and coding agents can read them into the model's context. Weir finds each key by its exact value, names where it went, and never prints it.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The agents you build:&lt;/strong&gt; plant fake keys where your real ones live, run the agent's own flows, and get a verdict for every place they reached: spans, logs, console output, the model, other services. Leak, clean or incomplete. It found &lt;a href="https://github.com/mlflow/mlflow/security/advisories/GHSA-j7qq-vr8c-xvw3" rel="noopener noreferrer"&gt;GHSA-j7qq-vr8c-xvw3&lt;/a&gt; in MLflow.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The coding agent you use:&lt;/strong&gt; in Claude Code, a status line shows which of your real keys entered the session or left in a tool call, and an optional hook strips known keys from tool results before the model reads them.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/IdoGol24/weir" rel="noopener noreferrer"&gt;github.com/IdoGol24/weir&lt;/a&gt;. Apache-2.0.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it in 10 seconds
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ pip install weir-scan
$ weir canary judge --sample
LEAK env.SAMPLE_SERVICE_KEY file=canary-sample/otlp.jsonl:1 signal=traces span="call_service" at=attributes.app.client.config form=raw
coverage: 2 placements (1 leaked, 1 exercised, 0 not exercised, 1 required), 1 flows (1 ok), 1 files, 3 spans, 0 log records, 0 metric data points, 29 strings, 1347 bytes swept
network not isolated: direct connections were not observed
result: leak
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The sample is bundled fake data with one planted key. Weir names the placement and the exact span attribute the key reached, and exits 1.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Test the agents you build
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;weir-run&lt;/code&gt; plants a unique fake key wherever a real one would live (an environment variable, a value your code passes in, an OAuth token), runs your agent's own flows against a local fake model, and captures everything the agent sends out: spans, logs, metrics, console output, the requests to the model and requests to any other service. &lt;code&gt;weir canary judge&lt;/code&gt; then searches all of it for those exact values.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight toml"&gt;&lt;code&gt;&lt;span class="k"&gt;[[&lt;/span&gt;&lt;span class="n"&gt;placement&lt;/span&gt;&lt;span class="k"&gt;]]&lt;/span&gt;
&lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;"env.OPENAI_API_KEY"&lt;/span&gt;
&lt;span class="n"&gt;kind&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;"env"&lt;/span&gt;
&lt;span class="n"&gt;shape&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;"openai"&lt;/span&gt;
&lt;span class="n"&gt;required&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;
&lt;span class="n"&gt;provider&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;"model"&lt;/span&gt;     &lt;span class="c"&gt;# where this key is allowed to go&lt;/span&gt;

&lt;span class="k"&gt;[[&lt;/span&gt;&lt;span class="n"&gt;flow&lt;/span&gt;&lt;span class="k"&gt;]]&lt;/span&gt;
&lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s"&gt;"quickstart"&lt;/span&gt;
&lt;span class="n"&gt;command&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"{python}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"examples/quickstart.py"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each placement names where its key is allowed to go. The key in the auth header of a request to its own API is the key doing its job. The same key in a span, a log line or a prompt is a leak. This is the repo's demo with its leak switch on:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ weir-run run --config packages/weir-run/demo/canary-leak.toml
...
network: isolated, loopback only
LEAK code.auth.client_secret file=capture/otlp/traces.jsonl:1 signal=traces span="execute_tool web_search" at=attributes.app.auth.client form=base64
LEAK env.SEARCH_API_KEY file=capture/otlp/traces.jsonl:1 signal=traces span="execute_tool web_search" at=attributes.app.request.headers form=raw
...
LEAK env.SEARCH_API_KEY file=capture/swept/flow-01-demo.stderr:1 signal=raw form=raw
...
result: leak
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The OAuth client secret reached a span as base64, where a pattern scanner would no longer recognise it. The search key reached two span attributes and stderr.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Three verdicts:&lt;/strong&gt; leak, clean or incomplete. If a placement you marked required was never exercised, the result is incomplete, never clean.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CI-ready:&lt;/strong&gt; exit codes 0 clean, 1 leak, 2 unusable input, 3 incomplete, and a GitHub Action posts the verdict on the pull request.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No outside network on Linux,&lt;/strong&gt; where unprivileged user namespaces are allowed, so a direct connection is caught too.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;weir-scan weir-run
weir-run run &lt;span class="nt"&gt;--config&lt;/span&gt; canary.toml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Config and the pytest fixture: &lt;a href="https://github.com/IdoGol24/weir/tree/main/packages/weir-run" rel="noopener noreferrer"&gt;weir-run README&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. See which of your real keys a Claude Code session exposed
&lt;/h2&gt;

&lt;p&gt;Here the keys are real, so Weir plants nothing. Setup inventories the credentials an agent could reach (standard credential files, shell startup files, the environment Claude Code starts with and, if you say yes, the project's files) and keeps keyed fingerprints, never the values. Its preview names them by name and location only:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  3 credentials (3 distinct values read)
    standard locations: 1
      oauth_token [github.com]  ~/.config/gh/hosts.yml:2  field
    project files: 1
      ACME_API_TOKEN            ./.env:1                  name
    launch environment and shell startup files: 1
      OPENAI_API_KEY            ~/.bashrc:1               shape
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;From then on a status-line segment counts how many of those keys entered the session's context and how many were sent out in a tool call. After a session where the agent ran &lt;code&gt;cat .env&lt;/code&gt; and then used the key in a &lt;code&gt;curl&lt;/code&gt; command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;weir ⚠ 1 entered · 1 sent → /weir
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;/weir&lt;/code&gt; explains each one: where it came from, the turn that moved it, where it sits now, and what to do. It never shows a value.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ACME_API_TOKEN (./.env)
  source: ./.env, a project file
  entered the context: 2 times, first at turn 1: the Bash tool result, …
  sent in a tool call: 1 time, first at turn 1: the Bash tool call, argument command, …
  …
  advice: rotate it at its issuer; take it out of ./.env, or deny the agent read access to that file; delete the session files above once it is rotated
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;weir audit&lt;/code&gt; runs the same check over saved sessions and lists every key it finds with the file, line and tool call.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The optional redaction hook.&lt;/strong&gt; Setup can also add a &lt;code&gt;PostToolUse&lt;/code&gt; hook. When a Read, Bash, Grep, Glob or WebFetch result holds one of your inventoried keys as a whole value, the hook replaces it before the model reads it. The same &lt;code&gt;cat .env&lt;/code&gt; gives the model:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ACME_API_TOKEN=[weir: ACME_API_TOKEN removed]
DEBUG=1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and the status line reads &lt;code&gt;weir ✓ no known key seen · 1 kept out&lt;/code&gt;. For a large output, Claude Code also saves the whole output to a file in the session's folder and gives the model its path, so the hook rewrites that saved copy the same way, owner-only. If the hook fails or can't finish, the status line says &lt;code&gt;possibly not redacted&lt;/code&gt;, never green.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;uv tool &lt;span class="nb"&gt;install &lt;/span&gt;weir-scan     &lt;span class="c"&gt;# or: pipx install weir-scan&lt;/span&gt;
weir statusline setup         &lt;span class="c"&gt;# shows the change, applies it only when you type yes&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;weir statusline undo&lt;/code&gt; removes it. Linux and macOS.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it's different
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;It doesn't guess.&lt;/strong&gt; It looks for exact values, raw or encoded (JSON-escaped, URL-encoded, base64, hex), so a hit is the key itself. A plain password or a database URL has no shape to match, but it has a value.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It checks every way out:&lt;/strong&gt; spans, logs, metrics, console output, prompts sent to the model, requests to any other service, and on the coding side, the session's own context and tool calls.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No false all-clear in the test rig.&lt;/strong&gt; A required path that never ran is incomplete, never clean.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Offline and deterministic.&lt;/strong&gt; No AI model decides anything, and Weir itself sends nothing anywhere.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Limits
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Whole values only.&lt;/strong&gt; A key that is hashed, split, truncated or glued to other text isn't matched.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A test sees only what the test ran.&lt;/strong&gt; A clean result is evidence about the flows that ran and the keys that were planted.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Claude Code only, on the coding side.&lt;/strong&gt; Other coding agents aren't covered yet.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;After the fact, except the hook.&lt;/strong&gt; The status line and the audit report what already happened.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A failed tool call's output reaches the model as is.&lt;/strong&gt; Claude Code runs the hook only after a call succeeds; &lt;code&gt;/weir&lt;/code&gt; then says the key entered through a failed tool call.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Nothing for keys pasted into the chat.&lt;/strong&gt; The status line counts one as entered, but nothing removes it.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Weir launched on &lt;a href="https://news.ycombinator.com/item?id=50261335" rel="noopener noreferrer"&gt;Show HN&lt;/a&gt;, and the first question was whether it will support Codex. Not yet. If you'd use it with Codex or another coding agent, open an &lt;a href="https://github.com/IdoGol24/weir/issues" rel="noopener noreferrer"&gt;issue&lt;/a&gt; saying where that agent keeps its sessions and what you'd want reported. The same goes for a framework you'd like run through &lt;code&gt;weir-run&lt;/code&gt;, or a leak Weir should have caught and didn't.&lt;/p&gt;

&lt;p&gt;I built Weir with AI assistance, and I reproduced the MLflow leak before reporting it.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>showdev</category>
      <category>security</category>
      <category>agents</category>
    </item>
    <item>
      <title>Let me know what you guys think! Join the discussion</title>
      <dc:creator>IdoGol24</dc:creator>
      <pubDate>Wed, 26 Aug 2026 17:13:08 +0000</pubDate>
      <link>https://dev.to/idogol24/let-me-know-what-you-guys-think-join-the-discussion-2a9j</link>
      <guid>https://dev.to/idogol24/let-me-know-what-you-guys-think-join-the-discussion-2a9j</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/idogol24/your-evals-pass-and-your-agent-is-broken-stop-asking-an-llm-whether-your-llm-misbehaved-26e9" class="crayons-story__hidden-navigation-link"&gt;Weir - deterministic unit tests for AI agents (no LLM)&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;

          &lt;a href="/idogol24" class="crayons-avatar  crayons-avatar--l  "&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%2Fuser%2Fprofile_image%2F569686%2F7c2e5b97-c136-46b1-866d-aeb04c8ad266.jpeg" alt="idogol24 profile" class="crayons-avatar__image"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/idogol24" class="crayons-story__secondary fw-medium m:hidden"&gt;
              IdoGol24
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                IdoGol24
                
                
              
              &lt;div id="story-author-preview-content-4488037" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/idogol24" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&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%2Fuser%2Fprofile_image%2F569686%2F7c2e5b97-c136-46b1-866d-aeb04c8ad266.jpeg" class="crayons-avatar__image" alt=""&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;IdoGol24&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

          &lt;/div&gt;
          &lt;a href="https://dev.to/idogol24/your-evals-pass-and-your-agent-is-broken-stop-asking-an-llm-whether-your-llm-misbehaved-26e9" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Aug 25&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/idogol24/your-evals-pass-and-your-agent-is-broken-stop-asking-an-llm-whether-your-llm-misbehaved-26e9" id="article-link-4488037"&gt;
          Weir - deterministic unit tests for AI agents (no LLM)
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/ai"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;ai&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/testing"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;testing&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/opensource"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;opensource&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/agents"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;agents&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/idogol24/your-evals-pass-and-your-agent-is-broken-stop-asking-an-llm-whether-your-llm-misbehaved-26e9" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="18" height="18"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;3&lt;span class="hidden s:inline"&gt;&amp;nbsp;reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/idogol24/your-evals-pass-and-your-agent-is-broken-stop-asking-an-llm-whether-your-llm-misbehaved-26e9#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              

              10&lt;span class="hidden s:inline"&gt;&amp;nbsp;comments&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            1 min read
          &lt;/small&gt;
          
          &lt;div class="only-sidebar-menu-item trusted-visible-block print-hidden align-center"&gt;
                
                    
                
          &lt;/div&gt;

        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
      <category>agents</category>
      <category>ai</category>
      <category>discuss</category>
      <category>llm</category>
    </item>
    <item>
      <title>Weir - deterministic unit tests for AI agents (no LLM)</title>
      <dc:creator>IdoGol24</dc:creator>
      <pubDate>Tue, 25 Aug 2026 20:15:04 +0000</pubDate>
      <link>https://dev.to/idogol24/your-evals-pass-and-your-agent-is-broken-stop-asking-an-llm-whether-your-llm-misbehaved-26e9</link>
      <guid>https://dev.to/idogol24/your-evals-pass-and-your-agent-is-broken-stop-asking-an-llm-whether-your-llm-misbehaved-26e9</guid>
      <description>&lt;p&gt;Your agent's logs can say "success" while the run was quietly hijacked - untrusted content at step 2 steering a tool call at step 6 - and the industry's default answer is pointing a second LLM at the first one.&lt;/p&gt;

&lt;p&gt;I built &lt;code&gt;Weir&lt;/code&gt; to be the deterministic opposite: it reads the OpenTelemetry traces you already have and answers two questions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt; How much of your agent's behavior your telemetry can actually prove&lt;/li&gt;
&lt;li&gt; Whether a forbidden flow happened (shown as a witness path you can fail CI on)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Same input, byte-identical answer, no LLM in the loop, nothing leaves your machine.&lt;/p&gt;

&lt;p&gt;Try it out:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;weir-scan &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; weir gauge &lt;span class="nt"&gt;--sample&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;License: Apache-2.0&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/IdoGol24" rel="noopener noreferrer"&gt;
        IdoGol24
      &lt;/a&gt; / &lt;a href="https://github.com/IdoGol24/weir" rel="noopener noreferrer"&gt;
        weir
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Weir - unit tests for your agents
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Weir - unit tests for your agents&lt;/h1&gt;
&lt;/div&gt;

&lt;p&gt;Weir is a CI gate for AI agents.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/IdoGol24/weir/actions/workflows/ci.yml" rel="noopener noreferrer"&gt;&lt;img src="https://github.com/IdoGol24/weir/actions/workflows/ci.yml/badge.svg" alt="CI"&gt;&lt;/a&gt; &lt;a href="https://pypi.org/project/weir-scan/" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/1e88f6ad092422e29485f179e22d5ef07ba4d5e8bcba755e7ec2cc1803c35486/68747470733a2f2f696d672e736869656c64732e696f2f707970692f762f776569722d7363616e" alt="PyPI"&gt;&lt;/a&gt; &lt;a href="https://github.com/IdoGol24/weir/LICENSE" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/798509b4df525f56802b56f8096862487f08023e3d7561c68656f8dab10d0d6e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4170616368652d2d322e302d626c75652e737667" alt="License: Apache-2.0"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
  &lt;a rel="noopener noreferrer nofollow" href="https://raw.githubusercontent.com/IdoGol24/weir/main/docs/assets/demo.svg"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FIdoGol24%2Fweir%2Fmain%2Fdocs%2Fassets%2Fdemo.svg" alt="Terminal recording: weir scan reports a verdict-grade finding with a witness path, then exits 1" width="620"&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;It reads the OpenTelemetry traces your agent already emits and fails the build when sensitive data reaches a sink it should not reach.&lt;/p&gt;

&lt;p&gt;Weir asks a structural question:&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Did sensitive data flow through the agent to a sink it should never have reached?&lt;/h3&gt;
&lt;/div&gt;

&lt;p&gt;Your agent already answers that question in the traces it emits. Weir reconstructs the session graph, tracks taint through it, and shows the evidence node by node.&lt;/p&gt;


  &lt;div class="js-render-enrichment-target"&gt;
    &lt;div class="render-plaintext-hidden"&gt;
      &lt;pre&gt;flowchart LR
  A["traces your agent&amp;lt;br/&amp;gt;already emits"] --&amp;gt; B{"weir gauge"}
  B --&amp;gt;|"coverage too low"| C["names the exact&amp;lt;br/&amp;gt;instrumentation switch"]
  C -.-&amp;gt;|"flip it, re-run"| B
  B --&amp;gt;|"coverage sufficient"| D{"weir scan"}
  D --&amp;gt;|"no forbidden flow"| E["exit 0"]
  D --&amp;gt;|"forbidden flow"| F["exit 1 + witness path&amp;lt;br/&amp;gt;n2 → n3 → n4 → n5 → n6"]
&lt;/pre&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;span class="js-render-enrichment-loader d-flex flex-justify-center flex-items-center width-full"&gt;
    &lt;span&gt;
      &lt;span class="sr-only"&gt;Loading&lt;/span&gt;
&lt;/span&gt;
  &lt;/span&gt;


&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Try it in two minutes&lt;/h2&gt;

&lt;/div&gt;

&lt;div class="snippet-clipboard-content notranslate position-relative overflow-auto"&gt;
&lt;pre class="notranslate"&gt;&lt;code&gt;pip install weir-scan
weir gauge your-export.jsonl   # or: weir gauge&lt;/code&gt;&lt;/pre&gt;…&lt;/div&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/IdoGol24/weir" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;The roadmap is completely in the open. I'd genuinely like to know where it breaks on your exports!&lt;/p&gt;

</description>
      <category>ai</category>
      <category>testing</category>
      <category>opensource</category>
      <category>agents</category>
    </item>
  </channel>
</rss>
