@@ -74,7 +74,10 @@ def audit(self) -> AuditResult:
7474 Finding (
7575 severity = "info" ,
7676 title = "Lynis Not Installed" ,
77- detail = "Install Lynis for comprehensive system security auditing. Install with: brew install lynis" ,
77+ detail = (
78+ "Install Lynis for comprehensive system security"
79+ " auditing. Install with: brew install lynis"
80+ ),
7881 remediation = None ,
7982 )
8083 )
@@ -98,7 +101,10 @@ def audit(self) -> AuditResult:
98101 Finding (
99102 severity = "info" ,
100103 title = "Osquery Not Installed" ,
101- detail = "Install osquery for system querying and monitoring. Install with: brew install osquery" ,
104+ detail = (
105+ "Install osquery for system querying and"
106+ " monitoring. Install with: brew install osquery"
107+ ),
102108 remediation = None ,
103109 )
104110 )
@@ -229,7 +235,7 @@ def _run_lynis(self) -> list[Finding]:
229235 remediation = "Try running 'lynis audit system --quick' manually" ,
230236 )
231237 )
232- except Exception as e :
238+ except Exception :
233239 raise # Re-raise to be caught by audit()
234240
235241 return findings
@@ -277,7 +283,10 @@ def _run_osquery_check(self) -> list[Finding]:
277283 Finding (
278284 severity = "warn" ,
279285 title = "Unsigned Processes Detected" ,
280- detail = f"Found { len (unsigned_processes )} unsigned processes: { ', ' .join (process_names )} " ,
286+ detail = (
287+ f"Found { len (unsigned_processes )} unsigned"
288+ f" processes: { ', ' .join (process_names )} "
289+ ),
281290 remediation = "Investigate and remove suspicious unsigned processes" ,
282291 )
283292 )
@@ -307,7 +316,8 @@ def _run_osquery_check(self) -> list[Finding]:
307316 listeners = json .loads (result .stdout )
308317 if listeners :
309318 listener_info = [
310- f"{ l .get ('name' , 'unknown' )} :{ l .get ('port' , '?' )} " for l in listeners [:5 ]
319+ f"{ item .get ('name' , 'unknown' )} :{ item .get ('port' , '?' )} "
320+ for item in listeners [:5 ]
311321 ]
312322 findings .append (
313323 Finding (
@@ -338,7 +348,9 @@ def _run_knockknock_check(self) -> list[Finding]:
338348 Finding (
339349 severity = "info" ,
340350 title = "KnockKnock Available" ,
341- detail = "KnockKnock is installed. Run it manually to scan for persistent malware." ,
351+ detail = (
352+ "KnockKnock is installed. Run it manually to scan for persistent malware."
353+ ),
342354 remediation = None ,
343355 )
344356 )
0 commit comments