Skip to content

Add unit tests for pattern matching #2

@bad-antics

Description

@bad-antics

Description

LogReaper currently has zero automated tests. We need a basic test suite that validates the regex pattern matching engine against known log samples.

Details

  • Create a tests/ directory with sample log files (sanitized/synthetic)
  • Write a test runner (shell script or C test harness)
  • Test cases needed:
    • SSH brute force detection in auth.log samples
    • SQL injection detection in Apache/Nginx access logs
    • Privilege escalation pattern matching
    • IOC extraction (IPs, domains, hashes)
    • False positive verification (benign log lines that should NOT trigger alerts)
  • Add a make test target to the Makefile
  • Integrate with CI workflow

Acceptance Criteria

  • make test runs and passes
  • At least 10 test cases covering major detection categories
  • CI runs tests on every push/PR
  • Test log samples contain no real/sensitive data

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions