isSanitizerGuard is not works, what should i do? #15543
|
I'm a fishman who learning about codeql to find vulnerabilities for nodejs express My nodejs snippet like below It has a flow path from express of req to exec. But req.query has been sanitized by validateFileName function. |
Answered by
aeisenberg
Feb 7, 2024
Replies: 1 comment 1 reply
|
It looks like |
1 reply
Answer selected by
potats0
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It looks like
exec(cmdAddZip)is being executed even if!validateFileName(zipfilename)is true. I think you need to add anelseblock to the if statement where you cllexec(cmdAddZip).