Ruby: Fix/accept extraction errors

This commit is contained in:
Tom Hvitved
2024-06-04 11:37:23 +02:00
parent 858c7cead2
commit ad99158838
7 changed files with 17 additions and 6 deletions

View File

@@ -0,0 +1,2 @@
extractionError
| calls/calls.rb:8:1:8:2 | A parse error occurred. Check the syntax of the file. If the file is invalid, correct the error or exclude the file from analysis. |

View File

@@ -0,0 +1,2 @@
extractionError
| calls.rb:8:1:8:2 | A parse error occurred. Check the syntax of the file. If the file is invalid, correct the error or exclude the file from analysis. |

View File

@@ -0,0 +1,3 @@
extractionError
| semantics.rb:36:18:36:23 | A parse error occurred. Check the syntax of the file. If the file is invalid, correct the error or exclude the file from analysis. |
| semantics.rb:36:35:36:40 | A parse error occurred. Check the syntax of the file. If the file is invalid, correct the error or exclude the file from analysis. |

View File

@@ -20,7 +20,7 @@ sink(tainted3) # $ hasValueFlow=tainted
tainted4 = Foo.firstArg(tainted)
sink(tainted4) # $ hasTaintFlow=tainted
notTainted = Foo.firstArg(nil, tainted))
notTainted = Foo.firstArg(nil, tainted)
sink(notTainted)
tainted5 = Foo.secondArg(nil, tainted)

View File

@@ -0,0 +1,2 @@
extractionError
| app/views/foo/bars/show.html.erb:10:8:11:7 | A parse error occurred. Check the syntax of the file. If the file is invalid, correct the error or exclude the file from analysis. |

View File

@@ -0,0 +1,2 @@
extractionError
| src/not_ruby.rb:5:25:5:26 | A parse error occurred. Check the syntax of the file. If the file is invalid, correct the error or exclude the file from analysis. |

View File

@@ -18,23 +18,23 @@ git_source(:j) { |name| "unknown://github.com/#{name}" } # GOOD
git_source(:k) do |name|
foo
"https://github.com/#{name}" } # GOOD
"https://github.com/#{name}" # GOOD
end
git_source(:l) do |name|
foo
"http://github.com/#{name}" } # $result=BAD
"http://github.com/#{name}" # $result=BAD
end
git_source(:m) do |name|
foo
"ftp://github.com/#{name}" } # $result=BAD
"ftp://github.com/#{name}" # $result=BAD
end
git_source(:n) do |name|
foo
"ftps://github.com/#{name}" } # GOOD
"ftps://github.com/#{name}" # GOOD
end
git_source(:o) do |name|
foo
"unknown://github.com/#{name}" } # GOOD
"unknown://github.com/#{name}" # GOOD
end
gem "jwt", "1.2.3", git: "https://github.com/jwt/ruby-jwt" # GOOD