Skip to content

cpp/path-injection Overhaul #60

Open
@bdrodes

Description

@bdrodes

I received false positive reports on https://github.com/microsoft/codeql/blob/bbdf97e8f3acb64be15ca59a3ae3366cd6fc8cd5/cpp/ql/src/Security/CWE/CWE-022/TaintedPath.ql
(cpp/path-injection). The users were attempting to filter the paths by looking for ".." but the path still appears vulnerable. One example provided was something like this if (pathString.find("..") != std::string::npos). Generally, the query relies on hasUpperBoundCheck, but this may need to be updated to match similar queries in other languages.

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions