Skip to content

Commit eb3c761

Browse files
authored
Merge branch 'master' into restricting-queryparams
2 parents 330ffc7 + 3f69ef7 commit eb3c761

File tree

6 files changed

+26
-3
lines changed

6 files changed

+26
-3
lines changed

src/api/Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ GEM
254254
thor (>= 0.14, < 2.0)
255255
jquery-ui-rails (8.0.0)
256256
railties (>= 3.2.16)
257-
json (2.16.0)
257+
json (2.17.1)
258258
kaminari (1.2.2)
259259
activesupport (>= 4.1.0)
260260
kaminari-actionview (= 1.2.2)

src/api/app/controllers/statistics_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def most_active_projects
3535

3636
def most_active_packages
3737
# get all packages including activity values
38-
@packages = Package.select(Arel.sql("packages.*, #{Package.activity_algorithm}"))
38+
@packages = Package.select("packages.*, #{Package.activity_algorithm}")
3939
.limit(@limit).order(activity_value: :desc)
4040
@packages
4141
end

src/api/app/models/local_build_result/for_package.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def repository_in_db?(repository, architecture)
4646
end
4747

4848
def set_architectures_for
49-
repos_archs = project.repositories.joins(:architectures).pluck(:name, Arel.sql('architectures.name'))
49+
repos_archs = project.repositories.joins(:architectures).pluck(:name, 'architectures.name')
5050
@architectures_for = {}
5151
repos_archs.each do |element|
5252
@architectures_for[element.first] ||= []

src/api/config/brakeman.ignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,29 @@
275275
],
276276
"note": ""
277277
},
278+
{
279+
"warning_type": "SQL Injection",
280+
"warning_code": 0,
281+
"fingerprint": "45840f44547aeced1506343b80e3fe0ad1b6262ae3799e5086907ff71bddb03c",
282+
"check_name": "SQL",
283+
"message": "Possible SQL injection",
284+
"file": "app/controllers/statistics_controller.rb",
285+
"line": 38,
286+
"link": "https://brakemanscanner.org/docs/warning_types/sql_injection/",
287+
"code": "Package.select(\"packages.*, #{Package.activity_algorithm}\")",
288+
"render_path": null,
289+
"location": {
290+
"type": "method",
291+
"class": "StatisticsController",
292+
"method": "most_active_packages"
293+
},
294+
"user_input": "Package.activity_algorithm",
295+
"confidence": "High",
296+
"cwe_id": [
297+
89
298+
],
299+
"note": ""
300+
},
278301
{
279302
"warning_type": "SQL Injection",
280303
"warning_code": 0,
-102 KB
Binary file not shown.
102 KB
Binary file not shown.

0 commit comments

Comments
 (0)