langchain
feat(langchain): prompt injection defense middleware
#34951
Open
Go
Login via GitHub
Home
Pricing
FAQ
Install
Login
via GitHub
Overview
Commits
22
Changes
View On
GitHub
feat(langchain): prompt injection defense middleware
#34951
jkennedyvz
wants to merge 22 commits into
master
from
jk/30jan/injection-middleware
Add PromptInjectionDefenseMiddleware with pluggable strategy pattern
7b695f04
refactor: DRY up extended tests, focus on prompt injection only
97b933ae
fix: cleanup unused imports, add Anthropic to extended tests
b7dac2c9
refactor: simplify prompt injection tests, add shared conftest
1fbf7cf9
test: expand injection payloads to 20 variants across 5 attack catego…
e088029a
test: add combined baseline/protected test and token benchmark
f03127e7
test: refactor prompt injection tests to reduce duplication
46cdd224
test: reorganize prompt injection tests and skip E2E by default
62349bd6
feat: add marker sanitization and filter mode for prompt injection de…
85360afd
fixup! refactor: DRY up extended tests, focus on prompt injection only
345ab387
fix(tests): check tool triggering instead of string presence in injec…
76468eb2
feat(tests): add argument hijacking tests and Google Gemini support
51a4e7d2
feat: add IntentVerificationStrategy for argument hijacking defense
0dd205f2
feat(tests): compare all defense strategies in injection tests
b2216bc6
github-actions
added
internal
github-actions
removed
internal
github-actions
added
langchain
github-actions
added
dependencies
github-actions
added
langchain-classic
jkennedyvz
changed the title
Jk/30jan/injection middleware
feat(langchain): prompt injection defense middleware
13 days ago
github-actions
added
feature
fix: resolve ruff linting errors and test parameter mismatch
f761769d
chore: add langchain-google-genai to test dependencies
a35f869e
fix: skip baseline vulnerability tests by default in CI
608bc115
fix: resolve mypy type errors in prompt injection defense
aa248def
adding google dps
c2e64d0f
hwchase17
commented on 2026-02-02
feat(middleware): add Tool Firewall defense stack for prompt injection
5b68956a
Refactor security middleware: consolidate into TaskShield + ToolResul…
88a58a07
Add randomized codeword defense against DataFlip attacks (arXiv:2507.…
937c8471
Login to write a write a comment.
Login via GitHub
Reviewers
ccurme
hwchase17
Assignees
No one assigned
Labels
langchain
dependencies
feature
langchain-classic
Milestone
No milestone
Login to write a write a comment.
Login via GitHub