@cdxgen/cdxgen 13.3.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 (372) hide show
  1. package/README.md +12 -9
  2. package/bin/cdxgen-secure.js +15 -0
  3. package/bin/cdxgen.js +115 -31
  4. package/bin/evinse.js +23 -1
  5. package/bin/hbom.js +15 -7
  6. package/bin/repl.js +115 -0
  7. package/bin/sign.js +45 -15
  8. package/bin/tracebom.js +5 -1
  9. package/bin/validate.js +84 -18
  10. package/bin/verify.js +155 -86
  11. package/data/cbomosdb-queries.json +13 -1
  12. package/data/component-tags.json +8 -0
  13. package/data/helpers/init.gradle +46 -21
  14. package/data/queries-darwin.json +25 -1
  15. package/data/queries-win.json +19 -1
  16. package/data/queries.json +41 -0
  17. package/data/remediations.json +344 -1
  18. package/data/rules/cbom-security.yaml +235 -4
  19. package/data/rules/dependency-sources.yaml +67 -0
  20. package/data/rules/go-binaries.yaml +46 -0
  21. package/data/rules/golem-go.yaml +80 -0
  22. package/data/rules/hbom-compliance.yaml +40 -22
  23. package/data/rules/hbom-performance.yaml +7 -1
  24. package/data/rules/host-topology.yaml +1 -1
  25. package/data/rules/obom-runtime.yaml +31 -2
  26. package/data/rules/php-runtime.yaml +143 -0
  27. package/data/rules/scala-evidence.yaml +115 -0
  28. package/lib/audit/index.js +52 -6
  29. package/lib/cli/bomAssembly.js +28 -3
  30. package/lib/cli/cliOptions.js +110 -3
  31. package/lib/cli/index.js +186 -58
  32. package/lib/cli/jsBom.js +50 -29
  33. package/lib/cli/jvmBom.js +779 -146
  34. package/lib/cli/managedBom.js +1021 -261
  35. package/lib/cli/nativeBom.js +364 -58
  36. package/lib/core/activity.js +12 -0
  37. package/lib/core/env.js +47 -17
  38. package/lib/core/fs.js +31 -21
  39. package/lib/core/httpClient.js +233 -69
  40. package/lib/core/pluginRun.js +184 -0
  41. package/lib/core/processTree.js +100 -0
  42. package/lib/core/projectConfig.js +1 -0
  43. package/lib/core/projectTooling.js +97 -0
  44. package/lib/core/propertySanitizer.js +72 -0
  45. package/lib/core/runState.js +39 -0
  46. package/lib/core/toml.js +72 -0
  47. package/lib/ecosystems/asarutils.js +4 -2
  48. package/lib/ecosystems/bunutils.js +5 -7
  49. package/lib/ecosystems/cargoCache.js +231 -8
  50. package/lib/ecosystems/cmakeResolver.js +10 -21
  51. package/lib/ecosystems/cppBuildContext.js +631 -0
  52. package/lib/ecosystems/cppEvidence.js +337 -22
  53. package/lib/ecosystems/cppIncludeResolver.js +294 -0
  54. package/lib/ecosystems/denoutils.js +93 -66
  55. package/lib/ecosystems/ecosystems.js +1967 -788
  56. package/lib/ecosystems/golem.js +578 -18
  57. package/lib/ecosystems/gradleutils.js +340 -46
  58. package/lib/ecosystems/jsEvidence.js +85 -24
  59. package/lib/ecosystems/kosi.js +21 -4
  60. package/lib/ecosystems/npmutils.js +64 -0
  61. package/lib/ecosystems/parsers-dotnet.js +668 -153
  62. package/lib/ecosystems/parsers-elm.js +46 -28
  63. package/lib/ecosystems/parsers-gleam.js +3 -4
  64. package/lib/ecosystems/parsers-go.js +1283 -297
  65. package/lib/ecosystems/parsers-js.js +92 -26
  66. package/lib/ecosystems/parsers-julia.js +2 -3
  67. package/lib/ecosystems/parsers-jvm.js +463 -29
  68. package/lib/ecosystems/parsers-misc.js +405 -93
  69. package/lib/ecosystems/parsers-python.js +152 -20
  70. package/lib/ecosystems/parsers-rust.js +4 -4
  71. package/lib/ecosystems/parsers-terraform.js +1573 -19
  72. package/lib/ecosystems/pythonutils.js +102 -6
  73. package/lib/ecosystems/remote/huggingface.js +3 -0
  74. package/lib/ecosystems/rubyutils.js +73 -20
  75. package/lib/ecosystems/rusi.js +32 -9
  76. package/lib/ecosystems/sbtutils.js +243 -187
  77. package/lib/ecosystems/scalacliutils.js +343 -0
  78. package/lib/ecosystems/scalasem.js +2620 -0
  79. package/lib/ecosystems/terraformRegistry.js +288 -0
  80. package/lib/ecosystems/utils.js +2 -0
  81. package/lib/ecosystems/vendoredCode.js +156 -0
  82. package/lib/evinser/evinser.js +695 -78
  83. package/lib/evinser/swiftsem.js +68 -5
  84. package/lib/helpers/agenticToolutils.js +2 -2
  85. package/lib/helpers/bomSigner.js +576 -128
  86. package/lib/inventory/agentSkillSpec.js +17 -0
  87. package/lib/inventory/aiCollector.js +4 -1
  88. package/lib/inventory/analyzer.js +110 -127
  89. package/lib/inventory/apkInstalledDb.js +243 -0
  90. package/lib/inventory/atomUtils.js +204 -48
  91. package/lib/inventory/auditCategories.js +10 -3
  92. package/lib/inventory/buildToolRateLimit.js +144 -0
  93. package/lib/inventory/cacheCommands.js +2 -1
  94. package/lib/inventory/cacheDir.js +52 -9
  95. package/lib/inventory/certificates.js +2371 -0
  96. package/lib/inventory/cmakeBuildDirs.js +254 -0
  97. package/lib/inventory/communityAiConfigParser.js +4 -9
  98. package/lib/inventory/deps.js +507 -128
  99. package/lib/inventory/display.js +200 -3
  100. package/lib/inventory/dosai.js +747 -101
  101. package/lib/inventory/dosaiParsers.js +310 -15
  102. package/lib/inventory/dynamic.js +96 -8
  103. package/lib/inventory/envcontext.js +168 -5
  104. package/lib/inventory/evidenceUtils.js +590 -132
  105. package/lib/inventory/fetchBatch.js +574 -38
  106. package/lib/inventory/fetchDiskCache.js +597 -0
  107. package/lib/inventory/forgeEnricher.js +14 -5
  108. package/lib/inventory/formulationParsers.js +3 -2
  109. package/lib/inventory/goBuildInfo.js +140 -0
  110. package/lib/inventory/hbom.js +67 -7
  111. package/lib/inventory/hbomAnalysis.js +16 -0
  112. package/lib/inventory/hostTopology.js +21 -0
  113. package/lib/inventory/jvmLocalRepos.js +917 -0
  114. package/lib/inventory/mcpConfigParser.js +2 -3
  115. package/lib/inventory/osPackagePurl.js +244 -0
  116. package/lib/inventory/osPackageResolver.js +89 -87
  117. package/lib/inventory/osinfo.js +79 -31
  118. package/lib/inventory/osqueryTransform.js +114 -5
  119. package/lib/inventory/parentSelection.js +146 -0
  120. package/lib/inventory/phpBuildInfo.js +487 -0
  121. package/lib/inventory/phpHostProbe.js +641 -0
  122. package/lib/inventory/rootfsCerts.js +426 -0
  123. package/lib/inventory/rustFormulationParser.js +3 -4
  124. package/lib/inventory/scalaCoords.js +153 -0
  125. package/lib/inventory/source.js +215 -11
  126. package/lib/inventory/spdx.js +245 -0
  127. package/lib/inventory/traceRunner.js +93 -8
  128. package/lib/inventory/tracedCrypto.js +423 -0
  129. package/lib/managers/binary.js +529 -183
  130. package/lib/managers/docker.js +199 -44
  131. package/lib/managers/oci.js +24 -2
  132. package/lib/parsers/cmakeCache.js +69 -0
  133. package/lib/parsers/cmakeLists.js +16 -2
  134. package/lib/parsers/cmakePresets.js +400 -0
  135. package/lib/parsers/compileCommands.js +557 -0
  136. package/lib/parsers/email.js +277 -0
  137. package/lib/parsers/largeJson.js +34 -2
  138. package/lib/parsers/strictJson.js +322 -0
  139. package/lib/parsers/terraformConfig.js +1073 -0
  140. package/lib/parsers/terraformSource.js +652 -0
  141. package/lib/server/server.js +209 -1
  142. package/lib/stages/postgen/annotator.js +17 -1
  143. package/lib/stages/postgen/introspection/markers.js +1 -1
  144. package/lib/stages/postgen/introspection/reflect.js +4 -1
  145. package/lib/stages/postgen/postgen.js +20 -6
  146. package/lib/stages/postgen/ruleEngine.js +58 -1
  147. package/lib/stages/postgen/specVersionCompat.js +62 -0
  148. package/lib/stages/pregen/pregen.js +117 -5
  149. package/lib/validator/bomValidator.js +26 -5
  150. package/lib/validator/generated/runtime.mjs +13 -0
  151. package/lib/validator/generated/validate-1.6.mjs +26 -7
  152. package/lib/validator/generated/validate-1.7.mjs +31 -12
  153. package/lib/validator/generated/validate-2.0.mjs +30 -11
  154. package/lib/validator/index.js +25 -10
  155. package/lib/validator/reporters/json.js +1 -0
  156. package/package.json +23 -23
  157. package/types/bin/cdxgen-secure.d.ts +3 -0
  158. package/types/bin/cdxgen-secure.d.ts.map +1 -0
  159. package/types/bin/repl.d.ts.map +1 -1
  160. package/types/lib/audit/index.d.ts.map +1 -1
  161. package/types/lib/cli/bomAssembly.d.ts +9 -2
  162. package/types/lib/cli/bomAssembly.d.ts.map +1 -1
  163. package/types/lib/cli/cliOptions.d.ts +43 -0
  164. package/types/lib/cli/cliOptions.d.ts.map +1 -1
  165. package/types/lib/cli/index.d.ts.map +1 -1
  166. package/types/lib/cli/jsBom.d.ts.map +1 -1
  167. package/types/lib/cli/jvmBom.d.ts +44 -1
  168. package/types/lib/cli/jvmBom.d.ts.map +1 -1
  169. package/types/lib/cli/managedBom.d.ts +7 -4
  170. package/types/lib/cli/managedBom.d.ts.map +1 -1
  171. package/types/lib/cli/nativeBom.d.ts +3 -1
  172. package/types/lib/cli/nativeBom.d.ts.map +1 -1
  173. package/types/lib/core/activity.d.ts.map +1 -1
  174. package/types/lib/core/env.d.ts +27 -2
  175. package/types/lib/core/env.d.ts.map +1 -1
  176. package/types/lib/core/fs.d.ts.map +1 -1
  177. package/types/lib/core/httpClient.d.ts +13 -8
  178. package/types/lib/core/httpClient.d.ts.map +1 -1
  179. package/types/lib/core/pluginRun.d.ts +97 -0
  180. package/types/lib/core/pluginRun.d.ts.map +1 -0
  181. package/types/lib/core/processTree.d.ts +36 -0
  182. package/types/lib/core/processTree.d.ts.map +1 -0
  183. package/types/lib/core/projectConfig.d.ts.map +1 -1
  184. package/types/lib/core/projectTooling.d.ts +41 -0
  185. package/types/lib/core/projectTooling.d.ts.map +1 -0
  186. package/types/lib/core/propertySanitizer.d.ts +26 -0
  187. package/types/lib/core/propertySanitizer.d.ts.map +1 -1
  188. package/types/lib/core/runState.d.ts +29 -0
  189. package/types/lib/core/runState.d.ts.map +1 -0
  190. package/types/lib/core/toml.d.ts +20 -0
  191. package/types/lib/core/toml.d.ts.map +1 -0
  192. package/types/lib/ecosystems/asarutils.d.ts.map +1 -1
  193. package/types/lib/ecosystems/bunutils.d.ts.map +1 -1
  194. package/types/lib/ecosystems/cargoCache.d.ts +12 -0
  195. package/types/lib/ecosystems/cargoCache.d.ts.map +1 -1
  196. package/types/lib/ecosystems/cmakeResolver.d.ts +5 -3
  197. package/types/lib/ecosystems/cmakeResolver.d.ts.map +1 -1
  198. package/types/lib/ecosystems/cppBuildContext.d.ts +55 -0
  199. package/types/lib/ecosystems/cppBuildContext.d.ts.map +1 -0
  200. package/types/lib/ecosystems/cppEvidence.d.ts +19 -3
  201. package/types/lib/ecosystems/cppEvidence.d.ts.map +1 -1
  202. package/types/lib/ecosystems/cppIncludeResolver.d.ts +92 -0
  203. package/types/lib/ecosystems/cppIncludeResolver.d.ts.map +1 -0
  204. package/types/lib/ecosystems/denoutils.d.ts +9 -3
  205. package/types/lib/ecosystems/denoutils.d.ts.map +1 -1
  206. package/types/lib/ecosystems/ecosystems.d.ts +62 -13
  207. package/types/lib/ecosystems/ecosystems.d.ts.map +1 -1
  208. package/types/lib/ecosystems/golem.d.ts +81 -1
  209. package/types/lib/ecosystems/golem.d.ts.map +1 -1
  210. package/types/lib/ecosystems/gradleutils.d.ts +59 -7
  211. package/types/lib/ecosystems/gradleutils.d.ts.map +1 -1
  212. package/types/lib/ecosystems/jsEvidence.d.ts.map +1 -1
  213. package/types/lib/ecosystems/kosi.d.ts.map +1 -1
  214. package/types/lib/ecosystems/npmutils.d.ts +15 -0
  215. package/types/lib/ecosystems/npmutils.d.ts.map +1 -1
  216. package/types/lib/ecosystems/parsers-dotnet.d.ts +155 -5
  217. package/types/lib/ecosystems/parsers-dotnet.d.ts.map +1 -1
  218. package/types/lib/ecosystems/parsers-elm.d.ts.map +1 -1
  219. package/types/lib/ecosystems/parsers-gleam.d.ts.map +1 -1
  220. package/types/lib/ecosystems/parsers-go.d.ts +119 -5
  221. package/types/lib/ecosystems/parsers-go.d.ts.map +1 -1
  222. package/types/lib/ecosystems/parsers-js.d.ts +6 -1
  223. package/types/lib/ecosystems/parsers-js.d.ts.map +1 -1
  224. package/types/lib/ecosystems/parsers-julia.d.ts.map +1 -1
  225. package/types/lib/ecosystems/parsers-jvm.d.ts +74 -3
  226. package/types/lib/ecosystems/parsers-jvm.d.ts.map +1 -1
  227. package/types/lib/ecosystems/parsers-misc.d.ts +21 -59
  228. package/types/lib/ecosystems/parsers-misc.d.ts.map +1 -1
  229. package/types/lib/ecosystems/parsers-python.d.ts +57 -6
  230. package/types/lib/ecosystems/parsers-python.d.ts.map +1 -1
  231. package/types/lib/ecosystems/parsers-terraform.d.ts +38 -21
  232. package/types/lib/ecosystems/parsers-terraform.d.ts.map +1 -1
  233. package/types/lib/ecosystems/pythonutils.d.ts +26 -1
  234. package/types/lib/ecosystems/pythonutils.d.ts.map +1 -1
  235. package/types/lib/ecosystems/remote/huggingface.d.ts.map +1 -1
  236. package/types/lib/ecosystems/rubyutils.d.ts +21 -1
  237. package/types/lib/ecosystems/rubyutils.d.ts.map +1 -1
  238. package/types/lib/ecosystems/rusi.d.ts.map +1 -1
  239. package/types/lib/ecosystems/sbtutils.d.ts +88 -2
  240. package/types/lib/ecosystems/sbtutils.d.ts.map +1 -1
  241. package/types/lib/ecosystems/scalacliutils.d.ts +56 -0
  242. package/types/lib/ecosystems/scalacliutils.d.ts.map +1 -0
  243. package/types/lib/ecosystems/scalasem.d.ts +311 -0
  244. package/types/lib/ecosystems/scalasem.d.ts.map +1 -0
  245. package/types/lib/ecosystems/terraformRegistry.d.ts +9 -0
  246. package/types/lib/ecosystems/terraformRegistry.d.ts.map +1 -0
  247. package/types/lib/ecosystems/utils.d.ts +2 -2
  248. package/types/lib/ecosystems/utils.d.ts.map +1 -1
  249. package/types/lib/ecosystems/vendoredCode.d.ts +32 -0
  250. package/types/lib/ecosystems/vendoredCode.d.ts.map +1 -0
  251. package/types/lib/evinser/evinser.d.ts +100 -8
  252. package/types/lib/evinser/evinser.d.ts.map +1 -1
  253. package/types/lib/evinser/swiftsem.d.ts +10 -0
  254. package/types/lib/evinser/swiftsem.d.ts.map +1 -1
  255. package/types/lib/helpers/bomSigner.d.ts +80 -4
  256. package/types/lib/helpers/bomSigner.d.ts.map +1 -1
  257. package/types/lib/inventory/agentSkillSpec.d.ts +13 -0
  258. package/types/lib/inventory/agentSkillSpec.d.ts.map +1 -0
  259. package/types/lib/inventory/aiCollector.d.ts.map +1 -1
  260. package/types/lib/inventory/analyzer.d.ts.map +1 -1
  261. package/types/lib/inventory/apkInstalledDb.d.ts +42 -0
  262. package/types/lib/inventory/apkInstalledDb.d.ts.map +1 -0
  263. package/types/lib/inventory/atomUtils.d.ts +96 -10
  264. package/types/lib/inventory/atomUtils.d.ts.map +1 -1
  265. package/types/lib/inventory/auditCategories.d.ts +3 -0
  266. package/types/lib/inventory/auditCategories.d.ts.map +1 -1
  267. package/types/lib/inventory/buildToolRateLimit.d.ts +38 -0
  268. package/types/lib/inventory/buildToolRateLimit.d.ts.map +1 -0
  269. package/types/lib/inventory/cacheCommands.d.ts +2 -1
  270. package/types/lib/inventory/cacheCommands.d.ts.map +1 -1
  271. package/types/lib/inventory/cacheDir.d.ts +12 -4
  272. package/types/lib/inventory/cacheDir.d.ts.map +1 -1
  273. package/types/lib/inventory/certificates.d.ts +205 -0
  274. package/types/lib/inventory/certificates.d.ts.map +1 -0
  275. package/types/lib/inventory/cmakeBuildDirs.d.ts +58 -0
  276. package/types/lib/inventory/cmakeBuildDirs.d.ts.map +1 -0
  277. package/types/lib/inventory/communityAiConfigParser.d.ts.map +1 -1
  278. package/types/lib/inventory/deps.d.ts +61 -2
  279. package/types/lib/inventory/deps.d.ts.map +1 -1
  280. package/types/lib/inventory/display.d.ts +18 -0
  281. package/types/lib/inventory/display.d.ts.map +1 -1
  282. package/types/lib/inventory/dosai.d.ts +202 -14
  283. package/types/lib/inventory/dosai.d.ts.map +1 -1
  284. package/types/lib/inventory/dosaiParsers.d.ts +53 -7
  285. package/types/lib/inventory/dosaiParsers.d.ts.map +1 -1
  286. package/types/lib/inventory/dynamic.d.ts +16 -1
  287. package/types/lib/inventory/dynamic.d.ts.map +1 -1
  288. package/types/lib/inventory/envcontext.d.ts +40 -2
  289. package/types/lib/inventory/envcontext.d.ts.map +1 -1
  290. package/types/lib/inventory/evidenceUtils.d.ts +48 -14
  291. package/types/lib/inventory/evidenceUtils.d.ts.map +1 -1
  292. package/types/lib/inventory/fetchBatch.d.ts +83 -14
  293. package/types/lib/inventory/fetchBatch.d.ts.map +1 -1
  294. package/types/lib/inventory/fetchDiskCache.d.ts +169 -0
  295. package/types/lib/inventory/fetchDiskCache.d.ts.map +1 -0
  296. package/types/lib/inventory/forgeEnricher.d.ts.map +1 -1
  297. package/types/lib/inventory/formulationParsers.d.ts.map +1 -1
  298. package/types/lib/inventory/goBuildInfo.d.ts +10 -0
  299. package/types/lib/inventory/goBuildInfo.d.ts.map +1 -0
  300. package/types/lib/inventory/hbom.d.ts.map +1 -1
  301. package/types/lib/inventory/hbomAnalysis.d.ts +10 -0
  302. package/types/lib/inventory/hbomAnalysis.d.ts.map +1 -1
  303. package/types/lib/inventory/hostTopology.d.ts.map +1 -1
  304. package/types/lib/inventory/jvmLocalRepos.d.ts +178 -0
  305. package/types/lib/inventory/jvmLocalRepos.d.ts.map +1 -0
  306. package/types/lib/inventory/mcpConfigParser.d.ts.map +1 -1
  307. package/types/lib/inventory/osPackagePurl.d.ts +99 -0
  308. package/types/lib/inventory/osPackagePurl.d.ts.map +1 -0
  309. package/types/lib/inventory/osPackageResolver.d.ts +6 -2
  310. package/types/lib/inventory/osPackageResolver.d.ts.map +1 -1
  311. package/types/lib/inventory/osinfo.d.ts +31 -6
  312. package/types/lib/inventory/osinfo.d.ts.map +1 -1
  313. package/types/lib/inventory/osqueryTransform.d.ts +51 -0
  314. package/types/lib/inventory/osqueryTransform.d.ts.map +1 -1
  315. package/types/lib/inventory/parentSelection.d.ts +34 -0
  316. package/types/lib/inventory/parentSelection.d.ts.map +1 -0
  317. package/types/lib/inventory/phpBuildInfo.d.ts +142 -0
  318. package/types/lib/inventory/phpBuildInfo.d.ts.map +1 -0
  319. package/types/lib/inventory/phpHostProbe.d.ts +35 -0
  320. package/types/lib/inventory/phpHostProbe.d.ts.map +1 -0
  321. package/types/lib/inventory/rootfsCerts.d.ts +27 -0
  322. package/types/lib/inventory/rootfsCerts.d.ts.map +1 -0
  323. package/types/lib/inventory/rustFormulationParser.d.ts.map +1 -1
  324. package/types/lib/inventory/scalaCoords.d.ts +80 -0
  325. package/types/lib/inventory/scalaCoords.d.ts.map +1 -0
  326. package/types/lib/inventory/source.d.ts +28 -0
  327. package/types/lib/inventory/source.d.ts.map +1 -1
  328. package/types/lib/inventory/spdx.d.ts +24 -0
  329. package/types/lib/inventory/spdx.d.ts.map +1 -1
  330. package/types/lib/inventory/traceRunner.d.ts +16 -1
  331. package/types/lib/inventory/traceRunner.d.ts.map +1 -1
  332. package/types/lib/inventory/tracedCrypto.d.ts +64 -0
  333. package/types/lib/inventory/tracedCrypto.d.ts.map +1 -0
  334. package/types/lib/managers/binary.d.ts +10 -0
  335. package/types/lib/managers/binary.d.ts.map +1 -1
  336. package/types/lib/managers/docker.d.ts +12 -0
  337. package/types/lib/managers/docker.d.ts.map +1 -1
  338. package/types/lib/managers/oci.d.ts +3 -1
  339. package/types/lib/managers/oci.d.ts.map +1 -1
  340. package/types/lib/parsers/cmakeCache.d.ts +16 -0
  341. package/types/lib/parsers/cmakeCache.d.ts.map +1 -1
  342. package/types/lib/parsers/cmakeLists.d.ts +2 -1
  343. package/types/lib/parsers/cmakeLists.d.ts.map +1 -1
  344. package/types/lib/parsers/cmakePresets.d.ts +78 -0
  345. package/types/lib/parsers/cmakePresets.d.ts.map +1 -0
  346. package/types/lib/parsers/compileCommands.d.ts +115 -0
  347. package/types/lib/parsers/compileCommands.d.ts.map +1 -0
  348. package/types/lib/parsers/email.d.ts +19 -0
  349. package/types/lib/parsers/email.d.ts.map +1 -0
  350. package/types/lib/parsers/largeJson.d.ts +13 -0
  351. package/types/lib/parsers/largeJson.d.ts.map +1 -1
  352. package/types/lib/parsers/strictJson.d.ts +46 -0
  353. package/types/lib/parsers/strictJson.d.ts.map +1 -0
  354. package/types/lib/parsers/terraformConfig.d.ts +70 -0
  355. package/types/lib/parsers/terraformConfig.d.ts.map +1 -0
  356. package/types/lib/parsers/terraformSource.d.ts +66 -0
  357. package/types/lib/parsers/terraformSource.d.ts.map +1 -0
  358. package/types/lib/server/server.d.ts +8 -0
  359. package/types/lib/server/server.d.ts.map +1 -1
  360. package/types/lib/stages/postgen/annotator.d.ts.map +1 -1
  361. package/types/lib/stages/postgen/introspection/reflect.d.ts.map +1 -1
  362. package/types/lib/stages/postgen/postgen.d.ts.map +1 -1
  363. package/types/lib/stages/postgen/ruleEngine.d.ts +7 -4
  364. package/types/lib/stages/postgen/ruleEngine.d.ts.map +1 -1
  365. package/types/lib/stages/postgen/specVersionCompat.d.ts.map +1 -1
  366. package/types/lib/stages/pregen/pregen.d.ts +14 -1
  367. package/types/lib/stages/pregen/pregen.d.ts.map +1 -1
  368. package/types/lib/validator/bomValidator.d.ts.map +1 -1
  369. package/types/lib/validator/index.d.ts +8 -0
  370. package/types/lib/validator/index.d.ts.map +1 -1
  371. package/types/lib/validator/reporters/json.d.ts.map +1 -1
  372. package/lib/third-party/arborist/snapshots/calc-dep-flags.test.cjs +0 -462
