Module Import alias Import alias Import alias ImportFrom alias Import alias ImportFrom alias identifier ImportFrom alias identifier ImportFrom alias Assign NameStore Str Assign NameStore Str ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore AttributeLoad NameLoad attr attr ListLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr ListLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad ListLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad ListLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad ListLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr attr Assign NameStore Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Str Assign NameStore ListLoad NameLoad NameLoad For NameStore NameLoad body With Call NameLoad NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str AttributeLoad NameLoad attr NameLoad ListLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str Assign NameStore Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body With Call NameLoad Str NameStore body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr NameLoad Str AttributeLoad NameLoad attr decorator_list Call NameLoad Str ListLoad Str Str Str Str FunctionDef arguments args NameParam defaults body With Call NameLoad Str NameStore body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr NameLoad Str AttributeLoad NameLoad attr decorator_list Call NameLoad Str ListLoad Str Str Str Str FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad With Call NameLoad Str Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad With Call NameLoad Str NameStore body Assign AttributeStore NameLoad attr Dict Str Str Str Str Str Str With Call NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Index Num Str decorator_list Call NameLoad Str ListLoad Str Str Str Str FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad With Call NameLoad Str Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str AttributeLoad NameLoad attr decorator_list Call NameLoad Str ListLoad Str Str Str Str Str Str FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad With Call NameLoad Str Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str AttributeLoad NameLoad attr decorator_list Call NameLoad Str ListLoad Str Str Str Str Str Str FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad With Call NameLoad Str Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad With Call NameLoad Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call NameLoad SubscriptLoad SubscriptLoad AttributeLoad NameLoad attr Index Num Index Num Str decorator_list Call NameLoad Str ListLoad Str Str Str Str Str Str FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad With Call NameLoad Str Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad With Call NameLoad Str Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad With Call NameLoad Str NameStore body Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str AttributeLoad NameLoad attr decorator_list Call NameLoad Str ListLoad Str Str Str Str Str Str FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad With Call NameLoad Str Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad With Call NameLoad Str Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Str AttributeLoad NameLoad attr decorator_list Call NameLoad Str ListLoad Str Str Str Str Str Str Str Str FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad With Call NameLoad Str Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad With Call NameLoad Str NameStore body Assign AttributeStore NameLoad attr Num Expr Call AttributeLoad NameLoad attr NameLoad Str AttributeLoad NameLoad attr decorator_list Call NameLoad Str ListLoad Str Str Str Str FunctionDef arguments args NameParam defaults body Assign NameStore AttributeLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad With Call NameLoad Str Str NameStore body Expr Call AttributeLoad NameLoad attr NameLoad With Call NameLoad Str NameStore body Assign AttributeStore NameLoad attr Num Expr Call AttributeLoad NameLoad attr NameLoad Str AttributeLoad NameLoad attr decorator_list Call NameLoad Str ListLoad Str Str Str Str decorator_list
N/A N/A logging N/A os N/A fixtures mock patch N/A testtools bandit.cli main bandit bandit.core extension_loader ext_loader bandit.core utils N/A bandit_config_content 
include:
    - '*.py'
    - '*.pyw'

profiles:
    test:
        include:
            - start_process_with_a_shell

