Skip to content

Fix prompt-injection context boundaries and inline link titles - #103

Merged
LE0-Lin merged 3 commits into
mainfrom
fix/injection-context-boundaries
Nov 20, 2026
Merged

LE0-Lin merged 3 commits into
mainfrom
fix/injection-context-boundaries

Conversation

@LE0-Lin

@LE0-Lin LE0-Lin commented Nov 20, 2026

Copy link
Copy Markdown
Owner

Fixes two bounded scanner edge cases:

  1. Prompt-injection & danger prohibition context (\src/agent_config_score/scanner.py):
    • Stop unrelated earlier prohibitions from hiding active directives after conjunctions such as \�nd then, \�nd instead, , then, , and always, or coordinated , and\ overrides.
    • Avoid \prompt-injection-override\ false positives on bounded whole-line defensive refusals, untrusted-data handling rules, and labeled examples (English and Simplified/Traditional Chinese) that quote an override phrase without exception words, double negatives, or trailing directives.
  2. Inline Markdown link titles (\src/agent_config_score/scanner.py):
    • Support single-quoted '...'\ and parenthesized (...)\ CommonMark titles on inline links consistently with reference-link definitions, including escaped/in-code link examples.

Added regression tests in \ ests/test_injection_context.py\ and \ ests/test_inline_link_examples.py. Local source suite: 694 tests passed (13 platform-skipped on Windows).

@LE0-Lin
LE0-Lin merged commit 326b682 into main Nov 20, 2026
33 checks passed
@LE0-Lin
LE0-Lin deleted the fix/injection-context-boundaries branch November 20, 2026 13:21
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