Skip to content

Commit 3c62271

Browse files
authored
fix casing of Api
1 parent c5db11e commit 3c62271

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

ruby/ql/src/experimental/decompression-api/DecompressionAPI.ql renamed to ruby/ql/src/experimental/decompression-api/DecompressionApi.ql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ import codeql.ruby.dataflow.BarrierGuards
1717
import codeql.ruby.TaintTracking
1818
import DataFlow::PathGraph
1919

20-
class DecompressionAPIUse extends DataFlow::Node {
20+
class DecompressionApiUse extends DataFlow::Node {
2121

2222
// this should find the first argument of Zlib::Inflate.inflate or Zip::File.extract
23-
DecompressionAPIUse() {
23+
DecompressionApiUse() {
2424
this = API::getTopLevelMember("Zlib").getMember("Inflate").getAMethodCall("inflate").getArgument(0) or
2525
this = API::getTopLevelMember("Zip").getMember("File").getAMethodCall("open").getArgument(0) or
2626
this = API::getTopLevelMember("Zip").getMember("Entry").getAMethodCall("extract").getArgument(0)
@@ -29,7 +29,7 @@ class DecompressionAPIUse extends DataFlow::Node {
2929
}
3030

3131
class Configuration extends TaintTracking::Configuration {
32-
Configuration() { this = "DecompressionAPIUse" }
32+
Configuration() { this = "DecompressionApiUse" }
3333

3434
// this predicate will be used to contstrain our query to find instances where only remote user-controlled data flows to the sink
3535
override predicate isSource(DataFlow::Node source) {
@@ -38,7 +38,7 @@ class Configuration extends TaintTracking::Configuration {
3838

3939
// our Decompression APIs defined above will the the sinks we use for this query
4040
override predicate isSink(DataFlow::Node sink) {
41-
sink instanceof DecompressionAPIUse
41+
sink instanceof DecompressionApiUse
4242
}
4343

4444
// I think it would also be helpful to reduce false positives by adding a simple sanitizer config in the event

ruby/ql/test/query-tests/security/decompression-api/DecompressionAPI.qlref

Lines changed: 0 additions & 1 deletion
This file was deleted.

ruby/ql/test/query-tests/security/decompression-api/DecompressionAPI.expected renamed to ruby/ql/test/query-tests/security/decompression-api/DecompressionApi.expected

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ nodes
1111
| decompression_api.rb:17:24:17:37 | ...[...] | semmle.label | ...[...] |
1212
subpaths
1313
#select
14-
| decompression_api.rb:3:31:3:44 | ...[...] | decompression_api.rb:3:31:3:36 | call to params : | decompression_api.rb:3:31:3:44 | ...[...] | This call to $@ is unsafe because user-controlled data is used to set the object being decompressed, which could lead to a denial of service attack or malicious code extracted from an unknown source. | call to inflate | decompression_api.rb:3:9:3:45 | call to inflate |
15-
| decompression_api.rb:13:44:13:57 | ...[...] | decompression_api.rb:13:44:13:49 | call to params : | decompression_api.rb:13:44:13:57 | ...[...] | This call to $@ is unsafe because user-controlled data is used to set the object being decompressed, which could lead to a denial of service attack or malicious code extracted from an unknown source. | call to inflate | decompression_api.rb:13:9:13:58 | call to inflate |
16-
| decompression_api.rb:17:24:17:37 | ...[...] | decompression_api.rb:17:24:17:29 | call to params : | decompression_api.rb:17:24:17:37 | ...[...] | This call to $@ is unsafe because user-controlled data is used to set the object being decompressed, which could lead to a denial of service attack or malicious code extracted from an unknown source. | call to open | decompression_api.rb:17:9:21:11 | call to open |
14+
| decompression_api.rb:3:31:3:44 | ...[...] | decompression_api.rb:3:31:3:36 | call to params : | decompression_api.rb:3:31:3:44 | ...[...] | This call to $@ is unsafe because user-controlled data is used to set the object being decompressed, which could lead to a denial of service attack or malicious code extracted from an unknown source. | call to inflate | call to inflate |
15+
| decompression_api.rb:13:44:13:57 | ...[...] | decompression_api.rb:13:44:13:49 | call to params : | decompression_api.rb:13:44:13:57 | ...[...] | This call to $@ is unsafe because user-controlled data is used to set the object being decompressed, which could lead to a denial of service attack or malicious code extracted from an unknown source. | call to inflate | call to inflate |
16+
| decompression_api.rb:17:24:17:37 | ...[...] | decompression_api.rb:17:24:17:29 | call to params : | decompression_api.rb:17:24:17:37 | ...[...] | This call to $@ is unsafe because user-controlled data is used to set the object being decompressed, which could lead to a denial of service attack or malicious code extracted from an unknown source. | call to open | call to open |
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
experimental/decompression-api/DecompressionApi.ql

0 commit comments

Comments
 (0)