Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
ccecfac
Add AGENTS.md
AlyaGomaa Feb 10, 2026
39a0933
lo flows per minute from input and profiler in output/flows_per_minut…
AlyaGomaa Feb 10, 2026
0963b45
log FPM for each profiler worker separately
AlyaGomaa Feb 10, 2026
5f1297e
log latency in output/latency.csv for each added evidence
AlyaGomaa Feb 10, 2026
906c7bb
redis: use "127.0.0.1" instead of "localhost" when connecting to redi…
AlyaGomaa Feb 10, 2026
ff612e1
redis: use encoding instead of charset
AlyaGomaa Feb 10, 2026
15e2b14
Add AGENTS.md
AlyaGomaa Feb 10, 2026
5c686f3
lo flows per minute from input and profiler in output/flows_per_minut…
AlyaGomaa Feb 10, 2026
797a7da
log FPM for each profiler worker separately
AlyaGomaa Feb 10, 2026
1cb8b2c
log latency in output/latency.csv for each added evidence
AlyaGomaa Feb 10, 2026
e7b8a7e
redis: use "127.0.0.1" instead of "localhost" when connecting to redi…
AlyaGomaa Feb 10, 2026
4114ed5
Merge remote-tracking branch 'origin/alya/immune/stress_testing' into…
AlyaGomaa Feb 25, 2026
703c5f6
profiler.py: start max 7 workers instead of 10 to test slow pub/sub c…
AlyaGomaa Feb 25, 2026
29cd8a8
Add AGENTS.md
AlyaGomaa Feb 10, 2026
885d01c
lo flows per minute from input and profiler in output/flows_per_minut…
AlyaGomaa Feb 10, 2026
97ccfad
log FPM for each profiler worker separately
AlyaGomaa Feb 10, 2026
9645906
log latency in output/latency.csv for each added evidence
AlyaGomaa Feb 10, 2026
9cb814b
redis: use "127.0.0.1" instead of "localhost" when connecting to redi…
AlyaGomaa Feb 10, 2026
ffe6546
profiler.py: start max 7 workers instead of 10 to test slow pub/sub c…
AlyaGomaa Feb 25, 2026
7d99f0d
Merge remote-tracking branch 'origin/alya/immune/stress_testing' into…
AlyaGomaa Feb 25, 2026
e7195a6
Merge remote-tracking branch 'origin/develop' into alya/immune/stress…
AlyaGomaa Mar 4, 2026
c3a7d3f
evidence: fix getting the latency by converting the flow pcap time to…
AlyaGomaa Mar 5, 2026
ee3a18b
evidence: make latency = wall_elapsed - pcap_elapsed to be able to ha…
AlyaGomaa Mar 5, 2026
0ce4ae5
evidence: handle getting latency of live traffic different than we do…
AlyaGomaa Mar 5, 2026
c223351
plot latency as soon as slips stops
AlyaGomaa Mar 5, 2026
009803a
plot trhoughput for each profiler and for the sum of profilers as soo…
AlyaGomaa Mar 5, 2026
fae6339
add latency and throughput metrics to metrics.txt
AlyaGomaa Mar 5, 2026
4e839f9
fix problem keeping track of input.py analyzed flows per min
AlyaGomaa Mar 5, 2026
687b097
Add a debugging msg when a profiler worker stops
AlyaGomaa Mar 6, 2026
f8621fa
profiler_worker: keep checking for msgs from the input even if it sto…
AlyaGomaa Mar 6, 2026
3fb5476
Add a script that plots the amount of flows recvd over time given a c…
AlyaGomaa Mar 9, 2026
2ca1682
stress_testing.md: Added baseline and sudden spikes experiments stats
AlyaGomaa Mar 9, 2026
52edfc2
Add a soak testing traffic generator
AlyaGomaa Mar 10, 2026
a4c7f0b
add RAM usage monitor for slips, all children and redis for monitorin…
AlyaGomaa Mar 10, 2026
fcb85ab
add CPU usage monitor for slips and all children for monitoring soak …
AlyaGomaa Mar 10, 2026
9a4a7d8
log ram usage of slips and redis every 3 mins
AlyaGomaa Mar 10, 2026
c3659f5
plot the flows recvd in conn.log as soon as slips stops, and the reso…
AlyaGomaa Mar 10, 2026
8727509
soak_testing_traffic_generator.py: add rate limiter to ensure sustain…
AlyaGomaa Mar 10, 2026
1e622a5
add a simple http server that accepts get and post requests
AlyaGomaa Mar 11, 2026
482999f
soak_testing_traffic_generator.py: make a dns query that results in a…
AlyaGomaa Mar 11, 2026
7f6ae5c
soak_testing_traffic_generator.py: add ocassional attacks
AlyaGomaa Mar 11, 2026
100f4f3
add a plotter for resource usage.csv generated files
AlyaGomaa Mar 11, 2026
b8b75d8
move all images to docs/images/immune/c3
AlyaGomaa Mar 13, 2026
8947972
evidence_handler: extract threat level accumulation to its own func a…
AlyaGomaa Mar 13, 2026
256315b
evidence_handler: use queue.Queue instead of mp.Queue() for optimizat…
AlyaGomaa Mar 13, 2026
357eb15
evidence_handler: publish new evidence to report_to_peers and export_…
AlyaGomaa Mar 13, 2026
fc0888e
evidence_handler: dont send_to_exporting_module if they're not enabled
AlyaGomaa Mar 13, 2026
858ed7e
Add evidence<handlerWorker class, and start 3 workers for parallel pr…
AlyaGomaa Mar 13, 2026
fa16159
fix how evidence_logger stops
AlyaGomaa Mar 13, 2026
1da8554
get_analyzed_flows_percentage: handle ZeroDivisionError
AlyaGomaa Mar 13, 2026
49f31ac
remove unused attributes from evidence worker
AlyaGomaa Mar 13, 2026
411b254
fix problem logging redis RAM used
AlyaGomaa Mar 13, 2026
6f58233
Add a csv file for each profiler worker that logs each flow's latency
AlyaGomaa Mar 17, 2026
69ae7c2
Add a plotter to plot profiler workers' latency
AlyaGomaa Mar 17, 2026
012a03b
start 3 workers by default and increase when needed
AlyaGomaa Mar 17, 2026
3c2a417
flow_handler: comment out add_tuple to see if it's responsible for th…
AlyaGomaa Mar 17, 2026
52e1396
comment allprofiler logic to see if the latency is caused by the queue
AlyaGomaa Mar 17, 2026
fb803ec
uncomment whitelist checking in profiler to see if its the main sourc…
AlyaGomaa Mar 17, 2026
c64f72b
uncomment add_profile() to see if its the main source of latency
AlyaGomaa Mar 17, 2026
248ed7e
uncomment most of add_flow_to_profile()
AlyaGomaa Mar 18, 2026
d141adf
profiler: uncomment get_aid_and_store_flow_in_the_db()
AlyaGomaa Mar 18, 2026
e442dfd
profiler: uncomment mark_profile_tw_as_modified()
AlyaGomaa Mar 18, 2026
f7ba01e
db: publish a msg in tw_modified once every 40 modifications to see i…
AlyaGomaa Mar 18, 2026
355f9f1
profiler: uncomment the rest of profiler logic
AlyaGomaa Mar 23, 2026
20ca9d9
profiler: comment from handle_setting_local_net() onward
AlyaGomaa Mar 23, 2026
02c8546
profiler: comment all msgs published to tw_modified channel
AlyaGomaa Mar 23, 2026
88d83d9
profiler: comment mark_profile_tw_as_modified()
AlyaGomaa Mar 23, 2026
fca615c
profiler: batch update modified tws every 3s to avoid per flow trigge…
AlyaGomaa Mar 24, 2026
f2e8e2d
db: collect modified tws for 3 seconds, and publish them once every 3…
AlyaGomaa Mar 24, 2026
dbbd512
network_discovery: use new_flow channel instead of tw_modified to che…
AlyaGomaa Mar 24, 2026
4670570
profiler: uncomment handle_setting_local_net()
AlyaGomaa Mar 24, 2026
68c9f4b
profiler_worker: move all localnet related logic from profiler to hel…
AlyaGomaa Mar 24, 2026
65450cf
profiler: delete the custom LocalnetCacheShared and use mp Manager() …
AlyaGomaa Mar 24, 2026
fe9d3b3
localnet_handler.py: cache _configured_default_localnet()
AlyaGomaa Mar 24, 2026
9bc7a4e
profiler: comment handle_setting_local_net
AlyaGomaa Mar 24, 2026
cf4220e
profiler: comment _update_modified_tws_in_the_db()
AlyaGomaa Mar 24, 2026
7a355c2
uncomment the rest of profiler logic
AlyaGomaa Mar 25, 2026
29bce35
use better names for the generated plots
AlyaGomaa Mar 25, 2026
0e60bf8
Update the metrics in stress_testing.md
AlyaGomaa Mar 25, 2026
2bd1e74
stress_testing.md: Add ToC, traffic links, and a screenshot of latenc…
AlyaGomaa Mar 26, 2026
f9271cc
update .secrets.baseline
AlyaGomaa Mar 27, 2026
fac8c26
Add a generate_performance_plots param in the config file to enable/d…
AlyaGomaa Mar 27, 2026
e9adcf5
guard all plots-related logic to run only when the generate_performan…
AlyaGomaa Mar 27, 2026
ca5cd62
update .secrets.baseline
AlyaGomaa Mar 27, 2026
0a8952f
update docs and unit tests
AlyaGomaa Mar 27, 2026
4ea7d88
update links in stress_testing.md
AlyaGomaa Mar 27, 2026
d4f4fe8
delete stress testing scripts
AlyaGomaa Mar 27, 2026
a2ac8b7
print a msg when the plots is enabled
AlyaGomaa Mar 27, 2026
f071bf1
add localnet handler unit tests
AlyaGomaa Mar 27, 2026
7a2caa9
update unit tests
AlyaGomaa Mar 29, 2026
3c9c429
update unit tests
AlyaGomaa Mar 29, 2026
2aad8d2
profiler: add a function to _shutdown_localnet_cache_manager on shutdown
AlyaGomaa Mar 29, 2026
0806f6d
use localnet_cache struct again for sharing dicts between profiler pr…
AlyaGomaa Mar 29, 2026
de70757
delete all usage of the custom localnet cahce
AlyaGomaa Mar 29, 2026
ce319f2
db: add a func to get_total_recognized_localnets
AlyaGomaa Mar 29, 2026
c356c90
localnet_handler: use the db for trackign localnets instead of a shar…
AlyaGomaa Mar 29, 2026
b60e39e
update unit tests
AlyaGomaa Mar 29, 2026
fd037d6
fix race condition preventing slips from stopping in very small pcaps
AlyaGomaa Mar 29, 2026
7d29aa7
input: add debugging prints
AlyaGomaa Mar 30, 2026
d375221
input: if the input took less than 2mins to stop, wait extra 10s just…
AlyaGomaa Mar 30, 2026
0088ffb
use /upload-artifact v6 to avoid nodejs deprecation warning
AlyaGomaa Mar 30, 2026
bb1304c
input: wait more time for all profilers to start (to fix integration …
AlyaGomaa Mar 30, 2026
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
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:

- name: Upload Artifacts
if: always()
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v6
with:
# Replaces slashes with underscores for valid artifact naming
name: ${{ github.run_id }}-${{ strategy.job-index }}-integration-output
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:

- name: Upload Artifacts
if: always()
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v6
with:
name: test_slips-output-${{ strategy.job-index }}
path: |
Expand Down
4 changes: 2 additions & 2 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
"filename": "config/slips.yaml",
"hashed_secret": "4cac50cee3ad8e462728e711eac3e670753d5016",
"is_verified": false,
"line_number": 268
"line_number": 278
}
],
"dataset/test14-malicious-zeek-dir/http.log": [
Expand Down Expand Up @@ -7185,5 +7185,5 @@
}
]
},
"generated_at": "2026-03-02T22:46:58Z"
"generated_at": "2026-03-27T14:25:16Z"
}
42 changes: 42 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# AGENTS.md

