T09 · Insecure Skill Coding Practices
- Location
scripts/proof_card.py:41- Finding
Audit Results Can Be Overridden to Generate Misleading Proof Cards
- Content
View full analysis
= 80 grade = args.grade or audit.get("grade") or ("publish-ready" if ok else "unchecked") status = args.status or ("PASS" if ok else "CHECK") checked_at = args.checked_at or audit.get("checkedAt") or datetime.now(timezone.utc).isoformat() ``` ### Technical Analysis Security-sensitive trust fields are not consistently derived from validated audit results: 1. `--score` takes precedence over the score in the audit. 2. `--grade` and `--status` can replace audit-derived values without consistency checks. 3. If the audit omits `ok`, a score of 80 or higher automatically becomes a successful result. 4. No code detects or rejects a `do-not-publish` result. 5. The audit JSON is checked only to confirm that its top-level value is an object; its schema and trust semantics are not validated. Consequently, the generated SVG, Markdown, and JSON can claim `PASS` or `publish-ready` even when the underlying audit does not support that claim. This is particularly relevant because the output is intended to act as a public trust signal. ### Attack Path 1. An attacker or careless publisher obtains or constructs an audit JSON that represents a failed, incomplete, or `do-not-publish` result. 2. The attacker invokes the generator with one or more conflict ...[truncated 1399 chars]- Remediation
View remediation
