vibecheck-ai 2.0.1 โ 5.0.0
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.
- package/bin/.generated +25 -0
- package/bin/_deprecations.js +463 -0
- package/bin/_router.js +46 -0
- package/bin/cli-hygiene.js +241 -0
- package/bin/dev/run-v2-torture.js +30 -0
- package/bin/registry.js +656 -0
- package/bin/runners/CLI_REFACTOR_SUMMARY.md +229 -0
- package/bin/runners/ENHANCEMENT_GUIDE.md +121 -0
- package/bin/runners/REPORT_AUDIT.md +64 -0
- package/bin/runners/cli-utils.js +1070 -0
- package/bin/runners/context/ai-task-decomposer.js +337 -0
- package/bin/runners/context/analyzer.js +513 -0
- package/bin/runners/context/api-contracts.js +427 -0
- package/bin/runners/context/context-diff.js +342 -0
- package/bin/runners/context/context-pruner.js +291 -0
- package/bin/runners/context/dependency-graph.js +414 -0
- package/bin/runners/context/generators/claude.js +107 -0
- package/bin/runners/context/generators/codex.js +108 -0
- package/bin/runners/context/generators/copilot.js +119 -0
- package/bin/runners/context/generators/cursor-enhanced.js +2525 -0
- package/bin/runners/context/generators/cursor.js +514 -0
- package/bin/runners/context/generators/mcp.js +169 -0
- package/bin/runners/context/generators/windsurf.js +180 -0
- package/bin/runners/context/git-context.js +304 -0
- package/bin/runners/context/index.js +1110 -0
- package/bin/runners/context/insights.js +173 -0
- package/bin/runners/context/mcp-server/generate-rules.js +337 -0
- package/bin/runners/context/mcp-server/index.js +1176 -0
- package/bin/runners/context/mcp-server/package.json +24 -0
- package/bin/runners/context/memory.js +200 -0
- package/bin/runners/context/monorepo.js +215 -0
- package/bin/runners/context/multi-repo-federation.js +404 -0
- package/bin/runners/context/patterns.js +253 -0
- package/bin/runners/context/proof-context.js +1264 -0
- package/bin/runners/context/security-scanner.js +541 -0
- package/bin/runners/context/semantic-search.js +350 -0
- package/bin/runners/context/shared.js +264 -0
- package/bin/runners/context/team-conventions.js +336 -0
- package/bin/runners/lib/__tests__/entitlements-v2.test.js +295 -0
- package/bin/runners/lib/agent-firewall/ai/false-positive-analyzer.js +474 -0
- package/bin/runners/lib/agent-firewall/change-packet/builder.js +488 -0
- package/bin/runners/lib/agent-firewall/change-packet/schema.json +228 -0
- package/bin/runners/lib/agent-firewall/change-packet/store.js +200 -0
- package/bin/runners/lib/agent-firewall/claims/claim-types.js +21 -0
- package/bin/runners/lib/agent-firewall/claims/extractor.js +303 -0
- package/bin/runners/lib/agent-firewall/claims/patterns.js +24 -0
- package/bin/runners/lib/agent-firewall/critic/index.js +151 -0
- package/bin/runners/lib/agent-firewall/critic/judge.js +432 -0
- package/bin/runners/lib/agent-firewall/critic/prompts.js +305 -0
- package/bin/runners/lib/agent-firewall/enforcement/gateway.js +1059 -0
- package/bin/runners/lib/agent-firewall/enforcement/index.js +98 -0
- package/bin/runners/lib/agent-firewall/enforcement/mode.js +318 -0
- package/bin/runners/lib/agent-firewall/enforcement/orchestrator.js +484 -0
- package/bin/runners/lib/agent-firewall/enforcement/proof-artifact.js +418 -0
- package/bin/runners/lib/agent-firewall/enforcement/schemas/change-event.schema.json +173 -0
- package/bin/runners/lib/agent-firewall/enforcement/schemas/intent.schema.json +181 -0
- package/bin/runners/lib/agent-firewall/enforcement/schemas/verdict.schema.json +222 -0
- package/bin/runners/lib/agent-firewall/enforcement/verdict-v2.js +333 -0
- package/bin/runners/lib/agent-firewall/evidence/auth-evidence.js +88 -0
- package/bin/runners/lib/agent-firewall/evidence/contract-evidence.js +75 -0
- package/bin/runners/lib/agent-firewall/evidence/env-evidence.js +127 -0
- package/bin/runners/lib/agent-firewall/evidence/resolver.js +102 -0
- package/bin/runners/lib/agent-firewall/evidence/route-evidence.js +213 -0
- package/bin/runners/lib/agent-firewall/evidence/side-effect-evidence.js +145 -0
- package/bin/runners/lib/agent-firewall/fs-hook/daemon.js +19 -0
- package/bin/runners/lib/agent-firewall/fs-hook/installer.js +87 -0
- package/bin/runners/lib/agent-firewall/fs-hook/watcher.js +184 -0
- package/bin/runners/lib/agent-firewall/git-hook/pre-commit.js +163 -0
- package/bin/runners/lib/agent-firewall/ide-extension/cursor.js +107 -0
- package/bin/runners/lib/agent-firewall/ide-extension/vscode.js +68 -0
- package/bin/runners/lib/agent-firewall/ide-extension/windsurf.js +66 -0
- package/bin/runners/lib/agent-firewall/index.js +200 -0
- package/bin/runners/lib/agent-firewall/integration/index.js +20 -0
- package/bin/runners/lib/agent-firewall/integration/ship-gate.js +437 -0
- package/bin/runners/lib/agent-firewall/intent/alignment-engine.js +634 -0
- package/bin/runners/lib/agent-firewall/intent/auto-detect.js +426 -0
- package/bin/runners/lib/agent-firewall/intent/index.js +102 -0
- package/bin/runners/lib/agent-firewall/intent/schema.js +352 -0
- package/bin/runners/lib/agent-firewall/intent/store.js +283 -0
- package/bin/runners/lib/agent-firewall/interception/fs-interceptor.js +502 -0
- package/bin/runners/lib/agent-firewall/interception/index.js +23 -0
- package/bin/runners/lib/agent-firewall/interceptor/base.js +308 -0
- package/bin/runners/lib/agent-firewall/interceptor/cursor.js +35 -0
- package/bin/runners/lib/agent-firewall/interceptor/vscode.js +35 -0
- package/bin/runners/lib/agent-firewall/interceptor/windsurf.js +34 -0
- package/bin/runners/lib/agent-firewall/lawbook/distributor.js +465 -0
- package/bin/runners/lib/agent-firewall/lawbook/evaluator.js +604 -0
- package/bin/runners/lib/agent-firewall/lawbook/index.js +304 -0
- package/bin/runners/lib/agent-firewall/lawbook/registry.js +514 -0
- package/bin/runners/lib/agent-firewall/lawbook/schema.js +420 -0
- package/bin/runners/lib/agent-firewall/logger.js +141 -0
- package/bin/runners/lib/agent-firewall/policy/default-policy.json +90 -0
- package/bin/runners/lib/agent-firewall/policy/engine.js +103 -0
- package/bin/runners/lib/agent-firewall/policy/loader.js +451 -0
- package/bin/runners/lib/agent-firewall/policy/rules/auth-drift.js +50 -0
- package/bin/runners/lib/agent-firewall/policy/rules/contract-drift.js +50 -0
- package/bin/runners/lib/agent-firewall/policy/rules/fake-success.js +79 -0
- package/bin/runners/lib/agent-firewall/policy/rules/ghost-env.js +227 -0
- package/bin/runners/lib/agent-firewall/policy/rules/ghost-route.js +191 -0
- package/bin/runners/lib/agent-firewall/policy/rules/scope.js +93 -0
- package/bin/runners/lib/agent-firewall/policy/rules/unsafe-side-effect.js +57 -0
- package/bin/runners/lib/agent-firewall/policy/schema.json +183 -0
- package/bin/runners/lib/agent-firewall/policy/verdict.js +54 -0
- package/bin/runners/lib/agent-firewall/proposal/extractor.js +394 -0
- package/bin/runners/lib/agent-firewall/proposal/index.js +212 -0
- package/bin/runners/lib/agent-firewall/proposal/schema.js +251 -0
- package/bin/runners/lib/agent-firewall/proposal/validator.js +386 -0
- package/bin/runners/lib/agent-firewall/reality/index.js +332 -0
- package/bin/runners/lib/agent-firewall/reality/state.js +625 -0
- package/bin/runners/lib/agent-firewall/reality/watcher.js +322 -0
- package/bin/runners/lib/agent-firewall/risk/index.js +173 -0
- package/bin/runners/lib/agent-firewall/risk/scorer.js +328 -0
- package/bin/runners/lib/agent-firewall/risk/thresholds.js +322 -0
- package/bin/runners/lib/agent-firewall/risk/vectors.js +421 -0
- package/bin/runners/lib/agent-firewall/session/collector.js +451 -0
- package/bin/runners/lib/agent-firewall/session/index.js +26 -0
- package/bin/runners/lib/agent-firewall/simulator/diff-simulator.js +472 -0
- package/bin/runners/lib/agent-firewall/simulator/import-resolver.js +346 -0
- package/bin/runners/lib/agent-firewall/simulator/index.js +181 -0
- package/bin/runners/lib/agent-firewall/simulator/route-validator.js +380 -0
- package/bin/runners/lib/agent-firewall/time-machine/incident-correlator.js +661 -0
- package/bin/runners/lib/agent-firewall/time-machine/index.js +267 -0
- package/bin/runners/lib/agent-firewall/time-machine/replay-engine.js +436 -0
- package/bin/runners/lib/agent-firewall/time-machine/state-reconstructor.js +490 -0
- package/bin/runners/lib/agent-firewall/time-machine/timeline-builder.js +530 -0
- package/bin/runners/lib/agent-firewall/truthpack/index.js +67 -0
- package/bin/runners/lib/agent-firewall/truthpack/loader.js +137 -0
- package/bin/runners/lib/agent-firewall/unblock/planner.js +337 -0
- package/bin/runners/lib/agent-firewall/utils/ignore-checker.js +118 -0
- package/bin/runners/lib/ai-bridge.js +416 -0
- package/bin/runners/lib/analysis-core.js +309 -0
- package/bin/runners/lib/analyzers.js +2500 -0
- package/bin/runners/lib/api-client.js +269 -0
- package/bin/runners/lib/approve-output.js +235 -0
- package/bin/runners/lib/artifact-envelope.js +540 -0
- package/bin/runners/lib/assets/vibecheck-logo.png +0 -0
- package/bin/runners/lib/audit-bridge.js +391 -0
- package/bin/runners/lib/auth-shared.js +977 -0
- package/bin/runners/lib/auth-truth.js +193 -0
- package/bin/runners/lib/auth.js +215 -0
- package/bin/runners/lib/authority-badge.js +425 -0
- package/bin/runners/lib/backup.js +62 -0
- package/bin/runners/lib/billing.js +107 -0
- package/bin/runners/lib/checkpoint.js +941 -0
- package/bin/runners/lib/claims.js +118 -0
- package/bin/runners/lib/classify-output.js +204 -0
- package/bin/runners/lib/cleanup/engine.js +571 -0
- package/bin/runners/lib/cleanup/index.js +53 -0
- package/bin/runners/lib/cleanup/output.js +375 -0
- package/bin/runners/lib/cleanup/rules.js +1060 -0
- package/bin/runners/lib/cli-output.js +400 -0
- package/bin/runners/lib/cli-ui.js +540 -0
- package/bin/runners/lib/compliance-bridge-new.js +0 -0
- package/bin/runners/lib/compliance-bridge.js +165 -0
- package/bin/runners/lib/contracts/auth-contract.js +202 -0
- package/bin/runners/lib/contracts/env-contract.js +181 -0
- package/bin/runners/lib/contracts/external-contract.js +206 -0
- package/bin/runners/lib/contracts/guard.js +168 -0
- package/bin/runners/lib/contracts/index.js +89 -0
- package/bin/runners/lib/contracts/plan-validator.js +311 -0
- package/bin/runners/lib/contracts/route-contract.js +199 -0
- package/bin/runners/lib/contracts.js +804 -0
- package/bin/runners/lib/default-config.js +127 -0
- package/bin/runners/lib/detect.js +89 -0
- package/bin/runners/lib/detectors-v2.js +622 -0
- package/bin/runners/lib/doctor/autofix.js +254 -0
- package/bin/runners/lib/doctor/diagnosis-receipt.js +454 -0
- package/bin/runners/lib/doctor/failure-signatures.js +526 -0
- package/bin/runners/lib/doctor/fix-script.js +336 -0
- package/bin/runners/lib/doctor/index.js +37 -0
- package/bin/runners/lib/doctor/modules/build-tools.js +453 -0
- package/bin/runners/lib/doctor/modules/dependencies.js +325 -0
- package/bin/runners/lib/doctor/modules/index.js +105 -0
- package/bin/runners/lib/doctor/modules/network.js +250 -0
- package/bin/runners/lib/doctor/modules/os-quirks.js +706 -0
- package/bin/runners/lib/doctor/modules/project.js +312 -0
- package/bin/runners/lib/doctor/modules/repo-integrity.js +485 -0
- package/bin/runners/lib/doctor/modules/runtime.js +224 -0
- package/bin/runners/lib/doctor/modules/security.js +350 -0
- package/bin/runners/lib/doctor/modules/system.js +213 -0
- package/bin/runners/lib/doctor/modules/vibecheck.js +394 -0
- package/bin/runners/lib/doctor/reporter.js +262 -0
- package/bin/runners/lib/doctor/safe-repair.js +384 -0
- package/bin/runners/lib/doctor/service.js +262 -0
- package/bin/runners/lib/doctor/types.js +113 -0
- package/bin/runners/lib/doctor/ui.js +263 -0
- package/bin/runners/lib/doctor-enhanced.js +233 -0
- package/bin/runners/lib/doctor-output.js +226 -0
- package/bin/runners/lib/doctor-v2.js +608 -0
- package/bin/runners/lib/drift.js +425 -0
- package/bin/runners/lib/enforcement.js +72 -0
- package/bin/runners/lib/engine/ast-cache.js +210 -0
- package/bin/runners/lib/engine/auth-extractor.js +211 -0
- package/bin/runners/lib/engine/billing-extractor.js +112 -0
- package/bin/runners/lib/engine/enforcement-extractor.js +100 -0
- package/bin/runners/lib/engine/env-extractor.js +207 -0
- package/bin/runners/lib/engine/express-extractor.js +208 -0
- package/bin/runners/lib/engine/extractors.js +849 -0
- package/bin/runners/lib/engine/index.js +207 -0
- package/bin/runners/lib/engine/repo-index.js +514 -0
- package/bin/runners/lib/engine/types.js +124 -0
- package/bin/runners/lib/engines/accessibility-engine.js +190 -0
- package/bin/runners/lib/engines/api-consistency-engine.js +162 -0
- package/bin/runners/lib/engines/ast-cache.js +99 -0
- package/bin/runners/lib/engines/attack-detector.js +1192 -0
- package/bin/runners/lib/engines/code-quality-engine.js +255 -0
- package/bin/runners/lib/engines/console-logs-engine.js +115 -0
- package/bin/runners/lib/engines/cross-file-analysis-engine.js +268 -0
- package/bin/runners/lib/engines/dead-code-engine.js +198 -0
- package/bin/runners/lib/engines/deprecated-api-engine.js +226 -0
- package/bin/runners/lib/engines/empty-catch-engine.js +150 -0
- package/bin/runners/lib/engines/file-filter.js +131 -0
- package/bin/runners/lib/engines/hardcoded-secrets-engine.js +251 -0
- package/bin/runners/lib/engines/mock-data-engine.js +272 -0
- package/bin/runners/lib/engines/parallel-processor.js +71 -0
- package/bin/runners/lib/engines/performance-issues-engine.js +265 -0
- package/bin/runners/lib/engines/security-vulnerabilities-engine.js +243 -0
- package/bin/runners/lib/engines/todo-fixme-engine.js +115 -0
- package/bin/runners/lib/engines/type-aware-engine.js +152 -0
- package/bin/runners/lib/engines/unsafe-regex-engine.js +225 -0
- package/bin/runners/lib/engines/vibecheck-engines/README.md +53 -0
- package/bin/runners/lib/engines/vibecheck-engines/index.js +15 -0
- package/bin/runners/lib/engines/vibecheck-engines/lib/ast-cache.js +164 -0
- package/bin/runners/lib/engines/vibecheck-engines/lib/code-quality-engine.js +291 -0
- package/bin/runners/lib/engines/vibecheck-engines/lib/console-logs-engine.js +83 -0
- package/bin/runners/lib/engines/vibecheck-engines/lib/dead-code-engine.js +198 -0
- package/bin/runners/lib/engines/vibecheck-engines/lib/deprecated-api-engine.js +275 -0
- package/bin/runners/lib/engines/vibecheck-engines/lib/empty-catch-engine.js +167 -0
- package/bin/runners/lib/engines/vibecheck-engines/lib/file-filter.js +217 -0
- package/bin/runners/lib/engines/vibecheck-engines/lib/hardcoded-secrets-engine.js +139 -0
- package/bin/runners/lib/engines/vibecheck-engines/lib/mock-data-engine.js +140 -0
- package/bin/runners/lib/engines/vibecheck-engines/lib/parallel-processor.js +164 -0
- package/bin/runners/lib/engines/vibecheck-engines/lib/performance-issues-engine.js +234 -0
- package/bin/runners/lib/engines/vibecheck-engines/lib/type-aware-engine.js +217 -0
- package/bin/runners/lib/engines/vibecheck-engines/lib/unsafe-regex-engine.js +78 -0
- package/bin/runners/lib/engines/vibecheck-engines/package.json +13 -0
- package/bin/runners/lib/enterprise-detect.js +603 -0
- package/bin/runners/lib/enterprise-init.js +942 -0
- package/bin/runners/lib/entitlements-v2.js +265 -0
- package/bin/runners/lib/entitlements.generated.js +0 -0
- package/bin/runners/lib/entitlements.js +340 -0
- package/bin/runners/lib/env-resolver.js +417 -0
- package/bin/runners/lib/env-template.js +66 -0
- package/bin/runners/lib/env.js +189 -0
- package/bin/runners/lib/error-handler.js +368 -0
- package/bin/runners/lib/error-messages.js +289 -0
- package/bin/runners/lib/evidence-pack.js +684 -0
- package/bin/runners/lib/exit-codes.js +275 -0
- package/bin/runners/lib/extractors/client-calls.js +990 -0
- package/bin/runners/lib/extractors/fastify-route-dump.js +573 -0
- package/bin/runners/lib/extractors/fastify-routes.js +426 -0
- package/bin/runners/lib/extractors/index.js +363 -0
- package/bin/runners/lib/extractors/next-routes.js +524 -0
- package/bin/runners/lib/extractors/proof-graph.js +431 -0
- package/bin/runners/lib/extractors/route-matcher.js +451 -0
- package/bin/runners/lib/extractors/truthpack-v2.js +377 -0
- package/bin/runners/lib/extractors/ui-bindings.js +547 -0
- package/bin/runners/lib/finding-id.js +69 -0
- package/bin/runners/lib/finding-sorter.js +89 -0
- package/bin/runners/lib/findings-schema.js +281 -0
- package/bin/runners/lib/fingerprint.js +377 -0
- package/bin/runners/lib/firewall-prompt.js +50 -0
- package/bin/runners/lib/fix-output.js +228 -0
- package/bin/runners/lib/global-flags.js +250 -0
- package/bin/runners/lib/graph/graph-builder.js +265 -0
- package/bin/runners/lib/graph/html-renderer.js +413 -0
- package/bin/runners/lib/graph/index.js +32 -0
- package/bin/runners/lib/graph/runtime-collector.js +215 -0
- package/bin/runners/lib/graph/static-extractor.js +518 -0
- package/bin/runners/lib/help-formatter.js +413 -0
- package/bin/runners/lib/html-proof-report.js +913 -0
- package/bin/runners/lib/html-report.js +650 -0
- package/bin/runners/lib/init-wizard.js +601 -0
- package/bin/runners/lib/interactive-menu.js +1496 -0
- package/bin/runners/lib/json-output.js +76 -0
- package/bin/runners/lib/llm.js +75 -0
- package/bin/runners/lib/logger.js +38 -0
- package/bin/runners/lib/meter.js +61 -0
- package/bin/runners/lib/missions/briefing.js +427 -0
- package/bin/runners/lib/missions/checkpoint.js +753 -0
- package/bin/runners/lib/missions/evidence.js +126 -0
- package/bin/runners/lib/missions/hardening.js +851 -0
- package/bin/runners/lib/missions/plan.js +648 -0
- package/bin/runners/lib/missions/safety-gates.js +645 -0
- package/bin/runners/lib/missions/schema.js +478 -0
- package/bin/runners/lib/missions/templates.js +317 -0
- package/bin/runners/lib/next-action.js +560 -0
- package/bin/runners/lib/packs/bundle.js +675 -0
- package/bin/runners/lib/packs/evidence-pack.js +671 -0
- package/bin/runners/lib/packs/pack-factory.js +837 -0
- package/bin/runners/lib/packs/permissions-pack.js +686 -0
- package/bin/runners/lib/packs/proof-graph-pack.js +779 -0
- package/bin/runners/lib/patch.js +40 -0
- package/bin/runners/lib/permissions/auth-model.js +213 -0
- package/bin/runners/lib/permissions/idor-prover.js +205 -0
- package/bin/runners/lib/permissions/index.js +45 -0
- package/bin/runners/lib/permissions/matrix-builder.js +198 -0
- package/bin/runners/lib/pkgjson.js +28 -0
- package/bin/runners/lib/policy.js +295 -0
- package/bin/runners/lib/polish/accessibility.js +62 -0
- package/bin/runners/lib/polish/analyzer.js +93 -0
- package/bin/runners/lib/polish/backend.js +87 -0
- package/bin/runners/lib/polish/configuration.js +83 -0
- package/bin/runners/lib/polish/documentation.js +83 -0
- package/bin/runners/lib/polish/frontend.js +817 -0
- package/bin/runners/lib/polish/index.js +27 -0
- package/bin/runners/lib/polish/infrastructure.js +80 -0
- package/bin/runners/lib/polish/internationalization.js +85 -0
- package/bin/runners/lib/polish/libraries.js +180 -0
- package/bin/runners/lib/polish/observability.js +75 -0
- package/bin/runners/lib/polish/performance.js +64 -0
- package/bin/runners/lib/polish/privacy.js +110 -0
- package/bin/runners/lib/polish/resilience.js +92 -0
- package/bin/runners/lib/polish/security.js +78 -0
- package/bin/runners/lib/polish/seo.js +71 -0
- package/bin/runners/lib/polish/styles.js +62 -0
- package/bin/runners/lib/polish/utils.js +104 -0
- package/bin/runners/lib/preflight.js +142 -0
- package/bin/runners/lib/prerequisites.js +149 -0
- package/bin/runners/lib/prove-output.js +220 -0
- package/bin/runners/lib/reality/correlation-detectors.js +359 -0
- package/bin/runners/lib/reality/index.js +318 -0
- package/bin/runners/lib/reality/request-hashing.js +416 -0
- package/bin/runners/lib/reality/request-mapper.js +453 -0
- package/bin/runners/lib/reality/safety-rails.js +463 -0
- package/bin/runners/lib/reality/semantic-snapshot.js +408 -0
- package/bin/runners/lib/reality/toast-detector.js +393 -0
- package/bin/runners/lib/reality-findings.js +84 -0
- package/bin/runners/lib/reality-output.js +231 -0
- package/bin/runners/lib/receipts.js +179 -0
- package/bin/runners/lib/redact.js +29 -0
- package/bin/runners/lib/replay/capsule-manager.js +154 -0
- package/bin/runners/lib/replay/index.js +263 -0
- package/bin/runners/lib/replay/player.js +348 -0
- package/bin/runners/lib/replay/recorder.js +331 -0
- package/bin/runners/lib/report-engine.js +626 -0
- package/bin/runners/lib/report-html.js +1233 -0
- package/bin/runners/lib/report-output.js +366 -0
- package/bin/runners/lib/report-templates.js +967 -0
- package/bin/runners/lib/report.js +135 -0
- package/bin/runners/lib/route-detection.js +1209 -0
- package/bin/runners/lib/route-truth.js +1322 -0
- package/bin/runners/lib/safelist/index.js +96 -0
- package/bin/runners/lib/safelist/integration.js +334 -0
- package/bin/runners/lib/safelist/matcher.js +696 -0
- package/bin/runners/lib/safelist/schema.js +948 -0
- package/bin/runners/lib/safelist/store.js +438 -0
- package/bin/runners/lib/sandbox/index.js +59 -0
- package/bin/runners/lib/sandbox/proof-chain.js +399 -0
- package/bin/runners/lib/sandbox/sandbox-runner.js +205 -0
- package/bin/runners/lib/sandbox/worktree.js +174 -0
- package/bin/runners/lib/scan-cache.js +330 -0
- package/bin/runners/lib/scan-output-schema.js +344 -0
- package/bin/runners/lib/scan-output.js +631 -0
- package/bin/runners/lib/scan-runner.js +135 -0
- package/bin/runners/lib/schema-validator.js +350 -0
- package/bin/runners/lib/schemas/ajv-validator.js +464 -0
- package/bin/runners/lib/schemas/contracts.schema.json +160 -0
- package/bin/runners/lib/schemas/error-envelope.schema.json +105 -0
- package/bin/runners/lib/schemas/finding-v3.schema.json +151 -0
- package/bin/runners/lib/schemas/finding.schema.json +100 -0
- package/bin/runners/lib/schemas/mission-pack.schema.json +206 -0
- package/bin/runners/lib/schemas/proof-graph.schema.json +176 -0
- package/bin/runners/lib/schemas/reality-report.schema.json +162 -0
- package/bin/runners/lib/schemas/report-artifact.schema.json +120 -0
- package/bin/runners/lib/schemas/run-request.schema.json +108 -0
- package/bin/runners/lib/schemas/share-pack.schema.json +180 -0
- package/bin/runners/lib/schemas/ship-manifest.schema.json +251 -0
- package/bin/runners/lib/schemas/ship-report.schema.json +117 -0
- package/bin/runners/lib/schemas/truthpack-v2.schema.json +303 -0
- package/bin/runners/lib/schemas/validator.js +465 -0
- package/bin/runners/lib/schemas/verdict.schema.json +140 -0
- package/bin/runners/lib/score-history.js +282 -0
- package/bin/runners/lib/security-bridge.js +249 -0
- package/bin/runners/lib/server-usage.js +513 -0
- package/bin/runners/lib/share-pack.js +239 -0
- package/bin/runners/lib/ship-gate.js +832 -0
- package/bin/runners/lib/ship-manifest.js +1153 -0
- package/bin/runners/lib/ship-output-enterprise.js +239 -0
- package/bin/runners/lib/ship-output.js +1128 -0
- package/bin/runners/lib/snippets.js +67 -0
- package/bin/runners/lib/status-output.js +340 -0
- package/bin/runners/lib/terminal-ui.js +356 -0
- package/bin/runners/lib/truth.js +1691 -0
- package/bin/runners/lib/ui.js +562 -0
- package/bin/runners/lib/unified-cli-output.js +947 -0
- package/bin/runners/lib/unified-output.js +197 -0
- package/bin/runners/lib/upsell.js +410 -0
- package/bin/runners/lib/usage.js +153 -0
- package/bin/runners/lib/validate-patch.js +156 -0
- package/bin/runners/lib/verdict-engine.js +628 -0
- package/bin/runners/lib/verification.js +345 -0
- package/bin/runners/lib/why-tree.js +650 -0
- package/bin/runners/reality/engine.js +917 -0
- package/bin/runners/reality/flows.js +122 -0
- package/bin/runners/reality/report.js +378 -0
- package/bin/runners/reality/session.js +193 -0
- package/bin/runners/runAIAgent.js +229 -0
- package/bin/runners/runAgent.d.ts +5 -0
- package/bin/runners/runAgent.js +161 -0
- package/bin/runners/runAllowlist.js +418 -0
- package/bin/runners/runApprove.js +320 -0
- package/bin/runners/runAudit.js +692 -0
- package/bin/runners/runAuth.js +731 -0
- package/bin/runners/runCI.js +353 -0
- package/bin/runners/runCheckpoint.js +530 -0
- package/bin/runners/runClassify.js +928 -0
- package/bin/runners/runCleanup.js +343 -0
- package/bin/runners/runContext.d.ts +4 -0
- package/bin/runners/runContext.js +175 -0
- package/bin/runners/runDoctor.js +877 -0
- package/bin/runners/runEvidencePack.js +362 -0
- package/bin/runners/runFirewall.d.ts +5 -0
- package/bin/runners/runFirewall.js +134 -0
- package/bin/runners/runFirewallHook.d.ts +5 -0
- package/bin/runners/runFirewallHook.js +56 -0
- package/bin/runners/runFix.js +1355 -0
- package/bin/runners/runForge.js +451 -0
- package/bin/runners/runGuard.js +262 -0
- package/bin/runners/runInit.js +1927 -0
- package/bin/runners/runIntent.js +906 -0
- package/bin/runners/runKickoff.js +878 -0
- package/bin/runners/runLabs.js +424 -0
- package/bin/runners/runLaunch.js +2000 -0
- package/bin/runners/runLink.js +785 -0
- package/bin/runners/runMcp.js +1875 -0
- package/bin/runners/runPacks.js +2089 -0
- package/bin/runners/runPolish.d.ts +4 -0
- package/bin/runners/runPolish.js +390 -0
- package/bin/runners/runPromptFirewall.js +211 -0
- package/bin/runners/runProve.js +1411 -0
- package/bin/runners/runQuickstart.js +531 -0
- package/bin/runners/runReality.js +2260 -0
- package/bin/runners/runReport.js +726 -0
- package/bin/runners/runRuntime.js +110 -0
- package/bin/runners/runSafelist.js +1190 -0
- package/bin/runners/runScan.js +688 -0
- package/bin/runners/runShield.js +1282 -0
- package/bin/runners/runShip.js +1660 -0
- package/bin/runners/runTruth.d.ts +5 -0
- package/bin/runners/runTruth.js +101 -0
- package/bin/runners/runValidate.js +179 -0
- package/bin/runners/runWatch.js +478 -0
- package/bin/runners/utils.js +360 -0
- package/bin/scan.js +617 -0
- package/bin/vibecheck.js +1617 -0
- package/dist/guardrail/index.d.ts +2405 -0
- package/dist/guardrail/index.js +9747 -0
- package/dist/guardrail/index.js.map +1 -0
- package/dist/scanner/index.d.ts +282 -0
- package/dist/scanner/index.js +3395 -0
- package/dist/scanner/index.js.map +1 -0
- package/package.json +123 -104
- package/README.md +0 -491
- package/dist/index.js +0 -99711
- package/dist/index.js.map +0 -1
|
@@ -0,0 +1,1233 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* World-Class Enterprise HTML Report Generator
|
|
3
|
+
*
|
|
4
|
+
* Features:
|
|
5
|
+
* - Animated score ring with gradient
|
|
6
|
+
* - Interactive severity donut chart (pure CSS)
|
|
7
|
+
* - Reality Mode broken flow visualization
|
|
8
|
+
* - Dark/light theme toggle with persistence
|
|
9
|
+
* - Print-optimized layout
|
|
10
|
+
* - White-label customization
|
|
11
|
+
* - Responsive design
|
|
12
|
+
* - Accessibility compliant
|
|
13
|
+
* - Zero external dependencies (all inline)
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
function generateWorldClassHTML(reportData, opts = {}) {
|
|
17
|
+
const { meta, summary, findings, reality, fixEstimates, truthpack } = reportData;
|
|
18
|
+
const theme = opts.theme || "dark";
|
|
19
|
+
const company = opts.company || "";
|
|
20
|
+
const logo = opts.logo || "";
|
|
21
|
+
const redactPaths = opts.redactPaths || false;
|
|
22
|
+
|
|
23
|
+
// Calculate metrics
|
|
24
|
+
const criticalCount = summary.severityCounts?.critical || findings.filter(f => f.severity === "BLOCK" || f.severity === "critical").length;
|
|
25
|
+
const highCount = summary.severityCounts?.high || findings.filter(f => f.severity === "high").length;
|
|
26
|
+
const mediumCount = summary.severityCounts?.medium || findings.filter(f => f.severity === "WARN" || f.severity === "medium").length;
|
|
27
|
+
const lowCount = summary.severityCounts?.low || findings.filter(f => f.severity === "INFO" || f.severity === "low").length;
|
|
28
|
+
const totalFindings = criticalCount + highCount + mediumCount + lowCount;
|
|
29
|
+
|
|
30
|
+
// Verdict styling
|
|
31
|
+
const verdictConfig = {
|
|
32
|
+
SHIP: { color: "#10b981", bg: "rgba(16,185,129,0.15)", icon: "โ", text: "READY TO SHIP" },
|
|
33
|
+
WARN: { color: "#f59e0b", bg: "rgba(245,158,11,0.15)", icon: "!", text: "NEEDS ATTENTION" },
|
|
34
|
+
BLOCK: { color: "#ef4444", bg: "rgba(239,68,68,0.15)", icon: "โ", text: "BLOCKED" },
|
|
35
|
+
};
|
|
36
|
+
const verdict = verdictConfig[summary.verdict] || verdictConfig.WARN;
|
|
37
|
+
|
|
38
|
+
// Score color gradient
|
|
39
|
+
const scoreColor = summary.score >= 80 ? "#10b981" : summary.score >= 60 ? "#f59e0b" : "#ef4444";
|
|
40
|
+
|
|
41
|
+
// Category scores for radar/bars
|
|
42
|
+
const categoryScores = summary.categoryScores || {};
|
|
43
|
+
const categories = Object.entries(categoryScores);
|
|
44
|
+
|
|
45
|
+
// Reality data
|
|
46
|
+
const hasReality = reality && (reality.coverage || reality.brokenFlows?.length > 0);
|
|
47
|
+
const coverage = reality?.coverage || {};
|
|
48
|
+
const brokenFlows = reality?.brokenFlows || [];
|
|
49
|
+
|
|
50
|
+
return `<!DOCTYPE html>
|
|
51
|
+
<html lang="en" data-theme="${theme}">
|
|
52
|
+
<head>
|
|
53
|
+
<meta charset="UTF-8">
|
|
54
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
55
|
+
<meta name="color-scheme" content="dark light">
|
|
56
|
+
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
|
|
57
|
+
<meta http-equiv="Pragma" content="no-cache">
|
|
58
|
+
<meta http-equiv="Expires" content="0">
|
|
59
|
+
<title>VibeCheck Report โ ${meta.projectName}</title>
|
|
60
|
+
<style>
|
|
61
|
+
/* ========================================
|
|
62
|
+
CSS VARIABLES & THEMING
|
|
63
|
+
======================================== */
|
|
64
|
+
:root {
|
|
65
|
+
--font-sans: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
|
|
66
|
+
--font-mono: 'SF Mono', 'Fira Code', 'JetBrains Mono', 'Cascadia Code', Consolas, monospace;
|
|
67
|
+
|
|
68
|
+
/* Spacing scale */
|
|
69
|
+
--space-1: 4px;
|
|
70
|
+
--space-2: 8px;
|
|
71
|
+
--space-3: 12px;
|
|
72
|
+
--space-4: 16px;
|
|
73
|
+
--space-5: 24px;
|
|
74
|
+
--space-6: 32px;
|
|
75
|
+
--space-7: 48px;
|
|
76
|
+
--space-8: 64px;
|
|
77
|
+
|
|
78
|
+
/* Border radius */
|
|
79
|
+
--radius-sm: 6px;
|
|
80
|
+
--radius-md: 10px;
|
|
81
|
+
--radius-lg: 16px;
|
|
82
|
+
--radius-xl: 24px;
|
|
83
|
+
--radius-full: 9999px;
|
|
84
|
+
|
|
85
|
+
/* Transitions */
|
|
86
|
+
--transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
87
|
+
--transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
88
|
+
--transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
89
|
+
|
|
90
|
+
/* Severity colors */
|
|
91
|
+
--color-critical: #ef4444;
|
|
92
|
+
--color-high: #f97316;
|
|
93
|
+
--color-medium: #f59e0b;
|
|
94
|
+
--color-low: #3b82f6;
|
|
95
|
+
--color-info: #6b7280;
|
|
96
|
+
--color-success: #10b981;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
[data-theme="dark"] {
|
|
100
|
+
--bg-primary: #0a0a0f;
|
|
101
|
+
--bg-secondary: #111118;
|
|
102
|
+
--bg-tertiary: #1a1a24;
|
|
103
|
+
--bg-elevated: #22222e;
|
|
104
|
+
--bg-hover: #2a2a38;
|
|
105
|
+
--border-primary: rgba(255,255,255,0.08);
|
|
106
|
+
--border-secondary: rgba(255,255,255,0.12);
|
|
107
|
+
--text-primary: #fafafa;
|
|
108
|
+
--text-secondary: #a1a1aa;
|
|
109
|
+
--text-tertiary: #71717a;
|
|
110
|
+
--text-muted: #52525b;
|
|
111
|
+
--accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
|
|
112
|
+
--glow-color: rgba(139, 92, 246, 0.15);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
[data-theme="light"] {
|
|
116
|
+
--bg-primary: #ffffff;
|
|
117
|
+
--bg-secondary: #f9fafb;
|
|
118
|
+
--bg-tertiary: #f3f4f6;
|
|
119
|
+
--bg-elevated: #ffffff;
|
|
120
|
+
--bg-hover: #e5e7eb;
|
|
121
|
+
--border-primary: rgba(0,0,0,0.08);
|
|
122
|
+
--border-secondary: rgba(0,0,0,0.12);
|
|
123
|
+
--text-primary: #111827;
|
|
124
|
+
--text-secondary: #4b5563;
|
|
125
|
+
--text-tertiary: #6b7280;
|
|
126
|
+
--text-muted: #9ca3af;
|
|
127
|
+
--accent-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #9333ea 100%);
|
|
128
|
+
--glow-color: rgba(79, 70, 229, 0.1);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/* ========================================
|
|
132
|
+
RESET & BASE
|
|
133
|
+
======================================== */
|
|
134
|
+
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
|
135
|
+
|
|
136
|
+
html {
|
|
137
|
+
font-size: 16px;
|
|
138
|
+
-webkit-font-smoothing: antialiased;
|
|
139
|
+
-moz-osx-font-smoothing: grayscale;
|
|
140
|
+
scroll-behavior: smooth;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
body {
|
|
144
|
+
font-family: var(--font-sans);
|
|
145
|
+
background: var(--bg-primary);
|
|
146
|
+
color: var(--text-primary);
|
|
147
|
+
line-height: 1.6;
|
|
148
|
+
min-height: 100vh;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/* ========================================
|
|
152
|
+
LAYOUT
|
|
153
|
+
======================================== */
|
|
154
|
+
.report-container {
|
|
155
|
+
max-width: 1200px;
|
|
156
|
+
margin: 0 auto;
|
|
157
|
+
padding: var(--space-6);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/* ========================================
|
|
161
|
+
HEADER
|
|
162
|
+
======================================== */
|
|
163
|
+
.header {
|
|
164
|
+
display: flex;
|
|
165
|
+
justify-content: space-between;
|
|
166
|
+
align-items: flex-start;
|
|
167
|
+
padding-bottom: var(--space-6);
|
|
168
|
+
border-bottom: 1px solid var(--border-primary);
|
|
169
|
+
margin-bottom: var(--space-7);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.header-left { display: flex; flex-direction: column; gap: var(--space-2); }
|
|
173
|
+
|
|
174
|
+
.logo-container {
|
|
175
|
+
display: flex;
|
|
176
|
+
align-items: center;
|
|
177
|
+
gap: var(--space-3);
|
|
178
|
+
margin-bottom: var(--space-2);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.logo {
|
|
182
|
+
height: 32px;
|
|
183
|
+
width: auto;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.brand {
|
|
187
|
+
font-size: 0.75rem;
|
|
188
|
+
font-weight: 600;
|
|
189
|
+
text-transform: uppercase;
|
|
190
|
+
letter-spacing: 0.1em;
|
|
191
|
+
color: var(--text-tertiary);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.header h1 {
|
|
195
|
+
font-size: 1.75rem;
|
|
196
|
+
font-weight: 700;
|
|
197
|
+
letter-spacing: -0.02em;
|
|
198
|
+
background: var(--accent-gradient);
|
|
199
|
+
-webkit-background-clip: text;
|
|
200
|
+
-webkit-text-fill-color: transparent;
|
|
201
|
+
background-clip: text;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.header-meta {
|
|
205
|
+
display: flex;
|
|
206
|
+
gap: var(--space-5);
|
|
207
|
+
color: var(--text-tertiary);
|
|
208
|
+
font-size: 0.875rem;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
.header-meta span { display: flex; align-items: center; gap: var(--space-2); }
|
|
212
|
+
|
|
213
|
+
.header-right { display: flex; align-items: center; gap: var(--space-4); }
|
|
214
|
+
|
|
215
|
+
/* Theme Toggle */
|
|
216
|
+
.theme-toggle {
|
|
217
|
+
width: 44px;
|
|
218
|
+
height: 24px;
|
|
219
|
+
background: var(--bg-tertiary);
|
|
220
|
+
border: 1px solid var(--border-secondary);
|
|
221
|
+
border-radius: var(--radius-full);
|
|
222
|
+
cursor: pointer;
|
|
223
|
+
position: relative;
|
|
224
|
+
transition: var(--transition-base);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.theme-toggle::after {
|
|
228
|
+
content: '';
|
|
229
|
+
position: absolute;
|
|
230
|
+
top: 2px;
|
|
231
|
+
left: 2px;
|
|
232
|
+
width: 18px;
|
|
233
|
+
height: 18px;
|
|
234
|
+
background: var(--text-primary);
|
|
235
|
+
border-radius: 50%;
|
|
236
|
+
transition: var(--transition-base);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
[data-theme="light"] .theme-toggle::after {
|
|
240
|
+
transform: translateX(20px);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.theme-toggle:hover { background: var(--bg-hover); }
|
|
244
|
+
|
|
245
|
+
/* Print Button */
|
|
246
|
+
.print-btn {
|
|
247
|
+
padding: var(--space-2) var(--space-4);
|
|
248
|
+
background: var(--bg-tertiary);
|
|
249
|
+
border: 1px solid var(--border-secondary);
|
|
250
|
+
border-radius: var(--radius-md);
|
|
251
|
+
color: var(--text-secondary);
|
|
252
|
+
font-size: 0.875rem;
|
|
253
|
+
font-weight: 500;
|
|
254
|
+
cursor: pointer;
|
|
255
|
+
transition: var(--transition-fast);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.print-btn:hover {
|
|
259
|
+
background: var(--bg-hover);
|
|
260
|
+
color: var(--text-primary);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/* ========================================
|
|
264
|
+
HERO SECTION - Score + Verdict
|
|
265
|
+
======================================== */
|
|
266
|
+
.hero {
|
|
267
|
+
display: grid;
|
|
268
|
+
grid-template-columns: 1fr 1fr;
|
|
269
|
+
gap: var(--space-6);
|
|
270
|
+
margin-bottom: var(--space-7);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
.score-card {
|
|
274
|
+
background: var(--bg-secondary);
|
|
275
|
+
border: 1px solid var(--border-primary);
|
|
276
|
+
border-radius: var(--radius-xl);
|
|
277
|
+
padding: var(--space-7);
|
|
278
|
+
display: flex;
|
|
279
|
+
flex-direction: column;
|
|
280
|
+
align-items: center;
|
|
281
|
+
justify-content: center;
|
|
282
|
+
position: relative;
|
|
283
|
+
overflow: hidden;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
.score-card::before {
|
|
287
|
+
content: '';
|
|
288
|
+
position: absolute;
|
|
289
|
+
top: -50%;
|
|
290
|
+
left: -50%;
|
|
291
|
+
width: 200%;
|
|
292
|
+
height: 200%;
|
|
293
|
+
background: radial-gradient(circle at center, var(--glow-color) 0%, transparent 50%);
|
|
294
|
+
opacity: 0.5;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.score-ring {
|
|
298
|
+
position: relative;
|
|
299
|
+
width: 200px;
|
|
300
|
+
height: 200px;
|
|
301
|
+
margin-bottom: var(--space-5);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.score-ring svg {
|
|
305
|
+
width: 100%;
|
|
306
|
+
height: 100%;
|
|
307
|
+
transform: rotate(-90deg);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.score-ring-bg {
|
|
311
|
+
fill: none;
|
|
312
|
+
stroke: var(--bg-tertiary);
|
|
313
|
+
stroke-width: 12;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.score-ring-progress {
|
|
317
|
+
fill: none;
|
|
318
|
+
stroke: url(#scoreGradient);
|
|
319
|
+
stroke-width: 12;
|
|
320
|
+
stroke-linecap: round;
|
|
321
|
+
stroke-dasharray: 565;
|
|
322
|
+
stroke-dashoffset: 565;
|
|
323
|
+
animation: scoreReveal 1.5s ease-out forwards;
|
|
324
|
+
animation-delay: 0.3s;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
@keyframes scoreReveal {
|
|
328
|
+
to { stroke-dashoffset: ${565 - (565 * summary.score / 100)}; }
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
.score-value {
|
|
332
|
+
position: absolute;
|
|
333
|
+
top: 50%;
|
|
334
|
+
left: 50%;
|
|
335
|
+
transform: translate(-50%, -50%);
|
|
336
|
+
font-size: 3.5rem;
|
|
337
|
+
font-weight: 800;
|
|
338
|
+
letter-spacing: -0.02em;
|
|
339
|
+
color: ${scoreColor};
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.score-label {
|
|
343
|
+
font-size: 0.875rem;
|
|
344
|
+
color: var(--text-tertiary);
|
|
345
|
+
text-transform: uppercase;
|
|
346
|
+
letter-spacing: 0.1em;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
.verdict-card {
|
|
350
|
+
background: var(--bg-secondary);
|
|
351
|
+
border: 1px solid var(--border-primary);
|
|
352
|
+
border-radius: var(--radius-xl);
|
|
353
|
+
padding: var(--space-7);
|
|
354
|
+
display: flex;
|
|
355
|
+
flex-direction: column;
|
|
356
|
+
justify-content: center;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
.verdict-badge {
|
|
360
|
+
display: inline-flex;
|
|
361
|
+
align-items: center;
|
|
362
|
+
gap: var(--space-3);
|
|
363
|
+
padding: var(--space-3) var(--space-5);
|
|
364
|
+
background: ${verdict.bg};
|
|
365
|
+
border-radius: var(--radius-full);
|
|
366
|
+
width: fit-content;
|
|
367
|
+
margin-bottom: var(--space-5);
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
.verdict-icon {
|
|
371
|
+
width: 24px;
|
|
372
|
+
height: 24px;
|
|
373
|
+
border-radius: 50%;
|
|
374
|
+
background: ${verdict.color};
|
|
375
|
+
color: white;
|
|
376
|
+
display: flex;
|
|
377
|
+
align-items: center;
|
|
378
|
+
justify-content: center;
|
|
379
|
+
font-weight: 700;
|
|
380
|
+
font-size: 0.875rem;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
.verdict-text {
|
|
384
|
+
font-size: 1rem;
|
|
385
|
+
font-weight: 700;
|
|
386
|
+
color: ${verdict.color};
|
|
387
|
+
letter-spacing: 0.05em;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
.verdict-summary {
|
|
391
|
+
font-size: 1rem;
|
|
392
|
+
color: var(--text-secondary);
|
|
393
|
+
line-height: 1.7;
|
|
394
|
+
margin-bottom: var(--space-5);
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
.verdict-stats {
|
|
398
|
+
display: grid;
|
|
399
|
+
grid-template-columns: repeat(4, 1fr);
|
|
400
|
+
gap: var(--space-3);
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
.stat-item {
|
|
404
|
+
text-align: center;
|
|
405
|
+
padding: var(--space-3);
|
|
406
|
+
background: var(--bg-tertiary);
|
|
407
|
+
border-radius: var(--radius-md);
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
.stat-value {
|
|
411
|
+
font-size: 1.5rem;
|
|
412
|
+
font-weight: 700;
|
|
413
|
+
color: var(--text-primary);
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
.stat-value.critical { color: var(--color-critical); }
|
|
417
|
+
.stat-value.high { color: var(--color-high); }
|
|
418
|
+
.stat-value.medium { color: var(--color-medium); }
|
|
419
|
+
.stat-value.low { color: var(--color-low); }
|
|
420
|
+
|
|
421
|
+
.stat-label {
|
|
422
|
+
font-size: 0.75rem;
|
|
423
|
+
color: var(--text-tertiary);
|
|
424
|
+
text-transform: uppercase;
|
|
425
|
+
letter-spacing: 0.05em;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
/* ========================================
|
|
429
|
+
CATEGORY SCORES
|
|
430
|
+
======================================== */
|
|
431
|
+
.section {
|
|
432
|
+
margin-bottom: var(--space-7);
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
.section-header {
|
|
436
|
+
display: flex;
|
|
437
|
+
justify-content: space-between;
|
|
438
|
+
align-items: center;
|
|
439
|
+
margin-bottom: var(--space-5);
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
.section-title {
|
|
443
|
+
font-size: 1.25rem;
|
|
444
|
+
font-weight: 600;
|
|
445
|
+
color: var(--text-primary);
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
.section-badge {
|
|
449
|
+
font-size: 0.75rem;
|
|
450
|
+
padding: var(--space-1) var(--space-3);
|
|
451
|
+
background: var(--bg-tertiary);
|
|
452
|
+
border-radius: var(--radius-full);
|
|
453
|
+
color: var(--text-secondary);
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
.categories-grid {
|
|
457
|
+
display: grid;
|
|
458
|
+
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
459
|
+
gap: var(--space-4);
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
.category-card {
|
|
463
|
+
background: var(--bg-secondary);
|
|
464
|
+
border: 1px solid var(--border-primary);
|
|
465
|
+
border-radius: var(--radius-lg);
|
|
466
|
+
padding: var(--space-5);
|
|
467
|
+
transition: var(--transition-fast);
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
.category-card:hover {
|
|
471
|
+
border-color: var(--border-secondary);
|
|
472
|
+
transform: translateY(-2px);
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
.category-header {
|
|
476
|
+
display: flex;
|
|
477
|
+
justify-content: space-between;
|
|
478
|
+
align-items: center;
|
|
479
|
+
margin-bottom: var(--space-3);
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
.category-name {
|
|
483
|
+
font-size: 0.875rem;
|
|
484
|
+
font-weight: 500;
|
|
485
|
+
color: var(--text-secondary);
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
.category-score {
|
|
489
|
+
font-size: 1.25rem;
|
|
490
|
+
font-weight: 700;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
.category-bar {
|
|
494
|
+
height: 6px;
|
|
495
|
+
background: var(--bg-tertiary);
|
|
496
|
+
border-radius: var(--radius-full);
|
|
497
|
+
overflow: hidden;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
.category-bar-fill {
|
|
501
|
+
height: 100%;
|
|
502
|
+
border-radius: var(--radius-full);
|
|
503
|
+
transition: width 1s ease-out;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
/* ========================================
|
|
507
|
+
REALITY MODE SECTION
|
|
508
|
+
======================================== */
|
|
509
|
+
.reality-section {
|
|
510
|
+
background: var(--bg-secondary);
|
|
511
|
+
border: 1px solid var(--border-primary);
|
|
512
|
+
border-radius: var(--radius-xl);
|
|
513
|
+
padding: var(--space-6);
|
|
514
|
+
margin-bottom: var(--space-7);
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
.reality-header {
|
|
518
|
+
display: flex;
|
|
519
|
+
align-items: center;
|
|
520
|
+
gap: var(--space-3);
|
|
521
|
+
margin-bottom: var(--space-5);
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
.reality-icon {
|
|
525
|
+
width: 40px;
|
|
526
|
+
height: 40px;
|
|
527
|
+
background: linear-gradient(135deg, #ec4899 0%, #8b5cf6 100%);
|
|
528
|
+
border-radius: var(--radius-md);
|
|
529
|
+
display: flex;
|
|
530
|
+
align-items: center;
|
|
531
|
+
justify-content: center;
|
|
532
|
+
font-size: 1.25rem;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
.reality-title {
|
|
536
|
+
font-size: 1.25rem;
|
|
537
|
+
font-weight: 600;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
.reality-subtitle {
|
|
541
|
+
font-size: 0.875rem;
|
|
542
|
+
color: var(--text-tertiary);
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
.coverage-grid {
|
|
546
|
+
display: grid;
|
|
547
|
+
grid-template-columns: repeat(4, 1fr);
|
|
548
|
+
gap: var(--space-4);
|
|
549
|
+
margin-bottom: var(--space-6);
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
.coverage-item {
|
|
553
|
+
text-align: center;
|
|
554
|
+
padding: var(--space-4);
|
|
555
|
+
background: var(--bg-tertiary);
|
|
556
|
+
border-radius: var(--radius-lg);
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
.coverage-value {
|
|
560
|
+
font-size: 2rem;
|
|
561
|
+
font-weight: 700;
|
|
562
|
+
background: linear-gradient(135deg, #10b981 0%, #3b82f6 100%);
|
|
563
|
+
-webkit-background-clip: text;
|
|
564
|
+
-webkit-text-fill-color: transparent;
|
|
565
|
+
background-clip: text;
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
.coverage-label {
|
|
569
|
+
font-size: 0.75rem;
|
|
570
|
+
color: var(--text-tertiary);
|
|
571
|
+
margin-top: var(--space-1);
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
/* Broken Flows */
|
|
575
|
+
.broken-flows { margin-top: var(--space-6); }
|
|
576
|
+
|
|
577
|
+
.flow-card {
|
|
578
|
+
background: var(--bg-tertiary);
|
|
579
|
+
border: 1px solid var(--border-primary);
|
|
580
|
+
border-radius: var(--radius-lg);
|
|
581
|
+
padding: var(--space-5);
|
|
582
|
+
margin-bottom: var(--space-4);
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
.flow-header {
|
|
586
|
+
display: flex;
|
|
587
|
+
justify-content: space-between;
|
|
588
|
+
align-items: center;
|
|
589
|
+
margin-bottom: var(--space-4);
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
.flow-title {
|
|
593
|
+
font-size: 1rem;
|
|
594
|
+
font-weight: 600;
|
|
595
|
+
color: var(--text-primary);
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
.flow-severity {
|
|
599
|
+
padding: var(--space-1) var(--space-3);
|
|
600
|
+
border-radius: var(--radius-full);
|
|
601
|
+
font-size: 0.75rem;
|
|
602
|
+
font-weight: 600;
|
|
603
|
+
text-transform: uppercase;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
.flow-severity.block {
|
|
607
|
+
background: rgba(239,68,68,0.15);
|
|
608
|
+
color: var(--color-critical);
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
.flow-steps {
|
|
612
|
+
display: flex;
|
|
613
|
+
align-items: center;
|
|
614
|
+
gap: var(--space-2);
|
|
615
|
+
flex-wrap: wrap;
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
.flow-step {
|
|
619
|
+
display: flex;
|
|
620
|
+
align-items: center;
|
|
621
|
+
gap: var(--space-2);
|
|
622
|
+
padding: var(--space-2) var(--space-3);
|
|
623
|
+
background: var(--bg-secondary);
|
|
624
|
+
border-radius: var(--radius-md);
|
|
625
|
+
font-size: 0.8125rem;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
.flow-step.error {
|
|
629
|
+
background: rgba(239,68,68,0.15);
|
|
630
|
+
color: var(--color-critical);
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
.flow-step-icon {
|
|
634
|
+
width: 16px;
|
|
635
|
+
height: 16px;
|
|
636
|
+
border-radius: 4px;
|
|
637
|
+
display: flex;
|
|
638
|
+
align-items: center;
|
|
639
|
+
justify-content: center;
|
|
640
|
+
font-size: 0.625rem;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
.flow-step-icon.ui { background: #3b82f6; color: white; }
|
|
644
|
+
.flow-step-icon.api { background: #10b981; color: white; }
|
|
645
|
+
.flow-step-icon.form { background: #8b5cf6; color: white; }
|
|
646
|
+
.flow-step-icon.error { background: #ef4444; color: white; }
|
|
647
|
+
|
|
648
|
+
.flow-arrow {
|
|
649
|
+
color: var(--text-muted);
|
|
650
|
+
font-size: 0.75rem;
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
/* ========================================
|
|
654
|
+
FINDINGS TABLE
|
|
655
|
+
======================================== */
|
|
656
|
+
.findings-section {
|
|
657
|
+
background: var(--bg-secondary);
|
|
658
|
+
border: 1px solid var(--border-primary);
|
|
659
|
+
border-radius: var(--radius-xl);
|
|
660
|
+
overflow: hidden;
|
|
661
|
+
margin-bottom: var(--space-7);
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
.findings-header {
|
|
665
|
+
padding: var(--space-5) var(--space-6);
|
|
666
|
+
border-bottom: 1px solid var(--border-primary);
|
|
667
|
+
display: flex;
|
|
668
|
+
justify-content: space-between;
|
|
669
|
+
align-items: center;
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
.findings-title {
|
|
673
|
+
font-size: 1.25rem;
|
|
674
|
+
font-weight: 600;
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
.findings-count {
|
|
678
|
+
font-size: 0.875rem;
|
|
679
|
+
color: var(--text-tertiary);
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
.findings-filters {
|
|
683
|
+
display: flex;
|
|
684
|
+
gap: var(--space-2);
|
|
685
|
+
padding: var(--space-4) var(--space-6);
|
|
686
|
+
border-bottom: 1px solid var(--border-primary);
|
|
687
|
+
background: var(--bg-tertiary);
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
.filter-btn {
|
|
691
|
+
padding: var(--space-2) var(--space-4);
|
|
692
|
+
background: transparent;
|
|
693
|
+
border: 1px solid var(--border-secondary);
|
|
694
|
+
border-radius: var(--radius-full);
|
|
695
|
+
font-size: 0.8125rem;
|
|
696
|
+
color: var(--text-secondary);
|
|
697
|
+
cursor: pointer;
|
|
698
|
+
transition: var(--transition-fast);
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
.filter-btn:hover, .filter-btn.active {
|
|
702
|
+
background: var(--bg-hover);
|
|
703
|
+
color: var(--text-primary);
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
.filter-btn.active {
|
|
707
|
+
border-color: var(--text-primary);
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
.findings-list { max-height: 600px; overflow-y: auto; }
|
|
711
|
+
|
|
712
|
+
.finding-item {
|
|
713
|
+
display: grid;
|
|
714
|
+
grid-template-columns: 80px 1fr auto;
|
|
715
|
+
gap: var(--space-4);
|
|
716
|
+
padding: var(--space-4) var(--space-6);
|
|
717
|
+
border-bottom: 1px solid var(--border-primary);
|
|
718
|
+
transition: var(--transition-fast);
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
.finding-item:hover { background: var(--bg-hover); }
|
|
722
|
+
|
|
723
|
+
.finding-severity {
|
|
724
|
+
display: flex;
|
|
725
|
+
align-items: center;
|
|
726
|
+
justify-content: center;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
.severity-badge {
|
|
730
|
+
padding: var(--space-1) var(--space-3);
|
|
731
|
+
border-radius: var(--radius-full);
|
|
732
|
+
font-size: 0.6875rem;
|
|
733
|
+
font-weight: 700;
|
|
734
|
+
text-transform: uppercase;
|
|
735
|
+
letter-spacing: 0.05em;
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
.severity-badge.critical { background: rgba(239,68,68,0.15); color: var(--color-critical); }
|
|
739
|
+
.severity-badge.high { background: rgba(249,115,22,0.15); color: var(--color-high); }
|
|
740
|
+
.severity-badge.medium, .severity-badge.warn { background: rgba(245,158,11,0.15); color: var(--color-medium); }
|
|
741
|
+
.severity-badge.low, .severity-badge.info { background: rgba(59,130,246,0.15); color: var(--color-low); }
|
|
742
|
+
|
|
743
|
+
.finding-content { min-width: 0; }
|
|
744
|
+
|
|
745
|
+
.finding-title {
|
|
746
|
+
font-size: 0.9375rem;
|
|
747
|
+
font-weight: 500;
|
|
748
|
+
color: var(--text-primary);
|
|
749
|
+
margin-bottom: var(--space-1);
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
.finding-file {
|
|
753
|
+
font-family: var(--font-mono);
|
|
754
|
+
font-size: 0.8125rem;
|
|
755
|
+
color: var(--text-tertiary);
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
.finding-fix {
|
|
759
|
+
font-size: 0.8125rem;
|
|
760
|
+
color: var(--text-secondary);
|
|
761
|
+
max-width: 300px;
|
|
762
|
+
text-align: right;
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
/* ========================================
|
|
766
|
+
FIX ESTIMATES
|
|
767
|
+
======================================== */
|
|
768
|
+
.estimates-section {
|
|
769
|
+
background: var(--bg-secondary);
|
|
770
|
+
border: 1px solid var(--border-primary);
|
|
771
|
+
border-radius: var(--radius-xl);
|
|
772
|
+
padding: var(--space-6);
|
|
773
|
+
margin-bottom: var(--space-7);
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
.estimates-grid {
|
|
777
|
+
display: grid;
|
|
778
|
+
grid-template-columns: repeat(3, 1fr);
|
|
779
|
+
gap: var(--space-5);
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
.estimate-card {
|
|
783
|
+
text-align: center;
|
|
784
|
+
padding: var(--space-5);
|
|
785
|
+
background: var(--bg-tertiary);
|
|
786
|
+
border-radius: var(--radius-lg);
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
.estimate-value {
|
|
790
|
+
font-size: 2rem;
|
|
791
|
+
font-weight: 700;
|
|
792
|
+
background: var(--accent-gradient);
|
|
793
|
+
-webkit-background-clip: text;
|
|
794
|
+
-webkit-text-fill-color: transparent;
|
|
795
|
+
background-clip: text;
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
.estimate-label {
|
|
799
|
+
font-size: 0.875rem;
|
|
800
|
+
color: var(--text-tertiary);
|
|
801
|
+
margin-top: var(--space-1);
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
/* ========================================
|
|
805
|
+
FOOTER
|
|
806
|
+
======================================== */
|
|
807
|
+
.footer {
|
|
808
|
+
text-align: center;
|
|
809
|
+
padding: var(--space-6) 0;
|
|
810
|
+
border-top: 1px solid var(--border-primary);
|
|
811
|
+
color: var(--text-tertiary);
|
|
812
|
+
font-size: 0.875rem;
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
.footer-brand {
|
|
816
|
+
display: flex;
|
|
817
|
+
align-items: center;
|
|
818
|
+
justify-content: center;
|
|
819
|
+
gap: var(--space-2);
|
|
820
|
+
margin-bottom: var(--space-2);
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
.footer-brand svg {
|
|
824
|
+
width: 20px;
|
|
825
|
+
height: 20px;
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
.footer a {
|
|
829
|
+
color: var(--text-secondary);
|
|
830
|
+
text-decoration: none;
|
|
831
|
+
transition: var(--transition-fast);
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
.footer a:hover { color: var(--text-primary); }
|
|
835
|
+
|
|
836
|
+
/* ========================================
|
|
837
|
+
RESPONSIVE
|
|
838
|
+
======================================== */
|
|
839
|
+
@media (max-width: 768px) {
|
|
840
|
+
.hero { grid-template-columns: 1fr; }
|
|
841
|
+
.coverage-grid { grid-template-columns: repeat(2, 1fr); }
|
|
842
|
+
.verdict-stats { grid-template-columns: repeat(2, 1fr); }
|
|
843
|
+
.estimates-grid { grid-template-columns: 1fr; }
|
|
844
|
+
.finding-item { grid-template-columns: 1fr; gap: var(--space-2); }
|
|
845
|
+
.finding-fix { text-align: left; max-width: none; }
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
/* ========================================
|
|
849
|
+
PRINT STYLES
|
|
850
|
+
======================================== */
|
|
851
|
+
@media print {
|
|
852
|
+
body { background: white; color: black; }
|
|
853
|
+
.report-container { max-width: none; padding: 20px; }
|
|
854
|
+
.theme-toggle, .print-btn { display: none; }
|
|
855
|
+
.score-ring-progress { animation: none; stroke-dashoffset: ${565 - (565 * summary.score / 100)}; }
|
|
856
|
+
.findings-list { max-height: none; overflow: visible; }
|
|
857
|
+
.section, .hero, .reality-section, .findings-section, .estimates-section {
|
|
858
|
+
break-inside: avoid;
|
|
859
|
+
page-break-inside: avoid;
|
|
860
|
+
}
|
|
861
|
+
[data-theme="dark"] {
|
|
862
|
+
--bg-primary: white;
|
|
863
|
+
--bg-secondary: #f9fafb;
|
|
864
|
+
--bg-tertiary: #f3f4f6;
|
|
865
|
+
--text-primary: #111827;
|
|
866
|
+
--text-secondary: #4b5563;
|
|
867
|
+
--text-tertiary: #6b7280;
|
|
868
|
+
--border-primary: #e5e7eb;
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
</style>
|
|
872
|
+
</head>
|
|
873
|
+
<body>
|
|
874
|
+
<div class="report-container">
|
|
875
|
+
<!-- HEADER -->
|
|
876
|
+
<header class="header">
|
|
877
|
+
<div class="header-left">
|
|
878
|
+
<div class="logo-container">
|
|
879
|
+
${logo ? `<img src="${logo}" alt="Logo" class="logo">` : ''}
|
|
880
|
+
<span class="brand">${company || 'VibeCheck'}</span>
|
|
881
|
+
</div>
|
|
882
|
+
<h1>Ship Readiness Report</h1>
|
|
883
|
+
<div class="header-meta">
|
|
884
|
+
<span>
|
|
885
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
886
|
+
<path d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"/>
|
|
887
|
+
</svg>
|
|
888
|
+
${meta.projectName}
|
|
889
|
+
</span>
|
|
890
|
+
<span>
|
|
891
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
892
|
+
<circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/>
|
|
893
|
+
</svg>
|
|
894
|
+
${new Date(meta.generatedAt).toLocaleDateString('en-US', { year: 'numeric', month: 'short', day: 'numeric', hour: '2-digit', minute: '2-digit' })}
|
|
895
|
+
</span>
|
|
896
|
+
<span>
|
|
897
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
898
|
+
<rect x="3" y="11" width="18" height="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0110 0v4"/>
|
|
899
|
+
</svg>
|
|
900
|
+
${meta.reportId || 'VC-' + Date.now().toString(36).toUpperCase()}
|
|
901
|
+
</span>
|
|
902
|
+
</div>
|
|
903
|
+
</div>
|
|
904
|
+
<div class="header-right">
|
|
905
|
+
<button class="theme-toggle" onclick="toggleTheme()" title="Toggle theme"></button>
|
|
906
|
+
<button class="print-btn" onclick="window.print()">
|
|
907
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" style="vertical-align: middle; margin-right: 4px;">
|
|
908
|
+
<polyline points="6 9 6 2 18 2 18 9"/><path d="M6 18H4a2 2 0 01-2-2v-5a2 2 0 012-2h16a2 2 0 012 2v5a2 2 0 01-2 2h-2"/><rect x="6" y="14" width="12" height="8"/>
|
|
909
|
+
</svg>
|
|
910
|
+
Print
|
|
911
|
+
</button>
|
|
912
|
+
</div>
|
|
913
|
+
</header>
|
|
914
|
+
|
|
915
|
+
<!-- HERO: SCORE + VERDICT -->
|
|
916
|
+
<section class="hero">
|
|
917
|
+
<div class="score-card">
|
|
918
|
+
<div class="score-ring">
|
|
919
|
+
<svg viewBox="0 0 200 200">
|
|
920
|
+
<defs>
|
|
921
|
+
<linearGradient id="scoreGradient" x1="0%" y1="0%" x2="100%" y2="100%">
|
|
922
|
+
<stop offset="0%" stop-color="${summary.score >= 80 ? '#10b981' : summary.score >= 60 ? '#f59e0b' : '#ef4444'}"/>
|
|
923
|
+
<stop offset="100%" stop-color="${summary.score >= 80 ? '#3b82f6' : summary.score >= 60 ? '#f97316' : '#dc2626'}"/>
|
|
924
|
+
</linearGradient>
|
|
925
|
+
</defs>
|
|
926
|
+
<circle class="score-ring-bg" cx="100" cy="100" r="90"/>
|
|
927
|
+
<circle class="score-ring-progress" cx="100" cy="100" r="90"/>
|
|
928
|
+
</svg>
|
|
929
|
+
<div class="score-value">${summary.score}</div>
|
|
930
|
+
</div>
|
|
931
|
+
<div class="score-label">Overall Score</div>
|
|
932
|
+
</div>
|
|
933
|
+
|
|
934
|
+
<div class="verdict-card">
|
|
935
|
+
<div class="verdict-badge">
|
|
936
|
+
<span class="verdict-icon">${verdict.icon}</span>
|
|
937
|
+
<span class="verdict-text">${verdict.text}</span>
|
|
938
|
+
</div>
|
|
939
|
+
<p class="verdict-summary">${getVerdictSummary(summary.verdict, criticalCount, highCount, mediumCount)}</p>
|
|
940
|
+
<div class="verdict-stats">
|
|
941
|
+
<div class="stat-item">
|
|
942
|
+
<div class="stat-value critical">${criticalCount}</div>
|
|
943
|
+
<div class="stat-label">Critical</div>
|
|
944
|
+
</div>
|
|
945
|
+
<div class="stat-item">
|
|
946
|
+
<div class="stat-value high">${highCount}</div>
|
|
947
|
+
<div class="stat-label">High</div>
|
|
948
|
+
</div>
|
|
949
|
+
<div class="stat-item">
|
|
950
|
+
<div class="stat-value medium">${mediumCount}</div>
|
|
951
|
+
<div class="stat-label">Medium</div>
|
|
952
|
+
</div>
|
|
953
|
+
<div class="stat-item">
|
|
954
|
+
<div class="stat-value low">${lowCount}</div>
|
|
955
|
+
<div class="stat-label">Low</div>
|
|
956
|
+
</div>
|
|
957
|
+
</div>
|
|
958
|
+
</div>
|
|
959
|
+
</section>
|
|
960
|
+
|
|
961
|
+
${categories.length > 0 ? `
|
|
962
|
+
<!-- CATEGORY SCORES -->
|
|
963
|
+
<section class="section">
|
|
964
|
+
<div class="section-header">
|
|
965
|
+
<h2 class="section-title">Category Breakdown</h2>
|
|
966
|
+
<span class="section-badge">${categories.length} categories</span>
|
|
967
|
+
</div>
|
|
968
|
+
<div class="categories-grid">
|
|
969
|
+
${categories.map(([name, score]) => {
|
|
970
|
+
const color = score >= 80 ? 'var(--color-success)' : score >= 60 ? 'var(--color-medium)' : 'var(--color-critical)';
|
|
971
|
+
return `
|
|
972
|
+
<div class="category-card">
|
|
973
|
+
<div class="category-header">
|
|
974
|
+
<span class="category-name">${formatCategoryName(name)}</span>
|
|
975
|
+
<span class="category-score" style="color: ${color}">${score}%</span>
|
|
976
|
+
</div>
|
|
977
|
+
<div class="category-bar">
|
|
978
|
+
<div class="category-bar-fill" style="width: ${score}%; background: ${color}"></div>
|
|
979
|
+
</div>
|
|
980
|
+
</div>
|
|
981
|
+
`;
|
|
982
|
+
}).join('')}
|
|
983
|
+
</div>
|
|
984
|
+
</section>
|
|
985
|
+
` : ''}
|
|
986
|
+
|
|
987
|
+
${hasReality ? `
|
|
988
|
+
<!-- REALITY MODE -->
|
|
989
|
+
<section class="reality-section">
|
|
990
|
+
<div class="reality-header">
|
|
991
|
+
<div class="reality-icon">๐ฌ</div>
|
|
992
|
+
<div>
|
|
993
|
+
<h2 class="reality-title">Reality Mode</h2>
|
|
994
|
+
<p class="reality-subtitle">Runtime validation results from Playwright testing</p>
|
|
995
|
+
</div>
|
|
996
|
+
</div>
|
|
997
|
+
|
|
998
|
+
${Object.keys(coverage).length > 0 ? `
|
|
999
|
+
<div class="coverage-grid">
|
|
1000
|
+
${coverage.clientCallsMapped !== undefined ? `
|
|
1001
|
+
<div class="coverage-item">
|
|
1002
|
+
<div class="coverage-value">${coverage.clientCallsMapped}%</div>
|
|
1003
|
+
<div class="coverage-label">API Coverage</div>
|
|
1004
|
+
</div>
|
|
1005
|
+
` : ''}
|
|
1006
|
+
${coverage.uiActionsVerified !== undefined ? `
|
|
1007
|
+
<div class="coverage-item">
|
|
1008
|
+
<div class="coverage-value">${coverage.uiActionsVerified}%</div>
|
|
1009
|
+
<div class="coverage-label">UI Actions Verified</div>
|
|
1010
|
+
</div>
|
|
1011
|
+
` : ''}
|
|
1012
|
+
${coverage.authRoutes !== undefined ? `
|
|
1013
|
+
<div class="coverage-item">
|
|
1014
|
+
<div class="coverage-value">${coverage.authRoutes}%</div>
|
|
1015
|
+
<div class="coverage-label">Auth Routes</div>
|
|
1016
|
+
</div>
|
|
1017
|
+
` : ''}
|
|
1018
|
+
${reality.latencyP95 !== undefined ? `
|
|
1019
|
+
<div class="coverage-item">
|
|
1020
|
+
<div class="coverage-value">${reality.latencyP95}ms</div>
|
|
1021
|
+
<div class="coverage-label">P95 Latency</div>
|
|
1022
|
+
</div>
|
|
1023
|
+
` : ''}
|
|
1024
|
+
</div>
|
|
1025
|
+
` : ''}
|
|
1026
|
+
|
|
1027
|
+
${brokenFlows.length > 0 ? `
|
|
1028
|
+
<div class="broken-flows">
|
|
1029
|
+
<h3 style="font-size: 1rem; font-weight: 600; margin-bottom: var(--space-4); color: var(--color-critical);">
|
|
1030
|
+
๐จ Broken Flows Detected (${brokenFlows.length})
|
|
1031
|
+
</h3>
|
|
1032
|
+
${brokenFlows.slice(0, 5).map(flow => `
|
|
1033
|
+
<div class="flow-card">
|
|
1034
|
+
<div class="flow-header">
|
|
1035
|
+
<span class="flow-title">${flow.title}</span>
|
|
1036
|
+
<span class="flow-severity ${(flow.severity || 'block').toLowerCase()}">${flow.severity || 'BLOCK'}</span>
|
|
1037
|
+
</div>
|
|
1038
|
+
<div class="flow-steps">
|
|
1039
|
+
${(flow.steps || []).map((step, i) => `
|
|
1040
|
+
${i > 0 ? '<span class="flow-arrow">โ</span>' : ''}
|
|
1041
|
+
<div class="flow-step ${step.type === 'error' ? 'error' : ''}">
|
|
1042
|
+
<span class="flow-step-icon ${step.type}">${getStepIcon(step.type)}</span>
|
|
1043
|
+
<span>${step.label}</span>
|
|
1044
|
+
</div>
|
|
1045
|
+
`).join('')}
|
|
1046
|
+
</div>
|
|
1047
|
+
</div>
|
|
1048
|
+
`).join('')}
|
|
1049
|
+
</div>
|
|
1050
|
+
` : ''}
|
|
1051
|
+
</section>
|
|
1052
|
+
` : ''}
|
|
1053
|
+
|
|
1054
|
+
<!-- FINDINGS -->
|
|
1055
|
+
<section class="findings-section">
|
|
1056
|
+
<div class="findings-header">
|
|
1057
|
+
<h2 class="findings-title">Security Findings</h2>
|
|
1058
|
+
<span class="findings-count">${totalFindings} total findings</span>
|
|
1059
|
+
</div>
|
|
1060
|
+
<div class="findings-filters">
|
|
1061
|
+
<button class="filter-btn active" data-filter="all">All</button>
|
|
1062
|
+
<button class="filter-btn" data-filter="critical">Critical (${criticalCount})</button>
|
|
1063
|
+
<button class="filter-btn" data-filter="high">High (${highCount})</button>
|
|
1064
|
+
<button class="filter-btn" data-filter="medium">Medium (${mediumCount})</button>
|
|
1065
|
+
<button class="filter-btn" data-filter="low">Low (${lowCount})</button>
|
|
1066
|
+
</div>
|
|
1067
|
+
<div class="findings-list">
|
|
1068
|
+
${findings.slice(0, opts.maxFindings || 50).map(f => {
|
|
1069
|
+
const sev = normalizeSeverity(f.severity);
|
|
1070
|
+
const file = redactPaths && f.file ? redactPath(f.file) : f.file;
|
|
1071
|
+
return `
|
|
1072
|
+
<div class="finding-item" data-severity="${sev}">
|
|
1073
|
+
<div class="finding-severity">
|
|
1074
|
+
<span class="severity-badge ${sev}">${sev}</span>
|
|
1075
|
+
</div>
|
|
1076
|
+
<div class="finding-content">
|
|
1077
|
+
<div class="finding-title">${escapeHtml(f.title || f.message || 'Unknown finding')}</div>
|
|
1078
|
+
${file ? `<div class="finding-file">${escapeHtml(file)}${f.line ? `:${f.line}` : ''}</div>` : ''}
|
|
1079
|
+
</div>
|
|
1080
|
+
${f.fix ? `<div class="finding-fix">${escapeHtml(f.fix)}</div>` : ''}
|
|
1081
|
+
</div>
|
|
1082
|
+
`;
|
|
1083
|
+
}).join('')}
|
|
1084
|
+
</div>
|
|
1085
|
+
</section>
|
|
1086
|
+
|
|
1087
|
+
<!-- FIX ESTIMATES -->
|
|
1088
|
+
<section class="estimates-section">
|
|
1089
|
+
<div class="section-header">
|
|
1090
|
+
<h2 class="section-title">Remediation Estimate</h2>
|
|
1091
|
+
</div>
|
|
1092
|
+
<div class="estimates-grid">
|
|
1093
|
+
<div class="estimate-card">
|
|
1094
|
+
<div class="estimate-value">${fixEstimates?.humanReadable || calculateFixTime(findings)}</div>
|
|
1095
|
+
<div class="estimate-label">Estimated Fix Time</div>
|
|
1096
|
+
</div>
|
|
1097
|
+
<div class="estimate-card">
|
|
1098
|
+
<div class="estimate-value">${criticalCount + highCount}</div>
|
|
1099
|
+
<div class="estimate-label">Priority Items</div>
|
|
1100
|
+
</div>
|
|
1101
|
+
<div class="estimate-card">
|
|
1102
|
+
<div class="estimate-value">${Math.round(summary.score * 1.1)}%</div>
|
|
1103
|
+
<div class="estimate-label">Projected Score After Fix</div>
|
|
1104
|
+
</div>
|
|
1105
|
+
</div>
|
|
1106
|
+
</section>
|
|
1107
|
+
|
|
1108
|
+
<!-- FOOTER -->
|
|
1109
|
+
<footer class="footer">
|
|
1110
|
+
<div class="footer-brand">
|
|
1111
|
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
1112
|
+
<path d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"/>
|
|
1113
|
+
</svg>
|
|
1114
|
+
<span>Generated by <strong>VibeCheck</strong></span>
|
|
1115
|
+
</div>
|
|
1116
|
+
<p>
|
|
1117
|
+
<a href="https://vibecheck.dev">vibecheck.dev</a> ยท
|
|
1118
|
+
Report ID: ${meta.reportId || 'VC-' + Date.now().toString(36).toUpperCase()}
|
|
1119
|
+
</p>
|
|
1120
|
+
</footer>
|
|
1121
|
+
</div>
|
|
1122
|
+
|
|
1123
|
+
<script>
|
|
1124
|
+
// Theme Toggle
|
|
1125
|
+
function toggleTheme() {
|
|
1126
|
+
const html = document.documentElement;
|
|
1127
|
+
const newTheme = html.getAttribute('data-theme') === 'dark' ? 'light' : 'dark';
|
|
1128
|
+
html.setAttribute('data-theme', newTheme);
|
|
1129
|
+
try { localStorage.setItem('vibecheck-theme', newTheme); } catch(e) {}
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
// Restore theme
|
|
1133
|
+
try {
|
|
1134
|
+
const saved = localStorage.getItem('vibecheck-theme');
|
|
1135
|
+
if (saved) document.documentElement.setAttribute('data-theme', saved);
|
|
1136
|
+
} catch(e) {}
|
|
1137
|
+
|
|
1138
|
+
// Filter functionality
|
|
1139
|
+
document.querySelectorAll('.filter-btn').forEach(btn => {
|
|
1140
|
+
btn.addEventListener('click', () => {
|
|
1141
|
+
document.querySelectorAll('.filter-btn').forEach(b => b.classList.remove('active'));
|
|
1142
|
+
btn.classList.add('active');
|
|
1143
|
+
|
|
1144
|
+
const filter = btn.dataset.filter;
|
|
1145
|
+
document.querySelectorAll('.finding-item').forEach(item => {
|
|
1146
|
+
if (filter === 'all' || item.dataset.severity === filter) {
|
|
1147
|
+
item.style.display = '';
|
|
1148
|
+
} else {
|
|
1149
|
+
item.style.display = 'none';
|
|
1150
|
+
}
|
|
1151
|
+
});
|
|
1152
|
+
});
|
|
1153
|
+
});
|
|
1154
|
+
</script>
|
|
1155
|
+
</body>
|
|
1156
|
+
</html>`;
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1159
|
+
// Helper functions
|
|
1160
|
+
function getVerdictSummary(verdict, critical, high, medium) {
|
|
1161
|
+
if (verdict === "SHIP") {
|
|
1162
|
+
return "Your application has passed all critical checks and is ready for production deployment. No blocking issues were identified during the security scan.";
|
|
1163
|
+
} else if (verdict === "WARN") {
|
|
1164
|
+
const issues = [];
|
|
1165
|
+
if (critical > 0) issues.push(`${critical} critical`);
|
|
1166
|
+
if (high > 0) issues.push(`${high} high priority`);
|
|
1167
|
+
if (medium > 0) issues.push(`${medium} medium priority`);
|
|
1168
|
+
return `Your application has ${issues.join(', ')} issue${critical + high + medium > 1 ? 's' : ''} that should be addressed before deployment. Review the findings below and prioritize fixes based on severity.`;
|
|
1169
|
+
} else {
|
|
1170
|
+
return `Your application has ${critical} critical issue${critical !== 1 ? 's' : ''} that must be resolved before deployment. These represent potential security vulnerabilities or broken functionality that would impact production users.`;
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1174
|
+
function formatCategoryName(cat) {
|
|
1175
|
+
const names = {
|
|
1176
|
+
security: "Security",
|
|
1177
|
+
auth: "Authentication",
|
|
1178
|
+
billing: "Billing & Payments",
|
|
1179
|
+
routes: "Route Integrity",
|
|
1180
|
+
env: "Environment Config",
|
|
1181
|
+
quality: "Code Quality",
|
|
1182
|
+
mock: "Mock Data",
|
|
1183
|
+
error: "Error Handling",
|
|
1184
|
+
};
|
|
1185
|
+
return names[cat] || cat.charAt(0).toUpperCase() + cat.slice(1).replace(/_/g, " ");
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
function normalizeSeverity(sev) {
|
|
1189
|
+
const s = (sev || '').toLowerCase();
|
|
1190
|
+
if (s === 'block' || s === 'critical') return 'critical';
|
|
1191
|
+
if (s === 'high') return 'high';
|
|
1192
|
+
if (s === 'warn' || s === 'medium' || s === 'warning') return 'medium';
|
|
1193
|
+
return 'low';
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1196
|
+
function getStepIcon(type) {
|
|
1197
|
+
const icons = { ui: '๐ฑ', api: 'โก', form: '๐', error: 'โ' };
|
|
1198
|
+
return icons[type] || 'โข';
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
function redactPath(path) {
|
|
1202
|
+
if (!path) return path;
|
|
1203
|
+
const parts = path.split('/');
|
|
1204
|
+
if (parts.length <= 2) return path;
|
|
1205
|
+
return '.../' + parts.slice(-2).join('/');
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
function escapeHtml(str) {
|
|
1209
|
+
if (!str) return '';
|
|
1210
|
+
return String(str)
|
|
1211
|
+
.replace(/&/g, '&')
|
|
1212
|
+
.replace(/</g, '<')
|
|
1213
|
+
.replace(/>/g, '>')
|
|
1214
|
+
.replace(/"/g, '"');
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
function calculateFixTime(findings) {
|
|
1218
|
+
if (!findings || findings.length === 0) return '0h';
|
|
1219
|
+
|
|
1220
|
+
const minutes = findings.reduce((total, f) => {
|
|
1221
|
+
const sev = normalizeSeverity(f.severity);
|
|
1222
|
+
const time = { critical: 60, high: 45, medium: 20, low: 10 };
|
|
1223
|
+
return total + (time[sev] || 15);
|
|
1224
|
+
}, 0);
|
|
1225
|
+
|
|
1226
|
+
if (minutes < 60) return `${minutes}m`;
|
|
1227
|
+
const hours = Math.round(minutes / 60 * 10) / 10;
|
|
1228
|
+
return hours > 8 ? `${Math.ceil(hours / 8)}d` : `${hours}h`;
|
|
1229
|
+
}
|
|
1230
|
+
|
|
1231
|
+
module.exports = {
|
|
1232
|
+
generateWorldClassHTML,
|
|
1233
|
+
};
|