Not sure that Trivy was doing that itself but zizmor is probably better than starting with an LLM :
https://github.com/zizmorcore/zizmor