thuban 0.4.0 → 0.4.2

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 (209) hide show
  1. package/dist/package.json +63 -0
  2. package/dist/packages/crucible/rules/code-scanner-core.json +129 -0
  3. package/dist/packages/crucible/rules/command-injection.json +411 -0
  4. package/dist/packages/crucible/rules/crypto-misuse.json +35 -0
  5. package/dist/packages/crucible/rules/deserialization.json +152 -0
  6. package/dist/packages/crucible/rules/env-injection.json +46 -0
  7. package/dist/packages/crucible/rules/eval-abuse.json +104 -0
  8. package/dist/packages/crucible/rules/file-upload.json +46 -0
  9. package/dist/packages/crucible/rules/hallucination.json +22 -0
  10. package/dist/packages/crucible/rules/hardcoded-secret.json +397 -0
  11. package/dist/packages/crucible/rules/hardcoded-url.json +13 -0
  12. package/dist/packages/crucible/rules/insecure-crypto.json +302 -0
  13. package/dist/packages/crucible/rules/integer-overflow.json +35 -0
  14. package/dist/packages/crucible/rules/log-injection.json +33 -0
  15. package/dist/packages/crucible/rules/mass-assignment.json +112 -0
  16. package/dist/packages/crucible/rules/open-redirect.json +196 -0
  17. package/dist/packages/crucible/rules/path-traversal.json +422 -0
  18. package/dist/packages/crucible/rules/prototype-pollution.json +22 -0
  19. package/dist/packages/crucible/rules/sql-injection.json +597 -0
  20. package/dist/packages/crucible/rules/ssrf.json +557 -0
  21. package/dist/packages/crucible/rules/timing-attack.json +55 -0
  22. package/dist/packages/crucible/rules/unsafe-block.json +24 -0
  23. package/dist/packages/crucible/rules/xss.json +641 -0
  24. package/dist/packages/crucible/rules/xxe.json +66 -0
  25. package/dist/packages/crucible/rules/yaml-deserialization.json +22 -0
  26. package/dist/packages/crucible/rules/yaml-injection.json +22 -0
  27. package/dist/packages/scanner/executive-report.js +1 -1
  28. package/dist/packages/scanner/hallucination-detector.js +1 -1
  29. package/dist/packages/scanner/secret-scanner.js +1 -1
  30. package/package.json +7 -4
  31. package/dist/packages/crucible/seeds/python/seed-021 3.py +0 -37
  32. package/dist/packages/crucible/seeds/python/seed-022 3.py +0 -34
  33. package/dist/packages/crucible/seeds/python/seed-023 3.py +0 -37
  34. package/dist/packages/crucible/seeds/python/seed-024 3.py +0 -38
  35. package/dist/packages/crucible/seeds/python/seed-025 3.py +0 -40
  36. package/dist/packages/crucible/seeds/python/seed-026 3.py +0 -35
  37. package/dist/packages/crucible/seeds/python/seed-027 3.py +0 -35
  38. package/dist/packages/crucible/seeds/python/seed-028 3.py +0 -42
  39. package/dist/packages/crucible/seeds/python/seed-030 3.py +0 -37
  40. package/dist/packages/crucible/seeds/python/seed-031 3.py +0 -34
  41. package/dist/packages/crucible/seeds/python/seed-036 3.py +0 -33
  42. package/dist/packages/crucible/seeds/python/seed-037 3.py +0 -41
  43. package/dist/packages/crucible/seeds/python/seed-038 3.py +0 -33
  44. package/dist/packages/crucible/seeds/python/seed-039 3.py +0 -39
  45. package/dist/packages/crucible/seeds/python/seed-040 3.py +0 -39
  46. package/dist/packages/crucible/seeds/python/seed-041 3.py +0 -37
  47. package/dist/packages/crucible/seeds/python/seed-042 3.py +0 -38
  48. package/dist/packages/crucible/seeds/python/seed-043 3.py +0 -32
  49. package/dist/packages/crucible/seeds/python/seed-044 3.py +0 -38
  50. package/dist/packages/crucible/seeds/python/seed-045 3.py +0 -36
  51. package/dist/packages/crucible/seeds/python/seed-046 3.py +0 -33
  52. package/dist/packages/crucible/seeds/python/seed-047 3.py +0 -44
  53. package/dist/packages/crucible/seeds/python/seed-048 3.py +0 -35
  54. package/dist/packages/crucible/seeds/python/seed-049 3.py +0 -39
  55. package/dist/packages/crucible/seeds/python/seed-050 3.py +0 -39
  56. package/dist/packages/crucible/seeds/python/seed-051 3.py +0 -38
  57. package/dist/packages/crucible/seeds/python/seed-052 3.py +0 -41
  58. package/dist/packages/crucible/seeds/ruby/seed-001 3.rb +0 -15
  59. package/dist/packages/crucible/seeds/ruby/seed-002 3.rb +0 -22
  60. package/dist/packages/crucible/seeds/ruby/seed-003 3.rb +0 -25
  61. package/dist/packages/crucible/seeds/ruby/seed-004 3.rb +0 -17
  62. package/dist/packages/crucible/seeds/ruby/seed-005 3.rb +0 -21
  63. package/dist/packages/crucible/seeds/ruby/seed-006 3.rb +0 -17
  64. package/dist/packages/crucible/seeds/ruby/seed-007 3.rb +0 -16
  65. package/dist/packages/crucible/seeds/ruby/seed-008 3.rb +0 -18
  66. package/dist/packages/crucible/seeds/ruby/seed-009 3.rb +0 -20
  67. package/dist/packages/crucible/seeds/ruby/seed-010 3.rb +0 -24
  68. package/dist/packages/crucible/seeds/ruby/seed-011 3.rb +0 -21
  69. package/dist/packages/crucible/seeds/ruby/seed-012 3.rb +0 -22
  70. package/dist/packages/crucible/seeds/ruby/seed-013 3.rb +0 -21
  71. package/dist/packages/crucible/seeds/ruby/seed-014 3.rb +0 -16
  72. package/dist/packages/crucible/seeds/ruby/seed-015 3.rb +0 -18
  73. package/dist/packages/crucible/seeds/ruby/seed-016 3.rb +0 -17
  74. package/dist/packages/crucible/seeds/ruby/seed-017 3.rb +0 -25
  75. package/dist/packages/crucible/seeds/ruby/seed-018 3.rb +0 -23
  76. package/dist/packages/crucible/seeds/ruby/seed-019 3.rb +0 -20
  77. package/dist/packages/crucible/seeds/ruby/seed-020 3.rb +0 -17
  78. package/dist/packages/crucible/seeds/ruby/seed-021 3.rb +0 -20
  79. package/dist/packages/crucible/seeds/ruby/seed-022 3.rb +0 -21
  80. package/dist/packages/crucible/seeds/ruby/seed-023 3.rb +0 -19
  81. package/dist/packages/crucible/seeds/ruby/seed-024 3.rb +0 -17
  82. package/dist/packages/crucible/seeds/ruby/seed-025 3.rb +0 -17
  83. package/dist/packages/crucible/seeds/ruby/seed-026 3.rb +0 -18
  84. package/dist/packages/crucible/seeds/ruby/seed-027 3.rb +0 -21
  85. package/dist/packages/crucible/seeds/ruby/seed-028 3.rb +0 -22
  86. package/dist/packages/crucible/seeds/ruby/seed-029 3.rb +0 -19
  87. package/dist/packages/crucible/seeds/ruby/seed-030 3.rb +0 -20
  88. package/dist/packages/crucible/seeds/ruby/seed-031 3.rb +0 -17
  89. package/dist/packages/crucible/seeds/ruby/seed-032 3.rb +0 -22
  90. package/dist/packages/crucible/seeds/ruby/seed-033 3.rb +0 -18
  91. package/dist/packages/crucible/seeds/ruby/seed-034 3.rb +0 -19
  92. package/dist/packages/crucible/seeds/ruby/seed-035 3.rb +0 -19
  93. package/dist/packages/crucible/seeds/ruby/seed-036 3.rb +0 -18
  94. package/dist/packages/crucible/seeds/ruby/seed-037 3.rb +0 -21
  95. package/dist/packages/crucible/seeds/ruby/seed-038 3.rb +0 -24
  96. package/dist/packages/crucible/seeds/ruby/seed-039 3.rb +0 -24
  97. package/dist/packages/crucible/seeds/ruby/seed-040 3.rb +0 -22
  98. package/dist/packages/crucible/seeds/ruby/seed-041 3.rb +0 -23
  99. package/dist/packages/crucible/seeds/ruby/seed-042 3.rb +0 -25
  100. package/dist/packages/crucible/seeds/ruby/seed-043 3.rb +0 -23
  101. package/dist/packages/crucible/seeds/ruby/seed-044 3.rb +0 -16
  102. package/dist/packages/crucible/seeds/ruby/seed-045 3.rb +0 -22
  103. package/dist/packages/crucible/seeds/ruby/seed-046 3.rb +0 -27
  104. package/dist/packages/crucible/seeds/ruby/seed-047 3.rb +0 -26
  105. package/dist/packages/crucible/seeds/ruby/seed-048 3.rb +0 -24
  106. package/dist/packages/crucible/seeds/ruby/seed-049 3.rb +0 -20
  107. package/dist/packages/crucible/seeds/ruby/seed-050 3.rb +0 -27
  108. package/dist/packages/crucible/seeds/rust/seed-001 3.rs +0 -25
  109. package/dist/packages/crucible/seeds/rust/seed-002 3.rs +0 -20
  110. package/dist/packages/crucible/seeds/rust/seed-003 3.rs +0 -23
  111. package/dist/packages/crucible/seeds/rust/seed-004 3.rs +0 -21
  112. package/dist/packages/crucible/seeds/rust/seed-005 3.rs +0 -21
  113. package/dist/packages/crucible/seeds/rust/seed-006 3.rs +0 -24
  114. package/dist/packages/crucible/seeds/rust/seed-007 3.rs +0 -20
  115. package/dist/packages/crucible/seeds/rust/seed-008 3.rs +0 -19
  116. package/dist/packages/crucible/seeds/rust/seed-009 3.rs +0 -28
  117. package/dist/packages/crucible/seeds/rust/seed-010 3.rs +0 -28
  118. package/dist/packages/crucible/seeds/rust/seed-011 3.rs +0 -25
  119. package/dist/packages/crucible/seeds/rust/seed-012 3.rs +0 -31
  120. package/dist/packages/crucible/seeds/rust/seed-013 3.rs +0 -27
  121. package/dist/packages/crucible/seeds/rust/seed-014 3.rs +0 -30
  122. package/dist/packages/crucible/seeds/rust/seed-015 3.rs +0 -33
  123. package/dist/packages/crucible/seeds/rust/seed-016 3.rs +0 -22
  124. package/dist/packages/crucible/seeds/rust/seed-017 3.rs +0 -28
  125. package/dist/packages/crucible/seeds/rust/seed-018 3.rs +0 -21
  126. package/dist/packages/crucible/seeds/rust/seed-019 3.rs +0 -36
  127. package/dist/packages/crucible/seeds/rust/seed-020 3.rs +0 -27
  128. package/dist/packages/crucible/seeds/rust/seed-021 3.rs +0 -26
  129. package/dist/packages/crucible/seeds/rust/seed-022 3.rs +0 -23
  130. package/dist/packages/crucible/seeds/rust/seed-023 3.rs +0 -22
  131. package/dist/packages/crucible/seeds/rust/seed-024 3.rs +0 -24
  132. package/dist/packages/crucible/seeds/rust/seed-025 3.rs +0 -29
  133. package/dist/packages/crucible/seeds/rust/seed-026 3.rs +0 -23
  134. package/dist/packages/crucible/seeds/rust/seed-027 3.rs +0 -24
  135. package/dist/packages/crucible/seeds/rust/seed-028 3.rs +0 -25
  136. package/dist/packages/crucible/seeds/rust/seed-029 3.rs +0 -25
  137. package/dist/packages/crucible/seeds/rust/seed-030 3.rs +0 -30
  138. package/dist/packages/crucible/seeds/rust/seed-031 3.rs +0 -22
  139. package/dist/packages/crucible/seeds/rust/seed-032 3.rs +0 -25
  140. package/dist/packages/crucible/seeds/rust/seed-033 3.rs +0 -25
  141. package/dist/packages/crucible/seeds/rust/seed-034 3.rs +0 -20
  142. package/dist/packages/crucible/seeds/rust/seed-035 3.rs +0 -28
  143. package/dist/packages/crucible/seeds/rust/seed-036 3.rs +0 -26
  144. package/dist/packages/crucible/seeds/rust/seed-037 3.rs +0 -31
  145. package/dist/packages/crucible/seeds/rust/seed-038 3.rs +0 -25
  146. package/dist/packages/crucible/seeds/rust/seed-039 3.rs +0 -28
  147. package/dist/packages/crucible/seeds/rust/seed-040 3.rs +0 -27
  148. package/dist/packages/crucible/seeds/rust/seed-041 3.rs +0 -32
  149. package/dist/packages/crucible/seeds/rust/seed-042 3.rs +0 -27
  150. package/dist/packages/crucible/seeds/rust/seed-043 3.rs +0 -29
  151. package/dist/packages/crucible/seeds/rust/seed-044 3.rs +0 -25
  152. package/dist/packages/crucible/seeds/rust/seed-045 3.rs +0 -28
  153. package/dist/packages/crucible/seeds/rust/seed-046 3.rs +0 -25
  154. package/dist/packages/crucible/seeds/rust/seed-047 3.rs +0 -34
  155. package/dist/packages/crucible/seeds/rust/seed-048 3.rs +0 -21
  156. package/dist/packages/crucible/seeds/rust/seed-049 3.rs +0 -26
  157. package/dist/packages/crucible/seeds/rust/seed-050 3.rs +0 -23
  158. package/dist/packages/crucible/seeds/ts/seed-001 3.ts +0 -32
  159. package/dist/packages/crucible/seeds/ts/seed-002 3.ts +0 -34
  160. package/dist/packages/crucible/seeds/ts/seed-003 3.ts +0 -28
  161. package/dist/packages/crucible/seeds/ts/seed-004 3.ts +0 -34
  162. package/dist/packages/crucible/seeds/ts/seed-005 3.ts +0 -32
  163. package/dist/packages/crucible/seeds/ts/seed-006 3.ts +0 -31
  164. package/dist/packages/crucible/seeds/ts/seed-007 3.ts +0 -28
  165. package/dist/packages/crucible/seeds/ts/seed-008 3.ts +0 -40
  166. package/dist/packages/crucible/seeds/ts/seed-009 3.ts +0 -31
  167. package/dist/packages/crucible/seeds/ts/seed-010 3.ts +0 -33
  168. package/dist/packages/crucible/seeds/ts/seed-011 3.ts +0 -29
  169. package/dist/packages/crucible/seeds/ts/seed-012 3.ts +0 -34
  170. package/dist/packages/crucible/seeds/ts/seed-013 3.ts +0 -31
  171. package/dist/packages/crucible/seeds/ts/seed-014 3.ts +0 -36
  172. package/dist/packages/crucible/seeds/ts/seed-015 3.ts +0 -31
  173. package/dist/packages/crucible/seeds/ts/seed-016 3.ts +0 -37
  174. package/dist/packages/crucible/seeds/ts/seed-017 3.ts +0 -44
  175. package/dist/packages/crucible/seeds/ts/seed-018 3.ts +0 -33
  176. package/dist/packages/crucible/seeds/ts/seed-019 3.ts +0 -32
  177. package/dist/packages/crucible/seeds/ts/seed-020 3.ts +0 -33
  178. package/dist/packages/crucible/seeds/ts/seed-021 3.ts +0 -33
  179. package/dist/packages/crucible/seeds/ts/seed-022 3.ts +0 -34
  180. package/dist/packages/crucible/seeds/ts/seed-023 3.ts +0 -33
  181. package/dist/packages/crucible/seeds/ts/seed-024 3.ts +0 -35
  182. package/dist/packages/crucible/seeds/ts/seed-025 3.ts +0 -29
  183. package/dist/packages/crucible/seeds/ts/seed-026 3.ts +0 -36
  184. package/dist/packages/crucible/seeds/ts/seed-027 3.ts +0 -30
  185. package/dist/packages/crucible/seeds/ts/seed-028 3.ts +0 -32
  186. package/dist/packages/crucible/seeds/ts/seed-029 3.ts +0 -34
  187. package/dist/packages/crucible/seeds/ts/seed-030 3.ts +0 -37
  188. package/dist/packages/crucible/seeds/ts/seed-031 3.ts +0 -31
  189. package/dist/packages/crucible/seeds/ts/seed-032 3.ts +0 -32
  190. package/dist/packages/crucible/seeds/ts/seed-033 3.ts +0 -32
  191. package/dist/packages/crucible/seeds/ts/seed-034 3.ts +0 -34
  192. package/dist/packages/crucible/seeds/ts/seed-035 3.ts +0 -29
  193. package/dist/packages/crucible/seeds/ts/seed-036 3.ts +0 -34
  194. package/dist/packages/crucible/seeds/ts/seed-037 3.ts +0 -33
  195. package/dist/packages/crucible/seeds/ts/seed-038 3.ts +0 -29
  196. package/dist/packages/crucible/seeds/ts/seed-039 3.ts +0 -35
  197. package/dist/packages/crucible/seeds/ts/seed-040 3.ts +0 -31
  198. package/dist/packages/crucible/seeds/ts/seed-041 3.ts +0 -29
  199. package/dist/packages/crucible/seeds/ts/seed-042 3.ts +0 -33
  200. package/dist/packages/crucible/seeds/ts/seed-043 3.ts +0 -32
  201. package/dist/packages/crucible/seeds/ts/seed-044 3.ts +0 -36
  202. package/dist/packages/crucible/seeds/ts/seed-045 3.ts +0 -39
  203. package/dist/packages/crucible/seeds/ts/seed-046 3.ts +0 -41
  204. package/dist/packages/crucible/seeds/ts/seed-047 3.ts +0 -33
  205. package/dist/packages/crucible/seeds/ts/seed-048 3.ts +0 -33
  206. package/dist/packages/crucible/seeds/ts/seed-049 3.ts +0 -34
  207. package/dist/packages/crucible/seeds/ts/seed-050 3.ts +0 -41
  208. package/dist/packages/crucible/seeds/ts/seed-051 3.ts +0 -34
  209. package/dist/packages/crucible/seeds/ts/seed-052 3.ts +0 -36
