Back to skill

Security audit

apartment-scorecard

Security checks for vulnerabilities and agentic risk

Overview

This skill is a local apartment-comparison helper with proportionate file use and no evidence of hidden network access, credential handling, destructive behavior, or deception.

Before installing, understand that this is a local command-line helper: it processes apartment listing files you provide and can create or update a weights file in your home directory. Avoid storing unnecessary sensitive personal or financial details in listing files, and check command paths before running examples on real data.

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 (8)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
83% confidence
Finding

The skill documentation instructs users to run local Python scripts and edit files, but the manifest declares no explicit tool scope or permission boundaries. In agent environments, undeclared shell and file-write expectations can lead to overbroad execution authority, making it easier for a mis-triggered or modified skill to run commands or alter local files without clear user consent.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The description contains broad activation language covering many common apartment, rent, affordability, budgeting, and negotiation situations. In a skill-routing system, this can cause the skill to activate in loosely related housing conversations, increasing the chance that shell-capable behavior or file operations are invoked when the user did not intend to use this specific skill.

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/test_apartment_scorecard.py (reported line 103)May include surrounding context.

python
json.dump(ap.sample_listings(), f)
    with open(wf, "w") as f:
        json.dump(ap.sample_weights(), f)
    r = subprocess.run([sys.executable, os.path.join(HERE, "apartment_scorecard.py"),
                        "screen", "--file", lf, "--weights", wf],
                       capture_output=True, text=True)
    check("screen ranks survivors", "Maple St 2BR" in r.stdout

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/test_apartment_scorecard.py (reported line 109)May include surrounding context.

python
check("screen ranks survivors", "Maple St 2BR" in r.stdout
          and "2 pass" in r.stdout and r.returncode == 0)
    check("screen shows fails with reasons", "pets not allowed" in r.stdout)
    r = subprocess.run([sys.executable, os.path.join(HERE, "apartment_scorecard.py"),
                        "compare", "--file", lf, "--weights", wf,
                        "Maple St 2BR", "Oak Rd Garden"],
                       capture_output=True, text=True)

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/test_apartment_scorecard.py (reported line 115)May include surrounding context.

python
capture_output=True, text=True)
    check("compare renders side-by-side + premium line",
          "Premium" in r.stdout and "SCORE %" in r.stdout)
    r = subprocess.run([sys.executable, os.path.join(HERE, "apartment_scorecard.py"),
                        "negotiate", "--file", lf, "--weights", wf,
                        "Maple St 2BR", "--vacant-days", "30",
                        "--lease-offer", "18"],

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/test_apartment_scorecard.py (reported line 126)May include surrounding context.

python
with open(cf, "w") as f:
        f.write("name,rent,bedrooms,commute_min,pets_ok,available\n")
        f.write("Csv Flat,1500,1,20,true,2026-09-01\n")
    r = subprocess.run([sys.executable, os.path.join(HERE, "apartment_scorecard.py"),
                        "screen", "--file", cf, "--weights", wf],
                       capture_output=True, text=True)
    check("CSV listings load and screen", "Csv Flat" in r.stdout)

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/test_apartment_scorecard.py (reported line 130)May include surrounding context.

python
"screen", "--file", cf, "--weights", wf],
                       capture_output=True, text=True)
    check("CSV listings load and screen", "Csv Flat" in r.stdout)
    r = subprocess.run([sys.executable, os.path.join(HERE, "apartment_scorecard.py"),
                        "example"], capture_output=True, text=True)
    check("example runs end-to-end", r.returncode == 0
          and "Screened 4 listings" in r.stdout)

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This code writes JSON to a user file path when the weights file does not already exist. Although the script's top-level docstring mentions the default file location, the write itself occurs without a confirmation prompt or immediate disclosure in this function, so users may not realize running commands will create a persistent file.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.dynamic_code_execution

Dynamic code execution detected.

Critical
Code
suspicious.dynamic_code_execution
Location
scripts/test_apartment_scorecard.py:16