<?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: Sundar Shahi Thakuri</title>
    <description>The latest articles on DEV Community by Sundar Shahi Thakuri (@sundarshahi).</description>
    <link>https://dev.to/sundarshahi</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%2F294964%2Fc4b350a7-33ce-4863-88a5-efaf79706d91.png</url>
      <title>DEV Community: Sundar Shahi Thakuri</title>
      <link>https://dev.to/sundarshahi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sundarshahi"/>
    <language>en</language>
    <item>
      <title>We pointed our security tool at itself first. Its own host check had the bug we had just fixed in our mail clients</title>
      <dc:creator>Sundar Shahi Thakuri</dc:creator>
      <pubDate>Sat, 28 Nov 2026 12:56:33 +0000</pubDate>
      <link>https://dev.to/sundarshahi/we-pointed-our-security-tool-at-itself-first-its-own-host-check-had-the-bug-we-had-just-fixed-in-4epc</link>
      <guid>https://dev.to/sundarshahi/we-pointed-our-security-tool-at-itself-first-its-own-host-check-had-the-bug-we-had-just-fixed-in-4epc</guid>
      <description>&lt;p&gt;The &lt;a href="https://sundarshahithakuri.com.np/blog/pin-the-socket-to-the-address-you-checked" rel="noopener noreferrer"&gt;last post&lt;/a&gt; ended on one&lt;br&gt;
line: if the second step looks the name up again, the check proved nothing.&lt;br&gt;
Our mail clients validated a hostname and then handed the hostname to a library&lt;br&gt;
that resolved it again.&lt;/p&gt;

&lt;p&gt;After that fix we wanted one command that checks a whole product the way an&lt;br&gt;
attacker would look at it, that we could run on every repo we own, and whose&lt;br&gt;
result we could believe. Nothing we tried did all of it, so we built it:&lt;br&gt;
&lt;a href="https://github.com/sundarshahi/bughunt" rel="noopener noreferrer"&gt;bughunt&lt;/a&gt;, open source, one Rust&lt;br&gt;
binary.&lt;/p&gt;

&lt;p&gt;The first product it checked was itself. Its own fuzz target found that its&lt;br&gt;
host check accepted an address it should have refused, which is the same&lt;br&gt;
class of mistake as the mail sockets: the check and the thing that acts on the&lt;br&gt;
result disagreed about what the input meant. This post is about that bug and&lt;br&gt;
the others like it, because they are the part of a security tool that nobody&lt;br&gt;
sees and everybody relies on.&lt;/p&gt;
&lt;h2&gt;
  
  
  What it runs
&lt;/h2&gt;

&lt;p&gt;bughunt doesn't reimplement scanners. Each layer runs the best open-source&lt;br&gt;
engine for the job, pinned to a tested version, and bughunt does the part the&lt;br&gt;
engines don't: deciding what is worth a person's time, making every layer&lt;br&gt;
report in one shape, and saying plainly what did not run.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Layer&lt;/th&gt;
&lt;th&gt;Engine&lt;/th&gt;
&lt;th&gt;Finds&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;scan&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Opengrep&lt;/td&gt;
&lt;td&gt;injection, unsafe output, weak crypto, in 30+ languages&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;deps&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;osv-scanner&lt;/td&gt;
&lt;td&gt;packages with published vulnerabilities, and the version that fixes all of them&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;secrets&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;gitleaks&lt;/td&gt;
&lt;td&gt;keys and passwords in the files and in the whole git history&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;infra&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;trivy, zizmor&lt;/td&gt;
&lt;td&gt;containers, Kubernetes, cloud templates, CI workflows&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;api&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Schemathesis&lt;/td&gt;
&lt;td&gt;crashes, missing login checks, one user reading another's data (REST, GraphQL, gRPC)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;web&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;katana, nuclei&lt;/td&gt;
&lt;td&gt;SQL injection, XSS, exposed files, CORS, cookies, headers, TLS&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;fuzz&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;libFuzzer and each language's own&lt;/td&gt;
&lt;td&gt;crashes in the repo's own fuzz targets, eight languages&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;ai&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;bughunt, your AI tool&lt;/td&gt;
&lt;td&gt;prompt injection in AI features; a confined pentest agent&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;em&gt;Every layer reports in the same shape, so one command gives one report. What did not run is part of the result.&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Rule one: "did not run" is never "nothing found"
&lt;/h2&gt;

