Skip to content

fix: apply prose injection rules to .txt and .yaml files - #30

Merged
royalpinto007 merged 1 commit into
AgentPostmortem:mainfrom
sharadvc:cursor/injection-txt-yaml-a94a
Sep 12, 2026
Merged

royalpinto007 merged 1 commit into
AgentPostmortem:mainfrom
sharadvc:cursor/injection-txt-yaml-a94a

Conversation

@sharadvc

Copy link
Copy Markdown
Contributor

Summary

Prompt-injection rules with appliesTo: "prose" only ran for markdown. .txt / .yaml / .yml were already collected as text files but skipped for prose rules. They now share the same prose path; fence handling stays markdown-only.

Test plan

  • npm test — asserts SKILL-INJ-001 on .txt and .yaml, and that .json does not get prose-only rules

Fixes #3

Prose rules (prompt-injection) previously ran only when isMarkdown was
true, so the same malicious text in .txt or .yaml was never checked.
Introduce isProseFile and use it in ruleApplies.

Fixes AgentPostmortem#3

Co-authored-by: Sharad. <sharadvc@users.noreply.github.com>
@royalpinto007
royalpinto007 merged commit 6aea278 into AgentPostmortem:main Sep 12, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prompt-injection rules only run on markdown, so the same text in a .txt or .yaml is never checked

3 participants