torusguard 1.3.5 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (194) hide show
  1. package/.torusguard/.manifest.json +37 -36
  2. package/.torusguard/runs/report-latest.html +5862 -315
  3. package/.torusguard/runs/results-latest.sarif +20 -0
  4. package/.torusguard/runs/run-20260918-104221-audit/findings.json +1 -0
  5. package/.torusguard/runs/run-20260918-104221-audit/findings.md +8 -0
  6. package/.torusguard/runs/run-20260918-104221-audit/manifest.json +12 -0
  7. package/.torusguard/runs/run-20260918-104221-audit/summary.md +5 -0
  8. package/.torusguard/runs/run-20260918-104236-audit/findings.json +2314 -0
  9. package/.torusguard/runs/run-20260918-104236-audit/findings.md +960 -0
  10. package/.torusguard/runs/run-20260918-104236-audit/manifest.json +12 -0
  11. package/.torusguard/runs/run-20260918-104236-audit/summary.md +5 -0
  12. package/.torusguard/runs/run-20260918-105723-audit/findings.json +2382 -0
  13. package/.torusguard/runs/run-20260918-105723-audit/findings.md +960 -0
  14. package/.torusguard/runs/run-20260918-105723-audit/manifest.json +12 -0
  15. package/.torusguard/runs/run-20260918-105723-audit/summary.md +5 -0
  16. package/.torusguard/runs/run-20260918-105731-audit/findings.json +1 -0
  17. package/.torusguard/runs/run-20260918-105731-audit/findings.md +8 -0
  18. package/.torusguard/runs/run-20260918-105731-audit/manifest.json +12 -0
  19. package/.torusguard/runs/run-20260918-105731-audit/summary.md +5 -0
  20. package/.torusguard/runs/run-20260918-105940-audit/findings.json +1 -0
  21. package/.torusguard/runs/run-20260918-105940-audit/findings.md +8 -0
  22. package/.torusguard/runs/run-20260918-105940-audit/manifest.json +13 -0
  23. package/.torusguard/runs/run-20260918-105940-audit/remediation.md +7 -0
  24. package/.torusguard/runs/run-20260918-105940-audit/summary.md +5 -0
  25. package/.torusguard/runs/run-20260919-145701-audit/findings.json +1 -0
  26. package/.torusguard/runs/run-20260919-145701-audit/findings.md +8 -0
  27. package/.torusguard/runs/run-20260919-145701-audit/manifest.json +12 -0
  28. package/.torusguard/runs/run-20260919-145701-audit/summary.md +5 -0
  29. package/.torusguard/runs/run-20260919-151729-audit/findings.json +1 -0
  30. package/.torusguard/runs/run-20260919-151729-audit/findings.md +8 -0
  31. package/.torusguard/runs/run-20260919-151729-audit/manifest.json +13 -0
  32. package/.torusguard/runs/run-20260919-151729-audit/remediation.md +7 -0
  33. package/.torusguard/runs/run-20260919-151729-audit/summary.md +5 -0
  34. package/.torusguard/runs/run-20260919-152340-audit/findings.json +1 -0
  35. package/.torusguard/runs/run-20260919-152340-audit/findings.md +8 -0
  36. package/.torusguard/runs/run-20260919-152340-audit/manifest.json +12 -0
  37. package/.torusguard/runs/run-20260919-152340-audit/summary.md +5 -0
  38. package/.torusguard/runs/run-20260919-152345-audit/findings.json +1 -0
  39. package/.torusguard/runs/run-20260919-152345-audit/findings.md +8 -0
  40. package/.torusguard/runs/run-20260919-152345-audit/manifest.json +12 -0
  41. package/.torusguard/runs/run-20260919-152345-audit/summary.md +5 -0
  42. package/.torusguard/runs/run-20260919-153500-audit/findings.json +1 -0
  43. package/.torusguard/runs/run-20260919-153500-audit/findings.md +8 -0
  44. package/.torusguard/runs/run-20260919-153500-audit/manifest.json +12 -0
  45. package/.torusguard/runs/run-20260919-153500-audit/summary.md +5 -0
  46. package/.torusguard/scripts/__pycache__/apply_runner.cpython-314.pyc +0 -0
  47. package/.torusguard/scripts/__pycache__/audit_runner.cpython-314.pyc +0 -0
  48. package/.torusguard/scripts/__pycache__/diff_guard.cpython-314.pyc +0 -0
  49. package/.torusguard/scripts/__pycache__/finding_scorer.cpython-314.pyc +0 -0
  50. package/.torusguard/scripts/__pycache__/harden_runner.cpython-314.pyc +0 -0
  51. package/.torusguard/scripts/__pycache__/html_reporter.cpython-314.pyc +0 -0
  52. package/.torusguard/scripts/__pycache__/manifest_builder.cpython-314.pyc +0 -0
  53. package/.torusguard/scripts/__pycache__/memory_engine.cpython-314.pyc +0 -0
  54. package/.torusguard/scripts/__pycache__/monorepo_detector.cpython-314.pyc +0 -0
  55. package/.torusguard/scripts/__pycache__/recheck_runner.cpython-314.pyc +0 -0
  56. package/.torusguard/scripts/__pycache__/recipes_runner.cpython-314.pyc +0 -0
  57. package/.torusguard/scripts/__pycache__/report_sync.cpython-314.pyc +0 -0
  58. package/.torusguard/scripts/__pycache__/run_manager.cpython-314.pyc +0 -0
  59. package/.torusguard/scripts/__pycache__/sarif_exporter.cpython-314.pyc +0 -0
  60. package/.torusguard/scripts/__pycache__/stack_detect.cpython-314.pyc +0 -0
  61. package/.torusguard/scripts/__pycache__/term_ui.cpython-314.pyc +0 -0
  62. package/.torusguard/scripts/apply_runner.py +108 -9
  63. package/.torusguard/scripts/audit_runner.py +336 -24
  64. package/.torusguard/scripts/harden_runner.py +124 -70
  65. package/.torusguard/scripts/html_reporter.py +3585 -648
  66. package/.torusguard/scripts/manifest_builder.py +2 -0
  67. package/.torusguard/scripts/recheck_runner.py +5 -4
  68. package/.torusguard/scripts/recipes_runner.py +91 -8
  69. package/.torusguard/scripts/report_sync.py +496 -73
  70. package/.torusguard/scripts/sarif_exporter.py +48 -8
  71. package/.torusguard/scripts/stack_detect.py +44 -2
  72. package/.torusguard/scripts/status_runner.py +267 -0
  73. package/.torusguard/scripts/term_ui.py +1 -1
  74. package/.torusguard/skills/torusguard/SKILL.md +75 -72
  75. package/.torusguard/skills/torusguard-apply/SKILL.md +84 -80
  76. package/.torusguard/skills/torusguard-audit/SKILL.md +87 -83
  77. package/.torusguard/skills/torusguard-authorize/SKILL.md +7 -2
  78. package/.torusguard/skills/torusguard-exploit-check/SKILL.md +7 -2
  79. package/.torusguard/skills/torusguard-full/SKILL.md +7 -2
  80. package/.torusguard/skills/torusguard-harden/SKILL.md +98 -94
  81. package/.torusguard/skills/torusguard-init/SKILL.md +68 -64
  82. package/.torusguard/skills/torusguard-recheck/SKILL.md +81 -77
  83. package/.torusguard/skills/torusguard-report/SKILL.md +93 -72
  84. package/.torusguard/skills/torusguard-status/SKILL.md +62 -58
  85. package/.torusguard/skills/torusguard-verify/SKILL.md +7 -2
  86. package/.torusguard/skills/torusguard-web-validate/SKILL.md +7 -2
  87. package/.torusguard/workflows/apply.md +1 -1
  88. package/.torusguard/workflows/audit.md +1 -1
  89. package/.torusguard/workflows/authorize.md +1 -1
  90. package/.torusguard/workflows/exploit-check.md +1 -1
  91. package/.torusguard/workflows/harden.md +1 -1
  92. package/.torusguard/workflows/init.md +1 -1
  93. package/.torusguard/workflows/memory.md +1 -1
  94. package/.torusguard/workflows/recheck.md +1 -1
  95. package/.torusguard/workflows/report.md +1 -1
  96. package/.torusguard/workflows/status.md +1 -1
  97. package/.torusguard/workflows/verify.md +1 -1
  98. package/.torusguard/workflows/web-validate.md +1 -1
  99. package/README.md +115 -81
  100. package/bin/torusguard.js +244 -38
  101. package/package.json +6 -2
  102. package/skills/torusguard/SKILL.md +1 -1
  103. package/skills/torusguard/__pycache__/bootstrap.cpython-314.pyc +0 -0
  104. package/skills/torusguard/bootstrap.py +52 -8
  105. package/skills/torusguard/payload/.manifest.json +51 -36
  106. package/skills/torusguard/payload/scripts/__pycache__/apply_runner.cpython-314.pyc +0 -0
  107. package/skills/torusguard/payload/scripts/__pycache__/audit_runner.cpython-311.pyc +0 -0
  108. package/skills/torusguard/payload/scripts/__pycache__/audit_runner.cpython-314.pyc +0 -0
  109. package/skills/torusguard/payload/scripts/__pycache__/diff_guard.cpython-311.pyc +0 -0
  110. package/skills/torusguard/payload/scripts/__pycache__/diff_guard.cpython-314.pyc +0 -0
  111. package/skills/torusguard/payload/scripts/__pycache__/finding_scorer.cpython-311.pyc +0 -0
  112. package/skills/torusguard/payload/scripts/__pycache__/finding_scorer.cpython-314.pyc +0 -0
  113. package/skills/torusguard/payload/scripts/__pycache__/harden_runner.cpython-314.pyc +0 -0
  114. package/skills/torusguard/payload/scripts/__pycache__/html_reporter.cpython-311.pyc +0 -0
  115. package/skills/torusguard/payload/scripts/__pycache__/html_reporter.cpython-314.pyc +0 -0
  116. package/skills/torusguard/payload/scripts/__pycache__/manifest_builder.cpython-314.pyc +0 -0
  117. package/skills/torusguard/payload/scripts/__pycache__/memory_engine.cpython-311.pyc +0 -0
  118. package/skills/torusguard/payload/scripts/__pycache__/memory_engine.cpython-314.pyc +0 -0
  119. package/skills/torusguard/payload/scripts/__pycache__/monorepo_detector.cpython-311.pyc +0 -0
  120. package/skills/torusguard/payload/scripts/__pycache__/monorepo_detector.cpython-314.pyc +0 -0
  121. package/skills/torusguard/payload/scripts/__pycache__/recheck_runner.cpython-314.pyc +0 -0
  122. package/skills/torusguard/payload/scripts/__pycache__/report_sync.cpython-311.pyc +0 -0
  123. package/skills/torusguard/payload/scripts/__pycache__/report_sync.cpython-314.pyc +0 -0
  124. package/skills/torusguard/payload/scripts/__pycache__/rules_sync.cpython-311.pyc +0 -0
  125. package/skills/torusguard/payload/scripts/__pycache__/run_manager.cpython-311.pyc +0 -0
  126. package/skills/torusguard/payload/scripts/__pycache__/run_manager.cpython-314.pyc +0 -0
  127. package/skills/torusguard/payload/scripts/__pycache__/sarif_exporter.cpython-314.pyc +0 -0
  128. package/skills/torusguard/payload/scripts/__pycache__/stack_detect.cpython-311.pyc +0 -0
  129. package/skills/torusguard/payload/scripts/__pycache__/stack_detect.cpython-314.pyc +0 -0
  130. package/skills/torusguard/payload/scripts/__pycache__/term_ui.cpython-311.pyc +0 -0
  131. package/skills/torusguard/payload/scripts/__pycache__/term_ui.cpython-314.pyc +0 -0
  132. package/skills/torusguard/payload/scripts/apply_runner.py +108 -9
  133. package/skills/torusguard/payload/scripts/audit_runner.py +336 -24
  134. package/skills/torusguard/payload/scripts/harden_runner.py +124 -70
  135. package/skills/torusguard/payload/scripts/html_reporter.py +3585 -648
  136. package/skills/torusguard/payload/scripts/manifest_builder.py +2 -0
  137. package/skills/torusguard/payload/scripts/recheck_runner.py +5 -4
  138. package/skills/torusguard/payload/scripts/recipes_runner.py +91 -8
  139. package/skills/torusguard/payload/scripts/report_sync.py +496 -73
  140. package/skills/torusguard/payload/scripts/sarif_exporter.py +48 -8
  141. package/skills/torusguard/payload/scripts/stack_detect.py +44 -2
  142. package/skills/torusguard/payload/scripts/status_runner.py +267 -0
  143. package/skills/torusguard/payload/scripts/term_ui.py +1 -1
  144. package/skills/torusguard/payload/skills/torusguard/SKILL.md +1 -1
  145. package/skills/torusguard/payload/skills/torusguard-apply/SKILL.md +1 -1
  146. package/skills/torusguard/payload/skills/torusguard-audit/SKILL.md +1 -1
  147. package/skills/torusguard/payload/skills/torusguard-authorize/SKILL.md +1 -1
  148. package/skills/torusguard/payload/skills/torusguard-exploit-check/SKILL.md +1 -1
  149. package/skills/torusguard/payload/skills/torusguard-full/SKILL.md +1 -1
  150. package/skills/torusguard/payload/skills/torusguard-harden/SKILL.md +1 -1
  151. package/skills/torusguard/payload/skills/torusguard-init/SKILL.md +1 -1
  152. package/skills/torusguard/payload/skills/torusguard-recheck/SKILL.md +1 -1
  153. package/skills/torusguard/payload/skills/torusguard-report/SKILL.md +40 -23
  154. package/skills/torusguard/payload/skills/torusguard-status/SKILL.md +1 -1
  155. package/skills/torusguard/payload/skills/torusguard-verify/SKILL.md +1 -1
  156. package/skills/torusguard/payload/skills/torusguard-web-validate/SKILL.md +1 -1
  157. package/skills/torusguard/payload/workflows/apply.md +9 -1
  158. package/skills/torusguard/payload/workflows/audit.md +8 -2
  159. package/skills/torusguard/payload/workflows/authorize.md +1 -1
  160. package/skills/torusguard/payload/workflows/exploit-check.md +1 -1
  161. package/skills/torusguard/payload/workflows/harden.md +6 -1
  162. package/skills/torusguard/payload/workflows/init.md +7 -1
  163. package/skills/torusguard/payload/workflows/memory.md +1 -1
  164. package/skills/torusguard/payload/workflows/recheck.md +1 -1
  165. package/skills/torusguard/payload/workflows/recipes.md +55 -0
  166. package/skills/torusguard/payload/workflows/report.md +59 -55
  167. package/skills/torusguard/payload/workflows/status.md +4 -1
  168. package/skills/torusguard/payload/workflows/torusguard-apply.md +110 -0
  169. package/skills/torusguard/payload/workflows/torusguard-audit.md +105 -0
  170. package/skills/torusguard/payload/workflows/torusguard-authorize.md +96 -0
  171. package/skills/torusguard/payload/workflows/torusguard-exploit-check.md +98 -0
  172. package/skills/torusguard/payload/workflows/torusguard-harden.md +104 -0
  173. package/skills/torusguard/payload/workflows/torusguard-init.md +106 -0
  174. package/skills/torusguard/payload/workflows/torusguard-recheck.md +101 -0
  175. package/skills/torusguard/payload/workflows/torusguard-recipes.md +55 -0
  176. package/skills/torusguard/payload/workflows/torusguard-report.md +105 -0
  177. package/skills/torusguard/payload/workflows/torusguard-status.md +103 -0
  178. package/skills/torusguard/payload/workflows/torusguard-verify.md +100 -0
  179. package/skills/torusguard/payload/workflows/torusguard-web-validate.md +96 -0
  180. package/skills/torusguard/payload/workflows/torusguard.md +19 -0
  181. package/skills/torusguard/payload/workflows/verify.md +1 -1
  182. package/skills/torusguard/payload/workflows/web-validate.md +1 -1
  183. package/skills/torusguard-apply/SKILL.md +1 -1
  184. package/skills/torusguard-audit/SKILL.md +1 -1
  185. package/skills/torusguard-authorize/SKILL.md +1 -1
  186. package/skills/torusguard-exploit-check/SKILL.md +1 -1
  187. package/skills/torusguard-full/SKILL.md +1 -1
  188. package/skills/torusguard-harden/SKILL.md +1 -1
  189. package/skills/torusguard-init/SKILL.md +1 -1
  190. package/skills/torusguard-recheck/SKILL.md +1 -1
  191. package/skills/torusguard-report/SKILL.md +40 -23
  192. package/skills/torusguard-status/SKILL.md +1 -1
  193. package/skills/torusguard-verify/SKILL.md +1 -1
  194. package/skills/torusguard-web-validate/SKILL.md +1 -1
