Back to skill

Security audit

Piano Score Fingering Arrangement

Security checks for vulnerabilities and agentic risk

Overview

This skill processes piano scores locally with proportionate access, though several output-quality defects require checking generated results.

Keep original scores and reviewed plans, and use fresh output folders. Check hand assignments, fingerings, and placement before relying on results. Coordinate refresh clears existing fingerings in its output, and optional label hiding removes affected assignments. Require strict validation for final delivery and treat benchmark percentages cautiously. Optional external programs and OCR downloads need separate authorization; their runtime behavior was outside this static review.

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
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (48)

Memory Manipulation

High
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

Scanner excerpt · scripts/run_level5_regression.py (reported line 370)May include surrounding context.

python
"locked": False, "placement": "below",
            })
        postprocess(rows, "LH")
        # The fourth note supplies the reset context; its fingering is not
        # prescribed by this narrowly scoped triad-shape assertion.
        actual = [int(row["finger"]) for row in rows[:3]]
        expected = [5, 3, 1]

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 · scripts/run_optional_omr.py (reported line 250)May include surrounding context.

python
"candidate_quality": "unavailable",
            "next_action": "The local engine is running. If this report remains in this state, the host interrupted the run; partial files are not verified score facts.",
        })
        environment = os.environ.copy()
        if args.engine == "oemer":
            # Keep first-run caches inside this new result directory.  This
            # prevents a user-level font/model cache from becoming an

Unvalidated Output Injection

High
Category
Output Handling
Confidence
95% confidence
Finding

Model output is used without validation or sanitization. Unvalidated output injected into downstream contexts (SQL, shell, HTML) enables injection attacks and arbitrary code execution.

Content

Scanner excerpt · scripts/run_recognition_regression.py (reported line 163)May include surrounding context.

