@hoanghainh/komagu 2.4.0 → 2.6.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 (247) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/LICENSE +202 -0
  3. package/README.md +1 -0
  4. package/assess/lsa/examples/eval-run-6/gptoss-a/ai-run-stats.json +87 -0
  5. package/assess/lsa/examples/eval-run-6/gptoss-a/auth-model.md +120 -0
  6. package/assess/lsa/examples/eval-run-6/gptoss-a/batches/index.json +60 -0
  7. package/assess/lsa/examples/eval-run-6/gptoss-a/batches/injection-001.json +383 -0
  8. package/assess/lsa/examples/eval-run-6/gptoss-a/batches/injection-002.json +205 -0
  9. package/assess/lsa/examples/eval-run-6/gptoss-a/batches/privilege-001.json +838 -0
  10. package/assess/lsa/examples/eval-run-6/gptoss-a/batches/privilege-002.json +124 -0
  11. package/assess/lsa/examples/eval-run-6/gptoss-a/batches/routes-001.json +778 -0
  12. package/assess/lsa/examples/eval-run-6/gptoss-a/batches/routes-002.json +546 -0
  13. package/assess/lsa/examples/eval-run-6/gptoss-a/batches/routes-003.json +661 -0
  14. package/assess/lsa/examples/eval-run-6/gptoss-a/batches/routes-004.json +659 -0
  15. package/assess/lsa/examples/eval-run-6/gptoss-a/batches/routes-005.json +612 -0
  16. package/assess/lsa/examples/eval-run-6/gptoss-a/batches/routes-006.json +106 -0
  17. package/assess/lsa/examples/eval-run-6/gptoss-a/coverage.json +19 -0
  18. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/bola-routes-001.json +516 -0
  19. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/bola-routes-002.json +332 -0
  20. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/bola-routes-003.json +218 -0
  21. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/bola-routes-004.json +561 -0
  22. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/bola-routes-005.json +316 -0
  23. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/bola-routes-006.json +14 -0
  24. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/inj-injection-001.json +782 -0
  25. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/inj-injection-002.json +418 -0
  26. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/priv-privilege-001.json +627 -0
  27. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/priv-privilege-002.json +253 -0
  28. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-1.json +68 -0
  29. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-10.json +68 -0
  30. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-11.json +61 -0
  31. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-12.json +60 -0
  32. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-13.json +60 -0
  33. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-14.json +66 -0
  34. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-15.json +69 -0
  35. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-16.json +60 -0
  36. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-17.json +61 -0
  37. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-18.json +69 -0
  38. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-19.json +64 -0
  39. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-2.json +60 -0
  40. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-20.json +60 -0
  41. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-21.json +61 -0
  42. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-22.json +50 -0
  43. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-3.json +60 -0
  44. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-4.json +60 -0
  45. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-5.json +60 -0
  46. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-6.json +70 -0
  47. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-7.json +60 -0
  48. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-8.json +60 -0
  49. package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-9.json +60 -0
  50. package/assess/lsa/examples/eval-run-6/gptoss-a/findings.json +4857 -0
  51. package/assess/lsa/examples/eval-run-6/gptoss-a/mass-assignment.candidates.json +232 -0
  52. package/assess/lsa/examples/eval-run-6/gptoss-a/report.ja.md +2112 -0
  53. package/assess/lsa/examples/eval-run-6/gptoss-a/report.md +2112 -0
  54. package/assess/lsa/examples/eval-run-6/gptoss-a/routes/routes-001.json +425 -0
  55. package/assess/lsa/examples/eval-run-6/gptoss-a/routes/routes-002.json +333 -0
  56. package/assess/lsa/examples/eval-run-6/gptoss-a/routes/routes-003.json +400 -0
  57. package/assess/lsa/examples/eval-run-6/gptoss-a/routes/routes-004.json +403 -0
  58. package/assess/lsa/examples/eval-run-6/gptoss-a/routes/routes-005.json +398 -0
  59. package/assess/lsa/examples/eval-run-6/gptoss-a/routes/routes-006.json +63 -0
  60. package/assess/lsa/examples/eval-run-6/gptoss-a/score.json +82 -0
  61. package/assess/lsa/examples/eval-run-6/gptoss-a/stack-profile.json +225 -0
  62. package/assess/lsa/examples/eval-run-6/gptoss-b/ai-run-stats.json +91 -0
  63. package/assess/lsa/examples/eval-run-6/gptoss-b/auth-model.md +120 -0
  64. package/assess/lsa/examples/eval-run-6/gptoss-b/batches/index.json +60 -0
  65. package/assess/lsa/examples/eval-run-6/gptoss-b/batches/injection-001.json +383 -0
  66. package/assess/lsa/examples/eval-run-6/gptoss-b/batches/injection-002.json +205 -0
  67. package/assess/lsa/examples/eval-run-6/gptoss-b/batches/privilege-001.json +838 -0
  68. package/assess/lsa/examples/eval-run-6/gptoss-b/batches/privilege-002.json +124 -0
  69. package/assess/lsa/examples/eval-run-6/gptoss-b/batches/routes-001.json +778 -0
  70. package/assess/lsa/examples/eval-run-6/gptoss-b/batches/routes-002.json +546 -0
  71. package/assess/lsa/examples/eval-run-6/gptoss-b/batches/routes-003.json +661 -0
  72. package/assess/lsa/examples/eval-run-6/gptoss-b/batches/routes-004.json +659 -0
  73. package/assess/lsa/examples/eval-run-6/gptoss-b/batches/routes-005.json +612 -0
  74. package/assess/lsa/examples/eval-run-6/gptoss-b/batches/routes-006.json +106 -0
  75. package/assess/lsa/examples/eval-run-6/gptoss-b/coverage.json +21 -0
  76. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/bola-routes-001.json +593 -0
  77. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/bola-routes-002.json +367 -0
  78. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/bola-routes-003.json +207 -0
  79. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/bola-routes-004.json +477 -0
  80. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/bola-routes-005.json +341 -0
  81. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/bola-routes-006.json +14 -0
  82. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/inj-injection-001.json +821 -0
  83. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/inj-injection-002.json +410 -0
  84. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/priv-privilege-001.json +649 -0
  85. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/priv-privilege-002.json +222 -0
  86. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-1.json +60 -0
  87. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-10.json +67 -0
  88. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-11.json +68 -0
  89. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-12.json +60 -0
  90. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-13.json +60 -0
  91. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-14.json +64 -0
  92. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-15.json +70 -0
  93. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-16.json +60 -0
  94. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-17.json +61 -0
  95. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-18.json +60 -0
  96. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-19.json +65 -0
  97. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-2.json +60 -0
  98. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-20.json +60 -0
  99. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-21.json +62 -0
  100. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-22.json +50 -0
  101. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-3.json +60 -0
  102. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-4.json +60 -0
  103. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-5.json +60 -0
  104. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-6.json +60 -0
  105. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-7.json +64 -0
  106. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-8.json +60 -0
  107. package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-9.json +60 -0
  108. package/assess/lsa/examples/eval-run-6/gptoss-b/findings.json +4966 -0
  109. package/assess/lsa/examples/eval-run-6/gptoss-b/mass-assignment.candidates.json +232 -0
  110. package/assess/lsa/examples/eval-run-6/gptoss-b/routes/routes-001.json +425 -0
  111. package/assess/lsa/examples/eval-run-6/gptoss-b/routes/routes-002.json +333 -0
  112. package/assess/lsa/examples/eval-run-6/gptoss-b/routes/routes-003.json +400 -0
  113. package/assess/lsa/examples/eval-run-6/gptoss-b/routes/routes-004.json +403 -0
  114. package/assess/lsa/examples/eval-run-6/gptoss-b/routes/routes-005.json +398 -0
  115. package/assess/lsa/examples/eval-run-6/gptoss-b/routes/routes-006.json +63 -0
  116. package/assess/lsa/examples/eval-run-6/gptoss-b/score.json +87 -0
  117. package/assess/lsa/examples/eval-run-6/gptoss-b/stack-profile.json +225 -0
  118. package/assess/lsa/examples/eval-run-6/ground-truth.json +851 -0
  119. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/ai-run-stats.json +96 -0
  120. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/auth-model.md +191 -0
  121. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/batches/index.json +60 -0
  122. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/batches/injection-001.json +383 -0
  123. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/batches/injection-002.json +205 -0
  124. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/batches/privilege-001.json +838 -0
  125. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/batches/privilege-002.json +124 -0
  126. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/batches/routes-001.json +778 -0
  127. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/batches/routes-002.json +546 -0
  128. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/batches/routes-003.json +661 -0
  129. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/batches/routes-004.json +659 -0
  130. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/batches/routes-005.json +612 -0
  131. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/batches/routes-006.json +106 -0
  132. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/coverage.json +31 -0
  133. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/bola-routes-001.json +527 -0
  134. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/bola-routes-002.json +568 -0
  135. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/bola-routes-003.json +467 -0
  136. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/bola-routes-004.json +342 -0
  137. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/bola-routes-005.json +693 -0
  138. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/bola-routes-006.json +16 -0
  139. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/inj-injection-001.json +1123 -0
  140. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/inj-injection-002.json +391 -0
  141. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/priv-privilege-001.json +726 -0
  142. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/priv-privilege-002.json +306 -0
  143. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-1.json +137 -0
  144. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-10.json +106 -0
  145. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-11.json +81 -0
  146. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-12.json +135 -0
  147. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-13.json +135 -0
  148. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-14.json +135 -0
  149. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-15.json +110 -0
  150. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-16.json +116 -0
  151. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-17.json +141 -0
  152. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-18.json +135 -0
  153. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-19.json +140 -0
  154. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-2.json +135 -0
  155. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-20.json +82 -0
  156. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-21.json +74 -0
  157. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-22.json +99 -0
  158. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-3.json +140 -0
  159. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-4.json +145 -0
  160. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-5.json +135 -0
  161. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-6.json +135 -0
  162. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-7.json +87 -0
  163. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-8.json +125 -0
  164. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-9.json +135 -0
  165. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings.json +6989 -0
  166. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/mass-assignment.candidates.json +232 -0
  167. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/memory.log +36 -0
  168. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/routes/routes-001.json +425 -0
  169. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/routes/routes-002.json +333 -0
  170. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/routes/routes-003.json +400 -0
  171. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/routes/routes-004.json +403 -0
  172. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/routes/routes-005.json +398 -0
  173. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/routes/routes-006.json +63 -0
  174. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/score.json +106 -0
  175. package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/stack-profile.json +225 -0
  176. package/assess/lsa/examples/eval-run-6/qwen-16k-partial/auth-model.md +517 -0
  177. package/assess/lsa/examples/eval-run-6/qwen-16k-partial/findings/bola-routes-001.json +5 -0
  178. package/assess/lsa/examples/eval-run-6/qwen-16k-partial/findings/bola-routes-002.json +428 -0
  179. package/assess/lsa/examples/eval-run-6/qwen-16k-partial/findings/bola-routes-003.json +388 -0
  180. package/assess/lsa/examples/eval-run-6/qwen-16k-partial/findings/bola-routes-004.json +463 -0
  181. package/assess/lsa/examples/eval-run-6/qwen-16k-partial/findings/bola-routes-005.json +5 -0
  182. package/assess/lsa/examples/eval-run-6/qwen-16k-partial/findings/bola-routes-006.json +67 -0
  183. package/assess/lsa/examples/eval-run-6/qwen-16k-partial/findings/inj-injection-001.json +964 -0
  184. package/assess/lsa/examples/eval-run-6/qwen-16k-partial/findings.partial.json +1872 -0
  185. package/assess/lsa/examples/eval-run-6/qwen-16k-partial/memory.log +194 -0
  186. package/assess/lsa/examples/eval-run-6/qwen-16k-partial/score.partial.json +108 -0
  187. package/assess/lsa/examples/eval-run-6/qwen-16k-partial/stack-profile.json +225 -0
  188. package/assess/lsa/scripts/detect_stack.py +13 -5
  189. package/assess/lsa/scripts/find_injection.py +35 -2
  190. package/assess/lsa/scripts/java_routes.py +323 -0
  191. package/assess/lsa/scripts/laravel_routes.py +102 -0
  192. package/assess/lsa/scripts/lsa_common.py +72 -2
  193. package/assess/lsa/scripts/map_routes.py +40 -161
  194. package/assess/lsa/scripts/merge_findings.py +2 -0
  195. package/assess/lsa/tests/EVAL-RESULTS.md +126 -0
  196. package/assess/lsa/tests/test_eval_run_6.py +104 -0
  197. package/assess/lsa/tests/test_java_legacy_realistic.py +453 -0
  198. package/assess/lsa/tests/test_laravel_routes.py +95 -0
  199. package/contracts/schemas/persona-suite.schema.json +38 -2
  200. package/examples/member-portal/backend-dotnet/Dockerfile +2 -1
  201. package/examples/member-portal/backend-spring/Dockerfile +2 -0
  202. package/examples/member-portal/docker-compose.yml +1 -1
  203. package/examples/member-portal/frontend/Dockerfile +3 -2
  204. package/examples/member-portal/frontend/package-lock.json +24 -656
  205. package/examples/member-portal/frontend/package.json +1 -1
  206. package/operate/ai/client.py +22 -9
  207. package/operate/ai/runner.py +24 -4
  208. package/operate/cli/__init__.py +1 -1
  209. package/operate/cli/commands/fix.py +4 -0
  210. package/operate/cli/commands/leak_check.py +75 -0
  211. package/operate/cli/commands/protect.py +32 -3
  212. package/operate/cli/commands/scan.py +8 -1
  213. package/operate/cli/commands/test.py +131 -15
  214. package/operate/cli/main.py +5 -3
  215. package/operate/cross_user_tester/persona_matrix.py +118 -25
  216. package/operate/cross_user_tester/runner.py +190 -7
  217. package/operate/cross_user_tester/session_config.py +180 -0
  218. package/operate/cross_user_tester/session_http.py +288 -0
  219. package/operate/devsecops/leak_check.py +314 -0
  220. package/operate/remediator/runner.py +18 -1
  221. package/operate/remediator/strategies.py +2 -2
  222. package/operate/simulate/scenarios.py +2 -2
  223. package/operate/tests/mock_legacy_session_app.py +160 -0
  224. package/operate/tests/test_ai_reasoning_effort.py +65 -0
  225. package/operate/tests/test_ai_route_inventory.py +53 -0
  226. package/operate/tests/test_cross_user_session.py +565 -0
  227. package/operate/tests/test_docker_packaging.py +3 -3
  228. package/operate/tests/test_headless_ai.py +6 -0
  229. package/operate/tests/test_leak_check.py +250 -0
  230. package/operate/tests/test_legacy_session_edge.py +192 -0
  231. package/operate/tests/test_pilot_safeguards.py +245 -0
  232. package/operate/tests/test_remediator_java_legacy.py +330 -0
  233. package/package.json +2 -1
  234. package/remediate/authz/patcher.py +120 -11
  235. package/remediate/authz/tests/test_bola_patcher.py +4 -1
  236. package/remediate/edge/coraza/Caddyfile +1 -1
  237. package/remediate/edge/coraza/Dockerfile +9 -0
  238. package/remediate/edge/coraza/rules/coraza-crs-custom.conf +12 -0
  239. package/remediate/edge/coraza/virtual_patcher.py +24 -0
  240. package/remediate/edge/docker-compose.yml +7 -2
  241. package/remediate/edge/kong/kong-legacy-session.yaml +51 -0
  242. package/remediate/edge/mock-backend/Dockerfile +2 -0
  243. package/remediate/edge/tests/test_edge_security.py +21 -1
  244. package/remediate/resilience/terraform/backup_worm.tf +39 -1
  245. package/remediate/resilience/terraform/main.tf +15 -3
  246. package/remediate/resilience/terraform/variables.tf +11 -0
  247. package/remediate/resilience/tests/test_resilience.py +16 -0
@@ -0,0 +1,568 @@
1
+ {
2
+ "batch_id": "routes-002",
3
+ "findings": [
4
+ {
5
+ "finding_id": "BOLA-R-0020-1",
6
+ "category": "bola",
7
+ "subtype": "missing_ownership_check",
8
+ "title": "Account save allows modification of any account via ID injection",
9
+ "route_id": "R-0020",
10
+ "endpoint": {
11
+ "method": "POST",
12
+ "path": "/account/save"
13
+ },
14
+ "location": {
15
+ "file": "java-legacy/src/com/acme/web/AccountController.java",
16
+ "start_line": 13,
17
+ "end_line": 16
18
+ },
19
+ "evidence": [
20
+ {
21
+ "file": "java-legacy/src/com/acme/web/AccountController.java",
22
+ "line": 14,
23
+ "code": "public String save(@ModelAttribute Account account) {",
24
+ "why": "Takes full object from request without verifying ownership"
25
+ },
26
+ {
27
+ "file": "java-legacy/src/com/acme/web/AccountController.java",
28
+ "line": 15,
29
+ "code": "accountDao.save(account);",
30
+ "why": "Saves the provided object ID directly to DB without checking if current user owns it"
31
+ }
32
+ ],
33
+ "attack_scenario": "User A sends POST /account/save with an Account object containing User B's account ID. The server saves User B's account details, allowing User A to modify them.",
34
+ "impact": "Modification of other users' accounts (e.g., changing names, emails, or associated data).",
35
+ "severity": "high",
36
+ "confidence": "high",
37
+ "cwe": [
38
+ "CWE-284",
39
+ "CWE-639"
40
+ ],
41
+ "owasp": [
42
+ "API1:2023"
43
+ ],
44
+ "recommendation": "Verify that the account being saved belongs to the authenticated user before persisting changes.",
45
+ "status": "unverified",
46
+ "attack_vector": {
47
+ "target_param": "id"
48
+ }
49
+ },
50
+ {
51
+ "finding_id": "BOLA-R-0021-1",
52
+ "category": "bola",
53
+ "subtype": "missing_ownership_check",
54
+ "title": "Account rename allows renaming any account via ID injection",
55
+ "route_id": "R-0021",
56
+ "endpoint": {
57
+ "method": "POST",
58
+ "path": "/account/rename"
59
+ },
60
+ "location": {
61
+ "file": "java-legacy/src/com/acme/web/AccountController.java",
62
+ "start_line": 19,
63
+ "end_line": 22
64
+ },
65
+ "evidence": [
66
+ {
67
+ "file": "java-legacy/src/com/acme/web/AccountController.java",
68
+ "line": 20,
69
+ "code": "public String rename(@ModelAttribute RenameForm form) {",
70
+ "why": "Takes ID from request object without verifying ownership"
71
+ },
72
+ {
73
+ "file": "java-legacy/src/com/acme/web/AccountController.java",
74
+ "line": 21,
75
+ "code": "accountDao.rename(form.getId(), form.getName());",
76
+ "why": "Renames the account identified by the provided ID without checking if current user owns it"
77
+ }
78
+ ],
79
+ "attack_scenario": "User A sends POST /account/rename with a RenameForm containing User B's account ID. The server renames User B's account.",
80
+ "impact": "Modification of other users' accounts (e.g., changing names).",
81
+ "severity": "high",
82
+ "confidence": "high",
83
+ "cwe": [
84
+ "CWE-284",
85
+ "CWE-639"
86
+ ],
87
+ "owasp": [
88
+ "API1:2023"
89
+ ],
90
+ "recommendation": "Verify that the account being renamed belongs to the authenticated user before persisting changes.",
91
+ "status": "unverified",
92
+ "attack_vector": {
93
+ "target_param": "id"
94
+ }
95
+ },
96
+ {
97
+ "finding_id": "BOLA-R-0022-1",
98
+ "category": "bola",
99
+ "subtype": "missing_ownership_check",
100
+ "title": "Account update allows modification of any account via ID injection",
101
+ "route_id": "R-0022",
102
+ "endpoint": {
103
+ "method": "PUT",
104
+ "path": "/account/api"
105
+ },
106
+ "location": {
107
+ "file": "java-legacy/src/com/acme/web/AccountController.java",
108
+ "start_line": 25,
109
+ "end_line": 28
110
+ },
111
+ "evidence": [
112
+ {
113
+ "file": "java-legacy/src/com/acme/web/AccountController.java",
114
+ "line": 26,
115
+ "code": "public Account update(@RequestBody Account account) {",
116
+ "why": "Takes full object from request without verifying ownership"
117
+ },
118
+ {
119
+ "file": "java-legacy/src/com/acme/web/AccountController.java",
120
+ "line": 27,
121
+ "code": "return accountDao.save(account);",
122
+ "why": "Saves the provided object ID directly to DB without checking if current user owns it"
123
+ }
124
+ ],
125
+ "attack_scenario": "User A sends PUT /account/api with an Account object containing User B's account ID. The server updates User B's account.",
126
+ "impact": "Modification of other users' accounts (e.g., changing names, emails, or associated data).",
127
+ "severity": "high",
128
+ "confidence": "high",
129
+ "cwe": [
130
+ "CWE-284",
131
+ "CWE-639"
132
+ ],
133
+ "owasp": [
134
+ "API1:2023"
135
+ ],
136
+ "recommendation": "Verify that the account being updated belongs to the authenticated user before persisting changes.",
137
+ "status": "unverified",
138
+ "attack_vector": {
139
+ "target_param": "id"
140
+ }
141
+ },
142
+ {
143
+ "finding_id": "BOLA-R-0023-1",
144
+ "category": "bola",
145
+ "subtype": "missing_ownership_check",
146
+ "title": "User deletion allows removal of any user via ID injection",
147
+ "route_id": "R-0023",
148
+ "endpoint": {
149
+ "method": "POST",
150
+ "path": "/admin/users/{id}/delete"
151
+ },
152
+ "location": {
153
+ "file": "java-legacy/src/com/acme/web/AdminUserController.java",
154
+ "start_line": 13,
155
+ "end_line": 16
156
+ },
157
+ "evidence": [
158
+ {
159
+ "file": "java-legacy/src/com/acme/web/AdminUserController.java",
160
+ "line": 14,
161
+ "code": "public String delete(@PathVariable(\"id\") Long id) {",
162
+ "why": "Takes ID from path without verifying ownership"
163
+ },
164
+ {
165
+ "file": "java-legacy/src/com/acme/web/AdminUserController.java",
166
+ "line": 15,
167
+ "code": "userDao.deleteById(id);",
168
+ "why": "Deletes the user identified by the provided ID without checking if current user owns it"
169
+ }
170
+ ],
171
+ "attack_scenario": "User A sends POST /admin/users/{id}/delete with User B's user ID. The server deletes User B's account.",
172
+ "impact": "Deletion of other users' accounts.",
173
+ "severity": "high",
174
+ "confidence": "high",
175
+ "cwe": [
176
+ "CWE-284",
177
+ "CWE-639"
178
+ ],
179
+ "owasp": [
180
+ "API1:2023"
181
+ ],
182
+ "recommendation": "Verify that the user being deleted belongs to the authenticated user before persisting changes.",
183
+ "status": "unverified",
184
+ "attack_vector": {
185
+ "target_param": "id"
186
+ }
187
+ },
188
+ {
189
+ "finding_id": "BOLA-R-0024-1",
190
+ "category": "bola",
191
+ "subtype": "missing_ownership_check",
192
+ "title": "User role update allows changing any user's role via ID injection",
193
+ "route_id": "R-0024",
194
+ "endpoint": {
195
+ "method": "POST",
196
+ "path": "/admin/users/{id}/role"
197
+ },
198
+ "location": {
199
+ "file": "java-legacy/src/com/acme/web/AdminUserController.java",
200
+ "start_line": 20,
201
+ "end_line": 23
202
+ },
203
+ "evidence": [
204
+ {
205
+ "file": "java-legacy/src/com/acme/web/AdminUserController.java",
206
+ "line": 20,
207
+ "code": "@PreAuthorize(\"hasRole('ADMIN')\")",
208
+ "why": "Only checks if caller is admin, does not check ownership of the target user"
209
+ },
210
+ {
211
+ "file": "java-legacy/src/com/acme/web/AdminUserController.java",
212
+ "line": 21,
213
+ "code": "public String grant(@PathVariable(\"id\") Long id, @RequestParam(\"role\") String role) {",
214
+ "why": "Takes ID from path without verifying ownership"
215
+ },
216
+ {
217
+ "file": "java-legacy/src/com/acme/web/AdminUserController.java",
218
+ "line": 22,
219
+ "code": "userDao.updateRole(id, role);",
220
+ "why": "Updates the user identified by the provided ID without checking if current user owns it"
221
+ }
222
+ ],
223
+ "attack_scenario": "User A (who is an admin) sends POST /admin/users/{id}/role with User B's user ID. The server changes User B's role.",
224
+ "impact": "Privilege escalation via unauthorized role assignment to other users.",
225
+ "severity": "high",
226
+ "confidence": "high",
227
+ "cwe": [
228
+ "CWE-284",
229
+ "CWE-639"
230
+ ],
231
+ "owasp": [
232
+ "API1:2023"
233
+ ],
234
+ "recommendation": "Verify that the user being updated belongs to the authenticated user before persisting changes.",
235
+ "status": "unverified",
236
+ "attack_vector": {
237
+ "target_param": "id"
238
+ }
239
+ },
240
+ {
241
+ "finding_id": "BOLA-R-0025-1",
242
+ "category": "bola",
243
+ "subtype": "missing_ownership_check",
244
+ "title": "Invoice view allows viewing any invoice via ID injection",
245
+ "route_id": "R-0025",
246
+ "endpoint": {
247
+ "method": "GET",
248
+ "path": "/invoices/{id}"
249
+ },
250
+ "location": {
251
+ "file": "java-legacy/src/com/acme/web/InvoiceController.java",
252
+ "start_line": 15,
253
+ "end_line": 18
254
+ },
255
+ "evidence": [
256
+ {
257
+ "file": "java-legacy/src/com/acme/web/InvoiceController.java",
258
+ "line": 16,
259
+ "code": "public String show(@PathVariable(\"id\") Long id, Model model) {",
260
+ "why": "Takes ID from path without verifying ownership"
261
+ },
262
+ {
263
+ "file": "java-legacy/src/com/acme/web/InvoiceController.java",
264
+ "line": 17,
265
+ "code": "model.addAttribute(\"invoice\", invoiceDao.findById(id));",
266
+ "why": "Loads the invoice identified by the provided ID without checking if current user owns it"
267
+ }
268
+ ],
269
+ "attack_scenario": "User A sends GET /invoices/{id} with User B's invoice ID. The server returns User B's invoice details.",
270
+ "impact": "Disclosure of other users' invoices (e.g., amounts, customer info).",
271
+ "severity": "high",
272
+ "confidence": "high",
273
+ "cwe": [
274
+ "CWE-284",
275
+ "CWE-639"
276
+ ],
277
+ "owasp": [
278
+ "API1:2023"
279
+ ],
280
+ "recommendation": "Verify that the invoice being viewed belongs to the authenticated user before returning it.",
281
+ "status": "unverified",
282
+ "attack_vector": {
283
+ "target_param": "id"
284
+ }
285
+ },
286
+ {
287
+ "finding_id": "BOLA-R-0027-1",
288
+ "category": "bola",
289
+ "subtype": "missing_ownership_check",
290
+ "title": "Invoice search allows viewing any invoice via customer name injection",
291
+ "route_id": "R-0027",
292
+ "endpoint": {
293
+ "method": "GET",
294
+ "path": "/invoices/search"
295
+ },
296
+ "location": {
297
+ "file": "java-legacy/src/com/acme/web/InvoiceController.java",
298
+ "start_line": 27,
299
+ "end_line": 30
300
+ },
301
+ "evidence": [
302
+ {
303
+ "file": "java-legacy/src/com/acme/web/InvoiceController.java",
304
+ "line": 28,
305
+ "code": "public String search(@RequestParam(\"customer\") String customer, Model model) {",
306
+ "why": "Takes customer name from request without verifying ownership"
307
+ },
308
+ {
309
+ "file": "java-legacy/src/com/acme/web/InvoiceController.java",
310
+ "line": 29,
311
+ "code": "model.addAttribute(\"list\", session.createQuery(\"from Invoice i where i.customer = '\" + customer + \"'\").list());",
312
+ "why": "Queries all invoices matching the provided customer name without checking if current user owns them"
313
+ }
314
+ ],
315
+ "attack_scenario": "User A sends GET /invoices/search?customer=<Name of User B>. The server returns all invoices for that customer, including those owned by others.",
316
+ "impact": "Disclosure of other users' invoices (e.g., amounts, customer info).",
317
+ "severity": "high",
318
+ "confidence": "high",
319
+ "cwe": [
320
+ "CWE-284",
321
+ "CWE-639"
322
+ ],
323
+ "owasp": [
324
+ "API1:2023"
325
+ ],
326
+ "recommendation": "Verify that the invoices returned belong to the authenticated user before returning them.",
327
+ "status": "unverified"
328
+ },
329
+ {
330
+ "finding_id": "BOLA-R-0028-1",
331
+ "category": "bola",
332
+ "subtype": "missing_ownership_check",
333
+ "title": "Order view allows viewing any order via ID injection",
334
+ "route_id": "R-0028",
335
+ "endpoint": {
336
+ "method": "GET",
337
+ "path": "/order/view"
338
+ },
339
+ "location": {
340
+ "file": "java-legacy/src/com/acme/web/OrderServlet.java",
341
+ "start_line": 8,
342
+ "end_line": 21
343
+ },
344
+ "evidence": [
345
+ {
346
+ "file": "java-legacy/src/com/acme/web/OrderServlet.java",
347
+ "line": 11,
348
+ "code": "String id = request.getParameter(\"orderId\");",
349
+ "why": "Takes ID from request parameter without verifying ownership"
350
+ },
351
+ {
352
+ "file": "java-legacy/src/com/acme/web/OrderServlet.java",
353
+ "line": 15,
354
+ "code": "ResultSet rs = stmt.executeQuery(\"SELECT * FROM orders WHERE id = '\" + id + \"'\");",
355
+ "why": "Loads the order identified by the provided ID without checking if current user owns it"
356
+ },
357
+ {
358
+ "file": "java-legacy/src/com/acme/web/OrderServlet.java",
359
+ "line": 17,
360
+ "code": "sb.append(\" AND order_id = \").append(id);",
361
+ "why": "Queries items for the provided order ID without checking if current user owns them"
362
+ }
363
+ ],
364
+ "attack_scenario": "User A sends GET /order/view?orderId=<Order ID of User B>. The server returns User B's order details.",
365
+ "impact": "Disclosure of other users' orders (e.g., items, amounts).",
366
+ "severity": "high",
367
+ "confidence": "high",
368
+ "cwe": [
369
+ "CWE-284",
370
+ "CWE-639"
371
+ ],
372
+ "owasp": [
373
+ "API1:2023"
374
+ ],
375
+ "recommendation": "Verify that the order being viewed belongs to the authenticated user before returning it.",
376
+ "status": "unverified",
377
+ "attack_vector": {
378
+ "target_param": "orderId"
379
+ }
380
+ },
381
+ {
382
+ "finding_id": "BOLA-R-0030-1",
383
+ "category": "bola",
384
+ "subtype": "missing_ownership_check",
385
+ "title": "User deletion allows removal of any user via ID injection",
386
+ "route_id": "R-0030",
387
+ "endpoint": {
388
+ "method": "POST",
389
+ "path": "/admin/users/:id/delete"
390
+ },
391
+ "location": {
392
+ "file": "node-express/routes/admin.js",
393
+ "start_line": 8,
394
+ "end_line": 9
395
+ },
396
+ "evidence": [
397
+ {
398
+ "file": "node-express/routes/admin.js",
399
+ "line": 5,
400
+ "code": "function ensureLoggedIn(req, res, next) { if (!req.user) return res.redirect('/login'); next(); }",
401
+ "why": "Only checks if user is logged in, does not check ownership of the target user"
402
+ },
403
+ {
404
+ "file": "node-express/routes/admin.js",
405
+ "line": 9,
406
+ "code": "User.deleteOne({ _id: req.params.id }, function () { res.sendStatus(204); });",
407
+ "why": "Deletes the user identified by the provided ID without checking if current user owns it"
408
+ }
409
+ ],
410
+ "attack_scenario": "User A sends POST /admin/users/:id/delete with User B's user ID. The server deletes User B's account.",
411
+ "impact": "Deletion of other users' accounts.",
412
+ "severity": "high",
413
+ "confidence": "high",
414
+ "cwe": [
415
+ "CWE-284",
416
+ "CWE-639"
417
+ ],
418
+ "owasp": [
419
+ "API1:2023"
420
+ ],
421
+ "recommendation": "Verify that the user being deleted belongs to the authenticated user before persisting changes.",
422
+ "status": "unverified",
423
+ "attack_vector": {
424
+ "target_param": "id"
425
+ }
426
+ },
427
+ {
428
+ "finding_id": "BOLA-R-0031-1",
429
+ "category": "bola",
430
+ "subtype": "missing_ownership_check",
431
+ "title": "User ban allows banning any user via ID injection",
432
+ "route_id": "R-0031",
433
+ "endpoint": {
434
+ "method": "POST",
435
+ "path": "/admin/users/:id/ban"
436
+ },
437
+ "location": {
438
+ "file": "node-express/routes/admin.js",
439
+ "start_line": 12,
440
+ "end_line": 13
441
+ },
442
+ "evidence": [
443
+ {
444
+ "file": "node-express/routes/admin.js",
445
+ "line": 5,
446
+ "code": "function ensureLoggedIn(req, res, next) { if (!req.user) return res.redirect('/login'); next(); }",
447
+ "why": "Only checks if user is logged in, does not check ownership of the target user"
448
+ },
449
+ {
450
+ "file": "node-express/routes/admin.js",
451
+ "line": 13,
452
+ "code": "User.updateOne({ _id: req.params.id }, { banned: true }, function () { res.sendStatus(204); });",
453
+ "why": "Updates the user identified by the provided ID without checking if current user owns it"
454
+ }
455
+ ],
456
+ "attack_scenario": "User A sends POST /admin/users/:id/ban with User B's user ID. The server bans User B's account.",
457
+ "impact": "Denial of service via unauthorized banning of other users.",
458
+ "severity": "high",
459
+ "confidence": "high",
460
+ "cwe": [
461
+ "CWE-284",
462
+ "CWE-639"
463
+ ],
464
+ "owasp": [
465
+ "API1:2023"
466
+ ],
467
+ "recommendation": "Verify that the user being banned belongs to the authenticated user before persisting changes.",
468
+ "status": "unverified",
469
+ "attack_vector": {
470
+ "target_param": "id"
471
+ }
472
+ },
473
+ {
474
+ "finding_id": "BOLA-R-0032-1",
475
+ "category": "bola",
476
+ "subtype": "missing_ownership_check",
477
+ "title": "Report export allows exporting any data via query parameter injection",
478
+ "route_id": "R-0032",
479
+ "endpoint": {
480
+ "method": "GET",
481
+ "path": "/reports/export"
482
+ },
483
+ "location": {
484
+ "file": "node-express/routes/admin.js",
485
+ "start_line": 16,
486
+ "end_line": 17
487
+ },
488
+ "evidence": [
489
+ {
490
+ "file": "node-express/routes/admin.js",
491
+ "line": 5,
492
+ "code": "function ensureLoggedIn(req, res, next) { if (!req.user) return res.redirect('/login'); next(); }",
493
+ "why": "Only checks if user is logged in, does not check ownership of the data"
494
+ },
495
+ {
496
+ "file": "node-express/routes/admin.js",
497
+ "line": 17,
498
+ "code": "if (req.query.isAdmin === 'true') { res.json([]); }",
499
+ "why": "Checks a query parameter to decide whether to return empty data, but does not verify ownership of the actual data being exported"
500
+ }
501
+ ],
502
+ "attack_scenario": "User A sends GET /reports/export?isAdmin=false. The server exports all data (assuming no other checks exist).",
503
+ "impact": "Disclosure of sensitive data via unauthorized export.",
504
+ "severity": "high",
505
+ "confidence": "high",
506
+ "cwe": [
507
+ "CWE-284",
508
+ "CWE-639"
509
+ ],
510
+ "owasp": [
511
+ "API1:2023"
512
+ ],
513
+ "recommendation": "Verify that the data being exported belongs to the authenticated user before returning it.",
514
+ "status": "unverified"
515
+ }
516
+ ],
517
+ "route_verdicts": [
518
+ {
519
+ "route_id": "R-0020",
520
+ "verdict": "vulnerable"
521
+ },
522
+ {
523
+ "route_id": "R-0021",
524
+ "verdict": "vulnerable"
525
+ },
526
+ {
527
+ "route_id": "R-0022",
528
+ "verdict": "vulnerable"
529
+ },
530
+ {
531
+ "route_id": "R-0023",
532
+ "verdict": "vulnerable"
533
+ },
534
+ {
535
+ "route_id": "R-0024",
536
+ "verdict": "vulnerable"
537
+ },
538
+ {
539
+ "route_id": "R-0025",
540
+ "verdict": "vulnerable"
541
+ },
542
+ {
543
+ "route_id": "R-0026",
544
+ "verdict": "safe",
545
+ "reason": "Endpoint explicitly calls findByIdAndOwner(id, principal.getName()) which binds the session user to the target object."
546
+ },
547
+ {
548
+ "route_id": "R-0027",
549
+ "verdict": "vulnerable"
550
+ },
551
+ {
552
+ "route_id": "R-0028",
553
+ "verdict": "vulnerable"
554
+ },
555
+ {
556
+ "route_id": "R-0030",
557
+ "verdict": "vulnerable"
558
+ },
559
+ {
560
+ "route_id": "R-0031",
561
+ "verdict": "vulnerable"
562
+ },
563
+ {
564
+ "route_id": "R-0032",
565
+ "verdict": "vulnerable"
566
+ }
567
+ ]
568
+ }