litellm/tests/test_litellm/proxy/guardrails/guardrail_hooks
Yassin Kortam 9349b22c64
fix(guardrails): stop PII/PCI masking gaps in SpendLogs, debug logs, and logging_only response (#37965)
The Presidio guardrail masks messages in place inside pre_call_hook, but three
paths independently persisted or emitted the raw pre-guardrail data: the
SpendLogs proxy_server_request body snapshot (taken before the hook runs),
a verbose_proxy_logger.debug dump of the raw request, and logging_only mode's
async_logging_hook, which never masked the model's response before it reached
external logging callbacks.

Resolves LIT-6015
2026-08-22 14:15:55 -07:00
..
azure fix(guardrails): scan text on /guardrails/apply_guardrail for Azure Content Safety (#36894) 2026-08-17 11:18:40 -07:00
content_filter test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
guardrails_ai style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
openai test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
unified_guardrails fix(a2a): return SSE (text/event-stream) for message/stream instead of NDJSON (#35037) 2026-08-20 16:19:58 -07:00
_cisco_ai_defense_test_utils.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
code_execution_compliance_dataset.json feat(add-new-block_code_execution-guardrail): prevent agent from executing code (#22154) 2026-02-25 22:02:14 -08:00
test_aim.py fix(guardrails): walk Responses-API text taxonomy in shared content helpers (#32542) 2026-07-08 23:24:11 -07:00
test_bedrock_guardrails.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_bedrock_invoke_guardrail_checks.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_block_code_execution.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_block_code_execution_compliance.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_cato_networks.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_cisco_ai_defense_chat.py test: drop the leftover set_verbose from eleven test files (#37845) 2026-08-22 08:23:27 -07:00
test_cisco_ai_defense_mcp.py feat(guardrails): add Cisco AI Defense integration (#28249) (#30338) 2026-06-12 23:21:23 -07:00
test_compresr.py fix(guardrails): preserve cache_control breakpoints in compresr write-back 2026-07-25 14:47:25 -07:00
test_crowdstrike_aidr.py fix(guardrails): send only new messages since last assistant turn to CrowdStrike AIDR (#31974) 2026-07-06 09:47:00 -07:00
test_deepkeep.py test(guardrails): stop five guardrail test files leaking env vars on failure (#37828) 2026-08-21 21:29:31 -07:00
test_dynamoai.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_enkryptai.py test: require a match= on broad pytest.raises, and drop duplicate parametrize cases (#37769) 2026-08-20 20:24:49 -07:00
test_generic_guardrail_api.py test: require a match= on broad pytest.raises, and drop duplicate parametrize cases (#37769) 2026-08-20 20:24:49 -07:00
test_grayswan.py fix(guardrails): forward grayswan scan id header (#32544) 2026-07-08 15:05:27 -07:00
test_headroom.py fix(proxy): improve Headroom 404 compression error diagnostics (#35952) 2026-08-07 08:16:41 -07:00
test_hiddenlayer.py test(guardrails): stop five guardrail test files leaking env vars on failure (#37828) 2026-08-21 21:29:31 -07:00
test_lakera_ai_v2.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_lasso.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_mcp_end_user_permission.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_mcp_security.py Add MCP Security guardrail to block unregistered MCP servers (#21429) 2026-02-17 21:19:13 -08:00
test_microsoft_purview.py test: enforce PT012 so a pytest.raises block cannot hide dead assertions (#37748) 2026-08-20 19:36:26 -07:00
test_model_armor.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_noma.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_noma_v2.py perf(guardrails): stop sending the conversation twice in the noma v2 payload (#36764) 2026-08-17 15:37:17 -07:00
test_onyx.py test(guardrails): stop five guardrail test files leaking env vars on failure (#37828) 2026-08-21 21:29:31 -07:00
test_ovalix.py feat: litellm oss 110626 (#30202) 2026-06-11 22:30:26 -07:00
test_pangea.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_panw_prisma_airs.py test: require a match= on broad pytest.raises, and drop duplicate parametrize cases (#37769) 2026-08-20 20:24:49 -07:00
test_presidio.py fix(guardrails): stop PII/PCI masking gaps in SpendLogs, debug logs, and logging_only response (#37965) 2026-08-22 14:15:55 -07:00
test_presidio_union_fix.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_promptguard.py Add PromptGuard guardrail integration (#24268) 2026-04-09 08:12:24 -07:00
test_qualifire.py Hotfix - docs qualifire (#18724) 2026-01-07 17:23:12 +05:30
test_repelloai.py test(guardrails): stop five guardrail test files leaking env vars on failure (#37828) 2026-08-21 21:29:31 -07:00
test_response_rejection_guardrail_code.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_singulr.py chore(ci): merge oss branch (#33784) 2026-07-17 23:22:13 +00:00
test_straiker.py test: require a match= on broad pytest.raises, and drop duplicate parametrize cases (#37769) 2026-08-20 20:24:49 -07:00
test_structured_messages_writeback.py fix(guardrails/headroom): stop compressing the turn the model must act on (#35294) 2026-07-30 18:53:31 -07:00
test_tool_permission.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_tool_policy_guardrail.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_vigil_guard.py Litellm OSS Staging 010626 (#29422) 2026-06-01 21:42:51 -07:00
test_xecguard.py fix(xecguard): sanitize scan result before recording it for logging (#32935) 2026-07-12 02:46:02 +00:00