Skip to content

Commit

Permalink
add add-depsdev-on-ingest to cli store
Browse files Browse the repository at this point in the history
Signed-off-by: Brandon Lum <[email protected]>
  • Loading branch information
lumjjb committed Jan 21, 2025
1 parent 0c9e142 commit 639c80f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions cmd/guacingest/cmd/ingest.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ func ingest(cmd *cobra.Command, args []string) {
viper.GetBool("add-vuln-on-ingest"),
viper.GetBool("add-license-on-ingest"),
viper.GetBool("add-eol-on-ingest"),
viper.GetBool("add-depsdev-on-ingest"),
viper.GetBool("enable-otel"),
args)
if err != nil {
Expand Down Expand Up @@ -164,6 +165,7 @@ func validateFlags(
queryVulnIngestion bool,
queryLicenseIngestion bool,
queryEOLIngestion bool,
queryDepsDevIngestion bool,
enableOtel bool,
args []string,
) (options, error) {
Expand All @@ -180,6 +182,7 @@ func validateFlags(
opts.queryVulnOnIngestion = queryVulnIngestion
opts.queryLicenseOnIngestion = queryLicenseIngestion
opts.queryEOLOnIngestion = queryEOLIngestion
opts.queryDepsDevOnIngestion = queryDepsDevIngestion
opts.enableOtel = enableOtel

return opts, nil
Expand Down
2 changes: 1 addition & 1 deletion cmd/guacone/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func init() {

set, err := cli.BuildFlags([]string{"gql-addr", "header-file", "csub-addr", "csub-tls",
"csub-tls-skip-verify", "add-vuln-on-ingest", "add-license-on-ingest",
"add-eol-on-ingest"})
"add-eol-on-ingest", "add-depsdev-on-ingest"})
if err != nil {
fmt.Fprintf(os.Stderr, "failed to setup flag: %v", err)
os.Exit(1)
Expand Down
3 changes: 3 additions & 0 deletions pkg/cli/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ func init() {
// the ingestor will query and ingest endoflife.date for EOL
set.Bool("add-eol-on-ingest", false, "if enabled, the ingestor will query and ingest endoflife.date for EOL data. Warning: This will increase ingestion times")

// the ingestor will query and ingest deps.dev data for scorecards and source association
set.Bool("add-depsdev-on-ingest", false, "if enabled, the ingestor will query and ingest deps.dev scorecards and source association data. Warning: This will increase ingestion times")

set.String("gql-addr", "http://localhost:8080/query", "endpoint used to connect to graphQL server")

set.String("rest-api-server-port", "8081", "port to serve the REST API from")
Expand Down

0 comments on commit 639c80f

Please sign in to comment.