## Project overview
- Entry point: `slips.py` (starts the main process, spawns modules, runs in interactive/daemon modes).
- Core framework code lives in `slips/`, `slips_files/`, and `managers/`.
- Detection/analysis modules are in `modules/` (implement the `IModule` interface).
- Configuration is in `config/` (main config: `config/slips.yaml`).
- Tests live under `tests/` (unit + integration suites).
- Documentation is in `docs/` (see `docs/contributing.md` for contribution workflow, branching, and PR expectations).
- UIs/tools: `SlipsWeb/`, `webinterface/`, `webinterface.sh`, and `kalipso.sh`.

## Build and test commands
- Run locally (no build step):
- `./slips.py -e 1 -f dataset/test7-malicious.pcap -o output_dir`
- Build the Docker image (from `docs/installation.md`):
- `docker build --no-cache -t slips -f docker/Dockerfile .`
- If build networking fails: `docker build --network=host --no-cache -t slips -f docker/Dockerfile .`
- Run the Docker image:
- `docker run -it --rm --net=host slips`

## Code style guidelines
- Python formatting is enforced via pre-commit:
- Black with `--line-length 79` (see `.pre-commit-config.yaml`).
- Ruff is used for linting and autofixes.
- Keep docstrings at the top of files where present (pre-commit `check-docstring-first`).
- Maintain clean whitespace (no trailing whitespace, final newline).
- Follow existing module patterns (`IModule` in `slips_files/common/abstracts/module.py`).

