sec-basics

Secure Python applications by validating inputs, preventing SQL injection, and scanning dependencies.

1|Updated Dec 22, 2025
One-click install
npx skills add https://github.com/CybLow/pypaginate --skill sec-basics
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sec-basics
Source: https://github.com/CybLow/pypaginate/tree/main/.opencode/skills/sec-basics
Command: npx skills add https://github.com/CybLow/pypaginate --skill sec-basics

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Foundational security practices for Python applications to reduce vulnerabilities and risk exposure.

Core Features & Use Cases

  • Comprehensive coverage: input validation, SQL injection prevention, secrets management, authentication/authorization patterns, secure error messages, and dependency security scanning.
  • Real-world applicability: applies to typical Python backends and API services with optional integrations.
  • Use case: you want to harden a Flask or FastAPI project by aligning with these practices.

Quick Start

Configure your Python project to validate inputs, use parameterized queries, manage secrets securely, implement robust auth patterns, and enable dependency scanning.

Frequently Asked Questions about sec-basics

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

FAQPage Schema
How do I prevent SQL injection in Python applications?

To prevent SQL injection in Python applications, enforce parameterized queries instead of string concatenation. This approach separates code from data, ensuring user inputs are treated strictly as values and cannot execute malicious commands against the database backend.

What is the best way to manage secrets in a Python backend?

The best way to manage secrets in a Python backend is using secure handling patterns that avoid hardcoding. Store secrets in environment variables or dedicated vaults, ensuring sensitive keys remain outside the source code and are accessed securely at runtime.

Does this approach work for hardening Flask or FastAPI projects?

Yes, this approach works for hardening Flask or FastAPI projects by applying comprehensive security practices. You can integrate whitelist-based input validation, safe authentication flows, and generic error messaging directly into typical Python API services to reduce risk.

How do I validate user input securely in Python APIs?

Validate user input securely in Python APIs by applying a whitelist-based validation approach. This ensures only explicitly approved data formats and characters are accepted, effectively blocking unexpected payloads before they reach application logic.

Why should I use generic error messages in Python applications?

Use generic error messages in Python applications to avoid exposing internal system details. Returning generic messages prevents attackers from gaining actionable intelligence about your architecture, database structure, or authentication logic during failed operations or edge cases.