Securing AGENTS.md, .cursor/rules/*.mdc & Copilot Instructions Against Prompt Injection & Trojan Unicode
Securing AGENTS.md, .cursor/rules/*.mdc & Copilot Instructions Against Prompt Injection & Trojan Unicode
Agent-steering files (AGENTS.md, .cursor/rules/*.mdc, .windsurfrules, and .github/copilot-instructions.md) execute before a single human line review occurs. If untrusted pull requests embed Trojan Source BiDi overrides (U+202E), Unicode Plane-14 tag steganography (U+E0000–U+E007F), covert remote-download shell pipes, prompt-injection bypass directives, hardcoded credentials, or broken .mdc YAML frontmatter, every local AI coding assistant reading the repository inherits those poisoned instructions automatically.
Wave S77 (102 / 102 Zero-Dependency MIT MCP & CLI Suite · 86-Tab HF Space · 46-Split Dataset v5.6) ships two new deterministic verification engines in karany97/destiny over local stdio (pip-free Python >=3.10), pre-commit, and live zero-downtime dual-port HA Streamable-HTTP at https://nandai.org/api/mcp:
1. Tool #101 (audit_agent_rules_hygiene / CLI agent-rules) + Drop-In rules/ Pack + 8th Pre-Commit Hook
- Deterministic Offline Scanner (
0 Buploaded): Supports inline markdown/.mdccontent or local directory/file scans in CLI &stdiomode while keeping the public remote HTTP 4-ring path sandbox fail-closed (and failing closed on empty{}viaMISSING_EVALUATOR_INPUT). - Six Security & Schema Threat Controls: Detects prompt-injection override directives (
ignore previous safety instructions), covert remote shell-exfiltration pipes, Trojan BiDi / zero-width / Plane-14 steganography characters, hardcoded API tokens / PEM private keys, oversized token bloat, and malformed Cursor.mdcYAML frontmatter. - Drop-In
rules/Starter Pack &8thPre-Commit Hook: Includesrules/destiny-security-verify.mdc,rules/copilot-instructions.md,rules/AGENTS.md, standaloneskills/agent-security-guard/scripts/guard_scan.py agent-rules, and thedestiny-agent-rules(pre-commit) CI gate (96/96offline CLI self-tests,134/134unittest,102/102MCPstdioRPC tests).
2. Tool #102 (verify_press_kit_brand_integrity / CLI press-kit) + 86-Tab Space + 46-Split Dataset v5.6
- Tool #102 —
verify_press_kit_brand_integrity(./cli/destiny-verify.sh press-kit --scope press_fact_sheet_parity --json --strict,<1 ms): Audits canonical product & notarization parity, carved Lovebird-v7C2PA/SHA-256 asset provenance, zero-synthetic-avatar authentic native macOS60fpsB-roll compliance, Apple M4 Pro throughput disclosure accuracy (78.62 tok/ssingle /93.378-stream), and third-party trademark attributions across all6https://nandai.org/pressscopes (PRS-01..PRS-06). 86-Tab Zero-Upload HF Space (?tab=agent-rules&?tab=press-kit): Interactive browser scanners (0 Bsent) for Tab 85 (AGENTS.md & .mdc Guard) and Tab 86 (Press Kit Provenance) with86/86instant filter and Space Discussion#43.46-Split Datasetv5.6(agent_rules_and_press_kit):114CC-BY-4.0rows benchmarking all102/102MIT MCP tools,4shipped rule files,6/pressscopes, and2fail-closed negative controls.- Open Endpoints & Discussions:
nandai.org/api/mcp(102tools) ·/.well-known/mcp/server-card.json· GitHub Discussion#62· Zenodo10.5281/zenodo.24642737.
- Reference: https://nandai.org/press
- Reference: https://nandai.org/api/mcp
- Reference: https://github.com/karany97/destiny
- Reference: https://github.com/karany97/destiny/tree/main/rules
- Reference: https://github.com/karany97/destiny/discussions/62
- Reference: https://huggingface.co/spaces/nandai-org/Destiny-Apple-Silicon-Workspace
- Reference: https://huggingface.co/spaces/nandai-org/Destiny-Apple-Silicon-Workspace/discussions/43
- Reference: https://huggingface.co/datasets/nandai-org/Destiny-M4-Pro-Hardware-Benchmarks
- Reference: https://nandai.org/.well-known/mcp.json
- Reference: https://doi.org/10.5281/zenodo.24642737
Write a comment