@dxworks/insider 2.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (385) hide show
  1. package/.github/workflows/build.yml +19 -0
  2. package/.github/workflows/release-docs.yml +15 -0
  3. package/.github/workflows/release-voyager.yml +57 -0
  4. package/.github/workflows/release.yml +102 -0
  5. package/Dockerfile +8 -0
  6. package/README.md +89 -0
  7. package/TODO.txt +7 -0
  8. package/bin/insider.bat +1 -0
  9. package/bin/insider.sh +1 -0
  10. package/build.gradle +55 -0
  11. package/config/.ignore +4 -0
  12. package/config/comments.json +71 -0
  13. package/config/fingerprints/_anomalies-full.json +116 -0
  14. package/config/fingerprints/_extLibs.json +2555 -0
  15. package/config/fingerprints/code_smells.json +94 -0
  16. package/config/fingerprints/generated_code.json +17 -0
  17. package/config/fingerprints/libraries.json +4667 -0
  18. package/config/ignoredImports.txt +0 -0
  19. package/config/insider-conf.properties +3 -0
  20. package/config/rules/cloud_services/ad_networks.json +50 -0
  21. package/config/rules/cloud_services/bigdata.json +21 -0
  22. package/config/rules/cloud_services/cloud_hosting.json +398 -0
  23. package/config/rules/cloud_services/data_storage.json +291 -0
  24. package/config/rules/cloud_services/ecommerce.json +45 -0
  25. package/config/rules/cloud_services/socialmedia.json +82 -0
  26. package/config/rules/cloud_services/web_analytics.json +108 -0
  27. package/config/rules/components/active_content.json +157 -0
  28. package/config/rules/components/load_dll.json +66 -0
  29. package/config/rules/cryptography/algorithm_implementation.json +62 -0
  30. package/config/rules/cryptography/certificate.json +199 -0
  31. package/config/rules/cryptography/ciphers.json +174 -0
  32. package/config/rules/cryptography/crypto_currency.json +32 -0
  33. package/config/rules/cryptography/encoding.json +20 -0
  34. package/config/rules/cryptography/extended.json +220 -0
  35. package/config/rules/cryptography/external_libraries.json +141 -0
  36. package/config/rules/cryptography/hash_algorithm.json +98 -0
  37. package/config/rules/cryptography/key_derivation.json +65 -0
  38. package/config/rules/cryptography/protocol.json +156 -0
  39. package/config/rules/cryptography/random.json +97 -0
  40. package/config/rules/cryptography/weakssl.json +206 -0
  41. package/config/rules/data_handling/compressed_files.json +18 -0
  42. package/config/rules/data_handling/database.json +361 -0
  43. package/config/rules/data_handling/deserialization.json +296 -0
  44. package/config/rules/data_handling/json_parsing.json +49 -0
  45. package/config/rules/data_handling/media_parsing.json +33 -0
  46. package/config/rules/data_handling/pastebin.json +18 -0
  47. package/config/rules/data_handling/xml_parsing.json +168 -0
  48. package/config/rules/data_types/financial.json +106 -0
  49. package/config/rules/data_types/media.json +48 -0
  50. package/config/rules/data_types/secrets.json +91 -0
  51. package/config/rules/data_types/sensitive.json +176 -0
  52. package/config/rules/device_permissions/IOSPermissions.json +240 -0
  53. package/config/rules/device_permissions/UWP.json +221 -0
  54. package/config/rules/device_permissions/android_intents.json +599 -0
  55. package/config/rules/frameworks/PHP.json +172 -0
  56. package/config/rules/frameworks/build.json +189 -0
  57. package/config/rules/frameworks/c.json +45 -0
  58. package/config/rules/frameworks/csharp-nonMS.json +19 -0
  59. package/config/rules/frameworks/java.json +291 -0
  60. package/config/rules/frameworks/javascript.json +318 -0
  61. package/config/rules/frameworks/logging.json +103 -0
  62. package/config/rules/frameworks/microsoft.json +257 -0
  63. package/config/rules/frameworks/python.json +274 -0
  64. package/config/rules/frameworks/ruby.json +53 -0
  65. package/config/rules/frameworks/rust.json +77 -0
  66. package/config/rules/general/OSS_license.json +146 -0
  67. package/config/rules/general/code_metrics.json +132 -0
  68. package/config/rules/general/dependencies.json +199 -0
  69. package/config/rules/general/hygiene.json +47 -0
  70. package/config/rules/general/platforms.json +283 -0
  71. package/config/rules/general/solutioninfo.json +378 -0
  72. package/config/rules/infrastructure/hashicorp_packers_tmpl.json +18 -0
  73. package/config/rules/infrastructure/hashicorp_terraform_tmpl.json +19 -0
  74. package/config/rules/infrastructure/microsoft_arm_tmpl.json +198 -0
  75. package/config/rules/networkcomms/outbound_network.json +429 -0
  76. package/config/rules/os/acl.json +250 -0
  77. package/config/rules/os/dynamic_execution.json +359 -0
  78. package/config/rules/os/file_io.json +468 -0
  79. package/config/rules/os/process.json +179 -0
  80. package/config/rules/os/setenv.json +270 -0
  81. package/config/rules/os/system_registry.json +237 -0
  82. package/config/rules/os/user_accts.json +34 -0
  83. package/config/rules/security_feature/authentication.json +387 -0
  84. package/config/rules/security_feature/authorization.json +148 -0
  85. package/config/rules/test_frameworks/cpp_testing.json +194 -0
  86. package/config/rules/test_frameworks/go_testing.json +18 -0
  87. package/config/rules/test_frameworks/java_testing.json +720 -0
  88. package/config/rules/test_frameworks/javascript_testing.json +724 -0
  89. package/config/rules/test_frameworks/objectiveC_testing.json +146 -0
  90. package/config/rules/test_frameworks/php_testing.json +156 -0
  91. package/config/rules/test_frameworks/powershell_testing.json +17 -0
  92. package/config/rules/test_frameworks/python_testing.json +108 -0
  93. package/config/rules/test_frameworks/ruby_testing.json +114 -0
  94. package/config/rules/tools/pipeline.json +195 -0
  95. package/config/rules/webapp/comms.json +89 -0
  96. package/config/rules/webapp/headers.json +178 -0
  97. package/config/rules/webapp/media.json +56 -0
  98. package/config/rules/webapp/sessions.json +228 -0
  99. package/config/rules/webapp/storage.json +215 -0
  100. package/dist/config/.ignore +4 -0
  101. package/dist/config/comments.json +71 -0
  102. package/dist/config/fingerprints/_anomalies-full.json +116 -0
  103. package/dist/config/fingerprints/_extLibs.json +2555 -0
  104. package/dist/config/fingerprints/code_smells.json +94 -0
  105. package/dist/config/fingerprints/generated_code.json +17 -0
  106. package/dist/config/fingerprints/libraries.json +4667 -0
  107. package/dist/config/ignoredImports.txt +0 -0
  108. package/dist/config/insider-conf.properties +3 -0
  109. package/dist/config/rules/cloud_services/ad_networks.json +50 -0
  110. package/dist/config/rules/cloud_services/bigdata.json +21 -0
  111. package/dist/config/rules/cloud_services/cloud_hosting.json +398 -0
  112. package/dist/config/rules/cloud_services/data_storage.json +291 -0
  113. package/dist/config/rules/cloud_services/ecommerce.json +45 -0
  114. package/dist/config/rules/cloud_services/socialmedia.json +82 -0
  115. package/dist/config/rules/cloud_services/web_analytics.json +108 -0
  116. package/dist/config/rules/components/active_content.json +157 -0
  117. package/dist/config/rules/components/load_dll.json +66 -0
  118. package/dist/config/rules/cryptography/algorithm_implementation.json +62 -0
  119. package/dist/config/rules/cryptography/certificate.json +199 -0
  120. package/dist/config/rules/cryptography/ciphers.json +174 -0
  121. package/dist/config/rules/cryptography/crypto_currency.json +32 -0
  122. package/dist/config/rules/cryptography/encoding.json +20 -0
  123. package/dist/config/rules/cryptography/extended.json +220 -0
  124. package/dist/config/rules/cryptography/external_libraries.json +141 -0
  125. package/dist/config/rules/cryptography/hash_algorithm.json +98 -0
  126. package/dist/config/rules/cryptography/key_derivation.json +65 -0
  127. package/dist/config/rules/cryptography/protocol.json +156 -0
  128. package/dist/config/rules/cryptography/random.json +97 -0
  129. package/dist/config/rules/cryptography/weakssl.json +206 -0
  130. package/dist/config/rules/data_handling/compressed_files.json +18 -0
  131. package/dist/config/rules/data_handling/database.json +361 -0
  132. package/dist/config/rules/data_handling/deserialization.json +296 -0
  133. package/dist/config/rules/data_handling/json_parsing.json +49 -0
  134. package/dist/config/rules/data_handling/media_parsing.json +33 -0
  135. package/dist/config/rules/data_handling/pastebin.json +18 -0
  136. package/dist/config/rules/data_handling/xml_parsing.json +168 -0
  137. package/dist/config/rules/data_types/financial.json +106 -0
  138. package/dist/config/rules/data_types/media.json +48 -0
  139. package/dist/config/rules/data_types/secrets.json +91 -0
  140. package/dist/config/rules/data_types/sensitive.json +176 -0
  141. package/dist/config/rules/device_permissions/IOSPermissions.json +240 -0
  142. package/dist/config/rules/device_permissions/UWP.json +221 -0
  143. package/dist/config/rules/device_permissions/android_intents.json +599 -0
  144. package/dist/config/rules/frameworks/PHP.json +172 -0
  145. package/dist/config/rules/frameworks/build.json +189 -0
  146. package/dist/config/rules/frameworks/c.json +45 -0
  147. package/dist/config/rules/frameworks/csharp-nonMS.json +19 -0
  148. package/dist/config/rules/frameworks/java.json +291 -0
  149. package/dist/config/rules/frameworks/javascript.json +318 -0
  150. package/dist/config/rules/frameworks/logging.json +103 -0
  151. package/dist/config/rules/frameworks/microsoft.json +257 -0
  152. package/dist/config/rules/frameworks/python.json +274 -0
  153. package/dist/config/rules/frameworks/ruby.json +53 -0
  154. package/dist/config/rules/frameworks/rust.json +77 -0
  155. package/dist/config/rules/general/OSS_license.json +146 -0
  156. package/dist/config/rules/general/code_metrics.json +132 -0
  157. package/dist/config/rules/general/dependencies.json +199 -0
  158. package/dist/config/rules/general/hygiene.json +47 -0
  159. package/dist/config/rules/general/platforms.json +283 -0
  160. package/dist/config/rules/general/solutioninfo.json +378 -0
  161. package/dist/config/rules/infrastructure/hashicorp_packers_tmpl.json +18 -0
  162. package/dist/config/rules/infrastructure/hashicorp_terraform_tmpl.json +19 -0
  163. package/dist/config/rules/infrastructure/microsoft_arm_tmpl.json +198 -0
  164. package/dist/config/rules/networkcomms/outbound_network.json +429 -0
  165. package/dist/config/rules/os/acl.json +250 -0
  166. package/dist/config/rules/os/dynamic_execution.json +359 -0
  167. package/dist/config/rules/os/file_io.json +468 -0
  168. package/dist/config/rules/os/process.json +179 -0
  169. package/dist/config/rules/os/setenv.json +270 -0
  170. package/dist/config/rules/os/system_registry.json +237 -0
  171. package/dist/config/rules/os/user_accts.json +34 -0
  172. package/dist/config/rules/security_feature/authentication.json +387 -0
  173. package/dist/config/rules/security_feature/authorization.json +148 -0
  174. package/dist/config/rules/test_frameworks/cpp_testing.json +194 -0
  175. package/dist/config/rules/test_frameworks/go_testing.json +18 -0
  176. package/dist/config/rules/test_frameworks/java_testing.json +720 -0
  177. package/dist/config/rules/test_frameworks/javascript_testing.json +724 -0
  178. package/dist/config/rules/test_frameworks/objectiveC_testing.json +146 -0
  179. package/dist/config/rules/test_frameworks/php_testing.json +156 -0
  180. package/dist/config/rules/test_frameworks/powershell_testing.json +17 -0
  181. package/dist/config/rules/test_frameworks/python_testing.json +108 -0
  182. package/dist/config/rules/test_frameworks/ruby_testing.json +114 -0
  183. package/dist/config/rules/tools/pipeline.json +195 -0
  184. package/dist/config/rules/webapp/comms.json +89 -0
  185. package/dist/config/rules/webapp/headers.json +178 -0
  186. package/dist/config/rules/webapp/media.json +56 -0
  187. package/dist/config/rules/webapp/sessions.json +228 -0
  188. package/dist/config/rules/webapp/storage.json +215 -0
  189. package/dist/index.js +13 -0
  190. package/dist/insider.jar +0 -0
  191. package/dist/insider.js +7 -0
  192. package/dist/lib.js +21 -0
  193. package/docs/config/config.md +3 -0
  194. package/docs/config/ignore.md +3 -0
  195. package/docs/config/languages.md +3 -0
  196. package/docs/index.md +58 -0
  197. package/dxworks-site.json +13 -0
  198. package/gradle.properties +0 -0
  199. package/gradlew +240 -0
  200. package/gradlew.bat +91 -0
  201. package/insider/README.md +89 -0
  202. package/insider/config/.ignore +4 -0
  203. package/insider/config/comments.json +71 -0
  204. package/insider/config/fingerprints/_anomalies-full.json +116 -0
  205. package/insider/config/fingerprints/_extLibs.json +2555 -0
  206. package/insider/config/fingerprints/code_smells.json +94 -0
  207. package/insider/config/fingerprints/generated_code.json +17 -0
  208. package/insider/config/fingerprints/libraries.json +4667 -0
  209. package/insider/config/ignoredImports.txt +0 -0
  210. package/insider/config/insider-conf.properties +3 -0
  211. package/insider/config/rules/cloud_services/ad_networks.json +50 -0
  212. package/insider/config/rules/cloud_services/bigdata.json +21 -0
  213. package/insider/config/rules/cloud_services/cloud_hosting.json +398 -0
  214. package/insider/config/rules/cloud_services/data_storage.json +291 -0
  215. package/insider/config/rules/cloud_services/ecommerce.json +45 -0
  216. package/insider/config/rules/cloud_services/socialmedia.json +82 -0
  217. package/insider/config/rules/cloud_services/web_analytics.json +108 -0
  218. package/insider/config/rules/components/active_content.json +157 -0
  219. package/insider/config/rules/components/load_dll.json +66 -0
  220. package/insider/config/rules/cryptography/algorithm_implementation.json +62 -0
  221. package/insider/config/rules/cryptography/certificate.json +199 -0
  222. package/insider/config/rules/cryptography/ciphers.json +174 -0
  223. package/insider/config/rules/cryptography/crypto_currency.json +32 -0
  224. package/insider/config/rules/cryptography/encoding.json +20 -0
  225. package/insider/config/rules/cryptography/extended.json +220 -0
  226. package/insider/config/rules/cryptography/external_libraries.json +141 -0
  227. package/insider/config/rules/cryptography/hash_algorithm.json +98 -0
  228. package/insider/config/rules/cryptography/key_derivation.json +65 -0
  229. package/insider/config/rules/cryptography/protocol.json +156 -0
  230. package/insider/config/rules/cryptography/random.json +97 -0
  231. package/insider/config/rules/cryptography/weakssl.json +206 -0
  232. package/insider/config/rules/data_handling/compressed_files.json +18 -0
  233. package/insider/config/rules/data_handling/database.json +361 -0
  234. package/insider/config/rules/data_handling/deserialization.json +296 -0
  235. package/insider/config/rules/data_handling/json_parsing.json +49 -0
  236. package/insider/config/rules/data_handling/media_parsing.json +33 -0
  237. package/insider/config/rules/data_handling/pastebin.json +18 -0
  238. package/insider/config/rules/data_handling/xml_parsing.json +168 -0
  239. package/insider/config/rules/data_types/financial.json +106 -0
  240. package/insider/config/rules/data_types/media.json +48 -0
  241. package/insider/config/rules/data_types/secrets.json +91 -0
  242. package/insider/config/rules/data_types/sensitive.json +176 -0
  243. package/insider/config/rules/device_permissions/IOSPermissions.json +240 -0
  244. package/insider/config/rules/device_permissions/UWP.json +221 -0
  245. package/insider/config/rules/device_permissions/android_intents.json +599 -0
  246. package/insider/config/rules/frameworks/PHP.json +172 -0
  247. package/insider/config/rules/frameworks/build.json +189 -0
  248. package/insider/config/rules/frameworks/c.json +45 -0
  249. package/insider/config/rules/frameworks/csharp-nonMS.json +19 -0
  250. package/insider/config/rules/frameworks/java.json +291 -0
  251. package/insider/config/rules/frameworks/javascript.json +318 -0
  252. package/insider/config/rules/frameworks/logging.json +103 -0
  253. package/insider/config/rules/frameworks/microsoft.json +257 -0
  254. package/insider/config/rules/frameworks/python.json +274 -0
  255. package/insider/config/rules/frameworks/ruby.json +53 -0
  256. package/insider/config/rules/frameworks/rust.json +77 -0
  257. package/insider/config/rules/general/OSS_license.json +146 -0
  258. package/insider/config/rules/general/code_metrics.json +132 -0
  259. package/insider/config/rules/general/dependencies.json +199 -0
  260. package/insider/config/rules/general/hygiene.json +47 -0
  261. package/insider/config/rules/general/platforms.json +283 -0
  262. package/insider/config/rules/general/solutioninfo.json +378 -0
  263. package/insider/config/rules/infrastructure/hashicorp_packers_tmpl.json +18 -0
  264. package/insider/config/rules/infrastructure/hashicorp_terraform_tmpl.json +19 -0
  265. package/insider/config/rules/infrastructure/microsoft_arm_tmpl.json +198 -0
  266. package/insider/config/rules/networkcomms/outbound_network.json +429 -0
  267. package/insider/config/rules/os/acl.json +250 -0
  268. package/insider/config/rules/os/dynamic_execution.json +359 -0
  269. package/insider/config/rules/os/file_io.json +468 -0
  270. package/insider/config/rules/os/process.json +179 -0
  271. package/insider/config/rules/os/setenv.json +270 -0
  272. package/insider/config/rules/os/system_registry.json +237 -0
  273. package/insider/config/rules/os/user_accts.json +34 -0
  274. package/insider/config/rules/security_feature/authentication.json +387 -0
  275. package/insider/config/rules/security_feature/authorization.json +148 -0
  276. package/insider/config/rules/test_frameworks/cpp_testing.json +194 -0
  277. package/insider/config/rules/test_frameworks/go_testing.json +18 -0
  278. package/insider/config/rules/test_frameworks/java_testing.json +720 -0
  279. package/insider/config/rules/test_frameworks/javascript_testing.json +724 -0
  280. package/insider/config/rules/test_frameworks/objectiveC_testing.json +146 -0
  281. package/insider/config/rules/test_frameworks/php_testing.json +156 -0
  282. package/insider/config/rules/test_frameworks/powershell_testing.json +17 -0
  283. package/insider/config/rules/test_frameworks/python_testing.json +108 -0
  284. package/insider/config/rules/test_frameworks/ruby_testing.json +114 -0
  285. package/insider/config/rules/tools/pipeline.json +195 -0
  286. package/insider/config/rules/webapp/comms.json +89 -0
  287. package/insider/config/rules/webapp/headers.json +178 -0
  288. package/insider/config/rules/webapp/media.json +56 -0
  289. package/insider/config/rules/webapp/sessions.json +228 -0
  290. package/insider/config/rules/webapp/storage.json +215 -0
  291. package/insider/insider.bat +1 -0
  292. package/insider/insider.jar +0 -0
  293. package/insider/insider.sh +1 -0
  294. package/insider/languages.yml +3988 -0
  295. package/instrument.yml +37 -0
  296. package/languages.yml +3988 -0
  297. package/lib/index.js +13 -0
  298. package/lib/insider.js +7 -0
  299. package/lib/lib.js +21 -0
  300. package/lombok.config +2 -0
  301. package/mkdocs.yml +18 -0
  302. package/package.json +51 -0
  303. package/releaseNotes/v2.6.0.md +1 -0
  304. package/releaseNotes/v2.7.1.md +1 -0
  305. package/settings.gradle +2 -0
  306. package/src/main/java/org/dxworks/insider/ChronosTag.java +14 -0
  307. package/src/main/java/org/dxworks/insider/Insider.java +214 -0
  308. package/src/main/java/org/dxworks/insider/InsiderAnalysis.java +7 -0
  309. package/src/main/java/org/dxworks/insider/InsiderFile.java +125 -0
  310. package/src/main/java/org/dxworks/insider/InsiderOptions.java +78 -0
  311. package/src/main/java/org/dxworks/insider/InsiderResult.java +15 -0
  312. package/src/main/java/org/dxworks/insider/application/inspector/CodeRuleExtractor.java +14 -0
  313. package/src/main/java/org/dxworks/insider/application/inspector/CommentRuleExtractor.java +14 -0
  314. package/src/main/java/org/dxworks/insider/application/inspector/FileRuleExtractor.java +14 -0
  315. package/src/main/java/org/dxworks/insider/application/inspector/RuleExtractor.java +11 -0
  316. package/src/main/java/org/dxworks/insider/application/inspector/dtos/Comment.java +18 -0
  317. package/src/main/java/org/dxworks/insider/application/inspector/dtos/CommentPattern.java +44 -0
  318. package/src/main/java/org/dxworks/insider/application/inspector/dtos/Condition.java +15 -0
  319. package/src/main/java/org/dxworks/insider/application/inspector/dtos/InsiderPattern.java +149 -0
  320. package/src/main/java/org/dxworks/insider/application/inspector/dtos/PatternMatch.java +23 -0
  321. package/src/main/java/org/dxworks/insider/application/inspector/dtos/Rule.java +61 -0
  322. package/src/main/java/org/dxworks/insider/application/inspector/services/CommentService.java +165 -0
  323. package/src/main/java/org/dxworks/insider/application/inspector/services/RuleService.java +54 -0
  324. package/src/main/java/org/dxworks/insider/commands/AddCommand.java +125 -0
  325. package/src/main/java/org/dxworks/insider/commands/AllFilesCommand.java +4 -0
  326. package/src/main/java/org/dxworks/insider/commands/ConvertCommand.java +55 -0
  327. package/src/main/java/org/dxworks/insider/commands/DetectCommand.java +42 -0
  328. package/src/main/java/org/dxworks/insider/commands/DiagnoseCommand.java +74 -0
  329. package/src/main/java/org/dxworks/insider/commands/ExtractCommand.java +35 -0
  330. package/src/main/java/org/dxworks/insider/commands/FindCommand.java +102 -0
  331. package/src/main/java/org/dxworks/insider/commands/HelpCommand.java +56 -0
  332. package/src/main/java/org/dxworks/insider/commands/IndentationCount.java +69 -0
  333. package/src/main/java/org/dxworks/insider/commands/InsiderCommand.java +71 -0
  334. package/src/main/java/org/dxworks/insider/commands/InspectCommand.java +98 -0
  335. package/src/main/java/org/dxworks/insider/commands/MeasureCommand.java +47 -0
  336. package/src/main/java/org/dxworks/insider/commands/NoFilesCommand.java +4 -0
  337. package/src/main/java/org/dxworks/insider/commands/VersionCommand.java +34 -0
  338. package/src/main/java/org/dxworks/insider/configuration/InsiderConfiguration.java +123 -0
  339. package/src/main/java/org/dxworks/insider/constants/InsiderConstants.java +19 -0
  340. package/src/main/java/org/dxworks/insider/depext/AbstractImportsProcessor.java +57 -0
  341. package/src/main/java/org/dxworks/insider/depext/CPPImportsProcessor.java +55 -0
  342. package/src/main/java/org/dxworks/insider/depext/CSharpImportsProcessor.java +53 -0
  343. package/src/main/java/org/dxworks/insider/depext/DependencyExtractor.java +105 -0
  344. package/src/main/java/org/dxworks/insider/depext/ImportItem.java +19 -0
  345. package/src/main/java/org/dxworks/insider/depext/ImportResult.java +32 -0
  346. package/src/main/java/org/dxworks/insider/depext/JavastackImportsProcessor.java +88 -0
  347. package/src/main/java/org/dxworks/insider/depext/VBImportsProcessor.java +41 -0
  348. package/src/main/java/org/dxworks/insider/exceptions/InsiderException.java +7 -0
  349. package/src/main/java/org/dxworks/insider/library/detector/C_ImportsContainer.java +73 -0
  350. package/src/main/java/org/dxworks/insider/library/detector/ImportsContainer.java +122 -0
  351. package/src/main/java/org/dxworks/insider/library/detector/JavaImportsContainer.java +63 -0
  352. package/src/main/java/org/dxworks/insider/library/detector/LibraryDetector.java +150 -0
  353. package/src/main/java/org/dxworks/insider/library/detector/LibraryDetectorLanguage.java +6 -0
  354. package/src/main/java/org/dxworks/insider/library/detector/model/PackagingUnit.java +26 -0
  355. package/src/main/java/org/dxworks/insider/technology/finder/LinguistService.java +79 -0
  356. package/src/main/java/org/dxworks/insider/technology/finder/converters/XmlToJsonConverter.java +41 -0
  357. package/src/main/java/org/dxworks/insider/technology/finder/exceptions/FingerprintParseException.java +7 -0
  358. package/src/main/java/org/dxworks/insider/technology/finder/model/Technology.java +73 -0
  359. package/src/main/java/org/dxworks/insider/technology/finder/model/json/JsonConfigurationDTO.java +14 -0
  360. package/src/main/java/org/dxworks/insider/technology/finder/model/json/TechnologyJsonDTO.java +66 -0
  361. package/src/main/java/org/dxworks/insider/technology/finder/model/xml/old/CategoryXmlDTO.java +21 -0
  362. package/src/main/java/org/dxworks/insider/technology/finder/model/xml/old/ConfigurationDataXmlDTO.java +17 -0
  363. package/src/main/java/org/dxworks/insider/technology/finder/model/xml/old/FingerprintXmlDTO.java +17 -0
  364. package/src/main/java/org/dxworks/insider/technology/finder/model/xml/old/LanguageXmlDTO.java +20 -0
  365. package/src/main/java/org/dxworks/insider/technology/finder/model/xml/old/LanguagesXmlDTO.java +18 -0
  366. package/src/main/java/org/dxworks/insider/technology/finder/model/xml/old/TechnologyXmlDTO.java +19 -0
  367. package/src/main/java/org/dxworks/insider/technology/finder/model/xml/old/XmlConfigurationDTO.java +17 -0
  368. package/src/main/java/org/dxworks/insider/technology/finder/parsers/FingerprintsParser.java +14 -0
  369. package/src/main/java/org/dxworks/insider/technology/finder/parsers/FingerprintsXmlParser.java +57 -0
  370. package/src/main/java/org/dxworks/insider/technology/finder/parsers/JavaLibrariesCsvParser.java +71 -0
  371. package/src/main/java/org/dxworks/insider/technology/finder/parsers/JsonFingerprintParser.java +58 -0
  372. package/src/main/java/org/dxworks/insider/utils/FileUtils.java +45 -0
  373. package/src/main/java/org/dxworks/insider/utils/ImportUtils.java +21 -0
  374. package/src/main/java/org/dxworks/insider/utils/LibraryImport.java +17 -0
  375. package/src/main/java/org/dxworks/insider/utils/LibraryImportInOtherTechnology.java +30 -0
  376. package/src/main/java/org/dxworks/insider/utils/MapUtils.java +19 -0
  377. package/src/main/resources/insider-version +1 -0
  378. package/src/test/java/org/dxworks/insider/application/inspector/services/CommentServiceTest.java +40 -0
  379. package/src/test/java/org/dxworks/insider/technology/finder/parsers/FingerprintsXmlParserTest.java +15 -0
  380. package/src/test/java/org/dxworks/insider/utils/FileUtilsTest.java +31 -0
  381. package/src/test/java/org/dxworks/insider/utils/ImportUtilsTest.java +24 -0
  382. package/src/test/java/org/dxworks/insider/utils/transformers/JsonToCsvTransformerTest.java +18 -0
  383. package/src/test/resources/Test1.java +21 -0
  384. package/src/test/resources/Test2.java +21 -0
  385. package/src/test/resources/cobol/CM201M.CBL +88 -0
