Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ocervell committed Nov 11, 2024
1 parent d3a7bc9 commit 16f2160
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion secator/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def _get_platform_identifier(cls):
'amd64': ['amd64', 'x86_64', '64bit'],
'aarch64': ['arm64', 'aarch64'],
'armv7l': ['armv7', 'arm'],
'386': ['386', 'x86', 'i386', '32bit],
'386': ['386', 'x86', 'i386', '32bit'],
}

os_identifiers = os_mapping.get(system, [])
Expand Down
17 changes: 15 additions & 2 deletions secator/tasks/trivy.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,18 @@ def on_cmd_done(self):
with open(self.output_path, 'r') as f:
results = yaml.safe_load(f.read())['Results']
for item in results:
yield from item.get('Vulnerabilities', [])
yield from item.get('Secrets', [])
for vuln in item.get('Vulnerabilities', []):
vuln_id = vuln['VulnerabilityID']
yield Vulnerability(
name=vuln_id,
id=vuln_id,
description=vuln['Description'],
severity=vuln['Severity'].lower(),
references=vuln['References']
)
for secret in item.get('Secrets', []):
yield Tag(
name=vuln['RuleID'],
match=vuln['Match'],
extra_data={k: v for k, v in secret.items() if k not in ['RuleID', 'Match']}
)

0 comments on commit 16f2160

Please sign in to comment.