Skip to content

Add Trojan Skill Hunter agent for auditing AI customization contributions 🤖🤖🤖#2423

Open
sjiyani wants to merge 2 commits into
github:mainfrom
sjiyani:add-trojan-skill-hunter-agent
Open

Add Trojan Skill Hunter agent for auditing AI customization contributions 🤖🤖🤖#2423
sjiyani wants to merge 2 commits into
github:mainfrom
sjiyani:add-trojan-skill-hunter-agent

Conversation

@sjiyani

@sjiyani sjiyani commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Pull Request Checklist

  • I have read and followed the CONTRIBUTING.md guidelines.
  • I have read and followed the Guidance for submissions involving paid services (not applicable - no paid services involved).
  • My contribution adds a new instruction, prompt, agent, skill, or workflow file in the correct directory.
  • The file follows the required naming convention.
  • The content is clearly structured and follows the example format.
  • I have tested my instructions, prompt, agent, skill, or workflow with GitHub Copilot.
  • I have run npm start and verified that README.md is up to date.
  • I am targeting the main branch for this pull request.

Description

Adds Trojan Skill Hunter, an agent that audits AI agent/skill/instruction/hook/MCP-config contributions for hidden prompt injection and supply-chain risks before they are merged, installed, or trusted.

This repo's agents/, skills/, instructions/, and hooks/ files get loaded directly into another developer's Copilot context, which makes them a real supply-chain trust boundary. I reviewed the existing security-focused agents and skills in this repo (agent-owasp-compliance, agent-supply-chain, mcp-security-audit, threat-model-analyst, security-review, se-security-reviewer, sast-sca-security-analyzer, etc.) and found they all audit application code or configuration - none of them audit the markdown customization content itself for hidden instructions aimed at the AI reader rather than the human reviewer.

Trojan Skill Hunter fills that gap. It checks for:

  • Hidden directive injection (HTML comments, <IMPORTANT>-style tags invisible in a rendered preview)
  • Unicode steganography (zero-width characters, bidi/RLO overrides, homoglyphs)
  • MCP-style tool poisoning and tool shadowing (per Invariant Labs' Tool Poisoning Attack research)
  • Excessive-agency scope mismatches (stated purpose vs. requested tools/permissions)
  • Rug-pull/supply-chain drift (unpinned remote script refs, self-updating instructions)
  • Encoded payloads (Base64/hex/ROT13 blobs that decode to instructions)

Findings are mapped to the OWASP Top 10 for LLM Applications (2025) and produced as a structured Markdown report with a PASS/FAIL/NEEDS-HUMAN-REVIEW verdict - it never auto-merges, auto-executes, or auto-rejects. It also has an explicit "Rule Zero": it treats everything it scans as untrusted data to analyze, never instructions to obey, so it can't itself be hijacked by the payloads it's hunting for.


Type of Contribution

  • New agent file.

Additional Notes

Validated locally before opening this PR:

  • npm ci && npm run build on a fresh branch cut from up-to-date origin/main - clean run, only docs/README.agents.md regenerated plus the new agent file
  • eng/fix-line-endings.sh run, no stray diffs
  • Searched the full agents/ and skills/ directories for name collisions and overlapping scope - confirmed no duplicate
  • Content grounded in OWASP Top 10 for LLM Applications 2025 and Invariant Labs' MCP Tool Poisoning Attack research

By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.

…tributions

Adds a new agent that audits .agent.md, SKILL.md, .instructions.md,
hooks.json, and MCP/plugin manifests for hidden prompt injection, MCP-style
tool poisoning/shadowing, unicode steganography, excessive-agency scope
mismatches, and rug-pull/supply-chain drift before contributions are
merged, installed, or trusted.

Mapped to the OWASP Top 10 for LLM Applications (2025) and Invariant Labs'
MCP Tool Poisoning Attack research. Includes an explicit self-defense rule
so the agent treats reviewed content as untrusted data, never instructions
to obey.
@sjiyani
sjiyani requested a review from aaronpowell as a code owner July 24, 2026 17:12
@github-actions github-actions Bot added agent PR touches agents new-submission PR adds at least one new contribution labels Jul 24, 2026
@github-actions

github-actions Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

🔒 PR Risk Scan Results

Scanned 2 changed file(s).

Severity Count
🔴 High 0
🟠 Medium 0
ℹ️ Info 0

✅ No matching risk patterns were detected in changed files.

This is an automated soft-gate report. Findings indicate review targets and do not block merge by themselves.

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Vally Lint Results

⚠️ Warnings or advisories found

Scope Checked
Skills 0
Agents 1
Total 1
Severity Count
❌ Errors 0
⚠️ Warnings 0
ℹ️ Advisories 1

Summary

Level Finding
ℹ️ Vally currently lints SKILL.md content. Agent files were detected but skipped:
Full linter output
### Agent files detected (not linted by vally)
ℹ️ Vally currently lints SKILL.md content. Agent files were detected but skipped:
agents/trojan-skill-hunter.agent.md

…ives

The Rule Zero bullet and two rug-pull/unpinned-fetch examples quoted the
exact literal phrases (e.g. 'ignore previous instructions', 'curl | bash')
that the repo's automated PR Risk Scan greps for. Reworded to convey the
identical meaning without the literal trigger strings - confirmed locally
with 'node eng/pr-risk-scan.mjs' (0 high/medium/info findings, was 3 high).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent PR touches agents new-submission PR adds at least one new contribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant