Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
CoCo_Code_Op2
brakeman
提交
566cb53c
B
brakeman
项目概览
CoCo_Code_Op2
/
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,发现更多精彩内容 >>
提交
566cb53c
编写于
12月 11, 2013
作者:
J
Justin Collins
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add check for CVE-2013-6417 (query generation)
上级
c69e419f
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
77 addition
and
0 deletion
+77
-0
lib/brakeman/checks/check_sql.rb
lib/brakeman/checks/check_sql.rb
+5
-0
lib/brakeman/warning_codes.rb
lib/brakeman/warning_codes.rb
+1
-0
test/tests/only_files_option.rb
test/tests/only_files_option.rb
+11
-0
test/tests/rails2.rb
test/tests/rails2.rb
+12
-0
test/tests/rails3.rb
test/tests/rails3.rb
+12
-0
test/tests/rails31.rb
test/tests/rails31.rb
+12
-0
test/tests/rails32.rb
test/tests/rails32.rb
+12
-0
test/tests/rails_with_xss_plugin.rb
test/tests/rails_with_xss_plugin.rb
+12
-0
未找到文件。
lib/brakeman/checks/check_sql.rb
浏览文件 @
566cb53c
...
...
@@ -556,6 +556,11 @@ def check_rails_versions_against_cve_issues
:versions
=>
[
%w[2.0.0 2.3.15 2.3.16]
,
%w[3.0.0 3.0.18 3.0.19]
,
%w[3.1.0 3.1.9 3.1.10]
,
%w[3.2.0 3.2.10 3.2.11]
],
:url
=>
"https://groups.google.com/d/topic/rubyonrails-security/c7jT-EeN9eI/discussion"
},
{
:cve
=>
"CVE-2013-6417"
,
:versions
=>
[
%w[2.0.0 3.2.15 3.2.16]
,
%w[4.0.0 4.0.1 4.0.2]
],
:url
=>
"https://groups.google.com/d/msg/ruby-security-ann/niK4drpSHT4/g8JW8ZsayRkJ"
},
].
each
do
|
cve_issue
|
cve_warning_for
cve_issue
[
:versions
],
cve_issue
[
:cve
],
cve_issue
[
:url
]
end
...
...
lib/brakeman/warning_codes.rb
浏览文件 @
566cb53c
...
...
@@ -69,6 +69,7 @@ module Brakeman::WarningCodes
:CVE_2013_6415_call
=>
66
,
:CVE_2013_6416
=>
67
,
:CVE_2013_6416_call
=>
68
,
:CVE_2013_6417
=>
69
,
}
def
self
.
code
name
...
...
test/tests/only_files_option.rb
浏览文件 @
566cb53c
...
...
@@ -87,4 +87,15 @@ class OnlyFilesOptionTests < Test::Unit::TestCase
:user_input
=>
nil
end
def
test_sql_injection_CVE_2013_6417
assert_warning
:type
=>
:warning
,
:warning_code
=>
69
,
:fingerprint
=>
"e1b66f4311771d714a13be519693c540d7e917511a758827d9b2a0a7f958e40f"
,
:warning_type
=>
"SQL Injection"
,
:line
=>
nil
,
:message
=>
/^Rails\ 3\.2\.9\.rc2 contains\ a\ SQL\ injection\ vul/
,
:confidence
=>
0
,
:relative_path
=>
"Gemfile"
,
:user_input
=>
nil
end
end
test/tests/rails2.rb
浏览文件 @
566cb53c
...
...
@@ -965,6 +965,18 @@ class Rails2Tests < Test::Unit::TestCase
:relative_path
=>
"config/environment.rb"
end
def
test_sql_injection_CVE_2013_6417
assert_warning
:type
=>
:warning
,
:warning_code
=>
69
,
:fingerprint
=>
"378978cda99add8404dd38db466f6ffa0b824ea8c57270d98869241a240d12a6"
,
:warning_type
=>
"SQL Injection"
,
:line
=>
nil
,
:message
=>
/^Rails\ 2\.3\.11\ contains\ a\ SQL\ injection\ vu/
,
:confidence
=>
0
,
:relative_path
=>
"config/environment.rb"
,
:user_input
=>
nil
end
def
test_to_json
assert_warning
:type
=>
:template
,
:warning_type
=>
"Cross Site Scripting"
,
...
...
test/tests/rails3.rb
浏览文件 @
566cb53c
...
...
@@ -1111,6 +1111,18 @@ class Rails3Tests < Test::Unit::TestCase
:user_input
=>
nil
end
def
test_sql_injection_CVE_2013_6417
assert_warning
:type
=>
:warning
,
:warning_code
=>
69
,
:fingerprint
=>
"e1b66f4311771d714a13be519693c540d7e917511a758827d9b2a0a7f958e40f"
,
:warning_type
=>
"SQL Injection"
,
:line
=>
nil
,
:message
=>
/^Rails\ 3\.0\.3\ contains\ a\ SQL\ injection\ vul/
,
:confidence
=>
0
,
:relative_path
=>
"Gemfile"
,
:user_input
=>
nil
end
def
test_http_only_session_setting
assert_warning
:type
=>
:warning
,
:warning_type
=>
"Session Setting"
,
...
...
test/tests/rails31.rb
浏览文件 @
566cb53c
...
...
@@ -832,6 +832,18 @@ class Rails31Tests < Test::Unit::TestCase
:user_input
=>
nil
end
def
test_sql_injection_CVE_2013_6417
assert_warning
:type
=>
:warning
,
:warning_code
=>
69
,
:fingerprint
=>
"e1b66f4311771d714a13be519693c540d7e917511a758827d9b2a0a7f958e40f"
,
:warning_type
=>
"SQL Injection"
,
:line
=>
nil
,
:message
=>
/^Rails\ 3\.1\.0\ contains\ a\ SQL\ injection\ vul/
,
:confidence
=>
0
,
:relative_path
=>
"Gemfile"
,
:user_input
=>
nil
end
def
test_to_json_with_overwritten_config
assert_warning
:type
=>
:template
,
:warning_type
=>
"Cross Site Scripting"
,
...
...
test/tests/rails32.rb
浏览文件 @
566cb53c
...
...
@@ -112,6 +112,18 @@ class Rails32Tests < Test::Unit::TestCase
:user_input
=>
nil
end
def
test_sql_injection_CVE_2013_6417
assert_warning
:type
=>
:warning
,
:warning_code
=>
69
,
:fingerprint
=>
"e1b66f4311771d714a13be519693c540d7e917511a758827d9b2a0a7f958e40f"
,
:warning_type
=>
"SQL Injection"
,
:line
=>
nil
,
:message
=>
/^Rails\ 3\.2\.9\.rc2 contains\ a\ SQL\ injection\ vul/
,
:confidence
=>
0
,
:relative_path
=>
"Gemfile"
,
:user_input
=>
nil
end
def
test_redirect_1
assert_warning
:type
=>
:warning
,
:warning_type
=>
"Redirect"
,
...
...
test/tests/rails_with_xss_plugin.rb
浏览文件 @
566cb53c
...
...
@@ -335,6 +335,18 @@ class RailsWithXssPluginTests < Test::Unit::TestCase
:file
=>
/Gemfile/
end
def
test_sql_injection_CVE_2013_6417
assert_warning
:type
=>
:warning
,
:warning_code
=>
69
,
:fingerprint
=>
"e1b66f4311771d714a13be519693c540d7e917511a758827d9b2a0a7f958e40f"
,
:warning_type
=>
"SQL Injection"
,
:line
=>
nil
,
:message
=>
/^Rails\ 2\.3\.14\ contains\ a\ SQL\ injection\ vu/
,
:confidence
=>
0
,
:relative_path
=>
"Gemfile"
,
:user_input
=>
nil
end
def
test_number_to_currency_CVE_2013_6415
assert_warning
:type
=>
:warning
,
:warning_code
=>
65
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录