Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
Brakeman
提交
88d4341c
B
Brakeman
项目概览
李少辉-开发者
/
Brakeman
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
B
Brakeman
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
88d4341c
编写于
7月 02, 2014
作者:
J
Justin Collins
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add check for CVE-2014-3482 and CVE-2014-3483
上级
0e3379b7
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
39 addition
and
1 deletion
+39
-1
lib/brakeman/checks/check_sql_cves.rb
lib/brakeman/checks/check_sql_cves.rb
+12
-0
lib/brakeman/warning_codes.rb
lib/brakeman/warning_codes.rb
+2
-0
test/tests/rails4.rb
test/tests/rails4.rb
+25
-1
未找到文件。
lib/brakeman/checks/check_sql_cves.rb
浏览文件 @
88d4341c
...
...
@@ -48,6 +48,18 @@ class Brakeman::CheckSQLCVEs < Brakeman::BaseCheck
}
end
if
tracker
.
config
[
:gems
]
and
tracker
.
config
[
:gems
][
:pg
]
issues
<<
{
:cve
=>
"CVE-2014-3482"
,
:versions
=>
[
%w[2.0.0 2.9.9 3.2.19]
,
%w[3.0.0 3.2.18 3.2.19]
,
%w[4.0.0 4.0.6 4.0.7]
,
%w[4.1.0 4.1.2 4.1.3]
],
:url
=>
"https://groups.google.com/d/msg/rubyonrails-security/wDxePLJGZdI/WP7EasCJTA4J"
}
<<
{
:cve
=>
"CVE-2014-3483"
,
:versions
=>
[
%w[2.0.0 2.9.9 3.2.19]
,
%w[3.0.0 3.2.18 3.2.19]
,
%w[4.0.0 4.0.6 4.0.7]
,
%w[4.1.0 4.1.2 4.1.3]
],
:url
=>
"https://groups.google.com/d/msg/rubyonrails-security/wDxePLJGZdI/WP7EasCJTA4J"
}
end
issues
.
each
do
|
cve_issue
|
cve_warning_for
cve_issue
[
:versions
],
cve_issue
[
:cve
],
cve_issue
[
:url
]
end
...
...
lib/brakeman/warning_codes.rb
浏览文件 @
88d4341c
...
...
@@ -78,6 +78,8 @@ module Brakeman::WarningCodes
:CVE_2014_0082
=>
75
,
:regex_dos
=>
76
,
:CVE_2014_0130
=>
77
,
:CVE_2014_3482
=>
78
,
:CVE_2014_3483
=>
79
,
}
def
self
.
code
name
...
...
test/tests/rails4.rb
浏览文件 @
88d4341c
...
...
@@ -15,7 +15,7 @@ class Rails4Tests < Test::Unit::TestCase
:controller
=>
0
,
:model
=>
1
,
:template
=>
2
,
:generic
=>
28
:generic
=>
30
}
end
...
...
@@ -464,6 +464,30 @@ class Rails4Tests < Test::Unit::TestCase
:user_input
=>
nil
end
def
test_sql_injection_CVE_2014_3482
assert_warning
:type
=>
:warning
,
:warning_code
=>
78
,
:fingerprint
=>
"5c9706393849d7de5125a3688562aea31e112a7b09d0abbb461ee5dc7c1751b8"
,
:warning_type
=>
"SQL Injection"
,
:line
=>
nil
,
:message
=>
/^Rails\ 4\.0\.0\ contains\ a\ SQL\ injection\ vul/
,
:confidence
=>
0
,
:relative_path
=>
"Gemfile"
,
:user_input
=>
nil
end
def
test_sql_injection_CVE_2014_3483
assert_warning
:type
=>
:warning
,
:warning_code
=>
79
,
:fingerprint
=>
"4a60c60c39e12b1dd1d8b490f228594f0a555aa5447587625df362327e86ad2f"
,
:warning_type
=>
"SQL Injection"
,
:line
=>
nil
,
:message
=>
/^Rails\ 4\.0\.0\ contains\ a\ SQL\ injection\ vul/
,
:confidence
=>
0
,
:relative_path
=>
"Gemfile"
,
:user_input
=>
nil
end
def
test_mass_assignment_with_permit!
assert_warning
:type
=>
:warning
,
:warning_code
=>
70
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录