Back to skills
SKILL.md
Security Engineering
ASecuritySecurity practices for a VS Code extension handling untrusted engineering files and bus hardware - webview CSP and message validation, untrusted parser input, process boundaries, supply chain, threat modelling (STRIDE), secure release. Use for security reviews, threat models and dependency decisions.
- 8 stars
- 0 votes
- 0 copies
- 0 views
- Added December 5, 2026
Security analysis
100/100npx -y skills add afri-bit/candb-studio --skill security-engineering --agent claude-codeAre you the author of Security Engineering?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/afri-bit-security-engineering)---
name: security-engineering
description: Security practices for a VS Code extension handling untrusted engineering files and bus hardware - webview CSP and message validation, untrusted parser input, process boundaries, supply chain, threat modelling (STRIDE), secure release. Use for security reviews, threat models and dependency decisions.
---
# Security engineering
## Trust boundaries
| Boundary | Untrusted side | Controls |
|----------|----------------|----------|
| Webview <-> host | webview JS and its messages | Host validates **every** message: known `type`, schema/shape, size limits, `documentUri` in allowed set; webview CSP `default-src 'none'`, nonce scripts, no remote content, minimal `localResourceRoots`. |
| File input | `.dbc`, `.blf`, recordings | Bounded reads, size-field checks, inflate caps, no regex with nested quantifiers on user text, errors carry offsets. |
| Adapter / bridge | device, vendor SDK, helper process | Spawn with argument arrays (no shell), validate framing, timeouts, kill on dispose, no inbound network listener by default. |
| Bus transmit | the physical bus | Explicit user action, visible state, confirmation for bulk/periodic send, never during replay, audit log entry. |
| Build / release | npm dependencies, CI | Lockfile, `npm ci`, `npm audit`, review install scripts, pinned vendor SDK, provenance, signed releases. |
## STRIDE quick prompts
Spoofing (which message sender?), Tampering (file modified on disk / in flight), Repudiation (can we tell what transmitted?), Information disclosure (logs include customer traces - never upload), Denial of service (giant file, zip bomb, regex, flood of frames), Elevation (webview -> host file write).
## Threat model template (docs/security/)
Assets - Entry points - Trust boundaries - Threats (STRIDE) - Mitigations - Residual risk - Tests that prove the mitigation.
## Dependency policy
New dependency requires: purpose, alternatives considered, maintenance status, licence (compatible with MIT), install scripts, size impact, and an entry in the PR description. Prefer zero-dependency code for parsers. Run `npm audit --omit=dev` before release; track exceptions with expiry.
## Secrets and privacy
No keys in repo/webview/logs. No telemetry without opt-in and documentation. Logs must not contain frame payloads by default (customer data) - redact or gate behind a debug setting.
## Reporting
Maintain `SECURITY.md` (private reporting channel, supported versions, disclosure timeline).
Attribution
Related skills
View all in development →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.