config.read('anteater.conf')
reports_dir = config.get('config', 'reports_dir')
master_list = config.get('config', 'master_list')
config.read('anteater.conf')
reports_dir = config.get('config', 'reports_dir')
master_list = config.get('config', 'master_list')
file_audit_list, file_audit_project_list = lists.file_audit_list(project)
# Get file content black list and project waivers
file_audit_list, file_audit_project_list = lists.file_audit_list(project)
# Get file content black list and project waivers
# Perform rudimentary scans
scan_file(project_dir, project, binary_list,file_audit_list,
# Perform rudimentary scans
scan_file(project_dir, project, binary_list,file_audit_list,
- file_audit_project_list, master_list, file_ignore,
- project_list)
+ file_audit_project_list, master_list, ignore_list,
+ file_ignore)
# Perform licence header checks
licence_check(licence_ext, licence_ignore, project, project_dir)
# Perform licence header checks
licence_check(licence_ext, licence_ignore, project, project_dir)
def scan_file(project_dir, project, binary_list, file_audit_list,
def scan_file(project_dir, project, binary_list, file_audit_list,
- file_audit_project_list, master_list, file_ignore,
- project_list):
+ file_audit_project_list, master_list, ignore_list,
+ file_ignore):
"""Searches for banned strings and files that are listed """
for root, dirs, files in os.walk(project_dir):
# Filter out ignored directories from list.
"""Searches for banned strings and files that are listed """
for root, dirs, files in os.walk(project_dir):
# Filter out ignored directories from list.
- binary_hash = hashlist.binary_hash(project, full_path)
- if is_binary(full_path) and not binary_list.search(full_path):
+ split_path = full_path.split(project + '/', 1)[-1]
+ binary_hash = hashlist.binary_hash(project, split_path)
+
+ if is_binary(full_path):
logger.error('File contains violation: %s',
full_path)
logger.error('Flagged Content: %s',
logger.error('File contains violation: %s',
full_path)
logger.error('Flagged Content: %s',