idslab 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- idslab-0.3.0/CHANGELOG.md +145 -0
- idslab-0.3.0/CITATION.cff +20 -0
- idslab-0.3.0/CONTRIBUTING.md +37 -0
- idslab-0.3.0/DESIGN.md +544 -0
- idslab-0.3.0/INSTALL.md +548 -0
- idslab-0.3.0/LICENSE +661 -0
- idslab-0.3.0/MANIFEST.in +7 -0
- idslab-0.3.0/PKG-INFO +254 -0
- idslab-0.3.0/README.md +200 -0
- idslab-0.3.0/docs/architecture.md +72 -0
- idslab-0.3.0/docs/cli.md +77 -0
- idslab-0.3.0/docs/compare-and-sweeps.md +92 -0
- idslab-0.3.0/docs/config-reference.md +283 -0
- idslab-0.3.0/docs/dashboard.md +234 -0
- idslab-0.3.0/docs/getting-started.md +102 -0
- idslab-0.3.0/docs/img/dashboard-builder.png +0 -0
- idslab-0.3.0/docs/img/dashboard-editor.png +0 -0
- idslab-0.3.0/docs/img/dashboard-run.png +0 -0
- idslab-0.3.0/docs/img/design-r1-four-layer.svg +57 -0
- idslab-0.3.0/docs/img/design-r1-router-gate.svg +47 -0
- idslab-0.3.0/docs/img/design-r2-anomaly-first.svg +35 -0
- idslab-0.3.0/docs/img/flow-map.svg +38 -0
- idslab-0.3.0/docs/img/frontier-gap.svg +47 -0
- idslab-0.3.0/docs/img/idslab-overview.svg +125 -0
- idslab-0.3.0/docs/img/make_figures.py +969 -0
- idslab-0.3.0/docs/img/report-page.png +0 -0
- idslab-0.3.0/docs/img/selection.svg +54 -0
- idslab-0.3.0/docs/img/splits.svg +25 -0
- idslab-0.3.0/docs/img/stage-steps.svg +43 -0
- idslab-0.3.0/docs/limitations.md +60 -0
- idslab-0.3.0/docs/models.md +171 -0
- idslab-0.3.0/docs/outputs.md +73 -0
- idslab-0.3.0/docs/protocol.md +138 -0
- idslab-0.3.0/examples/README.md +86 -0
- idslab-0.3.0/examples/custom_adapter.py +44 -0
- idslab-0.3.0/examples/external_score_job.py +111 -0
- idslab-0.3.0/pyproject.toml +131 -0
- idslab-0.3.0/setup.cfg +4 -0
- idslab-0.3.0/src/idslab/__init__.py +5 -0
- idslab-0.3.0/src/idslab/adapters.py +214 -0
- idslab-0.3.0/src/idslab/cli.py +301 -0
- idslab-0.3.0/src/idslab/compare.py +375 -0
- idslab-0.3.0/src/idslab/config.py +1179 -0
- idslab-0.3.0/src/idslab/controls.py +185 -0
- idslab-0.3.0/src/idslab/dashboard/README.md +113 -0
- idslab-0.3.0/src/idslab/dashboard/__init__.py +3 -0
- idslab-0.3.0/src/idslab/dashboard/catalog.py +122 -0
- idslab-0.3.0/src/idslab/dashboard/jobs.py +333 -0
- idslab-0.3.0/src/idslab/dashboard/server.py +377 -0
- idslab-0.3.0/src/idslab/dashboard/static/app.js +188 -0
- idslab-0.3.0/src/idslab/dashboard/static/builder.js +884 -0
- idslab-0.3.0/src/idslab/dashboard/static/charts.js +151 -0
- idslab-0.3.0/src/idslab/dashboard/static/compare.js +231 -0
- idslab-0.3.0/src/idslab/dashboard/static/core.js +375 -0
- idslab-0.3.0/src/idslab/dashboard/static/draft.js +276 -0
- idslab-0.3.0/src/idslab/dashboard/static/experiments.js +413 -0
- idslab-0.3.0/src/idslab/dashboard/static/index.html +49 -0
- idslab-0.3.0/src/idslab/dashboard/static/jobs.js +122 -0
- idslab-0.3.0/src/idslab/dashboard/static/library.js +215 -0
- idslab-0.3.0/src/idslab/dashboard/static/results.js +313 -0
- idslab-0.3.0/src/idslab/dashboard/static/setup.js +567 -0
- idslab-0.3.0/src/idslab/dashboard/static/styles.css +421 -0
- idslab-0.3.0/src/idslab/dashboard/static/views.js +94 -0
- idslab-0.3.0/src/idslab/dashboard/workspace.py +778 -0
- idslab-0.3.0/src/idslab/data.py +268 -0
- idslab-0.3.0/src/idslab/examples/__init__.py +3 -0
- idslab-0.3.0/src/idslab/examples/r1_four_layer.yaml +66 -0
- idslab-0.3.0/src/idslab/examples/r1_router_gate.yaml +57 -0
- idslab-0.3.0/src/idslab/examples/r2_anomaly_first.yaml +45 -0
- idslab-0.3.0/src/idslab/external.py +196 -0
- idslab-0.3.0/src/idslab/features.py +96 -0
- idslab-0.3.0/src/idslab/fitting.py +429 -0
- idslab-0.3.0/src/idslab/graph.py +174 -0
- idslab-0.3.0/src/idslab/html_report.py +314 -0
- idslab-0.3.0/src/idslab/metrics.py +365 -0
- idslab-0.3.0/src/idslab/plugins.py +64 -0
- idslab-0.3.0/src/idslab/prep.py +74 -0
- idslab-0.3.0/src/idslab/report.py +453 -0
- idslab-0.3.0/src/idslab/runner.py +529 -0
- idslab-0.3.0/src/idslab/selection.py +308 -0
- idslab-0.3.0/src/idslab/sweep.py +261 -0
- idslab-0.3.0/src/idslab/synthetic.py +56 -0
- idslab-0.3.0/src/idslab/torch_models.py +169 -0
- idslab-0.3.0/src/idslab.egg-info/PKG-INFO +254 -0
- idslab-0.3.0/src/idslab.egg-info/SOURCES.txt +107 -0
- idslab-0.3.0/src/idslab.egg-info/dependency_links.txt +1 -0
- idslab-0.3.0/src/idslab.egg-info/entry_points.txt +2 -0
- idslab-0.3.0/src/idslab.egg-info/requires.txt +33 -0
- idslab-0.3.0/src/idslab.egg-info/top_level.txt +1 -0
- idslab-0.3.0/tests/test_adapters.py +137 -0
- idslab-0.3.0/tests/test_cli.py +78 -0
- idslab-0.3.0/tests/test_compare_sweep.py +159 -0
- idslab-0.3.0/tests/test_config.py +412 -0
- idslab-0.3.0/tests/test_controls.py +88 -0
- idslab-0.3.0/tests/test_customization.py +128 -0
- idslab-0.3.0/tests/test_dashboard.py +618 -0
- idslab-0.3.0/tests/test_dashboard_browser.py +201 -0
- idslab-0.3.0/tests/test_data.py +152 -0
- idslab-0.3.0/tests/test_examples.py +59 -0
- idslab-0.3.0/tests/test_external.py +200 -0
- idslab-0.3.0/tests/test_fitting.py +157 -0
- idslab-0.3.0/tests/test_graph.py +81 -0
- idslab-0.3.0/tests/test_metrics.py +151 -0
- idslab-0.3.0/tests/test_modes.py +111 -0
- idslab-0.3.0/tests/test_prep.py +49 -0
- idslab-0.3.0/tests/test_report.py +98 -0
- idslab-0.3.0/tests/test_runner.py +160 -0
- idslab-0.3.0/tests/test_selection.py +109 -0
- idslab-0.3.0/tests/test_torch_models.py +70 -0
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
Every version that can change results gets a new number: finished run units are reused only while
|
|
4
|
+
the config, data and IDSLab version fingerprints match.
|
|
5
|
+
|
|
6
|
+
## 0.3.0 (2026-10-17)
|
|
7
|
+
|
|
8
|
+
The evaluation is unchanged: the same config and data give the same per-flow predictions, frozen
|
|
9
|
+
configurations and controls as in 0.2.0. The version is part of every unit's fingerprint, so finished
|
|
10
|
+
0.2.0 units are not reused: run each experiment once under 0.3.0 before `idslab report` can rebuild
|
|
11
|
+
its report (a report counts only units of the running version). The dashboard marks results written
|
|
12
|
+
by another version and says so before a rebuild.
|
|
13
|
+
|
|
14
|
+
Added:
|
|
15
|
+
|
|
16
|
+
- Dashboard redesign around experiments. The home page lists each config with the results written
|
|
17
|
+
under its name, its state and the next step. Outputs are matched to configs by name, and by the
|
|
18
|
+
stored config fingerprints when names collide; outputs that match no config, or several, stay
|
|
19
|
+
readable on their own.
|
|
20
|
+
- New experiment from a template (a copy with its own name), from YAML, or from a blank design.
|
|
21
|
+
Templates, Datasets, Jobs, Reports and Help pages.
|
|
22
|
+
- Guided setup in four steps (Data, Cascade, Evaluation, Review & run), sharing one draft with the
|
|
23
|
+
YAML view. Typed YAML keeps its comments; a visual edit that would drop them asks first and shows
|
|
24
|
+
the difference.
|
|
25
|
+
- Builder: click-to-route and keyboard routing, focusable ports and stages, missing routes, loops
|
|
26
|
+
and unreached stages drawn and listed, and an inspector in sections. Parameters the forms do not
|
|
27
|
+
cover are kept as written.
|
|
28
|
+
- Results page: the TEST objective against the first stage alone, read with the per-unit bootstrap,
|
|
29
|
+
in percentage points or as a cost; stage effects, unseen attacks and types, comparisons with every
|
|
30
|
+
control, reproducibility. The frozen cascade of a unit is drawn from the routes it stored.
|
|
31
|
+
- Jobs page with progress from the job's log (units to run, finished, reused, the current phase),
|
|
32
|
+
a running-job indicator on every page, and past activity read from the workspace files.
|
|
33
|
+
- Runs log the unit count and each unit finished or reused; sweeps log the variant number.
|
|
34
|
+
`summary.json` stores the cascade's routes (`cascade`), and `Config.outline()` returns them.
|
|
35
|
+
- Optional browser tests (`pip install -e .[browser-tests]`).
|
|
36
|
+
|
|
37
|
+
Changed:
|
|
38
|
+
|
|
39
|
+
- Earlier dashboard addresses (`#/config`, `#/builder`, `#/run`, `#/job`, `#/command/...`,
|
|
40
|
+
`#/example`) redirect to the pages that now hold the same thing.
|
|
41
|
+
- `idslab dashboard` on a folder that does not exist says how to create it (`idslab example demo`)
|
|
42
|
+
instead of an unexpected-error line. The install guides make creating the demo folder its own
|
|
43
|
+
step before the dashboard, and the command-line run an optional step after it.
|
|
44
|
+
|
|
45
|
+
## 0.2.0 (2026-10-17)
|
|
46
|
+
|
|
47
|
+
Finished run units from 0.1.0 are not reused: the version is part of every unit's fingerprint, and the
|
|
48
|
+
fixes below change what a fingerprint covers.
|
|
49
|
+
|
|
50
|
+
Added:
|
|
51
|
+
|
|
52
|
+
- Visual pipeline builder in the dashboard: drag stages onto a canvas, wire outputs to stages or
|
|
53
|
+
terminals, drag score edges for features, and edit every stage setting in a panel (models from a
|
|
54
|
+
catalog with parameter forms, search spaces, pipeline steps, decisions, training rows). A dataset
|
|
55
|
+
panel reads a sample of the data and suggests the label, type and categorical columns. The config is
|
|
56
|
+
written with the loader's rules and validated on every change; node positions are saved next to the
|
|
57
|
+
config (`idslab.config.dump_yaml` writes configs that read back unchanged).
|
|
58
|
+
- Cost objectives: `protocol.objective: {cost: {missed_attack: A, false_alarm: B}}` chooses on VAL by
|
|
59
|
+
the lowest average cost per flow; `{recall_at_fpr: X}` by the highest recall within a false alarm
|
|
60
|
+
cap. The objective appears as its own column in every report.
|
|
61
|
+
- Stage cost: each run records the share of TEST flows reaching every stage and its scoring time; a
|
|
62
|
+
stage may declare `cost:`. Reports add the expected cost per flow of the cascade against its first
|
|
63
|
+
stage alone.
|
|
64
|
+
- `protocol.search: greedy_fixed`: later stages with a fixed decision stay on while earlier stages are
|
|
65
|
+
judged. On the synthetic R2 example it raised VAL and TEST accuracy in each of 3 seeds.
|
|
66
|
+
- Plugins through the entry point group `idslab.plugins`: models and pipeline steps for the builder
|
|
67
|
+
catalog, and named objectives.
|
|
68
|
+
- `idslab compare`: experiments side by side, and for experiments on the same data and splits a
|
|
69
|
+
paired comparison per unit on the same TEST flows, with paired bootstrap intervals. Writes
|
|
70
|
+
`compare.md`, `compare.json` and `compare.html`.
|
|
71
|
+
- `idslab sweep`: one base config with named variants or a grid of dotted-key changes; every variant
|
|
72
|
+
is checked first, written as its own config, run, reported and compared.
|
|
73
|
+
- Dashboard: Compare and Sweeps pages; compare and sweep run as dashboard jobs.
|
|
74
|
+
|
|
75
|
+
Fixed:
|
|
76
|
+
|
|
77
|
+
- Chained score dependencies (a stage that feeds another stage while using a third stage's scores)
|
|
78
|
+
are refused at config load. Their out-of-fold scores were not fully out of fold: the inner stage's
|
|
79
|
+
fold refits used features from models that had seen the held-out fold.
|
|
80
|
+
- External score sidecars (`.json`) are part of the unit fingerprint, so editing a sidecar reruns the
|
|
81
|
+
unit and its provenance is checked again; before, the finished unit was skipped.
|
|
82
|
+
- Reports check each unit's external score files against the current ones and leave out units whose
|
|
83
|
+
files changed, naming the reason; before, stale results from replaced files stayed in the report.
|
|
84
|
+
- Dashboard on Windows: Stop ends the job's worker processes too, and a path on another drive or with
|
|
85
|
+
a colon is refused with a message instead of an error.
|
|
86
|
+
|
|
87
|
+
Documentation:
|
|
88
|
+
|
|
89
|
+
- A short README with an overview figure and a table of guides; `INSTALL.md` with step-by-step guides
|
|
90
|
+
for Windows, macOS and GNU/Linux from the download to the dashboard; `docs/architecture.md`,
|
|
91
|
+
`docs/limitations.md`, `docs/compare-and-sweeps.md`; mini READMEs for the example designs and the
|
|
92
|
+
dashboard source. Figures are drawn by `docs/img/make_figures.py` from a real run.
|
|
93
|
+
- A project site (`docs/index.html`, served by GitHub Pages from `docs/`).
|
|
94
|
+
- IDSLab is not on PyPI yet; the guides install it from GitHub
|
|
95
|
+
(`pip install git+https://github.com/hashtagRR/IDSLab.git`).
|
|
96
|
+
|
|
97
|
+
## 0.1.0 (2026-10-16)
|
|
98
|
+
|
|
99
|
+
First public release.
|
|
100
|
+
|
|
101
|
+
- Documentation in `docs/`: getting started, config reference, protocol and controls, models, outputs,
|
|
102
|
+
command line, dashboard.
|
|
103
|
+
- `examples/custom_adapter.py` (a model behind its own adapter class) and
|
|
104
|
+
`examples/external_score_job.py` (an outside training job that writes an accepted score file),
|
|
105
|
+
both covered by the test suite.
|
|
106
|
+
- Package metadata for PyPI, a citation file and a test workflow.
|
|
107
|
+
|
|
108
|
+
## 0.0.6 (2026-10-16)
|
|
109
|
+
|
|
110
|
+
- `idslab dashboard`: a local web dashboard over a workspace folder. Every CLI command from the
|
|
111
|
+
browser as a background job with a live log and a stop button; config editor with validation as you
|
|
112
|
+
type and a cascade preview; run and unit views; report pages; file browser.
|
|
113
|
+
- `idslab run` and `export-splits` log progress to stderr.
|
|
114
|
+
- YAML syntax errors are config errors (exit code 2) instead of a traceback.
|
|
115
|
+
- The report's cascade map ends each route to BENIGN or ATTACK under its stage, so no edge crosses a
|
|
116
|
+
stage.
|
|
117
|
+
|
|
118
|
+
## 0.0.5 (2026-10-16)
|
|
119
|
+
|
|
120
|
+
- `report.html`: a self-contained page with headline figures, the cascade map, the systems table, the
|
|
121
|
+
unseen-attack grid, attack types, the joint check and the frozen configuration per run.
|
|
122
|
+
- `idslab.torch_models`: `TorchMLPClassifier` and `TorchAutoencoder` (extra `torch`).
|
|
123
|
+
|
|
124
|
+
## 0.0.4 (2026-10-16)
|
|
125
|
+
|
|
126
|
+
- External score candidates (`external: {path}`) with provenance checks, and `idslab export-splits`.
|
|
127
|
+
- `protocol.search: joint`: a check of every decision combination next to greedy selection.
|
|
128
|
+
|
|
129
|
+
## 0.0.3 (2026-10-16)
|
|
130
|
+
|
|
131
|
+
- Modes `heldout_family` and `natural_novelty`, with recall on unseen attacks and the frontier gap on
|
|
132
|
+
benign and unseen flows.
|
|
133
|
+
|
|
134
|
+
## 0.0.2 (2026-10-16)
|
|
135
|
+
|
|
136
|
+
- Score features from earlier stages (`extra_features`, out-of-fold on FIT).
|
|
137
|
+
- Multiclass stages with the annotate and decide roles, and type metrics.
|
|
138
|
+
- Detectors refitted on each batch (`fit_on: pool`), specialist training rows (`train_on: hard`),
|
|
139
|
+
`top_fraction` decisions.
|
|
140
|
+
|
|
141
|
+
## 0.0.1 (2026-10-15)
|
|
142
|
+
|
|
143
|
+
- Config loading and checks, splits, classifier and detector stages, greedy selection on VAL with an
|
|
144
|
+
off option, the controls, Markdown and JSON reports, resume by fingerprint, the CLI and the
|
|
145
|
+
synthetic example.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
message: "If you use IDSLab, please cite it as below."
|
|
3
|
+
title: "IDSLab: an evaluation framework for staged intrusion detection systems"
|
|
4
|
+
type: software
|
|
5
|
+
authors:
|
|
6
|
+
- family-names: Relapanawa
|
|
7
|
+
given-names: Rathsara
|
|
8
|
+
alias: hashtagRR
|
|
9
|
+
orcid: "https://orcid.org/0009-0002-0385-3757"
|
|
10
|
+
doi: 10.5281/zenodo.23435536 # every version; Zenodo gives each release its own DOI as well
|
|
11
|
+
version: 0.3.0
|
|
12
|
+
date-released: "2026-10-17"
|
|
13
|
+
license: AGPL-3.0-or-later
|
|
14
|
+
repository-code: "https://github.com/hashtagRR/IDSLab"
|
|
15
|
+
keywords:
|
|
16
|
+
- intrusion detection
|
|
17
|
+
- cascade
|
|
18
|
+
- evaluation
|
|
19
|
+
- machine learning
|
|
20
|
+
- network security
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Bug reports and pull requests are welcome at https://github.com/hashtagRR/IDSLab.
|
|
4
|
+
|
|
5
|
+
## Setup
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
git clone https://github.com/hashtagRR/IDSLab
|
|
9
|
+
cd IDSLab
|
|
10
|
+
python -m venv .venv && . .venv/bin/activate
|
|
11
|
+
pip install -e ".[dev,xgboost,pyod,imbalance,torch]"
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Checks
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
pytest # the whole suite, a few minutes
|
|
18
|
+
ruff check src tests examples
|
|
19
|
+
ruff format --check src tests examples
|
|
20
|
+
pyright
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Rules for changes
|
|
24
|
+
|
|
25
|
+
- The protocol rules in [DESIGN.md](DESIGN.md) hold for every change: TEST labels never influence
|
|
26
|
+
fitting or selection, and the controls are always reported. The test suite includes a check that
|
|
27
|
+
shuffles TEST labels and requires the same frozen configuration; keep it passing.
|
|
28
|
+
- A change that can alter results bumps the version in `pyproject.toml` and `src/idslab/__init__.py`,
|
|
29
|
+
so finished run units are not reused by mistake, and gets a line in [CHANGELOG.md](CHANGELOG.md).
|
|
30
|
+
- New source and test files start with the license header:
|
|
31
|
+
|
|
32
|
+
```python
|
|
33
|
+
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
34
|
+
# Copyright (C) 2026 hashtagRR
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
By contributing you agree that your contribution is licensed under the AGPL-3.0-or-later.
|