kirograph 0.17.0 → 0.20.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/LICENSE +1 -1
- package/README.md +105 -1822
- package/dist/architecture/layers/dart.d.ts +10 -0
- package/dist/architecture/layers/dart.d.ts.map +1 -0
- package/dist/architecture/layers/dart.js +112 -0
- package/dist/architecture/layers/dart.js.map +7 -0
- package/dist/architecture/layers/elixir.d.ts +6 -0
- package/dist/architecture/layers/elixir.d.ts.map +1 -0
- package/dist/architecture/layers/index.d.ts.map +1 -1
- package/dist/architecture/layers/index.js +3 -1
- package/dist/architecture/layers/index.js.map +2 -2
- package/dist/architecture/layers/ocaml.d.ts +6 -0
- package/dist/architecture/layers/ocaml.d.ts.map +1 -0
- package/dist/architecture/layers/scala.d.ts +6 -0
- package/dist/architecture/layers/scala.d.ts.map +1 -0
- package/dist/architecture/layers/solidity.d.ts +6 -0
- package/dist/architecture/layers/solidity.d.ts.map +1 -0
- package/dist/architecture/layers/vue.d.ts +6 -0
- package/dist/architecture/layers/vue.d.ts.map +1 -0
- package/dist/architecture/manifest/elm.d.ts +3 -0
- package/dist/architecture/manifest/elm.d.ts.map +1 -0
- package/dist/architecture/manifest/index.d.ts.map +1 -1
- package/dist/architecture/manifest/ocaml.d.ts +3 -0
- package/dist/architecture/manifest/ocaml.d.ts.map +1 -0
- package/dist/architecture/manifest/scala.d.ts +3 -0
- package/dist/architecture/manifest/scala.d.ts.map +1 -0
- package/dist/bin/banner.d.ts.map +1 -1
- package/dist/bin/banner.js +74 -6
- package/dist/bin/banner.js.map +2 -2
- package/dist/bin/commands/affected.d.ts.map +1 -1
- package/dist/bin/commands/attack-surface.d.ts +3 -0
- package/dist/bin/commands/attack-surface.d.ts.map +1 -0
- package/dist/bin/commands/attack-surface.js +164 -0
- package/dist/bin/commands/attack-surface.js.map +7 -0
- package/dist/bin/commands/benchmark.d.ts +9 -0
- package/dist/bin/commands/benchmark.d.ts.map +1 -0
- package/dist/bin/commands/benchmark.js +206 -0
- package/dist/bin/commands/benchmark.js.map +7 -0
- package/dist/bin/commands/budget.d.ts +6 -0
- package/dist/bin/commands/budget.d.ts.map +1 -0
- package/dist/bin/commands/budget.js +70 -0
- package/dist/bin/commands/budget.js.map +7 -0
- package/dist/bin/commands/caveman.d.ts +7 -0
- package/dist/bin/commands/caveman.d.ts.map +1 -0
- package/dist/bin/commands/communities.d.ts +3 -0
- package/dist/bin/commands/communities.d.ts.map +1 -0
- package/dist/bin/commands/communities.js +77 -0
- package/dist/bin/commands/communities.js.map +7 -0
- package/dist/bin/commands/compression.d.ts +7 -0
- package/dist/bin/commands/compression.d.ts.map +1 -0
- package/dist/bin/commands/context.d.ts.map +1 -1
- package/dist/bin/commands/data.d.ts +3 -0
- package/dist/bin/commands/data.d.ts.map +1 -0
- package/dist/bin/commands/dead-code.d.ts +3 -0
- package/dist/bin/commands/dead-code.d.ts.map +1 -0
- package/dist/bin/commands/dep-confusion.d.ts +3 -0
- package/dist/bin/commands/dep-confusion.d.ts.map +1 -0
- package/dist/bin/commands/dep-confusion.js +119 -0
- package/dist/bin/commands/dep-confusion.js.map +7 -0
- package/dist/bin/commands/docs.d.ts +3 -0
- package/dist/bin/commands/docs.d.ts.map +1 -0
- package/dist/bin/commands/exec.d.ts +11 -0
- package/dist/bin/commands/exec.d.ts.map +1 -0
- package/dist/bin/commands/export.d.ts +3 -0
- package/dist/bin/commands/export.d.ts.map +1 -0
- package/dist/bin/commands/export.js +304 -10
- package/dist/bin/commands/export.js.map +2 -2
- package/dist/bin/commands/flows.d.ts +3 -0
- package/dist/bin/commands/flows.d.ts.map +1 -0
- package/dist/bin/commands/flows.js +97 -0
- package/dist/bin/commands/flows.js.map +7 -0
- package/dist/bin/commands/gain.d.ts +6 -0
- package/dist/bin/commands/gain.d.ts.map +1 -0
- package/dist/bin/commands/help.d.ts +7 -0
- package/dist/bin/commands/help.d.ts.map +1 -1
- package/dist/bin/commands/help.js +399 -101
- package/dist/bin/commands/help.js.map +2 -2
- package/dist/bin/commands/hotspots.d.ts +3 -0
- package/dist/bin/commands/hotspots.d.ts.map +1 -0
- package/dist/bin/commands/hotspots.js +94 -1
- package/dist/bin/commands/hotspots.js.map +3 -3
- package/dist/bin/commands/install.d.ts.map +1 -1
- package/dist/bin/commands/install.js +90 -8
- package/dist/bin/commands/install.js.map +2 -2
- package/dist/bin/commands/licenses.d.ts +3 -0
- package/dist/bin/commands/licenses.d.ts.map +1 -0
- package/dist/bin/commands/licenses.js +201 -0
- package/dist/bin/commands/licenses.js.map +7 -0
- package/dist/bin/commands/memory.d.ts +16 -0
- package/dist/bin/commands/memory.d.ts.map +1 -0
- package/dist/bin/commands/memory.js +151 -4
- package/dist/bin/commands/memory.js.map +2 -2
- package/dist/bin/commands/path.d.ts +3 -0
- package/dist/bin/commands/path.d.ts.map +1 -0
- package/dist/bin/commands/pattern.d.ts +3 -0
- package/dist/bin/commands/pattern.d.ts.map +1 -0
- package/dist/bin/commands/pattern.js +592 -0
- package/dist/bin/commands/pattern.js.map +7 -0
- package/dist/bin/commands/query.d.ts.map +1 -1
- package/dist/bin/commands/reachability.d.ts +3 -0
- package/dist/bin/commands/reachability.d.ts.map +1 -0
- package/dist/bin/commands/reachability.js +160 -0
- package/dist/bin/commands/reachability.js.map +7 -0
- package/dist/bin/commands/read.d.ts +6 -0
- package/dist/bin/commands/read.d.ts.map +1 -0
- package/dist/bin/commands/read.js +100 -0
- package/dist/bin/commands/read.js.map +7 -0
- package/dist/bin/commands/refactor.d.ts +3 -0
- package/dist/bin/commands/refactor.d.ts.map +1 -0
- package/dist/bin/commands/refactor.js +116 -0
- package/dist/bin/commands/refactor.js.map +7 -0
- package/dist/bin/commands/remediation.d.ts +3 -0
- package/dist/bin/commands/remediation.d.ts.map +1 -0
- package/dist/bin/commands/remediation.js +133 -0
- package/dist/bin/commands/remediation.js.map +7 -0
- package/dist/bin/commands/sbom.d.ts +3 -0
- package/dist/bin/commands/sbom.d.ts.map +1 -0
- package/dist/bin/commands/sbom.js +76 -0
- package/dist/bin/commands/sbom.js.map +7 -0
- package/dist/bin/commands/security-ci-report.d.ts +9 -0
- package/dist/bin/commands/security-ci-report.d.ts.map +1 -0
- package/dist/bin/commands/security-ci-report.js +267 -0
- package/dist/bin/commands/security-ci-report.js.map +7 -0
- package/dist/bin/commands/security-export.d.ts +2 -0
- package/dist/bin/commands/security-export.d.ts.map +1 -0
- package/dist/bin/commands/security-export.js +1349 -0
- package/dist/bin/commands/security-export.js.map +7 -0
- package/dist/bin/commands/security-flows.d.ts +3 -0
- package/dist/bin/commands/security-flows.d.ts.map +1 -0
- package/dist/bin/commands/security-flows.js +126 -0
- package/dist/bin/commands/security-flows.js.map +7 -0
- package/dist/bin/commands/security-secrets.d.ts +3 -0
- package/dist/bin/commands/security-secrets.d.ts.map +1 -0
- package/dist/bin/commands/security-secrets.js +170 -0
- package/dist/bin/commands/security-secrets.js.map +7 -0
- package/dist/bin/commands/security.d.ts +3 -0
- package/dist/bin/commands/security.d.ts.map +1 -0
- package/dist/bin/commands/security.js +208 -0
- package/dist/bin/commands/security.js.map +7 -0
- package/dist/bin/commands/snapshot.d.ts +3 -0
- package/dist/bin/commands/snapshot.d.ts.map +1 -0
- package/dist/bin/commands/staleness.d.ts +3 -0
- package/dist/bin/commands/staleness.d.ts.map +1 -0
- package/dist/bin/commands/staleness.js +144 -0
- package/dist/bin/commands/staleness.js.map +7 -0
- package/dist/bin/commands/status.d.ts.map +1 -1
- package/dist/bin/commands/status.js +129 -2
- package/dist/bin/commands/status.js.map +2 -2
- package/dist/bin/commands/supply-chain.d.ts +3 -0
- package/dist/bin/commands/supply-chain.d.ts.map +1 -0
- package/dist/bin/commands/supply-chain.js +138 -0
- package/dist/bin/commands/supply-chain.js.map +7 -0
- package/dist/bin/commands/surprising.d.ts +3 -0
- package/dist/bin/commands/surprising.d.ts.map +1 -0
- package/dist/bin/commands/sync.d.ts.map +1 -1
- package/dist/bin/commands/uninit.d.ts.map +1 -1
- package/dist/bin/commands/uninit.js +109 -60
- package/dist/bin/commands/uninit.js.map +2 -2
- package/dist/bin/commands/utils.d.ts +5 -0
- package/dist/bin/commands/utils.d.ts.map +1 -1
- package/dist/bin/commands/vex.d.ts +3 -0
- package/dist/bin/commands/vex.d.ts.map +1 -0
- package/dist/bin/commands/vex.js +76 -0
- package/dist/bin/commands/vex.js.map +7 -0
- package/dist/bin/commands/vuln-suppress.d.ts +3 -0
- package/dist/bin/commands/vuln-suppress.d.ts.map +1 -0
- package/dist/bin/commands/vuln-suppress.js +95 -0
- package/dist/bin/commands/vuln-suppress.js.map +7 -0
- package/dist/bin/commands/vulns.d.ts +3 -0
- package/dist/bin/commands/vulns.d.ts.map +1 -0
- package/dist/bin/commands/vulns.js +382 -0
- package/dist/bin/commands/vulns.js.map +7 -0
- package/dist/bin/installer/archive.d.ts +47 -0
- package/dist/bin/installer/archive.d.ts.map +1 -0
- package/dist/bin/installer/auto-detect.d.ts +16 -0
- package/dist/bin/installer/auto-detect.d.ts.map +1 -0
- package/dist/bin/installer/auto-detect.js +125 -0
- package/dist/bin/installer/auto-detect.js.map +7 -0
- package/dist/bin/installer/caveman.d.ts +12 -0
- package/dist/bin/installer/caveman.d.ts.map +1 -0
- package/dist/bin/installer/cli-agent.d.ts +7 -2
- package/dist/bin/installer/cli-agent.d.ts.map +1 -1
- package/dist/bin/installer/cli-agent.js +32 -5
- package/dist/bin/installer/cli-agent.js.map +2 -2
- package/dist/bin/installer/common.d.ts +36 -0
- package/dist/bin/installer/common.d.ts.map +1 -0
- package/dist/bin/installer/common.js +48 -0
- package/dist/bin/installer/common.js.map +2 -2
- package/dist/bin/installer/config-prompt.d.ts +1 -1
- package/dist/bin/installer/config-prompt.d.ts.map +1 -1
- package/dist/bin/installer/config-prompt.js +85 -2
- package/dist/bin/installer/config-prompt.js.map +2 -2
- package/dist/bin/installer/dashboard.d.ts.map +1 -1
- package/dist/bin/installer/detect.d.ts +30 -0
- package/dist/bin/installer/detect.d.ts.map +1 -0
- package/dist/bin/installer/detect.js +309 -0
- package/dist/bin/installer/detect.js.map +7 -0
- package/dist/bin/installer/hooks.d.ts +4 -1
- package/dist/bin/installer/hooks.d.ts.map +1 -1
- package/dist/bin/installer/hooks.js +34 -0
- package/dist/bin/installer/hooks.js.map +2 -2
- package/dist/bin/installer/index.d.ts +5 -4
- package/dist/bin/installer/index.d.ts.map +1 -1
- package/dist/bin/installer/index.js +46 -8
- package/dist/bin/installer/index.js.map +2 -2
- package/dist/bin/installer/instructions.d.ts +14 -0
- package/dist/bin/installer/instructions.d.ts.map +1 -0
- package/dist/bin/installer/instructions.js +209 -3
- package/dist/bin/installer/instructions.js.map +2 -2
- package/dist/bin/installer/mcp.d.ts.map +1 -1
- package/dist/bin/installer/prompts.d.ts +17 -0
- package/dist/bin/installer/prompts.d.ts.map +1 -1
- package/dist/bin/installer/qdrant-dashboard.d.ts.map +1 -1
- package/dist/bin/installer/steering.d.ts +14 -2
- package/dist/bin/installer/steering.d.ts.map +1 -1
- package/dist/bin/installer/steering.js +488 -0
- package/dist/bin/installer/steering.js.map +2 -2
- package/dist/bin/installer/targets/aider.d.ts +6 -0
- package/dist/bin/installer/targets/aider.d.ts.map +1 -0
- package/dist/bin/installer/targets/aider.js +3 -3
- package/dist/bin/installer/targets/aider.js.map +2 -2
- package/dist/bin/installer/targets/amp.d.ts +6 -0
- package/dist/bin/installer/targets/amp.d.ts.map +1 -0
- package/dist/bin/installer/targets/amp.js +3 -3
- package/dist/bin/installer/targets/amp.js.map +2 -2
- package/dist/bin/installer/targets/antigravity.d.ts +13 -0
- package/dist/bin/installer/targets/antigravity.d.ts.map +1 -0
- package/dist/bin/installer/targets/antigravity.js +35 -6
- package/dist/bin/installer/targets/antigravity.js.map +2 -2
- package/dist/bin/installer/targets/augment.d.ts +6 -0
- package/dist/bin/installer/targets/augment.d.ts.map +1 -0
- package/dist/bin/installer/targets/augment.js +3 -3
- package/dist/bin/installer/targets/augment.js.map +2 -2
- package/dist/bin/installer/targets/claude.d.ts +6 -0
- package/dist/bin/installer/targets/claude.d.ts.map +1 -0
- package/dist/bin/installer/targets/claude.js +49 -5
- package/dist/bin/installer/targets/claude.js.map +2 -2
- package/dist/bin/installer/targets/cline.d.ts +13 -0
- package/dist/bin/installer/targets/cline.d.ts.map +1 -0
- package/dist/bin/installer/targets/cline.js +32 -6
- package/dist/bin/installer/targets/cline.js.map +2 -2
- package/dist/bin/installer/targets/codex.d.ts +6 -0
- package/dist/bin/installer/targets/codex.d.ts.map +1 -0
- package/dist/bin/installer/targets/codex.js +64 -12
- package/dist/bin/installer/targets/codex.js.map +2 -2
- package/dist/bin/installer/targets/continue.d.ts +12 -0
- package/dist/bin/installer/targets/continue.d.ts.map +1 -0
- package/dist/bin/installer/targets/continue.js +2 -2
- package/dist/bin/installer/targets/continue.js.map +2 -2
- package/dist/bin/installer/targets/copilot-cli.d.ts +12 -0
- package/dist/bin/installer/targets/copilot-cli.d.ts.map +1 -0
- package/dist/bin/installer/targets/copilot-cli.js +101 -0
- package/dist/bin/installer/targets/copilot-cli.js.map +7 -0
- package/dist/bin/installer/targets/copilot.d.ts +6 -0
- package/dist/bin/installer/targets/copilot.d.ts.map +1 -0
- package/dist/bin/installer/targets/copilot.js +31 -5
- package/dist/bin/installer/targets/copilot.js.map +2 -2
- package/dist/bin/installer/targets/cursor.d.ts +6 -0
- package/dist/bin/installer/targets/cursor.d.ts.map +1 -0
- package/dist/bin/installer/targets/cursor.js +4 -4
- package/dist/bin/installer/targets/cursor.js.map +2 -2
- package/dist/bin/installer/targets/devin.d.ts +13 -0
- package/dist/bin/installer/targets/devin.d.ts.map +1 -0
- package/dist/bin/installer/targets/devin.js +2 -2
- package/dist/bin/installer/targets/devin.js.map +2 -2
- package/dist/bin/installer/targets/gemini-cli.d.ts +16 -0
- package/dist/bin/installer/targets/gemini-cli.d.ts.map +1 -0
- package/dist/bin/installer/targets/gemini-cli.js +2 -2
- package/dist/bin/installer/targets/gemini-cli.js.map +2 -2
- package/dist/bin/installer/targets/generic.d.ts +59 -0
- package/dist/bin/installer/targets/generic.d.ts.map +1 -0
- package/dist/bin/installer/targets/generic.js +2 -14
- package/dist/bin/installer/targets/generic.js.map +2 -2
- package/dist/bin/installer/targets/goose.d.ts +6 -0
- package/dist/bin/installer/targets/goose.d.ts.map +1 -0
- package/dist/bin/installer/targets/goose.js +3 -3
- package/dist/bin/installer/targets/goose.js.map +2 -2
- package/dist/bin/installer/targets/index.d.ts +11 -0
- package/dist/bin/installer/targets/index.d.ts.map +1 -0
- package/dist/bin/installer/targets/index.js +250 -0
- package/dist/bin/installer/targets/index.js.map +2 -2
- package/dist/bin/installer/targets/junie.d.ts +13 -0
- package/dist/bin/installer/targets/junie.d.ts.map +1 -0
- package/dist/bin/installer/targets/junie.js +2 -2
- package/dist/bin/installer/targets/junie.js.map +2 -2
- package/dist/bin/installer/targets/kilo.d.ts +12 -0
- package/dist/bin/installer/targets/kilo.d.ts.map +1 -0
- package/dist/bin/installer/targets/kilo.js +2 -2
- package/dist/bin/installer/targets/kilo.js.map +2 -2
- package/dist/bin/installer/targets/kiro.d.ts +5 -0
- package/dist/bin/installer/targets/kiro.d.ts.map +1 -0
- package/dist/bin/installer/targets/kiro.js +4 -4
- package/dist/bin/installer/targets/kiro.js.map +2 -2
- package/dist/bin/installer/targets/opencode.d.ts +13 -0
- package/dist/bin/installer/targets/opencode.d.ts.map +1 -0
- package/dist/bin/installer/targets/opencode.js +2 -2
- package/dist/bin/installer/targets/opencode.js.map +2 -2
- package/dist/bin/installer/targets/openhands.d.ts +6 -0
- package/dist/bin/installer/targets/openhands.d.ts.map +1 -0
- package/dist/bin/installer/targets/openhands.js +3 -3
- package/dist/bin/installer/targets/openhands.js.map +2 -2
- package/dist/bin/installer/targets/qoder.d.ts +12 -0
- package/dist/bin/installer/targets/qoder.d.ts.map +1 -0
- package/dist/bin/installer/targets/qoder.js +91 -0
- package/dist/bin/installer/targets/qoder.js.map +7 -0
- package/dist/bin/installer/targets/qwen.d.ts +12 -0
- package/dist/bin/installer/targets/qwen.d.ts.map +1 -0
- package/dist/bin/installer/targets/qwen.js +96 -0
- package/dist/bin/installer/targets/qwen.js.map +7 -0
- package/dist/bin/installer/targets/replit.d.ts +6 -0
- package/dist/bin/installer/targets/replit.d.ts.map +1 -0
- package/dist/bin/installer/targets/replit.js +3 -3
- package/dist/bin/installer/targets/replit.js.map +2 -2
- package/dist/bin/installer/targets/roo.d.ts +13 -0
- package/dist/bin/installer/targets/roo.d.ts.map +1 -0
- package/dist/bin/installer/targets/roo.js +2 -2
- package/dist/bin/installer/targets/roo.js.map +2 -2
- package/dist/bin/installer/targets/tabnine.d.ts +6 -0
- package/dist/bin/installer/targets/tabnine.d.ts.map +1 -0
- package/dist/bin/installer/targets/tabnine.js +3 -3
- package/dist/bin/installer/targets/tabnine.js.map +2 -2
- package/dist/bin/installer/targets/trae.d.ts +6 -0
- package/dist/bin/installer/targets/trae.d.ts.map +1 -0
- package/dist/bin/installer/targets/trae.js +5 -5
- package/dist/bin/installer/targets/trae.js.map +2 -2
- package/dist/bin/installer/targets/warp.d.ts +12 -0
- package/dist/bin/installer/targets/warp.d.ts.map +1 -0
- package/dist/bin/installer/targets/warp.js +2 -2
- package/dist/bin/installer/targets/warp.js.map +2 -2
- package/dist/bin/installer/targets/windsurf.d.ts +13 -0
- package/dist/bin/installer/targets/windsurf.d.ts.map +1 -0
- package/dist/bin/installer/targets/windsurf.js +35 -6
- package/dist/bin/installer/targets/windsurf.js.map +2 -2
- package/dist/bin/kirograph.js +74 -6
- package/dist/bin/kirograph.js.map +3 -3
- package/dist/bin/progress.d.ts +16 -1
- package/dist/bin/progress.d.ts.map +1 -1
- package/dist/compression/filters/aws.d.ts +9 -0
- package/dist/compression/filters/aws.d.ts.map +1 -0
- package/dist/compression/filters/docker.d.ts +6 -0
- package/dist/compression/filters/docker.d.ts.map +1 -0
- package/dist/compression/filters/files.d.ts +6 -0
- package/dist/compression/filters/files.d.ts.map +1 -0
- package/dist/compression/filters/generic.d.ts +7 -0
- package/dist/compression/filters/generic.d.ts.map +1 -0
- package/dist/compression/filters/git.d.ts +6 -0
- package/dist/compression/filters/git.d.ts.map +1 -0
- package/dist/compression/filters/github.d.ts +6 -0
- package/dist/compression/filters/github.d.ts.map +1 -0
- package/dist/compression/filters/lint.d.ts +6 -0
- package/dist/compression/filters/lint.d.ts.map +1 -0
- package/dist/compression/filters/misc.d.ts +6 -0
- package/dist/compression/filters/misc.d.ts.map +1 -0
- package/dist/compression/filters/package.d.ts +6 -0
- package/dist/compression/filters/package.d.ts.map +1 -0
- package/dist/compression/filters/test.d.ts +6 -0
- package/dist/compression/filters/test.d.ts.map +1 -0
- package/dist/compression/index.d.ts +29 -0
- package/dist/compression/index.d.ts.map +1 -0
- package/dist/compression/naive-cost.d.ts +26 -0
- package/dist/compression/naive-cost.d.ts.map +1 -0
- package/dist/compression/tracker.d.ts +155 -0
- package/dist/compression/tracker.d.ts.map +1 -0
- package/dist/compression/tracker.js +80 -0
- package/dist/compression/tracker.js.map +2 -2
- package/dist/compression/types.d.ts +49 -0
- package/dist/compression/types.d.ts.map +1 -0
- package/dist/config.d.ts +90 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +144 -3
- package/dist/config.js.map +2 -2
- package/dist/core/lock-manager.d.ts +2 -0
- package/dist/core/lock-manager.d.ts.map +1 -1
- package/dist/core/pipeline.d.ts +4 -1
- package/dist/core/pipeline.d.ts.map +1 -1
- package/dist/core/pipeline.js +78 -2
- package/dist/core/pipeline.js.map +2 -2
- package/dist/core/snapshot.d.ts +58 -0
- package/dist/core/snapshot.d.ts.map +1 -0
- package/dist/data/filters.d.ts +23 -0
- package/dist/data/filters.d.ts.map +1 -0
- package/dist/data/indexer.d.ts +25 -0
- package/dist/data/indexer.d.ts.map +1 -0
- package/dist/data/linker.d.ts +37 -0
- package/dist/data/linker.d.ts.map +1 -0
- package/dist/data/lint.d.ts +27 -0
- package/dist/data/lint.d.ts.map +1 -0
- package/dist/data/parsers/csv.d.ts +11 -0
- package/dist/data/parsers/csv.d.ts.map +1 -0
- package/dist/data/parsers/excel.d.ts +10 -0
- package/dist/data/parsers/excel.d.ts.map +1 -0
- package/dist/data/parsers/index.d.ts +28 -0
- package/dist/data/parsers/index.d.ts.map +1 -0
- package/dist/data/parsers/json-array.d.ts +9 -0
- package/dist/data/parsers/json-array.d.ts.map +1 -0
- package/dist/data/parsers/jsonl.d.ts +9 -0
- package/dist/data/parsers/jsonl.d.ts.map +1 -0
- package/dist/data/parsers/parquet.d.ts +10 -0
- package/dist/data/parsers/parquet.d.ts.map +1 -0
- package/dist/data/profiler.d.ts +29 -0
- package/dist/data/profiler.d.ts.map +1 -0
- package/dist/data/queries.d.ts +95 -0
- package/dist/data/queries.d.ts.map +1 -0
- package/dist/data/types.d.ts +103 -0
- package/dist/data/types.d.ts.map +1 -0
- package/dist/db/database.d.ts +57 -0
- package/dist/db/database.d.ts.map +1 -1
- package/dist/db/database.js +75 -5
- package/dist/db/database.js.map +2 -2
- package/dist/db/memory-schema.sql +5 -1
- package/dist/db/patterns-schema.sql +23 -0
- package/dist/db/schema.sql +3 -1
- package/dist/db/security-schema.sql +72 -0
- package/dist/docs/formats/asciidoc.d.ts +9 -0
- package/dist/docs/formats/asciidoc.d.ts.map +1 -0
- package/dist/docs/formats/html.d.ts +10 -0
- package/dist/docs/formats/html.d.ts.map +1 -0
- package/dist/docs/formats/index.d.ts +31 -0
- package/dist/docs/formats/index.d.ts.map +1 -0
- package/dist/docs/formats/markdown.d.ts +11 -0
- package/dist/docs/formats/markdown.d.ts.map +1 -0
- package/dist/docs/formats/openapi.d.ts +17 -0
- package/dist/docs/formats/openapi.d.ts.map +1 -0
- package/dist/docs/formats/org.d.ts +9 -0
- package/dist/docs/formats/org.d.ts.map +1 -0
- package/dist/docs/formats/plaintext.d.ts +11 -0
- package/dist/docs/formats/plaintext.d.ts.map +1 -0
- package/dist/docs/formats/rdoc.d.ts +10 -0
- package/dist/docs/formats/rdoc.d.ts.map +1 -0
- package/dist/docs/formats/rst.d.ts +11 -0
- package/dist/docs/formats/rst.d.ts.map +1 -0
- package/dist/docs/indexer.d.ts +49 -0
- package/dist/docs/indexer.d.ts.map +1 -0
- package/dist/docs/linker.d.ts +30 -0
- package/dist/docs/linker.d.ts.map +1 -0
- package/dist/docs/lint.d.ts +27 -0
- package/dist/docs/lint.d.ts.map +1 -0
- package/dist/docs/queries.d.ts +78 -0
- package/dist/docs/queries.d.ts.map +1 -0
- package/dist/docs/section-id.d.ts +48 -0
- package/dist/docs/section-id.d.ts.map +1 -0
- package/dist/docs/summarizer.d.ts +13 -0
- package/dist/docs/summarizer.d.ts.map +1 -0
- package/dist/docs/types.d.ts +71 -0
- package/dist/docs/types.d.ts.map +1 -0
- package/dist/docs/vectors.d.ts +54 -0
- package/dist/docs/vectors.d.ts.map +1 -0
- package/dist/extraction/extractor.d.ts +1 -1
- package/dist/extraction/extractor.d.ts.map +1 -1
- package/dist/extraction/extractor.js +81 -0
- package/dist/extraction/extractor.js.map +2 -2
- package/dist/extraction/grammars.d.ts +6 -0
- package/dist/extraction/grammars.d.ts.map +1 -1
- package/dist/extraction/grammars.js +32 -8
- package/dist/extraction/grammars.js.map +2 -2
- package/dist/extraction/languages.d.ts.map +1 -1
- package/dist/extraction/languages.js +43 -1
- package/dist/extraction/languages.js.map +2 -2
- package/dist/extraction/notebook.d.ts +14 -0
- package/dist/extraction/notebook.d.ts.map +1 -0
- package/dist/extraction/notebook.js +300 -0
- package/dist/extraction/notebook.js.map +7 -0
- package/dist/extraction/wasm/tree-sitter-astro.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-gdscript.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-julia.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-nix.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-perl.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-powershell.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-r.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-sql.wasm +0 -0
- package/dist/extraction/wasm/tree-sitter-verilog.wasm +0 -0
- package/dist/frameworks/amplify.d.ts +9 -0
- package/dist/frameworks/amplify.d.ts.map +1 -0
- package/dist/frameworks/angular.d.ts +9 -0
- package/dist/frameworks/angular.d.ts.map +1 -0
- package/dist/frameworks/ansible.d.ts +8 -0
- package/dist/frameworks/ansible.d.ts.map +1 -0
- package/dist/frameworks/cloudformation.d.ts +9 -0
- package/dist/frameworks/cloudformation.d.ts.map +1 -0
- package/dist/frameworks/docker.d.ts +9 -0
- package/dist/frameworks/docker.d.ts.map +1 -0
- package/dist/frameworks/elixir.d.ts +6 -0
- package/dist/frameworks/elixir.d.ts.map +1 -0
- package/dist/frameworks/flutter.d.ts +12 -0
- package/dist/frameworks/flutter.d.ts.map +1 -0
- package/dist/frameworks/flutter.js +130 -0
- package/dist/frameworks/flutter.js.map +7 -0
- package/dist/frameworks/iac.d.ts +10 -0
- package/dist/frameworks/iac.d.ts.map +1 -0
- package/dist/frameworks/index.d.ts +14 -0
- package/dist/frameworks/index.d.ts.map +1 -1
- package/dist/frameworks/index.js +7 -1
- package/dist/frameworks/index.js.map +3 -3
- package/dist/frameworks/kubernetes.d.ts +9 -0
- package/dist/frameworks/kubernetes.d.ts.map +1 -0
- package/dist/frameworks/pulumi.d.ts +9 -0
- package/dist/frameworks/pulumi.d.ts.map +1 -0
- package/dist/frameworks/scala.d.ts +6 -0
- package/dist/frameworks/scala.d.ts.map +1 -0
- package/dist/frameworks/solidity.d.ts +6 -0
- package/dist/frameworks/solidity.d.ts.map +1 -0
- package/dist/frameworks/terraform.d.ts +14 -0
- package/dist/frameworks/terraform.d.ts.map +1 -0
- package/dist/frameworks/vue.d.ts +7 -0
- package/dist/frameworks/vue.d.ts.map +1 -0
- package/dist/graph/communities.d.ts +43 -0
- package/dist/graph/communities.d.ts.map +1 -0
- package/dist/graph/communities.js +317 -0
- package/dist/graph/communities.js.map +7 -0
- package/dist/graph/flows.d.ts +55 -0
- package/dist/graph/flows.d.ts.map +1 -0
- package/dist/graph/flows.js +138 -0
- package/dist/graph/flows.js.map +7 -0
- package/dist/graph/refactor.d.ts +43 -0
- package/dist/graph/refactor.d.ts.map +1 -0
- package/dist/graph/refactor.js +155 -0
- package/dist/graph/refactor.js.map +7 -0
- package/dist/index.d.ts +36 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +2 -2
- package/dist/mcp/cache.d.ts +69 -0
- package/dist/mcp/cache.d.ts.map +1 -0
- package/dist/mcp/cache.js +172 -0
- package/dist/mcp/cache.js.map +7 -0
- package/dist/mcp/read-modes.d.ts +31 -0
- package/dist/mcp/read-modes.d.ts.map +1 -0
- package/dist/mcp/read-modes.js +295 -0
- package/dist/mcp/read-modes.js.map +7 -0
- package/dist/mcp/server.d.ts +1 -0
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +17 -3
- package/dist/mcp/server.js.map +2 -2
- package/dist/mcp/tool-names.d.ts +2 -0
- package/dist/mcp/tool-names.d.ts.map +1 -0
- package/dist/mcp/tool-names.js +24 -1
- package/dist/mcp/tool-names.js.map +2 -2
- package/dist/mcp/tools.d.ts +12 -0
- package/dist/mcp/tools.d.ts.map +1 -1
- package/dist/mcp/tools.js +1560 -4
- package/dist/mcp/tools.js.map +3 -3
- package/dist/memory/compress.d.ts +19 -0
- package/dist/memory/compress.d.ts.map +1 -0
- package/dist/memory/database.d.ts +92 -0
- package/dist/memory/database.d.ts.map +1 -0
- package/dist/memory/database.js +70 -2
- package/dist/memory/database.js.map +2 -2
- package/dist/memory/index.d.ts +71 -0
- package/dist/memory/index.d.ts.map +1 -0
- package/dist/memory/index.js +12 -2
- package/dist/memory/index.js.map +2 -2
- package/dist/memory/symbols.d.ts +21 -0
- package/dist/memory/symbols.d.ts.map +1 -0
- package/dist/memory/types.d.ts +78 -0
- package/dist/memory/types.d.ts.map +1 -0
- package/dist/memory/types.js.map +1 -1
- package/dist/memory/vectors.d.ts +43 -0
- package/dist/memory/vectors.d.ts.map +1 -0
- package/dist/patterns/graph.d.ts +16 -0
- package/dist/patterns/graph.d.ts.map +1 -0
- package/dist/patterns/graph.js +45 -0
- package/dist/patterns/graph.js.map +7 -0
- package/dist/patterns/index.d.ts +4 -0
- package/dist/patterns/index.d.ts.map +1 -0
- package/dist/patterns/index.js +39 -0
- package/dist/patterns/index.js.map +7 -0
- package/dist/patterns/indexer.d.ts +15 -0
- package/dist/patterns/indexer.d.ts.map +1 -0
- package/dist/patterns/indexer.js +97 -0
- package/dist/patterns/indexer.js.map +7 -0
- package/dist/patterns/library/command-injection-go.yaml +11 -0
- package/dist/patterns/library/dangerous-eval-js.yaml +14 -0
- package/dist/patterns/library/dangerous-exec-py.yaml +13 -0
- package/dist/patterns/library/dangerous-reflection-java.yaml +8 -0
- package/dist/patterns/library/path-traversal-go.yaml +11 -0
- package/dist/patterns/library/path-traversal-py.yaml +12 -0
- package/dist/patterns/library/path-traversal-readfile-js.yaml +14 -0
- package/dist/patterns/library/prototype-pollution-js.yaml +12 -0
- package/dist/patterns/library/sql-injection-concat-js.yaml +12 -0
- package/dist/patterns/library/sql-injection-java.yaml +13 -0
- package/dist/patterns/library/sql-injection-py.yaml +12 -0
- package/dist/patterns/library/sql-injection-template-js.yaml +13 -0
- package/dist/patterns/library/weak-crypto-md5-js.yaml +13 -0
- package/dist/patterns/library/weak-crypto-py.yaml +13 -0
- package/dist/patterns/loader.d.ts +18 -0
- package/dist/patterns/loader.d.ts.map +1 -0
- package/dist/patterns/loader.js +277 -0
- package/dist/patterns/loader.js.map +7 -0
- package/dist/patterns/runner.d.ts +42 -0
- package/dist/patterns/runner.d.ts.map +1 -0
- package/dist/patterns/runner.js +277 -0
- package/dist/patterns/runner.js.map +7 -0
- package/dist/patterns/types.d.ts +27 -0
- package/dist/patterns/types.d.ts.map +1 -0
- package/dist/patterns/types.js +34 -0
- package/dist/patterns/types.js.map +7 -0
- package/dist/resolution/bridges/android-rn.d.ts +13 -0
- package/dist/resolution/bridges/android-rn.d.ts.map +1 -0
- package/dist/resolution/bridges/android-rn.js +298 -0
- package/dist/resolution/bridges/android-rn.js.map +7 -0
- package/dist/resolution/bridges/expo-modules.d.ts +10 -0
- package/dist/resolution/bridges/expo-modules.d.ts.map +1 -0
- package/dist/resolution/bridges/expo-modules.js +155 -0
- package/dist/resolution/bridges/expo-modules.js.map +7 -0
- package/dist/resolution/bridges/flutter-channel.d.ts +14 -0
- package/dist/resolution/bridges/flutter-channel.d.ts.map +1 -0
- package/dist/resolution/bridges/flutter-channel.js +385 -0
- package/dist/resolution/bridges/flutter-channel.js.map +7 -0
- package/dist/resolution/bridges/index.d.ts +40 -0
- package/dist/resolution/bridges/index.d.ts.map +1 -0
- package/dist/resolution/bridges/index.js +80 -0
- package/dist/resolution/bridges/index.js.map +7 -0
- package/dist/resolution/bridges/native-events.d.ts +10 -0
- package/dist/resolution/bridges/native-events.d.ts.map +1 -0
- package/dist/resolution/bridges/native-events.js +188 -0
- package/dist/resolution/bridges/native-events.js.map +7 -0
- package/dist/resolution/bridges/native-views.d.ts +13 -0
- package/dist/resolution/bridges/native-views.d.ts.map +1 -0
- package/dist/resolution/bridges/native-views.js +244 -0
- package/dist/resolution/bridges/native-views.js.map +7 -0
- package/dist/resolution/bridges/react-native.d.ts +9 -0
- package/dist/resolution/bridges/react-native.d.ts.map +1 -0
- package/dist/resolution/bridges/react-native.js +161 -0
- package/dist/resolution/bridges/react-native.js.map +7 -0
- package/dist/resolution/bridges/swift-objc.d.ts +14 -0
- package/dist/resolution/bridges/swift-objc.d.ts.map +1 -0
- package/dist/resolution/bridges/swift-objc.js +227 -0
- package/dist/resolution/bridges/swift-objc.js.map +7 -0
- package/dist/resolution/bridges/turbomodules.d.ts +10 -0
- package/dist/resolution/bridges/turbomodules.d.ts.map +1 -0
- package/dist/resolution/bridges/turbomodules.js +216 -0
- package/dist/resolution/bridges/turbomodules.js.map +7 -0
- package/dist/resolution/index.d.ts +28 -3
- package/dist/resolution/index.d.ts.map +1 -1
- package/dist/resolution/index.js +61 -2
- package/dist/resolution/index.js.map +2 -2
- package/dist/security/attack-surface.d.ts +46 -0
- package/dist/security/attack-surface.d.ts.map +1 -0
- package/dist/security/attack-surface.js +206 -0
- package/dist/security/attack-surface.js.map +7 -0
- package/dist/security/context-warnings.d.ts +40 -0
- package/dist/security/context-warnings.d.ts.map +1 -0
- package/dist/security/context-warnings.js +123 -0
- package/dist/security/context-warnings.js.map +7 -0
- package/dist/security/data-flows.d.ts +33 -0
- package/dist/security/data-flows.d.ts.map +1 -0
- package/dist/security/data-flows.js +286 -0
- package/dist/security/data-flows.js.map +7 -0
- package/dist/security/dep-confusion.d.ts +23 -0
- package/dist/security/dep-confusion.d.ts.map +1 -0
- package/dist/security/dep-confusion.js +255 -0
- package/dist/security/dep-confusion.js.map +7 -0
- package/dist/security/errors.d.ts +16 -0
- package/dist/security/errors.d.ts.map +1 -0
- package/dist/security/errors.js +51 -0
- package/dist/security/errors.js.map +7 -0
- package/dist/security/export/fix-suggestions.d.ts +21 -0
- package/dist/security/export/fix-suggestions.d.ts.map +1 -0
- package/dist/security/export/fix-suggestions.js +58 -0
- package/dist/security/export/fix-suggestions.js.map +7 -0
- package/dist/security/export/sbom.d.ts +33 -0
- package/dist/security/export/sbom.d.ts.map +1 -0
- package/dist/security/export/sbom.js +230 -0
- package/dist/security/export/sbom.js.map +7 -0
- package/dist/security/export/serialization.d.ts +62 -0
- package/dist/security/export/serialization.d.ts.map +1 -0
- package/dist/security/export/serialization.js +142 -0
- package/dist/security/export/serialization.js.map +7 -0
- package/dist/security/export/vex.d.ts +58 -0
- package/dist/security/export/vex.d.ts.map +1 -0
- package/dist/security/export/vex.js +220 -0
- package/dist/security/export/vex.js.map +7 -0
- package/dist/security/index.d.ts +21 -0
- package/dist/security/index.d.ts.map +1 -0
- package/dist/security/index.js +67 -0
- package/dist/security/index.js.map +7 -0
- package/dist/security/integrator.d.ts +63 -0
- package/dist/security/integrator.d.ts.map +1 -0
- package/dist/security/integrator.js +491 -0
- package/dist/security/integrator.js.map +7 -0
- package/dist/security/license.d.ts +33 -0
- package/dist/security/license.d.ts.map +1 -0
- package/dist/security/license.js +70 -0
- package/dist/security/license.js.map +7 -0
- package/dist/security/manifest/adapter.d.ts +92 -0
- package/dist/security/manifest/adapter.d.ts.map +1 -0
- package/dist/security/manifest/adapter.js +243 -0
- package/dist/security/manifest/adapter.js.map +7 -0
- package/dist/security/manifest/parser.d.ts +73 -0
- package/dist/security/manifest/parser.d.ts.map +1 -0
- package/dist/security/manifest/parser.js +376 -0
- package/dist/security/manifest/parser.js.map +7 -0
- package/dist/security/manifest/plugins/cargo.d.ts +11 -0
- package/dist/security/manifest/plugins/cargo.d.ts.map +1 -0
- package/dist/security/manifest/plugins/cargo.js +233 -0
- package/dist/security/manifest/plugins/cargo.js.map +7 -0
- package/dist/security/manifest/plugins/composer.d.ts +11 -0
- package/dist/security/manifest/plugins/composer.d.ts.map +1 -0
- package/dist/security/manifest/plugins/composer.js +152 -0
- package/dist/security/manifest/plugins/composer.js.map +7 -0
- package/dist/security/manifest/plugins/go.d.ts +12 -0
- package/dist/security/manifest/plugins/go.d.ts.map +1 -0
- package/dist/security/manifest/plugins/go.js +146 -0
- package/dist/security/manifest/plugins/go.js.map +7 -0
- package/dist/security/manifest/plugins/gradle.d.ts +12 -0
- package/dist/security/manifest/plugins/gradle.d.ts.map +1 -0
- package/dist/security/manifest/plugins/gradle.js +159 -0
- package/dist/security/manifest/plugins/gradle.js.map +7 -0
- package/dist/security/manifest/plugins/hex.d.ts +11 -0
- package/dist/security/manifest/plugins/hex.d.ts.map +1 -0
- package/dist/security/manifest/plugins/hex.js +159 -0
- package/dist/security/manifest/plugins/hex.js.map +7 -0
- package/dist/security/manifest/plugins/maven.d.ts +11 -0
- package/dist/security/manifest/plugins/maven.d.ts.map +1 -0
- package/dist/security/manifest/plugins/maven.js +128 -0
- package/dist/security/manifest/plugins/maven.js.map +7 -0
- package/dist/security/manifest/plugins/npm.d.ts +11 -0
- package/dist/security/manifest/plugins/npm.d.ts.map +1 -0
- package/dist/security/manifest/plugins/npm.js +284 -0
- package/dist/security/manifest/plugins/npm.js.map +7 -0
- package/dist/security/manifest/plugins/nuget.d.ts +12 -0
- package/dist/security/manifest/plugins/nuget.d.ts.map +1 -0
- package/dist/security/manifest/plugins/nuget.js +186 -0
- package/dist/security/manifest/plugins/nuget.js.map +7 -0
- package/dist/security/manifest/plugins/pip.d.ts +11 -0
- package/dist/security/manifest/plugins/pip.d.ts.map +1 -0
- package/dist/security/manifest/plugins/pip.js +123 -0
- package/dist/security/manifest/plugins/pip.js.map +7 -0
- package/dist/security/manifest/plugins/pubspec.d.ts +11 -0
- package/dist/security/manifest/plugins/pubspec.d.ts.map +1 -0
- package/dist/security/manifest/plugins/pubspec.js +212 -0
- package/dist/security/manifest/plugins/pubspec.js.map +7 -0
- package/dist/security/manifest/plugins/pyproject.d.ts +3 -0
- package/dist/security/manifest/plugins/pyproject.d.ts.map +1 -0
- package/dist/security/manifest/plugins/pyproject.js +261 -0
- package/dist/security/manifest/plugins/pyproject.js.map +7 -0
- package/dist/security/manifest/plugins/rubygems.d.ts +11 -0
- package/dist/security/manifest/plugins/rubygems.d.ts.map +1 -0
- package/dist/security/manifest/plugins/rubygems.js +185 -0
- package/dist/security/manifest/plugins/rubygems.js.map +7 -0
- package/dist/security/manifest/plugins/swift.d.ts +11 -0
- package/dist/security/manifest/plugins/swift.d.ts.map +1 -0
- package/dist/security/manifest/plugins/swift.js +200 -0
- package/dist/security/manifest/plugins/swift.js.map +7 -0
- package/dist/security/owasp.d.ts +16 -0
- package/dist/security/owasp.d.ts.map +1 -0
- package/dist/security/owasp.js +104 -0
- package/dist/security/owasp.js.map +7 -0
- package/dist/security/pipeline.d.ts +37 -0
- package/dist/security/pipeline.d.ts.map +1 -0
- package/dist/security/pipeline.js +125 -0
- package/dist/security/pipeline.js.map +7 -0
- package/dist/security/reachability.d.ts +67 -0
- package/dist/security/reachability.d.ts.map +1 -0
- package/dist/security/reachability.js +276 -0
- package/dist/security/reachability.js.map +7 -0
- package/dist/security/remediation.d.ts +51 -0
- package/dist/security/remediation.d.ts.map +1 -0
- package/dist/security/remediation.js +126 -0
- package/dist/security/remediation.js.map +7 -0
- package/dist/security/secrets.d.ts +38 -0
- package/dist/security/secrets.d.ts.map +1 -0
- package/dist/security/secrets.js +176 -0
- package/dist/security/secrets.js.map +7 -0
- package/dist/security/staleness.d.ts +43 -0
- package/dist/security/staleness.d.ts.map +1 -0
- package/dist/security/staleness.js +231 -0
- package/dist/security/staleness.js.map +7 -0
- package/dist/security/supply-chain.d.ts +34 -0
- package/dist/security/supply-chain.d.ts.map +1 -0
- package/dist/security/supply-chain.js +301 -0
- package/dist/security/supply-chain.js.map +7 -0
- package/dist/security/suppressions.d.ts +18 -0
- package/dist/security/suppressions.d.ts.map +1 -0
- package/dist/security/suppressions.js +106 -0
- package/dist/security/suppressions.js.map +7 -0
- package/dist/security/types.d.ts +144 -0
- package/dist/security/types.d.ts.map +1 -0
- package/dist/security/types.js +17 -0
- package/dist/security/types.js.map +7 -0
- package/dist/security/vuln/client.d.ts +90 -0
- package/dist/security/vuln/client.d.ts.map +1 -0
- package/dist/security/vuln/client.js +355 -0
- package/dist/security/vuln/client.js.map +7 -0
- package/dist/security/vuln/epss-client.d.ts +26 -0
- package/dist/security/vuln/epss-client.d.ts.map +1 -0
- package/dist/security/vuln/epss-client.js +95 -0
- package/dist/security/vuln/epss-client.js.map +7 -0
- package/dist/security/vuln/index.d.ts +6 -0
- package/dist/security/vuln/index.d.ts.map +1 -0
- package/dist/security/vuln/index.js +29 -0
- package/dist/security/vuln/index.js.map +7 -0
- package/dist/security/vuln/osv-adapter.d.ts +58 -0
- package/dist/security/vuln/osv-adapter.d.ts.map +1 -0
- package/dist/security/vuln/osv-adapter.js +321 -0
- package/dist/security/vuln/osv-adapter.js.map +7 -0
- package/dist/security/vuln/types.d.ts +29 -0
- package/dist/security/vuln/types.d.ts.map +1 -0
- package/dist/security/vuln/types.js +17 -0
- package/dist/security/vuln/types.js.map +7 -0
- package/dist/sync/index.d.ts +4 -2
- package/dist/sync/index.d.ts.map +1 -1
- package/dist/types.d.ts +10 -4
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +2 -2
- package/dist/vectors/index.d.ts +11 -3
- package/dist/vectors/index.d.ts.map +1 -1
- package/dist/vectors/qdrant-index.d.ts +10 -3
- package/dist/vectors/qdrant-index.d.ts.map +1 -1
- package/dist/vectors/typesense-index.d.ts.map +1 -1
- package/dist/watchmen/index.js +83 -0
- package/dist/watchmen/index.js.map +7 -0
- package/dist/watchmen/synthesize.js +475 -0
- package/dist/watchmen/synthesize.js.map +7 -0
- package/package.json +6 -2
|
@@ -0,0 +1,1349 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var security_export_exports = {};
|
|
30
|
+
__export(security_export_exports, {
|
|
31
|
+
register: () => register
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(security_export_exports);
|
|
34
|
+
var fs = __toESM(require("fs"));
|
|
35
|
+
var path = __toESM(require("path"));
|
|
36
|
+
var import_child_process = require("child_process");
|
|
37
|
+
var import_config = require("../../config");
|
|
38
|
+
var import_ui = require("../ui");
|
|
39
|
+
var import_license = require("../../security/license");
|
|
40
|
+
function openBrowser(filePath) {
|
|
41
|
+
const cmd = process.platform === "darwin" ? "open" : process.platform === "win32" ? "start" : "xdg-open";
|
|
42
|
+
(0, import_child_process.spawn)(cmd, [filePath], { stdio: "ignore", detached: true, shell: process.platform === "win32" }).unref();
|
|
43
|
+
}
|
|
44
|
+
function generateHtml(params) {
|
|
45
|
+
const {
|
|
46
|
+
projectName,
|
|
47
|
+
generatedAt,
|
|
48
|
+
vulns,
|
|
49
|
+
deps,
|
|
50
|
+
sbomJson,
|
|
51
|
+
vexJson,
|
|
52
|
+
denyList,
|
|
53
|
+
warnList,
|
|
54
|
+
attackSurface,
|
|
55
|
+
secretsResult,
|
|
56
|
+
flowsResult,
|
|
57
|
+
remediationStatus
|
|
58
|
+
} = params;
|
|
59
|
+
const licDeps = deps.map((d) => ({ package_name: d.package_name, ecosystem: d.ecosystem, license: d.license }));
|
|
60
|
+
const violations = (0, import_license.checkLicensePolicy)(licDeps, { deny: denyList, warn: warnList });
|
|
61
|
+
const violationMap = {};
|
|
62
|
+
for (const v of violations) {
|
|
63
|
+
violationMap[`${v.ecosystem}:${v.packageName}`] = v.severity;
|
|
64
|
+
}
|
|
65
|
+
const licenseData = deps.map((d) => ({
|
|
66
|
+
package_name: d.package_name,
|
|
67
|
+
ecosystem: d.ecosystem,
|
|
68
|
+
license: d.license ?? null,
|
|
69
|
+
status: violationMap[`${d.ecosystem}:${d.package_name}`] ?? (d.license ? "ok" : "unknown")
|
|
70
|
+
}));
|
|
71
|
+
const totalDeps = deps.length;
|
|
72
|
+
const totalVulns = vulns.length;
|
|
73
|
+
const affected = vulns.filter((v) => v.verdict === "affected").length;
|
|
74
|
+
const underInvestigation = vulns.filter((v) => v.verdict === "under_investigation").length;
|
|
75
|
+
const notAffected = vulns.filter((v) => v.verdict === "not_affected").length;
|
|
76
|
+
const staleDeps = deps.filter((d) => (d.staleness_score ?? 0) >= 0.3).length;
|
|
77
|
+
const top5 = [...vulns].filter((v) => v.epss_score != null || v.severity_score != null).sort((a, b) => {
|
|
78
|
+
const scoreA = (a.epss_score ?? 0) * (a.severity_score ?? 0);
|
|
79
|
+
const scoreB = (b.epss_score ?? 0) * (b.severity_score ?? 0);
|
|
80
|
+
return scoreB - scoreA;
|
|
81
|
+
}).slice(0, 5);
|
|
82
|
+
const directCount = deps.filter((d) => d.classification === "direct").length;
|
|
83
|
+
const transitiveCount = deps.filter((d) => d.classification !== "direct").length;
|
|
84
|
+
const stalenessRows = deps.filter((d) => d.staleness_score != null).sort((a, b) => (b.staleness_score ?? 0) - (a.staleness_score ?? 0));
|
|
85
|
+
const topRiskCve = vulns.length > 0 ? [...vulns].sort((a, b) => (b.risk_score ?? b.severity_score ?? 0) - (a.risk_score ?? a.severity_score ?? 0))[0] : null;
|
|
86
|
+
const owaspCounts = {};
|
|
87
|
+
if (flowsResult) {
|
|
88
|
+
for (const f of flowsResult) {
|
|
89
|
+
owaspCounts[f.owaspCategory] = (owaspCounts[f.owaspCategory] ?? 0) + 1;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
const owaspOrder = ["A01", "A02", "A03", "A04", "A05", "A06", "A07", "A08", "A09", "A10"];
|
|
93
|
+
const owaspNames = {
|
|
94
|
+
A01: "Broken Access Control",
|
|
95
|
+
A02: "Cryptographic Failures",
|
|
96
|
+
A03: "Injection",
|
|
97
|
+
A04: "Insecure Design",
|
|
98
|
+
A05: "Security Misconfiguration",
|
|
99
|
+
A06: "Vulnerable Components",
|
|
100
|
+
A07: "Auth Failures",
|
|
101
|
+
A08: "Integrity Failures",
|
|
102
|
+
A09: "Logging Failures",
|
|
103
|
+
A10: "SSRF"
|
|
104
|
+
};
|
|
105
|
+
const owaspMaxCount = Math.max(1, ...Object.values(owaspCounts));
|
|
106
|
+
const secretsCount = secretsResult?.totalFindings ?? null;
|
|
107
|
+
const criticalFlowsCount = flowsResult?.filter((f) => f.severity === "critical").length ?? null;
|
|
108
|
+
const safeJson = (obj) => JSON.stringify(obj).replace(/<\/script>/gi, "<\\/script>");
|
|
109
|
+
return `<!DOCTYPE html>
|
|
110
|
+
<html lang="en">
|
|
111
|
+
<head>
|
|
112
|
+
<meta charset="UTF-8">
|
|
113
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
114
|
+
<title>Security Dashboard \u2014 ${projectName}</title>
|
|
115
|
+
<style>
|
|
116
|
+
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
|
117
|
+
:root {
|
|
118
|
+
--bg: #0d1117;
|
|
119
|
+
--bg-card: #161b22;
|
|
120
|
+
--bg-input: #21262d;
|
|
121
|
+
--border: #30363d;
|
|
122
|
+
--accent: #a78bfa;
|
|
123
|
+
--text: #c9d1d9;
|
|
124
|
+
--text-muted: #8b949e;
|
|
125
|
+
--text-bright: #f0f6fc;
|
|
126
|
+
--green: #3fb950;
|
|
127
|
+
--yellow: #d29922;
|
|
128
|
+
--red: #f85149;
|
|
129
|
+
--orange: #db6d28;
|
|
130
|
+
--radius: 8px;
|
|
131
|
+
}
|
|
132
|
+
html { scroll-behavior: smooth; }
|
|
133
|
+
body {
|
|
134
|
+
font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
|
|
135
|
+
background: var(--bg);
|
|
136
|
+
color: var(--text);
|
|
137
|
+
line-height: 1.5;
|
|
138
|
+
font-size: 14px;
|
|
139
|
+
-webkit-font-smoothing: antialiased;
|
|
140
|
+
}
|
|
141
|
+
a { color: var(--accent); text-decoration: none; }
|
|
142
|
+
a:hover { text-decoration: underline; }
|
|
143
|
+
|
|
144
|
+
/* Header */
|
|
145
|
+
.header {
|
|
146
|
+
background: var(--bg-card);
|
|
147
|
+
border-bottom: 1px solid var(--border);
|
|
148
|
+
padding: 1rem 2rem;
|
|
149
|
+
display: flex;
|
|
150
|
+
align-items: center;
|
|
151
|
+
justify-content: space-between;
|
|
152
|
+
gap: 1rem;
|
|
153
|
+
}
|
|
154
|
+
.header-title { font-size: 1.1rem; font-weight: 600; color: var(--text-bright); }
|
|
155
|
+
.header-meta { font-size: 0.8rem; color: var(--text-muted); }
|
|
156
|
+
.header-badge {
|
|
157
|
+
display: inline-flex; align-items: center; gap: 0.35rem;
|
|
158
|
+
background: rgba(167,139,250,0.12); color: var(--accent);
|
|
159
|
+
border: 1px solid rgba(167,139,250,0.25);
|
|
160
|
+
padding: 0.25rem 0.6rem; border-radius: 4px;
|
|
161
|
+
font-size: 0.75rem; font-weight: 600;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/* Tabs */
|
|
165
|
+
.tabs {
|
|
166
|
+
display: flex; gap: 0;
|
|
167
|
+
background: var(--bg-card);
|
|
168
|
+
border-bottom: 1px solid var(--border);
|
|
169
|
+
padding: 0 2rem;
|
|
170
|
+
overflow-x: auto;
|
|
171
|
+
}
|
|
172
|
+
.tab {
|
|
173
|
+
padding: 0.75rem 1.25rem;
|
|
174
|
+
cursor: pointer;
|
|
175
|
+
border: none;
|
|
176
|
+
background: none;
|
|
177
|
+
color: var(--text-muted);
|
|
178
|
+
font-size: 0.875rem;
|
|
179
|
+
font-weight: 500;
|
|
180
|
+
border-bottom: 2px solid transparent;
|
|
181
|
+
transition: color 0.15s, border-color 0.15s;
|
|
182
|
+
white-space: nowrap;
|
|
183
|
+
}
|
|
184
|
+
.tab:hover { color: var(--text); }
|
|
185
|
+
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
|
|
186
|
+
|
|
187
|
+
/* Content */
|
|
188
|
+
.content { padding: 1.5rem 2rem; }
|
|
189
|
+
.tab-panel { display: none; }
|
|
190
|
+
.tab-panel.active { display: block; }
|
|
191
|
+
|
|
192
|
+
/* Stats cards */
|
|
193
|
+
.stats-grid {
|
|
194
|
+
display: grid;
|
|
195
|
+
grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
|
|
196
|
+
gap: 1rem;
|
|
197
|
+
margin-bottom: 1.5rem;
|
|
198
|
+
}
|
|
199
|
+
.stat-card {
|
|
200
|
+
background: var(--bg-card);
|
|
201
|
+
border: 1px solid var(--border);
|
|
202
|
+
border-radius: var(--radius);
|
|
203
|
+
padding: 1rem;
|
|
204
|
+
}
|
|
205
|
+
.stat-label { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.4rem; text-transform: uppercase; letter-spacing: 0.04em; }
|
|
206
|
+
.stat-value { font-size: 1.75rem; font-weight: 700; color: var(--text-bright); line-height: 1; }
|
|
207
|
+
.stat-value.red { color: var(--red); }
|
|
208
|
+
.stat-value.yellow { color: var(--yellow); }
|
|
209
|
+
.stat-value.green { color: var(--green); }
|
|
210
|
+
.stat-value.accent { color: var(--accent); }
|
|
211
|
+
|
|
212
|
+
/* Section heading */
|
|
213
|
+
.section-title {
|
|
214
|
+
font-size: 0.85rem; font-weight: 600;
|
|
215
|
+
color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em;
|
|
216
|
+
margin-bottom: 1rem;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/* Chart bar */
|
|
220
|
+
.bar-chart { margin-bottom: 1.5rem; }
|
|
221
|
+
.bar-row {
|
|
222
|
+
display: flex; align-items: center; gap: 0.75rem;
|
|
223
|
+
margin-bottom: 0.5rem;
|
|
224
|
+
}
|
|
225
|
+
.bar-label { width: 140px; font-size: 0.8rem; color: var(--text-muted); flex-shrink: 0; }
|
|
226
|
+
.bar-track { flex: 1; height: 14px; background: var(--bg-input); border-radius: 3px; overflow: hidden; }
|
|
227
|
+
.bar-fill { height: 100%; border-radius: 3px; transition: width 0.3s; }
|
|
228
|
+
.bar-count { width: 40px; text-align: right; font-size: 0.8rem; color: var(--text); }
|
|
229
|
+
|
|
230
|
+
/* Top CVEs */
|
|
231
|
+
.top-cve-list { display: flex; flex-direction: column; gap: 0.5rem; }
|
|
232
|
+
.top-cve-item {
|
|
233
|
+
display: flex; align-items: center; gap: 0.75rem;
|
|
234
|
+
background: var(--bg-card); border: 1px solid var(--border);
|
|
235
|
+
border-radius: var(--radius); padding: 0.6rem 0.9rem;
|
|
236
|
+
}
|
|
237
|
+
.top-cve-rank { width: 24px; color: var(--text-muted); font-size: 0.8rem; font-weight: 600; flex-shrink: 0; }
|
|
238
|
+
.top-cve-id { font-family: monospace; font-size: 0.85rem; color: var(--accent); min-width: 130px; }
|
|
239
|
+
.top-cve-pkg { font-size: 0.8rem; color: var(--text); flex: 1; }
|
|
240
|
+
.top-cve-scores { display: flex; gap: 0.5rem; align-items: center; }
|
|
241
|
+
|
|
242
|
+
/* Filters */
|
|
243
|
+
.filters {
|
|
244
|
+
display: flex; gap: 0.75rem; flex-wrap: wrap;
|
|
245
|
+
margin-bottom: 1rem; align-items: center;
|
|
246
|
+
}
|
|
247
|
+
.filter-label { font-size: 0.8rem; color: var(--text-muted); }
|
|
248
|
+
select, input[type=text], input[type=range] {
|
|
249
|
+
background: var(--bg-input); border: 1px solid var(--border);
|
|
250
|
+
color: var(--text); padding: 0.35rem 0.6rem;
|
|
251
|
+
border-radius: var(--radius); font-size: 0.8rem;
|
|
252
|
+
outline: none;
|
|
253
|
+
}
|
|
254
|
+
select:focus, input[type=text]:focus { border-color: var(--accent); }
|
|
255
|
+
input[type=text] { min-width: 180px; }
|
|
256
|
+
.range-group { display: flex; align-items: center; gap: 0.5rem; }
|
|
257
|
+
#epssValue { min-width: 32px; font-size: 0.8rem; color: var(--accent); }
|
|
258
|
+
|
|
259
|
+
/* Tables */
|
|
260
|
+
.table-wrap { overflow-x: auto; }
|
|
261
|
+
table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
|
|
262
|
+
th {
|
|
263
|
+
text-align: left; padding: 0.5rem 0.75rem;
|
|
264
|
+
background: var(--bg-card); border-bottom: 1px solid var(--border);
|
|
265
|
+
color: var(--text-muted); font-weight: 600; font-size: 0.75rem;
|
|
266
|
+
text-transform: uppercase; letter-spacing: 0.04em;
|
|
267
|
+
white-space: nowrap;
|
|
268
|
+
}
|
|
269
|
+
th.sortable { cursor: pointer; user-select: none; }
|
|
270
|
+
th.sortable:hover { color: var(--text); }
|
|
271
|
+
th.sorted-asc::after { content: ' \u25B2'; color: var(--accent); }
|
|
272
|
+
th.sorted-desc::after { content: ' \u25BC'; color: var(--accent); }
|
|
273
|
+
td { padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
|
|
274
|
+
tr:last-child td { border-bottom: none; }
|
|
275
|
+
tr:hover td { background: rgba(255,255,255,0.02); }
|
|
276
|
+
|
|
277
|
+
/* Verdict row colors */
|
|
278
|
+
tr.verdict-affected td:first-child { border-left: 3px solid var(--red); }
|
|
279
|
+
tr.verdict-investigating td:first-child { border-left: 3px solid var(--yellow); }
|
|
280
|
+
tr.verdict-not-affected td:first-child { border-left: 3px solid var(--green); }
|
|
281
|
+
|
|
282
|
+
/* Badges */
|
|
283
|
+
.badge {
|
|
284
|
+
display: inline-flex; align-items: center;
|
|
285
|
+
padding: 0.15rem 0.45rem; border-radius: 3px;
|
|
286
|
+
font-size: 0.72rem; font-weight: 600; white-space: nowrap;
|
|
287
|
+
}
|
|
288
|
+
.badge-red { background: rgba(248,81,73,0.15); color: var(--red); }
|
|
289
|
+
.badge-yellow { background: rgba(210,153,34,0.15); color: var(--yellow); }
|
|
290
|
+
.badge-green { background: rgba(63,185,80,0.15); color: var(--green); }
|
|
291
|
+
.badge-gray { background: rgba(139,148,158,0.15);color: var(--text-muted); }
|
|
292
|
+
.badge-accent { background: rgba(167,139,250,0.15);color: var(--accent); }
|
|
293
|
+
.badge-orange { background: rgba(219,109,40,0.15); color: var(--orange); }
|
|
294
|
+
|
|
295
|
+
/* Expandable row */
|
|
296
|
+
.expand-row td { padding: 0; border-bottom: 1px solid var(--border); }
|
|
297
|
+
.expand-body {
|
|
298
|
+
padding: 0.75rem 1rem;
|
|
299
|
+
background: rgba(22,27,34,0.8);
|
|
300
|
+
font-size: 0.8rem; color: var(--text);
|
|
301
|
+
}
|
|
302
|
+
.expand-body .expand-section { margin-bottom: 0.6rem; }
|
|
303
|
+
.expand-body .expand-label { color: var(--text-muted); font-size: 0.75rem; margin-bottom: 0.25rem; }
|
|
304
|
+
.expand-body pre { font-family: monospace; font-size: 0.78rem; white-space: pre-wrap; color: var(--text-muted); }
|
|
305
|
+
.row-toggle { cursor: pointer; }
|
|
306
|
+
|
|
307
|
+
/* Download buttons */
|
|
308
|
+
.btn {
|
|
309
|
+
display: inline-flex; align-items: center; gap: 0.4rem;
|
|
310
|
+
padding: 0.45rem 1rem; border-radius: var(--radius);
|
|
311
|
+
font-size: 0.82rem; font-weight: 500;
|
|
312
|
+
cursor: pointer; border: none; transition: opacity 0.15s;
|
|
313
|
+
}
|
|
314
|
+
.btn:hover { opacity: 0.85; }
|
|
315
|
+
.btn-accent { background: var(--accent); color: #0d1117; }
|
|
316
|
+
.btn-outline {
|
|
317
|
+
background: none; border: 1px solid var(--border);
|
|
318
|
+
color: var(--text);
|
|
319
|
+
}
|
|
320
|
+
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
|
|
321
|
+
|
|
322
|
+
/* Staleness bar */
|
|
323
|
+
.stale-bar-track { width: 80px; height: 8px; background: var(--bg-input); border-radius: 2px; overflow: hidden; display: inline-block; vertical-align: middle; }
|
|
324
|
+
.stale-bar-fill { height: 100%; border-radius: 2px; }
|
|
325
|
+
|
|
326
|
+
/* Policy banners */
|
|
327
|
+
.policy-banner {
|
|
328
|
+
display: flex; align-items: center; gap: 0.6rem;
|
|
329
|
+
padding: 0.65rem 1rem; border-radius: var(--radius);
|
|
330
|
+
margin-bottom: 0.75rem; font-size: 0.85rem;
|
|
331
|
+
}
|
|
332
|
+
.policy-banner.deny { background: rgba(248,81,73,0.1); border: 1px solid rgba(248,81,73,0.3); color: var(--red); }
|
|
333
|
+
.policy-banner.warn { background: rgba(210,153,34,0.1); border: 1px solid rgba(210,153,34,0.3); color: var(--yellow); }
|
|
334
|
+
|
|
335
|
+
/* Score cell */
|
|
336
|
+
.score-critical { color: var(--red); font-weight: 700; }
|
|
337
|
+
.score-high { color: var(--orange); font-weight: 600; }
|
|
338
|
+
.score-medium { color: var(--yellow); }
|
|
339
|
+
.score-low { color: var(--green); }
|
|
340
|
+
|
|
341
|
+
/* Empty state */
|
|
342
|
+
.empty-state { text-align: center; padding: 2.5rem; color: var(--text-muted); font-size: 0.85rem; }
|
|
343
|
+
|
|
344
|
+
/* SBOM summary badges */
|
|
345
|
+
.badge-counts { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
|
|
346
|
+
|
|
347
|
+
/* VEX state colors */
|
|
348
|
+
.state-affected { color: var(--red); }
|
|
349
|
+
.state-not_affected { color: var(--green); }
|
|
350
|
+
.state-investigating { color: var(--yellow); }
|
|
351
|
+
</style>
|
|
352
|
+
</head>
|
|
353
|
+
<body>
|
|
354
|
+
|
|
355
|
+
<div class="header">
|
|
356
|
+
<div>
|
|
357
|
+
<div class="header-title">Security Dashboard \u2014 ${projectName}</div>
|
|
358
|
+
<div class="header-meta">Generated ${generatedAt}</div>
|
|
359
|
+
</div>
|
|
360
|
+
<div class="header-badge">KiroGraph Security</div>
|
|
361
|
+
</div>
|
|
362
|
+
|
|
363
|
+
<div class="tabs">
|
|
364
|
+
<button class="tab active" data-tab="overview">Overview</button>
|
|
365
|
+
<button class="tab" data-tab="vulns">Vulnerabilities</button>
|
|
366
|
+
<button class="tab" data-tab="sbom">SBOM</button>
|
|
367
|
+
<button class="tab" data-tab="vex">VEX</button>
|
|
368
|
+
<button class="tab" data-tab="licenses">Licenses</button>
|
|
369
|
+
<button class="tab" data-tab="staleness">Staleness</button>
|
|
370
|
+
<button class="tab" data-tab="attack-surface">\u2694\uFE0F Attack Surface</button>
|
|
371
|
+
<button class="tab" data-tab="secrets">\u{1F511} Secrets</button>
|
|
372
|
+
<button class="tab" data-tab="sast">\u{1F50D} SAST Flows</button>
|
|
373
|
+
<button class="tab" data-tab="remediation">\u23F1\uFE0F Remediation</button>
|
|
374
|
+
</div>
|
|
375
|
+
|
|
376
|
+
<div class="content">
|
|
377
|
+
|
|
378
|
+
<!-- Tab: Overview -->
|
|
379
|
+
<div class="tab-panel active" id="tab-overview">
|
|
380
|
+
<div class="stats-grid">
|
|
381
|
+
<div class="stat-card">
|
|
382
|
+
<div class="stat-label">Total Dependencies</div>
|
|
383
|
+
<div class="stat-value accent" id="stat-deps">${totalDeps}</div>
|
|
384
|
+
</div>
|
|
385
|
+
<div class="stat-card">
|
|
386
|
+
<div class="stat-label">Vulnerabilities</div>
|
|
387
|
+
<div class="stat-value ${totalVulns > 0 ? "red" : "green"}" id="stat-vulns">${totalVulns}</div>
|
|
388
|
+
</div>
|
|
389
|
+
<div class="stat-card">
|
|
390
|
+
<div class="stat-label">Affected</div>
|
|
391
|
+
<div class="stat-value ${affected > 0 ? "red" : "green"}">${affected}</div>
|
|
392
|
+
</div>
|
|
393
|
+
<div class="stat-card">
|
|
394
|
+
<div class="stat-label">Under Investigation</div>
|
|
395
|
+
<div class="stat-value ${underInvestigation > 0 ? "yellow" : "green"}">${underInvestigation}</div>
|
|
396
|
+
</div>
|
|
397
|
+
<div class="stat-card">
|
|
398
|
+
<div class="stat-label">Not Affected</div>
|
|
399
|
+
<div class="stat-value green">${notAffected}</div>
|
|
400
|
+
</div>
|
|
401
|
+
<div class="stat-card">
|
|
402
|
+
<div class="stat-label">Stale Dependencies</div>
|
|
403
|
+
<div class="stat-value ${staleDeps > 0 ? "yellow" : "green"}">${staleDeps}</div>
|
|
404
|
+
</div>
|
|
405
|
+
${secretsCount !== null ? `<div class="stat-card">
|
|
406
|
+
<div class="stat-label">Secrets Found</div>
|
|
407
|
+
<div class="stat-value ${secretsCount > 0 ? "red" : "green"}">${secretsCount}</div>
|
|
408
|
+
</div>` : ""}
|
|
409
|
+
${criticalFlowsCount !== null ? `<div class="stat-card">
|
|
410
|
+
<div class="stat-label">Critical SAST Findings</div>
|
|
411
|
+
<div class="stat-value ${criticalFlowsCount > 0 ? "red" : "green"}">${criticalFlowsCount}</div>
|
|
412
|
+
</div>` : ""}
|
|
413
|
+
</div>
|
|
414
|
+
|
|
415
|
+
${topRiskCve ? `
|
|
416
|
+
<div class="section-title">Top Risk CVE</div>
|
|
417
|
+
<div class="top-cve-list" style="margin-bottom:1.5rem">
|
|
418
|
+
<div class="top-cve-item">
|
|
419
|
+
<div class="top-cve-rank">#1</div>
|
|
420
|
+
<div class="top-cve-id">${topRiskCve.cve_id}</div>
|
|
421
|
+
<div class="top-cve-pkg">${topRiskCve.package_name ?? "\u2014"} ${topRiskCve.ecosystem ? `<span style="color:var(--text-muted);font-size:0.75rem">[${topRiskCve.ecosystem}]</span>` : ""}</div>
|
|
422
|
+
<div class="top-cve-scores">
|
|
423
|
+
${topRiskCve.risk_score != null ? `<span class="badge ${topRiskCve.risk_score >= 7 ? "badge-red" : topRiskCve.risk_score >= 4 ? "badge-yellow" : "badge-gray"}">Risk ${topRiskCve.risk_score.toFixed(1)}</span>` : ""}
|
|
424
|
+
${topRiskCve.severity_score != null ? `<span class="badge ${topRiskCve.severity_score >= 9 ? "badge-red" : topRiskCve.severity_score >= 7 ? "badge-orange" : topRiskCve.severity_score >= 4 ? "badge-yellow" : "badge-gray"}">CVSS ${topRiskCve.severity_score.toFixed(1)}</span>` : ""}
|
|
425
|
+
${topRiskCve.epss_score != null ? `<span class="badge ${topRiskCve.epss_score >= 0.5 ? "badge-red" : topRiskCve.epss_score >= 0.1 ? "badge-yellow" : "badge-gray"}">EPSS ${(topRiskCve.epss_score * 100).toFixed(2)}%</span>` : ""}
|
|
426
|
+
${topRiskCve.verdict ? `<span class="badge ${topRiskCve.verdict === "affected" ? "badge-red" : topRiskCve.verdict === "not_affected" ? "badge-green" : "badge-yellow"}">${topRiskCve.verdict}</span>` : ""}
|
|
427
|
+
</div>
|
|
428
|
+
</div>
|
|
429
|
+
</div>
|
|
430
|
+
` : ""}
|
|
431
|
+
|
|
432
|
+
${totalVulns > 0 ? `
|
|
433
|
+
<div class="section-title">Verdict Breakdown</div>
|
|
434
|
+
<div class="bar-chart">
|
|
435
|
+
${affected > 0 ? `<div class="bar-row">
|
|
436
|
+
<div class="bar-label">Affected</div>
|
|
437
|
+
<div class="bar-track"><div class="bar-fill" style="width:${Math.round(affected / totalVulns * 100)}%;background:var(--red)"></div></div>
|
|
438
|
+
<div class="bar-count">${affected}</div>
|
|
439
|
+
</div>` : ""}
|
|
440
|
+
${underInvestigation > 0 ? `<div class="bar-row">
|
|
441
|
+
<div class="bar-label">Under Investigation</div>
|
|
442
|
+
<div class="bar-track"><div class="bar-fill" style="width:${Math.round(underInvestigation / totalVulns * 100)}%;background:var(--yellow)"></div></div>
|
|
443
|
+
<div class="bar-count">${underInvestigation}</div>
|
|
444
|
+
</div>` : ""}
|
|
445
|
+
${notAffected > 0 ? `<div class="bar-row">
|
|
446
|
+
<div class="bar-label">Not Affected</div>
|
|
447
|
+
<div class="bar-track"><div class="bar-fill" style="width:${Math.round(notAffected / totalVulns * 100)}%;background:var(--green)"></div></div>
|
|
448
|
+
<div class="bar-count">${notAffected}</div>
|
|
449
|
+
</div>` : ""}
|
|
450
|
+
${totalVulns - affected - underInvestigation - notAffected > 0 ? `<div class="bar-row">
|
|
451
|
+
<div class="bar-label">Pending Analysis</div>
|
|
452
|
+
<div class="bar-track"><div class="bar-fill" style="width:${Math.round((totalVulns - affected - underInvestigation - notAffected) / totalVulns * 100)}%;background:var(--text-muted)"></div></div>
|
|
453
|
+
<div class="bar-count">${totalVulns - affected - underInvestigation - notAffected}</div>
|
|
454
|
+
</div>` : ""}
|
|
455
|
+
</div>
|
|
456
|
+
` : ""}
|
|
457
|
+
|
|
458
|
+
${Object.keys(owaspCounts).length > 0 ? `
|
|
459
|
+
<div class="section-title">OWASP Category Breakdown</div>
|
|
460
|
+
<div class="bar-chart" style="margin-bottom:1.5rem">
|
|
461
|
+
${owaspOrder.filter((cat) => owaspCounts[cat] > 0).map((cat) => `<div class="bar-row">
|
|
462
|
+
<div class="bar-label" style="width:200px"><span class="badge badge-accent" style="margin-right:0.4rem">${cat}</span>${owaspNames[cat] ?? cat}</div>
|
|
463
|
+
<div class="bar-track"><div class="bar-fill" style="width:${Math.round((owaspCounts[cat] ?? 0) / owaspMaxCount * 100)}%;background:var(--orange)"></div></div>
|
|
464
|
+
<div class="bar-count">${owaspCounts[cat]}</div>
|
|
465
|
+
</div>`).join("")}
|
|
466
|
+
</div>
|
|
467
|
+
` : ""}
|
|
468
|
+
|
|
469
|
+
${top5.length > 0 ? `
|
|
470
|
+
<div class="section-title">Top 5 Critical CVEs</div>
|
|
471
|
+
<div class="top-cve-list">
|
|
472
|
+
${top5.map((v, i) => `
|
|
473
|
+
<div class="top-cve-item">
|
|
474
|
+
<div class="top-cve-rank">#${i + 1}</div>
|
|
475
|
+
<div class="top-cve-id">${v.cve_id}</div>
|
|
476
|
+
<div class="top-cve-pkg">${v.package_name ?? "\u2014"} ${v.ecosystem ? `<span style="color:var(--text-muted);font-size:0.75rem">[${v.ecosystem}]</span>` : ""}</div>
|
|
477
|
+
<div class="top-cve-scores">
|
|
478
|
+
${v.severity_score != null ? `<span class="badge ${v.severity_score >= 9 ? "badge-red" : v.severity_score >= 7 ? "badge-orange" : v.severity_score >= 4 ? "badge-yellow" : "badge-gray"}">CVSS ${v.severity_score.toFixed(1)}</span>` : ""}
|
|
479
|
+
${v.epss_score != null ? `<span class="badge ${v.epss_score >= 0.5 ? "badge-red" : v.epss_score >= 0.1 ? "badge-yellow" : "badge-gray"}">EPSS ${(v.epss_score * 100).toFixed(2)}%</span>` : ""}
|
|
480
|
+
${v.verdict ? `<span class="badge ${v.verdict === "affected" ? "badge-red" : v.verdict === "not_affected" ? "badge-green" : "badge-yellow"}">${v.verdict}</span>` : ""}
|
|
481
|
+
</div>
|
|
482
|
+
</div>`).join("")}
|
|
483
|
+
</div>
|
|
484
|
+
` : totalVulns === 0 ? '<div class="empty-state">No vulnerabilities found.</div>' : ""}
|
|
485
|
+
</div>
|
|
486
|
+
|
|
487
|
+
<!-- Tab: Vulnerabilities -->
|
|
488
|
+
<div class="tab-panel" id="tab-vulns">
|
|
489
|
+
<div class="filters">
|
|
490
|
+
<div class="filter-label">Severity:</div>
|
|
491
|
+
<select id="filterSeverity">
|
|
492
|
+
<option value="all">All</option>
|
|
493
|
+
<option value="critical">Critical (\u22659)</option>
|
|
494
|
+
<option value="high">High (\u22657)</option>
|
|
495
|
+
<option value="medium">Medium (\u22654)</option>
|
|
496
|
+
<option value="low">Low (<4)</option>
|
|
497
|
+
</select>
|
|
498
|
+
<div class="filter-label">Verdict:</div>
|
|
499
|
+
<select id="filterVerdict">
|
|
500
|
+
<option value="all">All</option>
|
|
501
|
+
<option value="affected">Affected</option>
|
|
502
|
+
<option value="under_investigation">Under Investigation</option>
|
|
503
|
+
<option value="not_affected">Not Affected</option>
|
|
504
|
+
</select>
|
|
505
|
+
<div class="filter-label">Min EPSS:</div>
|
|
506
|
+
<div class="range-group">
|
|
507
|
+
<input type="range" id="filterEpss" min="0" max="1" step="0.01" value="0">
|
|
508
|
+
<span id="epssValue">0.00</span>
|
|
509
|
+
</div>
|
|
510
|
+
</div>
|
|
511
|
+
<div class="table-wrap">
|
|
512
|
+
<table id="vulnTable">
|
|
513
|
+
<thead>
|
|
514
|
+
<tr>
|
|
515
|
+
<th class="sortable" data-col="cve_id">CVE ID</th>
|
|
516
|
+
<th class="sortable" data-col="package_name">Package</th>
|
|
517
|
+
<th>Ecosystem</th>
|
|
518
|
+
<th class="sortable" data-col="severity_score">CVSS</th>
|
|
519
|
+
<th class="sortable sorted-desc" data-col="epss_score">EPSS</th>
|
|
520
|
+
<th class="sortable" data-col="epss_percentile">Percentile</th>
|
|
521
|
+
<th class="sortable" data-col="risk_score">Risk Score</th>
|
|
522
|
+
<th>Verdict</th>
|
|
523
|
+
<th>Fix</th>
|
|
524
|
+
</tr>
|
|
525
|
+
</thead>
|
|
526
|
+
<tbody id="vulnBody"></tbody>
|
|
527
|
+
</table>
|
|
528
|
+
</div>
|
|
529
|
+
<div id="vulnEmpty" class="empty-state" style="display:none">No vulnerabilities match the current filters.</div>
|
|
530
|
+
</div>
|
|
531
|
+
|
|
532
|
+
<!-- Tab: SBOM -->
|
|
533
|
+
<div class="tab-panel" id="tab-sbom">
|
|
534
|
+
<div style="display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem">
|
|
535
|
+
<div class="badge-counts">
|
|
536
|
+
<span class="badge badge-accent">${directCount} direct</span>
|
|
537
|
+
<span class="badge badge-gray">${transitiveCount} transitive</span>
|
|
538
|
+
</div>
|
|
539
|
+
<button class="btn btn-outline" onclick="downloadSBOM()">\u2193 Download SBOM JSON</button>
|
|
540
|
+
</div>
|
|
541
|
+
<div class="filters">
|
|
542
|
+
<div class="filter-label">Ecosystem:</div>
|
|
543
|
+
<select id="filterEco">
|
|
544
|
+
<option value="all">All</option>
|
|
545
|
+
${[...new Set(deps.map((d) => d.ecosystem))].sort().map((e) => `<option value="${e}">${e}</option>`).join("")}
|
|
546
|
+
</select>
|
|
547
|
+
<input type="text" id="filterPkg" placeholder="Search package\u2026">
|
|
548
|
+
</div>
|
|
549
|
+
<div class="table-wrap">
|
|
550
|
+
<table id="sbomTable">
|
|
551
|
+
<thead>
|
|
552
|
+
<tr>
|
|
553
|
+
<th>Package</th>
|
|
554
|
+
<th>Ecosystem</th>
|
|
555
|
+
<th>Version</th>
|
|
556
|
+
<th>Scope</th>
|
|
557
|
+
<th>License</th>
|
|
558
|
+
<th>purl</th>
|
|
559
|
+
</tr>
|
|
560
|
+
</thead>
|
|
561
|
+
<tbody id="sbomBody"></tbody>
|
|
562
|
+
</table>
|
|
563
|
+
</div>
|
|
564
|
+
<div id="sbomEmpty" class="empty-state" style="display:none">No packages match the current filters.</div>
|
|
565
|
+
</div>
|
|
566
|
+
|
|
567
|
+
<!-- Tab: VEX -->
|
|
568
|
+
<div class="tab-panel" id="tab-vex">
|
|
569
|
+
<div style="display:flex;justify-content:flex-end;margin-bottom:1rem">
|
|
570
|
+
<button class="btn btn-outline" onclick="downloadVEX()">\u2193 Download VEX JSON</button>
|
|
571
|
+
</div>
|
|
572
|
+
<div class="table-wrap">
|
|
573
|
+
<table id="vexTable">
|
|
574
|
+
<thead>
|
|
575
|
+
<tr>
|
|
576
|
+
<th>CVE ID</th>
|
|
577
|
+
<th>Package</th>
|
|
578
|
+
<th>Analysis State</th>
|
|
579
|
+
<th>Justification</th>
|
|
580
|
+
<th>Detail</th>
|
|
581
|
+
</tr>
|
|
582
|
+
</thead>
|
|
583
|
+
<tbody id="vexBody"></tbody>
|
|
584
|
+
</table>
|
|
585
|
+
</div>
|
|
586
|
+
<div id="vexEmpty" class="empty-state" style="display:none">No VEX entries found.</div>
|
|
587
|
+
</div>
|
|
588
|
+
|
|
589
|
+
<!-- Tab: Licenses -->
|
|
590
|
+
<div class="tab-panel" id="tab-licenses">
|
|
591
|
+
<div id="licBanners"></div>
|
|
592
|
+
<div class="filters">
|
|
593
|
+
<div class="filter-label">Policy:</div>
|
|
594
|
+
<select id="filterLicPolicy">
|
|
595
|
+
<option value="all">All</option>
|
|
596
|
+
<option value="deny">Deny</option>
|
|
597
|
+
<option value="warn">Warn</option>
|
|
598
|
+
<option value="ok">OK</option>
|
|
599
|
+
<option value="unknown">Unknown</option>
|
|
600
|
+
</select>
|
|
601
|
+
</div>
|
|
602
|
+
<div class="table-wrap">
|
|
603
|
+
<table id="licTable">
|
|
604
|
+
<thead>
|
|
605
|
+
<tr>
|
|
606
|
+
<th>Package</th>
|
|
607
|
+
<th>Ecosystem</th>
|
|
608
|
+
<th>License</th>
|
|
609
|
+
<th>Policy Status</th>
|
|
610
|
+
</tr>
|
|
611
|
+
</thead>
|
|
612
|
+
<tbody id="licBody"></tbody>
|
|
613
|
+
</table>
|
|
614
|
+
</div>
|
|
615
|
+
<div id="licEmpty" class="empty-state" style="display:none">No packages match the current filters.</div>
|
|
616
|
+
</div>
|
|
617
|
+
|
|
618
|
+
<!-- Tab: Staleness -->
|
|
619
|
+
<div class="tab-panel" id="tab-staleness">
|
|
620
|
+
<div class="stats-grid" style="grid-template-columns:repeat(3,1fr);max-width:600px;margin-bottom:1.5rem">
|
|
621
|
+
<div class="stat-card">
|
|
622
|
+
<div class="stat-label">Scored</div>
|
|
623
|
+
<div class="stat-value accent">${stalenessRows.length}</div>
|
|
624
|
+
</div>
|
|
625
|
+
<div class="stat-card">
|
|
626
|
+
<div class="stat-label">Low (0\u20130.3)</div>
|
|
627
|
+
<div class="stat-value green">${stalenessRows.filter((r) => (r.staleness_score ?? 0) < 0.3).length}</div>
|
|
628
|
+
</div>
|
|
629
|
+
<div class="stat-card">
|
|
630
|
+
<div class="stat-label">High (0.7\u20131.0)</div>
|
|
631
|
+
<div class="stat-value red">${stalenessRows.filter((r) => (r.staleness_score ?? 0) >= 0.7).length}</div>
|
|
632
|
+
</div>
|
|
633
|
+
</div>
|
|
634
|
+
|
|
635
|
+
${stalenessRows.length > 0 ? `
|
|
636
|
+
<div class="section-title">Distribution</div>
|
|
637
|
+
<div class="bar-chart" style="margin-bottom:1.5rem">
|
|
638
|
+
<div class="bar-row">
|
|
639
|
+
<div class="bar-label">Low (0\u20130.3)</div>
|
|
640
|
+
<div class="bar-track"><div class="bar-fill" style="width:${Math.round(stalenessRows.filter((r) => (r.staleness_score ?? 0) < 0.3).length / stalenessRows.length * 100)}%;background:var(--green)"></div></div>
|
|
641
|
+
<div class="bar-count">${stalenessRows.filter((r) => (r.staleness_score ?? 0) < 0.3).length}</div>
|
|
642
|
+
</div>
|
|
643
|
+
<div class="bar-row">
|
|
644
|
+
<div class="bar-label">Medium (0.3\u20130.7)</div>
|
|
645
|
+
<div class="bar-track"><div class="bar-fill" style="width:${Math.round(stalenessRows.filter((r) => {
|
|
646
|
+
const s = r.staleness_score ?? 0;
|
|
647
|
+
return s >= 0.3 && s < 0.7;
|
|
648
|
+
}).length / stalenessRows.length * 100)}%;background:var(--yellow)"></div></div>
|
|
649
|
+
<div class="bar-count">${stalenessRows.filter((r) => {
|
|
650
|
+
const s = r.staleness_score ?? 0;
|
|
651
|
+
return s >= 0.3 && s < 0.7;
|
|
652
|
+
}).length}</div>
|
|
653
|
+
</div>
|
|
654
|
+
<div class="bar-row">
|
|
655
|
+
<div class="bar-label">High (0.7\u20131.0)</div>
|
|
656
|
+
<div class="bar-track"><div class="bar-fill" style="width:${Math.round(stalenessRows.filter((r) => (r.staleness_score ?? 0) >= 0.7).length / stalenessRows.length * 100)}%;background:var(--red)"></div></div>
|
|
657
|
+
<div class="bar-count">${stalenessRows.filter((r) => (r.staleness_score ?? 0) >= 0.7).length}</div>
|
|
658
|
+
</div>
|
|
659
|
+
</div>
|
|
660
|
+
` : ""}
|
|
661
|
+
|
|
662
|
+
<div class="table-wrap">
|
|
663
|
+
<table id="staleTable">
|
|
664
|
+
<thead>
|
|
665
|
+
<tr>
|
|
666
|
+
<th>Package</th>
|
|
667
|
+
<th>Ecosystem</th>
|
|
668
|
+
<th>Current</th>
|
|
669
|
+
<th>Latest</th>
|
|
670
|
+
<th>Months Behind</th>
|
|
671
|
+
<th class="sortable sorted-desc" data-col="staleness_score">Score</th>
|
|
672
|
+
<th>Bar</th>
|
|
673
|
+
</tr>
|
|
674
|
+
</thead>
|
|
675
|
+
<tbody id="staleBody"></tbody>
|
|
676
|
+
</table>
|
|
677
|
+
</div>
|
|
678
|
+
<div id="staleEmpty" class="empty-state" style="display:none">No staleness data available.</div>
|
|
679
|
+
</div>
|
|
680
|
+
|
|
681
|
+
<!-- Tab: Attack Surface -->
|
|
682
|
+
<div class="tab-panel" id="tab-attack-surface">
|
|
683
|
+
${attackSurface ? `
|
|
684
|
+
<div class="stats-grid" style="grid-template-columns:repeat(4,1fr);max-width:700px;margin-bottom:1.5rem">
|
|
685
|
+
<div class="stat-card">
|
|
686
|
+
<div class="stat-label">Total Routes</div>
|
|
687
|
+
<div class="stat-value accent">${attackSurface.totalRoutes}</div>
|
|
688
|
+
</div>
|
|
689
|
+
<div class="stat-card">
|
|
690
|
+
<div class="stat-label">Public</div>
|
|
691
|
+
<div class="stat-value ${attackSurface.publicRoutes > 0 ? "yellow" : "green"}">${attackSurface.publicRoutes}</div>
|
|
692
|
+
</div>
|
|
693
|
+
<div class="stat-card">
|
|
694
|
+
<div class="stat-label">Authenticated</div>
|
|
695
|
+
<div class="stat-value accent">${attackSurface.authenticatedRoutes}</div>
|
|
696
|
+
</div>
|
|
697
|
+
<div class="stat-card">
|
|
698
|
+
<div class="stat-label">With Vulnerabilities</div>
|
|
699
|
+
<div class="stat-value ${attackSurface.routesWithVulns > 0 ? "red" : "green"}">${attackSurface.routesWithVulns}</div>
|
|
700
|
+
</div>
|
|
701
|
+
</div>
|
|
702
|
+
${attackSurface.allRoutes.length > 0 ? `
|
|
703
|
+
<div class="table-wrap">
|
|
704
|
+
<table id="attackSurfaceTable">
|
|
705
|
+
<thead>
|
|
706
|
+
<tr>
|
|
707
|
+
<th>Route</th>
|
|
708
|
+
<th>Exposure</th>
|
|
709
|
+
<th>Vuln Count</th>
|
|
710
|
+
<th>Highest Risk</th>
|
|
711
|
+
<th>Hops</th>
|
|
712
|
+
</tr>
|
|
713
|
+
</thead>
|
|
714
|
+
<tbody>
|
|
715
|
+
${attackSurface.allRoutes.map((entry) => {
|
|
716
|
+
const exposureBadge = entry.exposureLevel === "public" ? '<span class="badge badge-red">public</span>' : entry.exposureLevel === "authenticated" ? '<span class="badge badge-yellow">authenticated</span>' : entry.exposureLevel === "internal" ? '<span class="badge badge-gray">internal</span>' : '<span class="badge badge-gray">unknown</span>';
|
|
717
|
+
const hasVulns = entry.vulnerableDeps.length > 0;
|
|
718
|
+
const rowStyle = entry.exposureLevel === "public" && hasVulns ? 'style="background:rgba(248,81,73,0.06)"' : entry.exposureLevel === "authenticated" && hasVulns ? 'style="background:rgba(210,153,34,0.06)"' : "";
|
|
719
|
+
const highestRisk = entry.riskScore > 0 ? entry.riskScore.toFixed(1) : "\u2014";
|
|
720
|
+
const minHop = entry.vulnerableDeps.length > 0 ? Math.min(...entry.vulnerableDeps.map((d) => d.hopCount)) : null;
|
|
721
|
+
return `<tr ${rowStyle}>
|
|
722
|
+
<td><code style="font-size:0.8rem;color:var(--accent)">${entry.route.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">")}</code><br><span style="font-size:0.72rem;color:var(--text-muted)">${(entry.filePath || "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">")}</span></td>
|
|
723
|
+
<td>${exposureBadge}</td>
|
|
724
|
+
<td>${entry.vulnerableDeps.length > 0 ? `<span class="badge badge-red">${entry.vulnerableDeps.length}</span>` : '<span style="color:var(--text-muted)">0</span>'}</td>
|
|
725
|
+
<td>${entry.riskScore >= 7 ? `<span class="score-critical">${highestRisk}</span>` : entry.riskScore >= 4 ? `<span class="score-medium">${highestRisk}</span>` : `<span class="score-low">${highestRisk}</span>`}</td>
|
|
726
|
+
<td>${minHop != null ? minHop : "\u2014"}</td>
|
|
727
|
+
</tr>`;
|
|
728
|
+
}).join("")}
|
|
729
|
+
</tbody>
|
|
730
|
+
</table>
|
|
731
|
+
</div>` : '<div class="empty-state">No routes found.</div>'}
|
|
732
|
+
` : '<div class="empty-state">No routes found.</div>'}
|
|
733
|
+
</div>
|
|
734
|
+
|
|
735
|
+
<!-- Tab: Secrets -->
|
|
736
|
+
<div class="tab-panel" id="tab-secrets">
|
|
737
|
+
${secretsResult ? `
|
|
738
|
+
<div style="margin-bottom:1rem;color:var(--text-muted);font-size:0.85rem">
|
|
739
|
+
${secretsResult.totalFindings} finding${secretsResult.totalFindings !== 1 ? "s" : ""} in ${secretsResult.filesScanned} file${secretsResult.filesScanned !== 1 ? "s" : ""} scanned
|
|
740
|
+
${secretsResult.criticalCount > 0 ? `\u2014 <span style="color:var(--red);font-weight:600">${secretsResult.criticalCount} critical</span>` : ""}
|
|
741
|
+
${secretsResult.highCount > 0 ? `\u2014 <span style="color:var(--orange);font-weight:600">${secretsResult.highCount} high</span>` : ""}
|
|
742
|
+
</div>
|
|
743
|
+
${secretsResult.findings.length > 0 ? `
|
|
744
|
+
<div class="table-wrap">
|
|
745
|
+
<table id="secretsTable">
|
|
746
|
+
<thead>
|
|
747
|
+
<tr>
|
|
748
|
+
<th>Severity</th>
|
|
749
|
+
<th>Type</th>
|
|
750
|
+
<th>File:Line</th>
|
|
751
|
+
<th>Function</th>
|
|
752
|
+
<th>Reachable From</th>
|
|
753
|
+
</tr>
|
|
754
|
+
</thead>
|
|
755
|
+
<tbody>
|
|
756
|
+
${secretsResult.findings.map((f) => {
|
|
757
|
+
const sevBadge = f.severity === "critical" ? '<span class="badge badge-red">critical</span>' : f.severity === "high" ? '<span class="badge badge-orange">high</span>' : f.severity === "medium" ? '<span class="badge badge-yellow">medium</span>' : '<span class="badge badge-gray">low</span>';
|
|
758
|
+
const fileDisplay = (f.filePath || "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
759
|
+
const funcDisplay = (f.nodeName || "\u2014").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
760
|
+
const typeDisplay = (f.type || "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
761
|
+
return `<tr>
|
|
762
|
+
<td>${sevBadge}</td>
|
|
763
|
+
<td>${typeDisplay}</td>
|
|
764
|
+
<td><code style="font-size:0.75rem;color:var(--text-muted)">${fileDisplay}:${f.line}</code></td>
|
|
765
|
+
<td><code style="font-size:0.78rem">${funcDisplay}</code></td>
|
|
766
|
+
<td>${f.entryPointCount > 0 ? `<span class="badge badge-yellow">${f.entryPointCount} entry point${f.entryPointCount !== 1 ? "s" : ""}</span>` : '<span style="color:var(--text-muted)">\u2014</span>'}</td>
|
|
767
|
+
</tr>`;
|
|
768
|
+
}).join("")}
|
|
769
|
+
</tbody>
|
|
770
|
+
</table>
|
|
771
|
+
</div>` : '<div class="empty-state">No secrets detected.</div>'}
|
|
772
|
+
` : '<div class="empty-state">No secrets detected.</div>'}
|
|
773
|
+
</div>
|
|
774
|
+
|
|
775
|
+
<!-- Tab: SAST Flows -->
|
|
776
|
+
<div class="tab-panel" id="tab-sast">
|
|
777
|
+
${flowsResult ? `
|
|
778
|
+
<div style="margin-bottom:1rem;color:var(--text-muted);font-size:0.85rem">
|
|
779
|
+
${flowsResult.length} finding${flowsResult.length !== 1 ? "s" : ""} across ${new Set(flowsResult.map((f) => f.owaspCategory)).size} OWASP categor${new Set(flowsResult.map((f) => f.owaspCategory)).size !== 1 ? "ies" : "y"}
|
|
780
|
+
</div>
|
|
781
|
+
${flowsResult.length > 0 ? `
|
|
782
|
+
<div class="table-wrap">
|
|
783
|
+
<table id="sastTable">
|
|
784
|
+
<thead>
|
|
785
|
+
<tr>
|
|
786
|
+
<th>OWASP</th>
|
|
787
|
+
<th>Severity</th>
|
|
788
|
+
<th>Type</th>
|
|
789
|
+
<th>File:Line</th>
|
|
790
|
+
<th>Symbol</th>
|
|
791
|
+
<th>Recommendation</th>
|
|
792
|
+
</tr>
|
|
793
|
+
</thead>
|
|
794
|
+
<tbody>
|
|
795
|
+
${flowsResult.map((f) => {
|
|
796
|
+
const owaspBadge = `<span class="badge badge-accent">${f.owaspCategory}</span>`;
|
|
797
|
+
const sevBadge = f.severity === "critical" ? '<span class="badge badge-red">critical</span>' : f.severity === "high" ? '<span class="badge badge-orange">high</span>' : '<span class="badge badge-yellow">medium</span>';
|
|
798
|
+
const fileDisplay = (f.filePath || "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
799
|
+
const typeDisplay = (f.type || "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
800
|
+
const symbolDisplay = (f.symbol || "\u2014").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
801
|
+
const recDisplay = (f.recommendation || "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
802
|
+
return `<tr>
|
|
803
|
+
<td>${owaspBadge}</td>
|
|
804
|
+
<td>${sevBadge}</td>
|
|
805
|
+
<td><code style="font-size:0.78rem">${typeDisplay}</code></td>
|
|
806
|
+
<td><code style="font-size:0.75rem;color:var(--text-muted)">${fileDisplay}:${f.line}</code></td>
|
|
807
|
+
<td><code style="font-size:0.78rem;color:var(--accent)">${symbolDisplay}</code></td>
|
|
808
|
+
<td style="max-width:300px;font-size:0.78rem;color:var(--text-muted)">${recDisplay}</td>
|
|
809
|
+
</tr>`;
|
|
810
|
+
}).join("")}
|
|
811
|
+
</tbody>
|
|
812
|
+
</table>
|
|
813
|
+
</div>` : '<div class="empty-state">No dangerous patterns detected.</div>'}
|
|
814
|
+
` : '<div class="empty-state">No dangerous patterns detected.</div>'}
|
|
815
|
+
</div>
|
|
816
|
+
|
|
817
|
+
<!-- Tab: Remediation -->
|
|
818
|
+
<div class="tab-panel" id="tab-remediation">
|
|
819
|
+
${remediationStatus ? `
|
|
820
|
+
<div class="stats-grid" style="grid-template-columns:repeat(3,1fr);max-width:500px;margin-bottom:1.5rem">
|
|
821
|
+
<div class="stat-card">
|
|
822
|
+
<div class="stat-label">Overdue</div>
|
|
823
|
+
<div class="stat-value ${remediationStatus.filter((r) => r.slaStatus === "overdue").length > 0 ? "red" : "green"}">${remediationStatus.filter((r) => r.slaStatus === "overdue").length}</div>
|
|
824
|
+
</div>
|
|
825
|
+
<div class="stat-card">
|
|
826
|
+
<div class="stat-label">On Track</div>
|
|
827
|
+
<div class="stat-value green">${remediationStatus.filter((r) => r.slaStatus === "ok" || r.slaStatus === "warning").length}</div>
|
|
828
|
+
</div>
|
|
829
|
+
<div class="stat-card">
|
|
830
|
+
<div class="stat-label">No Fix Available</div>
|
|
831
|
+
<div class="stat-value yellow">${remediationStatus.filter((r) => r.slaStatus === "no_fix").length}</div>
|
|
832
|
+
</div>
|
|
833
|
+
</div>
|
|
834
|
+
${remediationStatus.length > 0 ? `
|
|
835
|
+
<div class="table-wrap">
|
|
836
|
+
<table id="remediationTable">
|
|
837
|
+
<thead>
|
|
838
|
+
<tr>
|
|
839
|
+
<th>CVE</th>
|
|
840
|
+
<th>Package</th>
|
|
841
|
+
<th>Days Open</th>
|
|
842
|
+
<th>Fix Available</th>
|
|
843
|
+
<th>SLA (days)</th>
|
|
844
|
+
<th>Status</th>
|
|
845
|
+
</tr>
|
|
846
|
+
</thead>
|
|
847
|
+
<tbody>
|
|
848
|
+
${remediationStatus.map((r) => {
|
|
849
|
+
const statusChip = r.slaStatus === "ok" ? '<span class="badge badge-green">ok</span>' : r.slaStatus === "warning" ? '<span class="badge badge-yellow">warning</span>' : r.slaStatus === "overdue" ? '<span class="badge badge-red">overdue</span>' : '<span class="badge badge-gray">no fix</span>';
|
|
850
|
+
const cveDisplay = (r.cveId || "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
851
|
+
const pkgDisplay = (r.packageName || "").replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
852
|
+
const slaDays = r.severity !== null ? r.severity >= 9 ? 7 : r.severity >= 7 ? 30 : r.severity >= 4 ? 90 : 180 : 180;
|
|
853
|
+
return `<tr>
|
|
854
|
+
<td><code style="font-size:0.8rem;color:var(--accent)">${cveDisplay}</code></td>
|
|
855
|
+
<td>${pkgDisplay}</td>
|
|
856
|
+
<td>${r.daysOpen != null ? r.daysOpen + "d" : "\u2014"}</td>
|
|
857
|
+
<td>${r.daysWithFixAvailable != null ? `<span class="badge badge-green">${r.daysWithFixAvailable}d ago</span>` : '<span style="color:var(--text-muted)">\u2014</span>'}</td>
|
|
858
|
+
<td>${slaDays}d</td>
|
|
859
|
+
<td>${statusChip}</td>
|
|
860
|
+
</tr>`;
|
|
861
|
+
}).join("")}
|
|
862
|
+
</tbody>
|
|
863
|
+
</table>
|
|
864
|
+
</div>` : '<div class="empty-state">No open remediation items.</div>'}
|
|
865
|
+
` : '<div class="empty-state">No remediation data available.</div>'}
|
|
866
|
+
</div>
|
|
867
|
+
|
|
868
|
+
</div>
|
|
869
|
+
|
|
870
|
+
<script>
|
|
871
|
+
// \u2500\u2500 Embedded data \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
872
|
+
const VULNS = ${safeJson(vulns)};
|
|
873
|
+
const DEPS = ${safeJson(deps)};
|
|
874
|
+
const LIC_DATA = ${safeJson(licenseData)};
|
|
875
|
+
const STALE_DATA = ${safeJson(stalenessRows)};
|
|
876
|
+
const SBOM_JSON = ${safeJson(sbomJson)};
|
|
877
|
+
const VEX_JSON = ${safeJson(vexJson)};
|
|
878
|
+
|
|
879
|
+
// \u2500\u2500 Tab switching \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
880
|
+
document.querySelectorAll('.tab').forEach(btn => {
|
|
881
|
+
btn.addEventListener('click', () => {
|
|
882
|
+
document.querySelectorAll('.tab').forEach(t => t.classList.remove('active'));
|
|
883
|
+
document.querySelectorAll('.tab-panel').forEach(p => p.classList.remove('active'));
|
|
884
|
+
btn.classList.add('active');
|
|
885
|
+
const tabId = btn.getAttribute('data-tab');
|
|
886
|
+
document.getElementById('tab-' + tabId).classList.add('active');
|
|
887
|
+
});
|
|
888
|
+
});
|
|
889
|
+
|
|
890
|
+
// \u2500\u2500 Utilities \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
891
|
+
function esc(str) {
|
|
892
|
+
if (str == null) return '';
|
|
893
|
+
return String(str).replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>').replace(/"/g,'"');
|
|
894
|
+
}
|
|
895
|
+
function downloadJson(data, filename) {
|
|
896
|
+
const blob = new Blob([data], {type: 'application/json'});
|
|
897
|
+
const a = document.createElement('a');
|
|
898
|
+
a.href = URL.createObjectURL(blob);
|
|
899
|
+
a.download = filename;
|
|
900
|
+
a.click();
|
|
901
|
+
}
|
|
902
|
+
function downloadSBOM() { downloadJson(SBOM_JSON, 'sbom.json'); }
|
|
903
|
+
function downloadVEX() { downloadJson(VEX_JSON, 'vex.json'); }
|
|
904
|
+
|
|
905
|
+
function epssClass(v) {
|
|
906
|
+
if (v == null) return 'badge-gray';
|
|
907
|
+
if (v >= 0.5) return 'badge-red';
|
|
908
|
+
if (v >= 0.1) return 'badge-yellow';
|
|
909
|
+
return 'badge-gray';
|
|
910
|
+
}
|
|
911
|
+
function cvssClass(v) {
|
|
912
|
+
if (v == null) return '';
|
|
913
|
+
if (v >= 9) return 'score-critical';
|
|
914
|
+
if (v >= 7) return 'score-high';
|
|
915
|
+
if (v >= 4) return 'score-medium';
|
|
916
|
+
return 'score-low';
|
|
917
|
+
}
|
|
918
|
+
function verdictBadge(v) {
|
|
919
|
+
if (!v) return '<span class="badge badge-gray">\u2014</span>';
|
|
920
|
+
if (v === 'affected') return '<span class="badge badge-red">affected</span>';
|
|
921
|
+
if (v === 'not_affected') return '<span class="badge badge-green">not affected</span>';
|
|
922
|
+
if (v === 'under_investigation') return '<span class="badge badge-yellow">investigating</span>';
|
|
923
|
+
return '<span class="badge badge-gray">' + esc(v) + '</span>';
|
|
924
|
+
}
|
|
925
|
+
function staleColor(score) {
|
|
926
|
+
if (score >= 0.7) return 'var(--red)';
|
|
927
|
+
if (score >= 0.3) return 'var(--yellow)';
|
|
928
|
+
return 'var(--green)';
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
// \u2500\u2500 Vulnerability table \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
932
|
+
let vulnSortCol = 'epss_score';
|
|
933
|
+
let vulnSortDir = -1; // -1 = desc
|
|
934
|
+
|
|
935
|
+
function renderVulns() {
|
|
936
|
+
const sevFilter = document.getElementById('filterSeverity').value;
|
|
937
|
+
const verdFilter = document.getElementById('filterVerdict').value;
|
|
938
|
+
const epssMin = parseFloat(document.getElementById('filterEpss').value) || 0;
|
|
939
|
+
|
|
940
|
+
let rows = VULNS.filter(v => {
|
|
941
|
+
if (sevFilter !== 'all') {
|
|
942
|
+
const s = v.severity_score ?? 0;
|
|
943
|
+
if (sevFilter === 'critical' && s < 9) return false;
|
|
944
|
+
if (sevFilter === 'high' && (s < 7 || s >= 9)) return false;
|
|
945
|
+
if (sevFilter === 'medium' && (s < 4 || s >= 7)) return false;
|
|
946
|
+
if (sevFilter === 'low' && s >= 4) return false;
|
|
947
|
+
}
|
|
948
|
+
if (verdFilter !== 'all') {
|
|
949
|
+
if ((v.verdict ?? '') !== verdFilter) return false;
|
|
950
|
+
}
|
|
951
|
+
if ((v.epss_score ?? 0) < epssMin) return false;
|
|
952
|
+
return true;
|
|
953
|
+
});
|
|
954
|
+
|
|
955
|
+
rows = rows.slice().sort((a, b) => {
|
|
956
|
+
const av = a[vulnSortCol] ?? (typeof a[vulnSortCol] === 'number' ? -Infinity : '');
|
|
957
|
+
const bv = b[vulnSortCol] ?? (typeof b[vulnSortCol] === 'number' ? -Infinity : '');
|
|
958
|
+
if (av < bv) return vulnSortDir;
|
|
959
|
+
if (av > bv) return -vulnSortDir;
|
|
960
|
+
return 0;
|
|
961
|
+
});
|
|
962
|
+
|
|
963
|
+
const tbody = document.getElementById('vulnBody');
|
|
964
|
+
const empty = document.getElementById('vulnEmpty');
|
|
965
|
+
|
|
966
|
+
if (rows.length === 0) {
|
|
967
|
+
tbody.innerHTML = '';
|
|
968
|
+
empty.style.display = 'block';
|
|
969
|
+
return;
|
|
970
|
+
}
|
|
971
|
+
empty.style.display = 'none';
|
|
972
|
+
|
|
973
|
+
tbody.innerHTML = rows.map(v => {
|
|
974
|
+
const rowClass = v.verdict === 'affected' ? 'verdict-affected'
|
|
975
|
+
: v.verdict === 'under_investigation' ? 'verdict-investigating'
|
|
976
|
+
: v.verdict === 'not_affected' ? 'verdict-not-affected' : '';
|
|
977
|
+
const riskScore = v.risk_score;
|
|
978
|
+
const riskBadge = riskScore != null
|
|
979
|
+
? \`<span class="badge \${riskScore >= 7 ? 'badge-red' : riskScore >= 4 ? 'badge-yellow' : 'badge-gray'}">[Risk: \${riskScore.toFixed(1)}]</span>\`
|
|
980
|
+
: '<span style="color:var(--text-muted)">\u2014</span>';
|
|
981
|
+
return \`<tr class="row-toggle \${rowClass}" onclick="toggleExpand(this, \${JSON.stringify(v).replace(/"/g,'"')})">
|
|
982
|
+
<td><code style="font-size:0.8rem;color:var(--accent)">\${esc(v.cve_id)}</code></td>
|
|
983
|
+
<td>\${esc(v.package_name ?? '\u2014')}</td>
|
|
984
|
+
<td><span class="badge badge-gray">\${esc(v.ecosystem ?? '\u2014')}</span></td>
|
|
985
|
+
<td class="\${cvssClass(v.severity_score)}">\${v.severity_score != null ? v.severity_score.toFixed(1) : '\u2014'}</td>
|
|
986
|
+
<td><span class="badge \${epssClass(v.epss_score)}">\${v.epss_score != null ? (v.epss_score*100).toFixed(2)+'%' : '\u2014'}</span></td>
|
|
987
|
+
<td>\${v.epss_percentile != null ? (v.epss_percentile*100).toFixed(0)+'th' : '\u2014'}</td>
|
|
988
|
+
<td>\${riskBadge}</td>
|
|
989
|
+
<td>\${verdictBadge(v.verdict)}</td>
|
|
990
|
+
<td>\${v.fixed_version ? '<span class="badge badge-green">'+esc(v.fixed_version)+'</span>' : '<span style="color:var(--text-muted)">\u2014</span>'}</td>
|
|
991
|
+
</tr>
|
|
992
|
+
<tr class="expand-row" style="display:none">
|
|
993
|
+
<td colspan="9">
|
|
994
|
+
<div class="expand-body" id="expand-\${esc(v.cve_id)}"></div>
|
|
995
|
+
</td>
|
|
996
|
+
</tr>\`;
|
|
997
|
+
}).join('');
|
|
998
|
+
}
|
|
999
|
+
|
|
1000
|
+
function toggleExpand(row, data) {
|
|
1001
|
+
const expandRow = row.nextElementSibling;
|
|
1002
|
+
if (!expandRow) return;
|
|
1003
|
+
const isVisible = expandRow.style.display !== 'none';
|
|
1004
|
+
if (isVisible) {
|
|
1005
|
+
expandRow.style.display = 'none';
|
|
1006
|
+
return;
|
|
1007
|
+
}
|
|
1008
|
+
expandRow.style.display = '';
|
|
1009
|
+
const body = expandRow.querySelector('.expand-body');
|
|
1010
|
+
let html = '';
|
|
1011
|
+
if (data.summary) {
|
|
1012
|
+
html += '<div class="expand-section"><div class="expand-label">Summary</div><div>' + esc(data.summary) + '</div></div>';
|
|
1013
|
+
}
|
|
1014
|
+
if (data.affected_ranges) {
|
|
1015
|
+
try {
|
|
1016
|
+
const ranges = JSON.parse(data.affected_ranges);
|
|
1017
|
+
html += '<div class="expand-section"><div class="expand-label">Affected Ranges</div><pre>' + esc(JSON.stringify(ranges, null, 2)) + '</pre></div>';
|
|
1018
|
+
} catch {}
|
|
1019
|
+
}
|
|
1020
|
+
if (data.paths) {
|
|
1021
|
+
try {
|
|
1022
|
+
const paths = JSON.parse(data.paths);
|
|
1023
|
+
if (Array.isArray(paths) && paths.length > 0) {
|
|
1024
|
+
html += '<div class="expand-section"><div class="expand-label">Call Paths (' + paths.length + ')</div>';
|
|
1025
|
+
paths.slice(0, 3).forEach(p => {
|
|
1026
|
+
if (p.path && Array.isArray(p.path)) {
|
|
1027
|
+
html += '<div style="margin-bottom:0.3rem;font-family:monospace;font-size:0.78rem;color:var(--text-muted)">' + p.path.map(n => esc(n.id || n)).join(' \u2192 ') + '</div>';
|
|
1028
|
+
}
|
|
1029
|
+
});
|
|
1030
|
+
if (paths.length > 3) html += '<div style="color:var(--text-muted);font-size:0.75rem">\u2026 and ' + (paths.length-3) + ' more</div>';
|
|
1031
|
+
html += '</div>';
|
|
1032
|
+
}
|
|
1033
|
+
} catch {}
|
|
1034
|
+
}
|
|
1035
|
+
if (!html) html = '<div style="color:var(--text-muted)">No additional details available.</div>';
|
|
1036
|
+
body.innerHTML = html;
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
// Sort headers
|
|
1040
|
+
document.querySelectorAll('#vulnTable th.sortable').forEach(th => {
|
|
1041
|
+
th.addEventListener('click', () => {
|
|
1042
|
+
const col = th.getAttribute('data-col');
|
|
1043
|
+
if (vulnSortCol === col) {
|
|
1044
|
+
vulnSortDir = -vulnSortDir;
|
|
1045
|
+
th.classList.toggle('sorted-asc', vulnSortDir === 1);
|
|
1046
|
+
th.classList.toggle('sorted-desc', vulnSortDir === -1);
|
|
1047
|
+
} else {
|
|
1048
|
+
document.querySelectorAll('#vulnTable th').forEach(t => { t.classList.remove('sorted-asc','sorted-desc'); });
|
|
1049
|
+
vulnSortCol = col;
|
|
1050
|
+
vulnSortDir = -1;
|
|
1051
|
+
th.classList.add('sorted-desc');
|
|
1052
|
+
}
|
|
1053
|
+
renderVulns();
|
|
1054
|
+
});
|
|
1055
|
+
});
|
|
1056
|
+
|
|
1057
|
+
document.getElementById('filterSeverity').addEventListener('change', renderVulns);
|
|
1058
|
+
document.getElementById('filterVerdict').addEventListener('change', renderVulns);
|
|
1059
|
+
document.getElementById('filterEpss').addEventListener('input', function() {
|
|
1060
|
+
document.getElementById('epssValue').textContent = parseFloat(this.value).toFixed(2);
|
|
1061
|
+
renderVulns();
|
|
1062
|
+
});
|
|
1063
|
+
|
|
1064
|
+
// \u2500\u2500 SBOM table \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
1065
|
+
function renderSBOM() {
|
|
1066
|
+
const eco = document.getElementById('filterEco').value;
|
|
1067
|
+
const pkg = document.getElementById('filterPkg').value.toLowerCase();
|
|
1068
|
+
|
|
1069
|
+
const rows = DEPS.filter(d => {
|
|
1070
|
+
if (eco !== 'all' && d.ecosystem !== eco) return false;
|
|
1071
|
+
if (pkg && !d.package_name.toLowerCase().includes(pkg)) return false;
|
|
1072
|
+
return true;
|
|
1073
|
+
});
|
|
1074
|
+
|
|
1075
|
+
const tbody = document.getElementById('sbomBody');
|
|
1076
|
+
const empty = document.getElementById('sbomEmpty');
|
|
1077
|
+
if (rows.length === 0) {
|
|
1078
|
+
tbody.innerHTML = '';
|
|
1079
|
+
empty.style.display = 'block';
|
|
1080
|
+
return;
|
|
1081
|
+
}
|
|
1082
|
+
empty.style.display = 'none';
|
|
1083
|
+
|
|
1084
|
+
tbody.innerHTML = rows.map(d => {
|
|
1085
|
+
const version = d.resolved_version || d.declared_constraint || '\u2014';
|
|
1086
|
+
const purl = d.ecosystem && d.package_name
|
|
1087
|
+
? 'pkg:' + esc(d.ecosystem) + '/' + esc(d.package_name) + '@' + esc(version)
|
|
1088
|
+
: '\u2014';
|
|
1089
|
+
const scopeBadge = d.classification === 'direct'
|
|
1090
|
+
? '<span class="badge badge-accent">direct</span>'
|
|
1091
|
+
: '<span class="badge badge-gray">transitive</span>';
|
|
1092
|
+
return \`<tr>
|
|
1093
|
+
<td><strong>\${esc(d.package_name)}</strong></td>
|
|
1094
|
+
<td><span class="badge badge-gray">\${esc(d.ecosystem)}</span></td>
|
|
1095
|
+
<td><code style="font-size:0.78rem">\${esc(version)}</code></td>
|
|
1096
|
+
<td>\${scopeBadge}</td>
|
|
1097
|
+
<td>\${d.license ? esc(d.license) : '<span style="color:var(--text-muted)">\u2014</span>'}</td>
|
|
1098
|
+
<td><code style="font-size:0.72rem;color:var(--text-muted)">\${esc(purl)}</code></td>
|
|
1099
|
+
</tr>\`;
|
|
1100
|
+
}).join('');
|
|
1101
|
+
}
|
|
1102
|
+
|
|
1103
|
+
document.getElementById('filterEco').addEventListener('change', renderSBOM);
|
|
1104
|
+
document.getElementById('filterPkg').addEventListener('input', renderSBOM);
|
|
1105
|
+
|
|
1106
|
+
// \u2500\u2500 VEX table \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
1107
|
+
function renderVEX() {
|
|
1108
|
+
let vexData;
|
|
1109
|
+
try { vexData = JSON.parse(VEX_JSON); } catch { vexData = null; }
|
|
1110
|
+
const tbody = document.getElementById('vexBody');
|
|
1111
|
+
const empty = document.getElementById('vexEmpty');
|
|
1112
|
+
|
|
1113
|
+
const vulns = vexData && vexData.vulnerabilities ? vexData.vulnerabilities : [];
|
|
1114
|
+
if (vulns.length === 0) {
|
|
1115
|
+
tbody.innerHTML = '';
|
|
1116
|
+
empty.style.display = 'block';
|
|
1117
|
+
return;
|
|
1118
|
+
}
|
|
1119
|
+
empty.style.display = 'none';
|
|
1120
|
+
|
|
1121
|
+
tbody.innerHTML = vulns.map(entry => {
|
|
1122
|
+
const state = entry.analysis && entry.analysis.state ? entry.analysis.state : '\u2014';
|
|
1123
|
+
const justification = entry.analysis && entry.analysis.justification ? entry.analysis.justification : '\u2014';
|
|
1124
|
+
const detail = entry.analysis && entry.analysis.detail ? entry.analysis.detail : '\u2014';
|
|
1125
|
+
const pkg = entry.affects && entry.affects[0] ? entry.affects[0].ref : '\u2014';
|
|
1126
|
+
const stateClass = state === 'affected' ? 'state-affected'
|
|
1127
|
+
: state === 'not_affected' ? 'state-not_affected'
|
|
1128
|
+
: state === 'under_investigation' ? 'state-investigating' : '';
|
|
1129
|
+
return \`<tr>
|
|
1130
|
+
<td><code style="font-size:0.8rem;color:var(--accent)">\${esc(entry.id)}</code></td>
|
|
1131
|
+
<td><code style="font-size:0.75rem;color:var(--text-muted)">\${esc(pkg)}</code></td>
|
|
1132
|
+
<td><span class="\${stateClass}" style="font-weight:500">\${esc(state)}</span></td>
|
|
1133
|
+
<td>\${esc(justification)}</td>
|
|
1134
|
+
<td style="max-width:300px">\${esc(detail)}</td>
|
|
1135
|
+
</tr>\`;
|
|
1136
|
+
}).join('');
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
// \u2500\u2500 Licenses table \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
1140
|
+
function renderLicenses() {
|
|
1141
|
+
// Banners
|
|
1142
|
+
const bannerEl = document.getElementById('licBanners');
|
|
1143
|
+
const denyCount = LIC_DATA.filter(d => d.status === 'deny').length;
|
|
1144
|
+
const warnCount = LIC_DATA.filter(d => d.status === 'warn').length;
|
|
1145
|
+
let banners = '';
|
|
1146
|
+
if (denyCount > 0) banners += \`<div class="policy-banner deny">\u2717 \${denyCount} package\${denyCount !== 1 ? 's' : ''} with denied license\${denyCount !== 1 ? 's' : ''}</div>\`;
|
|
1147
|
+
if (warnCount > 0) banners += \`<div class="policy-banner warn">\u26A0 \${warnCount} package\${warnCount !== 1 ? 's' : ''} with warned license\${warnCount !== 1 ? 's' : ''}</div>\`;
|
|
1148
|
+
bannerEl.innerHTML = banners;
|
|
1149
|
+
|
|
1150
|
+
const pol = document.getElementById('filterLicPolicy').value;
|
|
1151
|
+
const rows = LIC_DATA.filter(d => pol === 'all' || d.status === pol);
|
|
1152
|
+
|
|
1153
|
+
const tbody = document.getElementById('licBody');
|
|
1154
|
+
const empty = document.getElementById('licEmpty');
|
|
1155
|
+
if (rows.length === 0) {
|
|
1156
|
+
tbody.innerHTML = '';
|
|
1157
|
+
empty.style.display = 'block';
|
|
1158
|
+
return;
|
|
1159
|
+
}
|
|
1160
|
+
empty.style.display = 'none';
|
|
1161
|
+
|
|
1162
|
+
tbody.innerHTML = rows.map(d => {
|
|
1163
|
+
let statusHtml;
|
|
1164
|
+
if (d.status === 'deny') statusHtml = '<span class="badge badge-red">\u2717 deny</span>';
|
|
1165
|
+
else if (d.status === 'warn') statusHtml = '<span class="badge badge-yellow">\u26A0 warn</span>';
|
|
1166
|
+
else if (d.status === 'ok') statusHtml = '<span class="badge badge-green">\u2713 ok</span>';
|
|
1167
|
+
else statusHtml = '<span class="badge badge-gray">\u2014 unknown</span>';
|
|
1168
|
+
return \`<tr>
|
|
1169
|
+
<td><strong>\${esc(d.package_name)}</strong></td>
|
|
1170
|
+
<td><span class="badge badge-gray">\${esc(d.ecosystem)}</span></td>
|
|
1171
|
+
<td>\${d.license ? esc(d.license) : '<span style="color:var(--text-muted)">\u2014</span>'}</td>
|
|
1172
|
+
<td>\${statusHtml}</td>
|
|
1173
|
+
</tr>\`;
|
|
1174
|
+
}).join('');
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
document.getElementById('filterLicPolicy').addEventListener('change', renderLicenses);
|
|
1178
|
+
|
|
1179
|
+
// \u2500\u2500 Staleness table \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
1180
|
+
function renderStaleness() {
|
|
1181
|
+
const tbody = document.getElementById('staleBody');
|
|
1182
|
+
const empty = document.getElementById('staleEmpty');
|
|
1183
|
+
|
|
1184
|
+
if (STALE_DATA.length === 0) {
|
|
1185
|
+
tbody.innerHTML = '';
|
|
1186
|
+
empty.style.display = 'block';
|
|
1187
|
+
return;
|
|
1188
|
+
}
|
|
1189
|
+
empty.style.display = 'none';
|
|
1190
|
+
|
|
1191
|
+
tbody.innerHTML = STALE_DATA.map(d => {
|
|
1192
|
+
const version = d.resolved_version || d.declared_constraint || '\u2014';
|
|
1193
|
+
const latest = d.latest_version || '\u2014';
|
|
1194
|
+
const score = d.staleness_score ?? 0;
|
|
1195
|
+
const months = d.latest_published
|
|
1196
|
+
? Math.round((Date.now() - d.latest_published) / (1000 * 60 * 60 * 24 * 30))
|
|
1197
|
+
: null;
|
|
1198
|
+
const barPct = Math.round(score * 100);
|
|
1199
|
+
const barColor = staleColor(score);
|
|
1200
|
+
const scoreClass = score >= 0.7 ? 'score-critical' : score >= 0.3 ? 'score-medium' : 'score-low';
|
|
1201
|
+
return \`<tr>
|
|
1202
|
+
<td><strong>\${esc(d.package_name)}</strong></td>
|
|
1203
|
+
<td><span class="badge badge-gray">\${esc(d.ecosystem)}</span></td>
|
|
1204
|
+
<td><code style="font-size:0.78rem">\${esc(version)}</code></td>
|
|
1205
|
+
<td><code style="font-size:0.78rem;color:var(--green)">\${esc(latest)}</code></td>
|
|
1206
|
+
<td>\${months != null ? months + 'mo' : '\u2014'}</td>
|
|
1207
|
+
<td class="\${scoreClass}">\${score.toFixed(2)}</td>
|
|
1208
|
+
<td>
|
|
1209
|
+
<div class="stale-bar-track">
|
|
1210
|
+
<div class="stale-bar-fill" style="width:\${barPct}%;background:\${barColor}"></div>
|
|
1211
|
+
</div>
|
|
1212
|
+
</td>
|
|
1213
|
+
</tr>\`;
|
|
1214
|
+
}).join('');
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
// \u2500\u2500 Initial render \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
1218
|
+
renderVulns();
|
|
1219
|
+
renderSBOM();
|
|
1220
|
+
renderVEX();
|
|
1221
|
+
renderLicenses();
|
|
1222
|
+
renderStaleness();
|
|
1223
|
+
</script>
|
|
1224
|
+
|
|
1225
|
+
</body>
|
|
1226
|
+
</html>`;
|
|
1227
|
+
}
|
|
1228
|
+
function register(secCmd) {
|
|
1229
|
+
secCmd.command("export [projectPath]").description("Generate a self-contained HTML security dashboard").option("--output <file>", "Output HTML file path", ".kirograph/security-export.html").option("--open", "Open in browser after generating").action(async (projectPath, opts) => {
|
|
1230
|
+
const target = path.resolve(projectPath ?? process.cwd());
|
|
1231
|
+
const config = await (0, import_config.loadConfig)(target);
|
|
1232
|
+
if (!config.enableSecurity) {
|
|
1233
|
+
console.error(`
|
|
1234
|
+
${"\x1B[33m"}\u26A0 Security analysis is disabled.${import_ui.reset}`);
|
|
1235
|
+
console.error(` ${import_ui.dim}Enable it in .kirograph/config.json:${import_ui.reset} ${import_ui.violet}${import_ui.bold}"enableSecurity": true${import_ui.reset}`);
|
|
1236
|
+
console.error(` ${import_ui.dim}Then re-run:${import_ui.reset} ${import_ui.violet}${import_ui.bold}kirograph index${import_ui.reset}
|
|
1237
|
+
`);
|
|
1238
|
+
process.exit(1);
|
|
1239
|
+
}
|
|
1240
|
+
const KiroGraph = (await Promise.resolve().then(() => require("../../index.js"))).default;
|
|
1241
|
+
if (!KiroGraph.isInitialized(target)) {
|
|
1242
|
+
console.error(" \u2716 KiroGraph not initialized. Run: kirograph init");
|
|
1243
|
+
process.exit(1);
|
|
1244
|
+
}
|
|
1245
|
+
const cg = await KiroGraph.open(target);
|
|
1246
|
+
const db = cg.getDatabase();
|
|
1247
|
+
db.applySecuritySchema();
|
|
1248
|
+
const rawDb = db.getRawDb();
|
|
1249
|
+
const rawVulns = rawDb.all(`
|
|
1250
|
+
SELECT v.cve_id, v.severity_score, v.risk_score, v.epss_score, v.epss_percentile,
|
|
1251
|
+
v.fixed_version, v.summary, v.affected_ranges,
|
|
1252
|
+
d.package_name, d.ecosystem, d.resolved_version, d.declared_constraint,
|
|
1253
|
+
d.scope, d.license,
|
|
1254
|
+
r.verdict, r.paths, r.unresolved_symbols, r.reaching_entry_point_count
|
|
1255
|
+
FROM sec_vulnerabilities v
|
|
1256
|
+
LEFT JOIN edges e ON e.target = v.node_id AND e.kind = 'has_vulnerability'
|
|
1257
|
+
LEFT JOIN sec_dependencies d ON d.node_id = e.source
|
|
1258
|
+
LEFT JOIN sec_reachability r ON r.vulnerability_node_id = v.node_id
|
|
1259
|
+
ORDER BY v.epss_score DESC NULLS LAST, v.severity_score DESC NULLS LAST
|
|
1260
|
+
`);
|
|
1261
|
+
const _vRank = (v) => v === "affected" ? 3 : v === "under_investigation" ? 2 : v === "not_affected" ? 1 : 0;
|
|
1262
|
+
const _dedupMap = /* @__PURE__ */ new Map();
|
|
1263
|
+
for (const row of rawVulns) {
|
|
1264
|
+
const key = `${row.cve_id}::${row.package_name ?? ""}::${row.ecosystem ?? ""}`;
|
|
1265
|
+
const ex = _dedupMap.get(key);
|
|
1266
|
+
if (!ex || _vRank(row.verdict) > _vRank(ex.verdict)) _dedupMap.set(key, row);
|
|
1267
|
+
}
|
|
1268
|
+
const vulns = [..._dedupMap.values()];
|
|
1269
|
+
const directNodeIds = new Set(
|
|
1270
|
+
rawDb.all(`SELECT source FROM edges WHERE kind = 'declared_in'`).map((r) => r.source)
|
|
1271
|
+
);
|
|
1272
|
+
const rawDeps = rawDb.all(
|
|
1273
|
+
`SELECT node_id, package_name, ecosystem, resolved_version, declared_constraint,
|
|
1274
|
+
scope, license, latest_version, latest_published, staleness_score
|
|
1275
|
+
FROM sec_dependencies ORDER BY package_name`
|
|
1276
|
+
);
|
|
1277
|
+
const deps = rawDeps.map((d) => ({
|
|
1278
|
+
...d,
|
|
1279
|
+
classification: directNodeIds.has(d.node_id) ? "direct" : "transitive"
|
|
1280
|
+
}));
|
|
1281
|
+
const { SBOMExporter } = await Promise.resolve().then(() => require("../../security/export/sbom.js"));
|
|
1282
|
+
const { VEXExporter } = await Promise.resolve().then(() => require("../../security/export/vex.js"));
|
|
1283
|
+
const sbomExporter = new SBOMExporter(db, target);
|
|
1284
|
+
const vexExporter = new VEXExporter(db, target);
|
|
1285
|
+
const sbomJson = sbomExporter.exportJSON();
|
|
1286
|
+
const vexJson = vexExporter.exportJSON();
|
|
1287
|
+
let attackSurface = null;
|
|
1288
|
+
try {
|
|
1289
|
+
const { AttackSurfaceAnalyzer } = await Promise.resolve().then(() => require("../../security/attack-surface.js"));
|
|
1290
|
+
const analyzer = new AttackSurfaceAnalyzer(db);
|
|
1291
|
+
attackSurface = await analyzer.analyze();
|
|
1292
|
+
} catch {
|
|
1293
|
+
}
|
|
1294
|
+
let secretsResult = null;
|
|
1295
|
+
try {
|
|
1296
|
+
const { SecretsScanner } = await Promise.resolve().then(() => require("../../security/secrets.js"));
|
|
1297
|
+
const scanner = new SecretsScanner(db, target);
|
|
1298
|
+
secretsResult = await scanner.scan();
|
|
1299
|
+
} catch {
|
|
1300
|
+
}
|
|
1301
|
+
let flowsResult = null;
|
|
1302
|
+
try {
|
|
1303
|
+
const { DataFlowAnalyzer } = await Promise.resolve().then(() => require("../../security/data-flows.js"));
|
|
1304
|
+
const analyzer = new DataFlowAnalyzer(db);
|
|
1305
|
+
flowsResult = await analyzer.analyze();
|
|
1306
|
+
} catch {
|
|
1307
|
+
}
|
|
1308
|
+
let remediationStatus = null;
|
|
1309
|
+
try {
|
|
1310
|
+
const { RemediationTracker } = await Promise.resolve().then(() => require("../../security/remediation.js"));
|
|
1311
|
+
const tracker = new RemediationTracker(db);
|
|
1312
|
+
remediationStatus = tracker.getStatus();
|
|
1313
|
+
} catch {
|
|
1314
|
+
}
|
|
1315
|
+
cg.close();
|
|
1316
|
+
const denyList = config.securityLicensePolicy?.deny ?? [];
|
|
1317
|
+
const warnList = config.securityLicensePolicy?.warn ?? [];
|
|
1318
|
+
const projectName = path.basename(target);
|
|
1319
|
+
const generatedAt = (/* @__PURE__ */ new Date()).toLocaleString();
|
|
1320
|
+
const html = generateHtml({
|
|
1321
|
+
projectName,
|
|
1322
|
+
generatedAt,
|
|
1323
|
+
vulns,
|
|
1324
|
+
deps,
|
|
1325
|
+
sbomJson,
|
|
1326
|
+
vexJson,
|
|
1327
|
+
denyList,
|
|
1328
|
+
warnList,
|
|
1329
|
+
attackSurface,
|
|
1330
|
+
secretsResult,
|
|
1331
|
+
flowsResult,
|
|
1332
|
+
remediationStatus
|
|
1333
|
+
});
|
|
1334
|
+
const outPath = path.resolve(target, opts.output);
|
|
1335
|
+
fs.mkdirSync(path.dirname(outPath), { recursive: true });
|
|
1336
|
+
fs.writeFileSync(outPath, html, "utf-8");
|
|
1337
|
+
console.error(` ${import_ui.green}\u2713${import_ui.reset} Security dashboard written to ${import_ui.violet}${import_ui.bold}${outPath}${import_ui.reset}`);
|
|
1338
|
+
console.error(` ${import_ui.dim}${vulns.length} vulnerabilities \xB7 ${deps.length} dependencies${import_ui.reset}`);
|
|
1339
|
+
if (opts.open) {
|
|
1340
|
+
openBrowser(outPath);
|
|
1341
|
+
console.error(` ${import_ui.dim}Opening in browser\u2026${import_ui.reset}`);
|
|
1342
|
+
}
|
|
1343
|
+
});
|
|
1344
|
+
}
|
|
1345
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
1346
|
+
0 && (module.exports = {
|
|
1347
|
+
register
|
|
1348
|
+
});
|
|
1349
|
+
//# sourceMappingURL=security-export.js.map
|