Python: preserve confidentiality through FIDES security tools - #8141
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Quarantine payload detection still relies on forgeable JSON structure and can truncate ordinary hidden payloads.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Preserves FIDES confidentiality labels through transformations, inspection, quarantine, and hidden results.
Changes:
- Propagates input confidentiality independently of integrity precedence.
- Publishes authoritative labels for security-tool results.
- Narrows quarantine payload recognition and expands regression coverage.
File summaries
| File | Description |
|---|---|
security.py |
Updates label propagation and security-tool parsing. |
test_security.py |
Adds confidentiality and quarantine regression tests. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
MAF Automated Review — Iteration 1
Result: Findings reported
Scope: full PR (3 commit(s)): a01e735957c3, c36fcae00970, 446bfed4c263
Model: gpt-5.6-sol-fast
Overview
The PR makes result confidentiality monotonic across hidden inputs and embedded labels, adds authoritative parsers for the security tools, and narrows quarantine payload recognition; focused tests cover those intended invariants. Two residual trust-boundary failures remain: reflected inspect_variable errors can override untrusted invocation provenance, and malformed optional label metadata can discard otherwise valid integrity and confidentiality fields.
Reviewed the supplied pull-request change set across correctness, security/reliability, architecture, and failure behavior.
2 verified findings remained after source verification (1 high, 1 medium) across 1 file. Details are attached to the affected lines below.
Affected areas: python/packages/core/agent_framework/security.py
446bfed to
07f8a71
Compare
Code Coverage OverviewLanguages: Python Python / code-coverage/pythonThe overall line coverage in commit d800337 in the Show a line coverage summary of the most covered files.
Updated |
07f8a71 to
d038401
Compare
d038401 to
c660a5e
Compare
d723aa6 to
2a39cff
Compare
2a39cff to
4177cb4
Compare
Keep resolved-input confidentiality on transformed and embedded-label results, publish authoritative inspect/quarantine labels, and avoid unwrapping ordinary response-shaped JSON. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Resolve the stacked PR2/PR3 boundary so hidden arguments are expanded once, retain their combined label for policy, and preserve their confidentiality on transformed results.\n\nCo-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use middleware provenance for quarantine unwrapping, require explicit label fields, fail unknown quarantine inputs closed, and scope trusted inspect errors to clean parser-marked invocations.\n\nCo-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
4177cb4 to
384489e
Compare
|
/review |
There was a problem hiding this comment.
MAF Automated Review — Iteration 2
Result: Findings reported
Scope: full PR (4 commit(s)): 7dbd951b3efc, c894ae48c4c5, c730173f6009, 384489e14ab5
Model: gpt-5.6-sol-fast
Overview
The change cleanly separates integrity precedence from confidentiality joins, preserves mandatory label fields when optional metadata is malformed, and uses internal markers plus scope-owned metadata to narrow result handling. The expanded tests cover hidden transformation inputs, malformed labels, inspection errors, and labeled quarantine inputs. One residual path allows a quarantine call with no labeled payload to publish PUBLIC confidentiality and override the tool's PRIVATE fallback, including for placeholder, model, and exception-derived output.
Reviewed the supplied pull-request change set across correctness, security/reliability, architecture, and failure behavior.
1 verified finding remained after source verification (1 medium) across 1 file. Details are attached to the affected lines below.
Affected areas: python/packages/core/agent_framework/security.py
Use the existing UNTRUSTED/PRIVATE fail-closed label when quarantined_llm receives no labeled input, with placeholder and configured-client regressions.\n\nCo-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Motivation & Context
Hidden content can be safely passed into a transformation after the preceding layer, but result labeling must preserve confidentiality independently from integrity. Security tools must also publish the labels of the content they actually expose or derive rather than relying on generic fallback metadata.
Description & Review Guide
inspect_variableandquarantined_llm, updates cumulative confidentiality for fully hidden results without integrity taint, and distinguishes internal quarantine wrappers from ordinary response-shaped JSON.Related Issue
Part of #7455. Depends on #8139 and is the third layer of a four-PR FIDES hardening stack.
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and the title prefix in sync automatically.