Local-first cybersecurity helper for Web3 and crypto development in Visual Studio Code
Bastion Security helps developers catch common Web3 security mistakes while they code. It focuses on private-key protection, suspicious generated code review, package-name checks, and clipboard consistency reminders.
Features
Private Key And Secret Pattern Protection
Reviews the active file for private-key-like strings, seed-phrase-like text, and high-entropy encoded values.
Highlights findings in the editor and Problems panel.
Uses configurable thresholds so teams can tune sensitivity for their codebase.
AI Code Review Assistant
Reviews generated editor changes when enabled.
Warns when generated code appears to combine sensitive values with network calls.
Uses the editor language model API only when available and enabled by the user.
NPM And Project File Review
Reviews package.json and Cargo.toml when they change.
Warns about package names that appear in bundled review data.
Checks for names that look similar to common crypto/Web3 packages, while allowing official package names such as @solana/web3.js.
Shows a calm review alert instead of automatically removing dependencies.
Clipboard Consistency Reminder
Keeps a temporary in-memory copy of recently copied text.
Warns when pasted text differs from the copied text being tracked.
Useful when reviewing wallet addresses or other sensitive values before pasting.
Commands
Command
Description
Bastion Security: Scan Current File
Manually review the active file.
Bastion Security: Toggle Review Assistant
Enable or disable generated-code review.
Bastion Security: Open Review Log
Open the review output channel.
Bastion Security: Open Project File Log
Open the project file review output channel.
Bastion Security: Clear Clipboard Buffer
Clear the temporary clipboard buffer.
Settings
Setting
Default
Description
bastionSecurity.enable
true
Enable editor diagnostics.
bastionSecurity.enableAiGuard
true
Enable generated-code review.
bastionSecurity.enableSupplyChainGuard
true
Enable project file checks.
bastionSecurity.enableClipboardGuard
true
Enable clipboard consistency reminders.
bastionSecurity.debugClipboardGuard
false
Enable verbose local clipboard output.
bastionSecurity.hexTextThreshold
3.5
Minimum threshold for long hexadecimal text diagnostics.
bastionSecurity.base58TextThreshold
4.0
Minimum threshold for long base58 text diagnostics.
NPM Commands
npm install
npm run build:wasm
npm run compile
npm run package