Skip to main content

Day 1 Deliverables

Everything that ships with the plugin on day 1, plus the build priority roadmap.


Skills (user-invocable commands)

SkillWhat it doesDX value
/bastion:initScaffold security/ directory, create bastion.yamlOne command from zero to working
/bastion:verifyRun all Layer 4 checks, output structured resultsSingle command replaces 4 manual steps
/bastion:scopeShow which vectors apply to staged/changed filesInstant security context
/bastion:integrate-vectorAccept agent proposal, generate vector + test + rule"Yes" becomes 5 artifacts
/bastion:proposeSubmit pending proposals to core frameworkOne command, zero template-filling
/bastion:propose --dry-runPreview what would be submittedSee the PR before it's created
/bastion:syncPull framework updates, match new vectors to projectStay current without reading changelogs
/bastion:statusShow pending proposals, sync state, contribution statsDashboard of security posture
/bastion:auditRun all 4 auditor agents on changed filesFull domain sweep in one command
/bastion:audit --fullRun all auditors on all project filesQuarterly deep sweep
/bastion:researchRun intelligence-sync (Job 1 + Job 2)Discover new threats and sources
/bastion:coverageShow vector coverage report with gaps"Where are we exposed?"
/bastion:complianceCheck standards compliance (OWASP, NIST, etc.)Answer "are we compliant?" with evidence
/bastion:explain AV-048Explain a specific vector: what, why, how to fixNew developer understands any vector instantly
/bastion:diffCompare local vectors against core frameworkSee what's novel, missing, or outdated

Hooks (automatic triggers)

HookEventWhat it doesDX value
Post-edit security checkPostToolUse on Write/Edit of *.damlRuns scope on changed fileSee applicable vectors instantly
Pre-commit gatePreToolUse on Bash(git commit)Quick semgrep scan, blocks on CRITICALCatches issues before git history
Post-integrate nudgePostToolUse on /bastion:integrate-vectorNovelty check, nudges upstream proposalDrives community contributions
Post-sync reportAfter /bastion:syncShows new matching vectorsNew content is immediately actionable
Stale sync alertSessionStart if last sync > 30 daysReminds user to syncPrevents drift from core
Pending proposals reminderSessionStart if pending queue non-emptyShows count with submit commandKeeps contribution pipeline moving
Coverage regressionPostToolUse on vector YAML editsRe-runs coverage checkPrevents accidental coverage loss

Agents (AI-powered analysis)

AgentLayerTriggerWhat it produces
authorization-auditor2/bastion:audit, auth pattern changesVector proposals for controller/signatory/access issues
arithmetic-auditor2/bastion:audit, numeric code changesVector proposals for division/overflow/precision issues
temporal-auditor2/bastion:audit, time/deadline changesVector proposals for deadline/expiry/staleness issues
state-auditor2/bastion:audit, lifecycle code changesVector proposals for state machine/archive issues
composition-auditor2.5/bastion:audit, after domain auditorsCross-domain composite attack chain proposals (CHAIN/AMPLIFY/BYPASS)
intelligence-sync0/bastion:research, weekly scheduleNew vector + source proposals
standards-sync0/bastion:research, after releasesStandards updates, advisory-driven proposals

Multi-Model Orchestration

ComponentWhat it doesStatus
Provider abstractionUnified interface for Anthropic, Google, OpenAIImplemented, tested
Parallel executionRuns identical prompts across all providers simultaneouslyImplemented (15.8s for 3 providers)
Confidence scoringHIGH (all agree), MEDIUM (majority), LOW (single model)Implemented, 8 unit tests
Blind spot detectionFlags single-model findings for investigationImplemented, proven with real findings
.env key managementAPI keys in gitignored .env, auto-loadedImplemented
/bastion:multi-auditRun full adversarial review cycleImplemented

Makefile Targets

TargetEquivalent skillCI-friendly
make bastion-init/bastion:initYes
make bastion-verify/bastion:verifyYes (exit 0/1)
make bastion-verify-quick/bastion:verify --quickYes
make bastion-scope/bastion:scopeYes
make bastion-propose/bastion:proposeInteractive
make bastion-propose-pending/bastion:propose --allSemi
make bastion-propose-dry-run/bastion:propose --dry-runYes
make bastion-status/bastion:statusYes
make bastion-sync/bastion:syncInteractive
make bastion-securityFull scan suiteYes
make bastion-pre-commitQuick gateYes

MCP Tools

ToolUsed byPurpose
bastion_scanAgents, CIRun semgrep, return structured results
bastion_verifyAgents, CIFull verification with JSON output
bastion_scopePost-edit hook, agentsMatch files to applicable vectors
bastion_vector_status/bastion:coverageCoverage report per vector
bastion_integrate/bastion:integrate-vectorCreate artifacts from accepted proposal
bastion_propose/bastion:proposeSanitize and build PR payload
bastion_sync/bastion:syncCheck registry, pull updates
bastion_standards/bastion:complianceStandards mapping check
bastion_explain/bastion:explainRetrieve and format vector details
bastion_novelty_checkPost-integrate hookCompare item against core catalog

