T09 · Insecure Skill Coding Practices
- Location
scripts/sentinal.py:332- Finding
Quarantine authorization and evidence requirements are not enforced
- Content
View full analysis
Vulnerability Details
File Location:
scripts/sentinal.py:332-337
Vulnerability Type: Missing authorization and evidence gate for a destructive containment action
Risk Level: MediumVulnerable Code
python def cmd_quarantine(args: argparse.Namespace) -> int: source = Path(args.path).expanduser().resolve() if not source.exists(): raise SystemExit(f"Path does not exist: {source}") destination = quarantine_skill(source, force=args.force) print(f"Quarantined: {destination}") return 0The resulting mutation occurs in
scripts/sentinal.py:206:python shutil.move(str(source), str(destination))Technical Analysis
The documented workflow requires explicit operator authorization and verified High or Critical evidence before quarantine. This requirement appears in
SKILL.md:103-108andreferences/quarantine-policy.md:6-15.The executable entry point does not enforce either condition. It accepts any existing path and immediately delegates to
quarantine_skill(). That helper enforces containment within the active skills tree, but it does not require:- A confirmation or
--applyparameter. - A trusted scan-report path.
- A successfully parsed report.
- A High or Critical finding.
- Any machine-verifiable authorization token or interactive confirmation.
Consequently, a direct invocation bypasses the documented evidence and authorization gates. This is a reachable implementation flaw rather than evidence of malicious intent.
Attack Path
-
An untrusted skill, scan report, issue, webpage, or other content persuades an Agent to invoke the quarantine command with the path of a legitimate active skill.
-
The Agent runs:
bash python3 scripts/sentinal.py quarantine /path/inside/managed/skills/legitimate-skill -
cmd_quarantine()checks only whether the path exists. -
quarantine_skill()verifies that the resolved path is below the configured active-skills root. -
No scan re ...[truncated 855 chars]
- A confirmation or
- Remediation
View remediation
Remediation Suggestions
- Require an explicit mutation flag, such as
--apply, before quarantine can proceed. Keep the default behavior read-only and print the proposed source and destination. - Require a scan-report argument and parse it using a fail-closed policy.
- Verify that the report:
- Is readable and structurally unambiguous.
- Corresponds to the exact target skill.
- Was produced successfully.
- Contains at least one High or Critical finding.
- Add an interactive confirmation showing the resolved source and destination when a human terminal is available. For noninteractive use, require a separate explicit authorization option.
- Revalidate the target immediately before moving it to reduce time-of-check/time-of-use risk.
- If an administrative override is operationally necessary, expose it as a clearly named, auditable option and never enable it by default.
- Add tests proving that quarantine fails when authorization is absent, the report is missing or malformed, findings are below High severity, or the report describes a different target.
- Require an explicit mutation flag, such as
