Looking for line level localization

#5
by sardsec - opened

Hello Found AI team,

First off, congratulations on the release, the coupling - model + cli is quite good.
It produces some findings quite well. Ran it on juice shop and some custom code for testing.

I noticed that there is not line level findings, i.e it just says file x is vulnerable - high/med/low for a CWE number. Any ideas on how to actually get the lines that are vulnerable.
I am looking into the traces folder for now, trying to corelate the final ranked output and the traces , if it exists - pick up the string from there.

Also, the 3B Model might make better regexes, not sure, this one fails quite a bit on regexes (like me!).

Please let me know if you've got ideas.

Thank you!

Cisco Foundation AI org

Hi @sardsec ,

Thanks for the kind words, and for running it against juice shop and your own code. On line-level: you've read it right, the model works at file granularity, that's what it was trained and rewarded against (our labels mark affected files, not spans), so it doesn't have a "line X is the vuln" to hand you yet. Correlating the ranked output with the traces, like you're already doing, is honestly the best handle right now. The commands the agent ran on its way to flagging a file tend to be the closest proxy for where it was looking, so that's the direction I'd go too.

The bigger signal for us is clear though: people want tighter-than-file output, and getting to line or region level is high on the list for the next iteration, so hang tight. On the regexes, yeah, that tracks. One thing that might help you get more out of it in the meantime: we've seen performance swing a fair bit with the inference setup, vLLM version especially (we ran against 0.19.1, and mismatches there have moved numbers noticeably for us and others), so pinning that plus the suggested max output tokens is worth a shot. Appreciate you writing all this up so clearly, this is exactly the kind of feedback that shows us where to push next, so keep it coming.

AmanPriyanshu-Cisco changed discussion status to closed

Hi @AmanPriyanshu-Cisco ,

Thank you for taking the time to respond.

If line level localization is indeed the next iteration, I have one research direction that is worth looking into: Graph Transformers.

Being hardware poor I cant explore it on the scale that is needed.
But since you all have access H100s - I assume you can finesse a solution using coding harnesses, and some data engineering.

Sign up or log in to comment