@dataparade/cli 0.0.1
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 +674 -0
- package/README.md +592 -0
- package/dist/bin/cli.d.ts +2 -0
- package/dist/bin/cli.js +7 -0
- package/dist/bin/load-env.d.ts +2 -0
- package/dist/bin/load-env.js +4 -0
- package/dist/src/ai-enrichment/agent-orchestrator.d.ts +28 -0
- package/dist/src/ai-enrichment/agent-orchestrator.js +476 -0
- package/dist/src/ai-enrichment/agents/index.d.ts +4 -0
- package/dist/src/ai-enrichment/agents/index.js +50 -0
- package/dist/src/ai-enrichment/candidate-selector.d.ts +10 -0
- package/dist/src/ai-enrichment/candidate-selector.js +158 -0
- package/dist/src/ai-enrichment/fallbacks.d.ts +6 -0
- package/dist/src/ai-enrichment/fallbacks.js +762 -0
- package/dist/src/ai-enrichment/index.d.ts +15 -0
- package/dist/src/ai-enrichment/index.js +31 -0
- package/dist/src/ai-enrichment/merge-rules.d.ts +12 -0
- package/dist/src/ai-enrichment/merge-rules.js +321 -0
- package/dist/src/ai-enrichment/non-pii-signal-rules.d.ts +10 -0
- package/dist/src/ai-enrichment/non-pii-signal-rules.js +72 -0
- package/dist/src/ai-enrichment/openai-proposals-response.schema.d.ts +94 -0
- package/dist/src/ai-enrichment/openai-proposals-response.schema.js +82 -0
- package/dist/src/ai-enrichment/pii-signal-rules.d.ts +8 -0
- package/dist/src/ai-enrichment/pii-signal-rules.js +68 -0
- package/dist/src/ai-enrichment/pipeline.d.ts +2 -0
- package/dist/src/ai-enrichment/pipeline.js +48 -0
- package/dist/src/ai-enrichment/planner.d.ts +2 -0
- package/dist/src/ai-enrichment/planner.js +60 -0
- package/dist/src/ai-enrichment/prompts/provider-enrichment-prompts.d.ts +12 -0
- package/dist/src/ai-enrichment/prompts/provider-enrichment-prompts.js +45 -0
- package/dist/src/ai-enrichment/provider-prompt.d.ts +32 -0
- package/dist/src/ai-enrichment/provider-prompt.js +222 -0
- package/dist/src/ai-enrichment/provider-topology-rules.d.ts +52 -0
- package/dist/src/ai-enrichment/provider-topology-rules.js +190 -0
- package/dist/src/ai-enrichment/provider-topology-shared.d.ts +48 -0
- package/dist/src/ai-enrichment/provider-topology-shared.js +329 -0
- package/dist/src/ai-enrichment/providers/endpoint-resolution.d.ts +13 -0
- package/dist/src/ai-enrichment/providers/endpoint-resolution.js +41 -0
- package/dist/src/ai-enrichment/providers/families/chat-completions-family.d.ts +13 -0
- package/dist/src/ai-enrichment/providers/families/chat-completions-family.js +181 -0
- package/dist/src/ai-enrichment/providers/families/generate-content-family.d.ts +10 -0
- package/dist/src/ai-enrichment/providers/families/generate-content-family.js +93 -0
- package/dist/src/ai-enrichment/providers/families/messages-family.d.ts +10 -0
- package/dist/src/ai-enrichment/providers/families/messages-family.js +86 -0
- package/dist/src/ai-enrichment/providers/families/ollama-generate-family.d.ts +10 -0
- package/dist/src/ai-enrichment/providers/families/ollama-generate-family.js +69 -0
- package/dist/src/ai-enrichment/providers/fetch-with-timeout.d.ts +2 -0
- package/dist/src/ai-enrichment/providers/fetch-with-timeout.js +22 -0
- package/dist/src/ai-enrichment/providers/index.d.ts +16 -0
- package/dist/src/ai-enrichment/providers/index.js +40 -0
- package/dist/src/ai-enrichment/providers/mock.d.ts +5 -0
- package/dist/src/ai-enrichment/providers/mock.js +12 -0
- package/dist/src/ai-enrichment/providers/platform-proxy-provider.d.ts +20 -0
- package/dist/src/ai-enrichment/providers/platform-proxy-provider.js +116 -0
- package/dist/src/ai-enrichment/providers/presets.d.ts +14 -0
- package/dist/src/ai-enrichment/providers/presets.js +50 -0
- package/dist/src/ai-enrichment/providers/provider-contract.d.ts +20 -0
- package/dist/src/ai-enrichment/providers/provider-contract.js +703 -0
- package/dist/src/ai-enrichment/providers/provider-json-parse.d.ts +23 -0
- package/dist/src/ai-enrichment/providers/provider-json-parse.js +96 -0
- package/dist/src/ai-enrichment/providers/provider-output-token-budget.d.ts +5 -0
- package/dist/src/ai-enrichment/providers/provider-output-token-budget.js +11 -0
- package/dist/src/ai-enrichment/providers/provider-pricing.d.ts +7 -0
- package/dist/src/ai-enrichment/providers/provider-pricing.js +32 -0
- package/dist/src/ai-enrichment/providers/provider-runtime.d.ts +9 -0
- package/dist/src/ai-enrichment/providers/provider-runtime.js +54 -0
- package/dist/src/ai-enrichment/providers/resolve-provider.d.ts +27 -0
- package/dist/src/ai-enrichment/providers/resolve-provider.js +41 -0
- package/dist/src/ai-enrichment/providers/types.d.ts +24 -0
- package/dist/src/ai-enrichment/providers/types.js +2 -0
- package/dist/src/ai-enrichment/scan-paths.d.ts +9 -0
- package/dist/src/ai-enrichment/scan-paths.js +28 -0
- package/dist/src/ai-enrichment/sensitive-paths.d.ts +5 -0
- package/dist/src/ai-enrichment/sensitive-paths.js +10 -0
- package/dist/src/ai-enrichment/third-party-data-flow.d.ts +27 -0
- package/dist/src/ai-enrichment/third-party-data-flow.js +518 -0
- package/dist/src/ai-enrichment/third-party-evidence.d.ts +14 -0
- package/dist/src/ai-enrichment/third-party-evidence.js +426 -0
- package/dist/src/ai-enrichment/third-party-property-matrix.d.ts +14 -0
- package/dist/src/ai-enrichment/third-party-property-matrix.js +52 -0
- package/dist/src/ai-enrichment/third-party-subtype.d.ts +14 -0
- package/dist/src/ai-enrichment/third-party-subtype.js +166 -0
- package/dist/src/ai-enrichment/tools/index.d.ts +39 -0
- package/dist/src/ai-enrichment/tools/index.js +121 -0
- package/dist/src/ai-enrichment/types.d.ts +170 -0
- package/dist/src/ai-enrichment/types.js +12 -0
- package/dist/src/analyzers/python/dependency-manifests.d.ts +8 -0
- package/dist/src/analyzers/python/dependency-manifests.js +131 -0
- package/dist/src/analyzers/python/detector.d.ts +3 -0
- package/dist/src/analyzers/python/detector.js +22 -0
- package/dist/src/analyzers/python/index.d.ts +2 -0
- package/dist/src/analyzers/python/index.js +11 -0
- package/dist/src/analyzers/python/manifest-parsers.d.ts +3 -0
- package/dist/src/analyzers/python/manifest-parsers.js +134 -0
- package/dist/src/analyzers/python/parser.d.ts +26 -0
- package/dist/src/analyzers/python/parser.js +187 -0
- package/dist/src/analyzers/python/patterns.d.ts +7 -0
- package/dist/src/analyzers/python/patterns.js +106 -0
- package/dist/src/analyzers/python/python-detection-config.d.ts +75 -0
- package/dist/src/analyzers/python/python-detection-config.js +148 -0
- package/dist/src/analyzers/registry.d.ts +13 -0
- package/dist/src/analyzers/registry.js +60 -0
- package/dist/src/analyzers/shared/manifest-budgets.d.ts +19 -0
- package/dist/src/analyzers/shared/manifest-budgets.js +21 -0
- package/dist/src/analyzers/shared/manifest-fs.d.ts +13 -0
- package/dist/src/analyzers/shared/manifest-fs.js +138 -0
- package/dist/src/analyzers/shared/property-inference.d.ts +8 -0
- package/dist/src/analyzers/shared/property-inference.js +165 -0
- package/dist/src/analyzers/terraform/detector.d.ts +10 -0
- package/dist/src/analyzers/terraform/detector.js +198 -0
- package/dist/src/analyzers/terraform/index.d.ts +2 -0
- package/dist/src/analyzers/terraform/index.js +13 -0
- package/dist/src/analyzers/terraform/parser.d.ts +29 -0
- package/dist/src/analyzers/terraform/parser.js +202 -0
- package/dist/src/analyzers/terraform/terraform-detection-config.d.ts +48 -0
- package/dist/src/analyzers/terraform/terraform-detection-config.js +218 -0
- package/dist/src/analyzers/terraform/terraform-exec.d.ts +11 -0
- package/dist/src/analyzers/terraform/terraform-exec.js +35 -0
- package/dist/src/analyzers/terraform/terraform-module-manifest.d.ts +19 -0
- package/dist/src/analyzers/terraform/terraform-module-manifest.js +75 -0
- package/dist/src/analyzers/terraform/terraform-show-json.d.ts +15 -0
- package/dist/src/analyzers/terraform/terraform-show-json.js +188 -0
- package/dist/src/analyzers/terraform/terraform-utility-resource.d.ts +12 -0
- package/dist/src/analyzers/terraform/terraform-utility-resource.js +30 -0
- package/dist/src/analyzers/types.d.ts +5 -0
- package/dist/src/analyzers/types.js +2 -0
- package/dist/src/analyzers/typescript/actor-detection.d.ts +4 -0
- package/dist/src/analyzers/typescript/actor-detection.js +15 -0
- package/dist/src/analyzers/typescript/dependency-manifests.d.ts +9 -0
- package/dist/src/analyzers/typescript/dependency-manifests.js +131 -0
- package/dist/src/analyzers/typescript/detector.d.ts +3 -0
- package/dist/src/analyzers/typescript/detector.js +23 -0
- package/dist/src/analyzers/typescript/index.d.ts +2 -0
- package/dist/src/analyzers/typescript/index.js +11 -0
- package/dist/src/analyzers/typescript/manifest-parsers.d.ts +1 -0
- package/dist/src/analyzers/typescript/manifest-parsers.js +30 -0
- package/dist/src/analyzers/typescript/parser.d.ts +44 -0
- package/dist/src/analyzers/typescript/parser.js +287 -0
- package/dist/src/analyzers/typescript/third-party-detection.d.ts +4 -0
- package/dist/src/analyzers/typescript/third-party-detection.js +16 -0
- package/dist/src/analyzers/typescript/typescript-detection-config.d.ts +68 -0
- package/dist/src/analyzers/typescript/typescript-detection-config.js +171 -0
- package/dist/src/analyzers/typescript/typescript-detection.d.ts +10 -0
- package/dist/src/analyzers/typescript/typescript-detection.js +57 -0
- package/dist/src/classifier/application-injection.d.ts +12 -0
- package/dist/src/classifier/application-injection.js +335 -0
- package/dist/src/classifier/classify.d.ts +3 -0
- package/dist/src/classifier/classify.js +15 -0
- package/dist/src/classifier/component-factory.d.ts +3 -0
- package/dist/src/classifier/component-factory.js +488 -0
- package/dist/src/classifier/config.d.ts +38 -0
- package/dist/src/classifier/config.js +260 -0
- package/dist/src/classifier/enhance-defaults.d.ts +28 -0
- package/dist/src/classifier/enhance-defaults.js +369 -0
- package/dist/src/classifier/enhance.d.ts +13 -0
- package/dist/src/classifier/enhance.js +295 -0
- package/dist/src/classifier/external-url-third-party.d.ts +26 -0
- package/dist/src/classifier/external-url-third-party.js +195 -0
- package/dist/src/classifier/grouping.d.ts +1 -0
- package/dist/src/classifier/grouping.js +2 -0
- package/dist/src/classifier/main-application-selection.d.ts +41 -0
- package/dist/src/classifier/main-application-selection.js +222 -0
- package/dist/src/classifier/naming.d.ts +4 -0
- package/dist/src/classifier/naming.js +78 -0
- package/dist/src/classifier/postprocessing.d.ts +12 -0
- package/dist/src/classifier/postprocessing.js +510 -0
- package/dist/src/classifier/sectioning.d.ts +5 -0
- package/dist/src/classifier/sectioning.js +60 -0
- package/dist/src/classifier/terraform-provider-hub.d.ts +6 -0
- package/dist/src/classifier/terraform-provider-hub.js +38 -0
- package/dist/src/cli.d.ts +2 -0
- package/dist/src/cli.js +498 -0
- package/dist/src/config/actor-detection-config.d.ts +21 -0
- package/dist/src/config/actor-detection-config.js +97 -0
- package/dist/src/config/env.d.ts +2 -0
- package/dist/src/config/env.js +75 -0
- package/dist/src/config/file.d.ts +6 -0
- package/dist/src/config/file.js +74 -0
- package/dist/src/config/inference-scope.d.ts +2 -0
- package/dist/src/config/inference-scope.js +15 -0
- package/dist/src/config/load-cli-env.d.ts +1 -0
- package/dist/src/config/load-cli-env.js +54 -0
- package/dist/src/config/normalize-ai-provider.d.ts +5 -0
- package/dist/src/config/normalize-ai-provider.js +18 -0
- package/dist/src/config/property-detection-config.d.ts +27 -0
- package/dist/src/config/property-detection-config.js +355 -0
- package/dist/src/config/redact.d.ts +3 -0
- package/dist/src/config/redact.js +14 -0
- package/dist/src/config/resolve.d.ts +15 -0
- package/dist/src/config/resolve.js +361 -0
- package/dist/src/config/scan-env.d.ts +7 -0
- package/dist/src/config/scan-env.js +38 -0
- package/dist/src/config/third-party-detection-config.d.ts +25 -0
- package/dist/src/config/third-party-detection-config.js +97 -0
- package/dist/src/config/types.d.ts +106 -0
- package/dist/src/config/types.js +2 -0
- package/dist/src/config/validate-scan-ai.d.ts +3 -0
- package/dist/src/config/validate-scan-ai.js +33 -0
- package/dist/src/core/pipeline/ai-orchestrator-options.d.ts +6 -0
- package/dist/src/core/pipeline/ai-orchestrator-options.js +46 -0
- package/dist/src/core/pipeline/classifier-phase.d.ts +7 -0
- package/dist/src/core/pipeline/classifier-phase.js +78 -0
- package/dist/src/core/pipeline/dataflow-phase.d.ts +7 -0
- package/dist/src/core/pipeline/dataflow-phase.js +10 -0
- package/dist/src/core/pipeline/diagram-layout/app-section-layout.d.ts +7 -0
- package/dist/src/core/pipeline/diagram-layout/app-section-layout.js +74 -0
- package/dist/src/core/pipeline/diagram-layout/constants.d.ts +11 -0
- package/dist/src/core/pipeline/diagram-layout/constants.js +14 -0
- package/dist/src/core/pipeline/diagram-layout/edge-handles.d.ts +3 -0
- package/dist/src/core/pipeline/diagram-layout/edge-handles.js +26 -0
- package/dist/src/core/pipeline/diagram-layout/managed-provider-layout.d.ts +3 -0
- package/dist/src/core/pipeline/diagram-layout/managed-provider-layout.js +40 -0
- package/dist/src/core/pipeline/diagram-layout/minimal-terraform-layout.d.ts +6 -0
- package/dist/src/core/pipeline/diagram-layout/minimal-terraform-layout.js +53 -0
- package/dist/src/core/pipeline/diagram-layout/section-helpers.d.ts +30 -0
- package/dist/src/core/pipeline/diagram-layout/section-helpers.js +62 -0
- package/dist/src/core/pipeline/diagram-layout/terraform-lane-layout.d.ts +3 -0
- package/dist/src/core/pipeline/diagram-layout/terraform-lane-layout.js +109 -0
- package/dist/src/core/pipeline/diagram-layout/types.d.ts +2 -0
- package/dist/src/core/pipeline/diagram-layout/types.js +2 -0
- package/dist/src/core/pipeline/graph-mapping.d.ts +6 -0
- package/dist/src/core/pipeline/graph-mapping.js +308 -0
- package/dist/src/core/pipeline/mixed-app-terraform-scan.d.ts +13 -0
- package/dist/src/core/pipeline/mixed-app-terraform-scan.js +81 -0
- package/dist/src/core/pipeline/orchestrator-result.d.ts +6 -0
- package/dist/src/core/pipeline/orchestrator-result.js +2 -0
- package/dist/src/core/pipeline/orchestrator.d.ts +26 -0
- package/dist/src/core/pipeline/orchestrator.js +79 -0
- package/dist/src/core/pipeline/resolve-path-under-scan-root.d.ts +7 -0
- package/dist/src/core/pipeline/resolve-path-under-scan-root.js +55 -0
- package/dist/src/core/pipeline/scan-pipeline.d.ts +6 -0
- package/dist/src/core/pipeline/scan-pipeline.js +364 -0
- package/dist/src/core/pipeline/sorting.d.ts +3 -0
- package/dist/src/core/pipeline/sorting.js +48 -0
- package/dist/src/core/pipeline/stable-component-ids.d.ts +15 -0
- package/dist/src/core/pipeline/stable-component-ids.js +68 -0
- package/dist/src/core/pipeline/structural-scan.d.ts +19 -0
- package/dist/src/core/pipeline/structural-scan.js +304 -0
- package/dist/src/core/pipeline/terraform-flow-utils.d.ts +6 -0
- package/dist/src/core/pipeline/terraform-flow-utils.js +32 -0
- package/dist/src/core/pipeline/terraform-minimal-services.d.ts +31 -0
- package/dist/src/core/pipeline/terraform-minimal-services.js +225 -0
- package/dist/src/core/schema/dataflow-wrapper.schema.d.ts +83 -0
- package/dist/src/core/schema/dataflow-wrapper.schema.js +40 -0
- package/dist/src/core/schema/diagram-graph.schema.d.ts +93 -0
- package/dist/src/core/schema/diagram-graph.schema.js +55 -0
- package/dist/src/core/schema/index.d.ts +4 -0
- package/dist/src/core/schema/index.js +20 -0
- package/dist/src/core/schema/scan-config.schema.d.ts +66 -0
- package/dist/src/core/schema/scan-config.schema.js +67 -0
- package/dist/src/core/schema/scan-result.schema.d.ts +450 -0
- package/dist/src/core/schema/scan-result.schema.js +236 -0
- package/dist/src/core/sectioning/discover-service-sections.d.ts +80 -0
- package/dist/src/core/sectioning/discover-service-sections.js +468 -0
- package/dist/src/core/sectioning/section-runtime.d.ts +21 -0
- package/dist/src/core/sectioning/section-runtime.js +148 -0
- package/dist/src/core/terraform/component-predicates.d.ts +13 -0
- package/dist/src/core/terraform/component-predicates.js +71 -0
- package/dist/src/core/types/component.d.ts +18 -0
- package/dist/src/core/types/component.js +2 -0
- package/dist/src/core/types/config.d.ts +57 -0
- package/dist/src/core/types/config.js +2 -0
- package/dist/src/core/types/data-flow.d.ts +24 -0
- package/dist/src/core/types/data-flow.js +2 -0
- package/dist/src/core/types/detection.d.ts +12 -0
- package/dist/src/core/types/detection.js +19 -0
- package/dist/src/core/types/file.d.ts +14 -0
- package/dist/src/core/types/file.js +2 -0
- package/dist/src/core/types/index.d.ts +7 -0
- package/dist/src/core/types/index.js +23 -0
- package/dist/src/core/types/progress.d.ts +9 -0
- package/dist/src/core/types/progress.js +2 -0
- package/dist/src/core/types/result.d.ts +140 -0
- package/dist/src/core/types/result.js +2 -0
- package/dist/src/data-flow/application-hub.d.ts +7 -0
- package/dist/src/data-flow/application-hub.js +88 -0
- package/dist/src/data-flow/dedupe.d.ts +7 -0
- package/dist/src/data-flow/dedupe.js +92 -0
- package/dist/src/data-flow/detect.d.ts +16 -0
- package/dist/src/data-flow/detect.js +203 -0
- package/dist/src/data-flow/detector.d.ts +15 -0
- package/dist/src/data-flow/detector.js +18 -0
- package/dist/src/data-flow/drop-cross-section-flows.d.ts +8 -0
- package/dist/src/data-flow/drop-cross-section-flows.js +32 -0
- package/dist/src/data-flow/ensure-actor-flow.d.ts +16 -0
- package/dist/src/data-flow/ensure-actor-flow.js +101 -0
- package/dist/src/data-flow/ensure-manifest-declared-flows.d.ts +14 -0
- package/dist/src/data-flow/ensure-manifest-declared-flows.js +76 -0
- package/dist/src/data-flow/ensure-section-api-flows.d.ts +6 -0
- package/dist/src/data-flow/ensure-section-api-flows.js +57 -0
- package/dist/src/data-flow/flow-builder.d.ts +5 -0
- package/dist/src/data-flow/flow-builder.js +80 -0
- package/dist/src/data-flow/import-graph.d.ts +10 -0
- package/dist/src/data-flow/import-graph.js +147 -0
- package/dist/src/data-flow/index.d.ts +8 -0
- package/dist/src/data-flow/index.js +20 -0
- package/dist/src/data-flow/internal-fetch.d.ts +8 -0
- package/dist/src/data-flow/internal-fetch.js +209 -0
- package/dist/src/data-flow/postprocess.d.ts +9 -0
- package/dist/src/data-flow/postprocess.js +63 -0
- package/dist/src/data-flow/rewire.d.ts +10 -0
- package/dist/src/data-flow/rewire.js +93 -0
- package/dist/src/data-flow/source-attribution.d.ts +8 -0
- package/dist/src/data-flow/source-attribution.js +131 -0
- package/dist/src/data-flow/source-resolution.d.ts +13 -0
- package/dist/src/data-flow/source-resolution.js +61 -0
- package/dist/src/data-flow/target-matching.d.ts +21 -0
- package/dist/src/data-flow/target-matching.js +253 -0
- package/dist/src/data-flow/terraform-flows.d.ts +32 -0
- package/dist/src/data-flow/terraform-flows.js +170 -0
- package/dist/src/evals/metrics.d.ts +18 -0
- package/dist/src/evals/metrics.js +58 -0
- package/dist/src/evals/run-model-matrix.d.ts +1 -0
- package/dist/src/evals/run-model-matrix.js +68 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/index.js +20 -0
- package/dist/src/ingest/file-system.d.ts +17 -0
- package/dist/src/ingest/file-system.js +239 -0
- package/dist/src/ingest/gitignore.d.ts +12 -0
- package/dist/src/ingest/gitignore.js +127 -0
- package/dist/src/ingest/sensitive-paths.d.ts +2 -0
- package/dist/src/ingest/sensitive-paths.js +8 -0
- package/dist/src/observability/scan-sentry.d.ts +20 -0
- package/dist/src/observability/scan-sentry.js +133 -0
- package/dist/src/output/json.d.ts +51 -0
- package/dist/src/output/json.js +59 -0
- package/dist/src/patterns/config.d.ts +22 -0
- package/dist/src/patterns/config.js +119 -0
- package/dist/src/patterns/detectors/helpers.d.ts +19 -0
- package/dist/src/patterns/detectors/helpers.js +68 -0
- package/dist/src/patterns/detectors/python.d.ts +8 -0
- package/dist/src/patterns/detectors/python.js +412 -0
- package/dist/src/patterns/detectors/typescript.d.ts +8 -0
- package/dist/src/patterns/detectors/typescript.js +328 -0
- package/dist/src/patterns/engine.d.ts +40 -0
- package/dist/src/patterns/engine.js +111 -0
- package/dist/src/patterns/flow-source-patterns.d.ts +6 -0
- package/dist/src/patterns/flow-source-patterns.js +39 -0
- package/dist/src/patterns/frontend-frameworks.d.ts +4 -0
- package/dist/src/patterns/frontend-frameworks.js +25 -0
- package/dist/src/patterns/scan-exclusions.d.ts +14 -0
- package/dist/src/patterns/scan-exclusions.js +76 -0
- package/dist/src/platform-api/dataparade-api-base-url.d.ts +8 -0
- package/dist/src/platform-api/dataparade-api-base-url.js +17 -0
- package/dist/src/platform-api/estimate-scan-footprint.d.ts +8 -0
- package/dist/src/platform-api/estimate-scan-footprint.js +120 -0
- package/dist/src/platform-api/scan-quota-client.d.ts +28 -0
- package/dist/src/platform-api/scan-quota-client.js +79 -0
- package/dist/src/tracing/langsmith-tracing.d.ts +37 -0
- package/dist/src/tracing/langsmith-tracing.js +171 -0
- package/dist/tests/cli/cli.spec.d.ts +1 -0
- package/dist/tests/cli/cli.spec.js +87 -0
- package/dist/tests/fixtures/e2e-ts-sample/db-client-import.d.ts +2 -0
- package/dist/tests/fixtures/e2e-ts-sample/db-client-import.js +8 -0
- package/dist/tests/fixtures/e2e-ts-sample/db.d.ts +3 -0
- package/dist/tests/fixtures/e2e-ts-sample/db.js +7 -0
- package/dist/tests/fixtures/e2e-ts-sample/external-api.d.ts +1 -0
- package/dist/tests/fixtures/e2e-ts-sample/external-api.js +18 -0
- package/dist/tests/fixtures/e2e-ts-sample/pg-client.d.ts +3 -0
- package/dist/tests/fixtures/e2e-ts-sample/pg-client.js +7 -0
- package/dist/tests/fixtures/e2e-ts-sample/server.d.ts +14 -0
- package/dist/tests/fixtures/e2e-ts-sample/server.js +4 -0
- package/dist/tests/fixtures/e2e-ts-sentry-route-env/server.d.ts +1 -0
- package/dist/tests/fixtures/e2e-ts-sentry-route-env/server.js +24 -0
- package/dist/tests/fixtures/ingest-basic/src/index.d.ts +1 -0
- package/dist/tests/fixtures/ingest-basic/src/index.js +6 -0
- package/dist/tests/fixtures/mixed-language-basic/api.d.ts +2 -0
- package/dist/tests/fixtures/mixed-language-basic/api.js +12 -0
- package/dist/tests/fixtures/monorepo-app-plus-terraform/packages/app/app/route.d.ts +1 -0
- package/dist/tests/fixtures/monorepo-app-plus-terraform/packages/app/app/route.js +6 -0
- package/dist/tests/fixtures/monorepo-front-back-sections/backend/app/route.d.ts +1 -0
- package/dist/tests/fixtures/monorepo-front-back-sections/backend/app/route.js +6 -0
- package/dist/tests/fixtures/monorepo-front-back-sections/frontend/app/route.d.ts +1 -0
- package/dist/tests/fixtures/monorepo-front-back-sections/frontend/app/route.js +7 -0
- package/dist/tests/fixtures/typescript-basic/app/route.d.ts +1 -0
- package/dist/tests/fixtures/typescript-basic/app/route.js +7 -0
- package/dist/tests/fixtures/typescript-basic/db-client-import.d.ts +2 -0
- package/dist/tests/fixtures/typescript-basic/db-client-import.js +8 -0
- package/dist/tests/fixtures/typescript-basic/db.d.ts +3 -0
- package/dist/tests/fixtures/typescript-basic/db.js +7 -0
- package/dist/tests/fixtures/typescript-basic/external-api.d.ts +1 -0
- package/dist/tests/fixtures/typescript-basic/external-api.js +18 -0
- package/dist/tests/fixtures/typescript-basic/pg-client.d.ts +3 -0
- package/dist/tests/fixtures/typescript-basic/pg-client.js +7 -0
- package/dist/tests/fixtures/typescript-basic/server.d.ts +14 -0
- package/dist/tests/fixtures/typescript-basic/server.js +4 -0
- package/dist/tests/fixtures/typescript-dependency-manifests-basic/src/index.d.ts +0 -0
- package/dist/tests/fixtures/typescript-dependency-manifests-basic/src/index.js +2 -0
- package/dist/tests/helpers/scan-result-builders.d.ts +2 -0
- package/dist/tests/helpers/scan-result-builders.js +15 -0
- package/dist/tests/schema/dataflow-wrapper.schema.spec.d.ts +1 -0
- package/dist/tests/schema/dataflow-wrapper.schema.spec.js +89 -0
- package/dist/tests/schema/diagram-graph.schema.spec.d.ts +1 -0
- package/dist/tests/schema/diagram-graph.schema.spec.js +48 -0
- package/dist/tests/schema/scan-config.schema.spec.d.ts +1 -0
- package/dist/tests/schema/scan-config.schema.spec.js +135 -0
- package/dist/tests/schema/scan-result.schema.spec.d.ts +1 -0
- package/dist/tests/schema/scan-result.schema.spec.js +177 -0
- package/dist/tests/unit/ai-enrichment/agent-orchestrator.spec.d.ts +1 -0
- package/dist/tests/unit/ai-enrichment/agent-orchestrator.spec.js +483 -0
- package/dist/tests/unit/ai-enrichment/candidate-selector.spec.d.ts +1 -0
- package/dist/tests/unit/ai-enrichment/candidate-selector.spec.js +106 -0
- package/dist/tests/unit/ai-enrichment/create-ai-provider.spec.d.ts +1 -0
- package/dist/tests/unit/ai-enrichment/create-ai-provider.spec.js +32 -0
- package/dist/tests/unit/ai-enrichment/endpoint-resolution.spec.d.ts +1 -0
- package/dist/tests/unit/ai-enrichment/endpoint-resolution.spec.js +47 -0
- package/dist/tests/unit/ai-enrichment/fallbacks.spec.d.ts +1 -0
- package/dist/tests/unit/ai-enrichment/fallbacks.spec.js +1304 -0
- package/dist/tests/unit/ai-enrichment/families/chat-completions-family.spec.d.ts +1 -0
- package/dist/tests/unit/ai-enrichment/families/chat-completions-family.spec.js +219 -0
- package/dist/tests/unit/ai-enrichment/families/generate-content-family.spec.d.ts +1 -0
- package/dist/tests/unit/ai-enrichment/families/generate-content-family.spec.js +119 -0
- package/dist/tests/unit/ai-enrichment/families/messages-family.spec.d.ts +1 -0
- package/dist/tests/unit/ai-enrichment/families/messages-family.spec.js +129 -0
- package/dist/tests/unit/ai-enrichment/families/ollama-generate-family.spec.d.ts +1 -0
- package/dist/tests/unit/ai-enrichment/families/ollama-generate-family.spec.js +69 -0
- package/dist/tests/unit/ai-enrichment/merge-rules.spec.d.ts +1 -0
- package/dist/tests/unit/ai-enrichment/merge-rules.spec.js +422 -0
- package/dist/tests/unit/ai-enrichment/openai-proposals-response.schema.spec.d.ts +1 -0
- package/dist/tests/unit/ai-enrichment/openai-proposals-response.schema.spec.js +30 -0
- package/dist/tests/unit/ai-enrichment/pipeline.spec.d.ts +1 -0
- package/dist/tests/unit/ai-enrichment/pipeline.spec.js +120 -0
- package/dist/tests/unit/ai-enrichment/planner.spec.d.ts +1 -0
- package/dist/tests/unit/ai-enrichment/planner.spec.js +106 -0
- package/dist/tests/unit/ai-enrichment/platform-proxy-provider.spec.d.ts +1 -0
- package/dist/tests/unit/ai-enrichment/platform-proxy-provider.spec.js +51 -0
- package/dist/tests/unit/ai-enrichment/provider-contract.spec.d.ts +1 -0
- package/dist/tests/unit/ai-enrichment/provider-contract.spec.js +244 -0
- package/dist/tests/unit/ai-enrichment/provider-json-parse.spec.d.ts +1 -0
- package/dist/tests/unit/ai-enrichment/provider-json-parse.spec.js +24 -0
- package/dist/tests/unit/ai-enrichment/provider-output-token-budget.spec.d.ts +1 -0
- package/dist/tests/unit/ai-enrichment/provider-output-token-budget.spec.js +15 -0
- package/dist/tests/unit/ai-enrichment/provider-prompt-env.spec.d.ts +1 -0
- package/dist/tests/unit/ai-enrichment/provider-prompt-env.spec.js +54 -0
- package/dist/tests/unit/ai-enrichment/provider-prompt.spec.d.ts +1 -0
- package/dist/tests/unit/ai-enrichment/provider-prompt.spec.js +206 -0
- package/dist/tests/unit/ai-enrichment/provider-topology-terraform-aws.spec.d.ts +1 -0
- package/dist/tests/unit/ai-enrichment/provider-topology-terraform-aws.spec.js +43 -0
- package/dist/tests/unit/ai-enrichment/provider-topology-terraform-kubernetes.spec.d.ts +1 -0
- package/dist/tests/unit/ai-enrichment/provider-topology-terraform-kubernetes.spec.js +40 -0
- package/dist/tests/unit/ai-enrichment/providers/fetch-with-timeout.spec.d.ts +1 -0
- package/dist/tests/unit/ai-enrichment/providers/fetch-with-timeout.spec.js +22 -0
- package/dist/tests/unit/ai-enrichment/resolve-provider.spec.d.ts +1 -0
- package/dist/tests/unit/ai-enrichment/resolve-provider.spec.js +67 -0
- package/dist/tests/unit/ai-enrichment/scan-paths-exact.spec.d.ts +1 -0
- package/dist/tests/unit/ai-enrichment/scan-paths-exact.spec.js +35 -0
- package/dist/tests/unit/ai-enrichment/scan-paths.spec.d.ts +1 -0
- package/dist/tests/unit/ai-enrichment/scan-paths.spec.js +21 -0
- package/dist/tests/unit/ai-enrichment/sensitive-paths.spec.d.ts +1 -0
- package/dist/tests/unit/ai-enrichment/sensitive-paths.spec.js +20 -0
- package/dist/tests/unit/ai-enrichment/third-party-data-flow.spec.d.ts +1 -0
- package/dist/tests/unit/ai-enrichment/third-party-data-flow.spec.js +963 -0
- package/dist/tests/unit/ai-enrichment/third-party-evidence.spec.d.ts +1 -0
- package/dist/tests/unit/ai-enrichment/third-party-evidence.spec.js +117 -0
- package/dist/tests/unit/ai-enrichment/third-party-subtype.spec.d.ts +1 -0
- package/dist/tests/unit/ai-enrichment/third-party-subtype.spec.js +45 -0
- package/dist/tests/unit/ai-enrichment/tools-validation.spec.d.ts +1 -0
- package/dist/tests/unit/ai-enrichment/tools-validation.spec.js +66 -0
- package/dist/tests/unit/analyzers/python/parser.spec.d.ts +1 -0
- package/dist/tests/unit/analyzers/python/parser.spec.js +104 -0
- package/dist/tests/unit/analyzers/python/patterns.spec.d.ts +1 -0
- package/dist/tests/unit/analyzers/python/patterns.spec.js +289 -0
- package/dist/tests/unit/analyzers/registry.spec.d.ts +1 -0
- package/dist/tests/unit/analyzers/registry.spec.js +234 -0
- package/dist/tests/unit/analyzers/terraform/classifier-subtype-parity.spec.d.ts +1 -0
- package/dist/tests/unit/analyzers/terraform/classifier-subtype-parity.spec.js +87 -0
- package/dist/tests/unit/analyzers/terraform/detector.spec.d.ts +1 -0
- package/dist/tests/unit/analyzers/terraform/detector.spec.js +110 -0
- package/dist/tests/unit/analyzers/terraform/generated-provider-hints.spec.d.ts +1 -0
- package/dist/tests/unit/analyzers/terraform/generated-provider-hints.spec.js +53 -0
- package/dist/tests/unit/analyzers/terraform/parser.spec.d.ts +1 -0
- package/dist/tests/unit/analyzers/terraform/parser.spec.js +56 -0
- package/dist/tests/unit/analyzers/terraform/terraform-module-manifest.spec.d.ts +1 -0
- package/dist/tests/unit/analyzers/terraform/terraform-module-manifest.spec.js +63 -0
- package/dist/tests/unit/analyzers/terraform/terraform-utility-resource.spec.d.ts +1 -0
- package/dist/tests/unit/analyzers/terraform/terraform-utility-resource.spec.js +19 -0
- package/dist/tests/unit/analyzers/terraform-exec.spec.d.ts +1 -0
- package/dist/tests/unit/analyzers/terraform-exec.spec.js +27 -0
- package/dist/tests/unit/analyzers/terraform-show-json.spec.d.ts +1 -0
- package/dist/tests/unit/analyzers/terraform-show-json.spec.js +77 -0
- package/dist/tests/unit/analyzers/typescript/dependency-manifests.spec.d.ts +1 -0
- package/dist/tests/unit/analyzers/typescript/dependency-manifests.spec.js +61 -0
- package/dist/tests/unit/analyzers/typescript/detector.spec.d.ts +1 -0
- package/dist/tests/unit/analyzers/typescript/detector.spec.js +225 -0
- package/dist/tests/unit/analyzers/typescript/external-apis-auth0.spec.d.ts +1 -0
- package/dist/tests/unit/analyzers/typescript/external-apis-auth0.spec.js +49 -0
- package/dist/tests/unit/analyzers/typescript/external-apis-sentry.spec.d.ts +1 -0
- package/dist/tests/unit/analyzers/typescript/external-apis-sentry.spec.js +27 -0
- package/dist/tests/unit/analyzers/typescript/fixture-integration.spec.d.ts +1 -0
- package/dist/tests/unit/analyzers/typescript/fixture-integration.spec.js +64 -0
- package/dist/tests/unit/analyzers/typescript/parser.spec.d.ts +1 -0
- package/dist/tests/unit/analyzers/typescript/parser.spec.js +99 -0
- package/dist/tests/unit/analyzers/typescript/pattern-config.spec.d.ts +1 -0
- package/dist/tests/unit/analyzers/typescript/pattern-config.spec.js +24 -0
- package/dist/tests/unit/analyzers/typescript/property-detection.spec.d.ts +1 -0
- package/dist/tests/unit/analyzers/typescript/property-detection.spec.js +138 -0
- package/dist/tests/unit/classifier/classify.spec.d.ts +1 -0
- package/dist/tests/unit/classifier/classify.spec.js +1453 -0
- package/dist/tests/unit/classifier/enhance.spec.d.ts +1 -0
- package/dist/tests/unit/classifier/enhance.spec.js +400 -0
- package/dist/tests/unit/classifier/external-url-third-party.spec.d.ts +1 -0
- package/dist/tests/unit/classifier/external-url-third-party.spec.js +83 -0
- package/dist/tests/unit/classifier/frontend-framework-grouping.spec.d.ts +1 -0
- package/dist/tests/unit/classifier/frontend-framework-grouping.spec.js +44 -0
- package/dist/tests/unit/classifier/terraform-grouping.spec.d.ts +1 -0
- package/dist/tests/unit/classifier/terraform-grouping.spec.js +96 -0
- package/dist/tests/unit/cli/config-command.spec.d.ts +1 -0
- package/dist/tests/unit/cli/config-command.spec.js +51 -0
- package/dist/tests/unit/cli/scan-command-ai-flags.spec.d.ts +0 -0
- package/dist/tests/unit/cli/scan-command-ai-flags.spec.js +149 -0
- package/dist/tests/unit/cli/scan-command-diagram-graph.spec.d.ts +1 -0
- package/dist/tests/unit/cli/scan-command-diagram-graph.spec.js +26 -0
- package/dist/tests/unit/cli/scan-command-e2e-monorepo-app-plus-terraform.spec.d.ts +1 -0
- package/dist/tests/unit/cli/scan-command-e2e-monorepo-app-plus-terraform.spec.js +107 -0
- package/dist/tests/unit/cli/scan-command-e2e-monorepo-front-back-sections.spec.d.ts +1 -0
- package/dist/tests/unit/cli/scan-command-e2e-monorepo-front-back-sections.spec.js +74 -0
- package/dist/tests/unit/cli/scan-command-e2e-python-basic.spec.d.ts +1 -0
- package/dist/tests/unit/cli/scan-command-e2e-python-basic.spec.js +43 -0
- package/dist/tests/unit/cli/scan-command-e2e-terraform-basic.spec.d.ts +1 -0
- package/dist/tests/unit/cli/scan-command-e2e-terraform-basic.spec.js +62 -0
- package/dist/tests/unit/cli/scan-command-e2e-ts-sample.spec.d.ts +1 -0
- package/dist/tests/unit/cli/scan-command-e2e-ts-sample.spec.js +41 -0
- package/dist/tests/unit/cli/scan-command-e2e-ts-sentry-route-env.spec.d.ts +1 -0
- package/dist/tests/unit/cli/scan-command-e2e-ts-sentry-route-env.spec.js +85 -0
- package/dist/tests/unit/cli/scan-command-exit-code.spec.d.ts +1 -0
- package/dist/tests/unit/cli/scan-command-exit-code.spec.js +131 -0
- package/dist/tests/unit/cli/scan-quota-flow.spec.d.ts +1 -0
- package/dist/tests/unit/cli/scan-quota-flow.spec.js +76 -0
- package/dist/tests/unit/config/property-detection-config.spec.d.ts +1 -0
- package/dist/tests/unit/config/property-detection-config.spec.js +38 -0
- package/dist/tests/unit/config/redact.spec.d.ts +1 -0
- package/dist/tests/unit/config/redact.spec.js +19 -0
- package/dist/tests/unit/config/resolve-config.spec.d.ts +1 -0
- package/dist/tests/unit/config/resolve-config.spec.js +172 -0
- package/dist/tests/unit/config/scan-env-debug.spec.d.ts +1 -0
- package/dist/tests/unit/config/scan-env-debug.spec.js +17 -0
- package/dist/tests/unit/config/validate-scan-ai.spec.d.ts +1 -0
- package/dist/tests/unit/config/validate-scan-ai.spec.js +53 -0
- package/dist/tests/unit/core/classifier-phase-regressions.spec.d.ts +1 -0
- package/dist/tests/unit/core/classifier-phase-regressions.spec.js +68 -0
- package/dist/tests/unit/core/dependency-manifest-performance-budgets.spec.d.ts +1 -0
- package/dist/tests/unit/core/dependency-manifest-performance-budgets.spec.js +66 -0
- package/dist/tests/unit/core/dependency-manifest-toggles-confidence.spec.d.ts +1 -0
- package/dist/tests/unit/core/dependency-manifest-toggles-confidence.spec.js +132 -0
- package/dist/tests/unit/core/discover-service-sections.spec.d.ts +1 -0
- package/dist/tests/unit/core/discover-service-sections.spec.js +204 -0
- package/dist/tests/unit/core/graph-mapping.spec.d.ts +1 -0
- package/dist/tests/unit/core/graph-mapping.spec.js +779 -0
- package/dist/tests/unit/core/invariant-tests-dedupe-determinism.spec.d.ts +1 -0
- package/dist/tests/unit/core/invariant-tests-dedupe-determinism.spec.js +64 -0
- package/dist/tests/unit/core/manifest-package-hub.spec.d.ts +1 -0
- package/dist/tests/unit/core/manifest-package-hub.spec.js +53 -0
- package/dist/tests/unit/core/monorepo-package-sections.spec.d.ts +1 -0
- package/dist/tests/unit/core/monorepo-package-sections.spec.js +121 -0
- package/dist/tests/unit/core/no-source-code-leakage.spec.d.ts +1 -0
- package/dist/tests/unit/core/no-source-code-leakage.spec.js +48 -0
- package/dist/tests/unit/core/orchestrator.spec.d.ts +1 -0
- package/dist/tests/unit/core/orchestrator.spec.js +252 -0
- package/dist/tests/unit/core/output-json.spec.d.ts +1 -0
- package/dist/tests/unit/core/output-json.spec.js +65 -0
- package/dist/tests/unit/core/parsing-error-handling-nonfatal.spec.d.ts +1 -0
- package/dist/tests/unit/core/parsing-error-handling-nonfatal.spec.js +42 -0
- package/dist/tests/unit/core/resolve-path-under-scan-root.spec.d.ts +1 -0
- package/dist/tests/unit/core/resolve-path-under-scan-root.spec.js +54 -0
- package/dist/tests/unit/core/scan-result-language-stats.spec.d.ts +1 -0
- package/dist/tests/unit/core/scan-result-language-stats.spec.js +15 -0
- package/dist/tests/unit/core/section-discovery-excludes.spec.d.ts +1 -0
- package/dist/tests/unit/core/section-discovery-excludes.spec.js +49 -0
- package/dist/tests/unit/core/section-runtime.spec.d.ts +1 -0
- package/dist/tests/unit/core/section-runtime.spec.js +166 -0
- package/dist/tests/unit/core/stable-component-ids.spec.d.ts +1 -0
- package/dist/tests/unit/core/stable-component-ids.spec.js +112 -0
- package/dist/tests/unit/core/structural-scan.spec.d.ts +1 -0
- package/dist/tests/unit/core/structural-scan.spec.js +83 -0
- package/dist/tests/unit/core/terraform-json-overlay.spec.d.ts +1 -0
- package/dist/tests/unit/core/terraform-json-overlay.spec.js +36 -0
- package/dist/tests/unit/core/terraform-minimal-services.spec.d.ts +1 -0
- package/dist/tests/unit/core/terraform-minimal-services.spec.js +378 -0
- package/dist/tests/unit/data-flow/application-hub.spec.d.ts +1 -0
- package/dist/tests/unit/data-flow/application-hub.spec.js +48 -0
- package/dist/tests/unit/data-flow/cross-section-terraform-bridge.spec.d.ts +1 -0
- package/dist/tests/unit/data-flow/cross-section-terraform-bridge.spec.js +95 -0
- package/dist/tests/unit/data-flow/dedupe.spec.d.ts +1 -0
- package/dist/tests/unit/data-flow/dedupe.spec.js +134 -0
- package/dist/tests/unit/data-flow/detector.spec.d.ts +1 -0
- package/dist/tests/unit/data-flow/detector.spec.js +1254 -0
- package/dist/tests/unit/data-flow/drop-cross-section-flows.spec.d.ts +1 -0
- package/dist/tests/unit/data-flow/drop-cross-section-flows.spec.js +132 -0
- package/dist/tests/unit/data-flow/ensure-actor-flow.spec.d.ts +1 -0
- package/dist/tests/unit/data-flow/ensure-actor-flow.spec.js +233 -0
- package/dist/tests/unit/data-flow/ensure-manifest-declared-flows.spec.d.ts +1 -0
- package/dist/tests/unit/data-flow/ensure-manifest-declared-flows.spec.js +125 -0
- package/dist/tests/unit/data-flow/ensure-section-api-flows.spec.d.ts +1 -0
- package/dist/tests/unit/data-flow/ensure-section-api-flows.spec.js +40 -0
- package/dist/tests/unit/data-flow/postprocess.spec.d.ts +1 -0
- package/dist/tests/unit/data-flow/postprocess.spec.js +78 -0
- package/dist/tests/unit/data-flow/rewire.spec.d.ts +1 -0
- package/dist/tests/unit/data-flow/rewire.spec.js +194 -0
- package/dist/tests/unit/data-flow/terraform-flows.spec.d.ts +1 -0
- package/dist/tests/unit/data-flow/terraform-flows.spec.js +199 -0
- package/dist/tests/unit/evals/metrics.spec.d.ts +1 -0
- package/dist/tests/unit/evals/metrics.spec.js +54 -0
- package/dist/tests/unit/ingest/env-exclusion.spec.d.ts +1 -0
- package/dist/tests/unit/ingest/env-exclusion.spec.js +43 -0
- package/dist/tests/unit/ingest/file-system.spec.d.ts +1 -0
- package/dist/tests/unit/ingest/file-system.spec.js +180 -0
- package/dist/tests/unit/ingest/gitignore.spec.d.ts +1 -0
- package/dist/tests/unit/ingest/gitignore.spec.js +30 -0
- package/dist/tests/unit/observability/scan-sentry.spec.d.ts +1 -0
- package/dist/tests/unit/observability/scan-sentry.spec.js +60 -0
- package/dist/tests/unit/patterns/scan-exclusions.spec.d.ts +1 -0
- package/dist/tests/unit/patterns/scan-exclusions.spec.js +58 -0
- package/dist/tests/unit/pipeline/ai-orchestrator-options.spec.d.ts +1 -0
- package/dist/tests/unit/pipeline/ai-orchestrator-options.spec.js +19 -0
- package/dist/tests/unit/platform-api/dataparade-api-base-url.spec.d.ts +1 -0
- package/dist/tests/unit/platform-api/dataparade-api-base-url.spec.js +19 -0
- package/dist/tests/unit/platform-api/estimate-scan-footprint.spec.d.ts +1 -0
- package/dist/tests/unit/platform-api/estimate-scan-footprint.spec.js +50 -0
- package/dist/tests/unit/tracing/langsmith-tracing.spec.d.ts +1 -0
- package/dist/tests/unit/tracing/langsmith-tracing.spec.js +118 -0
- package/package.json +84 -0
|
@@ -0,0 +1,963 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const third_party_data_flow_1 = require("../../../src/ai-enrichment/third-party-data-flow");
|
|
4
|
+
const stable_component_ids_1 = require("../../../src/core/pipeline/stable-component-ids");
|
|
5
|
+
function thirdPartyComponent() {
|
|
6
|
+
return {
|
|
7
|
+
id: "cmp_tp_supabase",
|
|
8
|
+
name: "Supabase",
|
|
9
|
+
type: "third_party",
|
|
10
|
+
confidence: 0.9,
|
|
11
|
+
detectedFrom: [],
|
|
12
|
+
sourceLocations: [
|
|
13
|
+
{
|
|
14
|
+
filePath: "src/auth/supabase-client.ts",
|
|
15
|
+
startLine: 1,
|
|
16
|
+
endLine: 1,
|
|
17
|
+
},
|
|
18
|
+
],
|
|
19
|
+
properties: {
|
|
20
|
+
section_id: "src/auth",
|
|
21
|
+
serviceName: "Supabase",
|
|
22
|
+
integration_method: ["sdk"],
|
|
23
|
+
api_type: "rest",
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
function files() {
|
|
28
|
+
return [
|
|
29
|
+
{
|
|
30
|
+
path: "src/auth/supabase-client.ts",
|
|
31
|
+
name: "supabase-client.ts",
|
|
32
|
+
language: "typescript",
|
|
33
|
+
size: 240,
|
|
34
|
+
content: [
|
|
35
|
+
"import { createClient } from '@supabase/supabase-js';",
|
|
36
|
+
"await supabase.auth.signInWithPassword({ email, password });",
|
|
37
|
+
"await supabase.storage.from('avatars').upload(path, file);",
|
|
38
|
+
"await fetch('https://xyz.supabase.co/auth/v1/token', {",
|
|
39
|
+
" method: 'POST',",
|
|
40
|
+
" body: JSON.stringify({ email, password }),",
|
|
41
|
+
"});",
|
|
42
|
+
].join("\n"),
|
|
43
|
+
},
|
|
44
|
+
];
|
|
45
|
+
}
|
|
46
|
+
function providerProposal() {
|
|
47
|
+
return {
|
|
48
|
+
id: "provider_1",
|
|
49
|
+
proposal: {
|
|
50
|
+
kind: "component_patch",
|
|
51
|
+
candidateType: "third_party",
|
|
52
|
+
targetComponentId: "cmp_tp_supabase",
|
|
53
|
+
setProperties: {
|
|
54
|
+
authentication_method: "oauth2",
|
|
55
|
+
},
|
|
56
|
+
propertyEvidence: {
|
|
57
|
+
authentication_method: [
|
|
58
|
+
{
|
|
59
|
+
filePath: "src/auth/supabase-client.ts",
|
|
60
|
+
startLine: 2,
|
|
61
|
+
endLine: 2,
|
|
62
|
+
reason: "sign-in call detected",
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
confidence: { score: 0.9, band: "high" },
|
|
67
|
+
evidence: [
|
|
68
|
+
{
|
|
69
|
+
filePath: "src/auth/supabase-client.ts",
|
|
70
|
+
startLine: 2,
|
|
71
|
+
endLine: 2,
|
|
72
|
+
reason: "auth method evidence",
|
|
73
|
+
},
|
|
74
|
+
],
|
|
75
|
+
provider: "openai",
|
|
76
|
+
model: "gpt",
|
|
77
|
+
agent: "tpAgent",
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
describe("buildThirdPartyDataFlowSummary", () => {
|
|
82
|
+
it("builds data-flow entries from provider evidence and file signals", () => {
|
|
83
|
+
const summary = (0, third_party_data_flow_1.buildThirdPartyDataFlowSummary)({
|
|
84
|
+
proposals: [providerProposal()],
|
|
85
|
+
appliedProposalIds: ["provider_1"],
|
|
86
|
+
componentsAfterAi: [thirdPartyComponent()],
|
|
87
|
+
files: files(),
|
|
88
|
+
agenticTrace: [
|
|
89
|
+
{
|
|
90
|
+
candidateId: "cand_1",
|
|
91
|
+
componentId: "cmp_tp_supabase",
|
|
92
|
+
filesReviewed: ["src/auth/supabase-client.ts"],
|
|
93
|
+
rounds: 2,
|
|
94
|
+
finalProposalCount: 1,
|
|
95
|
+
toolCalls: [],
|
|
96
|
+
},
|
|
97
|
+
],
|
|
98
|
+
});
|
|
99
|
+
expect(summary.totals.thirdPartiesAnalyzed).toBe(1);
|
|
100
|
+
expect(summary.totals.withDataShared).toBe(1);
|
|
101
|
+
expect(summary.entries[0]?.source).toBe("provider");
|
|
102
|
+
expect(summary.entries[0]?.capabilities).toEqual(expect.arrayContaining(["auth", "rest", "sdk", "storage"]));
|
|
103
|
+
expect(summary.entries[0]?.dataShared.map((entry) => entry.category)).toEqual(expect.arrayContaining(["content_files", "credentials"]));
|
|
104
|
+
});
|
|
105
|
+
it("does not classify auth callback error.message as content_files for Auth0", () => {
|
|
106
|
+
const summary = (0, third_party_data_flow_1.buildThirdPartyDataFlowSummary)({
|
|
107
|
+
proposals: [],
|
|
108
|
+
appliedProposalIds: [],
|
|
109
|
+
componentsAfterAi: [
|
|
110
|
+
{
|
|
111
|
+
id: "cmp_tp_auth0",
|
|
112
|
+
name: "Auth0",
|
|
113
|
+
type: "third_party",
|
|
114
|
+
confidence: 0.9,
|
|
115
|
+
detectedFrom: [],
|
|
116
|
+
sourceLocations: [{ filePath: "app/api/auth/callback/route.ts", startLine: 1, endLine: 1 }],
|
|
117
|
+
properties: {
|
|
118
|
+
section_id: "app/api/auth",
|
|
119
|
+
serviceName: "auth0",
|
|
120
|
+
integration_method: ["api"],
|
|
121
|
+
api_type: "rest",
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
],
|
|
125
|
+
files: [
|
|
126
|
+
{
|
|
127
|
+
path: "app/api/auth/callback/route.ts",
|
|
128
|
+
name: "route.ts",
|
|
129
|
+
language: "typescript",
|
|
130
|
+
size: 140,
|
|
131
|
+
content: [
|
|
132
|
+
"const token = result.id_token;",
|
|
133
|
+
"return NextResponse.redirect(",
|
|
134
|
+
" new URL(`/auth?error=${encodeURIComponent(error.message || 'Authentication failed')}`, request.url)",
|
|
135
|
+
");",
|
|
136
|
+
].join("\n"),
|
|
137
|
+
},
|
|
138
|
+
],
|
|
139
|
+
agenticTrace: [],
|
|
140
|
+
});
|
|
141
|
+
const entry = summary.entries[0];
|
|
142
|
+
expect(entry).toBeDefined();
|
|
143
|
+
expect(entry?.dataShared.map((x) => x.category)).not.toContain("content_files");
|
|
144
|
+
});
|
|
145
|
+
it("does not include ai_inference capability from metadata without ai evidence", () => {
|
|
146
|
+
const summary = (0, third_party_data_flow_1.buildThirdPartyDataFlowSummary)({
|
|
147
|
+
proposals: [],
|
|
148
|
+
appliedProposalIds: [],
|
|
149
|
+
componentsAfterAi: [
|
|
150
|
+
{
|
|
151
|
+
id: "cmp_tp_supabase_meta",
|
|
152
|
+
name: "Supabase",
|
|
153
|
+
type: "third_party",
|
|
154
|
+
confidence: 0.9,
|
|
155
|
+
detectedFrom: [],
|
|
156
|
+
sourceLocations: [{ filePath: "src/supabase/client.ts", startLine: 1, endLine: 1 }],
|
|
157
|
+
properties: {
|
|
158
|
+
section_id: "src/supabase",
|
|
159
|
+
serviceName: "supabase",
|
|
160
|
+
integration_method: ["ai_inference", "sdk"],
|
|
161
|
+
api_type: "rest",
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
],
|
|
165
|
+
files: [
|
|
166
|
+
{
|
|
167
|
+
path: "src/supabase/client.ts",
|
|
168
|
+
name: "client.ts",
|
|
169
|
+
language: "typescript",
|
|
170
|
+
size: 180,
|
|
171
|
+
content: [
|
|
172
|
+
"import { createClient } from '@supabase/supabase-js';",
|
|
173
|
+
"const sb = createClient(url, key);",
|
|
174
|
+
"await sb.auth.getUser(token);",
|
|
175
|
+
].join("\n"),
|
|
176
|
+
},
|
|
177
|
+
],
|
|
178
|
+
agenticTrace: [],
|
|
179
|
+
});
|
|
180
|
+
const entry = summary.entries[0];
|
|
181
|
+
expect(entry).toBeDefined();
|
|
182
|
+
expect(entry?.capabilities).toContain("sdk");
|
|
183
|
+
expect(entry?.capabilities).not.toContain("ai_inference");
|
|
184
|
+
});
|
|
185
|
+
it("keeps token-based auth as auth_artifacts without email/password credentials", () => {
|
|
186
|
+
const summary = (0, third_party_data_flow_1.buildThirdPartyDataFlowSummary)({
|
|
187
|
+
proposals: [],
|
|
188
|
+
appliedProposalIds: [],
|
|
189
|
+
componentsAfterAi: [
|
|
190
|
+
{
|
|
191
|
+
id: "cmp_tp_openai",
|
|
192
|
+
name: "OpenAI",
|
|
193
|
+
type: "third_party",
|
|
194
|
+
confidence: 0.9,
|
|
195
|
+
detectedFrom: [],
|
|
196
|
+
sourceLocations: [{ filePath: "app/api/assistant/route.ts", startLine: 1, endLine: 1 }],
|
|
197
|
+
properties: {
|
|
198
|
+
section_id: "app/api/assistant",
|
|
199
|
+
serviceName: "openai",
|
|
200
|
+
integration_method: ["api"],
|
|
201
|
+
api_type: "rest",
|
|
202
|
+
},
|
|
203
|
+
},
|
|
204
|
+
],
|
|
205
|
+
files: [
|
|
206
|
+
{
|
|
207
|
+
path: "app/api/assistant/route.ts",
|
|
208
|
+
name: "route.ts",
|
|
209
|
+
language: "typescript",
|
|
210
|
+
size: 180,
|
|
211
|
+
content: [
|
|
212
|
+
"const token = process.env.OPENAI_API_KEY;",
|
|
213
|
+
"await fetch('https://api.openai.com/v1/chat/completions', {",
|
|
214
|
+
" headers: { Authorization: `Bearer ${token}` },",
|
|
215
|
+
" body: JSON.stringify({ model: 'gpt-4.1', input_text: prompt }),",
|
|
216
|
+
"});",
|
|
217
|
+
].join("\n"),
|
|
218
|
+
},
|
|
219
|
+
],
|
|
220
|
+
agenticTrace: [],
|
|
221
|
+
});
|
|
222
|
+
const entry = summary.entries[0];
|
|
223
|
+
expect(entry).toBeDefined();
|
|
224
|
+
const categories = entry?.dataShared.map((x) => x.category) ?? [];
|
|
225
|
+
expect(categories).toContain("auth_artifacts");
|
|
226
|
+
expect(categories).not.toContain("credentials");
|
|
227
|
+
});
|
|
228
|
+
it("does not infer Auth0 content/storage from unrelated file-upload lines", () => {
|
|
229
|
+
const summary = (0, third_party_data_flow_1.buildThirdPartyDataFlowSummary)({
|
|
230
|
+
proposals: [],
|
|
231
|
+
appliedProposalIds: [],
|
|
232
|
+
componentsAfterAi: [
|
|
233
|
+
{
|
|
234
|
+
id: "cmp_tp_auth0_mixed",
|
|
235
|
+
name: "Auth0",
|
|
236
|
+
type: "third_party",
|
|
237
|
+
confidence: 0.9,
|
|
238
|
+
detectedFrom: [],
|
|
239
|
+
sourceLocations: [{ filePath: "app/api/auth/mixed.ts", startLine: 1, endLine: 1 }],
|
|
240
|
+
properties: {
|
|
241
|
+
section_id: "app/api/auth",
|
|
242
|
+
serviceName: "auth0",
|
|
243
|
+
integration_method: ["storage", "api"],
|
|
244
|
+
api_type: "rest",
|
|
245
|
+
},
|
|
246
|
+
},
|
|
247
|
+
],
|
|
248
|
+
files: [
|
|
249
|
+
{
|
|
250
|
+
path: "app/api/auth/mixed.ts",
|
|
251
|
+
name: "mixed.ts",
|
|
252
|
+
language: "typescript",
|
|
253
|
+
size: 260,
|
|
254
|
+
content: [
|
|
255
|
+
"const auth0Domain = process.env.AUTH0_DOMAIN;",
|
|
256
|
+
"await fetch(`https://${auth0Domain}/oauth/token`, { method: 'POST' });",
|
|
257
|
+
"// unrelated logic below",
|
|
258
|
+
"const bucket = 'uploads';",
|
|
259
|
+
"await uploadBytes(bucketRef, fileBlob);",
|
|
260
|
+
].join("\n"),
|
|
261
|
+
},
|
|
262
|
+
],
|
|
263
|
+
agenticTrace: [],
|
|
264
|
+
});
|
|
265
|
+
const entry = summary.entries[0];
|
|
266
|
+
expect(entry).toBeDefined();
|
|
267
|
+
const categories = entry?.dataShared.map((x) => x.category) ?? [];
|
|
268
|
+
expect(categories).toContain("auth_artifacts");
|
|
269
|
+
expect(categories).not.toContain("content_files");
|
|
270
|
+
expect(entry?.capabilities).not.toContain("storage");
|
|
271
|
+
});
|
|
272
|
+
it("infers ai_inference for Google AI when nearby prompt lines are present", () => {
|
|
273
|
+
const summary = (0, third_party_data_flow_1.buildThirdPartyDataFlowSummary)({
|
|
274
|
+
proposals: [],
|
|
275
|
+
appliedProposalIds: [],
|
|
276
|
+
componentsAfterAi: [
|
|
277
|
+
{
|
|
278
|
+
id: "cmp_tp_google_ai",
|
|
279
|
+
name: "Google Ai",
|
|
280
|
+
type: "third_party",
|
|
281
|
+
confidence: 0.9,
|
|
282
|
+
detectedFrom: [],
|
|
283
|
+
sourceLocations: [{ filePath: "app/api/assistant/google.ts", startLine: 1, endLine: 1 }],
|
|
284
|
+
properties: {
|
|
285
|
+
section_id: "app/api/assistant",
|
|
286
|
+
serviceName: "google_ai",
|
|
287
|
+
integration_method: ["api"],
|
|
288
|
+
api_type: "rest",
|
|
289
|
+
},
|
|
290
|
+
},
|
|
291
|
+
],
|
|
292
|
+
files: [
|
|
293
|
+
{
|
|
294
|
+
path: "app/api/assistant/google.ts",
|
|
295
|
+
name: "google.ts",
|
|
296
|
+
language: "typescript",
|
|
297
|
+
size: 230,
|
|
298
|
+
content: [
|
|
299
|
+
"import { GoogleGenerativeAI } from '@google/generative-ai';",
|
|
300
|
+
"const model = new GoogleGenerativeAI(process.env.GOOGLE_API_KEY!);",
|
|
301
|
+
"const request = { input_text: prompt };",
|
|
302
|
+
"const out = await model.generateContent(request);",
|
|
303
|
+
].join("\n"),
|
|
304
|
+
},
|
|
305
|
+
],
|
|
306
|
+
agenticTrace: [],
|
|
307
|
+
});
|
|
308
|
+
const entry = summary.entries[0];
|
|
309
|
+
expect(entry).toBeDefined();
|
|
310
|
+
expect(entry?.capabilities).toContain("ai_inference");
|
|
311
|
+
expect(entry?.dataShared.map((x) => x.labels).flat()).toContain("prompt_input");
|
|
312
|
+
});
|
|
313
|
+
it("does not infer ai_inference for Google Auth token exchanges", () => {
|
|
314
|
+
const summary = (0, third_party_data_flow_1.buildThirdPartyDataFlowSummary)({
|
|
315
|
+
proposals: [],
|
|
316
|
+
appliedProposalIds: [],
|
|
317
|
+
componentsAfterAi: [
|
|
318
|
+
{
|
|
319
|
+
id: "cmp_tp_google_auth",
|
|
320
|
+
name: "Google Auth",
|
|
321
|
+
type: "third_party",
|
|
322
|
+
confidence: 0.9,
|
|
323
|
+
detectedFrom: [],
|
|
324
|
+
sourceLocations: [{ filePath: "app/api/auth/google.ts", startLine: 1, endLine: 1 }],
|
|
325
|
+
properties: {
|
|
326
|
+
section_id: "app/api/auth",
|
|
327
|
+
serviceName: "google_auth",
|
|
328
|
+
integration_method: ["api"],
|
|
329
|
+
api_type: "rest",
|
|
330
|
+
},
|
|
331
|
+
},
|
|
332
|
+
],
|
|
333
|
+
files: [
|
|
334
|
+
{
|
|
335
|
+
path: "app/api/auth/google.ts",
|
|
336
|
+
name: "google.ts",
|
|
337
|
+
language: "typescript",
|
|
338
|
+
size: 260,
|
|
339
|
+
content: [
|
|
340
|
+
"const token = await fetch('https://oauth2.googleapis.com/token', {",
|
|
341
|
+
" method: 'POST',",
|
|
342
|
+
" headers: { Authorization: `Bearer ${clientSecret}` },",
|
|
343
|
+
" body: JSON.stringify({ code, client_id, client_secret }),",
|
|
344
|
+
"});",
|
|
345
|
+
].join("\n"),
|
|
346
|
+
},
|
|
347
|
+
],
|
|
348
|
+
agenticTrace: [],
|
|
349
|
+
});
|
|
350
|
+
const entry = summary.entries[0];
|
|
351
|
+
expect(entry).toBeDefined();
|
|
352
|
+
expect(entry?.capabilities).toContain("auth");
|
|
353
|
+
expect(entry?.capabilities).not.toContain("ai_inference");
|
|
354
|
+
});
|
|
355
|
+
it("infers ai_inference from GoogleGenAI SDK usage", () => {
|
|
356
|
+
const summary = (0, third_party_data_flow_1.buildThirdPartyDataFlowSummary)({
|
|
357
|
+
proposals: [],
|
|
358
|
+
appliedProposalIds: [],
|
|
359
|
+
componentsAfterAi: [
|
|
360
|
+
{
|
|
361
|
+
id: "cmp_tp_google_ai_sdk",
|
|
362
|
+
name: "Google Ai",
|
|
363
|
+
type: "third_party",
|
|
364
|
+
confidence: 0.9,
|
|
365
|
+
detectedFrom: [],
|
|
366
|
+
sourceLocations: [{ filePath: "app/api/assistant/route.ts", startLine: 1, endLine: 1 }],
|
|
367
|
+
properties: {
|
|
368
|
+
section_id: "app/api/assistant",
|
|
369
|
+
serviceName: "google_ai",
|
|
370
|
+
integration_method: ["api"],
|
|
371
|
+
api_type: "rest",
|
|
372
|
+
},
|
|
373
|
+
},
|
|
374
|
+
],
|
|
375
|
+
files: [
|
|
376
|
+
{
|
|
377
|
+
path: "app/api/assistant/route.ts",
|
|
378
|
+
name: "route.ts",
|
|
379
|
+
language: "typescript",
|
|
380
|
+
size: 220,
|
|
381
|
+
content: [
|
|
382
|
+
"import { GoogleGenAI } from '@google/genai';",
|
|
383
|
+
"const ai = new GoogleGenAI({ apiKey });",
|
|
384
|
+
"const result = await ai.models.generateContent({ model: 'gemini-2.0', contents: prompt });",
|
|
385
|
+
].join("\n"),
|
|
386
|
+
},
|
|
387
|
+
],
|
|
388
|
+
agenticTrace: [],
|
|
389
|
+
});
|
|
390
|
+
const entry = summary.entries[0];
|
|
391
|
+
expect(entry).toBeDefined();
|
|
392
|
+
expect(entry?.capabilities).toContain("ai_inference");
|
|
393
|
+
expect(entry?.dataShared.map((x) => x.labels).flat()).toContain("prompt_input");
|
|
394
|
+
});
|
|
395
|
+
it("detects first_name and last_name as explicit profile signals", () => {
|
|
396
|
+
const summary = (0, third_party_data_flow_1.buildThirdPartyDataFlowSummary)({
|
|
397
|
+
proposals: [],
|
|
398
|
+
appliedProposalIds: [],
|
|
399
|
+
componentsAfterAi: [
|
|
400
|
+
{
|
|
401
|
+
id: "cmp_tp_profile_vendor",
|
|
402
|
+
name: "ProfileVendor",
|
|
403
|
+
type: "third_party",
|
|
404
|
+
confidence: 0.9,
|
|
405
|
+
detectedFrom: [],
|
|
406
|
+
sourceLocations: [{ filePath: "app/api/profile/vendor.ts", startLine: 1, endLine: 1 }],
|
|
407
|
+
properties: {
|
|
408
|
+
section_id: "app/api/profile",
|
|
409
|
+
serviceName: "profilevendor",
|
|
410
|
+
integration_method: ["api"],
|
|
411
|
+
api_type: "rest",
|
|
412
|
+
},
|
|
413
|
+
},
|
|
414
|
+
],
|
|
415
|
+
files: [
|
|
416
|
+
{
|
|
417
|
+
path: "app/api/profile/vendor.ts",
|
|
418
|
+
name: "vendor.ts",
|
|
419
|
+
language: "typescript",
|
|
420
|
+
size: 180,
|
|
421
|
+
content: [
|
|
422
|
+
"const payload = { first_name, last_name, user_id };",
|
|
423
|
+
"await fetch('https://api.profilevendor.com/users', {",
|
|
424
|
+
" method: 'POST',",
|
|
425
|
+
" body: JSON.stringify(payload),",
|
|
426
|
+
"});",
|
|
427
|
+
].join("\n"),
|
|
428
|
+
},
|
|
429
|
+
],
|
|
430
|
+
agenticTrace: [],
|
|
431
|
+
});
|
|
432
|
+
const entry = summary.entries[0];
|
|
433
|
+
expect(entry).toBeDefined();
|
|
434
|
+
const labels = entry?.dataShared.map((x) => x.labels).flat() ?? [];
|
|
435
|
+
expect(labels).toContain("first_name");
|
|
436
|
+
expect(labels).toContain("last_name");
|
|
437
|
+
});
|
|
438
|
+
it("does not detect passport_number from Passport auth framework names", () => {
|
|
439
|
+
const summary = (0, third_party_data_flow_1.buildThirdPartyDataFlowSummary)({
|
|
440
|
+
proposals: [],
|
|
441
|
+
appliedProposalIds: [],
|
|
442
|
+
componentsAfterAi: [
|
|
443
|
+
{
|
|
444
|
+
id: "cmp_tp_auth0_passport",
|
|
445
|
+
name: "Auth0",
|
|
446
|
+
type: "third_party",
|
|
447
|
+
confidence: 0.9,
|
|
448
|
+
detectedFrom: [],
|
|
449
|
+
sourceLocations: [{ filePath: "backend/src/auth/strategies/auth0.strategy.ts", startLine: 1, endLine: 1 }],
|
|
450
|
+
properties: {
|
|
451
|
+
section_id: "backend/src/auth",
|
|
452
|
+
serviceName: "auth0",
|
|
453
|
+
integration_method: ["api"],
|
|
454
|
+
api_type: "rest",
|
|
455
|
+
},
|
|
456
|
+
},
|
|
457
|
+
],
|
|
458
|
+
files: [
|
|
459
|
+
{
|
|
460
|
+
path: "backend/src/auth/strategies/auth0.strategy.ts",
|
|
461
|
+
name: "auth0.strategy.ts",
|
|
462
|
+
language: "typescript",
|
|
463
|
+
size: 220,
|
|
464
|
+
content: [
|
|
465
|
+
"import { PassportStrategy } from '@nestjs/passport';",
|
|
466
|
+
"import { ExtractJwt, Strategy } from 'passport-jwt';",
|
|
467
|
+
"jwtFromRequest: ExtractJwt.fromAuthHeaderAsBearerToken(),",
|
|
468
|
+
].join("\n"),
|
|
469
|
+
},
|
|
470
|
+
],
|
|
471
|
+
agenticTrace: [],
|
|
472
|
+
});
|
|
473
|
+
const entry = summary.entries[0];
|
|
474
|
+
expect(entry).toBeDefined();
|
|
475
|
+
const labels = entry?.dataShared.map((x) => x.labels).flat() ?? [];
|
|
476
|
+
expect(labels).not.toContain("passport_number");
|
|
477
|
+
});
|
|
478
|
+
it("does not classify ip address mentions as profile address", () => {
|
|
479
|
+
const summary = (0, third_party_data_flow_1.buildThirdPartyDataFlowSummary)({
|
|
480
|
+
proposals: [],
|
|
481
|
+
appliedProposalIds: [],
|
|
482
|
+
componentsAfterAi: [
|
|
483
|
+
{
|
|
484
|
+
id: "cmp_tp_sentry",
|
|
485
|
+
name: "Sentry",
|
|
486
|
+
type: "third_party",
|
|
487
|
+
confidence: 0.9,
|
|
488
|
+
detectedFrom: [],
|
|
489
|
+
sourceLocations: [{ filePath: "backend/src/instrument.ts", startLine: 1, endLine: 1 }],
|
|
490
|
+
properties: {
|
|
491
|
+
section_id: "backend/src",
|
|
492
|
+
serviceName: "sentry",
|
|
493
|
+
integration_method: ["sdk"],
|
|
494
|
+
api_type: "rest",
|
|
495
|
+
},
|
|
496
|
+
},
|
|
497
|
+
],
|
|
498
|
+
files: [
|
|
499
|
+
{
|
|
500
|
+
path: "backend/src/instrument.ts",
|
|
501
|
+
name: "instrument.ts",
|
|
502
|
+
language: "typescript",
|
|
503
|
+
size: 160,
|
|
504
|
+
content: [
|
|
505
|
+
"Sentry.init({",
|
|
506
|
+
" // automatic IP address collection on events",
|
|
507
|
+
" sendDefaultPii: true,",
|
|
508
|
+
"});",
|
|
509
|
+
].join("\n"),
|
|
510
|
+
},
|
|
511
|
+
],
|
|
512
|
+
agenticTrace: [],
|
|
513
|
+
});
|
|
514
|
+
const entry = summary.entries[0];
|
|
515
|
+
expect(entry).toBeDefined();
|
|
516
|
+
const labels = entry?.dataShared.map((x) => x.labels).flat() ?? [];
|
|
517
|
+
expect(labels).not.toContain("address");
|
|
518
|
+
});
|
|
519
|
+
it("does not classify OAuth state parameter as profile address", () => {
|
|
520
|
+
const summary = (0, third_party_data_flow_1.buildThirdPartyDataFlowSummary)({
|
|
521
|
+
proposals: [],
|
|
522
|
+
appliedProposalIds: [],
|
|
523
|
+
componentsAfterAi: [
|
|
524
|
+
{
|
|
525
|
+
id: "cmp_tp_auth0_state",
|
|
526
|
+
name: "Auth0",
|
|
527
|
+
type: "third_party",
|
|
528
|
+
confidence: 0.9,
|
|
529
|
+
detectedFrom: [],
|
|
530
|
+
sourceLocations: [{ filePath: "backend/src/auth/auth.service.ts", startLine: 1, endLine: 1 }],
|
|
531
|
+
properties: {
|
|
532
|
+
section_id: "backend/src/auth",
|
|
533
|
+
serviceName: "auth0",
|
|
534
|
+
integration_method: ["api"],
|
|
535
|
+
api_type: "rest",
|
|
536
|
+
},
|
|
537
|
+
},
|
|
538
|
+
],
|
|
539
|
+
files: [
|
|
540
|
+
{
|
|
541
|
+
path: "backend/src/auth/auth.service.ts",
|
|
542
|
+
name: "auth.service.ts",
|
|
543
|
+
language: "typescript",
|
|
544
|
+
size: 180,
|
|
545
|
+
content: [
|
|
546
|
+
"const state = generateRandomState();",
|
|
547
|
+
"const authUrl = `https://auth0.com/authorize?state=${state}`;",
|
|
548
|
+
"return authUrl;",
|
|
549
|
+
].join("\n"),
|
|
550
|
+
},
|
|
551
|
+
],
|
|
552
|
+
agenticTrace: [],
|
|
553
|
+
});
|
|
554
|
+
const entry = summary.entries[0];
|
|
555
|
+
expect(entry).toBeDefined();
|
|
556
|
+
const labels = entry?.dataShared.map((x) => x.labels).flat() ?? [];
|
|
557
|
+
expect(labels).not.toContain("address");
|
|
558
|
+
});
|
|
559
|
+
it("derives dataShared from provider evidence reasons when scan signals are missing", () => {
|
|
560
|
+
const summary = (0, third_party_data_flow_1.buildThirdPartyDataFlowSummary)({
|
|
561
|
+
proposals: [
|
|
562
|
+
{
|
|
563
|
+
id: "provider_aws_1",
|
|
564
|
+
proposal: {
|
|
565
|
+
kind: "component_patch",
|
|
566
|
+
candidateType: "third_party",
|
|
567
|
+
targetComponentId: "cmp_tp_aws_provider_only",
|
|
568
|
+
setProperties: {
|
|
569
|
+
integration_method: ["sdk", "api"],
|
|
570
|
+
},
|
|
571
|
+
confidence: { score: 0.92, band: "high" },
|
|
572
|
+
evidence: [
|
|
573
|
+
{
|
|
574
|
+
filePath: "backend/lambdas/create-db/index.js",
|
|
575
|
+
startLine: 20,
|
|
576
|
+
endLine: 30,
|
|
577
|
+
reason: "getSecret() retrieves DB_PASSWORD from AWS Secrets Manager",
|
|
578
|
+
},
|
|
579
|
+
{
|
|
580
|
+
filePath: "backend/lambdas/create-db/index.js",
|
|
581
|
+
startLine: 50,
|
|
582
|
+
endLine: 60,
|
|
583
|
+
reason: "Client connects to RDS database via host/port/database parameters",
|
|
584
|
+
},
|
|
585
|
+
],
|
|
586
|
+
provider: "openai",
|
|
587
|
+
model: "gpt",
|
|
588
|
+
agent: "tpAgent",
|
|
589
|
+
},
|
|
590
|
+
},
|
|
591
|
+
],
|
|
592
|
+
appliedProposalIds: ["provider_aws_1"],
|
|
593
|
+
componentsAfterAi: [
|
|
594
|
+
{
|
|
595
|
+
id: "cmp_tp_aws_provider_only",
|
|
596
|
+
name: "Aws",
|
|
597
|
+
type: "third_party",
|
|
598
|
+
confidence: 0.9,
|
|
599
|
+
detectedFrom: [],
|
|
600
|
+
sourceLocations: [{ filePath: "backend/lambdas/create-db/index.js", startLine: 1, endLine: 1 }],
|
|
601
|
+
properties: {
|
|
602
|
+
section_id: "backend/lambdas/create-db",
|
|
603
|
+
serviceName: "aws",
|
|
604
|
+
integration_method: ["sdk", "api"],
|
|
605
|
+
api_type: "rest",
|
|
606
|
+
},
|
|
607
|
+
},
|
|
608
|
+
],
|
|
609
|
+
files: [
|
|
610
|
+
{
|
|
611
|
+
path: "backend/lambdas/create-db/index.js",
|
|
612
|
+
name: "index.js",
|
|
613
|
+
language: "javascript",
|
|
614
|
+
size: 120,
|
|
615
|
+
content: "exports.handler = async () => {};",
|
|
616
|
+
},
|
|
617
|
+
],
|
|
618
|
+
agenticTrace: [],
|
|
619
|
+
});
|
|
620
|
+
const entry = summary.entries[0];
|
|
621
|
+
expect(entry).toBeDefined();
|
|
622
|
+
expect(entry?.dataShared.map((x) => x.category)).toEqual(expect.arrayContaining(["auth_artifacts", "credentials", "identifiers"]));
|
|
623
|
+
expect(entry?.direction).toBe("outbound_to_third_party");
|
|
624
|
+
});
|
|
625
|
+
it("does not bleed unrelated address-like signals from broad section roots", () => {
|
|
626
|
+
const summary = (0, third_party_data_flow_1.buildThirdPartyDataFlowSummary)({
|
|
627
|
+
proposals: [],
|
|
628
|
+
appliedProposalIds: [],
|
|
629
|
+
componentsAfterAi: [
|
|
630
|
+
{
|
|
631
|
+
id: "cmp_tp_aws_nobleed",
|
|
632
|
+
name: "Aws",
|
|
633
|
+
type: "third_party",
|
|
634
|
+
confidence: 0.9,
|
|
635
|
+
detectedFrom: [],
|
|
636
|
+
sourceLocations: [{ filePath: "backend/src/aws-client.ts", startLine: 1, endLine: 1 }],
|
|
637
|
+
properties: {
|
|
638
|
+
section_id: "backend",
|
|
639
|
+
serviceName: "aws",
|
|
640
|
+
integration_method: ["sdk"],
|
|
641
|
+
api_type: "rest",
|
|
642
|
+
},
|
|
643
|
+
},
|
|
644
|
+
],
|
|
645
|
+
files: [
|
|
646
|
+
{
|
|
647
|
+
path: "backend/src/aws-client.ts",
|
|
648
|
+
name: "aws-client.ts",
|
|
649
|
+
language: "typescript",
|
|
650
|
+
size: 200,
|
|
651
|
+
content: [
|
|
652
|
+
"import { SecretsManagerClient } from '@aws-sdk/client-secrets-manager';",
|
|
653
|
+
"const c = new SecretsManagerClient({ region: 'us-east-1' });",
|
|
654
|
+
"await c.send(command);",
|
|
655
|
+
].join("\n"),
|
|
656
|
+
},
|
|
657
|
+
{
|
|
658
|
+
path: "backend/src/unrelated-profile.ts",
|
|
659
|
+
name: "unrelated-profile.ts",
|
|
660
|
+
language: "typescript",
|
|
661
|
+
size: 120,
|
|
662
|
+
content: [
|
|
663
|
+
"const mailing_address = profile.address;",
|
|
664
|
+
"console.log(mailing_address);",
|
|
665
|
+
].join("\n"),
|
|
666
|
+
},
|
|
667
|
+
],
|
|
668
|
+
agenticTrace: [],
|
|
669
|
+
});
|
|
670
|
+
const entry = summary.entries[0];
|
|
671
|
+
expect(entry).toBeDefined();
|
|
672
|
+
const labels = entry?.dataShared.map((x) => x.labels).flat() ?? [];
|
|
673
|
+
expect(labels).not.toContain("address");
|
|
674
|
+
});
|
|
675
|
+
it("attributes shared prompt assembly to all AI providers in the same handler file", () => {
|
|
676
|
+
const handlerPath = "app/api/assistant/route.ts";
|
|
677
|
+
const handlerContent = [
|
|
678
|
+
"function buildPrompt(body: { text: string }) {",
|
|
679
|
+
" return { input_text: body.text };",
|
|
680
|
+
"}",
|
|
681
|
+
"export async function POST(req: Request) {",
|
|
682
|
+
" const prompt = buildPrompt(await req.json());",
|
|
683
|
+
" await fetch('https://api.openai.com/v1/chat/completions', {",
|
|
684
|
+
" method: 'POST',",
|
|
685
|
+
" body: JSON.stringify({ model: 'gpt-4', messages: [{ role: 'user', content: prompt }] }),",
|
|
686
|
+
" });",
|
|
687
|
+
" const genai = new GoogleGenAI({ apiKey: process.env.GOOGLE_API_KEY });",
|
|
688
|
+
" await genai.models.generateContent({ model: 'gemini-2.0', contents: prompt });",
|
|
689
|
+
"}",
|
|
690
|
+
].join("\n");
|
|
691
|
+
const openai = {
|
|
692
|
+
id: "cmp_openai",
|
|
693
|
+
name: "Openai",
|
|
694
|
+
type: "third_party",
|
|
695
|
+
subType: "ai_provider",
|
|
696
|
+
confidence: 0.9,
|
|
697
|
+
detectedFrom: [],
|
|
698
|
+
sourceLocations: [{ filePath: handlerPath, startLine: 1, endLine: 1 }],
|
|
699
|
+
properties: {
|
|
700
|
+
section_id: "reedy",
|
|
701
|
+
serviceName: "openai",
|
|
702
|
+
client: "openai",
|
|
703
|
+
integration_method: ["api"],
|
|
704
|
+
api_type: "rest",
|
|
705
|
+
},
|
|
706
|
+
};
|
|
707
|
+
const google = {
|
|
708
|
+
id: "cmp_google",
|
|
709
|
+
name: "Google",
|
|
710
|
+
type: "third_party",
|
|
711
|
+
subType: "ai_provider",
|
|
712
|
+
confidence: 0.9,
|
|
713
|
+
detectedFrom: [],
|
|
714
|
+
sourceLocations: [{ filePath: handlerPath, startLine: 1, endLine: 1 }],
|
|
715
|
+
properties: {
|
|
716
|
+
section_id: "reedy",
|
|
717
|
+
serviceName: "google",
|
|
718
|
+
client: "google_ai",
|
|
719
|
+
integration_method: ["api"],
|
|
720
|
+
api_type: "rest",
|
|
721
|
+
},
|
|
722
|
+
};
|
|
723
|
+
const files = [
|
|
724
|
+
{
|
|
725
|
+
path: handlerPath,
|
|
726
|
+
name: "route.ts",
|
|
727
|
+
language: "typescript",
|
|
728
|
+
size: handlerContent.length,
|
|
729
|
+
content: handlerContent,
|
|
730
|
+
},
|
|
731
|
+
];
|
|
732
|
+
expect((0, third_party_data_flow_1.buildSharedHandlerAiFileIndex)([openai, google], files)).toEqual(new Set([handlerPath]));
|
|
733
|
+
const summary = (0, third_party_data_flow_1.buildThirdPartyDataFlowSummary)({
|
|
734
|
+
proposals: [],
|
|
735
|
+
appliedProposalIds: [],
|
|
736
|
+
componentsAfterAi: [openai, google],
|
|
737
|
+
files,
|
|
738
|
+
});
|
|
739
|
+
for (const id of ["cmp_openai", "cmp_google"]) {
|
|
740
|
+
const entry = summary.entries.find((e) => e.componentId === id);
|
|
741
|
+
expect(entry?.capabilities).toContain("ai_inference");
|
|
742
|
+
expect(entry?.dataShared.map((x) => x.labels).flat()).toContain("prompt_input");
|
|
743
|
+
expect(entry?.notes).toContain("shared_ai_handler_prompt_attribution");
|
|
744
|
+
expect(entry?.evidence.some((ev) => ev.reason.includes("shared_ai_handler"))).toBe(true);
|
|
745
|
+
}
|
|
746
|
+
});
|
|
747
|
+
it("does not attribute shared prompts to non-AI vendors in the same handler file", () => {
|
|
748
|
+
const handlerPath = "app/api/mixed/route.ts";
|
|
749
|
+
const handlerContent = [
|
|
750
|
+
"const prompt = buildPrompt(body);",
|
|
751
|
+
"await fetch('https://api.openai.com/v1/chat/completions', {",
|
|
752
|
+
" method: 'POST',",
|
|
753
|
+
" body: JSON.stringify({ messages: [{ role: 'user', content: prompt }] }),",
|
|
754
|
+
"});",
|
|
755
|
+
"await fetch(`https://${process.env.AUTH0_DOMAIN}/oauth/token`, { method: 'POST' });",
|
|
756
|
+
].join("\n");
|
|
757
|
+
const summary = (0, third_party_data_flow_1.buildThirdPartyDataFlowSummary)({
|
|
758
|
+
proposals: [],
|
|
759
|
+
appliedProposalIds: [],
|
|
760
|
+
componentsAfterAi: [
|
|
761
|
+
{
|
|
762
|
+
id: "cmp_openai",
|
|
763
|
+
name: "Openai",
|
|
764
|
+
type: "third_party",
|
|
765
|
+
subType: "ai_provider",
|
|
766
|
+
confidence: 0.9,
|
|
767
|
+
detectedFrom: [],
|
|
768
|
+
sourceLocations: [{ filePath: handlerPath, startLine: 1, endLine: 1 }],
|
|
769
|
+
properties: {
|
|
770
|
+
section_id: "reedy",
|
|
771
|
+
serviceName: "openai",
|
|
772
|
+
integration_method: ["api"],
|
|
773
|
+
api_type: "rest",
|
|
774
|
+
},
|
|
775
|
+
},
|
|
776
|
+
{
|
|
777
|
+
id: "cmp_auth0",
|
|
778
|
+
name: "Auth0",
|
|
779
|
+
type: "third_party",
|
|
780
|
+
subType: "saas_service",
|
|
781
|
+
confidence: 0.9,
|
|
782
|
+
detectedFrom: [],
|
|
783
|
+
sourceLocations: [{ filePath: handlerPath, startLine: 1, endLine: 1 }],
|
|
784
|
+
properties: {
|
|
785
|
+
section_id: "reedy",
|
|
786
|
+
serviceName: "auth0",
|
|
787
|
+
integration_method: ["api"],
|
|
788
|
+
api_type: "rest",
|
|
789
|
+
},
|
|
790
|
+
},
|
|
791
|
+
],
|
|
792
|
+
files: [
|
|
793
|
+
{
|
|
794
|
+
path: handlerPath,
|
|
795
|
+
name: "route.ts",
|
|
796
|
+
language: "typescript",
|
|
797
|
+
size: handlerContent.length,
|
|
798
|
+
content: handlerContent,
|
|
799
|
+
},
|
|
800
|
+
],
|
|
801
|
+
});
|
|
802
|
+
const openai = summary.entries.find((e) => e.componentId === "cmp_openai");
|
|
803
|
+
const auth0 = summary.entries.find((e) => e.componentId === "cmp_auth0");
|
|
804
|
+
expect(openai?.dataShared.map((x) => x.category)).toContain("content_files");
|
|
805
|
+
expect(auth0?.dataShared.map((x) => x.category)).not.toContain("content_files");
|
|
806
|
+
});
|
|
807
|
+
it("maps post-AI proposal and trace ids to final stable component ids", () => {
|
|
808
|
+
const postAiGoogle = {
|
|
809
|
+
id: "cmp_old_google",
|
|
810
|
+
name: "Google",
|
|
811
|
+
type: "third_party",
|
|
812
|
+
subType: "ai_provider",
|
|
813
|
+
confidence: 0.9,
|
|
814
|
+
detectedFrom: [],
|
|
815
|
+
sourceLocations: [
|
|
816
|
+
{ filePath: "reedy/app/api/assistant/route.ts", startLine: 1, endLine: 1 },
|
|
817
|
+
],
|
|
818
|
+
properties: {
|
|
819
|
+
section_id: "reedy",
|
|
820
|
+
serviceName: "google",
|
|
821
|
+
client: "google_ai",
|
|
822
|
+
integration_method: ["api"],
|
|
823
|
+
api_type: "rest",
|
|
824
|
+
},
|
|
825
|
+
};
|
|
826
|
+
const postAiAuth0 = {
|
|
827
|
+
id: "cmp_old_auth0",
|
|
828
|
+
name: "Auth0",
|
|
829
|
+
type: "third_party",
|
|
830
|
+
subType: "saas_service",
|
|
831
|
+
confidence: 0.9,
|
|
832
|
+
detectedFrom: [],
|
|
833
|
+
sourceLocations: [
|
|
834
|
+
{ filePath: "reedy/app/api/auth/login/route.ts", startLine: 1, endLine: 1 },
|
|
835
|
+
],
|
|
836
|
+
properties: {
|
|
837
|
+
section_id: "reedy",
|
|
838
|
+
serviceName: "auth0",
|
|
839
|
+
integration_method: ["api"],
|
|
840
|
+
api_type: "rest",
|
|
841
|
+
},
|
|
842
|
+
};
|
|
843
|
+
const stable = (0, stable_component_ids_1.assignStableComponentIds)([postAiAuth0, postAiGoogle], []);
|
|
844
|
+
const finalGoogle = stable.components.find((c) => c.name === "Google");
|
|
845
|
+
const finalAuth0 = stable.components.find((c) => c.name === "Auth0");
|
|
846
|
+
expect(finalGoogle?.id).toMatch(/^cmp_\d+$/);
|
|
847
|
+
expect(finalGoogle?.id).not.toBe("cmp_old_google");
|
|
848
|
+
const remap = (0, third_party_data_flow_1.buildProposalTargetComponentIdRemap)([postAiAuth0, postAiGoogle], stable.components);
|
|
849
|
+
expect(remap.get("cmp_old_google")).toBe(finalGoogle?.id);
|
|
850
|
+
const summary = (0, third_party_data_flow_1.buildThirdPartyDataFlowSummary)({
|
|
851
|
+
proposals: [
|
|
852
|
+
{
|
|
853
|
+
id: "provider_1",
|
|
854
|
+
proposal: {
|
|
855
|
+
kind: "component_patch",
|
|
856
|
+
candidateType: "third_party",
|
|
857
|
+
targetComponentId: "cmp_old_google",
|
|
858
|
+
setProperties: { authentication_method: "api_key" },
|
|
859
|
+
propertyEvidence: {
|
|
860
|
+
authentication_method: [
|
|
861
|
+
{
|
|
862
|
+
filePath: "reedy/app/api/assistant/route.ts",
|
|
863
|
+
startLine: 10,
|
|
864
|
+
endLine: 10,
|
|
865
|
+
reason: "API key header",
|
|
866
|
+
},
|
|
867
|
+
],
|
|
868
|
+
},
|
|
869
|
+
confidence: { score: 0.9, band: "high" },
|
|
870
|
+
evidence: [],
|
|
871
|
+
provider: "anthropic",
|
|
872
|
+
model: "claude",
|
|
873
|
+
agent: "tpAgent",
|
|
874
|
+
},
|
|
875
|
+
},
|
|
876
|
+
],
|
|
877
|
+
appliedProposalIds: ["provider_1"],
|
|
878
|
+
componentsAfterAi: stable.components.filter((c) => c.type === "third_party"),
|
|
879
|
+
files: [
|
|
880
|
+
{
|
|
881
|
+
path: "reedy/app/api/assistant/route.ts",
|
|
882
|
+
name: "route.ts",
|
|
883
|
+
language: "typescript",
|
|
884
|
+
size: 80,
|
|
885
|
+
content: "await fetch('https://generativelanguage.googleapis.com/v1/models');",
|
|
886
|
+
},
|
|
887
|
+
],
|
|
888
|
+
agenticTrace: [
|
|
889
|
+
{
|
|
890
|
+
candidateId: "cand_google",
|
|
891
|
+
componentId: "cmp_old_google",
|
|
892
|
+
filesReviewed: ["reedy/app/api/assistant/route.ts"],
|
|
893
|
+
rounds: 1,
|
|
894
|
+
finalProposalCount: 1,
|
|
895
|
+
toolCalls: [],
|
|
896
|
+
},
|
|
897
|
+
],
|
|
898
|
+
proposalTargetComponentIdRemap: remap,
|
|
899
|
+
});
|
|
900
|
+
const googleEntry = summary.entries.find((e) => e.componentId === finalGoogle?.id);
|
|
901
|
+
expect(googleEntry).toBeDefined();
|
|
902
|
+
expect(googleEntry?.source).toBe("provider");
|
|
903
|
+
expect(googleEntry?.notes).toContain("ai_provider_inference_present");
|
|
904
|
+
expect(summary.entries.every((e) => /^cmp_\d+$/.test(e.componentId))).toBe(true);
|
|
905
|
+
});
|
|
906
|
+
it("includes managed-service third parties with heuristic-only insights when absent post-AI", () => {
|
|
907
|
+
const postAiProvider = {
|
|
908
|
+
id: "cmp_provider",
|
|
909
|
+
name: "Google",
|
|
910
|
+
type: "third_party",
|
|
911
|
+
subType: "ai_provider",
|
|
912
|
+
confidence: 0.9,
|
|
913
|
+
detectedFrom: [],
|
|
914
|
+
sourceLocations: [
|
|
915
|
+
{ filePath: "reedy/app/api/assistant/route.ts", startLine: 1, endLine: 1 },
|
|
916
|
+
],
|
|
917
|
+
properties: {
|
|
918
|
+
section_id: "reedy",
|
|
919
|
+
serviceName: "google",
|
|
920
|
+
},
|
|
921
|
+
};
|
|
922
|
+
const finalProvider = { ...postAiProvider, id: "cmp_1" };
|
|
923
|
+
const finalManaged = {
|
|
924
|
+
id: "cmp_2",
|
|
925
|
+
name: "Google AI",
|
|
926
|
+
type: "third_party",
|
|
927
|
+
subType: "ai_provider",
|
|
928
|
+
confidence: 0.78,
|
|
929
|
+
detectedFrom: [],
|
|
930
|
+
sourceLocations: [
|
|
931
|
+
{ filePath: "reedy/app/api/assistant/route.ts", startLine: 1, endLine: 1 },
|
|
932
|
+
],
|
|
933
|
+
properties: {
|
|
934
|
+
section_id: "reedy",
|
|
935
|
+
managed_by_provider: "cmp_1",
|
|
936
|
+
managed_service_key: "google_ai",
|
|
937
|
+
serviceName: "google",
|
|
938
|
+
generated_by: "provider_topology_fallback",
|
|
939
|
+
},
|
|
940
|
+
};
|
|
941
|
+
const remap = (0, third_party_data_flow_1.buildProposalTargetComponentIdRemap)([postAiProvider], [finalProvider, finalManaged]);
|
|
942
|
+
const summary = (0, third_party_data_flow_1.buildThirdPartyDataFlowSummary)({
|
|
943
|
+
proposals: [],
|
|
944
|
+
appliedProposalIds: [],
|
|
945
|
+
componentsAfterAi: [finalProvider, finalManaged],
|
|
946
|
+
files: [
|
|
947
|
+
{
|
|
948
|
+
path: "reedy/app/api/assistant/route.ts",
|
|
949
|
+
name: "route.ts",
|
|
950
|
+
language: "typescript",
|
|
951
|
+
size: 80,
|
|
952
|
+
content: "await fetch('https://generativelanguage.googleapis.com/v1/models');",
|
|
953
|
+
},
|
|
954
|
+
],
|
|
955
|
+
proposalTargetComponentIdRemap: remap,
|
|
956
|
+
});
|
|
957
|
+
expect(summary.totals.thirdPartiesAnalyzed).toBe(2);
|
|
958
|
+
const managedEntry = summary.entries.find((e) => e.componentId === "cmp_2");
|
|
959
|
+
expect(managedEntry).toBeDefined();
|
|
960
|
+
expect(managedEntry?.source).toBe("heuristic");
|
|
961
|
+
expect(managedEntry?.notes).toContain("no_provider_inference_for_component");
|
|
962
|
+
});
|
|
963
|
+
});
|