<?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: Ri Piao</title>
    <description>The latest articles on DEV Community by Ri Piao (@pr7426).</description>
    <link>https://dev.to/pr7426</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%2F4185148%2F6d0236e8-75db-4413-bc6c-7403f1d84201.png</url>
      <title>DEV Community: Ri Piao</title>
      <link>https://dev.to/pr7426</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pr7426"/>
    <language>en</language>
    <item>
      <title>Phantom Shell — a haunted terminal possessed by a local open-weight model</title>
      <dc:creator>Ri Piao</dc:creator>
      <pubDate>Wed, 28 Oct 2026 06:41:51 +0000</pubDate>
      <link>https://dev.to/pr7426/phantom-shell-a-haunted-terminal-possessed-by-a-local-open-weight-model-d56</link>
      <guid>https://dev.to/pr7426/phantom-shell-a-haunted-terminal-possessed-by-a-local-open-weight-model-d56</guid>
      <description>&lt;h1&gt;
  
  
  Phantom Shell 👻 — Ghost in the Machine (Hacktoberfest 2026 Week 4)
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Challenge:&lt;/strong&gt; &lt;code&gt;#devchallenge&lt;/code&gt; &lt;code&gt;#hf26challenge&lt;/code&gt; — Week 4 &lt;em&gt;Ghost in the Machine&lt;/em&gt;&lt;br&gt;&lt;br&gt;
&lt;strong&gt;Author:&lt;/strong&gt; Ri Piao · X &lt;a href="https://x.com/pr742674" rel="noopener noreferrer"&gt;@pr742674&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  What I built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Phantom Shell&lt;/strong&gt; is a CLI that lets an open-weight model &lt;em&gt;possess&lt;/em&gt; your terminal.&lt;/p&gt;

&lt;p&gt;You run a normal shell command. The phantom — a local model via &lt;a href="https://ollama.com" rel="noopener noreferrer"&gt;Ollama&lt;/a&gt; — whispers a short, eerie commentary about what you just did. You can also chat with it, or drop into &lt;code&gt;possess&lt;/code&gt; mode: an interactive haunted REPL.&lt;/p&gt;

&lt;p&gt;If Ollama is not installed, a built-in &lt;strong&gt;mock ghost&lt;/strong&gt; still demos the full UX so judges (and you) can try it offline in seconds.&lt;/p&gt;

&lt;p&gt;Theme take: the “ghost” should live &lt;em&gt;in the machine&lt;/em&gt; — open weights, local inference, no cloud API key. Privacy is the haunting.&lt;/p&gt;
&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/pr7426/ghost-in-the-machine.git
&lt;span class="nb"&gt;cd &lt;/span&gt;ghost-in-the-machine
python3 &lt;span class="nt"&gt;-m&lt;/span&gt; phantom_shell demo
&lt;span class="c"&gt;# or:&lt;/span&gt;
./scripts/demo.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Interactive:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python3 &lt;span class="nt"&gt;-m&lt;/span&gt; phantom_shell possess
&lt;span class="c"&gt;# phantom&amp;gt; echo boo&lt;/span&gt;
&lt;span class="c"&gt;# phantom&amp;gt; .chat Who are you?&lt;/span&gt;
&lt;span class="c"&gt;# phantom&amp;gt; .quit&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With a real local model:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ollama pull llama3.2
python3 &lt;span class="nt"&gt;-m&lt;/span&gt; phantom_shell possess &lt;span class="nt"&gt;--model&lt;/span&gt; llama3.2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Sample transcript (checked into the repo): &lt;code&gt;demo/sample_session.txt&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Repository
&lt;/h2&gt;

&lt;p&gt;🔗 &lt;strong&gt;Repo:&lt;/strong&gt; &lt;a href="https://github.com/pr7426/ghost-in-the-machine" rel="noopener noreferrer"&gt;https://github.com/pr7426/ghost-in-the-machine&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;License: &lt;strong&gt;MIT&lt;/strong&gt; · Language: Python 3.10+ · Deps: &lt;strong&gt;stdlib only&lt;/strong&gt; for core&lt;/p&gt;

