<?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: Liam Romanis</title>
    <description>The latest articles on DEV Community by Liam Romanis (@lromanis).</description>
    <link>https://dev.to/lromanis</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3936947%2Fa3f407c9-33fe-4d0b-805e-2921952f8e89.png</url>
      <title>DEV Community: Liam Romanis</title>
      <link>https://dev.to/lromanis</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lromanis"/>
    <language>en</language>
    <item>
      <title>I Built an Agentic Linux Security Tool. It Took Way More Iterations Than I Expected.</title>
      <dc:creator>Liam Romanis</dc:creator>
      <pubDate>Sun, 17 May 2026 23:53:51 +0000</pubDate>
      <link>https://dev.to/lromanis/i-built-an-agentic-linux-security-tool-it-took-way-more-iterations-than-i-expected-30nk</link>
      <guid>https://dev.to/lromanis/i-built-an-agentic-linux-security-tool-it-took-way-more-iterations-than-i-expected-30nk</guid>
      <description>&lt;p&gt;This started as a simple experiment: can you point an AI at a Linux system, have it collect forensic data, and get something more useful than a wall of text back?&lt;/p&gt;

&lt;p&gt;The answer, it turns out, is yes — but not in the way I originally thought, and not without a lot of iteration to get there.&lt;/p&gt;




&lt;h2&gt;
  
  
  How It Started
&lt;/h2&gt;

&lt;p&gt;The initial idea was straightforward. Run a bunch of forensic commands — process lists, open sockets, SUID binaries, kernel modules, log anomalies, the usual — pipe the output to Claude, and get a triage report back. Simple agentic loop. Collect, analyse, report.&lt;/p&gt;

&lt;p&gt;And that bit worked fine. Claude is actually pretty good at reading &lt;code&gt;ps auxf&lt;/code&gt; output and spotting things that look wrong. Better than I expected, honestly.&lt;/p&gt;

&lt;p&gt;The problem was what happened next. You'd get a list of findings and then... nothing. The same problem every security tool has. Here are some things that look suspicious. Good luck. The AI had done the easy bit and left you to figure out the hard bit on your own.&lt;/p&gt;

&lt;p&gt;That's not really agentic. That's just automation with a language model bolted on.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Interesting Problem
&lt;/h2&gt;

&lt;p&gt;What I actually wanted was an AI that could &lt;em&gt;investigate&lt;/em&gt; alongside you. Not just flag things, but help you work through whether a finding is real, what to do about it, and whether the remediation you're considering is going to cause more problems than it solves.&lt;/p&gt;

&lt;p&gt;The challenge is that investigation requires running commands on the live system. And if you're going to run commands on a live system based on AI suggestions, you absolutely cannot have those commands run automatically. The AI will get things wrong. The AI will suggest things that sound reasonable but aren't appropriate for your specific setup. The AI will, if you let it, suggest hardening measures that stop your system from booting.&lt;/p&gt;

&lt;p&gt;That last one happened. Not in a catastrophic way, but enough to make the point very clearly: you need a human in the loop, and that human needs to actually understand what they're approving.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Man-in-the-Loop Pattern
&lt;/h2&gt;

&lt;p&gt;What emerged after a lot of iteration is a batch investigation loop that goes like this:&lt;/p&gt;

&lt;p&gt;Claude analyses a finding and proposes a set of verification or remediation commands — typically three to six per round. These are displayed to you with a type badge (VERIFY, REMEDIATE, or INSTALL), a plain-English description of what the command does, the rationale for why it's useful, and — critically for anything that could affect system stability — a rollback command so you know how to undo it.&lt;/p&gt;

&lt;p&gt;You review all of them. You can deselect any you don't want. You can ask Claude questions about any command before approving it — "what does this actually do", "is there a safer alternative", "why is this necessary" — and get a direct answer in context.&lt;/p&gt;

&lt;p&gt;Then you click run. The approved commands execute sequentially, the output comes back, and Claude analyses everything together in one consolidated response rather than reacting to each command individually. If it needs more information, it proposes another batch. If it has enough to make a determination, it gives you a verdict and action buttons: confirm as false positive, keep as active finding, mark resolved.&lt;/p&gt;

