input-sanitisation

Enforce OWASP Top 10 sanitisation patterns for Next.js and FastAPI applications.

1|Updated Sep 14, 2025
One-click install
npx skills add https://github.com/CleanExpo/DR-NRPG --skill input-sanitisation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: input-sanitisation
Source: https://github.com/CleanExpo/DR-NRPG/tree/main/.skills/custom/input-sanitisation
Command: npx skills add https://github.com/CleanExpo/DR-NRPG --skill input-sanitisation

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents malicious code injection (XSS, SQL, command, URL, SSRF) by providing robust sanitisation patterns for both frontend and backend code.

Core Features & Use Cases

  • XSS Prevention: Protects against cross-site scripting by ensuring safe rendering of user content.
  • SQL Injection Defense: Guarantees that user input cannot manipulate database queries.
  • Command Injection Mitigation: Prevents untrusted input from executing arbitrary system commands.
  • URL & SSRF Protection: Validates redirect targets and server-side requests to prevent abuse.
  • Use Case: When accepting user comments that will be displayed on a webpage, this skill ensures that any embedded scripts are neutralised, preventing them from executing in other users' browsers.

Quick Start

Apply the input-sanitisation skill to review the provided Next.js and FastAPI code for potential injection vulnerabilities.

Frequently Asked Questions about input-sanitisation

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

FAQPage Schema
How do I prevent SQL injection and XSS vulnerabilities in my Next.js and FastAPI application?

To prevent SQL injection and XSS, apply defence-in-depth patterns like parameterised queries and output encoding across your Next.js frontend and FastAPI backend. This enforces strict input validation aligned with OWASP Top 10 guidelines to neutralise malicious user content.

What is the best way to sanitize user input to stop cross-site scripting attacks?

The best way to stop cross-site scripting attacks is enforcing safe output encoding when rendering user content. By neutralising embedded scripts during the rendering process, you ensure that untrusted user input is displayed as static text rather than executed in other users' browsers.

How do I secure FastAPI subprocess handling against command injection?

To secure FastAPI subprocess handling against command injection, you must implement safe subprocess patterns that isolate untrusted input. This prevents untrusted data from being interpreted as arbitrary system commands, stopping attackers from executing unauthorised operations on your server.

How do I validate URL redirects and prevent SSRF in a Next.js application?

To prevent SSRF and validate URL redirects in a Next.js application, implement strict redirect target validation and server-side request validation. This blocks unauthorised server-side request forgery attempts and prevents attackers from abusing your application to access internal networks.

Does this input sanitisation approach cover all OWASP Top 10 injection vulnerabilities?

Yes, this input sanitisation approach covers major OWASP Top 10 injection vulnerabilities including XSS, SQL injection, command injection, URL redirect, and SSRF. It provides comprehensive defence-in-depth patterns for both frontend and backend environments without requiring external dependencies.