## Testing instructions
- The canonical test runner is `tests/run_all_tests.sh` (runs unit tests then integration tests).
- Equivalent manual sequence (from `tests/run_all_tests.sh`):
- `./slips.py -cc`
- `printf "0" | ./slips.py -k`
- `python3 -m pytest tests/ --ignore="tests/integration_tests" -n 7 -p no:warnings -vvvv -s`
- `python3 tests/destrctor.py`
- `./slips.py -cc`
- `printf "0" | ./slips.py -k`
- `python3 -m pytest -s tests/integration_tests/test_portscans.py -p no:warnings -vv`
- `python3 -m pytest -s tests/integration_tests/test_dataset.py -p no:warnings -vv`
- `python3 -m pytest -s tests/integration_tests/test_config_files.py -p no:warnings -vv`
- `printf "0" | ./slips.py -k`
- `./slips.py -cc`
10 changes: 10 additions & 0 deletions config/slips.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,16 @@ parameters:
# client_ips : [10.0.0.1, 11.0.0.0/24]
client_ips: []

#############################
Debug:
# Generate latency, throughput, and other performance related CSV files and plots in output/performance_plots/ for debugging
# When enabled, Slips records extra per-flow/per-minute performance data from
# input, profiler workers, and evidence handling, then generates summary plots
# during shutdown. Keep this disabled for normal runs because it adds extra
# bookkeeping and disk writes.
# available options are true/false
generate_performance_plots: false