&lt;p&gt;A security tool has two ways to be wrong. It can report a problem that isn't&lt;br&gt;
there, which costs a person an hour. Or it can report nothing when it didn't&lt;br&gt;
look, which costs you the problem. The second one is silent, so it's the one to&lt;br&gt;
design against.&lt;/p&gt;

&lt;p&gt;Each of these was a real case in an early version, and each now ends in exit&lt;br&gt;
status 2 ("could not run, in whole or in part") instead of 0:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The code scanner ran out of memory. The report said "0 raw flags", exit 0.&lt;/li&gt;
&lt;li&gt;gitleaks pointed at a folder that isn't a git repo logs an error and &lt;strong&gt;exits
0&lt;/strong&gt;. Read by its exit status alone, the git history had no secrets in it.&lt;/li&gt;
&lt;li&gt;The API under test was down. The run reported one empty finding.&lt;/li&gt;
&lt;li&gt;A Go package that didn't compile was reported as "no fuzz targets".&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The rule in the code is simple: a layer either produces a report or a reason it&lt;br&gt;
couldn't, and the reason goes into the report as a section marked&lt;br&gt;
&lt;code&gt;ran: false&lt;/code&gt;. The exit status is 0 only when everything ran and found nothing.&lt;br&gt;
SARIF output says the same thing to a dashboard (&lt;code&gt;executionSuccessful: false&lt;/code&gt;),&lt;br&gt;
so a green badge can't come from a scanner that never started.&lt;/p&gt;
&lt;h2&gt;
  
  
  Rule two: the repo being checked is not trusted
&lt;/h2&gt;

&lt;p&gt;A scanned repo can talk to the scanner. Most engines read configuration from&lt;br&gt;
the folder they scan, and most honour inline comments that switch a finding&lt;br&gt;
off. That is reasonable for a team's own CI. It is wrong for a tool whose job&lt;br&gt;
is to check code someone else controls.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;The repo can...&lt;/th&gt;
&lt;th&gt;So bughunt...&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;add &lt;code&gt;nosemgrep&lt;/code&gt; comments&lt;/td&gt;
&lt;td&gt;runs Opengrep with &lt;code&gt;--disable-nosem&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ship its own &lt;code&gt;.semgrepignore&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;points the ignore file at a name that can't exist&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;mark files &lt;code&gt;export-ignore&lt;/code&gt;, so a branch export leaves them out&lt;/td&gt;
&lt;td&gt;exports a branch through a throwaway git index, not &lt;code&gt;git archive&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;carry &lt;code&gt;osv-scanner.toml&lt;/code&gt; that ignores a package&lt;/td&gt;
&lt;td&gt;passes its own empty config. In the lab, the repo's file hid a vulnerable Django; ours brought it back&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;use &lt;code&gt;.gitleaksignore&lt;/code&gt; or &lt;code&gt;gitleaks:allow&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;passes &lt;code&gt;--ignore-gitleaks-allow&lt;/code&gt; and an empty ignore file&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;include &lt;code&gt;.trivyignore&lt;/code&gt; or zizmor config&lt;/td&gt;
&lt;td&gt;passes its own ignore file and &lt;code&gt;--no-config&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;name a baseline file outside itself&lt;/td&gt;
&lt;td&gt;accepts only a plain file inside the repo&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;None of this is exotic. It's the difference between "the repo says it's fine"&lt;br&gt;
and "we checked".&lt;/p&gt;
&lt;h2&gt;
  
  
  The bug in its own host check
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;bughunt api&lt;/code&gt; and &lt;code&gt;bughunt web&lt;/code&gt; attack a running app. By default they go only&lt;br&gt;
to this machine (&lt;code&gt;localhost&lt;/code&gt;, &lt;code&gt;127.0.0.1&lt;/code&gt;, &lt;code&gt;::1&lt;/code&gt;, &lt;code&gt;*.localhost&lt;/code&gt;, &lt;code&gt;*.test&lt;/code&gt;),&lt;br&gt;
because an attack sent to the wrong host is someone else's incident. Anything&lt;br&gt;
else needs &lt;code&gt;--allow-host&lt;/code&gt;, naming a test host you own.&lt;/p&gt;

&lt;p&gt;That makes the host check a security boundary, so it has a fuzz target. The&lt;br&gt;
target feeds it arbitrary strings and asserts one property: whatever bughunt&lt;br&gt;
reads as "this machine", a browser-grade URL parser must read the same way.&lt;/p&gt;

&lt;p&gt;It found inputs like these:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://[::1]example.com/     check: local (it read the bracketed part and stopped)
http://[127.0.0.1]           check: local (an IPv4 address in IPv6 brackets)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Neither is a valid address. What a client does with one is up to that client,&lt;br&gt;
which is exactly the problem: the check and the thing that sends the requests&lt;br&gt;
were reading the same text differently. It's the mail-socket bug again, in&lt;br&gt;
another layer. The earlier version had already been caught once the classic&lt;br&gt;
way: &lt;code&gt;http://localhost:80@other-host/&lt;/code&gt; reads as localhost to a naive check and&lt;br&gt;
sends to &lt;code&gt;other-host&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The fix wasn't a better parser for odd shapes. It was to accept &lt;strong&gt;one plain&lt;br&gt;
shape&lt;/strong&gt; and refuse everything else: no login part, no escapes, nothing after a&lt;br&gt;
bracket, a port that exists, IDNA labels that decode. If an address needs&lt;br&gt;
interpretation, bughunt refuses it, and the person can write it plainly.&lt;/p&gt;
&lt;h2&gt;
  
  
  The bug in "read-only"
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;bughunt api&lt;/code&gt; is read-only by default: it should send GET requests (or GraphQL&lt;br&gt;
queries) and nothing that changes data. In version 0.2.0 that wasn't true.&lt;/p&gt;

&lt;p&gt;The engine, Schemathesis, has a coverage phase that also tries the methods an&lt;br&gt;
operation &lt;em&gt;doesn't&lt;/em&gt; list, to see whether the server answers them correctly.&lt;br&gt;
That is a good check. It also meant DELETE, POST, PUT and PATCH went out, with&lt;br&gt;
the login token, on a run that said it would only read.&lt;/p&gt;

&lt;p&gt;An independent review of 0.2.0 found it, and we proved it the only way that&lt;br&gt;
counts: a small recording server that logs every request it receives. 0.2.0&lt;br&gt;
sent seven different methods to it. The fix (switching that probing off unless&lt;br&gt;
&lt;code&gt;--write&lt;/code&gt; or &lt;code&gt;--full&lt;/code&gt; is given, in a settings file bughunt always passes)&lt;br&gt;
sends GET only. Recording servers for REST, GraphQL and gRPC now run in CI and&lt;br&gt;
check what each mode really sends: GET only by default, queries only for&lt;br&gt;
GraphQL, nothing at all for a gRPC run that wasn't allowed to write.&lt;/p&gt;

&lt;p&gt;We had run 0.2.0 against a development copy of our own API, so we read the&lt;br&gt;
database logs for that window, statement by statement. The only change those&lt;br&gt;
requests made was signing one development user out everywhere. The release notes for&lt;br&gt;
0.3.0 open with this, under "Security: upgrade from 0.2.0".&lt;/p&gt;

&lt;p&gt;The lesson we took is that a security tool's flags are claims, and a claim&lt;br&gt;
needs a test that watches what actually goes out on the wire, not a test that&lt;br&gt;
reads what the tool was configured to do.&lt;/p&gt;
&lt;h2&gt;
  
  
  Other things it got wrong about itself
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;What&lt;/th&gt;
&lt;th&gt;Found by&lt;/th&gt;
&lt;th&gt;Now&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;A proxy variable could carry every request, and the token, to another host&lt;/td&gt;
&lt;td&gt;review&lt;/td&gt;
&lt;td&gt;proxy settings are removed for local targets&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A &lt;code&gt;schemathesis.toml&lt;/code&gt; in the working folder was obeyed, and it can load code&lt;/td&gt;
&lt;td&gt;review&lt;/td&gt;
&lt;td&gt;bughunt always passes its own settings file&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;$ref: https://…&lt;/code&gt; in an API description fetched part of itself from elsewhere&lt;/td&gt;
&lt;td&gt;review&lt;/td&gt;
&lt;td&gt;refused&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;The login token was visible to every program bughunt ran, including a repo's own fuzz targets&lt;/td&gt;
&lt;td&gt;review&lt;/td&gt;
&lt;td&gt;taken out of the environment at start, passed only to the engine that needs it&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A secret found by reading the code was printed in full in the report&lt;/td&gt;
&lt;td&gt;building the lab&lt;/td&gt;
&lt;td&gt;masked; a test proves it never appears&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A file name with terminal escape codes could forge lines in the text report&lt;/td&gt;
&lt;td&gt;review&lt;/td&gt;
&lt;td&gt;control characters replaced in text, everything escaped in HTML; a fuzz target on the report writer keeps it that way&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;
&lt;h2&gt;
  
  
  Proof is a score, not a claim: the lab
