It is a largely a skill issue.
My first litmus test is: is the codebase using the standard library? If so, it's probably insecure garbage.
Nothing in libc is usable in a high quality code base, hell not even the humble sin() function is sensible with its retarded errno nonsense.