Skip to content

feat: implement issues #71-#77 governance enhancements#90

Merged
imran-siddique merged 2 commits intomainfrom
feat/issues-71-77-governance-enhancements
Mar 7, 2026
Merged

feat: implement issues #71-#77 governance enhancements#90
imran-siddique merged 2 commits intomainfrom
feat/issues-71-77-governance-enhancements

Conversation

@imran-siddique
Copy link
Copy Markdown
Member

Summary

Implements all 7 open issues (#71-#77) for the agent-governance-toolkit.

Issues Addressed

Issue Feature Tests Package
#71 Rogue agent detection (z-score frequency, entropy scoring, capability deviation, auto-quarantine) 27 agent-sre
#72 External audit trail integrity (FileAuditSink, HMAC signatures, HashChainVerifier) 25 agent-mesh
#73 Deep framework integrations (tool registry hooks, memory/sub-agent interception for LangChain/CrewAI/AutoGen) 28 agent-os
#74 Policy-as-code CI/CD (JSON Schema, CLI validate/test/diff, GitHub Actions, pre-commit) 25 agent-os
#75 Async concurrency safety (AsyncPolicyEvaluator, RW locks, thread-safe, batch eval) 31 agent-os + agent-mesh
#76 OpenTelemetry observability (GovernanceTracer, Prometheus metrics, Grafana dashboard) 16 agent-mesh
#77 SIGKILL process-level isolation (ProcessIsolationManager, real os.kill, cross-platform) 31 agent-os control-plane

Key Highlights

  • 183 new tests, all passing
  • 7,128 lines added across 29 files
  • Zero regressions on existing test suites
  • All optional dependencies (OTEL, Prometheus) gracefully degrade when not installed
  • Platform-aware process isolation (Unix SIGKILL / Windows TerminateProcess)
  • Full backward compatibility maintained

Testing

\\�ash

All new tests

pytest packages/agent-sre/tests/unit/test_rogue_detector.py # 27 passed
pytest packages/agent-mesh/tests/governance/test_audit_backends.py # 25 passed
pytest packages/agent-os/tests/test_deep_integrations.py # 28 passed
pytest packages/agent-os/tests/test_policy_cli.py # 25 passed
pytest packages/agent-os/tests/test_async_evaluator.py # 31 passed
pytest packages/agent-mesh/tests/test_otel_governance.py # 16 passed
pytest packages/agent-os/modules/control-plane/tests/test_process_isolation.py # 30 passed, 1 skipped (Unix-only)
\\

Closes #71, closes #72, closes #73, closes #74, closes #75, closes #76, closes #77

#71 - Behavioral anomaly detection for rogue agents (ASI-10)
  - RogueAgentDetector with z-score tool call frequency analysis
  - Action entropy scoring for loop/erratic behavior detection
  - Capability profile deviation detection with auto-quarantine
  - 27 new tests in agent-sre

#72 - External append-only audit trail integrity
  - AuditSink protocol with FileAuditSink backend
  - SignedAuditEntry with SHA-256 hashing and HMAC signatures
  - HashChainVerifier for tamper-evidence verification
  - AuditLog extended with optional external sink
  - 25 new tests in agent-mesh

#73 - Deepen framework integrations beyond wrapper-level
  - LangChain: tool registry hooks, memory write interception, sub-agent spawn detection
  - CrewAI: task step interception, crew memory interception, delegation detection
  - AutoGen: function call pipeline hooks, GroupChat interception, state change tracking
  - 28 new tests in agent-os

#74 - Policy-as-code CI/CD pipeline and schema validation
  - JSON Schema (draft-07) for policy YAML validation
  - CLI with validate, test, and diff commands
  - GitHub Actions workflow for policy PR validation
  - Pre-commit hook configuration
  - 25 new tests in agent-os

#75 - Async concurrency safety guarantees
  - AsyncPolicyEvaluator with asyncio.Lock and RW lock pattern
  - AsyncTrustPolicyEvaluator for agent-mesh trust policies
  - Thread-safe sync evaluation, batch evaluation, policy reload
  - Concurrency stats tracking
  - 31 new tests in agent-os

#76 - OpenTelemetry observability integration
  - GovernanceTracer with OTEL spans for policy/trust/signal/audit events
  - GovernanceMetrics with Prometheus counters/histograms/gauges
  - Grafana dashboard template with 6 governance panels
  - Graceful degradation when OTEL/Prometheus not installed
  - 16 new tests in agent-mesh

#77 - SIGKILL process-level isolation
  - ProcessIsolationManager with real OS-level process isolation
  - AgentProcessHandle with true os.kill(SIGKILL) enforcement
  - IsolatedSignalDispatcher extending SignalDispatcher
  - Platform-aware (Unix SIGKILL / Windows TerminateProcess)
  - 31 new tests in control-plane

Total: 183 new tests, 7128 lines added across 29 files.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions bot added tests agent-mesh agent-mesh package agent-sre agent-sre package ci/cd CI/CD and workflows size/XL Extra large PR (500+ lines) labels Mar 7, 2026
…xternal sink support

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@imran-siddique imran-siddique merged commit cc90928 into main Mar 7, 2026
22 of 23 checks passed
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 7, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails
actions/actions/checkout 11bd71901bbe5b1630ceea73d27597364c9af683 🟢 6
Details
CheckScoreReason
Maintained⚠️ 23 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 2
Code-Review🟢 10all changesets reviewed
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Binary-Artifacts🟢 10no binaries found in the repo
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
License🟢 10license file detected
Fuzzing⚠️ 0project is not fuzzed
Packaging⚠️ -1packaging workflow not detected
Pinned-Dependencies🟢 3dependency not pinned by hash detected -- score normalized to 3
Signed-Releases⚠️ -1no releases found
Security-Policy🟢 9security policy file detected
Branch-Protection🟢 6branch protection is not maximal on development and all release branches
SAST🟢 8SAST tool detected but not run on all commits
actions/actions/setup-python a309ff8b426b58ec0e2a45f0f869d46889d02405 🟢 5.2
Details
CheckScoreReason
Maintained⚠️ 23 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 2
Code-Review🟢 10all changesets reviewed
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Binary-Artifacts🟢 10no binaries found in the repo
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Packaging⚠️ -1packaging workflow not detected
License🟢 10license file detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
Fuzzing⚠️ 0project is not fuzzed
Pinned-Dependencies⚠️ 0dependency not pinned by hash detected -- score normalized to 0
Signed-Releases⚠️ -1no releases found
Security-Policy🟢 9security policy file detected
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
SAST🟢 9SAST tool is not run on all commits -- score normalized to 9

Scanned Files

  • .github/workflows/policy-validation.yml

@imran-siddique imran-siddique deleted the feat/issues-71-77-governance-enhancements branch March 7, 2026 22:19
imran-siddique added a commit that referenced this pull request Mar 8, 2026
…ypdf

- cryptography >=42.0.0 → >=46.0.5: Fix subgroup attack on SECT curves
- langchain-core >=0.1.0 → >=1.2.11: Fix SSRF via image_url token counting
- pypdf >=4.0.0 → >=6.0.0: Fix 14 DoS/infinite-loop/RAM-exhaustion vulns

Closes Dependabot alerts #75-#90.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
imran-siddique added a commit that referenced this pull request Mar 8, 2026
…ypdf (#103)

- cryptography >=42.0.0 → >=46.0.5: Fix subgroup attack on SECT curves
- langchain-core >=0.1.0 → >=1.2.11: Fix SSRF via image_url token counting
- pypdf >=4.0.0 → >=6.0.0: Fix 14 DoS/infinite-loop/RAM-exhaustion vulns

Closes Dependabot alerts #75-#90.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment