-
Hi, I would like to identify a source that points to an archive. filename1 = "/home/user/archive.zip"
from pathlib import Path
filename2 = Path("/home/user/archive.zip") I have tried this query as a starting point: import semmle.python.Concepts
from DataFlow::Node source
where source = any(FileSystemAccess fa).getAPathArgument()
select source But it seems the query would identify "data-flow nodes that perform a file system access" and not something "fixed". Please any indication or help is a welcome to locate |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I went with the Thank you |
Beta Was this translation helpful? Give feedback.
-
If you want to find all string literals ending in ".zip" the following would work.
Then if you used taint-flow you would see |
Beta Was this translation helpful? Give feedback.
If you want to find all string literals ending in ".zip" the following would work.
Then if you used taint-flow you would see
filename2
was also tainted and therefore get similar results to if filename2 was the source.