<?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: Ashwin Menon</title>
    <description>The latest articles on DEV Community by Ashwin Menon (@ashwinmenon).</description>
    <link>https://dev.to/ashwinmenon</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%2F4170490%2F222d0842-381f-4dea-924b-809e948cf403.jpg</url>
      <title>DEV Community: Ashwin Menon</title>
      <link>https://dev.to/ashwinmenon</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ashwinmenon"/>
    <language>en</language>
    <item>
      <title>Jostraca's merge mode keeps your edits, until a teammate clones the repo</title>
      <dc:creator>Ashwin Menon</dc:creator>
      <pubDate>Fri, 13 Nov 2026 04:46:29 +0000</pubDate>
      <link>https://dev.to/ashwinmenon/jostracas-merge-mode-keeps-your-edits-until-a-teammate-clones-the-repo-4bj2</link>
      <guid>https://dev.to/ashwinmenon/jostracas-merge-mode-keeps-your-edits-until-a-teammate-clones-the-repo-4bj2</guid>
      <description>&lt;p&gt;I came to Jostraca as an outsider. I write specs and architecture more than I write generators, so I had to learn what a code generator library is before I could judge one. This article covers one claim I tested on version 0.39.0, on Windows, with a git clone: you can regenerate a file and keep the changes you made by hand.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Jostraca does
&lt;/h2&gt;

&lt;p&gt;Jostraca builds files from code. You describe a tree of folders, files and content, and it writes them to disk. This is the script I used:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nc"&gt;Jostraca&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;Project&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;File&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;Content&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s1"&gt;'jostraca'&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;port&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;argv&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="s1"&gt;'8080'&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;jostraca&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Jostraca&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;existing&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;txt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;write&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;merge&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&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;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;jostraca&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;generate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;folder&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'./out'&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;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nc"&gt;Project&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;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nc"&gt;File&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'config.sh'&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;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nc"&gt;Content&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sb"&gt;`PORT=${port}\nHOST=localhost\n`&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;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;Running &lt;code&gt;node gen.mjs 8080&lt;/code&gt; gives me &lt;code&gt;out/config.sh&lt;/code&gt; with a port and a host. The interesting part is the &lt;code&gt;existing&lt;/code&gt; option. It decides what happens when the file is already on disk. The default is to overwrite it. Other modes keep the old file, write a &lt;code&gt;.new&lt;/code&gt; next to it, or merge.&lt;/p&gt;

&lt;p&gt;Merge is the one a team wants. Generated files get edited by hand sooner or later, and nobody wants a regenerate to wipe that out.&lt;/p&gt;

&lt;h2&gt;
  
  
  The test that works
&lt;/h2&gt;

&lt;p&gt;I generated the file, added &lt;code&gt;DEBUG=1&lt;/code&gt; by hand, then regenerated with port 9090. With the default mode, &lt;code&gt;DEBUG=1&lt;/code&gt; was gone, which is expected. With merge on, I got all three changes: &lt;code&gt;PORT=9090&lt;/code&gt;, &lt;code&gt;HOST=localhost&lt;/code&gt; and &lt;code&gt;DEBUG=1&lt;/code&gt;. The result reported the file under &lt;code&gt;merged&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This is a three way merge. Jostraca compares your current file against the new output and against the output of the previous run. It stores that previous run in a folder called &lt;code&gt;.jostraca/generated/&lt;/code&gt; inside the output folder. I like this design. It is the same idea git uses, and it needs no markers in your files.&lt;/p&gt;

&lt;h2&gt;
  
  
  The test that fails
&lt;/h2&gt;

&lt;p&gt;That folder is the catch. On first use Jostraca writes a &lt;code&gt;.jostraca/.gitignore&lt;/code&gt; that ignores &lt;code&gt;generated&lt;/code&gt; and &lt;code&gt;jostraca.meta.log&lt;/code&gt;. So the baseline never reaches git.&lt;/p&gt;

&lt;p&gt;I committed the project, cloned it as a teammate would, installed dependencies, added &lt;code&gt;DEBUG=1&lt;/code&gt; by hand, and ran &lt;code&gt;node gen.mjs 9090&lt;/code&gt;. The port changed. &lt;code&gt;DEBUG=1&lt;/code&gt; was gone. There was no warning and no error. The clone had no baseline, and merge mode silently acted like the default.&lt;/p&gt;

&lt;p&gt;I also ran this on a single machine by deleting &lt;code&gt;.jostraca/&lt;/code&gt; between runs. Same outcome. So the problem needs no unusual setup. Anyone who clones the repo, or cleans the output folder, loses the safety net, and the tool does not say so.&lt;/p&gt;

&lt;p&gt;The reference documentation does describe this. It states that merge with no baseline overwrites. The explanation page says it "degrades to a two way comparison", which would imply some attempt to keep your edits. What I observed matches the reference page. The two pages should say the same thing, and the safer wording should not be on the page a newcomer reads first.&lt;/p&gt;

