@hoanghainh/komagu 1.8.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/README.md +1 -1
- package/assess/lsa/CHANGELOG.md +6 -0
- package/assess/lsa/VERSION +1 -1
- package/assess/lsa/adapters/build_adapters.py +16 -8
- package/assess/lsa/adapters/codex/README.md +1 -1
- package/assess/lsa/adapters/generic/README.md +1 -1
- package/assess/lsa/examples/eval-run-4/ground-truth.json +823 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/ai-run-stats.json +58 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/coverage.json +85 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/findings/priv-privilege-001.json +822 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/findings/priv-privilege-002.json +393 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/findings.json +4477 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-4/iter0-gptoss-a/score.json +120 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/ai-run-stats.json +55 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/coverage.json +50 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/findings/priv-privilege-001.json +613 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/findings/priv-privilege-002.json +287 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/findings.json +4870 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-a/score.json +107 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/ai-run-stats.json +58 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/coverage.json +92 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/findings/priv-privilege-001.json +645 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/findings/priv-privilege-002.json +222 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/findings.json +4859 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-4/iter1-gptoss-b/score.json +121 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/coverage.json +111 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/findings/priv-privilege-001.json +6 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/findings/priv-privilege-002.json +344 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/findings.json +3544 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-4/iter1-qwen-a-incomplete/score.json +123 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/ai-run-stats.json +50 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/coverage.json +42 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/findings/priv-privilege-001.json +540 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/findings/priv-privilege-002.json +238 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/findings.json +4383 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/findings.sarif +8729 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/report.ja.md +1911 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/report.md +1911 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/score.json +101 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-a/stack-profile.json +226 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/ai-run-stats.json +54 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/coverage.json +66 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/findings/priv-privilege-001.json +440 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/findings/priv-privilege-002.json +229 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/findings.json +3424 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-4/iter2-gptoss-b/score.json +120 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/ai-run-stats.json +88 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/coverage.json +36 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/findings/priv-privilege-001.json +530 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/findings/priv-privilege-002.json +248 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/findings.json +4766 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/findings.sarif +9326 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/report.ja.md +2011 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/report.md +2011 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/score.json +80 -0
- package/assess/lsa/examples/eval-run-5/gptoss-a/stack-profile.json +226 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/ai-run-stats.json +83 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/coverage.json +44 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/findings/priv-privilege-001.json +579 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/findings/priv-privilege-002.json +268 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/findings.json +3913 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/mass-assignment.candidates.json +232 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/routes/routes-001.json +425 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/routes/routes-002.json +333 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/routes/routes-003.json +400 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/routes/routes-004.json +403 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/routes/routes-005.json +398 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/routes/routes-006.json +63 -0
- package/assess/lsa/examples/eval-run-5/gptoss-b/score.json +94 -0
- package/assess/lsa/examples/eval-run-5/ground-truth.json +823 -0
- package/assess/lsa/knowledge/severity-and-cwe.md +1 -1
- package/assess/lsa/prompts/35-privilege-auditor.md +3 -1
- package/assess/lsa/scripts/baseline.py +5 -2
- package/assess/lsa/scripts/findings_to_sarif.py +24 -1
- package/assess/lsa/tests/EVAL-RESULTS.md +156 -0
- package/assess/lsa/tests/score_findings.py +58 -0
- package/assess/lsa/tests/test_adapters.py +21 -2
- package/assess/lsa/tests/test_baseline.py +8 -0
- package/assess/lsa/tests/test_contract_groundwork.py +7 -7
- package/assess/lsa/tests/test_eval_run_4.py +73 -0
- package/assess/lsa/tests/test_eval_run_5.py +73 -0
- package/assess/lsa/tests/test_privilege_tier2.py +30 -0
- package/operate/ai/anchoring.py +130 -0
- package/operate/ai/client.py +13 -0
- package/operate/ai/context.py +105 -0
- package/operate/ai/runner.py +197 -69
- package/operate/cli/__init__.py +1 -1
- package/operate/cli/commands/scan.py +3 -8
- package/operate/cli/commands/test.py +1 -1
- package/operate/cli/env.py +4 -20
- package/operate/cross_user_tester/persona_matrix.py +5 -1
- package/operate/devsecops/pipeline.py +5 -5
- package/operate/exploit/generator.py +5 -1
- package/operate/lsa_sarif/lsa_to_sarif.py +24 -2
- package/operate/lsa_sarif/sarif_findings.py +96 -0
- package/operate/remediator/runner.py +1 -5
- package/operate/remediator/strategies.py +1 -1
- package/operate/tests/test_ai_anchoring.py +184 -0
- package/operate/tests/test_cli_baseline.py +1 -9
- package/operate/tests/test_cli_env.py +8 -29
- package/operate/tests/test_cross_user_pipeline.py +2 -2
- package/operate/tests/test_exploit_and_virtual_patch.py +3 -3
- package/operate/tests/test_headless_ai.py +148 -1
- package/operate/tests/test_npm_package.py +2 -16
- package/operate/tests/test_sarif_from_scan.py +156 -0
- package/package.json +2 -4
- package/remediate/authz/README.md +1 -1
- package/remediate/authz/dotnet/src/Komagu.Security.Authorization/DefaultKomaguAuthorizationService.cs +1 -1
- package/remediate/authz/dotnet/src/Komagu.Security.Authorization/SecurityAuditEvent.cs +2 -2
- package/remediate/authz/golang/authz.go +1 -1
- package/remediate/authz/nodejs/src/service.js +1 -1
- package/remediate/authz/nodejs/tests/test-authz.js +1 -1
- package/remediate/authz/patcher.py +3 -4
- package/remediate/authz/python/komagu_authz/models.py +2 -2
- package/remediate/authz/python/tests/test_fastapi_adapter.py +1 -1
- package/remediate/authz/python/tests/test_fastapi_d5_crosstest.py +1 -1
- package/remediate/authz/python/tests/test_python_authz.py +3 -3
- package/remediate/authz/spring/src/main/kotlin/io/komagu/security/authorization/DefaultKomaguSecurityManager.kt +1 -1
- package/remediate/authz/spring/src/main/kotlin/io/komagu/security/authorization/SecurityAuditEvent.kt +1 -2
- package/remediate/authz/tests/test_bola_patcher.py +1 -1
- package/remediate/edge/coraza/rules/coraza-crs-custom.conf +3 -4
- package/remediate/edge/coraza/virtual_patcher.py +4 -6
- package/remediate/edge/docker-compose.yml +1 -1
- package/remediate/ekyc/server/jpki_verifier.py +2 -8
- package/remediate/ekyc/server/tokenization.py +2 -8
- package/remediate/identity/README.md +5 -5
- package/remediate/identity/dotnet/src/Komagu.Security.Identity/KomaguOidcOptions.cs +2 -2
- package/remediate/identity/dotnet/tests/Komagu.Security.Identity.Tests/TestTokenGenerator.cs +1 -1
- package/remediate/identity/dotnet/tests/Komagu.Security.Identity.Tests/TokenValidationTests.cs +1 -1
- package/remediate/identity/python/komagu_identity/oidc_validator.py +2 -8
- package/remediate/identity/python/tests/test_oidc_validator.py +1 -1
- package/remediate/identity/spring/src/main/kotlin/io/komagu/security/identity/KomaguOidcProperties.kt +2 -2
- package/remediate/identity/spring/src/test/kotlin/io/komagu/security/identity/KomaguIdentityAutoConfigurationTest.kt +2 -2
- package/remediate/identity/spring/src/test/kotlin/io/komagu/security/identity/TestJwtFactory.kt +1 -1
- package/remediate/identity/spring/src/test/kotlin/io/komagu/security/identity/TokenValidationIntegrationTest.kt +1 -1
- package/remediate/identity/test-env/realm-komagu.json +1 -1
- package/remediate/legacy_shims/coldfusion/KomaguSecurityShim.cfc +5 -5
- package/remediate/query/README.md +1 -1
- package/remediate/query/dotnet/src/Komagu.Security.Query.Analyzers/DiagnosticIds.cs +1 -1
- package/remediate/query/dotnet/src/Komagu.Security.Query.Analyzers/Komagu.Security.Query.Analyzers.csproj +1 -1
- package/remediate/query/spring/src/main/kotlin/io/komagu/security/query/detekt/KomaguRuleSetProvider.kt +1 -1
- package/remediate/resilience/dr/dr_manager.py +2 -8
- package/remediate/resilience/dr/runbook.md +2 -2
- package/remediate/resilience/terraform/variables.tf +1 -1
- package/remediate/tenancy/audit/audit_trail.py +2 -8
- package/remediate/tenancy/crypto/byok_manager.py +2 -8
- package/remediate/tenancy/middleware/tenant_context.py +2 -8
- package/remediate/tenancy/sql/rls_isolation.sql +11 -11
- package/remediate/tenancy/sql/schema_per_tenant.sql +7 -7
- package/remediate/tenancy/test_sql_postgres.py +1 -1
- package/remediate/tenancy/tests/test_tenancy.py +4 -4
- package/bin/komainu +0 -16
- package/bin/komainu-legacy.js +0 -16
- package/remediate/ekyc/tests/test_legacy_env.py +0 -33
- package/remediate/identity/python/tests/test_legacy_env.py +0 -33
- package/remediate/identity/spring/src/main/kotlin/io/komagu/security/identity/LegacyKomainuPropertiesPostProcessor.kt +0 -60
- package/remediate/identity/spring/src/main/resources/META-INF/spring.factories +0 -2
- package/remediate/identity/spring/src/test/kotlin/io/komagu/security/identity/LegacyKomainuPropertiesPostProcessorTest.kt +0 -86
- package/remediate/resilience/tests/test_legacy_env.py +0 -33
- package/remediate/tenancy/tests/test_legacy_env.py +0 -49
|
@@ -0,0 +1,579 @@
|
|
|
1
|
+
{
|
|
2
|
+
"batch_id": "privilege-001",
|
|
3
|
+
"findings": [
|
|
4
|
+
{
|
|
5
|
+
"finding_id": "BFLA-R-0003-1",
|
|
6
|
+
"category": "bfla",
|
|
7
|
+
"subtype": "missing_role_check",
|
|
8
|
+
"title": "Member deletion without admin check",
|
|
9
|
+
"route_id": "R-0003",
|
|
10
|
+
"location": {
|
|
11
|
+
"file": "classic-asp/shop/member.asp",
|
|
12
|
+
"start_line": 9
|
|
13
|
+
},
|
|
14
|
+
"evidence": [
|
|
15
|
+
{
|
|
16
|
+
"file": "classic-asp/shop/member.asp",
|
|
17
|
+
"line": 9,
|
|
18
|
+
"why": "privileged action, no role check"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"impact": "any member can be deleted by any authenticated user",
|
|
22
|
+
"severity": "critical",
|
|
23
|
+
"confidence": "high",
|
|
24
|
+
"cwe": [
|
|
25
|
+
"CWE-285"
|
|
26
|
+
],
|
|
27
|
+
"recommendation": "Add an admin role check before executing the delete statement",
|
|
28
|
+
"status": "unverified"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"finding_id": "BFLA-R-0007-1",
|
|
32
|
+
"category": "bfla",
|
|
33
|
+
"subtype": "missing_role_check",
|
|
34
|
+
"title": "Delete user without admin role check",
|
|
35
|
+
"route_id": "R-0007",
|
|
36
|
+
"location": {
|
|
37
|
+
"file": "dotnet-legacy/Web/Controllers/AdminController.cs",
|
|
38
|
+
"start_line": 12
|
|
39
|
+
},
|
|
40
|
+
"evidence": [
|
|
41
|
+
{
|
|
42
|
+
"file": "dotnet-legacy/Web/Controllers/AdminController.cs",
|
|
43
|
+
"line": 12,
|
|
44
|
+
"why": "privileged action, no role check"
|
|
45
|
+
}
|
|
46
|
+
],
|
|
47
|
+
"impact": "any authenticated user can delete any user",
|
|
48
|
+
"severity": "critical",
|
|
49
|
+
"confidence": "high",
|
|
50
|
+
"cwe": [
|
|
51
|
+
"CWE-285"
|
|
52
|
+
],
|
|
53
|
+
"recommendation": "Add [Authorize(Roles = \"Admin\")] to DeleteUser",
|
|
54
|
+
"status": "unverified"
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"finding_id": "BFLA-R-0009-1",
|
|
58
|
+
"category": "bfla",
|
|
59
|
+
"subtype": "role_from_request",
|
|
60
|
+
"title": "Export users controlled by request param",
|
|
61
|
+
"route_id": "R-0009",
|
|
62
|
+
"location": {
|
|
63
|
+
"file": "dotnet-legacy/Web/Controllers/AdminController.cs",
|
|
64
|
+
"start_line": 32
|
|
65
|
+
},
|
|
66
|
+
"evidence": [
|
|
67
|
+
{
|
|
68
|
+
"file": "dotnet-legacy/Web/Controllers/AdminController.cs",
|
|
69
|
+
"line": 32,
|
|
70
|
+
"why": "privileged action controlled by request param"
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
"impact": "any authenticated user can export all users",
|
|
74
|
+
"severity": "critical",
|
|
75
|
+
"confidence": "high",
|
|
76
|
+
"cwe": [
|
|
77
|
+
"CWE-285"
|
|
78
|
+
],
|
|
79
|
+
"recommendation": "Enforce admin role check before exporting",
|
|
80
|
+
"status": "unverified"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"finding_id": "BFLA-R-0023-1",
|
|
84
|
+
"category": "bfla",
|
|
85
|
+
"subtype": "missing_role_check",
|
|
86
|
+
"title": "Delete user without admin role check",
|
|
87
|
+
"route_id": "R-0023",
|
|
88
|
+
"location": {
|
|
89
|
+
"file": "java-legacy/src/com/acme/web/AdminUserController.java",
|
|
90
|
+
"start_line": 13
|
|
91
|
+
},
|
|
92
|
+
"evidence": [
|
|
93
|
+
{
|
|
94
|
+
"file": "java-legacy/src/com/acme/web/AdminUserController.java",
|
|
95
|
+
"line": 13,
|
|
96
|
+
"why": "privileged action, no role check"
|
|
97
|
+
}
|
|
98
|
+
],
|
|
99
|
+
"impact": "any authenticated user can delete any user",
|
|
100
|
+
"severity": "critical",
|
|
101
|
+
"confidence": "high",
|
|
102
|
+
"cwe": [
|
|
103
|
+
"CWE-285"
|
|
104
|
+
],
|
|
105
|
+
"recommendation": "Add @PreAuthorize(\"hasRole('ADMIN')\") to delete method",
|
|
106
|
+
"status": "unverified"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"finding_id": "BFLA-R-0030-1",
|
|
110
|
+
"category": "bfla",
|
|
111
|
+
"subtype": "missing_role_check",
|
|
112
|
+
"title": "Delete user without admin check",
|
|
113
|
+
"route_id": "R-0030",
|
|
114
|
+
"location": {
|
|
115
|
+
"file": "node-express/routes/admin.js",
|
|
116
|
+
"start_line": 8
|
|
117
|
+
},
|
|
118
|
+
"evidence": [
|
|
119
|
+
{
|
|
120
|
+
"file": "node-express/routes/admin.js",
|
|
121
|
+
"line": 8,
|
|
122
|
+
"why": "privileged action, no admin check"
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
"impact": "any authenticated user can delete any user",
|
|
126
|
+
"severity": "critical",
|
|
127
|
+
"confidence": "high",
|
|
128
|
+
"cwe": [
|
|
129
|
+
"CWE-285"
|
|
130
|
+
],
|
|
131
|
+
"recommendation": "Add requireAdmin middleware before delete route",
|
|
132
|
+
"status": "unverified"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"finding_id": "BFLA-R-0032-1",
|
|
136
|
+
"category": "bfla",
|
|
137
|
+
"subtype": "role_from_request",
|
|
138
|
+
"title": "Export users controlled by request param",
|
|
139
|
+
"route_id": "R-0032",
|
|
140
|
+
"location": {
|
|
141
|
+
"file": "node-express/routes/admin.js",
|
|
142
|
+
"start_line": 16
|
|
143
|
+
},
|
|
144
|
+
"evidence": [
|
|
145
|
+
{
|
|
146
|
+
"file": "node-express/routes/admin.js",
|
|
147
|
+
"line": 16,
|
|
148
|
+
"why": "privileged action controlled by request param"
|
|
149
|
+
}
|
|
150
|
+
],
|
|
151
|
+
"impact": "any authenticated user can export all users",
|
|
152
|
+
"severity": "critical",
|
|
153
|
+
"confidence": "high",
|
|
154
|
+
"cwe": [
|
|
155
|
+
"CWE-285"
|
|
156
|
+
],
|
|
157
|
+
"recommendation": "Enforce admin role check before exporting",
|
|
158
|
+
"status": "unverified"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"finding_id": "BFLA-R-0057-1",
|
|
162
|
+
"category": "bfla",
|
|
163
|
+
"subtype": "missing_role_check",
|
|
164
|
+
"title": "View user details without admin check",
|
|
165
|
+
"route_id": "R-0057",
|
|
166
|
+
"location": {
|
|
167
|
+
"file": "php-plain/admin.php",
|
|
168
|
+
"start_line": 6
|
|
169
|
+
},
|
|
170
|
+
"evidence": [
|
|
171
|
+
{
|
|
172
|
+
"file": "php-plain/admin.php",
|
|
173
|
+
"line": 6,
|
|
174
|
+
"why": "privileged action, no role check"
|
|
175
|
+
}
|
|
176
|
+
],
|
|
177
|
+
"impact": "any authenticated user can view any user record",
|
|
178
|
+
"severity": "critical",
|
|
179
|
+
"confidence": "high",
|
|
180
|
+
"cwe": [
|
|
181
|
+
"CWE-285"
|
|
182
|
+
],
|
|
183
|
+
"recommendation": "Add admin role check before rendering user details",
|
|
184
|
+
"status": "unverified"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"finding_id": "BFLA-R-0058-1",
|
|
188
|
+
"category": "bfla",
|
|
189
|
+
"subtype": "missing_role_check",
|
|
190
|
+
"title": "Delete user without admin check",
|
|
191
|
+
"route_id": "R-0058",
|
|
192
|
+
"location": {
|
|
193
|
+
"file": "php-plain/admin.php",
|
|
194
|
+
"start_line": 10
|
|
195
|
+
},
|
|
196
|
+
"evidence": [
|
|
197
|
+
{
|
|
198
|
+
"file": "php-plain/admin.php",
|
|
199
|
+
"line": 10,
|
|
200
|
+
"why": "privileged action, no role check"
|
|
201
|
+
}
|
|
202
|
+
],
|
|
203
|
+
"impact": "any authenticated user can delete any user",
|
|
204
|
+
"severity": "critical",
|
|
205
|
+
"confidence": "high",
|
|
206
|
+
"cwe": [
|
|
207
|
+
"CWE-285"
|
|
208
|
+
],
|
|
209
|
+
"recommendation": "Add admin role check before delete operation",
|
|
210
|
+
"status": "unverified"
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
"finding_id": "BFLA-R-0066-1",
|
|
214
|
+
"category": "bfla",
|
|
215
|
+
"subtype": "missing_role_check",
|
|
216
|
+
"title": "Delete user without admin check",
|
|
217
|
+
"route_id": "R-0066",
|
|
218
|
+
"location": {
|
|
219
|
+
"file": "php-plain/admin/delete_user.php",
|
|
220
|
+
"start_line": 1
|
|
221
|
+
},
|
|
222
|
+
"evidence": [
|
|
223
|
+
{
|
|
224
|
+
"file": "php-plain/admin/delete_user.php",
|
|
225
|
+
"line": 1,
|
|
226
|
+
"why": "privileged action, no role check"
|
|
227
|
+
}
|
|
228
|
+
],
|
|
229
|
+
"impact": "any authenticated user can delete any user",
|
|
230
|
+
"severity": "critical",
|
|
231
|
+
"confidence": "high",
|
|
232
|
+
"cwe": [
|
|
233
|
+
"CWE-285"
|
|
234
|
+
],
|
|
235
|
+
"recommendation": "Add admin role check before delete operation",
|
|
236
|
+
"status": "unverified"
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"finding_id": "BFLA-R-0067-1",
|
|
240
|
+
"category": "bfla",
|
|
241
|
+
"subtype": "role_from_request",
|
|
242
|
+
"title": "Promote user based on request param",
|
|
243
|
+
"route_id": "R-0067",
|
|
244
|
+
"location": {
|
|
245
|
+
"file": "php-plain/admin/promote.php",
|
|
246
|
+
"start_line": 5
|
|
247
|
+
},
|
|
248
|
+
"evidence": [
|
|
249
|
+
{
|
|
250
|
+
"file": "php-plain/admin/promote.php",
|
|
251
|
+
"line": 5,
|
|
252
|
+
"why": "privileged action controlled by request param"
|
|
253
|
+
}
|
|
254
|
+
],
|
|
255
|
+
"impact": "any authenticated user can promote any user to admin",
|
|
256
|
+
"severity": "critical",
|
|
257
|
+
"confidence": "high",
|
|
258
|
+
"cwe": [
|
|
259
|
+
"CWE-285"
|
|
260
|
+
],
|
|
261
|
+
"recommendation": "Enforce admin role check before promotion",
|
|
262
|
+
"status": "unverified"
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"finding_id": "BFLA-R-0059-1",
|
|
266
|
+
"category": "bfla",
|
|
267
|
+
"subtype": "missing_role_check",
|
|
268
|
+
"title": "Delete user without admin check",
|
|
269
|
+
"route_id": "R-0059",
|
|
270
|
+
"location": {
|
|
271
|
+
"file": "php-plain/manage_users.php",
|
|
272
|
+
"start_line": 6
|
|
273
|
+
},
|
|
274
|
+
"evidence": [
|
|
275
|
+
{
|
|
276
|
+
"file": "php-plain/manage_users.php",
|
|
277
|
+
"line": 6,
|
|
278
|
+
"why": "privileged action, no role check"
|
|
279
|
+
}
|
|
280
|
+
],
|
|
281
|
+
"impact": "any authenticated user can delete any user",
|
|
282
|
+
"severity": "critical",
|
|
283
|
+
"confidence": "high",
|
|
284
|
+
"cwe": [
|
|
285
|
+
"CWE-285"
|
|
286
|
+
],
|
|
287
|
+
"recommendation": "Add admin role check before delete operation",
|
|
288
|
+
"status": "unverified"
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"finding_id": "BFLA-R-0063-1",
|
|
292
|
+
"category": "bfla",
|
|
293
|
+
"subtype": "missing_role_check",
|
|
294
|
+
"title": "User can change own role",
|
|
295
|
+
"route_id": "R-0063",
|
|
296
|
+
"location": {
|
|
297
|
+
"file": "php-plain/profile.php",
|
|
298
|
+
"start_line": 10
|
|
299
|
+
},
|
|
300
|
+
"evidence": [
|
|
301
|
+
{
|
|
302
|
+
"file": "php-plain/profile.php",
|
|
303
|
+
"line": 10,
|
|
304
|
+
"why": "privileged action, no role check"
|
|
305
|
+
}
|
|
306
|
+
],
|
|
307
|
+
"impact": "any authenticated user can elevate own role",
|
|
308
|
+
"severity": "critical",
|
|
309
|
+
"confidence": "high",
|
|
310
|
+
"cwe": [
|
|
311
|
+
"CWE-285"
|
|
312
|
+
],
|
|
313
|
+
"recommendation": "Restrict role changes to admin only",
|
|
314
|
+
"status": "unverified"
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"finding_id": "MASS-M-0011-1",
|
|
318
|
+
"category": "mass_assignment",
|
|
319
|
+
"title": "Mass assignment with unknown model fields",
|
|
320
|
+
"candidate_id": "M-0011",
|
|
321
|
+
"location": {
|
|
322
|
+
"file": "php-plain/profile.php",
|
|
323
|
+
"start_line": 6
|
|
324
|
+
},
|
|
325
|
+
"evidence": [
|
|
326
|
+
{
|
|
327
|
+
"file": "php-plain/profile.php",
|
|
328
|
+
"line": 6,
|
|
329
|
+
"why": "whole object binding, model fields unknown"
|
|
330
|
+
}
|
|
331
|
+
],
|
|
332
|
+
"impact": "unknown \u2013 potential privileged fields may be set",
|
|
333
|
+
"severity": "medium",
|
|
334
|
+
"confidence": "medium",
|
|
335
|
+
"cwe": [
|
|
336
|
+
"CWE-915"
|
|
337
|
+
],
|
|
338
|
+
"recommendation": "Review the User model definition and restrict writable fields",
|
|
339
|
+
"status": "needs_review",
|
|
340
|
+
"subtype": "whole_object_binding"
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
"finding_id": "MASS-M-0012-1",
|
|
344
|
+
"category": "mass_assignment",
|
|
345
|
+
"subtype": "privileged_field_writable",
|
|
346
|
+
"title": "User can set role via profile update",
|
|
347
|
+
"candidate_id": "M-0012",
|
|
348
|
+
"location": {
|
|
349
|
+
"file": "php-plain/profile.php",
|
|
350
|
+
"start_line": 10
|
|
351
|
+
},
|
|
352
|
+
"evidence": [
|
|
353
|
+
{
|
|
354
|
+
"file": "php-plain/profile.php",
|
|
355
|
+
"line": 10,
|
|
356
|
+
"why": "privileged field 'role' writable"
|
|
357
|
+
}
|
|
358
|
+
],
|
|
359
|
+
"impact": "role",
|
|
360
|
+
"severity": "critical",
|
|
361
|
+
"confidence": "high",
|
|
362
|
+
"cwe": [
|
|
363
|
+
"CWE-915"
|
|
364
|
+
],
|
|
365
|
+
"recommendation": "Remove 'role' from mass assignment and enforce role changes only by admins",
|
|
366
|
+
"status": "unverified"
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
"finding_id": "MASS-M-0001-1",
|
|
370
|
+
"category": "mass_assignment",
|
|
371
|
+
"title": "Entity binding with unknown model definition",
|
|
372
|
+
"candidate_id": "M-0001",
|
|
373
|
+
"location": {
|
|
374
|
+
"file": "dotnet-legacy/Web/Controllers/CustomerController.cs",
|
|
375
|
+
"start_line": 12
|
|
376
|
+
},
|
|
377
|
+
"evidence": [
|
|
378
|
+
{
|
|
379
|
+
"file": "dotnet-legacy/Web/Controllers/CustomerController.cs",
|
|
380
|
+
"line": 12,
|
|
381
|
+
"why": "Location taken from the Tier 1 inventory"
|
|
382
|
+
}
|
|
383
|
+
],
|
|
384
|
+
"impact": "unknown \u2013 potential privileged fields may be set",
|
|
385
|
+
"severity": "medium",
|
|
386
|
+
"confidence": "medium",
|
|
387
|
+
"cwe": [
|
|
388
|
+
"CWE-915"
|
|
389
|
+
],
|
|
390
|
+
"recommendation": "Inspect the Customer model and restrict writable fields",
|
|
391
|
+
"status": "needs_review",
|
|
392
|
+
"subtype": "whole_object_binding"
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
"finding_id": "MASS-M-0002-1",
|
|
396
|
+
"category": "mass_assignment",
|
|
397
|
+
"title": "Entity binding with unknown model definition",
|
|
398
|
+
"candidate_id": "M-0002",
|
|
399
|
+
"location": {
|
|
400
|
+
"file": "dotnet-legacy/Web/Controllers/CustomerController.cs",
|
|
401
|
+
"start_line": 30
|
|
402
|
+
},
|
|
403
|
+
"evidence": [
|
|
404
|
+
{
|
|
405
|
+
"file": "dotnet-legacy/Web/Controllers/CustomerController.cs",
|
|
406
|
+
"line": 30,
|
|
407
|
+
"why": "Location taken from the Tier 1 inventory"
|
|
408
|
+
}
|
|
409
|
+
],
|
|
410
|
+
"impact": "unknown \u2013 potential privileged fields may be set",
|
|
411
|
+
"severity": "medium",
|
|
412
|
+
"confidence": "medium",
|
|
413
|
+
"cwe": [
|
|
414
|
+
"CWE-915"
|
|
415
|
+
],
|
|
416
|
+
"recommendation": "Inspect the Customer model and restrict writable fields",
|
|
417
|
+
"status": "needs_review",
|
|
418
|
+
"subtype": "whole_object_binding"
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
"finding_id": "MASS-M-0003-1",
|
|
422
|
+
"category": "mass_assignment",
|
|
423
|
+
"subtype": "privileged_field_writable",
|
|
424
|
+
"title": "Account update allows role change",
|
|
425
|
+
"candidate_id": "M-0003",
|
|
426
|
+
"location": {
|
|
427
|
+
"file": "java-legacy/src/com/acme/web/AccountController.java",
|
|
428
|
+
"start_line": 14
|
|
429
|
+
},
|
|
430
|
+
"evidence": [
|
|
431
|
+
{
|
|
432
|
+
"file": "java-legacy/src/com/acme/web/AccountController.java",
|
|
433
|
+
"line": 27,
|
|
434
|
+
"why": "whole object binding, 'role' field writable"
|
|
435
|
+
}
|
|
436
|
+
],
|
|
437
|
+
"impact": "role",
|
|
438
|
+
"severity": "critical",
|
|
439
|
+
"confidence": "high",
|
|
440
|
+
"cwe": [
|
|
441
|
+
"CWE-915"
|
|
442
|
+
],
|
|
443
|
+
"recommendation": "Remove 'role' from the binding or enforce role changes only by admins",
|
|
444
|
+
"status": "unverified"
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
"finding_id": "MASS-M-0004-1",
|
|
448
|
+
"category": "mass_assignment",
|
|
449
|
+
"subtype": "privileged_field_writable",
|
|
450
|
+
"title": "Account update allows role change",
|
|
451
|
+
"candidate_id": "M-0004",
|
|
452
|
+
"location": {
|
|
453
|
+
"file": "java-legacy/src/com/acme/web/AccountController.java",
|
|
454
|
+
"start_line": 27
|
|
455
|
+
},
|
|
456
|
+
"evidence": [
|
|
457
|
+
{
|
|
458
|
+
"file": "java-legacy/src/com/acme/web/AccountController.java",
|
|
459
|
+
"line": 27,
|
|
460
|
+
"why": "whole object binding, 'role' field writable"
|
|
461
|
+
}
|
|
462
|
+
],
|
|
463
|
+
"impact": "role",
|
|
464
|
+
"severity": "critical",
|
|
465
|
+
"confidence": "high",
|
|
466
|
+
"cwe": [
|
|
467
|
+
"CWE-915"
|
|
468
|
+
],
|
|
469
|
+
"recommendation": "Remove 'role' from the binding or enforce role changes only by admins",
|
|
470
|
+
"status": "unverified"
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
"finding_id": "MASS-M-0005-1",
|
|
474
|
+
"category": "mass_assignment",
|
|
475
|
+
"subtype": "privileged_field_writable",
|
|
476
|
+
"title": "BeanUtils.populate allows role change",
|
|
477
|
+
"candidate_id": "M-0005",
|
|
478
|
+
"location": {
|
|
479
|
+
"file": "java-legacy/src/com/acme/web/ProfileServlet.java",
|
|
480
|
+
"start_line": 12
|
|
481
|
+
},
|
|
482
|
+
"evidence": [
|
|
483
|
+
{
|
|
484
|
+
"file": "java-legacy/src/com/acme/web/ProfileServlet.java",
|
|
485
|
+
"line": 12,
|
|
486
|
+
"why": "whole object binding, 'role' field writable"
|
|
487
|
+
}
|
|
488
|
+
],
|
|
489
|
+
"impact": "role",
|
|
490
|
+
"severity": "critical",
|
|
491
|
+
"confidence": "high",
|
|
492
|
+
"cwe": [
|
|
493
|
+
"CWE-915"
|
|
494
|
+
],
|
|
495
|
+
"recommendation": "Remove 'role' from the binding or enforce role changes only by admins",
|
|
496
|
+
"status": "unverified"
|
|
497
|
+
}
|
|
498
|
+
],
|
|
499
|
+
"privilege_route_verdicts": [
|
|
500
|
+
{
|
|
501
|
+
"route_id": "R-0003",
|
|
502
|
+
"verdict": "vulnerable"
|
|
503
|
+
},
|
|
504
|
+
{
|
|
505
|
+
"route_id": "R-0007",
|
|
506
|
+
"verdict": "vulnerable"
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
"route_id": "R-0009",
|
|
510
|
+
"verdict": "vulnerable"
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
"route_id": "R-0023",
|
|
514
|
+
"verdict": "vulnerable"
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
"route_id": "R-0030",
|
|
518
|
+
"verdict": "vulnerable"
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
"route_id": "R-0032",
|
|
522
|
+
"verdict": "vulnerable"
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
"route_id": "R-0057",
|
|
526
|
+
"verdict": "vulnerable"
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
"route_id": "R-0058",
|
|
530
|
+
"verdict": "vulnerable"
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
"route_id": "R-0066",
|
|
534
|
+
"verdict": "vulnerable"
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
"route_id": "R-0067",
|
|
538
|
+
"verdict": "vulnerable"
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
"route_id": "R-0059",
|
|
542
|
+
"verdict": "vulnerable"
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
"route_id": "R-0063",
|
|
546
|
+
"verdict": "vulnerable"
|
|
547
|
+
}
|
|
548
|
+
],
|
|
549
|
+
"candidate_verdicts": [
|
|
550
|
+
{
|
|
551
|
+
"candidate_id": "M-0011",
|
|
552
|
+
"verdict": "needs_review"
|
|
553
|
+
},
|
|
554
|
+
{
|
|
555
|
+
"candidate_id": "M-0012",
|
|
556
|
+
"verdict": "vulnerable"
|
|
557
|
+
},
|
|
558
|
+
{
|
|
559
|
+
"candidate_id": "M-0001",
|
|
560
|
+
"verdict": "needs_review"
|
|
561
|
+
},
|
|
562
|
+
{
|
|
563
|
+
"candidate_id": "M-0002",
|
|
564
|
+
"verdict": "needs_review"
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
"candidate_id": "M-0003",
|
|
568
|
+
"verdict": "vulnerable"
|
|
569
|
+
},
|
|
570
|
+
{
|
|
571
|
+
"candidate_id": "M-0004",
|
|
572
|
+
"verdict": "vulnerable"
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
"candidate_id": "M-0005",
|
|
576
|
+
"verdict": "vulnerable"
|
|
577
|
+
}
|
|
578
|
+
]
|
|
579
|
+
}
|