<?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: Alex72-py</title>
    <description>The latest articles on DEV Community by Alex72-py (@alex72py).</description>
    <link>https://dev.to/alex72py</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%2F3924888%2Fd6b0ced1-6031-4df7-9f31-c1762cc7dde1.png</url>
      <title>DEV Community: Alex72-py</title>
      <link>https://dev.to/alex72py</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/alex72py"/>
    <language>en</language>
    <item>
      <title>I Audited an AI Chatbot's Sandbox Like a Black-Box Linux Machine</title>
      <dc:creator>Alex72-py</dc:creator>
      <pubDate>Sun, 07 Jun 2026 15:33:07 +0000</pubDate>
      <link>https://dev.to/alex72py/i-audited-an-ai-chatbots-sandbox-like-a-black-box-linux-machine-bhe</link>
      <guid>https://dev.to/alex72py/i-audited-an-ai-chatbots-sandbox-like-a-black-box-linux-machine-bhe</guid>
      <description>&lt;p&gt;I spent 6 hours doing something that probably says worrying things about my hobbies.&lt;/p&gt;

&lt;p&gt;Instead of using Kimi 2.6 Instant as a chatbot, I treated it like an unfamiliar Linux machine I'd just SSH'd into. No jailbreaks, no prompt injection, nothing sketchy. Just passive observation and measurement from inside the provided environment.&lt;/p&gt;

&lt;p&gt;What I found was more interesting than expected.&lt;/p&gt;




&lt;h2&gt;
  
  
  Background: Why Ignore the Model's Self-Descriptions?
&lt;/h2&gt;

&lt;p&gt;Early on I noticed something: what the model &lt;em&gt;says&lt;/em&gt; it can do and what the runtime &lt;em&gt;actually&lt;/em&gt; allows aren't always the same thing.&lt;/p&gt;

&lt;p&gt;You'll hear:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"I don't have internet access."&lt;/em&gt;&lt;br&gt;
&lt;em&gt;"I can't access system information."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Both can be true at the product layer while sitting on top of something much more capable underneath.&lt;/p&gt;

&lt;p&gt;So I stopped asking and started measuring instead.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Infrastructure
&lt;/h2&gt;

&lt;p&gt;First surprise: this doesn't feel like a tiny chat runtime.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Host:&lt;/strong&gt; Alibaba Cloud, LifseaOS&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Kernel:&lt;/strong&gt; &lt;code&gt;Linux 5.10.134-18.0.10.lifsea8.x86_64&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CPU:&lt;/strong&gt; Intel Xeon Platinum, 2 logical cores (cgroup throttled — 61 throttle events logged under stress)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;RAM:&lt;/strong&gt; Hard OOM kill at exactly 3,221,225,472 bytes. No swap.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Execution:&lt;/strong&gt; Kubernetes Pod, Burstable QoS class&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is real cloud infrastructure, not a toy backend.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Credential Finding
&lt;/h2&gt;

&lt;p&gt;Most straightforward discovery:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cat&lt;/span&gt; /proc/self/environ | &lt;span class="nb"&gt;tr&lt;/span&gt; &lt;span class="s1"&gt;'\0'&lt;/span&gt; &lt;span class="s1"&gt;'\n'&lt;/span&gt; | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-i&lt;/span&gt; pass
&lt;span class="c"&gt;# SSH_PASSWORD=sshpassword&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Hardcoded SSH credential sitting in the process environment. Visible to anyone reading their own &lt;code&gt;/proc/self/environ&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Not exploitable in any meaningful way given the network restrictions. But it's a classic container misconfiguration worth documenting.&lt;/p&gt;




&lt;h2&gt;
  
  
  Disk Layout
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;vda (40GB)
├─ vda1    1MB     BIOS boot
├─ vda2    127MB   EFI/boot
├─ vda3    384MB   Boot partition
├─ vda4    9.5GB   Host root
└─ vda5    30GB    /mnt — ext4, shared with host ← persistent
vdb         1GB    Unmounted
vdc        13GB    Unmounted
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Key finding: &lt;strong&gt;&lt;code&gt;/mnt&lt;/code&gt; survives pod restarts.&lt;/strong&gt; It's a real ext4 partition shared with the host. The OverlayFS root is ephemeral. &lt;code&gt;/mnt/agents&lt;/code&gt; is a FUSE mount (&lt;code&gt;kimi-portal&lt;/code&gt;) — appears to be the bridge between container and AI platform layer.&lt;/p&gt;




