@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.
- package/CHANGELOG.md +41 -0
- package/LICENSE +202 -0
- package/README.md +1 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/ai-run-stats.json +87 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/auth-model.md +120 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/batches/index.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/batches/injection-001.json +383 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/batches/injection-002.json +205 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/batches/privilege-001.json +838 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/batches/privilege-002.json +124 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/batches/routes-001.json +778 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/batches/routes-002.json +546 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/batches/routes-003.json +661 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/batches/routes-004.json +659 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/batches/routes-005.json +612 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/batches/routes-006.json +106 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/coverage.json +19 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/bola-routes-001.json +516 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/bola-routes-002.json +332 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/bola-routes-003.json +218 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/bola-routes-004.json +561 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/bola-routes-005.json +316 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/bola-routes-006.json +14 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/inj-injection-001.json +782 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/inj-injection-002.json +418 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/priv-privilege-001.json +627 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/priv-privilege-002.json +253 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-1.json +68 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-10.json +68 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-11.json +61 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-12.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-13.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-14.json +66 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-15.json +69 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-16.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-17.json +61 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-18.json +69 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-19.json +64 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-2.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-20.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-21.json +61 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-22.json +50 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-3.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-4.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-5.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-6.json +70 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-7.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-8.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings/verified-9.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/findings.json +4857 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/report.ja.md +2112 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/report.md +2112 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/score.json +82 -0
- package/assess/lsa/examples/eval-run-6/gptoss-a/stack-profile.json +225 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/ai-run-stats.json +91 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/auth-model.md +120 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/batches/index.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/batches/injection-001.json +383 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/batches/injection-002.json +205 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/batches/privilege-001.json +838 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/batches/privilege-002.json +124 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/batches/routes-001.json +778 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/batches/routes-002.json +546 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/batches/routes-003.json +661 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/batches/routes-004.json +659 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/batches/routes-005.json +612 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/batches/routes-006.json +106 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/coverage.json +21 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/bola-routes-001.json +593 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/bola-routes-002.json +367 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/bola-routes-003.json +207 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/bola-routes-004.json +477 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/bola-routes-005.json +341 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/bola-routes-006.json +14 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/inj-injection-001.json +821 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/inj-injection-002.json +410 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/priv-privilege-001.json +649 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/priv-privilege-002.json +222 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-1.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-10.json +67 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-11.json +68 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-12.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-13.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-14.json +64 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-15.json +70 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-16.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-17.json +61 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-18.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-19.json +65 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-2.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-20.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-21.json +62 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-22.json +50 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-3.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-4.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-5.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-6.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-7.json +64 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-8.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings/verified-9.json +60 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/findings.json +4966 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/score.json +87 -0
- package/assess/lsa/examples/eval-run-6/gptoss-b/stack-profile.json +225 -0
- package/assess/lsa/examples/eval-run-6/ground-truth.json +851 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/ai-run-stats.json +96 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/auth-model.md +191 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/batches/index.json +60 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/batches/injection-001.json +383 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/batches/injection-002.json +205 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/batches/privilege-001.json +838 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/batches/privilege-002.json +124 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/batches/routes-001.json +778 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/batches/routes-002.json +546 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/batches/routes-003.json +661 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/batches/routes-004.json +659 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/batches/routes-005.json +612 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/batches/routes-006.json +106 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/coverage.json +31 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/bola-routes-001.json +527 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/bola-routes-002.json +568 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/bola-routes-003.json +467 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/bola-routes-004.json +342 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/bola-routes-005.json +693 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/bola-routes-006.json +16 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/inj-injection-001.json +1123 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/inj-injection-002.json +391 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/priv-privilege-001.json +726 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/priv-privilege-002.json +306 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-1.json +137 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-10.json +106 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-11.json +81 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-12.json +135 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-13.json +135 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-14.json +135 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-15.json +110 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-16.json +116 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-17.json +141 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-18.json +135 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-19.json +140 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-2.json +135 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-20.json +82 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-21.json +74 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-22.json +99 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-3.json +140 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-4.json +145 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-5.json +135 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-6.json +135 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-7.json +87 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-8.json +125 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings/verified-9.json +135 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/findings.json +6989 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/memory.log +36 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/score.json +106 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-nothink/stack-profile.json +225 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-partial/auth-model.md +517 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-partial/findings/bola-routes-001.json +5 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-partial/findings/bola-routes-002.json +428 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-partial/findings/bola-routes-003.json +388 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-partial/findings/bola-routes-004.json +463 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-partial/findings/bola-routes-005.json +5 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-partial/findings/bola-routes-006.json +67 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-partial/findings/inj-injection-001.json +964 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-partial/findings.partial.json +1872 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-partial/memory.log +194 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-partial/score.partial.json +108 -0
- package/assess/lsa/examples/eval-run-6/qwen-16k-partial/stack-profile.json +225 -0
- package/assess/lsa/scripts/detect_stack.py +13 -5
- package/assess/lsa/scripts/find_injection.py +35 -2
- package/assess/lsa/scripts/java_routes.py +323 -0
- package/assess/lsa/scripts/laravel_routes.py +102 -0
- package/assess/lsa/scripts/lsa_common.py +72 -2
- package/assess/lsa/scripts/map_routes.py +40 -161
- package/assess/lsa/scripts/merge_findings.py +2 -0
- package/assess/lsa/tests/EVAL-RESULTS.md +126 -0
- package/assess/lsa/tests/test_eval_run_6.py +104 -0
- package/assess/lsa/tests/test_java_legacy_realistic.py +453 -0
- package/assess/lsa/tests/test_laravel_routes.py +95 -0
- package/contracts/schemas/persona-suite.schema.json +38 -2
- package/examples/member-portal/backend-dotnet/Dockerfile +2 -1
- package/examples/member-portal/backend-spring/Dockerfile +2 -0
- package/examples/member-portal/docker-compose.yml +1 -1
- package/examples/member-portal/frontend/Dockerfile +3 -2
- package/examples/member-portal/frontend/package-lock.json +24 -656
- package/examples/member-portal/frontend/package.json +1 -1
- package/operate/ai/client.py +22 -9
- package/operate/ai/runner.py +24 -4
- package/operate/cli/__init__.py +1 -1
- package/operate/cli/commands/fix.py +4 -0
- package/operate/cli/commands/leak_check.py +75 -0
- package/operate/cli/commands/protect.py +32 -3
- package/operate/cli/commands/scan.py +8 -1
- package/operate/cli/commands/test.py +131 -15
- package/operate/cli/main.py +5 -3
- package/operate/cross_user_tester/persona_matrix.py +118 -25
- package/operate/cross_user_tester/runner.py +190 -7
- package/operate/cross_user_tester/session_config.py +180 -0
- package/operate/cross_user_tester/session_http.py +288 -0
- package/operate/devsecops/leak_check.py +314 -0
- package/operate/remediator/runner.py +18 -1
- package/operate/remediator/strategies.py +2 -2
- package/operate/simulate/scenarios.py +2 -2
- package/operate/tests/mock_legacy_session_app.py +160 -0
- package/operate/tests/test_ai_reasoning_effort.py +65 -0
- package/operate/tests/test_ai_route_inventory.py +53 -0
- package/operate/tests/test_cross_user_session.py +565 -0
- package/operate/tests/test_docker_packaging.py +3 -3
- package/operate/tests/test_headless_ai.py +6 -0
- package/operate/tests/test_leak_check.py +250 -0
- package/operate/tests/test_legacy_session_edge.py +192 -0
- package/operate/tests/test_pilot_safeguards.py +245 -0
- package/operate/tests/test_remediator_java_legacy.py +330 -0
- package/package.json +2 -1
- package/remediate/authz/patcher.py +120 -11
- package/remediate/authz/tests/test_bola_patcher.py +4 -1
- package/remediate/edge/coraza/Caddyfile +1 -1
- package/remediate/edge/coraza/Dockerfile +9 -0
- package/remediate/edge/coraza/rules/coraza-crs-custom.conf +12 -0
- package/remediate/edge/coraza/virtual_patcher.py +24 -0
- package/remediate/edge/docker-compose.yml +7 -2
- package/remediate/edge/kong/kong-legacy-session.yaml +51 -0
- package/remediate/edge/mock-backend/Dockerfile +2 -0
- package/remediate/edge/tests/test_edge_security.py +21 -1
- package/remediate/resilience/terraform/backup_worm.tf +39 -1
- package/remediate/resilience/terraform/main.tf +15 -3
- package/remediate/resilience/terraform/variables.tf +11 -0
- package/remediate/resilience/tests/test_resilience.py +16 -0
|
@@ -0,0 +1,388 @@
|
|
|
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 authenticated user via id parameter",
|
|
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": 8,
|
|
23
|
+
"code": "router.get('/orders/:id', ensureLoggedIn, function (req, res) {",
|
|
24
|
+
"why": "Route protected by login check only"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"file": "node-express/routes/orders.js",
|
|
28
|
+
"line": 9,
|
|
29
|
+
"code": "Order.findById(req.params.id, function (err, order) { res.json(order); });",
|
|
30
|
+
"why": "Query fetches order by id without filtering by owner/user_id"
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"attack_scenario": "User A sends GET /orders/:id?id=<order id of user B> and receives B's order data.",
|
|
34
|
+
"impact": "Read other customers' orders (name, address, amount).",
|
|
35
|
+
"severity": "high",
|
|
36
|
+
"confidence": "high",
|
|
37
|
+
"cwe": [
|
|
38
|
+
"CWE-284",
|
|
39
|
+
"CWE-639"
|
|
40
|
+
],
|
|
41
|
+
"owasp": [
|
|
42
|
+
"API1:2023"
|
|
43
|
+
],
|
|
44
|
+
"recommendation": "Add owner verification by filtering query with user_id from session/token or load order then compare owner and return 404 on mismatch.",
|
|
45
|
+
"status": "unverified",
|
|
46
|
+
"attack_vector": {
|
|
47
|
+
"target_param": "id"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"finding_id": "BOLA-R-0035-1",
|
|
52
|
+
"category": "bola",
|
|
53
|
+
"subtype": "missing_ownership_check",
|
|
54
|
+
"title": "Reports readable by any authenticated user without ownership filter",
|
|
55
|
+
"route_id": "R-0035",
|
|
56
|
+
"endpoint": {
|
|
57
|
+
"method": "GET",
|
|
58
|
+
"path": "/reports"
|
|
59
|
+
},
|
|
60
|
+
"location": {
|
|
61
|
+
"file": "node-express/routes/orders.js",
|
|
62
|
+
"start_line": 16,
|
|
63
|
+
"end_line": 18
|
|
64
|
+
},
|
|
65
|
+
"evidence": [
|
|
66
|
+
{
|
|
67
|
+
"file": "node-express/routes/orders.js",
|
|
68
|
+
"line": 16,
|
|
69
|
+
"code": "router.get('/reports', ensureLoggedIn, function (req, res) {",
|
|
70
|
+
"why": "Route protected by login check only"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"file": "node-express/routes/orders.js",
|
|
74
|
+
"line": 17,
|
|
75
|
+
"code": "db.query(\"SELECT * FROM reports WHERE month = '\" + req.query.month + \"'\", function (e, rows) { res.json(rows); });",
|
|
76
|
+
"why": "Query fetches all reports without filtering by user_id or owner"
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
"attack_scenario": "User A sends GET /reports?month=2024-01 and receives all users' report data.",
|
|
80
|
+
"impact": "Read other customers' reports (financial, operational data).",
|
|
81
|
+
"severity": "high",
|
|
82
|
+
"confidence": "high",
|
|
83
|
+
"cwe": [
|
|
84
|
+
"CWE-284",
|
|
85
|
+
"CWE-639"
|
|
86
|
+
],
|
|
87
|
+
"owasp": [
|
|
88
|
+
"API1:2023"
|
|
89
|
+
],
|
|
90
|
+
"recommendation": "Add owner verification by filtering query with user_id from session/token or load reports then compare owner and return 404 on mismatch.",
|
|
91
|
+
"status": "unverified"
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"finding_id": "BOLA-R-0037-1",
|
|
95
|
+
"category": "bola",
|
|
96
|
+
"subtype": "missing_ownership_check",
|
|
97
|
+
"title": "Item search returns all items without ownership filter",
|
|
98
|
+
"route_id": "R-0037",
|
|
99
|
+
"endpoint": {
|
|
100
|
+
"method": "GET",
|
|
101
|
+
"path": "/search"
|
|
102
|
+
},
|
|
103
|
+
"location": {
|
|
104
|
+
"file": "node-express/routes/orders.js",
|
|
105
|
+
"start_line": 24,
|
|
106
|
+
"end_line": 26
|
|
107
|
+
},
|
|
108
|
+
"evidence": [
|
|
109
|
+
{
|
|
110
|
+
"file": "node-express/routes/orders.js",
|
|
111
|
+
"line": 24,
|
|
112
|
+
"code": "router.get('/search', ensureLoggedIn, function (req, res) {",
|
|
113
|
+
"why": "Route protected by login check only"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"file": "node-express/routes/orders.js",
|
|
117
|
+
"line": 25,
|
|
118
|
+
"code": "db.collection('items').find({ $where: \"this.name == '\" + req.query.n + \"'\" }).toArray(function (e, r) { res.json(r); });",
|
|
119
|
+
"why": "Query searches all items by name without filtering by user_id or owner"
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
"attack_scenario": "User A sends GET /search?name=product and receives all users' item data.",
|
|
123
|
+
"impact": "Read other customers' items (names, details).",
|
|
124
|
+
"severity": "high",
|
|
125
|
+
"confidence": "high",
|
|
126
|
+
"cwe": [
|
|
127
|
+
"CWE-284",
|
|
128
|
+
"CWE-639"
|
|
129
|
+
],
|
|
130
|
+
"owasp": [
|
|
131
|
+
"API1:2023"
|
|
132
|
+
],
|
|
133
|
+
"recommendation": "Add owner verification by filtering query with user_id from session/token or load items then compare owner and return 404 on mismatch.",
|
|
134
|
+
"status": "unverified"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"finding_id": "BOLA-R-0038-1",
|
|
138
|
+
"category": "bola",
|
|
139
|
+
"subtype": "no_authentication",
|
|
140
|
+
"title": "Stats endpoint lacks authentication guard and exposes order data",
|
|
141
|
+
"route_id": "R-0038",
|
|
142
|
+
"endpoint": {
|
|
143
|
+
"method": "GET",
|
|
144
|
+
"path": "/stats"
|
|
145
|
+
},
|
|
146
|
+
"location": {
|
|
147
|
+
"file": "node-express/routes/orders.js",
|
|
148
|
+
"start_line": 28,
|
|
149
|
+
"end_line": 30
|
|
150
|
+
},
|
|
151
|
+
"evidence": [
|
|
152
|
+
{
|
|
153
|
+
"file": "node-express/routes/orders.js",
|
|
154
|
+
"line": 28,
|
|
155
|
+
"code": "router.get('/stats', function (req, res) {",
|
|
156
|
+
"why": "No authentication middleware applied"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"file": "node-express/routes/orders.js",
|
|
160
|
+
"line": 29,
|
|
161
|
+
"code": "db.query(`SELECT COUNT(*) AS n FROM orders WHERE shop_id = ${req.query.shop}`, function (e, r) { res.json(r); });",
|
|
162
|
+
"why": "Query accesses order data without verifying user identity"
|
|
163
|
+
}
|
|
164
|
+
],
|
|
165
|
+
"attack_scenario": "Any user sends GET /stats?shop=123 and receives order statistics for that shop.",
|
|
166
|
+
"impact": "Read order statistics without authentication (potential sensitive business data).",
|
|
167
|
+
"severity": "high",
|
|
168
|
+
"confidence": "high",
|
|
169
|
+
"cwe": [
|
|
170
|
+
"CWE-285",
|
|
171
|
+
"CWE-639"
|
|
172
|
+
],
|
|
173
|
+
"owasp": [
|
|
174
|
+
"API5:2023"
|
|
175
|
+
],
|
|
176
|
+
"recommendation": "Add authentication guard middleware and verify user identity before accessing order data.",
|
|
177
|
+
"status": "unverified"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"finding_id": "BOLA-R-0043-1",
|
|
181
|
+
"category": "bola",
|
|
182
|
+
"subtype": "missing_ownership_check",
|
|
183
|
+
"title": "Perl CGI order endpoint fetches orders without ownership verification",
|
|
184
|
+
"route_id": "R-0043",
|
|
185
|
+
"endpoint": {
|
|
186
|
+
"method": "ANY",
|
|
187
|
+
"path": "/perl-cgi/cgi-bin/order.cgi"
|
|
188
|
+
},
|
|
189
|
+
"location": {
|
|
190
|
+
"file": "perl-cgi/cgi-bin/order.cgi",
|
|
191
|
+
"start_line": 13,
|
|
192
|
+
"end_line": 15
|
|
193
|
+
},
|
|
194
|
+
"evidence": [
|
|
195
|
+
{
|
|
196
|
+
"file": "perl-cgi/cgi-bin/order.cgi",
|
|
197
|
+
"line": 9,
|
|
198
|
+
"code": "my $uid = $session->param('user_id');",
|
|
199
|
+
"why": "User ID from session"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"file": "perl-cgi/cgi-bin/order.cgi",
|
|
203
|
+
"line": 13,
|
|
204
|
+
"code": "my $sth = $dbh->prepare(\"SELECT * FROM orders WHERE id = $id\");",
|
|
205
|
+
"why": "Query fetches order by id without filtering by user_id"
|
|
206
|
+
}
|
|
207
|
+
],
|
|
208
|
+
"attack_scenario": "User A sends request with different order id and receives another user's order data.",
|
|
209
|
+
"impact": "Read other customers' orders (name, address, amount).",
|
|
210
|
+
"severity": "high",
|
|
211
|
+
"confidence": "high",
|
|
212
|
+
"cwe": [
|
|
213
|
+
"CWE-284",
|
|
214
|
+
"CWE-639"
|
|
215
|
+
],
|
|
216
|
+
"owasp": [
|
|
217
|
+
"API1:2023"
|
|
218
|
+
],
|
|
219
|
+
"recommendation": "Add ownership verification by filtering query with user_id from session or load order then compare owner and return 404 on mismatch.",
|
|
220
|
+
"status": "unverified",
|
|
221
|
+
"attack_vector": {
|
|
222
|
+
"target_param": "user_id"
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"finding_id": "BOLA-R-0044-1",
|
|
227
|
+
"category": "bola",
|
|
228
|
+
"subtype": "missing_ownership_check",
|
|
229
|
+
"title": "Invoice view endpoint fetches invoice without ownership verification",
|
|
230
|
+
"route_id": "R-0044",
|
|
231
|
+
"endpoint": {
|
|
232
|
+
"method": "ANY",
|
|
233
|
+
"path": "/invoice/view/{id}"
|
|
234
|
+
},
|
|
235
|
+
"location": {
|
|
236
|
+
"file": "php-codeigniter/application/controllers/Invoice.php",
|
|
237
|
+
"start_line": 9,
|
|
238
|
+
"end_line": 12
|
|
239
|
+
},
|
|
240
|
+
"evidence": [
|
|
241
|
+
{
|
|
242
|
+
"file": "php-codeigniter/application/controllers/Invoice.php",
|
|
243
|
+
"line": 9,
|
|
244
|
+
"code": "public function view($id) {",
|
|
245
|
+
"why": "Method takes id parameter"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"file": "php-codeigniter/application/controllers/Invoice.php",
|
|
249
|
+
"line": 10,
|
|
250
|
+
"code": "$q = $this->db->query(\"SELECT * FROM invoices WHERE id = $id\");",
|
|
251
|
+
"why": "Query fetches invoice by id without filtering by user_id"
|
|
252
|
+
}
|
|
253
|
+
],
|
|
254
|
+
"attack_scenario": "User A sends request with different invoice id and receives another user's invoice data.",
|
|
255
|
+
"impact": "Read other customers' invoices (name, address, amount).",
|
|
256
|
+
"severity": "high",
|
|
257
|
+
"confidence": "high",
|
|
258
|
+
"cwe": [
|
|
259
|
+
"CWE-284",
|
|
260
|
+
"CWE-639"
|
|
261
|
+
],
|
|
262
|
+
"owasp": [
|
|
263
|
+
"API1:2023"
|
|
264
|
+
],
|
|
265
|
+
"recommendation": "Add ownership verification by filtering query with user_id from session or load invoice then compare owner and return 404 on mismatch.",
|
|
266
|
+
"status": "unverified",
|
|
267
|
+
"attack_vector": {
|
|
268
|
+
"target_param": "id"
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
"finding_id": "BOLA-R-0046-1",
|
|
273
|
+
"category": "bola",
|
|
274
|
+
"subtype": "missing_ownership_check",
|
|
275
|
+
"title": "Invoice update endpoint modifies invoice without ownership verification",
|
|
276
|
+
"route_id": "R-0046",
|
|
277
|
+
"endpoint": {
|
|
278
|
+
"method": "ANY",
|
|
279
|
+
"path": "/invoice/update"
|
|
280
|
+
},
|
|
281
|
+
"location": {
|
|
282
|
+
"file": "php-codeigniter/application/controllers/Invoice.php",
|
|
283
|
+
"start_line": 20,
|
|
284
|
+
"end_line": 24
|
|
285
|
+
},
|
|
286
|
+
"evidence": [
|
|
287
|
+
{
|
|
288
|
+
"file": "php-codeigniter/application/controllers/Invoice.php",
|
|
289
|
+
"line": 21,
|
|
290
|
+
"code": "$id = $this->input->post('invoice_id');",
|
|
291
|
+
"why": "ID from POST parameter"
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"file": "php-codeigniter/application/controllers/Invoice.php",
|
|
295
|
+
"line": 23,
|
|
296
|
+
"code": "$this->db->query(\"UPDATE invoices SET note = ? WHERE id = ?\", array($note, $id));",
|
|
297
|
+
"why": "Update query modifies invoice by id without filtering by user_id"
|
|
298
|
+
}
|
|
299
|
+
],
|
|
300
|
+
"attack_scenario": "User A sends POST with different invoice_id and modifies another user's invoice.",
|
|
301
|
+
"impact": "Modify other customers' invoices (notes, data).",
|
|
302
|
+
"severity": "high",
|
|
303
|
+
"confidence": "high",
|
|
304
|
+
"cwe": [
|
|
305
|
+
"CWE-284",
|
|
306
|
+
"CWE-639"
|
|
307
|
+
],
|
|
308
|
+
"owasp": [
|
|
309
|
+
"API1:2023"
|
|
310
|
+
],
|
|
311
|
+
"recommendation": "Add ownership verification by filtering update query with user_id from session or load invoice then compare owner and return 404 on mismatch.",
|
|
312
|
+
"status": "unverified",
|
|
313
|
+
"attack_vector": {
|
|
314
|
+
"target_param": "invoice_id"
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
],
|
|
318
|
+
"route_verdicts": [
|
|
319
|
+
{
|
|
320
|
+
"route_id": "R-0033",
|
|
321
|
+
"verdict": "vulnerable"
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
"route_id": "R-0034",
|
|
325
|
+
"verdict": "safe",
|
|
326
|
+
"reason": "query filters by owner: req.user._id in line 13"
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
"route_id": "R-0035",
|
|
330
|
+
"verdict": "vulnerable"
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
"route_id": "R-0036",
|
|
334
|
+
"verdict": "not_applicable",
|
|
335
|
+
"reason": "login endpoint does not return or modify another user's object"
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
"route_id": "R-0037",
|
|
339
|
+
"verdict": "vulnerable"
|
|
340
|
+
},
|
|
341
|
+
{
|
|
342
|
+
"route_id": "R-0038",
|
|
343
|
+
"verdict": "vulnerable"
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"route_id": "R-0043",
|
|
347
|
+
"verdict": "vulnerable"
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
"route_id": "R-0044",
|
|
351
|
+
"verdict": "vulnerable"
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
"route_id": "R-0045",
|
|
355
|
+
"verdict": "safe",
|
|
356
|
+
"reason": "query filters by user_id from session in line 16"
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
"route_id": "R-0046",
|
|
360
|
+
"verdict": "vulnerable"
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"route_id": "R-0047",
|
|
364
|
+
"verdict": "not_applicable",
|
|
365
|
+
"reason": "registration endpoint creates new user, does not access existing user's object"
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
"route_id": "R-0048",
|
|
369
|
+
"verdict": "not_applicable",
|
|
370
|
+
"reason": "post creation endpoint creates new post, does not access existing user's object"
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
"route_id": "R-0049",
|
|
374
|
+
"verdict": "not_applicable",
|
|
375
|
+
"reason": "team creation endpoint creates new team, does not access existing user's object"
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
"route_id": "R-0050",
|
|
379
|
+
"verdict": "safe",
|
|
380
|
+
"reason": "uses request.user() to get authenticated user and updates that specific user's record"
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
"route_id": "R-0051",
|
|
384
|
+
"verdict": "safe",
|
|
385
|
+
"reason": "uses request.user() to get authenticated user and updates that specific user's record"
|
|
386
|
+
}
|
|
387
|
+
]
|
|
388
|
+
}
|