ether-core 0.1.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.
- ether_core-0.1.0/.agents/knowledge/anti-patterns.md +44 -0
- ether_core-0.1.0/.agents/knowledge/invariants.md +27 -0
- ether_core-0.1.0/.agents/knowledge/security.md +25 -0
- ether_core-0.1.0/.agents/knowledge/storage.md +20 -0
- ether_core-0.1.0/.dockerignore +51 -0
- ether_core-0.1.0/.env.example +7 -0
- ether_core-0.1.0/.gitattributes +5 -0
- ether_core-0.1.0/.github/CODEOWNERS +28 -0
- ether_core-0.1.0/.github/ISSUE_TEMPLATE/bug_report.yml +84 -0
- ether_core-0.1.0/.github/ISSUE_TEMPLATE/config.yml +8 -0
- ether_core-0.1.0/.github/ISSUE_TEMPLATE/feature_request.yml +39 -0
- ether_core-0.1.0/.github/ISSUE_TEMPLATE/tool_request.yml +67 -0
- ether_core-0.1.0/.github/PULL_REQUEST_TEMPLATE.md +43 -0
- ether_core-0.1.0/.github/SECURITY.md +63 -0
- ether_core-0.1.0/.github/dependabot.yml +31 -0
- ether_core-0.1.0/.github/release.yml +33 -0
- ether_core-0.1.0/.github/workflows/ci.yml +84 -0
- ether_core-0.1.0/.github/workflows/codeql.yml +49 -0
- ether_core-0.1.0/.github/workflows/docker.yml +75 -0
- ether_core-0.1.0/.github/workflows/release-please.yml +52 -0
- ether_core-0.1.0/.github/workflows/release.yml +67 -0
- ether_core-0.1.0/.github/workflows/sync-main-to-dev.yml +31 -0
- ether_core-0.1.0/.gitignore +69 -0
- ether_core-0.1.0/.pre-commit-config.yaml +22 -0
- ether_core-0.1.0/.python-version +1 -0
- ether_core-0.1.0/.release-please-config.json +24 -0
- ether_core-0.1.0/.release-please-manifest.json +3 -0
- ether_core-0.1.0/AGENTS.md +150 -0
- ether_core-0.1.0/CHANGELOG.md +46 -0
- ether_core-0.1.0/Dockerfile +84 -0
- ether_core-0.1.0/GLOSSARY.md +117 -0
- ether_core-0.1.0/LICENSE +21 -0
- ether_core-0.1.0/PKG-INFO +440 -0
- ether_core-0.1.0/README.md +408 -0
- ether_core-0.1.0/ROADMAP.md +210 -0
- ether_core-0.1.0/docs/README.md +93 -0
- ether_core-0.1.0/docs/adr/0001-mcp-server-and-action-scoped-diffs.md +15 -0
- ether_core-0.1.0/docs/adr/0002-mcp-tool-execution-and-schema-evolution.md +15 -0
- ether_core-0.1.0/docs/adr/0003-mcp-layer-architecture-and-error-handling.md +14 -0
- ether_core-0.1.0/docs/adr/0004-unified-dual-execution-adapter-seam.md +31 -0
- ether_core-0.1.0/docs/adr/0005-manifest-tiers-and-ssrf-defense.md +31 -0
- ether_core-0.1.0/docs/adr/0006-temporal-graph-state-decay-and-identity-anchoring.md +45 -0
- ether_core-0.1.0/docs/adr/0007-embedded-offline-vector-memory-and-finding-rag.md +48 -0
- ether_core-0.1.0/docs/benchmarks/README.md +47 -0
- ether_core-0.1.0/docs/explanation/architecture.md +158 -0
- ether_core-0.1.0/docs/explanation/database.md +327 -0
- ether_core-0.1.0/docs/how-to/agent-telemetry-mcp.md +260 -0
- ether_core-0.1.0/docs/how-to/author-adapters.md +172 -0
- ether_core-0.1.0/docs/how-to/cli-usage.md +300 -0
- ether_core-0.1.0/docs/how-to/contributing.md +200 -0
- ether_core-0.1.0/docs/reference/engineering-standards.md +58 -0
- ether_core-0.1.0/docs/reference/glossary.md +136 -0
- ether_core-0.1.0/docs/reference/schema-registry.md +26 -0
- ether_core-0.1.0/docs/tutorials/quickstart.md +256 -0
- ether_core-0.1.0/pyproject.toml +80 -0
- ether_core-0.1.0/scripts/generate_benchmark_report.py +418 -0
- ether_core-0.1.0/scripts/generate_schema_registry.py +151 -0
- ether_core-0.1.0/scripts/install_deps.sh +362 -0
- ether_core-0.1.0/scripts/release-check.sh +90 -0
- ether_core-0.1.0/scripts/verify.sh +39 -0
- ether_core-0.1.0/src/ether/__init__.py +32 -0
- ether_core-0.1.0/src/ether/assets/wordlists/common_dirs.txt.gz +0 -0
- ether_core-0.1.0/src/ether/assets/wordlists/common_params.txt.gz +0 -0
- ether_core-0.1.0/src/ether/assets/wordlists/common_passwords.txt.gz +0 -0
- ether_core-0.1.0/src/ether/assets/wordlists/common_usernames.txt.gz +0 -0
- ether_core-0.1.0/src/ether/assets/wordlists/subdomains_500.txt.gz +0 -0
- ether_core-0.1.0/src/ether/cli/__init__.py +5 -0
- ether_core-0.1.0/src/ether/cli/__main__.py +8 -0
- ether_core-0.1.0/src/ether/cli/commands/__init__.py +1 -0
- ether_core-0.1.0/src/ether/cli/commands/doctor.py +21 -0
- ether_core-0.1.0/src/ether/cli/commands/graph.py +311 -0
- ether_core-0.1.0/src/ether/cli/commands/logs.py +45 -0
- ether_core-0.1.0/src/ether/cli/commands/mcp.py +49 -0
- ether_core-0.1.0/src/ether/cli/commands/run.py +146 -0
- ether_core-0.1.0/src/ether/cli/commands/session.py +61 -0
- ether_core-0.1.0/src/ether/cli/commands/telemetry.py +51 -0
- ether_core-0.1.0/src/ether/cli/commands/tool.py +131 -0
- ether_core-0.1.0/src/ether/cli/context.py +71 -0
- ether_core-0.1.0/src/ether/cli/formatters.py +39 -0
- ether_core-0.1.0/src/ether/cli/router.py +368 -0
- ether_core-0.1.0/src/ether/common/__init__.py +201 -0
- ether_core-0.1.0/src/ether/common/algorithms.py +407 -0
- ether_core-0.1.0/src/ether/common/canonicalize.py +93 -0
- ether_core-0.1.0/src/ether/common/context.py +25 -0
- ether_core-0.1.0/src/ether/common/crypto.py +183 -0
- ether_core-0.1.0/src/ether/common/embeddings.py +93 -0
- ether_core-0.1.0/src/ether/common/exceptions.py +13 -0
- ether_core-0.1.0/src/ether/common/logging.py +386 -0
- ether_core-0.1.0/src/ether/common/secure_memory.py +159 -0
- ether_core-0.1.0/src/ether/common/ssrf.py +93 -0
- ether_core-0.1.0/src/ether/core/__init__.py +25 -0
- ether_core-0.1.0/src/ether/core/diagnostics.py +368 -0
- ether_core-0.1.0/src/ether/core/executor.py +296 -0
- ether_core-0.1.0/src/ether/core/sandbox.py +118 -0
- ether_core-0.1.0/src/ether/core/session.py +956 -0
- ether_core-0.1.0/src/ether/gateway/__init__.py +21 -0
- ether_core-0.1.0/src/ether/gateway/gate.py +392 -0
- ether_core-0.1.0/src/ether/gateway/network.py +98 -0
- ether_core-0.1.0/src/ether/gateway/preflight.py +802 -0
- ether_core-0.1.0/src/ether/graph/__init__.py +13 -0
- ether_core-0.1.0/src/ether/graph/analytics.py +334 -0
- ether_core-0.1.0/src/ether/graph/store.py +1615 -0
- ether_core-0.1.0/src/ether/graph/telemetry.py +334 -0
- ether_core-0.1.0/src/ether/graph/timeline.py +185 -0
- ether_core-0.1.0/src/ether/mcp/__init__.py +5 -0
- ether_core-0.1.0/src/ether/mcp/server.py +382 -0
- ether_core-0.1.0/src/ether/paths.py +176 -0
- ether_core-0.1.0/src/ether/py.typed +0 -0
- ether_core-0.1.0/src/ether/registry/__init__.py +7 -0
- ether_core-0.1.0/src/ether/registry/adapter.py +194 -0
- ether_core-0.1.0/src/ether/registry/manifest.py +53 -0
- ether_core-0.1.0/src/ether/registry/registry.py +150 -0
- ether_core-0.1.0/src/ether/registry/wordlists.py +156 -0
- ether_core-0.1.0/src/ether/schemas/__init__.py +50 -0
- ether_core-0.1.0/src/ether/schemas/base.py +122 -0
- ether_core-0.1.0/src/ether/schemas/credential.py +50 -0
- ether_core-0.1.0/src/ether/schemas/dns.py +116 -0
- ether_core-0.1.0/src/ether/schemas/host_internal.py +58 -0
- ether_core-0.1.0/src/ether/schemas/network.py +142 -0
- ether_core-0.1.0/src/ether/schemas/power.py +68 -0
- ether_core-0.1.0/src/ether/schemas/vulnerability.py +221 -0
- ether_core-0.1.0/src/ether/schemas/web.py +172 -0
- ether_core-0.1.0/tests/benchmarks/test_perf_benchmarks.py +175 -0
- ether_core-0.1.0/tests/conftest.py +77 -0
- ether_core-0.1.0/tests/fakes/lab_server.py +162 -0
- ether_core-0.1.0/tests/fixtures/__init__.py +1 -0
- ether_core-0.1.0/tests/fixtures/fuzz_streams.py +43 -0
- ether_core-0.1.0/tests/fixtures/mock_tools/dnspython.json +37 -0
- ether_core-0.1.0/tests/fixtures/mock_tools/ffuf.json +56 -0
- ether_core-0.1.0/tests/fixtures/mock_tools/gobuster.txt +15 -0
- ether_core-0.1.0/tests/fixtures/mock_tools/netexec.txt +15 -0
- ether_core-0.1.0/tests/fixtures/mock_tools/nikto.txt +14 -0
- ether_core-0.1.0/tests/fixtures/mock_tools/nmap.txt +15 -0
- ether_core-0.1.0/tests/fixtures/mock_tools/nuclei.jsonl +3 -0
- ether_core-0.1.0/tests/fixtures/mock_tools/searchsploit.json +28 -0
- ether_core-0.1.0/tests/fixtures/mock_tools/sqlmap.txt +43 -0
- ether_core-0.1.0/tests/fixtures/mock_tools/subfinder.txt +13 -0
- ether_core-0.1.0/tests/fixtures/mock_tools/whois.txt +7 -0
- ether_core-0.1.0/tests/fixtures/mock_tools.py +43 -0
- ether_core-0.1.0/tests/integration/test_executor_flow.py +104 -0
- ether_core-0.1.0/tests/unit/test_architecture.py +221 -0
- ether_core-0.1.0/tests/unit/test_canonicalize.py +72 -0
- ether_core-0.1.0/tests/unit/test_cli.py +317 -0
- ether_core-0.1.0/tests/unit/test_crypto.py +112 -0
- ether_core-0.1.0/tests/unit/test_diagnostics.py +83 -0
- ether_core-0.1.0/tests/unit/test_engine_executor.py +90 -0
- ether_core-0.1.0/tests/unit/test_engine_network.py +51 -0
- ether_core-0.1.0/tests/unit/test_engine_registry.py +117 -0
- ether_core-0.1.0/tests/unit/test_engine_store.py +442 -0
- ether_core-0.1.0/tests/unit/test_engine_stress.py +199 -0
- ether_core-0.1.0/tests/unit/test_execution_context.py +187 -0
- ether_core-0.1.0/tests/unit/test_execution_session.py +589 -0
- ether_core-0.1.0/tests/unit/test_gateway.py +414 -0
- ether_core-0.1.0/tests/unit/test_graph_analytics.py +240 -0
- ether_core-0.1.0/tests/unit/test_graph_decay.py +165 -0
- ether_core-0.1.0/tests/unit/test_graph_telemetry.py +220 -0
- ether_core-0.1.0/tests/unit/test_identity_anchoring.py +157 -0
- ether_core-0.1.0/tests/unit/test_lab_server.py +58 -0
- ether_core-0.1.0/tests/unit/test_logging.py +201 -0
- ether_core-0.1.0/tests/unit/test_math_primitives.py +299 -0
- ether_core-0.1.0/tests/unit/test_mcp.py +314 -0
- ether_core-0.1.0/tests/unit/test_parsers/__init__.py +1 -0
- ether_core-0.1.0/tests/unit/test_parsers/test_dnspython_parser.py +262 -0
- ether_core-0.1.0/tests/unit/test_parsers/test_ffuf_parser.py +82 -0
- ether_core-0.1.0/tests/unit/test_parsers/test_fuzz_all_adapters.py +121 -0
- ether_core-0.1.0/tests/unit/test_parsers/test_gobuster_parser.py +83 -0
- ether_core-0.1.0/tests/unit/test_parsers/test_http_probe_adapter.py +183 -0
- ether_core-0.1.0/tests/unit/test_parsers/test_netexec_parser.py +98 -0
- ether_core-0.1.0/tests/unit/test_parsers/test_nikto_parser.py +98 -0
- ether_core-0.1.0/tests/unit/test_parsers/test_nmap_parser.py +84 -0
- ether_core-0.1.0/tests/unit/test_parsers/test_nuclei_parser.py +72 -0
- ether_core-0.1.0/tests/unit/test_parsers/test_searchsploit_parser.py +87 -0
- ether_core-0.1.0/tests/unit/test_parsers/test_sqlmap_parser.py +89 -0
- ether_core-0.1.0/tests/unit/test_parsers/test_subfinder_parser.py +57 -0
- ether_core-0.1.0/tests/unit/test_parsers/test_whois_parser.py +76 -0
- ether_core-0.1.0/tests/unit/test_paths.py +42 -0
- ether_core-0.1.0/tests/unit/test_preflight.py +216 -0
- ether_core-0.1.0/tests/unit/test_properties.py +310 -0
- ether_core-0.1.0/tests/unit/test_sandbox.py +100 -0
- ether_core-0.1.0/tests/unit/test_schemas.py +483 -0
- ether_core-0.1.0/tests/unit/test_secure_memory.py +92 -0
- ether_core-0.1.0/tests/unit/test_security_invariants.py +33 -0
- ether_core-0.1.0/tests/unit/test_timeline.py +71 -0
- ether_core-0.1.0/tests/unit/test_vector_ddl.py +48 -0
- ether_core-0.1.0/tests/unit/test_vector_engine.py +164 -0
- ether_core-0.1.0/tests/unit/test_vector_rag.py +128 -0
- ether_core-0.1.0/tests/unit/test_vector_store.py +145 -0
- ether_core-0.1.0/tests/unit/test_wordlists.py +121 -0
- ether_core-0.1.0/tools/__init__.py +0 -0
- ether_core-0.1.0/tools/dnspython/__init__.py +1 -0
- ether_core-0.1.0/tools/dnspython/adapter.py +302 -0
- ether_core-0.1.0/tools/dnspython/cli.py +202 -0
- ether_core-0.1.0/tools/dnspython/manifest.toml +138 -0
- ether_core-0.1.0/tools/ffuf/__init__.py +1 -0
- ether_core-0.1.0/tools/ffuf/adapter.py +183 -0
- ether_core-0.1.0/tools/ffuf/manifest.toml +121 -0
- ether_core-0.1.0/tools/gobuster/__init__.py +0 -0
- ether_core-0.1.0/tools/gobuster/adapter.py +90 -0
- ether_core-0.1.0/tools/gobuster/manifest.toml +104 -0
- ether_core-0.1.0/tools/http_probe/adapter.py +256 -0
- ether_core-0.1.0/tools/http_probe/manifest.toml +40 -0
- ether_core-0.1.0/tools/netexec/__init__.py +1 -0
- ether_core-0.1.0/tools/netexec/adapter.py +163 -0
- ether_core-0.1.0/tools/netexec/manifest.toml +83 -0
- ether_core-0.1.0/tools/nikto/__init__.py +0 -0
- ether_core-0.1.0/tools/nikto/adapter.py +145 -0
- ether_core-0.1.0/tools/nikto/manifest.toml +108 -0
- ether_core-0.1.0/tools/nmap/__init__.py +0 -0
- ether_core-0.1.0/tools/nmap/adapter.py +97 -0
- ether_core-0.1.0/tools/nmap/manifest.toml +159 -0
- ether_core-0.1.0/tools/nuclei/__init__.py +1 -0
- ether_core-0.1.0/tools/nuclei/adapter.py +171 -0
- ether_core-0.1.0/tools/nuclei/manifest.toml +117 -0
- ether_core-0.1.0/tools/searchsploit/__init__.py +1 -0
- ether_core-0.1.0/tools/searchsploit/adapter.py +139 -0
- ether_core-0.1.0/tools/searchsploit/manifest.toml +103 -0
- ether_core-0.1.0/tools/sqlmap/__init__.py +1 -0
- ether_core-0.1.0/tools/sqlmap/adapter.py +214 -0
- ether_core-0.1.0/tools/sqlmap/manifest.toml +89 -0
- ether_core-0.1.0/tools/subfinder/__init__.py +0 -0
- ether_core-0.1.0/tools/subfinder/adapter.py +71 -0
- ether_core-0.1.0/tools/subfinder/manifest.toml +104 -0
- ether_core-0.1.0/tools/whois/__init__.py +0 -0
- ether_core-0.1.0/tools/whois/adapter.py +80 -0
- ether_core-0.1.0/tools/whois/manifest.toml +95 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Repository Anti-Patterns & Prohibited Techniques (Tier 2)
|
|
2
|
+
|
|
3
|
+
## 1. Security & Process Execution Anti-Patterns
|
|
4
|
+
1. **NEVER use `shell=True` or Concatenate Command Strings**:
|
|
5
|
+
- *Failure Mode*: Arbitrary string interpolation invites command injection and breaks on spaces/special characters.
|
|
6
|
+
- *Replacement*: Construct argument vectors (`List[str]`) passed to `asyncio.create_subprocess_exec` in `src/ether/core/executor.py`.
|
|
7
|
+
- *Verification*: `pytest tests/unit/test_engine_executor.py -k test_run_tool_command_args`
|
|
8
|
+
2. **NEVER Pass Host Secrets to Child Subprocesses**:
|
|
9
|
+
- *Failure Mode*: Subprocesses inherit `os.environ` by default, leaking API tokens (`CYGUIDE_*`, `OPENAI_*`, `ANTHROPIC_*`, `AWS_*`, `GITHUB_*`, `VAULT_TOKEN`) to untrusted scripts.
|
|
10
|
+
- *Replacement*: Filter environment dictionaries through `sanitize_subprocess_env()` in `src/ether/core/executor.py`.
|
|
11
|
+
- *Verification*: `pytest tests/unit/test_engine_executor.py -k test_sanitize_subprocess_env`
|
|
12
|
+
3. **NEVER Trust Untrusted Scanner Output in LLM Prompts or Expose Raw Tokens**:
|
|
13
|
+
- *Failure Mode*: Scanner output can contain prompt injection payloads or leaked bearer tokens that compromise LLM reasoning and data privacy.
|
|
14
|
+
- *Replacement*: Sanitize tokens and private keys with `sanitize_untrusted_output()` and isolate output in `<untrusted_scan_output>` boundary tags (`src/ether/core/sandbox.py`).
|
|
15
|
+
- *Verification*: `pytest tests/unit/test_sandbox.py`
|
|
16
|
+
4. **NEVER Weaken SSRF Filters in `ActionGateway` or Allow Arbitrary Non-User Shell Execution**:
|
|
17
|
+
- *Failure Mode*: Bypassing link-local or cloud metadata filters (`169.254.0.0/16`, IMDSv2, octal/hex IP notations) allows host compromise and cloud credential theft.
|
|
18
|
+
- *Replacement*: Strictly validate destinations via `is_blocked_destination()` in `src/ether/gateway/gate.py`.
|
|
19
|
+
- *Verification*: `pytest tests/unit/test_gateway.py -k test_blocked_destinations`
|
|
20
|
+
|
|
21
|
+
## 2. Headless Architecture & UI Anti-Patterns
|
|
22
|
+
1. **NEVER Import Textual, Curses, or Presentation Libraries in `src/ether/`**:
|
|
23
|
+
- *Failure Mode*: Violates strict headless core invariant; breaks downstream consumption by headless daemons and AI agents.
|
|
24
|
+
- *Replacement*: Keep Ether strictly as an operating system kernel for security tools. All presentation code lives in consumer applications (like CyGuide).
|
|
25
|
+
- *Verification*: `pytest tests/unit/test_architecture.py -k test_no_textual_imports`
|
|
26
|
+
|
|
27
|
+
## 3. Storage & Engine Anti-Patterns
|
|
28
|
+
1. **NEVER Loop Over Single-Row Inserts in SQLite Transactions**:
|
|
29
|
+
- *Failure Mode*: Massive per-transaction disk write overhead ($O(N)$ commit cost).
|
|
30
|
+
- *Replacement*: Prepare parameter batches and use `db.executemany()` or `upsert_findings_batch()`.
|
|
31
|
+
2. **NEVER Accumulate Streaming Logs in Unbounded Lists or Strings**:
|
|
32
|
+
- *Failure Mode*: `+=` string concatenation on high-speed stdout streams causes severe memory fragmentation.
|
|
33
|
+
- *Replacement*: Use bounded `collections.deque(maxlen=5000)` and stream logs directly to disk via `LogSpooler`.
|
|
34
|
+
3. **NEVER Penetrate Application Private State Across Modules**:
|
|
35
|
+
- *Failure Mode*: Leaking private attributes (e.g. accessing `_conn`, `_sessions`, or internal connection pools across layers) breaks encapsulation and violates the unidirectional layer DAG.
|
|
36
|
+
- *Replacement*: Expose clean public methods on owning classes.
|
|
37
|
+
|
|
38
|
+
## 4. Packaging & Release Engineering Anti-Patterns
|
|
39
|
+
1. **NEVER Use `pip install -e .` in CI Verification**:
|
|
40
|
+
- *Failure Mode*: Editable installs hide missing package assets, uncommitted manifests, and broken entry points.
|
|
41
|
+
- *Replacement*: Build wheel (`uv build`) and install the `.whl` package in an isolated test environment.
|
|
42
|
+
2. **NEVER Mutate Documentation in Automated `--check` Release Gates**:
|
|
43
|
+
- *Failure Mode*: Verification scripts mutating files dirty the git working tree in CI preflight.
|
|
44
|
+
- *Replacement*: Ensure `--check` verification modes in `scripts/generate_schema_registry.py` are strictly read-only.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Quantitative Invariants & Performance Contracts (Tier 2)
|
|
2
|
+
|
|
3
|
+
## 1. Runtime Performance Thresholds
|
|
4
|
+
- **Cold Application Launch**: $< 300\text{ms}$ cold import time; hard ceiling is **$600\text{ms}$** (`python -c "import ether"`).
|
|
5
|
+
- **Process Stream RAM Buffer**: Heap footprint strictly bounded to $\le 10\text{MB}$ via bounded ring buffer (`deque(maxlen=5000)`).
|
|
6
|
+
- **Process Stream Throughput**: LogSpooler with 64KB buffering writing directly to disk (`data/logs/{action_id}.log`).
|
|
7
|
+
- **GraphStore Ingestion Rate**: Bulk findings ingestion $\ge 2,000\text{ entities/sec}$ (hard CI floor $\ge 1,200\text{ entities/sec}$ under virtualized runners).
|
|
8
|
+
- **GraphStore Scale Queries**: 5,000 nodes and 2,500 edges queried in $\le 500\text{ms}$ in SQLite via parameter-bound queries and indexed foreign keys.
|
|
9
|
+
- **Offline Vector Engine Latency**: Sub-millisecond execution ($< 0.1\text{ms}$) per text string using 384-dimensional unit-normalized multi-hash projections.
|
|
10
|
+
|
|
11
|
+
## 2. CI Runner Variance & Benchmark Rules
|
|
12
|
+
- **No Microsecond Assertions**: In-memory operations running in 15–35ms on bare metal can take 150–250ms on shared GitHub Actions runners due to multi-tenant CPU contention and virtualized I/O scheduling.
|
|
13
|
+
- **Benchmark Threshold Standard**: For operations processing 5,000+ entities, set CI performance bounds to $< 500\text{ms}$. This accommodates hypervisor jitter while reliably catching $O(N^2)$ algorithmic regressions ($> 5,000\text{ms}$).
|
|
14
|
+
- **CI Execution Time**: Target $\le 3\text{ minutes}$ per matrix job with optimized uv caching and concurrency cancellation enabled.
|
|
15
|
+
|
|
16
|
+
## 3. Security, Operational & Release Boundaries
|
|
17
|
+
- **Ephemeral Release Authentication**: PyPI and GHCR release jobs use strictly short-lived GitHub Actions OIDC tokens (`id-token: write`); zero long-lived API secrets.
|
|
18
|
+
- **Packaging Integrity**: 100% packaged asset verification by building and testing the real distribution wheel artifact (`dist/*.whl`) in CI.
|
|
19
|
+
- **SSRF Blocklist Preservation**: `ActionGateway.BLOCKED_TARGETS` must permanently block AWS IMDSv2, Alibaba metadata, IPv4 link-local (`169.254.0.0/16`), and hexadecimal/decimal IP encodings.
|
|
20
|
+
- **Subprocess Environment Isolation**: Subprocess spawning must always execute `sanitize_subprocess_env()` to strip API keys, cloud credentials, and SSH handles.
|
|
21
|
+
- **Untrusted Output Boundary**: All untrusted scanner output passed to LLMs must be sanitized and enclosed within `<untrusted_scan_output>...</untrusted_scan_output>` tags with tag breakout escaping.
|
|
22
|
+
|
|
23
|
+
## 4. Testing & Architectural Invariants
|
|
24
|
+
- **Fast Pre-Flight Tier 0 (`pytest -m tier0 -q`)**: Must complete in $< 3.0\text{s}$ with zero network calls and zero flakiness.
|
|
25
|
+
- **AST Architecture Enforcement**: Zero UI imports, zero `shell=True`, zero `os.system`, zero direct `subprocess` imports in adapters, and zero unparameterized SQL queries (`tests/unit/test_architecture.py`).
|
|
26
|
+
- **Adapter Crash-Resilience**: 100% crash immunity across all registered security tool adapters against hostile, malformed ANSI, truncated JSON, and 20k-token fuzz streams (`tests/unit/test_parsers/test_fuzz_all_adapters.py`).
|
|
27
|
+
- **Concurrency & Ring Buffer Boundedness**: Zero deadlocks and strict $O(1)$ RAM bounding ($\le 5000$ lines) under streaming loads.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Domain Knowledge: Security Boundaries & Attack Surface Defense (Tier 2)
|
|
2
|
+
|
|
3
|
+
## 1. Gateway & SSRF Immunization
|
|
4
|
+
- **Deterministic Gateway Invariants**: All security commands dispatched by tools or operators must pass through `ActionGateway` (`src/ether/gateway/gate.py`).
|
|
5
|
+
- **Blocked Targets**: `ActionGateway.BLOCKED_TARGETS` must never weaken SSRF filtering against:
|
|
6
|
+
- IPv4 link-local ranges: `169.254.0.0/16`
|
|
7
|
+
- AWS IMDSv2 metadata endpoints: `fd00:ec2::254`, `http://169.254.169.254`
|
|
8
|
+
- Alibaba Cloud metadata endpoints: `100.100.100.200`
|
|
9
|
+
- Decimal/Hex IP representations (`0x7f000001`, `2130706433`)
|
|
10
|
+
- Cloud metadata DNS hostnames (`instance-data`, `metadata.google.internal`)
|
|
11
|
+
- **Safe Target Validation**: Targets must resolve to allowed public/lab IP scopes or pass operator domain validation rules.
|
|
12
|
+
|
|
13
|
+
## 2. Process & Environment Isolation
|
|
14
|
+
- **Subprocess Env Sanitization**: `sanitize_subprocess_env()` in `src/ether/core/executor.py` strips sensitive environment variables:
|
|
15
|
+
- Repository / Provider keys: `CYGUIDE_*`, `ETHER_*`, `OPENAI_*`, `ANTHROPIC_*`, `GEMINI_*`, `GROQ_*`
|
|
16
|
+
- Cloud credentials: `AWS_*`, `GITHUB_*`, `GITLAB_*`
|
|
17
|
+
- SSH authorization: `SSH_AUTH_SOCK`, `SSH_AGENT_PID`
|
|
18
|
+
- Vault / secret tokens: `VAULT_TOKEN`
|
|
19
|
+
- **Shell Injection Immunity**: Never construct shell commands via string interpolation (`f"{tool} {flags} {target}"`) or pass `shell=True`. Commands are strictly executed as argument lists (`List[str]`).
|
|
20
|
+
- **Untrusted Output Isolation**: Raw tool outputs can contain prompt injection payloads. Always wrap outputs in `<untrusted_scan_output>...</untrusted_scan_output>` with breakout sequence escaping.
|
|
21
|
+
|
|
22
|
+
## 3. Ephemeral Release Authentication & Packaging
|
|
23
|
+
- **Tokenless OIDC Publishing**: Automated releases to PyPI and GHCR utilize short-lived GitHub Actions OIDC tokens (`id-token: write`). Long-lived API tokens in repository secrets are prohibited.
|
|
24
|
+
- **Distribution Package Verification**: Always build and verify real distribution wheels (`uv build`) in CI instead of editable installs (`pip install -e .`), preventing packaging omission bugs.
|
|
25
|
+
- **Atomic Private Permissions**: Sensitive files (`settings.json`, `scratchpad.md`, exported archives) must be created atomically with mode `0o600` via `atomic_create_file` or `os.open` with `O_CREAT | O_WRONLY | O_TRUNC` to eliminate TOCTOU permission races.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Domain Knowledge: Storage & Graph Persistence (Tier 2)
|
|
2
|
+
|
|
3
|
+
## 1. Persistence Seams & Facades
|
|
4
|
+
- **Unified Graph Store**: Graph database interactions are encapsulated inside `GraphStore` (`src/ether/graph/store.py`).
|
|
5
|
+
- **Async Execution**: Never run synchronous, blocking SQLite calls directly on the event loop. Use `aiosqlite` with connection management via `GraphStore._get_conn()`.
|
|
6
|
+
- **WAL Journaling**: SQLite connections use write-ahead logging (`PRAGMA journal_mode=WAL;`), synchronous normal mode, and foreign keys enabled on every connection.
|
|
7
|
+
|
|
8
|
+
## 2. Ingestion Performance & Atomic Micro-Batching
|
|
9
|
+
- **Batch Insertion Mandate**: Executing individual `INSERT` statements inside loops is strictly prohibited ($O(N)$ transaction overhead). Bulk imports must use `db.executemany()` or `upsert_findings_batch()`.
|
|
10
|
+
- **Throughput Contract**: GraphStore ingestion must maintain $\ge 2,000\text{ entities/sec}$ (hard floor $\ge 1,200\text{ entities/sec}$ under shared virtualized CI).
|
|
11
|
+
- **Bulk Query Scale Limits**: 5,000 nodes and 2,500 edges must be queried in $\le 500\text{ms}$ in SQLite via parameter-bound queries and indexed foreign keys.
|
|
12
|
+
|
|
13
|
+
## 3. Vector Memory & Finding RAG (`sqlite-vec`)
|
|
14
|
+
- **Embedded Offline Vector Memory**: Discovered services, technologies, endpoints, and vulnerabilities are automatically mapped to 384-dimensional unit vectors ($||v||_2 = 1.0$) using `VectorEmbeddingEngine` and indexed in `vec_findings USING vec0`.
|
|
15
|
+
- **Sub-millisecond Retrieval**: Natural language queries search via k-NN cosine distance without network egress or remote API calls.
|
|
16
|
+
- **Lifecycle Cleanup**: Vector embeddings are atomically synchronized on finding upsert and purged when stale nodes or sessions are deleted.
|
|
17
|
+
|
|
18
|
+
## 4. Temporal State Decay & Invariant Identity Anchoring
|
|
19
|
+
- **State Confidence Windows**: Nodes transition from `confirmed` to `flapping` or `stale` based on TTL windows.
|
|
20
|
+
- **Cross-IP Identity Migration**: Ephemeral IP changes are resolved by anchoring Primary Identity Keys to invariant cryptographic fingerprints (`tls:<sha256>`, `ssh:<fingerprint>`, `favicon:<hash>`).
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Version control and GitHub metadata
|
|
2
|
+
.git
|
|
3
|
+
.github
|
|
4
|
+
|
|
5
|
+
# Virtual environments
|
|
6
|
+
.venv
|
|
7
|
+
venv
|
|
8
|
+
env
|
|
9
|
+
|
|
10
|
+
# Python bytecode and caches
|
|
11
|
+
__pycache__
|
|
12
|
+
*.py[cod]
|
|
13
|
+
|
|
14
|
+
# Testing, coverage, and linting caches
|
|
15
|
+
.pytest_cache
|
|
16
|
+
tests/.pytest_cache
|
|
17
|
+
.coverage
|
|
18
|
+
htmlcov
|
|
19
|
+
.ruff_cache
|
|
20
|
+
tests/.ruff_cache
|
|
21
|
+
.mypy_cache
|
|
22
|
+
tests/.mypy_cache
|
|
23
|
+
.hypothesis
|
|
24
|
+
tests/.hypothesis
|
|
25
|
+
|
|
26
|
+
# Agent and temporary scratchpads
|
|
27
|
+
.scratch
|
|
28
|
+
.agents
|
|
29
|
+
.t3*
|
|
30
|
+
|
|
31
|
+
# Build and distribution artifacts
|
|
32
|
+
dist
|
|
33
|
+
build
|
|
34
|
+
*.egg-info
|
|
35
|
+
|
|
36
|
+
# Environment variables
|
|
37
|
+
.env
|
|
38
|
+
.env.*
|
|
39
|
+
!.env.example
|
|
40
|
+
|
|
41
|
+
# Local data and runtime directories
|
|
42
|
+
data
|
|
43
|
+
logs
|
|
44
|
+
exports
|
|
45
|
+
reports
|
|
46
|
+
|
|
47
|
+
# Documentation, tests, and maintenance scripts
|
|
48
|
+
tests
|
|
49
|
+
docs
|
|
50
|
+
scripts
|
|
51
|
+
.pre-commit-config.yaml
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# GitHub CODEOWNERS for Ether
|
|
2
|
+
# Authoritative governance and review boundaries adhering to Ether's Tiered File Protection Policy (AGENTS.md Section 8).
|
|
3
|
+
|
|
4
|
+
# Default repository maintainer
|
|
5
|
+
* @h45sh
|
|
6
|
+
|
|
7
|
+
# Tier 1: Frozen Core Infrastructure
|
|
8
|
+
# Foundational engine substrate. Zero breaking contract changes without architectural review.
|
|
9
|
+
/src/ether/schemas/base.py @h45sh
|
|
10
|
+
/src/ether/graph/store.py @h45sh
|
|
11
|
+
/src/ether/registry/registry.py @h45sh
|
|
12
|
+
/src/ether/common/canonicalize.py @h45sh
|
|
13
|
+
/src/ether/paths.py @h45sh
|
|
14
|
+
|
|
15
|
+
# Tier 2: Review Required (Gateways, Runtime, Adapters & Schemas)
|
|
16
|
+
# Core execution and normalization layer. Any modifications require full regression testing.
|
|
17
|
+
/src/ether/gateway/gate.py @h45sh
|
|
18
|
+
/src/ether/core/executor.py @h45sh
|
|
19
|
+
/src/ether/core/session.py @h45sh
|
|
20
|
+
/src/ether/schemas/ @h45sh
|
|
21
|
+
/tools/ @h45sh
|
|
22
|
+
|
|
23
|
+
# Infrastructure, CI/CD, Containerization & Secrets
|
|
24
|
+
/.github/ @h45sh
|
|
25
|
+
/Dockerfile @h45sh
|
|
26
|
+
/.dockerignore @h45sh
|
|
27
|
+
/pyproject.toml @h45sh
|
|
28
|
+
/scripts/ @h45sh
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
name: Bug Report
|
|
2
|
+
description: Report a reproducible bug, crash, or unexpected behavior in Ether.
|
|
3
|
+
title: "[BUG]: "
|
|
4
|
+
labels: ["bug"]
|
|
5
|
+
body:
|
|
6
|
+
- type: markdown
|
|
7
|
+
attributes:
|
|
8
|
+
value: |
|
|
9
|
+
Thank you for reporting an issue! Please provide as much technical detail as possible.
|
|
10
|
+
If this is a security vulnerability, please refer to [SECURITY.md](https://github.com/h45sh/ether/blob/main/.github/SECURITY.md) instead.
|
|
11
|
+
|
|
12
|
+
- type: textarea
|
|
13
|
+
id: description
|
|
14
|
+
attributes:
|
|
15
|
+
label: Bug Description
|
|
16
|
+
description: A clear and concise description of what the bug is.
|
|
17
|
+
placeholder: Describe what happened when running the command or invoking the MCP tool...
|
|
18
|
+
validations:
|
|
19
|
+
required: true
|
|
20
|
+
|
|
21
|
+
- type: dropdown
|
|
22
|
+
id: interface
|
|
23
|
+
attributes:
|
|
24
|
+
label: Execution Interface
|
|
25
|
+
options:
|
|
26
|
+
- CLI (ether run / ether graph)
|
|
27
|
+
- MCP Server (stdio / sse)
|
|
28
|
+
- Python SDK (ExecutionSession / ActionGateway)
|
|
29
|
+
- Tool Adapter (tools/<name>)
|
|
30
|
+
validations:
|
|
31
|
+
required: true
|
|
32
|
+
|
|
33
|
+
- type: textarea
|
|
34
|
+
id: reproduction
|
|
35
|
+
attributes:
|
|
36
|
+
label: Steps to Reproduce
|
|
37
|
+
description: Exact steps or code snippet to reproduce the issue.
|
|
38
|
+
placeholder: |
|
|
39
|
+
1. Run 'ether run <session_id> <tool> --target <target>'
|
|
40
|
+
2. See error / unexpected behavior
|
|
41
|
+
validations:
|
|
42
|
+
required: true
|
|
43
|
+
|
|
44
|
+
- type: textarea
|
|
45
|
+
id: expected
|
|
46
|
+
attributes:
|
|
47
|
+
label: Expected Behavior
|
|
48
|
+
description: What did you expect to happen instead?
|
|
49
|
+
validations:
|
|
50
|
+
required: true
|
|
51
|
+
|
|
52
|
+
- type: dropdown
|
|
53
|
+
id: os
|
|
54
|
+
attributes:
|
|
55
|
+
label: Operating System / Distribution
|
|
56
|
+
options:
|
|
57
|
+
- Ubuntu / Debian
|
|
58
|
+
- Kali Linux / Parrot OS
|
|
59
|
+
- Arch Linux / Manjaro
|
|
60
|
+
- Fedora / RHEL
|
|
61
|
+
- openSUSE
|
|
62
|
+
- Alpine Linux
|
|
63
|
+
- macOS
|
|
64
|
+
- Docker Container
|
|
65
|
+
- Other (specify below)
|
|
66
|
+
validations:
|
|
67
|
+
required: true
|
|
68
|
+
|
|
69
|
+
- type: input
|
|
70
|
+
id: python_version
|
|
71
|
+
attributes:
|
|
72
|
+
label: Python Version
|
|
73
|
+
placeholder: e.g., Python 3.12.3
|
|
74
|
+
validations:
|
|
75
|
+
required: true
|
|
76
|
+
|
|
77
|
+
- type: textarea
|
|
78
|
+
id: traceback
|
|
79
|
+
attributes:
|
|
80
|
+
label: Error Traceback / Logs
|
|
81
|
+
description: Paste any error traceback from terminal output or session log.
|
|
82
|
+
render: shell
|
|
83
|
+
validations:
|
|
84
|
+
required: false
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
blank_issues_enabled: false
|
|
2
|
+
contact_links:
|
|
3
|
+
- name: Security Vulnerability Report
|
|
4
|
+
url: https://github.com/h45sh/ether/security/advisories/new
|
|
5
|
+
about: Please report security vulnerabilities privately rather than opening a public issue.
|
|
6
|
+
- name: Documentation Hub
|
|
7
|
+
url: https://github.com/h45sh/ether/blob/main/docs/README.md
|
|
8
|
+
about: Read Ether architecture, Diataxis documentation, CLI reference, and Agent Telemetry guides.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: Feature Request
|
|
2
|
+
description: Suggest an idea or enhancement for Ether's substrate, engine, or telemetry protocol.
|
|
3
|
+
title: "[FEAT]: "
|
|
4
|
+
labels: ["enhancement"]
|
|
5
|
+
body:
|
|
6
|
+
- type: markdown
|
|
7
|
+
attributes:
|
|
8
|
+
value: |
|
|
9
|
+
Have an idea to improve Ether? Let us know what capability or protocol extension you would like to see!
|
|
10
|
+
- type: textarea
|
|
11
|
+
id: problem
|
|
12
|
+
attributes:
|
|
13
|
+
label: Problem Statement
|
|
14
|
+
description: Is your feature request related to a specific limitation, telemetry gap, or friction point?
|
|
15
|
+
placeholder: When integrating Ether with AI agent orchestrators, I encountered...
|
|
16
|
+
validations:
|
|
17
|
+
required: true
|
|
18
|
+
- type: textarea
|
|
19
|
+
id: solution
|
|
20
|
+
attributes:
|
|
21
|
+
label: Proposed Solution / Architecture
|
|
22
|
+
description: Describe the design or capability you would like to see implemented.
|
|
23
|
+
placeholder: A clear and concise description of how this should work...
|
|
24
|
+
validations:
|
|
25
|
+
required: true
|
|
26
|
+
- type: textarea
|
|
27
|
+
id: alternatives
|
|
28
|
+
attributes:
|
|
29
|
+
label: Alternatives Considered
|
|
30
|
+
description: Describe any alternative solutions or workarounds you have considered.
|
|
31
|
+
validations:
|
|
32
|
+
required: false
|
|
33
|
+
- type: textarea
|
|
34
|
+
id: context
|
|
35
|
+
attributes:
|
|
36
|
+
label: Additional Context
|
|
37
|
+
description: Add any architecture diagrams, telemetry examples, or extra context.
|
|
38
|
+
validations:
|
|
39
|
+
required: false
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
name: Tool Adapter Proposal
|
|
2
|
+
description: Propose a new cybersecurity tool adapter for Ether.
|
|
3
|
+
title: "[TOOL]: "
|
|
4
|
+
labels: ["tool", "enhancement"]
|
|
5
|
+
body:
|
|
6
|
+
- type: markdown
|
|
7
|
+
attributes:
|
|
8
|
+
value: |
|
|
9
|
+
Ether integrates security tools using the **Smart Adapter / Simple Core** architecture.
|
|
10
|
+
Refer to the [Adapter Authoring Guide](https://github.com/h45sh/ether/blob/main/docs/how-to/author-adapters.md) for details on writing Tier A coroutine and Tier B subprocess adapters.
|
|
11
|
+
- type: input
|
|
12
|
+
id: tool_name
|
|
13
|
+
attributes:
|
|
14
|
+
label: Tool Name & Binary
|
|
15
|
+
description: Name of the tool and executable binary on PATH.
|
|
16
|
+
placeholder: "e.g., feroxbuster (binary: feroxbuster)"
|
|
17
|
+
validations:
|
|
18
|
+
required: true
|
|
19
|
+
- type: dropdown
|
|
20
|
+
id: execution_tier
|
|
21
|
+
attributes:
|
|
22
|
+
label: Execution Tier
|
|
23
|
+
options:
|
|
24
|
+
- "Tier B: Binary Subprocess (build_command + parse_line)"
|
|
25
|
+
- "Tier A: In-Process Async Coroutine (execute_coroutine)"
|
|
26
|
+
validations:
|
|
27
|
+
required: true
|
|
28
|
+
- type: input
|
|
29
|
+
id: upstream_url
|
|
30
|
+
attributes:
|
|
31
|
+
label: Upstream Repository / Homepage
|
|
32
|
+
placeholder: https://github.com/...
|
|
33
|
+
validations:
|
|
34
|
+
required: true
|
|
35
|
+
- type: textarea
|
|
36
|
+
id: summary
|
|
37
|
+
attributes:
|
|
38
|
+
label: Tool Description & Purpose
|
|
39
|
+
description: What reconnaissance, scanning, or analysis task does this tool perform?
|
|
40
|
+
placeholder: Fast, simple, recursive content discovery tool written in Rust...
|
|
41
|
+
validations:
|
|
42
|
+
required: true
|
|
43
|
+
- type: textarea
|
|
44
|
+
id: standard_flags
|
|
45
|
+
attributes:
|
|
46
|
+
label: Common Commands & Arguments
|
|
47
|
+
description: Provide 2-3 standard commands and arguments used with this tool.
|
|
48
|
+
placeholder: |
|
|
49
|
+
feroxbuster -u http://$TARGET -w /usr/share/wordlists/dirb/common.txt --json
|
|
50
|
+
validations:
|
|
51
|
+
required: true
|
|
52
|
+
- type: textarea
|
|
53
|
+
id: finding_schemas
|
|
54
|
+
attributes:
|
|
55
|
+
label: Findings Produced
|
|
56
|
+
description: What normalized schemas should findings map to (e.g., `web.endpoint`, `network.service`, `vulnerability.found`)?
|
|
57
|
+
placeholder: Emits `web.endpoint` findings with URL, status code, response time, and content length.
|
|
58
|
+
validations:
|
|
59
|
+
required: true
|
|
60
|
+
- type: textarea
|
|
61
|
+
id: sample_output
|
|
62
|
+
attributes:
|
|
63
|
+
label: Sample CLI Output
|
|
64
|
+
description: Provide a snippet of stdout/stderr or JSON that the adapter parser will process.
|
|
65
|
+
render: text
|
|
66
|
+
validations:
|
|
67
|
+
required: false
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
## Summary
|
|
2
|
+
|
|
3
|
+
<!-- Briefly describe the purpose of this PR and the architectural problem it addresses. -->
|
|
4
|
+
|
|
5
|
+
Fixes # <!-- Issue number if applicable -->
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Type of Change
|
|
10
|
+
|
|
11
|
+
- [ ] Bug fix (non-breaking fix for an existing issue)
|
|
12
|
+
- [ ] New feature (non-breaking enhancement to engine or telemetry protocol)
|
|
13
|
+
- [ ] New tool adapter (`tools/<tool_name>/`)
|
|
14
|
+
- [ ] Core substrate modification (`src/ether/core/`, `src/ether/graph/`, or `src/ether/schemas/`)
|
|
15
|
+
- [ ] Documentation update
|
|
16
|
+
- [ ] CI / Workflow / Packaging change
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Architectural Tier Check
|
|
21
|
+
|
|
22
|
+
- [ ] **Tier 1 (Frozen Core)**: Modifies `src/ether/schemas/base.py`, `src/ether/graph/store.py`, `src/ether/registry/registry.py`, `src/ether/common/canonicalize.py`, or `src/ether/paths.py`. Requires CODEOWNERS review from `@h45sh`.
|
|
23
|
+
- [ ] **Tier 2 (Review Required)**: Modifies `src/ether/gateway/gate.py`, `src/ether/core/executor.py`, `src/ether/core/session.py`, `src/ether/schemas/*.py`, or tool adapters in `tools/*/`.
|
|
24
|
+
- [ ] **Tier 3 (Free to Change)**: Documentation (`docs/`), tests (`tests/`), operational scripts (`scripts/`), or roadmap files.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Strict Headless Invariant Check
|
|
29
|
+
|
|
30
|
+
- [ ] **Zero UI Code**: This PR contains zero Textual imports, zero terminal widgets, and zero presentation code.
|
|
31
|
+
- [ ] **AST Verification**: Code passes Tier 0 AST mechanical linting (`pytest -m tier0`).
|
|
32
|
+
- [ ] **Process Isolation**: For tool adapters, external CLI commands are executed strictly as argument vectors (`List[str]`) without `shell=True`.
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## Pre-Merge Verification Checklist
|
|
37
|
+
|
|
38
|
+
- [ ] Code formatted and linted cleanly: `ruff check .` and `ruff format --check .`.
|
|
39
|
+
- [ ] Fast pre-flight invariants pass: `pytest -m tier0` (<2s).
|
|
40
|
+
- [ ] Full regression suite executed and 100% passing: `bash scripts/verify.sh` (or `pytest tests/`).
|
|
41
|
+
- [ ] If finding schemas in `src/ether/schemas/` were added or modified, schema documentation has been regenerated: `python3 scripts/generate_schema_registry.py --check`.
|
|
42
|
+
- [ ] No decorative emojis in commit messages, documentation, or code.
|
|
43
|
+
- [ ] Environment sanitization preserved: Subprocess environments pass through `sanitize_subprocess_env()`.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Supported Versions
|
|
4
|
+
|
|
5
|
+
Ether receives active security updates, vulnerability patches, and invariant audit fixes on the current default release branch and latest PyPI release.
|
|
6
|
+
|
|
7
|
+
| Release Channel | Supported | Notes |
|
|
8
|
+
| :--- | :---: | :--- |
|
|
9
|
+
| **Latest Release / Default Branch (`main`)** | **Yes** | Active security support, AST invariant enforcement, and patches. |
|
|
10
|
+
| **Prior Releases** | **Best Effort** | Security fixes are backported or rolled into the next minor/patch release. |
|
|
11
|
+
|
|
12
|
+
We recommend always running the latest packaged release (`pip install -U ether`) or pulling the latest container image (`ghcr.io/h45sh/ether:latest`).
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Reporting a Vulnerability
|
|
17
|
+
|
|
18
|
+
The Ether maintainers take security and process isolation seriously. If you discover a vulnerability, potential security bug, or weakness in Ether (including command injection vectors in tool adapters, sandbox breakouts, SSRF filter bypasses, credential leakage, or prompt injection flaws), please do not report it through a public GitHub issue.
|
|
19
|
+
|
|
20
|
+
### Preferred Reporting Channel
|
|
21
|
+
|
|
22
|
+
* **GitHub Private Vulnerability Reporting**: Navigate to the [Ether Security Advisory tab](https://github.com/h45sh/ether/security/advisories/new) and submit a private report.
|
|
23
|
+
* **Direct Maintainer Contact**: If the advisory portal is unavailable, contact the project maintainer directly at `harshwardhan@h45sh.com` with the subject line `[SECURITY] Ether Vulnerability Report`.
|
|
24
|
+
|
|
25
|
+
### What to Include
|
|
26
|
+
|
|
27
|
+
To help us assess and resolve the issue quickly, please provide:
|
|
28
|
+
1. A clear description of the vulnerability and its potential impact.
|
|
29
|
+
2. Step-by-step reproduction instructions or a minimal Proof of Concept (PoC).
|
|
30
|
+
3. The affected Ether version, operating system environment, and execution context (CLI vs MCP server).
|
|
31
|
+
4. Any potential mitigations or remediation patches you have identified.
|
|
32
|
+
|
|
33
|
+
### Response Timeline
|
|
34
|
+
|
|
35
|
+
* **Acknowledgment**: Within 48 hours of initial receipt.
|
|
36
|
+
* **Triage & Assessment**: Within 5 business days, confirming whether the report is accepted or requires further detail.
|
|
37
|
+
* **Remediation & Advisory Release**: A coordinated release date will be scheduled once a patch is mechanically verified. We aim to release critical fixes within 14 days of confirmation.
|
|
38
|
+
|
|
39
|
+
Credit will be given in the release notes and security advisories for responsibly disclosed vulnerabilities, unless the reporter requests anonymity.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Security Architecture & Scope
|
|
44
|
+
|
|
45
|
+
Ether operates as a headless reactive process supervisor, AST validator, and deterministic graph telemetry substrate executing external cybersecurity binaries on the local host. When assessing potential vulnerabilities, consider the following threat model boundaries:
|
|
46
|
+
|
|
47
|
+
1. **Process Isolation & Pure Argument Vectors**:
|
|
48
|
+
Ether tool adapters must always pass arguments as structured argument lists (`List[str]`) directly to `asyncio.create_subprocess_exec` rather than invoking a shell with `shell=True`. Vulnerabilities where arbitrary target parameters or unescaped macro tokens lead to unintended shell execution on the host are in-scope.
|
|
49
|
+
|
|
50
|
+
2. **Environment Sanitization & Credential Protection**:
|
|
51
|
+
Subprocess environments must be scrubbed (`sanitize_subprocess_env`) of operator secrets (`ETHER_*`, `CYGUIDE_*`, `OPENAI_*`, `ANTHROPIC_*`, `AWS_*`, `GITHUB_*`, `VAULT_TOKEN`, `SSH_PRIVATE_KEY`). Flaws where external CLI tools can read operator API tokens from child `/proc/<PID>/environ` are in-scope.
|
|
52
|
+
|
|
53
|
+
3. **Network Gateways & Cloud Metadata SSRF Protection**:
|
|
54
|
+
Ether enforces `GatePolicy.SAFE` by default: target validation, Link-Local and cloud metadata blocking (`169.254.0.0/16`, `fd00:ec2::254`, `100.100.100.200`, `metadata.google.internal`). Bypasses that trick the gateway into dispatching requests to cloud metadata services or bypassing target CIDR boundary checks under `GatePolicy.SAFE` are considered high-severity security issues.
|
|
55
|
+
|
|
56
|
+
4. **AI Prompt Injection Boundary**:
|
|
57
|
+
Untrusted scanner outputs passed to AI models must be wrapped inside `<untrusted_scan_output>...</untrusted_scan_output>` boundary tags with closing tag breakout neutralization (`</untrusted_scan_output>` replaced with `<\/untrusted_scan_output>`) and credential redaction (PEM keys, tokens, passwords). Exploits that achieve prompt injection override or credential exfiltration are in-scope.
|
|
58
|
+
|
|
59
|
+
5. **Session Database Hardening & Parameterization**:
|
|
60
|
+
Exported and internal SQLite databases enforce 100% parameterized SQL queries (`?`), `PRAGMA foreign_keys = ON;`, and `PRAGMA journal_mode = WAL;`. Deserialization flaws leading to path traversal, arbitrary file writes, or trigger execution are in-scope.
|
|
61
|
+
|
|
62
|
+
6. **Local Filesystem Permissions**:
|
|
63
|
+
Sensitive exported archives, operator state, and credential caches enforce atomic `0o600` permissions (`atomic_create_file` or `os.open` with `O_CREAT | O_WRONLY | O_TRUNC`) to prevent TOCTOU permission races.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
# Python dependencies (pyproject.toml)
|
|
4
|
+
- package-ecosystem: "pip"
|
|
5
|
+
directory: "/"
|
|
6
|
+
schedule:
|
|
7
|
+
interval: "weekly"
|
|
8
|
+
day: "monday"
|
|
9
|
+
open-pull-requests-limit: 10
|
|
10
|
+
commit-message:
|
|
11
|
+
prefix: "deps(pip)"
|
|
12
|
+
|
|
13
|
+
# GitHub Actions workflows
|
|
14
|
+
- package-ecosystem: "github-actions"
|
|
15
|
+
directory: "/"
|
|
16
|
+
schedule:
|
|
17
|
+
interval: "weekly"
|
|
18
|
+
day: "monday"
|
|
19
|
+
open-pull-requests-limit: 10
|
|
20
|
+
commit-message:
|
|
21
|
+
prefix: "ci(actions)"
|
|
22
|
+
|
|
23
|
+
# Dockerfile base images
|
|
24
|
+
- package-ecosystem: "docker"
|
|
25
|
+
directory: "/"
|
|
26
|
+
schedule:
|
|
27
|
+
interval: "weekly"
|
|
28
|
+
day: "monday"
|
|
29
|
+
open-pull-requests-limit: 5
|
|
30
|
+
commit-message:
|
|
31
|
+
prefix: "ci(docker)"
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
changelog:
|
|
2
|
+
categories:
|
|
3
|
+
- title: "Features & Telemetry Engine"
|
|
4
|
+
labels:
|
|
5
|
+
- "enhancement"
|
|
6
|
+
- "feature"
|
|
7
|
+
- title: "Smart Tool Adapters"
|
|
8
|
+
labels:
|
|
9
|
+
- "tool"
|
|
10
|
+
- "adapter"
|
|
11
|
+
- title: "Agent Telemetry Protocol & MCP"
|
|
12
|
+
labels:
|
|
13
|
+
- "mcp"
|
|
14
|
+
- "rag"
|
|
15
|
+
- "telemetry"
|
|
16
|
+
- title: "Security & Invariants"
|
|
17
|
+
labels:
|
|
18
|
+
- "security"
|
|
19
|
+
- "invariants"
|
|
20
|
+
- title: "Bug Fixes"
|
|
21
|
+
labels:
|
|
22
|
+
- "bug"
|
|
23
|
+
- "fix"
|
|
24
|
+
- title: "CI/CD & Maintenance"
|
|
25
|
+
labels:
|
|
26
|
+
- "ci"
|
|
27
|
+
- "maintenance"
|
|
28
|
+
- "dependencies"
|
|
29
|
+
exclude:
|
|
30
|
+
labels:
|
|
31
|
+
- "skip-changelog"
|
|
32
|
+
- "documentation"
|
|
33
|
+
- "docs"
|