---
name: "ossec-host-intrusion-detection"
description: "Monitor server logs, rootkits, and file integrity with lightweight OSSEC HIDS."
metadata:
  author: "OSSEC Project"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "configure ossec hids"
  - "enable ossec active response"
  - "write ossec decoder"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# OSSEC Host-Based Intrusion Detection System (HIDS)

Deploys OSSEC Host-Based Intrusion Detection: log analysis engine, active response script execution, file integrity monitoring, and centralized client-server alert reporting.

## When to Invoke
Invoke this skill whenever you need to:
- configure ossec hids
- enable ossec active response
- write ossec decoder

## Execution SOP & Rules
1. Configure ossec.conf with monitored log files (<localfile>) and check intervals.
2. Write custom regex decoders in etc/decoders.xml to extract fields from proprietary logs.
3. Define rules with severity levels in etc/rules/local_rules.xml.
4. Verify active response scripts are configured with safe whitelist exceptions to prevent self-lockouts.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
