diff --git a/shellgenius/generation.py b/shellgenius/generation.py index 6304c84..fe8f205 100644 --- a/shellgenius/generation.py +++ b/shellgenius/generation.py @@ -234,7 +234,7 @@ class ShellSafetyChecker: DANGEROUS_PATTERNS = [ (r"rm\s+-rf\s+/", "Removes all files recursively - catastrophic data loss"), - (r":\(\)\s*\{\s*:\s*\|\s*:\s&\s*;\s*\}", "Fork bomb - can crash system"), + (r":\(\)\s*\{\s*:\s*\|\s*:\s*&\s*;\s*\}", "Fork bomb - can crash system"), (r"chmod\s+777", "Removes all file permissions - security risk"), (r"sudo\s+su", "Escalates to root without proper controls"), (r"dd\s+if=/dev/zero", "Can overwrite disks if misconfigured"), @@ -321,7 +321,7 @@ class ShellSafetyChecker: "issues": issues, "warnings": warnings, "safe_lines": safe_lines, - "total_lines": len([l for l in lines if l.strip() and not l.strip().startswith("#")]), + "total_lines": len([line for line in lines if line.strip() and not line.strip().startswith("#")]), }