Sentinel is an open infrastructure project. Contributions are welcome from individuals, research institutions, and organisations.
Read docs/sovereignty.md to understand what sovereignty means in this project. Every contribution is evaluated against the three sovereignty tests:
- No US CLOUD Act exposure in the critical path.
- Air-gapped must always work.
- Apache 2.0 permanently.
git clone https://github.com/sebastianweiss83/sentinel-kernel
cd sentinel-kernel
python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest tests/ -q
python examples/smoke_test.pyAll tests should pass. If they don't, open an issue before proceeding.
Note on editable installs and console scripts. If you pull changes that modify
[project.scripts]inpyproject.toml— for example adding a newsentinelsubcommand — you must re-runpip install -e .to refresh the entry-point registration. An unrefreshed venv will have a stalesentinelscript on PATH that does not match the source tree. Similarly, when bumping the package version in a local venv, re-run the editable install to keeppip show sentinel-kernelin sync.
- Storage backends — implementations of the
StorageBackendprotocol for additional databases - Framework integrations — LangChain, LangGraph, Haystack, AutoGen callback handlers
- Policy helpers — utilities for common Rego patterns in regulated industries
- Documentation — deployment guides for specific environments
- One PR per change. Small, focused PRs merge faster.
- New features need tests. See "Adding a new integration" below.
- Schema changes need an RFC. Open a GitHub Discussion first.
- Every integration must include a sovereignty posture statement.
- The sovereignty CI checks must pass.
Every PR that adds or modifies a dependency, integration, or infrastructure component must include a sovereignty posture statement in the PR description. Use this template:
## Sovereignty posture
- Framework/package: [name] by [company] ([jurisdiction])
- CLOUD Act exposure: [yes / no / conditional]
- Air-gap capable: [yes / no]
- Runtime network calls: [none / optional / required]
- Critical path: [yes / no]
- Test coverage: [N tests added]
- Sovereign alternatives evaluated: [list or "none relevant"]This is non-negotiable. A PR without a sovereignty posture statement will be closed until one is added. The template is short because the thinking should be done before writing code, not after.
Integrations live in sentinel/integrations/. Use the LangChain
integration (sentinel/integrations/langchain.py) as your reference.
Before writing any code, fill in the posture statement. If the
framework is US-incorporated and makes runtime network calls,
it cannot live in the critical path. It can live as an optional
integration guarded by ImportError.
Put your integration in sentinel/integrations/<name>.py. Start
with the module docstring — document the sovereignty posture
inline so anyone reading the file sees it first.
At module top:
from __future__ import annotations
try:
import your_framework # type: ignore
except ImportError as exc:
raise ImportError(
"Install with: pip install sentinel-kernel[your-framework]"
) from excRecord a trace on every framework event you care about. Always read
sovereign_scope and data_residency from the Sentinel instance —
never hardcode them.
In pyproject.toml:
[project.optional-dependencies]
your-framework = ["your-framework>=X.Y"]Every integration needs these five tests (template in
tests/test_integration_langchain.py):
- Happy path — normal call records a trace.
- Offline mode — works without network connectivity.
- Policy DENY — a blocked call is recorded with the policy rule.
- Missing-dep error —
ImportErrorraised with a helpful message when the optional dep is not installed. - Sovereignty metadata flow-through —
sovereign_scopeanddata_residencypropagate from the Sentinel instance to the trace.
Add a section describing when to use the integration and its sovereignty posture. A user should be able to decide in 30 seconds whether it is safe for their deployment context.
The PACKAGE_KNOWLEDGE map in sentinel/scanner/knowledge.py is the
single source of truth for package-level sovereignty classification.
PRs that extend it are welcome.
"package-name": PackageKnowledge(
parent_company="Legal Entity Name",
jurisdiction="EU" | "US" | "UK" | "Neutral" | "Unknown",
cloud_act_exposure=True | False,
typically_critical_path=True | False,
notes="One-sentence context",
),- Verified the parent company's legal incorporation (not just HQ).
- Checked whether the package makes runtime network calls in its default configuration.
- Identified at least one EU-sovereign alternative if one exists
(add to
EU_ALTERNATIVES). - Checked that the normalised name is not already in the map.
- Cite one primary source for each non-obvious classification (company registry, SEC filing, annual report, or official website).
- If the jurisdiction is ambiguous (e.g. "EU corporate entity but
uses US-owned cloud"), use
jurisdiction="Unknown"and explain innotes. Conservative is better than wrong. - Add a test to
tests/test_scanner.pyif the entry is for a particularly important package or edge case.
Significant changes to the trace schema, storage interface, or sovereignty assertions require an RFC:
- Open a GitHub Discussion with the RFC template.
- 14-day comment period.
- Maintainer decision recorded in the Discussion.
- If accepted: implement and reference the Discussion in the PR.
See RFC-001 as an example.
ruff check sentinel/ tests/ scripts/ examples/ demo/
ruff format .
mypy sentinel/ --ignore-missing-imports
pytest tests/ -q
python examples/smoke_test.pyAll five must pass before a PR is ready for review.
Do not open public issues for security vulnerabilities.
Email: sebastian@swentures.com (subject: [sentinel-security])
Please include:
- Description of the vulnerability
- Steps to reproduce
- Potential impact
- Suggested fix if known
We will acknowledge within 48 hours and aim to resolve within 30 days. See SECURITY.md for the full disclosure policy.
By contributing, you agree that your contributions will be licensed under Apache 2.0. No CLA. No relicensing rights granted. Forever.