Air-Gapped Local Code & Decompilation LLM Stack
Zero-cloud local inference blueprint pairing quantized coding models with deterministic static analyzers for sensitive codebases.
Prerequisites & Step-by-Step Installation
Copy & run inside isolated labBefore You Start (Prerequisites)
- + Docker Engine or standalone Ollama runtime
- + 16 GB+ RAM (12+ GB VRAM recommended for 14B models; 8 GB for 7B)
- + Local SAST/decompiler output files (Semgrep SARIF or Ghidra pseudo-C)
Pull quantized coding weights while temporarily online, then disconnect
ollama pull qwen2.5-coder:7b
Use 7B on 8 GB GPUs or 14B on 16+ GB GPUs for crisp code reasoning.
Start the inference container with network_mode: none for strict air-gapping
docker compose -f airgap-compose.yml up -d
Guarantees proprietary source code or malware strings can never egress.
curl -s http://127.0.0.1:11434/api/tags | head -c 160
Client Integration & Configuration Files
Review scope limits before wiringservices:
ollama-offline:
image: ollama/ollama:latest
network_mode: none
read_only: true
ollama pull qwen2.5-coder:14b
OLLAMA_HOST=127.0.0.1:11434 ollama serve
How to Use & Defensive Workflow
Authorized assessment protocolTypical Scenario: Review proprietary source files or decompiled pseudo-C completely offline alongside Ghidra or Semgrep without triggering cloud DLP alerts.
- 01. Pre-pull model weights and switch container network_mode to none (or firewall outbound traffic).
- 02. Point Cursor, Continue.dev, or local MCP scripts to http://127.0.0.1:11434.
- 03. Verify suggested security patches with local unit tests and compilers.
Explain the memory copy bounds inside this Ghidra pseudo-C routine offline, identify potential integer wraparound paths, and propose a safe bounds check.
Verify model endpoints listen on `127.0.0.1` only (`OLLAMA_HOST=127.0.0.1:11434`) and never blindly execute model-suggested commands on host machines.
Technical Architecture & Deployment Brief
Overview & Role in Security Engineering
Air-Gapped Local Code & Decompilation LLM Stack (SecOps Model) is engineered to support practitioners focused on offline intellectual-property preservation, malware sample safety, pseudo-code readability translation, and zero external telemetry leakage. Within the ToolWar ecosystem, it serves as an explicit bridge between AI reasoning layers and verifiable cybersecurity telemetry.
Technical Architecture & Data Flow
This entry bridges classical cybersecurity engineering with modern AI workflows while preserving strict human review, deterministic boundary checks, and verifiable outputs.
Unlike ad-hoc prompt wrappers that execute unconstrained strings directly in a shell, structured integration enforces typed parameter validation, bounded scope allowlists, and explicit separation between untrusted analyzed artifacts (source files, telemetry logs, network banners, or binary samples) and system-level control instructions.
Recommended Deployment Practice
- Isolate the Execution Boundary: Deploy integrations inside ephemeral containers or dedicated analysis VMs so untrusted repositories, binaries, or HTTP responses cannot affect primary workstations.
- Enforce Least-Privilege Scoping: Use read-only filesystem mounts, non-privileged service tokens, and target CIDR allowlists before enabling interactive assistant sessions.
- Verify Outputs Deterministically: Validate every generated output against deterministic static scanners or runtime guardrails before applying changes to production infrastructure.
Integration & Operational Caveats
- Treat all external content ingested by an LLM (including code comments, HTML titles, log lines, and MCP responses) as potential prompt-injection vectors.
- Review configuration JSON and
SKILL.mdmanifests carefully before binding credentials or running inside automated CI/CD pipelines.