mirror of
https://github.com/github/codeql.git
synced 2026-05-16 04:09:27 +02:00
Remove additional path-injection sinks
This commit is contained in:
committed by
github-actions[bot]
parent
ef85fc6ac2
commit
fe1104e651
@@ -493,10 +493,10 @@ module NodeJSLib {
|
||||
*/
|
||||
module FS {
|
||||
/**
|
||||
* Gets a member `member` from module `fs` or its drop-in replacements `graceful-fs`, `fs-extra`, `original-fs`.
|
||||
* A member `member` from module `fs`.
|
||||
*/
|
||||
DataFlow::SourceNode moduleMember(string member) {
|
||||
exists(string moduleName | moduleName = ["fs-extra", "graceful-fs", "fs"] |
|
||||
exists(string moduleName | moduleName = ["fs"] |
|
||||
result = DataFlow::moduleMember(moduleName, member)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -34,25 +34,8 @@ module ParseTorrent {
|
||||
/**
|
||||
* An access to user-controlled torrent information.
|
||||
*/
|
||||
class UserControlledTorrentInfo extends RemoteFlowSource instanceof DataFlow::PropRead {
|
||||
UserControlledTorrentInfo() {
|
||||
exists(API::Node read |
|
||||
read = any(ParsedTorrent t).asApiNode().getAMember() and
|
||||
this = read.getAnImmediateUse()
|
||||
|
|
||||
exists(string prop |
|
||||
not (
|
||||
prop = "private" or
|
||||
prop = "infoHash" or
|
||||
prop = "length"
|
||||
// "pieceLength" and "lastPieceLength" are not guaranteed to be numbers as of commit ae3ad15d
|
||||
) and
|
||||
super.getPropertyName() = prop
|
||||
)
|
||||
or
|
||||
not exists(super.getPropertyName())
|
||||
)
|
||||
}
|
||||
class UserControlledTorrentInfo extends RemoteFlowSource {
|
||||
UserControlledTorrentInfo() { none() }
|
||||
|
||||
override string getSourceType() { result = "torrent information" }
|
||||
}
|
||||
|
||||
@@ -624,8 +624,6 @@ module TaintedPath {
|
||||
(
|
||||
this = fileSystemAccess.getAPathArgument() and
|
||||
not exists(fileSystemAccess.getRootPathArgument())
|
||||
or
|
||||
this = fileSystemAccess.getRootPathArgument()
|
||||
) and
|
||||
not this = any(ResolvingPathCall call).getInput()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user