@@ -0,0 +1,2382 @@
1
+ [
2
+ {
3
+ "finding_id": "TG-INPUT-002-f8cd11b9",
4
+ "rule_id": "TG-INPUT-002",
5
+ "title": "Raw SQL Concatenation",
6
+ "description": "Python f-string interpolation in raw SQL query",
7
+ "severity": "Low",
8
+ "category": "injection",
9
+ "cluster": "cluster-injection",
10
+ "file_path": "harness/runner.py",
11
+ "line_number": 258,
12
+ "matched_text": "raw(f'SELECT * FROM users WHERE name = {",
13
+ "snippet": " framework_pattern=FrameworkPattern(\n framework=\"Django\",\n unsafe_snippet=\"User.objects.raw(f'SELECT * FROM users WHERE name = {name}')\",\n safe_snippet=\"User.objects.raw('SELECT * FROM users WHERE name = %s', [name])\",\n ),",
14
+ "is_test": true,
15
+ "is_canary": true,
16
+ "rule_precision": 0.85,
17
+ "target": {
18
+ "file_path": "harness/runner.py",
19
+ "start_line": 258,
20
+ "end_line": 258
21
+ },
22
+ "confidence_score": 74,
23
+ "confidence_band": "High Confidence",
24
+ "confidence_factors": {
25
+ "evidence_quality": 29,
26
+ "reproduction_success": 0,
27
+ "independent_confirmations": 15,
28
+ "environmental_clarity": 5,
29
+ "manual_review_status": 0,
30
+ "memory_boost": 25,
31
+ "test_exemption": false,
32
+ "test_deduction": 0,
33
+ "total_score": 74,
34
+ "classification_band": "High Confidence"
35
+ }
36
+ },
37
+ {
38
+ "finding_id": "TG-SEC-001-593d6437",
39
+ "rule_id": "TG-SEC-001",
40
+ "title": "Hardcoded Secret or API Key in Tracked Source",
41
+ "description": "Hardcoded credential or API secret string",
42
+ "severity": "Low",
43
+ "category": "secrets",
44
+ "cluster": "cluster-credentials-exposure",
45
+ "file_path": "harness/runner.py",
46
+ "line_number": 211,
47
+ "matched_text": "SECRET_KEY = 'super_secret_jwt_key'",
48
+ "snippet": " type=EvidenceType.SOURCE,\n location=\"server/auth.py:42\",\n raw_snippet=\"SECRET_KEY = 'super_secret_jwt_key'\",\n rationale=\"Hardcoded secret credential.\",\n confidence_level=ConfidenceBand.CONFIRMED,",
49
+ "is_test": true,
50
+ "is_canary": true,
51
+ "rule_precision": 0.9,
52
+ "target": {
53
+ "file_path": "harness/runner.py",
54
+ "start_line": 211,
55
+ "end_line": 211
56
+ },
57
+ "confidence_score": 71,
58
+ "confidence_band": "High Confidence",
59
+ "confidence_factors": {
60
+ "evidence_quality": 31,
61
+ "reproduction_success": 0,
62
+ "independent_confirmations": 15,
63
+ "environmental_clarity": 5,
64
+ "manual_review_status": 0,
65
+ "memory_boost": 20,
66
+ "test_exemption": false,
67
+ "test_deduction": 0,
68
+ "total_score": 71,
69
+ "classification_band": "High Confidence"
70
+ }
71
+ },
72
+ {
73
+ "finding_id": "TG-SEC-001-e0a84cf3",
74
+ "rule_id": "TG-SEC-001",
75
+ "title": "Hardcoded Secret or API Key in Tracked Source",
76
+ "description": "Hardcoded credential or API secret string",
77
+ "severity": "Low",
78
+ "category": "secrets",
79
+ "cluster": "cluster-credentials-exposure",
80
+ "file_path": "harness/runner.py",
81
+ "line_number": 221,
82
+ "matched_text": "API_KEY = 'sk_live_998877665544332211'",
83
+ "snippet": " def test_sensitive_data_masking(self):\n print(\"\\n6. Testing Sensitive Secret & Token Masking...\")\n sample_secret = \"API_KEY = 'sk_live_998877665544332211'\"\n masked = mask_sensitive_data(sample_secret)\n self.log_test(\"Stripe Secret Key Redaction\", \"sk_live_***REDACTED***\" in masked and \"998877665544332211\" not in masked)",
84
+ "is_test": true,
85
+ "is_canary": true,
86
+ "rule_precision": 0.9,
87
+ "target": {
88
+ "file_path": "harness/runner.py",
89
+ "start_line": 221,
90
+ "end_line": 221
91
+ },
92
+ "confidence_score": 71,
93
+ "confidence_band": "High Confidence",
94
+ "confidence_factors": {
95
+ "evidence_quality": 31,
96
+ "reproduction_success": 0,
97
+ "independent_confirmations": 15,
98
+ "environmental_clarity": 5,
99
+ "manual_review_status": 0,
100
+ "memory_boost": 20,
101
+ "test_exemption": false,
102
+ "test_deduction": 0,
103
+ "total_score": 71,
104
+ "classification_band": "High Confidence"
105
+ }
106
+ },
107
+ {
108
+ "finding_id": "TG-SEC-001-88c9bb29",
109
+ "rule_id": "TG-SEC-001",
110
+ "title": "Hardcoded Secret or API Key in Tracked Source",
111
+ "description": "Hardcoded credential or API secret string",
112
+ "severity": "Low",
113
+ "category": "secrets",
114
+ "cluster": "cluster-credentials-exposure",
115
+ "file_path": "harness/runner.py",
116
+ "line_number": 392,
117
+ "matched_text": "SECRET_KEY = 'sk_live_secret_key_12345'",
118
+ "snippet": " type=EvidenceType.SOURCE,\n location=\"settings.py:10\",\n raw_snippet=\"DEBUG = True\\nSECRET_KEY = 'sk_live_secret_key_12345'\",\n rationale=\"Production debug mode exposure and hardcoded secret.\",\n confidence_level=ConfidenceBand.CONFIRMED,",
119
+ "is_test": true,
120
+ "is_canary": true,
121
+ "rule_precision": 0.9,
122
+ "target": {
123
+ "file_path": "harness/runner.py",
124
+ "start_line": 392,
125
+ "end_line": 392
126
+ },
127
+ "confidence_score": 71,
128
+ "confidence_band": "High Confidence",
129
+ "confidence_factors": {
130
+ "evidence_quality": 31,
131
+ "reproduction_success": 0,
132
+ "independent_confirmations": 15,
133
+ "environmental_clarity": 5,
134
+ "manual_review_status": 0,
135
+ "memory_boost": 20,
136
+ "test_exemption": false,
137
+ "test_deduction": 0,
138
+ "total_score": 71,
139
+ "classification_band": "High Confidence"
140
+ }
141
+ },
142
+ {
143
+ "finding_id": "TG-DB-002-08d11e50",
144
+ "rule_id": "TG-DB-002",
145
+ "title": "Privileged Database Credential in Browser Context",
146
+ "description": "Service role key or raw database connection string reference in frontend code",
147
+ "severity": "Low",
148
+ "category": "database",
149
+ "cluster": "cluster-client-leak",
150
+ "file_path": "harness/validate_v0_9_2_diff_and_monorepo.py",
151
+ "line_number": 134,
152
+ "matched_text": "SUPABASE_SERVICE_ROLE_KEY",
153
+ "snippet": " assert nextjs_file.is_file(), \"Missing actions.ts in vulnerable_nextjs\"\n nx_code = nextjs_file.read_text(encoding=\"utf-8\")\n assert \"TG-CLIENT-001\" in nx_code and \"SUPABASE_SERVICE_ROLE_KEY\" in nx_code\n assert \"TG-AUTH-003\" in nx_code and \"use server\" in nx_code\n print(\" [PASS] vulnerable_nextjs fixture contains TG-CLIENT-001 and TG-AUTH-003 sinks\")",
154
+ "is_test": true,
155
+ "is_canary": true,
156
+ "rule_precision": 0.9,
157
+ "target": {
158
+ "file_path": "harness/validate_v0_9_2_diff_and_monorepo.py",
159
+ "start_line": 134,
160
+ "end_line": 134
161
+ },
162
+ "confidence_score": 69,
163
+ "confidence_band": "Medium Confidence",
164
+ "confidence_factors": {
165
+ "evidence_quality": 31,
166
+ "reproduction_success": 0,
167
+ "independent_confirmations": 8,
168
+ "environmental_clarity": 5,
169
+ "manual_review_status": 0,
170
+ "memory_boost": 25,
171
+ "test_exemption": false,
172
+ "test_deduction": 0,
173
+ "total_score": 69,
174
+ "classification_band": "Medium Confidence"
175
+ }
176
+ },
177
+ {
178
+ "finding_id": "TG-SEC-001-c616aefd",
179
+ "rule_id": "TG-SEC-001",
180
+ "title": "Hardcoded Secret or API Key in Tracked Source",
181
+ "description": "Hardcoded credential or API secret string",
182
+ "severity": "Low",
183
+ "category": "secrets",
184
+ "cluster": "cluster-credentials-exposure",
185
+ "file_path": "harness/validate_qa_v0_6_0.py",
186
+ "line_number": 64,
187
+ "matched_text": "SECRET_KEY = \"sk_live_1234567890\"",
188
+ "snippet": " \"tiny-repo\": {\n \"vulnerable\": {\n \"app.py\": 'DEBUG = True\\nSECRET_KEY = \"sk_live_1234567890\"\\n\\ndef index():\\n return \"Welcome\"\\n'\n },\n \"hardened\": {",
189
+ "is_test": true,
190
+ "is_canary": true,
191
+ "rule_precision": 0.9,
192
+ "target": {
193
+ "file_path": "harness/validate_qa_v0_6_0.py",
194
+ "start_line": 64,
195
+ "end_line": 64
196
+ },
197
+ "confidence_score": 67,
198
+ "confidence_band": "Medium Confidence",
199
+ "confidence_factors": {
200
+ "evidence_quality": 31,
201
+ "reproduction_success": 0,
202
+ "independent_confirmations": 11,
203
+ "environmental_clarity": 5,
204
+ "manual_review_status": 0,
205
+ "memory_boost": 20,
206
+ "test_exemption": false,
207
+ "test_deduction": 0,
208
+ "total_score": 67,
209
+ "classification_band": "Medium Confidence"
210
+ }
211
+ },
212
+ {
213
+ "finding_id": "TG-SEC-001-d5b3684f",
214
+ "rule_id": "TG-SEC-001",
215
+ "title": "Hardcoded Secret or API Key in Tracked Source",
216
+ "description": "Hardcoded credential or API secret string",
217
+ "severity": "Low",
218
+ "category": "secrets",
219
+ "cluster": "cluster-credentials-exposure",
220
+ "file_path": "harness/validate_qa_v0_6_0.py",
221
+ "line_number": 90,
222
+ "matched_text": "SECRET_KEY = \"sk_live_1234567890\"",
223
+ "snippet": " \"confidence_band\": \"Confirmed\",\n \"target\": {\"file_path\": \"app.py\", \"line_start\": 2, \"line_end\": 2},\n \"evidence\": {\"code_snippet\": 'SECRET_KEY = \"sk_live_1234567890\"'},\n \"what_is_wrong\": \"Hardcoded secret exposed in source code.\",\n \"what_should_change\": \"Load SECRET_KEY from environment variables.\",",
224
+ "is_test": true,
225
+ "is_canary": true,
226
+ "rule_precision": 0.9,
227
+ "target": {
228
+ "file_path": "harness/validate_qa_v0_6_0.py",
229
+ "start_line": 90,
230
+ "end_line": 90
231
+ },
232
+ "confidence_score": 67,
233
+ "confidence_band": "Medium Confidence",
234
+ "confidence_factors": {
235
+ "evidence_quality": 31,
236
+ "reproduction_success": 0,
237
+ "independent_confirmations": 11,
238
+ "environmental_clarity": 5,
239
+ "manual_review_status": 0,
240
+ "memory_boost": 20,
241
+ "test_exemption": false,
242
+ "test_deduction": 0,
243
+ "total_score": 67,
244
+ "classification_band": "Medium Confidence"
245
+ }
246
+ },
247
+ {
248
+ "finding_id": "TG-SEC-001-54f1a02a",
249
+ "rule_id": "TG-SEC-001",
250
+ "title": "Hardcoded Secret or API Key in Tracked Source",
251
+ "description": "Hardcoded credential or API secret string",
252
+ "severity": "Low",
253
+ "category": "secrets",
254
+ "cluster": "cluster-credentials-exposure",
255
+ "file_path": "harness/validate_v0_6_2_modern_stacks.py",
256
+ "line_number": 341,
257
+ "matched_text": "PASSWORD=\"secret_in_docker\"",
258
+ "snippet": "COPY . .\n# Running as root user & hardcoding secrets\nENV DATABASE_PASSWORD=\"secret_in_docker\"\nCMD [\"python\", \"main.py\"]\n\"\"\", encoding=\"utf-8\")",
259
+ "is_test": true,
260
+ "is_canary": true,
261
+ "rule_precision": 0.9,
262
+ "target": {
263
+ "file_path": "harness/validate_v0_6_2_modern_stacks.py",
264
+ "start_line": 341,
265
+ "end_line": 341
266
+ },
267
+ "confidence_score": 67,
268
+ "confidence_band": "Medium Confidence",
269
+ "confidence_factors": {
270
+ "evidence_quality": 31,
271
+ "reproduction_success": 0,
272
+ "independent_confirmations": 11,
273
+ "environmental_clarity": 5,
274
+ "manual_review_status": 0,
275
+ "memory_boost": 20,
276
+ "test_exemption": false,
277
+ "test_deduction": 0,
278
+ "total_score": 67,
279
+ "classification_band": "Medium Confidence"
280
+ }
281
+ },
282
+ {
283
+ "finding_id": "TG-SEC-001-676f776e",
284
+ "rule_id": "TG-SEC-001",
285
+ "title": "Hardcoded Secret or API Key in Tracked Source",
286
+ "description": "Hardcoded credential or API secret string",
287
+ "severity": "Low",
288
+ "category": "secrets",
289
+ "cluster": "cluster-credentials-exposure",
290
+ "file_path": "harness/validate_v0_6_2_modern_stacks.py",
291
+ "line_number": 356,
292
+ "matched_text": "PASSWORD=\"secret_in_docker\"",
293
+ "snippet": " \"confidence_band\": \"Confirmed\",\n \"target\": {\"file_path\": \"Dockerfile\", \"line_start\": 5, \"line_end\": 5},\n \"evidence\": {\"code_snippet\": 'ENV DATABASE_PASSWORD=\"secret_in_docker\"'},\n \"what_is_wrong\": \"Secret baked into immutable container image layer.\",\n \"what_should_change\": \"Inject secrets at runtime or use BuildKit --mount=type=secret.\",",
294
+ "is_test": true,
295
+ "is_canary": true,
296
+ "rule_precision": 0.9,
297
+ "target": {
298
+ "file_path": "harness/validate_v0_6_2_modern_stacks.py",
299
+ "start_line": 356,
300
+ "end_line": 356
301
+ },
302
+ "confidence_score": 67,
303
+ "confidence_band": "Medium Confidence",
304
+ "confidence_factors": {
305
+ "evidence_quality": 31,
306
+ "reproduction_success": 0,
307
+ "independent_confirmations": 11,
308
+ "environmental_clarity": 5,
309
+ "manual_review_status": 0,
310
+ "memory_boost": 20,
311
+ "test_exemption": false,
312
+ "test_deduction": 0,
313
+ "total_score": 67,
314
+ "classification_band": "Medium Confidence"
315
+ }
316
+ },
317
+ {
318
+ "finding_id": "TG-SEC-001-58f70e46",
319
+ "rule_id": "TG-SEC-001",
320
+ "title": "Hardcoded Secret or API Key in Tracked Source",
321
+ "description": "Hardcoded credential or API secret string",
322
+ "severity": "Low",
323
+ "category": "secrets",
324
+ "cluster": "cluster-credentials-exposure",
325
+ "file_path": "harness/validate_v0_6_2_modern_stacks.py",
326
+ "line_number": 362,
327
+ "matched_text": "PASSWORD=\"secret_in_docker\"",
328
+ "snippet": "+++ b/Dockerfile\n@@ -5,1 +5,2 @@\n-ENV DATABASE_PASSWORD=\"secret_in_docker\"\n+USER appuser\n\"\"\",",
329
+ "is_test": true,
330
+ "is_canary": true,
331
+ "rule_precision": 0.9,
332
+ "target": {
333
+ "file_path": "harness/validate_v0_6_2_modern_stacks.py",
334
+ "start_line": 362,
335
+ "end_line": 362
336
+ },
337
+ "confidence_score": 67,
338
+ "confidence_band": "Medium Confidence",
339
+ "confidence_factors": {
340
+ "evidence_quality": 31,
341
+ "reproduction_success": 0,
342
+ "independent_confirmations": 11,
343
+ "environmental_clarity": 5,
344
+ "manual_review_status": 0,
345
+ "memory_boost": 20,
346
+ "test_exemption": false,
347
+ "test_deduction": 0,
348
+ "total_score": 67,
349
+ "classification_band": "Medium Confidence"
350
+ }
351
+ },
352
+ {
353
+ "finding_id": "TG-DB-002-14cf4139",
354
+ "rule_id": "TG-DB-002",
355
+ "title": "Privileged Database Credential in Browser Context",
356
+ "description": "Service role key or raw database connection string reference in frontend code",
357
+ "severity": "Low",
358
+ "category": "database",
359
+ "cluster": "cluster-client-leak",
360
+ "file_path": "harness/validate_v0_7_0_runtime.py",
361
+ "line_number": 129,
362
+ "matched_text": "DATABASE_URL",
363
+ "snippet": " self.send_header(\"Content-Type\", \"application/json\")\n self.end_headers()\n self.wfile.write(b'{\"DEBUG\": true, \"DATABASE_URL\": \"sqlite:////app/db.sqlite3\"}')\n\n elif url_path == \"/api/files/download\":",
364
+ "is_test": true,
365
+ "is_canary": true,
366
+ "rule_precision": 0.9,
367
+ "target": {
368
+ "file_path": "harness/validate_v0_7_0_runtime.py",
369
+ "start_line": 129,
370
+ "end_line": 129
371
+ },
372
+ "confidence_score": 66,
373
+ "confidence_band": "Medium Confidence",
374
+ "confidence_factors": {
375
+ "evidence_quality": 31,
376
+ "reproduction_success": 0,
377
+ "independent_confirmations": 5,
378
+ "environmental_clarity": 5,
379
+ "manual_review_status": 0,
380
+ "memory_boost": 25,
381
+ "test_exemption": false,
382
+ "test_deduction": 0,
383
+ "total_score": 66,
384
+ "classification_band": "Medium Confidence"
385
+ }
386
+ },
387
+ {
388
+ "finding_id": "TG-DB-002-b53ad22c",
389
+ "rule_id": "TG-DB-002",
390
+ "title": "Privileged Database Credential in Browser Context",
391
+ "description": "Service role key or raw database connection string reference in frontend code",
392
+ "severity": "Low",
393
+ "category": "database",
394
+ "cluster": "cluster-client-leak",
395
+ "file_path": "harness/validate_v0_7_0_runtime.py",
396
+ "line_number": 423,
397
+ "matched_text": "DATABASE_URL",
398
+ "snippet": "\n # 6. Exposed debug config -> Runtime Confirmed\n r6 = ExploitChecker.check_debug_exposure(val, \"fnd-6\", \"c-4\", f\"{self.base_url}/debug/env\", \"DATABASE_URL\")\n self.log_test(\"Phase 3\", \"Exposed Debug Configuration Confirmed\", r6.status == ExploitabilityStatus.RUNTIME_CONFIRMED.value)\n",
399
+ "is_test": true,
400
+ "is_canary": true,
401
+ "rule_precision": 0.9,
402
+ "target": {
403
+ "file_path": "harness/validate_v0_7_0_runtime.py",
404
+ "start_line": 423,
405
+ "end_line": 423
406
+ },
407
+ "confidence_score": 66,
408
+ "confidence_band": "Medium Confidence",
409
+ "confidence_factors": {
410
+ "evidence_quality": 31,
411
+ "reproduction_success": 0,
412
+ "independent_confirmations": 5,
413
+ "environmental_clarity": 5,
414
+ "manual_review_status": 0,
415
+ "memory_boost": 25,
416
+ "test_exemption": false,
417
+ "test_deduction": 0,
418
+ "total_score": 66,
419
+ "classification_band": "Medium Confidence"
420
+ }
421
+ },
422
+ {
423
+ "finding_id": "TG-INPUT-002-02f8e274",
424
+ "rule_id": "TG-INPUT-002",
425
+ "title": "Raw SQL Concatenation",
426
+ "description": "Python f-string interpolation in raw SQL query",
427
+ "severity": "Low",
428
+ "category": "injection",
429
+ "cluster": "cluster-injection",
430
+ "file_path": "harness/engine/fixture_manager.py",
431
+ "line_number": 128,
432
+ "matched_text": "execute(f'SELECT * FROM items WHERE name LIKE {",
433
+ "snippet": " vulnerable_variant=FixtureVariant(\n relative_path=\"examples/python/sqlalchemy-vuln\",\n code_pattern=\"session.execute(f'SELECT * FROM items WHERE name LIKE {q}')\",\n expected_findings_count=4,\n ),",
434
+ "is_test": true,
435
+ "is_canary": true,
436
+ "rule_precision": 0.85,
437
+ "target": {
438
+ "file_path": "harness/engine/fixture_manager.py",
439
+ "start_line": 128,
440
+ "end_line": 128
441
+ },
442
+ "confidence_score": 64,
443
+ "confidence_band": "Medium Confidence",
444
+ "confidence_factors": {
445
+ "evidence_quality": 29,
446
+ "reproduction_success": 0,
447
+ "independent_confirmations": 5,
448
+ "environmental_clarity": 5,
449
+ "manual_review_status": 0,
450
+ "memory_boost": 25,
451
+ "test_exemption": false,
452
+ "test_deduction": 0,
453
+ "total_score": 64,
454
+ "classification_band": "Medium Confidence"
455
+ }
456
+ },
457
+ {
458
+ "finding_id": "TG-SEC-001-7c852ff3",
459
+ "rule_id": "TG-SEC-001",
460
+ "title": "Hardcoded Secret or API Key in Tracked Source",
461
+ "description": "Hardcoded credential or API secret string",
462
+ "severity": "Low",
463
+ "category": "secrets",
464
+ "cluster": "cluster-credentials-exposure",
465
+ "file_path": "harness/master_validation.py",
466
+ "line_number": 257,
467
+ "matched_text": "PASSWORD = 'super_secret_database_password_123'",
468
+ "snippet": " self.log(\"Redaction\", \"JWT Token Redaction\", \"Bearer ***REDACTED_JWT***\" in masked_jwt and \"doNotLeakSignature\" not in masked_jwt)\n\n masked_pwd = mask_sensitive_data(\"DB_PASSWORD = 'super_secret_database_password_123'\")\n self.log(\"Redaction\", \"Password Variable Redaction\", \"***REDACTED***\" in masked_pwd and \"super_secret_database_password_123\" not in masked_pwd)\n",
469
+ "is_test": true,
470
+ "is_canary": true,
471
+ "rule_precision": 0.9,
472
+ "target": {
473
+ "file_path": "harness/master_validation.py",
474
+ "start_line": 257,
475
+ "end_line": 257
476
+ },
477
+ "confidence_score": 64,
478
+ "confidence_band": "Medium Confidence",
479
+ "confidence_factors": {
480
+ "evidence_quality": 31,
481
+ "reproduction_success": 0,
482
+ "independent_confirmations": 8,
483
+ "environmental_clarity": 5,
484
+ "manual_review_status": 0,
485
+ "memory_boost": 20,
486
+ "test_exemption": false,
487
+ "test_deduction": 0,
488
+ "total_score": 64,
489
+ "classification_band": "Medium Confidence"
490
+ }
491
+ },
492
+ {
493
+ "finding_id": "TG-SEC-001-02761dbb",
494
+ "rule_id": "TG-SEC-001",
495
+ "title": "Hardcoded Secret or API Key in Tracked Source",
496
+ "description": "Hardcoded credential or API secret string",
497
+ "severity": "Low",
498
+ "category": "secrets",
499
+ "cluster": "cluster-credentials-exposure",
500
+ "file_path": "harness/master_validation.py",
501
+ "line_number": 460,
502
+ "matched_text": "API_KEY = 'sk_live_998877665544332211'",
503
+ "snippet": "\n def _create_sample_finding(self, rule_id: str, target_path: str, secret_test: bool = False) -> Finding:\n raw_code = \"STRIPE_API_KEY = 'sk_live_998877665544332211'\\nAuthorization = 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIn0.doNotLeakSignature'\" if secret_test else f\"# Logic for {rule_id}\\nrole = request.headers.get('X-User-Role')\"\n\n ev = Evidence(",
504
+ "is_test": true,
505
+ "is_canary": true,
506
+ "rule_precision": 0.9,
507
+ "target": {
508
+ "file_path": "harness/master_validation.py",
509
+ "start_line": 460,
510
+ "end_line": 460
511
+ },
512
+ "confidence_score": 64,
513
+ "confidence_band": "Medium Confidence",
514
+ "confidence_factors": {
515
+ "evidence_quality": 31,
516
+ "reproduction_success": 0,
517
+ "independent_confirmations": 8,
518
+ "environmental_clarity": 5,
519
+ "manual_review_status": 0,
520
+ "memory_boost": 20,
521
+ "test_exemption": false,
522
+ "test_deduction": 0,
523
+ "total_score": 64,
524
+ "classification_band": "Medium Confidence"
525
+ }
526
+ },
527
+ {
528
+ "finding_id": "TG-DB-004-e8cc000a",
529
+ "rule_id": "TG-DB-004",
530
+ "title": "Missing Tenant Query Isolation in Multi-Tenant Models",
531
+ "description": "Django ORM .get(id=...) query lacking explicit tenant scope filter",
532
+ "severity": "Low",
533
+ "category": "database",
534
+ "cluster": "cluster-tenant-isolation",
535
+ "file_path": "harness/runner.py",
536
+ "line_number": 505,
537
+ "matched_text": ".objects.get(id=id)",
538
+ "snippet": "\n # 2. Stable Finding Identity\n code_a = \"def view():\\n return Item.objects.get(id=id)\"\n code_b = \"# Shifted comment\\ndef view():\\n return Item.objects.get(id=id)\"\n fp1 = IdentityEngine.generate_identity(\"TG-DB-004\", \"views.py\", code_a, sink_signature=\"Item.objects.get\")",
539
+ "is_test": true,
540
+ "is_canary": true,
541
+ "rule_precision": 0.55,
542
+ "target": {
543
+ "file_path": "harness/runner.py",
544
+ "start_line": 505,
545
+ "end_line": 505
546
+ },
547
+ "confidence_score": 64,
548
+ "confidence_band": "Medium Confidence",
549
+ "confidence_factors": {
550
+ "evidence_quality": 19,
551
+ "reproduction_success": 0,
552
+ "independent_confirmations": 15,
553
+ "environmental_clarity": 5,
554
+ "manual_review_status": 0,
555
+ "memory_boost": 25,
556
+ "test_exemption": false,
557
+ "test_deduction": 0,
558
+ "total_score": 64,
559
+ "classification_band": "Medium Confidence"
560
+ }
561
+ },
562
+ {
563
+ "finding_id": "TG-DB-004-89b581f9",
564
+ "rule_id": "TG-DB-004",
565
+ "title": "Missing Tenant Query Isolation in Multi-Tenant Models",
566
+ "description": "Django ORM .get(id=...) query lacking explicit tenant scope filter",
567
+ "severity": "Low",
568
+ "category": "database",
569
+ "cluster": "cluster-tenant-isolation",
570
+ "file_path": "harness/runner.py",
571
+ "line_number": 506,
572
+ "matched_text": ".objects.get(id=id)",
573
+ "snippet": " # 2. Stable Finding Identity\n code_a = \"def view():\\n return Item.objects.get(id=id)\"\n code_b = \"# Shifted comment\\ndef view():\\n return Item.objects.get(id=id)\"\n fp1 = IdentityEngine.generate_identity(\"TG-DB-004\", \"views.py\", code_a, sink_signature=\"Item.objects.get\")\n fp2 = IdentityEngine.generate_identity(\"TG-DB-004\", \"views.py\", code_b, sink_signature=\"Item.objects.get\")",
574
+ "is_test": true,
575
+ "is_canary": true,
576
+ "rule_precision": 0.55,
577
+ "target": {
578
+ "file_path": "harness/runner.py",
579
+ "start_line": 506,
580
+ "end_line": 506
581
+ },
582
+ "confidence_score": 64,
583
+ "confidence_band": "Medium Confidence",
584
+ "confidence_factors": {
585
+ "evidence_quality": 19,
586
+ "reproduction_success": 0,
587
+ "independent_confirmations": 15,
588
+ "environmental_clarity": 5,
589
+ "manual_review_status": 0,
590
+ "memory_boost": 25,
591
+ "test_exemption": false,
592
+ "test_deduction": 0,
593
+ "total_score": 64,
594
+ "classification_band": "Medium Confidence"
595
+ }
596
+ },
597
+ {
598
+ "finding_id": "TG-SEC-001-3a2b5eca",
599
+ "rule_id": "TG-SEC-001",
600
+ "title": "Hardcoded Secret or API Key in Tracked Source",
601
+ "description": "Hardcoded credential or API secret string",
602
+ "severity": "Low",
603
+ "category": "secrets",
604
+ "cluster": "cluster-credentials-exposure",
605
+ "file_path": "harness/validate_e2e.py",
606
+ "line_number": 355,
607
+ "matched_text": "API_KEY = 'sk_live_998877665544332211'",
608
+ "snippet": "\n def _create_sample_finding(self, rule_id: str, target_path: str, secret_test: bool = False) -> Finding:\n raw_code = \"API_KEY = 'sk_live_998877665544332211'\\nAuthorization = 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIn0.doNotLeakSignature'\" if secret_test else f\"# Unsafe logic for {rule_id}\\nrole = request.headers.get('X-User-Role')\"\n \n ev = Evidence(",
609
+ "is_test": true,
610
+ "is_canary": true,
611
+ "rule_precision": 0.9,
612
+ "target": {
613
+ "file_path": "harness/validate_e2e.py",
614
+ "start_line": 355,
615
+ "end_line": 355
616
+ },
617
+ "confidence_score": 64,
618
+ "confidence_band": "Medium Confidence",
619
+ "confidence_factors": {
620
+ "evidence_quality": 31,
621
+ "reproduction_success": 0,
622
+ "independent_confirmations": 8,
623
+ "environmental_clarity": 5,
624
+ "manual_review_status": 0,
625
+ "memory_boost": 20,
626
+ "test_exemption": false,
627
+ "test_deduction": 0,
628
+ "total_score": 64,
629
+ "classification_band": "Medium Confidence"
630
+ }
631
+ },
632
+ {
633
+ "finding_id": "TG-INPUT-002-8f877a5f",
634
+ "rule_id": "TG-INPUT-002",
635
+ "title": "Raw SQL Concatenation",
636
+ "description": "Python f-string interpolation in raw SQL query",
637
+ "severity": "Low",
638
+ "category": "injection",
639
+ "cluster": "cluster-injection",
640
+ "file_path": "harness/validate_v1_1_0_advanced_memory.py",
641
+ "line_number": 107,
642
+ "matched_text": "execute(f'SELECT * FROM users WHERE id = {",
643
+ "snippet": " memory_engine.ensure_memory_structure(root_dir=test_root)\n\n valid_before = \"cursor.execute(f'SELECT * FROM users WHERE id = {uid}')\"\n valid_after = \"cursor.execute('SELECT * FROM users WHERE id = %s', (uid,))\"\n valid_diff = \"- cursor.execute(f'SELECT * FROM users WHERE id = {uid}')\\n+ cursor.execute('SELECT * FROM users WHERE id = %s', (uid,))\"",
644
+ "is_test": true,
645
+ "is_canary": true,
646
+ "rule_precision": 0.85,
647
+ "target": {
648
+ "file_path": "harness/validate_v1_1_0_advanced_memory.py",
649
+ "start_line": 107,
650
+ "end_line": 107
651
+ },
652
+ "confidence_score": 64,
653
+ "confidence_band": "Medium Confidence",
654
+ "confidence_factors": {
655
+ "evidence_quality": 29,
656
+ "reproduction_success": 0,
657
+ "independent_confirmations": 5,
658
+ "environmental_clarity": 5,
659
+ "manual_review_status": 0,
660
+ "memory_boost": 25,
661
+ "test_exemption": false,
662
+ "test_deduction": 0,
663
+ "total_score": 64,
664
+ "classification_band": "Medium Confidence"
665
+ }
666
+ },
667
+ {
668
+ "finding_id": "TG-INPUT-002-266bcaa1",
669
+ "rule_id": "TG-INPUT-002",
670
+ "title": "Raw SQL Concatenation",
671
+ "description": "Python f-string interpolation in raw SQL query",
672
+ "severity": "Low",
673
+ "category": "injection",
674
+ "cluster": "cluster-injection",
675
+ "file_path": "harness/validate_v1_1_0_advanced_memory.py",
676
+ "line_number": 109,
677
+ "matched_text": "execute(f'SELECT * FROM users WHERE id = {",
678
+ "snippet": " valid_before = \"cursor.execute(f'SELECT * FROM users WHERE id = {uid}')\"\n valid_after = \"cursor.execute('SELECT * FROM users WHERE id = %s', (uid,))\"\n valid_diff = \"- cursor.execute(f'SELECT * FROM users WHERE id = {uid}')\\n+ cursor.execute('SELECT * FROM users WHERE id = %s', (uid,))\"\n\n recipe = memory_engine.record_golden_recipe(",
679
+ "is_test": true,
680
+ "is_canary": true,
681
+ "rule_precision": 0.85,
682
+ "target": {
683
+ "file_path": "harness/validate_v1_1_0_advanced_memory.py",
684
+ "start_line": 109,
685
+ "end_line": 109
686
+ },
687
+ "confidence_score": 64,
688
+ "confidence_band": "Medium Confidence",
689
+ "confidence_factors": {
690
+ "evidence_quality": 29,
691
+ "reproduction_success": 0,
692
+ "independent_confirmations": 5,
693
+ "environmental_clarity": 5,
694
+ "manual_review_status": 0,
695
+ "memory_boost": 25,
696
+ "test_exemption": false,
697
+ "test_deduction": 0,
698
+ "total_score": 64,
699
+ "classification_band": "Medium Confidence"
700
+ }
701
+ },
702
+ {
703
+ "finding_id": "TG-PLATFORM-003-69f083d6",
704
+ "rule_id": "TG-PLATFORM-003",
705
+ "title": "Production Stack Trace Exposure",
706
+ "description": "Django DEBUG mode enabled in configuration",
707
+ "severity": "Low",
708
+ "category": "platform",
709
+ "cluster": "cluster-platform",
710
+ "file_path": "harness/runner.py",
711
+ "line_number": 392,
712
+ "matched_text": "DEBUG = True",
713
+ "snippet": " type=EvidenceType.SOURCE,\n location=\"settings.py:10\",\n raw_snippet=\"DEBUG = True\\nSECRET_KEY = 'sk_live_secret_key_12345'\",\n rationale=\"Production debug mode exposure and hardcoded secret.\",\n confidence_level=ConfidenceBand.CONFIRMED,",
714
+ "is_test": true,
715
+ "is_canary": true,
716
+ "rule_precision": 0.75,
717
+ "target": {
718
+ "file_path": "harness/runner.py",
719
+ "start_line": 392,
720
+ "end_line": 392
721
+ },
722
+ "confidence_score": 61,
723
+ "confidence_band": "Medium Confidence",
724
+ "confidence_factors": {
725
+ "evidence_quality": 26,
726
+ "reproduction_success": 0,
727
+ "independent_confirmations": 15,
728
+ "environmental_clarity": 5,
729
+ "manual_review_status": 0,
730
+ "memory_boost": 15,
731
+ "test_exemption": false,
732
+ "test_deduction": 0,
733
+ "total_score": 61,
734
+ "classification_band": "Medium Confidence"
735
+ }
736
+ },
737
+ {
738
+ "finding_id": "TG-PLATFORM-003-6f253f06",
739
+ "rule_id": "TG-PLATFORM-003",
740
+ "title": "Production Stack Trace Exposure",
741
+ "description": "Django DEBUG mode enabled in configuration",
742
+ "severity": "Low",
743
+ "category": "platform",
744
+ "cluster": "cluster-platform",
745
+ "file_path": "harness/runner.py",
746
+ "line_number": 405,
747
+ "matched_text": "DEBUG = True",
748
+ "snippet": " prov = ProvenanceChain(\n discovery_module=\"rules/TG-PLATFORM-003-production-stack-trace-exposure.md\",\n triggering_input=\"DEBUG = True assignment in settings.py\",\n evidence_collected=[\"settings.py:10\"],\n decision_path=[\"Loaded Django settings\", \"Found DEBUG enabled\"],",
749
+ "is_test": true,
750
+ "is_canary": true,
751
+ "rule_precision": 0.75,
752
+ "target": {
753
+ "file_path": "harness/runner.py",
754
+ "start_line": 405,
755
+ "end_line": 405
756
+ },
757
+ "confidence_score": 61,
758
+ "confidence_band": "Medium Confidence",
759
+ "confidence_factors": {
760
+ "evidence_quality": 26,
761
+ "reproduction_success": 0,
762
+ "independent_confirmations": 15,
763
+ "environmental_clarity": 5,
764
+ "manual_review_status": 0,
765
+ "memory_boost": 15,
766
+ "test_exemption": false,
767
+ "test_deduction": 0,
768
+ "total_score": 61,
769
+ "classification_band": "Medium Confidence"
770
+ }
771
+ },
772
+ {
773
+ "finding_id": "TG-PLATFORM-003-fbe8ec66",
774
+ "rule_id": "TG-PLATFORM-003",
775
+ "title": "Production Stack Trace Exposure",
776
+ "description": "Django DEBUG mode enabled in configuration",
777
+ "severity": "Low",
778
+ "category": "platform",
779
+ "cluster": "cluster-platform",
780
+ "file_path": "harness/runner.py",
781
+ "line_number": 416,
782
+ "matched_text": "DEBUG = True",
783
+ "snippet": " framework_pattern=FrameworkPattern(\n framework=\"Django\",\n unsafe_snippet=\"DEBUG = True\",\n safe_snippet=\"DEBUG = False\",\n ),",
784
+ "is_test": true,
785
+ "is_canary": true,
786
+ "rule_precision": 0.75,
787
+ "target": {
788
+ "file_path": "harness/runner.py",
789
+ "start_line": 416,
790
+ "end_line": 416
791
+ },
792
+ "confidence_score": 61,
793
+ "confidence_band": "Medium Confidence",
794
+ "confidence_factors": {
795
+ "evidence_quality": 26,
796
+ "reproduction_success": 0,
797
+ "independent_confirmations": 15,
798
+ "environmental_clarity": 5,
799
+ "manual_review_status": 0,
800
+ "memory_boost": 15,
801
+ "test_exemption": false,
802
+ "test_deduction": 0,
803
+ "total_score": 61,
804
+ "classification_band": "Medium Confidence"
805
+ }
806
+ },
807
+ {
808
+ "finding_id": "TG-RATE-001-758a7750",
809
+ "rule_id": "TG-RATE-001",
810
+ "title": "Unlimited Authentication Endpoint",
811
+ "description": "Authentication POST endpoint defined without rate-limiting middleware",
812
+ "severity": "Low",
813
+ "category": "rate",
814
+ "cluster": "cluster-rate-limiting",
815
+ "file_path": "harness/runner.py",
816
+ "line_number": 575,
817
+ "matched_text": "app.post('/login', async (",
818
+ "snippet": " \"line_number\": 25,\n \"description\": \"Unprotected auth route lacking rate limiting.\",\n \"snippet\": \"app.post('/login', async (req, res) => {})\",\n \"confidence_score\": 85,\n \"confidence_band\": \"High Confidence\"",
819
+ "is_test": true,
820
+ "is_canary": true,
821
+ "rule_precision": 0.45,
822
+ "target": {
823
+ "file_path": "harness/runner.py",
824
+ "start_line": 575,
825
+ "end_line": 575
826
+ },
827
+ "confidence_score": 60,
828
+ "confidence_band": "Medium Confidence",
829
+ "confidence_factors": {
830
+ "evidence_quality": 15,
831
+ "reproduction_success": 0,
832
+ "independent_confirmations": 15,
833
+ "environmental_clarity": 5,
834
+ "manual_review_status": 0,
835
+ "memory_boost": 25,
836
+ "test_exemption": false,
837
+ "test_deduction": 0,
838
+ "total_score": 60,
839
+ "classification_band": "Medium Confidence"
840
+ }
841
+ },
842
+ {
843
+ "finding_id": "TG-DIFF-001-04571685",
844
+ "rule_id": "TG-DIFF-001",
845
+ "title": "Accidental Security Check Bypass in Patch Additions",
846
+ "description": "Disabled TLS certificate verification (verify=False)",
847
+ "severity": "Low",
848
+ "category": "transport",
849
+ "cluster": "cluster-transport-security",
850
+ "file_path": "harness/evaluate_portfolio_polyglot.py",
851
+ "line_number": 74,
852
+ "matched_text": "verify=False",
853
+ "snippet": " \"expected_orm\": \"SQLAlchemy\",\n \"ecosystem\": \"Python\",\n \"test_bypass\": (\"python\", \"verify=False\", \"auth_bypass\"),\n \"test_tenant\": (\"python\", \"tenant_id\"),\n },",
854
+ "is_test": true,
855
+ "is_canary": true,
856
+ "rule_precision": 0.9,
857
+ "target": {
858
+ "file_path": "harness/evaluate_portfolio_polyglot.py",
859
+ "start_line": 74,
860
+ "end_line": 74
861
+ },
862
+ "confidence_score": 59,
863
+ "confidence_band": "Medium Confidence",
864
+ "confidence_factors": {
865
+ "evidence_quality": 31,
866
+ "reproduction_success": 0,
867
+ "independent_confirmations": 8,
868
+ "environmental_clarity": 5,
869
+ "manual_review_status": 0,
870
+ "memory_boost": 15,
871
+ "test_exemption": false,
872
+ "test_deduction": 0,
873
+ "total_score": 59,
874
+ "classification_band": "Medium Confidence"
875
+ }
876
+ },
877
+ {
878
+ "finding_id": "TG-DIFF-001-8b55ac4b",
879
+ "rule_id": "TG-DIFF-001",
880
+ "title": "Accidental Security Check Bypass in Patch Additions",
881
+ "description": "Disabled Go TLS certificate verification (InsecureSkipVerify: true)",
882
+ "severity": "Low",
883
+ "category": "transport",
884
+ "cluster": "cluster-transport-security",
885
+ "file_path": "harness/evaluate_portfolio_polyglot.py",
886
+ "line_number": 151,
887
+ "matched_text": "InsecureSkipVerify: true",
888
+ "snippet": " \"expected_orm\": \"GORM\",\n \"ecosystem\": \"Go\",\n \"test_bypass\": (\"go\", \"InsecureSkipVerify: true\", \"tls_bypass\"),\n \"test_tenant\": (\"go\", '.Where(\"tenant_id = ?\", tenantID)'),\n },",
889
+ "is_test": true,
890
+ "is_canary": true,
891
+ "rule_precision": 0.9,
892
+ "target": {
893
+ "file_path": "harness/evaluate_portfolio_polyglot.py",
894
+ "start_line": 151,
895
+ "end_line": 151
896
+ },
897
+ "confidence_score": 59,
898
+ "confidence_band": "Medium Confidence",
899
+ "confidence_factors": {
900
+ "evidence_quality": 31,
901
+ "reproduction_success": 0,
902
+ "independent_confirmations": 8,
903
+ "environmental_clarity": 5,
904
+ "manual_review_status": 0,
905
+ "memory_boost": 15,
906
+ "test_exemption": false,
907
+ "test_deduction": 0,
908
+ "total_score": 59,
909
+ "classification_band": "Medium Confidence"
910
+ }
911
+ },
912
+ {
913
+ "finding_id": "TG-DIFF-001-cf8d252d",
914
+ "rule_id": "TG-DIFF-001",
915
+ "title": "Accidental Security Check Bypass in Patch Additions",
916
+ "description": "Disabled Go TLS certificate verification (InsecureSkipVerify: true)",
917
+ "severity": "Low",
918
+ "category": "transport",
919
+ "cluster": "cluster-transport-security",
920
+ "file_path": "harness/evaluate_portfolio_polyglot.py",
921
+ "line_number": 162,
922
+ "matched_text": "InsecureSkipVerify: true",
923
+ "snippet": " \"expected_orm\": \"SQLx\",\n \"ecosystem\": \"Go\",\n \"test_bypass\": (\"go\", \"tls.Config{InsecureSkipVerify: true}\", \"tls_bypass\"),\n \"test_tenant\": (\"go\", '.Where(\"org_id = ?\", orgID)'),\n },",
924
+ "is_test": true,
925
+ "is_canary": true,
926
+ "rule_precision": 0.9,
927
+ "target": {
928
+ "file_path": "harness/evaluate_portfolio_polyglot.py",
929
+ "start_line": 162,
930
+ "end_line": 162
931
+ },
932
+ "confidence_score": 59,
933
+ "confidence_band": "Medium Confidence",
934
+ "confidence_factors": {
935
+ "evidence_quality": 31,
936
+ "reproduction_success": 0,
937
+ "independent_confirmations": 8,
938
+ "environmental_clarity": 5,
939
+ "manual_review_status": 0,
940
+ "memory_boost": 15,
941
+ "test_exemption": false,
942
+ "test_deduction": 0,
943
+ "total_score": 59,
944
+ "classification_band": "Medium Confidence"
945
+ }
946
+ },
947
+ {
948
+ "finding_id": "TG-DIFF-001-3543946e",
949
+ "rule_id": "TG-DIFF-001",
950
+ "title": "Accidental Security Check Bypass in Patch Additions",
951
+ "description": "Disabled Go TLS certificate verification (InsecureSkipVerify: true)",
952
+ "severity": "Low",
953
+ "category": "transport",
954
+ "cluster": "cluster-transport-security",
955
+ "file_path": "harness/evaluate_portfolio_polyglot.py",
956
+ "line_number": 173,
957
+ "matched_text": "InsecureSkipVerify: true",
958
+ "snippet": " \"expected_orm\": None,\n \"ecosystem\": \"Go\",\n \"test_bypass\": (\"go\", \"InsecureSkipVerify: true\", \"tls_bypass\"),\n \"test_tenant\": (\"go\", '.Where(\"tenant_id = ?\", tid)'),\n },",
959
+ "is_test": true,
960
+ "is_canary": true,
961
+ "rule_precision": 0.9,
962
+ "target": {
963
+ "file_path": "harness/evaluate_portfolio_polyglot.py",
964
+ "start_line": 173,
965
+ "end_line": 173
966
+ },
967
+ "confidence_score": 59,
968
+ "confidence_band": "Medium Confidence",
969
+ "confidence_factors": {
970
+ "evidence_quality": 31,
971
+ "reproduction_success": 0,
972
+ "independent_confirmations": 8,
973
+ "environmental_clarity": 5,
974
+ "manual_review_status": 0,
975
+ "memory_boost": 15,
976
+ "test_exemption": false,
977
+ "test_deduction": 0,
978
+ "total_score": 59,
979
+ "classification_band": "Medium Confidence"
980
+ }
981
+ },
982
+ {
983
+ "finding_id": "TG-DIFF-001-efffaad0",
984
+ "rule_id": "TG-DIFF-001",
985
+ "title": "Accidental Security Check Bypass in Patch Additions",
986
+ "description": "Disabled Go TLS certificate verification (InsecureSkipVerify: true)",
987
+ "severity": "Low",
988
+ "category": "transport",
989
+ "cluster": "cluster-transport-security",
990
+ "file_path": "harness/evaluate_portfolio_polyglot.py",
991
+ "line_number": 349,
992
+ "matched_text": "InsecureSkipVerify: true",
993
+ "snippet": " \"expected_orm\": None,\n \"ecosystem\": \"Polyglot Fleet\",\n \"test_bypass\": (\"go\", \"InsecureSkipVerify: true\", \"tls_bypass\"),\n \"test_tenant\": (\"go\", '.Where(\"tenant_id = ?\", tid)'),\n },",
994
+ "is_test": true,
995
+ "is_canary": true,
996
+ "rule_precision": 0.9,
997
+ "target": {
998
+ "file_path": "harness/evaluate_portfolio_polyglot.py",
999
+ "start_line": 349,
1000
+ "end_line": 349
1001
+ },
1002
+ "confidence_score": 59,
1003
+ "confidence_band": "Medium Confidence",
1004
+ "confidence_factors": {
1005
+ "evidence_quality": 31,
1006
+ "reproduction_success": 0,
1007
+ "independent_confirmations": 8,
1008
+ "environmental_clarity": 5,
1009
+ "manual_review_status": 0,
1010
+ "memory_boost": 15,
1011
+ "test_exemption": false,
1012
+ "test_deduction": 0,
1013
+ "total_score": 59,
1014
+ "classification_band": "Medium Confidence"
1015
+ }
1016
+ },
1017
+ {
1018
+ "finding_id": "TG-DIFF-001-91bd06b8",
1019
+ "rule_id": "TG-DIFF-001",
1020
+ "title": "Accidental Security Check Bypass in Patch Additions",
1021
+ "description": "Disabled Node.js TLS rejectUnauthorized",
1022
+ "severity": "Low",
1023
+ "category": "transport",
1024
+ "cluster": "cluster-transport-security",
1025
+ "file_path": "harness/evaluate_portfolio_polyglot.py",
1026
+ "line_number": 129,
1027
+ "matched_text": "rejectUnauthorized: false",
1028
+ "snippet": " \"expected_orm\": \"Mongoose\",\n \"ecosystem\": \"JavaScript\",\n \"test_bypass\": (\"javascript\", \"rejectUnauthorized: false\", \"tls_bypass\"),\n \"test_tenant\": (\"javascript\", \"author: req.user.id\"),\n },",
1029
+ "is_test": true,
1030
+ "is_canary": true,
1031
+ "rule_precision": 0.9,
1032
+ "target": {
1033
+ "file_path": "harness/evaluate_portfolio_polyglot.py",
1034
+ "start_line": 129,
1035
+ "end_line": 129
1036
+ },
1037
+ "confidence_score": 59,
1038
+ "confidence_band": "Medium Confidence",
1039
+ "confidence_factors": {
1040
+ "evidence_quality": 31,
1041
+ "reproduction_success": 0,
1042
+ "independent_confirmations": 8,
1043
+ "environmental_clarity": 5,
1044
+ "manual_review_status": 0,
1045
+ "memory_boost": 15,
1046
+ "test_exemption": false,
1047
+ "test_deduction": 0,
1048
+ "total_score": 59,
1049
+ "classification_band": "Medium Confidence"
1050
+ }
1051
+ },
1052
+ {
1053
+ "finding_id": "TG-DIFF-001-cb245735",
1054
+ "rule_id": "TG-DIFF-001",
1055
+ "title": "Accidental Security Check Bypass in Patch Additions",
1056
+ "description": "Disabled PHP curl SSL verification",
1057
+ "severity": "Low",
1058
+ "category": "transport",
1059
+ "cluster": "cluster-transport-security",
1060
+ "file_path": "harness/evaluate_portfolio_polyglot.py",
1061
+ "line_number": 261,
1062
+ "matched_text": "CURLOPT_SSL_VERIFYPEER => false",
1063
+ "snippet": " \"expected_orm\": \"Eloquent\",\n \"ecosystem\": \"PHP\",\n \"test_bypass\": (\"php\", \"CURLOPT_SSL_VERIFYPEER => false\", \"tls_bypass\"),\n \"test_tenant\": (\"php\", 'where(\"tenant_id\", $tenantId)'),\n },",
1064
+ "is_test": true,
1065
+ "is_canary": true,
1066
+ "rule_precision": 0.9,
1067
+ "target": {
1068
+ "file_path": "harness/evaluate_portfolio_polyglot.py",
1069
+ "start_line": 261,
1070
+ "end_line": 261
1071
+ },
1072
+ "confidence_score": 59,
1073
+ "confidence_band": "Medium Confidence",
1074
+ "confidence_factors": {
1075
+ "evidence_quality": 31,
1076
+ "reproduction_success": 0,
1077
+ "independent_confirmations": 8,
1078
+ "environmental_clarity": 5,
1079
+ "manual_review_status": 0,
1080
+ "memory_boost": 15,
1081
+ "test_exemption": false,
1082
+ "test_deduction": 0,
1083
+ "total_score": 59,
1084
+ "classification_band": "Medium Confidence"
1085
+ }
1086
+ },
1087
+ {
1088
+ "finding_id": "TG-DIFF-001-6667680a",
1089
+ "rule_id": "TG-DIFF-001",
1090
+ "title": "Accidental Security Check Bypass in Patch Additions",
1091
+ "description": "Disabled TLS certificate verification (verify=False)",
1092
+ "severity": "Low",
1093
+ "category": "transport",
1094
+ "cluster": "cluster-transport-security",
1095
+ "file_path": "harness/validate_v0_9_2_diff_and_monorepo.py",
1096
+ "line_number": 60,
1097
+ "matched_text": "verify = False",
1098
+ "snippet": " def authenticate_user(token):\n+ # TODO: bypass auth check for debugging\n+ verify = False\n return True\n\"\"\"",
1099
+ "is_test": true,
1100
+ "is_canary": true,
1101
+ "rule_precision": 0.9,
1102
+ "target": {
1103
+ "file_path": "harness/validate_v0_9_2_diff_and_monorepo.py",
1104
+ "start_line": 60,
1105
+ "end_line": 60
1106
+ },
1107
+ "confidence_score": 59,
1108
+ "confidence_band": "Medium Confidence",
1109
+ "confidence_factors": {
1110
+ "evidence_quality": 31,
1111
+ "reproduction_success": 0,
1112
+ "independent_confirmations": 8,
1113
+ "environmental_clarity": 5,
1114
+ "manual_review_status": 0,
1115
+ "memory_boost": 15,
1116
+ "test_exemption": false,
1117
+ "test_deduction": 0,
1118
+ "total_score": 59,
1119
+ "classification_band": "Medium Confidence"
1120
+ }
1121
+ },
1122
+ {
1123
+ "finding_id": "TG-DIFF-001-00b3b8ca",
1124
+ "rule_id": "TG-DIFF-001",
1125
+ "title": "Accidental Security Check Bypass in Patch Additions",
1126
+ "description": "Disabled TLS certificate verification (verify=False)",
1127
+ "severity": "Low",
1128
+ "category": "transport",
1129
+ "cluster": "cluster-transport-security",
1130
+ "file_path": "harness/validate_v0_9_2_diff_and_monorepo.py",
1131
+ "line_number": 67,
1132
+ "matched_text": "verify=False",
1133
+ "snippet": " rule_ids = [v[\"rule_id\"] for v in res_bypass[\"violations\"]]\n assert \"TG-DIFF-001\" in rule_ids, \"TG-DIFF-001 bypass not caught\"\n print(f\" [PASS] TG-DIFF-001: Caught bypass comments and verify=False ({res_bypass['total_violations']} violations)\")\n\n mock_key = \"sk\" + \"_live_\" + \"99887766554433221100aabbccdd\"",
1134
+ "is_test": true,
1135
+ "is_canary": true,
1136
+ "rule_precision": 0.9,
1137
+ "target": {
1138
+ "file_path": "harness/validate_v0_9_2_diff_and_monorepo.py",
1139
+ "start_line": 67,
1140
+ "end_line": 67
1141
+ },
1142
+ "confidence_score": 59,
1143
+ "confidence_band": "Medium Confidence",
1144
+ "confidence_factors": {
1145
+ "evidence_quality": 31,
1146
+ "reproduction_success": 0,
1147
+ "independent_confirmations": 8,
1148
+ "environmental_clarity": 5,
1149
+ "manual_review_status": 0,
1150
+ "memory_boost": 15,
1151
+ "test_exemption": false,
1152
+ "test_deduction": 0,
1153
+ "total_score": 59,
1154
+ "classification_band": "Medium Confidence"
1155
+ }
1156
+ },
1157
+ {
1158
+ "finding_id": "TG-DIFF-001-f209dec6",
1159
+ "rule_id": "TG-DIFF-001",
1160
+ "title": "Accidental Security Check Bypass in Patch Additions",
1161
+ "description": "Disabled Go TLS certificate verification (InsecureSkipVerify: true)",
1162
+ "severity": "Low",
1163
+ "category": "transport",
1164
+ "cluster": "cluster-transport-security",
1165
+ "file_path": "harness/validate_v1_3_0_polyglot.py",
1166
+ "line_number": 16,
1167
+ "matched_text": "InsecureSkipVerify: true",
1168
+ "snippet": " - File extension census fallback (no manifest)\n2. Polyglot Diff Guard bypass detection across:\n - Go (InsecureSkipVerify: true)\n - Java (csrf().disable())\n - C# ([AllowAnonymous])",
1169
+ "is_test": true,
1170
+ "is_canary": true,
1171
+ "rule_precision": 0.9,
1172
+ "target": {
1173
+ "file_path": "harness/validate_v1_3_0_polyglot.py",
1174
+ "start_line": 16,
1175
+ "end_line": 16
1176
+ },
1177
+ "confidence_score": 59,
1178
+ "confidence_band": "Medium Confidence",
1179
+ "confidence_factors": {
1180
+ "evidence_quality": 31,
1181
+ "reproduction_success": 0,
1182
+ "independent_confirmations": 8,
1183
+ "environmental_clarity": 5,
1184
+ "manual_review_status": 0,
1185
+ "memory_boost": 15,
1186
+ "test_exemption": false,
1187
+ "test_deduction": 0,
1188
+ "total_score": 59,
1189
+ "classification_band": "Medium Confidence"
1190
+ }
1191
+ },
1192
+ {
1193
+ "finding_id": "TG-DIFF-001-d9adecdb",
1194
+ "rule_id": "TG-DIFF-001",
1195
+ "title": "Accidental Security Check Bypass in Patch Additions",
1196
+ "description": "Disabled Go TLS certificate verification (InsecureSkipVerify: true)",
1197
+ "severity": "Low",
1198
+ "category": "transport",
1199
+ "cluster": "cluster-transport-security",
1200
+ "file_path": "harness/validate_v1_3_0_polyglot.py",
1201
+ "line_number": 182,
1202
+ "matched_text": "InsecureSkipVerify: true",
1203
+ "snippet": "+++ b/client.go\n@@ -10,3 +10,4 @@\n+\ttr := &http.Transport{TLSClientConfig: &tls.Config{InsecureSkipVerify: true}}\n\"\"\"\n viol_go = diff_guard.check_diff_content(diff_go, \"client.go\")",
1204
+ "is_test": true,
1205
+ "is_canary": true,
1206
+ "rule_precision": 0.9,
1207
+ "target": {
1208
+ "file_path": "harness/validate_v1_3_0_polyglot.py",
1209
+ "start_line": 182,
1210
+ "end_line": 182
1211
+ },
1212
+ "confidence_score": 59,
1213
+ "confidence_band": "Medium Confidence",
1214
+ "confidence_factors": {
1215
+ "evidence_quality": 31,
1216
+ "reproduction_success": 0,
1217
+ "independent_confirmations": 8,
1218
+ "environmental_clarity": 5,
1219
+ "manual_review_status": 0,
1220
+ "memory_boost": 15,
1221
+ "test_exemption": false,
1222
+ "test_deduction": 0,
1223
+ "total_score": 59,
1224
+ "classification_band": "Medium Confidence"
1225
+ }
1226
+ },
1227
+ {
1228
+ "finding_id": "TG-DIFF-001-ddbf5cf0",
1229
+ "rule_id": "TG-DIFF-001",
1230
+ "title": "Accidental Security Check Bypass in Patch Additions",
1231
+ "description": "Disabled PHP curl SSL verification",
1232
+ "severity": "Low",
1233
+ "category": "transport",
1234
+ "cluster": "cluster-transport-security",
1235
+ "file_path": "harness/validate_v1_3_0_polyglot.py",
1236
+ "line_number": 19,
1237
+ "matched_text": "CURLOPT_SSL_VERIFYPEER => false",
1238
+ "snippet": " - Java (csrf().disable())\n - C# ([AllowAnonymous])\n - PHP (CURLOPT_SSL_VERIFYPEER => false)\n - Rust (unsafe { ... })\n3. Polyglot Tenant Scoping Patterns across GORM, LINQ, and Prisma",
1239
+ "is_test": true,
1240
+ "is_canary": true,
1241
+ "rule_precision": 0.9,
1242
+ "target": {
1243
+ "file_path": "harness/validate_v1_3_0_polyglot.py",
1244
+ "start_line": 19,
1245
+ "end_line": 19
1246
+ },
1247
+ "confidence_score": 59,
1248
+ "confidence_band": "Medium Confidence",
1249
+ "confidence_factors": {
1250
+ "evidence_quality": 31,
1251
+ "reproduction_success": 0,
1252
+ "independent_confirmations": 8,
1253
+ "environmental_clarity": 5,
1254
+ "manual_review_status": 0,
1255
+ "memory_boost": 15,
1256
+ "test_exemption": false,
1257
+ "test_deduction": 0,
1258
+ "total_score": 59,
1259
+ "classification_band": "Medium Confidence"
1260
+ }
1261
+ },
1262
+ {
1263
+ "finding_id": "TG-DIFF-001-2b3eb6b7",
1264
+ "rule_id": "TG-DIFF-001",
1265
+ "title": "Accidental Security Check Bypass in Patch Additions",
1266
+ "description": "Disabled PHP curl SSL verification",
1267
+ "severity": "Low",
1268
+ "category": "transport",
1269
+ "cluster": "cluster-transport-security",
1270
+ "file_path": "harness/validate_v1_3_0_polyglot.py",
1271
+ "line_number": 215,
1272
+ "matched_text": "CURLOPT_SSL_VERIFYPEER, false",
1273
+ "snippet": "+++ b/api.php\n@@ -5,3 +5,4 @@\n+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\"\"\"\n viol_php = diff_guard.check_diff_content(diff_php, \"api.php\")",
1274
+ "is_test": true,
1275
+ "is_canary": true,
1276
+ "rule_precision": 0.9,
1277
+ "target": {
1278
+ "file_path": "harness/validate_v1_3_0_polyglot.py",
1279
+ "start_line": 215,
1280
+ "end_line": 215
1281
+ },
1282
+ "confidence_score": 59,
1283
+ "confidence_band": "Medium Confidence",
1284
+ "confidence_factors": {
1285
+ "evidence_quality": 31,
1286
+ "reproduction_success": 0,
1287
+ "independent_confirmations": 8,
1288
+ "environmental_clarity": 5,
1289
+ "manual_review_status": 0,
1290
+ "memory_boost": 15,
1291
+ "test_exemption": false,
1292
+ "test_deduction": 0,
1293
+ "total_score": 59,
1294
+ "classification_band": "Medium Confidence"
1295
+ }
1296
+ },
1297
+ {
1298
+ "finding_id": "TG-INPUT-005-7f81ea7f",
1299
+ "rule_id": "TG-INPUT-005",
1300
+ "title": "Unsafe Template Rendering & Disabled Autoescaping",
1301
+ "description": "Flask render_template_string rendering untrusted input",
1302
+ "severity": "Low",
1303
+ "category": "injection",
1304
+ "cluster": "cluster-injection",
1305
+ "file_path": "harness/validate_qa_v0_6_0.py",
1306
+ "line_number": 177,
1307
+ "matched_text": "render_template_string(",
1308
+ "snippet": " \"flask-app\": {\n \"vulnerable\": {\n \"app.py\": 'from flask import Flask, request, render_template_string\\nimport os\\n\\napp = Flask(__name__)\\n\\n@app.route(\"/greet\")\\ndef greet():\\n name = request.args.get(\"name\", \"Guest\")\\n # SSTI: Unescaped string formatting in template\\n return render_template_string(f\"Hello {name}\")\\n\\n@app.route(\"/upload\", methods=[\"POST\"])\\ndef upload():\\n f = request.files[\"file\"]\\n # Path Traversal in filename\\n f.save(os.path.join(\"/var/uploads\", f.filename))\\n return \"Saved\"\\n'\n },\n \"hardened\": {",
1309
+ "is_test": true,
1310
+ "is_canary": true,
1311
+ "rule_precision": 0.75,
1312
+ "target": {
1313
+ "file_path": "harness/validate_qa_v0_6_0.py",
1314
+ "start_line": 177,
1315
+ "end_line": 177
1316
+ },
1317
+ "confidence_score": 57,
1318
+ "confidence_band": "Medium Confidence",
1319
+ "confidence_factors": {
1320
+ "evidence_quality": 26,
1321
+ "reproduction_success": 0,
1322
+ "independent_confirmations": 11,
1323
+ "environmental_clarity": 5,
1324
+ "manual_review_status": 0,
1325
+ "memory_boost": 15,
1326
+ "test_exemption": false,
1327
+ "test_deduction": 0,
1328
+ "total_score": 57,
1329
+ "classification_band": "Medium Confidence"
1330
+ }
1331
+ },
1332
+ {
1333
+ "finding_id": "TG-INPUT-005-d5aaebe0",
1334
+ "rule_id": "TG-INPUT-005",
1335
+ "title": "Unsafe Template Rendering & Disabled Autoescaping",
1336
+ "description": "Flask render_template_string rendering untrusted input",
1337
+ "severity": "Low",
1338
+ "category": "injection",
1339
+ "cluster": "cluster-injection",
1340
+ "file_path": "harness/validate_qa_v0_6_0.py",
1341
+ "line_number": 190,
1342
+ "matched_text": "render_template_string(",
1343
+ "snippet": " \"confidence_band\": \"Confirmed\",\n \"target\": {\"file_path\": \"app.py\", \"line_start\": 10, \"line_end\": 10},\n \"evidence\": {\"code_snippet\": 'return render_template_string(f\"Hello {name}\")'},\n \"what_is_wrong\": \"User input formatted directly into template string.\",\n \"what_should_change\": \"Render static template file with contextual autoescaping.\",",
1344
+ "is_test": true,
1345
+ "is_canary": true,
1346
+ "rule_precision": 0.75,
1347
+ "target": {
1348
+ "file_path": "harness/validate_qa_v0_6_0.py",
1349
+ "start_line": 190,
1350
+ "end_line": 190
1351
+ },
1352
+ "confidence_score": 57,
1353
+ "confidence_band": "Medium Confidence",
1354
+ "confidence_factors": {
1355
+ "evidence_quality": 26,
1356
+ "reproduction_success": 0,
1357
+ "independent_confirmations": 11,
1358
+ "environmental_clarity": 5,
1359
+ "manual_review_status": 0,
1360
+ "memory_boost": 15,
1361
+ "test_exemption": false,
1362
+ "test_deduction": 0,
1363
+ "total_score": 57,
1364
+ "classification_band": "Medium Confidence"
1365
+ }
1366
+ },
1367
+ {
1368
+ "finding_id": "TG-INPUT-005-e0ffb03b",
1369
+ "rule_id": "TG-INPUT-005",
1370
+ "title": "Unsafe Template Rendering & Disabled Autoescaping",
1371
+ "description": "Flask render_template_string rendering untrusted input",
1372
+ "severity": "Low",
1373
+ "category": "injection",
1374
+ "cluster": "cluster-injection",
1375
+ "file_path": "harness/validate_qa_v0_6_0.py",
1376
+ "line_number": 193,
1377
+ "matched_text": "render_template_string(",
1378
+ "snippet": " \"what_is_wrong\": \"User input formatted directly into template string.\",\n \"what_should_change\": \"Render static template file with contextual autoescaping.\",\n \"proposed_diff\": \"--- a/app.py\\n+++ b/app.py\\n@@ -10,1 +10,1 @@\\n-return render_template_string(f\\\"Hello {name}\\\")\\n+return render_template(\\\"greet.html\\\", name=name)\\n\",\n \"verification_steps\": \"Send name={{7*7}} and verify output contains literal {{7*7}} instead of 49.\",\n },",
1379
+ "is_test": true,
1380
+ "is_canary": true,
1381
+ "rule_precision": 0.75,
1382
+ "target": {
1383
+ "file_path": "harness/validate_qa_v0_6_0.py",
1384
+ "start_line": 193,
1385
+ "end_line": 193
1386
+ },
1387
+ "confidence_score": 57,
1388
+ "confidence_band": "Medium Confidence",
1389
+ "confidence_factors": {
1390
+ "evidence_quality": 26,
1391
+ "reproduction_success": 0,
1392
+ "independent_confirmations": 11,
1393
+ "environmental_clarity": 5,
1394
+ "manual_review_status": 0,
1395
+ "memory_boost": 15,
1396
+ "test_exemption": false,
1397
+ "test_deduction": 0,
1398
+ "total_score": 57,
1399
+ "classification_band": "Medium Confidence"
1400
+ }
1401
+ },
1402
+ {
1403
+ "finding_id": "TG-PLATFORM-003-153d982f",
1404
+ "rule_id": "TG-PLATFORM-003",
1405
+ "title": "Production Stack Trace Exposure",
1406
+ "description": "Django DEBUG mode enabled in configuration",
1407
+ "severity": "Low",
1408
+ "category": "platform",
1409
+ "cluster": "cluster-platform",
1410
+ "file_path": "harness/validate_qa_v0_6_0.py",
1411
+ "line_number": 64,
1412
+ "matched_text": "DEBUG = True",
1413
+ "snippet": " \"tiny-repo\": {\n \"vulnerable\": {\n \"app.py\": 'DEBUG = True\\nSECRET_KEY = \"sk_live_1234567890\"\\n\\ndef index():\\n return \"Welcome\"\\n'\n },\n \"hardened\": {",
1414
+ "is_test": true,
1415
+ "is_canary": true,
1416
+ "rule_precision": 0.75,
1417
+ "target": {
1418
+ "file_path": "harness/validate_qa_v0_6_0.py",
1419
+ "start_line": 64,
1420
+ "end_line": 64
1421
+ },
1422
+ "confidence_score": 57,
1423
+ "confidence_band": "Medium Confidence",
1424
+ "confidence_factors": {
1425
+ "evidence_quality": 26,
1426
+ "reproduction_success": 0,
1427
+ "independent_confirmations": 11,
1428
+ "environmental_clarity": 5,
1429
+ "manual_review_status": 0,
1430
+ "memory_boost": 15,
1431
+ "test_exemption": false,
1432
+ "test_deduction": 0,
1433
+ "total_score": 57,
1434
+ "classification_band": "Medium Confidence"
1435
+ }
1436
+ },
1437
+ {
1438
+ "finding_id": "TG-PLATFORM-003-21644311",
1439
+ "rule_id": "TG-PLATFORM-003",
1440
+ "title": "Production Stack Trace Exposure",
1441
+ "description": "Django DEBUG mode enabled in configuration",
1442
+ "severity": "Low",
1443
+ "category": "platform",
1444
+ "cluster": "cluster-platform",
1445
+ "file_path": "harness/validate_qa_v0_6_0.py",
1446
+ "line_number": 77,
1447
+ "matched_text": "DEBUG = True",
1448
+ "snippet": " \"confidence_band\": \"Confirmed\",\n \"target\": {\"file_path\": \"app.py\", \"line_start\": 1, \"line_end\": 1},\n \"evidence\": {\"code_snippet\": \"DEBUG = True\"},\n \"what_is_wrong\": \"DEBUG is statically enabled.\",\n \"what_should_change\": \"Load DEBUG from environment variables.\",",
1449
+ "is_test": true,
1450
+ "is_canary": true,
1451
+ "rule_precision": 0.75,
1452
+ "target": {
1453
+ "file_path": "harness/validate_qa_v0_6_0.py",
1454
+ "start_line": 77,
1455
+ "end_line": 77
1456
+ },
1457
+ "confidence_score": 57,
1458
+ "confidence_band": "Medium Confidence",
1459
+ "confidence_factors": {
1460
+ "evidence_quality": 26,
1461
+ "reproduction_success": 0,
1462
+ "independent_confirmations": 11,
1463
+ "environmental_clarity": 5,
1464
+ "manual_review_status": 0,
1465
+ "memory_boost": 15,
1466
+ "test_exemption": false,
1467
+ "test_deduction": 0,
1468
+ "total_score": 57,
1469
+ "classification_band": "Medium Confidence"
1470
+ }
1471
+ },
1472
+ {
1473
+ "finding_id": "TG-PLATFORM-003-21b8a588",
1474
+ "rule_id": "TG-PLATFORM-003",
1475
+ "title": "Production Stack Trace Exposure",
1476
+ "description": "Django DEBUG mode enabled in configuration",
1477
+ "severity": "Low",
1478
+ "category": "platform",
1479
+ "cluster": "cluster-platform",
1480
+ "file_path": "harness/validate_qa_v0_6_0.py",
1481
+ "line_number": 80,
1482
+ "matched_text": "DEBUG = True",
1483
+ "snippet": " \"what_is_wrong\": \"DEBUG is statically enabled.\",\n \"what_should_change\": \"Load DEBUG from environment variables.\",\n \"proposed_diff\": \"--- a/app.py\\n+++ b/app.py\\n@@ -1,1 +1,2 @@\\n-DEBUG = True\\n+import os\\n+DEBUG = os.getenv('DEBUG', 'False').lower() == 'true'\\n\",\n \"verification_steps\": \"Check DEBUG setting resolution in production.\",\n },",
1484
+ "is_test": true,
1485
+ "is_canary": true,
1486
+ "rule_precision": 0.75,
1487
+ "target": {
1488
+ "file_path": "harness/validate_qa_v0_6_0.py",
1489
+ "start_line": 80,
1490
+ "end_line": 80
1491
+ },
1492
+ "confidence_score": 57,
1493
+ "confidence_band": "Medium Confidence",
1494
+ "confidence_factors": {
1495
+ "evidence_quality": 26,
1496
+ "reproduction_success": 0,
1497
+ "independent_confirmations": 11,
1498
+ "environmental_clarity": 5,
1499
+ "manual_review_status": 0,
1500
+ "memory_boost": 15,
1501
+ "test_exemption": false,
1502
+ "test_deduction": 0,
1503
+ "total_score": 57,
1504
+ "classification_band": "Medium Confidence"
1505
+ }
1506
+ },
1507
+ {
1508
+ "finding_id": "TG-DB-004-e33fd263",
1509
+ "rule_id": "TG-DB-004",
1510
+ "title": "Missing Tenant Query Isolation in Multi-Tenant Models",
1511
+ "description": "Django ORM .get(id=...) query lacking explicit tenant scope filter",
1512
+ "severity": "Low",
1513
+ "category": "database",
1514
+ "cluster": "cluster-tenant-isolation",
1515
+ "file_path": "harness/validate_v0_6_3_hardening.py",
1516
+ "line_number": 119,
1517
+ "matched_text": ".objects.get(id=inv_id)",
1518
+ "snippet": " snippet_v1 = \"\"\"def process_invoice(req, inv_id):\n # Retrieve invoice\n inv = Invoice.objects.get(id=inv_id)\n return inv\n\"\"\"",
1519
+ "is_test": true,
1520
+ "is_canary": true,
1521
+ "rule_precision": 0.55,
1522
+ "target": {
1523
+ "file_path": "harness/validate_v0_6_3_hardening.py",
1524
+ "start_line": 119,
1525
+ "end_line": 119
1526
+ },
1527
+ "confidence_score": 57,
1528
+ "confidence_band": "Medium Confidence",
1529
+ "confidence_factors": {
1530
+ "evidence_quality": 19,
1531
+ "reproduction_success": 0,
1532
+ "independent_confirmations": 8,
1533
+ "environmental_clarity": 5,
1534
+ "manual_review_status": 0,
1535
+ "memory_boost": 25,
1536
+ "test_exemption": false,
1537
+ "test_deduction": 0,
1538
+ "total_score": 57,
1539
+ "classification_band": "Medium Confidence"
1540
+ }
1541
+ },
1542
+ {
1543
+ "finding_id": "TG-DB-004-ff3f7499",
1544
+ "rule_id": "TG-DB-004",
1545
+ "title": "Missing Tenant Query Isolation in Multi-Tenant Models",
1546
+ "description": "Django ORM .get(id=...) query lacking explicit tenant scope filter",
1547
+ "severity": "Low",
1548
+ "category": "database",
1549
+ "cluster": "cluster-tenant-isolation",
1550
+ "file_path": "harness/validate_v0_6_3_hardening.py",
1551
+ "line_number": 127,
1552
+ "matched_text": ".objects.get(id=inv_id)",
1553
+ "snippet": " snippet_v2 = \"\"\"def process_invoice(req, inv_id):\n # Retrieve invoice\n inv = Invoice.objects.get(id=inv_id)\n return inv\n\"\"\"",
1554
+ "is_test": true,
1555
+ "is_canary": true,
1556
+ "rule_precision": 0.55,
1557
+ "target": {
1558
+ "file_path": "harness/validate_v0_6_3_hardening.py",
1559
+ "start_line": 127,
1560
+ "end_line": 127
1561
+ },
1562
+ "confidence_score": 57,
1563
+ "confidence_band": "Medium Confidence",
1564
+ "confidence_factors": {
1565
+ "evidence_quality": 19,
1566
+ "reproduction_success": 0,
1567
+ "independent_confirmations": 8,
1568
+ "environmental_clarity": 5,
1569
+ "manual_review_status": 0,
1570
+ "memory_boost": 25,
1571
+ "test_exemption": false,
1572
+ "test_deduction": 0,
1573
+ "total_score": 57,
1574
+ "classification_band": "Medium Confidence"
1575
+ }
1576
+ },
1577
+ {
1578
+ "finding_id": "TG-DB-004-a7c00c05",
1579
+ "rule_id": "TG-DB-004",
1580
+ "title": "Missing Tenant Query Isolation in Multi-Tenant Models",
1581
+ "description": "Django ORM .get(id=...) query lacking explicit tenant scope filter",
1582
+ "severity": "Low",
1583
+ "category": "database",
1584
+ "cluster": "cluster-tenant-isolation",
1585
+ "file_path": "harness/validate_v0_6_3_hardening.py",
1586
+ "line_number": 135,
1587
+ "matched_text": ".objects.get(id=inv_id)",
1588
+ "snippet": " snippet_v3 = \"\"\"def process_invoice(req, inv_id):\n # Different comment text here\n inv = Invoice.objects.get(id=inv_id) \n return inv\n\"\"\"",
1589
+ "is_test": true,
1590
+ "is_canary": true,
1591
+ "rule_precision": 0.55,
1592
+ "target": {
1593
+ "file_path": "harness/validate_v0_6_3_hardening.py",
1594
+ "start_line": 135,
1595
+ "end_line": 135
1596
+ },
1597
+ "confidence_score": 57,
1598
+ "confidence_band": "Medium Confidence",
1599
+ "confidence_factors": {
1600
+ "evidence_quality": 19,
1601
+ "reproduction_success": 0,
1602
+ "independent_confirmations": 8,
1603
+ "environmental_clarity": 5,
1604
+ "manual_review_status": 0,
1605
+ "memory_boost": 25,
1606
+ "test_exemption": false,
1607
+ "test_deduction": 0,
1608
+ "total_score": 57,
1609
+ "classification_band": "Medium Confidence"
1610
+ }
1611
+ },
1612
+ {
1613
+ "finding_id": "TG-DB-004-8b6c1463",
1614
+ "rule_id": "TG-DB-004",
1615
+ "title": "Missing Tenant Query Isolation in Multi-Tenant Models",
1616
+ "description": "Django ORM .get(id=...) query lacking explicit tenant scope filter",
1617
+ "severity": "Low",
1618
+ "category": "database",
1619
+ "cluster": "cluster-tenant-isolation",
1620
+ "file_path": "harness/validate_v0_6_3_hardening.py",
1621
+ "line_number": 171,
1622
+ "matched_text": ".objects.get(id=inv_id)",
1623
+ "snippet": " \"confidence_band\": \"Confirmed\",\n \"target\": {\"file_path\": \"apps/billing/views.py\", \"line_start\": 12, \"line_end\": 14},\n \"evidence\": {\"code_snippet\": \"Invoice.objects.get(id=inv_id)\"},\n \"cluster_id\": \"cluster-tenant-isolation\",\n \"recheck_status\": \"Confirmed Fixed\",",
1624
+ "is_test": true,
1625
+ "is_canary": true,
1626
+ "rule_precision": 0.55,
1627
+ "target": {
1628
+ "file_path": "harness/validate_v0_6_3_hardening.py",
1629
+ "start_line": 171,
1630
+ "end_line": 171
1631
+ },
1632
+ "confidence_score": 57,
1633
+ "confidence_band": "Medium Confidence",
1634
+ "confidence_factors": {
1635
+ "evidence_quality": 19,
1636
+ "reproduction_success": 0,
1637
+ "independent_confirmations": 8,
1638
+ "environmental_clarity": 5,
1639
+ "manual_review_status": 0,
1640
+ "memory_boost": 25,
1641
+ "test_exemption": false,
1642
+ "test_deduction": 0,
1643
+ "total_score": 57,
1644
+ "classification_band": "Medium Confidence"
1645
+ }
1646
+ },
1647
+ {
1648
+ "finding_id": "TG-AUTH-004-33adb2d9",
1649
+ "rule_id": "TG-AUTH-004",
1650
+ "title": "Insecure Session Cookie Configuration",
1651
+ "description": "Session cookie secure flag disabled in Django settings",
1652
+ "severity": "Low",
1653
+ "category": "auth",
1654
+ "cluster": "cluster-auth-bypass",
1655
+ "file_path": "harness/evaluate_portfolio_polyglot.py",
1656
+ "line_number": 107,
1657
+ "matched_text": "SESSION_COOKIE_SECURE = False",
1658
+ "snippet": " \"expected_orm\": \"SQLAlchemy\",\n \"ecosystem\": \"Python\",\n \"test_bypass\": (\"python\", \"SESSION_COOKIE_SECURE = False\", \"auth_bypass\"),\n \"test_tenant\": (\"python\", \"tenant_id\"),\n },",
1659
+ "is_test": true,
1660
+ "is_canary": true,
1661
+ "rule_precision": 0.8,
1662
+ "target": {
1663
+ "file_path": "harness/evaluate_portfolio_polyglot.py",
1664
+ "start_line": 107,
1665
+ "end_line": 107
1666
+ },
1667
+ "confidence_score": 56,
1668
+ "confidence_band": "Medium Confidence",
1669
+ "confidence_factors": {
1670
+ "evidence_quality": 28,
1671
+ "reproduction_success": 0,
1672
+ "independent_confirmations": 8,
1673
+ "environmental_clarity": 5,
1674
+ "manual_review_status": 0,
1675
+ "memory_boost": 15,
1676
+ "test_exemption": false,
1677
+ "test_deduction": 0,
1678
+ "total_score": 56,
1679
+ "classification_band": "Medium Confidence"
1680
+ }
1681
+ },
1682
+ {
1683
+ "finding_id": "TG-AUTH-004-56b1c90f",
1684
+ "rule_id": "TG-AUTH-004",
1685
+ "title": "Insecure Session Cookie Configuration",
1686
+ "description": "Decorator disabling route-level authentication or CSRF protection",
1687
+ "severity": "Low",
1688
+ "category": "auth",
1689
+ "cluster": "cluster-auth-bypass",
1690
+ "file_path": "harness/evaluate_portfolio_polyglot.py",
1691
+ "line_number": 96,
1692
+ "matched_text": "@csrf_exempt",
1693
+ "snippet": " \"expected_orm\": \"Django ORM\",\n \"ecosystem\": \"Python\",\n \"test_bypass\": (\"python\", \"@csrf_exempt\", \"auth_bypass\"),\n \"test_tenant\": (\"python\", \"tenant\"),\n },",
1694
+ "is_test": true,
1695
+ "is_canary": true,
1696
+ "rule_precision": 0.8,
1697
+ "target": {
1698
+ "file_path": "harness/evaluate_portfolio_polyglot.py",
1699
+ "start_line": 96,
1700
+ "end_line": 96
1701
+ },
1702
+ "confidence_score": 56,
1703
+ "confidence_band": "Medium Confidence",
1704
+ "confidence_factors": {
1705
+ "evidence_quality": 28,
1706
+ "reproduction_success": 0,
1707
+ "independent_confirmations": 8,
1708
+ "environmental_clarity": 5,
1709
+ "manual_review_status": 0,
1710
+ "memory_boost": 15,
1711
+ "test_exemption": false,
1712
+ "test_deduction": 0,
1713
+ "total_score": 56,
1714
+ "classification_band": "Medium Confidence"
1715
+ }
1716
+ },
1717
+ {
1718
+ "finding_id": "TG-AUTH-004-4a33f7e7",
1719
+ "rule_id": "TG-AUTH-004",
1720
+ "title": "Insecure Session Cookie Configuration",
1721
+ "description": "Attribute disabling ASP.NET authentication",
1722
+ "severity": "Low",
1723
+ "category": "auth",
1724
+ "cluster": "cluster-auth-bypass",
1725
+ "file_path": "harness/evaluate_portfolio_polyglot.py",
1726
+ "line_number": 239,
1727
+ "matched_text": "[AllowAnonymous]",
1728
+ "snippet": " \"expected_orm\": \"Entity Framework Core\",\n \"ecosystem\": \"C#\",\n \"test_bypass\": (\"csharp\", \"[AllowAnonymous]\", \"auth_bypass\"),\n \"test_tenant\": (\"csharp\", \".Where(x => x.TenantId == tenantId)\"),\n },",
1729
+ "is_test": true,
1730
+ "is_canary": true,
1731
+ "rule_precision": 0.8,
1732
+ "target": {
1733
+ "file_path": "harness/evaluate_portfolio_polyglot.py",
1734
+ "start_line": 239,
1735
+ "end_line": 239
1736
+ },
1737
+ "confidence_score": 56,
1738
+ "confidence_band": "Medium Confidence",
1739
+ "confidence_factors": {
1740
+ "evidence_quality": 28,
1741
+ "reproduction_success": 0,
1742
+ "independent_confirmations": 8,
1743
+ "environmental_clarity": 5,
1744
+ "manual_review_status": 0,
1745
+ "memory_boost": 15,
1746
+ "test_exemption": false,
1747
+ "test_deduction": 0,
1748
+ "total_score": 56,
1749
+ "classification_band": "Medium Confidence"
1750
+ }
1751
+ },
1752
+ {
1753
+ "finding_id": "TG-AUTH-004-95eb27cd",
1754
+ "rule_id": "TG-AUTH-004",
1755
+ "title": "Insecure Session Cookie Configuration",
1756
+ "description": "Attribute disabling ASP.NET authentication",
1757
+ "severity": "Low",
1758
+ "category": "auth",
1759
+ "cluster": "cluster-auth-bypass",
1760
+ "file_path": "harness/evaluate_portfolio_polyglot.py",
1761
+ "line_number": 876,
1762
+ "matched_text": "[AllowAnonymous]",
1763
+ "snippet": "| **4. 5-Factor Confidence Scorer** | 100% | Applied objective $0\u2013100$ scoring with memory modifiers and false positive deductions. |\n| **5. Adaptive Security Memory Engine** | 100% | Isolated memory workspace successfully recorded events and verified context cards $\\le 2,000$ tokens. |\n| **6. Polyglot Diff Guard** | 100% | Intercepted Go `InsecureSkipVerify`, Java `csrf().disable()`, C# `[AllowAnonymous]`, PHP `CURLOPT_SSL_VERIFYPEER`, Rust `unsafe {`, and tenant stripping. |\n| **7. Governed Remediation (Ponytail)** | 100% | Enforced patch churn limits ($\\le 35$ additions, $\\le 25$ deletions) and pre-apply snapshot generation. |\n| **8. Visual HTML Dashboard** | 100% | Generated self-contained, air-gapped dark-mode visual report with SVG circular gauge. |",
1764
+ "is_test": true,
1765
+ "is_canary": true,
1766
+ "rule_precision": 0.8,
1767
+ "target": {
1768
+ "file_path": "harness/evaluate_portfolio_polyglot.py",
1769
+ "start_line": 876,
1770
+ "end_line": 876
1771
+ },
1772
+ "confidence_score": 56,
1773
+ "confidence_band": "Medium Confidence",
1774
+ "confidence_factors": {
1775
+ "evidence_quality": 28,
1776
+ "reproduction_success": 0,
1777
+ "independent_confirmations": 8,
1778
+ "environmental_clarity": 5,
1779
+ "manual_review_status": 0,
1780
+ "memory_boost": 15,
1781
+ "test_exemption": false,
1782
+ "test_deduction": 0,
1783
+ "total_score": 56,
1784
+ "classification_band": "Medium Confidence"
1785
+ }
1786
+ },
1787
+ {
1788
+ "finding_id": "TG-AUTH-004-e838c41c",
1789
+ "rule_id": "TG-AUTH-004",
1790
+ "title": "Insecure Session Cookie Configuration",
1791
+ "description": "Attribute disabling ASP.NET authentication",
1792
+ "severity": "Low",
1793
+ "category": "auth",
1794
+ "cluster": "cluster-auth-bypass",
1795
+ "file_path": "harness/validate_v1_3_0_polyglot.py",
1796
+ "line_number": 18,
1797
+ "matched_text": "[AllowAnonymous]",
1798
+ "snippet": " - Go (InsecureSkipVerify: true)\n - Java (csrf().disable())\n - C# ([AllowAnonymous])\n - PHP (CURLOPT_SSL_VERIFYPEER => false)\n - Rust (unsafe { ... })",
1799
+ "is_test": true,
1800
+ "is_canary": true,
1801
+ "rule_precision": 0.8,
1802
+ "target": {
1803
+ "file_path": "harness/validate_v1_3_0_polyglot.py",
1804
+ "start_line": 18,
1805
+ "end_line": 18
1806
+ },
1807
+ "confidence_score": 56,
1808
+ "confidence_band": "Medium Confidence",
1809
+ "confidence_factors": {
1810
+ "evidence_quality": 28,
1811
+ "reproduction_success": 0,
1812
+ "independent_confirmations": 8,
1813
+ "environmental_clarity": 5,
1814
+ "manual_review_status": 0,
1815
+ "memory_boost": 15,
1816
+ "test_exemption": false,
1817
+ "test_deduction": 0,
1818
+ "total_score": 56,
1819
+ "classification_band": "Medium Confidence"
1820
+ }
1821
+ },
1822
+ {
1823
+ "finding_id": "TG-AUTH-004-5c78d750",
1824
+ "rule_id": "TG-AUTH-004",
1825
+ "title": "Insecure Session Cookie Configuration",
1826
+ "description": "Attribute disabling ASP.NET authentication",
1827
+ "severity": "Low",
1828
+ "category": "auth",
1829
+ "cluster": "cluster-auth-bypass",
1830
+ "file_path": "harness/validate_v1_3_0_polyglot.py",
1831
+ "line_number": 204,
1832
+ "matched_text": "[AllowAnonymous]",
1833
+ "snippet": "+++ b/UsersController.cs\n@@ -15,3 +15,4 @@\n+ [AllowAnonymous]\n+ public IActionResult GetFinancialData() {\n\"\"\"",
1834
+ "is_test": true,
1835
+ "is_canary": true,
1836
+ "rule_precision": 0.8,
1837
+ "target": {
1838
+ "file_path": "harness/validate_v1_3_0_polyglot.py",
1839
+ "start_line": 204,
1840
+ "end_line": 204
1841
+ },
1842
+ "confidence_score": 56,
1843
+ "confidence_band": "Medium Confidence",
1844
+ "confidence_factors": {
1845
+ "evidence_quality": 28,
1846
+ "reproduction_success": 0,
1847
+ "independent_confirmations": 8,
1848
+ "environmental_clarity": 5,
1849
+ "manual_review_status": 0,
1850
+ "memory_boost": 15,
1851
+ "test_exemption": false,
1852
+ "test_deduction": 0,
1853
+ "total_score": 56,
1854
+ "classification_band": "Medium Confidence"
1855
+ }
1856
+ },
1857
+ {
1858
+ "finding_id": "TG-AUTH-004-0d028be7",
1859
+ "rule_id": "TG-AUTH-004",
1860
+ "title": "Insecure Session Cookie Configuration",
1861
+ "description": "Attribute disabling ASP.NET authentication",
1862
+ "severity": "Low",
1863
+ "category": "auth",
1864
+ "cluster": "cluster-auth-bypass",
1865
+ "file_path": "harness/validate_v1_3_0_polyglot.py",
1866
+ "line_number": 208,
1867
+ "matched_text": "[AllowAnonymous]",
1868
+ "snippet": "\"\"\"\n viol_cs = diff_guard.check_diff_content(diff_cs, \"UsersController.cs\")\n assert len(viol_cs) >= 1, \"Failed to catch C# [AllowAnonymous]\"\n print(\" [PASS] Caught C# ASP.NET [AllowAnonymous] bypass\")\n",
1869
+ "is_test": true,
1870
+ "is_canary": true,
1871
+ "rule_precision": 0.8,
1872
+ "target": {
1873
+ "file_path": "harness/validate_v1_3_0_polyglot.py",
1874
+ "start_line": 208,
1875
+ "end_line": 208
1876
+ },
1877
+ "confidence_score": 56,
1878
+ "confidence_band": "Medium Confidence",
1879
+ "confidence_factors": {
1880
+ "evidence_quality": 28,
1881
+ "reproduction_success": 0,
1882
+ "independent_confirmations": 8,
1883
+ "environmental_clarity": 5,
1884
+ "manual_review_status": 0,
1885
+ "memory_boost": 15,
1886
+ "test_exemption": false,
1887
+ "test_deduction": 0,
1888
+ "total_score": 56,
1889
+ "classification_band": "Medium Confidence"
1890
+ }
1891
+ },
1892
+ {
1893
+ "finding_id": "TG-AUTH-004-3ae1d9c1",
1894
+ "rule_id": "TG-AUTH-004",
1895
+ "title": "Insecure Session Cookie Configuration",
1896
+ "description": "Attribute disabling ASP.NET authentication",
1897
+ "severity": "Low",
1898
+ "category": "auth",
1899
+ "cluster": "cluster-auth-bypass",
1900
+ "file_path": "harness/validate_v1_3_0_polyglot.py",
1901
+ "line_number": 209,
1902
+ "matched_text": "[AllowAnonymous]",
1903
+ "snippet": " viol_cs = diff_guard.check_diff_content(diff_cs, \"UsersController.cs\")\n assert len(viol_cs) >= 1, \"Failed to catch C# [AllowAnonymous]\"\n print(\" [PASS] Caught C# ASP.NET [AllowAnonymous] bypass\")\n\n # PHP CURLOPT_SSL_VERIFYPEER bypass",
1904
+ "is_test": true,
1905
+ "is_canary": true,
1906
+ "rule_precision": 0.8,
1907
+ "target": {
1908
+ "file_path": "harness/validate_v1_3_0_polyglot.py",
1909
+ "start_line": 209,
1910
+ "end_line": 209
1911
+ },
1912
+ "confidence_score": 56,
1913
+ "confidence_band": "Medium Confidence",
1914
+ "confidence_factors": {
1915
+ "evidence_quality": 28,
1916
+ "reproduction_success": 0,
1917
+ "independent_confirmations": 8,
1918
+ "environmental_clarity": 5,
1919
+ "manual_review_status": 0,
1920
+ "memory_boost": 15,
1921
+ "test_exemption": false,
1922
+ "test_deduction": 0,
1923
+ "total_score": 56,
1924
+ "classification_band": "Medium Confidence"
1925
+ }
1926
+ },
1927
+ {
1928
+ "finding_id": "TG-AUTH-004-ea07db54",
1929
+ "rule_id": "TG-AUTH-004",
1930
+ "title": "Insecure Session Cookie Configuration",
1931
+ "description": "Spring Security CSRF protection explicitly disabled",
1932
+ "severity": "Low",
1933
+ "category": "auth",
1934
+ "cluster": "cluster-auth-bypass",
1935
+ "file_path": "harness/validate_v1_3_0_polyglot.py",
1936
+ "line_number": 193,
1937
+ "matched_text": ".csrf().disable()",
1938
+ "snippet": "+++ b/SecurityConfig.java\n@@ -20,3 +20,4 @@\n+ http.csrf().disable();\n\"\"\"\n viol_java = diff_guard.check_diff_content(diff_java, \"SecurityConfig.java\")",
1939
+ "is_test": true,
1940
+ "is_canary": true,
1941
+ "rule_precision": 0.8,
1942
+ "target": {
1943
+ "file_path": "harness/validate_v1_3_0_polyglot.py",
1944
+ "start_line": 193,
1945
+ "end_line": 193
1946
+ },
1947
+ "confidence_score": 56,
1948
+ "confidence_band": "Medium Confidence",
1949
+ "confidence_factors": {
1950
+ "evidence_quality": 28,
1951
+ "reproduction_success": 0,
1952
+ "independent_confirmations": 8,
1953
+ "environmental_clarity": 5,
1954
+ "manual_review_status": 0,
1955
+ "memory_boost": 15,
1956
+ "test_exemption": false,
1957
+ "test_deduction": 0,
1958
+ "total_score": 56,
1959
+ "classification_band": "Medium Confidence"
1960
+ }
1961
+ },
1962
+ {
1963
+ "finding_id": "TG-INPUT-005-0d595acd",
1964
+ "rule_id": "TG-INPUT-005",
1965
+ "title": "Unsafe Template Rendering & Disabled Autoescaping",
1966
+ "description": "Flask render_template_string rendering untrusted input",
1967
+ "severity": "Low",
1968
+ "category": "injection",
1969
+ "cluster": "cluster-injection",
1970
+ "file_path": "harness/master_validation.py",
1971
+ "line_number": 314,
1972
+ "matched_text": "render_template_string(",
1973
+ "snippet": " \"severity\": SeverityLevel.HIGH,\n \"path\": \"rules/TG-INPUT-005-unsafe-template-rendering-and-escaping.md\",\n \"vuln_sample\": \"return render_template_string(f'<h1>Hello {name}</h1>')\",\n \"hard_sample\": \"return render_template('hello.html', name=name)\",\n \"remediation\": \"Pass inputs as context variables in autoescaped template files or use Django's format_html() to safely construct HTML wrappers.\",",
1974
+ "is_test": true,
1975
+ "is_canary": true,
1976
+ "rule_precision": 0.75,
1977
+ "target": {
1978
+ "file_path": "harness/master_validation.py",
1979
+ "start_line": 314,
1980
+ "end_line": 314
1981
+ },
1982
+ "confidence_score": 54,
1983
+ "confidence_band": "Medium Confidence",
1984
+ "confidence_factors": {
1985
+ "evidence_quality": 26,
1986
+ "reproduction_success": 0,
1987
+ "independent_confirmations": 8,
1988
+ "environmental_clarity": 5,
1989
+ "manual_review_status": 0,
1990
+ "memory_boost": 15,
1991
+ "test_exemption": false,
1992
+ "test_deduction": 0,
1993
+ "total_score": 54,
1994
+ "classification_band": "Medium Confidence"
1995
+ }
1996
+ },
1997
+ {
1998
+ "finding_id": "TG-INPUT-005-d7ef73f1",
1999
+ "rule_id": "TG-INPUT-005",
2000
+ "title": "Unsafe Template Rendering & Disabled Autoescaping",
2001
+ "description": "Flask render_template_string rendering untrusted input",
2002
+ "severity": "Low",
2003
+ "category": "injection",
2004
+ "cluster": "cluster-injection",
2005
+ "file_path": "harness/validate_e2e.py",
2006
+ "line_number": 457,
2007
+ "matched_text": "render_template_string(",
2008
+ "snippet": " \"\",\n \"- **`TG-AUTH-008` (Untrusted Role/Tenant Header Injection):** Verified detection on client headers (`X-User-Role`, `X-Tenant-ID`) and verified FastAPI/DRF JWT token extraction remediations.\",\n \"- **`TG-INPUT-005` (Unsafe Template Rendering & Disabled Autoescaping):** Verified detection on `mark_safe()`, `| safe`, and `render_template_string()`; verified Jinja2 context variable autoescaping and `format_html()` remediations.\",\n \"- **`TG-INPUT-006` (Path Traversal & Unsafe Upload Storage):** Verified detection on `os.path.join(UPLOAD_DIR, filename)`; verified `secure_filename()` + UUID storage remediations.\",\n \"- **`TG-DB-004` (Missing Tenant Query Isolation):** Verified detection on unscoped primary key queries; verified SQLAlchemy composite tenant filters and DRF ViewSet `get_queryset()` tenant isolation.\",",
2009
+ "is_test": true,
2010
+ "is_canary": true,
2011
+ "rule_precision": 0.75,
2012
+ "target": {
2013
+ "file_path": "harness/validate_e2e.py",
2014
+ "start_line": 457,
2015
+ "end_line": 457
2016
+ },
2017
+ "confidence_score": 54,
2018
+ "confidence_band": "Medium Confidence",
2019
+ "confidence_factors": {
2020
+ "evidence_quality": 26,
2021
+ "reproduction_success": 0,
2022
+ "independent_confirmations": 8,
2023
+ "environmental_clarity": 5,
2024
+ "manual_review_status": 0,
2025
+ "memory_boost": 15,
2026
+ "test_exemption": false,
2027
+ "test_deduction": 0,
2028
+ "total_score": 54,
2029
+ "classification_band": "Medium Confidence"
2030
+ }
2031
+ },
2032
+ {
2033
+ "finding_id": "TG-DB-004-9a2f13c7",
2034
+ "rule_id": "TG-DB-004",
2035
+ "title": "Missing Tenant Query Isolation in Multi-Tenant Models",
2036
+ "description": "Django ORM .get(id=...) query lacking explicit tenant scope filter",
2037
+ "severity": "Low",
2038
+ "category": "database",
2039
+ "cluster": "cluster-tenant-isolation",
2040
+ "file_path": "harness/validate_v0_6_1_scale.py",
2041
+ "line_number": 115,
2042
+ "matched_text": ".objects.get(id=inv_id)",
2043
+ "snippet": " \"severity\": \"High\",\n \"target\": {\"file_path\": \"apps/django_core/billing/views.py\", \"line_start\": 42, \"line_end\": 42},\n \"evidence\": {\"code_snippet\": \"Invoice.objects.get(id=inv_id)\"},\n },\n # FastAPI Microservice",
2044
+ "is_test": true,
2045
+ "is_canary": true,
2046
+ "rule_precision": 0.55,
2047
+ "target": {
2048
+ "file_path": "harness/validate_v0_6_1_scale.py",
2049
+ "start_line": 115,
2050
+ "end_line": 115
2051
+ },
2052
+ "confidence_score": 54,
2053
+ "confidence_band": "Medium Confidence",
2054
+ "confidence_factors": {
2055
+ "evidence_quality": 19,
2056
+ "reproduction_success": 0,
2057
+ "independent_confirmations": 5,
2058
+ "environmental_clarity": 5,
2059
+ "manual_review_status": 0,
2060
+ "memory_boost": 25,
2061
+ "test_exemption": false,
2062
+ "test_deduction": 0,
2063
+ "total_score": 54,
2064
+ "classification_band": "Medium Confidence"
2065
+ }
2066
+ },
2067
+ {
2068
+ "finding_id": "TG-DB-004-a932f5b8",
2069
+ "rule_id": "TG-DB-004",
2070
+ "title": "Missing Tenant Query Isolation in Multi-Tenant Models",
2071
+ "description": "Django ORM .get(id=...) query lacking explicit tenant scope filter",
2072
+ "severity": "Low",
2073
+ "category": "database",
2074
+ "cluster": "cluster-tenant-isolation",
2075
+ "file_path": "harness/validate_v0_6_1_scale.py",
2076
+ "line_number": 193,
2077
+ "matched_text": ".objects.get(id=id)",
2078
+ "snippet": " \"confidence_band\": \"Confirmed\",\n \"target\": {\"file_path\": f\"services/api/module_{i % 15}/views.py\", \"line_start\": 10 + i, \"line_end\": 12 + i},\n \"evidence\": {\"code_snippet\": f\"Model_{i}.objects.get(id=id)\"},\n })\n",
2079
+ "is_test": true,
2080
+ "is_canary": true,
2081
+ "rule_precision": 0.55,
2082
+ "target": {
2083
+ "file_path": "harness/validate_v0_6_1_scale.py",
2084
+ "start_line": 193,
2085
+ "end_line": 193
2086
+ },
2087
+ "confidence_score": 54,
2088
+ "confidence_band": "Medium Confidence",
2089
+ "confidence_factors": {
2090
+ "evidence_quality": 19,
2091
+ "reproduction_success": 0,
2092
+ "independent_confirmations": 5,
2093
+ "environmental_clarity": 5,
2094
+ "manual_review_status": 0,
2095
+ "memory_boost": 25,
2096
+ "test_exemption": false,
2097
+ "test_deduction": 0,
2098
+ "total_score": 54,
2099
+ "classification_band": "Medium Confidence"
2100
+ }
2101
+ },
2102
+ {
2103
+ "finding_id": "TG-DB-004-14a2d74f",
2104
+ "rule_id": "TG-DB-004",
2105
+ "title": "Missing Tenant Query Isolation in Multi-Tenant Models",
2106
+ "description": "Django ORM .get(id=...) query lacking explicit tenant scope filter",
2107
+ "severity": "Low",
2108
+ "category": "database",
2109
+ "cluster": "cluster-tenant-isolation",
2110
+ "file_path": "harness/validate_v1_0_0_memory.py",
2111
+ "line_number": 265,
2112
+ "matched_text": ".objects.get(id=id)",
2113
+ "snippet": "- return Bill.objects.filter(id=id, tenant=tenant)\n+def get_bill(id):\n+ return Bill.objects.get(id=id)\n\"\"\"\n res_reg = diff_guard.audit_diff(regression_diff, check_memory=True, root_dir=test_root)",
2114
+ "is_test": true,
2115
+ "is_canary": true,
2116
+ "rule_precision": 0.55,
2117
+ "target": {
2118
+ "file_path": "harness/validate_v1_0_0_memory.py",
2119
+ "start_line": 265,
2120
+ "end_line": 265
2121
+ },
2122
+ "confidence_score": 54,
2123
+ "confidence_band": "Medium Confidence",
2124
+ "confidence_factors": {
2125
+ "evidence_quality": 19,
2126
+ "reproduction_success": 0,
2127
+ "independent_confirmations": 5,
2128
+ "environmental_clarity": 5,
2129
+ "manual_review_status": 0,
2130
+ "memory_boost": 25,
2131
+ "test_exemption": false,
2132
+ "test_deduction": 0,
2133
+ "total_score": 54,
2134
+ "classification_band": "Medium Confidence"
2135
+ }
2136
+ },
2137
+ {
2138
+ "finding_id": "TG-SUPPLY-004-e52415c0",
2139
+ "rule_id": "TG-SUPPLY-004",
2140
+ "title": "Unpinned CI Action",
2141
+ "description": "GitHub Action referenced by mutable tag instead of immutable commit SHA",
2142
+ "severity": "Low",
2143
+ "category": "supply",
2144
+ "cluster": "cluster-supply-chain",
2145
+ "file_path": "harness/validate_v0_6_2_modern_stacks.py",
2146
+ "line_number": 383,
2147
+ "matched_text": "uses: actions/checkout@v2",
2148
+ "snippet": " runs-on: ubuntu-latest\n steps:\n - uses: actions/checkout@v2\n - run: make test\n\"\"\", encoding=\"utf-8\")",
2149
+ "is_test": true,
2150
+ "is_canary": true,
2151
+ "rule_precision": 0.6,
2152
+ "target": {
2153
+ "file_path": "harness/validate_v0_6_2_modern_stacks.py",
2154
+ "start_line": 383,
2155
+ "end_line": 383
2156
+ },
2157
+ "confidence_score": 52,
2158
+ "confidence_band": "Medium Confidence",
2159
+ "confidence_factors": {
2160
+ "evidence_quality": 21,
2161
+ "reproduction_success": 0,
2162
+ "independent_confirmations": 11,
2163
+ "environmental_clarity": 5,
2164
+ "manual_review_status": 0,
2165
+ "memory_boost": 15,
2166
+ "test_exemption": false,
2167
+ "test_deduction": 0,
2168
+ "total_score": 52,
2169
+ "classification_band": "Medium Confidence"
2170
+ }
2171
+ },
2172
+ {
2173
+ "finding_id": "TG-SUPPLY-004-b9d15743",
2174
+ "rule_id": "TG-SUPPLY-004",
2175
+ "title": "Unpinned CI Action",
2176
+ "description": "GitHub Action referenced by mutable tag instead of immutable commit SHA",
2177
+ "severity": "Low",
2178
+ "category": "supply",
2179
+ "cluster": "cluster-supply-chain",
2180
+ "file_path": "harness/validate_v0_6_2_modern_stacks.py",
2181
+ "line_number": 404,
2182
+ "matched_text": "uses: actions/checkout@v2",
2183
+ "snippet": "+++ b/.github/workflows/ci.yml\n@@ -6,1 +6,1 @@\n- - uses: actions/checkout@v2\n+ - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6\n\"\"\",",
2184
+ "is_test": true,
2185
+ "is_canary": true,
2186
+ "rule_precision": 0.6,
2187
+ "target": {
2188
+ "file_path": "harness/validate_v0_6_2_modern_stacks.py",
2189
+ "start_line": 404,
2190
+ "end_line": 404
2191
+ },
2192
+ "confidence_score": 52,
2193
+ "confidence_band": "Medium Confidence",
2194
+ "confidence_factors": {
2195
+ "evidence_quality": 21,
2196
+ "reproduction_success": 0,
2197
+ "independent_confirmations": 11,
2198
+ "environmental_clarity": 5,
2199
+ "manual_review_status": 0,
2200
+ "memory_boost": 15,
2201
+ "test_exemption": false,
2202
+ "test_deduction": 0,
2203
+ "total_score": 52,
2204
+ "classification_band": "Medium Confidence"
2205
+ }
2206
+ },
2207
+ {
2208
+ "finding_id": "TG-INPUT-005-95cb57ba",
2209
+ "rule_id": "TG-INPUT-005",
2210
+ "title": "Unsafe Template Rendering & Disabled Autoescaping",
2211
+ "description": "Flask render_template_string rendering untrusted input",
2212
+ "severity": "Low",
2213
+ "category": "injection",
2214
+ "cluster": "cluster-injection",
2215
+ "file_path": "harness/engine/fixture_manager.py",
2216
+ "line_number": 176,
2217
+ "matched_text": "render_template_string(",
2218
+ "snippet": " vulnerable_variant=FixtureVariant(\n relative_path=\"examples/python/flask-vuln\",\n code_pattern=\"render_template_string(f'<h1>Hello {name}</h1>')\",\n expected_findings_count=1,\n ),",
2219
+ "is_test": true,
2220
+ "is_canary": true,
2221
+ "rule_precision": 0.75,
2222
+ "target": {
2223
+ "file_path": "harness/engine/fixture_manager.py",
2224
+ "start_line": 176,
2225
+ "end_line": 176
2226
+ },
2227
+ "confidence_score": 51,
2228
+ "confidence_band": "Medium Confidence",
2229
+ "confidence_factors": {
2230
+ "evidence_quality": 26,
2231
+ "reproduction_success": 0,
2232
+ "independent_confirmations": 5,
2233
+ "environmental_clarity": 5,
2234
+ "manual_review_status": 0,
2235
+ "memory_boost": 15,
2236
+ "test_exemption": false,
2237
+ "test_deduction": 0,
2238
+ "total_score": 51,
2239
+ "classification_band": "Medium Confidence"
2240
+ }
2241
+ },
2242
+ {
2243
+ "finding_id": "TG-SUPPLY-004-9240a873",
2244
+ "rule_id": "TG-SUPPLY-004",
2245
+ "title": "Unpinned CI Action",
2246
+ "description": "GitHub Action referenced by mutable tag instead of immutable commit SHA",
2247
+ "severity": "Low",
2248
+ "category": "supply",
2249
+ "cluster": "cluster-supply-chain",
2250
+ "file_path": "harness/validate_v0_6_3_hardening.py",
2251
+ "line_number": 251,
2252
+ "matched_text": "uses: actions/checkout@v2",
2253
+ "snippet": "+++ b/.github/workflows/deploy.yml\n@@ -5,1 +5,2 @@\n- - uses: actions/checkout@v2\n+ - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29\n+ with: { persist-credentials: false }",
2254
+ "is_test": true,
2255
+ "is_canary": true,
2256
+ "rule_precision": 0.6,
2257
+ "target": {
2258
+ "file_path": "harness/validate_v0_6_3_hardening.py",
2259
+ "start_line": 251,
2260
+ "end_line": 251
2261
+ },
2262
+ "confidence_score": 49,
2263
+ "confidence_band": "Needs Review",
2264
+ "confidence_factors": {
2265
+ "evidence_quality": 21,
2266
+ "reproduction_success": 0,
2267
+ "independent_confirmations": 8,
2268
+ "environmental_clarity": 5,
2269
+ "manual_review_status": 0,
2270
+ "memory_boost": 15,
2271
+ "test_exemption": false,
2272
+ "test_deduction": 0,
2273
+ "total_score": 49,
2274
+ "classification_band": "Needs Review"
2275
+ }
2276
+ },
2277
+ {
2278
+ "finding_id": "TG-DIFF-003-3d00a189",
2279
+ "rule_id": "TG-DIFF-003",
2280
+ "title": "Unintentional Removal of Tenant Filter in Patch Deletions",
2281
+ "description": "Removal of tenant isolation boundary in patch deletion",
2282
+ "severity": "Low",
2283
+ "category": "diff",
2284
+ "cluster": "cluster-tenant-isolation",
2285
+ "file_path": "harness/validate_v0_6_2_modern_stacks.py",
2286
+ "line_number": 262,
2287
+ "matched_text": "- stmt = select(Account).where(Account.id == account_id",
2288
+ "snippet": "+++ b/queries.py\n@@ -7,1 +7,1 @@\n- stmt = select(Account).where(Account.id == account_id)\n+ stmt = select(Account).where(Account.id == account_id, Account.tenant_id == tenant_id)\n\"\"\",",
2289
+ "is_test": true,
2290
+ "is_canary": true,
2291
+ "rule_precision": 0.8,
2292
+ "target": {
2293
+ "file_path": "harness/validate_v0_6_2_modern_stacks.py",
2294
+ "start_line": 262,
2295
+ "end_line": 262
2296
+ },
2297
+ "confidence_score": 44,
2298
+ "confidence_band": "Needs Review",
2299
+ "confidence_factors": {
2300
+ "evidence_quality": 28,
2301
+ "reproduction_success": 0,
2302
+ "independent_confirmations": 11,
2303
+ "environmental_clarity": 5,
2304
+ "manual_review_status": 0,
2305
+ "memory_boost": 0,
2306
+ "test_exemption": false,
2307
+ "test_deduction": 0,
2308
+ "total_score": 44,
2309
+ "classification_band": "Needs Review"
2310
+ }
2311
+ },
2312
+ {
2313
+ "finding_id": "TG-DB-004-6a739666",
2314
+ "rule_id": "TG-DB-004",
2315
+ "title": "Missing Tenant Query Isolation in Multi-Tenant Models",
2316
+ "description": "Django ORM .get(id=...) query lacking explicit tenant scope filter",
2317
+ "severity": "Low",
2318
+ "category": "database",
2319
+ "cluster": "cluster-tenant-isolation",
2320
+ "file_path": "tests/test_v0_6_0_governed_remediation.py",
2321
+ "line_number": 79,
2322
+ "matched_text": ".objects.get(id=invoice_id)",
2323
+ "snippet": " def get_invoice(request, invoice_id):\n # Fetch invoice directly without tenant filter\n invoice = Invoice.objects.get(id=invoice_id)\n return JsonResponse({\"id\": invoice.id})\n \"\"\"",
2324
+ "is_test": true,
2325
+ "is_canary": true,
2326
+ "rule_precision": 0.55,
2327
+ "target": {
2328
+ "file_path": "tests/test_v0_6_0_governed_remediation.py",
2329
+ "start_line": 79,
2330
+ "end_line": 79
2331
+ },
2332
+ "confidence_score": 24,
2333
+ "confidence_band": "Needs Review",
2334
+ "confidence_factors": {
2335
+ "evidence_quality": 19,
2336
+ "reproduction_success": 0,
2337
+ "independent_confirmations": 5,
2338
+ "environmental_clarity": 5,
2339
+ "manual_review_status": 0,
2340
+ "memory_boost": 25,
2341
+ "test_exemption": true,
2342
+ "test_deduction": -30,
2343
+ "total_score": 24,
2344
+ "classification_band": "Needs Review"
2345
+ }
2346
+ },
2347
+ {
2348
+ "finding_id": "TG-DB-004-fe2c60e3",
2349
+ "rule_id": "TG-DB-004",
2350
+ "title": "Missing Tenant Query Isolation in Multi-Tenant Models",
2351
+ "description": "Django ORM .get(id=...) query lacking explicit tenant scope filter",
2352
+ "severity": "Low",
2353
+ "category": "database",
2354
+ "cluster": "cluster-tenant-isolation",
2355
+ "file_path": "tests/test_v0_6_0_governed_remediation.py",
2356
+ "line_number": 86,
2357
+ "matched_text": ".objects.get(id=invoice_id)",
2358
+ "snippet": " # Lines shifted down by 10 lines\n def get_invoice(request, invoice_id):\n invoice = Invoice.objects.get(id=invoice_id)\n return JsonResponse({\"id\": invoice.id})\n \"\"\"",
2359
+ "is_test": true,
2360
+ "is_canary": true,
2361
+ "rule_precision": 0.55,
2362
+ "target": {
2363
+ "file_path": "tests/test_v0_6_0_governed_remediation.py",
2364
+ "start_line": 86,
2365
+ "end_line": 86
2366
+ },
2367
+ "confidence_score": 24,
2368
+ "confidence_band": "Needs Review",
2369
+ "confidence_factors": {
2370
+ "evidence_quality": 19,
2371
+ "reproduction_success": 0,
2372
+ "independent_confirmations": 5,
2373
+ "environmental_clarity": 5,
2374
+ "manual_review_status": 0,
2375
+ "memory_boost": 25,
2376
+ "test_exemption": true,
2377
+ "test_deduction": -30,
2378
+ "total_score": 24,
2379
+ "classification_band": "Needs Review"
2380
+ }
2381
+ }
2382
+ ]