Skip to content

Commit

Permalink
Merge pull request #64 from Privado-Inc/addAPIByParameter
Browse files Browse the repository at this point in the history
add - api by parameter flag
  • Loading branch information
khemrajrathore authored Mar 19, 2024
2 parents 7cc6bed + 5551060 commit bad8542
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ func defineScanFlags(cmd *cobra.Command) {
scanCmd.Flags().Bool("enable-audit-semantic", false, "Flag to enable semantic filtering in audit report")
scanCmd.Flags().Bool("enable-lambda-flows", false, "Flag to enable lambda flows")
scanCmd.Flags().Bool("monolith", false, "Flag to divide a monolith repo into subProjects")
scanCmd.Flags().Bool("enable-api-by-parameter", false, "Flag to enable api tagging by parameter")
}

func scan(cmd *cobra.Command, args []string) {
Expand All @@ -103,6 +104,7 @@ func scan(cmd *cobra.Command, args []string) {
enableAuditSemantic, _ := cmd.Flags().GetBool("enable-audit-semantic")
enableLambdaFlows, _ := cmd.Flags().GetBool("enable-lambda-flows")
isMonolith, _ := cmd.Flags().GetBool("monolith")
enableApiByParameter, _ := cmd.Flags().GetBool("enable-api-by-parameter")

externalRules, _ := cmd.Flags().GetString("config")
if externalRules != "" {
Expand Down Expand Up @@ -225,6 +227,10 @@ func scan(cmd *cobra.Command, args []string) {
commandArgs = append(commandArgs, "--monolith")
}

if enableApiByParameter {
commandArgs = append(commandArgs, "--enable-api-by-parameter")
}

// run image with options
err = docker.RunImage(
docker.OptionWithLatestImage(false), // because we already pull the image for access-key (with pullImage parameter)
Expand Down

0 comments on commit bad8542

Please sign in to comment.