plugin-scanner 2.0.94__tar.gz → 2.0.95__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/PKG-INFO +1 -1
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/pyproject.toml +1 -1
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/pyproject.toml.bak +1 -1
- plugin_scanner-2.0.95/src/codex_plugin_scanner/guard/runtime/actions.py +579 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/version.py +1 -1
- plugin_scanner-2.0.95/tests/test_guard_runtime_actions.py +467 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/.clusterfuzzlite/Dockerfile +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/.clusterfuzzlite/build.sh +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/.clusterfuzzlite/project.yaml +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/.clusterfuzzlite/requirements-atheris.txt +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/.dockerignore +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/.github/CODEOWNERS +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/.github/ISSUE_TEMPLATE/bug-report.yml +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/.github/ISSUE_TEMPLATE/feature-request.yml +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/.github/dependabot.yml +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/.github/workflows/ci.yml +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/.github/workflows/codeql.yml +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/.github/workflows/dependabot-uv-lock.yml +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/.github/workflows/fuzz.yml +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/.github/workflows/harness-smoke.yml +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/.github/workflows/publish.yml +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/.github/workflows/scorecard.yml +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/.gitignore +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/.pre-commit-hooks.yaml +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/CONTRIBUTING.md +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/Dockerfile +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/LICENSE +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/README.md +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/SECURITY.md +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/dashboard/index.html +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/dashboard/package.json +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/dashboard/pnpm-lock.yaml +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/dashboard/public/apple-touch-icon.png +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/dashboard/public/brand/Logo_Icon_Dark.png +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/dashboard/public/brand/Logo_Whole.png +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/dashboard/public/favicon-16x16.png +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/dashboard/public/favicon-32x32.png +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/dashboard/public/favicon.ico +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/dashboard/src/app.tsx +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/dashboard/src/approval-center-layout.tsx +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/dashboard/src/approval-center-primitives.tsx +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/dashboard/src/approval-center-utils.ts +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/dashboard/src/fleet-workspace.tsx +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/dashboard/src/guard-api.test.ts +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/dashboard/src/guard-api.ts +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/dashboard/src/guard-demo.ts +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/dashboard/src/guard-types.ts +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/dashboard/src/main.tsx +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/dashboard/src/receipts-workspace.tsx +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/dashboard/src/runtime-overview.tsx +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/dashboard/src/settings-workspace.tsx +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/dashboard/src/styles.css +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/dashboard/src/vite-env.d.ts +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/dashboard/tsconfig.json +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/dashboard/vite.config.ts +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/docker-requirements.txt +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/docs/guard/approval-audit.md +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/docs/guard/architecture.md +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/docs/guard/get-started.md +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/docs/guard/harness-support.md +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/docs/guard/local-vs-cloud.md +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/docs/guard/testing-matrix.md +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/docs/trust/mcp-trust-draft.md +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/docs/trust/plugin-trust-draft.md +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/docs/trust/skill-trust-local.md +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/fuzzers/manifest_fuzzer.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/requirements.txt +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/schemas/plugin-quality.v1.json +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/schemas/scan-result.v1.json +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/schemas/verify-result.v1.json +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/__init__.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/action_runner.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/argparse_utils.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/checks/__init__.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/checks/best_practices.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/checks/claude.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/checks/code_quality.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/checks/ecosystem_common.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/checks/gemini.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/checks/manifest.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/checks/manifest_support.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/checks/marketplace.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/checks/mcp_security.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/checks/opencode.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/checks/operational_security.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/checks/security.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/checks/skill_security.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/cli.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/cli_ui.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/config.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/ecosystems/__init__.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/ecosystems/base.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/ecosystems/claude.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/ecosystems/codex.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/ecosystems/detect.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/ecosystems/gemini.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/ecosystems/opencode.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/ecosystems/registry.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/ecosystems/types.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/github_reporting.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/__init__.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/adapters/__init__.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/adapters/antigravity.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/adapters/base.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/adapters/claude_code.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/adapters/codex.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/adapters/copilot.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/adapters/cursor.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/adapters/gemini.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/adapters/hermes.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/adapters/mcp_servers.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/adapters/openclaw.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/adapters/openclaw_config.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/adapters/openclaw_support.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/adapters/opencode.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/adapters/opencode_artifacts.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/advisory_model.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/approvals.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/bridge/__init__.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/capabilities.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/cli/__init__.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/cli/approval_commands.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/cli/bootstrap.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/cli/commands.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/cli/connect_flow.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/cli/install_commands.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/cli/product.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/cli/prompt.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/cli/render.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/cli/update_commands.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/codex_config.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/config.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/consumer/__init__.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/consumer/service.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/daemon/__init__.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/daemon/client.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/daemon/manager.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/daemon/server.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/daemon/static/apple-touch-icon.png +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/daemon/static/assets/guard-dashboard.js +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/daemon/static/assets/index.css +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/daemon/static/brand/Logo_Icon_Dark.png +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/daemon/static/brand/Logo_Whole.png +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/daemon/static/favicon-16x16.png +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/daemon/static/favicon-32x32.png +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/daemon/static/favicon.ico +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/daemon/static/index.html +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/edge_events.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/incident.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/launcher.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/mcp_tool_calls.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/models.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/policy/__init__.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/policy/engine.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/protect.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/proxy/__init__.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/proxy/remote.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/proxy/runtime_mcp.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/proxy/stdio.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/receipts/__init__.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/receipts/manager.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/redaction.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/risk.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/runtime/__init__.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/runtime/runner.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/runtime/secret_file_requests.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/runtime/surface_server.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/schemas/__init__.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/schemas/consumer_mode.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/schemas/guard_event_v1.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/schemas/surface_server.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/shims.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/store.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/store_approvals.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/store_connect.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/guard/types.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/integrations/__init__.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/integrations/cisco_mcp_scanner.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/integrations/cisco_skill_scanner.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/lint_fixes.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/marketplace_support.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/models.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/path_support.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/policy.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/quality_artifact.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/repo_detect.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/reporting.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/rules/__init__.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/rules/registry.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/rules/specs.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/scanner.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/submission.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/suppressions.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/trust_domain_scoring.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/trust_helpers.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/trust_mcp_scoring.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/trust_models.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/trust_plugin_scoring.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/trust_scoring.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/trust_skill_scoring.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/trust_specs.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/src/codex_plugin_scanner/verification.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/__init__.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/conftest.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/__init__.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/bad-plugin/.codex-plugin/plugin.json +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/bad-plugin/.mcp.json +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/bad-plugin/secrets.js +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/claude-plugin-good/.claude-plugin/plugin.json +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/claude-plugin-good/LICENSE +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/claude-plugin-good/README.md +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/claude-plugin-good/SECURITY.md +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/claude-plugin-good/hooks/hooks.json +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/claude-plugin-good/skills/example/SKILL.md +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/code-quality-bad/evil.js +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/code-quality-bad/inject.js +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/gemini-extension-good/GEMINI.md +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/gemini-extension-good/LICENSE +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/gemini-extension-good/README.md +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/gemini-extension-good/SECURITY.md +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/gemini-extension-good/commands/hello.toml +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/gemini-extension-good/gemini-extension.json +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/good-plugin/.codex-plugin/plugin.json +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/good-plugin/.codexignore +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/good-plugin/LICENSE +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/good-plugin/README.md +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/good-plugin/SECURITY.md +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/good-plugin/assets/icon.svg +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/good-plugin/assets/logo.svg +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/good-plugin/assets/screenshot.svg +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/good-plugin/skills/example/SKILL.md +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/guard-codex-malicious-mcp/.codex/config.toml +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/hermes-plugin-evil/config.yaml +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/hermes-plugin-evil/mcp_servers.json +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/hermes-plugin-evil/skills/security/malicious/SKILL.md +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/hermes-plugin-evil/skills/stealth/sneaky/SKILL.md +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/hermes-plugin-evil/skills/stealth/sneaky/references/api-setup.md +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/hermes-plugin-evil/skills/stealth/sneaky/scripts/deploy.sh +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/hermes-plugin-evil/skills/utils/benign/SKILL.md +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/malformed-json/.codex-plugin/plugin.json +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/malicious-skill-plugin/.codex-plugin/plugin.json +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/malicious-skill-plugin/.codexignore +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/malicious-skill-plugin/LICENSE +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/malicious-skill-plugin/README.md +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/malicious-skill-plugin/SECURITY.md +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/malicious-skill-plugin/skills/leaky-skill/SKILL.md +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/mcp-canary-server.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/minimal-plugin/.codex-plugin/plugin.json +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/missing-fields/.codex-plugin/plugin.json +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/mit-license/LICENSE +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/multi-ecosystem-repo/codex-plugin/.codex-plugin/plugin.json +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/multi-ecosystem-repo/codex-plugin/LICENSE +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/multi-ecosystem-repo/codex-plugin/README.md +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/multi-ecosystem-repo/codex-plugin/SECURITY.md +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/multi-ecosystem-repo/gemini-ext/README.md +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/multi-ecosystem-repo/gemini-ext/gemini-extension.json +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/multi-plugin-repo/.agents/plugins/marketplace.json +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/multi-plugin-repo/plugins/alpha-plugin/.codex-plugin/plugin.json +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/multi-plugin-repo/plugins/alpha-plugin/.codexignore +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/multi-plugin-repo/plugins/alpha-plugin/LICENSE +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/multi-plugin-repo/plugins/alpha-plugin/README.md +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/multi-plugin-repo/plugins/alpha-plugin/SECURITY.md +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/multi-plugin-repo/plugins/alpha-plugin/skills/example/SKILL.md +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/multi-plugin-repo/plugins/beta-plugin/.codex-plugin/plugin.json +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/multi-plugin-repo/plugins/beta-plugin/skills/example/SKILL.md +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/no-version/.codex-plugin/plugin.json +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/opencode-good/.opencode/commands/hello.md +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/opencode-good/.opencode/plugins/example.ts +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/opencode-good/LICENSE +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/opencode-good/README.md +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/opencode-good/SECURITY.md +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/opencode-good/opencode.jsonc +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/skills-missing-dir/.codex-plugin/plugin.json +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/skills-no-frontmatter/.codex-plugin/plugin.json +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/skills-no-frontmatter/skills/bad-skill/SKILL.md +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/with-marketplace/.codex-plugin/plugin.json +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/with-marketplace/marketplace-broken.json +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/fixtures/with-marketplace/marketplace.json +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test-trust-scoring.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test-trust-specs.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_action_runner.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_best_practices.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_cisco_install_surfaces.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_cli.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_code_quality.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_config.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_coverage_remaining.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_ecosystems.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_edge_cases.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_final_coverage.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_guard_approvals.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_guard_bootstrap.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_guard_capabilities.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_guard_claude_adapter.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_guard_cli.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_guard_codex_e2e.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_guard_codex_install.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_guard_codex_proxy.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_guard_config_paths.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_guard_connect_flow.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_guard_consumer_mode.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_guard_copilot_adapter.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_guard_copilot_proxy.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_guard_daemon_manager.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_guard_event_schema_v1.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_guard_events.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_guard_launch_env.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_guard_opencode_proxy.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_guard_product_flow.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_guard_protect.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_guard_render.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_guard_risk.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_guard_runtime.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_guard_store_migrations.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_guard_surface_server.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_guard_verdicts.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_hermes_adapter.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_integration.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_lint_fixes.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_live_cisco_smoke.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_manifest.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_marketplace.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_mcp_security.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_openclaw_adapter.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_operational_security.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_policy.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_quality_artifact.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_rule_registry.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_scanner.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_schema_contracts.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_security.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_security_ops.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_skill_security.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_submission.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_trust_scoring.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_trust_specs.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_verification.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/tests/test_versioning.py +0 -0
- {plugin_scanner-2.0.94 → plugin_scanner-2.0.95}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: plugin-scanner
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.95
|
|
4
4
|
Summary: Lint, verify, and gate plugin ecosystems for maintainers, CI, and publish workflows.
|
|
5
5
|
Project-URL: Homepage, https://github.com/hashgraph-online/ai-plugin-scanner
|
|
6
6
|
Project-URL: Repository, https://github.com/hashgraph-online/ai-plugin-scanner
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "plugin-scanner"
|
|
7
|
-
version = "2.0.
|
|
7
|
+
version = "2.0.95"
|
|
8
8
|
description = "Lint, verify, and gate plugin ecosystems for maintainers, CI, and publish workflows."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "Apache-2.0"
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "hol-guard"
|
|
7
|
-
version = "2.0.
|
|
7
|
+
version = "2.0.95"
|
|
8
8
|
description = "Protect local AI harnesses with HOL Guard and run scanner checks for Codex, Claude, Cursor, Gemini, and OpenCode."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "Apache-2.0"
|
|
@@ -0,0 +1,579 @@
|
|
|
1
|
+
"""Typed runtime action envelopes for Guard hook payloads."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import hashlib
|
|
6
|
+
import json
|
|
7
|
+
import re
|
|
8
|
+
from collections.abc import Mapping
|
|
9
|
+
from dataclasses import dataclass
|
|
10
|
+
from pathlib import Path, PureWindowsPath
|
|
11
|
+
from typing import Literal
|
|
12
|
+
|
|
13
|
+
from ..redaction import redact_text
|
|
14
|
+
|
|
15
|
+
GuardActionType = Literal[
|
|
16
|
+
"prompt",
|
|
17
|
+
"shell_command",
|
|
18
|
+
"file_read",
|
|
19
|
+
"file_write",
|
|
20
|
+
"mcp_tool",
|
|
21
|
+
"package_script",
|
|
22
|
+
"network_request",
|
|
23
|
+
"config_change",
|
|
24
|
+
"browser_action",
|
|
25
|
+
"harness_start",
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
_VALID_ACTION_TYPES = frozenset(
|
|
29
|
+
{
|
|
30
|
+
"prompt",
|
|
31
|
+
"shell_command",
|
|
32
|
+
"file_read",
|
|
33
|
+
"file_write",
|
|
34
|
+
"mcp_tool",
|
|
35
|
+
"package_script",
|
|
36
|
+
"network_request",
|
|
37
|
+
"config_change",
|
|
38
|
+
"browser_action",
|
|
39
|
+
"harness_start",
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
_SCHEMA_VERSION = 1
|
|
43
|
+
_SHELL_TOOL_NAMES = frozenset({"bash", "shell", "sh", "zsh", "terminal", "run_command", "run_terminal_command"})
|
|
44
|
+
_FILE_READ_TOOL_NAMES = frozenset({"read", "read_file", "open_file", "view", "view_file", "cat_file"})
|
|
45
|
+
_FILE_WRITE_TOOL_NAMES = frozenset({"write", "edit", "multiedit", "write_file", "edit_file"})
|
|
46
|
+
_PATH_KEYS = ("path", "file_path", "filePath", "filepath", "file", "filename", "target_path", "targetPath")
|
|
47
|
+
_COMMAND_KEYS = ("command", "cmd", "shell_command", "shellCommand")
|
|
48
|
+
_SENSITIVE_RAW_KEYS = frozenset(
|
|
49
|
+
{
|
|
50
|
+
"api_key",
|
|
51
|
+
"apikey",
|
|
52
|
+
"access_token",
|
|
53
|
+
"auth",
|
|
54
|
+
"authorization",
|
|
55
|
+
"client_secret",
|
|
56
|
+
"content",
|
|
57
|
+
"cookie",
|
|
58
|
+
"credential",
|
|
59
|
+
"credentials",
|
|
60
|
+
"id_token",
|
|
61
|
+
"output",
|
|
62
|
+
"password",
|
|
63
|
+
"private_key",
|
|
64
|
+
"refresh_token",
|
|
65
|
+
"secret",
|
|
66
|
+
"session_token",
|
|
67
|
+
"set_cookie",
|
|
68
|
+
"stderr",
|
|
69
|
+
"stdout",
|
|
70
|
+
"token",
|
|
71
|
+
"tool_response",
|
|
72
|
+
}
|
|
73
|
+
)
|
|
74
|
+
_SENSITIVE_RAW_KEY_ALIASES = frozenset(key.replace("_", "") for key in _SENSITIVE_RAW_KEYS)
|
|
75
|
+
_HOOK_EVENT_NAME_MAP = {
|
|
76
|
+
"userpromptsubmit": "UserPromptSubmit",
|
|
77
|
+
"userpromptsubmitted": "UserPromptSubmit",
|
|
78
|
+
"pretooluse": "PreToolUse",
|
|
79
|
+
"posttooluse": "PostToolUse",
|
|
80
|
+
"permissionrequest": "PermissionRequest",
|
|
81
|
+
}
|
|
82
|
+
_PROMPT_PATH_PATTERN = re.compile(
|
|
83
|
+
r"(?<![A-Za-z0-9_./-])"
|
|
84
|
+
r"(?P<path>(?:"
|
|
85
|
+
r"(?:~|\.{1,2})?/?(?:[A-Za-z0-9_.-]+/)*(?:\.npmrc|\.env(?:\.[A-Za-z0-9_-]+)?|id_rsa|id_ed25519)"
|
|
86
|
+
r"|(?:~|\.{1,2})?/?(?:[A-Za-z0-9_.-]+/)+credentials"
|
|
87
|
+
r"))"
|
|
88
|
+
r"(?![A-Za-z0-9_.-])"
|
|
89
|
+
)
|
|
90
|
+
_NETWORK_HOST_PATTERN = re.compile(r"(?:https?|wss?|grpcs?)://(?P<host>[A-Za-z0-9.-]+)(?::\d+)?(?:[/?#]|$)")
|
|
91
|
+
_GENERIC_POSIX_ABSOLUTE_PATH_PATTERN = re.compile(
|
|
92
|
+
r"(?<![:A-Za-z0-9_./-])(?P<path>/(?:[A-Za-z0-9_.-]+/)+[A-Za-z0-9_.-]+)(?![A-Za-z0-9_.-])"
|
|
93
|
+
)
|
|
94
|
+
_GENERIC_WINDOWS_ABSOLUTE_PATH_PATTERN = re.compile(
|
|
95
|
+
r"(?<![A-Za-z0-9_./\\:-])(?P<path>[A-Za-z]:\\(?:[^\\\s'\"<>|]+\\)+[^\\\s'\"<>|]+)"
|
|
96
|
+
)
|
|
97
|
+
_GENERIC_WINDOWS_UNC_PATH_PATTERN = re.compile(
|
|
98
|
+
r"(?<![A-Za-z0-9_./\\:-])(?P<path>\\\\[^\\\s'\"<>|]+\\[^\\\s'\"<>|]+(?:\\[^\\\s'\"<>|]+)+)"
|
|
99
|
+
)
|
|
100
|
+
_PROMPT_EXCERPT_LIMIT = 240
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
@dataclass(frozen=True, slots=True)
|
|
104
|
+
class GuardActionEnvelope:
|
|
105
|
+
"""A redacted, typed view of one harness runtime action."""
|
|
106
|
+
|
|
107
|
+
schema_version: int
|
|
108
|
+
action_id: str
|
|
109
|
+
harness: str
|
|
110
|
+
event_name: str
|
|
111
|
+
action_type: GuardActionType
|
|
112
|
+
workspace: str | None
|
|
113
|
+
workspace_hash: str | None
|
|
114
|
+
tool_name: str | None
|
|
115
|
+
command: str | None
|
|
116
|
+
prompt_excerpt: str | None
|
|
117
|
+
target_paths: tuple[str, ...]
|
|
118
|
+
network_hosts: tuple[str, ...]
|
|
119
|
+
mcp_server: str | None
|
|
120
|
+
mcp_tool: str | None
|
|
121
|
+
package_manager: str | None
|
|
122
|
+
package_name: str | None
|
|
123
|
+
script_name: str | None
|
|
124
|
+
raw_payload_redacted: dict[str, object]
|
|
125
|
+
|
|
126
|
+
def __post_init__(self) -> None:
|
|
127
|
+
if not self.action_id:
|
|
128
|
+
object.__setattr__(self, "action_id", stable_action_hash(self))
|
|
129
|
+
|
|
130
|
+
def to_dict(self) -> dict[str, object]:
|
|
131
|
+
"""Return the stable JSON payload stored with approvals and receipts."""
|
|
132
|
+
|
|
133
|
+
return {
|
|
134
|
+
"schema_version": self.schema_version,
|
|
135
|
+
"action_id": self.action_id,
|
|
136
|
+
"harness": self.harness,
|
|
137
|
+
"event_name": self.event_name,
|
|
138
|
+
"action_type": self.action_type,
|
|
139
|
+
"workspace": self.workspace,
|
|
140
|
+
"workspace_hash": self.workspace_hash,
|
|
141
|
+
"tool_name": self.tool_name,
|
|
142
|
+
"command": self.command,
|
|
143
|
+
"prompt_excerpt": self.prompt_excerpt,
|
|
144
|
+
"target_paths": list(self.target_paths),
|
|
145
|
+
"network_hosts": list(self.network_hosts),
|
|
146
|
+
"mcp_server": self.mcp_server,
|
|
147
|
+
"mcp_tool": self.mcp_tool,
|
|
148
|
+
"package_manager": self.package_manager,
|
|
149
|
+
"package_name": self.package_name,
|
|
150
|
+
"script_name": self.script_name,
|
|
151
|
+
"raw_payload_redacted": dict(self.raw_payload_redacted),
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
@classmethod
|
|
155
|
+
def from_dict(cls, payload: Mapping[str, object]) -> GuardActionEnvelope:
|
|
156
|
+
"""Build an envelope from a persisted payload."""
|
|
157
|
+
|
|
158
|
+
schema_version = _required_int(payload, "schema_version")
|
|
159
|
+
if schema_version != _SCHEMA_VERSION:
|
|
160
|
+
raise ValueError(f"Guard action envelope schema_version {schema_version} is not supported.")
|
|
161
|
+
action_type = _required_action_type(payload.get("action_type"))
|
|
162
|
+
return cls(
|
|
163
|
+
schema_version=schema_version,
|
|
164
|
+
action_id=_string_value(payload.get("action_id")) or "",
|
|
165
|
+
harness=_required_string(payload, "harness"),
|
|
166
|
+
event_name=_required_string(payload, "event_name"),
|
|
167
|
+
action_type=action_type,
|
|
168
|
+
workspace=_string_value(payload.get("workspace")),
|
|
169
|
+
workspace_hash=_string_value(payload.get("workspace_hash")),
|
|
170
|
+
tool_name=_string_value(payload.get("tool_name")),
|
|
171
|
+
command=_string_value(payload.get("command")),
|
|
172
|
+
prompt_excerpt=_string_value(payload.get("prompt_excerpt")),
|
|
173
|
+
target_paths=_string_tuple(payload.get("target_paths")),
|
|
174
|
+
network_hosts=_string_tuple(payload.get("network_hosts")),
|
|
175
|
+
mcp_server=_string_value(payload.get("mcp_server")),
|
|
176
|
+
mcp_tool=_string_value(payload.get("mcp_tool")),
|
|
177
|
+
package_manager=_string_value(payload.get("package_manager")),
|
|
178
|
+
package_name=_string_value(payload.get("package_name")),
|
|
179
|
+
script_name=_string_value(payload.get("script_name")),
|
|
180
|
+
raw_payload_redacted=_dict_value(payload.get("raw_payload_redacted")),
|
|
181
|
+
)
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
def stable_action_hash(envelope: GuardActionEnvelope) -> str:
|
|
185
|
+
"""Return a deterministic action identity without raw payload content."""
|
|
186
|
+
|
|
187
|
+
payload = {
|
|
188
|
+
"schema_version": envelope.schema_version,
|
|
189
|
+
"harness": envelope.harness,
|
|
190
|
+
"event_name": envelope.event_name,
|
|
191
|
+
"action_type": envelope.action_type,
|
|
192
|
+
"workspace_hash": envelope.workspace_hash,
|
|
193
|
+
"tool_name": envelope.tool_name,
|
|
194
|
+
"command": _normalized_command(envelope.command),
|
|
195
|
+
"prompt_excerpt": envelope.prompt_excerpt,
|
|
196
|
+
"target_paths": list(envelope.target_paths),
|
|
197
|
+
"network_hosts": list(envelope.network_hosts),
|
|
198
|
+
"mcp_server": envelope.mcp_server,
|
|
199
|
+
"mcp_tool": envelope.mcp_tool,
|
|
200
|
+
"package_manager": envelope.package_manager,
|
|
201
|
+
"package_name": envelope.package_name,
|
|
202
|
+
"script_name": envelope.script_name,
|
|
203
|
+
}
|
|
204
|
+
encoded = json.dumps(payload, sort_keys=True, separators=(",", ":")).encode("utf-8")
|
|
205
|
+
return hashlib.sha256(encoded).hexdigest()
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
def redacted_workspace_label(workspace: Path | str | None, *, home_dir: Path | str | None = None) -> str | None:
|
|
209
|
+
"""Return a workspace label safe for local UI and persisted context."""
|
|
210
|
+
|
|
211
|
+
if workspace is None:
|
|
212
|
+
return None
|
|
213
|
+
workspace_path = Path(workspace).expanduser()
|
|
214
|
+
home_path = Path(home_dir).expanduser() if home_dir is not None else Path.home()
|
|
215
|
+
resolved_workspace = _safe_resolve(workspace_path)
|
|
216
|
+
resolved_home = _safe_resolve(home_path)
|
|
217
|
+
if resolved_workspace.is_relative_to(resolved_home):
|
|
218
|
+
relative = resolved_workspace.relative_to(resolved_home)
|
|
219
|
+
return "~" if str(relative) == "." else f"~/{relative.as_posix()}"
|
|
220
|
+
workspace_name = resolved_workspace.name or workspace_path.name or "workspace"
|
|
221
|
+
return f".../{workspace_name}"
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
def normalize_codex_hook_payload(
|
|
225
|
+
payload: Mapping[str, object],
|
|
226
|
+
*,
|
|
227
|
+
workspace: Path | str | None = None,
|
|
228
|
+
home_dir: Path | str | None = None,
|
|
229
|
+
) -> GuardActionEnvelope:
|
|
230
|
+
"""Normalize a Codex hook payload into a typed action envelope."""
|
|
231
|
+
|
|
232
|
+
normalized_payload = dict(payload)
|
|
233
|
+
event_name = _hook_event_name(normalized_payload)
|
|
234
|
+
explicit_tool_name = _string_value(normalized_payload.get("tool_name")) or _string_value(
|
|
235
|
+
normalized_payload.get("toolName")
|
|
236
|
+
)
|
|
237
|
+
tool_call_name, tool_call_input = _tool_call_from_payload(
|
|
238
|
+
normalized_payload.get("toolCalls"),
|
|
239
|
+
expected_tool_name=explicit_tool_name,
|
|
240
|
+
)
|
|
241
|
+
tool_name = explicit_tool_name or tool_call_name
|
|
242
|
+
tool_input = _tool_input_from_payload(normalized_payload)
|
|
243
|
+
if not tool_input and tool_call_input is not None:
|
|
244
|
+
tool_input = tool_call_input
|
|
245
|
+
raw_command = _command_from_payload(tool_input)
|
|
246
|
+
command = _command_detail(raw_command, home_dir=home_dir)
|
|
247
|
+
prompt_text = _prompt_text(normalized_payload.get("prompt"))
|
|
248
|
+
prompt_excerpt = _prompt_excerpt(prompt_text)
|
|
249
|
+
mcp_server, mcp_tool = _mcp_parts(tool_name)
|
|
250
|
+
action_type = _codex_action_type(
|
|
251
|
+
event_name=event_name,
|
|
252
|
+
tool_name=tool_name,
|
|
253
|
+
command=raw_command,
|
|
254
|
+
prompt_excerpt=prompt_excerpt,
|
|
255
|
+
mcp_server=mcp_server,
|
|
256
|
+
)
|
|
257
|
+
target_paths = _target_paths(
|
|
258
|
+
tool_input=tool_input,
|
|
259
|
+
command=raw_command,
|
|
260
|
+
prompt_text=prompt_text,
|
|
261
|
+
home_dir=home_dir,
|
|
262
|
+
)
|
|
263
|
+
network_hosts = _network_hosts(raw_command, prompt_text)
|
|
264
|
+
workspace_label = redacted_workspace_label(workspace, home_dir=home_dir)
|
|
265
|
+
workspace_hash = _workspace_hash(workspace)
|
|
266
|
+
return GuardActionEnvelope(
|
|
267
|
+
schema_version=_SCHEMA_VERSION,
|
|
268
|
+
action_id="",
|
|
269
|
+
harness="codex",
|
|
270
|
+
event_name=event_name,
|
|
271
|
+
action_type=action_type,
|
|
272
|
+
workspace=workspace_label,
|
|
273
|
+
workspace_hash=workspace_hash,
|
|
274
|
+
tool_name=tool_name,
|
|
275
|
+
command=command,
|
|
276
|
+
prompt_excerpt=prompt_excerpt,
|
|
277
|
+
target_paths=target_paths,
|
|
278
|
+
network_hosts=network_hosts,
|
|
279
|
+
mcp_server=mcp_server,
|
|
280
|
+
mcp_tool=mcp_tool,
|
|
281
|
+
package_manager=None,
|
|
282
|
+
package_name=None,
|
|
283
|
+
script_name=None,
|
|
284
|
+
raw_payload_redacted=_redacted_payload(normalized_payload, home_dir=home_dir),
|
|
285
|
+
)
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
def _required_int(payload: Mapping[str, object], key: str) -> int:
|
|
289
|
+
value = payload.get(key)
|
|
290
|
+
if not isinstance(value, int):
|
|
291
|
+
raise ValueError(f"Guard action envelope missing required integer {key}.")
|
|
292
|
+
return value
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
def _required_string(payload: Mapping[str, object], key: str) -> str:
|
|
296
|
+
value = payload.get(key)
|
|
297
|
+
if not isinstance(value, str) or not value.strip():
|
|
298
|
+
raise ValueError(f"Guard action envelope missing required string {key}.")
|
|
299
|
+
return value
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
def _required_action_type(value: object) -> GuardActionType:
|
|
303
|
+
if not isinstance(value, str) or value not in _VALID_ACTION_TYPES:
|
|
304
|
+
raise ValueError("Guard action envelope missing valid action_type.")
|
|
305
|
+
return value
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
def _string_value(value: object) -> str | None:
|
|
309
|
+
if isinstance(value, str) and value.strip():
|
|
310
|
+
return value.strip()
|
|
311
|
+
return None
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
def _string_tuple(value: object) -> tuple[str, ...]:
|
|
315
|
+
if not isinstance(value, list):
|
|
316
|
+
return ()
|
|
317
|
+
return tuple(item for item in value if isinstance(item, str) and item.strip())
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
def _dict_value(value: object) -> dict[str, object]:
|
|
321
|
+
if not isinstance(value, dict):
|
|
322
|
+
return {}
|
|
323
|
+
return {str(key): item for key, item in value.items() if isinstance(key, str)}
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
def _mapping_value(value: object) -> Mapping[str, object]:
|
|
327
|
+
if isinstance(value, Mapping):
|
|
328
|
+
return value
|
|
329
|
+
return {}
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
def _tool_input_from_payload(payload: Mapping[str, object]) -> Mapping[str, object]:
|
|
333
|
+
for key in ("tool_input", "toolInput", "toolArgs", "arguments"):
|
|
334
|
+
parsed = _mapping_from_value(payload.get(key))
|
|
335
|
+
if parsed is not None:
|
|
336
|
+
return parsed
|
|
337
|
+
return {}
|
|
338
|
+
|
|
339
|
+
|
|
340
|
+
def _tool_call_from_payload(
|
|
341
|
+
value: object,
|
|
342
|
+
*,
|
|
343
|
+
expected_tool_name: str | None,
|
|
344
|
+
) -> tuple[str | None, Mapping[str, object] | None]:
|
|
345
|
+
if not isinstance(value, list):
|
|
346
|
+
return None, None
|
|
347
|
+
fallback_tool_call: tuple[str, Mapping[str, object] | None] | None = None
|
|
348
|
+
for item in value:
|
|
349
|
+
if not isinstance(item, Mapping):
|
|
350
|
+
continue
|
|
351
|
+
tool_name = _string_value(item.get("name"))
|
|
352
|
+
if tool_name is None:
|
|
353
|
+
continue
|
|
354
|
+
tool_input = _mapping_from_value(item.get("args"))
|
|
355
|
+
if fallback_tool_call is None:
|
|
356
|
+
fallback_tool_call = (tool_name, tool_input)
|
|
357
|
+
if expected_tool_name is None or tool_name == expected_tool_name:
|
|
358
|
+
return tool_name, tool_input
|
|
359
|
+
if fallback_tool_call is not None:
|
|
360
|
+
return fallback_tool_call
|
|
361
|
+
return None, None
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
def _mapping_from_value(value: object) -> Mapping[str, object] | None:
|
|
365
|
+
if isinstance(value, Mapping):
|
|
366
|
+
return value
|
|
367
|
+
if isinstance(value, str) and value.strip():
|
|
368
|
+
try:
|
|
369
|
+
parsed = json.loads(value)
|
|
370
|
+
except json.JSONDecodeError:
|
|
371
|
+
return None
|
|
372
|
+
if isinstance(parsed, Mapping):
|
|
373
|
+
return parsed
|
|
374
|
+
return None
|
|
375
|
+
|
|
376
|
+
|
|
377
|
+
def _hook_event_name(payload: Mapping[str, object]) -> str:
|
|
378
|
+
for key in ("event", "hook_event_name", "hookEventName", "hook_name"):
|
|
379
|
+
value = payload.get(key)
|
|
380
|
+
if isinstance(value, str) and value.strip():
|
|
381
|
+
stripped = value.strip()
|
|
382
|
+
return _HOOK_EVENT_NAME_MAP.get(stripped.lower(), stripped)
|
|
383
|
+
return "PreToolUse"
|
|
384
|
+
|
|
385
|
+
|
|
386
|
+
def _command_from_payload(tool_input: Mapping[str, object]) -> str | None:
|
|
387
|
+
for key in _COMMAND_KEYS:
|
|
388
|
+
value = tool_input.get(key)
|
|
389
|
+
if isinstance(value, str) and value.strip():
|
|
390
|
+
return value.strip()
|
|
391
|
+
return None
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
def _command_detail(command: str | None, *, home_dir: Path | str | None) -> str | None:
|
|
395
|
+
if command is None:
|
|
396
|
+
return None
|
|
397
|
+
return _redact_path_mentions(redact_text(command).text, home_dir=home_dir)
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
def _prompt_text(value: object) -> str | None:
|
|
401
|
+
if not isinstance(value, str):
|
|
402
|
+
return None
|
|
403
|
+
redacted = redact_text(value.strip()).text
|
|
404
|
+
collapsed = " ".join(redacted.split())
|
|
405
|
+
if not collapsed:
|
|
406
|
+
return None
|
|
407
|
+
return collapsed
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
def _prompt_excerpt(prompt_text: str | None) -> str | None:
|
|
411
|
+
if prompt_text is None:
|
|
412
|
+
return None
|
|
413
|
+
return prompt_text[:_PROMPT_EXCERPT_LIMIT]
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
def _mcp_parts(tool_name: str | None) -> tuple[str | None, str | None]:
|
|
417
|
+
if tool_name is None or not tool_name.startswith("mcp__"):
|
|
418
|
+
return None, None
|
|
419
|
+
parts = tool_name.split("__", 2)
|
|
420
|
+
if len(parts) != 3 or not parts[1] or not parts[2]:
|
|
421
|
+
return None, None
|
|
422
|
+
return parts[1], parts[2]
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
def _codex_action_type(
|
|
426
|
+
*,
|
|
427
|
+
event_name: str,
|
|
428
|
+
tool_name: str | None,
|
|
429
|
+
command: str | None,
|
|
430
|
+
prompt_excerpt: str | None,
|
|
431
|
+
mcp_server: str | None,
|
|
432
|
+
) -> GuardActionType:
|
|
433
|
+
normalized_tool = tool_name.lower() if tool_name is not None else ""
|
|
434
|
+
if event_name == "UserPromptSubmit" and prompt_excerpt is not None:
|
|
435
|
+
return "prompt"
|
|
436
|
+
if mcp_server is not None:
|
|
437
|
+
return "mcp_tool"
|
|
438
|
+
if normalized_tool in _FILE_READ_TOOL_NAMES:
|
|
439
|
+
return "file_read"
|
|
440
|
+
if normalized_tool in _FILE_WRITE_TOOL_NAMES:
|
|
441
|
+
return "file_write"
|
|
442
|
+
if normalized_tool in _SHELL_TOOL_NAMES or command is not None:
|
|
443
|
+
return "shell_command"
|
|
444
|
+
return "config_change"
|
|
445
|
+
|
|
446
|
+
|
|
447
|
+
def _target_paths(
|
|
448
|
+
*,
|
|
449
|
+
tool_input: Mapping[str, object],
|
|
450
|
+
command: str | None,
|
|
451
|
+
prompt_text: str | None,
|
|
452
|
+
home_dir: Path | str | None,
|
|
453
|
+
) -> tuple[str, ...]:
|
|
454
|
+
paths: list[str] = []
|
|
455
|
+
for key in _PATH_KEYS:
|
|
456
|
+
value = tool_input.get(key)
|
|
457
|
+
if isinstance(value, str) and value.strip():
|
|
458
|
+
paths.append(value.strip())
|
|
459
|
+
for text in (command, prompt_text):
|
|
460
|
+
if text is not None:
|
|
461
|
+
paths.extend(match.group("path") for match in _PROMPT_PATH_PATTERN.finditer(text))
|
|
462
|
+
redacted_paths = (_redacted_target_path(path, home_dir=home_dir) for path in paths)
|
|
463
|
+
return tuple(dict.fromkeys(path for path in redacted_paths if path is not None))
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
def _network_hosts(command: str | None, prompt_excerpt: str | None) -> tuple[str, ...]:
|
|
467
|
+
text = "\n".join(value for value in (command, prompt_excerpt) if value)
|
|
468
|
+
if not text:
|
|
469
|
+
return ()
|
|
470
|
+
return tuple(dict.fromkeys(match.group("host") for match in _NETWORK_HOST_PATTERN.finditer(text)))
|
|
471
|
+
|
|
472
|
+
|
|
473
|
+
def _workspace_hash(workspace: Path | str | None) -> str | None:
|
|
474
|
+
if workspace is None:
|
|
475
|
+
return None
|
|
476
|
+
encoded = str(Path(workspace).expanduser()).encode("utf-8")
|
|
477
|
+
return hashlib.sha256(encoded).hexdigest()
|
|
478
|
+
|
|
479
|
+
|
|
480
|
+
def _safe_resolve(path: Path) -> Path:
|
|
481
|
+
try:
|
|
482
|
+
return path.resolve(strict=False)
|
|
483
|
+
except (OSError, RuntimeError):
|
|
484
|
+
return path
|
|
485
|
+
|
|
486
|
+
|
|
487
|
+
def _redacted_target_path(path: str, *, home_dir: Path | str | None) -> str | None:
|
|
488
|
+
stripped = path.strip()
|
|
489
|
+
if not stripped:
|
|
490
|
+
return None
|
|
491
|
+
if stripped == "~" or stripped.startswith("~/"):
|
|
492
|
+
return redact_text(stripped).text
|
|
493
|
+
if stripped.startswith("~"):
|
|
494
|
+
target_name = Path(stripped).name or "path"
|
|
495
|
+
return f".../{target_name}"
|
|
496
|
+
windows_path = PureWindowsPath(stripped)
|
|
497
|
+
if windows_path.is_absolute():
|
|
498
|
+
target_name = windows_path.name or "path"
|
|
499
|
+
return f".../{target_name}"
|
|
500
|
+
if _is_absolute_target_path(stripped):
|
|
501
|
+
return redacted_workspace_label(stripped, home_dir=home_dir)
|
|
502
|
+
return redact_text(stripped).text
|
|
503
|
+
|
|
504
|
+
|
|
505
|
+
def _is_absolute_target_path(path: str) -> bool:
|
|
506
|
+
return Path(path).expanduser().is_absolute()
|
|
507
|
+
|
|
508
|
+
|
|
509
|
+
def _redacted_payload(payload: Mapping[str, object], *, home_dir: Path | str | None) -> dict[str, object]:
|
|
510
|
+
return {
|
|
511
|
+
str(key): _redacted_value(str(key), value, home_dir=home_dir)
|
|
512
|
+
for key, value in payload.items()
|
|
513
|
+
if isinstance(key, str)
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
|
|
517
|
+
def _redacted_value(key: str, value: object, *, home_dir: Path | str | None) -> object:
|
|
518
|
+
normalized_key = _normalized_secret_key(key)
|
|
519
|
+
if normalized_key in _SENSITIVE_RAW_KEYS or normalized_key.replace("_", "") in _SENSITIVE_RAW_KEY_ALIASES:
|
|
520
|
+
return "[redacted]"
|
|
521
|
+
if isinstance(value, Mapping):
|
|
522
|
+
return {
|
|
523
|
+
str(child_key): _redacted_value(str(child_key), child_value, home_dir=home_dir)
|
|
524
|
+
for child_key, child_value in value.items()
|
|
525
|
+
}
|
|
526
|
+
if isinstance(value, list):
|
|
527
|
+
return [_redacted_value(key, item, home_dir=home_dir) for item in value]
|
|
528
|
+
if isinstance(value, str):
|
|
529
|
+
return _redacted_string_value(key, value, home_dir=home_dir)[:_PROMPT_EXCERPT_LIMIT]
|
|
530
|
+
if isinstance(value, (bool, int, float)) or value is None:
|
|
531
|
+
return value
|
|
532
|
+
return str(value)
|
|
533
|
+
|
|
534
|
+
|
|
535
|
+
def _redacted_string_value(key: str, value: str, *, home_dir: Path | str | None) -> str:
|
|
536
|
+
if _is_path_like_key(key):
|
|
537
|
+
redacted_path = _redacted_target_path(value, home_dir=home_dir)
|
|
538
|
+
if redacted_path is not None:
|
|
539
|
+
return redacted_path
|
|
540
|
+
return _redact_path_mentions(redact_text(value).text, home_dir=home_dir)
|
|
541
|
+
|
|
542
|
+
|
|
543
|
+
def _is_path_like_key(key: str) -> bool:
|
|
544
|
+
normalized_key = _normalized_secret_key(key)
|
|
545
|
+
path_keys = {_normalized_secret_key(path_key) for path_key in _PATH_KEYS}
|
|
546
|
+
return normalized_key in path_keys or normalized_key.replace("_", "") in {
|
|
547
|
+
path_key.replace("_", "") for path_key in path_keys
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
|
|
551
|
+
def _redact_path_mentions(text: str, *, home_dir: Path | str | None) -> str:
|
|
552
|
+
def replace_path(match: re.Match[str]) -> str:
|
|
553
|
+
return _redacted_target_path(match.group("path"), home_dir=home_dir) or match.group("path")
|
|
554
|
+
|
|
555
|
+
redacted = _GENERIC_WINDOWS_UNC_PATH_PATTERN.sub(replace_path, text)
|
|
556
|
+
redacted = _GENERIC_WINDOWS_ABSOLUTE_PATH_PATTERN.sub(replace_path, redacted)
|
|
557
|
+
redacted = _GENERIC_POSIX_ABSOLUTE_PATH_PATTERN.sub(replace_path, redacted)
|
|
558
|
+
return _PROMPT_PATH_PATTERN.sub(replace_path, redacted)
|
|
559
|
+
|
|
560
|
+
|
|
561
|
+
def _normalized_secret_key(key: str) -> str:
|
|
562
|
+
normalized = key.replace("-", "_")
|
|
563
|
+
normalized = re.sub(r"([a-z0-9])([A-Z])", r"\1_\2", normalized)
|
|
564
|
+
return normalized.lower()
|
|
565
|
+
|
|
566
|
+
|
|
567
|
+
def _normalized_command(command: str | None) -> str | None:
|
|
568
|
+
if command is None:
|
|
569
|
+
return None
|
|
570
|
+
return command.strip()
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+
__all__ = [
|
|
574
|
+
"GuardActionEnvelope",
|
|
575
|
+
"GuardActionType",
|
|
576
|
+
"normalize_codex_hook_payload",
|
|
577
|
+
"redacted_workspace_label",
|
|
578
|
+
"stable_action_hash",
|
|
579
|
+
]
|