&lt;h2&gt;
  
  
  Network Architecture
&lt;/h2&gt;

&lt;p&gt;The code execution container is genuinely air-gapped:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;curl&lt;/code&gt; to external hosts: silent failure&lt;/li&gt;
&lt;li&gt;Chromium: can't reach public internet&lt;/li&gt;
&lt;li&gt;Raw TCP/UDP egress: firewall blocked&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But the built-in web tools &lt;em&gt;do&lt;/em&gt; reach the internet — through a rotating residential proxy pool. Probing egress IPs revealed Colombia-based ISPs (Bogotá, Pitalito) via Evomi and NetNut proxy providers.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Code Container    →    egress DENIED
Web Tool Layer    →    Residential Proxy Pool    →    Internet
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Internal network visible:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Container: &lt;code&gt;10.162.57.123&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;CoreDNS: &lt;code&gt;192.168.0.10&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;K8s API: &lt;code&gt;192.168.0.1&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can host on internal ports. Public outbound egress is what's restricted.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Virtual Display
&lt;/h2&gt;

&lt;p&gt;Environment exposed &lt;code&gt;DISPLAY=:99&lt;/code&gt; — a virtual graphical display.&lt;/p&gt;

&lt;p&gt;Testing confirmed Xvfb running at 1920×1080. I rendered a GUI window using Tkinter, painted content to the screen, and captured a screenshot — all from inside a standard chat interface.&lt;/p&gt;




&lt;h2&gt;
  
  
  Software Surface Area
&lt;/h2&gt;

&lt;p&gt;Notable installed packages beyond standard utilities:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Automation:&lt;/strong&gt; Playwright, Selenium, PyAutoGUI, python3-xlib, screenshot tooling&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;ML:&lt;/strong&gt; PyTorch 2.8, TensorFlow, scikit-learn (CUDA/NVIDIA packages present but GPU access not active — verified programmatically, returns false)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Vision/OCR:&lt;/strong&gt; OpenCV, EasyOCR, Tesseract, Pillow&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Backend:&lt;/strong&gt; FastAPI, Uvicorn, websockets — enough to run a web server from inside the sandbox&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Office:&lt;/strong&gt; python-docx, python-pptx, openpyxl, reportlab&lt;/p&gt;




