@dataparade/cli 0.0.2 → 0.0.4

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.
Files changed (74) hide show
  1. package/README.md +25 -0
  2. package/dist/package.json +85 -0
  3. package/dist/src/ai-enrichment/agent-orchestrator.d.ts +2 -0
  4. package/dist/src/ai-enrichment/agent-orchestrator.js +8 -5
  5. package/dist/src/ai-enrichment/providers/hosted-worker-infer-provider.d.ts +10 -0
  6. package/dist/src/ai-enrichment/providers/hosted-worker-infer-provider.js +47 -0
  7. package/dist/src/cli.js +85 -1
  8. package/dist/src/config/env.js +2 -0
  9. package/dist/src/config/resolve.js +3 -0
  10. package/dist/src/config/scan-env.d.ts +1 -0
  11. package/dist/src/config/scan-env.js +5 -0
  12. package/dist/src/config/types.d.ts +1 -0
  13. package/dist/src/config/upload-env.d.ts +1 -0
  14. package/dist/src/config/upload-env.js +10 -0
  15. package/dist/src/config/validate-scan-ai.d.ts +1 -1
  16. package/dist/src/config/validate-scan-ai.js +5 -0
  17. package/dist/src/core/pipeline/ai-orchestrator-options.js +5 -0
  18. package/dist/src/core/pipeline/graph-mapping.js +5 -0
  19. package/dist/src/core/pipeline/infer-data-flow-protocol.d.ts +7 -0
  20. package/dist/src/core/pipeline/infer-data-flow-protocol.js +39 -0
  21. package/dist/src/core/schema/scan-config.schema.d.ts +2 -0
  22. package/dist/src/core/schema/scan-config.schema.js +2 -1
  23. package/dist/src/core/types/config.d.ts +3 -1
  24. package/dist/src/observability/scan-sentry.d.ts +1 -1
  25. package/dist/src/platform-api/dataparade-app-base-url.d.ts +7 -0
  26. package/dist/src/platform-api/dataparade-app-base-url.js +14 -0
  27. package/dist/src/platform-api/upload-client.d.ts +3 -0
  28. package/dist/src/platform-api/upload-client.js +38 -0
  29. package/dist/src/platform-api/upload.types.d.ts +10 -0
  30. package/dist/src/platform-api/upload.types.js +2 -0
  31. package/dist/src/upload/build-preview-url.d.ts +1 -0
  32. package/dist/src/upload/build-preview-url.js +10 -0
  33. package/dist/src/upload/run-upload.d.ts +2 -0
  34. package/dist/src/upload/run-upload.js +18 -0
  35. package/dist/src/upload/types.d.ts +11 -0
  36. package/dist/src/upload/types.js +2 -0
  37. package/dist/tests/unit/analyzers/typescript/property-detection.spec.js +22 -0
  38. package/dist/tests/unit/cli/scan-quota-flow.spec.js +2 -0
  39. package/dist/tests/unit/config/upload-env.spec.d.ts +1 -0
  40. package/dist/tests/unit/config/upload-env.spec.js +12 -0
  41. package/dist/tests/unit/config/validate-scan-ai.spec.js +8 -0
  42. package/dist/tests/unit/core/graph-mapping.spec.js +52 -0
  43. package/dist/tests/unit/core/infer-data-flow-protocol.spec.d.ts +1 -0
  44. package/dist/tests/unit/core/infer-data-flow-protocol.spec.js +37 -0
  45. package/dist/tests/unit/platform-api/dataparade-app-base-url.spec.d.ts +1 -0
  46. package/dist/tests/unit/platform-api/dataparade-app-base-url.spec.js +13 -0
  47. package/dist/tests/unit/platform-api/upload-client.spec.d.ts +1 -0
  48. package/dist/tests/unit/platform-api/upload-client.spec.js +40 -0
  49. package/dist/tests/unit/publish-manifest.spec.d.ts +1 -0
  50. package/dist/tests/unit/publish-manifest.spec.js +18 -0
  51. package/dist/tests/unit/upload/build-preview-url.spec.d.ts +1 -0
  52. package/dist/tests/unit/upload/build-preview-url.spec.js +19 -0
  53. package/package.json +4 -3
  54. package/patterns/README.md +322 -0
  55. package/patterns/actor.patterns.yaml +51 -0
  56. package/patterns/aws-terraform-catalog.snapshot.json +1760 -0
  57. package/patterns/aws-terraform-service-hints.generated.json +1446 -0
  58. package/patterns/azure-terraform-catalog.snapshot.json +1195 -0
  59. package/patterns/azure-terraform-service-hints.generated.json +864 -0
  60. package/patterns/classifier/actors.classifier.yaml +17 -0
  61. package/patterns/classifier/components.classifier.yaml +110 -0
  62. package/patterns/classifier/third-party.classifier.yaml +169 -0
  63. package/patterns/kubernetes-terraform-catalog.snapshot.json +94 -0
  64. package/patterns/kubernetes-terraform-service-hints.generated.json +258 -0
  65. package/patterns/non-pii-signals.rules.yaml +84 -0
  66. package/patterns/pii-signals.rules.yaml +115 -0
  67. package/patterns/property.patterns.yaml +431 -0
  68. package/patterns/provider-topology.rules.yaml +765 -0
  69. package/patterns/python.md +211 -0
  70. package/patterns/python.patterns.yaml +160 -0
  71. package/patterns/terraform.md +37 -0
  72. package/patterns/terraform.patterns.yaml +495 -0
  73. package/patterns/third-party.patterns.yaml +167 -0
  74. package/patterns/typescript.patterns.yaml +139 -0
