@dataparade/cli 0.0.34 → 0.0.35

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/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dataparade/cli",
3
- "version": "0.0.34",
3
+ "version": "0.0.35",
4
4
  "description": "dataPARADE CLI — scan codebases for privacy and security data flows",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -67,7 +67,7 @@
67
67
  "zod": "^4.3.5"
68
68
  },
69
69
  "devDependencies": {
70
- "@dataparade/scanner": "github:DataParade-io/scanner#175f7366ab54b8bf8c56998a21198d9aaa6858e0",
70
+ "@dataparade/scanner": "github:DataParade-io/scanner#08acc5536bf5b2b0532ee4f4e306798c4774138b",
71
71
  "@eslint/js": "^9.18.0",
72
72
  "@types/jest": "^30.0.0",
73
73
  "@types/node": "^22.0.0",
@@ -503,6 +503,12 @@ function classifyRawFindings(rawFindings, options) {
503
503
  })) {
504
504
  continue;
505
505
  }
506
+ // Outbound calls whose host is unknown name no destination: a generic "Outbound Http Call"
507
+ // node says nothing and wrongly becomes the hub for the application's flows.
508
+ if (group.findings.length > 0 &&
509
+ group.findings.every(isUnknownDestinationCall)) {
510
+ continue;
511
+ }
506
512
  const confidence = aggregateConfidence(group.findings, config.resolution.confidenceAggregation);
507
513
  const detectedFrom = buildDetectedFromRefs(group.findings);
508
514
  const allLocations = group.findings.map((f) => f.location);
@@ -565,3 +571,17 @@ function classifyRawFindings(rawFindings, options) {
565
571
  });
566
572
  return components;
567
573
  }
574
+ /** An outbound HTTP call with no known host, service name or literal URL. */
575
+ function isUnknownDestinationCall(finding) {
576
+ const props = finding.properties ?? {};
577
+ if (props.destination !== "unknown")
578
+ return false;
579
+ if (typeof props.serviceName === "string" && props.serviceName.trim())
580
+ return false;
581
+ if (typeof props.url === "string" && props.url.trim())
582
+ return false;
583
+ // A TS call whose host comes from one env var is named after it: that name is still useful.
584
+ if (typeof props.envVar === "string" && props.envVar.trim())
585
+ return false;
586
+ return true;
587
+ }
@@ -107,6 +107,7 @@ function detectPythonAuthFromConfig(ctx, config) {
107
107
  });
108
108
  }
109
109
  }
110
+ const contentLines = content.split(/\r?\n/);
110
111
  const outgoing = authConfig.libraries.some((lib) => lib.outgoingHeader)
111
112
  ? new Set(outboundHttpFor(ctx, config).outgoingRequestLines)
112
113
  : new Set();
@@ -115,7 +116,7 @@ function detectPythonAuthFromConfig(ctx, config) {
115
116
  let contentLocations = (0, helpers_1.locationsForContentRegexes)(ctx.file, content, lib.contentRegexes);
116
117
  if (lib.outgoingHeader) {
117
118
  const before = contentLocations.length;
118
- contentLocations = contentLocations.filter((loc) => !outgoing.has(loc.startLine));
119
+ contentLocations = contentLocations.filter((loc) => !outgoing.has(loc.startLine) && !isOutgoingHeaderDictLine(contentLines[loc.startLine - 1]));
119
120
  // Every match is a header sent on an outbound request: nothing to report.
120
121
  if (before > 0 && contentLocations.length === 0 && importLocations.length === 0)
121
122
  continue;
@@ -567,3 +568,12 @@ function detectPythonServerlessHandlersFromConfig(ctx, config) {
567
568
  }
568
569
  return findings;
569
570
  }
571
+ /**
572
+ * A line that builds an `Authorization` header to send (`{"Authorization": f"Bearer {token}"}`)
573
+ * rather than reading one from a request. The header dict is often built away from the
574
+ * request call (a `_headers()` helper or a module constant), so the request line alone
575
+ * does not show it is outbound.
576
+ */
577
+ function isOutgoingHeaderDictLine(line) {
578
+ return line !== undefined && /["']Authorization["']\s*:/.test(line);
579
+ }
@@ -4,6 +4,6 @@
4
4
  "license": "Apache-2.0",
5
5
  "description": "Vendored build of @dataparade/scanner bundled into @dataparade/cli",
6
6
  "main": "dist/src/index.js",
7
- "gitHead": "175f7366ab54b8bf8c56998a21198d9aaa6858e0",
8
- "catalogHash": "sha256:409e000237d3d332"
7
+ "gitHead": "08acc5536bf5b2b0532ee4f4e306798c4774138b",
8
+ "catalogHash": "sha256:6e2a57b52ac0116f"
9
9
  }
@@ -192,11 +192,11 @@ auth:
192
192
 
193
193
  - id: oauth2
194
194
  patternId: auth_middleware
195
+ # google.oauth2 and google_auth_oauthlib are client credentials for calling Google
196
+ # APIs, not an auth service in this application.
195
197
  importModules:
196
198
  - oauthlib
197
199
  - authlib
198
- - google.oauth2
199
- - google_auth_oauthlib
200
200
  strategy: oauth2
201
201
  confidence: 0.85
202
202
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dataparade/cli",
3
- "version": "0.0.34",
3
+ "version": "0.0.35",
4
4
  "description": "dataPARADE CLI — scan codebases for privacy and security data flows",
5
5
  "publishConfig": {
6
6
  "access": "public",
@@ -67,7 +67,7 @@
67
67
  "zod": "^4.3.5"
68
68
  },
69
69
  "devDependencies": {
70
- "@dataparade/scanner": "github:DataParade-io/scanner#175f7366ab54b8bf8c56998a21198d9aaa6858e0",
70
+ "@dataparade/scanner": "github:DataParade-io/scanner#08acc5536bf5b2b0532ee4f4e306798c4774138b",
71
71
  "@eslint/js": "^9.18.0",
72
72
  "@types/jest": "^30.0.0",
73
73
  "@types/node": "^22.0.0",