Skip to main content

Product Architecture

Vision

Bastion is a living security platform for DAML/Canton applications, supported by a community of security experts, advocates, and enthusiasts.

  1. AI discovers potential threats (stochastic)
  2. Humans review through a formal approval process (gated)
  3. AI generates deterministic artifacts from approved proposals (automation)
  4. 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.

LayerRoleActorAuthority
1. StochasticContinuous research: sweep sources, review code, monitor standardsAI agentsCan only propose
2. Human ReviewValidate proposals with domain expertiseDeveloper or governance committeeCan accept, reject, or revise
3. AutomationGenerate deterministic artifacts from accepted proposalsAI (/integrate-vector)Can only act after human approval
4. DeterministicRun static checks forever: semgrep, tests, coverage, complianceCI hooks, pre-commit, make bastion-verifyRuns 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.

Deep dive

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 existLayer Details
How to install Bastion in your projectDistribution
How to submit findings back to the communityProposals
How PRs are reviewed and who approves whatGovernance
How regulatory compliance is trackedStandards
What skills, hooks, and tools ship on day 1Deliverables