#############################
detection:

Expand Down
8 changes: 8 additions & 0 deletions docs/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,14 @@ Once all modules are done processing, EvidenceHandler is killed by the Process m
- It runs the unit tests first, then the integration tests.
- Please get familiar with pytest first https://docs.pytest.org/en/stable/how-to/output.html

### What does `generate_performance_plots` do?

- `Debug.generate_performance_plots` in [config/slips.yaml](config/slips.yaml) is a developer-only debugging switch for performance investigations.
- When it is `true`, Slips writes extra CSVs under `output/performance_plots/csv/`, including alert latency (`latency.csv`), profiler worker latency (`profiler_worker_*_latency.csv`), and throughput (`flows_per_minute.csv`).
- On shutdown, the process manager turns those CSVs into plots and metrics under `output/performance_plots/` and `output/metrics.txt`.
- Leave it `false` for normal development and production-style runs. Enabling it adds Redis bookkeeping, file writes, and plot-generation work that are only useful when diagnosing throughput or latency behavior.
- The plots shown in [docs/immune/stress_testing.md](docs/immune/stress_testing.md) were generated with this parameter enabled.

### Where and how do we get the GW info?

Using one of these 3 ways
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/immune/Immune.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ This is the main guide to the documentation related to the changes done to Slips
- [Testing](https://stratospherelinuxips.readthedocs.io/en/develop/immune/testing.html)
- [LLM Research and Selection](https://stratospherelinuxips.readthedocs.io/en/develop/immune/research_and_selection_of_llm_candidates.html)
- [LLM RPI Performance](https://stratospherelinuxips.readthedocs.io/en/develop/immune/research_rpi_llm_performance.html)
- [Stress Testing](https://stratospherelinuxips.readthedocs.io/en/develop/immune/stress_testing.html)

### Security & Network Configuration

Expand Down
Loading
Loading