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
| Mechanism | Versioning | Auto-update | Agents | Skills | MCP tools | Works offline |
|---|---|---|---|---|---|---|
| Git submodule | manual | no | symlink | no | separate install | yes |
| npm package | semver | npm update | no | no | separate install | yes |
| Claude Code plugin | semver | dsf sync | bundled | bundled | bundled | yes |
| VS Code extension | semver | marketplace | no | no | possible | yes |
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
| Directory | Contents | Plugin Role |
|---|---|---|
.claude-plugin/ | plugin.json | Plugin manifest (version, deps, metadata) |
agents/focused/ | 4 domain auditors + intelligence-sync + standards-sync | Bundled as dsf: namespaced agents |
skills/ | integrate-vector, propose-vector, sync, init, verify | Bundled 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 rules | Global static analysis rules |
intel/ | sources.yaml (134 sources) | Curated intelligence catalog |
standards/ | OWASP, NIST, FIPS, Canton, Splice, DAML SDK | Compliance tracking + mappings |
scripts/ | config, verify, scope, generate_docs | Deterministic execution engine |
registry.yaml | Version manifest + changelog | Update 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 1 | Month 3 | Month 12 | |
|---|---|---|---|
| authorization.yaml | empty | 8 vectors | 23 vectors |
| arithmetic.yaml | empty | 4 vectors | 11 vectors |
| temporal.yaml | empty | 2 vectors | 9 vectors |
| state.yaml | empty | 3 vectors | 15 vectors |
| tests/ | -- | TestAuth.daml | Multiple test files |
| results/ | -- | latest.json | latest.json + history/ |
| proposals/ | -- | -- | submitted/ + accepted/ |
| bastion.yaml | from template | customized | mature config |
What Lives Where
| Scope | Directory | Contents |
|---|---|---|
| Framework (core repo, read-only) | vectors/examples/ | Generic reference patterns |
vectors/community/ | Accepted community contributions | |
semgrep/ | Global rules for all DAML projects | |
intel/sources.yaml | Curated 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.yaml | Project 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: []