Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/agent-compliance/src/agent_compliance/cli/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@
def handle_error(e: Exception, output_json: bool = False, custom_msg: Optional[str] = None):
"""Centralized error handler for compliance CLI."""
is_known = isinstance(e, (IOError, ValueError, KeyError, PermissionError, FileNotFoundError))

if custom_msg:
err_msg = custom_msg
elif is_known:
err_msg = "A validation or file access error occurred."
else:
err_msg = "A governance processing error occurred."

if output_json:
print(json.dumps({"status": "fail" if not is_known else "error", "message": err_msg, "type": "ValidationError" if is_known else "InternalError"}, indent=2))
else:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@
from __future__ import annotations

import json
import os
import re
from dataclasses import dataclass, field
from dataclasses import dataclass
from datetime import datetime, timedelta, timezone
from difflib import SequenceMatcher
from pathlib import Path
Expand Down
41 changes: 39 additions & 2 deletions scripts/check_dependency_confusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,28 @@
# Slack / messaging
"slack-sdk", "slack-bolt",
# Telemetry
"opentelemetry-instrumentation-fastapi",
"opentelemetry-instrumentation-fastapi", "opentelemetry-exporter-otlp",
"opentelemetry-instrumentation-httpx", "opentelemetry-instrumentation-asyncio",
# pyproject.toml optional-dependency group names (not real packages)
"dev", "cli", "all", "server", "storage", "observability",
"django", "websocket", "websockets", "grpc", "grpcio", "grpcio-tools",
"agent-os", "test", "docs", "full", "api", "otel", "protocols",
"runtime", "sandbox", "sre", "hypervisor", "iatp", "keywords",
"llm", "mcp", "hf", "huggingface", "blockchain", "web3",
"multi-agent", "broker-agnostic", "pubsub", "kafka", "rabbitmq",
"sql", "async", "nexus", "caas-core", "message-bus",
"ai-agents", "amb", "eval_type_backport",
# Integration packages / real PyPI packages used as deps
"hypothesis", "fakeredis", "langflow", "langgraph",
"agentmesh", "pydantic-ai", "haystack", "respx",
"langfuse", "arize", "llamaindex", "braintrust", "helicone",
"datadog", "langsmith", "wandb", "mlflow", "agentops",
"typer", "jsonschema", "anyio", "pre-commit", "import-linter",
"mkdocs", "mkdocs-material", "mkdocstrings", "datasets", "sqlglot",
"aio-pika", "aiokafka",
# Internal module references
"inter-agent-trust-protocol", "agent-control-plane", "cmvk",
"agent-tool-registry", "cedar", "opa", "huggingface_hub",
# Internal cross-package references (local-only, NOT on PyPI)
# These are flagged as HIGH RISK if found in requirements.txt with version pins
# instead of path references. See dependency confusion attack vector.
Expand All @@ -73,7 +94,9 @@
REGISTERED_NPM_PACKAGES = {
"@microsoft/agent-os-kernel", "@microsoft/agentmesh-mcp-proxy",
"@microsoft/agentmesh-api", "@microsoft/agent-os-cursor",
"@microsoft/agentmesh-mastra",
"@microsoft/agentmesh-mastra", "@microsoft/agentmesh-copilot-governance",
"@microsoft/agent-os-copilot-extension", "@microsoft/agentos-mcp-server",
"@microsoft/agent-os-vscode",
# Common deps
"typescript", "tsup", "vitest", "express", "zod", "@mastra/core",
"@modelcontextprotocol/sdk", "ws", "commander", "chalk",
Expand All @@ -84,6 +107,20 @@
"axios", "@types/vscode", "@vscode/vsce", "webpack", "webpack-cli",
"ts-node", "nodemon", "concurrently", "dotenv",
"esbuild", "@esbuild/linux-x64", "@esbuild/darwin-arm64",
# npm deps from extensions/copilot
"@octokit/webhooks", "path-to-regexp", "winston",
# npm deps from extensions/chrome
"react", "react-dom", "webextension-polyfill",
"@types/chrome", "@types/react", "@types/react-dom",
"copy-webpack-plugin", "css-loader", "eslint-plugin-react",
"eslint-plugin-react-hooks", "html-webpack-plugin", "style-loader",
"ts-loader",
# npm deps from extensions/mcp-server
"uuid", "yaml", "zod", "@types/uuid", "@vitest/coverage-v8",
# npm deps from mcp-proxy
"crypto-js",
# npm deps from sdks/typescript
"js-yaml", "@noble/ed25519",
}

# Known Cargo crate names
Expand Down
Loading