&lt;p&gt;It took a lot of iterations to get this feeling natural. The early versions had Claude proposing one command at a time, which created an exhausting back-and-forth. Batch proposals with a single analysis pass work much better. The thread also has a tendency to grow unwieldy, so completed investigation rounds collapse into summaries.&lt;/p&gt;




&lt;h2&gt;
  
  
  The False Positive Problem
&lt;/h2&gt;

&lt;p&gt;Something that became obvious quickly: AI-generated findings are going to overlap with things you already know about and have decided to accept. Your custom SSH port. Your pentest tooling. The forensic agent's own token file sitting in /tmp.&lt;/p&gt;

&lt;p&gt;The tool has a false positive management system that goes beyond a simple whitelist. It uses fuzzy matching — a combination of token-based Jaccard similarity and longest-common-subsequence ratio — so that when Claude words a finding slightly differently on the next scan, it still gets suppressed. There's also a session-dismiss for things you want to acknowledge without permanently suppressing, and an FP audit workflow where Claude reviews your saved false positives and flags any that probably shouldn't be permanently suppressed because they could indicate real malicious activity in a different context.&lt;/p&gt;

&lt;p&gt;That last one is more useful than it sounds. "Orphaned PTY sessions" is a reasonable false positive if you left some terminals open. It's not a reasonable false positive to permanently ignore if it could also indicate someone else's session on your system.&lt;/p&gt;




&lt;h2&gt;
  
  
  Is It Any Good?
&lt;/h2&gt;

&lt;p&gt;Honestly, it's useful. More useful than I expected. For investigating real findings on a system you're responsible for, the investigation loop pattern genuinely helps — it keeps you from either ignoring things you should look at or taking action you don't understand.&lt;/p&gt;

&lt;p&gt;But let's be clear about what it isn't.&lt;/p&gt;

&lt;p&gt;It is not production ready. It is not comprehensively tested. The AI analysis is non-deterministic and occasionally wrong. The agent runs as root with minimal authentication over localhost — fine for personal use, not something you'd put in front of customers.&lt;/p&gt;

&lt;p&gt;Is it secure? No. It's a forensic tool that runs as root and executes commands you approve. Security is mostly your problem. Use it on systems you own, in environments you control, for purposes you understand.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use it at your own risk.&lt;/strong&gt; If you blindly approve every command Claude suggests without reading them, you will eventually do something you regret. The tool tries to help — boot-risk warnings, required rollback instructions for kernel changes, explicit confirmation checkboxes before anything that could affect system stability — but it cannot protect you from yourself.&lt;/p&gt;




&lt;h2&gt;
  
  
  What I Learned About Agentic Development
&lt;/h2&gt;

&lt;p&gt;The most interesting thing about building this wasn't the security tooling. It was what the development process revealed about building agentic systems in general.&lt;/p&gt;

&lt;p&gt;The gap between "AI that does a task" and "AI that works alongside a human on a task" is much larger than it looks. The first is just automation. The second requires thinking carefully about where the human needs to be in the loop, what information they need to make good decisions, and how to present AI suggestions in a way that encourages understanding rather than blind acceptance.&lt;/p&gt;

&lt;p&gt;Getting that right took a lot more iteration than I expected. The first version had the AI running ahead too fast. Later versions were too cautious and required too many clicks for simple cases. The batch proposal pattern that ended up working is something I arrived at through trial and error, not design.&lt;/p&gt;

&lt;p&gt;That feels like the honest state of agentic development right now. The patterns are still being worked out.&lt;/p&gt;




&lt;h2&gt;
  
  
  Where It Goes From Here
&lt;/h2&gt;

&lt;p&gt;It's open source under MIT: &lt;strong&gt;github.com/liamromanis101/SysForensics&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you're interested in the agentic investigation pattern, want to add checks for other distributions, want to explore what commercial-grade security tooling built on this approach would look like, or just want to kick the tyres — get in touch. I'd be genuinely happy to make this a community project if there's interest.&lt;/p&gt;

&lt;p&gt;There's a lot of room to go further with this. Better context-awareness between findings, CVE cross-referencing, fleet management, proper reporting for auditors. The foundation is there. Whether it goes anywhere depends on whether other people find the approach interesting.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;If you do try it: read the commands before you approve them. That's the whole point.&lt;/em&gt;&lt;/p&gt;

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