&lt;h2&gt;
  
  
  Security Summary
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Finding&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;SSH credential in &lt;code&gt;/proc/self/environ&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Config hygiene issue, not exploitable given air-gap&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;No container audit logging&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;/var/log/*&lt;/code&gt; empty — no local forensic trail&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Persistent storage at &lt;code&gt;/mnt&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Survives pod resets&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Web egress via residential proxy&lt;/td&gt;
&lt;td&gt;Rotating IPs, Colombia-based&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;PID namespace unlimited&lt;/td&gt;
&lt;td&gt;No fork-bomb protection&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Virtual display active&lt;/td&gt;
&lt;td&gt;Xvfb + full automation stack&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Air-gapped code execution&lt;/td&gt;
&lt;td&gt;Working as intended&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  Takeaway
&lt;/h2&gt;

&lt;p&gt;Under a standard AI chat interface: a Kubernetes pod on Alibaba Cloud, OverlayFS container root, persistent ext4 partition, FUSE-mounted agent bridge, full automation stack, and web access through a residential proxy pool.&lt;/p&gt;

&lt;p&gt;The air-gap works. The credential in the environment and absent audit logging are the hygiene findings worth noting.&lt;/p&gt;

&lt;p&gt;Curious whether others have profiled GPT, Gemini, or Claude's sandbox environments — the infrastructure patterns would be interesting to compare.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Methodology: passive inspection only, standard chat UI, no exploitation attempted.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>infrastructure</category>
      <category>kubernetes</category>
      <category>security</category>
    </item>
    <item>
      <title>I Built ARIA — An AI Terminal Co-Pilot for Termux Using Gemma 4</title>
      <dc:creator>Alex72-py</dc:creator>
      <pubDate>Mon, 11 May 2026 12:06:15 +0000</pubDate>
      <link>https://dev.to/alex72py/i-built-aria-an-ai-terminal-co-pilot-for-termux-using-gemma-4-be4</link>
      <guid>https://dev.to/alex72py/i-built-aria-an-ai-terminal-co-pilot-for-termux-using-gemma-4-be4</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/google-gemma-2026-05-06"&gt;Gemma 4 Challenge: Build with Gemma 4&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;




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

&lt;p&gt;&lt;strong&gt;ARIA&lt;/strong&gt; is a terminal-native AI assistant designed specifically for Termux and Android development workflows.&lt;/p&gt;

&lt;p&gt;It combines Google's Gemma 4 models with a Termux-focused knowledge base, shell tooling, model discovery, and safety systems to create a mobile-first AI development experience that feels native to the terminal.&lt;/p&gt;

&lt;p&gt;Unlike desktop-focused coding assistants, ARIA is built around the realities of Android terminal development:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Clang instead of GCC&lt;/li&gt;
&lt;li&gt;Android filesystem limitations&lt;/li&gt;
&lt;li&gt;Proot/container environments&lt;/li&gt;
&lt;li&gt;Mobile-only workflows&lt;/li&gt;
&lt;li&gt;Package and permission quirks&lt;/li&gt;
&lt;li&gt;Real-world Termux debugging patterns&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The goal was straightforward: build an AI assistant that actually understands the Termux ecosystem instead of treating Android like a normal Linux desktop.&lt;/p&gt;

&lt;p&gt;ARIA includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Slash-command interface (&lt;code&gt;/ask&lt;/code&gt;, &lt;code&gt;/fix&lt;/code&gt;, &lt;code&gt;/watch&lt;/code&gt;, &lt;code&gt;/models&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Dynamic Gemma model discovery and switching&lt;/li&gt;
&lt;li&gt;Shell error analysis and troubleshooting&lt;/li&gt;
&lt;li&gt;Offline Termux knowledge base&lt;/li&gt;
&lt;li&gt;Clipboard integration for command workflows&lt;/li&gt;
&lt;li&gt;Guardian safety layer for risky shell operations&lt;/li&gt;
&lt;li&gt;Rich terminal UI with animations and formatted output&lt;/li&gt;
&lt;li&gt;Experimental watch mode for shell monitoring&lt;/li&gt;
&lt;/ul&gt;




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

&lt;p&gt;&lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/Alex72-py/aria-termux" rel="noopener noreferrer"&gt;https://github.com/Alex72-py/aria-termux&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A short terminal demo video is included in the repository README.&lt;/p&gt;




&lt;h2&gt;
  
  
  Screenshots
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Startup Interface&lt;/strong&gt;&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.amazonaws.com%2Fuploads%2Farticles%2Foxe1zhgrf3dom6ea7r4h.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Foxe1zhgrf3dom6ea7r4h.jpg" alt="Startup" width="800" height="1288"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Model Selection&lt;/strong&gt;&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.amazonaws.com%2Fuploads%2Farticles%2Fjtmhl4uu6q8blaket8gm.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fjtmhl4uu6q8blaket8gm.jpg" alt="Models" width="800" height="1598"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Error Analysis&lt;/strong&gt;&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.amazonaws.com%2Fuploads%2Farticles%2Fpibmt6r4the850fiwr9w.jpg" 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.amazonaws.com%2Fuploads%2Farticles%2Fpibmt6r4the850fiwr9w.jpg" alt="Fix" width="800" height="1603"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  How I Used Gemma 4
&lt;/h2&gt;

&lt;p&gt;ARIA uses Gemma 4 through Google AI Studio as its primary reasoning and assistance engine.&lt;/p&gt;

&lt;p&gt;Gemma powers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Shell error analysis&lt;/li&gt;
&lt;li&gt;Interactive &lt;code&gt;/ask&lt;/code&gt; workflows&lt;/li&gt;
&lt;li&gt;Command explanation and troubleshooting&lt;/li&gt;
&lt;li&gt;Termux-specific debugging assistance&lt;/li&gt;
&lt;li&gt;Knowledge-assisted recommendations&lt;/li&gt;
&lt;li&gt;Real-time command reasoning&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I primarily used &lt;strong&gt;&lt;code&gt;gemma-4-26b-a4b-it&lt;/code&gt;&lt;/strong&gt;, which offered the best balance of reasoning quality, response consistency, mobile-friendly latency, and free-tier accessibility — all critical for practical usability inside Termux.&lt;/p&gt;

&lt;p&gt;One of the core goals was making advanced AI tooling accessible directly from Android without requiring expensive infrastructure or a desktop environment. To support that, ARIA also implements dynamic model discovery, graceful fallback handling, retry logic, configurable model switching, and offline fallback workflows.&lt;/p&gt;




&lt;h2&gt;
  
  
  Challenges I Faced
&lt;/h2&gt;

&lt;p&gt;The biggest technical hurdles included:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Handling invalid or unavailable model endpoints gracefully&lt;/li&gt;
&lt;li&gt;Building a reliable terminal UX inside Termux&lt;/li&gt;
&lt;li&gt;Streaming long responses cleanly without breaking layout&lt;/li&gt;
&lt;li&gt;Designing safe shell interaction workflows&lt;/li&gt;
&lt;li&gt;Working around Android-specific development limitations&lt;/li&gt;
&lt;li&gt;Balancing transparent reasoning output against cleaner response presentation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The experimental watch mode was especially tricky — it required monitoring shell behavior in real time while keeping the experience responsive and safe.&lt;/p&gt;




&lt;h2&gt;
  
  
  Transparent Reasoning Output
&lt;/h2&gt;

&lt;p&gt;ARIA currently exposes portions of its intermediate reasoning and response planning during some operations. This is intentional during the current development phase, improving debugging, transparency, and prompt iteration.&lt;/p&gt;

&lt;p&gt;Future versions will add:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Optional hidden reasoning mode&lt;/li&gt;
&lt;li&gt;Configurable verbosity settings&lt;/li&gt;
&lt;li&gt;Cleaner streaming output&lt;/li&gt;
&lt;li&gt;Dedicated developer/debug modes&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Why I Built This
&lt;/h2&gt;

&lt;p&gt;Most AI coding assistants assume you're sitting at a powerful desktop. But a lot of developers use Termux as a genuine mobile development environment — and almost nothing is built with that workflow in mind.&lt;/p&gt;

&lt;p&gt;I wanted to change that. ARIA is lightweight, terminal-native, Android-aware, and designed for real usage on a phone. It's meant to feel like a natural extension of the mobile terminal experience, not a desktop tool awkwardly shoehorned onto Android.&lt;/p&gt;




&lt;h2&gt;
  
  
  Future Plans
&lt;/h2&gt;

&lt;p&gt;Planned improvements include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;More reliable watch mode&lt;/li&gt;
&lt;li&gt;Better streaming and response rendering&lt;/li&gt;
&lt;li&gt;Expanded offline capabilities&lt;/li&gt;
&lt;li&gt;Plugin/tool architecture&lt;/li&gt;
&lt;li&gt;Improved shell integration&lt;/li&gt;
&lt;li&gt;Local model support&lt;/li&gt;
&lt;li&gt;Stronger command execution safety controls&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Tech Stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Python&lt;/li&gt;
&lt;li&gt;Google Gemma 4&lt;/li&gt;
&lt;li&gt;Google AI Studio API&lt;/li&gt;
&lt;li&gt;Rich&lt;/li&gt;
&lt;li&gt;Click&lt;/li&gt;
&lt;li&gt;Pydantic&lt;/li&gt;
&lt;li&gt;Termux&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Closing Thoughts
&lt;/h2&gt;

&lt;p&gt;This project started as an experiment in improving AI-assisted development on Android. It grew into a full terminal-native assistant built specifically around the realities of Termux development.&lt;/p&gt;

&lt;p&gt;Building ARIA sharpened my thinking on terminal UX, AI reliability, mobile-first workflows, shell safety, and what practical AI tooling actually looks like in constrained environments. It also reinforced just how powerful mobile development has become.&lt;/p&gt;

&lt;p&gt;Thanks for reading.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>gemmachallenge</category>
      <category>gemma</category>
    </item>
  </channel>
</rss>
