Skip to main content

Distribution Model

How the framework reaches consuming projects, how project-specific security posture grows over time, and how updates flow.


Why a Claude Code Plugin

MechanismVersioningAuto-updateAgentsSkillsMCP toolsWorks offline
Git submodulemanualnosymlinknoseparate installyes
npm packagesemvernpm updatenonoseparate installyes
Claude Code pluginsemverdsf syncbundledbundledbundledyes
VS Code extensionsemvermarketplacenonopossibleyes

A Claude Code plugin is the right distribution unit because the product IS the AI + static tooling combination. The agents, skills, MCP server, and deterministic scripts are all one thing.

Plugin Structure

DirectoryContentsPlugin Role
.claude-plugin/plugin.jsonPlugin manifest (version, deps, metadata)
agents/focused/4 domain auditors + intelligence-sync + standards-syncBundled as dsf: namespaced agents
skills/integrate-vector, propose-vector, sync, init, verifyBundled as /bastion: namespaced skills
mcp-server/src/index.ts (DAML tools) + security.ts (Bastion tools)Bundled MCP server
vectors/examples/ + community/Reference + accepted community vectors
semgrep/DAML + web security rulesGlobal static analysis rules
intel/sources.yaml (134 sources)Curated intelligence catalog
standards/OWASP, NIST, FIPS, Canton, Splice, DAML SDKCompliance tracking + mappings
scripts/config, verify, scope, generate_docsDeterministic execution engine
registry.yamlVersion manifest + changelogUpdate checking for consumers

Installation

# Install the plugin
claude /plugin install github:USIG-Digital/bastion-security-framework

# Initialize in a project
/bastion:init

# Or: traditional submodule approach still works
git submodule add <url> lib/daml-security-framework
python3 lib/daml-security-framework/scripts/init.py

Project-Specific Template Growth

The local security/ directory starts minimal and grows as auditors discover findings.

Day 1Month 3Month 12
authorization.yamlempty8 vectors23 vectors
arithmetic.yamlempty4 vectors11 vectors
temporal.yamlempty2 vectors9 vectors
state.yamlempty3 vectors15 vectors
tests/--TestAuth.damlMultiple test files
results/--latest.jsonlatest.json + history/
proposals/----submitted/ + accepted/
bastion.yamlfrom templatecustomizedmature config

What Lives Where

ScopeDirectoryContents
Framework (core repo, read-only)vectors/examples/Generic reference patterns
vectors/community/Accepted community contributions
semgrep/Global rules for all DAML projects
intel/sources.yamlCurated intelligence catalog
standards/OWASP/NIST/FIPS/Canton tracking
Project (consumer's repo)security/vectors/Project's own findings (grows over time)
security/tests/DAML tests validating mitigations
security/results/Machine-readable execution output
security/proposals/Vectors submitted to core (audit trail)
security/intel/Local source overrides
bastion.yamlProject configuration

Framework content flows down to projects via bastion:sync. Project discoveries flow up to the framework via bastion:propose.

bastion.yaml Growth

The config file evolves as the project matures:

framework:
version: "2.1.0"
last_sync: "2026-03-21"
channel: stable

project:
name: "canton-exchange"
daml_source_dirs:
- daml/main/
- daml/workflows/
daml_test_dirs:
- daml/test/
web_source_dirs:
- web/backend/src/
- web/frontend/src/

build:
tool: dpm
test_command: "dpm test --project-dir daml/test"
build_command: "dpm build"

vectors:
dir: security/vectors
domains: [authorization, arithmetic, temporal, state]

results:
dir: security/results
format: json
history: true

proposals:
dir: security/proposals
auto_submit: false
upstream: "https://github.com/USIG-Digital/bastion-security-framework"

intel:
local_sources: security/intel/sources-local.yaml
merge_strategy: append
context: |
This is a regulated securities exchange on Canton Network.
Focus areas: settlement finality, QIB verification, collateral management.
discovery_prompts:
- "Research Canton Network validator security"
- "Find audit firms that have reviewed tokenized securities platforms"

standards:
track: [owasp-top-10, nist-800-53, fips-140-3, canton-releases, splice-releases, daml-sdk-releases]

Update/Sync Mechanism

registry.yaml

Lives in the core framework repo. Consumers check it to know what changed since their last sync.

version: "2.1.0"
released: "2026-03-20"
channel: stable

changelog:
- version: "2.1.0"
date: "2026-03-20"
changes:
vectors_added:
- id: CV-012
name: "Canton sequencer time manipulation"
domain: temporal
severity: HIGH
semgrep_rules_added:
- id: daml-sequencer-time-drift
standards_updated:
- standard: owasp-top-10
version: "2025"
change: "A08 updated with DAML-specific patterns"
breaking_changes: []

/bastion:sync Flow