Open krasnopg opened 1 year ago
Hi @krasnopg, your proposed steps should work :+1:
If I had to make this change, I would add to the set of sources by extending the Source class defined in UnsafeDeserializationCustomizations.qll, like we do for RemoteFlowSource. You could even put this new class of yours (extending the Source class) in Customizations.qll, which is the best way of modifying behavior we have right now.
Our field team has built some functionality for deploying such modifications. I'm not personally 100% on top of how it works, but you can read more about it here: https://github.com/advanced-security/codeql-bundle-action
Hi,
I am analysing python code in terms of vulnerability CWE-502 and am running query UnsafeDeserialization.ql for this purpose. Now I would like to adapt the query to extend to more sources of untrusted data, namely:
def unsafe_load(filename): with open(filename) as untrusted: return yaml.load(untrusted)
import yaml
def unsafe_load(untrusted): return yaml.load(untrusted)