Back to skill

Security audit

File Diff

Security checks for vulnerabilities and agentic risk

Overview

This skill compares two chosen files and formats the differences, with no evidence of hidden persistence, network activity, credential handling, or destructive behavior.

Install only if you are comfortable letting the agent compare file paths you explicitly provide. Avoid asking it to diff secrets, credentials, private keys, or other sensitive files unless you intend their contents to appear in the response.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (3)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill instructs use of a shell command (diff / diff -u) but does not declare any permissions or allowed-tools scope. That creates an undeclared capability boundary: an agent may invoke shell access for arbitrary file comparisons without explicit restriction, increasing the chance of unintended access to sensitive local paths or misuse of shell execution in a broader runtime.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger language is broad and includes generic phrases like diff and show me the differences, which could match normal conversation and cause the skill to activate unexpectedly. In a skill that can drive shell-based file access, accidental activation raises the risk of comparing unintended files or exposing sensitive file contents through overbroad routing.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/diff_to_markdown.py (reported line 20)May include surrounding context.

python
def run_diff(source, target):
    """Run diff command and return unified output."""
    try:
        result = subprocess.run(
            ["diff", "-u", source, target],
            capture_output=True,
            text=True

Static analysis

No suspicious patterns detected.