Add cron jobs to service
This commit is contained in:
1
vendor/golang.org/x/vuln/internal/buildinfo/additions_buildinfo.go
generated
vendored
1
vendor/golang.org/x/vuln/internal/buildinfo/additions_buildinfo.go
generated
vendored
@@ -3,7 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build go1.18
|
||||
// +build go1.18
|
||||
|
||||
package buildinfo
|
||||
|
||||
|
||||
1
vendor/golang.org/x/vuln/internal/buildinfo/additions_scan.go
generated
vendored
1
vendor/golang.org/x/vuln/internal/buildinfo/additions_scan.go
generated
vendored
@@ -3,7 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build go1.18
|
||||
// +build go1.18
|
||||
|
||||
package buildinfo
|
||||
|
||||
|
||||
1
vendor/golang.org/x/vuln/internal/buildinfo/buildinfo.go
generated
vendored
1
vendor/golang.org/x/vuln/internal/buildinfo/buildinfo.go
generated
vendored
@@ -3,7 +3,6 @@
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
//go:build go1.18
|
||||
// +build go1.18
|
||||
|
||||
package buildinfo
|
||||
|
||||
|
||||
14
vendor/golang.org/x/vuln/internal/scan/errors.go
generated
vendored
14
vendor/golang.org/x/vuln/internal/scan/errors.go
generated
vendored
@@ -11,7 +11,7 @@ import (
|
||||
|
||||
//lint:file-ignore ST1005 Ignore staticcheck message about error formatting
|
||||
var (
|
||||
// ErrVulnerabilitiesFound indicates that vulnerabilities were detected
|
||||
// errVulnerabilitiesFound indicates that vulnerabilities were detected
|
||||
// when running govulncheck. This returns exit status 3 when running
|
||||
// without the -json flag.
|
||||
errVulnerabilitiesFound = &exitCodeError{message: "vulnerabilities found", code: 3}
|
||||
@@ -25,6 +25,18 @@ var (
|
||||
// govulncheck and exit with status 2.
|
||||
errUsage = &exitCodeError{message: "invalid usage", code: 2}
|
||||
|
||||
// errNoPatterns indicates that no package patterns were provided if the scan level is WantPackages.
|
||||
errNoPatterns = &exitCodeError{
|
||||
message: "no package patterns provided\n\nTo scan the current module, run: govulncheck ./...",
|
||||
code: 2,
|
||||
}
|
||||
|
||||
// errNoPackagesMatched indicates that the provided patterns matched no packages if scan level is WantPackages.
|
||||
errNoPackagesMatched = &exitCodeError{
|
||||
message: "no packages matched the provided patterns",
|
||||
code: 2,
|
||||
}
|
||||
|
||||
// errGoVersionMismatch is used to indicate that there is a mismatch between
|
||||
// the Go version used to build govulncheck and the one currently on PATH.
|
||||
errGoVersionMismatch = errors.New(`Loading packages failed, possibly due to a mismatch between the Go version
|
||||
|
||||
2
vendor/golang.org/x/vuln/internal/scan/flags.go
generated
vendored
2
vendor/golang.org/x/vuln/internal/scan/flags.go
generated
vendored
@@ -25,6 +25,7 @@ type config struct {
|
||||
test bool
|
||||
show ShowFlag
|
||||
format FormatFlag
|
||||
version bool
|
||||
env []string
|
||||
}
|
||||
|
||||
@@ -72,6 +73,7 @@ Usage:
|
||||
cfg.patterns = flags.Args()
|
||||
if version {
|
||||
cfg.show = append(cfg.show, "version")
|
||||
cfg.version = true
|
||||
}
|
||||
cfg.ScanLevel = govulncheck.ScanLevel(scanFlag)
|
||||
cfg.ScanMode = govulncheck.ScanMode(modeFlag)
|
||||
|
||||
6
vendor/golang.org/x/vuln/internal/scan/run.go
generated
vendored
6
vendor/golang.org/x/vuln/internal/scan/run.go
generated
vendored
@@ -55,6 +55,12 @@ func RunGovulncheck(ctx context.Context, env []string, r io.Reader, stdout io.Wr
|
||||
return err
|
||||
}
|
||||
|
||||
if cfg.version {
|
||||
// If the -version flag is passed, exit before doing anything else. This is different than
|
||||
// passing -show which includes "version".
|
||||
return nil
|
||||
}
|
||||
|
||||
incTelemetryFlagCounters(cfg)
|
||||
|
||||
switch cfg.ScanMode {
|
||||
|
||||
4
vendor/golang.org/x/vuln/internal/scan/source.go
generated
vendored
4
vendor/golang.org/x/vuln/internal/scan/source.go
generated
vendored
@@ -24,7 +24,7 @@ func runSource(ctx context.Context, handler govulncheck.Handler, cfg *config, cl
|
||||
defer derrors.Wrap(&err, "govulncheck")
|
||||
|
||||
if cfg.ScanLevel.WantPackages() && len(cfg.patterns) == 0 {
|
||||
return nil // don't throw an error here
|
||||
return errNoPatterns
|
||||
}
|
||||
if !gomodExists(dir) {
|
||||
return errNoGoMod
|
||||
@@ -43,7 +43,7 @@ func runSource(ctx context.Context, handler govulncheck.Handler, cfg *config, cl
|
||||
}
|
||||
|
||||
if cfg.ScanLevel.WantPackages() && len(graph.TopPkgs()) == 0 {
|
||||
return nil // early exit
|
||||
return errNoPackagesMatched
|
||||
}
|
||||
return vulncheck.Source(ctx, handler, &cfg.Config, client, graph)
|
||||
}
|
||||
|
||||
2
vendor/golang.org/x/vuln/internal/vulncheck/utils.go
generated
vendored
2
vendor/golang.org/x/vuln/internal/vulncheck/utils.go
generated
vendored
@@ -93,7 +93,7 @@ func callGraph(ctx context.Context, prog *ssa.Program, entries []*ssa.Function)
|
||||
// - pointer designation * is skipped
|
||||
// - full path prefix is skipped as well
|
||||
func dbTypeFormat(t types.Type) string {
|
||||
switch tt := t.(type) {
|
||||
switch tt := types.Unalias(t).(type) {
|
||||
case *types.Pointer:
|
||||
return dbTypeFormat(tt.Elem())
|
||||
case *types.Named:
|
||||
|
||||
Reference in New Issue
Block a user