Skip to content

feat(930140): add AI coding assistant artifact protection#4519

Merged
fzipi merged 4 commits into
coreruleset:mainfrom
etiennemunnich:feat/930-ai-artifact-protection-4474
Mar 7, 2026
Merged

feat(930140): add AI coding assistant artifact protection#4519
fzipi merged 4 commits into
coreruleset:mainfrom
etiennemunnich:feat/930-ai-artifact-protection-4474

Conversation

@etiennemunnich
Copy link
Copy Markdown
Contributor

@etiennemunnich etiennemunnich commented Mar 3, 2026

  • Add rule 930140 (PL1 block) and ai-critical-artifacts.data.
  • Insert rule in REQUEST-930-APPLICATION-ATTACK-LFI.conf after 930130.

References (supporting links for ai-critical-artifacts.data entries):

Dot-folders:
.claude/ https://code.claude.com/docs/en/settings https://code.claude.com/docs/en/hooks
.cursor/ https://docs.cursor.com/context/rules-for-ai
.continue/ https://docs.continue.dev/customize/deep-dives/configuration
.aider/ https://aider.chat/docs/config.html
.roo/ https://docs.roocode.com/features/mcp/using-mcp-in-roo
.zed/ https://zed.dev/docs/reference/all-settings
.cline/ https://docs.cline.bot/customization/cline-rules https://docs.cline.bot/mcp/adding-and-configuring-servers
.kiro/ https://kiro.dev/docs/getting-started/first-project https://kiro.dev/docs/hooks
.windsurf/ https://docs.windsurf.com
.rovodev/ https://support.atlassian.com/rovo/docs/set-custom-instructions-for-code-reviews https://support.atlassian.com/rovo/docs/manage-rovo-dev-cli-settings/
.codex/ https://developers.openai.com/codex/config-basic
.opencode/ https://opencode.ai/docs/config/
.a0proj/ https://www.agent-zero.ai/p/docs/projects/ https://github.com/agent0ai/agent-zero
.plandex/ https://plandex.ai (plans, context)
.fabric/ https://github.com/danielmiessler/fabric (patterns, fabric.env)
.n8n/ https://docs.n8n.io/hosting/configuration/configuration-methods https://docs.n8n.io/hosting/configuration/configuration-examples/user-folder

Context (issue & research):
#4474
https://ironpeak.be/blog/leaking-secrets-from-the-claud/
https://github.com/hazcod/claudleak

Proposed changes

Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.

PR Checklist

  • I have read the CONTRIBUTING doc
  • I have added positive tests proving my fix/feature works as intended.
  • I have added negative tests that prove my fix/feature considers common cases that might end in false positives
  • [n/a] In case you changed a regular expression, you are not adding a ReDOS for pcre. You can check this using regexploit
  • My test use the comment field to write the expected behavior
  • I have added documentation for the rule or change (when appropriate)

Further comments

For the reviewer

  • Positive and negative tests were added

  • Tests cover the intended fix/feature properly

  • No usage of dangerous constructs like ctl:requestBodyAccess=Off were used in the rule

  • In case a regular expression was changed, there is no ReDOS

  • Documentation is clear for the rule/change

  • Fixes Add protection for AI directory leaks #4474

…eset#4474)

- Add rule 930140 (PL1 block) and ai-critical-artifacts.data.
- Insert rule in REQUEST-930-APPLICATION-ATTACK-LFI.conf after 930130.

References (supporting links for ai-critical-artifacts.data entries):

Dot-folders:
  .claude/    https://code.claude.com/docs/en/settings  https://code.claude.com/docs/en/hooks
  .cursor/    https://docs.cursor.com/context/rules-for-ai
  .continue/  https://docs.continue.dev/customize/deep-dives/configuration
  .aider/     https://aider.chat/docs/config.html
  .roo/       https://docs.roocode.com/features/mcp/using-mcp-in-roo
  .zed/       https://zed.dev/docs/reference/all-settings
  .cline/     https://docs.cline.bot/customization/cline-rules  https://docs.cline.bot/mcp/adding-and-configuring-servers
  .kiro/      https://kiro.dev/docs/getting-started/first-project  https://kiro.dev/docs/hooks
  .windsurf/  https://docs.windsurf.com
  .rovodev/   https://support.atlassian.com/rovo/docs/set-custom-instructions-for-code-reviews  https://support.atlassian.com/rovo/docs/manage-rovo-dev-cli-settings/
  .codex/     https://developers.openai.com/codex/config-basic
  .opencode/  https://opencode.ai/docs/config/
  .a0proj/    https://www.agent-zero.ai/p/docs/projects/  https://github.com/agent0ai/agent-zero
  .plandex/   https://plandex.ai (plans, context)
  .fabric/    https://github.com/danielmiessler/fabric (patterns, fabric.env)
  .n8n/       https://docs.n8n.io/hosting/configuration/configuration-methods  https://docs.n8n.io/hosting/configuration/configuration-examples/user-folder

Context (issue & research):
  coreruleset#4474
  https://ironpeak.be/blog/leaking-secrets-from-the-claud/
  https://github.com/hazcod/claudleak

Made-with: Cursor
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 3, 2026

📊 Quantitative test results for language: eng, year: 2023, size: 10K, paranoia level: 1:
🚀 Quantitative testing did not detect new false positives

Comment thread CHANGES.md
@Xhoenix Xhoenix added the release:new-detection In this PR we introduce a new detection label Mar 3, 2026
@fzipi
Copy link
Copy Markdown
Member

fzipi commented Mar 3, 2026

Looks good, we are still waiting for the removal of CHANGES.md from the PR.

@etiennemunnich
Copy link
Copy Markdown
Contributor Author

All done! Removed changes md - apologies was in my steering doc to track changes ;) noted for the future

@fzipi fzipi changed the title feat(930): add AI coding assistant artifact protection (Fixes #4474) feat(930140): add AI coding assistant artifact protection (Fixes #4474) Mar 5, 2026
Copy link
Copy Markdown
Member

@fzipi fzipi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One last thing: can you also add the references into the data file so they get properly documented?

That way it will ve easier to update in the future instead of getting into this PR?

@fzipi fzipi changed the title feat(930140): add AI coding assistant artifact protection (Fixes #4474) feat(930140): add AI coding assistant artifact protection Mar 7, 2026
@fzipi
Copy link
Copy Markdown
Member

fzipi commented Mar 7, 2026

Thanks @etiennemunnich for your PR!

Merging.

Copy link
Copy Markdown
Member

@fzipi fzipi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💪

@fzipi fzipi added this pull request to the merge queue Mar 7, 2026
Merged via the queue into coreruleset:main with commit 4df6985 Mar 7, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release:new-detection In this PR we introduce a new detection

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add protection for AI directory leaks

3 participants