@@ -0,0 +1,631 @@
1
+ /**
2
+ * How a C/C++ project is built: its CMake configure presets, the compilers
3
+ * its compilation database or configured build tree names, the
4
+ * security-hardening options it is compiled and linked with, and which of the
5
+ * headers it includes are its own.
6
+ *
7
+ * The presets and compilers become formulation components, the hardening
8
+ * options properties of the project component, and the project's own include
9
+ * directories let the include analysis tell first-party headers from
10
+ * dependencies.
11
+ *
12
+ * Layer 3: this module reads the build tree and may run a compiler (only
13
+ * `--version`, only outside secure mode, only a GCC, Clang, MSVC, Intel,
14
+ * NVIDIA or EDG driver found on the PATH or named by an absolute path outside
15
+ * the project).
16
+ */
17
+
18
+ import {
19
+ accessSync,
20
+ constants,
21
+ readdirSync,
22
+ readFileSync,
23
+ realpathSync,
24
+ statSync,
25
+ } from "node:fs";
26
+ import {
27
+ basename,
28
+ delimiter,
29
+ isAbsolute,
30
+ join,
31
+ relative,
32
+ resolve,
33
+ } from "node:path";
34
+
35
+ import {
36
+ DEBUG_MODE,
37
+ isSecureMode,
38
+ readEnvironmentVariable,
39
+ } from "../core/activity.js";
40
+ import { safeExistsSync, safeSpawnSync } from "../core/fs.js";
41
+ import { isWin } from "../core/paths.js";
42
+ import { findCompileCommands } from "../inventory/atomUtils.js";
43
+ import {
44
+ isInsideDir,
45
+ readCmakeConfigurePresets,
46
+ } from "../inventory/cmakeBuildDirs.js";
47
+ import {
48
+ parseCmakeCache,
49
+ parseCmakeCompilerFile,
50
+ } from "../parsers/cmakeCache.js";
51
+ import {
52
+ classifyCompilerBanner,
53
+ hardeningSettings,
54
+ splitPosixCommand,
55
+ summarizeCompileDatabase,
56
+ } from "../parsers/compileCommands.js";
57
+ import { readJsonFile } from "../parsers/largeJson.js";
58
+ import { detectCmakeBuildDir } from "./cmakeResolver.js";
59
+
60
+ /** At most this many distinct compilers are asked for their version. */
61
+ const MAX_VERSION_QUERIES = 16;
62
+
63
+ /** A version query that has not answered by then is abandoned. */
64
+ const VERSION_QUERY_TIMEOUT_MS = 20000;
65
+
66
+ /** Cache variables whose flags describe how every unit is compiled or linked. */
67
+ const CACHE_FLAG_VARIABLES = [
68
+ "CMAKE_C_FLAGS",
69
+ "CMAKE_CXX_FLAGS",
70
+ "CMAKE_EXE_LINKER_FLAGS",
71
+ "CMAKE_SHARED_LINKER_FLAGS",
72
+ ];
73
+
74
+ /** Hardening settings decided at link time, which a compilation database cannot show. */
75
+ const LINK_TIME_SETTINGS = new Set(["relro"]);
76
+
77
+ const EMPTY_CONTEXT = Object.freeze({
78
+ formulationComponents: [],
79
+ parentProperties: [],
80
+ firstPartyIncludeDirs: [],
81
+ compileDatabase: undefined,
82
+ isFirstPartyHeader: () => false,
83
+ });
84
+
85
+ /**
86
+ * The empty build context, for scans that are not of a source tree.
87
+ *
88
+ * @returns {Object}
89
+ */
90
+ export function emptyCppBuildContext() {
91
+ return EMPTY_CONTEXT;
92
+ }
93
+
94
+ function isDirectory(p) {
95
+ try {
96
+ return statSync(p).isDirectory();
97
+ } catch (_err) {
98
+ return false;
99
+ }
100
+ }
101
+
102
+ function repoRelative(p, root) {
103
+ if (!p || !isInsideDir(p, root)) {
104
+ return undefined;
105
+ }
106
+ return relative(root, resolve(p)).split("\\").join("/") || ".";
107
+ }
108
+
109
+ function isTruthyCmake(value) {
110
+ return ["1", "ON", "YES", "TRUE", "Y"].includes(
111
+ `${value ?? ""}`.toUpperCase(),
112
+ );
113
+ }
114
+
115
+ function flagWords(value) {
116
+ if (!value) {
117
+ return [];
118
+ }
119
+ return value.includes('"') || value.includes("'")
120
+ ? splitPosixCommand(value)
121
+ : value.split(/\s+/).filter(Boolean);
122
+ }
123
+
124
+ /** Hardening settings spelled by CMake flag variables. */
125
+ function hardeningOfFlagVariables(variables) {
126
+ const words = [];
127
+ for (const name of CACHE_FLAG_VARIABLES) {
128
+ words.push(...flagWords(variables[name]));
129
+ }
130
+ const buildType = `${variables.CMAKE_BUILD_TYPE || ""}`.toUpperCase();
131
+ if (buildType) {
132
+ for (const name of CACHE_FLAG_VARIABLES) {
133
+ words.push(...flagWords(variables[`${name}_${buildType}`]));
134
+ }
135
+ }
136
+ return hardeningSettings(words);
137
+ }
138
+
139
+ function hardeningProperties(settings, prefix = "cdx:cpp:hardening:") {
140
+ return [...settings.entries()]
141
+ .sort(([a], [b]) => a.localeCompare(b))
142
+ .map(([setting, value]) => ({ name: `${prefix}${setting}`, value }));
143
+ }
144
+
145
+ /** A configure preset as a formulation component. */
146
+ function presetComponent(preset, root) {
147
+ const properties = [];
148
+ const add = (name, value) => {
149
+ if (value !== undefined && value !== null && `${value}`.length) {
150
+ properties.push({ name, value: `${value}` });
151
+ }
152
+ };
153
+ const vars = preset.cacheVariables || {};
154
+ const env = preset.environment || {};
155
+ add(
156
+ "cdx:cmake:preset:file",
157
+ repoRelative(preset.file, root) || basename(preset.file || ""),
158
+ );
159
+ add("cdx:cmake:preset:inherits", preset.inherits?.join(","));
160
+ add("cdx:cmake:preset:generator", preset.generator);
161
+ add("cdx:cmake:preset:binaryDir", repoRelative(preset.binaryDir, root));
162
+ add("cdx:cmake:preset:buildType", vars.CMAKE_BUILD_TYPE);
163
+ const compilerName = (v) =>
164
+ v ? basename(`${v}`.replaceAll("\\", "/")) : undefined;
165
+ add(
166
+ "cdx:cmake:preset:cCompiler",
167
+ compilerName(vars.CMAKE_C_COMPILER || env.CC),
168
+ );
169
+ add(
170
+ "cdx:cmake:preset:cxxCompiler",
171
+ compilerName(vars.CMAKE_CXX_COMPILER || env.CXX),
172
+ );
173
+ if (preset.toolchainFile) {
174
+ const toolchain = isAbsolute(preset.toolchainFile)
175
+ ? preset.toolchainFile
176
+ : join(root, preset.toolchainFile);
177
+ add(
178
+ "cdx:cmake:preset:toolchainFile",
179
+ repoRelative(toolchain, root) ||
180
+ basename(preset.toolchainFile.replaceAll("\\", "/")),
181
+ );
182
+ if (
183
+ basename(preset.toolchainFile.replaceAll("\\", "/")) === "vcpkg.cmake"
184
+ ) {
185
+ add("cdx:cmake:preset:vcpkg", "true");
186
+ }
187
+ }
188
+ add("cdx:cmake:preset:vcpkgTriplet", vars.VCPKG_TARGET_TRIPLET);
189
+ if (isTruthyCmake(vars.CMAKE_EXPORT_COMPILE_COMMANDS)) {
190
+ add("cdx:cmake:preset:exportCompileCommands", "true");
191
+ }
192
+ if (preset.hasCondition) {
193
+ add(
194
+ "cdx:cmake:preset:hostCondition",
195
+ preset.conditionMet === true
196
+ ? "met"
197
+ : preset.conditionMet === false
198
+ ? "unmet"
199
+ : "unknown",
200
+ );
201
+ }
202
+ properties.push(...hardeningProperties(hardeningOfFlagVariables(vars)));
203
+ const component = {
204
+ type: "data",
205
+ name: preset.name,
206
+ "bom-ref": `cmake-preset:${preset.name}`,
207
+ properties,
208
+ };
209
+ if (preset.displayName) {
210
+ component.description = preset.displayName;
211
+ }
212
+ return component;
213
+ }
214
+
215
+ /** The compiler descriptions CMake wrote into a configured build tree. */
216
+ function cmakeCompilerFacts(buildDir) {
217
+ const facts = [];
218
+ const filesDir = join(buildDir, "CMakeFiles");
219
+ let versionDirs = [];
220
+ try {
221
+ versionDirs = readdirSync(filesDir, { withFileTypes: true })
222
+ .filter((e) => e.isDirectory() && /^\d/.test(e.name))
223
+ .map((e) => join(filesDir, e.name));
224
+ } catch (_err) {
225
+ return facts;
226
+ }
227
+ for (const dir of versionDirs) {
228
+ let names = [];
229
+ try {
230
+ names = readdirSync(dir).filter(
231
+ (n) => n.startsWith("CMake") && n.endsWith("Compiler.cmake"),
232
+ );
233
+ } catch (_err) {
234
+ continue;
235
+ }
236
+ for (const name of names.sort()) {
237
+ let text;
238
+ try {
239
+ text = readFileSync(join(dir, name), "utf-8");
240
+ } catch (_err) {
241
+ continue;
242
+ }
243
+ const fact = parseCmakeCompilerFile(text);
244
+ if (fact) {
245
+ facts.push(fact);
246
+ }
247
+ }
248
+ }
249
+ return facts;
250
+ }
251
+
252
+ /**
253
+ * The executable a driver names, when it may be run: an absolute path, or a
254
+ * command found on the PATH, that is a file outside the project. A relative
255
+ * path, or anything inside the project tree, is never run, since a
256
+ * compilation database can come with the code it describes.
257
+ */
258
+ export function trustedCompilerPath(driver, root) {
259
+ if (!driver) {
260
+ return undefined;
261
+ }
262
+ // compare real paths: the project may be reached through a symbolic link
263
+ // (macOS's /var is /private/var)
264
+ let realRoot = resolve(root);
265
+ try {
266
+ realRoot = realpathSync(realRoot);
267
+ } catch (_err) {
268
+ // a root that does not exist contains nothing
269
+ }
270
+ let candidates;
271
+ if (isAbsolute(driver)) {
272
+ candidates = [driver];
273
+ } else if (!driver.includes("/") && !driver.includes("\\")) {
274
+ const suffixes = isWin ? ["", ".exe"] : [""];
275
+ candidates = `${readEnvironmentVariable("PATH") || ""}`
276
+ .split(delimiter)
277
+ .filter(Boolean)
278
+ .flatMap((dir) => suffixes.map((s) => join(dir, driver + s)));
279
+ } else {
280
+ return undefined;
281
+ }
282
+ for (const candidate of candidates) {
283
+ try {
284
+ if (!statSync(candidate).isFile()) {
285
+ continue;
286
+ }
287
+ const real = realpathSync(candidate);
288
+ if (isInsideDir(real, realRoot) || isInsideDir(candidate, root)) {
289
+ continue;
290
+ }
291
+ if (!isWin) {
292
+ accessSync(real, constants.X_OK);
293
+ }
294
+ return real;
295
+ } catch (_err) {
296
+ // not this one
297
+ }
298
+ }
299
+ return undefined;
300
+ }
301
+
302
+ /** Ask a compiler what it is. */
303
+ function queryCompilerBanner(executable, family) {
304
+ const result = safeSpawnSync(
305
+ executable,
306
+ family === "msvc" ? [] : ["--version"],
307
+ {
308
+ encoding: "utf-8",
309
+ timeout: VERSION_QUERY_TIMEOUT_MS,
310
+ maxBuffer: 1024 * 1024,
311
+ },
312
+ );
313
+ const text = `${result?.stdout || ""}\n${result?.stderr || ""}`.trim();
314
+ return text.length ? text : undefined;
315
+ }
316
+
317
+ function compilerComponent(entry) {
318
+ const properties = [
319
+ { name: "cdx:cpp:compiler:family", value: entry.family },
320
+ {
321
+ name: "cdx:cpp:compiler:drivers",
322
+ value: [...entry.drivers].sort().join(","),
323
+ },
324
+ { name: "cdx:cpp:compiler:identifiedBy", value: entry.identifiedBy },
325
+ ];
326
+ if (entry.languages.size) {
327
+ properties.push({
328
+ name: "cdx:cpp:compiler:languages",
329
+ value: [...entry.languages].sort().join(","),
330
+ });
331
+ }
332
+ if (entry.units) {
333
+ properties.push({
334
+ name: "cdx:cpp:compiler:units",
335
+ value: `${entry.units}`,
336
+ });
337
+ }
338
+ if (entry.edgFrontEnd) {
339
+ properties.push({ name: "cdx:cpp:frontend", value: "edg" });
340
+ }
341
+ const component = {
342
+ type: "platform",
343
+ name: entry.family,
344
+ "bom-ref": `cpp-compiler:${entry.family}@${entry.version || "unknown"}`,
345
+ properties,
346
+ };
347
+ if (entry.version) {
348
+ component.version = entry.version;
349
+ }
350
+ return component;
351
+ }
352
+
353
+ const CMAKE_LANGUAGES = {
354
+ C: "c",
355
+ CXX: "c++",
356
+ CUDA: "cuda",
357
+ OBJC: "objc",
358
+ OBJCXX: "objc++",
359
+ };
360
+
361
+ /**
362
+ * Identify the compilers of a build, from CMake's own descriptions where the
363
+ * build tree has them and otherwise by asking the compiler.
364
+ */
365
+ function identifyCompilers(summary, cmakeFacts, root) {
366
+ const byKey = new Map();
367
+ const note = (family, version, fields) => {
368
+ const key = `${family}@${version || ""}`;
369
+ const entry = byKey.get(key) || {
370
+ family,
371
+ version,
372
+ drivers: new Set(),
373
+ languages: new Set(),
374
+ units: 0,
375
+ identifiedBy: fields.identifiedBy,
376
+ edgFrontEnd: false,
377
+ };
378
+ if (fields.driver) {
379
+ entry.drivers.add(basename(fields.driver.replaceAll("\\", "/")));
380
+ }
381
+ for (const l of fields.languages || []) {
382
+ entry.languages.add(l);
383
+ }
384
+ entry.units += fields.units || 0;
385
+ entry.edgFrontEnd = entry.edgFrontEnd || !!fields.edgFrontEnd;
386
+ byKey.set(key, entry);
387
+ };
388
+ const cmakeByPath = new Map();
389
+ for (const fact of cmakeFacts) {
390
+ let real = fact.compiler;
391
+ try {
392
+ real = realpathSync(fact.compiler);
393
+ } catch (_err) {
394
+ // a build tree from another machine
395
+ }
396
+ cmakeByPath.set(real, fact);
397
+ note(fact.family, fact.version, {
398
+ identifiedBy: "cmake",
399
+ driver: fact.compiler,
400
+ languages: [
401
+ CMAKE_LANGUAGES[fact.language] || fact.language.toLowerCase(),
402
+ ],
403
+ });
404
+ }
405
+ let queries = 0;
406
+ for (const compiler of summary?.compilers?.values() || []) {
407
+ const located = trustedCompilerPath(compiler.driver, root);
408
+ const known = located && cmakeByPath.get(located);
409
+ if (known) {
410
+ note(known.family, known.version, {
411
+ identifiedBy: "cmake",
412
+ driver: compiler.driver,
413
+ languages: compiler.languages,
414
+ units: compiler.units,
415
+ });
416
+ continue;
417
+ }
418
+ let banner;
419
+ if (
420
+ !isSecureMode &&
421
+ located &&
422
+ compiler.family !== "unknown" &&
423
+ queries < MAX_VERSION_QUERIES
424
+ ) {
425
+ queries++;
426
+ banner = queryCompilerBanner(located, compiler.family);
427
+ }
428
+ if (banner) {
429
+ const { family, version, edgFrontEnd } = classifyCompilerBanner(
430
+ banner,
431
+ compiler.family,
432
+ );
433
+ note(family, version, {
434
+ identifiedBy: "version-query",
435
+ driver: compiler.driver,
436
+ languages: compiler.languages,
437
+ units: compiler.units,
438
+ edgFrontEnd,
439
+ });
440
+ } else {
441
+ note(compiler.family, undefined, {
442
+ identifiedBy: "name",
443
+ driver: compiler.driver,
444
+ languages: compiler.languages,
445
+ units: compiler.units,
446
+ });
447
+ }
448
+ }
449
+ return [...byKey.values()].map(compilerComponent);
450
+ }
451
+
452
+ /** The most common value of each hardening setting, with the units it covers. */
453
+ function databaseHardening(summary) {
454
+ const properties = [];
455
+ for (const [setting, counts] of [...summary.hardening.entries()].sort(
456
+ ([a], [b]) => a.localeCompare(b),
457
+ )) {
458
+ const [value, units] = [...counts.entries()].sort(
459
+ ([va, a], [vb, b]) => b - a || va.localeCompare(vb),
460
+ )[0];
461
+ properties.push({ name: `cdx:cpp:hardening:${setting}`, value });
462
+ properties.push({
463
+ name: `cdx:cpp:hardening:${setting}:units`,
464
+ value: `${units}`,
465
+ });
466
+ }
467
+ return properties;
468
+ }
469
+
470
+ /**
471
+ * Resolve the build context of a C/C++ project.
472
+ *
473
+ * @param {string} path Project scan root
474
+ * @param {Object} options CLI options
475
+ * @param {Object} [cmakeContext] The CMake context (`boundaries` lists the
476
+ * source directories of fetched and submodule dependencies)
477
+ * @param {string[]} [vendoredDirs] Directories of code the project carries
478
+ * under another license; their headers are not the project's own
479
+ * @returns {{
480
+ * formulationComponents: Object[],
481
+ * parentProperties: Object[],
482
+ * firstPartyIncludeDirs: string[],
483
+ * compileDatabase: string|undefined,
484
+ * isFirstPartyHeader: function(string): boolean,
485
+ * }}
486
+ */
487
+ export function resolveCppBuildContext(
488
+ path,
489
+ options = {},
490
+ cmakeContext = undefined,
491
+ vendoredDirs = [],
492
+ ) {
493
+ const root = resolve(path);
494
+ let isDir = false;
495
+ try {
496
+ isDir = statSync(root).isDirectory();
497
+ } catch (_err) {
498
+ isDir = false;
499
+ }
500
+ if (!isDir) {
501
+ return EMPTY_CONTEXT;
502
+ }
503
+ const formulationComponents = [];
504
+ const parentProperties = [];
505
+ const presets = readCmakeConfigurePresets(root);
506
+ for (const preset of presets) {
507
+ formulationComponents.push(presetComponent(preset, root));
508
+ }
509
+ const detected = detectCmakeBuildDir(root, options);
510
+ let cacheVariables = {};
511
+ if (detected) {
512
+ try {
513
+ for (const [key, entry] of parseCmakeCache(
514
+ readFileSync(detected.cacheFile, "utf-8"),
515
+ )) {
516
+ cacheVariables[key] = entry.value;
517
+ }
518
+ } catch (_err) {
519
+ cacheVariables = {};
520
+ }
521
+ if (cacheVariables.CMAKE_BUILD_TYPE) {
522
+ parentProperties.push({
523
+ name: "cdx:cmake:buildType",
524
+ value: cacheVariables.CMAKE_BUILD_TYPE,
525
+ });
526
+ }
527
+ }
528
+ const compileDatabase = findCompileCommands(root, options);
529
+ let summary;
530
+ if (compileDatabase) {
531
+ try {
532
+ summary = summarizeCompileDatabase(readJsonFile(compileDatabase));
533
+ } catch (err) {
534
+ if (DEBUG_MODE) {
535
+ console.log(
536
+ `Unable to read the compilation database ${compileDatabase}: ${err.message}`,
537
+ );
538
+ }
539
+ }
540
+ }
541
+ const cmakeFacts = detected ? cmakeCompilerFacts(detected.buildDir) : [];
542
+ formulationComponents.push(...identifyCompilers(summary, cmakeFacts, root));
543
+ const sources = [];
544
+ const cacheHardening = hardeningOfFlagVariables(cacheVariables);
545
+ if (summary?.units) {
546
+ parentProperties.push({
547
+ name: "cdx:cpp:compileCommands:units",
548
+ value: `${summary.units}`,
549
+ });
550
+ const fromDatabase = databaseHardening(summary);
551
+ if (fromDatabase.length) {
552
+ sources.push("compile-commands");
553
+ parentProperties.push(...fromDatabase);
554
+ }
555
+ const linkTime = new Map(
556
+ [...cacheHardening].filter(([setting]) =>
557
+ LINK_TIME_SETTINGS.has(setting),
558
+ ),
559
+ );
560
+ if (linkTime.size) {
561
+ sources.push("cmake-cache");
562
+ parentProperties.push(...hardeningProperties(linkTime));
563
+ }
564
+ } else if (cacheHardening.size) {
565
+ sources.push("cmake-cache");
566
+ parentProperties.push(...hardeningProperties(cacheHardening));
567
+ }
568
+ if (sources.length) {
569
+ parentProperties.push({
570
+ name: "cdx:cpp:hardening:source",
571
+ value: sources.join(","),
572
+ });
573
+ }
574
+ // paths are compared as real paths: the project may be reached through a
575
+ // symbolic link, and atom reports the headers it resolved by real path
576
+ const real = (p) => {
577
+ try {
578
+ return realpathSync(p);
579
+ } catch (_err) {
580
+ return resolve(p);
581
+ }
582
+ };
583
+ const realRoot = real(root);
584
+ const dependencyDirs = [];
585
+ for (const [dir, entry] of cmakeContext?.boundaries || []) {
586
+ if (entry?.kind === "fetch" || entry?.kind === "submodule") {
587
+ dependencyDirs.push(real(resolve(root, dir)));
588
+ }
589
+ }
590
+ for (const dir of vendoredDirs || []) {
591
+ dependencyDirs.push(real(resolve(root, dir)));
592
+ }
593
+ const isOwnPath = (p) => {
594
+ const r = real(p);
595
+ return (
596
+ isInsideDir(r, realRoot) && !dependencyDirs.some((d) => isInsideDir(r, d))
597
+ );
598
+ };
599
+ const firstPartyIncludeDirs = [...(summary?.includeDirectories || [])].filter(
600
+ (d) => isDirectory(d) && isOwnPath(d),
601
+ );
602
+ // the project root, its database's include directories, and the include/
603
+ // and src/ directories most projects keep their own headers in, which is
604
+ // all there is to go on without a database
605
+ const searchDirs = [
606
+ ...new Set([
607
+ root,
608
+ ...firstPartyIncludeDirs,
609
+ ...[join(root, "include"), join(root, "src")].filter(
610
+ (d) => isDirectory(d) && isOwnPath(d),
611
+ ),
612
+ ]),
613
+ ];
614
+ const isFirstPartyHeader = (header) => {
615
+ if (!header) {
616
+ return false;
617
+ }
618
+ const normalized = `${header}`.replaceAll("\\", "/");
619
+ const candidates = isAbsolute(normalized)
620
+ ? [normalized]
621
+ : searchDirs.map((d) => join(d, normalized));
622
+ return candidates.some((c) => safeExistsSync(c) && isOwnPath(c));
623
+ };
624
+ return {
625
+ formulationComponents,
626
+ parentProperties,
627
+ firstPartyIncludeDirs,
628
+ compileDatabase,
629
+ isFirstPartyHeader,
630
+ };
631
+ }