File tree Expand file tree Collapse file tree 4 files changed +15
-0
lines changed
Expand file tree Collapse file tree 4 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,9 @@ import (
2525 _ "net/http/pprof" //nolint:gosec
2626 "strings"
2727
28+ "github.com/google/osv-scanner/pkg/osv"
2829 "go.opencensus.io/stats/view"
30+ "sigs.k8s.io/release-utils/version"
2931
3032 "github.com/ossf/scorecard/v5/checker"
3133 "github.com/ossf/scorecard/v5/clients"
@@ -325,6 +327,8 @@ func startMetricsExporter() (monitoring.Exporter, error) {
325327}
326328
327329func main () {
330+ info := version .GetVersionInfo ()
331+ osv .RequestUserAgent = fmt .Sprintf ("scorecard-cron/%s" , info .GitVersion )
328332 flag .Parse ()
329333 if err := config .ReadConfig (); err != nil {
330334 panic (err )
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ require (
4141 github.com/caarlos0/env/v6 v6.10.1
4242 github.com/gobwas/glob v0.2.3
4343 github.com/google/go-github/v53 v53.2.0
44+ github.com/google/osv-scanner v1.9.2
4445 github.com/google/osv-scanner/v2 v2.2.4
4546 github.com/hmarr/codeowners v1.2.1
4647 github.com/in-toto/attestation v1.1.2
Original file line number Diff line number Diff line change @@ -537,6 +537,8 @@ github.com/google/martian/v3 v3.3.3 h1:DIhPTQrbPkgs2yJYdXU/eNACCG5DVQjySNRNlflZ9
537537github.com/google/martian/v3 v3.3.3 /go.mod h1:iEPrYcgCF7jA9OtScMFQyAlZZ4YXTKEtJ1E6RWzmBA0 =
538538github.com/google/osv-scalibr v0.3.7-0.20251023161426-90e9ac9cc1b3 h1:JNLsaIi+lHdzsKoxcDmMBZCbE/qKi/mt9N3eQRxrThc =
539539github.com/google/osv-scalibr v0.3.7-0.20251023161426-90e9ac9cc1b3 /go.mod h1:XN3PWSKiShu3MXb+9nGtwLGHWXarZ/0lfbovOhPKTRc =
540+ github.com/google/osv-scanner v1.9.2 h1:N5Arl9SA75afbjmX8mKURgOIaKyuK3NUjCaxDlj1KHI =
541+ github.com/google/osv-scanner v1.9.2 /go.mod h1:ZTL8Dp9z/7Jr9kkQSOGqo8z6Csqt83qMIr58aZVx+pM =
540542github.com/google/osv-scanner/v2 v2.2.4 h1:VMaaQ+ZlMPxeIVNa9+Gnabac89+QvUsDWCMv4jfNhDY =
541543github.com/google/osv-scanner/v2 v2.2.4 /go.mod h1:283VGGCrxkTa54P0FArsparfNzHdllI5UH4DwlLhobs =
542544github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57 /go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc =
@@ -806,6 +808,8 @@ github.com/otiai10/copy v1.14.1 h1:5/7E6qsUMBaH5AnQ0sSLzzTg1oTECmcCmT6lvF45Na8=
806808github.com/otiai10/copy v1.14.1 /go.mod h1:oQwrEDDOci3IM8dJF0d8+jnbfPDllW6vUjNc3DoZm9I =
807809github.com/otiai10/mint v1.6.3 h1:87qsV/aw1F5as1eH1zS/yqHY85ANKVMgkDrf9rcxbQs =
808810github.com/otiai10/mint v1.6.3 /go.mod h1:MJm72SBthJjz8qhefc4z1PYEieWmy8Bku7CjcAqyUSM =
811+ github.com/owenrumney/go-sarif/v2 v2.3.3 h1:ubWDJcF5i3L/EIOER+ZyQ03IfplbSU1BLOE26uKQIIU =
812+ github.com/owenrumney/go-sarif/v2 v2.3.3 /go.mod h1:MSqMMx9WqlBSY7pXoOZWgEsVB4FDNfhcaXDA1j6Sr+w =
809813github.com/owenrumney/go-sarif/v3 v3.2.3 h1:n6mdX5ugKwCrZInvBsf6WumXmpAe3mbmQXgkXlIq34U =
810814github.com/owenrumney/go-sarif/v3 v3.2.3 /go.mod h1:1bV7t8SZg7pX41spaDkEUs8/yEjzk9JapztMoX1XNjg =
811815github.com/package-url/packageurl-go v0.1.3 h1:4juMED3hHiz0set3Vq3KeQ75KD1avthoXLtmE3I0PLs =
Original file line number Diff line number Diff line change 1616package main
1717
1818import (
19+ "fmt"
1920 "log"
2021
22+ "github.com/google/osv-scanner/pkg/osv"
23+ "sigs.k8s.io/release-utils/version"
24+
2125 "github.com/ossf/scorecard/v5/cmd"
2226 "github.com/ossf/scorecard/v5/options"
2327)
2428
2529func main () {
30+ info := version .GetVersionInfo ()
31+ osv .RequestUserAgent = fmt .Sprintf ("scorecard-cron/%s" , info .GitVersion )
2632 opts := options .New ()
2733 if err := cmd .New (opts ).Execute (); err != nil {
2834 log .Fatalf ("error during command execution: %v" , err )
You can’t perform that action at this time.
0 commit comments