|
60 | 60 | "confidence": "High", |
61 | 61 | "note": "" |
62 | 62 | }, |
63 | | - { |
64 | | - "warning_type": "SQL Injection", |
65 | | - "warning_code": 0, |
66 | | - "fingerprint": "6e4051854bb62e2ddbc671f82d6c2328892e1134b8b28105ecba9b0122540714", |
67 | | - "check_name": "SQL", |
68 | | - "message": "Possible SQL injection", |
69 | | - "file": "app/models/account.rb", |
70 | | - "line": 484, |
71 | | - "link": "https://brakemanscanner.org/docs/warning_types/sql_injection/", |
72 | | - "code": "find_by_sql([\" WITH first_degree AS (\\n SELECT target_account_id\\n FROM follows\\n WHERE account_id = ?\\n UNION ALL\\n SELECT ?\\n )\\n SELECT\\n accounts.*,\\n (count(f.id) + 1) * ts_rank_cd(#{textsearch}, #{query}, 32) AS rank\\n FROM accounts\\n LEFT OUTER JOIN follows AS f ON (accounts.id = f.account_id AND f.target_account_id = ?)\\n WHERE accounts.id IN (SELECT * FROM first_degree)\\n AND #{query} @@ #{textsearch}\\n AND accounts.suspended_at IS NULL\\n AND accounts.moved_to_account_id IS NULL\\n GROUP BY accounts.id\\n ORDER BY rank DESC\\n LIMIT ? OFFSET ?\\n\".squish, account.id, account.id, account.id, limit, offset])", |
73 | | - "render_path": null, |
74 | | - "location": { |
75 | | - "type": "method", |
76 | | - "class": "Account", |
77 | | - "method": "advanced_search_for" |
78 | | - }, |
79 | | - "user_input": "textsearch", |
80 | | - "confidence": "Medium", |
81 | | - "note": "" |
82 | | - }, |
83 | | - { |
84 | | - "warning_type": "SQL Injection", |
85 | | - "warning_code": 0, |
86 | | - "fingerprint": "6f075c1484908e3ec9bed21ab7cf3c7866be8da3881485d1c82e13093aefcbd7", |
87 | | - "check_name": "SQL", |
88 | | - "message": "Possible SQL injection", |
89 | | - "file": "app/models/status.rb", |
90 | | - "line": 105, |
91 | | - "link": "https://brakemanscanner.org/docs/warning_types/sql_injection/", |
92 | | - "code": "result.joins(\"LEFT OUTER JOIN statuses_tags t#{id} ON t#{id}.status_id = statuses.id AND t#{id}.tag_id = #{id}\")", |
93 | | - "render_path": null, |
94 | | - "location": { |
95 | | - "type": "method", |
96 | | - "class": "Status", |
97 | | - "method": null |
98 | | - }, |
99 | | - "user_input": "id", |
100 | | - "confidence": "Weak", |
101 | | - "note": "" |
102 | | - }, |
103 | 63 | { |
104 | 64 | "warning_type": "SQL Injection", |
105 | 65 | "warning_code": 0, |
|
180 | 140 | "confidence": "Medium", |
181 | 141 | "note": "" |
182 | 142 | }, |
183 | | - { |
184 | | - "warning_type": "SQL Injection", |
185 | | - "warning_code": 0, |
186 | | - "fingerprint": "9251d682c4e2840e1b2fea91e7d758efe2097ecb7f6255c065e3750d25eb178c", |
187 | | - "check_name": "SQL", |
188 | | - "message": "Possible SQL injection", |
189 | | - "file": "app/models/account.rb", |
190 | | - "line": 453, |
191 | | - "link": "https://brakemanscanner.org/docs/warning_types/sql_injection/", |
192 | | - "code": "find_by_sql([\" SELECT\\n accounts.*,\\n ts_rank_cd(#{textsearch}, #{query}, 32) AS rank\\n FROM accounts\\n WHERE #{query} @@ #{textsearch}\\n AND accounts.suspended_at IS NULL\\n AND accounts.moved_to_account_id IS NULL\\n ORDER BY rank DESC\\n LIMIT ? OFFSET ?\\n\".squish, limit, offset])", |
193 | | - "render_path": null, |
194 | | - "location": { |
195 | | - "type": "method", |
196 | | - "class": "Account", |
197 | | - "method": "search_for" |
198 | | - }, |
199 | | - "user_input": "textsearch", |
200 | | - "confidence": "Medium", |
201 | | - "note": "" |
202 | | - }, |
203 | 143 | { |
204 | 144 | "warning_type": "Redirect", |
205 | 145 | "warning_code": 18, |
|
270 | 210 | "confidence": "Weak", |
271 | 211 | "note": "" |
272 | 212 | }, |
273 | | - { |
274 | | - "warning_type": "SQL Injection", |
275 | | - "warning_code": 0, |
276 | | - "fingerprint": "e21d8fee7a5805761679877ca35ed1029c64c45ef3b4012a30262623e1ba8bb9", |
277 | | - "check_name": "SQL", |
278 | | - "message": "Possible SQL injection", |
279 | | - "file": "app/models/account.rb", |
280 | | - "line": 500, |
281 | | - "link": "https://brakemanscanner.org/docs/warning_types/sql_injection/", |
282 | | - "code": "find_by_sql([\" SELECT\\n accounts.*,\\n (count(f.id) + 1) * ts_rank_cd(#{textsearch}, #{query}, 32) AS rank\\n FROM accounts\\n LEFT OUTER JOIN follows AS f ON (accounts.id = f.account_id AND f.target_account_id = ?) OR (accounts.id = f.target_account_id AND f.account_id = ?)\\n WHERE #{query} @@ #{textsearch}\\n AND accounts.suspended_at IS NULL\\n AND accounts.moved_to_account_id IS NULL\\n GROUP BY accounts.id\\n ORDER BY rank DESC\\n LIMIT ? OFFSET ?\\n\".squish, account.id, account.id, limit, offset])", |
283 | | - "render_path": null, |
284 | | - "location": { |
285 | | - "type": "method", |
286 | | - "class": "Account", |
287 | | - "method": "advanced_search_for" |
288 | | - }, |
289 | | - "user_input": "textsearch", |
290 | | - "confidence": "Medium", |
291 | | - "note": "" |
292 | | - }, |
293 | 213 | { |
294 | 214 | "warning_type": "Mass Assignment", |
295 | 215 | "warning_code": 105, |
|
0 commit comments