ocurity / dracon

Security scanning & static analysis tool - forked and rewritten from @thought-machine/dracon
https://ocurity.com
Apache License 2.0
61 stars 8 forks source link

Bug: Producers Fail if Unable to Extract Code #207

Closed flowirtz closed 3 weeks ago

flowirtz commented 4 weeks ago

Currently some producers fail if they are unable to extract the code correctly, e.g. see this snippet from producers/semgrep/main.go:76:

        cs, err := context.ExtractCode(iss)
        if err != nil {
            return nil, err
        }
        iss.ContextSegment = &cs

Instead, we should log a warning, and just keep the ContextSegment empty.