Skip to content

Commit

Permalink
add - enableLambdaFlows flag (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
khemrajrathore authored Nov 2, 2023
1 parent 7701358 commit b2a5c56
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 @@ -76,6 +76,7 @@ func defineScanFlags(cmd *cobra.Command) {
scanCmd.Flags().Bool("generate-unfiltered-report", false, "If specified, additionally generates an unfiltered flow report")
scanCmd.Flags().Bool("generate-audit-report", false, "If specified, audit report will be generated")
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")
}

func scan(cmd *cobra.Command, args []string) {
Expand All @@ -99,6 +100,7 @@ func scan(cmd *cobra.Command, args []string) {
generateUnfilteredReport, _ := cmd.Flags().GetBool("generate-unfiltered-report")
generateAuditReport, _ := cmd.Flags().GetBool("generate-audit-report")
enableAuditSemantic, _ := cmd.Flags().GetBool("enable-audit-semantic")
enableLambdaFlows, _ := cmd.Flags().GetBool("enable-lambda-flows")

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

if enableLambdaFlows {
commandArgs = append(commandArgs, "-elf")
}

// 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 b2a5c56

Please sign in to comment.