&lt;h2&gt;
  
  
  Open-source AI used
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Piece&lt;/th&gt;
&lt;th&gt;Detail&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Serving&lt;/td&gt;
&lt;td&gt;Ollama (&lt;code&gt;/api/chat&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Model&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;llama3.2&lt;/code&gt; by default (any Ollama open model works: &lt;code&gt;phi3&lt;/code&gt;, &lt;code&gt;qwen2.5&lt;/code&gt;, &lt;code&gt;gemma2&lt;/code&gt;, …)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Offline&lt;/td&gt;
&lt;td&gt;Mock ghost when Ollama is down&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Optional path&lt;/td&gt;
&lt;td&gt;llama.cpp / GGUF via Ollama or a local server (&lt;code&gt;--host&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;No closed SaaS LLM is required for the core experience.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why open innovation matters (here)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Offline &amp;amp; private&lt;/strong&gt; — command context and chat stay on-device; great for a personal shell.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Swappable weights&lt;/strong&gt; — one flag changes the soul of the ghost; community models welcome.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hackable&lt;/strong&gt; — tiny stdlib client, MIT, easy to fork into prompts, tools, or a full agentic shell.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Inclusive demos&lt;/strong&gt; — mock mode means anyone can run the challenge submission without a GPU.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Open weights turn “AI feature” into something you can &lt;em&gt;own&lt;/em&gt;, inspect, and remix — which is the point of a Ghost that lives in &lt;em&gt;your&lt;/em&gt; machine.&lt;/p&gt;




&lt;p&gt;Thanks Hacktoberfest + DEV for Week 4 — may your shells stay haunted. 🎃&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
      <category>hacktoberfest</category>
      <category>opensource</category>
    </item>
    <item>
      <title>HermesSec: Turning Open-Weight Gemma &amp; AST Triage into a $149 Freelance Security Audit Side Hustle</title>
      <dc:creator>Ri Piao</dc:creator>
      <pubDate>Wed, 14 Oct 2026 18:21:12 +0000</pubDate>
      <link>https://dev.to/pr7426/hermessec-turning-open-weight-gemma-ast-triage-into-a-149-freelance-security-audit-side-hustle-1h77</link>
      <guid>https://dev.to/pr7426/hermessec-turning-open-weight-gemma-ast-triage-into-a-149-freelance-security-audit-side-hustle-1h77</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-week2-2026-10-12"&gt;Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;Indie SaaS founders, vibe-coders, and small dev agencies ship payment and authentication code at breakneck speed. They cannot afford a traditional $15,000 penetration test before launching, yet a single SQL injection (&lt;code&gt;CWE-89&lt;/code&gt;), hardcoded production secret (&lt;code&gt;CWE-798&lt;/code&gt;), or &lt;code&gt;shell=True&lt;/code&gt; command execution (&lt;code&gt;CWE-78&lt;/code&gt;) can wipe out their business overnight.&lt;/p&gt;

&lt;p&gt;On the flip side, freelance security practitioners want to offer affordable &lt;strong&gt;$149 Express Pre-Launch Code Audits&lt;/strong&gt;—but manually reviewing snippets, mapping CWE identifiers, and writing copy-pasteable remediation patches takes hours of unbilled effort.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HermesSec&lt;/strong&gt; bridges this gap. Inspired by the &lt;strong&gt;Hermes / OpenClaw&lt;/strong&gt; multi-agent task decomposition workflow, it combines deterministic Python AST (Abstract Syntax Tree) pre-triage with &lt;strong&gt;Google Gemma&lt;/strong&gt; open-weight models, &lt;strong&gt;Backboard&lt;/strong&gt;'s stateful thread memory (&lt;code&gt;memory="Auto"&lt;/code&gt;), and &lt;strong&gt;Render&lt;/strong&gt; cloud hosting to generate line-accurate, client-ready security audit reports in seconds.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Live App on Render&lt;/strong&gt;: &lt;a href="https://hermes-sec-audit.onrender.com/" rel="noopener noreferrer"&gt;https://hermes-sec-audit.onrender.com/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Try it live&lt;/strong&gt;: Click &lt;strong&gt;Sample 1 (SQLi + Secret)&lt;/strong&gt; or &lt;strong&gt;Sample 2 (RCE / Command Inj)&lt;/strong&gt;, or paste your own custom Python code—the AST engine + Gemma pipeline will dynamically detect the exact line numbers and generate a tailored patch!&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%2Fi1yvq0nbv1ui1dgc4tox.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%2Fi1yvq0nbv1ui1dgc4tox.png" alt=" " width="800" height="614"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub Repository&lt;/strong&gt;: &lt;a href="https://github.com/pr7426/hermes-sec-audit/tree/main" rel="noopener noreferrer"&gt;https://github.com/pr7426/hermes-sec-audit/tree/main&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Includes &lt;code&gt;app.py&lt;/code&gt; (FastAPI + AST Triage + Backboard &lt;code&gt;/api/threads/messages&lt;/code&gt; + Local Ollama &lt;code&gt;/api/chat&lt;/code&gt;), &lt;code&gt;Dockerfile&lt;/code&gt;, and &lt;code&gt;render.yaml&lt;/code&gt; Blueprint.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;HermesSec uses a three-stage sub-agent architecture designed for zero-hallucination reliability:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Sub-Agent 1 — Deterministic Python AST &amp;amp; Regex Triage&lt;/strong&gt;: Parses incoming source code into an Abstract Syntax Tree (&lt;code&gt;ast.walk&lt;/code&gt;) to pinpoint exact line numbers for dangerous sinks (&lt;code&gt;eval&lt;/code&gt;, &lt;code&gt;exec&lt;/code&gt;, &lt;code&gt;pickle.loads&lt;/code&gt;, &lt;code&gt;subprocess&lt;/code&gt; with &lt;code&gt;shell=True&lt;/code&gt;, raw SQL string interpolation, and hardcoded secrets).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sub-Agent 2 — Google Gemma Remediation Engine&lt;/strong&gt;: Feeds the structured AST findings into open-weight &lt;code&gt;gemma-2-9b-it&lt;/code&gt; (via Backboard or local Ollama &lt;code&gt;/api/chat&lt;/code&gt;) to synthesize drop-in secure refactoring code and executive risk summaries.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sub-Agent 3 — Backboard Stateful Memory &amp;amp; Model Benchmark&lt;/strong&gt;: Uses Backboard's &lt;code&gt;POST https://app.backboard.io/api/threads/messages&lt;/code&gt; endpoint with &lt;code&gt;X-API-Key&lt;/code&gt; and &lt;code&gt;memory="Auto"&lt;/code&gt; to retain recurring CWE context across audit threads and compare &lt;code&gt;google/gemma-2-9b-it&lt;/code&gt; against &lt;code&gt;qwen-2.5-coder-7b-instruct&lt;/code&gt; side-by-side.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;p&gt;A freelance code auditing business &lt;strong&gt;cannot&lt;/strong&gt; be built on closed commercial AI APIs for three practical reasons:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Client NDA &amp;amp; Source Code Privacy&lt;/strong&gt;: Paying clients will never allow proprietary authentication or checkout code to be sent to closed-source frontier providers that retain prompts for training. Because HermesSec supports open-weight &lt;strong&gt;Gemma&lt;/strong&gt; via local Ollama (&lt;code&gt;http://localhost:11434/api/chat&lt;/code&gt;) or controlled endpoints, sensitive client code stays completely private.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No False-Positive Safety Refusals on Security Code&lt;/strong&gt;: Closed commercial APIs frequently refuse to analyze legitimate SQL injection queries, XSS sinks, or command-injection snippets due to overly aggressive refusal guardrails. Open-weight models like &lt;strong&gt;Gemma&lt;/strong&gt; let security engineers inspect and patch real vulnerabilities without arbitrary blocks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;99% Gross Margin Unit Economics&lt;/strong&gt;: Running a 9B open-weight model combined with local AST pre-filtering costs less than &lt;code&gt;$0.0003&lt;/code&gt; per audit, making a fixed-price &lt;strong&gt;$149 micro-audit&lt;/strong&gt; highly profitable from day one.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  My First User
&lt;/h2&gt;

&lt;p&gt;I put the live Render deployment in front of a fellow developer and content creator who launches web apps and social e-commerce tools.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;How it went&lt;/strong&gt;: They pasted a real backend utility script into HermesSec. Within 2 seconds, the tool flagged a hardcoded token and an unvalidated query line by exact line number, outputting the parameterized replacement code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Would they pay?&lt;/strong&gt;: They said paying a flat $99–$149 for a verified pre-launch security sign-off before opening public access is an easy "yes" compared to enterprise consulting rates.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;What they asked for next&lt;/strong&gt;: Automatic GitHub Pull Request webhook integration and downloadable PDF certificates they can show to their customers.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Render&lt;/strong&gt;: Deployed the containerized FastAPI + multi-agent runtime on Render using a native &lt;code&gt;Dockerfile&lt;/code&gt; and &lt;code&gt;render.yaml&lt;/code&gt; Blueprint.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Gemma&lt;/strong&gt;: Used Google's open-weight &lt;strong&gt;Gemma&lt;/strong&gt; (&lt;code&gt;gemma-2-9b-it&lt;/code&gt; / &lt;code&gt;gemma2:9b&lt;/code&gt;) as the primary vulnerability explanation and secure patch synthesis model.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Best Use of Backboard&lt;/strong&gt;: Integrated Backboard's &lt;code&gt;POST /api/threads/messages&lt;/code&gt; API with &lt;code&gt;X-API-Key&lt;/code&gt; and &lt;code&gt;memory="Auto"&lt;/code&gt; to maintain stateful audit memory and compare open-weight models (&lt;code&gt;gemma-2-9b-it&lt;/code&gt; vs &lt;code&gt;qwen-2.5-coder&lt;/code&gt;) through a single key.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devchallenge</category>
      <category>hf26challenge</category>
      <category>opensource</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
