tainted_love 0.1.5 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (169) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +2 -0
  4. data/bin/setup +3 -3
  5. data/bin/test +6 -2
  6. data/dev.yml +1 -1
  7. data/lib/tainted_love.rb +2 -2
  8. data/lib/tainted_love/replacer/base.rb +5 -1
  9. data/lib/tainted_love/replacer/replace_action_controller.rb +0 -4
  10. data/lib/tainted_love/replacer/replace_active_record.rb +21 -1
  11. data/lib/tainted_love/replacer/replace_graphql.rb +27 -0
  12. data/lib/tainted_love/replacer/replace_kernel.rb +1 -1
  13. data/lib/tainted_love/replacer/replace_object.rb +8 -2
  14. data/lib/tainted_love/replacer/replace_rack_builder.rb +51 -0
  15. data/lib/tainted_love/replacer/replace_rack_file.rb +25 -0
  16. data/lib/tainted_love/replacer/replace_rack_query_parser.rb +50 -0
  17. data/lib/tainted_love/replacer/replace_rails_user_input.rb +12 -27
  18. data/lib/tainted_love/replacer/replace_string.rb +69 -0
  19. data/lib/tainted_love/replacer/replace_tag_builder.rb +16 -0
  20. data/lib/tainted_love/reporter/base.rb +4 -1
  21. data/lib/tainted_love/reporter/stdout_reporter.rb +1 -0
  22. data/lib/tainted_love/utils.rb +4 -19
  23. data/lib/tainted_love/utils/proxy.rb +95 -0
  24. data/lib/tainted_love/validator/action_dispatch_diagnostics.rb +20 -0
  25. data/lib/tainted_love/validator/active_record_find.rb +15 -0
  26. data/lib/tainted_love/validator/erb_eval.rb +1 -3
  27. data/lib/tainted_love/validator/haml_eval.rb +25 -0
  28. data/lib/tainted_love/validator/i18n_load.rb +17 -0
  29. data/lib/tainted_love/validator/ignore.rb +21 -0
  30. data/lib/tainted_love/version.rb +1 -1
  31. data/service.yml +6 -0
  32. data/{example → tests/rails}/.gitignore +0 -0
  33. data/{example → tests/rails}/.ruby-version +0 -0
  34. data/{example → tests/rails}/Gemfile +5 -4
  35. data/{example → tests/rails}/Gemfile.lock +29 -32
  36. data/{example → tests/rails}/README.md +0 -0
  37. data/{example → tests/rails}/Rakefile +0 -0
  38. data/{example → tests/rails}/app/assets/config/manifest.js +0 -0
  39. data/{example → tests/rails}/app/assets/images/.keep +0 -0
  40. data/{example → tests/rails}/app/assets/javascripts/application.js +0 -0
  41. data/{example → tests/rails}/app/assets/javascripts/cable.js +0 -0
  42. data/{example → tests/rails}/app/assets/javascripts/channels/.keep +0 -0
  43. data/{example → tests/rails}/app/assets/javascripts/products.coffee +0 -0
  44. data/{example → tests/rails}/app/assets/stylesheets/application.css +0 -0
  45. data/{example → tests/rails}/app/assets/stylesheets/products.scss +0 -0
  46. data/{example → tests/rails}/app/assets/stylesheets/scaffolds.scss +0 -0
  47. data/{example → tests/rails}/app/channels/application_cable/channel.rb +0 -0
  48. data/{example → tests/rails}/app/channels/application_cable/connection.rb +0 -0
  49. data/{example → tests/rails}/app/controllers/application_controller.rb +0 -0
  50. data/{example → tests/rails}/app/controllers/concerns/.keep +0 -0
  51. data/tests/rails/app/controllers/graphql_controller.rb +43 -0
  52. data/{example → tests/rails}/app/controllers/products_controller.rb +0 -0
  53. data/tests/rails/app/controllers/test_cases_controller.rb +43 -0
  54. data/tests/rails/app/graphql/example_schema.rb +4 -0
  55. data/{example/app/models/concerns → tests/rails/app/graphql/mutations}/.keep +0 -0
  56. data/{example/lib/assets → tests/rails/app/graphql/types}/.keep +0 -0
  57. data/tests/rails/app/graphql/types/base_enum.rb +4 -0
  58. data/tests/rails/app/graphql/types/base_input_object.rb +4 -0
  59. data/tests/rails/app/graphql/types/base_interface.rb +5 -0
  60. data/tests/rails/app/graphql/types/base_object.rb +4 -0
  61. data/tests/rails/app/graphql/types/base_scalar.rb +4 -0
  62. data/tests/rails/app/graphql/types/base_union.rb +4 -0
  63. data/tests/rails/app/graphql/types/mutation_type.rb +10 -0
  64. data/tests/rails/app/graphql/types/product_type.rb +10 -0
  65. data/tests/rails/app/graphql/types/query_type.rb +46 -0
  66. data/tests/rails/app/graphql/types/taint_test_case_input.rb +8 -0
  67. data/{example → tests/rails}/app/helpers/application_helper.rb +0 -0
  68. data/{example → tests/rails}/app/helpers/products_helper.rb +0 -0
  69. data/{example → tests/rails}/app/helpers/test_cases_helper.rb +0 -0
  70. data/{example → tests/rails}/app/jobs/application_job.rb +0 -0
  71. data/{example → tests/rails}/app/mailers/application_mailer.rb +0 -0
  72. data/{example → tests/rails}/app/models/application_record.rb +0 -0
  73. data/{example/lib/tasks → tests/rails/app/models/concerns}/.keep +0 -0
  74. data/{example → tests/rails}/app/models/product.rb +0 -0
  75. data/{example → tests/rails}/app/views/layouts/application.html.erb +0 -0
  76. data/{example → tests/rails}/app/views/layouts/mailer.html.erb +0 -0
  77. data/{example → tests/rails}/app/views/layouts/mailer.text.erb +0 -0
  78. data/{example → tests/rails}/app/views/products/_form.html.erb +0 -0
  79. data/{example → tests/rails}/app/views/products/_product.json.jbuilder +0 -0
  80. data/{example → tests/rails}/app/views/products/edit.html.erb +0 -0
  81. data/{example → tests/rails}/app/views/products/index.html.erb +0 -0
  82. data/{example → tests/rails}/app/views/products/index.json.jbuilder +0 -0
  83. data/{example → tests/rails}/app/views/products/new.html.erb +0 -0
  84. data/{example → tests/rails}/app/views/products/show.html.erb +0 -0
  85. data/{example → tests/rails}/app/views/products/show.json.jbuilder +0 -0
  86. data/{example → tests/rails}/app/views/test_cases/xss.html.erb +0 -0
  87. data/{example → tests/rails}/bin/bundle +0 -0
  88. data/{example → tests/rails}/bin/rails +0 -0
  89. data/{example → tests/rails}/bin/rake +0 -0
  90. data/{example → tests/rails}/bin/setup +0 -0
  91. data/{example → tests/rails}/bin/spring +0 -0
  92. data/{example → tests/rails}/bin/update +0 -0
  93. data/{example → tests/rails}/bin/yarn +0 -0
  94. data/{example → tests/rails}/config.ru +0 -0
  95. data/{example → tests/rails}/config/application.rb +0 -0
  96. data/{example → tests/rails}/config/boot.rb +0 -0
  97. data/{example → tests/rails}/config/cable.yml +0 -0
  98. data/{example → tests/rails}/config/credentials.yml.enc +0 -0
  99. data/{example → tests/rails}/config/database.yml +0 -0
  100. data/{example → tests/rails}/config/environment.rb +0 -0
  101. data/{example → tests/rails}/config/environments/development.rb +0 -0
  102. data/{example → tests/rails}/config/environments/production.rb +0 -0
  103. data/{example → tests/rails}/config/environments/test.rb +0 -0
  104. data/{example → tests/rails}/config/initializers/application_controller_renderer.rb +0 -0
  105. data/{example → tests/rails}/config/initializers/assets.rb +0 -0
  106. data/{example → tests/rails}/config/initializers/backtrace_silencers.rb +0 -0
  107. data/{example → tests/rails}/config/initializers/content_security_policy.rb +0 -0
  108. data/{example → tests/rails}/config/initializers/cookies_serializer.rb +0 -0
  109. data/{example → tests/rails}/config/initializers/filter_parameter_logging.rb +0 -0
  110. data/{example → tests/rails}/config/initializers/inflections.rb +0 -0
  111. data/{example → tests/rails}/config/initializers/mime_types.rb +0 -0
  112. data/{example → tests/rails}/config/initializers/tainted_love.rb +0 -0
  113. data/{example → tests/rails}/config/initializers/wrap_parameters.rb +0 -0
  114. data/{example → tests/rails}/config/locales/en.yml +0 -0
  115. data/{example → tests/rails}/config/puma.rb +0 -0
  116. data/{example → tests/rails}/config/routes.rb +6 -0
  117. data/{example → tests/rails}/config/spring.rb +0 -0
  118. data/{example → tests/rails}/config/storage.yml +0 -0
  119. data/{example → tests/rails}/db/migrate/20190311220346_create_products.rb +0 -0
  120. data/{example → tests/rails}/db/schema.rb +0 -0
  121. data/{example → tests/rails}/db/seeds.rb +0 -0
  122. data/{example/log → tests/rails/lib/assets}/.keep +0 -0
  123. data/{example/storage → tests/rails/lib/tasks}/.keep +0 -0
  124. data/{example/test/controllers → tests/rails/log}/.keep +0 -0
  125. data/{example → tests/rails}/package.json +0 -0
  126. data/{example → tests/rails}/public/404.html +0 -0
  127. data/{example → tests/rails}/public/422.html +0 -0
  128. data/{example → tests/rails}/public/500.html +0 -0
  129. data/{example → tests/rails}/public/apple-touch-icon-precomposed.png +0 -0
  130. data/{example → tests/rails}/public/apple-touch-icon.png +0 -0
  131. data/{example → tests/rails}/public/favicon.ico +0 -0
  132. data/{example → tests/rails}/public/robots.txt +0 -0
  133. data/{example/test/fixtures → tests/rails/storage}/.keep +0 -0
  134. data/tests/rails/test.sh +1 -0
  135. data/{example → tests/rails}/test/application_system_test_case.rb +0 -0
  136. data/{example/test/fixtures/files → tests/rails/test/controllers}/.keep +0 -0
  137. data/tests/rails/test/controllers/graphql_controller_test.rb +28 -0
  138. data/{example → tests/rails}/test/controllers/products_controller_test.rb +0 -0
  139. data/tests/rails/test/controllers/test_cases_controller_test.rb +54 -0
  140. data/{example/test/helpers → tests/rails/test/fixtures}/.keep +0 -0
  141. data/{example/test/integration → tests/rails/test/fixtures/files}/.keep +0 -0
  142. data/{example → tests/rails}/test/fixtures/products.yml +0 -0
  143. data/{example/test/mailers → tests/rails/test/helpers}/.keep +0 -0
  144. data/{example/test/models → tests/rails/test/integration}/.keep +0 -0
  145. data/{example/test/system → tests/rails/test/mailers}/.keep +0 -0
  146. data/{example/tmp → tests/rails/test/models}/.keep +0 -0
  147. data/{example → tests/rails}/test/models/product_test.rb +0 -0
  148. data/{example → tests/rails}/test/replacers/replace_active_record_test.rb +28 -0
  149. data/tests/rails/test/replacers/replace_rails_user_input_test.rb +13 -0
  150. data/{example → tests/rails}/test/replacers/replace_sprokets_test.rb +0 -0
  151. data/{example/vendor → tests/rails/test/system}/.keep +0 -0
  152. data/{example → tests/rails}/test/system/products_test.rb +0 -0
  153. data/{example → tests/rails}/test/test_helper.rb +0 -0
  154. data/tests/rails/tmp/.keep +0 -0
  155. data/tests/rails/vendor/.keep +0 -0
  156. data/tests/sinatra/Gemfile +3 -0
  157. data/tests/sinatra/Gemfile.lock +29 -0
  158. data/tests/sinatra/app.rb +26 -0
  159. data/tests/sinatra/test.sh +1 -0
  160. data/tests/sinatra/views/xss.erb +1 -0
  161. data/tools/web/Gemfile +1 -1
  162. data/tools/web/application.rb +17 -2
  163. data/tools/web/public/application.css +38 -2
  164. data/tools/web/views/index.erb +5 -11
  165. data/tools/web/views/input.erb +4 -0
  166. data/tools/web/views/line.erb +2 -2
  167. metadata +146 -111
  168. data/example/app/controllers/test_cases_controller.rb +0 -20
  169. data/example/test/controllers/test_cases_controller_test.rb +0 -39
