agentmetry 0.10.6__tar.gz → 0.11.0__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.
- {agentmetry-0.10.6 → agentmetry-0.11.0}/Dockerfile +5 -2
- {agentmetry-0.10.6 → agentmetry-0.11.0}/PKG-INFO +6 -6
- {agentmetry-0.10.6 → agentmetry-0.11.0}/README.md +5 -5
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/api/routes/audit.py +61 -3
- agentmetry-0.11.0/agentmetry/core/account.py +367 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/adapters/chronicle.py +13 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/live.py +5 -1
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/external.py +24 -2
- agentmetry-0.11.0/agentmetry/core/audit/identity_view.py +238 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/otel_ingest.py +6 -1
- agentmetry-0.11.0/agentmetry/core/audit/personal_domains.py +89 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/trail_db.py +28 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/version.py +1 -1
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/dashboard_static/404.html +1 -1
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/dashboard_static/__next.__PAGE__.txt +4 -4
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/dashboard_static/__next._full.txt +4 -4
- agentmetry-0.11.0/agentmetry/dashboard_static/__next._tree.txt +5 -0
- agentmetry-0.10.6/agentmetry/dashboard_static/_next/static/chunks/3in77zrqn0wml.css → agentmetry-0.11.0/agentmetry/dashboard_static/_next/static/chunks/2c45lmylpxhfd.css +1 -1
- agentmetry-0.11.0/agentmetry/dashboard_static/_next/static/chunks/3e_9wdzec2s0j.js +4 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/dashboard_static/_not-found/__next._full.txt +2 -2
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/dashboard_static/_not-found/__next._not-found.__PAGE__.txt +2 -2
- agentmetry-0.11.0/agentmetry/dashboard_static/_not-found/__next._tree.txt +4 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/dashboard_static/_not-found.html +1 -1
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/dashboard_static/_not-found.txt +2 -2
- agentmetry-0.11.0/agentmetry/dashboard_static/index.html +1 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/dashboard_static/index.txt +4 -4
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/hooks/ingest.py +8 -1
- agentmetry-0.11.0/tests/test_account_identity.py +322 -0
- agentmetry-0.11.0/tests/test_codex_account.py +450 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_detection_duplicate_emission.py +22 -4
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_external_ingest.py +61 -0
- agentmetry-0.11.0/tests/test_identity_view.py +273 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_ingest_roundtrip.py +100 -0
- agentmetry-0.11.0/tests/test_personal_domains.py +122 -0
- agentmetry-0.10.6/agentmetry/dashboard_static/__next._tree.txt +0 -5
- agentmetry-0.10.6/agentmetry/dashboard_static/_next/static/chunks/16sszuo8m5-lu.js +0 -4
- agentmetry-0.10.6/agentmetry/dashboard_static/_not-found/__next._tree.txt +0 -4
- agentmetry-0.10.6/agentmetry/dashboard_static/index.html +0 -1
- {agentmetry-0.10.6 → agentmetry-0.11.0}/.dockerignore +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/.env.agentmetry-demo +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/.env.example +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/.gitignore +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/__init__.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/api/__init__.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/api/main.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/api/routes/__init__.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/api/routes/auth.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/api/trusted_host.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/api/websocket.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/api/ws_bridge.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/cli/__init__.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/cli/__main__.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/__init__.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/api_token.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/__init__.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/adapters/__init__.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/adapters/agt.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/adapters/cloudevents.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/adapters/ecs.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/adapters/sentinel.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/adapters/splunk.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/alerts.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/antigravity_trajectory.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/atlas.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/canonical.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/cloud_bridge.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/compliance_digest.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/cursor_cloud_cache.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/__init__.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/benchmark.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/attack_approval_denied_then_executed.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/attack_arbitrary_host_stage_execute.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/attack_autonomous_unapproved_write.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/attack_credential_exfil.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/attack_credential_then_cloud_api.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/attack_destructive_delete_burst.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/attack_discovery_then_collect.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/attack_dotfile_then_git_push.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/attack_encoded_command_download.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/attack_env_credential_exfil.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/attack_hashed_only_no_command.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/attack_interpreter_egress.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/attack_pr_merged_without_review.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/attack_proc_substitution_cradle.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/attack_remote_pipe_to_shell.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/attack_remote_staging_then_execute.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/attack_secret_manager_then_egress.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/attack_session_tool_burst.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/attack_single_command_exfil.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/attack_single_quoted_interpreter_egress.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/attack_ssh_directory_exfil.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/attack_subagent_swarm.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/attack_timestamp_collision.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/attack_untrusted_input_then_action.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/benign_authoring_merge_fixtures.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/benign_autonomous_after_approval.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/benign_build_artifact_cleanup.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/benign_ci_artifact_download.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/benign_commit_message_names_cloud_clis.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/benign_container_registry_publish.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/benign_database_migration.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/benign_dependency_audit_network_burst.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/benign_dependency_install_and_build.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/benign_download_release_archive.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/benign_env_example_read.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/benign_fetch_data_then_run_repo_script.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/benign_fetch_dataset_then_analyse.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/benign_fetch_lockfile_then_install.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/benign_fetch_piped_into_own_script.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/benign_git_review_and_push.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/benign_github_raw_docs_then_script.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/benign_human_driven_deletes.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/benign_local_api_probing.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/benign_long_but_calm_session.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/benign_loopback_is_not_egress.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/benign_loopback_pipe_to_interpreter.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/benign_mcp_text_mentions_credential_path.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/benign_ordinary_development.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/benign_package_manager_after_fetch.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/benign_reading_config_that_is_not_secret.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/benign_remote_api_call_no_credentials.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/benign_research_then_docs.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/benign_reversed_order_is_not_exfil.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/benign_secret_names_and_docs.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/benign_terraform_apply_with_profile.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/benign_test_and_fix_loop.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/benign_writing_about_credentials.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/corpus/corpus.yaml +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/disposition.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/engine.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/live_store.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/models.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/rules.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/traits.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/yaml_config.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/detection/yaml_rules.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/dlp/__init__.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/dlp/loader.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/dlp/models.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/dlp/scanner.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/dogfood.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/evidence_pack.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/forwarder.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/grok_bot_transcript.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/hashing.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/heartbeat.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/hook_bootstrap.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/identity.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/ingest.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/ingest_quota.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/managed_hooks.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/mcp_inventory_event.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/migrate.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/mitre.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/policy.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/policy_settings.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/posture_event.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/redaction.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/replay.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/run_context.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/session_tree.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/signing.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/sinks.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/spool.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/tool_policy/__init__.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/tool_policy/capability.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/tool_policy/evaluator.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/tool_policy/loader.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/tool_policy/models.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/trail_anchor.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/trail_chain.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/trail_merkle.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/audit/trail_rotation.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/auth.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/bus/__init__.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/bus/audit_exporter.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/bus/bridges.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/bus/bus.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/bus/events.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/bus/outbox.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/config.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/dashboard_session.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/diagnostics/__init__.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/diagnostics/autostart.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/diagnostics/doctor.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/diagnostics/driver_paths.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/diagnostics/env_file.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/diagnostics/hook_coverage.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/diagnostics/machine_view.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/diagnostics/mcp_inventory.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/diagnostics/mcp_schema.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/diagnostics/posture.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/drivers/__init__.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/drivers/host.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/drivers/permissions.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/drivers/spec.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/extensions.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/health.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/managed_policy.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/operator_identity.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/paths.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/scanner/__init__.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/scanner/injection.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/scanner/instruction_files.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/scanner/known_packages.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/scanner/scan.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/core/scanner/typosquat.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/dashboard_static/.gitkeep +0 -0
- {agentmetry-0.10.6/agentmetry/dashboard_static/_next/static/J0aKlqH-KWdyNe48Kd-3V → agentmetry-0.11.0/agentmetry/dashboard_static/_next/static/I3_iDrRGGxdmaK4mZ_Hif}/_buildManifest.js +0 -0
- {agentmetry-0.10.6/agentmetry/dashboard_static/_next/static/J0aKlqH-KWdyNe48Kd-3V → agentmetry-0.11.0/agentmetry/dashboard_static/_next/static/I3_iDrRGGxdmaK4mZ_Hif}/_clientMiddlewareManifest.js +0 -0
- {agentmetry-0.10.6/agentmetry/dashboard_static/_next/static/J0aKlqH-KWdyNe48Kd-3V → agentmetry-0.11.0/agentmetry/dashboard_static/_next/static/I3_iDrRGGxdmaK4mZ_Hif}/_ssgManifest.js +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/dashboard_static/_next/static/chunks/0cz1d0mv5g_q7.js +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/dashboard_static/_next/static/chunks/0umf92h1sb77c.js +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/dashboard_static/_next/static/chunks/1ix59xuhq-q14.css +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/dashboard_static/_next/static/chunks/1q292q_rc4_p6.js +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/dashboard_static/_next/static/chunks/216iyidhmrh3u.js +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/dashboard_static/_next/static/chunks/31qp8jfkw0x2h.js +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/dashboard_static/_next/static/chunks/3ia-1961js2lo.js +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/dashboard_static/_next/static/chunks/turbopack-3-ry682tkyiqk.js +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/dashboard_static/_next/static/media/ibm-plex-mono-latin-400-normal.2lhng2ntocry9.woff +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/dashboard_static/_next/static/media/ibm-plex-mono-latin-400-normal.3xdfs0-p_zi4c.woff2 +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/dashboard_static/_next/static/media/ibm-plex-mono-latin-500-normal.11q3guvgd1r20.woff2 +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/dashboard_static/_next/static/media/ibm-plex-mono-latin-500-normal.1fgk-kmy-32_a.woff +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/dashboard_static/_next/static/media/ibm-plex-sans-latin-400-normal.19i24--p24z3r.woff +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/dashboard_static/_next/static/media/ibm-plex-sans-latin-400-normal.1xf5nwxyfigak.woff2 +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/dashboard_static/_next/static/media/ibm-plex-sans-latin-500-normal.14sc3d7sk_zzh.woff +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/dashboard_static/_next/static/media/ibm-plex-sans-latin-500-normal.2i4a1iuj6lbvw.woff2 +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/dashboard_static/_next/static/media/ibm-plex-sans-latin-600-normal.2ovda_azncp9b.woff2 +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/dashboard_static/_next/static/media/ibm-plex-sans-latin-600-normal.2wn5p1s7u3utm.woff +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/dashboard_static/agentmetry-icon-white.svg +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/demo.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/hooks/__init__.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/hooks/mcp_proxy.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/policies/detection/manifest.yaml +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/policies/dlp/manifest.yaml +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/policies/opa/agent_rules.rego +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/agentmetry/policies/tool/manifest.yaml +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/pyproject.toml +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/conftest.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/fixtures/agt_filesink_exfil.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/fixtures/agt_filesink_mixed.jsonl +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/fixtures/codex_hooks/README.md +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/fixtures/codex_hooks/permission-request.command.output.schema.json +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/fixtures/codex_hooks/pre-tool-use.command.output.schema.json +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/fixtures/fake_mcp_server.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/fixtures/otel_claude_code_session.json +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/fixtures/scanner/benign_skill/SKILL.md +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/fixtures/scanner/benign_tools.json +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/fixtures/scanner/poisoned_skill/SKILL.md +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/fixtures/scanner/poisoned_tools.json +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_agentmetry_audit.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_agentmetry_ingest_client.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_agt_adapter.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_antigravity_trajectory.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_ask_gate_phase_a.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_atlas_detection_enrichment.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_atlas_mapping.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_audit_sinks.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_audit_stats.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_audit_tail.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_auth.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_auth_default.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_autostart.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_boot_sequence.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_burst_windows.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_chinese_agent_hooks.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_chinese_agent_sprint_b.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_chinese_agent_sprint_c.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_chronicle_adapter.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_classification_bounds.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_cli_backup.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_cli_commands.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_cli_env_var_names.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_cloud_bridge.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_cloudevents_adapter.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_codex_windows_command.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_compliance_digest.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_container_and_legacy_runtime.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_copilot_hooks.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_coverage_observed.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_crewai_adapter.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_cursor_cloud_cache.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_demo.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_demo_isolation.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_demo_mode_flag.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_detection_adi.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_detection_benchmark.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_detection_default_config.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_detection_disposition.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_detection_disposition_api.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_detection_emit_durability.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_detection_engine.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_detection_evasion.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_detection_hf_incident.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_detection_quoted_command_words.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_detection_rule_identity.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_detection_rules_v2.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_dlp_agent_env_override.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_dlp_invisible_unicode.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_dlp_markdown_exfil.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_dlp_scanner.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_doctor.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_doctor_first_run.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_doctor_json_and_remediation.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_dogfood.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_dogfood_freeze.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_driver_paths.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_ecs_threat.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_event_bus.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_event_signing.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_evidence_pack.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_extensions.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_fail_closed_partial.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_forwarder.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_forwarding_shape.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_funding_manifest.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_grok_bot_transcript.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_hash_key.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_heartbeat.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_hook_bootstrap.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_hook_coverage.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_hook_decision_format.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_hook_enforcement_timing.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_hook_import_cost.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_hook_real_process.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_hook_spool.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_identity_enrich.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_identity_provider.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_ingest_rate_limit.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_ingest_token.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_isolation.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_launch_targets.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_live_detection.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_live_detection_store.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_machine_view.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_managed_hooks.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_managed_policy.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_mcp_audit_proxy.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_mcp_concealed_text.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_mcp_inventory.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_mcp_inventory_event.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_mcp_meta_fingerprint.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_mcp_proxy_packaged.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_mcp_schema.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_mitre_dlp.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_opensre_adapter.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_operator_attribution.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_otel_ingest.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_paths.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_posture.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_powershell_encoding.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_readme_claims.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_redaction.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_replay.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_scanner.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_sentinel.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_serve_script_binds_loopback.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_session_tree.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_shared_install.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_sigma_pack.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_static_serving.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_subagent_lifecycle.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_suite_leaves_real_home_alone.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_tool_policy.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_tool_policy_agent_cli.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_tool_policy_git_hooks.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_trail_anchor.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_trail_chain.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_trail_concurrency.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_trail_merkle.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_transcript_watcher.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_trusted_host.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_unattended_agent_policy.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_user_profile_dir.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_version.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tests/test_yaml_detection_rules.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tools/generate_sigma_pack.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tools/mcp_audit_proxy.py +0 -0
- {agentmetry-0.10.6 → agentmetry-0.11.0}/tools/vault_fs_server.py +0 -0
|
@@ -6,8 +6,11 @@
|
|
|
6
6
|
# It used to start `uvicorn api.main:app`, a module path that has not existed
|
|
7
7
|
# since the package became `agentmetry`, so the image could not boot. It also
|
|
8
8
|
# installed gcc and libpq for a Postgres the recorder no longer uses.
|
|
9
|
+
#
|
|
10
|
+
# Base images are pinned by digest, because a tag can be moved to other content
|
|
11
|
+
# after the fact. Dependabot bumps the digests.
|
|
9
12
|
|
|
10
|
-
FROM node:20-alpine AS dashboard
|
|
13
|
+
FROM node:20-alpine@sha256:fb4cd12c85ee03686f6af5362a0b0d56d50c58a04632e6c0fb8363f609372293 AS dashboard
|
|
11
14
|
WORKDIR /dashboard
|
|
12
15
|
COPY apps/dashboard/package.json apps/dashboard/package-lock.json ./
|
|
13
16
|
RUN npm ci
|
|
@@ -17,7 +20,7 @@ COPY apps/dashboard/ ./
|
|
|
17
20
|
ENV NEXT_PUBLIC_SAME_ORIGIN=true
|
|
18
21
|
RUN npm run build
|
|
19
22
|
|
|
20
|
-
FROM python:3.12-slim
|
|
23
|
+
FROM python:3.12-slim@sha256:4840d514c583a4d3d8cad3940e68dee6f0f6f3635c12fcd0a3d74c21a5b93a54
|
|
21
24
|
WORKDIR /app
|
|
22
25
|
|
|
23
26
|
COPY apps/orchestrator/ ./
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: agentmetry
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.11.0
|
|
4
4
|
Summary: Open-source security for AI coding agents: record, detect and block at the tool boundary, with a verifiable audit trail and SIEM forwarding
|
|
5
5
|
Project-URL: Homepage, https://agentmetry.ai
|
|
6
6
|
Project-URL: Source, https://github.com/blitzcrieg1/agentmetry
|
|
@@ -44,11 +44,11 @@ Description-Content-Type: text/markdown
|
|
|
44
44
|
|
|
45
45
|
A local-first endpoint sensor for AI coding agents.
|
|
46
46
|
|
|
47
|
-
Agentmetry
|
|
48
|
-
Antigravity, Qwen, Kimi, Qoder and CodeBuddy,
|
|
49
|
-
|
|
50
|
-
over the session. A credential read followed
|
|
51
|
-
|
|
47
|
+
Agentmetry records events reported by supported hooks for Claude Code, Cursor,
|
|
48
|
+
Codex, GitHub Copilot, Antigravity, Qwen, Kimi, Qoder and CodeBuddy, and by wrapped
|
|
49
|
+
stdio MCP servers. It writes those events to a hash-chained JSONL trail on your
|
|
50
|
+
machine and runs sequence detection over the session. A credential read followed
|
|
51
|
+
by network egress can trigger a finding. Findings carry MITRE ATT&CK labels, and
|
|
52
52
|
MITRE ATLAS labels where ATLAS says something ATT&CK cannot.
|
|
53
53
|
|
|
54
54
|
Nothing leaves the machine unless you configure it, and there is no telemetry.
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
A local-first endpoint sensor for AI coding agents.
|
|
4
4
|
|
|
5
|
-
Agentmetry
|
|
6
|
-
Antigravity, Qwen, Kimi, Qoder and CodeBuddy,
|
|
7
|
-
|
|
8
|
-
over the session. A credential read followed
|
|
9
|
-
|
|
5
|
+
Agentmetry records events reported by supported hooks for Claude Code, Cursor,
|
|
6
|
+
Codex, GitHub Copilot, Antigravity, Qwen, Kimi, Qoder and CodeBuddy, and by wrapped
|
|
7
|
+
stdio MCP servers. It writes those events to a hash-chained JSONL trail on your
|
|
8
|
+
machine and runs sequence detection over the session. A credential read followed
|
|
9
|
+
by network egress can trigger a finding. Findings carry MITRE ATT&CK labels, and
|
|
10
10
|
MITRE ATLAS labels where ATLAS says something ATT&CK cannot.
|
|
11
11
|
|
|
12
12
|
Nothing leaves the machine unless you configure it, and there is no telemetry.
|
|
@@ -92,6 +92,39 @@ class IngestOperatorBody(BaseModel):
|
|
|
92
92
|
source: str = ""
|
|
93
93
|
|
|
94
94
|
|
|
95
|
+
class IngestModelBody(BaseModel):
|
|
96
|
+
"""The model a capture surface reports. A claim, not proof of what served it.
|
|
97
|
+
|
|
98
|
+
Wrong types become empty rather than failing validation: undeclared, this
|
|
99
|
+
field was ignored, and declaring it must not start refusing events. The
|
|
100
|
+
length bound is in external.py, because the spool replay skips this model.
|
|
101
|
+
"""
|
|
102
|
+
|
|
103
|
+
id: str = ""
|
|
104
|
+
provider: str = ""
|
|
105
|
+
|
|
106
|
+
@field_validator("id", "provider", mode="before")
|
|
107
|
+
@classmethod
|
|
108
|
+
def _text_or_empty(cls, v: Any) -> str:
|
|
109
|
+
return v if isinstance(v, str) else ""
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
class IngestAccountBody(BaseModel):
|
|
113
|
+
"""A bounded client-reported agent account claim, never verified identity."""
|
|
114
|
+
|
|
115
|
+
domain: str = ""
|
|
116
|
+
source: str = ""
|
|
117
|
+
organization_id: str = ""
|
|
118
|
+
email: str = ""
|
|
119
|
+
account_id: str = ""
|
|
120
|
+
user_id: str = ""
|
|
121
|
+
|
|
122
|
+
@field_validator("domain", "source", "organization_id", "email", "account_id", "user_id", mode="before")
|
|
123
|
+
@classmethod
|
|
124
|
+
def _text_or_empty(cls, v: Any) -> str:
|
|
125
|
+
return v if isinstance(v, str) else ""
|
|
126
|
+
|
|
127
|
+
|
|
95
128
|
class ExternalIngestBody(BaseModel):
|
|
96
129
|
"""Adapter payload — normalized to canonical v1.2 on ingest.
|
|
97
130
|
|
|
@@ -104,9 +137,10 @@ class ExternalIngestBody(BaseModel):
|
|
|
104
137
|
MCP per-tool digests and the initialize handshake, and those were dropped
|
|
105
138
|
too, so the release headline did not survive the wire. Then 0.10.4's
|
|
106
139
|
`tool.classification` and 0.9.3's HMAC label went the same way, because the
|
|
107
|
-
roundtrip test covered the proxy's builders and not the hook's.
|
|
108
|
-
`
|
|
109
|
-
|
|
140
|
+
roundtrip test covered the proxy's builders and not the hook's. Then #389:
|
|
141
|
+
Codex's `model`, because that test ran only the Claude mapper, which sends
|
|
142
|
+
none. `test_ingest_roundtrip.py` now builds all of these and fails if any
|
|
143
|
+
key does not survive this model.
|
|
110
144
|
"""
|
|
111
145
|
|
|
112
146
|
source_app: str = Field(
|
|
@@ -126,6 +160,10 @@ class ExternalIngestBody(BaseModel):
|
|
|
126
160
|
tool: IngestToolBody | None = None
|
|
127
161
|
input_hash: str = ""
|
|
128
162
|
model_id: str = ""
|
|
163
|
+
model: IngestModelBody | None = None
|
|
164
|
+
# Account metadata is additive and optional. external.py validates and
|
|
165
|
+
# bounds it again because spool replay bypasses this HTTP model.
|
|
166
|
+
account: IngestAccountBody | None = None
|
|
129
167
|
adapter: str = ""
|
|
130
168
|
triggered_by: str = "manual"
|
|
131
169
|
timestamp_utc: str = ""
|
|
@@ -157,6 +195,11 @@ class ExternalIngestBody(BaseModel):
|
|
|
157
195
|
server_version: str = ""
|
|
158
196
|
list_changed: bool | None = None
|
|
159
197
|
|
|
198
|
+
@field_validator("model", mode="before")
|
|
199
|
+
@classmethod
|
|
200
|
+
def _model_object_or_none(cls, v: Any) -> Any:
|
|
201
|
+
return v if isinstance(v, dict) else None
|
|
202
|
+
|
|
160
203
|
|
|
161
204
|
def _parse_event_ts(event: dict[str, Any]) -> datetime | None:
|
|
162
205
|
ts = event.get("timestamp_utc")
|
|
@@ -537,6 +580,21 @@ async def machine_view():
|
|
|
537
580
|
return await asyncio.to_thread(snapshot)
|
|
538
581
|
|
|
539
582
|
|
|
583
|
+
@router.get("/identity", dependencies=[Depends(require_api_key)])
|
|
584
|
+
async def identity_view(days: int = Query(30, ge=1, le=90)):
|
|
585
|
+
"""Which accounts agents reported, for the dashboard's Identity page.
|
|
586
|
+
|
|
587
|
+
Read-only. These are client claims read back from the trail, and an agent
|
|
588
|
+
that reported nothing is listed as unknown rather than left out.
|
|
589
|
+
"""
|
|
590
|
+
if not settings.audit_export_enabled:
|
|
591
|
+
return {"enabled": False, "window_days": days}
|
|
592
|
+
|
|
593
|
+
from agentmetry.core.audit.identity_view import identity_snapshot
|
|
594
|
+
|
|
595
|
+
return await asyncio.to_thread(identity_snapshot, days)
|
|
596
|
+
|
|
597
|
+
|
|
540
598
|
@router.get("/status", dependencies=[Depends(require_api_key)])
|
|
541
599
|
async def audit_status():
|
|
542
600
|
"""Freshness + per-source counts so the dashboard can show 'last event N min ago'.
|
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
"""Validate and minimise the account identity a coding agent reports.
|
|
2
|
+
|
|
3
|
+
This module deliberately has no Agentmetry imports. Hook processes import it
|
|
4
|
+
before the receiver, and a malformed account claim must never break capture.
|
|
5
|
+
The value is a client claim, not proof of identity.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
import base64
|
|
11
|
+
import json
|
|
12
|
+
import os
|
|
13
|
+
import sys
|
|
14
|
+
from pathlib import Path
|
|
15
|
+
from typing import Any
|
|
16
|
+
from urllib.parse import urlsplit
|
|
17
|
+
|
|
18
|
+
_EMAIL_MAX = 320
|
|
19
|
+
_DOMAIN_MAX = 253
|
|
20
|
+
_ORG_MAX = 256
|
|
21
|
+
_SOURCE_MAX = 32
|
|
22
|
+
_TRUE = frozenset({"1", "true", "yes", "on"})
|
|
23
|
+
_LOCAL_CONFIG_MAX_BYTES = 1024 * 1024
|
|
24
|
+
_ACCOUNT_ID_MAX = 128
|
|
25
|
+
_ACCOUNT_ID_CHARS = frozenset(
|
|
26
|
+
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_:."
|
|
27
|
+
)
|
|
28
|
+
#: The first line of a Codex session file also holds its base instructions.
|
|
29
|
+
_SESSION_META_MAX_BYTES = 1024 * 1024
|
|
30
|
+
_WINDOWS_EXTENDED_PREFIX = chr(92) * 2 + "?" + chr(92)
|
|
31
|
+
_CODEX_AUTH_MAX_BYTES = 256 * 1024
|
|
32
|
+
_CLAUDE_AUTH_OVERRIDE_VARS = (
|
|
33
|
+
"ANTHROPIC_API_KEY",
|
|
34
|
+
"ANTHROPIC_AUTH_TOKEN",
|
|
35
|
+
"CLAUDE_CODE_OAUTH_TOKEN",
|
|
36
|
+
"ANTHROPIC_PROFILE",
|
|
37
|
+
)
|
|
38
|
+
_CLAUDE_PROVIDER_FLAGS = (
|
|
39
|
+
"CLAUDE_CODE_USE_BEDROCK",
|
|
40
|
+
"CLAUDE_CODE_USE_VERTEX",
|
|
41
|
+
"CLAUDE_CODE_USE_FOUNDRY",
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def _clean_text(value: Any, limit: int) -> str:
|
|
46
|
+
if not isinstance(value, str):
|
|
47
|
+
return ""
|
|
48
|
+
value = value.strip()
|
|
49
|
+
if not value or len(value) > limit or any(ord(ch) < 32 or ord(ch) == 127 for ch in value):
|
|
50
|
+
return ""
|
|
51
|
+
return value
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def _valid_domain(domain: str) -> bool:
|
|
55
|
+
if not domain or len(domain) > _DOMAIN_MAX or domain.endswith("."):
|
|
56
|
+
return False
|
|
57
|
+
labels = domain.split(".")
|
|
58
|
+
return all(
|
|
59
|
+
label
|
|
60
|
+
and len(label) <= 63
|
|
61
|
+
and label[0].isalnum()
|
|
62
|
+
and label[-1].isalnum()
|
|
63
|
+
and all(ch.isalnum() or ch == "-" for ch in label)
|
|
64
|
+
for label in labels
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def account_from_email(
|
|
69
|
+
value: Any,
|
|
70
|
+
source: str,
|
|
71
|
+
organization_id: Any = "",
|
|
72
|
+
*,
|
|
73
|
+
include_email: bool | None = None,
|
|
74
|
+
) -> dict[str, str]:
|
|
75
|
+
"""Return a bounded account block, or an empty block for bad input."""
|
|
76
|
+
raw = _clean_text(value, _EMAIL_MAX)
|
|
77
|
+
if raw.count("@") != 1:
|
|
78
|
+
return {}
|
|
79
|
+
local, domain = raw.rsplit("@", 1)
|
|
80
|
+
if not local or any(ch.isspace() for ch in raw):
|
|
81
|
+
return {}
|
|
82
|
+
domain = domain.lower()
|
|
83
|
+
if not _valid_domain(domain):
|
|
84
|
+
return {}
|
|
85
|
+
|
|
86
|
+
source_text = _clean_text(source, _SOURCE_MAX).lower()
|
|
87
|
+
if not source_text:
|
|
88
|
+
source_text = "client"
|
|
89
|
+
org = _clean_text(organization_id, _ORG_MAX)
|
|
90
|
+
block = {"domain": domain, "source": source_text}
|
|
91
|
+
if org:
|
|
92
|
+
block["organization_id"] = org
|
|
93
|
+
if include_email is None:
|
|
94
|
+
include_email = os.environ.get("AGENTMETRY_LOG_ACCOUNT_EMAIL", "").strip().lower() in _TRUE
|
|
95
|
+
if include_email:
|
|
96
|
+
# Keep the local part as reported, but normalise the domain.
|
|
97
|
+
block["email"] = f"{local}@{domain}"
|
|
98
|
+
return block
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
def account_from_domain(
|
|
102
|
+
domain: Any,
|
|
103
|
+
source: Any,
|
|
104
|
+
organization_id: Any = "",
|
|
105
|
+
email: Any = "",
|
|
106
|
+
*,
|
|
107
|
+
include_email: bool | None = None,
|
|
108
|
+
) -> dict[str, str]:
|
|
109
|
+
"""Validate an already-minimised claim, optionally retaining opt-in email."""
|
|
110
|
+
clean_domain = _clean_text(domain, _DOMAIN_MAX).lower()
|
|
111
|
+
if not _valid_domain(clean_domain):
|
|
112
|
+
return {}
|
|
113
|
+
source_text = _clean_text(source, _SOURCE_MAX).lower() or "client"
|
|
114
|
+
org = _clean_text(organization_id, _ORG_MAX)
|
|
115
|
+
block = {"domain": clean_domain, "source": source_text}
|
|
116
|
+
if org:
|
|
117
|
+
block["organization_id"] = org
|
|
118
|
+
if include_email is None:
|
|
119
|
+
include_email = os.environ.get("AGENTMETRY_LOG_ACCOUNT_EMAIL", "").strip().lower() in _TRUE
|
|
120
|
+
if include_email:
|
|
121
|
+
candidate = account_from_email(email, source_text, org, include_email=True)
|
|
122
|
+
if candidate and candidate.get("domain") == clean_domain:
|
|
123
|
+
block["email"] = candidate["email"]
|
|
124
|
+
return block
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
def account_from_organization(organization_id: Any, source: str) -> dict[str, str]:
|
|
128
|
+
"""Return an organization-only claim when no email was reported."""
|
|
129
|
+
org = _clean_text(organization_id, _ORG_MAX)
|
|
130
|
+
source_text = _clean_text(source, _SOURCE_MAX).lower() or "client"
|
|
131
|
+
return {"organization_id": org, "source": source_text} if org else {}
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
def _clean_id(value: Any) -> str:
|
|
135
|
+
text = _clean_text(value, _ACCOUNT_ID_MAX)
|
|
136
|
+
return text if text and all(ch in _ACCOUNT_ID_CHARS for ch in text) else ""
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
def account_from_ids(account_id: Any, user_id: Any, source: Any) -> dict[str, str]:
|
|
140
|
+
"""Return a claim of opaque account IDs. It names no domain and no address."""
|
|
141
|
+
account = _clean_id(account_id)
|
|
142
|
+
user = _clean_id(user_id)
|
|
143
|
+
if not account and not user:
|
|
144
|
+
return {}
|
|
145
|
+
block = {"source": _clean_text(source, _SOURCE_MAX).lower() or "client"}
|
|
146
|
+
if account:
|
|
147
|
+
block["account_id"] = account
|
|
148
|
+
if user:
|
|
149
|
+
block["user_id"] = user
|
|
150
|
+
return block
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
def account_from_claim(
|
|
154
|
+
domain: Any,
|
|
155
|
+
source: Any,
|
|
156
|
+
organization_id: Any = "",
|
|
157
|
+
email: Any = "",
|
|
158
|
+
*,
|
|
159
|
+
account_id: Any = "",
|
|
160
|
+
user_id: Any = "",
|
|
161
|
+
include_email: bool | None = None,
|
|
162
|
+
) -> dict[str, str]:
|
|
163
|
+
"""Keep whichever valid parts of a claim arrived: domain, organization or IDs."""
|
|
164
|
+
account = account_from_domain(
|
|
165
|
+
domain, source, organization_id, email, include_email=include_email
|
|
166
|
+
) or account_from_organization(organization_id, source)
|
|
167
|
+
ids = account_from_ids(account_id, user_id, source)
|
|
168
|
+
return {**ids, **account} if account else ids
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
def _claude_auth_override_present() -> bool:
|
|
172
|
+
"""Return whether visible environment state selects non-subscription auth."""
|
|
173
|
+
if any(os.environ.get(name, "").strip() for name in _CLAUDE_AUTH_OVERRIDE_VARS):
|
|
174
|
+
return True
|
|
175
|
+
if any(os.environ.get(name, "").strip().lower() in _TRUE for name in _CLAUDE_PROVIDER_FLAGS):
|
|
176
|
+
return True
|
|
177
|
+
if os.environ.get("ANTHROPIC_FEDERATION_RULE_ID", "").strip() and os.environ.get(
|
|
178
|
+
"ANTHROPIC_ORGANIZATION_ID", ""
|
|
179
|
+
).strip():
|
|
180
|
+
return True
|
|
181
|
+
base_url = os.environ.get("ANTHROPIC_BASE_URL", "").strip()
|
|
182
|
+
if base_url:
|
|
183
|
+
try:
|
|
184
|
+
hostname = urlsplit(base_url).hostname
|
|
185
|
+
except ValueError:
|
|
186
|
+
return True
|
|
187
|
+
if hostname != "api.anthropic.com":
|
|
188
|
+
return True
|
|
189
|
+
return False
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
def _local_claude_account() -> dict[str, str]:
|
|
193
|
+
"""Read two non-secret fields from Claude's undocumented local file.
|
|
194
|
+
|
|
195
|
+
The file and its JSON shape can change between Claude Code versions. It is
|
|
196
|
+
bounded and read once per short-lived hook invocation. An oversized file
|
|
197
|
+
is ignored rather than partially parsed. Explicit API credentials or a
|
|
198
|
+
custom endpoint take precedence over the signed-in account, so the local
|
|
199
|
+
fallback is skipped when any documented override is present.
|
|
200
|
+
"""
|
|
201
|
+
if _claude_auth_override_present():
|
|
202
|
+
return {}
|
|
203
|
+
try:
|
|
204
|
+
config_dir = os.environ.get("CLAUDE_CONFIG_DIR", "")
|
|
205
|
+
path = (Path(config_dir) if config_dir else Path.home()) / ".claude.json"
|
|
206
|
+
if not path.is_file() or path.stat().st_size > _LOCAL_CONFIG_MAX_BYTES:
|
|
207
|
+
return {}
|
|
208
|
+
parsed = json.loads(path.read_bytes())
|
|
209
|
+
oauth = parsed.get("oauthAccount") if isinstance(parsed, dict) else None
|
|
210
|
+
email = oauth.get("emailAddress") if isinstance(oauth, dict) else None
|
|
211
|
+
organization_id = oauth.get("organizationUuid") if isinstance(oauth, dict) else None
|
|
212
|
+
if isinstance(email, str):
|
|
213
|
+
account = account_from_email(email, "local_config", organization_id)
|
|
214
|
+
if account:
|
|
215
|
+
return account
|
|
216
|
+
return account_from_organization(organization_id, "local_config")
|
|
217
|
+
except (OSError, UnicodeError, ValueError, TypeError):
|
|
218
|
+
return {}
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
def _antigravity_storage_path() -> Path:
|
|
222
|
+
if sys.platform == "win32":
|
|
223
|
+
base = os.environ.get("APPDATA", "")
|
|
224
|
+
return (Path(base) if base else Path.home() / "AppData" / "Roaming") / "Antigravity" / "app_storage.json"
|
|
225
|
+
if sys.platform == "darwin":
|
|
226
|
+
return Path.home() / "Library" / "Application Support" / "Antigravity" / "app_storage.json"
|
|
227
|
+
base = os.environ.get("XDG_CONFIG_HOME", "")
|
|
228
|
+
return (Path(base) if base else Path.home() / ".config") / "Antigravity" / "app_storage.json"
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
def _local_antigravity_account() -> dict[str, str]:
|
|
232
|
+
"""Read the last sign-in name from Antigravity's undocumented app storage.
|
|
233
|
+
|
|
234
|
+
Its hook input has no account field. This one key names the account last
|
|
235
|
+
signed in on the machine, not necessarily the one that made the call, and
|
|
236
|
+
the key can change between versions. This file holds no credentials.
|
|
237
|
+
"""
|
|
238
|
+
try:
|
|
239
|
+
path = _antigravity_storage_path()
|
|
240
|
+
if not path.is_file() or path.stat().st_size > _LOCAL_CONFIG_MAX_BYTES:
|
|
241
|
+
return {}
|
|
242
|
+
parsed = json.loads(path.read_bytes())
|
|
243
|
+
if not isinstance(parsed, dict):
|
|
244
|
+
return {}
|
|
245
|
+
return account_from_email(parsed.get("jetski.onboarding.lastLoginUsername"), "local_config")
|
|
246
|
+
except (OSError, UnicodeError, ValueError, TypeError):
|
|
247
|
+
return {}
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
def _codex_home() -> Path:
|
|
251
|
+
configured = os.environ.get("CODEX_HOME", "").strip()
|
|
252
|
+
return (Path(configured) if configured else Path.home() / ".codex").resolve()
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
def _codex_auth_account() -> dict[str, str]:
|
|
256
|
+
"""Take the email domain from the identity token in Codex's `auth.json`.
|
|
257
|
+
|
|
258
|
+
This file holds live credentials, so the handling is deliberately narrow.
|
|
259
|
+
Only the `email` claim of `id_token` is used and the domain is all that is
|
|
260
|
+
kept. Nothing else in the file is copied, stored, logged or sent, and an
|
|
261
|
+
error here carries no content from it. The token's signature is not checked,
|
|
262
|
+
so this is what the file says, not proof of who made a call. It stops on an
|
|
263
|
+
API-key sign-in.
|
|
264
|
+
|
|
265
|
+
Off unless AGENTMETRY_CODEX_AUTH_DOMAIN=1. A sensor should not load a file of
|
|
266
|
+
live credentials on every tool call unless it was asked to, and endpoint
|
|
267
|
+
security tools may flag the read.
|
|
268
|
+
"""
|
|
269
|
+
if os.environ.get("AGENTMETRY_CODEX_AUTH_DOMAIN", "").strip().lower() not in _TRUE:
|
|
270
|
+
return {}
|
|
271
|
+
try:
|
|
272
|
+
path = _codex_home() / "auth.json"
|
|
273
|
+
if not path.is_file() or path.stat().st_size > _CODEX_AUTH_MAX_BYTES:
|
|
274
|
+
return {}
|
|
275
|
+
parsed = json.loads(path.read_bytes())
|
|
276
|
+
if not isinstance(parsed, dict) or parsed.get("auth_mode") != "chatgpt":
|
|
277
|
+
return {}
|
|
278
|
+
tokens = parsed.get("tokens")
|
|
279
|
+
id_token = tokens.get("id_token") if isinstance(tokens, dict) else None
|
|
280
|
+
if not isinstance(id_token, str) or id_token.count(".") != 2:
|
|
281
|
+
return {}
|
|
282
|
+
part = id_token.split(".")[1]
|
|
283
|
+
claims = json.loads(base64.urlsafe_b64decode(part + "=" * (-len(part) % 4)))
|
|
284
|
+
email = claims.get("email") if isinstance(claims, dict) else None
|
|
285
|
+
# This credential file has a stricter boundary than other sources:
|
|
286
|
+
# the global email opt-in must never retain its full email claim.
|
|
287
|
+
return account_from_email(email, "codex_auth", include_email=False)
|
|
288
|
+
except (OSError, UnicodeError, ValueError, TypeError, AttributeError):
|
|
289
|
+
return {}
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
def _codex_session_file(home: Path, transcript_path: Any, session_id: Any) -> Path | None:
|
|
293
|
+
"""Find the session file, from the path the hook named or else from its ID.
|
|
294
|
+
|
|
295
|
+
Windows tools can hand over the extended form of a path, which would not
|
|
296
|
+
match Codex's home. A session with no usable path is found by its ID, which
|
|
297
|
+
Codex puts in the file name.
|
|
298
|
+
"""
|
|
299
|
+
if isinstance(transcript_path, str) and transcript_path.endswith(".jsonl"):
|
|
300
|
+
text = transcript_path
|
|
301
|
+
if text.startswith(_WINDOWS_EXTENDED_PREFIX):
|
|
302
|
+
text = text[len(_WINDOWS_EXTENDED_PREFIX) :]
|
|
303
|
+
path = Path(text).resolve()
|
|
304
|
+
if path.is_relative_to(home) and path.is_file():
|
|
305
|
+
return path
|
|
306
|
+
session = _clean_id(session_id)
|
|
307
|
+
if not session or not session.replace("-", "").isalnum():
|
|
308
|
+
return None
|
|
309
|
+
# sessions/YYYY/MM/DD/rollout-<time>-<session id>.jsonl
|
|
310
|
+
for path in (home / "sessions").glob(f"*/*/*/rollout-*-{session}.jsonl"):
|
|
311
|
+
return path.resolve()
|
|
312
|
+
return None
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
def _codex_session_account(transcript_path: Any, session_id: Any = "") -> dict[str, str]:
|
|
316
|
+
"""Read Codex's account IDs from the first line of its session file.
|
|
317
|
+
|
|
318
|
+
Hook input names the file, but that format is not a stable interface and
|
|
319
|
+
can change between versions. Only a session file under Codex's own home is
|
|
320
|
+
opened, so a crafted path cannot point the hook at another file. Nothing is
|
|
321
|
+
read past the first line.
|
|
322
|
+
"""
|
|
323
|
+
try:
|
|
324
|
+
path = _codex_session_file(_codex_home(), transcript_path, session_id)
|
|
325
|
+
if path is None:
|
|
326
|
+
return {}
|
|
327
|
+
with path.open("rb") as handle:
|
|
328
|
+
line = handle.readline(_SESSION_META_MAX_BYTES + 1)
|
|
329
|
+
if len(line) > _SESSION_META_MAX_BYTES:
|
|
330
|
+
return {}
|
|
331
|
+
record = json.loads(line)
|
|
332
|
+
if not isinstance(record, dict) or record.get("type") != "session_meta":
|
|
333
|
+
return {}
|
|
334
|
+
payload = record.get("payload")
|
|
335
|
+
if not isinstance(payload, dict):
|
|
336
|
+
return {}
|
|
337
|
+
return account_from_ids(
|
|
338
|
+
payload.get("creator_account_id"), payload.get("creator_user_id"), "session_meta"
|
|
339
|
+
)
|
|
340
|
+
except (OSError, UnicodeError, ValueError, TypeError):
|
|
341
|
+
return {}
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
def account_for_hook(source_app: str, data: dict[str, Any]) -> dict[str, str]:
|
|
345
|
+
"""Extract an account claim for the agent that sent this hook payload."""
|
|
346
|
+
source = source_app.strip().lower()
|
|
347
|
+
if source == "cursor":
|
|
348
|
+
email = data.get("user_email")
|
|
349
|
+
if email is None:
|
|
350
|
+
email = data.get("userEmail")
|
|
351
|
+
return account_from_email(email, "hook_payload")
|
|
352
|
+
if source == "claude":
|
|
353
|
+
return _local_claude_account()
|
|
354
|
+
if source == "codex":
|
|
355
|
+
ids = _codex_session_account(data.get("transcript_path"), data.get("session_id"))
|
|
356
|
+
signed_in = _codex_auth_account()
|
|
357
|
+
return {**ids, **signed_in} if signed_in else ids
|
|
358
|
+
if source == "antigravity":
|
|
359
|
+
return _local_antigravity_account()
|
|
360
|
+
return {}
|
|
361
|
+
|
|
362
|
+
|
|
363
|
+
def account_for_otel(attrs: dict[str, Any]) -> dict[str, str]:
|
|
364
|
+
"""Extract Claude's documented OpenTelemetry account attributes."""
|
|
365
|
+
email = attrs.get("user.email")
|
|
366
|
+
org = attrs.get("organization.id")
|
|
367
|
+
return account_from_email(email, "otel", org) or account_from_organization(org, "otel")
|
|
@@ -246,6 +246,19 @@ def canonical_to_udm(canonical: dict[str, Any]) -> dict[str, Any]:
|
|
|
246
246
|
source = canonical.get("source") or {}
|
|
247
247
|
if source.get("app"):
|
|
248
248
|
labels.append({"key": "source_app", "value": str(source["app"])})
|
|
249
|
+
account = canonical.get("account") or {}
|
|
250
|
+
if account.get("domain"):
|
|
251
|
+
labels.append({"key": "agent_account_domain", "value": str(account["domain"])})
|
|
252
|
+
if account.get("source"):
|
|
253
|
+
labels.append({"key": "agent_account_source", "value": str(account["source"])})
|
|
254
|
+
if account.get("organization_id"):
|
|
255
|
+
labels.append({"key": "agent_account_organization_id", "value": str(account["organization_id"])})
|
|
256
|
+
if account.get("account_id"):
|
|
257
|
+
labels.append({"key": "agent_account_id", "value": str(account["account_id"])})
|
|
258
|
+
if account.get("user_id"):
|
|
259
|
+
labels.append({"key": "agent_account_user_id", "value": str(account["user_id"])})
|
|
260
|
+
if account.get("email"):
|
|
261
|
+
labels.append({"key": "agent_account_email", "value": str(account["email"])})
|
|
249
262
|
if labels:
|
|
250
263
|
udm["additional"] = {"labels": labels}
|
|
251
264
|
|
|
@@ -121,7 +121,7 @@ def build_detection_event(detection: Detection, source_event: dict[str, Any]) ->
|
|
|
121
121
|
if atlas is not None:
|
|
122
122
|
detection_block["atlas"] = atlas
|
|
123
123
|
|
|
124
|
-
|
|
124
|
+
event = {
|
|
125
125
|
"schema_version": source_event.get("schema_version", SCHEMA_VERSION),
|
|
126
126
|
"event_id": str(uuid.uuid4()),
|
|
127
127
|
"session_id": source_event.get("session_id", ""),
|
|
@@ -140,3 +140,7 @@ def build_detection_event(detection: Detection, source_event: dict[str, Any]) ->
|
|
|
140
140
|
"agent": agent if isinstance(agent, dict) else {"name": "agentmetry"},
|
|
141
141
|
"detection": detection_block,
|
|
142
142
|
}
|
|
143
|
+
account = source_event.get("account")
|
|
144
|
+
if isinstance(account, dict) and account:
|
|
145
|
+
event["account"] = dict(account)
|
|
146
|
+
return event
|
|
@@ -8,6 +8,7 @@ from datetime import datetime, timezone
|
|
|
8
8
|
from typing import Any, Literal
|
|
9
9
|
|
|
10
10
|
from agentmetry.core.audit.canonical import SCHEMA_VERSION
|
|
11
|
+
from agentmetry.core.account import account_from_claim
|
|
11
12
|
from agentmetry.core.audit.identity import identity_fields
|
|
12
13
|
from agentmetry.core.audit.hashing import arguments_fingerprint
|
|
13
14
|
from agentmetry.core.audit.redaction import scrub_arg_values, scrub_secrets
|
|
@@ -53,6 +54,15 @@ _REMEDIATION_FIELDS = frozenset({
|
|
|
53
54
|
})
|
|
54
55
|
|
|
55
56
|
|
|
57
|
+
#: Bounds what a client can put in the record. Applied here rather than on the
|
|
58
|
+
#: HTTP model because the spool replay reaches this function without passing it.
|
|
59
|
+
_MODEL_TEXT_MAX = 256
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def _model_text(value: Any) -> str:
|
|
63
|
+
return value[:_MODEL_TEXT_MAX] if isinstance(value, str) else ""
|
|
64
|
+
|
|
65
|
+
|
|
56
66
|
def _utc_now() -> str:
|
|
57
67
|
return datetime.now(timezone.utc).isoformat()
|
|
58
68
|
|
|
@@ -147,8 +157,8 @@ def build_external_canonical(payload: dict[str, Any]) -> dict[str, Any]:
|
|
|
147
157
|
skill_id = str(payload.get("skill_id") or payload.get("skill") or "")
|
|
148
158
|
|
|
149
159
|
model_raw = payload.get("model") if isinstance(payload.get("model"), dict) else {}
|
|
150
|
-
model_provider =
|
|
151
|
-
model_id =
|
|
160
|
+
model_provider = _model_text(model_raw.get("provider")) or source_app
|
|
161
|
+
model_id = _model_text(model_raw.get("id")) or _model_text(payload.get("model_id")) or source_app
|
|
152
162
|
|
|
153
163
|
adapter = str(payload.get("adapter") or f"{source_app}_hook")
|
|
154
164
|
|
|
@@ -178,6 +188,18 @@ def build_external_canonical(payload: dict[str, Any]) -> dict[str, Any]:
|
|
|
178
188
|
},
|
|
179
189
|
"model": {"id": model_id, "provider": model_provider},
|
|
180
190
|
}
|
|
191
|
+
account_raw = payload.get("account")
|
|
192
|
+
if isinstance(account_raw, dict):
|
|
193
|
+
account = account_from_claim(
|
|
194
|
+
account_raw.get("domain"),
|
|
195
|
+
account_raw.get("source"),
|
|
196
|
+
account_raw.get("organization_id"),
|
|
197
|
+
account_raw.get("email"),
|
|
198
|
+
account_id=account_raw.get("account_id"),
|
|
199
|
+
user_id=account_raw.get("user_id"),
|
|
200
|
+
)
|
|
201
|
+
if account:
|
|
202
|
+
event["account"] = account
|
|
181
203
|
if claimed_app:
|
|
182
204
|
event["source"]["claimed_app"] = claimed_app
|
|
183
205
|
|