Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def builddatecheck():
CONFIG.info = True
output = Filter(CONFIG)
test = BuildDateCheck(CONFIG, output)
return output, test
def binariescheck():
CONFIG.info = True
output = Filter(CONFIG)
test = BinariesCheck(CONFIG, output)
return output, test
def pamcheck():
CONFIG.info = True
output = Filter(CONFIG)
test = PamCheck(CONFIG, output)
return output, test
def doccheck():
CONFIG.info = True
output = Filter(CONFIG)
test = DocCheck(CONFIG, output)
return output, test
def fhscheck():
CONFIG.info = True
output = Filter(CONFIG)
test = FHSCheck(CONFIG, output)
return output, test
def zipcheck():
CONFIG.info = True
output = Filter(CONFIG)
test = ZipCheck(CONFIG, output)
return output, test
def binariescheck():
CONFIG.info = True
output = Filter(CONFIG)
test = BinariesCheck(CONFIG, output)
return output, test
def test_only_non_binary_in_usr_lib_exception(tmpdir, package, binariescheck):
CONFIG.configuration['UsrLibBinaryException'] = '^/usr/lib(64)?/python'
output = Filter(CONFIG)
test = BinariesCheck(CONFIG, output)
test.check(get_tested_package(package, tmpdir))
out = output.print_results(output.results)
assert 'W: only-non-binary-in-usr-lib' not in out
def main():
# we'll try to sort with locale settings, but we don't fail if not possible
with contextlib.suppress(locale.Error):
locale.setlocale(locale.LC_COLLATE, '')
output = Filter(cfg)
# Load all checks
for c in cfg.configuration['Checks']:
loadCheck(c, cfg, output)
packages_checked = 0
specfiles_checked = 0
try:
# Loop over all file names given in arguments
dirs = []
for arg in args:
pkgs = []
isfile = False
try:
if arg == '-':