&lt;/h2&gt;

&lt;p&gt;"It finds SQL injection" means nothing without a denominator. So bughunt ships&lt;br&gt;
a lab: a small shop that is vulnerable on purpose, built into the binary, with&lt;br&gt;
an answer key of 21 planted holes across every layer. SQL injection, reflected&lt;br&gt;
XSS, an API route with no login check, one user reading another's order, an&lt;br&gt;
exposed &lt;code&gt;.env&lt;/code&gt;, a secret that lives only in git history, a privileged pod, a&lt;br&gt;
public bucket, a workflow that runs pull-request code with write access, a&lt;br&gt;
parser that crashes, an AI assistant that follows injected instructions, and&lt;br&gt;
the rest.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;bughunt lab&lt;/code&gt; writes the shop, gives it a git history, starts it, runs every&lt;br&gt;
layer against it and scores the result: &lt;strong&gt;found&lt;/strong&gt;, &lt;strong&gt;missed&lt;/strong&gt;, or &lt;strong&gt;not&lt;br&gt;
tested&lt;/strong&gt; (the layer that would find it didn't run). Missing one exits 1; not&lt;br&gt;
testing one exits 2.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ bughunt lab
21 of 21 planted holes found
0 missed · 0 not tested · 38 more findings the answer key does not list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;CI runs the lab on every change, on a clean Linux machine with every engine&lt;br&gt;
installed from scratch, and fails unless the score is 21 of 21. A change that&lt;br&gt;
makes bughunt quieter has to keep it finding what it found.&lt;/p&gt;

&lt;h2&gt;
  
  
  AI features, and an AI pentester on a short leash
&lt;/h2&gt;

&lt;p&gt;The AI layer has two parts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prompt-injection tests&lt;/strong&gt; send eight attacks to the app's chat endpoint, each a&lt;br&gt;
different way of smuggling instructions into a message, and each carrying a&lt;br&gt;
fresh random marker. A finding needs the marker to come back in the form the&lt;br&gt;
attack asked for, so a model that only talks &lt;em&gt;about&lt;/em&gt; the attack doesn't&lt;br&gt;
count. Markdown images and raw HTML in an answer are rated high,&lt;br&gt;
because rendering them is how injected text turns into a request to someone&lt;br&gt;
else's server.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The pentest agent&lt;/strong&gt; runs on the AI tool the person already has (Claude Code,&lt;br&gt;
Codex, Gemini CLI or Copilot CLI), on their own subscription. It gets read&lt;br&gt;
access to the repo and exactly one way to reach the app: &lt;code&gt;bughunt probe&lt;/code&gt;,&lt;br&gt;
which sends one request, only to the app under test, only with methods the&lt;br&gt;
run allows, and records it. Everything else (a general shell, web access, file&lt;br&gt;
writes) is held back through each tool's own permission settings. We checked&lt;br&gt;
that on Claude Code by telling it to use curl and to write a file: both were&lt;br&gt;
refused.&lt;/p&gt;

&lt;p&gt;When it reports a finding, the finding must cite the ids of recorded probes.&lt;br&gt;
A claim with no recorded request behind it is listed as &lt;strong&gt;unproven&lt;/strong&gt;, not as a&lt;br&gt;
finding. When the model declines the task, which one did on its first run, the&lt;br&gt;
report says "declined" rather than "nothing found".&lt;/p&gt;

&lt;h2&gt;
  
  
  What it found in our own products
&lt;/h2&gt;

&lt;p&gt;We ran it on every repo we own the day it worked. Most of what a scanner flags&lt;br&gt;
is noise, so every candidate on the shortlist was read by a person before&lt;br&gt;
anything was called a bug.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Our CRM's API:&lt;/strong&gt; 751 operations, 9,154 requests, 25 minutes, against a
throwaway database: &lt;strong&gt;zero server errors&lt;/strong&gt;. The report also says what it didn't
really reach. 279 operations only ever answered "not found" (random ids,
thin seed data) and 79 only answered "not allowed" (operator endpoints need
another login). So about 390 were exercised, not 751.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Both Rails backends:&lt;/strong&gt; every candidate on the code-reading shortlist was
read by a person (201 in one, 229 in the other). None was a real bug.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://github.com/sundarshahi/parda" rel="noopener noreferrer"&gt;parda&lt;/a&gt;,&lt;/strong&gt; our open-source proxy
that masks secrets before they reach an AI agent: fuzzing found that a long
run of digits took cubic time (8 KB of numbers stalled it for 70 seconds in
a debug build), and that a secret found by its name (&lt;code&gt;DB_PASSWORD=x&lt;/code&gt;) wasn't
masked where the same value appeared again on its own. Both are fixed, and
its fuzz targets now run in its CI.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  In a terminal
&lt;/h2&gt;

