Integration with Lynis #1666
Sabbat-cloud
started this conversation in
Ideas
Replies: 1 comment
-
|
Sure, you can process the data and output into a different format. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am uploading some tools for network and system administration that I use every day in my work to GitHub.
https://github.com/Sabbat-cloud/sabbat-tools
I have been thinking about integrating a common output to read Lynis reports.
The idea is to output in JSON.
The structure would be as follows:.......
.......
if not path.is_file():
raise FileNotFoundError(f"Report not found: {path}")
def main() -> int:
p = argparse.ArgumentParser(
description="sabbat-lynis — Optional wrapper for Lynis: run (optional) and normalize report to JSON."
)
p.add_argument("--run", action="store_true", help="Run 'lynis audit system' before parsing")
p.add_argument("--report-file", default=DEFAULT_REPORT, help=f"Report path (default: {DEFAULT_REPORT})")
p.add_argument("--json", action="store_true", help="JSON output")
p.add_argument("--timeout", type=int, default=900, help="Timeout for Lynis execution (seconds)")
args = p.parse_args()
def cli_main():
raise SystemExit(main())
if name == "main":
cli_main()
The question is:
Could I publish a command like sabbat-lynis-report and then process it?
Congratulations on your work!
Beta Was this translation helpful? Give feedback.
All reactions