Back to skill

Security audit

Red Team

Security checks for vulnerabilities and agentic risk

Overview

This skill claims to scan agents for security issues, but its main scan command always reports none and part of its behavior depends on unbundled code outside review.

Review this skill before installing. Its advertised agent scan result should not be treated as a real security assessment, and its repository scan depends on external Python code that is not included in the package. Install only in a constrained environment with known dependencies if you choose to test it.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T08 · Insecure Dependencies

Error
Location
main.py:4
Finding
Untrusted External Module Loading Through Runtime Path Modification## Vulnerability Details **File Location**: `main.py`, lines 4-6 **Vulnerability Type**: Insecure dependency loading and Python module search-path manipulation **Risk Level**: High **Vulnerable Code**: ```python # Add the parent directory to sys.path so we can import agent_redteam sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '../..'))) import argparse from agent_redteam import repo_scanner ``` ### Technical Analysis The application adds a directory outside the audited skill package to Python's module search path and subsequently imports `agent_redteam.repo_scanner`. The imported package is not included in the audited project, and the project contains no dependency manifest or lock file that establishes an authenticated, version-pinned source for it. Python executes module-level code while importing a package. Consequently, the effective behavior of this skill depends on external, unreviewed code available in the runtime environment. An attacker who can place or replace an `agent_redteam` package in an eligible import location could cause arbitrary Python code to execute when the skill starts. Using `sys.path.append()` also does not guarantee that the intended parent-directory package will be selected. An identically named package already present earlier in `sys.path` may take precedence, which increases exposure to package shadowing, dependency confusion, or a compromised environment. The supplied repository URL is later passed directly to the external implementation: ```python report = repo_scanner.scan_repo(parsed_args.repo_url) ``` Because `repo_scanner` is absent from the project, its network access, repository handling, authentication behavior, and input validation cannot be verified by this audit. ### Attack Path 1. The attacker gains the ability to install or place a Python package named `agent_redteam` in an eligible module search location, including a location searched befo ...[truncated 1469 chars]
Remediation
## Remediation Suggestions 1. Remove the runtime modification of `sys.path`. 2. Package `agent_redteam` as an auditable, package-relative module within the project when it is first-party code. 3. If it is a third-party dependency, declare an exact version in a dependency manifest and use a lock file with verified package hashes. 4. Install dependencies exclusively from a trusted, authenticated package repository. Prevent fallback to public registries when private package names are used. 5. Execute the skill in an isolated virtual environment containing only approved dependencies. 6. Verify the resolved module path during deployment and reject modules loaded from unexpected directories. 7. Review and include the `repo_scanner` implementation in the audit scope, particularly its URL validation, network destinations, credential handling, repository checkout logic, subprocess use, and temporary-file handling. 8. Run repository scanning with least privilege, restricted filesystem access, minimal environment variables, and outbound network controls.
Vulnerability Patterns
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (1)

Intent-Code Divergence

Medium
Confidence
98% confidence
Finding
The `scan` subcommand claims to scan an agent for vulnerabilities but performs no analysis and always prints `Found 0 issues.` This creates a false sense of security and can cause users or downstream automation to trust an agent that was never actually assessed, leading to missed vulnerabilities.

Static analysis

No suspicious patterns detected.