Local AI VS Code extension blocks insecure code generation during saves

A developer created a VS Code extension that runs llama3.1:8b-instruct-q4 locally to physically block saves containing insecure AI-generated code. The tool was built after Claude generated a Flask route with a textbook CWE-117 (Log Injection) vulnerability.
How it works
The extension intercepts your save operations in VS Code, runs the llama3.1:8b-instruct-q4 model locally, maps the source-to-sink execution flow of the code, and throws a hard block if the AI generated something dangerous. The entire system operates offline with no cloud dependencies or API keys required.
Specific details from the source
- Model used: llama3.1:8b-instruct-q4
- Platform: VS Code extension
- Trigger: Intercepts save operations
- Analysis method: Maps source-to-sink execution flow
- Action: Throws a hard block on dangerous code
- Example vulnerability caught: CWE-117 Log Injection in a Flask route generated by Claude
- Infrastructure: Completely offline, no cloud, no API keys
This approach addresses a common issue where AI coding assistants like Claude and GitHub Copilot generate code quickly but may introduce security vulnerabilities. The local execution ensures privacy and eliminates dependency on external services.
📖 Read the full source: r/LocalLLaMA
👀 See Also

GAN Skill for Claude Code: Adversarial AI Tool for Idea Refinement
A Claude Code skill called /gan uses adversarial AI roles to critique and improve ideas through alternating Discriminator and Generator phases, with features like intensity modes, multi-language output, and forced role selection developed through self-iteration.

OpenClaw plugin adds persistent memory with Engram server
A developer built a TypeScript plugin connecting OpenClaw agents to Engram, a Go-based memory server using SQLite with FTS5 search. The plugin provides 11 tools, 4 lifecycle hooks, and automatic recall that injects relevant memories into prompts before each agent turn.

Corey Haines' Marketing Skills Set for AI Agents
A set of 25 marketing skills for AI agents has been added to OpenClaw, covering conversion optimization, copywriting, analytics, and growth engineering. The conversion optimization skill is noted as particularly effective in multi-agent setups.

Building CLIs for AI Agents: Design Principles from Google's gws CLI
Google's gws CLI demonstrates how to design command-line interfaces specifically for AI agents, prioritizing raw JSON payloads over human-friendly flags and implementing safety rails against hallucinations.