Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def readelfparser(path, system_path=None):
if system_path is None:
system_path = path
return ReadelfParser(get_full_path(path), system_path)
def run_elf_checks(self, pkg, pkgfile_path, path):
self.readelf_parser = ReadelfParser(pkgfile_path, path)
failed_reason = self.readelf_parser.parsing_failed_reason()
if failed_reason:
self.output.add_info('E', pkg, 'readelf-failed', path, failed_reason)
return
if not self.readelf_parser.is_archive:
self.ldd_parser = LddParser(pkgfile_path, path)
failed_reason = self.ldd_parser.parsing_failed_reason
if failed_reason:
self.output.add_info('E', pkg, 'ldd-failed', path, failed_reason)
return
self.objdump_parser = ObjdumpParser(pkgfile_path, path)
failed_reason = self.objdump_parser.parsing_failed_reason
if failed_reason:
self.output.add_info('E', pkg, 'objdump-failed', path, failed_reason)