docs: sync audit redaction status and framing with current code#1014
Conversation
- Add KillSwitch with arm/disarm, event history, and subscriber notifications - Add LifecycleManager with 8-state machine and validated transitions - Add 26 xUnit tests - Update README Co-authored-by: Copilot <[email protected]>
) * feat(dotnet): add kill switch and lifecycle management to .NET SDK - Add KillSwitch with arm/disarm, event history, and subscriber notifications - Add LifecycleManager with 8-state machine and validated transitions - Add comprehensive xUnit tests for both components (26 tests) - Update .NET SDK README with usage documentation Co-authored-by: Copilot <[email protected]> * feat(rust): add execution rings and lifecycle management to Rust SDK Add two new modules to the agentmesh Rust crate: - rings.rs: Four-level execution privilege ring model (Admin/Standard/ Restricted/Sandboxed) with per-agent assignment and per-ring action permissions, ported from the Python hypervisor enforcer. - lifecycle.rs: Eight-state agent lifecycle manager (Provisioning through Decommissioned) with validated state transitions and event history, matching the lifecycle model used across other SDK languages. Both modules include comprehensive unit tests and are re-exported from the crate root. README updated with API tables and usage examples. Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
… to Go SDK (#7) * feat(openshell): add governance skill package and runnable example (microsoft#942) Co-authored-by: Copilot <[email protected]> * feat(go): add MCP security, execution rings, and lifecycle management to Go SDK - mcp.go: MCP security scanner detecting tool poisoning, typosquatting, hidden instructions (zero-width chars, homoglyphs), and rug pulls - rings.go: Execution privilege ring model (Admin/Standard/Restricted/Sandboxed) with default-deny access control - lifecycle.go: Eight-state agent lifecycle manager with validated transitions - Full test coverage for all three modules - Updated README with API docs and examples Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
- Update SOC2 mapping to reflect CredentialRedactor now redacts credential-like secrets before audit persistence (API keys, tokens, JWTs, connection strings, etc.). Remaining gap: non-credential PII (email, phone, addresses) not yet redacted in audit entries. - Replace 'kernel-level enforcement' with 'policy-layer enforcement' in README, OWASP compliance, and architecture overview to match the existing 'application-level governance' framing in README Security section and LIMITATIONS.md. - Qualify 10/10 OWASP coverage claim in COMPARISON.md with footnote clarifying this means mitigation components exist per risk category, not full elimination. - Update owasp-llm-top10-mapping.md LLM06 row for credential redaction. Addresses doc/code inconsistencies identified in external review. Co-authored-by: Copilot <[email protected]>
🤖 AI Agent: docs-sync-checker — Issues Found📝 Documentation Sync ReportIssues Found
Suggestions
Additional Observations
Action Items
Once these issues are addressed, the documentation will be in sync. |
🤖 AI Agent: breaking-change-detector — Summary🔍 API Compatibility ReportSummaryThis pull request primarily updates documentation to align with current code behavior and introduces new features in the .NET package. No breaking changes were identified in the Python package Findings
Migration Guide✅ No breaking changes were identified in the Python package. No migration steps are required for existing users. Notes
If you have further questions or need additional analysis, feel free to ask! |
There was a problem hiding this comment.
🤖 AI Agent: code-reviewer
Feedback on Pull Request: docs: sync audit redaction status and framing with current code
🔴 CRITICAL: Security Issues
-
Non-Credential PII in Audit Logs:
- While credential redaction is implemented via
CredentialRedactor, non-credential Personally Identifiable Information (PII) such as email addresses, phone numbers, and physical addresses are still stored verbatim inAuditEntry.parameters. - Impact: This creates a significant privacy risk, as audit logs could inadvertently expose sensitive user data.
- Action: Implement a dedicated PII redactor or extend
CredentialRedactorto handle non-credential PII. This should include regex patterns for OWASP-recommended PII categories (email, phone, IP address, physical addresses, etc.).
- While credential redaction is implemented via
-
No Output PII Scanning:
- The current implementation only scans tool-call input arguments for sensitive data. LLM-generated outputs are not scanned for PII before being returned to the user.
- Impact: Agents could expose sensitive information in their responses, violating privacy and compliance requirements.
- Action: Add an output interceptor to scan LLM responses for PII before returning them to the user.
-
No At-Rest Encryption:
- Audit logs, policy documents, and configuration files are stored in plaintext without encryption.
- Impact: This makes sensitive data vulnerable to unauthorized access in case of a breach.
- Action: Implement encryption for data at rest, including audit logs and configuration files.
-
No Key Rotation Mechanism:
- There is no mechanism for rotating cryptographic keys (Ed25519, HMAC secrets, SPIFFE certificates).
- Impact: Long-lived keys increase the risk of compromise and reduce the overall security posture.
- Action: Add tooling for automated key rotation and key lifecycle management.
-
HMAC Symmetric Key Vulnerability:
- HMAC uses symmetric keys, which allow insiders with access to the key to forge audit chains.
- Impact: This compromises the integrity of the audit system.
- Action: Implement asymmetric signing for audit entries using Ed25519 or similar cryptographic algorithms.
🟡 WARNING: Potential Breaking Changes
- Framing Consistency Updates:
- The terminology change from "kernel-level enforcement" to "policy-layer/application-layer enforcement" in multiple documentation files may confuse existing users familiar with the previous terminology.
- Action: Add a clear note in the documentation explaining the rationale behind the terminology change to avoid confusion.
💡 Suggestions for Improvement
-
Expand PII Detection:
- The current implementation detects only two PII patterns (SSN and credit card numbers). Expand the detection to include email addresses, phone numbers, IP addresses, physical addresses, and other OWASP-recommended categories.
- Action: Update the regex patterns in
mcp_gateway.pyand ensure they are applied consistently across all data flows.
-
Retention Enforcement:
- The
retention_daysschema field is not enforced at runtime, allowing logs to persist indefinitely regardless of the configured retention policy. - Action: Implement log deletion and archival mechanisms based on the
retention_daysvalue.
- The
-
Privacy Notice Mechanism:
- There is no feature to generate or deliver privacy notices to end users interacting with governed agents.
- Action: Add a mechanism to generate and display privacy notices, ensuring compliance with privacy regulations.
-
Lifecycle Management:
- The newly added
LifecycleManagerclass for agent state transitions is a good addition. However, consider adding more granular validation for state transitions to prevent invalid or unintended transitions. - Action: Implement state-specific validation rules and document them clearly.
- The newly added
-
Kill Switch Thread Safety:
- The
KillSwitchclass uses alockfor thread safety when accessing_history. However, theOnKillevent is invoked outside the lock, which could lead to race conditions if subscribers modify shared state. - Action: Invoke
OnKillwithin the lock or document that subscribers should handle thread safety themselves.
- The
-
Backward Compatibility:
- Ensure that the changes to documentation and terminology do not affect existing integrations or user expectations. Consider providing migration guides or versioning for significant updates.
Summary
This PR addresses critical documentation gaps and aligns the documentation with the current codebase. However, several security issues remain unresolved, particularly around PII handling, audit log integrity, and cryptographic operations. These issues should be prioritized to ensure compliance with OWASP Agentic Top 10 and SOC2 requirements.
Recommended Actions
- Address the 🔴 CRITICAL issues immediately to mitigate security risks.
- Provide clear communication about 🟡 WARNING changes to avoid user confusion.
- Implement the 💡 SUGGESTIONS to improve the library's security, compliance, and usability.
Let me know if you need further clarification or assistance with implementing these changes!
🤖 AI Agent: security-scanner — Security Review SummarySecurity Review SummaryThe pull request primarily updates documentation to align with the current implementation of the Agent Governance Toolkit (AGT). While the changes are mostly documentation-related, they reference critical security mechanisms and gaps in the codebase. Additionally, new features like the Findings1. Credential Redaction in Audit Logs
2. KillSwitch Implementation
3. LifecycleManager Implementation
4. Race Condition in KillSwitch
5. Policy Engine Circumvention
6. Deserialization Risks
7. Supply Chain Risks
Additional Observations
Overall Risk Rating: 🟠 HIGHThe pull request itself does not introduce new vulnerabilities but highlights existing gaps and introduces new features that require additional safeguards. The most critical issues are related to policy engine circumvention, deserialization risks, and supply chain security. Suggested Next Steps
By addressing these issues, the Agent Governance Toolkit can maintain its position as a robust security layer for AI agents. |
Summary
Syncs documentation with current code to address doc/code inconsistencies identified in external review.
Changes (6 files)
SOC2 mapping (docs/compliance/soc2-mapping.md):
Framing consistency (4 files):
OWASP precision (2 files):
Motivation
External review identified SOC2 docs still claimed audit logs store unredacted parameters, while current mcp_gateway.py applies CredentialRedactor before creating AuditEntry records. This PR brings docs in line with code.