@@ -0,0 +1,54 @@
1
+ # frozen_string_literal: false
2
+
3
+ require 'test_helper'
4
+
5
+ class TestCasesControllerTest < ActionDispatch::IntegrationTest
6
+ include TaintedLoveHelpers
7
+
8
+ test "should get xss" do
9
+ assert_report do
10
+ get test_cases_xss_url(search: '<img src=x oenrror=alert(1)>'.taint)
11
+ end
12
+
13
+ assert_response :success
14
+ end
15
+
16
+ test "should get unsafe_render" do
17
+ assert_report do
18
+ get test_cases_unsafe_render_url(file: 'xss'.taint)
19
+ end
20
+
21
+ assert_response :success
22
+ end
23
+
24
+ test "should get render_inline" do
25
+ assert_report do
26
+ get test_cases_render_inline_url(template: '<%= `id` %>'.taint)
27
+ end
28
+
29
+ assert_response :success
30
+ end
31
+
32
+ test "user input is tainted" do
33
+ # Since there's no actual app running, some values are not tainted
34
+ # by ReplaceRackBuilder
35
+
36
+ params = {
37
+ get_param: 'asdf',
38
+ get_array_param: ["abc", "def"].each(&:taint),
39
+ }
40
+
41
+ headers = {}
42
+ headers['HTTP_AAA'.taint] = 'asdf'
43
+
44
+ cookies[:something] = 'asdf'.taint
45
+
46
+ get test_cases_taint_test_url('route_param', params: params), headers: headers
47
+
48
+ json = JSON.parse(response.body)
49
+
50
+ json.each do |(value_type, tainted, tags)|
51
+ assert tainted, "#{value_type} is not tainted"
52
+ end
53
+ end
54
+ end
@@ -8,6 +8,27 @@ class ReplaceActiveRecordTest < ActiveSupport::TestCase
8
8
  end
