Skip to content

Commit 06e435f

Browse files
committed
Ruby: remove YAML.load_file arg0 as an unsafe deserialization sink
1 parent d94b196 commit 06e435f

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

ruby/ql/lib/codeql/ruby/security/UnsafeDeserializationCustomizations.qll

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,16 +48,13 @@ module UnsafeDeserialization {
4848
}
4949

5050
/**
51-
* An argument in a call to `YAML.load` or `YAML.load_file`, considered a sink
51+
* An argument in a call to `YAML.load`, considered a sink
5252
* for unsafe deserialization. The `YAML` module is an alias of `Psych` in
5353
* recent versions of Ruby.
5454
*/
5555
class YamlLoadArgument extends Sink {
5656
YamlLoadArgument() {
57-
this =
58-
API::getTopLevelMember(["YAML", "Psych"])
59-
.getAMethodCall(["load", "load_file"])
60-
.getArgument(0)
57+
this = API::getTopLevelMember(["YAML", "Psych"]).getAMethodCall("load").getArgument(0)
6158
}
6259
}
6360

0 commit comments

Comments
 (0)