Skip to content

fix: dedupe prompt findings by content hash#266

Draft
luohui1 wants to merge 1 commit into
MCP-Audit:mainfrom
luohui1:fix/prompt-finding-dedupe
Draft

fix: dedupe prompt findings by content hash#266
luohui1 wants to merge 1 commit into
MCP-Audit:mainfrom
luohui1:fix/prompt-finding-dedupe

Conversation

@luohui1

@luohui1 luohui1 commented Jun 14, 2026

Copy link
Copy Markdown

Summary

  • add prompt-content dedupe for duplicate prompt_injection findings on prompt and instruction surfaces
  • keep the first finding while recording every source location in also_found_in
  • add regression coverage for duplicate content across files and distinct prompts in the same file

Fixes #205

Type of change

  • Bug fix
  • New feature / analyzer
  • Breaking change
  • Documentation

Test plan

  • uv run pytest tests\test_prompt_dedupe.py tests\test_instruction_discovery.py tests\test_tpa_patterns.py tests\test_surface_scan_artifacts.py tests\scoring\test_analyzer_evidence.py
  • uv run ruff check src tests
  • git diff --check

Checklist

  • CHANGELOG.md updated (if user-facing) — see Keep a Changelog
  • Tests added or updated
  • No secrets or credentials in code
  • Docs updated if CLI behavior or report output changed — see Documentation index (guides live under docs/get-started/, docs/scanning/, docs/platform/, etc.)

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.

1 participant