&lt;h2&gt;
  
  
  The fix exists, but you have to know about it
&lt;/h2&gt;

&lt;p&gt;The docs mention a &lt;code&gt;control&lt;/code&gt; option on the &lt;code&gt;generate()&lt;/code&gt; call, with a &lt;code&gt;version&lt;/code&gt; flag. I set it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;jostraca&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;generate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;folder&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'./out'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;control&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;version&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&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;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// same tree as before&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;With this, &lt;code&gt;.jostraca/.gitignore&lt;/code&gt; is not written, so the &lt;code&gt;generated/&lt;/code&gt; baseline and the meta log are tracked by git. I repeated the clone test. The teammate's clone regenerated with port 9090 and kept &lt;code&gt;DEBUG=1&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;That is the result I wanted, so merge mode itself is sound. My complaint is about the default. A tool that offers a merge mode in order to protect hand edits should not drop that protection without a word when its bookkeeping folder is missing. I would call that a bug in the default behaviour, not in the merge logic.&lt;/p&gt;

&lt;h2&gt;
  
  
  A smaller trap in Content
&lt;/h2&gt;

&lt;p&gt;While reading the docs I tried passing extra template data as a second argument:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nc"&gt;Content&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'N=$$n$$\n'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;extra&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&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="c1"&gt;// writes N=$$n$$&lt;/span&gt;
&lt;span class="nc"&gt;Content&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;src&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'N=$$n$$\n'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;extra&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&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="c1"&gt;// writes N=1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first form compiled and ran without complaint, and the placeholder stayed in the output. The second form works. Again the issue is silence. If an unknown positional argument raised an error, or an unresolved &lt;code&gt;$$n$$&lt;/code&gt; printed a warning, I would have found this in a minute instead of by comparing outputs.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the docs do well
&lt;/h2&gt;

&lt;p&gt;I could test the merge behaviour in an afternoon because the reference pages list each mode and say what each one does. The page on &lt;code&gt;existing&lt;/code&gt; told me what to expect when the baseline is missing, and my test confirmed it. Many projects never document their failure cases that precisely. The problem is that the reader has to find that page, and the friendlier page says something softer.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I would change
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Warn, or refuse to write, when merge mode is on and a file exists but has no baseline. This is the smallest change and it removes the exact failure I hit. A user who really wants overwrite can ask for it.&lt;/li&gt;
&lt;li&gt;Make the explanation page match the reference page on this point. It is a quick edit and it removes the contradiction.&lt;/li&gt;
&lt;li&gt;Mention &lt;code&gt;control: { version: true }&lt;/code&gt; in the getting-started material, with a line on when a team needs it.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Would I use it?
&lt;/h2&gt;

&lt;p&gt;I already generate specs, so yes, I would try Jostraca on one of them. I would turn on &lt;code&gt;version: true&lt;/code&gt; from day one and add a check to CI that the baseline folder is present. I have only used it on a small demo, so I cannot speak to large projects. On what I tested, the core idea is good and the default is too quiet about the one situation where it matters most.&lt;/p&gt;

&lt;p&gt;I also built an SDK for the Supabase Management API using Jostraca's SDK generator. That's available here: &lt;a href="https://github.com/X3PH1RE/supabase-mgmt-sdk" rel="noopener noreferrer"&gt;https://github.com/X3PH1RE/supabase-mgmt-sdk&lt;/a&gt;&lt;/p&gt;

</description>
      <category>git</category>
      <category>javascript</category>
      <category>programming</category>
      <category>softwaredevelopment</category>
    </item>
    <item>
      <title>I attacked my own secret scanner and 7 of 8 tricks worked-</title>
      <dc:creator>Ashwin Menon</dc:creator>
      <pubDate>Tue, 27 Oct 2026 08:22:39 +0000</pubDate>
      <link>https://dev.to/ashwinmenon/i-attacked-my-own-secret-scanner-and-7-of-8-tricks-worked--5293</link>
      <guid>https://dev.to/ashwinmenon/i-attacked-my-own-secret-scanner-and-7-of-8-tricks-worked--5293</guid>
      <description>&lt;p&gt;A pull request could turn my secret scanner's check off by editing one file. I tried 8 variations of that trick, and 7 of them worked.&lt;/p&gt;

&lt;p&gt;I built Tripwire after Railway, PHP and LiteLLM all had a very bad few days last week. The same question came up everywhere: which of our secrets are out there, which ones still work, and what can each one reach? Answering that from memory is a great way to rotate the wrong key first. This post covers what the tool does, then what broke when I went after it.&lt;/p&gt;