9
9
  end
10
10
 
11
+ test "reports when the interpolation string is tainted" do
12
+ assert_report do
13
+ Product.where("id = ?".taint, 1)
14
+ Product.where("id = ?", 1)
15
+ end
16
+ end
17
+
18
+ test "reports when using find_by" do
19
+ assert_report do
20
+ Product.find_by("id".taint)
21
+ Product.find_by("id")
22
+ end
23
+ end
24
+
25
+ test "doesn't report when a hash is used with find_by" do
26
+ assert_report(0) do
27
+ Product.find_by(id: 1)
28
+ Product.find_by(name: "name".taint)
29
+ end
30
+ end
31
+
11
32
  test "replaces select" do
12
33
  assert_report do
13
34
  Product.select("query".taint)
@@ -28,4 +49,11 @@ class ReplaceActiveRecordTest < ActiveSupport::TestCase
28
49
  Product.count_by_sql("select * from products")
29
50
  end
30
51
  end
52
+
53
+ test "replaces order" do
54
+ assert_report do
55
+ Product.order('created_at asc'.taint)
56
+ Product.order('created_at asc')
57
+ end
58
+ end
31
59
  end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'test_helper'
4
+
5
+ class ReplaceRailsUserInput < ActiveSupport::TestCase
6
+ test "tainted_love_tags are copied to html_safe string" do
7
+ tag = { source: 'something' }
8
+ input = TaintedLove.tag('user input', tag)
9
+ input_safe = input.html_safe
10
+
11
+ assert_equal([tag], input_safe.tainted_love_tags)
12
+ end
13
+ end
File without changes
File without changes
@@ -0,0 +1,3 @@
1
+ gem 'sinatra'
2
+ gem 'tainted_love', path: '../..'
3
+ gem 'erubis'
@@ -0,0 +1,29 @@
1
+ PATH
2
+ remote: ../..
3
+ specs:
4
+ tainted_love (0.1.5)
5
+
6
+ GEM
7
+ specs:
8
+ erubis (2.7.0)
9
+ mustermann (1.0.3)
10
+ rack (2.0.7)
11
+ rack-protection (2.0.5)
12
+ rack
13
+ sinatra (2.0.5)
14
+ mustermann (~> 1.0)
15
+ rack (~> 2.0)
16
+ rack-protection (= 2.0.5)
17
+ tilt (~> 2.0)
18
+ tilt (2.0.9)
19
+
20
+ PLATFORMS
21
+ ruby
22
+
23
+ DEPENDENCIES
24
+ erubis
25
+ sinatra
26
+ tainted_love!
27
+
28
+ BUNDLED WITH
29
+ 1.17.3
@@ -0,0 +1,26 @@
1
+ require 'sinatra'
2
+ require 'tainted_love'
3
+ require 'erubis'
4
+
5
+ set :erb, :escape_html => true
6
+
7
+
8
+ get '/' do
9
+ 'asdf'
10
+ end
11
+
12
+ get '/eval/:cmd' do |cmd|
13
+ eval(cmd)
14
+ end
15
+
16
+ get '/eval' do
17
+ eval(params[:cmd])
18
+ end
19
+
20
+ get '/xss' do
21
+ erb :xss
22
+ end
23
+
24
+
25
+ TaintedLove.enable! do |config|
26
+ end
@@ -0,0 +1 @@
1
+ exit 0 # todo
@@ -0,0 +1 @@
1
+ <%= params[:search] %>
@@ -1,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- gem 'sinatra'
3
+ gem 'sinatra', '2.0.5'
@@ -17,7 +17,22 @@ end
17
17
 
