bugx-cli 0.1.1__py3-none-any.whl
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.
- bugx_cli/__init__.py +6 -0
- bugx_cli/cli.py +1685 -0
- bugx_cli/commands/__init__.py +1 -0
- bugx_cli/commands/advisory.py +94 -0
- bugx_cli/commands/agent.py +4210 -0
- bugx_cli/commands/audit.py +632 -0
- bugx_cli/commands/autonomous.py +260 -0
- bugx_cli/commands/cloud.py +1371 -0
- bugx_cli/commands/daemon.py +50 -0
- bugx_cli/commands/doctor.py +1590 -0
- bugx_cli/commands/goal.py +107 -0
- bugx_cli/commands/interaction.py +248 -0
- bugx_cli/commands/knowledge.py +619 -0
- bugx_cli/commands/lifecycle.py +2763 -0
- bugx_cli/commands/patch.py +1014 -0
- bugx_cli/commands/plugin.py +2749 -0
- bugx_cli/commands/plugin_claude.py +1446 -0
- bugx_cli/commands/plugin_cline.py +269 -0
- bugx_cli/commands/plugin_codex.py +74 -0
- bugx_cli/commands/plugin_funide.py +729 -0
- bugx_cli/commands/plugin_qoder.py +216 -0
- bugx_cli/commands/plugin_zcode.py +710 -0
- bugx_cli/commands/project.py +670 -0
- bugx_cli/commands/report.py +256 -0
- bugx_cli/commands/skill.py +251 -0
- bugx_cli/commands/stats.py +133 -0
- bugx_cli/commands/system.py +2567 -0
- bugx_cli/common.py +906 -0
- bugx_cli/host_adapters.py +1892 -0
- bugx_cli/hosts/__init__.py +80 -0
- bugx_cli/hosts/base.py +99 -0
- bugx_cli/hosts/registry.py +573 -0
- bugx_cli/hosts/template_engine.py +188 -0
- bugx_cli/infra/__init__.py +209 -0
- bugx_cli/infra/ai_advisor.py +851 -0
- bugx_cli/infra/engine_installer.py +1945 -0
- bugx_cli/infra/host_sync.py +548 -0
- bugx_cli/infra/mcp_advisor.py +826 -0
- bugx_cli/infra/security.py +339 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/bugx-mcp-manifest.json +53 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/CATALOG.json +141 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/README.md +254 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/adapters/README.md +35 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/adapters/android-interaction.json +81 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/adapters/android.json +24 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/adapters/desktop-macos.json +20 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/adapters/ios-interaction.json +34 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/adapters/ios.json +23 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/adapters/memory-macos.json +24 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/agent/README.md +51 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/agent/__init__.py +146 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/agent/agent_artifacts.py +766 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/agent/agent_eval.py +1155 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/agent/agent_execution.py +718 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/agent/agent_orchestrator.py +1351 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/agent/agent_targets.py +877 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/agent/agent_workspace.py +770 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/agent/feature_baseline.py +150 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/assets/README.md +24 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/assets/axe-core/LICENSE-3RD-PARTY.txt +66 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/assets/axe-core/LICENSE.txt +362 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/assets/axe-core/UPSTREAM.md +10 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/assets/axe-core/axe.min.js +12 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/assets/bugx-avatar-1024.png +0 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/assets/bugx-avatar-512.png +0 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/assets/bugx-avatar-tight.svg +23 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/assets/bugx-avatar.svg +28 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/assets/bugx-hero-cn.png +0 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/assets/bugx-hero-en.png +0 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/assets/bugx-hero-en.svg +74 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/assets/bugx-hero-zh.svg +74 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/assets/codex.png +0 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/assets/dsh.png +0 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/assets/project-layout.md +42 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/assets/zcode.png +0 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/README.md +37 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/data-audit/manifest.json +94 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/data-audit/stages/00-scope.md +14 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/data-audit/stages/10-schema-inventory.md +14 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/data-audit/stages/20-query-and-integrity.md +14 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/data-audit/stages/80-evidence-regression.md +14 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/desktop-audit/manifest.json +123 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/desktop-audit/stages/00-scope.md +15 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/desktop-audit/stages/10-process-model.md +14 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/desktop-audit/stages/20-package-integrity.md +15 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/desktop-audit/stages/30-ui-behavior.md +14 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/desktop-audit/stages/80-evidence-regression.md +15 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/memory-testing.md +227 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/mobile-audit/manifest.json +155 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/mobile-audit/modules/android.md +19 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/mobile-audit/modules/h5.md +18 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/mobile-audit/modules/ios.md +25 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/mobile-audit/modules/miniprogram.md +26 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/mobile-audit/modules/webview.md +18 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/mobile-audit/stages/00-scope.md +14 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/mobile-audit/stages/10-platform-inventory.md +14 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/mobile-audit/stages/20-masvs-static.md +20 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/mobile-audit/stages/30-component-exposure.md +14 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/mobile-audit/stages/40-device-behavior.md +14 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/mobile-audit/stages/80-evidence-regression.md +13 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/native-audit/manifest.json +127 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/native-audit/stages/00-scope.md +14 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/native-audit/stages/10-static-white-box.md +14 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/native-audit/stages/20-memory-concurrency.md +15 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/native-audit/stages/30-behavior-black-box.md +39 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/native-audit/stages/80-evidence-regression.md +14 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/platform-testing.md +174 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/web-audit/manifest.json +191 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/web-audit/modules/graphql.md +5 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/web-audit/modules/h5.md +18 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/web-audit/modules/multi-tenant.md +4 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/web-audit/modules/oauth.md +4 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/web-audit/modules/upload.md +4 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/web-audit/modules/websocket.md +4 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/web-audit/stages/00-scope.md +13 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/web-audit/stages/10-discovery.md +13 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/web-audit/stages/20-auth-session.md +13 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/web-audit/stages/30-authz-business.md +13 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/web-audit/stages/40-input-output.md +13 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/web-audit/stages/50-state-async.md +13 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/web-audit/stages/60-file-ssrf-deser.md +12 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/web-audit/stages/70-config-dependency.md +12 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/audit_packs/web-audit/stages/80-evidence-regression.md +12 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/autonomous_cve/INTERFACE.md +61 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/autonomous_cve/README.md +58 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/autonomous_cve/SPEC.md +25 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/autonomous_cve/__init__.py +109 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/autonomous_cve/attack_graph.py +1096 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/autonomous_cve/attack_graph_store.py +1868 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/autonomous_cve/audit_campaign.py +1232 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/autonomous_cve/behavior_graph.py +465 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/autonomous_cve/ghsa_advisories.py +174 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/autonomous_cve/models.py +93 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/autonomous_cve/mutator.py +87 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/autonomous_cve/patcher.py +126 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/autonomous_cve/scout.py +278 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/autonomous_cve/synthesizer.py +207 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/autonomous_cve/verifier.py +103 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/bugx.md +1299 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/bugx_paths.py +1881 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/cli-help.txt +66 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/cloud_sync/INTERFACE.md +32 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/cloud_sync/README.md +62 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/cloud_sync/SPEC.md +25 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/cloud_sync/__init__.py +23 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/cloud_sync/auto_sync.py +398 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/cloud_sync/cloud_client.py +1218 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/cloud_sync/cloud_onboard.py +743 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/cloud_sync/cloud_schema.py +648 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/cloud_sync/consent.py +81 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/cloud_sync/device_identity.py +307 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/cloud_sync/endpoint_router.py +415 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/cloud_sync/flywheel_client.py +769 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/cloud_sync/network_transport.py +296 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/cloud_sync/onboard_wizard.py +493 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/cloud_sync/sensitive_filter.py +285 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/cloud_sync/sync_pull.py +695 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/cloud_sync/sync_push.py +723 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/contracts/AGENT_GUIDE.md +359 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/contracts/README.md +34 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/contracts/bugx-blackbox.md +541 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/contracts/bugx-opencode.md +469 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/contracts/bugx-quick.md +44 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/contracts/bugx-runtime-contract.md +353 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/contracts/bugx-worker.md +470 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/contracts/engine_gap_contracts.py +473 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/coverage/README.md +70 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/coverage/__init__.py +106 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/coverage/coverage_ai_review.py +185 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/coverage/coverage_backfill.py +54 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/coverage/coverage_bootstrap.py +713 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/coverage/coverage_business.py +36 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/coverage/coverage_cli.py +715 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/coverage/coverage_discovery.py +1429 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/coverage/coverage_evidence.py +1024 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/coverage/coverage_forensics.py +124 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/coverage/coverage_gate.py +277 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/coverage/coverage_intelligence.py +734 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/coverage/coverage_manifest.py +396 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/coverage/coverage_platform.py +77 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/coverage/coverage_validate.py +241 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/coverage/module_coverage.py +157 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/dev_harness/INTERFACE.md +20 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/dev_harness/README.md +21 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/dev_harness/SPEC.md +25 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/dev_harness/__init__.py +5 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/dev_harness/interaction_preset.py +408 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/engine-integrity.json +2797 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/fuzzing/README.md +49 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/fuzzing/__init__.py +82 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/fuzzing/concurrency_fuzzer.py +435 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/fuzzing/differential_oracle.py +1164 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/fuzzing/fuzz_input.py +1291 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/fuzzing/stateful_fuzzer.py +404 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/governance/README.md +61 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/governance/__init__.py +130 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/governance/capacity_planner.py +124 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/governance/dependency_lock.py +317 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/governance/goal_governor.py +754 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/governance/guide_budget.py +458 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/governance/lockdown.sh +50 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/governance/readonly_enforcer.py +154 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/governance/runtime_tool_gate.py +373 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/governance/secret_redactor.py +784 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/governance/token_budget.py +38 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/host_acp/INTERFACE.md +36 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/host_acp/README.md +51 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/host_acp/SPEC.md +25 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/host_acp/__init__.py +121 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/host_acp/base.py +111 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/host_acp/claude.py +99 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/host_acp/cline.py +298 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/host_acp/codex.py +300 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/host_acp/dsh.py +106 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/host_acp/opencode.py +209 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/host_acp/pi.py +94 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/host_acp/zcode.py +99 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/host_runtime/INTERFACE.md +24 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/host_runtime/README.md +62 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/host_runtime/SPEC.md +25 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/host_runtime/__init__.py +21 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/host_runtime/adapters.py +412 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/host_runtime/autonomous_runner.py +1152 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/host_runtime/cline.py +448 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/host_runtime/common.py +103 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/host_runtime/free_models.py +786 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/host_runtime/host_bootstrap.py +389 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/host_runtime/host_evaluators.py +761 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/host_runtime/host_probe.py +41 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/host_runtime/host_provider_arbitrator.py +831 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/host_runtime/host_registry.py +662 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/host_runtime/host_usage.py +127 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/host_runtime/mcp_process_tracker.py +509 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/host_runtime/mcp_registry_gate.py +379 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/host_runtime/pi.py +102 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/host_runtime/provider_facts.py +66 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/hosts/INTERFACE.md +51 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/hosts/README.md +67 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/hosts/SPEC.md +25 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/hosts/__init__.py +140 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/hosts/_base_usage.py +152 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/hosts/_codex_usage.py +297 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/hosts/_dsh_usage.py +184 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/hosts/_mcp_toml.py +365 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/hosts/_zcode_usage.py +269 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/hosts/base.py +479 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/hosts/claude.py +212 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/hosts/cline.py +229 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/hosts/codex.py +1006 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/hosts/dsh.py +526 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/hosts/opencode.py +358 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/hosts/pi.py +308 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/hosts/zcode.py +219 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/i18n.py +252 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/infra/README.md +41 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/infra/__init__.py +17 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/infra/build_info.py +105 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/infra/client_metadata.py +185 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/infra/json_utils.py +22 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/infra/python_runtime.py +540 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/infra/safe_xml.py +221 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/launch_bugx.py +118 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/launch_phases/INTERFACE.md +31 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/launch_phases/README.md +106 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/launch_phases/SPEC.md +25 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/launch_phases/__init__.py +29 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/launch_phases/candidate_revalidation.py +484 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/launch_phases/common.py +1060 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/launch_phases/finding_confirm_phase.py +391 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/launch_phases/finding_settlement.py +1432 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/launch_phases/findings_adjudication.py +666 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/launch_phases/findings_snapshot.py +357 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/launch_phases/judge_phase.py +848 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/launch_phases/lesson_context.py +536 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/launch_phases/lifecycle_reporter.py +627 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/launch_phases/orchestrator_controls.py +686 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/launch_phases/post_commit.py +567 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/launch_phases/post_coverage_sync.py +598 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/launch_phases/post_dry_run.py +817 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/launch_phases/post_observability.py +367 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/launch_phases/post_phase.py +1223 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/launch_phases/post_receipt.py +373 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/launch_phases/post_round_lifecycle.py +786 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/launch_phases/pre_phase.py +1029 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/launch_phases/pre_recon_scout.py +879 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/launch_phases/pre_state_builder.py +1133 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/launch_phases/report_sharing.py +414 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/launch_phases/round_orchestrator.py +1116 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/launch_phases/session_runtime.py +1670 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/launch_phases/startup_gates.py +1050 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/launch_phases/startup_interaction.py +1003 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/launch_phases/startup_version_gate.py +879 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/launch_phases/supervisor_bridge.py +1253 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/launch_phases/supervisor_coverage.py +423 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/launch_phases/supervisor_degraded.py +1211 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/launch_phases/worker_barriers.py +424 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/launch_phases/worker_orchestrator.py +1246 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/launch_phases/worker_prior.py +749 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/ledger/INTERFACE.md +35 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/ledger/README.md +160 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/ledger/SPEC.md +25 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/ledger/__init__.py +67 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/ledger/_facade.py +227 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/ledger/archive_ops.py +630 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/ledger/auto_materialization.py +459 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/ledger/bug-log.md +22 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/ledger/cli.py +275 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/ledger/export_ops.py +554 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/ledger/finding_confirmation.py +1316 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/ledger/finding_io.py +299 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/ledger/finding_lifecycle.py +730 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/ledger/finding_verification.py +405 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/ledger/incidents.py +1005 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/ledger/lesson-replay-cases.json +20 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/ledger/lesson_ledger.py +241 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/ledger/lesson_replay.py +272 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/ledger/life_ledger.py +668 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/ledger/mistake-book.md +130 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/ledger/patterns.py +684 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/ledger/receipt_contract.py +269 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/ledger/schema.py +1192 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/ledger/sync_ops.py +940 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/ledger/tool_experience.py +683 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/ledger/verify_life.py +1597 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/lesson-ledger.json +275 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/locales/README.md +19 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/locales/en-US.json +462 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/locales/zh-CN.json +462 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/mcp_handlers/INTERFACE.md +75 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/mcp_handlers/README.md +62 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/mcp_handlers/SPEC.md +25 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/mcp_handlers/__init__.py +128 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/mcp_handlers/base.py +717 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/mcp_handlers/channel_lifecycle.py +751 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/mcp_handlers/graph_handlers.py +222 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/mcp_handlers/knowledge_handlers.py +536 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/mcp_handlers/mining_handlers.py +586 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/mcp_handlers/resource_prompt_table.py +116 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/mcp_handlers/retrieval_handlers.py +249 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/mcp_handlers/rpc_server.py +470 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/mcp_handlers/supervisor_handlers.py +1461 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/mcp_handlers/telemetry_handlers.py +227 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/mcp_handlers/tool_table.py +1030 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/mcp_runtime_support/README.md +21 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/mcp_runtime_support/__init__.py +1 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/mcp_runtime_support/common.py +363 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/mcp_runtime_support/environment.py +567 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/mcp_runtime_support/verifier.py +758 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/metadata.txt +4 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/planning/README.md +157 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/planning/__init__.py +242 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/planning/capability_plan.py +187 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/planning/capability_planner.py +195 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/planning/domain_archetype.py +542 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/planning/domain_router.py +269 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/planning/dynamic_flow_analyzer.py +533 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/planning/impact_pruner.py +435 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/planning/intent_adjudicator.py +175 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/planning/judge_pipeline.py +1246 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/planning/logic_analysis.py +419 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/planning/prompt_harness.py +1704 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/planning/source_inspector.py +267 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/planning/spec_harvester.py +449 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/planning/target_sandbox_manager.py +573 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/planning/test_capability_verifier.py +1364 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/planning/tools-kb.md +38 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/planning/unit_kind.py +122 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/probes/INTERFACE.md +83 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/probes/README.md +51 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/probes/SPEC.md +36 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/probes/__init__.py +76 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/probes/android_probe.py +552 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/probes/base.py +147 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/probes/codebase_memory_probe.py +647 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/probes/desktop_probe.py +342 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/probes/differential_probe.py +434 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/probes/efficiency_probe.py +232 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/probes/ios_binary_probe.py +472 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/probes/memory_probe.py +392 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/probes/miniprogram_probe.py +385 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/probes/mobile_probe.py +466 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/probes/native_probe.py +302 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/probes/openwiki_probe.py +263 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/probes/pattern_probe.py +453 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/probes/platform_probe.py +424 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/probes/probe_registry.py +1770 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/probes/sast_fixture_corpus.py +340 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/probes/sast_probe.py +1510 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/probes/sast_rules.py +1481 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/probes/sca_scanner.py +779 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/probes/ui_accessibility.py +149 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/probes/ui_audit.py +513 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/probes/ui_contract.py +273 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/probes/ui_evidence.py +212 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/probes/ui_measurements.py +314 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/probes/ui_repair.py +250 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/probes/ui_review.py +133 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/probes/ui_storybook.py +107 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/probes/ui_tokens.py +185 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/probes/ui_visual_diff.py +131 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/probes/web_probe.py +714 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/project_profiler/INTERFACE.md +62 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/project_profiler/README.md +53 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/project_profiler/SPEC.md +28 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/project_profiler/__init__.py +201 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/project_profiler/arbitrator.py +316 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/project_profiler/constants.py +247 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/project_profiler/detector.py +399 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/project_profiler/extractors.py +836 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/project_profiler/fingerprint.py +116 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/project_profiler/storage.py +258 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/project_profiler/strategy.py +301 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/prompts/README.md +35 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/prompts/codex_dialog_dispatch.md +9 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/prompts/command_routing_en.md +42 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/prompts/command_routing_zh.md +42 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/prompts/l0_router.md +47 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/prompts/rules/anti_patterns.md +16 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/prompts/rules/concurrency_rules.md +14 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/prompts/rules/memory_leak_rules.md +13 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/prompts/rules/prompt_injection_defense.md +13 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/prompts/stages/stage_explore.md +31 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/prompts/stages/stage_gate.md +43 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/prompts/stages/stage_mutate.md +42 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/prompts/stages/stage_repair.md +85 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/repair/README.md +74 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/repair/__init__.py +169 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/repair/fix_watchlist.py +391 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/repair/l7_dynamic.py +418 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/repair/l7_repair_loop.py +462 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/repair/l7_selfcheck.py +862 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/repair/minimize_repro.py +466 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/repair/patch_synthesizer.py +617 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/repair/regression_pack.py +379 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/repair/rsi_fixer.py +910 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/repair/rsi_loop.py +311 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/repair/rsi_repair.py +348 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/repair/rsi_rounds.py +212 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/repair/rsi_scope.py +281 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/repair/self_heal.py +604 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/repair/test_generator.py +1108 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/repair/test_quality_auditor.py +410 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/repair/test_strategy.py +511 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/report_engine/INTERFACE.md +59 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/report_engine/README.md +69 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/report_engine/SPEC.md +28 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/report_engine/__init__.py +47 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/report_engine/attestation.py +228 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/report_engine/authority.py +255 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/report_engine/finding_report.py +418 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/report_engine/formal_report_builder.py +924 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/report_engine/html_renderers.py +696 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/report_engine/models.py +759 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/report_engine/pdf_exporter.py +231 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/report_engine/projects_assets.py +730 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/report_engine/report_client.py +743 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/report_engine/report_data_builder.py +388 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/report_engine/report_share.py +459 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/report_engine/sast_bridge.py +116 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/report_engine/server.py +832 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/report_engine/visual_report_builder.py +796 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/report_engine/web-conformance.md +168 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/report_engine/web_conformance.py +428 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/report_engine/workbench_assets.py +484 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/retrieval/INTERFACE.md +20 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/retrieval/README.md +161 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/retrieval/SPEC.md +25 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/retrieval/__init__.py +3 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/retrieval/code_analyzer.py +1720 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/retrieval/codebase_memory_bridge.py +337 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/retrieval/context_assembler.py +240 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/retrieval/corpus_fetch.py +369 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/retrieval/graph_ego.py +597 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/retrieval/knowledge_auto.py +662 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/retrieval/knowledge_sources.py +168 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/retrieval/knowledge_sync.py +1003 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/retrieval/memory_store.py +480 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/retrieval/query_planner.py +1020 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/retrieval/rrf_engine.py +137 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/retrieval/slice_extractor.py +1209 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/retrieval/slice_normalizer.py +373 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/retrieval/slice_spec.py +357 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/retrieval/symbol_index.py +1151 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/retrieval/universal_code_matcher.py +622 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/retrieval/xerj_bridge.py +476 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/retrieval/xerj_supervisor.py +362 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/README.md +33 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/ios/PROVENANCE.json +30 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/ios/crypto.yaml +36 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/ios/network.yaml +20 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/ios/resilience.yaml +47 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/ios/storage.yaml +48 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/LICENSE +173 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/PROVENANCE.json +270 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-asymmetric-key-pair-used-for-multiple-purposes.yml +13 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-backup-manifest.yml +24 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-biometric-event-bound.yml +49 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-biometric-invalidated-enrollment.yml +11 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-biometric-no-confirmation-required.yml +10 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-biometric-validity-duration.yml +24 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-broken-encryption-algorithms.yaml +9 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-broken-encryption-modes.yaml +13 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-content-provider-exported.yml +35 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-custom-deeplink-scheme.yml +29 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-dangerous-app-permissions.yaml +65 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-data-unencrypted-shared-storage-no-user-interaction-apis.yml +36 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-data-unencrypted-shared-storage-no-user-interaction-manifest.yml +15 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-debuggable-flag.yml +10 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-debugger-checks.yml +12 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-deeplink-autoverify-missing.yml +33 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-deeplink-unvalidated-parameter.yml +11 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-device-passcode-present.yml +17 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-fileprovider-broad-scope.yml +46 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-hardcoded-crypto-keys-usage.yml +14 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-hardcoded-security-provider.yaml +18 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-implicit-intent-internal-communication.yml +30 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-implicit-intent-leaking-extras.yml +29 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-input-field-usage.yml +11 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-key-generation-with-insufficient-key-length.yml +21 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-keyboard-cache-input-types.yml +10 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-local-storage-input-validation.yml +48 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-native-debugger-checks.yml +12 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-network-checkservertrusted.yml +12 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-network-hostname-verification.yml +11 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-network-insecure-trust-anchors.yml +11 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-network-onreceivedsslerror.yml +12 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-non-random-use.yml +16 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-object-deserialization.yml +14 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-overlay-protection.yml +68 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-pendingintent-mutable.yml +39 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-random-apis-insufficient-entropy.yml +17 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-root-detection.yaml +59 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-sdk-version.yml +10 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-sensitive-data-in-notifications-manifest.yml +17 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-sensitive-data-in-notifications.yml +11 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-sensitive-data-in-screenshot.yml +18 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-sql-injection-contentprovider.yml +17 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-ssl-socket-hostnameverifier.yml +15 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-strictmode.yml +10 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-system-alert-window.yml +9 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-webview-allow-local-access.yml +15 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-webview-bridges.yml +28 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-webview-safebrowsing.yml +20 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mastg/mastg-android-webview-url-handlers.yml +41 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/miniprogram/PROVENANCE.json +26 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/miniprogram/network.yaml +37 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/miniprogram/platform.yaml +36 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/miniprogram/storage.yaml +48 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mobsfscan-swift/LICENSE +165 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mobsfscan-swift/PROVENANCE.json +58 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mobsfscan-swift/auth.yaml +59 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mobsfscan-swift/crypto.yaml +66 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mobsfscan-swift/jailbreak.yaml +14 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mobsfscan-swift/keyboard.yaml +34 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mobsfscan-swift/logging.yaml +23 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mobsfscan-swift/network.yaml +55 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mobsfscan-swift/resilience.yaml +29 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mobsfscan-swift/secrets.yaml +33 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mobsfscan-swift/storage.yaml +29 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/rules/mobsfscan-swift/webview.yaml +32 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/runtime/README.md +198 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/runtime/__init__.py +3 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/runtime/bugx_logging.py +1464 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/runtime/daemon_runner.py +623 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/runtime/fixture_solidify.py +444 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/runtime/global_telemetry.py +549 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/runtime/incident_eval.py +148 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/runtime/interaction.py +605 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/runtime/interaction_store.py +435 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/runtime/interactive_menu.py +95 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/runtime/log_analytics.py +922 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/runtime/mining_quality_framework.py +1387 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/runtime/model_runner.py +732 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/runtime/platform_adapter.py +579 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/runtime/prep_validate.py +478 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/runtime/project_graph.py +827 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/runtime/project_init.py +481 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/runtime/project_profile.py +224 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/runtime/project_settings.py +964 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/runtime/provider_window.py +97 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/runtime/resume_ticket.py +115 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/runtime/scenario_eval.py +856 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/runtime/seed_drill.py +549 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/runtime/self_audit.py +550 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/runtime/session_profile.py +205 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/runtime/setup_ui_env.py +229 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/runtime/startup_environment.py +859 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/runtime/sync_store.py +1421 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/runtime/tool_install_targets.py +18 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/schemas/README.md +35 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/schemas/agent-graph.schema.json +368 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/schemas/attack-graph.schema.json +88 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/schemas/evidence-bundle.schema.json +33 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/schemas/skill-pack.schema.json +230 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/schemas/worker-checkpoint.schema.json +119 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/secure_atomic.py +289 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/seed_corpus/README.md +55 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/seed_corpus/c.txt +29 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/seed_corpus/cpp.txt +32 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/seed_corpus/css.txt +70 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/seed_corpus/go.txt +46 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/seed_corpus/java.txt +30 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/seed_corpus/javascript.txt +55 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/seed_corpus/kotlin.txt +28 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/seed_corpus/python.txt +71 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/seed_corpus/rust.txt +53 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/seed_corpus/swift.txt +29 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/seed_corpus/typescript.txt +29 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/skills/README.md +53 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/skills/__init__.py +189 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/skills/bugx_docs_mcp_server.py +418 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/skills/bugx_mcp_server.py +1161 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/skills/mcp_runtime.py +968 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/skills/mcp_session_proof.py +605 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/skills/mobile_ui_inspector.py +405 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/skills/skill_pack.py +1214 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/skills/skill_synthesizer.py +1153 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/skills/tools_kb.py +313 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor/INTERFACE.md +121 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor/README.md +209 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor/SPEC.md +25 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor/__init__.py +175 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor/audit_supervisor.py +1015 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor/budget_governor.py +1254 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor/checkpoint_handler.py +368 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor/checkpoint_pipeline.py +1564 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor/checkpoint_sync.py +653 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor/claim_events.py +74 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor/claim_sync.py +590 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor/cli.py +812 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor/context_sync.py +55 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor/coverage_sync.py +115 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor/finding_commit.py +470 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor/finding_sync.py +688 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor/finding_workflow.py +676 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor/finish_policy.py +224 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor/finish_sync.py +185 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor/graph_sync.py +669 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor/lease_manager.py +788 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor/lifecycle_blocks.py +129 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor/next_round_sync.py +126 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor/observability.py +140 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor/recovery_sync.py +165 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor/rejection_remedies.py +355 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor/round_governor.py +306 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor/serial_authorization.py +544 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor/start_sync.py +87 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor/state_store.py +249 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor/supervisor_host.py +511 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor/supervisor_models.py +1143 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor/systemic_failure.py +104 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor/task_scheduler.py +1640 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor/worker_checkpoint.py +230 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor/worker_execution.py +265 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor/worker_handoff.py +192 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor/worker_lifecycle.py +396 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor/worker_runtime.py +1005 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor/worker_sync.py +89 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor_types/README.md +36 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor_types/__init__.py +0 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor_types/exceptions.py +52 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor_types/graph_models.py +357 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor_types/path_containment.py +151 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor_types/target_fingerprint.py +310 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/supervisor_types/worker_claim.py +411 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/INTERFACE.md +50 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/README.md +57 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/SPEC.md +26 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/__init__.py +11 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/adapters/__init__.py +27 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/adapters/base.py +87 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/adapters/bugx.py +102 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/adapters/claude.py +222 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/adapters/cline.py +407 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/adapters/codex.py +260 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/adapters/dsh.py +177 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/adapters/opencode.py +218 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/adapters/pi.py +272 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/adapters/registry.py +100 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/adapters/zcode.py +312 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/api_routes_post.py +668 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/dispatcher.py +1376 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/docs_session_service.py +473 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/handler.py +674 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/ide_cloud_service.py +526 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/mcp_inspector.py +1747 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/00-base.css +1060 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/01-monitoring.css +802 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/02-header-actions.css +321 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/03-trigger-popover.css +697 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/04-composer.css +628 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/05-skills-center.css +878 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/06-mcp-center.css +623 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/07-skill-detail.css +265 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/08-files-management.css +167 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/09-files-center.css +386 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/10-icons.css +105 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/11-project-options.css +185 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/12-profile-tab.css +383 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/assets/index-CXAsl8mr.js +333 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/assets/index-DHQUtWtx.css +1 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/assets/source-serif-4-cyrillic-400-normal-B8Z6Jvzv.woff +0 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/assets/source-serif-4-cyrillic-400-normal-C44pakCn.woff2 +0 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/assets/source-serif-4-cyrillic-500-normal-Bb4u56_6.woff +0 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/assets/source-serif-4-cyrillic-500-normal-BdVUvljg.woff2 +0 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/assets/source-serif-4-cyrillic-ext-400-normal-CWV284fw.woff2 +0 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/assets/source-serif-4-cyrillic-ext-400-normal-DLkyKLvH.woff +0 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/assets/source-serif-4-cyrillic-ext-500-normal-8-8HP2PF.woff +0 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/assets/source-serif-4-cyrillic-ext-500-normal-DaDZE_Na.woff2 +0 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/assets/source-serif-4-greek-400-normal-BccYJ-vZ.woff +0 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/assets/source-serif-4-greek-400-normal-Cw5-AHNN.woff2 +0 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/assets/source-serif-4-greek-500-normal-By8GFJzz.woff2 +0 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/assets/source-serif-4-greek-500-normal-z-Q6FFuG.woff +0 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/assets/source-serif-4-latin-400-normal-DJ5YJwmz.woff2 +0 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/assets/source-serif-4-latin-400-normal-Dn3IlU-Z.woff +0 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/assets/source-serif-4-latin-500-normal-CUHe9xxf.woff2 +0 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/assets/source-serif-4-latin-500-normal-DVVamBqs.woff +0 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/assets/source-serif-4-latin-ext-400-normal-CEpydyUl.woff +0 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/assets/source-serif-4-latin-ext-400-normal-Cp7z-ARB.woff2 +0 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/assets/source-serif-4-latin-ext-500-normal-BYjRCDVy.woff2 +0 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/assets/source-serif-4-latin-ext-500-normal-D-qasQTj.woff +0 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/assets/source-serif-4-vietnamese-400-normal-BbG3LG1A.woff2 +0 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/assets/source-serif-4-vietnamese-400-normal-DR1UuFon.woff +0 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/assets/source-serif-4-vietnamese-500-normal-8N8MYVKB.woff +0 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/assets/source-serif-4-vietnamese-500-normal-Bi3OSTTW.woff2 +0 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/design-tokens.css +113 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/favicon.png +0 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/icon-192.png +0 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/index.html +55 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/manifest.webmanifest +19 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/project-settings.js +9602 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/static/sw.js +8 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/core/webui/workspace_service.py +218 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/dsh/agents/bugx.md +27 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/dsh/dsh-patch.yml +18 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/dsh/mcp/cordis.patch.yml +4 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/dsh/mcp/index.js +219 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/dsh/mcp/package.json +28 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/dsh/skills/bugx/SKILL.md +70 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/dsh/skills/bugx-dsh/SKILL.md +229 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/dsh/ui/client.js +87 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/dsh/ui/cordis.patch.yml +4 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/dsh/ui/index.js +7 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/dsh/ui/package.json +27 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/mcp-lock.json +3075 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/opencode.json +129 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/pi/extensions/bugx/README.md +12 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/pi/extensions/bugx/index.ts +299 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/pi/extensions/bugx/manifest.json +11 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/pi/skills/bugx/SKILL.md +69 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/plugins/bugx/skills/bugx-claude/SKILL.md +326 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/plugins/bugx/skills/bugx-opencode/SKILL.md +129 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/plugins/bugx/skills/bugx-zcode/SKILL.md +459 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/workbuddy/connector-meta.json +19 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/workbuddy/icon.png +0 -0
- bugx_cli-0.1.1.data/data/share/bugx-agent/workbuddy/skills/bugx/SKILL.md +70 -0
- bugx_cli-0.1.1.dist-info/METADATA +335 -0
- bugx_cli-0.1.1.dist-info/RECORD +762 -0
- bugx_cli-0.1.1.dist-info/WHEEL +5 -0
- bugx_cli-0.1.1.dist-info/entry_points.txt +2 -0
- bugx_cli-0.1.1.dist-info/licenses/LICENSE +55 -0
- bugx_cli-0.1.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,924 @@
|
|
|
1
|
+
"""BugX 商务正式安全审计报告生成器 (Formal Executive Security Audit Report Builder).
|
|
2
|
+
|
|
3
|
+
面向企业高管 (CISO / CTO / 董事会 / 合规主管 / 审计师) 的正式商务化安全评估报告。
|
|
4
|
+
严格采用 Corporate Slate / Navy 商务冷色系,具备法律级合规声明、密码学哈希防篡改印章、
|
|
5
|
+
CVSS v3.1 / CWE Top 25 威胁热力图、SLA 整改路线图以及权威审计师签署栏。
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
import html
|
|
11
|
+
from typing import Any, Dict, List
|
|
12
|
+
|
|
13
|
+
from .models import ReportDataBundle, VulnerabilityFinding, LanguageAuditSummary
|
|
14
|
+
from . import attestation
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class FormalExecutiveReportBuilder:
|
|
18
|
+
"""正式商务安全审计报告构建器。"""
|
|
19
|
+
|
|
20
|
+
def __init__(self, bundle: ReportDataBundle):
|
|
21
|
+
self.bundle = bundle
|
|
22
|
+
|
|
23
|
+
def render_markdown(self) -> str:
|
|
24
|
+
"""渲染符合 GitHub Flavored Markdown 规范的正式商务审计报告。"""
|
|
25
|
+
b = self.bundle
|
|
26
|
+
m = b.metrics
|
|
27
|
+
a = attestation.from_bundle(b)
|
|
28
|
+
|
|
29
|
+
lines: List[str] = []
|
|
30
|
+
lines.append(f"# 🛡️ {b.title}")
|
|
31
|
+
lines.append("")
|
|
32
|
+
lines.append(f"> **报告唯一识别码 (Report ID)**: `{b.report_id}` ")
|
|
33
|
+
lines.append(f"> **安全分发级别 (Classification)**: `CONFIDENTIAL // EXECUTIVE DISTRIBUTION ONLY` ")
|
|
34
|
+
lines.append(f"> **评估基准时间 (Timestamp)**: `{b.created_at}` ")
|
|
35
|
+
lines.append(f"> **主审计机构 (Auditor)**: `{b.auditor}` ")
|
|
36
|
+
lines.append(f"> **密码学数字印章 (SHA-256 Digest)**: `{b.sha256_seal}` ")
|
|
37
|
+
lines.append(f"> **背书状态 (Attestation)**: `{a.status_line}`")
|
|
38
|
+
for blocker in a.gate_blockers:
|
|
39
|
+
lines.append(f"> **门禁阻断 (Gate Blocker)**: {blocker} ")
|
|
40
|
+
lines.append("")
|
|
41
|
+
lines.append("---")
|
|
42
|
+
lines.append("")
|
|
43
|
+
lines.append("## 1. 执行高管摘要 (Executive Summary)")
|
|
44
|
+
lines.append("")
|
|
45
|
+
if a.mutation_exercised:
|
|
46
|
+
lines.append(
|
|
47
|
+
f"本报告由 **BugX 智能自主安全审计引擎** 依据本轮**实际执行**的验证动作出具。"
|
|
48
|
+
f"审计范围:**{b.assessment_scope}**。"
|
|
49
|
+
f"实际覆盖 **{m.total_surfaces:,}** 个攻击暴露面,执行 **{m.total_probes:,}** 次攻防探测。"
|
|
50
|
+
)
|
|
51
|
+
lines.append(
|
|
52
|
+
f"本次击杀 **{m.total_killed:,}** 处变异缺陷,**综合击杀率 {m.overall_kill_rate * 100:.2f}%**,"
|
|
53
|
+
f"评级 **{m.rating}**;负对照基准放行率 **{m.negative_control_pass_rate * 100:.2f}%**。"
|
|
54
|
+
)
|
|
55
|
+
else:
|
|
56
|
+
# 变异未实测时,任何击杀率/评级数字都只描述夹具,不是对本项目的
|
|
57
|
+
# 结论——摘要里连数字一起撤掉,否则「97.35% ELITE」照样会被引用。
|
|
58
|
+
# 但负对照/假阳性是另一回事:它们按逐条 verification 记录实测,
|
|
59
|
+
# 不能因为没跑变异就连带说成「未测量」。
|
|
60
|
+
nc_measured = a.negative_control_verdict() == attestation.PASS
|
|
61
|
+
lines.append(
|
|
62
|
+
f"本报告由 **BugX 智能自主安全审计引擎** 出具。"
|
|
63
|
+
f"审计范围:**{b.assessment_scope}**。"
|
|
64
|
+
f"**本轮未执行对抗性变异攻击:变异击杀率与评级均未测量**"
|
|
65
|
+
+ (
|
|
66
|
+
f";负对照与假阳性率按逐条验证记录实测。"
|
|
67
|
+
if nc_measured
|
|
68
|
+
else ";负对照放行率亦未测量。"
|
|
69
|
+
)
|
|
70
|
+
)
|
|
71
|
+
if not a.findings_present:
|
|
72
|
+
lines.append("")
|
|
73
|
+
lines.append(
|
|
74
|
+
"> ⚠️ **本轮没有任何已裁决缺陷。** 「零发现」只说明本轮验证范围内未发现缺陷,"
|
|
75
|
+
"既不等于「零风险」,也不构成「零假阳性裁决通过」——不存在裁决对象。"
|
|
76
|
+
)
|
|
77
|
+
lines.append("")
|
|
78
|
+
|
|
79
|
+
# Executive Metrics Table:每一行的判定词都来自实测,未实测一律
|
|
80
|
+
# NOT-EXERCISED,不得为了好看写 PASS/ZERO FP(历史缺陷 BUGX-AUDIT#1)。
|
|
81
|
+
lines.append("| 核心安全评估指标 | 审计测量数值 | 业界基准基线 | 状态判定 |")
|
|
82
|
+
lines.append("| :--- | :--- | :--- | :--- |")
|
|
83
|
+
lines.append(
|
|
84
|
+
f"| 评估资产靶标总数 | **{m.total_targets} 个靶标** | >= {attestation.TARGET_BASELINE} 个开源项目 | "
|
|
85
|
+
f"`{a.target_verdict(m.total_targets)}` |"
|
|
86
|
+
)
|
|
87
|
+
lines.append(
|
|
88
|
+
f"| 控制流暴露面总量 | **{m.total_surfaces:,} Surfaces** | 深度广域全覆盖 | "
|
|
89
|
+
f"`{a.surface_coverage_verdict(m.total_surfaces)}` |"
|
|
90
|
+
)
|
|
91
|
+
# 未实测的指标连数字都不呈现:写「97.35%(NOT-EXERCISED)」仍然会被
|
|
92
|
+
# 截屏引用成「击杀率 97%」,而它描述的是演示夹具而不是本项目。
|
|
93
|
+
kill_cell = (
|
|
94
|
+
f"{m.overall_kill_rate * 100:.2f}%" if a.mutation_exercised else "未测量"
|
|
95
|
+
)
|
|
96
|
+
fp_cell = (
|
|
97
|
+
f"{m.false_positive_rate:.2f}%" if a.false_positive_verdict() == attestation.PASS
|
|
98
|
+
else "未测量"
|
|
99
|
+
)
|
|
100
|
+
nc_cell = (
|
|
101
|
+
f"{m.negative_control_pass_rate * 100:.2f}%"
|
|
102
|
+
if a.negative_control_verdict() == attestation.PASS else "未测量"
|
|
103
|
+
)
|
|
104
|
+
lines.append(
|
|
105
|
+
f"| 恶意变异击杀率 | **{kill_cell}** | "
|
|
106
|
+
f">= {attestation.KILL_RATE_BASELINE * 100:.2f}% [ELITE] | "
|
|
107
|
+
f"`{a.kill_rate_verdict(m.overall_kill_rate)}` |"
|
|
108
|
+
)
|
|
109
|
+
lines.append(
|
|
110
|
+
f"| 假阳性误报率 (FP) | **{fp_cell}** | "
|
|
111
|
+
f"<= {attestation.FALSE_POSITIVE_BASELINE:.2f}% (容忍限) | "
|
|
112
|
+
f"`{a.false_positive_verdict()}` |"
|
|
113
|
+
)
|
|
114
|
+
lines.append(
|
|
115
|
+
f"| 负对照基准放行率 | **{nc_cell}** | 100.00% (标准) | "
|
|
116
|
+
f"`{a.negative_control_verdict()}` |"
|
|
117
|
+
)
|
|
118
|
+
# 「100% 具备可复现 PoC」曾是无条件硬编码:没有 PoC 的发现也会被算进去。
|
|
119
|
+
# 这里按实测计数,分子分母都来自 findings 本身。
|
|
120
|
+
poc_covered = sum(1 for f in b.findings if f.exploit_poc.strip())
|
|
121
|
+
finding_cell = (
|
|
122
|
+
f"**{m.total_findings} 项 (含 {m.critical_count} 严重 / {m.high_count} 高危)**"
|
|
123
|
+
f",{poc_covered} 条附复现命令"
|
|
124
|
+
if m.total_findings else "**0 项**"
|
|
125
|
+
)
|
|
126
|
+
lines.append(
|
|
127
|
+
f"| 确认已验证漏洞数 | {finding_cell} | "
|
|
128
|
+
f"{'全部附可复现证据' if m.total_findings and poc_covered == m.total_findings else '存在未附复现证据的发现'} | "
|
|
129
|
+
f"`{'ACTION REQUIRED' if m.total_findings else 'NONE REPORTED'}` |"
|
|
130
|
+
)
|
|
131
|
+
lines.append("")
|
|
132
|
+
|
|
133
|
+
lines.append("## 2. 审计范围与多语言资产清单 (Assessment Scope)")
|
|
134
|
+
lines.append("")
|
|
135
|
+
if not b.languages:
|
|
136
|
+
lines.append("本轮无多语言变异收据可列,故无生态语言清单。**这不构成已审计结论。**")
|
|
137
|
+
lines.append("")
|
|
138
|
+
lines.append("| 生态语言 | 覆盖类别数 | 控制流暴露面 | 探测攻击数 | 变异击杀数 | 击杀率 | 评级 |")
|
|
139
|
+
lines.append("| :--- | :---: | :---: | :---: | :---: | :---: | :---: |")
|
|
140
|
+
for lang in b.languages:
|
|
141
|
+
# 变异未实测的语言行不能写 "0.00%": 读者会把它读成「击杀率为零」,
|
|
142
|
+
# 而事实是「没测」。未实测就用文字,实测才给数字。
|
|
143
|
+
exercised = a.mutation_exercised and lang.total_mutations > 0
|
|
144
|
+
kill_cell = f"**{lang.kill_rate * 100:.2f}%**" if exercised else "未测量"
|
|
145
|
+
killed_cell = f"{lang.total_killed:,}" if exercised else "未测量"
|
|
146
|
+
rating_cell = lang.rating if exercised else attestation.NOT_EXERCISED
|
|
147
|
+
lines.append(
|
|
148
|
+
f"| **{lang.language}** | {lang.categories_count} 类别 | {lang.total_surfaces:,} | "
|
|
149
|
+
f"{lang.total_probes:,} | {killed_cell} | {kill_cell} | `{rating_cell}` |"
|
|
150
|
+
)
|
|
151
|
+
lines.append("")
|
|
152
|
+
|
|
153
|
+
lines.append("## 3. 威胁全景与漏洞严重性分布 (Threat Landscape & CVSS Heatmap)")
|
|
154
|
+
lines.append("")
|
|
155
|
+
lines.append(f"- **Critical (严重 9.0-10.0)**: **{m.critical_count}** 项 — 立即进入 24 小时应急阻断")
|
|
156
|
+
lines.append(f"- **High (高危 7.0-8.9)**: **{m.high_count}** 项 — 72 小时内发布修复补丁")
|
|
157
|
+
lines.append(f"- **Medium (中危 4.0-6.9)**: **{m.medium_count}** 项 — 纳入下一迭代敏捷交付")
|
|
158
|
+
lines.append(f"- **Low (低危 0.1-3.9)**: **{m.low_count}** 项 — 持续监控与代码加固")
|
|
159
|
+
lines.append("")
|
|
160
|
+
if not a.findings_present:
|
|
161
|
+
lines.append("> 本节数值全为 0:本轮没有任何已裁决缺陷,不存在可展示的威胁分布。")
|
|
162
|
+
lines.append("")
|
|
163
|
+
|
|
164
|
+
lines.append("## 4. 已裁决缺陷账本 (Verified Findings Ledger)")
|
|
165
|
+
lines.append("")
|
|
166
|
+
if not a.findings_present:
|
|
167
|
+
lines.append("本轮无已裁决缺陷。**这不构成「安全」结论**:请在审计范围章节核对覆盖边界。")
|
|
168
|
+
lines.append("")
|
|
169
|
+
for f in b.findings:
|
|
170
|
+
lines.append(f"### 📍 [{f.severity}] {f.cve_display} ({f.id}): {f.title}")
|
|
171
|
+
lines.append(f"- **受影响组件 / 生态**: `{f.package_name}` ({f.ecosystem})")
|
|
172
|
+
cwe = f"- **缺陷分类**: `{f.cwe_id}` - {f.cwe_title}" if f.cwe_id else "- **缺陷分类**: 未映射 CWE(源码级逻辑缺陷)"
|
|
173
|
+
lines.append(cwe)
|
|
174
|
+
lines.append(f"- **CVSS v3.1 评分**: **{f.cvss_display}** (`{f.cvss_vector_display}`)")
|
|
175
|
+
lines.append(f"- **处置 SLA 响应周期**: **<{f.sla_hours} 小时**")
|
|
176
|
+
lines.append(f"- **漏洞物理路径**: `{f.target_path or '未记录'}`")
|
|
177
|
+
lines.append(f"- **简要描述**: {f.description or '未记录根因描述'}")
|
|
178
|
+
lines.append("")
|
|
179
|
+
lines.append("#### ⚔️ 独立可复现 PoC 载荷:")
|
|
180
|
+
lines.append("```python")
|
|
181
|
+
lines.append(f.poc_display)
|
|
182
|
+
lines.append("```")
|
|
183
|
+
lines.append("")
|
|
184
|
+
lines.append("#### 🛡️ 建议修复(未验证,未落盘):")
|
|
185
|
+
lines.append("```diff")
|
|
186
|
+
lines.append(f.patch_display)
|
|
187
|
+
lines.append("```")
|
|
188
|
+
lines.append("")
|
|
189
|
+
|
|
190
|
+
lines.append("## 5. 合规性与企业标准对齐 (Compliance & Regulatory Attestation)")
|
|
191
|
+
lines.append("")
|
|
192
|
+
for note in b.compliance_notes:
|
|
193
|
+
lines.append(f"- 📌 {note}")
|
|
194
|
+
lines.append("")
|
|
195
|
+
|
|
196
|
+
lines.append("## 6. 安全整改路线图与治理 SLA (Remediation Roadmap)")
|
|
197
|
+
lines.append("")
|
|
198
|
+
lines.append("| 阶段 / 优先级 | 治理行动计划 | 涉及组件范围 | 响应时限 (SLA) |")
|
|
199
|
+
lines.append("| :--- | :--- | :--- | :--- |")
|
|
200
|
+
for r in b.remediation_roadmap:
|
|
201
|
+
lines.append(f"| **{r['priority']}** | {r['action']} | `{r['scope']}` | **{r['phase']}** |")
|
|
202
|
+
lines.append("")
|
|
203
|
+
|
|
204
|
+
lines.append("## 7. 权威签名与防伪声明 (Formal Attestation & Sign-off)")
|
|
205
|
+
lines.append("")
|
|
206
|
+
lines.append("```text")
|
|
207
|
+
lines.append("================================================================================")
|
|
208
|
+
# 只有真正满足会签条件时才允许写 CERTIFIED BY;否则只声明出具方。
|
|
209
|
+
if a.countersigned:
|
|
210
|
+
lines.append(f" CERTIFIED BY: {b.auditor}")
|
|
211
|
+
else:
|
|
212
|
+
lines.append(f" ISSUED BY : {b.auditor}")
|
|
213
|
+
lines.append(f" SEAL HASH : {b.sha256_seal}")
|
|
214
|
+
lines.append(f" DATE ISSUED : {b.created_at}")
|
|
215
|
+
lines.append(f" STATUS : {a.status_line}")
|
|
216
|
+
lines.append("================================================================================")
|
|
217
|
+
lines.append("```")
|
|
218
|
+
for blocker in a.gate_blockers:
|
|
219
|
+
lines.append(f"> 🚫 未会签原因: {blocker}")
|
|
220
|
+
|
|
221
|
+
return "\n".join(lines)
|
|
222
|
+
|
|
223
|
+
def render_html(self) -> str:
|
|
224
|
+
"""渲染具备国际商务级设计水准、支持高精度 PDF 打印的 HTML 报告。"""
|
|
225
|
+
b = self.bundle
|
|
226
|
+
m = b.metrics
|
|
227
|
+
a = attestation.from_bundle(b)
|
|
228
|
+
|
|
229
|
+
# Generate findings HTML rows
|
|
230
|
+
findings_html = []
|
|
231
|
+
for f in b.findings:
|
|
232
|
+
sev_badge_color = (
|
|
233
|
+
"#dc2626" if f.severity == "CRITICAL"
|
|
234
|
+
else ("#d97706" if f.severity == "HIGH"
|
|
235
|
+
else ("#2563eb" if f.severity == "MEDIUM" else "#64748b"))
|
|
236
|
+
)
|
|
237
|
+
poc_escaped = html.escape(f.poc_display)
|
|
238
|
+
diff_escaped = html.escape(f.patch_display)
|
|
239
|
+
cwe_cell = (
|
|
240
|
+
f"<code>{html.escape(f.cwe_id)}</code> - {html.escape(f.cwe_title)}"
|
|
241
|
+
if f.cwe_id else "未映射 CWE(源码级逻辑缺陷)"
|
|
242
|
+
)
|
|
243
|
+
|
|
244
|
+
findings_html.append(f"""
|
|
245
|
+
<div class="finding-card">
|
|
246
|
+
<div class="finding-header">
|
|
247
|
+
<div class="finding-title-group">
|
|
248
|
+
<span class="badge" style="background-color: {sev_badge_color}; color: #ffffff;">{f.severity}</span>
|
|
249
|
+
<span class="finding-id">{html.escape(f.cve_display)}</span>
|
|
250
|
+
<span class="finding-ghsa">({html.escape(f.id)})</span>
|
|
251
|
+
<h4 class="finding-title">{html.escape(f.title)}</h4>
|
|
252
|
+
</div>
|
|
253
|
+
<div class="cvss-pill">
|
|
254
|
+
<span class="cvss-label">CVSS v3.1</span>
|
|
255
|
+
<span class="cvss-value" style="color: {sev_badge_color};">{f.cvss_display}</span>
|
|
256
|
+
</div>
|
|
257
|
+
</div>
|
|
258
|
+
|
|
259
|
+
<div class="finding-meta-grid">
|
|
260
|
+
<div><strong>Affected Component:</strong> <code>{html.escape(f.package_name)}</code> ({html.escape(f.ecosystem)})</div>
|
|
261
|
+
<div><strong>CWE Classification:</strong> {cwe_cell}</div>
|
|
262
|
+
<div><strong>Target Location:</strong> <code>{html.escape(f.target_path or '未记录')}</code></div>
|
|
263
|
+
<div><strong>Remediation SLA:</strong> <span class="sla-tag">< {f.sla_hours}h</span></div>
|
|
264
|
+
</div>
|
|
265
|
+
|
|
266
|
+
<p class="finding-desc">{html.escape(f.description or '未记录根因描述')}</p>
|
|
267
|
+
|
|
268
|
+
<div class="code-duel-grid">
|
|
269
|
+
<div class="code-box red-box">
|
|
270
|
+
<div class="code-box-title">⚔️ Verified Exploit PoC Payload</div>
|
|
271
|
+
<pre><code>{poc_escaped}</code></pre>
|
|
272
|
+
</div>
|
|
273
|
+
<div class="code-box green-box">
|
|
274
|
+
<div class="code-box-title">🛡️ 建议修复(未验证,未落盘)</div>
|
|
275
|
+
<pre><code>{diff_escaped}</code></pre>
|
|
276
|
+
</div>
|
|
277
|
+
</div>
|
|
278
|
+
</div>
|
|
279
|
+
""")
|
|
280
|
+
if not findings_html:
|
|
281
|
+
findings_html.append(
|
|
282
|
+
'<div class="finding-card"><p class="finding-desc">'
|
|
283
|
+
'本轮无已裁决缺陷。这不构成「安全」结论,请核对审计范围与门禁状态。'
|
|
284
|
+
'</p></div>'
|
|
285
|
+
)
|
|
286
|
+
|
|
287
|
+
# Generate languages rows
|
|
288
|
+
lang_rows = []
|
|
289
|
+
for l in b.languages:
|
|
290
|
+
exercised = a.mutation_exercised and l.total_mutations > 0
|
|
291
|
+
html_kill = f"{l.kill_rate * 100:.2f}%" if exercised else "未测量"
|
|
292
|
+
html_rating = html.escape(l.rating if exercised else attestation.NOT_EXERCISED)
|
|
293
|
+
lang_rows.append(f"""
|
|
294
|
+
<tr>
|
|
295
|
+
<td><strong>{l.language}</strong></td>
|
|
296
|
+
<td style="text-align: center;">{l.categories_count}</td>
|
|
297
|
+
<td style="text-align: right; font-family: monospace;">{l.total_surfaces:,}</td>
|
|
298
|
+
<td style="text-align: right; font-family: monospace;">{l.total_probes:,}</td>
|
|
299
|
+
<td style="text-align: right; font-family: monospace;">{l.total_killed:,}</td>
|
|
300
|
+
<td style="text-align: right; font-weight: 700; color: #059669;">{html_kill}</td>
|
|
301
|
+
<td style="text-align: center;"><span class="badge badge-elite">{html_rating}</span></td>
|
|
302
|
+
</tr>
|
|
303
|
+
""")
|
|
304
|
+
|
|
305
|
+
# Generate roadmap rows
|
|
306
|
+
roadmap_rows = []
|
|
307
|
+
for r in b.remediation_roadmap:
|
|
308
|
+
roadmap_rows.append(f"""
|
|
309
|
+
<tr>
|
|
310
|
+
<td><span class="priority-pill">{r['priority']}</span></td>
|
|
311
|
+
<td><strong>{html.escape(r['action'])}</strong></td>
|
|
312
|
+
<td><code>{html.escape(r['scope'])}</code></td>
|
|
313
|
+
<td><strong>{html.escape(r['phase'])}</strong></td>
|
|
314
|
+
</tr>
|
|
315
|
+
""")
|
|
316
|
+
|
|
317
|
+
# Generate compliance notes
|
|
318
|
+
# 合规条目按中性项目符号呈现:零发现/未实测的说明不能被渲染成
|
|
319
|
+
# 「✓ 通过」(历史缺陷把「本轮无发现」配上对勾,读者只会看到绿色)。
|
|
320
|
+
compliance_li = "".join(
|
|
321
|
+
[f"<li><span class='check-icon'>•</span> {html.escape(c)}</li>" for c in b.compliance_notes]
|
|
322
|
+
)
|
|
323
|
+
|
|
324
|
+
template = f"""<!DOCTYPE html>
|
|
325
|
+
<html lang="zh-CN">
|
|
326
|
+
<head>
|
|
327
|
+
<meta charset="UTF-8">
|
|
328
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
329
|
+
<title>{html.escape(b.title)}</title>
|
|
330
|
+
<style>
|
|
331
|
+
:root {{
|
|
332
|
+
--bg-page: #f8fafc;
|
|
333
|
+
--bg-card: #ffffff;
|
|
334
|
+
--text-main: #0f172a;
|
|
335
|
+
--text-muted: #64748b;
|
|
336
|
+
--border-light: #e2e8f0;
|
|
337
|
+
--border-dark: #cbd5e1;
|
|
338
|
+
--primary-blue: #1e3a8a;
|
|
339
|
+
--accent-blue: #2563eb;
|
|
340
|
+
--risk-critical: #dc2626;
|
|
341
|
+
--risk-high: #d97706;
|
|
342
|
+
--risk-medium: #2563eb;
|
|
343
|
+
--risk-low: #64748b;
|
|
344
|
+
--risk-safe: #059669;
|
|
345
|
+
--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
346
|
+
--font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
347
|
+
}}
|
|
348
|
+
|
|
349
|
+
* {{
|
|
350
|
+
box-sizing: border-box;
|
|
351
|
+
margin: 0;
|
|
352
|
+
padding: 0;
|
|
353
|
+
}}
|
|
354
|
+
|
|
355
|
+
body {{
|
|
356
|
+
background-color: var(--bg-page);
|
|
357
|
+
color: var(--text-main);
|
|
358
|
+
font-family: var(--font-sans);
|
|
359
|
+
line-height: 1.6;
|
|
360
|
+
-webkit-font-smoothing: antialiased;
|
|
361
|
+
padding: 40px 20px;
|
|
362
|
+
}}
|
|
363
|
+
|
|
364
|
+
.container {{
|
|
365
|
+
max-width: 1100px;
|
|
366
|
+
margin: 0 auto;
|
|
367
|
+
background: var(--bg-card);
|
|
368
|
+
border: 1px solid var(--border-light);
|
|
369
|
+
border-radius: 12px;
|
|
370
|
+
box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.08);
|
|
371
|
+
overflow: hidden;
|
|
372
|
+
}}
|
|
373
|
+
|
|
374
|
+
/* Formal Document Header */
|
|
375
|
+
.doc-header {{
|
|
376
|
+
background: #0f172a;
|
|
377
|
+
color: #ffffff;
|
|
378
|
+
padding: 36px 48px;
|
|
379
|
+
border-bottom: 4px solid var(--accent-blue);
|
|
380
|
+
}}
|
|
381
|
+
|
|
382
|
+
.doc-classification {{
|
|
383
|
+
display: inline-block;
|
|
384
|
+
font-size: 11px;
|
|
385
|
+
font-weight: 800;
|
|
386
|
+
letter-spacing: 1.5px;
|
|
387
|
+
text-transform: uppercase;
|
|
388
|
+
padding: 4px 10px;
|
|
389
|
+
background: rgba(220, 38, 38, 0.2);
|
|
390
|
+
color: #fca5a5;
|
|
391
|
+
border: 1px solid rgba(220, 38, 38, 0.4);
|
|
392
|
+
border-radius: 4px;
|
|
393
|
+
margin-bottom: 12px;
|
|
394
|
+
}}
|
|
395
|
+
|
|
396
|
+
.doc-title {{
|
|
397
|
+
font-size: 26px;
|
|
398
|
+
font-weight: 700;
|
|
399
|
+
line-height: 1.3;
|
|
400
|
+
letter-spacing: -0.5px;
|
|
401
|
+
margin-bottom: 16px;
|
|
402
|
+
}}
|
|
403
|
+
|
|
404
|
+
.doc-meta-bar {{
|
|
405
|
+
display: flex;
|
|
406
|
+
flex-wrap: wrap;
|
|
407
|
+
gap: 24px;
|
|
408
|
+
font-size: 13px;
|
|
409
|
+
color: #94a3b8;
|
|
410
|
+
border-top: 1px solid rgba(255, 255, 255, 0.1);
|
|
411
|
+
padding-top: 16px;
|
|
412
|
+
}}
|
|
413
|
+
|
|
414
|
+
.doc-meta-bar strong {{
|
|
415
|
+
color: #f1f5f9;
|
|
416
|
+
}}
|
|
417
|
+
|
|
418
|
+
/* Section Layout */
|
|
419
|
+
.content-body {{
|
|
420
|
+
padding: 40px 48px;
|
|
421
|
+
}}
|
|
422
|
+
|
|
423
|
+
.section {{
|
|
424
|
+
margin-bottom: 48px;
|
|
425
|
+
}}
|
|
426
|
+
|
|
427
|
+
.section-title {{
|
|
428
|
+
font-size: 20px;
|
|
429
|
+
font-weight: 700;
|
|
430
|
+
color: #0f172a;
|
|
431
|
+
border-bottom: 2px solid var(--border-light);
|
|
432
|
+
padding-bottom: 8px;
|
|
433
|
+
margin-bottom: 20px;
|
|
434
|
+
display: flex;
|
|
435
|
+
align-items: center;
|
|
436
|
+
gap: 8px;
|
|
437
|
+
}}
|
|
438
|
+
|
|
439
|
+
.lead-text {{
|
|
440
|
+
font-size: 15px;
|
|
441
|
+
color: #334155;
|
|
442
|
+
line-height: 1.7;
|
|
443
|
+
margin-bottom: 24px;
|
|
444
|
+
}}
|
|
445
|
+
|
|
446
|
+
/* KPI Callout Grid */
|
|
447
|
+
.kpi-grid {{
|
|
448
|
+
display: grid;
|
|
449
|
+
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
|
|
450
|
+
gap: 16px;
|
|
451
|
+
margin-bottom: 28px;
|
|
452
|
+
}}
|
|
453
|
+
|
|
454
|
+
.kpi-card {{
|
|
455
|
+
background: #f8fafc;
|
|
456
|
+
border: 1px solid var(--border-light);
|
|
457
|
+
border-radius: 8px;
|
|
458
|
+
padding: 20px;
|
|
459
|
+
border-left: 4px solid var(--accent-blue);
|
|
460
|
+
}}
|
|
461
|
+
|
|
462
|
+
.kpi-card.kpi-emerald {{
|
|
463
|
+
border-left-color: var(--risk-safe);
|
|
464
|
+
}}
|
|
465
|
+
|
|
466
|
+
.kpi-card.kpi-crimson {{
|
|
467
|
+
border-left-color: var(--risk-critical);
|
|
468
|
+
}}
|
|
469
|
+
|
|
470
|
+
.kpi-label {{
|
|
471
|
+
font-size: 12px;
|
|
472
|
+
font-weight: 600;
|
|
473
|
+
text-transform: uppercase;
|
|
474
|
+
letter-spacing: 0.5px;
|
|
475
|
+
color: var(--text-muted);
|
|
476
|
+
margin-bottom: 6px;
|
|
477
|
+
}}
|
|
478
|
+
|
|
479
|
+
.kpi-value {{
|
|
480
|
+
font-size: 28px;
|
|
481
|
+
font-weight: 800;
|
|
482
|
+
font-family: var(--font-mono);
|
|
483
|
+
color: var(--text-main);
|
|
484
|
+
}}
|
|
485
|
+
|
|
486
|
+
.kpi-subtext {{
|
|
487
|
+
font-size: 12px;
|
|
488
|
+
color: #64748b;
|
|
489
|
+
margin-top: 4px;
|
|
490
|
+
}}
|
|
491
|
+
|
|
492
|
+
/* Formal Tables */
|
|
493
|
+
table {{
|
|
494
|
+
width: 100%;
|
|
495
|
+
border-collapse: collapse;
|
|
496
|
+
font-size: 14px;
|
|
497
|
+
margin-bottom: 20px;
|
|
498
|
+
}}
|
|
499
|
+
|
|
500
|
+
th {{
|
|
501
|
+
background: #f1f5f9;
|
|
502
|
+
color: #334155;
|
|
503
|
+
font-weight: 600;
|
|
504
|
+
text-align: left;
|
|
505
|
+
padding: 12px 14px;
|
|
506
|
+
border-bottom: 2px solid var(--border-dark);
|
|
507
|
+
font-size: 13px;
|
|
508
|
+
}}
|
|
509
|
+
|
|
510
|
+
td {{
|
|
511
|
+
padding: 12px 14px;
|
|
512
|
+
border-bottom: 1px solid var(--border-light);
|
|
513
|
+
color: #1e293b;
|
|
514
|
+
}}
|
|
515
|
+
|
|
516
|
+
tr:hover td {{
|
|
517
|
+
background: #f8fafc;
|
|
518
|
+
}}
|
|
519
|
+
|
|
520
|
+
/* Badges */
|
|
521
|
+
.badge {{
|
|
522
|
+
display: inline-block;
|
|
523
|
+
font-size: 11px;
|
|
524
|
+
font-weight: 700;
|
|
525
|
+
padding: 2px 8px;
|
|
526
|
+
border-radius: 4px;
|
|
527
|
+
text-transform: uppercase;
|
|
528
|
+
}}
|
|
529
|
+
|
|
530
|
+
.badge-elite {{
|
|
531
|
+
background: #dcfce7;
|
|
532
|
+
color: #15803d;
|
|
533
|
+
border: 1px solid #bbf7d0;
|
|
534
|
+
}}
|
|
535
|
+
|
|
536
|
+
.priority-pill {{
|
|
537
|
+
font-size: 11px;
|
|
538
|
+
font-weight: 700;
|
|
539
|
+
padding: 3px 8px;
|
|
540
|
+
background: #fee2e2;
|
|
541
|
+
color: #b91c1c;
|
|
542
|
+
border-radius: 4px;
|
|
543
|
+
}}
|
|
544
|
+
|
|
545
|
+
.sla-tag {{
|
|
546
|
+
font-weight: 700;
|
|
547
|
+
color: #dc2626;
|
|
548
|
+
background: #fef2f2;
|
|
549
|
+
padding: 2px 6px;
|
|
550
|
+
border-radius: 4px;
|
|
551
|
+
font-size: 12px;
|
|
552
|
+
}}
|
|
553
|
+
|
|
554
|
+
/* Finding Card */
|
|
555
|
+
.finding-card {{
|
|
556
|
+
border: 1px solid var(--border-light);
|
|
557
|
+
border-radius: 8px;
|
|
558
|
+
padding: 24px;
|
|
559
|
+
margin-bottom: 24px;
|
|
560
|
+
background: #ffffff;
|
|
561
|
+
box-shadow: 0 1px 3px rgba(0,0,0,0.04);
|
|
562
|
+
}}
|
|
563
|
+
|
|
564
|
+
.finding-header {{
|
|
565
|
+
display: flex;
|
|
566
|
+
justify-content: space-between;
|
|
567
|
+
align-items: flex-start;
|
|
568
|
+
margin-bottom: 14px;
|
|
569
|
+
}}
|
|
570
|
+
|
|
571
|
+
.finding-title-group {{
|
|
572
|
+
display: flex;
|
|
573
|
+
align-items: center;
|
|
574
|
+
flex-wrap: wrap;
|
|
575
|
+
gap: 8px;
|
|
576
|
+
}}
|
|
577
|
+
|
|
578
|
+
.finding-id {{
|
|
579
|
+
font-family: var(--font-mono);
|
|
580
|
+
font-weight: 700;
|
|
581
|
+
color: #1e293b;
|
|
582
|
+
}}
|
|
583
|
+
|
|
584
|
+
.finding-ghsa {{
|
|
585
|
+
font-size: 12px;
|
|
586
|
+
color: #64748b;
|
|
587
|
+
}}
|
|
588
|
+
|
|
589
|
+
.finding-title {{
|
|
590
|
+
font-size: 16px;
|
|
591
|
+
font-weight: 700;
|
|
592
|
+
color: #0f172a;
|
|
593
|
+
margin-left: 4px;
|
|
594
|
+
}}
|
|
595
|
+
|
|
596
|
+
.cvss-pill {{
|
|
597
|
+
text-align: right;
|
|
598
|
+
}}
|
|
599
|
+
|
|
600
|
+
.cvss-label {{
|
|
601
|
+
display: block;
|
|
602
|
+
font-size: 10px;
|
|
603
|
+
font-weight: 700;
|
|
604
|
+
text-transform: uppercase;
|
|
605
|
+
color: #64748b;
|
|
606
|
+
}}
|
|
607
|
+
|
|
608
|
+
.cvss-value {{
|
|
609
|
+
font-size: 20px;
|
|
610
|
+
font-weight: 800;
|
|
611
|
+
font-family: var(--font-mono);
|
|
612
|
+
}}
|
|
613
|
+
|
|
614
|
+
.finding-meta-grid {{
|
|
615
|
+
display: grid;
|
|
616
|
+
grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
|
|
617
|
+
gap: 10px;
|
|
618
|
+
background: #f8fafc;
|
|
619
|
+
padding: 12px 16px;
|
|
620
|
+
border-radius: 6px;
|
|
621
|
+
font-size: 13px;
|
|
622
|
+
margin-bottom: 14px;
|
|
623
|
+
border: 1px solid var(--border-light);
|
|
624
|
+
}}
|
|
625
|
+
|
|
626
|
+
.finding-desc {{
|
|
627
|
+
font-size: 14px;
|
|
628
|
+
color: #334155;
|
|
629
|
+
margin-bottom: 16px;
|
|
630
|
+
}}
|
|
631
|
+
|
|
632
|
+
/* Code Duel Box */
|
|
633
|
+
.code-duel-grid {{
|
|
634
|
+
display: grid;
|
|
635
|
+
grid-template-columns: 1fr 1fr;
|
|
636
|
+
gap: 14px;
|
|
637
|
+
}}
|
|
638
|
+
|
|
639
|
+
.code-box {{
|
|
640
|
+
border-radius: 6px;
|
|
641
|
+
overflow: hidden;
|
|
642
|
+
font-size: 12px;
|
|
643
|
+
border: 1px solid var(--border-light);
|
|
644
|
+
}}
|
|
645
|
+
|
|
646
|
+
.code-box-title {{
|
|
647
|
+
font-size: 12px;
|
|
648
|
+
font-weight: 700;
|
|
649
|
+
padding: 8px 12px;
|
|
650
|
+
border-bottom: 1px solid var(--border-light);
|
|
651
|
+
}}
|
|
652
|
+
|
|
653
|
+
.red-box .code-box-title {{
|
|
654
|
+
background: #fee2e2;
|
|
655
|
+
color: #991b1b;
|
|
656
|
+
}}
|
|
657
|
+
|
|
658
|
+
.green-box .code-box-title {{
|
|
659
|
+
background: #dcfce7;
|
|
660
|
+
color: #166534;
|
|
661
|
+
}}
|
|
662
|
+
|
|
663
|
+
.code-box pre {{
|
|
664
|
+
padding: 12px;
|
|
665
|
+
background: #0f172a;
|
|
666
|
+
color: #f8fafc;
|
|
667
|
+
overflow-x: auto;
|
|
668
|
+
font-family: var(--font-mono);
|
|
669
|
+
line-height: 1.4;
|
|
670
|
+
max-height: 220px;
|
|
671
|
+
}}
|
|
672
|
+
|
|
673
|
+
/* Compliance List */
|
|
674
|
+
.compliance-list {{
|
|
675
|
+
list-style: none;
|
|
676
|
+
}}
|
|
677
|
+
|
|
678
|
+
.compliance-list li {{
|
|
679
|
+
padding: 10px 14px;
|
|
680
|
+
background: #f8fafc;
|
|
681
|
+
border: 1px solid var(--border-light);
|
|
682
|
+
border-radius: 6px;
|
|
683
|
+
margin-bottom: 8px;
|
|
684
|
+
font-size: 14px;
|
|
685
|
+
display: flex;
|
|
686
|
+
align-items: center;
|
|
687
|
+
gap: 10px;
|
|
688
|
+
}}
|
|
689
|
+
|
|
690
|
+
.check-icon {{
|
|
691
|
+
color: #059669;
|
|
692
|
+
font-weight: 800;
|
|
693
|
+
}}
|
|
694
|
+
|
|
695
|
+
/* Seal & Signature Box */
|
|
696
|
+
.seal-box {{
|
|
697
|
+
background: #f8fafc;
|
|
698
|
+
border: 2px dashed #cbd5e1;
|
|
699
|
+
border-radius: 8px;
|
|
700
|
+
padding: 24px;
|
|
701
|
+
text-align: center;
|
|
702
|
+
margin-top: 40px;
|
|
703
|
+
}}
|
|
704
|
+
|
|
705
|
+
.seal-title {{
|
|
706
|
+
font-size: 14px;
|
|
707
|
+
font-weight: 800;
|
|
708
|
+
color: #0f172a;
|
|
709
|
+
letter-spacing: 1px;
|
|
710
|
+
text-transform: uppercase;
|
|
711
|
+
margin-bottom: 8px;
|
|
712
|
+
}}
|
|
713
|
+
|
|
714
|
+
.seal-hash {{
|
|
715
|
+
font-family: var(--font-mono);
|
|
716
|
+
font-size: 13px;
|
|
717
|
+
color: #2563eb;
|
|
718
|
+
word-break: break-all;
|
|
719
|
+
background: #eff6ff;
|
|
720
|
+
padding: 8px 12px;
|
|
721
|
+
border-radius: 4px;
|
|
722
|
+
display: inline-block;
|
|
723
|
+
margin-bottom: 12px;
|
|
724
|
+
}}
|
|
725
|
+
|
|
726
|
+
.seal-footer {{
|
|
727
|
+
font-size: 12px;
|
|
728
|
+
color: #64748b;
|
|
729
|
+
}}
|
|
730
|
+
|
|
731
|
+
/* Print Media */
|
|
732
|
+
@media print {{
|
|
733
|
+
body {{
|
|
734
|
+
background: #ffffff;
|
|
735
|
+
padding: 0;
|
|
736
|
+
}}
|
|
737
|
+
.container {{
|
|
738
|
+
box-shadow: none;
|
|
739
|
+
border: none;
|
|
740
|
+
max-width: 100%;
|
|
741
|
+
}}
|
|
742
|
+
.finding-card {{
|
|
743
|
+
page-break-inside: avoid;
|
|
744
|
+
}}
|
|
745
|
+
.code-box pre {{
|
|
746
|
+
background: #f1f5f9;
|
|
747
|
+
color: #0f172a;
|
|
748
|
+
border: 1px solid #cbd5e1;
|
|
749
|
+
}}
|
|
750
|
+
}}
|
|
751
|
+
|
|
752
|
+
@media (max-width: 768px) {{
|
|
753
|
+
.code-duel-grid {{
|
|
754
|
+
grid-template-columns: 1fr;
|
|
755
|
+
}}
|
|
756
|
+
.doc-header, .content-body {{
|
|
757
|
+
padding: 24px 20px;
|
|
758
|
+
}}
|
|
759
|
+
}}
|
|
760
|
+
</style>
|
|
761
|
+
</head>
|
|
762
|
+
<body>
|
|
763
|
+
<div class="container">
|
|
764
|
+
<!-- Document Header -->
|
|
765
|
+
<header class="doc-header">
|
|
766
|
+
<div class="doc-classification">CONFIDENTIAL // EXECUTIVE DISTRIBUTION ONLY</div>
|
|
767
|
+
<h1 class="doc-title">{html.escape(b.title)}</h1>
|
|
768
|
+
<div class="doc-meta-bar">
|
|
769
|
+
<div><strong>REPORT ID:</strong> {html.escape(b.report_id)}</div>
|
|
770
|
+
<div><strong>DATE:</strong> {html.escape(b.created_at)}</div>
|
|
771
|
+
<div><strong>EVALUATOR:</strong> {html.escape(b.auditor)}</div>
|
|
772
|
+
<div><strong>SCOPE:</strong> {html.escape(b.assessment_scope)}</div>
|
|
773
|
+
</div>
|
|
774
|
+
</header>
|
|
775
|
+
|
|
776
|
+
<main class="content-body">
|
|
777
|
+
<!-- Section 1: Executive Summary -->
|
|
778
|
+
<section class="section">
|
|
779
|
+
<h2 class="section-title">1. 执行高管摘要 (Executive Summary)</h2>
|
|
780
|
+
<p class="lead-text">
|
|
781
|
+
本报告由 <strong>BugX 智能自主安全审计引擎</strong> 依据本轮<strong>实际执行</strong>的验证动作出具。
|
|
782
|
+
审计范围:<strong>{html.escape(b.assessment_scope)}</strong>,
|
|
783
|
+
实测覆盖 <strong>{m.total_surfaces:,} 个控制流暴露表面</strong>、<strong>{m.total_targets} 个靶标</strong>。
|
|
784
|
+
{_html_summary_sentence(m, a)}
|
|
785
|
+
</p>
|
|
786
|
+
{_html_unattested_banner(a)}
|
|
787
|
+
|
|
788
|
+
<!-- KPI Grid -->
|
|
789
|
+
<div class="kpi-grid">
|
|
790
|
+
<div class="kpi-card">
|
|
791
|
+
<div class="kpi-label">Scouted Attack Surfaces</div>
|
|
792
|
+
<div class="kpi-value">{m.total_surfaces:,}</div>
|
|
793
|
+
<div class="kpi-subtext">Across {m.total_targets} Targets</div>
|
|
794
|
+
</div>
|
|
795
|
+
<div class="kpi-card kpi-emerald">
|
|
796
|
+
<div class="kpi-label">Mutation Kill Rate</div>
|
|
797
|
+
<div class="kpi-value">{a.kill_rate_cell(m.overall_kill_rate)}</div>
|
|
798
|
+
<div class="kpi-subtext">Rating: {m.rating if a.mutation_exercised else attestation.NOT_EXERCISED} (Threshold ≥ {attestation.KILL_RATE_BASELINE * 100:.0f}%)</div>
|
|
799
|
+
</div>
|
|
800
|
+
<div class="kpi-card kpi-emerald">
|
|
801
|
+
<div class="kpi-label">False Positive Rate</div>
|
|
802
|
+
<div class="kpi-value">{a.false_positive_verdict()}</div>
|
|
803
|
+
<div class="kpi-subtext">{'Negative control exercised' if a.negative_control_exercised else 'No negative control exercised'}</div>
|
|
804
|
+
</div>
|
|
805
|
+
<div class="kpi-card kpi-crimson">
|
|
806
|
+
<div class="kpi-label">Adjudicated Findings</div>
|
|
807
|
+
<div class="kpi-value">{m.total_findings}</div>
|
|
808
|
+
<div class="kpi-subtext">{m.critical_count} Critical / {m.high_count} High (PoC Ready)</div>
|
|
809
|
+
</div>
|
|
810
|
+
</div>
|
|
811
|
+
</section>
|
|
812
|
+
|
|
813
|
+
<!-- Section 2: Assessment Scope -->
|
|
814
|
+
<section class="section">
|
|
815
|
+
<h2 class="section-title">2. 审计范围与多语言资产清单 (Assessment Scope)</h2>
|
|
816
|
+
<table>
|
|
817
|
+
<thead>
|
|
818
|
+
<tr>
|
|
819
|
+
<th>Ecosystem / Language</th>
|
|
820
|
+
<th style="text-align: center;">Categories</th>
|
|
821
|
+
<th style="text-align: right;">Surfaces</th>
|
|
822
|
+
<th style="text-align: right;">Probes</th>
|
|
823
|
+
<th style="text-align: right;">Killed Mutations</th>
|
|
824
|
+
<th style="text-align: right;">Kill Rate</th>
|
|
825
|
+
<th style="text-align: center;">Grade</th>
|
|
826
|
+
</tr>
|
|
827
|
+
</thead>
|
|
828
|
+
<tbody>
|
|
829
|
+
{"".join(lang_rows) or '<tr><td colspan="7" style="text-align: center; color: #64748b;">本轮无多语言变异收据,未产出生态清单(不代表已审计)</td></tr>'}
|
|
830
|
+
</tbody>
|
|
831
|
+
</table>
|
|
832
|
+
</section>
|
|
833
|
+
|
|
834
|
+
<!-- Section 3: Verified Findings -->
|
|
835
|
+
<section class="section">
|
|
836
|
+
<h2 class="section-title">3. 已验证漏洞与 CVE 档案账本 (Verified Findings & PoC Ledger)</h2>
|
|
837
|
+
{"".join(findings_html)}
|
|
838
|
+
</section>
|
|
839
|
+
|
|
840
|
+
<!-- Section 4: Compliance -->
|
|
841
|
+
<section class="section">
|
|
842
|
+
<h2 class="section-title">4. 国际合规性与权威标准对齐 (Regulatory Attestation)</h2>
|
|
843
|
+
<ul class="compliance-list">
|
|
844
|
+
{compliance_li}
|
|
845
|
+
</ul>
|
|
846
|
+
</section>
|
|
847
|
+
|
|
848
|
+
<!-- Section 5: Remediation Roadmap -->
|
|
849
|
+
<section class="section">
|
|
850
|
+
<h2 class="section-title">5. 安全整改路线图与治理 SLA (Remediation Roadmap)</h2>
|
|
851
|
+
<table>
|
|
852
|
+
<thead>
|
|
853
|
+
<tr>
|
|
854
|
+
<th>Priority</th>
|
|
855
|
+
<th>Action Plan</th>
|
|
856
|
+
<th>Scope</th>
|
|
857
|
+
<th>Target SLA</th>
|
|
858
|
+
</tr>
|
|
859
|
+
</thead>
|
|
860
|
+
<tbody>
|
|
861
|
+
{"".join(roadmap_rows)}
|
|
862
|
+
</tbody>
|
|
863
|
+
</table>
|
|
864
|
+
</section>
|
|
865
|
+
|
|
866
|
+
<!-- Section 6: Cryptographic Seal -->
|
|
867
|
+
<div class="seal-box">
|
|
868
|
+
<div class="seal-title">{a.seal_title}</div>
|
|
869
|
+
<div class="seal-hash">SHA-256: {b.sha256_seal}</div>
|
|
870
|
+
<div class="seal-footer">
|
|
871
|
+
{html.escape(_seal_footer(b, a))}
|
|
872
|
+
</div>
|
|
873
|
+
</div>
|
|
874
|
+
</main>
|
|
875
|
+
</div>
|
|
876
|
+
</body>
|
|
877
|
+
</html>
|
|
878
|
+
"""
|
|
879
|
+
return template
|
|
880
|
+
|
|
881
|
+
|
|
882
|
+
def _html_summary_sentence(m: Any, a: attestation.Attestation) -> str:
|
|
883
|
+
"""执行摘要正文:只陈述实测事实,未实测的指标一律显式标注。"""
|
|
884
|
+
if m.total_mutations > 0:
|
|
885
|
+
return (
|
|
886
|
+
f"在 <strong>{m.total_mutations:,} 次对抗性变异攻击</strong> 中击杀 "
|
|
887
|
+
f"<strong>{m.total_killed:,} 处缺陷</strong>,综合击杀率 "
|
|
888
|
+
f"<strong>{m.overall_kill_rate * 100:.2f}%</strong>,评级 <strong>{m.rating}</strong>。"
|
|
889
|
+
)
|
|
890
|
+
return (
|
|
891
|
+
"<strong>本轮未执行对抗性变异攻击</strong>:变异击杀率未测量,"
|
|
892
|
+
f"评级记为 {attestation.NOT_EXERCISED};"
|
|
893
|
+
+ (
|
|
894
|
+
"假阳性率与负对照按逐条验证记录实测。"
|
|
895
|
+
if a.negative_control_verdict() == attestation.PASS
|
|
896
|
+
else "假阳性率与负对照放行率亦未测量。"
|
|
897
|
+
)
|
|
898
|
+
+ "结论范围以第 2 节审计范围清单为界。"
|
|
899
|
+
)
|
|
900
|
+
|
|
901
|
+
|
|
902
|
+
def _html_unattested_banner(a: attestation.Attestation) -> str:
|
|
903
|
+
"""未会签时在报告开头显式声明,避免读者把草稿当合规凭证。"""
|
|
904
|
+
if a.countersigned:
|
|
905
|
+
return ""
|
|
906
|
+
blockers = "".join(
|
|
907
|
+
f"<li>{html.escape(item)}</li>" for item in a.gate_blockers
|
|
908
|
+
)
|
|
909
|
+
detail = f"<ul class='compliance-list'>{blockers}</ul>" if blockers else ""
|
|
910
|
+
return (
|
|
911
|
+
" <div class=\"finding-card\">\n"
|
|
912
|
+
f" <p class=\"finding-desc\"><strong>本报告未获官方会签:</strong>"
|
|
913
|
+
f"{html.escape(a.status_line)}</p>\n"
|
|
914
|
+
f" {detail}\n"
|
|
915
|
+
" </div>"
|
|
916
|
+
)
|
|
917
|
+
|
|
918
|
+
|
|
919
|
+
def _seal_footer(b: ReportDataBundle, a: attestation.Attestation) -> str:
|
|
920
|
+
"""印章页脚:会签与否决定措辞,绝不无条件写「有效合规凭证」。"""
|
|
921
|
+
issued = f"Issued by {b.auditor} · Generated at {b.created_at}"
|
|
922
|
+
if a.countersigned:
|
|
923
|
+
return f"Countersigned · {issued} · Valid for Enterprise Compliance Audit"
|
|
924
|
+
return f"NOT COUNTERSIGNED · {issued} · Draft export, not valid for compliance audit"
|