Product Architecture
Vision
Bastion is a living security platform for DAML/Canton applications, supported by a community of security experts, advocates, and enthusiasts.
- AI discovers potential threats (stochastic)
- Humans review through a formal approval process (gated)
- AI generates deterministic artifacts from approved proposals (automation)
- Static checks persist and run forever (deterministic)
Nothing enters the framework without passing through a formal approval gate. AI can hallucinate vectors, overstate severity, or miss business context. The governance process — implemented entirely through GitHub-native rulesets, CODEOWNERS, and team-based approvals — ensures every artifact in the system has been vetted before it reaches consumers.
Bastion is designed to be seamless to adopt and invisible to your workflow. It integrates through your existing IDE (VS Code or similar), creates its artifacts in a well-defined security/ directory, and never interferes with your project's progress. All security work grows independently inside your private repo — your vectors, your tests, your results. When Bastion identifies something it considers valuable to the broader community, it encourages you to share it back to the commons through a proposal, where the Security Board reviews it through a formal approval process before distributing to all consumers.
How It Works
Every project runs its own four-layer pipeline locally. The commons grows alongside it.
| Layer | Role | Actor | Authority |
|---|---|---|---|
| 1. Stochastic | Continuous research: sweep sources, review code, monitor standards | AI agents | Can only propose |
| 2. Human Review | Validate proposals with domain expertise | Developer or governance committee | Can accept, reject, or revise |
| 3. Automation | Generate deterministic artifacts from accepted proposals | AI (/integrate-vector) | Can only act after human approval |
| 4. Deterministic | Run static checks forever: semgrep, tests, coverage, compliance | CI hooks, pre-commit, make bastion-verify | Runs automatically, no AI or human needed |
Why four layers, not two or three:
- Layers 1 and 3 are both AI, but they have fundamentally different authority. Layer 1 researches and proposes. Layer 3 executes on an approved decision. Conflating them hides the trust boundary.
- Layer 2 (human) is the hard gate that makes everything downstream trustworthy.
- Layer 4 is purely mechanical. Once artifacts exist, they run without judgment.
The system gets smarter over time: Layer 1 keeps finding new things, Layer 2 keeps validating them, Layer 3 keeps generating artifacts, and Layer 4 keeps accumulating checks. Results from Layer 4 feed back to Layer 1 so each research pass is informed by what's already covered.
See Layer Details for the full breakdown of each layer, agent components, source scoring, staleness detection, and the distributed compute model.
System Architecture
Key principles:
- Projects never communicate with each other — all proposals flow to the core git repository
- The framework repository runs nothing — all compute happens at the project level (see distributed compute model)
- A governance committee reviews and votes on each PR (see governance)
- Accepted content is distributed to all consumers on their next
bastion:sync(see sync mechanism)
How the Pieces Connect
| If you want to understand... | Start here |
|---|---|
| How AI discovers threats and what agents exist | Layer Details |
| How to install Bastion in your project | Distribution |
| How to submit findings back to the community | Proposals |
| How PRs are reviewed and who approves what | Governance |
| How regulatory compliance is tracked | Standards |
| What skills, hooks, and tools ship on day 1 | Deliverables |