18
18
  helpers do
19
19
  def prepare_inputs(warning)
20
- warning['inputs'].sort_by { |_, reported_at| -reported_at }
20
+ warning['inputs'].sort_by { |value, input| -input['reported_at'] }
21
+ end
22
+
23
+ def highlight_input(input, tag)
24
+ return input[0...100] unless tag
25
+
26
+ value = tag['value']
27
+ source = tag['source']
28
+
29
+ input = input.gsub(value) { |match|
30
+ '[TAINTED_LOVE_MATCH_START]' + match + '[TAINTED_LOVE_MATCH_END]'
31
+ }
32
+
33
+ h(input)
34
+ .gsub('[TAINTED_LOVE_MATCH_START]', '<span data-title="' + h(source) + '">')
35
+ .gsub('[TAINTED_LOVE_MATCH_END]', '</span>')
21
36
  end
22
37
 
23
38
  def h(text)
@@ -32,7 +47,7 @@ end
32
47
  get '/' do
33
48
  @report = JSON.parse(File.read(REPORT_PATH))
34
49
  @warnings = @report['warnings'].sort_by do |_, code_path|
35
- -code_path['inputs'].map { |_, reported_at| reported_at }.max
50
+ -code_path['inputs'].map { |value, input| input['reported_at'] }.max
36
51
  end.to_h
37
52
 
38
53
  erb :index
@@ -2,6 +2,7 @@ body {
2
2
  font-family: sans-serif;
3
3
  margin: 0;
4
4
  background-color: #efefef;
5
+ color: #333;
5
6
  }
