mirror of
https://github.com/github/codeql.git
synced 2026-06-29 16:47:09 +02:00
Ruby: Address inline expectation testFailures.
This commit is contained in:
@@ -28,8 +28,6 @@ nodes
|
||||
| string_flow.rb:227:10:227:10 | a | semmle.label | a |
|
||||
subpaths
|
||||
testFailures
|
||||
| string_flow.rb:85:10:85:10 | a | Unexpected result: hasValueFlow=a |
|
||||
| string_flow.rb:227:10:227:10 | a | Unexpected result: hasValueFlow=a |
|
||||
#select
|
||||
| string_flow.rb:3:10:3:22 | call to new | string_flow.rb:2:9:2:18 | call to source | string_flow.rb:3:10:3:22 | call to new | $@ | string_flow.rb:2:9:2:18 | call to source | call to source |
|
||||
| string_flow.rb:85:10:85:10 | a | string_flow.rb:83:9:83:18 | call to source | string_flow.rb:85:10:85:10 | a | $@ | string_flow.rb:83:9:83:18 | call to source | call to source |
|
||||
|
||||
@@ -82,7 +82,7 @@ end
|
||||
def m_clear
|
||||
a = source "a"
|
||||
a.clear
|
||||
sink a
|
||||
sink a # $ SPURIOUS: hasValueFlow=a
|
||||
end
|
||||
|
||||
# concat and prepend omitted because they clash with the summaries for
|
||||
@@ -224,7 +224,7 @@ def m_replace
|
||||
b = source "b"
|
||||
sink a.replace(b) # $ hasTaintFlow=b
|
||||
# TODO: currently we get value flow for a, because we don't clear content
|
||||
sink a # $ hasTaintFlow=b
|
||||
sink a # $ hasTaintFlow=b SPURIOUS: hasValueFlow=a
|
||||
end
|
||||
|
||||
def m_reverse
|
||||
@@ -316,4 +316,4 @@ def m_upto(i)
|
||||
a.upto("b", true) { |x| sink x } # $ hasTaintFlow=a
|
||||
"b".upto(a) { |x| sink x } # $ hasTaintFlow=a
|
||||
"b".upto(a, true) { |x| sink x }
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user