@@ -23,14 +23,16 @@ import (
23
23
"golang.org/x/vulndb/internal/osv"
24
24
"golang.org/x/vulndb/internal/proxy"
25
25
"golang.org/x/vulndb/internal/report"
26
+ "golang.org/x/vulndb/internal/symbols"
26
27
)
27
28
28
29
var (
29
- preferCVE = flag .Bool ("cve" , false , "for create, prefer CVEs over GHSAs as canonical source" )
30
- closedOk = flag .Bool ("closed-ok" , false , "for create & create-excluded, allow closed issues to be created" )
31
- graphQL = flag .Bool ("graphql" , false , "for create, fetch GHSAs from the Github GraphQL API instead of the OSV database" )
32
- issueRepo = flag .String ("issue-repo" , "github.com/golang/vulndb" , "for create, repo locate Github issues" )
33
- useAI = flag .Bool ("ai" , false , "for create, use AI to write draft summary and description when creating report" )
30
+ preferCVE = flag .Bool ("cve" , false , "for create, prefer CVEs over GHSAs as canonical source" )
31
+ closedOk = flag .Bool ("closed-ok" , false , "for create & create-excluded, allow closed issues to be created" )
32
+ graphQL = flag .Bool ("graphql" , false , "for create, fetch GHSAs from the Github GraphQL API instead of the OSV database" )
33
+ issueRepo = flag .String ("issue-repo" , "github.com/golang/vulndb" , "for create, repo locate Github issues" )
34
+ useAI = flag .Bool ("ai" , false , "for create, use AI to write draft summary and description when creating report" )
35
+ populateSymbols = flag .Bool ("symbols" , false , "for create, attempt to auto-populate symbols" )
34
36
)
35
37
36
38
type create struct {
@@ -227,6 +229,12 @@ func reportFromAliases(ctx context.Context, id, modulePath string, aliases []str
227
229
}
228
230
}
229
231
232
+ if * populateSymbols {
233
+ if err := symbols .Populate (r , log .Err ); err != nil {
234
+ log .Warnf ("could not auto-populate symbols: %s" , err )
235
+ }
236
+ }
237
+
230
238
return r , nil
231
239
}
232
240
0 commit comments