Skip to content

Commit bd7dc9d

Browse files
tatianabTatiana Bradley
authored andcommitted
internal/worker: remove scan-modules code
Removes code to scan modules for vulnerabilities, as it is now obsolete. Change-Id: Ib5fe0f34f2d53709fe05db582e74e94b930b37a5 Reviewed-on: https://go-review.googlesource.com/c/vulndb/+/459836 Reviewed-by: Tatiana Bradley <[email protected]> Run-TryBot: Tatiana Bradley <[email protected]> Reviewed-by: Roland Shoemaker <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
1 parent 7c32a36 commit bd7dc9d

File tree

4 files changed

+0
-363
lines changed

4 files changed

+0
-363
lines changed

cmd/worker/main.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ func main() {
6969
fmt.Fprintln(out, " list-cves TRIAGE_STATE: display info about CVE records")
7070
fmt.Fprintln(out, " create-issues: create issues for CVEs that need them")
7171
fmt.Fprintln(out, " show ID1 ID2 ...: display CVE records")
72-
fmt.Fprintln(out, " scan-modules: scan modules for vulnerabilities")
7372
fmt.Fprintln(out, "flags:")
7473
flag.PrintDefaults()
7574
}
@@ -139,8 +138,6 @@ func runCommandLine(ctx context.Context) error {
139138
return createIssuesCommand(ctx)
140139
case "show":
141140
return showCommand(ctx, flag.Args()[1:])
142-
case "scan-modules":
143-
return scanModulesCommand(ctx)
144141
default:
145142
return fmt.Errorf("unknown command: %q", flag.Arg(1))
146143
}
@@ -288,10 +285,6 @@ func showCommand(ctx context.Context, ids []string) error {
288285
return nil
289286
}
290287

291-
func scanModulesCommand(ctx context.Context) error {
292-
return worker.ScanModules(ctx, cfg.Store, *force)
293-
}
294-
295288
func die(format string, args ...interface{}) {
296289
fmt.Fprintf(os.Stderr, format, args...)
297290
fmt.Fprintln(os.Stderr)

internal/worker/scan_modules.go

Lines changed: 0 additions & 267 deletions
This file was deleted.

internal/worker/scan_modules_test.go

Lines changed: 0 additions & 83 deletions
This file was deleted.

internal/worker/server.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,6 @@ func NewServer(ctx context.Context, cfg Config) (_ *Server, err error) {
115115
s.handle(ctx, "/issues", s.handleIssues)
116116
// update-and-issues: do update followed by issues.
117117
s.handle(ctx, "/update-and-issues", s.handleUpdateAndIssues)
118-
// scan-repos: scan various modules for vulnerabilities
119-
s.handle(ctx, "/scan-modules", s.handleScanModules)
120118
return s, nil
121119
}
122120

@@ -386,7 +384,3 @@ func (s *Server) handleUpdateAndIssues(w http.ResponseWriter, r *http.Request) e
386384
}
387385
return s.handleIssues(w, r)
388386
}
389-
390-
func (s *Server) handleScanModules(w http.ResponseWriter, r *http.Request) error {
391-
return ScanModules(r.Context(), s.cfg.Store, r.FormValue("force") == "true")
392-
}

0 commit comments

Comments
 (0)