Sage Shields AI Agents from OS Vulnerabilities

▼ Summary
– Sage is an open-source Agent Detection & Response (ADR) tool that intercepts and inspects AI agent actions like shell commands, URL fetches, and file writes before they execute.
– It provides multiple security layers, including URL reputation checks, local heuristic analysis, and package supply-chain scanning for npm and PyPI.
– The tool prioritizes privacy by keeping most data, such as file content and commands, local, only sending hashes to cloud services, and can operate fully offline.
– Its release is linked to research revealing significant risks, including thousands of exposed AI agent instances and a notable percentage of skills containing malicious instructions.
– Sage is available as a plugin or extension for platforms like Claude Code, Cursor/VS Code, and OpenClaw, requiring Node.js 18 or later for installation.
The security landscape for autonomous AI agents is undergoing a significant shift, moving beyond simple prompt injection to address the inherent risks of their powerful operational capabilities. These agents, which can execute shell commands, fetch data from the web, and write files directly to a system, often act with minimal oversight. A new open-source project called Sage introduces a critical security layer designed specifically for this environment. By intercepting and inspecting every action an AI agent attempts to perform, it aims to prevent these powerful tools from becoming vectors for malware, data theft, or system compromise. This approach is being termed Agent Detection and Response (ADR), drawing a direct parallel to the well-established Endpoint Detection and Response (EDR) solutions used in traditional enterprise security.
Sage functions by integrating with the underlying frameworks of supported agent platforms. It establishes hooks within environments like Claude Code, Cursor/VS Code, and OpenClaw to monitor tool calls in real-time. Whenever an agent attempts to run a Bash command, retrieve a URL, or modify a file, Sage intercepts the request before it is executed. This intercepted action is then subjected to a multi-layered analysis to assess potential threats.
The detection process employs several key methods. First, any URL an agent tries to access is checked against cloud-based reputation services for malware, phishing, and scam indicators. Locally, the tool uses YAML-based threat definitions to identify dangerous command or file patterns. For operations involving software packages, Sage performs supply-chain checks on registries like npm and PyPI, analyzing factors such as package existence, file reputation, and age to spot suspicious or typosquatted libraries. Additionally, at the start of each session, it scans other installed plugins within the environment for known threats.
A core principle of Sage’s design is maintaining user privacy. The system is architected to keep sensitive data, including file contents, shell commands, and source code, strictly on the local machine. For its reputation checks, it only transmits cryptographic hashes of URLs and package names to external APIs provided by Gen Digital. Users concerned with offline operation have the option to disable these cloud services entirely, allowing the tool to function based solely on its local heuristic rules.
The development of this tool is informed by recent security research highlighting the scale of the problem. An assessment by Gen Threat Labs discovered a substantial number of exposed AI agent instances, with over 18,000 OpenClaw systems currently accessible on the internet and vulnerable to attack. Their research also indicated that nearly 15 percent of observed agent “skills” contained malicious instructions. This paints a concerning picture where AI assistants, often trusted by developers, could be manipulated into acting as persistent insider threats, executing harmful operations without the user’s knowledge.
Getting started with Sage varies by platform. For users of Claude Code, it installs as a plugin directly from its GitHub repository and requires Node.js version 18 or higher. Those utilizing the Cursor editor can install it as a VS Code extension. For OpenClaw deployments, the tool is available as an npm package under the name `@gendigital/sage-openclaw`. By providing this adaptable security layer, the project addresses a growing need to safely harness the power of autonomous AI agents without exposing development environments to new and evolving risks.
(Source: HelpNet Security)


