@cdxgen/cdxgen 13.4.0 → 13.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. package/README.md +7 -7
  2. package/bin/cdxgen-secure.js +15 -0
  3. package/bin/cdxgen.js +25 -5
  4. package/bin/evinse.js +5 -0
  5. package/bin/hbom.js +15 -7
  6. package/bin/repl.js +29 -0
  7. package/data/cbomosdb-queries.json +13 -1
  8. package/data/component-tags.json +8 -0
  9. package/data/queries-darwin.json +25 -1
  10. package/data/queries-win.json +19 -1
  11. package/data/queries.json +41 -0
  12. package/data/remediations.json +283 -1
  13. package/data/rules/cbom-security.yaml +235 -4
  14. package/data/rules/go-binaries.yaml +46 -0
  15. package/data/rules/golem-go.yaml +80 -0
  16. package/data/rules/hbom-compliance.yaml +40 -22
  17. package/data/rules/hbom-performance.yaml +7 -1
  18. package/data/rules/host-topology.yaml +1 -1
  19. package/data/rules/obom-runtime.yaml +31 -2
  20. package/data/rules/php-runtime.yaml +143 -0
  21. package/lib/audit/index.js +14 -0
  22. package/lib/cli/bomAssembly.js +28 -3
  23. package/lib/cli/cliOptions.js +110 -3
  24. package/lib/cli/index.js +73 -4
  25. package/lib/cli/jvmBom.js +126 -20
  26. package/lib/cli/managedBom.js +711 -71
  27. package/lib/cli/nativeBom.js +225 -28
  28. package/lib/core/env.js +30 -8
  29. package/lib/core/fs.js +28 -19
  30. package/lib/core/httpClient.js +74 -45
  31. package/lib/core/projectConfig.js +1 -0
  32. package/lib/core/projectTooling.js +97 -0
  33. package/lib/core/propertySanitizer.js +72 -0
  34. package/lib/ecosystems/golem.js +550 -6
  35. package/lib/ecosystems/gradleutils.js +30 -20
  36. package/lib/ecosystems/parsers-dotnet.js +117 -18
  37. package/lib/ecosystems/parsers-go.js +1090 -367
  38. package/lib/ecosystems/parsers-jvm.js +259 -17
  39. package/lib/ecosystems/parsers-misc.js +229 -44
  40. package/lib/ecosystems/parsers-python.js +11 -10
  41. package/lib/ecosystems/rubyutils.js +6 -3
  42. package/lib/ecosystems/rusi.js +10 -0
  43. package/lib/ecosystems/scalacliutils.js +2 -1
  44. package/lib/ecosystems/scalasem.js +3 -1
  45. package/lib/evinser/evinser.js +126 -18
  46. package/lib/evinser/swiftsem.js +68 -5
  47. package/lib/inventory/agentSkillSpec.js +17 -0
  48. package/lib/inventory/apkInstalledDb.js +243 -0
  49. package/lib/inventory/atomUtils.js +33 -0
  50. package/lib/inventory/auditCategories.js +3 -3
  51. package/lib/inventory/cacheDir.js +52 -9
  52. package/lib/inventory/certificates.js +2371 -0
  53. package/lib/inventory/communityAiConfigParser.js +4 -9
  54. package/lib/inventory/deps.js +6 -4
  55. package/lib/inventory/display.js +200 -3
  56. package/lib/inventory/dosai.js +500 -58
  57. package/lib/inventory/dynamic.js +45 -3
  58. package/lib/inventory/envcontext.js +168 -5
  59. package/lib/inventory/evidenceUtils.js +436 -23
  60. package/lib/inventory/formulationParsers.js +3 -2
  61. package/lib/inventory/goBuildInfo.js +140 -0
  62. package/lib/inventory/hbom.js +67 -7
  63. package/lib/inventory/hbomAnalysis.js +16 -0
  64. package/lib/inventory/hostTopology.js +21 -0
  65. package/lib/inventory/osPackagePurl.js +244 -0
  66. package/lib/inventory/osPackageResolver.js +89 -87
  67. package/lib/inventory/osinfo.js +79 -31
  68. package/lib/inventory/osqueryTransform.js +114 -5
  69. package/lib/inventory/phpBuildInfo.js +487 -0
  70. package/lib/inventory/phpHostProbe.js +641 -0
  71. package/lib/inventory/rootfsCerts.js +426 -0
  72. package/lib/inventory/source.js +207 -3
  73. package/lib/inventory/spdx.js +144 -0
  74. package/lib/inventory/traceRunner.js +5 -1
  75. package/lib/inventory/tracedCrypto.js +129 -0
  76. package/lib/managers/binary.js +529 -183
  77. package/lib/managers/docker.js +166 -12
  78. package/lib/parsers/email.js +277 -0
  79. package/lib/parsers/largeJson.js +34 -2
  80. package/lib/server/server.js +186 -1
  81. package/lib/stages/postgen/annotator.js +17 -1
  82. package/lib/stages/postgen/introspection/reflect.js +4 -1
  83. package/lib/stages/postgen/postgen.js +5 -5
  84. package/lib/stages/postgen/ruleEngine.js +58 -1
  85. package/lib/stages/postgen/specVersionCompat.js +30 -0
  86. package/lib/stages/pregen/pregen.js +117 -5
  87. package/lib/validator/bomValidator.js +26 -5
  88. package/lib/validator/generated/runtime.mjs +13 -0
  89. package/lib/validator/generated/validate-1.6.mjs +26 -7
  90. package/lib/validator/generated/validate-1.7.mjs +31 -12
  91. package/lib/validator/generated/validate-2.0.mjs +30 -11
  92. package/package.json +17 -17
  93. package/types/bin/cdxgen-secure.d.ts +3 -0
  94. package/types/bin/cdxgen-secure.d.ts.map +1 -0
  95. package/types/bin/repl.d.ts.map +1 -1
  96. package/types/lib/audit/index.d.ts.map +1 -1
  97. package/types/lib/cli/bomAssembly.d.ts +9 -2
  98. package/types/lib/cli/bomAssembly.d.ts.map +1 -1
  99. package/types/lib/cli/cliOptions.d.ts +43 -0
  100. package/types/lib/cli/cliOptions.d.ts.map +1 -1
  101. package/types/lib/cli/index.d.ts.map +1 -1
  102. package/types/lib/cli/jvmBom.d.ts +20 -0
  103. package/types/lib/cli/jvmBom.d.ts.map +1 -1
  104. package/types/lib/cli/managedBom.d.ts.map +1 -1
  105. package/types/lib/cli/nativeBom.d.ts.map +1 -1
  106. package/types/lib/core/env.d.ts +18 -2
  107. package/types/lib/core/env.d.ts.map +1 -1
  108. package/types/lib/core/fs.d.ts.map +1 -1
  109. package/types/lib/core/httpClient.d.ts.map +1 -1
  110. package/types/lib/core/projectConfig.d.ts.map +1 -1
  111. package/types/lib/core/projectTooling.d.ts +41 -0
  112. package/types/lib/core/projectTooling.d.ts.map +1 -0
  113. package/types/lib/core/propertySanitizer.d.ts +26 -0
  114. package/types/lib/core/propertySanitizer.d.ts.map +1 -1
  115. package/types/lib/ecosystems/cppEvidence.d.ts +1 -1
  116. package/types/lib/ecosystems/golem.d.ts +81 -1
  117. package/types/lib/ecosystems/golem.d.ts.map +1 -1
  118. package/types/lib/ecosystems/gradleutils.d.ts +10 -8
  119. package/types/lib/ecosystems/gradleutils.d.ts.map +1 -1
  120. package/types/lib/ecosystems/parsers-dotnet.d.ts +40 -4
  121. package/types/lib/ecosystems/parsers-dotnet.d.ts.map +1 -1
  122. package/types/lib/ecosystems/parsers-go.d.ts +85 -13
  123. package/types/lib/ecosystems/parsers-go.d.ts.map +1 -1
  124. package/types/lib/ecosystems/parsers-jvm.d.ts +28 -2
  125. package/types/lib/ecosystems/parsers-jvm.d.ts.map +1 -1
  126. package/types/lib/ecosystems/parsers-misc.d.ts +18 -58
  127. package/types/lib/ecosystems/parsers-misc.d.ts.map +1 -1
  128. package/types/lib/ecosystems/parsers-python.d.ts +4 -3
  129. package/types/lib/ecosystems/parsers-python.d.ts.map +1 -1
  130. package/types/lib/ecosystems/pythonutils.d.ts +1 -1
  131. package/types/lib/ecosystems/rubyutils.d.ts.map +1 -1
  132. package/types/lib/ecosystems/rusi.d.ts.map +1 -1
  133. package/types/lib/ecosystems/scalacliutils.d.ts.map +1 -1
  134. package/types/lib/ecosystems/scalasem.d.ts.map +1 -1
  135. package/types/lib/evinser/evinser.d.ts +25 -0
  136. package/types/lib/evinser/evinser.d.ts.map +1 -1
  137. package/types/lib/evinser/swiftsem.d.ts +10 -0
  138. package/types/lib/evinser/swiftsem.d.ts.map +1 -1
  139. package/types/lib/inventory/agentSkillSpec.d.ts +13 -0
  140. package/types/lib/inventory/agentSkillSpec.d.ts.map +1 -0
  141. package/types/lib/inventory/apkInstalledDb.d.ts +42 -0
  142. package/types/lib/inventory/apkInstalledDb.d.ts.map +1 -0
  143. package/types/lib/inventory/atomUtils.d.ts +14 -0
  144. package/types/lib/inventory/atomUtils.d.ts.map +1 -1
  145. package/types/lib/inventory/cacheDir.d.ts +12 -4
  146. package/types/lib/inventory/cacheDir.d.ts.map +1 -1
  147. package/types/lib/inventory/certificates.d.ts +205 -0
  148. package/types/lib/inventory/certificates.d.ts.map +1 -0
  149. package/types/lib/inventory/communityAiConfigParser.d.ts.map +1 -1
  150. package/types/lib/inventory/deps.d.ts +2 -1
  151. package/types/lib/inventory/deps.d.ts.map +1 -1
  152. package/types/lib/inventory/display.d.ts +18 -0
  153. package/types/lib/inventory/display.d.ts.map +1 -1
  154. package/types/lib/inventory/dosai.d.ts +145 -6
  155. package/types/lib/inventory/dosai.d.ts.map +1 -1
  156. package/types/lib/inventory/dynamic.d.ts +6 -1
  157. package/types/lib/inventory/dynamic.d.ts.map +1 -1
  158. package/types/lib/inventory/envcontext.d.ts +40 -2
  159. package/types/lib/inventory/envcontext.d.ts.map +1 -1
  160. package/types/lib/inventory/evidenceUtils.d.ts +29 -10
  161. package/types/lib/inventory/evidenceUtils.d.ts.map +1 -1
  162. package/types/lib/inventory/formulationParsers.d.ts.map +1 -1
  163. package/types/lib/inventory/goBuildInfo.d.ts +10 -0
  164. package/types/lib/inventory/goBuildInfo.d.ts.map +1 -0
  165. package/types/lib/inventory/hbom.d.ts.map +1 -1
  166. package/types/lib/inventory/hbomAnalysis.d.ts +10 -0
  167. package/types/lib/inventory/hbomAnalysis.d.ts.map +1 -1
  168. package/types/lib/inventory/hostTopology.d.ts.map +1 -1
  169. package/types/lib/inventory/osPackagePurl.d.ts +99 -0
  170. package/types/lib/inventory/osPackagePurl.d.ts.map +1 -0
  171. package/types/lib/inventory/osPackageResolver.d.ts +6 -2
  172. package/types/lib/inventory/osPackageResolver.d.ts.map +1 -1
  173. package/types/lib/inventory/osinfo.d.ts +31 -6
  174. package/types/lib/inventory/osinfo.d.ts.map +1 -1
  175. package/types/lib/inventory/osqueryTransform.d.ts +51 -0
  176. package/types/lib/inventory/osqueryTransform.d.ts.map +1 -1
  177. package/types/lib/inventory/phpBuildInfo.d.ts +142 -0
  178. package/types/lib/inventory/phpBuildInfo.d.ts.map +1 -0
  179. package/types/lib/inventory/phpHostProbe.d.ts +35 -0
  180. package/types/lib/inventory/phpHostProbe.d.ts.map +1 -0
  181. package/types/lib/inventory/rootfsCerts.d.ts +27 -0
  182. package/types/lib/inventory/rootfsCerts.d.ts.map +1 -0
  183. package/types/lib/inventory/source.d.ts +28 -0
  184. package/types/lib/inventory/source.d.ts.map +1 -1
  185. package/types/lib/inventory/spdx.d.ts +15 -0
  186. package/types/lib/inventory/spdx.d.ts.map +1 -1
  187. package/types/lib/inventory/traceRunner.d.ts +4 -1
  188. package/types/lib/inventory/traceRunner.d.ts.map +1 -1
  189. package/types/lib/inventory/tracedCrypto.d.ts +22 -0
  190. package/types/lib/inventory/tracedCrypto.d.ts.map +1 -1
  191. package/types/lib/managers/binary.d.ts +10 -0
  192. package/types/lib/managers/binary.d.ts.map +1 -1
  193. package/types/lib/managers/docker.d.ts +12 -0
  194. package/types/lib/managers/docker.d.ts.map +1 -1
  195. package/types/lib/parsers/email.d.ts +19 -0
  196. package/types/lib/parsers/email.d.ts.map +1 -0
  197. package/types/lib/parsers/largeJson.d.ts +13 -0
  198. package/types/lib/parsers/largeJson.d.ts.map +1 -1
  199. package/types/lib/server/server.d.ts +8 -0
  200. package/types/lib/server/server.d.ts.map +1 -1
  201. package/types/lib/stages/postgen/annotator.d.ts.map +1 -1
  202. package/types/lib/stages/postgen/introspection/reflect.d.ts.map +1 -1
  203. package/types/lib/stages/postgen/ruleEngine.d.ts +7 -4
  204. package/types/lib/stages/postgen/ruleEngine.d.ts.map +1 -1
  205. package/types/lib/stages/postgen/specVersionCompat.d.ts.map +1 -1
  206. package/types/lib/stages/pregen/pregen.d.ts +14 -1
  207. package/types/lib/stages/pregen/pregen.d.ts.map +1 -1
  208. package/types/lib/validator/bomValidator.d.ts.map +1 -1