@@ -0,0 +1,77 @@
1
+ [
2
+ {
3
+ "name": "Development Framework: Rocket",
4
+ "id": "AI025610",
5
+ "description": "Development Framework: Rocket",
6
+ "applies_to": [ "rust" ],
7
+ "tags": [ "Framework.Development.Rocket" ],
8
+ "severity": "moderate",
9
+ "patterns": [
10
+ {
11
+ "pattern": "extern crate rocket|use rocket",
12
+ "type": "regex",
13
+ "scopes": [ "code" ]
14
+ }
15
+ ]
16
+ },
17
+ {
18
+ "name": "Development Framework: ActixWeb",
19
+ "id": "AI025620",
20
+ "description": "Development Framework: ActixWeb",
21
+ "applies_to": [ "rust" ],
22
+ "tags": [ "Framework.Development.ActixWeb" ],
23
+ "severity": "moderate",
24
+ "patterns": [
25
+ {
26
+ "pattern": "use actix_web",
27
+ "type": "string",
28
+ "scopes": [ "code" ]
29
+ }
30
+ ]
31
+ },
32
+ {
33
+ "name": "Development Framework: Nickel",
34
+ "id": "AI025630",
35
+ "description": "Development Framework: Nickel",
36
+ "applies_to": [ "rust" ],
37
+ "tags": [ "Framework.Development.Nickel" ],
38
+ "severity": "moderate",
39
+ "patterns": [
40
+ {
41
+ "pattern": "use Nickel",
42
+ "type": "string",
43
+ "scopes": [ "code" ]
44
+ }
45
+ ]
46
+ },
47
+ {
48
+ "name": "Development Framework: Yew",
49
+ "id": "AI025640",
50
+ "description": "Development Framework: Yew",
51
+ "applies_to": [ "rust" ],
52
+ "tags": [ "Framework.Development.Yew" ],
53
+ "severity": "moderate",
54
+ "patterns": [
55
+ {
56
+ "pattern": "use yew",
57
+ "type": "string",
58
+ "scopes": [ "code" ]
59
+ }
60
+ ]
61
+ },
62
+ {
63
+ "name": "Development Framework: Azul",
64
+ "id": "AI025650",
65
+ "description": "Development Framework: Azul",
66
+ "applies_to": [ "rust" ],
67
+ "tags": [ "Framework.Development.Azul" ],
68
+ "severity": "moderate",
69
+ "patterns": [
70
+ {
71
+ "pattern": "use azul",
72
+ "type": "string",
73
+ "scopes": [ "code" ]
74
+ }
75
+ ]
76
+ }
77
+ ]
@@ -0,0 +1,146 @@
1
+ [
2
+ {
3
+ "name": "Open Source License: MIT",
4
+ "id": "AI027600",
5
+ "description": "Open Source License: MIT",
6
+ "tags":[ "Miscellaneous.OpenSourceLicense.MIT" ],
7
+ "severity": "moderate",
8
+ "patterns": [
9
+ {
10
+ "pattern": "MIT License",
11
+ "type": "string",
12
+ "scopes": [ "code", "comment" ],
13
+ "modifiers": [ "i" ],
14
+ "confidence": "high"
15
+ }
16
+ ]
17
+ },
18
+ {
19
+ "name": "Open Source License: Apache",
20
+ "id": "AI027700",
21
+ "description": "Open Source License: Apache",
22
+ "tags":[ "Miscellaneous.OpenSourceLicense.Apache" ],
23
+ "severity": "moderate",
24
+ "patterns": [
25
+ {
26
+ "pattern": "Apache License",
27
+ "type": "string",
28
+ "scopes": [ "code", "comment" ],
29
+ "modifiers": [ "i" ],
30
+ "confidence": "high"
31
+ }
32
+ ]
33
+ },
34
+ {
35
+ "name": "Open Source License: BSD",
36
+ "id": "AI027800",
37
+ "description": "Open Source License: BSD",
38
+ "tags":[ "Miscellaneous.OpenSourceLicense.BSD" ],
39
+ "severity": "moderate",
40
+ "patterns": [
41
+ {
42
+ "pattern": "BSD.+License",
43
+ "type": "regex",
44
+ "scopes": [ "code", "comment" ],
45
+ "modifiers": [ "i" ],
46
+ "confidence": "high"
47
+ }
48
+ ]
49
+ },
50
+ {
51
+ "name": "Open Source License: GPL",
52
+ "id": "AI027900",
53
+ "description": "Open Source License: GPL",
54
+ "tags":[ "Miscellaneous.OpenSourceLicense.GPL" ],
55
+ "severity": "moderate",
56
+ "patterns": [
57
+ {
58
+ "pattern": "GNU GENERAL PUBLIC LICENSE",
59
+ "type": "string",
60
+ "scopes": [ "code", "comment" ],
61
+ "modifiers": [ "i" ],
62
+ "confidence": "high"
63
+ }
64
+ ]
65
+ },
66
+ {
67
+ "name": "Open Source License: LGPL",
68
+ "id": "AI028000",
69
+ "description": "Open Source License: LGPL",
70
+ "tags":[ "Miscellaneous.OpenSourceLicense.LGPL" ],
71
+ "severity": "moderate",
72
+ "patterns": [
73
+ {
74
+ "pattern": "GNU LESSER GENERAL PUBLIC LICENSE",
75
+ "type": "string",
76
+ "scopes": [ "code", "comment" ],
77
+ "modifiers": [ "i" ],
78
+ "confidence": "high"
79
+ }
80
+ ]
81
+ },
82
+ {
83
+ "name": "Open Source License: Mozilla",
84
+ "id": "AI028100",
85
+ "description": "Open Source License: Mozilla",
86
+ "tags":[ "Miscellaneous.OpenSourceLicense.Mozilla" ],
87
+ "severity": "moderate",
88
+ "patterns": [
89
+ {
90
+ "pattern": "Mozilla Public License",
91
+ "type": "string",
92
+ "scopes": [ "code", "comment" ],
93
+ "modifiers": [ "i" ],
94
+ "confidence": "high"
95
+ }
96
+ ]
97
+ },
98
+ {
99
+ "name": "Open Source License: Eclipse",
100
+ "id": "AI028200",
101
+ "description": "Open Source License: Eclipse",
102
+ "tags":[ "Miscellaneous.OpenSourceLicense.Eclipse" ],
103
+ "severity": "moderate",
104
+ "patterns": [
105
+ {
106
+ "pattern": "Eclipse Public License",
107
+ "type": "string",
108
+ "scopes": [ "code", "comment" ],
109
+ "modifiers": [ "i" ],
110
+ "confidence": "high"
111
+ }
112
+ ]
113
+ },
114
+ {
115
+ "name": "Open Source License: Creative Commons",
116
+ "id": "AI028300",
117
+ "description": "Open Source License: Creative Commons",
118
+ "tags":[ "Miscellaneous.OpenSourceLicense.CreativeCommons" ],
119
+ "severity": "moderate",
120
+ "patterns": [
121
+ {
122
+ "pattern": "Creative Commons License",
123
+ "type": "string",
124
+ "scopes": [ "code", "comment" ],
125
+ "modifiers": [ "i" ],
126
+ "confidence": "high"
127
+ }
128
+ ]
129
+ },
130
+ {
131
+ "name": "Open Source License: Microsoft",
132
+ "id": "AI028400",
133
+ "description": "Open Source License: Microsoft",
134
+ "tags":[ "Miscellaneous.OpenSourceLicense.Microsoft" ],
135
+ "severity": "moderate",
136
+ "patterns": [
137
+ {
138
+ "pattern": "Microsoft Public License",
139
+ "type": "string",
140
+ "scopes": [ "code", "comment" ],
141
+ "modifiers": [ "i" ],
142
+ "confidence": "high"
143
+ }
144
+ ]
145
+ }
146
+ ]
@@ -0,0 +1,132 @@
1
+ [
2
+ {
3
+ "name": "Metric: Class Definition",
4
+ "id": "AI025700",
5
+ "description": "Metric: Classes Defined",
6
+ "tags":[ "Metric.Code.Class.Defined" ],
7
+ "severity": "moderate",
8
+ "applies_to": [ "csharp", "cpp", "javascript", "python", "vb", "ruby", "groovy", "php" ],
9
+ "patterns": [
10
+ {
11
+ "pattern": "class",
12
+ "type": "string",
13
+ "scopes": [ "code" ],
14
+ "confidence": "high",
15
+ "_comment": "data structure which provides complexity/size insight"
16
+ }
17
+ ]
18
+ },
19
+ {
20
+ "name": "Metric: Struct Definition",
21
+ "id": "AI025710",
22
+ "description": "Metric: Struct Defined",
23
+ "tags":[ "Metric.Code.Class.Defined" ],
24
+ "severity": "moderate",
25
+ "applies_to": [ "c", "cpp", "csharp", "objective-c", "rust" ],
26
+ "patterns": [
27
+ {
28
+ "pattern": "struct",
29
+ "type": "string",
30
+ "scopes": [ "code" ],
31
+ "confidence": "high"
32
+ }
33
+ ]
34
+ },
35
+ {
36
+ "name": "Metric: Function Definition",
37
+ "id": "AI025800",
38
+ "description": "Metric: Function Defined",
39
+ "tags":[ "Metric.Code.Function.Defined" ],
40
+ "severity": "moderate",
41
+ "patterns": [
42
+ {
43
+ "pattern": "(def|function|fun) (.*)",
44
+ "type": "regexword",
45
+ "scopes": [ "code" ],
46
+ "confidence": "medium",
47
+ "_comment": "doesn't detect a number of other potential patterns at present"
48
+ }
49
+ ]
50
+ },
51
+ {
52
+ "name": "Metric: HTML Form Definition",
53
+ "id": "AI025900",
54
+ "description": "Metric: HTML Form Defined",
55
+ "tags":[ "Metric.Code.HTMLForm.Defined" ],
56
+ "severity": "moderate",
57
+ "patterns": [
58
+ {
59
+ "pattern": "<form",
60
+ "type": "string",
61
+ "scopes": [ "code" ],
62
+ "confidence": "high"
63
+ }
64
+ ]
65
+ },
66
+ {
67
+ "name": "Metric: Exception Caught",
68
+ "id": "AI026000",
69
+ "description": "Metric: Exception Caught",
70
+ "tags":[ "Metric.Code.Exception.Caught" ],
71
+ "severity": "moderate",
72
+ "_comment": "may need to divide results by 2 to get more accurate counts i.e. pairs=single handling",
73
+ "patterns": [
74
+ {
75
+ "pattern": "catch|except|exception",
76
+ "type": "regexword",
77
+ "scopes": [ "code" ],
78
+ "confidence": "medium",
79
+ "modifiers": [ "i" ]
80
+ }
81
+ ]
82
+ },
83
+ {
84
+ "name": "Metric: Logging Call",
85
+ "id": "AI026100",
86
+ "description": "Logging Call",
87
+ "tags":[ "Metric.Code.Logging.Call" ],
88
+ "severity": "moderate",
89
+ "patterns": [
90
+ {
91
+ "pattern": "log|logger",
92
+ "type": "regexword",
93
+ "scopes": [ "code" ],
94
+ "confidence": "high",
95
+ "modifiers": [ "i" ]
96
+ }
97
+ ]
98
+ },
99
+ {
100
+ "name": "Metric: Sample Code",
101
+ "id": "AI026200",
102
+ "description": "Sample Code",
103
+ "tags":[ "Metric.Code.SampleCode" ],
104
+ "severity": "moderate",
105
+ "patterns": [
106
+ {
107
+ "pattern": "(sample|example) code",
108
+ "type": "regex",
109
+ "scopes": [ "code" ],
110
+ "confidence": "high",
111
+ "_comment": "only matched if sample exclusions arg set",
112
+ "modifiers": [ "i" ]
113
+ }
114
+ ]
115
+ },
116
+ {
117
+ "name": "Metric: URL Reference",
118
+ "id": "AI026300",
119
+ "description": "URL Reference",
120
+ "tags":[ "Metric.Code.URL" ],
121
+ "severity": "moderate",
122
+ "patterns": [
123
+ {
124
+ "pattern": "https?://",
125
+ "type": "regex",
126
+ "scopes": [ "code" ],
127
+ "confidence": "high",
128
+ "modifiers": [ "i" ]
129
+ }
130
+ ]
131
+ }
132
+ ]
@@ -0,0 +1,199 @@
1
+ [
2
+ {
3
+ "name": "Dependency: Included Source",
4
+ "id": "AI026400",
5
+ "description": "Dependency: Included Source",
6
+ "tags":[ "Dependency.SourceInclude" ],
7
+ "applies_to": [ "c", "cpp" ],
8
+ "severity": "moderate",
9
+ "confidence": "high",
10
+ "patterns": [
11
+ {
12
+ "pattern": "#include ?[\\\"<]([A-Za-z])[\\\">]",
13
+ "type": "regex",
14
+ "scopes": [ "code" ],
15
+ "confidence": "high"
16
+ }
17
+ ]
18
+ },
19
+ {
20
+ "name": "Dependency: Included Source",
21
+ "id": "AI026500",
22
+ "description": "Dependency: Included Source",
23
+ "tags":[ "Dependency.SourceInclude" ],
24
+ "applies_to": [ "php" ],
25
+ "severity": "moderate",
26
+ "patterns": [
27
+ {
28
+ "pattern": "(include|require) [^\\s;]{1,50};",
29
+ "type": "regex",
30
+ "scopes": [ "code" ],
31
+ "confidence": "high"
32
+ }
33
+ ]
34
+ },
35
+ {
36
+ "name": "Dependency: Included Source",
37
+ "id": "AI026600",
38
+ "description": "Dependency: Included Source",
39
+ "tags":[ "Dependency.SourceInclude" ],
40
+ "applies_to": [ "objective-c" ],
41
+ "severity": "moderate",
42
+ "patterns": [
43
+ {
44
+ "pattern": "#import [A-Za-z]",
45
+ "type": "regex",
46
+ "scopes": [ "code" ],
47
+ "confidence": "high"
48
+ }
49
+ ]
50
+ },
51
+ {
52
+ "name": "Dependency: Included Source",
53
+ "id": "AI026700",
54
+ "description": "Dependency: Included Source",
55
+ "tags":[ "Dependency.SourceInclude" ],
56
+ "applies_to": [ "groovy" ],
57
+ "severity": "moderate",
58
+ "patterns": [
59
+ {
60
+ "pattern": "import [A-Za-z]",
61
+ "type": "regex",
62
+ "scopes": [ "code" ],
63
+ "confidence": "high"
64
+ },
65
+ {
66
+ "pattern": "loadScriptByName",
67
+ "type": "regex",
68
+ "scopes": [ "code" ],
69
+ "confidence": "high"
70
+ },
71
+ {
72
+ "pattern": "evaluate ?\\(",
73
+ "type": "regex",
74
+ "scopes": [ "code" ]
75
+ },
76
+ {
77
+ "pattern": "shell\\.parse ?\\(?",
78
+ "type": "regex",
79
+ "scopes": [ "code" ],
80
+ "confidence": "high"
81
+ }
82
+ ]
83
+ },
84
+ {
85
+ "name": "Dependency: Included Source",
86
+ "id": "AI026800",
87
+ "description": "Dependency: Included Source",
88
+ "tags":[ "Dependency.SourceInclude" ],
89
+ "applies_to": [ "python", "java", "swift", "go" ],
90
+ "severity": "moderate",
91
+ "patterns": [
92
+ {
93
+ "pattern": "import [A-Za-z]",
94
+ "type": "regex",
95
+ "scopes": [ "code" ],
96
+ "confidence": "high"
97
+ },
98
+ {
99
+ "pattern": "package [A-Za-z]",
100
+ "type": "regex",
101
+ "scopes": [ "code" ],
102
+ "confidence": "high"
103
+ }
104
+ ]
105
+ },
106
+ {
107
+ "name": "Dependency: Included Source",
108
+ "id": "AI026900",
109
+ "description": "Dependency: Included Source",
110
+ "tags":[ "Dependency.SourceInclude" ],
111
+ "applies_to": [ "perl", "rust"],
112
+ "severity": "moderate",
113
+ "patterns": [
114
+ {
115
+ "pattern": "use [A-Za-z];",
116
+ "type": "regex",
117
+ "scopes": [ "code" ],
118
+ "confidence": "high"
119
+ },
120
+ {
121
+ "pattern": "package [A-Za-z];",
122
+ "type": "regex",
123
+ "scopes": [ "code" ],
124
+ "confidence": "high"
125
+ }
126
+ ]
127
+ },
128
+ {
129
+ "name": "Dependency: Included Source",
130
+ "id": "AI027000",
131
+ "description": "Dependency: Included Source",
132
+ "tags":[ "Dependency.SourceInclude" ],
133
+ "applies_to": [ "ruby" ],
134
+ "severity": "moderate",
135
+ "patterns": [
136
+ {
137
+ "pattern": "load [A-Za-z]",
138
+ "type": "regex",
139
+ "scopes": [ "code" ],
140
+ "confidence": "high"
141
+ },
142
+ {
143
+ "pattern": "require [A-Za-z]",
144
+ "type": "regex",
145
+ "scopes": [ "code" ],
146
+ "confidence": "high"
147
+ }
148
+ ]
149
+ },
150
+ {
151
+ "name": "Dependency: Included Source",
152
+ "id": "AI027100",
153
+ "description": "Dependency: Included Source",
154
+ "tags":[ "Dependency.SourceInclude" ],
155
+ "applies_to": [ "csharp" ],
156
+ "severity": "moderate",
157
+ "patterns": [
158
+ {
159
+ "pattern": "using [A-Za-z];",
160
+ "type": "regex",
161
+ "scopes": [ "code" ]
162
+ }
163
+ ]
164
+ },
165
+ {
166
+ "name": "Dependency: Included Source",
167
+ "id": "AI027200",
168
+ "description": "Dependency: Included Source",
169
+ "tags":[ "Dependency.SourceInclude" ],
170
+ "applies_to": [ "javascript", "typescript" ],
171
+ "severity": "moderate",
172
+ "patterns": [
173
+ {
174
+ "pattern": "import [A-Za-z];",
175
+ "type": "regex",
176
+ "scopes": [ "code" ],
177
+ "confidence": "high"
178
+ },
179
+ {
180
+ "pattern": "fetchInject ?\\([A-Za-z]",
181
+ "type": "regex",
182
+ "scopes": [ "code" ],
183
+ "confidence": "high"
184
+ },
185
+ {
186
+ "pattern": "require ?\\(['\\\"]([^'\\\"]+);",
187
+ "type": "regex",
188
+ "scopes": [ "code" ],
189
+ "confidence": "high"
190
+ },
191
+ {
192
+ "pattern": "\\$\\.getScript\\([A-Za-z]",
193
+ "type": "regex",
194
+ "scopes": [ "code" ],
195
+ "confidence": "high"
196
+ }
197
+ ]
198
+ }
199
+ ]
@@ -0,0 +1,47 @@
1
+ [
2
+ {
3
+ "name": "Hygiene: Todo Comment",
4
+ "id": "AI027300",
5
+ "description": "Hygiene: Todo Comment",
6
+ "tags":[ "Miscellaneous.CodeHygiene.Comment.Todo" ],
7
+ "severity": "moderate",
8
+ "patterns": [
9
+ {
10
+ "pattern": "todo",
11
+ "type": "regex",
12
+ "scopes": [ "comment" ],
13
+ "modifiers": [ "i" ]
14
+ }
15
+ ]
16
+ },
17
+ {
18
+ "name": "Hygiene: Fix Comment",
19
+ "id": "AI027400",
20
+ "description": "Hygiene: Fix Comment",
21
+ "tags":[ "Miscellaneous.CodeHygiene.Comment.Fix" ],
22
+ "severity": "moderate",
23
+ "patterns": [
24
+ {
25
+ "pattern": "fixme|broke|broken",
26
+ "type": "regex",
27
+ "scopes": [ "comment" ],
28
+ "modifiers": [ "i" ]
29
+ }
30
+ ]
31
+ },
32
+ {
33
+ "name": "Hygiene: Suspicious Comment",
34
+ "id": "AI027500",
35
+ "description": "Hygiene: Suspicious Comment",
36
+ "tags":[ "Miscellaneous.CodeHygiene.Comment.Suspicious" ],
37
+ "severity": "moderate",
38
+ "patterns": [
39
+ {
40
+ "pattern": "hack|insecure|black magic|high risk|risky|riskiest|obfuscation|obfuscate|obfuscated",
41
+ "type": "regex",
42
+ "scopes": [ "comment" ],
43
+ "modifiers": [ "i" ]
44
+ }
45
+ ]
46
+ }
47
+ ]