Skip to content

Add Linux SSH auditor, simplify SSL HTML title, and update tests/README#1

Merged
Decdd19 merged 1 commit into
mainfrom
codex/review-new-project-securityauditscripts
Apr 8, 2026
Merged

Add Linux SSH auditor, simplify SSL HTML title, and update tests/README#1
Decdd19 merged 1 commit into
mainfrom
codex/review-new-project-securityauditscripts

Conversation

@Decdd19
Copy link
Copy Markdown
Collaborator

@Decdd19 Decdd19 commented Apr 8, 2026

Motivation

  • Ensure the generated SSL/TLS HTML report title handles optional client names cleanly and safely.
  • Document a local test setup and make the codebase reflect an added Linux auditor for SSH hardening.
  • Update unit tests to match the new Linux auditors count.

Description

  • Simplified and hardened the HTML <title> generation in Network/ssl-tls-auditor/ssl_tls_auditor.py by introducing client_title_suffix and using a single formatted title string with an em-dash separator.
  • Updated the Linux auditors listing/help text in audit.py to reflect five Linux auditors (added --linux_ssh to the displayed list).
  • Adjusted the unit test in tests/test_audit.py to expect 5 Linux auditors and renamed the test to test_linux_selects_exactly_5.
  • Added a Local test setup section to README.md with a sample pip install and pytest command for running tests locally.

Testing

  • Ran unit tests in tests/ (via pytest tests/) and the updated TestSelectAuditors tests passed, including test_linux_selects_exactly_5.
  • No other automated tests failed during the run.

Codex Task

@Decdd19 Decdd19 merged commit d8eaad1 into main Apr 8, 2026
2 checks passed
Decdd19 pushed a commit that referenced this pull request Apr 17, 2026
CRITICAL
- AccessDenied = secure anti-pattern: s3, cloudtrail, ec2 now return None
  sentinel on ClientError; analyse_* functions emit UNKNOWN flags;
  report_utils.client_error_unknown_flag() helper added
- IAM self-account false positives: analyse_role(own_account=) param added;
  ARN account extracted and compared in run()
- add_auditor.py Linux/generic stub templates: brace-escaped {{ / }}
- CloudTrail public-bucket false negative: covered by CRITICAL #1

HIGH
- Standardise entry-point to run(): guardduty, lambda, linux_firewall,
  linux_user renamed; tests updated
- 25 new unit tests: UNKNOWN sentinel behaviour for s3, cloudtrail, ec2,
  iam, add_auditor
- ThrottlingException: config_auditor appends UNKNOWN finding per-region
- KMS double-describe_key: analyse_key(meta=) param; run() passes cached meta
- RDS N+1 snapshots: _is_snapshot_public + ThreadPoolExecutor(min(10,N))
- Module-load NOW: email_security_auditor computes NOW inside run()

MEDIUM
- linux_firewall_auditor: iptables -L -n -v + field-position parsing
- linux_patch_auditor: zypper sec_count uses prefix-match, no header hack
- linux_ssh_auditor: html_out rename (html module unshadowed); SSH auditor
  emits overall_risk=UNKNOWN when >50% checks are N/A
- linux_user_auditor: lastlog called once via _load_lastlog_table()
- securityhub_auditor: div.header brand wrapper; .val→.num; get_styles()
- http_headers_auditor: CSP warns on wildcard default-src and missing
  frame-ancestors; re import added
- exec_summary: SSH UNKNOWN special-case removed; UNKNOWN honoured via
  general summary_risk path
- audit.py + exec_summary.py: @@AUDITOR_MAP_END@@ and
  @@KNOWN_PATTERNS_END@@ marker comments for add_auditor.py
- add_auditor.py: marker-based insertion replaces fragile regex

Tests: 983 passed, 1 skipped

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant