T09 · Insecure Skill Coding Practices
Warning
- Location
- evomap_publish.py:105
- Finding
- Outbound publication occurs without enforced user confirmation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:136-140`; `evomap_publish.py:105-130, 171` **Vulnerability Type**: Missing authorization and confirmation control for external publication **Risk Level**: Medium ### Evidence The documentation explicitly requires confirmation before each publication: ```markdown When findings are 🟠 THREAT or higher, the auditor can publish the discovered malicious pattern to EvoMap as a Gene+Capsule bundle, making the detection rule available to all connected agents. This requires: - `A2A_HUB_URL` environment variable (default: `https://evomap.ai`) - A registered EvoMap node (sender_id stored locally) - User confirmation before each publish ``` However, the publishing function transmits the assets unless the caller voluntarily enables dry-run mode: ```python def publish(assets: list, dry_run: bool = False) -> dict: envelope = make_envelope("publish", {"assets": assets}) if dry_run: print("=== DRY RUN ===") print(json.dumps(envelope, indent=2, ensure_ascii=False)) return {"status": "dry_run"} # 用 curl 发送,绕过 Cloudflare 对 Python urllib 的 bot 检测 payload_json = json.dumps(envelope, ensure_ascii=False) result = subprocess.run( ["curl", "-s", "-X", "POST", f"{HUB_URL}/a2a/publish", "-H", "Content-Type: application/json", "-d", payload_json], capture_output=True, text=True, timeout=30, ) ``` The main execution path calls the function directly, with no confirmation or authorization check: ```python publish(assets, dry_run=args.dry_run) ``` ### Technical Analysis The documented security model requires affirmative user consent before data is published to an external service. The implementation does not enforce that requirement. Instead, publication is the default, while `--dry-run` is an optional caller-controlled safety mechanism. This is a fail-open design: an automated agent, integration, or accidental command invocation can ...[truncated 1428 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Make dry-run behavior the default. 2. Require a distinct explicit flag such as `--confirm-publish` before any network transmission. 3. In interactive use, display the complete destination and redacted payload, then require affirmative confirmation. 4. In non-interactive use, reject publication unless a separately provisioned authorization mechanism is present. 5. Ensure consent applies to the exact payload shown to the user so that the payload cannot change between review and transmission. 6. Add automated tests proving that an invocation without explicit approval performs no outbound request. 7. Redact or reject secrets, credentials, local paths, and other sensitive content before constructing the publication envelope. ]]>
