fluidasserts.utils.cli module

Asserts CLI.

fluidasserts.utils.cli.check_boolean_env_var(var_name)

Check value of boolean environment variable.

fluidasserts.utils.cli.colorize(parsed_content)

Colorize content.

fluidasserts.utils.cli.colorize_text(message, without_color=False)

Print colorized text content.

fluidasserts.utils.cli.enable_win_colors()

Enable windows colors.

fluidasserts.utils.cli.exec_apk_package(apks)

Execute generic checks of APK module.

fluidasserts.utils.cli.exec_aws_package(credentials, enable_multiprocessing)

Execute generic methods from the AWS package.

fluidasserts.utils.cli.exec_azure_package(credentials, enable_multiprocessing)

Execute generic methods from the Azure package.

fluidasserts.utils.cli.exec_cloudformation_package(paths, enable_multiprocessing)

Execute generic methods from the CloudFormation package.

fluidasserts.utils.cli.exec_dns_package(nameservers)

Execute generic checks of DNS package.

fluidasserts.utils.cli.exec_exploits(exploit_paths=None, exploit_contents=None, enable_multiprocessing=False)

Execute the exploits list.

Return type

str

fluidasserts.utils.cli.exec_http_package(urls, enable_multiprocessing)

Execute generic checks from the HTTP package.

fluidasserts.utils.cli.exec_lang_package(paths, enable_multiprocessing)

Execute generic methods from the lang package.

fluidasserts.utils.cli.exec_mssql_package(credentials, enable_multiprocessing)

Execute generic methods from the mssql package.

fluidasserts.utils.cli.exec_ssl_package(addresses, enable_multiprocessing)

Execute generic checks from the SSL package.

fluidasserts.utils.cli.exec_terraform_package(paths, enable_multiprocessing)

Execute generic methods from the Terraform package.

fluidasserts.utils.cli.exec_wrapper(exploit_name, exploit_content)

Execute an exploit and handle its errors, propagate it’s stdout.

Return type

str

fluidasserts.utils.cli.exit_asserts(reason)

Return according to FA_STRICT value.

Return type

None

fluidasserts.utils.cli.filter_content(parsed, args)

Show filtered content according to args.

Return type

list

fluidasserts.utils.cli.get_argparser()

Return an argparser with the CLI arguments.

fluidasserts.utils.cli.get_content(args)

Get raw content according to args parameter.

fluidasserts.utils.cli.get_exploit_content(exploit_path)

Read the exploit as a string.

Return type

typing.Tuple[str, str]

fluidasserts.utils.cli.get_parsed_output(content)

Get parsed YAML output.

fluidasserts.utils.cli.get_risk_levels(parsed_content)

Get risk levels of opened checks.

fluidasserts.utils.cli.get_total_checks(output_list)

Get total checks.

fluidasserts.utils.cli.get_total_closed_checks(output_list)

Get total closed checks.

fluidasserts.utils.cli.get_total_error_checks(output_list)

Get total error checks.

fluidasserts.utils.cli.get_total_open_checks(output_list)

Get total open checks.

fluidasserts.utils.cli.get_total_unknown_checks(output_list)

Get total unknown checks.

fluidasserts.utils.cli.get_total_vulnerabilities(output_list)

Get total vulnerabilities on all checks.

fluidasserts.utils.cli.lint_exploit(exploit)

Verify Asserts exploit guidelines against given exploit code.

fluidasserts.utils.cli.main()

Run CLI.

fluidasserts.utils.cli.print_message(message, args)

Print message according to args.

fluidasserts.utils.cli.show_banner(args)

Show Asserts banner.

fluidasserts.utils.cli.stderr_redir()

Redirect stderr.

fluidasserts.utils.cli.stdout_redir()

Redirect stdout.

fluidasserts.utils.cli.warn_python_version()

Check the interpreter version and emit a warning in case of mismatch.