Skip to content

Python: Minor changes to inpsect_variable, quarantined_llm and tool approval exception#5352

Open
shrutitople wants to merge 1 commit intomicrosoft:feature/python-fidesfrom
shrutitople:local-fides
Open

Python: Minor changes to inpsect_variable, quarantined_llm and tool approval exception#5352
shrutitople wants to merge 1 commit intomicrosoft:feature/python-fidesfrom
shrutitople:local-fides

Conversation

@shrutitople
Copy link
Copy Markdown

Motivation and Context

Minor changes to the tool approval exception in _tools.py, and security tools --- inspect_variable and quarantined_llm.
Few other changes to documentation based on copilot review.

Description

[_security.py]— Simplify quarantined_llm by removing tool-internal auto-hide logic (auto_hide_result parameter). The tool now declares source_integrity="untrusted" and relies on the middleware's standard auto-hide path. Also changed inspect_variable from approval_mode="always_require" to "never_require" — security is enforced by context tainting instead.

[_tools.py] — Fix _auto_invoke_function to preserve function_approval_request type through MiddlewareTermination, so the approval flow in _handle_function_call_results activates correctly for security policy violations.

[test_security.py] — Update tests to match the simplified quarantined_llm API (no auto_hide_result), add test for source_integrity declaration, add test verifying function_approval_request is preserved through _auto_invoke_function, and update inspect_variable approval mode assertion.

[FIDES_DEVELOPER_GUIDE.md] — Update documentation to reflect the simplified auto-hide mechanism and inspect_variable approval changes.

[README.md]— Fix broken file paths in examples and "More Information" section.

FIDES_IMPLEMENTATION_SUMMARY.md — Fix ADR reference (0011 → 0024).

@moonbox3 moonbox3 added documentation Improvements or additions to documentation python labels Apr 19, 2026
@github-actions github-actions bot changed the title Minor changes to inpsect_variable, quarantined_llm and tool approval exception Python: Minor changes to inpsect_variable, quarantined_llm and tool approval exception Apr 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants