security-bun

Analyze Bun runtime applications for security vulnerabilities in TypeScript and JavaScript code.

Updated Feb 9, 2025
One-click install
npx skills add https://github.com/xeon826/dotfiles --skill security-bun-xeon826
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: security-bun
Source: https://github.com/xeon826/dotfiles/tree/main/opencode/skill/security-bun
Command: npx skills add https://github.com/xeon826/dotfiles --skill security-bun-xeon826

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires ripgrep, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps identify and mitigate common security vulnerabilities specific to applications built with the Bun runtime, ensuring your code is robust against attacks.

Core Features & Use Cases

  • Vulnerability Detection: Pinpoints risks like shell injection, SQL injection, path traversal, and insecure server configurations in Bun applications.
  • Proactive Auditing: Use this skill when reviewing Bun projects, especially those involving bun.lockb, bunfig.toml, or bun:* imports.
  • Use Case: A developer is concerned about potential command injection in a Bun script that processes user-provided filenames. They can use this skill to review the Bun.spawn() usage and ensure proper input validation is in place.

Quick Start

Review the attached Bun script for potential shell injection vulnerabilities.

Frequently Asked Questions about security-bun

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit Bun runtime applications for shell injection vulnerabilities?

Auditing Bun applications for shell injection involves analyzing TypeScript and JavaScript code for insecure `Bun.spawn()` usage to ensure proper input validation mitigates command injection risks.

What security misconfigurations should I look for in a Bun server?

Securing a Bun server requires scanning `bunfig.toml` and source files for server security misconfigurations, SQL injection, path traversal, and insecure WebSocket implementations.

Does ripgrep need to be installed to scan Bun projects for vulnerabilities?

Yes, ripgrep is required to perform automated scanning of Bun runtime applications for security vulnerabilities like shell injection and path traversal.

How do I check my Bun project for SQL injection and path traversal risks?

Checking a Bun project for SQL injection and path traversal involves scanning TypeScript and JavaScript code for vulnerable patterns when handling user-provided inputs or database queries.

When should I run a security audit on my Bun application?

Run a security audit on Bun applications when reviewing projects involving `bun.lockb`, `bunfig.toml`, or `bun:*` imports to proactively identify and mitigate runtime vulnerabilities.