python
<container version=\"1.0\"><rootfiles><rootfile full-path=\"score.xml\"/></rootfiles></container>""",
            )
            archive.writestr("score.xml", FIXTURE)
        subprocess.run(
            [sys.executable, str(script_dir / "create_plan_from_musicxml.py"), str(source), "-o", str(result)],
            check=True,
            capture_output=True,

Unvalidated Output Injection

High
Category
Output Handling
Confidence
95% confidence
Finding

Model output is used without validation or sanitization. Unvalidated output injected into downstream contexts (SQL, shell, HTML) enables injection attacks and arbitrary code execution.

Content

Scanner excerpt · scripts/run_recognition_regression.py (reported line 197)May include surrounding context.

python
tied_plan_payload = json.loads(tied_fingered.read_text(encoding="utf-8"))
        voice_candidate_count = candidate_note_count(voice_source)
        voice_candidate_counts = musicxml_measure_note_counts(voice_source)
        subprocess.run(
            [
                sys.executable, str(script_dir / "generate_fingering_plan.py"),
                str(result), "-o", str(fingered), "--ignore-existing",

Unvalidated Output Injection

High
Category
Output Handling
Confidence
95% confidence
Finding

Model output is used without validation or sanitization. Unvalidated output injected into downstream contexts (SQL, shell, HTML) enables injection attacks and arbitrary code execution.

Content

Scanner excerpt · scripts/run_recognition_regression.py (reported line 207)May include surrounding context.

python
text=True,
        )
        fingered_plan = json.loads(fingered.read_text(encoding="utf-8"))
        structured_delivery = subprocess.run(
            [
                sys.executable, str(script_dir / "run_fingering_pipeline.py"), str(result),
                "--out-dir", str(structured_delivery_dir), "--stage-timeout", "10", "--run-timeout", "30",

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, file_read, file_write, network, shell.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

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

python
]
    if provisional_omr:
        command.append("--provisional-omr")
    completed = subprocess.run(command, capture_output=True, text=True)
    if completed.returncode:
        detail = (completed.stderr or completed.stdout).strip()
        raise ValueError(f"depth {depth} generation failed: {detail}")

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

python
str(args.source_plan), "-o", str(candidate_path), "--ignore-existing",
                "--hand-size", alternate, "--quiet",
            ]
            completed = subprocess.run(command, capture_output=True, text=True)
            if completed.returncode:
                detail = (completed.stderr or completed.stdout).strip()
                raise ValueError(f"alternate {alternate} generation failed: {detail}")

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

python
command = [renderer, "-o", str(args.output), str(args.input)]
    started = time.monotonic()
    try:
        completed = subprocess.run(command, capture_output=True, text=True, timeout=args.timeout)
        receipt.update({"return_code": completed.returncode, "stdout": completed.stdout[-12000:], "stderr": completed.stderr[-12000:]})
    except subprocess.TimeoutExpired as exc:
        receipt.update({"status": "timed_out", "stdout": (exc.stdout or "")[-12000:] if isinstance(exc.stdout, str) else "", "stderr": (exc.stderr or "")[-12000:] if isinstance(exc.stderr, str) else ""})

The MIDI benchmark builder marks inferred pitch spelling and absent tie information as verified.

Medium
Category
Excessive Agency
Confidence
96% confidence
Finding

The builder marks spelling and ties as verified even though spelling is selected from a fixed chromatic mapping and every note is emitted without tie information. Applying a fact lock to these assertions can make unsupported notation facts appear authoritative to benchmark or recognition consumers; the benchmark-only role limits exposure but does not make those assertions valid.

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

python
if not executable:
        return None
    try:
        result = subprocess.run(
            [executable, str(path)], capture_output=True, text=True, timeout=15, check=False
        )
    except (OSError, subprocess.TimeoutExpired):

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

python
def run_extractor(candidate: Path, script_dir: Path) -> dict:
    with tempfile.TemporaryDirectory(prefix="piano-semantic-ledger-") as temporary:
        plan_path = Path(temporary) / "candidate-plan.json"
        completed = subprocess.run(
            [sys.executable, str(script_dir / "create_plan_from_musicxml.py"), str(candidate), "-o", str(plan_path)],
            text=True,
            capture_output=True,

The documented count-mismatch block does not prevent exporting anchor proposals.

Medium
Category
Excessive Agency
Confidence
97% confidence
Finding

The --candidate-musicxml help at L231-L232 says a count mismatch blocks anchor proposal. Instead, L327-L350 records the mismatch, changes the proposal gate to a partial-review status, and retains the candidate anchors; L352-L355 writes them and returns success. Although the anchors remain explicitly unverified, this contradicts the promised blocking behavior.

Content

No source excerpt is available for this finding.

Automatic RH/LH routing contradicts the documented explicit-pair requirement.

Medium
Category
Excessive Agency
Confidence
97% confidence
Finding

Two keyboard-labeled single-staff parts are assigned RH and LH solely by document order, despite the explicit-pair requirement. Reordered or misleading input can therefore silently reverse hand assignments and corrupt generated fingerings and anchor comparisons rather than failing closed.

Content

No source excerpt is available for this finding.

Coordinate-only migration also clears existing fingerings and their lock/provenance state.

Medium
Category
Excessive Agency
Confidence
100% confidence
Finding

A utility presented as a coordinate-only migration also erases finger assignments, locks, and assignment provenance in its output. This violates the stated preservation contract and can silently discard reviewed editorial decisions if the migrated plan replaces the working plan, although the explicit source-overwrite guard limits direct data loss.

Content

No source excerpt is available for this finding.

The clearance repair changes finger assignments despite promising never to change fingers.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The module documentation at L004-L006 promises that this operation never changes fingers and only adjusts label positions. However, when --hide-unresolved is enabled, L218-L222 replaces each affected finger assignment with 0, erasing musical decisions rather than merely hiding their labels.

Content

No source excerpt is available for this finding.

Page rescaling retains previous chord-label layout decisions despite claiming to remove them.

Medium
Category
Excessive Agency
Confidence
97% confidence
Finding

The drop list removes ordinary label coordinates but preserves chord_label_x, chord_label_offset, and chord_label_layout while changing the page coordinate system. Subsequent stages that honor those retained fields can reuse stale positioning, potentially associating fingerings with the wrong notes; the required fresh visual audit mitigates, but does not eliminate, this output-integrity risk.

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

python
def execute(command: list[str], timeout: int) -> dict:
    started = time.monotonic()
    try:
        result = subprocess.run(command, capture_output=True, text=True, timeout=timeout)
        return {
            "status": "passed" if result.returncode == 0 else "failed",
            "return_code": result.returncode,

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

python
started = time.time()
    record: dict[str, object] = {"name": name, "command": command, "started_at": started}
    try:
        completed = subprocess.run(command, capture_output=True, text=True, timeout=timeout)
        record.update({
            "status": "passed" if completed.returncode == 0 else "failed",
            "return_code": completed.returncode,

Failed benchmark pieces disappear from the aggregate accuracy denominator despite the documented guarantee.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

When an agreement report is missing, the piece contributes no anchors to the aggregate denominator, so failures on difficult inputs can inflate overall_accuracy despite the documented guarantee. Failed pieces remain visible and cause a nonzero exit status, which limits the risk, but consumers reading only the headline metric can still receive misleading quality evidence.

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

python
"""
    command = [sys.executable, str(Path(__file__).resolve()), "--geometry-only", str(omr_path), str(musicxml_path)]
    try:
        completed = subprocess.run(command, capture_output=True, text=True, timeout=timeout)
        if completed.returncode != 0:
            return {"status": "unavailable", "reason": completed.stderr[-600:] or "geometry helper failed"}
        data = json.loads(completed.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/run_optional_omr.py (reported line 261)May include surrounding context.

python
xdg_cache.mkdir(parents=True, exist_ok=True)
            environment["MPLCONFIGDIR"] = str(mpl_cache)
            environment["XDG_CACHE_HOME"] = str(xdg_cache)
        completed = subprocess.run(command, capture_output=True, text=True, timeout=timeout, env=environment)
        status = "candidate_ready" if completed.returncode == 0 else "failed"
        risk_signals = collect_risk_signals(completed.stdout)
        payload = {

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

python
def run(command: list[str], timeout: int) -> dict:
    started = monotonic()
    try:
        completed = subprocess.run(command, text=True, capture_output=True, timeout=timeout)
    except subprocess.TimeoutExpired as exc:
        return {
            "status": "timed_out", "elapsed_seconds": round(monotonic() - started, 3),

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

python
<container version=\"1.0\"><rootfiles><rootfile full-path=\"score.xml\"/></rootfiles></container>""",
            )
            archive.writestr("score.xml", FIXTURE)
        subprocess.run(
            [sys.executable, str(script_dir / "create_plan_from_musicxml.py"), str(source), "-o", str(result)],
            check=True,
            capture_output=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/run_recognition_regression.py (reported line 170)May include surrounding context.

python
text=True,
        )
        plan = json.loads(result.read_text(encoding="utf-8"))
        subprocess.run(
            [sys.executable, str(script_dir / "create_plan_from_musicxml.py"), str(voice_source), "-o", str(voice_plan)],
            check=True, capture_output=True, text=True,
        )