Back to skill

Security audit

R Analyst

Security checks for vulnerabilities and agentic risk

Overview

This is a local CSV analysis skill with no hidden network, credential, persistence, or privilege behavior, though it should be used carefully on very large or untrusted files.

Install only if you are comfortable running a local executable script over files you choose. Avoid using it on untrusted or very large CSVs, and keep histogram bin counts reasonable because the skill does not enforce size or range limits.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/script.sh:111
Finding

Unbounded Histogram Bin Count Permits Resource Exhaustion

Content
View full analysis
2 else "" bins = int(sys.argv[3]) if len(sys.argv) > 3 else 10 def parse_csv(path): with open(path, newline="", encoding="utf-8-sig") as f: reader = csv.DictReader(f) rows = list(reader) return reader.fieldnames or [], rows def to_float(v): try: return float(v) except: return None def ascii_hist(name, values, bins=10, width=40): nums = sorted(v for v in (to_float(x) for x in values) if v is not None) if not nums: print(f"[{name}] no numeric data"); return mn, mx = min(nums), max(nums) if mn == mx: print(f"[{name}] all values equal {mn}"); return step = (mx - mn) / bins counts = [0] * bins ``` ### Technical Analysis The `plot` command accepts `bins` directly from a command-line argument. Python converts it to an integer but does not enforce a valid range before using it in arithmetic and list allocation. The statement `counts = [0] * bins` allocates memory proportional to the attacker-controlled value. An extremely large positive value can consume all available process or system memory. Other invalid values also cause availability failures: - `bins = 0` causes division by zero when calculating `step`. - A negative value creates an empty list and can trigger subsequent indexing or aggregation errors. - A non-integer value raises an uncaught `ValueError`. The argument is passed safely as a positional argument rather than interpolated into Python source, so this issue does not provide com ...[truncated 1307 chars]
Remediation
View remediation
3 else 10 except ValueError: print("The bin count must be an integer.", file=sys.stderr) sys.exit(2) MAX_BINS = 1000 if not 1 <= bins <= MAX_BINS: print(f"The bin count must be between 1 and {MAX_BINS}.", file=sys.stderr) sys.exit(2) ``` Additional hardening measures should include: 1. Document the accepted range in `SKILL.md` and command help. 2. Return controlled error messages rather than Python tracebacks. 3. Apply operating-system or container memory and CPU limits when processing untrusted input. 4. Add tests for zero, negative, non-integer, and excessively large bin counts. ]]>

T09 · Insecure Skill Coding Practices

Note
Location
scripts/script.sh:47
Finding

Unbounded CSV Materialization Permits Memory-Exhaustion Denial of Service

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • 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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep

Static analysis

No suspicious patterns detected.