shell_injection:
    subprocess:

    shell:
        - os.system
 N/A bandit_baseline_content {
    "results": [
        {
            "code": "some test code",
            "filename": "test_example.py",
            "issue_severity": "low",
            "issue_confidence": "low",
            "issue_text": "test_issue",
            "test_name": "some_test",
            "test_id": "x",
            "line_number": "n",
            "line_range": "n-m"
        }
    ]
}
 BanditCLIMainLoggerTests N/A N/A testtools TestCase N/A setUp N/A N/A self N/A N/A N/A N/A N/A N/A super BanditCLIMainLoggerTests self setUp N/A N/A self logger N/A N/A logging getLogger N/A N/A self original_logger_handlers N/A N/A self logger handlers N/A N/A self original_logger_level N/A N/A self logger level N/A N/A N/A self logger handlers N/A N/A tearDown N/A N/A self N/A N/A N/A N/A N/A N/A super BanditCLIMainLoggerTests self tearDown N/A N/A N/A self logger handlers N/A self original_logger_handlers N/A N/A N/A self logger level N/A self original_logger_level N/A test_init_logger N/A N/A self N/A N/A N/A N/A N/A bandit _init_logger False N/A N/A N/A self assertIsNotNone N/A self logger N/A N/A N/A self assertNotEqual N/A N/A self logger handlers N/A N/A N/A N/A self assertEqual N/A logging INFO N/A N/A self logger level N/A test_init_logger_debug_mode N/A N/A self N/A N/A N/A N/A N/A bandit _init_logger True N/A N/A N/A self assertEqual N/A logging DEBUG N/A N/A self logger level N/A N/A BanditCLIMainTests N/A N/A testtools TestCase N/A setUp N/A N/A self N/A N/A N/A N/A N/A N/A super BanditCLIMainTests self setUp N/A N/A self current_directory N/A N/A os getcwd N/A tearDown N/A N/A self N/A N/A N/A N/A N/A N/A super BanditCLIMainTests self tearDown N/A N/A N/A os chdir N/A self current_directory N/A test_get_options_from_ini_no_ini_path_no_target N/A N/A self N/A N/A N/A N/A N/A self assertIsNone N/A N/A bandit _get_options_from_ini None N/A N/A test_get_options_from_ini_empty_directory_no_target N/A N/A self N/A N/A N/A ini_directory N/A N/A N/A self useFixture N/A N/A fixtures TempDir path N/A N/A N/A self assertIsNone N/A N/A bandit _get_options_from_ini ini_directory N/A N/A test_get_options_from_ini_no_ini_path_no_bandit_files N/A N/A self N/A N/A N/A target_directory N/A N/A N/A self useFixture N/A N/A fixtures TempDir path N/A N/A N/A self assertIsNone N/A N/A bandit _get_options_from_ini None N/A target_directory N/A test_get_options_from_ini_no_ini_path_multi_bandit_files N/A N/A self N/A N/A N/A target_directory N/A N/A N/A self useFixture N/A N/A fixtures TempDir path N/A second_config second_config_directory N/A N/A N/A os mkdir N/A N/A N/A os path join target_directory second_config N/A bandit_config_one N/A N/A N/A os path join target_directory .bandit N/A bandit_config_two N/A N/A N/A os path join target_directory second_config .bandit N/A bandit_files N/A bandit_config_one bandit_config_two N/A bandit_file bandit_files N/A N/A N/A open bandit_file wt fd N/A N/A N/A N/A fd write bandit_config_content N/A N/A N/A self assertRaisesRegex SystemExit 2 N/A bandit _get_options_from_ini None N/A target_directory N/A test_init_extensions N/A N/A self N/A N/A N/A N/A N/A self assertEqual N/A ext_loader MANAGER N/A N/A bandit _init_extensions N/A test_log_option_source_arg_val N/A N/A self N/A N/A N/A arg_val file N/A ini_val vuln N/A option_name aggregate N/A N/A N/A self assertEqual arg_val N/A N/A bandit _log_option_source arg_val ini_val option_name N/A test_log_option_source_ini_value N/A N/A self N/A N/A N/A ini_val vuln N/A option_name aggregate N/A N/A N/A self assertEqual ini_val N/A N/A bandit _log_option_source None ini_val option_name N/A test_log_option_source_no_values N/A N/A self N/A N/A N/A option_name aggregate N/A N/A N/A self assertIsNone N/A N/A bandit _log_option_source None None option_name N/A test_main_config_unopenable N/A N/A self N/A N/A N/A N/A patch bandit.core.config.__init__ mock_bandit_config N/A N/A N/A mock_bandit_config side_effect N/A N/A utils ConfigError N/A N/A N/A self assertRaisesRegex SystemExit 2 N/A bandit main N/A N/A patch sys.argv N/A bandit -c bandit.yaml test test_main_invalid_config N/A N/A self N/A N/A N/A N/A patch bandit.core.config.BanditConfig.__init__ mock_bandit_config N/A N/A N/A mock_bandit_config side_effect N/A N/A utils ConfigError N/A N/A N/A self assertRaisesRegex SystemExit 2 N/A bandit main N/A N/A patch sys.argv N/A bandit -c bandit.yaml test test_main_handle_ini_options N/A N/A self N/A N/A N/A temp_directory N/A N/A N/A self useFixture N/A N/A fixtures TempDir path N/A N/A N/A os chdir temp_directory N/A N/A open bandit.yaml wt fd N/A N/A N/A N/A fd write bandit_config_content N/A N/A patch bandit.cli.main._get_options_from_ini mock_get_opts N/A N/A N/A mock_get_opts return_value N/A exclude skips tests /tmp skip_test some_test N/A N/A patch bandit.cli.main.logger.error err_mock N/A N/A N/A N/A self assertRaisesRegex SystemExit 2 N/A bandit main N/A N/A N/A self assertEqual N/A str N/A N/A N/A err_mock call_args N/A 0 N/A 0 Unknown test found in profile: some_test N/A N/A patch sys.argv N/A bandit -c bandit.yaml test test_main_unknown_tests N/A N/A self N/A N/A N/A temp_directory N/A N/A N/A self useFixture N/A N/A fixtures TempDir path N/A N/A N/A os chdir temp_directory N/A N/A open bandit.yaml wt fd N/A N/A N/A N/A fd write bandit_config_content N/A N/A N/A self assertRaisesRegex SystemExit 2 N/A bandit main N/A N/A patch sys.argv N/A bandit -c bandit.yaml -t badID test test_main_unknown_skip_tests N/A N/A self N/A N/A N/A temp_directory N/A N/A N/A self useFixture N/A N/A fixtures TempDir path N/A N/A N/A os chdir temp_directory N/A N/A open bandit.yaml wt fd N/A N/A N/A N/A fd write bandit_config_content N/A N/A N/A self assertRaisesRegex SystemExit 2 N/A bandit main N/A N/A patch sys.argv N/A bandit -c bandit.yaml -s badID test test_main_profile_not_found N/A N/A self N/A N/A N/A temp_directory N/A N/A N/A self useFixture N/A N/A fixtures TempDir path N/A N/A N/A os chdir temp_directory N/A N/A open bandit.yaml wt fd N/A N/A N/A N/A fd write bandit_config_content N/A N/A patch bandit.cli.main.logger.error err_mock N/A N/A N/A N/A self assertRaisesRegex SystemExit 2 N/A bandit main N/A N/A N/A self assertEqual N/A str N/A N/A N/A err_mock call_args N/A 0 N/A 0 Unable to find profile (bad) in config file: bandit.yaml N/A N/A patch sys.argv N/A bandit -c bandit.yaml -p bad test test_main_baseline_ioerror N/A N/A self N/A N/A N/A temp_directory N/A N/A N/A self useFixture N/A N/A fixtures TempDir path N/A N/A N/A os chdir temp_directory N/A N/A open bandit.yaml wt fd N/A N/A N/A N/A fd write bandit_config_content N/A N/A open base.json wt fd N/A N/A N/A N/A fd write bandit_baseline_content N/A N/A patch bandit.core.manager.BanditManager.populate_baseline mock_mgr_pop_bl N/A N/A N/A mock_mgr_pop_bl side_effect IOError N/A N/A N/A self assertRaisesRegex SystemExit 2 N/A bandit main N/A N/A patch sys.argv N/A bandit -c bandit.yaml -b base.json test test_main_invalid_output_format N/A N/A self N/A N/A N/A temp_directory N/A N/A N/A self useFixture N/A N/A fixtures TempDir path N/A N/A N/A os chdir temp_directory N/A N/A open bandit.yaml wt fd N/A N/A N/A N/A fd write bandit_config_content N/A N/A open base.json wt fd N/A N/A N/A N/A fd write bandit_baseline_content N/A N/A N/A self assertRaisesRegex SystemExit 2 N/A bandit main N/A N/A patch sys.argv N/A bandit -c bandit.yaml -b base.json -f csv test test_main_exit_with_results N/A N/A self N/A N/A N/A temp_directory N/A N/A N/A self useFixture N/A N/A fixtures TempDir path N/A N/A N/A os chdir temp_directory N/A N/A open bandit.yaml wt fd N/A N/A N/A N/A fd write bandit_config_content N/A N/A patch bandit.core.manager.BanditManager.results_count mock_mgr_results_ct N/A N/A N/A mock_mgr_results_ct return_value 1 N/A N/A N/A self assertRaisesRegex SystemExit 1 N/A bandit main N/A N/A patch sys.argv N/A bandit -c bandit.yaml test test_main_exit_with_no_results N/A N/A self N/A N/A N/A temp_directory N/A N/A N/A self useFixture N/A N/A fixtures TempDir path N/A N/A N/A os chdir temp_directory N/A N/A open bandit.yaml wt fd N/A N/A N/A N/A fd write bandit_config_content N/A N/A patch bandit.core.manager.BanditManager.results_count mock_mgr_results_ct N/A N/A N/A mock_mgr_results_ct return_value 0 N/A N/A N/A self assertRaisesRegex SystemExit 0 N/A bandit main N/A N/A patch sys.argv N/A bandit -c bandit.yaml test N/A