@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,268 @@
|
|
|
1
|
+
{
|
|
2
|
+
"batch_id": "privilege-002",
|
|
3
|
+
"findings": [
|
|
4
|
+
{
|
|
5
|
+
"finding_id": "MASS-M-0006-1",
|
|
6
|
+
"category": "mass_assignment",
|
|
7
|
+
"subtype": "whole_object_binding",
|
|
8
|
+
"title": "Profile update binds entire request body to User model",
|
|
9
|
+
"candidate_id": "M-0006",
|
|
10
|
+
"location": {
|
|
11
|
+
"file": "node-express/routes/profile.js",
|
|
12
|
+
"start_line": 8
|
|
13
|
+
},
|
|
14
|
+
"evidence": [
|
|
15
|
+
{
|
|
16
|
+
"file": "node-express/routes/profile.js",
|
|
17
|
+
"line": 8,
|
|
18
|
+
"why": "User.findByIdAndUpdate(req.user._id, req.body, ...) binds entire request body to update"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"file": "node-express/routes/profile.js",
|
|
22
|
+
"line": 16,
|
|
23
|
+
"why": "new User(req.body); user.save(); binds entire request body to new User"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"impact": "unknown; potential mass assignment of privileged fields",
|
|
27
|
+
"severity": "medium",
|
|
28
|
+
"confidence": "medium",
|
|
29
|
+
"cwe": [
|
|
30
|
+
"CWE-915"
|
|
31
|
+
],
|
|
32
|
+
"recommendation": "Limit fields to allowed set; use explicit field assignment or whitelist.",
|
|
33
|
+
"status": "needs_review"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"finding_id": "MASS-M-0007-1",
|
|
37
|
+
"category": "mass_assignment",
|
|
38
|
+
"subtype": "whole_object_binding",
|
|
39
|
+
"title": "Profile update binds entire request body to User model",
|
|
40
|
+
"candidate_id": "M-0007",
|
|
41
|
+
"location": {
|
|
42
|
+
"file": "node-express/routes/profile.js",
|
|
43
|
+
"start_line": 16
|
|
44
|
+
},
|
|
45
|
+
"evidence": [
|
|
46
|
+
{
|
|
47
|
+
"file": "node-express/routes/profile.js",
|
|
48
|
+
"line": 8,
|
|
49
|
+
"why": "User.findByIdAndUpdate(req.user._id, req.body, ...) binds entire request body to update"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"file": "node-express/routes/profile.js",
|
|
53
|
+
"line": 16,
|
|
54
|
+
"why": "new User(req.body); user.save(); binds entire request body to new User"
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
"impact": "unknown; potential mass assignment of privileged fields",
|
|
58
|
+
"severity": "medium",
|
|
59
|
+
"confidence": "medium",
|
|
60
|
+
"cwe": [
|
|
61
|
+
"CWE-915"
|
|
62
|
+
],
|
|
63
|
+
"recommendation": "Limit fields to allowed set; use explicit field assignment or whitelist.",
|
|
64
|
+
"status": "needs_review"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"finding_id": "MASS-M-0008-1",
|
|
68
|
+
"category": "mass_assignment",
|
|
69
|
+
"subtype": "whole_object_binding",
|
|
70
|
+
"title": "User registration uses mass assignment without field restrictions",
|
|
71
|
+
"candidate_id": "M-0008",
|
|
72
|
+
"location": {
|
|
73
|
+
"file": "php-laravel/app/Http/Controllers/AccountController.php",
|
|
74
|
+
"start_line": 13
|
|
75
|
+
},
|
|
76
|
+
"evidence": [
|
|
77
|
+
{
|
|
78
|
+
"file": "php-laravel/app/Http/Controllers/AccountController.php",
|
|
79
|
+
"line": 13,
|
|
80
|
+
"why": "User::create($request->all()); binds all request fields to User model"
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
"impact": "unknown; potential mass assignment of privileged fields",
|
|
84
|
+
"severity": "medium",
|
|
85
|
+
"confidence": "medium",
|
|
86
|
+
"cwe": [
|
|
87
|
+
"CWE-915"
|
|
88
|
+
],
|
|
89
|
+
"recommendation": "Define $fillable or $guarded to restrict mass assignable attributes.",
|
|
90
|
+
"status": "needs_review"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"finding_id": "MASS-M-0009-1",
|
|
94
|
+
"category": "mass_assignment",
|
|
95
|
+
"subtype": "privileged_field_writable",
|
|
96
|
+
"title": "Team creation allows owner_id to be set via mass assignment",
|
|
97
|
+
"candidate_id": "M-0009",
|
|
98
|
+
"location": {
|
|
99
|
+
"file": "php-laravel/app/Http/Controllers/AccountController.php",
|
|
100
|
+
"start_line": 23
|
|
101
|
+
},
|
|
102
|
+
"evidence": [
|
|
103
|
+
{
|
|
104
|
+
"file": "php-laravel/app/Http/Controllers/AccountController.php",
|
|
105
|
+
"line": 23,
|
|
106
|
+
"why": "Team::create($request->all()); binds all request fields including owner_id"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"file": "php-laravel/app/Models/Team.php",
|
|
110
|
+
"line": 8,
|
|
111
|
+
"why": "$fillable = ['name', 'owner_id']; owner_id is privileged field"
|
|
112
|
+
}
|
|
113
|
+
],
|
|
114
|
+
"impact": "owner_id can be set to arbitrary value, enabling impersonation of other teams.",
|
|
115
|
+
"severity": "critical",
|
|
116
|
+
"confidence": "high",
|
|
117
|
+
"cwe": [
|
|
118
|
+
"CWE-915"
|
|
119
|
+
],
|
|
120
|
+
"recommendation": "Remove owner_id from $fillable or guard it; enforce ownership server\u2011side.",
|
|
121
|
+
"status": "unverified"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"finding_id": "MASS-M-0010-1",
|
|
125
|
+
"category": "mass_assignment",
|
|
126
|
+
"subtype": "whole_object_binding",
|
|
127
|
+
"title": "Team creation uses mass assignment without model definition",
|
|
128
|
+
"candidate_id": "M-0010",
|
|
129
|
+
"location": {
|
|
130
|
+
"file": "php-laravel/app/Http/Controllers/AccountController.php",
|
|
131
|
+
"start_line": 36
|
|
132
|
+
},
|
|
133
|
+
"evidence": [
|
|
134
|
+
{
|
|
135
|
+
"file": "php-laravel/app/Http/Controllers/AccountController.php",
|
|
136
|
+
"line": 23,
|
|
137
|
+
"why": "Team::create($request->all()); binds all request fields"
|
|
138
|
+
}
|
|
139
|
+
],
|
|
140
|
+
"impact": "unknown; potential mass assignment of privileged fields",
|
|
141
|
+
"severity": "medium",
|
|
142
|
+
"confidence": "medium",
|
|
143
|
+
"cwe": [
|
|
144
|
+
"CWE-915"
|
|
145
|
+
],
|
|
146
|
+
"recommendation": "Review Team model to ensure privileged fields are not mass assignable.",
|
|
147
|
+
"status": "needs_review"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"finding_id": "MASS-M-0013-1",
|
|
151
|
+
"category": "mass_assignment",
|
|
152
|
+
"subtype": "whole_object_binding",
|
|
153
|
+
"title": "Manual extraction of POST data may allow mass assignment",
|
|
154
|
+
"candidate_id": "M-0013",
|
|
155
|
+
"location": {
|
|
156
|
+
"file": "php-plain/register.php",
|
|
157
|
+
"start_line": 4
|
|
158
|
+
},
|
|
159
|
+
"evidence": [
|
|
160
|
+
{
|
|
161
|
+
"file": "php-plain/inc/db.php",
|
|
162
|
+
"line": 4,
|
|
163
|
+
"why": "extract($_POST); pulls all POST variables into local scope"
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
"file": "php-plain/inc/db.php",
|
|
167
|
+
"line": 5,
|
|
168
|
+
"why": "$stmt->execute(array($email, $name)); only uses email and name, but extract may expose other variables"
|
|
169
|
+
}
|
|
170
|
+
],
|
|
171
|
+
"impact": "unknown; potential mass assignment of privileged fields if not validated",
|
|
172
|
+
"severity": "medium",
|
|
173
|
+
"confidence": "medium",
|
|
174
|
+
"cwe": [
|
|
175
|
+
"CWE-915"
|
|
176
|
+
],
|
|
177
|
+
"recommendation": "Avoid extract($_POST); use explicit variable extraction and validation.",
|
|
178
|
+
"status": "needs_review"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"finding_id": "MASS-M-0015-1",
|
|
182
|
+
"category": "mass_assignment",
|
|
183
|
+
"subtype": "whole_object_binding",
|
|
184
|
+
"title": "PATCH user endpoint assigns arbitrary fields from request",
|
|
185
|
+
"candidate_id": "M-0015",
|
|
186
|
+
"location": {
|
|
187
|
+
"file": "python-flask/profile.py",
|
|
188
|
+
"start_line": 27
|
|
189
|
+
},
|
|
190
|
+
"evidence": [
|
|
191
|
+
{
|
|
192
|
+
"file": "python-flask/app.py",
|
|
193
|
+
"line": 24,
|
|
194
|
+
"why": "for key, value in request.json.items(): setattr(user, key, value); assigns all fields"
|
|
195
|
+
}
|
|
196
|
+
],
|
|
197
|
+
"impact": "unknown; potential mass assignment of privileged fields",
|
|
198
|
+
"severity": "medium",
|
|
199
|
+
"confidence": "medium",
|
|
200
|
+
"cwe": [
|
|
201
|
+
"CWE-915"
|
|
202
|
+
],
|
|
203
|
+
"recommendation": "Whitelist allowed fields; avoid setattr on arbitrary keys.",
|
|
204
|
+
"status": "needs_review"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"finding_id": "MASS-M-0014-1",
|
|
208
|
+
"category": "mass_assignment",
|
|
209
|
+
"subtype": "whole_object_binding",
|
|
210
|
+
"title": "User creation binds request JSON to User model",
|
|
211
|
+
"candidate_id": "M-0014",
|
|
212
|
+
"location": {
|
|
213
|
+
"file": "python-flask/profile.py",
|
|
214
|
+
"start_line": 10
|
|
215
|
+
},
|
|
216
|
+
"evidence": [
|
|
217
|
+
{
|
|
218
|
+
"file": "python-flask/app.py",
|
|
219
|
+
"line": 10,
|
|
220
|
+
"why": "user = User(**request.json); binds all request fields to User model"
|
|
221
|
+
}
|
|
222
|
+
],
|
|
223
|
+
"impact": "unknown; potential mass assignment of privileged fields",
|
|
224
|
+
"severity": "medium",
|
|
225
|
+
"confidence": "medium",
|
|
226
|
+
"cwe": [
|
|
227
|
+
"CWE-915"
|
|
228
|
+
],
|
|
229
|
+
"recommendation": "Use explicit field assignment or DTO to restrict fields.",
|
|
230
|
+
"status": "needs_review"
|
|
231
|
+
}
|
|
232
|
+
],
|
|
233
|
+
"privilege_route_verdicts": [],
|
|
234
|
+
"candidate_verdicts": [
|
|
235
|
+
{
|
|
236
|
+
"candidate_id": "M-0006",
|
|
237
|
+
"verdict": "needs_review"
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"candidate_id": "M-0007",
|
|
241
|
+
"verdict": "needs_review"
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"candidate_id": "M-0008",
|
|
245
|
+
"verdict": "needs_review"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
"candidate_id": "M-0009",
|
|
249
|
+
"verdict": "vulnerable"
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"candidate_id": "M-0010",
|
|
253
|
+
"verdict": "needs_review"
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"candidate_id": "M-0013",
|
|
257
|
+
"verdict": "needs_review"
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"candidate_id": "M-0015",
|
|
261
|
+
"verdict": "needs_review"
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"candidate_id": "M-0014",
|
|
265
|
+
"verdict": "needs_review"
|
|
266
|
+
}
|
|
267
|
+
]
|
|
268
|
+
}
|