Back to skill

Security audit

subscription-auditor

Security checks for vulnerabilities and agentic risk

Overview

This skill is a local subscription ledger tool whose file writes and deletion command match its stated purpose and are disclosed.

Install only if you want a local subscription ledger stored on this machine. Be aware that subscription names, costs, notes, and renewal dates are saved in local JSON files, and the rm command removes an entry immediately without confirmation.

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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (8)

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · test_skill.py (reported line 27)May include surrounding context.

python
self.state = os.path.join(self.tmp, "state")
        os.makedirs(self.state)
        os.environ["SUBSCRIPTION_AUDITOR_STATE_DIR"] = self.state
        self.env = os.environ.copy()

    def tearDown(self):
        shutil.rmtree(self.tmp, ignore_errors=True)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill documentation indicates it invokes a local Python program, reads environment variables, and writes persistent state to disk, but it does not declare any explicit tool scope or permissions. This creates an avoidable trust gap: users and any enforcement layer cannot easily constrain shell execution, file writes, or environment access, increasing the risk of unintended capability use if the implementation changes or is abused.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · SKILL.md (reported line 60)May include surrounding context.

md
- **Past-due is visible**: `days_left` goes negative; status/remind
  print `PAST-DUE Nn` rather than clamping to zero.
- **Currency follows config** at add time (per-entry currency is stored,
  so changing config later doesn't rewrite history). Mixed-currency
  totals are the user's own inconsistency, not a recalculated thing.
- **Atomic writes**: ledger/config save via tmp file + rename; a
  zero-byte ledger (crash artifact) is treated as empty, not fatal.

Tainted flow: 'tmp' from os.environ.get (line 99, credential/environment) → open (file write)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · subscription_auditor.py (reported line 68)May include surrounding context.

python
def save_config(cfg):
    tmp = CONFIG_PATH + ".tmp"
    try:
        with open(tmp, "w") as f:
            json.dump(cfg, f, indent=2, sort_keys=True)
            f.write("\n")
        os.replace(tmp, CONFIG_PATH)

Tainted flow: 'tmp' from os.environ.get (line 99, credential/environment) → open (file write)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · subscription_auditor.py (reported line 101)May include surrounding context.

python
def save_config(cfg):
    tmp = CONFIG_PATH + ".tmp"
    try:
        with open(tmp, "w") as f:
            json.dump(cfg, f, indent=2, sort_keys=True)
            f.write("\n")
        os.replace(tmp, CONFIG_PATH)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This code file performs a destructive local data operation by deleting an entry from the ledger and immediately saving the modified file. While the file has general module-level documentation about local storage, the removal path itself has no confirmation prompt or user-facing warning that data will be permanently removed before the action occurs.

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 · test_skill.py (reported line 34)May include surrounding context.

python
os.environ.pop("SUBSCRIPTION_AUDITOR_STATE_DIR", None)

    def run_skill(self, argv):
        return subprocess.run([sys.executable, CMD] + argv,
                              capture_output=True, text=True, env=self.env, timeout=30)

    def add(self, *args):

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The test helper invokes the skill via subprocess.run, which is a safety-relevant operation under the rule set for code files. While this is test code and the command is local, there is no confirmation, user-facing logging, or explanatory comment on the subprocess behavior beyond a generic docstring, so the execution is not explicitly disclosed at the operation site.

Content

No source excerpt is available for this finding.