file-validator

Validate file extensions, MIME types, and safe path resolution.

2.4k|301|Updated Jan 29, 2026
One-click install
npx skills add https://github.com/cisco-ai-defense/skill-scanner --skill file-validator-cisco-ai-defense
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: file-validator
Source: https://github.com/cisco-ai-defense/skill-scanner/tree/main/evals/skills/safe-skills-2/file-validator
Command: npx skills add https://github.com/cisco-ai-defense/skill-scanner --skill file-validator-cisco-ai-defense

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Validates file formats and checks content integrity to prevent processing of unsafe or malformed documents.

Core Features & Use Cases

  • Validate file extensions against an allowed set to prevent unsafe files from being processed
  • Analyze basic content integrity and safe handling to avoid path traversal and oversized inputs
  • Enforce safe path resolution and optional MIME-type checks for better confidence

Quick Start

Provide the path to a file to validate its format and safety.

Frequently Asked Questions about file-validator

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

FAQPage Schema
How do I validate file formats and check content integrity for uploaded documents?

To validate file formats and check content integrity, apply extension checks against an allowed set alongside safe path resolution to prevent processing of unsafe or malformed documents.

What is the best way to prevent path traversal when processing file uploads?

Preventing path traversal during file upload processing requires enforcing safe path resolution to ensure files are accessed only from permitted directories before format validation.

How do I enforce MIME-type validation and size limits in a document intake pipeline?

Enforcing MIME-type validation and size limits in a document intake pipeline involves applying optional content checks and restricting oversized inputs to ensure data safety.

Can I use file validation for batch processing across local or cloud storage?

File validation works for batch processing across local or cloud storage by applying extension checks, safe path resolution, and size limits to uploaded documents.

Why does file validation fail to stop unsafe files with spoofed extensions?

File validation can fail to stop unsafe files with spoofed extensions if only file names are checked, but adding optional MIME-type validation increases confidence in the actual content format.