&lt;p&gt;The last piece is the one people see first. Typed with no command in a repo,&lt;br&gt;
&lt;code&gt;bughunt&lt;/code&gt; says what can run there (which engines are installed, whether a&lt;br&gt;
running app is needed) and offers the choices as the commands they are.&lt;br&gt;
&lt;code&gt;audit&lt;/code&gt; and &lt;code&gt;lab&lt;/code&gt; show each layer as it runs and what has been found so far.&lt;br&gt;
&lt;code&gt;s&lt;/code&gt; skips a layer and &lt;code&gt;ctrl-c&lt;/code&gt; stops while keeping what ran. Either way the&lt;br&gt;
layer is reported as not run, so a later retest can't call its findings fixed.&lt;br&gt;
At the end there's a summary and &lt;code&gt;report.html&lt;/code&gt; and &lt;code&gt;report.json&lt;/code&gt;, saved for the&lt;br&gt;
next retest.&lt;/p&gt;

&lt;p&gt;The screens appear only when a person is watching. In a pipe, a file or CI,&lt;br&gt;
bughunt prints the plain report, with the same exit status. A script never&lt;br&gt;
gets a screen it didn't ask for.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it doesn't do yet
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Log in to a web app before crawling it. The web layer sees what a visitor
without an account sees.&lt;/li&gt;
&lt;li&gt;WebSockets and streaming gRPC calls.&lt;/li&gt;
&lt;li&gt;Windows.&lt;/li&gt;
&lt;li&gt;The pentest agent, end to end, on every AI tool. One declined; the others
haven't been run against the lab yet.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The decisions, and what set each one
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Decision&lt;/th&gt;
&lt;th&gt;The constraint that set it&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Run the best engine per layer, pinned&lt;/td&gt;
&lt;td&gt;rewriting a scanner is years of work; pinning makes a result repeatable&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Exit 2 for "did not run", in whole or in part&lt;/td&gt;
&lt;td&gt;silence is the expensive failure; a dashboard must tell "clean" from "didn't start"&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Override every repo-side ignore mechanism&lt;/td&gt;
&lt;td&gt;the scanned repo is the thing being checked, not a party to the check&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;One plain address shape, refuse the rest&lt;/td&gt;
&lt;td&gt;a host check and an HTTP client that parse differently is the bug we had just fixed elsewhere&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Test what goes out on the wire&lt;/td&gt;
&lt;td&gt;"read-only" was configured and still wasn't&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A lab with an answer key, required in CI&lt;/td&gt;
&lt;td&gt;a detection claim needs a denominator, and a regression needs to fail a build&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;An agent's claim must cite recorded requests&lt;/td&gt;
&lt;td&gt;a model can describe an attack it never made&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Screens only when a person is watching&lt;/td&gt;
&lt;td&gt;scripts and CI depend on the plain output and the exit status&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;A security tool is a program that makes claims about other programs: this is&lt;br&gt;
safe, this was checked, this is read-only. Those claims deserve the same&lt;br&gt;
treatment as the code it checks. Fuzz them, record what actually happens, and&lt;br&gt;
keep a score.&lt;/p&gt;

&lt;p&gt;bughunt is MIT or Apache-2.0, on&lt;br&gt;
&lt;a href="https://github.com/sundarshahi/bughunt" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;, with docs at&lt;br&gt;
&lt;a href="https://sundarshahi.github.io/bughunt/" rel="noopener noreferrer"&gt;sundarshahi.github.io/bughunt&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;First published at &lt;a href="https://sundarshahithakuri.com.np/blog/we-pointed-our-security-tool-at-itself-first" rel="noopener noreferrer"&gt;sundarshahithakuri.com.np&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>rust</category>
      <category>opensource</category>
      <category>testing</category>
    </item>
  </channel>
</rss>
