Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion guides/security-analyzer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ datasets:
refresh_check_interval: 5s
retention_check_enabled: true
retention_period: 30d
retention_check_interval: 1h
params:
pg_host: ${env:PG_HOST}
pg_port: ${env:PG_PORT}
Expand All @@ -106,7 +107,7 @@ Let's break down these configuration choices:

- `refresh_mode: append` optimizes for real-time log ingestion by only appending new data based on the `time_column`
- `refresh_check_interval: 5s` provides near-real-time analysis
- `retention_period: 30d` keeps a month of history for pattern analysis
- `retention_period: 30d` with `retention_check_interval: 1h` keeps a month of history for pattern analysis, sweeping expired rows hourly. Both are required: without `retention_check_interval` the retention check never starts, and in `append` mode nothing else evicts old rows.

## Adding AI-Powered Analysis

Expand Down Expand Up @@ -259,6 +260,18 @@ if __name__ == "__main__":
analyzer.analyze_patterns()
```

## Running the Analyzer

Start the runtime, then run the analyzer in a second terminal:

```bash
spice run
```

```bash
uv run analyzer.py
```

## Testing the System

To see our security copilot in action, let's simulate some suspicious patterns:
Expand Down