&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Attack on Tripwire&lt;/th&gt;
&lt;th&gt;What it did&lt;/th&gt;
&lt;th&gt;Status&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Pull request edits the ignore file or baseline&lt;/td&gt;
&lt;td&gt;Turned the check green while adding a key&lt;/td&gt;
&lt;td&gt;Fixed, with a test&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Symlink inside the repo&lt;/td&gt;
&lt;td&gt;Made the scanner read files outside the repo&lt;/td&gt;
&lt;td&gt;Fixed, with a test&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;One crafted file&lt;/td&gt;
&lt;td&gt;Froze the scanner for 22 seconds&lt;/td&gt;
&lt;td&gt;Fixed, with a test&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Local API on shared Wi-Fi&lt;/td&gt;
&lt;td&gt;Reachable by anyone on the same network&lt;/td&gt;
&lt;td&gt;Fixed, with a test&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&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;npx tripwire-scan scan .
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Point it at any repo. It scans your files and your git history, because deleting the line doesn't delete the key. The package is on npm: &lt;a href="https://www.npmjs.com/package/tripwire-scan" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/tripwire-scan&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhp9migfc1sdey2fb6lcr.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fhp9migfc1sdey2fb6lcr.gif" alt="Tripwire tour" width="720" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Commands
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx tripwire-scan scan &lt;span class="nb"&gt;.&lt;/span&gt;                        &lt;span class="c"&gt;# scan the current repo, files and history&lt;/span&gt;
npx tripwire-scan scan owner/repo               &lt;span class="c"&gt;# scan any GitHub repo&lt;/span&gt;
npx tripwire-scan scan &lt;span class="nb"&gt;.&lt;/span&gt; &lt;span class="nt"&gt;--verify&lt;/span&gt;               &lt;span class="c"&gt;# ask each provider if the key is live&lt;/span&gt;
npx tripwire-scan scan &lt;span class="nb"&gt;.&lt;/span&gt; &lt;span class="nt"&gt;--diff&lt;/span&gt; origin/main     &lt;span class="c"&gt;# only fail on secrets added since main&lt;/span&gt;
npx tripwire-scan scan &lt;span class="nb"&gt;.&lt;/span&gt; &lt;span class="nt"&gt;--fail-on-vulns&lt;/span&gt; high   &lt;span class="c"&gt;# also fail on high severity vulnerable deps&lt;/span&gt;
npx tripwire-scan contain &lt;span class="nb"&gt;.&lt;/span&gt;                     &lt;span class="c"&gt;# dry run: revoke plan, changes nothing&lt;/span&gt;
npx tripwire-scan contain &lt;span class="nb"&gt;.&lt;/span&gt; &lt;span class="nt"&gt;--apply&lt;/span&gt;             &lt;span class="c"&gt;# revoke live keys, then re-check each one&lt;/span&gt;
npx tripwire-scan baseline &lt;span class="nb"&gt;.&lt;/span&gt;                    &lt;span class="c"&gt;# accept existing findings, block only new ones&lt;/span&gt;
npx tripwire-scan install-hook                  &lt;span class="c"&gt;# add the pre-commit hook&lt;/span&gt;
npx tripwire-scan honey check                   &lt;span class="c"&gt;# exit 1 if a decoy key was used&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It exits &lt;code&gt;1&lt;/code&gt; when something blocks, &lt;code&gt;0&lt;/code&gt; when clean and &lt;code&gt;2&lt;/code&gt; on a usage error, so it drops into CI as is. Other flags include &lt;code&gt;--min-confidence&lt;/code&gt;, &lt;code&gt;--history&lt;/code&gt;, &lt;code&gt;--skip-vulns&lt;/code&gt;, &lt;code&gt;--json&lt;/code&gt; and &lt;code&gt;--markdown&lt;/code&gt;. For false positives, add a &lt;code&gt;tripwire:ignore&lt;/code&gt; comment on the line or a glob in &lt;code&gt;.tripwireignore&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Tripwire does
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;finds leaked keys in files and in history, using 230+ provider rules including the Gitleaks default pack&lt;/li&gt;
&lt;li&gt;draws what each key unlocks, so you can see the chain from one database URL to production&lt;/li&gt;
&lt;li&gt;asks the provider whether the key still works (AWS, GitHub, Stripe, Slack, OpenAI, Anthropic, SendGrid and npm so far)&lt;/li&gt;
&lt;li&gt;gives you a revoke plan, worst first&lt;/li&gt;
&lt;li&gt;checks dependencies against OSV.dev and can open the fix PR&lt;/li&gt;
&lt;li&gt;plants decoy AWS keys (via Canarytokens) that email you when someone uses them&lt;/li&gt;
&lt;/ul&gt;

