How to check argument value with regex?
Opened this issue · 1 comments
IgorInk commented
Hi. How can I check some argument value with mariana?
For example, I need to check Cipher.getInstanse(v) argument value with some regex pattern (AES/CBC/* etc)
I'm defining this model for sink:
"find": "methods",
"where": [
{
"constraint": "is_static",
"value": true
},
{
"constraint": "signature",
"pattern": "Ljavax/crypto/Cipher;\\.getInstance:\\(Ljava/lang/String;\\)Ljavax/crypto/Cipher;"
}
],
"model": {
"for_all_parameters": [
{
"variable": "idx",
"where": [
],
"sinks": [
{
"kind": "CryptoTransformation",
"port": "Argument(0)",
"via_value_of": [
"Argument(0)"
]
}
]
}
]
}
How can I check Argument(0) value with the regex?
Thanks