<commit_before># optional: after how many files to update progress
#show_progress_every: 100

# optional: plugins directory name
#plugins_dir: 'plugins'

# optional: plugins discovery name pattern
plugin_name_pattern: '*.py'

# optional: terminal escape sequences to display colors
#output_colors:
#    DEFAULT: '\033[0m'
#    HEADER: '\033[95m'
#    INFO: '\033[94m'
#    WARN: '\033[93m'
#    ERROR: '\033[91m'

# optional: log format string
#log_format: "[%(module)s]\t%(levelname)s\t%(message)s"

# globs of files which should be analyzed
include:
    - '*.py'
    - '*.pyw'

# a list of strings, which if found in the path will cause files to be excluded
# for example /tests/ - to remove all all files in tests directory
exclude_dirs:
    - '/tests/'

profiles:
    keystone_conservative:
        include:
            - blacklist_functions
            - blacklist_imports
            - request_with_no_cert_validation
            - exec_used
            - set_bad_file_permissions
            - subprocess_popen_with_shell_equals_true
            - linux_commands_wildcard_injection
            - ssl_with_bad_version


    keystone_verbose:
        include:
            - blacklist_functions
            - blacklist_imports
            - request_with_no_cert_validation
            - exec_used
            - set_bad_file_permissions
            - hardcoded_tmp_directory
            - subprocess_popen_with_shell_equals_true
            - any_other_function_with_shell_equals_true
            - linux_commands_wildcard_injection
            - ssl_with_bad_version
            - ssl_with_bad_defaults

blacklist_functions:
    bad_name_sets:
        - pickle:
            qualnames: [pickle.loads, pickle.load, pickle.Unpickler,
                        cPickle.loads, cPickle.load, cPickle.Unpickler]
            message: "Pickle library appears to be in use, possible security issue."
        - marshal:
            qualnames: [marshal.load, marshal.loads]
            message: "Deserialization with the marshal module is possibly dangerous."
        - md5:
            qualnames: [hashlib.md5]
            message: "Use of insecure MD5 hash function."
        - mktemp_q:
            qualnames: [tempfile.mktemp]
            message: "Use of insecure and deprecated function (mktemp)."
        - eval:
            qualnames: [eval]
            message: "Use of possibly insecure function - consider using safer ast.literal_eval."
        - mark_safe:
            names: [mark_safe]
            message: "Use of mark_safe() may expose cross-site scripting vulnerabilities and should be reviewed."<commit_msg>Replace blacklist_functions with blacklist_calls<commit_after># optional: after how many files to update progress
#show_progress_every: 100

# optional: plugins directory name
#plugins_dir: 'plugins'

# optional: plugins discovery name pattern
plugin_name_pattern: '*.py'

# optional: terminal escape sequences to display colors
#output_colors:
#    DEFAULT: '\033[0m'
#    HEADER: '\033[95m'
#    INFO: '\033[94m'
#    WARN: '\033[93m'
#    ERROR: '\033[91m'

# optional: log format string
#log_format: "[%(module)s]\t%(levelname)s\t%(message)s"

# globs of files which should be analyzed
include:
    - '*.py'
    - '*.pyw'

# a list of strings, which if found in the path will cause files to be excluded
# for example /tests/ - to remove all all files in tests directory
exclude_dirs:
    - '/tests/'

profiles:
    keystone_conservative:
        include:
            - blacklist_calls
            - blacklist_imports
            - request_with_no_cert_validation
            - exec_used
            - set_bad_file_permissions
            - subprocess_popen_with_shell_equals_true
            - linux_commands_wildcard_injection
            - ssl_with_bad_version


    keystone_verbose:
        include:
            - blacklist_calls
            - blacklist_imports
            - request_with_no_cert_validation
            - exec_used
            - set_bad_file_permissions
            - hardcoded_tmp_directory
            - subprocess_popen_with_shell_equals_true
            - any_other_function_with_shell_equals_true
            - linux_commands_wildcard_injection
            - ssl_with_bad_version
            - ssl_with_bad_defaults

blacklist_calls:
    bad_name_sets:
        - pickle:
            qualnames: [pickle.loads, pickle.load, pickle.Unpickler,
                        cPickle.loads, cPickle.load, cPickle.Unpickler]
            message: "Pickle library appears to be in use, possible security issue."
        - marshal:
            qualnames: [marshal.load, marshal.loads]
            message: "Deserialization with the marshal module is possibly dangerous."
        - md5:
            qualnames: [hashlib.md5]
            message: "Use of insecure MD5 hash function."
        - mktemp_q:
            qualnames: [tempfile.mktemp]
            message: "Use of insecure and deprecated function (mktemp)."
        - eval:
            qualnames: [eval]
            message: "Use of possibly insecure function - consider using safer ast.literal_eval."
        - mark_safe:
            names: [mark_safe]
            message: "Use of mark_safe() may expose cross-site scripting vulnerabilities and should be reviewed."
{'fraction_non_alphanumeric': 0.07652769845802398, 'fraction_numerical': 0.011422044545973729, 'mean_word_length': 2.2472187886279356, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6903917', 'n_tokens_mistral': 1580, 'n_tokens_neox': 1489, 'n_words': 392}