@@ -0,0 +1,84 @@
1
+ # Non-PII signal rules consumed by `src/ai-enrichment/non-pii-signal-rules.ts`.
2
+ # Rule schema:
3
+ # - id: unique rule identifier
4
+ # - category: one of [auth_artifacts, usage_metadata, telemetry, content_files, identifiers]
5
+ # - labels: canonical output labels emitted in thirdPartyDataFlow.dataShared
6
+ # - patterns: regex strings (compiled case-insensitive)
7
+ # - capabilities: optional capability tags added to thirdPartyDataFlow.capabilities
8
+ # - directionHint: optional one of [outbound_to_third_party, inbound_from_third_party]
9
+ # Matching notes:
10
+ # - Rules are evaluated per source line with operation-context gating.
11
+ # - content_files signals also require vendor-aware checks in the data-flow pass.
12
+ # - Prefer snake_case labels and lowercase capability names.
13
+ non_pii_signal_rules:
14
+ - id: auth_token_artifacts
15
+ category: auth_artifacts
16
+ labels:
17
+ - auth_token
18
+ capabilities:
19
+ - auth
20
+ patterns:
21
+ - "\\b(jwt|oauth2?|access[_-]?token|refresh[_-]?token|id[_-]?token|session|bearer|api[_-]?key|authorization)\\b"
22
+
23
+ - id: technical_identifier
24
+ category: identifiers
25
+ labels:
26
+ - technical_identifier
27
+ patterns:
28
+ - "\\b(device[_-]?id|installation[_-]?id|cookie[_-]?id|anonymous[_-]?id|ad(vertising)?[_-]?id|ga[_-]?client[_-]?id)\\b"
29
+
30
+ - id: telemetry_events
31
+ category: telemetry
32
+ labels:
33
+ - telemetry_event
34
+ capabilities:
35
+ - analytics
36
+ patterns:
37
+ - "\\b(event[_-]?name|event[_-]?properties|tracking[_-]?payload|analytics[_-]?event|clickstream|screen[_-]?view|funnel[_-]?step)\\b"
38
+
39
+ - id: usage_metadata
40
+ category: usage_metadata
41
+ labels:
42
+ - usage_metadata
43
+ patterns:
44
+ - "\\b(timestamp|timezone|locale|user[_-]?agent|referrer|request[_-]?id|trace[_-]?id|session[_-]?duration)\\b"
45
+
46
+ - id: prompt_content_input
47
+ category: content_files
48
+ labels:
49
+ - prompt_input
50
+ capabilities:
51
+ - ai_inference
52
+ directionHint: outbound_to_third_party
53
+ patterns:
54
+ - "\\b(prompt|completion|embedding|chat\\.completions|generateContent|input_text|GoogleGenAI|@google/genai|@google/generative-ai|generativelanguage\\.googleapis\\.com)\\b"
55
+
56
+ - id: document_content_input
57
+ category: content_files
58
+ labels:
59
+ - content_input
60
+ capabilities:
61
+ - ai_inference
62
+ directionHint: outbound_to_third_party
63
+ patterns:
64
+ - "\\b(attachment|document|file_input|content_block|mime_type|file_name|file_size)\\b"
65
+
66
+ - id: storage_metadata
67
+ category: content_files
68
+ labels:
69
+ - file_content
70
+ capabilities:
71
+ - storage
72
+ directionHint: outbound_to_third_party
73
+ patterns:
74
+ - "\\b(storage\\.from|bucket|blob|putObject|getObject|uploadBytes|multipart|s3|gcs|object[_-]?key|storage[_-]?path|checksum)\\b"
75
+
76
+ - id: webhook_payload
77
+ category: usage_metadata
78
+ labels:
79
+ - webhook_payload
80
+ capabilities:
81
+ - webhook
82
+ directionHint: inbound_from_third_party
83
+ patterns:
84
+ - "\\b(webhook|callback|event[_-]?payload)\\b"
@@ -0,0 +1,115 @@
1
+ # PII signal rules consumed by `src/ai-enrichment/pii-signal-rules.ts`.
2
+ # Rule schema:
3
+ # - id: unique rule identifier
4
+ # - category: one of [identifiers, profile_data, credentials]
5
+ # - labels: canonical output labels emitted in thirdPartyDataFlow.dataShared
6
+ # - patterns: regex strings (compiled case-insensitive)
7
+ # Matching notes:
8
+ # - Rules are evaluated per source line.
9
+ # - A match still requires operation-context gating in the data-flow pass.
10
+ # - Prefer snake_case labels for consistency.
11
+ pii_signal_rules:
12
+ - id: first_name
13
+ category: profile_data
14
+ labels:
15
+ - first_name
16
+ patterns:
17
+ - "\\b(first[_-]?name|firstname|given[_-]?name|forename|f[_-]?name|fname)\\b"
18
+
19
+ - id: last_name
20
+ category: profile_data
21
+ labels:
22
+ - last_name
23
+ patterns:
24
+ - "\\b(last[_-]?name|lastname|family[_-]?name|surname|l[_-]?name|lname)\\b"
25
+
26
+ - id: full_name
27
+ category: profile_data
28
+ labels:
29
+ - full_name
30
+ patterns:
31
+ - "\\b(full[_-]?name|fullname|display[_-]?name|legal[_-]?name|person[_-]?name)\\b"
32
+
33
+ - id: date_of_birth
34
+ category: profile_data
35
+ labels:
36
+ - date_of_birth
37
+ patterns:
38
+ - "\\b(date[_-]?of[_-]?birth|dob|d\\.o\\.b|birth[_-]?date|birthdate|bday)\\b"
39
+
40
+ - id: phone_number
41
+ category: profile_data
42
+ labels:
43
+ - phone_number
44
+ patterns:
45
+ - "\\b(phone|phone[_-]?number|telephone|tel|mobile|mobile[_-]?number|cell|msisdn)\\b"
46
+
47
+ - id: address
48
+ category: profile_data
49
+ labels:
50
+ - address
51
+ patterns:
52
+ - "\\b(street[_-]?address|mailing[_-]?address|home[_-]?address|billing[_-]?address|shipping[_-]?address|postal[_-]?address|zip[_-]?code|postal[_-]?code|postcode)\\b"
53
+
54
+ - id: ssn
55
+ category: identifiers
56
+ labels:
57
+ - social_security_number
58
+ patterns:
59
+ - "\\b(ssn|social[_-]?security[_-]?number|socialsecuritynumber|nin|national[_-]?insurance[_-]?number)\\b"
60
+
61
+ - id: passport
62
+ category: identifiers
63
+ labels:
64
+ - passport_number
65
+ patterns:
66
+ - "\\b(passport[_-]?number|passport[_-]?no|pp[_-]?number|travel[_-]?document[_-]?number)\\b"
67
+
68
+ - id: national_id
69
+ category: identifiers
70
+ labels:
71
+ - national_id
72
+ patterns:
73
+ - "\\b(national[_-]?id|national[_-]?identifier|nid|id[_-]?number|government[_-]?id|gov[_-]?id)\\b"
74
+
75
+ - id: drivers_license
76
+ category: identifiers
77
+ labels:
78
+ - drivers_license_number
79
+ patterns:
80
+ - "\\b(driver['’]?s?[_-]?license|driverslicense|driving[_-]?license|driver[_-]?licence|dl[_-]?number|license[_-]?number|licence[_-]?number)\\b"
81
+
82
+ - id: tax_id
83
+ category: identifiers
84
+ labels:
85
+ - tax_identifier
86
+ patterns:
87
+ - "\\b(tax[_-]?id|taxid|tin|ein|vat[_-]?number|fiscal[_-]?code)\\b"
88
+
89
+ - id: account_number
90
+ category: identifiers
91
+ labels:
92
+ - account_number
93
+ patterns:
94
+ - "\\b(account[_-]?number|acct[_-]?number|iban|routing[_-]?number|sort[_-]?code|swift|bic)\\b"
95
+
96
+ - id: username
97
+ category: credentials
98
+ labels:
99
+ - username
100
+ patterns:
101
+ - "\\b(username|user[_-]?name|login|login[_-]?id|userid|user[_-]?id)\\b"
102
+
103
+ - id: email
104
+ category: credentials
105
+ labels:
106
+ - user_email
107
+ patterns:
108
+ - "\\b(email|email[_-]?address|mail)\\b"
109
+
110
+ - id: password
111
+ category: credentials
112
+ labels:
113
+ - user_password
114
+ patterns:
115
+ - "\\b(password|passwd|pass|pwd|passphrase|secret)\\b"
@@ -0,0 +1,431 @@
1
+ # Shared property-detection config: regexes and rules to set component properties from findings.
2
+ # Aligns with enhance-defaults.ts: only properties listed in DETECTABLE_PROPERTY_KEYS can be set here.
3
+ # Used by all language analyzers (TypeScript, Python, etc.).
4
+
5
+ regexes:
6
+ # Auth
7
+ mfa_strategy: "mfa|totp|webauthn|2fa|two[-_]?factor|authenticator|duo|okta"
8
+ sso_strategy: "saml|oidc|openid|sso|oauth"
9
+ # Env: cloud and region
10
+ env_cloud_aws: "^AWS_|AWS_REGION|AWS_ACCESS_KEY|AWS_SECRET"
11
+ env_cloud_gcp: "^GCP_|GOOGLE_CLOUD|GCLOUD"
12
+ env_cloud_azure: "^AZURE_|ARM_"
13
+ env_region: "^(AWS_REGION|GCP_REGION|AZURE_REGION|REGION|REGION_NAME|LOCATION|DATA_RESIDENCY)"
14
+ env_vendor_jurisdiction: "^(JURISDICTION|VENDOR_JURISDICTION|COUNTRY|REGION)"
15
+ # Env: encryption and keys
16
+ env_encryption: "^(ENCRYPTION_KEY|ENCRYPT_|SSL_KEY|CIPHER_|AES_|SECRET_KEY)"
17
+ env_connection_ssl: "^(DATABASE_URL|DB_|SSL|TLS|NODE_TLS|REJECT_UNAUTHORIZED)"
18
+ env_key_rotation: "^(KEY_ROTATION|ROTATION_PERIOD|KMS_ROTATION)"
19
+ env_backup: "^(BACKUP_|BACKUP_FREQUENCY|SNAPSHOT)"
20
+ # Env: IP / network
21
+ env_ip_allowlist: "^(ALLOWED_IPS|IP_WHITELIST|IP_ALLOWLIST|ALLOWED_ORIGINS)"
22
+ # Config
23
+ config_audit_logging: "^(audit|logging|log_level|winston|pino)"
24
+ config_retention: "^(retention|data_retention|retention_period|ttl)"
25
+ config_request_logging: "^(request_logging|request_log_level|http_log)"
26
+ config_backup: "^(backup|snapshot|replication)"
27
+ # Database / file content
28
+ database_ssl_content: "\\bssl\\s*:\\s*true|rejectUnauthorized|\\.ssl\\s*\\(|tls\\s*:|encrypt\\s*:\\s*true"
29
+ content_backup: "backup|snapshot|replication|point_in_time"
30
+ content_https: "https://|ssl:\\s*true|secure:\\s*true"
31
+ graphql_endpoint: "/graphql|\\bgraphql\\b"
32
+
33
+ # Env variable → cloud_provider value (order matters: first match wins)
34
+ cloud_provider_env:
35
+ - regex: env_cloud_aws
36
+ value: AWS
37
+ - regex: env_cloud_gcp
38
+ value: GCP
39
+ - regex: env_cloud_azure
40
+ value: Azure
41
+
42
+ # Known database/data-store names: when a component name matches (case-insensitive),
43
+ # use it for technology_stack (used by classifier/enhance).
44
+ known_database_names:
45
+ - postgres
46
+ - postgresql
47
+ - redis
48
+ - mysql
49
+ - mongodb
50
+ - elasticsearch
51
+ - supabase
52
+
53
+ # Enhancer rules (classifier/enhance.ts): subtypes and defaults per asset/third_party.
54
+ enhance:
55
+ # subTypes that qualify as "main application" (first one gets isMainApplication: true)
56
+ main_app_subtypes:
57
+ - application
58
+ - api
59
+ - service
60
+ # Default hosting_type for third_party when not set
61
+ default_third_party_hosting: saas
62
+ # Asset subTypes that imply cloud hosting
63
+ cloud_asset_subtypes:
64
+ - api
65
+ - service
66
+ - database
67
+ - cache
68
+ - container
69
+ - auth_service
70
+ - function
71
+ # Asset subTypes that imply on-premise hosting
72
+ on_prem_asset_subtypes:
73
+ - config
74
+ # supported_operations by asset subType (key = subType, value = list of operations)
75
+ supported_operations:
76
+ database:
77
+ - read
78
+ - write
79
+ - query
80
+ cache:
81
+ - read
82
+ - write
83
+ - query
84
+ api:
85
+ - read
86
+ - write
87
+ - query
88
+ - execute
89
+ service:
90
+ - read
91
+ - write
92
+ - query
93
+ - execute
94
+ application:
95
+ - read
96
+ - write
97
+ - query
98
+ - execute
99
+ auth_service:
100
+ - read
101
+ - write
102
+ - query
103
+ - execute
104
+ function:
105
+ - read
106
+ - write
107
+ - query
108
+ - execute
109
+ config:
110
+ - read
111
+
112
+ # ---------------------------------------------------------------------------
113
+ # Property inference rules
114
+ # ---------------------------------------------------------------------------
115
+ #
116
+ # These rules map RawFinding → component properties by patternId. The engine
117
+ # applies the rules in order and only relies on:
118
+ # - `regexes` defined above (by name)
119
+ # - input values derived from finding.properties and file content
120
+ # - assignments (constants, fromInput, lookup tables) declared here.
121
+
122
+ external_api_known_documentation_urls:
123
+ auth0: "https://auth0.com/docs"
124
+ stripe: "https://stripe.com/docs"
125
+ sendgrid: "https://docs.sendgrid.com"
126
+ twilio: "https://www.twilio.com/docs"
127
+ openai: "https://platform.openai.com/docs"
128
+ firebase: "https://firebase.google.com/docs"
129
+ aws: "https://docs.aws.amazon.com"
130
+ supabase: "https://supabase.com/docs"
131
+
132
+ external_api_known_package_names:
133
+ auth0: "@auth0/auth0-react"
134
+ stripe: "stripe"
135
+ sendgrid: "@sendgrid/mail"
136
+ twilio: "twilio"
137
+ openai: "openai"
138
+ firebase: "firebase"
139
+ supabase: "@supabase/supabase-js"
140
+
141
+ inference_rules:
142
+ auth_middleware:
143
+ # MFA/TOTP/WebAuthn strategies
144
+ - when:
145
+ anyOf:
146
+ - regex:
147
+ input: strategy
148
+ regex: mfa_strategy
149
+ - regex:
150
+ input: content
151
+ regex: mfa_strategy
152
+ set:
153
+ mfa_required: true
154
+ authentication_method: mfa
155
+
156
+ # SSO/OIDC/OAuth discovery
157
+ - when:
158
+ regex:
159
+ input: strategyStr
160
+ regex: sso_strategy
161
+ set:
162
+ sso_integration: true
163
+
164
+ # JWT fallback (only if MFA rule did not already set auth method)
165
+ - when:
166
+ allOf:
167
+ - notSet: authentication_method
168
+ - anyOf:
169
+ - equals:
170
+ input: library
171
+ value: jsonwebtoken
172
+ - equals:
173
+ input: strategy
174
+ value: jwt
175
+ set:
176
+ authentication_method: jwt
177
+
178
+ # OAuth2 fallback
179
+ - when:
180
+ allOf:
181
+ - notSet: authentication_method
182
+ - anyOf:
183
+ - equals:
184
+ input: strategy
185
+ value: oauth
186
+ - equals:
187
+ input: strategy
188
+ value: oauth2
189
+ set:
190
+ authentication_method: oauth_2_0
191
+
192
+ # Passport/Nest auth fallback
193
+ - when:
194
+ allOf:
195
+ - notSet: authentication_method
196
+ - anyOf:
197
+ - equals:
198
+ input: library
199
+ value: passport
200
+ - equals:
201
+ input: library
202
+ value: nestjs_auth
203
+ set:
204
+ authentication_method:
205
+ preferInputOrConstant:
206
+ input: strategy
207
+ fallback: session
208
+
209
+ # Audit logging is enabled when we can tie the finding to a library/strategy.
210
+ - when:
211
+ anyOf:
212
+ - exists: library
213
+ - exists: strategy
214
+ set:
215
+ audit_logging_enabled: true
216
+
217
+ env_variable:
218
+ # Cloud provider first-match wins
219
+ - when:
220
+ allOf:
221
+ - notSet: cloud_provider
222
+ - regex:
223
+ input: key
224
+ regex: env_cloud_aws
225
+ set:
226
+ cloud_provider: AWS
227
+ - when:
228
+ allOf:
229
+ - notSet: cloud_provider
230
+ - regex:
231
+ input: key
232
+ regex: env_cloud_gcp
233
+ set:
234
+ cloud_provider: GCP
235
+ - when:
236
+ allOf:
237
+ - notSet: cloud_provider
238
+ - regex:
239
+ input: key
240
+ regex: env_cloud_azure
241
+ set:
242
+ cloud_provider: Azure
243
+
244
+ - when:
245
+ regex:
246
+ input: key
247
+ regex: env_region
248
+ set:
249
+ region_location: detected
250
+ - when:
251
+ regex:
252
+ input: key
253
+ regex: env_vendor_jurisdiction
254
+ set:
255
+ vendor_jurisdiction: detected
256
+ - when:
257
+ regex:
258
+ input: key
259
+ regex: env_encryption
260
+ set:
261
+ encrypt_at_rest: aes_256
262
+ - when:
263
+ regex:
264
+ input: key
265
+ regex: env_connection_ssl
266
+ set:
267
+ connection_encryption: true
268
+ - when:
269
+ regex:
270
+ input: key
271
+ regex: env_key_rotation
272
+ set:
273
+ key_rotation_period: detected
274
+ - when:
275
+ regex:
276
+ input: key
277
+ regex: env_backup
278
+ set:
279
+ backup_frequency: detected
280
+ backup_encryption: true
281
+ - when:
282
+ regex:
283
+ input: key
284
+ regex: env_ip_allowlist
285
+ set:
286
+ ip_allowlisting: true
287
+
288
+ config_file:
289
+ - when:
290
+ regex:
291
+ input: key
292
+ regex: config_audit_logging
293
+ set:
294
+ audit_logging_enabled: true
295
+ - when:
296
+ regex:
297
+ input: key
298
+ regex: config_retention
299
+ set:
300
+ data_retention_period_days: 0
301
+ - when:
302
+ regex:
303
+ input: key
304
+ regex: config_request_logging
305
+ set:
306
+ request_logging_level: detected
307
+ - when:
308
+ regex:
309
+ input: key
310
+ regex: config_backup
311
+ set:
312
+ backup_frequency: detected
313
+ backup_encryption: true
314
+
315
+ database_connection:
316
+ - when:
317
+ regex:
318
+ input: content
319
+ regex: database_ssl_content
320
+ set:
321
+ connection_encryption: true
322
+ - when:
323
+ regex:
324
+ input: content
325
+ regex: content_backup
326
+ set:
327
+ backup_frequency: detected
328
+ backup_encryption: true
329
+ - when:
330
+ always: true
331
+ set:
332
+ audit_logging_enabled: true
333
+
334
+ external_api_call:
335
+ - when:
336
+ regex:
337
+ input: url
338
+ regex: graphql_endpoint
339
+ set:
340
+ integration_method: api
341
+ authentication_method: api_key
342
+ integration_status: active
343
+ api_type: graphql
344
+ sdk_available: true
345
+
346
+ - when:
347
+ allOf:
348
+ - exists: serviceName
349
+ - not:
350
+ regex:
351
+ input: url
352
+ regex: graphql_endpoint
353
+ set:
354
+ integration_method: api
355
+ authentication_method: api_key
356
+ integration_status: active
357
+ api_type: rest
358
+ sdk_available: true
359
+ code_reference_package:
360
+ lookup:
361
+ map: external_api_known_package_names
362
+ keyInput: serviceName
363
+ transform: lowercase
364
+ onMissing: skip
365
+
366
+ - when:
367
+ exists: documentationUrl
368
+ set:
369
+ documentation_url:
370
+ fromInput: documentationUrl
371
+
372
+ - when:
373
+ exists: apiVersion
374
+ set:
375
+ api_version:
376
+ fromInput: apiVersion
377
+
378
+ - when:
379
+ exists: url
380
+ set:
381
+ service_url_api_endpoint:
382
+ fromInput: url
383
+
384
+ - when:
385
+ allOf:
386
+ - notSet: documentation_url
387
+ - exists: serviceName
388
+ set:
389
+ documentation_url:
390
+ lookup:
391
+ map: external_api_known_documentation_urls
392
+ keyInput: serviceName
393
+ transform: lowercase
394
+ onMissing: skip
395
+
396
+ - when:
397
+ always: true
398
+ set:
399
+ https_enforced: true
400
+
401
+ express_route:
402
+ - when:
403
+ regex:
404
+ input: path
405
+ regex: graphql_endpoint
406
+ set:
407
+ request_validation: true
408
+ connection_encryption: true
409
+ api_type: graphql
410
+ https_enforced: true
411
+
412
+ - when:
413
+ allOf:
414
+ - anyOf:
415
+ - exists: httpMethods
416
+ - exists: path
417
+ - not:
418
+ regex:
419
+ input: path
420
+ regex: graphql_endpoint
421
+ set:
422
+ request_validation: true
423
+ connection_encryption: true
424
+ api_type: rest
425
+ https_enforced: true
426
+ - when:
427
+ regex:
428
+ input: content
429
+ regex: content_https
430
+ set:
431
+ https_enforced: true