diff --git a/cra-scripts/bito-cra.properties b/cra-scripts/bito-cra.properties index 7bdd190..23148c9 100644 --- a/cra-scripts/bito-cra.properties +++ b/cra-scripts/bito-cra.properties @@ -8,6 +8,7 @@ git.domain= static_analysis=True static_analysis_tool=fb_infer,astral_ruff,mypy linters_feedback=True +secret_scanner_feedback=True review_scope= dependency_check=False code_context=True diff --git a/cra-scripts/bito-cra.ps1 b/cra-scripts/bito-cra.ps1 index 95a8249..0f90aea 100755 --- a/cra-scripts/bito-cra.ps1 +++ b/cra-scripts/bito-cra.ps1 @@ -408,6 +408,7 @@ $optional_params_cli = @( "static_analysis", "static_analysis_tool", "linters_feedback", + "secret_scanner_feedback", "review_scope", "exclude_branches", "exclude_files", @@ -444,6 +445,7 @@ $optional_params_server = @( "static_analysis", "static_analysis_tool", "linters_feedback", + "secret_scanner_feedback", "review_scope", "exclude_branches", "exclude_files", @@ -532,7 +534,7 @@ foreach ($param in $required_params) { foreach ($param in $optional_params) { if ($param -eq "dependency_check.snyk_auth_token" -and $props["dependency_check"] -eq "True") { Ask-For-Param $param $false - } elseif ($param -ne "dependency_check.snyk_auth_token" -and $param -ne "env" -and $param -ne "cli_path" -and $param -ne "output_path" -and $param -ne "static_analysis_tool" -and $param -ne "linters_feedback" -and $param -ne "git.domain" -and $param -ne "review_scope" -and $param -ne "exclude_branches" -and $param -ne "exclude_files" -and $param -ne "exclude_draft_pr" -and $param -ne "cr_event_type" -and $param -ne "posting_to_pr" -and $param -ne "custom_rules.configured_ws_ids" -and $param -ne "custom_rules.aws_access_key_id" -and $param -ne "custom_rules.aws_secret_access_key" -and $param -ne "custom_rules.region_name" -and $param -ne "custom_rules.bucket_name" -and $param -ne "custom_rules.aes_key" -and $param -ne "code_context_config.partial_timeout" -and $param -ne "code_context_config.max_depth" -and $param -ne "code_context_config.kill_timeout_sec") { + } elseif ($param -ne "dependency_check.snyk_auth_token" -and $param -ne "env" -and $param -ne "cli_path" -and $param -ne "output_path" -and $param -ne "static_analysis_tool" -and $param -ne "linters_feedback" -and $param -ne "secret_scanner_feedback" -and $param -ne "git.domain" -and $param -ne "review_scope" -and $param -ne "exclude_branches" -and $param -ne "exclude_files" -and $param -ne "exclude_draft_pr" -and $param -ne "cr_event_type" -and $param -ne "posting_to_pr" -and $param -ne "custom_rules.configured_ws_ids" -and $param -ne "custom_rules.aws_access_key_id" -and $param -ne "custom_rules.aws_secret_access_key" -and $param -ne "custom_rules.region_name" -and $param -ne "custom_rules.bucket_name" -and $param -ne "custom_rules.aes_key" -and $param -ne "code_context_config.partial_timeout" -and $param -ne "code_context_config.max_depth" -and $param -ne "code_context_config.kill_timeout_sec") { Ask-For-Param $param $false } } @@ -561,6 +563,9 @@ foreach ($param in $required_params + $bee_params + $optional_params) { } elseif ($param -eq "linters_feedback") { $validated_boolean = Validate-Boolean $props[$param] $docker_cmd += " --$param=$validated_boolean" + } elseif ($param -eq "secret_scanner_feedback") { + $validated_boolean = Validate-Boolean $props[$param] + $docker_cmd += " --$param=$validated_boolean" } elseif ($param -eq "review_scope") { $scopes = $($props[$param]) -replace ',\s*', ',' $docker_cmd += " --$param='[$scopes]'" diff --git a/cra-scripts/bito-cra.sh b/cra-scripts/bito-cra.sh index 5cc9e64..60eedd5 100755 --- a/cra-scripts/bito-cra.sh +++ b/cra-scripts/bito-cra.sh @@ -417,6 +417,7 @@ optional_params_cli=( "static_analysis" "static_analysis_tool" "linters_feedback" + "secret_scanner_feedback" "review_scope" "exclude_branches" "exclude_files" @@ -454,6 +455,7 @@ optional_params_server=( "static_analysis" "static_analysis_tool" "linters_feedback" + "secret_scanner_feedback" "review_scope" "exclude_branches" "exclude_files" @@ -540,7 +542,7 @@ done for param in "${optional_params[@]}"; do if [ "$param" == "dependency_check.snyk_auth_token" ] && [ "${props["dependency_check"]}" == "True" ]; then ask_for_param "$param" "False" - elif [ "$param" != "dependency_check.snyk_auth_token" ] && [ "$param" != "env" ] && [ "$param" != "cli_path" ] && [ "$param" != "output_path" ] && [ "$param" != "static_analysis_tool" ] && [ "$param" != "linters_feedback" ] && [ "$param" != "git.domain" ] && [ "$param" != "review_scope" ] && [ "$param" != "exclude_branches" ] && [ "$param" != "nexus_url" ] && [ "$param" != "exclude_files" ] && [ "$param" != "exclude_draft_pr" ] && [ "$param" != "cr_event_type" ] && [ "$param" != "posting_to_pr" ] && [ "$param" != "custom_rules.configured_ws_ids" ] && [ "$param" != "custom_rules.aws_access_key_id" ] && [ "$param" != "custom_rules.aws_secret_access_key" ] && [ "$param" != "custom_rules.region_name" ] && [ "$param" != "custom_rules.bucket_name" ] && [ "$param" != "custom_rules.aes_key" ] && [ "$param" != "code_context_config.partial_timeout" ] && [ "$param" != "code_context_config.max_depth" ] && [ "$param" != "code_context_config.kill_timeout_sec" ]; then + elif [ "$param" != "dependency_check.snyk_auth_token" ] && [ "$param" != "env" ] && [ "$param" != "cli_path" ] && [ "$param" != "output_path" ] && [ "$param" != "static_analysis_tool" ] && [ "$param" != "linters_feedback" ] && [ "$param" != "secret_scanner_feedback" ] && [ "$param" != "git.domain" ] && [ "$param" != "review_scope" ] && [ "$param" != "exclude_branches" ] && [ "$param" != "nexus_url" ] && [ "$param" != "exclude_files" ] && [ "$param" != "exclude_draft_pr" ] && [ "$param" != "cr_event_type" ] && [ "$param" != "posting_to_pr" ] && [ "$param" != "custom_rules.configured_ws_ids" ] && [ "$param" != "custom_rules.aws_access_key_id" ] && [ "$param" != "custom_rules.aws_secret_access_key" ] && [ "$param" != "custom_rules.region_name" ] && [ "$param" != "custom_rules.bucket_name" ] && [ "$param" != "custom_rules.aes_key" ] && [ "$param" != "code_context_config.partial_timeout" ] && [ "$param" != "code_context_config.max_depth" ] && [ "$param" != "code_context_config.kill_timeout_sec" ]; then ask_for_param "$param" "False" fi done @@ -575,6 +577,9 @@ for param in "${required_params[@]}" "${bee_params[@]}" "${optional_params[@]}"; elif [ "$param" == "linters_feedback" ]; then props[$param]=$(validate_boolean "${props[$param]}") docker_cmd+=" --linters_feedback=${props[$param]}" + elif [ "$param" == "secret_scanner_feedback" ]; then + props[$param]=$(validate_boolean "${props[$param]}") + docker_cmd+=" --secret_scanner_feedback=${props[$param]}" elif [ "$param" == "review_scope" ]; then scopes=$(echo ${props[$param]} | sed 's/, */,/g') docker_cmd+=" --review_scope='[$scopes]'"