diff options
-rw-r--r-- | anteater/src/project_scan.py | 15 | ||||
-rw-r--r-- | gatechecks.yaml | 13 |
2 files changed, 19 insertions, 9 deletions
diff --git a/anteater/src/project_scan.py b/anteater/src/project_scan.py index 9b143e9..09a4791 100644 --- a/anteater/src/project_scan.py +++ b/anteater/src/project_scan.py @@ -57,6 +57,7 @@ def prepare_project(project, project_dir): # Perform licence header checks licence_check(licence_ext, licence_ignore, project, project_dir) + licence_root_check(project_dir, project) def scan_file(project_dir, project, binary_list, binary_project_list, @@ -124,6 +125,20 @@ def scan_file(project_dir, project, binary_list, binary_project_list, format(full_path)) +def licence_root_check(project_dir, project): + if os.path.isfile(project_dir + '/LICENSE'): + logger.info('LICENSE file present in: {0}'. + format(project_dir)) + else: + logger.error('LICENSE file missing in: {0}'. + format(project_dir)) + with open(reports_dir + "licence-" + project + ".log", + "a") \ + as gate_report: + gate_report.write('LICENSE file missing in: {0}\n'. + format(project_dir)) + + def licence_check(licence_ext, licence_ignore, project, project_dir): """ Peform basic checks for the presence of licence strings """ for root, dirs, files in os.walk(project_dir): diff --git a/gatechecks.yaml b/gatechecks.yaml index 8a670bd..3c36539 100644 --- a/gatechecks.yaml +++ b/gatechecks.yaml @@ -9,12 +9,10 @@ binaries: - \.DS_Store - \.eot - \.gif - - \.git/index - - \.git/objects + - \.git/(index|objects) - \.ico - \.idx - - \.jpeg - - \.jpg + - \.jp(e?)g - \.otf - \.pack - \.pdf @@ -40,9 +38,7 @@ file_audits: - dual_ec_drbg - eval - gost - - md2 - - md4 - - md5 + - md[245] - panama - private_key - rc4 @@ -51,8 +47,7 @@ file_audits: - sha0 - snefru - ssh_key - - sslv1 - - sslv2 + - sslv[12] - streebog - tlsv1 - wget |