maxwellokumu/okaudit-claude-skills / log-monitoring/log-analyzer
log-analyzer
VerifiedReview log data for suspicious events and help Claude explain what stands out, why it matters, and which findings deserve escalation or follow-up.
| File | Kind | Size |
|---|---|---|
| README.md | markdown | 1.8 KB |
| SKILL.md | skill md | 1.7 KB |
| main.py | script | 17.1 KB |
| sample_input/cloudtrail.jsonl | other | 4.6 KB |
| skill.yaml | config | 1.1 KB |
README.md
View on GitHub# log-analyzer
Parse CloudTrail-format JSON-lines logs and flag suspicious events using a built-in
library of 24 patterns. Supports custom pattern overrides, date range filtering,
and live AWS CloudTrail.
---
## Requirements
```bash
pip install python-dotenv boto3
```
---
## Usage
```bash
# Local file analysis
python main.py --logs sample_input/cloudtrail.jsonl
# Filter by date range
python main.py \
--logs sample_input/cloudtrail.jsonl \
--start "2025-07-01T00:00:00" \
--end "2025-07-01T23:59:59"
# Add custom patterns
python main.py \
--logs sample_input/cloudtrail.jsonl \
--patterns custom_patterns.json
# AWS live mode (dry-run)
python main.py --mode aws --dry-run
# AWS live mode
python main.py --mode aws --start "2025-07-01T00:00:00"
```
---
## Log Format (JSON-lines)
```json
{"timestamp": "2025-07-01T10:00:00", "user": "root", "action": "DeleteTrail", "source_ip": "10.0.0.1", "resource": "cloudtrail:::main"}
```
---
## Built-in Patterns (24 total)
| Event | Severity |
|-------|----------|
| DeleteTrail | π¨ Critical |
| StopLogging | π¨ Critical |
| RootAccountUsage | π¨ Critical |
| DeleteSecret | π¨ Critical |
| ScheduleKeyDeletion | π¨ Critical |
| ConsoleLoginFailure | π΄ High |
| UpdateLoginProfile | π΄ High |
| DeleteBucket | π΄ High |
| PutBucketPolicy | π΄ High |
| AttachUserPolicy | π΄ High |
| DeleteUser | π΄ High |
| DeleteVpc | π΄ High |
| PutBucketAcl | π΄ High |
| DisableKey | π΄ High |
| PutEventSelectors | π΄ High |
| DeleteFlowLogs | π΄ High |
| AuthorizationFailure | π Medium |
| CreateAccessKey | π Medium |
| DeleteAccessKey | π Medium |
| TerminateInstances | π Medium |
| ModifySecurityGroup | π Medium |
| PutSecretValue | π Medium |
| CreateUser | π‘ Low |
| GetSecretValue | π‘ Low |
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirements | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |