Skip to content

Commit ae814d9

Browse files
committed
update: mkdocs
1 parent d360f9a commit ae814d9

3 files changed

Lines changed: 163 additions & 12 deletions

File tree

docs/api/models.md

Lines changed: 112 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,123 @@
11
# Models API
22

3-
This page documents the Pydantic models used for representing events and reports.
3+
This page documents the Pydantic models used for representing events and reports in the legacy codebase.
44

5-
::: linux_edr.models.CommandLine
5+
## Event Models
66

7-
::: linux_edr.models.ProcessEvents
7+
### CommandLine
88

9-
::: linux_edr.models.SummaryReport
9+
Represents a command line with command name and arguments.
1010

11-
::: linux_edr.models.Cell
11+
```python
12+
from linux_edr.models import CommandLine
1213

13-
::: linux_edr.models.Block
14+
cmd = CommandLine(
15+
command="ls",
16+
args=["-la", "/home"]
17+
)
18+
```
1419

15-
::: linux_edr.models.DailyReport
20+
### ProcessEvents
1621

17-
::: linux_edr.models.WeeklyReport
22+
Collection of process execution events.
1823

19-
::: linux_edr.models.MonthlyReport
24+
```python
25+
from linux_edr.models import ProcessEvents
2026

21-
::: linux_edr.models.DailySummary
27+
events = ProcessEvents(
28+
events=[event1, event2, event3]
29+
)
30+
```
31+
32+
## Report Models
33+
34+
### SummaryReport
35+
36+
Base class for all summary reports.
37+
38+
```python
39+
from linux_edr.models import SummaryReport
40+
41+
# Used as a base class for specific report types
42+
```
43+
44+
### Cell
45+
46+
Represents a 5-minute report cell.
47+
48+
```python
49+
from linux_edr.models import Cell
50+
51+
cell = Cell(
52+
id="cell-2023-05-12-12-00",
53+
start_time=datetime.now(),
54+
end_time=datetime.now() + timedelta(minutes=5),
55+
command_count=42,
56+
unique_commands=15,
57+
# other fields...
58+
)
59+
```
60+
61+
### Block
62+
63+
Represents an hourly report block containing multiple cells.
64+
65+
```python
66+
from linux_edr.models import Block
67+
68+
block = Block(
69+
id="block-2023-05-12-12",
70+
start_time=datetime.now(),
71+
end_time=datetime.now() + timedelta(hours=1),
72+
cells=["cell-1", "cell-2", "cell-3"],
73+
# other fields...
74+
)
75+
```
76+
77+
### DailyReport
78+
79+
Represents a daily report containing multiple blocks.
80+
81+
```python
82+
from linux_edr.models import DailyReport
83+
84+
daily = DailyReport(
85+
id="daily-2023-05-12",
86+
start_time=datetime.now(),
87+
end_time=datetime.now() + timedelta(days=1),
88+
blocks=["block-1", "block-2", "block-3"],
89+
# other fields...
90+
)
91+
```
92+
93+
### WeeklyReport
94+
95+
Represents a weekly report containing multiple daily reports.
96+
97+
```python
98+
from linux_edr.models import WeeklyReport
99+
100+
weekly = WeeklyReport(
101+
id="weekly-2023-05-12",
102+
start_time=datetime.now(),
103+
end_time=datetime.now() + timedelta(weeks=1),
104+
dailies=["daily-1", "daily-2", "daily-3"],
105+
# other fields...
106+
)
107+
```
108+
109+
### MonthlyReport
110+
111+
Represents a monthly report containing multiple weekly reports.
112+
113+
```python
114+
from linux_edr.models import MonthlyReport
115+
116+
monthly = MonthlyReport(
117+
id="monthly-2023-05",
118+
start_time=datetime.now(),
119+
end_time=datetime.now() + timedelta(days=30),
120+
weeklies=["weekly-1", "weekly-2", "weekly-3", "weekly-4"],
121+
# other fields...
122+
)
123+
```

docs/privacy.md

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,48 @@
11
# Privacy Policy
22

3-
Please refer to the main [Privacy Policy](../PRIVACY.md) document in the repository root.
3+
This document outlines the privacy considerations for the Linux EDR system.
4+
5+
## Data Collection
6+
7+
Linux EDR collects process execution events from the Linux kernel through the `ftrace` subsystem. This includes:
8+
9+
- Process IDs (PIDs)
10+
- Command names and arguments
11+
- Execution timestamps
12+
- Parent-child process relationships
13+
14+
## Data Storage
15+
16+
All data collected by Linux EDR is stored locally on the system where it is installed. By default, no data is transmitted to external servers.
17+
18+
## AI Analysis
19+
20+
When the AI analysis feature is enabled:
21+
22+
1. Report summaries (not raw event data) may be sent to OpenAI's API for analysis
23+
2. The data sent is limited to aggregated statistics and patterns, not detailed command arguments
24+
3. You can disable this feature in the configuration file
25+
26+
## Data Retention
27+
28+
- Cell reports (5-minute intervals): Retained for 24 hours
29+
- Block reports (hourly): Retained for 7 days
30+
- Daily reports: Retained for 30 days
31+
- Weekly reports: Retained for 90 days
32+
- Monthly reports: Retained for 365 days
33+
34+
You can modify these retention periods in the configuration file.
35+
36+
## Security Considerations
37+
38+
- All data is stored in the local filesystem
39+
- Access to the reports requires filesystem permissions
40+
- No authentication is built into the tool itself - rely on system-level access controls
41+
42+
## Third-Party Services
43+
44+
The only external service optionally used is the OpenAI API for report analysis. This can be disabled in the configuration.
45+
46+
## Changes to This Policy
47+
48+
This privacy policy may be updated as the tool evolves. Check the repository for the latest version.

mkdocs.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,17 @@ nav:
4141
- Use Cases: api/application/use_cases.md
4242
- Infrastructure:
4343
- Repositories: api/infrastructure/repositories.md
44+
- Trace Reader: api/trace.md
45+
- Aggregator: api/aggregator.md
4446
- Interfaces:
4547
- Controllers: api/interfaces/controllers.md
4648
- Legacy APIs:
4749
- Report Manager: api/report_manager.md
4850
- Models: api/models.md
4951
- Reporter: api/reporter.md
5052
- Development: development.md
51-
- Privacy Policy: privacy.md
53+
- Reporting: reporting.md
54+
- Privacy: privacy.md
5255

5356
markdown_extensions:
5457
- pymdownx.highlight:
@@ -81,6 +84,7 @@ plugins:
8184
docstring_style: google
8285
show_source: true
8386
show_signature_annotations: true
87+
show_if_no_docstring: true
8488
- git-revision-date-localized:
8589
enable_creation_date: true
8690

0 commit comments

Comments
 (0)