security-patterns

Community

Implement robust security, protect your project's integrity.

Authorakaszubski
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Overlooking security best practices can expose your project to vulnerabilities like data breaches, unauthorized access, and system compromise. This Skill provides essential security patterns and guidelines, helping you write secure code, manage secrets, and protect against common attacks.

Core Features & Use Cases

  • Secure Secret Management: Enforces the use of environment variables for API keys and secrets, with .gitignore best practices.
  • Comprehensive Input Validation: Guides on preventing path traversal, command injection, and SQL injection.
  • File Operations Security: Best practices for secure file permissions and validating file uploads.
  • Use Case: When integrating a new external API, this Skill reminds you to load API keys from environment variables, validate the API key format, and ensure no secrets are accidentally logged, significantly reducing security risks.

Quick Start

Load API key from .env (must be gitignored!)

import os

from dotenv import load_dotenv

load_dotenv()

api_key = os.getenv("ANTHROPIC_API_KEY")

Prevent path traversal:

from pathlib import Path

base_dir = Path("/data")

file_path = (base_dir / filename).resolve()

if not file_path.is_relative_to(base_dir):

raise ValueError("Path traversal detected")

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: security-patterns
Download link: https://github.com/akaszubski/realign/archive/main.zip#security-patterns

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.