Skip to content

Commit 6eb725c

Browse files
authored
feat(rules): plugin manifest, Gemini, OpenCode, Cursor, Copilot, and instruction import rules (#143)
Adds src/rules/harnesses.ts with 25 rules covering Claude plugin manifests and marketplaces, Gemini CLI settings, OpenCode config, Cursor hooks, GitHub Copilot agents, and external or secret-reaching imports and hidden comment payloads in CLAUDE.md, AGENTS.md, and rules files. 62 new tests.
1 parent 2d38e0a commit 6eb725c

4 files changed

Lines changed: 1987 additions & 1 deletion

File tree

src/rules/agents.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const MARKDOWN_REFERENCE_COMMENT_PATTERN = /\[\/\/\]:\s*#\s*\(([^)\n]*)\)/g;
2323
* Imperative instruction shapes that carry injection signal inside a comment.
2424
* Bare words like "system" or "run" do not match on their own.
2525
*/
26-
const SUSPICIOUS_COMMENT_INSTRUCTION_PATTERN =
26+
export const SUSPICIOUS_COMMENT_INSTRUCTION_PATTERN =
2727
/(?:ignore|disregard|override)\s+(?:all|any|previous|prior|the|your|these)?\s*(?:instructions?|rules?|guidelines?|system\s+prompt)|(?:run|execute|install|download|send|post|upload|curl|wget|exfiltrate)\s+[^\s]{2,}|system\s*prompt|you\s+are\s+now|do\s+not\s+(?:tell|mention|reveal)/i;
2828

2929
function normalizeConfigPath(filePath: string): string {

0 commit comments

Comments
 (0)