@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,467 @@
1
+ {
2
+ "batch_id": "routes-003",
3
+ "findings": [
4
+ {
5
+ "finding_id": "BOLA-R-0033-1",
6
+ "category": "bola",
7
+ "subtype": "missing_ownership_check",
8
+ "title": "Order detail readable by any logged-in user via id",
9
+ "route_id": "R-0033",
10
+ "endpoint": {
11
+ "method": "GET",
12
+ "path": "/orders/:id"
13
+ },
14
+ "location": {
15
+ "file": "node-express/routes/orders.js",
16
+ "start_line": 8,
17
+ "end_line": 10
18
+ },
19
+ "evidence": [
20
+ {
21
+ "file": "node-express/routes/orders.js",
22
+ "line": 9,
23
+ "code": "Order.findById(req.params.id, function (err, order) { res.json(order); });",
24
+ "why": "ID comes from request params; query fetches by ID only without checking owner against session user"
25
+ }
26
+ ],
27
+ "attack_scenario": "User A sends GET /orders/:id?id=<order id of user B> and receives B's order.",
28
+ "impact": "Read other customers' orders (name, address, amount).",
29
+ "severity": "high",
30
+ "confidence": "high",
31
+ "cwe": [
32
+ "CWE-284",
33
+ "CWE-639"
34
+ ],
35
+ "recommendation": "Add a check to ensure the order's owner matches the authenticated user before returning the data.",
36
+ "status": "unverified",
37
+ "attack_vector": {
38
+ "target_param": "id"
39
+ }
40
+ },
41
+ {
42
+ "finding_id": "BOLA-R-0035-1",
43
+ "category": "bola",
44
+ "subtype": "missing_ownership_check",
45
+ "title": "Reports readable by any logged-in user via query params",
46
+ "route_id": "R-0035",
47
+ "endpoint": {
48
+ "method": "GET",
49
+ "path": "/reports"
50
+ },
51
+ "location": {
52
+ "file": "node-express/routes/orders.js",
53
+ "start_line": 16,
54
+ "end_line": 18
55
+ },
56
+ "evidence": [
57
+ {
58
+ "file": "node-express/routes/orders.js",
59
+ "line": 17,
60
+ "code": "db.query(\"SELECT * FROM reports WHERE month = '\" + req.query.month + \"'\", function (e, rows) { res.json(rows); });",
61
+ "why": "Query fetches all reports for a given month without filtering by the authenticated user's ID or ownership"
62
+ }
63
+ ],
64
+ "attack_scenario": "User A sends GET /reports?month=2023-10 and receives reports belonging to other users.",
65
+ "impact": "Read other customers' reports (financial data, metrics).",
66
+ "severity": "high",
67
+ "confidence": "high",
68
+ "cwe": [
69
+ "CWE-284",
70
+ "CWE-639"
71
+ ],
72
+ "recommendation": "Add a filter to ensure the retrieved reports belong to the authenticated user.",
73
+ "status": "unverified"
74
+ },
75
+ {
76
+ "finding_id": "BOLA-R-0038-1",
77
+ "category": "bola",
78
+ "subtype": "missing_ownership_check",
79
+ "title": "Stats readable by any logged-in user via query params",
80
+ "route_id": "R-0038",
81
+ "endpoint": {
82
+ "method": "GET",
83
+ "path": "/stats"
84
+ },
85
+ "location": {
86
+ "file": "node-express/routes/orders.js",
87
+ "start_line": 28,
88
+ "end_line": 30
89
+ },
90
+ "evidence": [
91
+ {
92
+ "file": "node-express/routes/orders.js",
93
+ "line": 29,
94
+ "code": "db.query(`SELECT COUNT(*) AS n FROM orders WHERE shop_id = ${req.query.shop}`, function (e, r) { res.json(r); });",
95
+ "why": "Query fetches stats for a given shop without verifying if the authenticated user has access to that shop"
96
+ }
97
+ ],
98
+ "attack_scenario": "User A sends GET /stats?shop=123 and receives statistics for a shop they do not own.",
99
+ "impact": "Read business statistics (counts, totals) for other shops.",
100
+ "severity": "high",
101
+ "confidence": "high",
102
+ "cwe": [
103
+ "CWE-284",
104
+ "CWE-639"
105
+ ],
106
+ "recommendation": "Add a check to ensure the shop_id belongs to the authenticated user before returning the data.",
107
+ "status": "unverified"
108
+ },
109
+ {
110
+ "finding_id": "BOLA-R-0044-1",
111
+ "category": "bola",
112
+ "subtype": "missing_ownership_check",
113
+ "title": "Invoice detail readable by any logged-in user via id",
114
+ "route_id": "R-0044",
115
+ "endpoint": {
116
+ "method": "ANY",
117
+ "path": "/invoice/view/{id}"
118
+ },
119
+ "location": {
120
+ "file": "php-codeigniter/application/controllers/Invoice.php",
121
+ "start_line": 9,
122
+ "end_line": 12
123
+ },
124
+ "evidence": [
125
+ {
126
+ "file": "php-codeigniter/application/controllers/Invoice.php",
127
+ "line": 10,
128
+ "code": "$q = $this->db->query(\"SELECT * FROM invoices WHERE id = $id\");",
129
+ "why": "ID comes from request params; query fetches by ID only without checking owner against session user"
130
+ }
131
+ ],
132
+ "attack_scenario": "User A sends GET /invoice/view/{id}?id=<invoice id of user B> and receives B's invoice.",
133
+ "impact": "Read other customers' invoices (amount, details).",
134
+ "severity": "high",
135
+ "confidence": "high",
136
+ "cwe": [
137
+ "CWE-284",
138
+ "CWE-639"
139
+ ],
140
+ "recommendation": "Add a check to ensure the invoice's owner matches the authenticated user before returning the data.",
141
+ "status": "unverified",
142
+ "attack_vector": {
143
+ "target_param": "id"
144
+ }
145
+ },
146
+ {
147
+ "finding_id": "BOLA-R-0046-1",
148
+ "category": "bola",
149
+ "subtype": "missing_ownership_check",
150
+ "title": "Invoice update modifiable by any logged-in user via post param",
151
+ "route_id": "R-0046",
152
+ "endpoint": {
153
+ "method": "ANY",
154
+ "path": "/invoice/update"
155
+ },
156
+ "location": {
157
+ "file": "php-codeigniter/application/controllers/Invoice.php",
158
+ "start_line": 20,
159
+ "end_line": 23
160
+ },
161
+ "evidence": [
162
+ {
163
+ "file": "php-codeigniter/application/controllers/Invoice.php",
164
+ "line": 21,
165
+ "code": "$id = $this->input->post('invoice_id');",
166
+ "why": "ID comes from request body; update query uses this ID without verifying ownership against session user"
167
+ },
168
+ {
169
+ "file": "php-codeigniter/application/controllers/Invoice.php",
170
+ "line": 23,
171
+ "code": "$this->db->query(\"UPDATE invoices SET note = ? WHERE id = ?\", array($note, $id));",
172
+ "why": "Update executes on the ID provided by the attacker without an ownership check"
173
+ }
174
+ ],
175
+ "attack_scenario": "User A sends POST /invoice/update with invoice_id=<invoice id of user B> and modifies B's note.",
176
+ "impact": "Modify other customers' invoices (add notes, change data).",
177
+ "severity": "high",
178
+ "confidence": "high",
179
+ "cwe": [
180
+ "CWE-284",
181
+ "CWE-639"
182
+ ],
183
+ "recommendation": "Add a check to ensure the invoice's owner matches the authenticated user before performing the update.",
184
+ "status": "unverified",
185
+ "attack_vector": {
186
+ "target_param": "invoice_id"
187
+ }
188
+ },
189
+ {
190
+ "finding_id": "BOLA-R-0047-1",
191
+ "category": "bola",
192
+ "subtype": "missing_ownership_check",
193
+ "title": "User registration allows any user to create accounts",
194
+ "route_id": "R-0047",
195
+ "endpoint": {
196
+ "method": "ANY",
197
+ "path": "/account/register/{request}"
198
+ },
199
+ "location": {
200
+ "file": "php-laravel/app/Http/Controllers/AccountController.php",
201
+ "start_line": 11,
202
+ "end_line": 13
203
+ },
204
+ "evidence": [
205
+ {
206
+ "file": "php-laravel/app/Http/Controllers/AccountController.php",
207
+ "line": 13,
208
+ "code": "return User::create($request->all());",
209
+ "why": "Creates a new user directly from request data without verifying if the current authenticated user is authorized to create accounts"
210
+ }
211
+ ],
212
+ "attack_scenario": "User A sends POST /account/register with another user's details and creates an account impersonating them or creating unauthorized accounts.",
213
+ "impact": "Create unauthorized user accounts or impersonate others.",
214
+ "severity": "high",
215
+ "confidence": "high",
216
+ "cwe": [
217
+ "CWE-284",
218
+ "CWE-639"
219
+ ],
220
+ "recommendation": "Add a check to ensure the current authenticated user is authorized to create new users before performing the creation.",
221
+ "status": "unverified"
222
+ },
223
+ {
224
+ "finding_id": "BOLA-R-0048-1",
225
+ "category": "bola",
226
+ "subtype": "missing_ownership_check",
227
+ "title": "Post creation allows any user to create posts",
228
+ "route_id": "R-0048",
229
+ "endpoint": {
230
+ "method": "ANY",
231
+ "path": "/account/post/{request}"
232
+ },
233
+ "location": {
234
+ "file": "php-laravel/app/Http/Controllers/AccountController.php",
235
+ "start_line": 16,
236
+ "end_line": 18
237
+ },
238
+ "evidence": [
239
+ {
240
+ "file": "php-laravel/app/Http/Controllers/AccountController.php",
241
+ "line": 18,
242
+ "code": "return Post::create($request->all());",
243
+ "why": "Creates a new post directly from request data without verifying if the current authenticated user is authorized to create posts"
244
+ }
245
+ ],
246
+ "attack_scenario": "User A sends POST /account/post with another user's details and creates a post impersonating them or creating unauthorized posts.",
247
+ "impact": "Create unauthorized posts or impersonate others.",
248
+ "severity": "high",
249
+ "confidence": "high",
250
+ "cwe": [
251
+ "CWE-284",
252
+ "CWE-639"
253
+ ],
254
+ "recommendation": "Add a check to ensure the current authenticated user is authorized to create new posts before performing the creation.",
255
+ "status": "unverified"
256
+ },
257
+ {
258
+ "finding_id": "BOLA-R-0049-1",
259
+ "category": "bola",
260
+ "subtype": "missing_ownership_check",
261
+ "title": "Team creation allows any user to create teams",
262
+ "route_id": "R-0049",
263
+ "endpoint": {
264
+ "method": "ANY",
265
+ "path": "/account/team/{request}"
266
+ },
267
+ "location": {
268
+ "file": "php-laravel/app/Http/Controllers/AccountController.php",
269
+ "start_line": 21,
270
+ "end_line": 23
271
+ },
272
+ "evidence": [
273
+ {
274
+ "file": "php-laravel/app/Http/Controllers/AccountController.php",
275
+ "line": 23,
276
+ "code": "return Team::create($request->all());",
277
+ "why": "Creates a new team directly from request data without verifying if the current authenticated user is authorized to create teams"
278
+ }
279
+ ],
280
+ "attack_scenario": "User A sends POST /account/team with another user's details and creates a team impersonating them or creating unauthorized teams.",
281
+ "impact": "Create unauthorized teams or impersonate others.",
282
+ "severity": "high",
283
+ "confidence": "high",
284
+ "cwe": [
285
+ "CWE-284",
286
+ "CWE-639"
287
+ ],
288
+ "recommendation": "Add a check to ensure the current authenticated user is authorized to create new teams before performing the creation.",
289
+ "status": "unverified"
290
+ },
291
+ {
292
+ "finding_id": "BOLA-R-0050-1",
293
+ "category": "bola",
294
+ "subtype": "missing_ownership_check",
295
+ "title": "User rename allows any user to rename others",
296
+ "route_id": "R-0050",
297
+ "endpoint": {
298
+ "method": "ANY",
299
+ "path": "/account/rename/{request}"
300
+ },
301
+ "location": {
302
+ "file": "php-laravel/app/Http/Controllers/AccountController.php",
303
+ "start_line": 26,
304
+ "end_line": 30
305
+ },
306
+ "evidence": [
307
+ {
308
+ "file": "php-laravel/app/Http/Controllers/AccountController.php",
309
+ "line": 28,
310
+ "code": "$user = $request->user();",
311
+ "why": "Loads the user from the request (which could be manipulated or spoofed) without verifying ownership of the target resource"
312
+ },
313
+ {
314
+ "file": "php-laravel/app/Http/Controllers/AccountController.php",
315
+ "line": 29,
316
+ "code": "$user->update($request->only(['name']));",
317
+ "why": "Updates the user directly from request data without verifying if the current authenticated user is authorized to update this specific user"
318
+ }
319
+ ],
320
+ "attack_scenario": "User A sends POST /account/rename with another user's ID and name, and renames that other user.",
321
+ "impact": "Modify other users' names or impersonate others.",
322
+ "severity": "high",
323
+ "confidence": "high",
324
+ "cwe": [
325
+ "CWE-284",
326
+ "CWE-639"
327
+ ],
328
+ "recommendation": "Add a check to ensure the current authenticated user is authorized to update the target user before performing the update.",
329
+ "status": "unverified"
330
+ },
331
+ {
332
+ "finding_id": "BOLA-R-0051-1",
333
+ "category": "bola",
334
+ "subtype": "missing_ownership_check",
335
+ "title": "Profile update allows any user to modify others' profiles",
336
+ "route_id": "R-0051",
337
+ "endpoint": {
338
+ "method": "ANY",
339
+ "path": "/account/profile/{request}"
340
+ },
341
+ "location": {
342
+ "file": "php-laravel/app/Http/Controllers/AccountController.php",
343
+ "start_line": 33,
344
+ "end_line": 37
345
+ },
346
+ "evidence": [
347
+ {
348
+ "file": "php-laravel/app/Http/Controllers/AccountController.php",
349
+ "line": 35,
350
+ "code": "$user = $request->user();",
351
+ "why": "Loads the user from the request (which could be manipulated or spoofed) without verifying ownership of the target resource"
352
+ },
353
+ {
354
+ "file": "php-laravel/app/Http/Controllers/AccountController.php",
355
+ "line": 36,
356
+ "code": "$user->fill($request->all())->save();",
357
+ "why": "Updates the user directly from request data without verifying if the current authenticated user is authorized to update this specific user"
358
+ }
359
+ ],
360
+ "attack_scenario": "User A sends POST /account/profile with another user's ID and profile data, and modifies that other user's profile.",
361
+ "impact": "Modify other users' profiles (email, name, etc.).",
362
+ "severity": "high",
363
+ "confidence": "high",
364
+ "cwe": [
365
+ "CWE-284",
366
+ "CWE-639"
367
+ ],
368
+ "recommendation": "Add a check to ensure the current authenticated user is authorized to update the target user before performing the update.",
369
+ "status": "unverified"
370
+ },
371
+ {
372
+ "finding_id": "BOLA-R-0043-verdict",
373
+ "category": "bola",
374
+ "subtype": "missing_ownership_check",
375
+ "title": "Missing ownership check at perl-cgi/cgi-bin/order.cgi:1 (from auditor verdict)",
376
+ "route_id": "R-0043",
377
+ "location": {
378
+ "file": "perl-cgi/cgi-bin/order.cgi",
379
+ "start_line": 1
380
+ },
381
+ "evidence": [
382
+ {
383
+ "file": "perl-cgi/cgi-bin/order.cgi",
384
+ "line": 1,
385
+ "why": "The auditor judged this route 'needs_review' but wrote no finding"
386
+ }
387
+ ],
388
+ "impact": "Generated from the auditor's 'needs_review' verdict; the model wrote no finding for it.",
389
+ "severity": "medium",
390
+ "confidence": "low",
391
+ "cwe": [
392
+ "CWE-284"
393
+ ],
394
+ "recommendation": "Bind the object lookup to the current user or tenant, or check ownership before using it.",
395
+ "status": "unverified",
396
+ "endpoint": {
397
+ "method": "ANY",
398
+ "path": "/perl-cgi/cgi-bin/order.cgi"
399
+ },
400
+ "attack_vector": {
401
+ "target_param": "user_id"
402
+ }
403
+ }
404
+ ],
405
+ "route_verdicts": [
406
+ {
407
+ "route_id": "R-0033",
408
+ "verdict": "vulnerable"
409
+ },
410
+ {
411
+ "route_id": "R-0034",
412
+ "verdict": "safe"
413
+ },
414
+ {
415
+ "route_id": "R-0035",
416
+ "verdict": "vulnerable"
417
+ },
418
+ {
419
+ "route_id": "R-0036",
420
+ "verdict": "not_applicable"
421
+ },
422
+ {
423
+ "route_id": "R-0037",
424
+ "verdict": "safe"
425
+ },
426
+ {
427
+ "route_id": "R-0038",
428
+ "verdict": "vulnerable"
429
+ },
430
+ {
431
+ "route_id": "R-0043",
432
+ "verdict": "needs_review"
433
+ },
434
+ {
435
+ "route_id": "R-0044",
436
+ "verdict": "vulnerable"
437
+ },
438
+ {
439
+ "route_id": "R-0045",
440
+ "verdict": "safe"
441
+ },
442
+ {
443
+ "route_id": "R-0046",
444
+ "verdict": "vulnerable"
445
+ },
446
+ {
447
+ "route_id": "R-0047",
448
+ "verdict": "vulnerable"
449
+ },
450
+ {
451
+ "route_id": "R-0048",
452
+ "verdict": "vulnerable"
453
+ },
454
+ {
455
+ "route_id": "R-0049",
456
+ "verdict": "vulnerable"
457
+ },
458
+ {
459
+ "route_id": "R-0050",
460
+ "verdict": "vulnerable"
461
+ },
462
+ {
463
+ "route_id": "R-0051",
464
+ "verdict": "vulnerable"
465
+ }
466
+ ]
467
+ }