@@ -0,0 +1,422 @@
1
+ [
2
+ {
3
+ "id": "PATH001",
4
+ "pattern": "include\\s*\\(\\s*\\$(?:_GET|_POST|_REQUEST|page|template|lang)|require(?:_once)?\\s*\\(\\s*\\$(?:_GET|_POST|_REQUEST)",
5
+ "flags": "i",
6
+ "category": "path_traversal",
7
+ "description": "Path traversal — broader coverage",
8
+ "language": [
9
+ "js",
10
+ "ts",
11
+ "python",
12
+ "java",
13
+ "go",
14
+ "csharp",
15
+ "php",
16
+ "ruby",
17
+ "rust",
18
+ "kotlin"
19
+ ],
20
+ "severity": "high"
21
+ },
22
+ {
23
+ "id": "PATH002",
24
+ "pattern": "path\\.join\\s*\\([^)]*(?:filename|file|name|param|input|req\\.|request\\.|dir\\b|upload)|path\\.resolve\\s*\\([^)]*(?:req\\.|request\\.)",
25
+ "flags": "i",
26
+ "category": "path_traversal",
27
+ "description": "Path traversal — broader coverage",
28
+ "language": [
29
+ "js",
30
+ "ts",
31
+ "python",
32
+ "java",
33
+ "go",
34
+ "csharp",
35
+ "php",
36
+ "ruby",
37
+ "rust",
38
+ "kotlin"
39
+ ],
40
+ "severity": "high"
41
+ },
42
+ {
43
+ "id": "PATH003",
44
+ "pattern": "(?:uploadDir|baseDir|BASE_DIR|downloadDir|uploadRoot|templateRoot|configRoot)\\s*\\+\\s*|os\\.Open\\s*\\([^)]*\\+",
45
+ "flags": "i",
46
+ "category": "path_traversal",
47
+ "description": "Go path traversal: base path + user input concatenation",
48
+ "language": [
49
+ "go"
50
+ ],
51
+ "severity": "high"
52
+ },
53
+ {
54
+ "id": "PATH004",
55
+ "pattern": "File\\s*\\([^)]*(?:filename|request\\.|params\\[|getParameter)",
56
+ "flags": "i",
57
+ "category": "path_traversal",
58
+ "description": "Kotlin/Java file path",
59
+ "language": [
60
+ "kotlin",
61
+ "java"
62
+ ],
63
+ "severity": "high"
64
+ },
65
+ {
66
+ "id": "PATH005",
67
+ "pattern": "AdmZip|ZipEntry|zipEntry\\.getName\\s*\\(\\)|entry\\.getName|ZipArchive|archive\\.by_index|archive\\.len\\(\\)",
68
+ "flags": "i",
69
+ "category": "path_traversal",
70
+ "description": "Zip-slip",
71
+ "language": [
72
+ "js",
73
+ "ts",
74
+ "python",
75
+ "java",
76
+ "go",
77
+ "csharp",
78
+ "php",
79
+ "ruby",
80
+ "rust",
81
+ "kotlin"
82
+ ],
83
+ "severity": "high"
84
+ },
85
+ {
86
+ "id": "PATH006",
87
+ "pattern": "Path\\.Combine\\s*\\([^)]*(?:reportName|filename|Request\\[|\\.Value\\b|name\\b)",
88
+ "flags": "i",
89
+ "category": "path_traversal",
90
+ "description": "C# path traversal (Path.Combine with user input, File.WriteAllText)",
91
+ "language": [
92
+ "csharp"
93
+ ],
94
+ "severity": "high"
95
+ },
96
+ {
97
+ "id": "PATH007",
98
+ "pattern": "File\\.(?:WriteAllText|ReadAllText|Open|ReadAllBytes)\\s*\\([^)]*(?:reportName|filename|Request\\[|\\.Value\\b|path\\b)",
99
+ "flags": "i",
100
+ "category": "path_traversal",
101
+ "description": "C# path traversal (Path.Combine with user input, File.WriteAllText)",
102
+ "language": [
103
+ "csharp"
104
+ ],
105
+ "severity": "high"
106
+ },
107
+ {
108
+ "id": "PATH008",
109
+ "pattern": "Path\\.Combine\\s*\\(\\s*\\w+(?:Root|Base|Dir)\\s*,\\s*\\w+\\s*\\)",
110
+ "flags": "i",
111
+ "category": "path_traversal",
112
+ "description": "C# path traversal via variable named 'path' that was set with Path.Combine + user input",
113
+ "language": [
114
+ "csharp"
115
+ ],
116
+ "severity": "high"
117
+ },
118
+ {
119
+ "id": "PATH009",
120
+ "pattern": "\\w+(?:Base|Dir|Path|Folder|Root)\\s*\\+\\s*\\w+(?:Name|File|Path|Input)",
121
+ "flags": "i",
122
+ "category": "path_traversal",
123
+ "description": "C# path traversal: base string + user-supplied name string concatenation",
124
+ "language": [
125
+ "csharp"
126
+ ],
127
+ "severity": "high"
128
+ },
129
+ {
130
+ "id": "PATH010",
131
+ "pattern": "File\\.(?:read|write|open|binread)\\s*\\([^)]*#\\{|File\\.(?:read|write|open|binread)\\s*\\(\\s*(?:path|params\\[|request\\.)",
132
+ "flags": "i",
133
+ "category": "path_traversal",
134
+ "description": "Ruby File.read / File.write with string interpolation (user-controlled path)",
135
+ "language": [
136
+ "ruby"
137
+ ],
138
+ "severity": "high"
139
+ },
140
+ {
141
+ "id": "PATH011",
142
+ "pattern": "[\"'\\/][\\/\\w\\-\\.]*\\/[\"']*#\\{[a-zA-Z_]\\w*\\}[\"']?",
143
+ "flags": "",
144
+ "category": "path_traversal",
145
+ "description": "Ruby path string interpolation: \"/base/path/#{user_var}\"",
146
+ "language": [
147
+ "ruby"
148
+ ],
149
+ "severity": "high"
150
+ },
151
+ {
152
+ "id": "PATH012",
153
+ "pattern": "filepath\\.Join\\s*\\([^)]*(?:tmpl|template|name|path|param|input|rel|query)\\b",
154
+ "flags": "i",
155
+ "category": "path_traversal",
156
+ "description": "Go filepath.Join / path.Join without validation",
157
+ "language": [
158
+ "go"
159
+ ],
160
+ "severity": "high"
161
+ },
162
+ {
163
+ "id": "PATH013",
164
+ "pattern": "(?:FileInputStream|FileOutputStream|FileReader|FileWriter)\\s*\\([^)]*\\+\\s*\\w|(?:FileInputStream|FileOutputStream)\\s*\\(\\w+\\s*\\+",
165
+ "flags": "i",
166
+ "category": "path_traversal",
167
+ "description": "Java FileInputStream / FileOutputStream with string concat",
168
+ "language": [
169
+ "java"
170
+ ],
171
+ "severity": "high"
172
+ },
173
+ {
174
+ "id": "PATH014",
175
+ "pattern": "format!\\s*\\(\\s*[\"'][^\"']*\\{[^}]*\\}[^\"']*[\"'][^)]*(?:config|plugin|template|user|path|name)",
176
+ "flags": "i",
177
+ "category": "path_traversal",
178
+ "description": "Rust format! macro constructing file paths from user input",
179
+ "language": [
180
+ "rust"
181
+ ],
182
+ "severity": "high"
183
+ },
184
+ {
185
+ "id": "PATH015",
186
+ "pattern": "(?:const\\s+\\w+\\s*=\\s*|let\\s+path\\s*=\\s*)format!\\s*\\(\\s*[\"'][^\"']*\\/\\{\\}[\"']",
187
+ "flags": "",
188
+ "category": "path_traversal",
189
+ "description": "Go/Rust const string + user variable for file path",
190
+ "language": [
191
+ "go",
192
+ "rust"
193
+ ],
194
+ "severity": "high"
195
+ },
196
+ {
197
+ "id": "PATH016",
198
+ "pattern": "[`\"'][.\\/][^`\"']*\\/\\$\\{(?:req\\.|request\\.|params\\.|query\\.|userInput|filename|template|plugin|name)",
199
+ "flags": "i",
200
+ "category": "path_traversal",
201
+ "description": "JS template literal path construction: `./dir/${userVar}` or `/base/${param}`",
202
+ "language": [
203
+ "js",
204
+ "ts",
205
+ "python",
206
+ "java",
207
+ "go",
208
+ "csharp",
209
+ "php",
210
+ "ruby",
211
+ "rust",
212
+ "kotlin"
213
+ ],
214
+ "severity": "high"
215
+ },
216
+ {
217
+ "id": "PATH017",
218
+ "pattern": "require(?:_once)?\\s*\\(\\s*['\"][^'\"]*['\"]\\s*\\.\\s*\\$[a-zA-Z_]|include(?:_once)?\\s*\\(\\s*['\"][^'\"]*['\"]\\s*\\.\\s*\\$[a-zA-Z_]",
219
+ "flags": "i",
220
+ "category": "path_traversal",
221
+ "description": "PHP require/include with string concatenation: require('dir/' . $var)",
222
+ "language": [
223
+ "php"
224
+ ],
225
+ "severity": "high"
226
+ },
227
+ {
228
+ "id": "PATH018",
229
+ "pattern": "File\\s*\\(\\s*[\"'][^\"']*[\"']\\s*\\+\\s*\\w|File\\s*\\(\\s*\"\\$|File\\s*\\(\\s*[\"'][^\"']*\\/\"\\s*\\+",
230
+ "flags": "i",
231
+ "category": "path_traversal",
232
+ "description": "Kotlin/Java File() with string interpolation or parameter variable",
233
+ "language": [
234
+ "kotlin",
235
+ "java"
236
+ ],
237
+ "severity": "high"
238
+ },
239
+ {
240
+ "id": "PATH019",
241
+ "pattern": "%00|\\\\x00|\\\\u0000",
242
+ "flags": "",
243
+ "category": "path_traversal",
244
+ "description": "Null byte injection pattern",
245
+ "language": [
246
+ "js",
247
+ "ts",
248
+ "python",
249
+ "java",
250
+ "go",
251
+ "csharp",
252
+ "php",
253
+ "ruby",
254
+ "rust",
255
+ "kotlin"
256
+ ],
257
+ "severity": "high"
258
+ },
259
+ {
260
+ "id": "PATH020",
261
+ "pattern": "%2e%2e|%252e|%2f%2e",
262
+ "flags": "i",
263
+ "category": "path_traversal",
264
+ "description": "URL-encoded traversal: %2e%2e or %2f",
265
+ "language": [
266
+ "js",
267
+ "ts",
268
+ "python",
269
+ "java",
270
+ "go",
271
+ "csharp",
272
+ "php",
273
+ "ruby",
274
+ "rust",
275
+ "kotlin"
276
+ ],
277
+ "severity": "high"
278
+ },
279
+ {
280
+ "id": "PATH021",
281
+ "pattern": "\\binclude\\s*\\(\\s*\\$(?:_GET|_POST|_REQUEST|page|template|lang|plugin)",
282
+ "flags": "i",
283
+ "category": "path_traversal",
284
+ "description": "PHP path traversal",
285
+ "language": [
286
+ "php"
287
+ ],
288
+ "severity": "high"
289
+ },
290
+ {
291
+ "id": "PATH022",
292
+ "pattern": "\\brequire\\s*\\(\\s*\\$(?:_GET|_POST|_REQUEST|module|lang|view|component)",
293
+ "flags": "i",
294
+ "category": "path_traversal",
295
+ "description": "PHP path traversal",
296
+ "language": [
297
+ "php"
298
+ ],
299
+ "severity": "high"
300
+ },
301
+ {
302
+ "id": "PATH023",
303
+ "pattern": "file_get_contents\\s*\\(\\s*\\$(?:_GET|_POST|url|filename|logFile)",
304
+ "flags": "i",
305
+ "category": "path_traversal",
306
+ "description": "PHP path traversal",
307
+ "language": [
308
+ "php"
309
+ ],
310
+ "severity": "high"
311
+ },
312
+ {
313
+ "id": "PATH024",
314
+ "pattern": "readfile\\s*\\(\\s*\\$(?:base|path|file)",
315
+ "flags": "i",
316
+ "category": "path_traversal",
317
+ "description": "PHP path traversal",
318
+ "language": [
319
+ "php"
320
+ ],
321
+ "severity": "high"
322
+ },
323
+ {
324
+ "id": "PATH025",
325
+ "pattern": "\\bfopen\\s*\\(\\s*\\$(?:filepath|path|report)\\s*,",
326
+ "flags": "i",
327
+ "category": "path_traversal",
328
+ "description": "PHP path traversal",
329
+ "language": [
330
+ "php"
331
+ ],
332
+ "severity": "high"
333
+ },
334
+ {
335
+ "id": "PATH026",
336
+ "pattern": "file_get_contents\\s*\\(\\s*['\"][^\\\"']*['\"]\\s*\\.\\s*\\$(?:filename|file|name|logFile|log)",
337
+ "flags": "i",
338
+ "category": "path_traversal",
339
+ "description": "PHP path traversal: file_get_contents with string concat to user var",
340
+ "language": [
341
+ "php"
342
+ ],
343
+ "severity": "high"
344
+ },
345
+ {
346
+ "id": "PATH027",
347
+ "pattern": "os\\.Open\\s*\\(\\s*\\w+(?:Dir|Root|Base|Path)\\s*\\+\\s*\\w+",
348
+ "flags": "i",
349
+ "category": "path_traversal",
350
+ "description": "Go path traversal",
351
+ "language": [
352
+ "go"
353
+ ],
354
+ "severity": "high"
355
+ },
356
+ {
357
+ "id": "PATH028",
358
+ "pattern": "ioutil\\.ReadFile\\s*\\(\\s*\\w+(?:Root|Base|Dir|Path)\\s*\\+\\s*\\w+",
359
+ "flags": "i",
360
+ "category": "path_traversal",
361
+ "description": "Go path traversal",
362
+ "language": [
363
+ "go"
364
+ ],
365
+ "severity": "high"
366
+ },
367
+ {
368
+ "id": "PATH029",
369
+ "pattern": "os\\.ReadFile\\s*\\(\\s*\\w+(?:Root|Base|Dir|Path)\\s*\\+\\s*\\w+",
370
+ "flags": "i",
371
+ "category": "path_traversal",
372
+ "description": "Go path traversal",
373
+ "language": [
374
+ "go"
375
+ ],
376
+ "severity": "high"
377
+ },
378
+ {
379
+ "id": "PATH030",
380
+ "pattern": "os\\.Create\\s*\\(\\s*\\w+(?:Base|Dir|Root|Path)\\s*\\+\\s*\\w+",
381
+ "flags": "i",
382
+ "category": "path_traversal",
383
+ "description": "Go path traversal",
384
+ "language": [
385
+ "go"
386
+ ],
387
+ "severity": "high"
388
+ },
389
+ {
390
+ "id": "PATH031",
391
+ "pattern": "os\\.Remove\\s*\\(\\s*\\w+(?:Root|Base|Dir)\\s*\\+\\s*\\w+",
392
+ "flags": "i",
393
+ "category": "path_traversal",
394
+ "description": "Go path traversal",
395
+ "language": [
396
+ "go"
397
+ ],
398
+ "severity": "high"
399
+ },
400
+ {
401
+ "id": "PATH032",
402
+ "pattern": "filepath\\.Join\\s*\\([^)]*(?:extractBase|uploadRoot|configRoot|templateRoot|reportBase)\\s*,",
403
+ "flags": "i",
404
+ "category": "path_traversal",
405
+ "description": "Go path traversal",
406
+ "language": [
407
+ "go"
408
+ ],
409
+ "severity": "high"
410
+ },
411
+ {
412
+ "id": "PATH033",
413
+ "pattern": "\\.resolve\\s*\\(\\s*\\w*(?:Name|name|file|path|template)\\w*\\s*\\)",
414
+ "flags": "i",
415
+ "category": "path_traversal",
416
+ "description": "Java: path traversal via Path.resolve(userInput)",
417
+ "language": [
418
+ "java"
419
+ ],
420
+ "severity": "high"
421
+ }
422
+ ]
@@ -0,0 +1,22 @@
1
+ [
2
+ {
3
+ "id": "PROTO001",
4
+ "pattern": "__proto__|\\[\"__proto__\"\\]",
5
+ "flags": "",
6
+ "category": "prototype_pollution",
7
+ "description": "Prototype pollution",
8
+ "language": [
9
+ "js",
10
+ "ts",
11
+ "python",
12
+ "java",
13
+ "go",
14
+ "csharp",
15
+ "php",
16
+ "ruby",
17
+ "rust",
18
+ "kotlin"
19
+ ],
20
+ "severity": "high"
21
+ }
22
+ ]