I want to use flawfinder for my merge requests, thus analyzing only the code that change. I saw that flawfinder supports patches, so I thought it would be really easy.
Thing is : I'm unable to make it work with git patch. Flawfinder does recognize it's a git patch, it does scan only the needed files, but there are no hits. If I run flawfinder without the patch argument and check the hits on the changed file, I do see some hits, in the new lines added. I tried with a diff from svn : works like a charm. With no diff at all : same. With a diff from git : no way to make it works.
If someone has an idea, I'll gladly take it. Or an example.
Quick commands to reproduce :
git diff --patch --output PATCH
flawfinder --patch PATCH <dir>
I got on the output :
Examining <dir>/<file.c>
FINAL RESULTS:
ANALYSIS SUMMARY:
No hits found.