@@ -46,14 +46,34 @@ export declare const OS_DISTRO_ALIAS: {
46
46
  "ubuntu-24.10": string;
47
47
  "ubuntu-25.04": string;
48
48
  "ubuntu-25.10": string;
49
+ "ubuntu-26.04": string;
50
+ "ubuntu-26.10": string;
49
51
  "debian-15": string;
50
52
  "debian-14": string;
51
53
  "debian-14.5": string;
52
54
  "debian-13": string;
55
+ "debian-13.7": string;
56
+ "debian-13.6": string;
53
57
  "debian-13.5": string;
58
+ "debian-13.4": string;
59
+ "debian-13.3": string;
60
+ "debian-13.2": string;
61
+ "debian-13.1": string;
54
62
  "debian-12": string;
55
- "debian-12.5": string;
63
+ "debian-12.15": string;
64
+ "debian-12.14": string;
65
+ "debian-12.13": string;
66
+ "debian-12.12": string;
67
+ "debian-12.11": string;
68
+ "debian-12.10": string;
69
+ "debian-12.9": string;
70
+ "debian-12.8": string;
71
+ "debian-12.7": string;
56
72
  "debian-12.6": string;
73
+ "debian-12.5": string;
74
+ "debian-12.4": string;
75
+ "debian-12.2": string;
76
+ "debian-12.1": string;
57
77
  "debian-11": string;
58
78
  "debian-11.5": string;
59
79
  "debian-10": string;
@@ -179,15 +199,20 @@ export declare function _resetOsReleaseCache(): void;
179
199
  * Derive structured distro information from an os-release file.
180
200
  *
181
201
  * Returns an object with:
182
- * - purlType {string} "deb" | "apk" | "rpm"
202
+ * - purlType {string} "deb" | "apk" | "rpm" | "alpm" (Arch and the
203
+ * distros built on it)
183
204
  * - namespace {string} canonical purl namespace (e.g. "ubuntu", "alpine",
184
205
  * "azure-linux" for both Azure Linux and CBL-Mariner)
185
206
  * - distroId {string} ID + "-" + VERSION_ID with a canonical vendor
186
- * prefix (e.g. "ubuntu-22.04", "azure-linux-3.0")
187
- * - distroName {string} codename/alias (e.g. "jammy")
207
+ * prefix (e.g. "ubuntu-22.04", "azure-linux-3.0",
208
+ * "alpine-3.24.3")
209
+ * - distroName {string} release codename, or a token OS_DISTRO_ALIAS knows
210
+ * (e.g. "jammy", "rhel", "alpine-3.24"); empty when
211
+ * the distro has neither
188
212
  *
189
- * Mirrors the logic in lib/managers/binary.js getOSPackages() so that both
190
- * callers share a single implementation.
213
+ * lib/managers/binary.js getOSPackages() reads its distro from here, so a
214
+ * container scan and an OBOM run on the same system give a package the same
215
+ * `distro` and `distro_name` qualifiers.
191
216
  *
192
217
  * @param {string} [root="/"] - Filesystem root to look for os-release.
193
218
  * @returns {{ purlType: string, namespace: string, distroId: string, distroName: string }}
@@ -1 +1 @@
1
- {"version":3,"file":"osinfo.d.ts","sourceRoot":"","sources":["../../../lib/inventory/osinfo.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,eAAe;IAC1B,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,WAAW;IACX,WAAW;IACX,aAAa;IACb,WAAW;IACX,aAAa;IACb,WAAW;IACX,aAAa;IACb,aAAa;IACb,WAAW;IACX,aAAa;IACb,WAAW;IACX,aAAa;IACb,UAAU;IACV,YAAY;IACZ,UAAU;IACV,YAAY;IACZ,UAAU;IACV,YAAY;IACZ,UAAU;IACV,UAAU;IACV,UAAU;IACV,YAAY;IACZ,UAAU;IACV,YAAY;IACZ,YAAY;IACZ,UAAU;IACV,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,0BAA0B;IAC1B,4BAA4B;IAC5B,4BAA4B;IAC5B,4BAA4B;IAC5B,4BAA4B;IAC5B,6BAA6B;CAC9B,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,kBAAkB;IAC7B,IAAI;IACJ,WAAW;IACX,IAAI;IACJ,UAAU;IACV,aAAa;IACb,OAAO;IACP,EAAE;IACF,eAAe;IACf,qBAAqB;IACrB,IAAI;IACJ,aAAa;CACd,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,yBAAyB;IACpC,IAAI;IACJ,WAAW;IACX,IAAI;IACJ,UAAU;IACV,aAAa;IACb,OAAO;IACP,EAAE;IACF,IAAI;IACJ,aAAa;CACd,CAAC;AASF;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,SAAS,EAHrC,MAGqC,GAFnC,OAAO,CAInB;AAMD;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CAAC,SAAS,EAHvC,MAGuC,GAFrC,MAAM,CAYlB;AAQD;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,IAAI,AAJ/B,CAEA,EAFQ,MAI6B,GAF3B,MAAM,CAqClB;AAGD;;GAEG;AACH,wBAAgB,oBAAoB,SAEnC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,aAAa,CAAC,IAAI,AAH/B,CACA,EADQ,MAG6B,GAF3B;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAkHzF"}
1
+ {"version":3,"file":"osinfo.d.ts","sourceRoot":"","sources":["../../../lib/inventory/osinfo.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,eAAe;IAC1B,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,aAAa;IACb,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;IACd,cAAc;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,wBAAgB,wBAAwB,CAAC,SAAS,EAHvC,MAGuC,GAFrC,MAAM,CAYlB;AAQD;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,IAAI,AAJ/B,CAEA,EAFQ,MAI6B,GAF3B,MAAM,CAqClB;AAGD;;GAEG;AACH,wBAAgB,oBAAoB,SAEnC;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,aAAa,CAAC,IAAI,AAH/B,CACA,EADQ,MAG6B,GAF3B;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAyIzF"}
@@ -81,4 +81,55 @@ export declare function shouldCreateOsQueryPurl(componentType: string): boolean;
81
81
  * @returns {string|null} Canonical purl string, or `null` when the parts do not form a valid purl
82
82
  */
83
83
  export declare function createOsQueryPurl(purlType: string, group: string | null, name: string, version: string, qualifiers: Object | null, subpath: string | null): string | null;
84
+ /**
85
+ * The version and purl of a row from an OS package table: `deb_packages`,
86
+ * `rpm_packages`, `pacman_packages`, `homebrew_packages`, `macports_packages`,
87
+ * `snap_packages`, `flatpak_packages` or the rows of the apk database.
88
+ *
89
+ * Such a row is named the way the package manager's own scan names it: deb,
90
+ * rpm and apk with the vendor and the `arch`, `distro`, `distro_name` and
91
+ * `epoch` qualifiers of the container scan, an rpm version joined to its
92
+ * release, a MacPorts version joined to its revision, a flatpak by its
93
+ * application ID with the `arch` and `branch` of its ref. A row's `path`,
94
+ * `admindir` or source file is not a path inside the package, so none of them
95
+ * becomes a subpath.
96
+ *
97
+ * @param {string} purlType One of OS_PACKAGE_PURL_TYPES
98
+ * @param {Object} res osquery row
99
+ * @param {string} name Component name derived from the row
100
+ * @param {Object} [distro] What getDistroInfo() reports; the host's by default
101
+ * @returns {{version: string, purl: string|null}} The component version and the purl, which is null when the row cannot be expressed as one
102
+ */
103
+ export declare function createOsQueryPackageIdentity(purlType: string, res: Object, name: string, distro?: Object): {
104
+ version: string;
105
+ purl: string | null;
106
+ };
107
+ /**
108
+ * The columns of an OS package row that give its licence and its home page.
109
+ * They become the component's `licenses` and a `website` reference rather than
110
+ * properties. `separator` splits a licence column that lists several: pacman
111
+ * keeps one licence per entry, which osquery joins with commas.
112
+ */
113
+ export declare const OS_PACKAGE_LICENSE_COLUMNS: {
114
+ alpm: {
115
+ license: string;
116
+ separator: string;
117
+ website: string;
118
+ };
119
+ snap: {
120
+ license: string;
121
+ };
122
+ flatpak: {
123
+ license: string;
124
+ website: string;
125
+ };
126
+ };
127
+ /**
128
+ * The property name an OS package table column is emitted under.
129
+ *
130
+ * @param {string|undefined} purlType Purl type of the table
131
+ * @param {string} column Column name
132
+ * @returns {string|undefined} The property name, or undefined when the column is not emitted
133
+ */
134
+ export declare function osPackagePropertyName(purlType: string | undefined, column: string): string | undefined;
84
135
  //# sourceMappingURL=osqueryTransform.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"osqueryTransform.d.ts","sourceRoot":"","sources":["../../../lib/inventory/osqueryTransform.js"],"names":[],"mappings":"AAGA;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAH7B,MAG6B,GAF3B,MAAM,GAAC,SAAS,CAa5B;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAL1B,MAK0B,EAAE,YAAY,EAJxC,OAIwC,EAAE,SAAS,EAHnD,MAGmD,GAFjD,MAAM,GAAC,SAAS,CAkB5B;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAH/B,MAG+B,GAF7B,MAAM,CAWlB;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAHjC,MAGiC,GAF/B,MAAM,CAelB;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAHlC,MAGkC,GAFhC,MAAM,CAQlB;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAJrC,MAIqC,EAAE,QAAQ,AAHvD,CACA,EADQ,MAG2D,GAFzD,MAAM,CAWlB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,2BAA2B,CACzC,aAAa,EATJ,MASI,EACb,aAAa,EATJ,MASI,EACb,IAAI,EATK,MAAM,GAAC,SASZ,EACJ,OAAO,EATE,MAAM,GAAC,SAST,EACP,aAAa,EATJ,MAAM,GAAC,SASH,EACb,aAAa,EATJ,MAAM,GAAC,SASH,GARF,MAAM,CA8BlB;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,aAAa,EAH1C,MAG0C,GAFxC,OAAO,CAMnB;AAaD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EATC,MASD,EACR,KAAK,EATI,MAAM,GAAC,IASX,EACL,IAAI,EATK,MASL,EACJ,OAAO,EATE,MASF,EACP,UAAU,EATD,MAAM,GAAC,IASN,EACV,OAAO,EATE,MAAM,GAAC,IAST,GARI,MAAM,GAAC,IAAI,CAuCvB"}
1
+ {"version":3,"file":"osqueryTransform.d.ts","sourceRoot":"","sources":["../../../lib/inventory/osqueryTransform.js"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAH7B,MAG6B,GAF3B,MAAM,GAAC,SAAS,CAa5B;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAL1B,MAK0B,EAAE,YAAY,EAJxC,OAIwC,EAAE,SAAS,EAHnD,MAGmD,GAFjD,MAAM,GAAC,SAAS,CAkB5B;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAH/B,MAG+B,GAF7B,MAAM,CAalB;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAHjC,MAGiC,GAF/B,MAAM,CAelB;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAHlC,MAGkC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E,MAAM,EAH3C,MAG2C,GAFzC,MAAM,GAAC,SAAS,CAY5B"}
@@ -0,0 +1,142 @@
1
+ /**
2
+ * The most PHP-named files one scan opens in search of a build version.
3
+ *
4
+ * @type {number}
5
+ */
6
+ export declare const MAX_PHP_PROBES: number;
7
+ /**
8
+ * Read the version a text starts with, in the grammar the build-version reader
9
+ * accepts: `8.4.27`, `8.5.0-dev`, `8.6.0RC3`. What follows the version must not
10
+ * continue it, so `8.4.26.1` and `8.4.26foo` parse to nothing. A distro
11
+ * revision such as Ubuntu's `8.1.2-1ubuntu2.14` is not an upstream version
12
+ * either, and parses to nothing rather than to a guess.
13
+ *
14
+ * @param {string} text text that begins with the version
15
+ * @returns {string|undefined} the version, or undefined when the text does not
16
+ * begin with one
17
+ */
18
+ export declare function parsePhpVersion(text: string): string | undefined;
19
+ /**
20
+ * Read the version a PHP reports about itself, as `php -v` prints it. An
21
+ * upstream version parses as parsePhpVersion does. A version with a distro
22
+ * revision, such as Ubuntu's `8.1.2-1ubuntu2.14`, is kept whole and marked: it
23
+ * is what that PHP reports, but the distro backports fixes without changing the
24
+ * upstream part, so it must not be matched against upstream advisories.
25
+ *
26
+ * @param {string} text text that begins with the version
27
+ * @returns {{version: string, distroRevision: boolean}|undefined} the version,
28
+ * or undefined when the text does not begin with one
29
+ */
30
+ export declare function parsePhpReportedVersion(text: string): {
31
+ version: string;
32
+ distroRevision: boolean;
33
+ } | undefined;
34
+ /**
35
+ * The package manager whose store a path lies in. Homebrew (`Cellar/<formula>/
36
+ * <version>/`), Nix (`nix/store/`) and Guix (`gnu/store/`) own everything under
37
+ * their stores, whatever links lead there, and a PHP they own is identified by
38
+ * their package, never as an unpackaged build.
39
+ *
40
+ * @param {string} filePath absolute or root-relative path, either separator
41
+ * @returns {string|undefined} `homebrew`, `nix` or `guix`, or undefined
42
+ */
43
+ export declare function packageStoreOf(filePath: string): string | undefined;
44
+ /**
45
+ * Classify a file by its basename into a PHP SAPI, or undefined when the name
46
+ * is not one php-src installs.
47
+ *
48
+ * @param {string} fileName basename or path of the candidate
49
+ * @returns {string|undefined} cli, fpm, cgi, phpdbg, libphp or frankenphp
50
+ */
51
+ export declare function classifyPhpSapi(fileName: string): string | undefined;
52
+ /**
53
+ * Read the PHP build version of a binary or shared library.
54
+ *
55
+ * @param {string} absPath absolute path
56
+ * @param {string|undefined} rootDir extracted root, when the file came from one
57
+ * @returns {{version: string, source: string}|undefined} source is `binary`
58
+ * or `php_version.h`
59
+ */
60
+ export declare function readPhpBuildVersion(absPath: string, rootDir: string | undefined): {
61
+ version: string;
62
+ source: string;
63
+ } | undefined;
64
+ /**
65
+ * The CPE that lets a downstream scanner match a PHP version. NVD puts a
66
+ * pre-release suffix in the update field, e.g.
67
+ * cpe:2.3:a:php:php:8.5.0:rc1:*:*:*:*:*:* (NVD CPE dictionary).
68
+ *
69
+ * @param {string} version PHP version in the build-version grammar
70
+ * @returns {string} CPE 2.3 string
71
+ */
72
+ export declare function phpCpe(version: string): string;
73
+ /**
74
+ * A PHP runtime is one `platform` component per distinct version, like the Go
75
+ * stdlib component. Its identity is `pkg:generic/php`: it is only used where no
76
+ * package manager owns PHP, or where a PATH probe cannot tell which one does.
77
+ *
78
+ * @param {string} version PHP version in the build-version grammar, or as a
79
+ * distro build reports it
80
+ * @param {Object} [options] options
81
+ * @param {boolean} [options.withCpe=true] false for a version with a distro
82
+ * revision, which no upstream CPE describes
83
+ * @returns {Object} component with `purl`, `bom-ref` and, unless left out, `cpe`
84
+ */
85
+ export declare function createPhpRuntimeComponent(version: string, { withCpe }?: {
86
+ withCpe?: boolean;
87
+ }): Object;
88
+ /**
89
+ * The bom-ref of the runtime component for a version.
90
+ *
91
+ * @param {string} version PHP version in the build-version grammar
92
+ * @returns {string} bom-ref, which is the runtime's purl
93
+ */
94
+ export declare function phpRuntimeRef(version: string): string;
95
+ /**
96
+ * The properties a PHP file component carries once its build version is known.
97
+ * They belong on unpackaged `file` components only: a package-owned PHP is
98
+ * identified by its package, and distro builds carry backported fixes under
99
+ * old version numbers, so the PHP-RCE audit rules that match these properties
100
+ * would raise false positives there.
101
+ *
102
+ * @param {{version: string, source: string}} build result of readPhpBuildVersion
103
+ * @param {string} sapi result of classifyPhpSapi
104
+ * @returns {{name: string, value: string}[]} properties to append
105
+ */
106
+ export declare function phpBuildProperties(build: {
107
+ version: string;
108
+ source: string;
109
+ }, sapi: string): {
110
+ name: string;
111
+ value: string;
112
+ }[];
113
+ /**
114
+ * Start collecting the runtime components and edges of one scan.
115
+ *
116
+ * @returns {{runtimeComponents: Object[], dependencies: Object[], runtimeRefs: Set<string>}}
117
+ */
118
+ export declare function createPhpRuntimeInventory(): {
119
+ runtimeComponents: Object[];
120
+ dependencies: Object[];
121
+ runtimeRefs: Set<string>;
122
+ };
123
+ /**
124
+ * Tag a PHP file component with its build facts and link it to the runtime
125
+ * component of its version, creating that component on first use. Mutates the
126
+ * component in place, as the Go collector does.
127
+ *
128
+ * @param {{runtimeComponents: Object[], dependencies: Object[], runtimeRefs: Set<string>}} inventory
129
+ * accumulator from createPhpRuntimeInventory
130
+ * @param {Object} component file component, with a `properties` array
131
+ * @param {{version: string, source: string}} build result of readPhpBuildVersion
132
+ * @param {string} sapi result of classifyPhpSapi
133
+ */
134
+ export declare function attachPhpBuild(inventory: {
135
+ runtimeComponents: Object[];
136
+ dependencies: Object[];
137
+ runtimeRefs: Set<string>;
138
+ }, component: Object, build: {
139
+ version: string;
140
+ source: string;
141
+ }, sapi: string): void;
142
+ //# sourceMappingURL=phpBuildInfo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"phpBuildInfo.d.ts","sourceRoot":"","sources":["../../../lib/inventory/phpBuildInfo.js"],"names":[],"mappings":"AA8CA;;;;GAIG;AACH,eAAO,MAAM,cAAc,EAFjB,MAEsB,CAAC;AAUjC;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAJzB,MAIyB,GAHvB,MAAM,GAAC,SAAS,CAc5B;AAQD;;;;;;;;;;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YAAY,EAAE,MAAM,EAAE,CAAC;IAAC,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAAC,CAI3F;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,SAAS,EAN7B;IAAC,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAC;IAAC,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,CAAA;CAMjD,EAAE,SAAS,EAJxC,MAIwC,EAAE,KAAK,EAH/C;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAGe,EAAE,IAAI,EAFrD,MAEqD,QAe/D"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Look for PHP no package manager owns, in the fixed directories of the host.
3
+ * Components come back only for the files nothing owns: a `file` component for
4
+ * each PHP binary or library with the cdx:php properties, one `platform`
5
+ * component per version with its CPE, and the edges between them.
6
+ *
7
+ * @param {Object} [options] probe options
8
+ * @param {string} [options.rootPath] directory the fixed directories hang off:
9
+ * `/`, or the system drive on Windows. Tests point it at a built tree.
10
+ * @param {string} [options.platform] `linux`, `darwin` or `win32`
11
+ * @param {Object} [options.env] environment read for ProgramFiles, SystemDrive
12
+ * and ChocolateyInstall, instead of the process's
13
+ * @param {{dpkgInfoDirectory?: string, apkInstalledFile?: string, rpmDatabaseDirectories?: string[]}} [options.packageDatabases]
14
+ * where the package databases are, instead of under `rootPath`
15
+ * @param {function(string): (Object[]|undefined)} [options.executeOsQuery] runs
16
+ * an osquery query; the rpm database is only asked through it
17
+ * @param {Object[]} [options.packageComponents] the packages the OS scan has
18
+ * inventoried, from which Chocolatey's are known
19
+ * @param {number} [options.maxProbes] most candidate files to look at
20
+ * @returns {{components: Object[], dependencies: Object[]}}
21
+ */
22
+ export declare function probeHostPhp(options?: {
23
+ rootPath?: string;
24
+ platform?: string;
25
+ env?: Object;
26
+ packageDatabases?: {
27
+ dpkgInfoDirectory?: string;
28
+ apkInstalledFile?: string;
29
+ rpmDatabaseDirectories?: string[];
30
+ };
31
+ }): {
32
+ components: Object[];
33
+ dependencies: Object[];
34
+ };
35
+ //# sourceMappingURL=phpHostProbe.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"phpHostProbe.d.ts","sourceRoot":"","sources":["../../../lib/inventory/phpHostProbe.js"],"names":[],"mappings":"AAmjBA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,YAAY,CAAC,OAAO,AAfjC,CAQA,EAPA;IAAyB,QAAQ,AAAjC,CAEA,EAFQ,MAAM,CAEd;IAAyB,QAAQ,AAAjC,CACA,EADQ,MAAM,CACd;IAAyB,GAAG,AAA5B,CAEA,EAFQ,MAAM,CAEd;IAA6G,gBAAgB,AAA7H,CAEA,EAFQ;QAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAAC,sBAAsB,CAAC,EAAE,MAAM,EAAE,CAAA;KAAC,CAElG;CAOsC,GAF5B;IAAC,UAAU,EAAE,MAAM,EAAE,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAA;CAAC,CA0D1D"}
@@ -0,0 +1,27 @@
1
+ export declare const ROOTFS_CERT_LIMITS: Readonly<{
2
+ maxFileBytes: number;
3
+ maxFiles: 20000;
4
+ maxEntries: 500000;
5
+ maxDepth: 12;
6
+ }>;
7
+ /**
8
+ * Pure-JS inventory of the certificate locations trustinspector's rootfs
9
+ * mode covers, plus Kubernetes TLS secrets and Android pins. Used when the
10
+ * plugin is not available. Produces components through the shared
11
+ * CertificateCollector, so bom-refs, names and deduplication match the other
12
+ * producers; locations are root-relative ("/etc/ssl/certs/x.crt").
13
+ *
14
+ * Every access stays inside the root: symlinks (files or directories) are
15
+ * skipped, only regular files are opened, and the walk is bounded by entry,
16
+ * file, size and depth limits.
17
+ *
18
+ * @param {string} rootDir extracted root filesystem
19
+ * @param {object} [limits] overrides for ROOTFS_CERT_LIMITS (tests)
20
+ * @returns {{components: object[], dependencies: object[], warnings: string[]}}
21
+ */
22
+ export declare function collectRootfsCertificates(rootDir: string, limits?: object): {
23
+ components: object[];
24
+ dependencies: object[];
25
+ warnings: string[];
26
+ };
27
+ //# sourceMappingURL=rootfsCerts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rootfsCerts.d.ts","sourceRoot":"","sources":["../../../lib/inventory/rootfsCerts.js"],"names":[],"mappings":"AAqBA,eAAO,MAAM,kBAAkB;;;;;EAK7B,CAAC;AA0IH;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAJtC,MAIsC,EAAE,MAAM,AAHtD,CACA,EADQ,MAGmD,GAFjD;IAAC,UAAU,EAAE,MAAM,EAAE,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAC;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAA;CAAC,CA6N9E"}
@@ -15,10 +15,14 @@ export declare function isSafeGitRefName(refName: string | undefined): boolean;
15
15
  * @param {string[]} args git arguments
16
16
  * @param {Object} options command options
17
17
  * @param {string|undefined} options.cwd working directory
18
+ * @param {boolean|undefined} options.noRepository run outside any repository,
19
+ * so the config of a repository in the working directory, such as url.*.insteadOf
20
+ * or core.sshCommand, cannot change where a remote command connects
18
21
  * @returns {Object} spawn result
19
22
  */
20
23
  export declare function hardenedGitCommand(args: string[], options?: {
21
24
  cwd: string | undefined;
25
+ noRepository: boolean | undefined;
22
26
  }): Object;
23
27
  /**
24
28
  * Build CycloneDX release notes from git tags and commits.
@@ -55,6 +59,17 @@ export declare function isAllowedWinPath(p: string): boolean;
55
59
  * @returns {boolean} true if the path is present in the allowed paths. false otherwise.
56
60
  */
57
61
  export declare function isAllowedPath(p: string): boolean;
62
+ /**
63
+ * Checks where the given path really points, after following symlinks, against
64
+ * where the allowed paths really point. Both sides are resolved, so an allowed
65
+ * directory that is itself reached through a link (such as /tmp on macOS) still
66
+ * matches, while a link inside an allowed directory that leads outside it does
67
+ * not.
68
+ *
69
+ * @param {string} p Path string to check
70
+ * @returns {boolean} true if the real path is inside a real allowed path
71
+ */
72
+ export declare function isAllowedRealPath(p: string): boolean;
58
73
  /**
59
74
  * Determine if the path could be a package URL.
60
75
  *
@@ -76,6 +91,19 @@ export declare function maybeRemotePath(filePath: string): boolean;
76
91
  * @returns {Object|null} Error object if invalid, or null if valid
77
92
  */
78
93
  export declare function validateAndRejectGitSource(filePath: string): Object | null;
94
+ /**
95
+ * Return the host a git client connects to for a remote, read the way git,
96
+ * libcurl and OpenSSH read it rather than the way new URL() does. git ends the
97
+ * authority of ssh:// and git:// URLs only at the first slash, percent-decodes
98
+ * it before splitting off the host, and reads a leading "[...]" as the host.
99
+ * OpenSSH takes the host after the last "@". So a "?" or "#" before the first
100
+ * slash, a second "@", brackets in the user name, or a percent sign in an
101
+ * ssh:// or git:// authority make the host ambiguous.
102
+ *
103
+ * @param {string} remote Git URL or SCP-like address
104
+ * @returns {string|undefined} lower-cased host, or undefined when it is ambiguous
105
+ */
106
+ export declare function getGitRemoteHost(remote: string): string | undefined;
79
107
  /**
80
108
  * Clone a git repository into a temporary directory.
81
109
  *
@@ -1 +1 @@
1
- {"version":3,"file":"source.d.ts","sourceRoot":"","sources":["../../../lib/inventory/source.js"],"names":[],"mappings":"AAqCA,6FAA6F;AAC7F,eAAO,MAAM,4BAA4B,wIAC8F,CAAC;AAExI,6DAA6D;AAC7D,eAAO,MAAM,2BAA2B,UAWvC,CAAC;AAuBF;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAH7B,MAAM,GAAC,SAGsB,GAF3B,OAAO,CAUnB;AAiBD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAL5B,MAAM,EAKsB,EAAE,OAAO,GAH7C;IAAkC,GAAG,EAA7B,MAAM,GAAC,SAAS,CACxB;CAEkD,GAFxC,MAAM,CAuClB;AA+ED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ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C,EAAE,cAAc,EAHrD,MAAM,GAAC,SAG8C,GAFnD,MAAM,GAAC,SAAS,CA8D5B;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAJtC,MAIsC,EAAE,cAAc,EAHtD,MAAM,GAAC,SAG+C,GAFpD,MAAM,GAAC,SAAS,CAiF5B;AAkJD;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAHlC,MAGkC,GAFhC;IAAC,MAAM,EAAC,MAAM,CAAC;IAAA,KAAK,EAAC,MAAM,CAAC;IAAA,OAAO,EAAC,MAAM,CAAA;CAAC,GAAC,IAAI,CA4D5D;AA6GD;;GAEG;AACH,wBAAgB,yBAAyB,SAExC;AAID;;;;;;;;;;;GAWG;AACH,wBAAsB,qBAAqB,CAAC,WAAW,EAJ5C,KAAK,CAAC,MAAM,CAIgC,GAF1C,OAAO,CAAC,IAAI,CAAC,CA6BzB;AAiDD;;;;;;;;;;GAUG;AACH,wBAAsB,qBAAqB,CAAC,UAAU,EAJ3C,MAI2C,EAAE,OAAO,AAH5D,CACA,EADQ,MAGyD,GAFvD,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAC,GAAC,SAAS,CAAC,CA4MlI;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAF5B,MAE4B,QAkCtC"}
@@ -66,6 +66,21 @@ export declare function findLicenseId(name: string): any;
66
66
  * @returns {string|undefined} SPDX license id or expression
67
67
  */
68
68
  export declare function licenseIdFromText(content: string): string | undefined;
69
+ /**
70
+ * Identify every license a notice grants, in the order the notice grants
71
+ * them. A notice can grant several: one LICENSE file holding an MIT grant and
72
+ * an Apache-2.0 grant (gopkg.in/yaml.v3), or a choice of licenses followed by
73
+ * each full text (github.com/spdx/tools-golang). A license text quotes others
74
+ * (the GNU GPL names the GNU Lesser GPL, the MPL names the GNU licenses), so
75
+ * only phrases that a grant carries count: a GNU license is found by its title
76
+ * standing on a line of its own, the others by a sentence of their grant.
77
+ * A notice none of these phrases match falls back to {@link guessLicenseId}.
78
+ *
79
+ * @param {string} content License file contents
80
+ * @returns {string[]} SPDX license ids or expressions; empty when none is
81
+ * recognized
82
+ */
83
+ export declare function guessLicenseIds(content: string): string[];
69
84
  /**
70
85
  * Method to guess the spdx license id from license contents
71
86
  *
@@ -1 +1 @@
1
- {"version":3,"file":"spdx.d.ts","sourceRoot":"","sources":["../../../lib/inventory/spdx.js"],"names":[],"mappings":"AAeA;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAFf,MAAM,EAIf,CAAC;AAMF;;;;;;IAMI;AACJ,wBAAgB,uBAAuB,CAAC,OAAO,EAJpC,MAIoC,GAHlC,OAAO,CA0BnB;AAED;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,OAAA,SA2BhD;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,GAAG,KAAA,qBAqG9B;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,UAAU,QAAA,EAAE,GAAG,QAAA,GAFnC,MAAM,CAoDjB;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,KAAA,EAAE,CAAC,KAAA,EAAE,cAAc,KAAA,QAoCpD;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,eAAe,KAAA,EAAE,kBAAkB,KAAA;;SAUlE;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAFvB,MAEuB,OAYjC;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAH9B,MAG8B,GAF5B,MAAM,GAAC,SAAS,CAyF5B;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAF3B,MAE2B,OAcrC"}
1
+ {"version":3,"file":"spdx.d.ts","sourceRoot":"","sources":["../../../lib/inventory/spdx.js"],"names":[],"mappings":"AAeA;;;;GAIG;AACH,eAAO,MAAM,YAAY,EAFf,MAAM,EAIf,CAAC;AAMF;;;;;;IAMI;AACJ,wBAAgB,uBAAuB,CAAC,OAAO,EAJpC,MAIoC,GAHlC,OAAO,CA0BnB;AAED;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,OAAA,SA2BhD;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,GAAG,KAAA,qBAqG9B;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,UAAU,QAAA,EAAE,GAAG,QAAA,GAFnC,MAAM,CAoDjB;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,KAAA,EAAE,CAAC,KAAA,EAAE,cAAc,KAAA,QAoCpD;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,eAAe,KAAA,EAAE,kBAAkB,KAAA;;SAUlE;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAFvB,MAEuB,OAYjC;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAH9B,MAG8B,GAF5B,MAAM,GAAC,SAAS,CAyF5B;AAqDD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAJ5B,MAI4B,GAH1B,MAAM,EAAE,CAgFpB;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAF3B,MAE2B,OAcrC"}
@@ -57,7 +57,7 @@ export declare function resolveSaferExecBinary(): string | undefined;
57
57
  * @param {boolean} [options.denyPersistenceWrites] - Deny writes to auto-execution and persistence locations
58
58
  * @param {boolean} [options.privateTmp] - Private tmpfs /tmp and /var/tmp (Linux)
59
59
  * @param {string} [options.protectHome] - Home isolation: read-only, tmpfs, or off (Linux)
60
- * @returns {Promise<{libPaths: string[], httpAccessEntries: Object[], egressEntries?: Object[], dryRunSummary?: Object}>} Collected libraries, HTTP URLs, proxy egress decisions, and the dry-run summary
60
+ * @returns {Promise<{libPaths: string[], httpAccessEntries: Object[], cryptoEntries?: Object[], cryptoComponents?: Object[], cryptoResult?: Object, egressEntries?: Object[], dryRunSummary?: Object}>} Collected libraries, HTTP URLs, crypto observations, proxy egress decisions, and the dry-run summary
61
61
  * @throws {Error} When the @cdxgen/safer-exec tracing runtime is not installed
62
62
  * (for example after pruning it from a standalone payload), since the traced
63
63
  * command could never run and the BOM would silently be empty
@@ -94,6 +94,9 @@ export declare function executeAndTrace(commandStr: string, workingDir?: string,
94
94
  }): Promise<{
95
95
  libPaths: string[];
96
96
  httpAccessEntries: Object[];
97
+ cryptoEntries?: Object[];
98
+ cryptoComponents?: Object[];
99
+ cryptoResult?: Object;
97
100
  egressEntries?: Object[];
98
101
  dryRunSummary?: Object;
99
102
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"traceRunner.d.ts","sourceRoot":"","sources":["../../../lib/inventory/traceRunner.js"],"names":[],"mappings":"AAsBA;;;;;;GAMG;AACH,wBAAgB,oBAAoB,IAFvB,OAAO,CAInB;AAKD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAHxB,MAGwB,GAFtB;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAC,CA6BzC;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,IAFzB,MAAM,GAAC,SAAS,CAsF5B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAsB,eAAe,CAAC,UAAU,EApCrC,MAoCqC,EAAE,UAAU,AAnCzD,CACA,EADQ,MAmCiD,EAAE,OAAO,AAlClE,CA6BA,EA5BA;IAA2B,SAAS,AAApC,CACA,EADQ,MAAM,EAAE,CAChB;IAA2B,UAAU,AAArC,CACA,EADQ,MAAM,EAAE,CAChB;IAAyB,WAAW,AAApC,CACA,EADQ,M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AAM,EAAE,CAAC;IAAC,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,aAAa,CAAC,EAAE,MAAM,CAAA;CAAC,CAAC,CAwWtM;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAH1B,MAG0B,GAFxB;IAAC,QAAQ,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,GAAC,SAAS,CAAA;CAAC,CAazD;AAuBD;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAHhC,MAAM,EAG0B,GAF9B;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAC,EAAE,CAkD9E;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CAAC,iBAAiB,EAHjD,MAAM,EAG2C;eAFlB,GAAG,CAAC,MAAM,CAAC;gBAAc,MAAM,EAAE;GA+C1E"}
@@ -28,6 +28,28 @@ export declare function suiteCipher(suiteName: string): {
28
28
  * @returns {Object[]} Normalized cryptographic-asset components
29
29
  */
30
30
  export declare function normalizeTracedCryptoComponents(cbomComponents: Object[]): Object[];
31
+ /**
32
+ * Builds the shared certificate model for the chains servers presented in TLS
33
+ * ≤ 1.2 handshakes, from the `chain` arrays of safer-exec's crypto result
34
+ * (report channel, safer-exec ≥ 1.2.0; earlier releases and TLS 1.3 entries
35
+ * carry no chain and yield nothing). The records go through the shared
36
+ * certificate collector, so bom-refs, properties and dedup match certificates
37
+ * found on disk. A presented chain is untrusted server input: no issuer edges
38
+ * are inferred from it, and the certificate and public-key components link
39
+ * through the collector as every producer's do. Each TLS protocol component
40
+ * provides the certificates and keys presented under it — the edge safer-
41
+ * exec's own CBOM records — which answers which servers presented a key.
42
+ *
43
+ * @param {Object} cryptoResult safer-exec CRYPTO result (`result.crypto`)
44
+ * @param {Set<string>} protocolRefs bom-refs of the protocol components in the BOM;
45
+ * a provides edge is only emitted for a protocol that is actually present
46
+ * @returns {{components: Object[], dependencies: Object[]}} certificate,
47
+ * public-key and algorithm components, and the protocol provides edges
48
+ */
49
+ export declare function observedChainComponents(cryptoResult: Object, protocolRefs?: Set<string>): {
50
+ components: Object[];
51
+ dependencies: Object[];
52
+ };
31
53
  /**
32
54
  * Maps the crypto libraries safer-exec reported to the paths they were loaded
33
55
  * from.
@@ -1 +1 @@
1
- {"version":3,"file":"tracedCrypto.d.ts","sourceRoot":"","sources":["../../../lib/inventory/tracedCrypto.js"],"names":[],"mappings":"AAqDA;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAH1B,MAG0B,GAFxB;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,GAAC,SAAS,CAAA;CAAC,GAAC,SAAS,CAuB1E;AA+DD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,+BAA+B,CAAC,cAAc,EAHnD,MAAM,EAG6C,GAFjD,MAAM,EAAE,CA+GpB;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,aAAa,EAHxC,MAAM,EAGkC,GAFtC,GAAG,CAAC,MAAM,EAAE;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAC,CAAC,CAgBxD"}
1
+ {"version":3,"file":"tracedCrypto.d.ts","sourceRoot":"","sources":["../../../lib/inventory/tracedCrypto.js"],"names":[],"mappings":"AA0DA;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,SAAS,EAH1B,MAG0B,GAFxB;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,GAAC,SAAS,CAAA;CAAC,GAAC,SAAS,CAuB1E;AA+DD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,+BAA+B,CAAC,cAAc,EAHnD,MAAM,EAG6C,GAFjD,MAAM,EAAE,CA+GpB;AAqBD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,uBAAuB,CACrC,YAAY,EAPH,MAOG,EACZ,YAAY,GAPH,GAAG,CAAC,MAAM,CAOK,GALb;IAAC,UAAU,EAAE,MAAM,EAAE,CAAC;IAAC,YAAY,EAAE,MAAM,EAAE,CAAA;CAAC,CAwF1D;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,aAAa,EAHxC,MAAM,EAGkC,GAFtC,GAAG,CAAC,MAAM,EAAE;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAC,CAAC,CAgBxD"}
@@ -115,6 +115,16 @@ export declare function dropRedundantSourceComponents(pkgList: any[]): any[];
115
115
  * @returns {Object} Metadata containing packages, dependencies, etc
116
116
  */
117
117
  export declare function getOSPackages(src: string, imageConfig: Object, options?: {}): Object;
118
+ /**
119
+ * Split a `Name <address>` maintainer string into an `organizationalContact`.
120
+ *
121
+ * @param {string} value Maintainer or supplier string
122
+ * @returns {{name: string, email?: string}|undefined} The contact, if any
123
+ */
124
+ export declare function parseOrganizationalContact(value: string): {
125
+ name: string;
126
+ email?: string;
127
+ } | undefined;
118
128
  /**
119
129
  * Collect the dependency edges trivy recorded for one OS package component.
120
130
  *
@@ -1 +1 @@
1
- {"version":3,"file":"binary.d.ts","sourceRoot":"","sources":["../../../lib/managers/binary.js"],"names":[],"mappings":"AA+YA;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,SAAS,AAH9C,CACA,EADQ,MAAM,EAGqC,GAFzC,MAAM,EAAE,CAgBpB;AA4FD;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAJ9B,MAI8B,GAH5B,MAAM,GAAC,SAAS,CAmB5B;AAED;;;;;;;;GAQG;AACH,wB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HD;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAHrC,MAGqC,GAFnC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAC,GAAC,SAAS,CAgBpD;AAqlDD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,oBAAoB,0DAJtB,MAAM,QACN,MAAM,KACJ;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,EAAE,CAAA;CAAC,GAAC,SAsD/C,CAAC;AAyHF;;;;;;;;GAQG;AACH,wBAAgB,+BAA+B,CAAC,UAAU,AALvD,CACA,EADQ,MAAM,EAK8C,GAJlD;IAAC,UAAU,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,EAAE,CAAA;CAAC,CA8FnD;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,KAAK,EALzB,MAKyB,GAJvB,MAAM,GAAC,SAAS,CA8D5B;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAJxB,MAIwB,EAAE,UAAU,EAHpC,MAGoC,WA6C9C;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,GAAG,EANrB,MAMqB,EAAE,aAAa,EALpC,MAKoC,EAAE,QAAQ,EAJ9C,OAI8C,GAF7C,OAAO,CAiClB"}
@@ -74,6 +74,18 @@ export declare const makeRequest: (path: string, method: string, forRegistry?: s
74
74
  * @returns {boolean} true when the string is a plausible image reference
75
75
  */
76
76
  export declare const isImageReference: (fullImageName: string) => boolean;
77
+ /**
78
+ * Whether an image named in a scanned manifest, such as a docker-compose file
79
+ * or a Kubernetes spec, may be pulled and inventoried. The name comes from the
80
+ * scanned project, so a local archive path would read files outside the
81
+ * allowed paths and a registry outside CDXGEN_ALLOWED_HOSTS would bypass the
82
+ * host allowlist.
83
+ *
84
+ * @param {string} fullImageName Image name from the manifest
85
+ * @param {Object} [imageObj] Result of parseImageName for the same name
86
+ * @returns {boolean} true when the image may be followed
87
+ */
88
+ export declare const isFollowableManifestImage: (fullImageName: string, imageObj?: Object) => boolean;
77
89
  /**
78
90
  * Parse image name
79
91
  *
@@ -1 +1 @@
1
- {"version":3,"file":"docker.d.ts","sourceRoot":"","sources":["../../../lib/managers/docker.js"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AA+CrC,yDAAyD;AACzD,eAAO,MAAM,KAAK,SAA0B,CAAC;AAC7C;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,EAFtB,MAEoC,CAAC;AAkS/C;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,SAHnB,MAAM,KACJ,MAiBZ,CAAC;AAEF;;GAEG;AACH,wBAAgB,YAAY,QAoB3B;AAED;;GAEG;AACH,wBAAgB,oBAAoB,QA2CnC;AAyTD;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,aAAa,aANf,MAAM,gBAEN,MAAM,KACJ,OAAO,CAAC,MAAM,GAAC,SAAS,CA6HpC,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,SANb,MAAM,UACN,MAAM,gBACN,MAAM,KACJ,OAAO,CAAC,MAAM,GAAC,MAAM,GAAC,SAAS,CAgC3C,CAAC;AA8CF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,gBAAgB,kBAHlB,MAAM,KACJ,OAsEZ,CAAC;AAgBF;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc;;;;;;;;CA2E1B,CAAC;AAyFF;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,QAFlB,MAgCZ,CAAC;AAkBF;;GAEG;AACH,eAAO,MAAM,QAAQ,sCA6MpB,CAAC;AAkBC,YAA4B,gBAAgB,GAAlC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAkB;AAiH/C;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,UAAU,kBANZ,MAAM,OACN,MAAM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O,MAAM,kBAAkB,cALpB,MAAM,iBACN,MAAM,KACJ,MAAM,GAAC,SA2CnB,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,qBAHpB,KAAK,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAC,CAAC,cACnC,KAAK,CAAC,MAAM,CAAC,SA4BvB,CAAC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * An internationalized hostname: mapped to its A-label form with UTS #46
3
+ * processing, held to the ASCII hostname rules, and every A-label decoded
4
+ * back and checked for the characters IDNA allows.
5
+ *
6
+ * @param {string} hostname Hostname, possibly holding non-ASCII labels
7
+ * @returns {boolean} Whether it is a valid IDN hostname
8
+ */
9
+ export declare const isValidIdnHostname: (hostname: string) => boolean;
10
+ /**
11
+ * Whether a value is a valid RFC 6531 email address (`idn-email`): a dot-atom
12
+ * or quoted local part, where non-ASCII characters are allowed, then `@` and
13
+ * an internationalized hostname or a bracketed IPv4/IPv6 literal.
14
+ *
15
+ * @param {string} value Candidate email address
16
+ * @returns {boolean} true when the value is a valid address
17
+ */
18
+ export declare const isValidIdnEmail: (value: string) => boolean;
19
+ //# sourceMappingURL=email.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../../lib/parsers/email.js"],"names":[],"mappings":"AA8LA;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,aAHpB,MAAM,KACJ,OAyCZ,CAAC;AAkBF;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,UAHjB,MAAM,KACJ,OAeZ,CAAC"}
@@ -17,6 +17,19 @@ export declare function indexJsonObject(filePath: string, options?: Object): Map
17
17
  start: number;
18
18
  end: number;
19
19
  }>;
20
+ /**
21
+ * Decode one member of the top-level object in a JSON file, reading the file
22
+ * only up to the end of that member. A member near the start of a large file
23
+ * costs a few bounded reads, however large the rest of the file is; the rest
24
+ * is not checked for well-formedness.
25
+ *
26
+ * @param {string} filePath JSON file whose top-level value is an object
27
+ * @param {string} name Member to decode
28
+ * @param {Object} [options] Batch and chunk size overrides, for tests
29
+ * @returns {*} The decoded value, or undefined when the object has no such member
30
+ * @throws {SyntaxError} When the object is malformed before the member ends
31
+ */
32
+ export declare function readJsonMember(filePath: string, name: string, options?: Object): any;
20
33
  /**
21
34
  * Decode the JSON value stored in a byte range of a file, without ever holding
22
35
  * more than a bounded run of it in one string.