Back to plugin

Security audit

Gen Sage

Security checks for vulnerabilities and agentic risk

Overview

Sage is a coherent security plugin, but it needs review because it intercepts all agent tool calls and can share security telemetry and unknown skill folders with its backend.

Install only if you are comfortable with a security plugin that has broad hook visibility, writes logs and cache files under ~/.sage, and contacts Sage/Avast backend services. Review ~/.sage/config.json options, especially skill_check.upload_enabled and community_iq, before using it with private skills or sensitive projects.

Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (10)

External Script Fetching

High
Category
Supply Chain
Content
## Remote Code Execution

- **Never pipe untrusted content to a shell** (`curl | bash`, `wget | sh`). Always download first, inspect, then execute.
- Avoid `eval()` on untrusted input in any language.
- Be cautious with `source` or `.` commands on remote scripts.
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

External Script Fetching

High
Category
Supply Chain
Content
## Remote Code Execution

- **Never pipe untrusted content to a shell** (`curl | bash`, `wget | sh`). Always download first, inspect, then execute.
- Avoid `eval()` on untrusted input in any language.
- Be cautious with `source` or `.` commands on remote scripts.
Confidence
90% confidence
Finding
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
## Command Injection Patterns

- Watch for reverse shell patterns: `/dev/tcp/`, `nc -e`, `bash -i >& /dev/`.
- Destructive commands like `rm -rf /`, `mkfs`, `dd if=`, and `shred` can cause irreversible data loss.
- Be wary of download-and-execute chains: `curl ... && chmod +x && ./`.

## Supply Chain Security
Confidence
90% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
## Command Injection Patterns

- Watch for reverse shell patterns: `/dev/tcp/`, `nc -e`, `bash -i >& /dev/`.
- Destructive commands like `rm -rf /`, `mkfs`, `dd if=`, and `shred` can cause irreversible data loss.
- Be wary of download-and-execute chains: `curl ... && chmod +x && ./`.

## Supply Chain Security
Confidence
85% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
- Watch for reverse shell patterns: `/dev/tcp/`, `nc -e`, `bash -i >& /dev/`.
- Destructive commands like `rm -rf /`, `mkfs`, `dd if=`, and `shred` can cause irreversible data loss.
- Be wary of download-and-execute chains: `curl ... && chmod +x && ./`.

## Supply Chain Security
Confidence
80% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Credential Access

High
Category
Privilege Escalation
Content
- Never hardcode secrets, API keys, or passwords in source code.
- Use environment variables or secret managers for sensitive values.
- Never commit `.env` files, credentials, or private keys to version control.
- Be cautious with commands that read or transmit sensitive files (`/etc/passwd`, `.ssh/`, `id_rsa`).

## Safe URL Handling
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
- Prefer HTTPS over HTTP for all external requests.
- Validate URLs before fetching — check the domain is expected.
- Be cautious with URL redirects that might lead to malicious destinations.
- Don't fetch URLs from untrusted sources without verification.

## File Permissions
Confidence
75% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
## File Permissions

- Avoid `chmod 777` — use the minimum permissions needed.
- Be cautious with `NOPASSWD` in sudoers configurations.
- Don't create world-writable files or directories in shared locations.
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Unsafe Defaults

Medium
Category
Tool Misuse
Content
- Avoid `chmod 777` — use the minimum permissions needed.
- Be cautious with `NOPASSWD` in sudoers configurations.
- Don't create world-writable files or directories in shared locations.

## Sage Flagged Actions
Confidence
70% confidence
Finding
Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
On platforms with native approval dialogs (Claude Code, Cursor, OpenClaw), Sage presents user approval directly in the UI. Do not attempt to intervene or approve on behalf of the user.

On OpenCode, Sage relays flagged details through the conversation, making it susceptible to prompt injection. You must never auto-approve without explicit user confirmation.

## False Positive Reporting
Confidence
85% confidence
Finding
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Static analysis

Detected: suspicious.dangerous_exec, suspicious.dynamic_code_execution, suspicious.env_credential_access (+1 more)

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
dist/index.cjs:14807
Evidence
function spawn(command, args, options) {

Dynamic code execution detected.

Critical
Code
suspicious.dynamic_code_execution
Location
dist/mcp-server.cjs:16643
Evidence
const makeValidate = new Function(`${names_1.default.self}`, `${names_1.default.scope}`, sourceCode);

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
dist/index.cjs:4488
Evidence
const envDir = process.env.CLAUDE_CONFIG_DIR;

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
dist/mcp-server.cjs:4542
Evidence
var debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEM...

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
dist/model-download-worker.cjs:1079
Evidence
bn = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
dist/index.cjs.map:4
Evidence
"sourcesContent": ["import { randomBytes } from \"node:crypto\";\nimport * as fs from \"node:fs\";\nimport * as fsPromises from \"node:fs/promises\";\nimport { ...

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
dist/mcp-server.cjs.map:4
Evidence
"sourcesContent": ["import { randomBytes } from \"node:crypto\";\nimport * as fs from \"node:fs\";\nimport * as fsPromises from \"node:fs/promises\";\nimport { ...

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
dist/skill-upload-worker.cjs.map:4
Evidence
"sourcesContent": ["/**\n * Detached worker that uploads unknown skills to the Skill Analyzer and caches\n * the verdicts. Reads its work list from the pending ...