This matches any line that contains `if` followed by `has` followed by `then` followed by `add`, for example. This is woefully insufficient for actually detecting TOCTOU, and even worse, will flag many many things as false positives.
Now the real problem is, that the author states that this will solve all your problems (literally), providing a completely false sense of security...
There is this check [here](https://github.com/TheAuditorTool/Auditor/blob/2a3565ad38ece...), labelled "Time-of-check-time-of-use (TOCTOU) race condition pattern".
It reads:
`if.\b(exists?|has|contains|includes)\b.then.*\b(create|add|insert|write)\b`
This matches any line that contains `if` followed by `has` followed by `then` followed by `add`, for example. This is woefully insufficient for actually detecting TOCTOU, and even worse, will flag many many things as false positives.
Now the real problem is, that the author states that this will solve all your problems (literally), providing a completely false sense of security...