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,142 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var serialization_exports = {};
|
|
20
|
+
__export(serialization_exports, {
|
|
21
|
+
deserializeAll: () => deserializeAll,
|
|
22
|
+
deserializeComponentToDependency: () => deserializeComponentToDependency,
|
|
23
|
+
serializeAll: () => serializeAll,
|
|
24
|
+
serializeDependencyToComponent: () => serializeDependencyToComponent
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(serialization_exports);
|
|
27
|
+
const ECOSYSTEM_TO_PURL = {
|
|
28
|
+
npm: "npm",
|
|
29
|
+
maven: "maven",
|
|
30
|
+
go: "golang",
|
|
31
|
+
pypi: "pypi",
|
|
32
|
+
cargo: "cargo"
|
|
33
|
+
};
|
|
34
|
+
const PURL_TO_ECOSYSTEM = {
|
|
35
|
+
npm: "npm",
|
|
36
|
+
maven: "maven",
|
|
37
|
+
golang: "go",
|
|
38
|
+
pypi: "pypi",
|
|
39
|
+
cargo: "cargo"
|
|
40
|
+
};
|
|
41
|
+
function serializeDependencyToComponent(dep) {
|
|
42
|
+
const purlType = ECOSYSTEM_TO_PURL[dep.ecosystem];
|
|
43
|
+
if (!purlType) {
|
|
44
|
+
throw new Error(`Unsupported ecosystem: ${dep.ecosystem}`);
|
|
45
|
+
}
|
|
46
|
+
const version = dep.resolved_version ?? dep.declared_constraint;
|
|
47
|
+
if (!version) {
|
|
48
|
+
throw new Error(`No version or constraint available for dependency: ${dep.package_name}`);
|
|
49
|
+
}
|
|
50
|
+
if (!dep.package_name) {
|
|
51
|
+
throw new Error("Dependency package_name is required");
|
|
52
|
+
}
|
|
53
|
+
const purl = `pkg:${purlType}/${dep.package_name}@${version}`;
|
|
54
|
+
const scope = dep.scope === "production" ? "required" : "optional";
|
|
55
|
+
const component = {
|
|
56
|
+
type: "library",
|
|
57
|
+
name: dep.package_name,
|
|
58
|
+
version,
|
|
59
|
+
purl,
|
|
60
|
+
scope,
|
|
61
|
+
properties: [
|
|
62
|
+
{ name: "kirograph:declaredConstraint", value: dep.declared_constraint }
|
|
63
|
+
]
|
|
64
|
+
};
|
|
65
|
+
return component;
|
|
66
|
+
}
|
|
67
|
+
function deserializeComponentToDependency(component) {
|
|
68
|
+
if (!component.purl) {
|
|
69
|
+
throw new Error(`Component "${component.name}" is missing purl`);
|
|
70
|
+
}
|
|
71
|
+
if (!component.name) {
|
|
72
|
+
throw new Error("Component name is required");
|
|
73
|
+
}
|
|
74
|
+
const purlMatch = component.purl.match(/^pkg:([^/]+)\/(.+)@(.+)$/);
|
|
75
|
+
if (!purlMatch) {
|
|
76
|
+
throw new Error(`Invalid purl format: ${component.purl}`);
|
|
77
|
+
}
|
|
78
|
+
const [, purlType, purlName, purlVersion] = purlMatch;
|
|
79
|
+
const ecosystem = PURL_TO_ECOSYSTEM[purlType];
|
|
80
|
+
if (!ecosystem) {
|
|
81
|
+
throw new Error(`Unsupported purl type: ${purlType}`);
|
|
82
|
+
}
|
|
83
|
+
const constraintProp = component.properties?.find(
|
|
84
|
+
(p) => p.name === "kirograph:declaredConstraint"
|
|
85
|
+
);
|
|
86
|
+
const declaredConstraint = constraintProp?.value ?? component.version;
|
|
87
|
+
const scope = component.scope === "optional" ? "optional" : "production";
|
|
88
|
+
const row = {
|
|
89
|
+
node_id: `dep:${ecosystem}:${purlName}`,
|
|
90
|
+
ecosystem,
|
|
91
|
+
package_name: purlName,
|
|
92
|
+
declared_constraint: declaredConstraint,
|
|
93
|
+
resolved_version: purlVersion,
|
|
94
|
+
scope,
|
|
95
|
+
transitive_status: "complete",
|
|
96
|
+
last_vuln_check: null,
|
|
97
|
+
vuln_data_stale: 0,
|
|
98
|
+
vuln_data_stale_since: null,
|
|
99
|
+
source_manifests: "[]"
|
|
100
|
+
};
|
|
101
|
+
return row;
|
|
102
|
+
}
|
|
103
|
+
function serializeAll(deps) {
|
|
104
|
+
const components = [];
|
|
105
|
+
const errors = [];
|
|
106
|
+
for (const dep of deps) {
|
|
107
|
+
try {
|
|
108
|
+
const component = serializeDependencyToComponent(dep);
|
|
109
|
+
components.push(component);
|
|
110
|
+
} catch (err) {
|
|
111
|
+
errors.push({
|
|
112
|
+
name: dep.package_name || dep.node_id || "unknown",
|
|
113
|
+
reason: err instanceof Error ? err.message : String(err)
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
return { components, errors };
|
|
118
|
+
}
|
|
119
|
+
function deserializeAll(components) {
|
|
120
|
+
const deps = [];
|
|
121
|
+
const errors = [];
|
|
122
|
+
for (const component of components) {
|
|
123
|
+
try {
|
|
124
|
+
const dep = deserializeComponentToDependency(component);
|
|
125
|
+
deps.push(dep);
|
|
126
|
+
} catch (err) {
|
|
127
|
+
errors.push({
|
|
128
|
+
name: component.name || "unknown",
|
|
129
|
+
reason: err instanceof Error ? err.message : String(err)
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
return { deps, errors };
|
|
134
|
+
}
|
|
135
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
136
|
+
0 && (module.exports = {
|
|
137
|
+
deserializeAll,
|
|
138
|
+
deserializeComponentToDependency,
|
|
139
|
+
serializeAll,
|
|
140
|
+
serializeDependencyToComponent
|
|
141
|
+
});
|
|
142
|
+
//# sourceMappingURL=serialization.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/security/export/serialization.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * CycloneDX serialization utilities for Dependency_Nodes.\n *\n * Provides serialize/deserialize between DependencyRow (sec_dependencies table)\n * and CycloneDX JSON component format, with partial failure resilience.\n *\n * Requirements: 8.2, 8.3, 8.4\n */\nimport type { CycloneDXComponent } from '../types';\n\n// \u2500\u2500 Interfaces \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n/**\n * Represents a row from the sec_dependencies table.\n */\nexport interface DependencyRow {\n node_id: string;\n ecosystem: string;\n package_name: string;\n declared_constraint: string;\n resolved_version: string | null;\n scope: 'production' | 'development' | 'optional';\n transitive_status: 'complete' | 'incomplete';\n last_vuln_check: number | null;\n vuln_data_stale: number;\n vuln_data_stale_since: number | null;\n source_manifests: string; // JSON array of manifest paths\n}\n\n/**\n * Error reported when a single node fails serialization/deserialization.\n */\nexport interface SerializationError {\n name: string;\n reason: string;\n}\n\n// \u2500\u2500 Ecosystem \u2194 purl type mapping \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nconst ECOSYSTEM_TO_PURL: Record<string, string> = {\n npm: 'npm',\n maven: 'maven',\n go: 'golang',\n pypi: 'pypi',\n cargo: 'cargo',\n};\n\nconst PURL_TO_ECOSYSTEM: Record<string, string> = {\n npm: 'npm',\n maven: 'maven',\n golang: 'go',\n pypi: 'pypi',\n cargo: 'cargo',\n};\n\n// \u2500\u2500 Single-item serialization \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n/**\n * Converts a dependency database row to a CycloneDX component object.\n * Stores the declared constraint in a `properties` array entry with\n * name \"kirograph:declaredConstraint\".\n *\n * The purl format is: pkg:<ecosystem>/<name>@<version>\n */\nexport function serializeDependencyToComponent(dep: DependencyRow): CycloneDXComponent {\n const purlType = ECOSYSTEM_TO_PURL[dep.ecosystem];\n if (!purlType) {\n throw new Error(`Unsupported ecosystem: ${dep.ecosystem}`);\n }\n\n const version = dep.resolved_version ?? dep.declared_constraint;\n if (!version) {\n throw new Error(`No version or constraint available for dependency: ${dep.package_name}`);\n }\n\n if (!dep.package_name) {\n throw new Error('Dependency package_name is required');\n }\n\n const purl = `pkg:${purlType}/${dep.package_name}@${version}`;\n\n const scope: 'required' | 'optional' =\n dep.scope === 'production' ? 'required' : 'optional';\n\n const component: CycloneDXComponent = {\n type: 'library',\n name: dep.package_name,\n version,\n purl,\n scope,\n properties: [\n { name: 'kirograph:declaredConstraint', value: dep.declared_constraint },\n ],\n };\n\n return component;\n}\n\n// \u2500\u2500 Single-item deserialization \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n/**\n * Converts a CycloneDX component back to a dependency row.\n * Extracts the constraint from the properties array.\n */\nexport function deserializeComponentToDependency(component: CycloneDXComponent): DependencyRow {\n if (!component.purl) {\n throw new Error(`Component \"${component.name}\" is missing purl`);\n }\n\n if (!component.name) {\n throw new Error('Component name is required');\n }\n\n // Parse purl: pkg:<type>/<name>@<version>\n const purlMatch = component.purl.match(/^pkg:([^/]+)\\/(.+)@(.+)$/);\n if (!purlMatch) {\n throw new Error(`Invalid purl format: ${component.purl}`);\n }\n\n const [, purlType, purlName, purlVersion] = purlMatch;\n\n const ecosystem = PURL_TO_ECOSYSTEM[purlType];\n if (!ecosystem) {\n throw new Error(`Unsupported purl type: ${purlType}`);\n }\n\n // Extract declared constraint from properties\n const constraintProp = component.properties?.find(\n (p) => p.name === 'kirograph:declaredConstraint',\n );\n const declaredConstraint = constraintProp?.value ?? component.version;\n\n // Map CycloneDX scope back to dependency scope\n const scope: 'production' | 'development' | 'optional' =\n component.scope === 'optional' ? 'optional' : 'production';\n\n const row: DependencyRow = {\n node_id: `dep:${ecosystem}:${purlName}`,\n ecosystem,\n package_name: purlName,\n declared_constraint: declaredConstraint,\n resolved_version: purlVersion,\n scope,\n transitive_status: 'complete',\n last_vuln_check: null,\n vuln_data_stale: 0,\n vuln_data_stale_since: null,\n source_manifests: '[]',\n };\n\n return row;\n}\n\n// \u2500\u2500 Batch serialization with partial failure resilience \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n/**\n * Serializes all dependencies, collecting errors for any that fail\n * without aborting the batch.\n */\nexport function serializeAll(deps: DependencyRow[]): {\n components: CycloneDXComponent[];\n errors: SerializationError[];\n} {\n const components: CycloneDXComponent[] = [];\n const errors: SerializationError[] = [];\n\n for (const dep of deps) {\n try {\n const component = serializeDependencyToComponent(dep);\n components.push(component);\n } catch (err) {\n errors.push({\n name: dep.package_name || dep.node_id || 'unknown',\n reason: err instanceof Error ? err.message : String(err),\n });\n }\n }\n\n return { components, errors };\n}\n\n/**\n * Deserializes all components back to dependency rows,\n * collecting errors for any that fail without aborting the batch.\n */\nexport function deserializeAll(components: CycloneDXComponent[]): {\n deps: DependencyRow[];\n errors: SerializationError[];\n} {\n const deps: DependencyRow[] = [];\n const errors: SerializationError[] = [];\n\n for (const component of components) {\n try {\n const dep = deserializeComponentToDependency(component);\n deps.push(dep);\n } catch (err) {\n errors.push({\n name: component.name || 'unknown',\n reason: err instanceof Error ? err.message : String(err),\n });\n }\n }\n\n return { deps, errors };\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAuCA,MAAM,oBAA4C;AAAA,EAChD,KAAK;AAAA,EACL,OAAO;AAAA,EACP,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,OAAO;AACT;AAEA,MAAM,oBAA4C;AAAA,EAChD,KAAK;AAAA,EACL,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,OAAO;AACT;AAWO,SAAS,+BAA+B,KAAwC;AACrF,QAAM,WAAW,kBAAkB,IAAI,SAAS;AAChD,MAAI,CAAC,UAAU;AACb,UAAM,IAAI,MAAM,0BAA0B,IAAI,SAAS,EAAE;AAAA,EAC3D;AAEA,QAAM,UAAU,IAAI,oBAAoB,IAAI;AAC5C,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,sDAAsD,IAAI,YAAY,EAAE;AAAA,EAC1F;AAEA,MAAI,CAAC,IAAI,cAAc;AACrB,UAAM,IAAI,MAAM,qCAAqC;AAAA,EACvD;AAEA,QAAM,OAAO,OAAO,QAAQ,IAAI,IAAI,YAAY,IAAI,OAAO;AAE3D,QAAM,QACJ,IAAI,UAAU,eAAe,aAAa;AAE5C,QAAM,YAAgC;AAAA,IACpC,MAAM;AAAA,IACN,MAAM,IAAI;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA,YAAY;AAAA,MACV,EAAE,MAAM,gCAAgC,OAAO,IAAI,oBAAoB;AAAA,IACzE;AAAA,EACF;AAEA,SAAO;AACT;AAQO,SAAS,iCAAiC,WAA8C;AAC7F,MAAI,CAAC,UAAU,MAAM;AACnB,UAAM,IAAI,MAAM,cAAc,UAAU,IAAI,mBAAmB;AAAA,EACjE;AAEA,MAAI,CAAC,UAAU,MAAM;AACnB,UAAM,IAAI,MAAM,4BAA4B;AAAA,EAC9C;AAGA,QAAM,YAAY,UAAU,KAAK,MAAM,0BAA0B;AACjE,MAAI,CAAC,WAAW;AACd,UAAM,IAAI,MAAM,wBAAwB,UAAU,IAAI,EAAE;AAAA,EAC1D;AAEA,QAAM,CAAC,EAAE,UAAU,UAAU,WAAW,IAAI;AAE5C,QAAM,YAAY,kBAAkB,QAAQ;AAC5C,MAAI,CAAC,WAAW;AACd,UAAM,IAAI,MAAM,0BAA0B,QAAQ,EAAE;AAAA,EACtD;AAGA,QAAM,iBAAiB,UAAU,YAAY;AAAA,IAC3C,CAAC,MAAM,EAAE,SAAS;AAAA,EACpB;AACA,QAAM,qBAAqB,gBAAgB,SAAS,UAAU;AAG9D,QAAM,QACJ,UAAU,UAAU,aAAa,aAAa;AAEhD,QAAM,MAAqB;AAAA,IACzB,SAAS,OAAO,SAAS,IAAI,QAAQ;AAAA,IACrC;AAAA,IACA,cAAc;AAAA,IACd,qBAAqB;AAAA,IACrB,kBAAkB;AAAA,IAClB;AAAA,IACA,mBAAmB;AAAA,IACnB,iBAAiB;AAAA,IACjB,iBAAiB;AAAA,IACjB,uBAAuB;AAAA,IACvB,kBAAkB;AAAA,EACpB;AAEA,SAAO;AACT;AAQO,SAAS,aAAa,MAG3B;AACA,QAAM,aAAmC,CAAC;AAC1C,QAAM,SAA+B,CAAC;AAEtC,aAAW,OAAO,MAAM;AACtB,QAAI;AACF,YAAM,YAAY,+BAA+B,GAAG;AACpD,iBAAW,KAAK,SAAS;AAAA,IAC3B,SAAS,KAAK;AACZ,aAAO,KAAK;AAAA,QACV,MAAM,IAAI,gBAAgB,IAAI,WAAW;AAAA,QACzC,QAAQ,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG;AAAA,MACzD,CAAC;AAAA,IACH;AAAA,EACF;AAEA,SAAO,EAAE,YAAY,OAAO;AAC9B;AAMO,SAAS,eAAe,YAG7B;AACA,QAAM,OAAwB,CAAC;AAC/B,QAAM,SAA+B,CAAC;AAEtC,aAAW,aAAa,YAAY;AAClC,QAAI;AACF,YAAM,MAAM,iCAAiC,SAAS;AACtD,WAAK,KAAK,GAAG;AAAA,IACf,SAAS,KAAK;AACZ,aAAO,KAAK;AAAA,QACV,MAAM,UAAU,QAAQ;AAAA,QACxB,QAAQ,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG;AAAA,MACzD,CAAC;AAAA,IACH;AAAA,EACF;AAEA,SAAO,EAAE,MAAM,OAAO;AACxB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* KiroGraph-Sec VEX Exporter
|
|
3
|
+
*
|
|
4
|
+
* Generates CycloneDX 1.5 VEX (Vulnerability Exploitability eXchange) documents
|
|
5
|
+
* with reachability-informed vulnerability status. Each Vulnerability_Node is
|
|
6
|
+
* mapped to a VEX entry with an analysis state derived from the reachability verdict.
|
|
7
|
+
*
|
|
8
|
+
* Requirements: 7.1, 7.2, 7.3, 7.4, 7.5, 7.6, 7.7, 7.8
|
|
9
|
+
*/
|
|
10
|
+
import type { GraphDatabase } from '../../db/database';
|
|
11
|
+
import type { CycloneDXVEX } from '../types';
|
|
12
|
+
/**
|
|
13
|
+
* VEXExporter serializes vulnerability assessments with reachability verdicts
|
|
14
|
+
* into CycloneDX 1.5 VEX format.
|
|
15
|
+
*/
|
|
16
|
+
export declare class VEXExporter {
|
|
17
|
+
private readonly db;
|
|
18
|
+
private readonly projectRoot;
|
|
19
|
+
constructor(db: GraphDatabase, projectRoot: string);
|
|
20
|
+
/**
|
|
21
|
+
* Generate CycloneDX 1.5 VEX JSON object.
|
|
22
|
+
*
|
|
23
|
+
* Queries all Vulnerability_Nodes and their reachability verdicts,
|
|
24
|
+
* producing one VEX entry per vulnerability.
|
|
25
|
+
*/
|
|
26
|
+
export(): CycloneDXVEX;
|
|
27
|
+
/**
|
|
28
|
+
* Export to pretty-printed JSON string.
|
|
29
|
+
*/
|
|
30
|
+
exportJSON(): string;
|
|
31
|
+
/**
|
|
32
|
+
* Build a single CycloneDX vulnerability entry from a Vulnerability_Node.
|
|
33
|
+
*
|
|
34
|
+
* Maps reachability verdicts to CycloneDX analysis states:
|
|
35
|
+
* - affected → "affected" with path summary detail
|
|
36
|
+
* - not_affected → "not_affected" with justification "code_not_reachable"
|
|
37
|
+
* - under_investigation → "under_investigation" with unresolved symbols detail
|
|
38
|
+
* - no reachability data → "under_investigation" with pending analysis detail
|
|
39
|
+
*/
|
|
40
|
+
private buildVulnerabilityEntry;
|
|
41
|
+
/**
|
|
42
|
+
* Build the analysis section based on the reachability verdict.
|
|
43
|
+
*/
|
|
44
|
+
private buildAnalysis;
|
|
45
|
+
/**
|
|
46
|
+
* Build analysis detail for "affected" verdict.
|
|
47
|
+
*
|
|
48
|
+
* Includes: entry point count, layer count, shortest path length.
|
|
49
|
+
*/
|
|
50
|
+
private buildAffectedAnalysis;
|
|
51
|
+
/**
|
|
52
|
+
* Build analysis detail for "under_investigation" verdict.
|
|
53
|
+
*
|
|
54
|
+
* Lists unresolved symbols or states pending analysis reason.
|
|
55
|
+
*/
|
|
56
|
+
private buildUnderInvestigationAnalysis;
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=vex.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vex.d.ts","sourceRoot":"","sources":["../../../src/security/export/vex.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EAAE,YAAY,EAA4C,MAAM,UAAU,CAAC;AAMvF;;;GAGG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAgB;IACnC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;gBAEzB,EAAE,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM;IAKlD;;;;;OAKG;IACH,MAAM,IAAI,YAAY;IAiDtB;;OAEG;IACH,UAAU,IAAI,MAAM;IAIpB;;;;;;;;OAQG;IACH,OAAO,CAAC,uBAAuB;IA6D/B;;OAEG;IACH,OAAO,CAAC,aAAa;IAgCrB;;;;OAIG;IACH,OAAO,CAAC,qBAAqB;IAuC7B;;;;OAIG;IACH,OAAO,CAAC,+BAA+B;CAoBxC"}
|
|
@@ -0,0 +1,220 @@
|
|
|
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 vex_exports = {};
|
|
30
|
+
__export(vex_exports, {
|
|
31
|
+
VEXExporter: () => VEXExporter
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(vex_exports);
|
|
34
|
+
var path = __toESM(require("path"));
|
|
35
|
+
const TOOL_NAME = "kirograph-sec";
|
|
36
|
+
const TOOL_VERSION = "0.1.0";
|
|
37
|
+
class VEXExporter {
|
|
38
|
+
constructor(db, projectRoot) {
|
|
39
|
+
this.db = db;
|
|
40
|
+
this.projectRoot = projectRoot;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Generate CycloneDX 1.5 VEX JSON object.
|
|
44
|
+
*
|
|
45
|
+
* Queries all Vulnerability_Nodes and their reachability verdicts,
|
|
46
|
+
* producing one VEX entry per vulnerability.
|
|
47
|
+
*/
|
|
48
|
+
export() {
|
|
49
|
+
const rawDb = this.db.getRawDb();
|
|
50
|
+
const projectName = path.basename(this.projectRoot);
|
|
51
|
+
const metadata = {
|
|
52
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
53
|
+
tools: {
|
|
54
|
+
components: [
|
|
55
|
+
{
|
|
56
|
+
type: "application",
|
|
57
|
+
name: TOOL_NAME,
|
|
58
|
+
version: TOOL_VERSION
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
component: {
|
|
63
|
+
type: "application",
|
|
64
|
+
name: projectName
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
const vulnRows = rawDb.all(
|
|
68
|
+
`SELECT node_id, cve_id, severity_score, source_database FROM sec_vulnerabilities`
|
|
69
|
+
);
|
|
70
|
+
const vulnerabilities = [];
|
|
71
|
+
for (const vuln of vulnRows) {
|
|
72
|
+
const entry = this.buildVulnerabilityEntry(rawDb, vuln);
|
|
73
|
+
vulnerabilities.push(entry);
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
bomFormat: "CycloneDX",
|
|
77
|
+
specVersion: "1.5",
|
|
78
|
+
version: 1,
|
|
79
|
+
metadata,
|
|
80
|
+
vulnerabilities
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Export to pretty-printed JSON string.
|
|
85
|
+
*/
|
|
86
|
+
exportJSON() {
|
|
87
|
+
return JSON.stringify(this.export(), null, 2);
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Build a single CycloneDX vulnerability entry from a Vulnerability_Node.
|
|
91
|
+
*
|
|
92
|
+
* Maps reachability verdicts to CycloneDX analysis states:
|
|
93
|
+
* - affected → "affected" with path summary detail
|
|
94
|
+
* - not_affected → "not_affected" with justification "code_not_reachable"
|
|
95
|
+
* - under_investigation → "under_investigation" with unresolved symbols detail
|
|
96
|
+
* - no reachability data → "under_investigation" with pending analysis detail
|
|
97
|
+
*/
|
|
98
|
+
buildVulnerabilityEntry(rawDb, vuln) {
|
|
99
|
+
const entry = {
|
|
100
|
+
id: vuln.cve_id,
|
|
101
|
+
source: {
|
|
102
|
+
name: vuln.source_database
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
if (vuln.severity_score != null) {
|
|
106
|
+
entry.ratings = [
|
|
107
|
+
{
|
|
108
|
+
score: vuln.severity_score,
|
|
109
|
+
method: "CVSSv31"
|
|
110
|
+
}
|
|
111
|
+
];
|
|
112
|
+
}
|
|
113
|
+
const depEdge = rawDb.get(
|
|
114
|
+
`SELECT source FROM edges WHERE target = ? AND kind = 'has_vulnerability'`,
|
|
115
|
+
[vuln.node_id]
|
|
116
|
+
);
|
|
117
|
+
if (depEdge) {
|
|
118
|
+
const depRow = rawDb.get(
|
|
119
|
+
`SELECT ecosystem, package_name, resolved_version, declared_constraint
|
|
120
|
+
FROM sec_dependencies WHERE node_id = ?`,
|
|
121
|
+
[depEdge.source]
|
|
122
|
+
);
|
|
123
|
+
if (depRow) {
|
|
124
|
+
const version = depRow.resolved_version || depRow.declared_constraint;
|
|
125
|
+
const purl = `pkg:${depRow.ecosystem}/${depRow.package_name}@${version}`;
|
|
126
|
+
entry.affects = [{ ref: purl }];
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
const reachRow = rawDb.get(
|
|
130
|
+
`SELECT verdict, paths, unresolved_symbols, reaching_entry_point_count
|
|
131
|
+
FROM sec_reachability WHERE vulnerability_node_id = ?`,
|
|
132
|
+
[vuln.node_id]
|
|
133
|
+
);
|
|
134
|
+
if (!reachRow) {
|
|
135
|
+
entry.analysis = {
|
|
136
|
+
state: "under_investigation",
|
|
137
|
+
detail: "Reachability analysis has not yet been executed for this vulnerability."
|
|
138
|
+
};
|
|
139
|
+
} else {
|
|
140
|
+
entry.analysis = this.buildAnalysis(rawDb, vuln.node_id, reachRow);
|
|
141
|
+
}
|
|
142
|
+
return entry;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Build the analysis section based on the reachability verdict.
|
|
146
|
+
*/
|
|
147
|
+
buildAnalysis(rawDb, vulnerabilityNodeId, reachRow) {
|
|
148
|
+
switch (reachRow.verdict) {
|
|
149
|
+
case "affected":
|
|
150
|
+
return this.buildAffectedAnalysis(rawDb, vulnerabilityNodeId, reachRow);
|
|
151
|
+
case "not_affected":
|
|
152
|
+
return {
|
|
153
|
+
state: "not_affected",
|
|
154
|
+
justification: "code_not_reachable",
|
|
155
|
+
detail: "No reachable path found from any application entry point to this dependency."
|
|
156
|
+
};
|
|
157
|
+
case "under_investigation":
|
|
158
|
+
return this.buildUnderInvestigationAnalysis(reachRow);
|
|
159
|
+
default:
|
|
160
|
+
return {
|
|
161
|
+
state: "under_investigation",
|
|
162
|
+
detail: "Reachability analysis pending."
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Build analysis detail for "affected" verdict.
|
|
168
|
+
*
|
|
169
|
+
* Includes: entry point count, layer count, shortest path length.
|
|
170
|
+
*/
|
|
171
|
+
buildAffectedAnalysis(rawDb, vulnerabilityNodeId, reachRow) {
|
|
172
|
+
const entryPointCount = reachRow.reaching_entry_point_count;
|
|
173
|
+
const impactRow = rawDb.get(
|
|
174
|
+
`SELECT affected_layers, distinct_path_count FROM sec_impact WHERE vulnerability_node_id = ?`,
|
|
175
|
+
[vulnerabilityNodeId]
|
|
176
|
+
);
|
|
177
|
+
let layerCount = 0;
|
|
178
|
+
if (impactRow && impactRow.affected_layers) {
|
|
179
|
+
const layers = JSON.parse(impactRow.affected_layers);
|
|
180
|
+
layerCount = layers.length;
|
|
181
|
+
}
|
|
182
|
+
let shortestPathLength = 0;
|
|
183
|
+
if (reachRow.paths) {
|
|
184
|
+
const paths = JSON.parse(reachRow.paths);
|
|
185
|
+
if (paths.length > 0) {
|
|
186
|
+
shortestPathLength = Math.min(...paths.map((p) => p.path.length));
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
const detail = `Reachable from ${entryPointCount} entry point${entryPointCount !== 1 ? "s" : ""} via ${layerCount} layer${layerCount !== 1 ? "s" : ""}. Shortest path length: ${shortestPathLength} nodes.`;
|
|
190
|
+
return {
|
|
191
|
+
state: "affected",
|
|
192
|
+
detail
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Build analysis detail for "under_investigation" verdict.
|
|
197
|
+
*
|
|
198
|
+
* Lists unresolved symbols or states pending analysis reason.
|
|
199
|
+
*/
|
|
200
|
+
buildUnderInvestigationAnalysis(reachRow) {
|
|
201
|
+
if (reachRow.unresolved_symbols) {
|
|
202
|
+
const symbols = JSON.parse(reachRow.unresolved_symbols);
|
|
203
|
+
if (symbols.length > 0) {
|
|
204
|
+
return {
|
|
205
|
+
state: "under_investigation",
|
|
206
|
+
detail: `${symbols.length} unresolved symbol${symbols.length !== 1 ? "s" : ""} blocked complete analysis: ${symbols.join(", ")}`
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
return {
|
|
211
|
+
state: "under_investigation",
|
|
212
|
+
detail: "Reachability analysis pending."
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
217
|
+
0 && (module.exports = {
|
|
218
|
+
VEXExporter
|
|
219
|
+
});
|
|
220
|
+
//# sourceMappingURL=vex.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/security/export/vex.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * KiroGraph-Sec VEX Exporter\n *\n * Generates CycloneDX 1.5 VEX (Vulnerability Exploitability eXchange) documents\n * with reachability-informed vulnerability status. Each Vulnerability_Node is\n * mapped to a VEX entry with an analysis state derived from the reachability verdict.\n *\n * Requirements: 7.1, 7.2, 7.3, 7.4, 7.5, 7.6, 7.7, 7.8\n */\n\nimport * as path from 'path';\nimport type { GraphDatabase } from '../../db/database';\nimport type { CycloneDXVEX, CycloneDXVulnerability, ReachabilityPath } from '../types';\n\n/** Tool metadata for VEX document */\nconst TOOL_NAME = 'kirograph-sec';\nconst TOOL_VERSION = '0.1.0';\n\n/**\n * VEXExporter serializes vulnerability assessments with reachability verdicts\n * into CycloneDX 1.5 VEX format.\n */\nexport class VEXExporter {\n private readonly db: GraphDatabase;\n private readonly projectRoot: string;\n\n constructor(db: GraphDatabase, projectRoot: string) {\n this.db = db;\n this.projectRoot = projectRoot;\n }\n\n /**\n * Generate CycloneDX 1.5 VEX JSON object.\n *\n * Queries all Vulnerability_Nodes and their reachability verdicts,\n * producing one VEX entry per vulnerability.\n */\n export(): CycloneDXVEX {\n const rawDb = this.db.getRawDb();\n const projectName = path.basename(this.projectRoot);\n\n // Build metadata\n const metadata: Record<string, unknown> = {\n timestamp: new Date().toISOString(),\n tools: {\n components: [\n {\n type: 'application',\n name: TOOL_NAME,\n version: TOOL_VERSION,\n },\n ],\n },\n component: {\n type: 'application',\n name: projectName,\n },\n };\n\n // Query all vulnerability nodes\n const vulnRows: Array<{\n node_id: string;\n cve_id: string;\n severity_score: number | null;\n source_database: string;\n }> = rawDb.all(\n `SELECT node_id, cve_id, severity_score, source_database FROM sec_vulnerabilities`,\n );\n\n // Build vulnerability entries\n const vulnerabilities: CycloneDXVulnerability[] = [];\n\n for (const vuln of vulnRows) {\n const entry = this.buildVulnerabilityEntry(rawDb, vuln);\n vulnerabilities.push(entry);\n }\n\n return {\n bomFormat: 'CycloneDX',\n specVersion: '1.5',\n version: 1,\n metadata,\n vulnerabilities,\n };\n }\n\n /**\n * Export to pretty-printed JSON string.\n */\n exportJSON(): string {\n return JSON.stringify(this.export(), null, 2);\n }\n\n /**\n * Build a single CycloneDX vulnerability entry from a Vulnerability_Node.\n *\n * Maps reachability verdicts to CycloneDX analysis states:\n * - affected \u2192 \"affected\" with path summary detail\n * - not_affected \u2192 \"not_affected\" with justification \"code_not_reachable\"\n * - under_investigation \u2192 \"under_investigation\" with unresolved symbols detail\n * - no reachability data \u2192 \"under_investigation\" with pending analysis detail\n */\n private buildVulnerabilityEntry(\n rawDb: any,\n vuln: { node_id: string; cve_id: string; severity_score: number | null; source_database: string },\n ): CycloneDXVulnerability {\n const entry: CycloneDXVulnerability = {\n id: vuln.cve_id,\n source: {\n name: vuln.source_database,\n },\n };\n\n // Add severity rating if available\n if (vuln.severity_score != null) {\n entry.ratings = [\n {\n score: vuln.severity_score,\n method: 'CVSSv31',\n },\n ];\n }\n\n // Find the affected component purl via has_vulnerability edge\n const depEdge = rawDb.get(\n `SELECT source FROM edges WHERE target = ? AND kind = 'has_vulnerability'`,\n [vuln.node_id],\n );\n\n if (depEdge) {\n const depRow = rawDb.get(\n `SELECT ecosystem, package_name, resolved_version, declared_constraint\n FROM sec_dependencies WHERE node_id = ?`,\n [depEdge.source],\n );\n\n if (depRow) {\n const version = depRow.resolved_version || depRow.declared_constraint;\n const purl = `pkg:${depRow.ecosystem}/${depRow.package_name}@${version}`;\n entry.affects = [{ ref: purl }];\n }\n }\n\n // Query reachability verdict\n const reachRow = rawDb.get(\n `SELECT verdict, paths, unresolved_symbols, reaching_entry_point_count\n FROM sec_reachability WHERE vulnerability_node_id = ?`,\n [vuln.node_id],\n );\n\n if (!reachRow) {\n // No reachability analysis performed (Requirement 7.5)\n entry.analysis = {\n state: 'under_investigation',\n detail: 'Reachability analysis has not yet been executed for this vulnerability.',\n };\n } else {\n entry.analysis = this.buildAnalysis(rawDb, vuln.node_id, reachRow);\n }\n\n return entry;\n }\n\n /**\n * Build the analysis section based on the reachability verdict.\n */\n private buildAnalysis(\n rawDb: any,\n vulnerabilityNodeId: string,\n reachRow: {\n verdict: string;\n paths: string | null;\n unresolved_symbols: string | null;\n reaching_entry_point_count: number;\n },\n ): CycloneDXVulnerability['analysis'] {\n switch (reachRow.verdict) {\n case 'affected':\n return this.buildAffectedAnalysis(rawDb, vulnerabilityNodeId, reachRow);\n\n case 'not_affected':\n return {\n state: 'not_affected',\n justification: 'code_not_reachable',\n detail: 'No reachable path found from any application entry point to this dependency.',\n };\n\n case 'under_investigation':\n return this.buildUnderInvestigationAnalysis(reachRow);\n\n default:\n return {\n state: 'under_investigation',\n detail: 'Reachability analysis pending.',\n };\n }\n }\n\n /**\n * Build analysis detail for \"affected\" verdict.\n *\n * Includes: entry point count, layer count, shortest path length.\n */\n private buildAffectedAnalysis(\n rawDb: any,\n vulnerabilityNodeId: string,\n reachRow: {\n paths: string | null;\n reaching_entry_point_count: number;\n },\n ): CycloneDXVulnerability['analysis'] {\n const entryPointCount = reachRow.reaching_entry_point_count;\n\n // Get impact summary for layer information\n const impactRow = rawDb.get(\n `SELECT affected_layers, distinct_path_count FROM sec_impact WHERE vulnerability_node_id = ?`,\n [vulnerabilityNodeId],\n );\n\n let layerCount = 0;\n if (impactRow && impactRow.affected_layers) {\n const layers: string[] = JSON.parse(impactRow.affected_layers);\n layerCount = layers.length;\n }\n\n // Calculate shortest path length from stored paths\n let shortestPathLength = 0;\n if (reachRow.paths) {\n const paths: ReachabilityPath[] = JSON.parse(reachRow.paths);\n if (paths.length > 0) {\n shortestPathLength = Math.min(...paths.map(p => p.path.length));\n }\n }\n\n const detail = `Reachable from ${entryPointCount} entry point${entryPointCount !== 1 ? 's' : ''} via ${layerCount} layer${layerCount !== 1 ? 's' : ''}. Shortest path length: ${shortestPathLength} nodes.`;\n\n return {\n state: 'affected',\n detail,\n };\n }\n\n /**\n * Build analysis detail for \"under_investigation\" verdict.\n *\n * Lists unresolved symbols or states pending analysis reason.\n */\n private buildUnderInvestigationAnalysis(\n reachRow: {\n unresolved_symbols: string | null;\n },\n ): CycloneDXVulnerability['analysis'] {\n if (reachRow.unresolved_symbols) {\n const symbols: string[] = JSON.parse(reachRow.unresolved_symbols);\n if (symbols.length > 0) {\n return {\n state: 'under_investigation',\n detail: `${symbols.length} unresolved symbol${symbols.length !== 1 ? 's' : ''} blocked complete analysis: ${symbols.join(', ')}`,\n };\n }\n }\n\n return {\n state: 'under_investigation',\n detail: 'Reachability analysis pending.',\n };\n }\n}\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* KiroGraph-Sec Module Index
|
|
3
|
+
*
|
|
4
|
+
* Exports all public interfaces, classes, and types for the security module.
|
|
5
|
+
* Used by MCP tools, CLI commands, and pipeline integration.
|
|
6
|
+
*/
|
|
7
|
+
export { SecurityPipeline } from './pipeline';
|
|
8
|
+
export { ManifestParser } from './manifest/parser';
|
|
9
|
+
export { DependencyGraphIntegrator } from './integrator';
|
|
10
|
+
export { VulnerabilityDatabaseClient } from './vuln/client';
|
|
11
|
+
export { OsvAdapter } from './vuln/osv-adapter';
|
|
12
|
+
export type { VulnDatabaseAdapter } from './vuln/types';
|
|
13
|
+
export { ReachabilityAnalyzer } from './reachability';
|
|
14
|
+
export { SBOMExporter } from './export/sbom';
|
|
15
|
+
export { VEXExporter } from './export/vex';
|
|
16
|
+
export { buildFixSuggestion, formatFixSuggestion } from './export/fix-suggestions';
|
|
17
|
+
export { getSecurityWarningsForNodes, formatSecurityWarnings } from './context-warnings';
|
|
18
|
+
export type { SecurityWarning } from './context-warnings';
|
|
19
|
+
export type { ParsedDependency, ManifestParseResult, IntegrationResult, TransitiveResult, CleanupResult, CVERecord, VersionRange, EnrichmentResult, ReachabilityVerdict, ReachabilityPath, ReachabilityResult, ImpactSummary, SecurityResult, SBOMMetadata, CycloneDXSBOM, CycloneDXComponent, CycloneDXDependencyEntry, CycloneDXVEX, CycloneDXVulnerability, } from './types';
|
|
20
|
+
export { SecurityError, ManifestParseError, VulnDatabaseError } from './errors';
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/security/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAG9C,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGnD,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AAGzD,OAAO,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,YAAY,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAGxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAGtD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAGnF,OAAO,EAAE,2BAA2B,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AACzF,YAAY,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAG1D,YAAY,EACV,gBAAgB,EAChB,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,SAAS,EACT,YAAY,EACZ,gBAAgB,EAChB,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,aAAa,EACb,cAAc,EACd,YAAY,EACZ,aAAa,EACb,kBAAkB,EAClB,wBAAwB,EACxB,YAAY,EACZ,sBAAsB,GACvB,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var security_exports = {};
|
|
20
|
+
__export(security_exports, {
|
|
21
|
+
DependencyGraphIntegrator: () => import_integrator.DependencyGraphIntegrator,
|
|
22
|
+
ManifestParseError: () => import_errors.ManifestParseError,
|
|
23
|
+
ManifestParser: () => import_parser.ManifestParser,
|
|
24
|
+
OsvAdapter: () => import_osv_adapter.OsvAdapter,
|
|
25
|
+
ReachabilityAnalyzer: () => import_reachability.ReachabilityAnalyzer,
|
|
26
|
+
SBOMExporter: () => import_sbom.SBOMExporter,
|
|
27
|
+
SecurityError: () => import_errors.SecurityError,
|
|
28
|
+
SecurityPipeline: () => import_pipeline.SecurityPipeline,
|
|
29
|
+
VEXExporter: () => import_vex.VEXExporter,
|
|
30
|
+
VulnDatabaseError: () => import_errors.VulnDatabaseError,
|
|
31
|
+
VulnerabilityDatabaseClient: () => import_client.VulnerabilityDatabaseClient,
|
|
32
|
+
buildFixSuggestion: () => import_fix_suggestions.buildFixSuggestion,
|
|
33
|
+
formatFixSuggestion: () => import_fix_suggestions.formatFixSuggestion,
|
|
34
|
+
formatSecurityWarnings: () => import_context_warnings.formatSecurityWarnings,
|
|
35
|
+
getSecurityWarningsForNodes: () => import_context_warnings.getSecurityWarningsForNodes
|
|
36
|
+
});
|
|
37
|
+
module.exports = __toCommonJS(security_exports);
|
|
38
|
+
var import_pipeline = require("./pipeline");
|
|
39
|
+
var import_parser = require("./manifest/parser");
|
|
40
|
+
var import_integrator = require("./integrator");
|
|
41
|
+
var import_client = require("./vuln/client");
|
|
42
|
+
var import_osv_adapter = require("./vuln/osv-adapter");
|
|
43
|
+
var import_reachability = require("./reachability");
|
|
44
|
+
var import_sbom = require("./export/sbom");
|
|
45
|
+
var import_vex = require("./export/vex");
|
|
46
|
+
var import_fix_suggestions = require("./export/fix-suggestions");
|
|
47
|
+
var import_context_warnings = require("./context-warnings");
|
|
48
|
+
var import_errors = require("./errors");
|
|
49
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
50
|
+
0 && (module.exports = {
|
|
51
|
+
DependencyGraphIntegrator,
|
|
52
|
+
ManifestParseError,
|
|
53
|
+
ManifestParser,
|
|
54
|
+
OsvAdapter,
|
|
55
|
+
ReachabilityAnalyzer,
|
|
56
|
+
SBOMExporter,
|
|
57
|
+
SecurityError,
|
|
58
|
+
SecurityPipeline,
|
|
59
|
+
VEXExporter,
|
|
60
|
+
VulnDatabaseError,
|
|
61
|
+
VulnerabilityDatabaseClient,
|
|
62
|
+
buildFixSuggestion,
|
|
63
|
+
formatFixSuggestion,
|
|
64
|
+
formatSecurityWarnings,
|
|
65
|
+
getSecurityWarningsForNodes
|
|
66
|
+
});
|
|
67
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/security/index.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * KiroGraph-Sec Module Index\n *\n * Exports all public interfaces, classes, and types for the security module.\n * Used by MCP tools, CLI commands, and pipeline integration.\n */\n\n// \u2500\u2500 Pipeline \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nexport { SecurityPipeline } from './pipeline';\n\n// \u2500\u2500 Manifest Parsing \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nexport { ManifestParser } from './manifest/parser';\n\n// \u2500\u2500 Dependency Graph Integration \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nexport { DependencyGraphIntegrator } from './integrator';\n\n// \u2500\u2500 Vulnerability Database \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nexport { VulnerabilityDatabaseClient } from './vuln/client';\nexport { OsvAdapter } from './vuln/osv-adapter';\nexport type { VulnDatabaseAdapter } from './vuln/types';\n\n// \u2500\u2500 Reachability Analysis \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nexport { ReachabilityAnalyzer } from './reachability';\n\n// \u2500\u2500 Export (SBOM / VEX) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nexport { SBOMExporter } from './export/sbom';\nexport { VEXExporter } from './export/vex';\nexport { buildFixSuggestion, formatFixSuggestion } from './export/fix-suggestions';\n\n// \u2500\u2500 Context Warnings \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nexport { getSecurityWarningsForNodes, formatSecurityWarnings } from './context-warnings';\nexport type { SecurityWarning } from './context-warnings';\n\n// \u2500\u2500 Types \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nexport type {\n ParsedDependency,\n ManifestParseResult,\n IntegrationResult,\n TransitiveResult,\n CleanupResult,\n CVERecord,\n VersionRange,\n EnrichmentResult,\n ReachabilityVerdict,\n ReachabilityPath,\n ReachabilityResult,\n ImpactSummary,\n SecurityResult,\n SBOMMetadata,\n CycloneDXSBOM,\n CycloneDXComponent,\n CycloneDXDependencyEntry,\n CycloneDXVEX,\n CycloneDXVulnerability,\n} from './types';\n\n// \u2500\u2500 Errors \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nexport { SecurityError, ManifestParseError, VulnDatabaseError } from './errors';\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,sBAAiC;AAGjC,oBAA+B;AAG/B,wBAA0C;AAG1C,oBAA4C;AAC5C,yBAA2B;AAI3B,0BAAqC;AAGrC,kBAA6B;AAC7B,iBAA4B;AAC5B,6BAAwD;AAGxD,8BAAoE;AA2BpE,oBAAqE;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { GraphDatabase } from '../db/database';
|
|
2
|
+
import type { IntegrationResult, TransitiveResult, CleanupResult } from './types';
|
|
3
|
+
export declare class DependencyGraphIntegrator {
|
|
4
|
+
private readonly db;
|
|
5
|
+
private readonly projectRoot;
|
|
6
|
+
constructor(db: GraphDatabase, projectRoot: string);
|
|
7
|
+
/**
|
|
8
|
+
* Create import/reference edges between code symbols and Dependency_Nodes.
|
|
9
|
+
*
|
|
10
|
+
* Per Requirement 2.1: creates `imports` edges from file nodes that contain
|
|
11
|
+
* import statements resolving to a dependency → the Dependency_Node.
|
|
12
|
+
*
|
|
13
|
+
* Per Requirement 2.2: creates `references` edges from code symbols that
|
|
14
|
+
* reference classes/functions from a dependency → the Dependency_Node.
|
|
15
|
+
*/
|
|
16
|
+
integrate(): Promise<IntegrationResult>;
|
|
17
|
+
/**
|
|
18
|
+
* Find the file node ID for a given file path.
|
|
19
|
+
* File nodes have kind='file' and their file_path matches.
|
|
20
|
+
*/
|
|
21
|
+
private findFileNodeId;
|
|
22
|
+
/**
|
|
23
|
+
* Match an import specifier to a dependency node ID.
|
|
24
|
+
*
|
|
25
|
+
* Handles:
|
|
26
|
+
* - Exact match: `express` → dep:npm:express
|
|
27
|
+
* - Scoped packages: `@scope/pkg` → dep:npm:@scope/pkg
|
|
28
|
+
* - Subpath imports: `express/Router` → dep:npm:express
|
|
29
|
+
* - Scoped subpath: `@angular/core/testing` → dep:npm:@angular/core
|
|
30
|
+
* - Go modules: `github.com/gin-gonic/gin` → dep:go:github.com/gin-gonic/gin
|
|
31
|
+
* - Go subpath: `github.com/gin-gonic/gin/internal` → dep:go:github.com/gin-gonic/gin
|
|
32
|
+
*/
|
|
33
|
+
private matchImportToDependency;
|
|
34
|
+
/**
|
|
35
|
+
* Resolve transitive dependencies up to maxDepth levels.
|
|
36
|
+
*
|
|
37
|
+
* For each ecosystem with a lock file:
|
|
38
|
+
* 1. Parse the lock file to extract dependency relationships
|
|
39
|
+
* 2. Create `depends_on` edges between Dependency_Nodes
|
|
40
|
+
* 3. Traverse up to maxDepth levels of transitive depth
|
|
41
|
+
*
|
|
42
|
+
* If a lock file is missing for an ecosystem, mark all dependencies of that
|
|
43
|
+
* ecosystem with `transitive_status: 'incomplete'` and log a warning.
|
|
44
|
+
*
|
|
45
|
+
* @param maxDepth - Maximum levels of transitive depth to resolve (default: 10)
|
|
46
|
+
*/
|
|
47
|
+
resolveTransitives(maxDepth?: number): Promise<TransitiveResult>;
|
|
48
|
+
/**
|
|
49
|
+
* Remove orphaned Dependency_Nodes and their edges.
|
|
50
|
+
*
|
|
51
|
+
* A Dependency_Node is orphaned if:
|
|
52
|
+
* 1. It has no `declared_in` edges (manifest no longer declares it), OR
|
|
53
|
+
* 2. None of its source manifests still exist on disk
|
|
54
|
+
*
|
|
55
|
+
* Also removes transitive Dependency_Nodes that are no longer reachable from
|
|
56
|
+
* any remaining direct dependency via `depends_on` edges.
|
|
57
|
+
*
|
|
58
|
+
* @param manifestExists - Optional function to check if a manifest path exists.
|
|
59
|
+
* Defaults to fs.existsSync. Useful for testing.
|
|
60
|
+
*/
|
|
61
|
+
cleanup(manifestExists?: (absolutePath: string) => boolean): Promise<CleanupResult>;
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=integrator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integrator.d.ts","sourceRoot":"","sources":["../../src/security/integrator.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAmNlF,qBAAa,yBAAyB;IACpC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAgB;IACnC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;gBAEzB,EAAE,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM;IAKlD;;;;;;;;OAQG;IACG,SAAS,IAAI,OAAO,CAAC,iBAAiB,CAAC;IAwG7C;;;OAGG;IACH,OAAO,CAAC,cAAc;IAQtB;;;;;;;;;;OAUG;IACH,OAAO,CAAC,uBAAuB;IAmD/B;;;;;;;;;;;;OAYG;IACG,kBAAkB,CAAC,QAAQ,GAAE,MAAW,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAmI1E;;;;;;;;;;;;OAYG;IACG,OAAO,CAAC,cAAc,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,OAAO,GAAG,OAAO,CAAC,aAAa,CAAC;CA2G1F"}
|