Structured Results Format

{
"run_id": "2026-03-21-a1b2c3",
"timestamp": "2026-03-21T14:30:00Z",
"framework_version": "2.1.0",
"project": "canton-exchange",
"summary": {
"vectors_total": 47,
"vectors_covered": 38,
"vectors_missing": 6,
"vectors_partial": 3,
"coverage_pct": 80.9,
"semgrep_findings": 2,
"tests_passed": 34,
"tests_failed": 1,
"standards_compliance": {
"owasp-top-10": "85%",
"nist-800-53": "72%"
}
},
"vectors": [
{
"id": "AV-001",
"domain": "authorization",
"status": "COVERED",
"test": "testSelfTransferPrevention",
"test_result": "PASS",
"semgrep_rule": "daml-self-transfer",
"semgrep_result": "CLEAN",
"last_verified": "2026-03-21T14:30:00Z"
}
]
}

End-to-End Flow: A New Threat Emerges


Build Priority Roadmap

Priority 1 — Foundation (COMPLETE)

  • scripts/config.py — shared bastion.yaml config loader with dynamic domain discovery
  • verify.py refactored — reads config, --json output writes security/results/latest.json
  • scope.py refactored — reads config, no hardcoded domain lists
  • security/results/ output format and writer
  • 5 focused auditor agent definitions (auth, arithmetic, temporal, state, composition)
  • intelligence-sync agent definition
  • 134-source intelligence catalog
  • Semgrep rules (DAML + web)
  • Attack vector schema + examples (including 5 composite chain examples)
  • MCP server (DAML/Canton dev tools)
  • Init script (scaffolds all 5 domains + composition)
  • Makefile targets
  • bastion.yaml template (with models section for multi-model config)

Priority 2 — Core Skills (COMPLETE)

  • /bastion:init, /bastion:verify, /bastion:verify-quick, /bastion:scope skills
  • /bastion:integrate-vector skill + scripts/integrate_vector.py
  • /bastion:explain, /bastion:coverage, /bastion:audit, /bastion:research skills
  • /bastion:multi-audit skill (multi-model adversarial review)
  • Test skeleton generator (in integrate_vector.py)
  • Semgrep rule stub generator (in integrate_vector.py)
  • /bastion:status, /bastion:propose, /bastion:sync, /bastion:scan skills
  • /bastion:secrets, /bastion:vuln, /bastion:validate, /bastion:check-duplicates, /bastion:docs skills

Priority 2.5 — Multi-Model Orchestration (COMPLETE)

  • scripts/providers.py — provider abstraction (Anthropic, Google, OpenAI)
  • scripts/orchestrator.py — parallel execution, YAML parsing, merge, confidence scoring
  • .env-based API key management (gitignored, auto-loaded)
  • bastion.yaml models: section with provider config, orchestration settings, thresholds

Priority 2.5 — Compositional Learning (COMPLETE)

  • agents/composition-auditor.md — cross-domain chain discovery agent
  • vectors/examples/composition.yaml — 5 reference composite vectors (CHAIN, AMPLIFY, BYPASS)
  • Composition domain in init, verify, scope, index template
  • Latent chain regression detection in verify.py
  • Schema extension (composition_type, constituent_vectors)

Priority 3 — Hooks (PARTIAL)

  • Post-edit security check (PostToolUse on Write/Edit of *.daml)
  • Pre-commit gate (PreToolUse on git commit, blocks on CRITICAL)
  • Session start: stale sync alert, pending proposals reminder, CRITICAL missing warning
  • Post-integrate nudge (novelty check)
  • Post-sync report (new matching vectors)
  • Coverage regression warning (on vector YAML edits)

Priority 3.5 — Test Suite (COMPLETE)

  • 48 unit tests (config, parsing, integration, composition, orchestrator logic)
  • 17 functional tests (all scripts as subprocesses, hooks, idempotency)
  • 27 integration tests (real API calls to Claude, Gemini, GPT — all passing)
  • Test runner with tiered execution (--unit, --functional, --integration)
  • Test fixtures with controlled vector data across all 5 domains

Priority 4 — Distribution + Ecosystem (PARTIAL)

  • .claude-plugin/plugin.json (v1.2.0)
  • .claude-plugin/marketplace.json
  • /bastion:compliance skill
  • /bastion:diff skill
  • proposal-builder agent
  • MCP security tools (10 tools)
  • vectors/community/ directory
  • GitHub PR templates + CODEOWNERS + rulesets
  • standards/ directory with initial mappings
  • standards-sync agent

Priority 5 — Polish

  • Migrate google.generativeaigoogle.genai (deprecated SDK)
  • CI pipeline for framework itself
  • Source scoring applied to existing 134 sources
  • Update patent disclosure with test evidence