feat: add quantum-safe ML-DSA-65 signing alongside Ed25519#927
Conversation
…d 79 tests
Adds a unified click-based CLI entry point ('agt') to the agent-governance-toolkit
meta-package, consolidating the fragmented CLI experience across 12+ packages.
Changes:
- New 'agt' command: click-based dispatcher with plugin discovery via entry_points
- Built-in commands: verify, integrity, lint-policy (wrapping existing modules)
- New 'doctor' command: diagnoses installation health, package versions, config files
- Global flags: --json, --verbose, --quiet, --no-color with consistent behavior
- Plugin system: 'agt.commands' entry-point group for auto-discovery of sub-packages
- Rich optional: graceful degradation when rich is not installed
- Error handling: sanitized errors in JSON mode, no internal detail leaks
- 79 comprehensive tests covering routing, plugins, error paths, and performance
- Compatible with click 8.0+ (no BaseCommand deprecation, no mix_stderr requirement)
- Backward compatible: old entry points (agent-governance, agent-compliance) unchanged
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…onfusion, network bindings - Add MIT license headers to 30 Python source files across 5 packages (agent-discovery, agent-compliance, agent-hypervisor, agent-mesh, agent-sre) - Add self-assessment disclaimers to 7 compliance mapping docs (SOC2, NIST AI RMF, NIST RFI, ATF, OWASP Agentic, OWASP LLM, MCP OWASP) - Fix dependency confusion: pip install ai-agent-governance is not a registered package name — corrected to agent-governance-toolkit in quickstart.py - Fix network exposure: default host binding changed from 0.0.0.0 to 127.0.0.1 in agent-os server and agent-sre API core library defaults Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
🤖 AI Agent: docs-sync-checker — Issues Found📝 Documentation Sync ReportIssues Found
Suggestions
Additional Notes
Please address the issues and suggestions above to ensure the documentation is fully in sync with the new changes. Let me know if you need further assistance! |
🤖 AI Agent: breaking-change-detector — Summary🔍 API Compatibility ReportSummaryThis pull request introduces quantum-safe ML-DSA-65 signing alongside Ed25519, adds a new CLI entry point ( Findings
Migration GuideNo migration steps are necessary as no breaking changes were identified. Downstream users can adopt the new features without modifying existing code. Additional Notes
✅ No breaking changes detected. |
🤖 AI Agent: test-generator — `packages/agent-compliance/src/agent_compliance/cli/agt.py`🧪 Test Coverage Analysis
|
There was a problem hiding this comment.
🤖 AI Agent: code-reviewer
Pull Request Review for feat: add quantum-safe ML-DSA-65 signing alongside Ed25519
🔴 CRITICAL: Security Issues
-
Lack of Cryptographic Validation for ML-DSA-65 Implementation:
- There is no evidence in the provided diff that the ML-DSA-65 implementation has been rigorously validated against the FIPS 204 or NIST Level 3 standards. Without proper validation, the implementation may be vulnerable to cryptographic attacks.
- Action: Ensure that the ML-DSA-65 implementation is tested against known test vectors and adheres to the standard. Add unit tests to verify the correctness of the cryptographic operations.
-
Dual-Signing Mechanism:
- The introduction of dual-signing (Ed25519 + ML-DSA-65) increases the attack surface. If either signature scheme is compromised, the overall security of the system is at risk.
- Action: Clearly document the security implications of dual-signing. Consider adding a configuration option to allow users to disable dual-signing if not required.
-
Dependency on
dilithium-py:- The
dilithium-pylibrary is used for ML-DSA-65, but there is no information about its security audits or compliance with NIST standards. - Action: Verify the security of the
dilithium-pylibrary. Ensure it is actively maintained, has undergone third-party audits, and is not vulnerable to known attacks.
- The
-
Error Handling in CLI:
- The
_handle_errorfunction does not log stack traces for unexpected exceptions unless theAGENTOS_DEBUGenvironment variable is set. This could lead to missed debugging opportunities for critical issues. - Action: Log stack traces for unexpected exceptions by default, or provide an explicit flag to enable detailed error logging.
- The
🟡 WARNING: Potential Breaking Changes
-
New CLI Entry Point (
agt):- The addition of a new CLI entry point (
agt) may conflict with existing workflows or scripts that rely on the old entry points (agent-governance-toolkit,agent-governance,agent-compliance). - Action: Clearly document the new CLI entry point and provide a deprecation notice for the old entry points if they are intended to be removed in the future.
- The addition of a new CLI entry point (
-
Optional Dependency on
click:- Adding
clickas a dependency for the CLI introduces a new requirement for users. Whileclickis a widely used library, this change could break environments that do not haveclickinstalled. - Action: Ensure that the dependency on
clickis clearly documented, and provide instructions for installing it if not included in the default installation.
- Adding
💡 Suggestions for Improvement
-
Thread Safety in Cryptographic Operations:
- The code does not provide any guarantees about thread safety when using the new ML-DSA-65 signing mechanism.
- Suggestion: Document whether the
dilithium-pylibrary is thread-safe. If not, implement appropriate locking mechanisms to ensure thread safety during cryptographic operations.
-
Type Annotations:
- The new code lacks type annotations in several places, such as the
_discover_pluginsand_get_package_versionfunctions. - Suggestion: Add type annotations to improve code readability and catch potential type-related bugs during development.
- The new code lacks type annotations in several places, such as the
-
Pydantic Model Validation:
- There is no evidence of Pydantic model validation for the new
SignatureBundleor other related data structures. - Suggestion: Use Pydantic models to validate the structure and types of data used in the new signing mechanism.
- There is no evidence of Pydantic model validation for the new
-
Test Coverage:
- While the PR mentions 24 passing tests, there is no evidence of tests specifically targeting edge cases for the ML-DSA-65 implementation or the dual-signing mechanism.
- Suggestion: Add comprehensive tests for the following scenarios:
- Invalid keys for ML-DSA-65.
- Corrupted or tampered signatures.
- Performance benchmarks for dual-signing.
- Compatibility tests for different Python versions (3.9–3.12).
-
Backward Compatibility:
- The new CLI (
agt) introduces a unified interface, but it is unclear if existing users will be affected by this change. - Suggestion: Provide backward compatibility for existing CLI commands or offer a migration guide for users.
- The new CLI (
-
Documentation:
- The documentation updates are minimal and do not provide sufficient details about the new features.
- Suggestion: Update the documentation to include:
- Detailed usage examples for the new CLI commands.
- Security considerations for dual-signing.
- Information about the ML-DSA-65 implementation and its compliance with standards.
-
Code Quality:
- The
_handle_errorfunction could be refactored to reduce code duplication. The error handling logic for JSON and non-JSON outputs is repeated multiple times. - Suggestion: Extract the common error-handling logic into a separate function to improve maintainability.
- The
Summary of Recommendations
- 🔴 Critical: Validate the ML-DSA-65 implementation against standards and ensure the security of the
dilithium-pylibrary. - 🟡 Warning: Document the new CLI entry point and ensure backward compatibility.
- 💡 Suggestions: Improve thread safety, add type annotations, enhance test coverage, and update documentation.
Let me know if you need further clarification or assistance!
🤖 AI Agent: security-scanner — Security Analysis of the Pull RequestSecurity Analysis of the Pull RequestThis pull request introduces quantum-safe ML-DSA-65 signing alongside the existing Ed25519 signing mechanism. It also includes a new CLI ( 1. Prompt Injection Defense BypassNo issues identified.
2. Policy Engine Circumvention🔴 CRITICAL
3. Trust Chain Weaknesses🟠 HIGH
4. Credential Exposure🔵 LOW
5. Sandbox Escape🟡 MEDIUM
6. Deserialization Attacks🟠 HIGH
7. Race Conditions🟡 MEDIUM
8. Supply Chain🟠 HIGH
Summary of Findings
Recommended Actions
These changes are critical to ensure the security and integrity of the Agent Governance Toolkit, which serves as a foundational security layer for downstream users. |
|
Shipped in v3.1.0! 🔒 ML-DSA-65 is our first step toward post-quantum readiness. Next: ML-KEM for key exchange. |
Addresses gap #4: post-quantum crypto. ML-DSA-65 (FIPS 204, NIST Level 3) via dilithium-py alongside existing Ed25519. SigningProvider ABC, create_signer() factory, dual-signing support, SignatureBundle with audit metadata. 24 tests passing. Optional dependency - Ed25519 unchanged.