&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%2F93nvgootaioovq6hnu2z.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%2F93nvgootaioovq6hnu2z.png" alt="Blast radius of one leaked key" width="800" height="500"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Every finding carries a confidence level, and placeholders, hashes, test fixtures and lockfile noise are filtered out. Base64, URL-encoded and hex values get decoded and rescanned.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Verify and contain.&lt;/strong&gt; &lt;code&gt;--verify&lt;/code&gt; makes one read-only "who am I" call per key to its own provider and marks it live, revoked or unverified. &lt;code&gt;tripwire contain&lt;/code&gt; is a dry run until you add &lt;code&gt;--apply&lt;/code&gt;. With &lt;code&gt;--apply&lt;/code&gt; it revokes what the provider has an API for (GitHub, Slack, GitLab, AWS) and then checks that the provider now rejects the key. Everything else gets an ordered runbook with the dashboard link.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where it runs.&lt;/strong&gt; CLI, a pre-commit hook that refuses a commit adding a key in a fraction of a second, and a GitHub Action. On pull requests the action fails only on secrets the PR adds, annotates the lines, and keeps one summary comment up to date.&lt;/p&gt;

&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%2F4dv8pn7cfm92fiuobdd1.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%2F4dv8pn7cfm92fiuobdd1.png" alt="Pre-commit hook refusing a commit" width="800" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That PR check is where my own tool turned out to be weakest.&lt;/p&gt;

&lt;h2&gt;
  
  
  Attacking it
&lt;/h2&gt;

&lt;p&gt;A scanner reads files it doesn't control, and in CI it runs next to tokens. That makes it a decent target, so I spent a day trying to break Tripwire the way a hostile contributor would.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. A pull request could switch the check off
&lt;/h3&gt;

&lt;p&gt;Tripwire honors a &lt;code&gt;.tripwireignore&lt;/code&gt; file and a baseline file so teams can adopt it on an old codebase without a wall of red. Both are files in the repo, so a pull request can edit them. A PR that adds a key and also ignores the file it sits in gets a green check.&lt;/p&gt;

&lt;p&gt;I tried 8 variations of this, and 7 of them got through. Now a PR cannot change its own ignore rules or baseline to hide a finding, and anything hidden by an inline &lt;code&gt;tripwire:ignore&lt;/code&gt; comment is listed in the report so a reviewer can see it.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. A symlink read files outside the repo
&lt;/h3&gt;

&lt;p&gt;The scanner walks the repo and reads text files. A symlink pointing outside the repo was followed, so scanning a hostile repo meant reading files from the machine doing the scan. That's fixed, so a symlink can't pull the scanner outside the repo.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. One crafted file froze it for 22 seconds
&lt;/h3&gt;

&lt;p&gt;A single file I built on purpose made the scanner hang for 22 seconds. For a pre-commit hook that should finish in a fraction of a second, that's a broken tool. It's fixed, and that file is now a test case.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. The local API was reachable from the same Wi-Fi
&lt;/h3&gt;

&lt;p&gt;The web UI talks to a local API with endpoints that scan repos and can trigger revocation. It was reachable by anyone on the same network. Revocation does nothing unless &lt;code&gt;apply&lt;/code&gt; is exactly &lt;code&gt;true&lt;/code&gt;, but a stranger at a coffee shop shouldn't be able to ask your machine to scan anything. It's fixed, so other machines on the network can't use it.&lt;/p&gt;

&lt;p&gt;Each fix has a regression test.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where it falls short
&lt;/h2&gt;

&lt;p&gt;On provider coverage Tripwire is level with Gitleaks. Using TruffleHog's detector tests (743 providers with example credentials), Tripwire recognizes 347 and Gitleaks recognizes 351. TruffleHog covers far more. My own benchmark corpus is written by me, so I treat it as a regression gate and not a ranking.&lt;/p&gt;

&lt;p&gt;It won't stop a platform breach like Railway's, and it can't see secrets that exist only in a platform's dashboard. It cleans up the repo side of the mess and makes the response less chaotic.&lt;/p&gt;

&lt;p&gt;Automatic revocation has only been tested against stubbed provider responses, not live accounts. If you try &lt;code&gt;--apply&lt;/code&gt;, use a throwaway token first. AWS keys are deactivated and not deleted, and the undo command is printed and logged.&lt;/p&gt;

&lt;h2&gt;
  
  
  Come break it
&lt;/h2&gt;

&lt;p&gt;Tripwire is a few days old and MIT licensed. False positives, missed providers and strange repos are all welcome.&lt;/p&gt;

&lt;p&gt;Two questions for the comments:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which provider should I add next?&lt;/li&gt;
&lt;li&gt;What's the sneakiest way you've seen a CI check get bypassed?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/X3PH1RE/tripwire" rel="noopener noreferrer"&gt;https://github.com/X3PH1RE/tripwire&lt;/a&gt;&lt;br&gt;
npm: &lt;a href="https://www.npmjs.com/package/tripwire-scan" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/tripwire-scan&lt;/a&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>opensource</category>
      <category>devops</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
