mas-sentry-toolkit 0.2.1__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.
- mas_sentry_toolkit-0.2.1/.coveragerc +14 -0
- mas_sentry_toolkit-0.2.1/.github/workflows/ci.yml +93 -0
- mas_sentry_toolkit-0.2.1/.github/workflows/docs.yml +31 -0
- mas_sentry_toolkit-0.2.1/.github/workflows/release.yml +68 -0
- mas_sentry_toolkit-0.2.1/.github/workflows/supply-chain.yml +103 -0
- mas_sentry_toolkit-0.2.1/.gitignore +20 -0
- mas_sentry_toolkit-0.2.1/.pre-commit-config.yaml +24 -0
- mas_sentry_toolkit-0.2.1/CHANGELOG.md +149 -0
- mas_sentry_toolkit-0.2.1/CODE_OF_CONDUCT.md +83 -0
- mas_sentry_toolkit-0.2.1/CONTRIBUTING.md +35 -0
- mas_sentry_toolkit-0.2.1/LICENSE +255 -0
- mas_sentry_toolkit-0.2.1/PKG-INFO +170 -0
- mas_sentry_toolkit-0.2.1/README.md +115 -0
- mas_sentry_toolkit-0.2.1/ROADMAP.md +21 -0
- mas_sentry_toolkit-0.2.1/SECURITY.md +38 -0
- mas_sentry_toolkit-0.2.1/THREAT_MODEL.md +101 -0
- mas_sentry_toolkit-0.2.1/docker-compose.yml +59 -0
- mas_sentry_toolkit-0.2.1/docs/ARCHITECTURE.md +89 -0
- mas_sentry_toolkit-0.2.1/docs/SUPPLY-CHAIN.md +92 -0
- mas_sentry_toolkit-0.2.1/docs/agentic/README.md +58 -0
- mas_sentry_toolkit-0.2.1/docs/api/README.md +93 -0
- mas_sentry_toolkit-0.2.1/docs/examples/01-environment-doctor.md +43 -0
- mas_sentry_toolkit-0.2.1/docs/examples/02-mcp-stdio-rce.md +51 -0
- mas_sentry_toolkit-0.2.1/docs/examples/03-abfp-baseline.md +56 -0
- mas_sentry_toolkit-0.2.1/docs/examples/04-agentic-static.md +52 -0
- mas_sentry_toolkit-0.2.1/docs/examples/05-bug-bounty-prep.md +45 -0
- mas_sentry_toolkit-0.2.1/docs/hcap-spec.md +436 -0
- mas_sentry_toolkit-0.2.1/docs/index.md +30 -0
- mas_sentry_toolkit-0.2.1/docs/mcp/ARCHITECTURE.md +39 -0
- mas_sentry_toolkit-0.2.1/docs/mcp/stdio-rce-writeup.md +60 -0
- mas_sentry_toolkit-0.2.1/docs/methodology/ABFP.md +70 -0
- mas_sentry_toolkit-0.2.1/docs/methodology/threat-modeling.md +41 -0
- mas_sentry_toolkit-0.2.1/docs/reference/api.md +23 -0
- mas_sentry_toolkit-0.2.1/docs/reference/cli.md +41 -0
- mas_sentry_toolkit-0.2.1/docs/usage/abfp-fingerprinting.md +22 -0
- mas_sentry_toolkit-0.2.1/docs/usage/attack-scenarios.md +74 -0
- mas_sentry_toolkit-0.2.1/docs/usage/mqtt-scanning.md +17 -0
- mas_sentry_toolkit-0.2.1/docs/usage/shell-completion.md +35 -0
- mas_sentry_toolkit-0.2.1/lab/README.md +75 -0
- mas_sentry_toolkit-0.2.1/lab/scenarios/insecure_command_topic.py +67 -0
- mas_sentry_toolkit-0.2.1/lab/scenarios/mcp-stdio-rce.yaml +23 -0
- mas_sentry_toolkit-0.2.1/lab/scenarios/run.py +93 -0
- mas_sentry_toolkit-0.2.1/lab/victim/agents/controller/Dockerfile +5 -0
- mas_sentry_toolkit-0.2.1/lab/victim/agents/controller/agent.py +23 -0
- mas_sentry_toolkit-0.2.1/lab/victim/agents/logger/Dockerfile +5 -0
- mas_sentry_toolkit-0.2.1/lab/victim/agents/logger/agent.py +25 -0
- mas_sentry_toolkit-0.2.1/lab/victim/agents/sensor/Dockerfile +5 -0
- mas_sentry_toolkit-0.2.1/lab/victim/agents/sensor/agent.py +27 -0
- mas_sentry_toolkit-0.2.1/lab/victim/mosquitto.conf +4 -0
- mas_sentry_toolkit-0.2.1/lab/vuln-mcp/Dockerfile +7 -0
- mas_sentry_toolkit-0.2.1/lab/vuln-mcp/server.py +136 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/__init__.py +1 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/__main__.py +7 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/agentic/__init__.py +9 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/agentic/action_audit.py +68 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/agentic/base.py +32 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/agentic/cascade.py +88 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/agentic/goal_hijack.py +87 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/agentic/identity_abuse.py +119 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/agentic/memory_poisoning.py +86 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/agentic/pipeline.py +113 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/agentic/resource_exhaustion.py +116 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/agentic/rogue_agent.py +44 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/agentic/run.py +79 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/agentic/supply_chain.py +243 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/agentic/tool_misuse.py +115 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/agentic/trust_exploit.py +126 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/agents/__init__.py +13 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/agents/abfp/__init__.py +8 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/agents/abfp/baseline.py +49 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/agents/abfp/encoding.py +76 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/agents/abfp/graph_diff.py +54 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/agents/abfp/identity.py +40 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/agents/abfp/observer.py +83 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/agents/abfp/payload.py +67 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/agents/abfp/rogue.py +65 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/agents/abfp/runtime.py +81 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/agents/abfp/schema_infer.py +60 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/agents/abfp/scoring.py +67 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/agents/abfp/timing.py +53 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/agents/abfp/timing_compare.py +31 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/agents/abfp/topic_graph.py +42 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/agents/abfp_models.py +226 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/agents/active_prober.py +173 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/agents/anomaly_detector.py +293 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/agents/fingerprinter.py +209 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/agents/interaction_graph.py +164 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/agents/payload_analyzer.py +70 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/cli/__init__.py +44 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/cli/abfp_cmd.py +36 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/cli/agentic_cmd.py +68 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/cli/doctor_cmd.py +80 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/cli/global_opts.py +27 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/cli/mcp_cmd.py +66 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/cli/report_cmd.py +74 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/core/__init__.py +1 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/core/adapters.py +76 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/core/audit_log.py +39 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/core/finding.py +68 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/core/scope.py +40 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/core/threat_engine.py +91 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/core/types.py +32 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/exploits/__init__.py +1 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/exploits/mqtt_bruteforce.py +71 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/exploits/mqtt_command_injection.py +97 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/exploits/mqtt_fuzzer.py +96 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/exploits/mqtt_retained.py +70 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/exploits/mqtt_retained_poison.py +100 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/exploits/mqtt_will_hijack.py +75 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/exploits/wordlists.py +30 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/protocols/__init__.py +19 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/protocols/a2a/__init__.py +6 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/protocols/a2a/card_audit.py +71 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/protocols/a2a/client.py +143 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/protocols/a2a/probes.py +87 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/protocols/amqp_analyzer.py +170 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/protocols/base.py +82 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/protocols/mcp/__init__.py +11 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/protocols/mcp/audit/__init__.py +1 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/protocols/mcp/audit/config_inject.py +82 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/protocols/mcp/audit/dns_rebind.py +55 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/protocols/mcp/audit/mcptox.py +72 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/protocols/mcp/audit/metadata_tamper.py +64 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/protocols/mcp/audit/path_traversal.py +131 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/protocols/mcp/audit/prompt_injection.py +63 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/protocols/mcp/audit/ssrf.py +71 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/protocols/mcp/audit/stdio_rce.py +63 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/protocols/mcp/audit/tool_poisoning.py +72 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/protocols/mcp/client.py +157 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/protocols/mcp/fingerprint.py +61 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/protocols/mcp/jsonrpc.py +78 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/protocols/mcp/runtime.py +127 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/protocols/mcp/transport_http.py +97 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/protocols/mcp/transport_stdio.py +86 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/protocols/mqtt_analyzer.py +92 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/protocols/mqtt_auth_check.py +78 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/protocols/mqtt_fingerprint.py +71 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/protocols/mqtt_topic_walker.py +63 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/reporting/__init__.py +1 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/reporting/html_report.py +248 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/reporting/markdown.py +55 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/reporting/markdown_report.py +75 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/reporting/mcp_html.py +52 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/reporting/report_model.py +113 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/reporting/sarif.py +79 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/reporting/structured.py +60 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/reporting/unified_html.py +117 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/threat_modeling/__init__.py +1 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/threat_modeling/abfp_stride_mapper.py +53 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/threat_modeling/attack_trees.py +95 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/threat_modeling/cvss_calculator.py +77 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/threat_modeling/ros2_threats.py +52 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/threat_modeling/stride.py +130 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/threat_modeling/stride_mapper.py +69 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/threat_modeling/stride_reporter.py +38 -0
- mas_sentry_toolkit-0.2.1/mas_sentry/threat_modeling/threat_aggregator.py +49 -0
- mas_sentry_toolkit-0.2.1/mkdocs.yml +79 -0
- mas_sentry_toolkit-0.2.1/pyproject.toml +97 -0
- mas_sentry_toolkit-0.2.1/renovate.json +45 -0
- mas_sentry_toolkit-0.2.1/reports/SELF-AUDIT.md +28 -0
- mas_sentry_toolkit-0.2.1/reports/demo_report.html +123 -0
- mas_sentry_toolkit-0.2.1/reports/demo_report.json +171 -0
- mas_sentry_toolkit-0.2.1/reports/live_demo_abfp.json +12 -0
- mas_sentry_toolkit-0.2.1/reports/self-supply.json +1 -0
- mas_sentry_toolkit-0.2.1/requirements-lock.txt +453 -0
- mas_sentry_toolkit-0.2.1/requirements.txt +18 -0
- mas_sentry_toolkit-0.2.1/scripts/add_spdx_header.sh +21 -0
- mas_sentry_toolkit-0.2.1/scripts/gen_coverage_badge.py +49 -0
- mas_sentry_toolkit-0.2.1/scripts/generate_demo_report.py +74 -0
- mas_sentry_toolkit-0.2.1/scripts/run_full_audit.sh +26 -0
- mas_sentry_toolkit-0.2.1/scripts/setup_lab.sh +35 -0
- mas_sentry_toolkit-0.2.1/tests/__init__.py +1 -0
- mas_sentry_toolkit-0.2.1/tests/agentic/__init__.py +0 -0
- mas_sentry_toolkit-0.2.1/tests/agentic/test_asi01_asi02.py +139 -0
- mas_sentry_toolkit-0.2.1/tests/agentic/test_asi03_asi04.py +170 -0
- mas_sentry_toolkit-0.2.1/tests/agentic/test_asi05_06_07.py +191 -0
- mas_sentry_toolkit-0.2.1/tests/agentic/test_asi08_09_10.py +258 -0
- mas_sentry_toolkit-0.2.1/tests/agentic/test_run_e2e.py +150 -0
- mas_sentry_toolkit-0.2.1/tests/agents/__init__.py +0 -0
- mas_sentry_toolkit-0.2.1/tests/agents/abfp/__init__.py +0 -0
- mas_sentry_toolkit-0.2.1/tests/agents/abfp/test_observer.py +52 -0
- mas_sentry_toolkit-0.2.1/tests/agents/abfp/test_payload.py +35 -0
- mas_sentry_toolkit-0.2.1/tests/agents/abfp/test_runtime_report.py +22 -0
- mas_sentry_toolkit-0.2.1/tests/agents/abfp/test_scoring.py +66 -0
- mas_sentry_toolkit-0.2.1/tests/agents/abfp/test_timing.py +48 -0
- mas_sentry_toolkit-0.2.1/tests/cli/__init__.py +0 -0
- mas_sentry_toolkit-0.2.1/tests/cli/test_smoke.py +173 -0
- mas_sentry_toolkit-0.2.1/tests/conftest.py +76 -0
- mas_sentry_toolkit-0.2.1/tests/core/__init__.py +0 -0
- mas_sentry_toolkit-0.2.1/tests/core/test_engine.py +204 -0
- mas_sentry_toolkit-0.2.1/tests/core/test_scope_and_audit.py +49 -0
- mas_sentry_toolkit-0.2.1/tests/integration/__init__.py +1 -0
- mas_sentry_toolkit-0.2.1/tests/integration/test_full_pipeline.py +113 -0
- mas_sentry_toolkit-0.2.1/tests/integration/test_mcp_vuln_lab.py +45 -0
- mas_sentry_toolkit-0.2.1/tests/integration/test_mqtt_lab.py +52 -0
- mas_sentry_toolkit-0.2.1/tests/integration/test_protocol_sniffer.py +67 -0
- mas_sentry_toolkit-0.2.1/tests/integration/test_report_pipeline.py +42 -0
- mas_sentry_toolkit-0.2.1/tests/protocols/__init__.py +0 -0
- mas_sentry_toolkit-0.2.1/tests/protocols/a2a/__init__.py +0 -0
- mas_sentry_toolkit-0.2.1/tests/protocols/a2a/test_a2a.py +227 -0
- mas_sentry_toolkit-0.2.1/tests/protocols/a2a/test_a2a_scope.py +24 -0
- mas_sentry_toolkit-0.2.1/tests/protocols/mcp/__init__.py +0 -0
- mas_sentry_toolkit-0.2.1/tests/protocols/mcp/test_audit.py +90 -0
- mas_sentry_toolkit-0.2.1/tests/protocols/mcp/test_audit_probes.py +127 -0
- mas_sentry_toolkit-0.2.1/tests/protocols/mcp/test_mcp_core.py +94 -0
- mas_sentry_toolkit-0.2.1/tests/protocols/mcp/test_poisoning.py +100 -0
- mas_sentry_toolkit-0.2.1/tests/protocols/mcp/test_runtime.py +153 -0
- mas_sentry_toolkit-0.2.1/tests/reporting/__init__.py +0 -0
- mas_sentry_toolkit-0.2.1/tests/reporting/test_renderers.py +164 -0
- mas_sentry_toolkit-0.2.1/tests/unit/__init__.py +1 -0
- mas_sentry_toolkit-0.2.1/tests/unit/test_abfp_models.py +87 -0
- mas_sentry_toolkit-0.2.1/tests/unit/test_abfp_stride_mapper.py +28 -0
- mas_sentry_toolkit-0.2.1/tests/unit/test_active_prober.py +84 -0
- mas_sentry_toolkit-0.2.1/tests/unit/test_amqp_analyzer.py +67 -0
- mas_sentry_toolkit-0.2.1/tests/unit/test_anomaly_detector.py +112 -0
- mas_sentry_toolkit-0.2.1/tests/unit/test_attack_trees.py +40 -0
- mas_sentry_toolkit-0.2.1/tests/unit/test_auth_check.py +60 -0
- mas_sentry_toolkit-0.2.1/tests/unit/test_cvss_calculator.py +54 -0
- mas_sentry_toolkit-0.2.1/tests/unit/test_exploit_scope.py +35 -0
- mas_sentry_toolkit-0.2.1/tests/unit/test_exploits.py +98 -0
- mas_sentry_toolkit-0.2.1/tests/unit/test_fingerprinter.py +75 -0
- mas_sentry_toolkit-0.2.1/tests/unit/test_gen_coverage_badge.py +23 -0
- mas_sentry_toolkit-0.2.1/tests/unit/test_interaction_graph.py +96 -0
- mas_sentry_toolkit-0.2.1/tests/unit/test_markdown_report.py +36 -0
- mas_sentry_toolkit-0.2.1/tests/unit/test_paho_v2.py +34 -0
- mas_sentry_toolkit-0.2.1/tests/unit/test_probe_scope.py +35 -0
- mas_sentry_toolkit-0.2.1/tests/unit/test_reporting.py +122 -0
- mas_sentry_toolkit-0.2.1/tests/unit/test_requirements_sync.py +67 -0
- mas_sentry_toolkit-0.2.1/tests/unit/test_ros2_threats.py +35 -0
- mas_sentry_toolkit-0.2.1/tests/unit/test_stride.py +88 -0
- mas_sentry_toolkit-0.2.1/tests/unit/test_stride_reporter.py +44 -0
- mas_sentry_toolkit-0.2.1/tests/unit/test_threat_aggregator.py +48 -0
- mas_sentry_toolkit-0.2.1/tests/unit/test_types.py +41 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
lint:
|
|
15
|
+
name: Lint & type-check
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
- uses: actions/setup-python@v5
|
|
20
|
+
with:
|
|
21
|
+
python-version: "3.12"
|
|
22
|
+
cache: pip
|
|
23
|
+
- name: Install dev deps
|
|
24
|
+
run: |
|
|
25
|
+
python -m pip install --upgrade pip
|
|
26
|
+
pip install -e ".[dev]"
|
|
27
|
+
- name: Ruff
|
|
28
|
+
run: ruff check .
|
|
29
|
+
- name: Ruff format
|
|
30
|
+
run: ruff format --check .
|
|
31
|
+
- name: Mypy
|
|
32
|
+
run: mypy mas_sentry
|
|
33
|
+
|
|
34
|
+
test:
|
|
35
|
+
name: Test py${{ matrix.python-version }}
|
|
36
|
+
runs-on: ubuntu-latest
|
|
37
|
+
strategy:
|
|
38
|
+
fail-fast: false
|
|
39
|
+
matrix:
|
|
40
|
+
python-version: ["3.11", "3.12", "3.13", "3.14"]
|
|
41
|
+
steps:
|
|
42
|
+
- uses: actions/checkout@v4
|
|
43
|
+
- uses: actions/setup-python@v5
|
|
44
|
+
with:
|
|
45
|
+
python-version: ${{ matrix.python-version }}
|
|
46
|
+
cache: pip
|
|
47
|
+
- name: Install
|
|
48
|
+
run: |
|
|
49
|
+
python -m pip install --upgrade pip
|
|
50
|
+
pip install -e ".[dev]"
|
|
51
|
+
- name: Pytest
|
|
52
|
+
run: pytest --cov=mas_sentry --cov-report=xml --cov-fail-under=70
|
|
53
|
+
|
|
54
|
+
security:
|
|
55
|
+
name: Security scan
|
|
56
|
+
runs-on: ubuntu-latest
|
|
57
|
+
steps:
|
|
58
|
+
- uses: actions/checkout@v4
|
|
59
|
+
- uses: actions/setup-python@v5
|
|
60
|
+
with:
|
|
61
|
+
python-version: "3.12"
|
|
62
|
+
- name: Install
|
|
63
|
+
run: |
|
|
64
|
+
python -m pip install --upgrade pip
|
|
65
|
+
pip install bandit
|
|
66
|
+
- name: Bandit
|
|
67
|
+
run: bandit -r mas_sentry -ll
|
|
68
|
+
|
|
69
|
+
integration:
|
|
70
|
+
name: Integration (live broker)
|
|
71
|
+
runs-on: ubuntu-latest
|
|
72
|
+
needs: test
|
|
73
|
+
steps:
|
|
74
|
+
- uses: actions/checkout@v4
|
|
75
|
+
- uses: actions/setup-python@v5
|
|
76
|
+
with:
|
|
77
|
+
python-version: "3.12"
|
|
78
|
+
cache: pip
|
|
79
|
+
- name: Start Mosquitto broker
|
|
80
|
+
run: docker compose up -d mosquitto
|
|
81
|
+
- name: Install
|
|
82
|
+
run: |
|
|
83
|
+
python -m pip install --upgrade pip
|
|
84
|
+
pip install -e ".[dev]"
|
|
85
|
+
- name: Wait for broker on 1883
|
|
86
|
+
run: |
|
|
87
|
+
for i in $(seq 1 20); do
|
|
88
|
+
(echo > /dev/tcp/127.0.0.1/1883) 2>/dev/null && exit 0
|
|
89
|
+
sleep 1
|
|
90
|
+
done
|
|
91
|
+
echo "broker did not come up" && exit 1
|
|
92
|
+
- name: Integration tests
|
|
93
|
+
run: pytest tests/integration -v
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
name: Docs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
tags: ['v*']
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: write
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build-and-deploy:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
with:
|
|
18
|
+
fetch-depth: 0
|
|
19
|
+
- uses: actions/setup-python@v5
|
|
20
|
+
with:
|
|
21
|
+
python-version: "3.12"
|
|
22
|
+
cache: pip
|
|
23
|
+
- name: Install
|
|
24
|
+
run: |
|
|
25
|
+
python -m pip install --upgrade pip
|
|
26
|
+
pip install -e ".[docs]"
|
|
27
|
+
- name: Build site (strict)
|
|
28
|
+
run: mkdocs build --strict
|
|
29
|
+
- name: Deploy to GitHub Pages
|
|
30
|
+
if: github.ref == 'refs/heads/main'
|
|
31
|
+
run: mkdocs gh-deploy --force --clean
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags: ["v*"]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: write
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
build-and-release:
|
|
13
|
+
name: Build dists + SBOM
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
- uses: actions/setup-python@v5
|
|
18
|
+
with:
|
|
19
|
+
python-version: "3.12"
|
|
20
|
+
cache: pip
|
|
21
|
+
- name: Install build tooling
|
|
22
|
+
run: |
|
|
23
|
+
python -m pip install --upgrade pip
|
|
24
|
+
pip install build twine cyclonedx-bom
|
|
25
|
+
- name: Build wheel + sdist
|
|
26
|
+
run: python -m build
|
|
27
|
+
- name: Check distributions
|
|
28
|
+
run: twine check dist/*
|
|
29
|
+
- name: Generate CycloneDX SBOM from locked deps
|
|
30
|
+
run: |
|
|
31
|
+
cyclonedx-py requirements requirements-lock.txt \
|
|
32
|
+
--output-format JSON \
|
|
33
|
+
--output-file dist/sbom.cyclonedx.json
|
|
34
|
+
- name: Upload build artifacts
|
|
35
|
+
uses: actions/upload-artifact@v4
|
|
36
|
+
with:
|
|
37
|
+
name: dist
|
|
38
|
+
path: dist/*
|
|
39
|
+
- name: Attach to GitHub Release
|
|
40
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
41
|
+
uses: softprops/action-gh-release@v2
|
|
42
|
+
with:
|
|
43
|
+
files: |
|
|
44
|
+
dist/*.whl
|
|
45
|
+
dist/*.tar.gz
|
|
46
|
+
dist/sbom.cyclonedx.json
|
|
47
|
+
generate_release_notes: true
|
|
48
|
+
|
|
49
|
+
publish-pypi:
|
|
50
|
+
name: Publish to PyPI (trusted publishing)
|
|
51
|
+
needs: build-and-release
|
|
52
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
53
|
+
runs-on: ubuntu-latest
|
|
54
|
+
environment:
|
|
55
|
+
name: pypi
|
|
56
|
+
url: https://pypi.org/p/mas-sentry-toolkit
|
|
57
|
+
permissions:
|
|
58
|
+
id-token: write
|
|
59
|
+
steps:
|
|
60
|
+
- name: Download dist artifact
|
|
61
|
+
uses: actions/download-artifact@v4
|
|
62
|
+
with:
|
|
63
|
+
name: dist
|
|
64
|
+
path: dist
|
|
65
|
+
- name: Drop non-distribution files (PyPI rejects SBOM)
|
|
66
|
+
run: rm -f dist/sbom.cyclonedx.json
|
|
67
|
+
- name: Publish to PyPI
|
|
68
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
name: Supply Chain
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
paths:
|
|
7
|
+
- pyproject.toml
|
|
8
|
+
- requirements.txt
|
|
9
|
+
- requirements-lock.txt
|
|
10
|
+
- .github/workflows/supply-chain.yml
|
|
11
|
+
pull_request:
|
|
12
|
+
branches: [main]
|
|
13
|
+
schedule:
|
|
14
|
+
- cron: "17 6 * * 1" # weekly Mon 06:17 UTC - catch new CVEs in unchanged deps
|
|
15
|
+
workflow_dispatch:
|
|
16
|
+
|
|
17
|
+
permissions:
|
|
18
|
+
contents: read
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
lockfile-integrity:
|
|
22
|
+
name: Lockfile hash-verified install
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v4
|
|
26
|
+
- uses: actions/setup-python@v5
|
|
27
|
+
with:
|
|
28
|
+
python-version: "3.12"
|
|
29
|
+
cache: pip
|
|
30
|
+
- name: Install runtime deps with enforced hashes
|
|
31
|
+
run: |
|
|
32
|
+
python -m pip install --upgrade pip
|
|
33
|
+
pip install --require-hashes -r requirements-lock.txt
|
|
34
|
+
- name: Install package (no deps)
|
|
35
|
+
run: pip install . --no-deps
|
|
36
|
+
- name: Import smoke
|
|
37
|
+
run: python -c "import mas_sentry; print(mas_sentry.__name__, 'ok')"
|
|
38
|
+
|
|
39
|
+
vuln-audit:
|
|
40
|
+
name: Dependency CVE audit
|
|
41
|
+
runs-on: ubuntu-latest
|
|
42
|
+
steps:
|
|
43
|
+
- uses: actions/checkout@v4
|
|
44
|
+
- uses: actions/setup-python@v5
|
|
45
|
+
with:
|
|
46
|
+
python-version: "3.12"
|
|
47
|
+
cache: pip
|
|
48
|
+
- name: Install pip-audit
|
|
49
|
+
run: |
|
|
50
|
+
python -m pip install --upgrade pip
|
|
51
|
+
pip install pip-audit
|
|
52
|
+
- name: Audit locked dependencies
|
|
53
|
+
run: pip-audit -r requirements-lock.txt
|
|
54
|
+
|
|
55
|
+
dogfood-asi08:
|
|
56
|
+
name: Self-audit (mas-sentry ASI08)
|
|
57
|
+
runs-on: ubuntu-latest
|
|
58
|
+
steps:
|
|
59
|
+
- uses: actions/checkout@v4
|
|
60
|
+
- uses: actions/setup-python@v5
|
|
61
|
+
with:
|
|
62
|
+
python-version: "3.12"
|
|
63
|
+
cache: pip
|
|
64
|
+
- name: Install package
|
|
65
|
+
run: |
|
|
66
|
+
python -m pip install --upgrade pip
|
|
67
|
+
pip install -e .
|
|
68
|
+
- name: Scan own lockfile for supply-chain risk
|
|
69
|
+
run: |
|
|
70
|
+
mkdir -p reports
|
|
71
|
+
mas-sentry agentic scan \
|
|
72
|
+
--target self-audit \
|
|
73
|
+
--requirements requirements-lock.txt \
|
|
74
|
+
--asi asi08 \
|
|
75
|
+
--out reports/self-asi08.json
|
|
76
|
+
- name: Gate on findings
|
|
77
|
+
run: |
|
|
78
|
+
python - reports/self-asi08.json <<'EOF'
|
|
79
|
+
import json, sys, pathlib
|
|
80
|
+
findings = json.loads(pathlib.Path(sys.argv[1]).read_text())
|
|
81
|
+
if findings:
|
|
82
|
+
print(f"::error::ASI08 self-audit found {len(findings)} finding(s)")
|
|
83
|
+
for f in findings:
|
|
84
|
+
print(f" - [{f['severity']}] {f['title']}")
|
|
85
|
+
sys.exit(1)
|
|
86
|
+
print("ASI08 self-audit clean: 0 findings")
|
|
87
|
+
EOF
|
|
88
|
+
- name: Upload self-audit report
|
|
89
|
+
if: always()
|
|
90
|
+
uses: actions/upload-artifact@v4
|
|
91
|
+
with:
|
|
92
|
+
name: self-asi08-report
|
|
93
|
+
path: reports/self-asi08.json
|
|
94
|
+
|
|
95
|
+
dependency-review:
|
|
96
|
+
name: Dependency review
|
|
97
|
+
if: github.event_name == 'pull_request'
|
|
98
|
+
runs-on: ubuntu-latest
|
|
99
|
+
steps:
|
|
100
|
+
- uses: actions/checkout@v4
|
|
101
|
+
- uses: actions/dependency-review-action@v4
|
|
102
|
+
with:
|
|
103
|
+
fail-on-severity: high
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
venv/
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.pyc
|
|
4
|
+
*.egg-info/
|
|
5
|
+
dist/
|
|
6
|
+
build/
|
|
7
|
+
.env
|
|
8
|
+
*.log
|
|
9
|
+
reports/output/
|
|
10
|
+
.DS_Store
|
|
11
|
+
.idea/
|
|
12
|
+
*.pcap
|
|
13
|
+
*.bak
|
|
14
|
+
site/
|
|
15
|
+
.coverage
|
|
16
|
+
coverage.xml
|
|
17
|
+
.pytest_cache/
|
|
18
|
+
|
|
19
|
+
# transient lab scenario run artifacts (curated demo/self-supply reports stay tracked)
|
|
20
|
+
reports/lab_*.json
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
3
|
+
rev: v6.0.0
|
|
4
|
+
hooks:
|
|
5
|
+
- id: trailing-whitespace
|
|
6
|
+
- id: end-of-file-fixer
|
|
7
|
+
- id: check-yaml
|
|
8
|
+
- id: check-toml
|
|
9
|
+
- id: check-merge-conflict
|
|
10
|
+
- id: check-added-large-files
|
|
11
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
12
|
+
rev: v0.15.17
|
|
13
|
+
hooks:
|
|
14
|
+
- id: ruff
|
|
15
|
+
args: [--fix]
|
|
16
|
+
- id: ruff-format
|
|
17
|
+
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
18
|
+
rev: v1.19.1
|
|
19
|
+
hooks:
|
|
20
|
+
- id: mypy
|
|
21
|
+
additional_dependencies:
|
|
22
|
+
- pydantic
|
|
23
|
+
- types-paho-mqtt
|
|
24
|
+
args: [--ignore-missing-imports]
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.2.1] - 2026-06-20 - First PyPI release
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
- `release.yml`: isolated `publish-pypi` job using OIDC trusted publishing
|
|
7
|
+
(`pypa/gh-action-pypi-publish`), tag-only, no API tokens. The package is
|
|
8
|
+
now installable from PyPI.
|
|
9
|
+
|
|
10
|
+
### Notes
|
|
11
|
+
- No runtime code changes from 0.2.0; this release exists to ship the PyPI
|
|
12
|
+
distribution path via the tag-triggered pipeline.
|
|
13
|
+
|
|
14
|
+
## [0.2.0] — 2026-06-19 — Pivot to Agentic MAS Security
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
- Relicensed from MIT to **AGPL-3.0-or-later** (sole contributor consent).
|
|
18
|
+
- Repositioned: MQTT/AMQP-only → unified MQTT/AMQP **+ MCP + A2A + agentic** toolkit.
|
|
19
|
+
- All findings now map to OWASP Agentic Top 10 (2026) in addition to STRIDE.
|
|
20
|
+
- Python floor raised to 3.11.
|
|
21
|
+
- CI badge URL fixed (user70616E6461 → evkir).
|
|
22
|
+
- pyproject.toml migrated to hatchling backend.
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
- THREAT_MODEL.md (ASI01-ASI10, MCP CVEs, ABFP-STRIDE table).
|
|
26
|
+
- CI matrix Python 3.11/3.12/3.13/3.14.
|
|
27
|
+
- scripts/add_spdx_header.sh (idempotent, shebang-aware).
|
|
28
|
+
- Pre-commit hooks (ruff/format) and Renovate dependency automation.
|
|
29
|
+
- Integration tests against a live Mosquitto broker via docker compose.
|
|
30
|
+
- Supply-chain security: hash-pinned `requirements-lock.txt`, `requirements.txt`
|
|
31
|
+
mirror with a drift-guard test, and `supply-chain.yml` CI (hash-verified
|
|
32
|
+
install, pip-audit CVE scan, ASI08 dogfood self-audit, dependency-review).
|
|
33
|
+
- `docs/SUPPLY-CHAIN.md` documenting the pinning + verification model.
|
|
34
|
+
- `release.yml`: wheel + sdist build, `twine check`, and a CycloneDX SBOM
|
|
35
|
+
generated from the locked deps, attached to the GitHub Release on tag.
|
|
36
|
+
- CLI `--version` (via importlib.metadata) and documented shell completion.
|
|
37
|
+
- `project.urls` Security + Threat Model entries for PyPI sidebar discovery.
|
|
38
|
+
- Five verified usage example workflows under `docs/examples/`.
|
|
39
|
+
- Dogfood ASI08 self-audit (`reports/SELF-AUDIT.md`) - 0 findings on the
|
|
40
|
+
hash-pinned lockfile.
|
|
41
|
+
|
|
42
|
+
### Changed (hardening)
|
|
43
|
+
- mypy is now a hard CI gate (previously advisory / continue-on-error).
|
|
44
|
+
- ASI08 supply-chain scanner is pyproject-aware and ignores non-requirement
|
|
45
|
+
lines (option flags, `--hash` continuations, TOML scaffolding).
|
|
46
|
+
- pytest config consolidated into `pyproject.toml` (asyncio auto,
|
|
47
|
+
strict-markers, coverage gate 60%); removed the shadowing `pytest.ini`.
|
|
48
|
+
- Rewrote `ARCHITECTURE.md` and `docs/api/README.md` to the current
|
|
49
|
+
`UnifiedThreatEngine` module model; the old docs described the deleted
|
|
50
|
+
`SentryEngine` and shipped copy-paste examples that would ImportError.
|
|
51
|
+
|
|
52
|
+
### Fixed
|
|
53
|
+
- ASI08 parser miscounted TOML and option lines as dependencies, producing a
|
|
54
|
+
false "N/N unpinned" finding when pointed at a `pyproject.toml`.
|
|
55
|
+
- ABFP report serialization of slotted `BaselineStatus` via `asdict`.
|
|
56
|
+
- SARIF emitter no longer hardcodes the tool version; it is derived from
|
|
57
|
+
package metadata (importlib.metadata), so emitted reports never drift.
|
|
58
|
+
|
|
59
|
+
### Removed (pre-release dead-code audit)
|
|
60
|
+
- Pre-pivot `SentryEngine 1.0` MQTT/AMQP cluster: `core/engine.py`,
|
|
61
|
+
`core/session.py`, `core/config.py`, `core/display.py`, `core/exporter.py`,
|
|
62
|
+
`core/multi_target.py`, `protocols/auto_detect.py`, `agents/profiles.py` --
|
|
63
|
+
all superseded by `UnifiedThreatEngine` and the `reporting/` package.
|
|
64
|
+
- Unwired SQLAlchemy persistence (`agents/abfp/storage.py`) and its
|
|
65
|
+
`sqlalchemy` + `alembic` runtime dependencies (alembic was a phantom dep:
|
|
66
|
+
no migrations, no alembic.ini).
|
|
67
|
+
- Duplicate / unsafe ABFP fragments: `agents/abfp/stride_map.py` (duplicated
|
|
68
|
+
the live `abfp_stride_mapper`) and `reporting/abfp_html.py` (duplicated
|
|
69
|
+
`unified_html` without jinja2 autoescape).
|
|
70
|
+
- Unwired ABFP features `agents/abfp/impersonation.py` and
|
|
71
|
+
`agents/abfp/graph_metrics.py`, deferred to v0.3.0 as properly wired+tested
|
|
72
|
+
modules (code preserved in git history).
|
|
73
|
+
- Second divergent click CLI in `__main__.py` (sniff/abfp/fingerprint/walk/
|
|
74
|
+
audit/probe/learn/config) frozen at a hardcoded v0.1.0 banner and the
|
|
75
|
+
pre-pivot MQTT/AMQP command set; `python -m mas_sentry` now delegates to the
|
|
76
|
+
real `mas-sentry` CLI (mas_sentry.cli:app).
|
|
77
|
+
- Net effect: real line coverage rose from ~66.9% to ~77% (dead 0%-modules
|
|
78
|
+
out of the denominator) and the runtime dependency surface dropped by two
|
|
79
|
+
direct + two transitive packages. CI coverage gate raised 60 -> 70.
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
All notable changes to MAS-Sentry-Toolkit are documented here.
|
|
83
|
+
Format based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## [0.9.0] - 2025-05-11
|
|
88
|
+
|
|
89
|
+
### Added
|
|
90
|
+
- Core Engine + CLI (5 commands: scan, abfp, report, probe, graph)
|
|
91
|
+
- MQTT Analyzer — anonymous auth, wildcard topics, retained message poisoning
|
|
92
|
+
- AMQP Analyzer — vhost enumeration, credential brute-force detection
|
|
93
|
+
- Docker Lab — mosquitto broker + 3 MAS agents (sensor, actuator, coordinator)
|
|
94
|
+
- ABFP Engine Phase 1: passive behavioral fingerprinting
|
|
95
|
+
- ABFP Engine Phase 2: anomaly scoring (0–100)
|
|
96
|
+
- ABFP Engine Phase 3: drift detection and alerting
|
|
97
|
+
- Anomaly Detector — statistical baseline comparison
|
|
98
|
+
- STRIDE Threat Mapper — automated threat modeling for MAS topologies
|
|
99
|
+
- Report Generator — HTML, JSON, Markdown output formats
|
|
100
|
+
- Active Prober — authenticated and unauthenticated probe modes
|
|
101
|
+
- Interaction Graph — agent communication topology visualization
|
|
102
|
+
- HCAP Protocol Specification v0.1
|
|
103
|
+
- GitHub Actions CI — Python 3.10 / 3.11 / 3.12
|
|
104
|
+
- Type aliases and typed helpers (core/types.py)
|
|
105
|
+
- Coverage badge generator script
|
|
106
|
+
|
|
107
|
+
### Fixed
|
|
108
|
+
- numpy version pin for Python 3.13 compatibility
|
|
109
|
+
- pydantic version pin for Python 3.13 compatibility
|
|
110
|
+
|
|
111
|
+
### Infrastructure
|
|
112
|
+
- pytest-cov integration with 70% threshold
|
|
113
|
+
- pyproject.toml with mypy + ruff config
|
|
114
|
+
- SECURITY.md vulnerability disclosure policy
|
|
115
|
+
- ROADMAP.md with v1.0.0 milestones
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## [0.1.0] - 2025-04-01
|
|
120
|
+
|
|
121
|
+
### Added
|
|
122
|
+
- Initial project scaffold
|
|
123
|
+
- Basic MQTT connection probe
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## [1.0.0] - 2025-05-13
|
|
128
|
+
|
|
129
|
+
### Added
|
|
130
|
+
- CVSS v3.1 calculator for MAS vulnerability scoring
|
|
131
|
+
- IoT attack tree scenarios (AT-001, AT-002)
|
|
132
|
+
- ROS2/DDS threat catalog (4 scenarios)
|
|
133
|
+
- Threat scoring aggregation with risk level calculation
|
|
134
|
+
- CONTRIBUTING.md with setup and commit guide
|
|
135
|
+
- Full API reference docs
|
|
136
|
+
- Attack scenario usage examples
|
|
137
|
+
- STRIDE mapper tests, CVSS tests, aggregator tests
|
|
138
|
+
|
|
139
|
+
### Changed
|
|
140
|
+
- stride.py rewritten with threat_id, cvss_score fields
|
|
141
|
+
- stride_mapper.py aligned with test expectations
|
|
142
|
+
- numpy and pydantic version pins fixed for Python 3.13+
|
|
143
|
+
|
|
144
|
+
### Tests
|
|
145
|
+
- 116 commits, 100+ tests passing
|
|
146
|
+
- CI green on Python 3.10 / 3.11 / 3.12
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
*Released: 2026-05-15*
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
|
|
6
|
+
|
|
7
|
+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
|
|
8
|
+
|
|
9
|
+
## Our Standards
|
|
10
|
+
|
|
11
|
+
Examples of behavior that contributes to a positive environment for our community include:
|
|
12
|
+
|
|
13
|
+
* Demonstrating empathy and kindness toward other people
|
|
14
|
+
* Being respectful of differing opinions, viewpoints, and experiences
|
|
15
|
+
* Giving and gracefully accepting constructive feedback
|
|
16
|
+
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
|
|
17
|
+
* Focusing on what is best not just for us as individuals, but for the overall community
|
|
18
|
+
|
|
19
|
+
Examples of unacceptable behavior include:
|
|
20
|
+
|
|
21
|
+
* The use of sexualized language or imagery, and sexual attention or advances of any kind
|
|
22
|
+
* Trolling, insulting or derogatory comments, and personal or political attacks
|
|
23
|
+
* Public or private harassment
|
|
24
|
+
* Publishing others' private information, such as a physical or email address, without their explicit permission
|
|
25
|
+
* Other conduct which could reasonably be considered inappropriate in a professional setting
|
|
26
|
+
|
|
27
|
+
## Enforcement Responsibilities
|
|
28
|
+
|
|
29
|
+
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
|
|
30
|
+
|
|
31
|
+
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
|
|
32
|
+
|
|
33
|
+
## Scope
|
|
34
|
+
|
|
35
|
+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
|
|
36
|
+
|
|
37
|
+
## Enforcement
|
|
38
|
+
|
|
39
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at ekiriyak@gmail.com. All complaints will be reviewed and investigated promptly and fairly.
|
|
40
|
+
|
|
41
|
+
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
|
|
42
|
+
|
|
43
|
+
## Enforcement Guidelines
|
|
44
|
+
|
|
45
|
+
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
|
|
46
|
+
|
|
47
|
+
### 1. Correction
|
|
48
|
+
|
|
49
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
|
|
50
|
+
|
|
51
|
+
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
|
|
52
|
+
|
|
53
|
+
### 2. Warning
|
|
54
|
+
|
|
55
|
+
**Community Impact**: A violation through a single incident or series of actions.
|
|
56
|
+
|
|
57
|
+
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
|
|
58
|
+
|
|
59
|
+
### 3. Temporary Ban
|
|
60
|
+
|
|
61
|
+
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
|
|
62
|
+
|
|
63
|
+
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
|
|
64
|
+
|
|
65
|
+
### 4. Permanent Ban
|
|
66
|
+
|
|
67
|
+
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
|
|
68
|
+
|
|
69
|
+
**Consequence**: A permanent ban from any sort of public interaction within the community.
|
|
70
|
+
|
|
71
|
+
## Attribution
|
|
72
|
+
|
|
73
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
|
74
|
+
|
|
75
|
+
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
|
76
|
+
|
|
77
|
+
For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at [https://www.contributor-covenant.org/translations][translations].
|
|
78
|
+
|
|
79
|
+
[homepage]: https://www.contributor-covenant.org
|
|
80
|
+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
|
81
|
+
[Mozilla CoC]: https://github.com/mozilla/diversity
|
|
82
|
+
[FAQ]: https://www.contributor-covenant.org/faq
|
|
83
|
+
[translations]: https://www.contributor-covenant.org/translations
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Thanks for considering a contribution. A few principles up front:
|
|
4
|
+
|
|
5
|
+
1. **Scope.** This is a defensive/offensive security toolkit. We accept code
|
|
6
|
+
that helps detect, audit, or document risks against multi-agent systems.
|
|
7
|
+
We do not accept weaponised payloads or anything that helps attack systems
|
|
8
|
+
the operator does not own.
|
|
9
|
+
2. **License.** All contributions land under AGPL-3.0-or-later. By opening a
|
|
10
|
+
PR you agree to license your contribution under this license. The author
|
|
11
|
+
retains copyright; commercial dual-licensing remains possible.
|
|
12
|
+
3. **Style.** Run `ruff check . && ruff format . && mypy mas_sentry` before
|
|
13
|
+
pushing.
|
|
14
|
+
4. **Tests.** New modules require unit tests. Targeted coverage minimum: 80%.
|
|
15
|
+
5. **Commits.** Conventional Commits: `feat:`, `fix:`, `docs:`, `test:`,
|
|
16
|
+
`chore:`, `ci:`, `build:`, `refactor:`. Scope tags: `(core)`, `(mqtt)`,
|
|
17
|
+
`(amqp)`, `(mcp)`, `(a2a)`, `(abfp)`, `(agentic)`, `(threat)`,
|
|
18
|
+
`(reporting)`, `(cli)`, `(lab)`.
|
|
19
|
+
6. **Active probes.** Any active-probe module must respect the scope guard
|
|
20
|
+
(`--confirm-scope` outside lab) and log to `~/.mas-sentry/audit.jsonl`.
|
|
21
|
+
|
|
22
|
+
## Local dev
|
|
23
|
+
|
|
24
|
+
git clone https://github.com/evkir/mas-sentry-toolkit
|
|
25
|
+
cd mas-sentry-toolkit
|
|
26
|
+
python -m venv .venv && source .venv/bin/activate
|
|
27
|
+
pip install -e ".[dev,docs]"
|
|
28
|
+
pytest
|
|
29
|
+
ruff check .
|
|
30
|
+
mypy mas_sentry
|
|
31
|
+
|
|
32
|
+
## Reporting security issues
|
|
33
|
+
|
|
34
|
+
Do not open a public issue. Email `ekiriyak@gmail.com` with subject
|
|
35
|
+
`[mas-sentry security]`.
|