6
7
 
7
8
  .clear {
@@ -55,10 +56,20 @@ h2 {
55
56
  font-family: monospace;
56
57
  }
57
58
 
59
+ .line a {
60
+ color: #0081d3;
61
+ }
62
+
63
+
58
64
  .tag {
59
65
  font-size: 0.8em;
60
- background-color: #9EBABA;
61
- padding: 0.1em 0.3em;
66
+ padding: 0.2em 0.5em;
67
+ border-radius: 5px;
68
+ border: 2px solid #9EBABA;
69
+ }
70
+
71
+ .tag:before {
72
+ content: '#';
62
73
  }
63
74
 
64
75
  details summary {
@@ -77,3 +88,28 @@ details summary {
77
88
  content: attr(data-line);
78
89
  margin-right: 1em;
79
90
  }
91
+
92
+ code span {
93
+ border-bottom: 2px solid rgba(255, 0, 0, 0.8);
94
+ }
95
+
96
+
97
+ code span[data-title] {
98
+ position: relative;
99
+ cursor: help;
100
+ }
101
+
102
+ code span[data-title]:hover::before {
103
+ content: attr(data-title);
104
+ position: absolute;
105
+ z-index: 10000;
106
+ bottom: -26px;
107
+ display: inline-block;
108
+ padding: 3px 6px;
109
+ border-radius: 2px;
110
+ background-color: rgba(0, 0, 0, 0.8);
111
+ color: white;
112
+ font-size: 0.8em;
113
+ font-family: sans-serif;
114
+ white-space: nowrap;
115
+ }
@@ -25,22 +25,16 @@
25
25
  <p class="inputs">
26
26
  <% inputs = prepare_inputs(warning) %>
27
27
 
28
- <% inputs.take(5).each do |(input, reported_at)| %>
29
- <div class="input">
30
- <code><%=h input.inspect %></code>
31
- <small>reported at <%= Time.at(reported_at) %></small>
32
- </div>
28
+ <% inputs.take(5).each do |(value, input)| %>
29
+ <%= erb :input, locals: { value: value, input: input } %>
33
30
  <% end %>
34
31
 
35
32
  <% if inputs.size > 5 %>
36
33
  <details>
37
34
  <summary>Show more</summary>
38
35
 
39
- <% inputs.drop(5).each do |(input, reported_at)| %>
40
- <div class="input">
41
- <code><%=h input.inspect %></code>
42
- <small>reported at <%= Time.at(reported_at) %></small>
43
- </div>
36
+ <% inputs.drop(5).each do |(value, input)| %>
37
+ <%= erb :input, locals: { value: value, input: input } %>
44
38
  <% end %>
45
39
  </details>
46
40
  <% end %>
@@ -48,7 +42,7 @@
48
42
 
49
43
  <div>
50
44
  <% warning['tags'].each do |tag| %>
51
- <span class="tag">#<%= tag %></span>
45
+ <span class="tag"><%= tag %></span>
52
46
  <% end %>
53
47
  </div>
54
48
  </div>
@@ -0,0 +1,4 @@
1
+ <div class="input">
2
+ <code><%= highlight_input(value, input['taint_tags'].last) %></code>
3
+ <small>reported at <%= Time.at(input['reported_at']) %></small>
4
+ </div>
@@ -3,9 +3,9 @@
3
3
  <%= line['file'].sub(@report['application_path'], '.') %></a><span>:<%= line['line_number'] %></span> in <%= line['method'] %>
4
4
  <% if line['file'].start_with?(@report['application_path']) %>
5
5
  <div class="code">
6
- <% render_source(line['file'], line['line_number']).each do |(code, line_number)| %>
6
+ <% render_source(line['file'], line['line_number']).each do |(code, line_number)| %>
7
7
  <pre data-line="<%= line_number %>"><%= code %></pre>
8
- <% end %>
8
+ <% end %>
9
9
  </div>
10
10
  <% end %>
11
11
  </div>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tainted_love
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benoit Cote-Jodoin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-05-15 00:00:00.000000000 Z
11
+ date: 2019-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -103,113 +103,6 @@ files:
103
103
  - bin/setup
104
104
  - bin/test
105
105
  - dev.yml
106
- - example/.gitignore
107
- - example/.ruby-version
108
- - example/Gemfile
109
- - example/Gemfile.lock
110
- - example/README.md
111
- - example/Rakefile
112
- - example/app/assets/config/manifest.js
113
- - example/app/assets/images/.keep
114
- - example/app/assets/javascripts/application.js
115
- - example/app/assets/javascripts/cable.js
116
- - example/app/assets/javascripts/channels/.keep
117
- - example/app/assets/javascripts/products.coffee
118
- - example/app/assets/stylesheets/application.css
119
- - example/app/assets/stylesheets/products.scss
120
- - example/app/assets/stylesheets/scaffolds.scss
121
- - example/app/channels/application_cable/channel.rb
122
- - example/app/channels/application_cable/connection.rb
123
- - example/app/controllers/application_controller.rb
124
- - example/app/controllers/concerns/.keep
125
- - example/app/controllers/products_controller.rb
126
- - example/app/controllers/test_cases_controller.rb
127
- - example/app/helpers/application_helper.rb
128
- - example/app/helpers/products_helper.rb
129
- - example/app/helpers/test_cases_helper.rb
130
- - example/app/jobs/application_job.rb
131
- - example/app/mailers/application_mailer.rb
132
- - example/app/models/application_record.rb
133
- - example/app/models/concerns/.keep
134
- - example/app/models/product.rb
135
- - example/app/views/layouts/application.html.erb
136
- - example/app/views/layouts/mailer.html.erb
137
- - example/app/views/layouts/mailer.text.erb
138
- - example/app/views/products/_form.html.erb
139
- - example/app/views/products/_product.json.jbuilder
140
- - example/app/views/products/edit.html.erb
141
- - example/app/views/products/index.html.erb
142
- - example/app/views/products/index.json.jbuilder
143
- - example/app/views/products/new.html.erb
144
- - example/app/views/products/show.html.erb
145
- - example/app/views/products/show.json.jbuilder
146
- - example/app/views/test_cases/xss.html.erb
147
- - example/bin/bundle
148
- - example/bin/rails
149
- - example/bin/rake
150
- - example/bin/setup
151
- - example/bin/spring
152
- - example/bin/update
153
- - example/bin/yarn
154
- - example/config.ru
155
- - example/config/application.rb
156
- - example/config/boot.rb
157
- - example/config/cable.yml
158
- - example/config/credentials.yml.enc
159
- - example/config/database.yml
160
- - example/config/environment.rb
161
- - example/config/environments/development.rb
162
- - example/config/environments/production.rb
163
- - example/config/environments/test.rb
164
- - example/config/initializers/application_controller_renderer.rb
165
- - example/config/initializers/assets.rb
166
- - example/config/initializers/backtrace_silencers.rb
167
- - example/config/initializers/content_security_policy.rb
168
- - example/config/initializers/cookies_serializer.rb
169
- - example/config/initializers/filter_parameter_logging.rb
170
- - example/config/initializers/inflections.rb
171
- - example/config/initializers/mime_types.rb
172
- - example/config/initializers/tainted_love.rb
173
- - example/config/initializers/wrap_parameters.rb
174
- - example/config/locales/en.yml
175
- - example/config/puma.rb
176
- - example/config/routes.rb
177
- - example/config/spring.rb
178
- - example/config/storage.yml
179
- - example/db/migrate/20190311220346_create_products.rb
180
- - example/db/schema.rb
181
- - example/db/seeds.rb
182
- - example/lib/assets/.keep
183
- - example/lib/tasks/.keep
184
- - example/log/.keep
185
- - example/package.json
186
- - example/public/404.html
187
- - example/public/422.html
188
- - example/public/500.html
189
- - example/public/apple-touch-icon-precomposed.png
190
- - example/public/apple-touch-icon.png
191
- - example/public/favicon.ico
192
- - example/public/robots.txt
193
- - example/storage/.keep
194
- - example/test/application_system_test_case.rb
195
- - example/test/controllers/.keep
196
- - example/test/controllers/products_controller_test.rb
197
- - example/test/controllers/test_cases_controller_test.rb
198
- - example/test/fixtures/.keep
199
- - example/test/fixtures/files/.keep
200
- - example/test/fixtures/products.yml
201
- - example/test/helpers/.keep
202
- - example/test/integration/.keep
203
- - example/test/mailers/.keep
204
- - example/test/models/.keep
205
- - example/test/models/product_test.rb
206
- - example/test/replacers/replace_active_record_test.rb
207
- - example/test/replacers/replace_sprokets_test.rb
208
- - example/test/system/.keep
209
- - example/test/system/products_test.rb
210
- - example/test/test_helper.rb
211
- - example/tmp/.keep
212
- - example/vendor/.keep
213
106
  - lib/tainted_love.rb
214
107
  - lib/tainted_love/configuration.rb
215
108
  - lib/tainted_love/replacer/base.rb
@@ -218,20 +111,32 @@ files:
218
111
  - lib/tainted_love/replacer/replace_active_record.rb
219
112
  - lib/tainted_love/replacer/replace_digest.rb
220
113
  - lib/tainted_love/replacer/replace_file.rb
114
+ - lib/tainted_love/replacer/replace_graphql.rb
221
115
  - lib/tainted_love/replacer/replace_kernel.rb
222
116
  - lib/tainted_love/replacer/replace_marshal.rb
223
117
  - lib/tainted_love/replacer/replace_object.rb
118
+ - lib/tainted_love/replacer/replace_rack_builder.rb
119
+ - lib/tainted_love/replacer/replace_rack_file.rb
120
+ - lib/tainted_love/replacer/replace_rack_query_parser.rb
224
121
  - lib/tainted_love/replacer/replace_rails_user_input.rb
225
122
  - lib/tainted_love/replacer/replace_sprokets.rb
123
+ - lib/tainted_love/replacer/replace_string.rb
124
+ - lib/tainted_love/replacer/replace_tag_builder.rb
226
125
  - lib/tainted_love/replacer/replace_yaml.rb
227
126
  - lib/tainted_love/reporter/base.rb
228
127
  - lib/tainted_love/reporter/file_reporter.rb
229
128
  - lib/tainted_love/reporter/stdout_reporter.rb
230
129
  - lib/tainted_love/stack_trace.rb
231
130
  - lib/tainted_love/utils.rb
131
+ - lib/tainted_love/utils/proxy.rb
132
+ - lib/tainted_love/validator/action_dispatch_diagnostics.rb
232
133
  - lib/tainted_love/validator/action_view_object_send.rb
134
+ - lib/tainted_love/validator/active_record_find.rb
233
135
  - lib/tainted_love/validator/base.rb
234
136
  - lib/tainted_love/validator/erb_eval.rb
137
+ - lib/tainted_love/validator/haml_eval.rb
138
+ - lib/tainted_love/validator/i18n_load.rb
139
+ - lib/tainted_love/validator/ignore.rb
235
140
  - lib/tainted_love/validator/rack_builder_eval.rb
236
141
  - lib/tainted_love/validator/railties_yaml_load.rb
237
142
  - lib/tainted_love/validator/rake_testtask.rb
@@ -240,13 +145,144 @@ files:
240
145
  - lib/tainted_love/validator/webpacker_yaml.rb
241
146
  - lib/tainted_love/version.rb
242
147
  - lib/tainted_love/warning.rb
148
+ - service.yml
243
149
  - tainted_love.gemspec
150
+ - tests/rails/.gitignore
151
+ - tests/rails/.ruby-version
152
+ - tests/rails/Gemfile
153
+ - tests/rails/Gemfile.lock
154
+ - tests/rails/README.md
155
+ - tests/rails/Rakefile
156
+ - tests/rails/app/assets/config/manifest.js
157
+ - tests/rails/app/assets/images/.keep
158
+ - tests/rails/app/assets/javascripts/application.js
159
+ - tests/rails/app/assets/javascripts/cable.js
160
+ - tests/rails/app/assets/javascripts/channels/.keep
161
+ - tests/rails/app/assets/javascripts/products.coffee
162
+ - tests/rails/app/assets/stylesheets/application.css
163
+ - tests/rails/app/assets/stylesheets/products.scss
164
+ - tests/rails/app/assets/stylesheets/scaffolds.scss
165
+ - tests/rails/app/channels/application_cable/channel.rb
166
+ - tests/rails/app/channels/application_cable/connection.rb
167
+ - tests/rails/app/controllers/application_controller.rb
168
+ - tests/rails/app/controllers/concerns/.keep
169
+ - tests/rails/app/controllers/graphql_controller.rb
170
+ - tests/rails/app/controllers/products_controller.rb
171
+ - tests/rails/app/controllers/test_cases_controller.rb
172
+ - tests/rails/app/graphql/example_schema.rb
173
+ - tests/rails/app/graphql/mutations/.keep
174
+ - tests/rails/app/graphql/types/.keep
175
+ - tests/rails/app/graphql/types/base_enum.rb
176
+ - tests/rails/app/graphql/types/base_input_object.rb
177
+ - tests/rails/app/graphql/types/base_interface.rb
178
+ - tests/rails/app/graphql/types/base_object.rb
179
+ - tests/rails/app/graphql/types/base_scalar.rb
180
+ - tests/rails/app/graphql/types/base_union.rb
181
+ - tests/rails/app/graphql/types/mutation_type.rb
182
+ - tests/rails/app/graphql/types/product_type.rb
183
+ - tests/rails/app/graphql/types/query_type.rb
184
+ - tests/rails/app/graphql/types/taint_test_case_input.rb
185
+ - tests/rails/app/helpers/application_helper.rb
186
+ - tests/rails/app/helpers/products_helper.rb
187
+ - tests/rails/app/helpers/test_cases_helper.rb
188
+ - tests/rails/app/jobs/application_job.rb
189
+ - tests/rails/app/mailers/application_mailer.rb
190
+ - tests/rails/app/models/application_record.rb
191
+ - tests/rails/app/models/concerns/.keep
192
+ - tests/rails/app/models/product.rb
193
+ - tests/rails/app/views/layouts/application.html.erb
194
+ - tests/rails/app/views/layouts/mailer.html.erb
195
+ - tests/rails/app/views/layouts/mailer.text.erb
196
+ - tests/rails/app/views/products/_form.html.erb
197
+ - tests/rails/app/views/products/_product.json.jbuilder
198
+ - tests/rails/app/views/products/edit.html.erb
199
+ - tests/rails/app/views/products/index.html.erb
200
+ - tests/rails/app/views/products/index.json.jbuilder
201
+ - tests/rails/app/views/products/new.html.erb
202
+ - tests/rails/app/views/products/show.html.erb
203
+ - tests/rails/app/views/products/show.json.jbuilder
204
+ - tests/rails/app/views/test_cases/xss.html.erb
205
+ - tests/rails/bin/bundle
206
+ - tests/rails/bin/rails
207
+ - tests/rails/bin/rake
208
+ - tests/rails/bin/setup
209
+ - tests/rails/bin/spring
210
+ - tests/rails/bin/update
211
+ - tests/rails/bin/yarn
212
+ - tests/rails/config.ru
213
+ - tests/rails/config/application.rb
214
+ - tests/rails/config/boot.rb
215
+ - tests/rails/config/cable.yml
216
+ - tests/rails/config/credentials.yml.enc
217
+ - tests/rails/config/database.yml
218
+ - tests/rails/config/environment.rb
219
+ - tests/rails/config/environments/development.rb
220
+ - tests/rails/config/environments/production.rb
221
+ - tests/rails/config/environments/test.rb
222
+ - tests/rails/config/initializers/application_controller_renderer.rb
223
+ - tests/rails/config/initializers/assets.rb
224
+ - tests/rails/config/initializers/backtrace_silencers.rb
225
+ - tests/rails/config/initializers/content_security_policy.rb
226
+ - tests/rails/config/initializers/cookies_serializer.rb
227
+ - tests/rails/config/initializers/filter_parameter_logging.rb
228
+ - tests/rails/config/initializers/inflections.rb
229
+ - tests/rails/config/initializers/mime_types.rb
230
+ - tests/rails/config/initializers/tainted_love.rb
231
+ - tests/rails/config/initializers/wrap_parameters.rb
232
+ - tests/rails/config/locales/en.yml
233
+ - tests/rails/config/puma.rb
234
+ - tests/rails/config/routes.rb
235
+ - tests/rails/config/spring.rb
236
+ - tests/rails/config/storage.yml
237
+ - tests/rails/db/migrate/20190311220346_create_products.rb
238
+ - tests/rails/db/schema.rb
239
+ - tests/rails/db/seeds.rb
240
+ - tests/rails/lib/assets/.keep
241
+ - tests/rails/lib/tasks/.keep
242
+ - tests/rails/log/.keep
243
+ - tests/rails/package.json
244
+ - tests/rails/public/404.html
245
+ - tests/rails/public/422.html
246
+ - tests/rails/public/500.html
247
+ - tests/rails/public/apple-touch-icon-precomposed.png
248
+ - tests/rails/public/apple-touch-icon.png
249
+ - tests/rails/public/favicon.ico
250
+ - tests/rails/public/robots.txt
251
+ - tests/rails/storage/.keep
252
+ - tests/rails/test.sh
253
+ - tests/rails/test/application_system_test_case.rb
254
+ - tests/rails/test/controllers/.keep
255
+ - tests/rails/test/controllers/graphql_controller_test.rb
256
+ - tests/rails/test/controllers/products_controller_test.rb
257
+ - tests/rails/test/controllers/test_cases_controller_test.rb
258
+ - tests/rails/test/fixtures/.keep
259
+ - tests/rails/test/fixtures/files/.keep
260
+ - tests/rails/test/fixtures/products.yml
261
+ - tests/rails/test/helpers/.keep
262
+ - tests/rails/test/integration/.keep
263
+ - tests/rails/test/mailers/.keep
264
+ - tests/rails/test/models/.keep
265
+ - tests/rails/test/models/product_test.rb
266
+ - tests/rails/test/replacers/replace_active_record_test.rb
267
+ - tests/rails/test/replacers/replace_rails_user_input_test.rb
268
+ - tests/rails/test/replacers/replace_sprokets_test.rb
269
+ - tests/rails/test/system/.keep
270
+ - tests/rails/test/system/products_test.rb
271
+ - tests/rails/test/test_helper.rb
272
+ - tests/rails/tmp/.keep
273
+ - tests/rails/vendor/.keep
274
+ - tests/sinatra/Gemfile
275
+ - tests/sinatra/Gemfile.lock
276
+ - tests/sinatra/app.rb
277
+ - tests/sinatra/test.sh
278
+ - tests/sinatra/views/xss.erb
244
279
  - tools/web/.gitignore
245
280
  - tools/web/Gemfile
246
281
  - tools/web/application.rb
247
282
  - tools/web/public/application.css
248
283
  - tools/web/public/application.js
249
284
  - tools/web/views/index.erb
285
+ - tools/web/views/input.erb
250
286
  - tools/web/views/layout.erb
251
287
  - tools/web/views/line.erb
252
288
  - tools/web/views/warning.erb
@@ -270,8 +306,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
270
306
  - !ruby/object:Gem::Version
271
307
  version: '0'
272
308
  requirements: []
273
- rubyforge_project:
274
- rubygems_version: 2.7.6
309
+ rubygems_version: 3.0.3
275
310
  signing_key:
276
311
  specification_version: 4
277
312
  summary: TaintedLove is a dynamic security analysis tool for Ruby