Skip to content
Back to skills

Coding

BSecurity

Stream processing, large file uploads, and IO efficiency.

  • 23 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added October 14, 2026
ai-agentspythonrustgonodenodejsrailsawsbackendsecurity

Works with

  • cli

Security analysis

B75/100
  • criticalAccesses sensitive system or user directories

Pro scans all 21 files and shows the line behind each finding

Scanned October 14, 2026

npx -y skills add andreibesleaga/GABBE --skill coding --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Coding?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Coding
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/andreibesleaga-coding-3c52984d/badge)](https://www.skillsdirectory.com/skills/andreibesleaga-coding-3c52984d)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: file-processing
description: Stream processing, large file uploads, and IO efficiency.
triggers: [file processing]
tags: [coding]
role: eng-backend
context_cost: low
---
# file-processing Skill

## Goal
This skill guides the handling of binary data and large datasets without blowing up RAM.

## Steps
## 1. Streaming (Chunks)
- **Problem**: Reading 1GB CSV into memory (RAM).
- **Solution**: Stream it line by line.
  - nodejs: `fs.createReadStream().pipe(csvParser())`.
  - python: `pd.read_csv(chunksize=1000)`.

## 2. Uploads (Presigned URLs)
- **Anti-Pattern**: Client -> Server (RAM buffer) -> S3.
- **Pattern**: Client -> (Request URL) -> Server; Server -> (Signed URL) -> Client; Client -> (Direct Upload) -> S3.
- **Benefit**: Server CPU/RAM is zero during upload. Infinite scalability.

## 3. Malware Scanning
- Never trust user files.
- **Sync**: ClamAV scan on upload (slow).
- **Async**: Upload to S3 (Quarantine Bucket) -> Lambda triggers Scan -> Move to Clean Bucket.

## 4. Exporting Large Data
- Don't return 100k rows in JSON response (timeout).
- **Pattern**:
  1. User requests Export.
  2. Server puts job in Queue.
  3. Worker generates CSV, uploads to S3.
  4. Server notifies User with Download Link.

## 5. File Types
- **Magic Bytes**: Check file signature (hex), not just extension.
- **Image Processing**: Resize/Optimize *async*. Use `sharp` (Node) or `Pillow` (Python).

## Security & Guardrails

### 1. Skill Security (File Processing)
- **Zip Bomb / Zip Slip Vulnerabilities**: When processing large files (Step 1), the agent might implement streaming for CSVs but neglect archive extraction risks. If an attacker uploads a highly compressed 10GB file (Zip Bomb) or a file containing relative paths (`../../../etc/passwd`), naive extraction will crash the server or overwrite arbitrary files. The agent must enforce strict decompression ratio limits, maximum file size caps, and path sanitization on all archive streams.
- **Malware Execution via Magic Bytes Parsing**: In Step 5, the agent checks "Magic Bytes" to verify file types. If the agent uses an insecure, outdated library to parse these headers (e.g., a vulnerable image processing binary), simply inspecting the malware to determine its type could result in arbitrary code execution. The agent must mandate the use of hardened, memory-safe inspection binaries deployed in isolated environments (e.g., ephemeral Lambdas) before the main application server ever touches the byte stream.

### 2. System Integration Security
- **Presigned URL Exfiltration**: In Step 2, the pattern dictates "Server -> (Signed URL) -> Client." If the agent implements this by generating overly permissive Signed URLs (e.g., valid for 24 hours, lack of precise file-path bounding, allowing GET/PUT/DELETE instead of just PUT), an attacker can hijack the URL to read/write arbitrary objects in the S3 bucket. The agent must rigorously scope the IAM policy tied to the Presigned URL generation to a single, specific object key with a lifespan `< 15 minutes`.
- **Quarantine Bypass**: Step 3 describes a strict Async Malware Scanning flow. If the agent implements the logic such that the "Clean Bucket" is publicly readable, but the application accidentally serves links directly from the "Quarantine Bucket" before the Lambda finishes, the security control is bypassed. The agent must enforce network-level IAM policies ensuring the application layer *cannot physical read* from the Quarantine Bucket under any circumstances.

### 3. LLM & Agent Guardrails
- **Memory Exhaustion Under Load**: The LLM understands "Streaming" abstractly, but might write code that accumulates stream chunks into an array before processing (pseudo-streaming), defeating the purpose. The agent must statically analyze the generated code to ensure a true $O(1)$ memory pipeline, explicitly failing the implementation if it identifies unbounded array `push()` operations within the data stream handler.
- **Hallucinated Async Safety**: The LLM might assume that because a file export job is queued (Step 4), it is inherently secure against Denial of Service. However, if the attacker can enqueue 100,000 export jobs, they exhaust the queue and bankrupt the AWS bill. The agent must enforce rate-limiting, job deduplication, and resource quotas on all asynchronous file processing triggers generated by this skill.

Files in this skill

  • agent-trajectory-eval.skill.md5.7 KB
  • artisan-commands.skill.md3.7 KB
  • browser-tdd.skill.md7 KB
  • chaos-fault-injection.skill.md8.1 KB
  • ci-autofix.skill.md4.2 KB
  • clean-coder.skill.md4.5 KB
  • code-review.skill.md6.1 KB
  • debug.skill.md6.5 KB
  • documentation.skill.md7.3 KB
  • eval-driven-development.skill.md6.9 KB
  • evals/code-review.eval.yaml1 KB
  • excalidraw.skill.md3.7 KB
  • file-processing.skill.md4.3 KB
  • git-workflow.skill.md7.2 KB
  • metamorphic-testing.skill.md7.8 KB
  • mobile-dev.skill.md4.2 KB
  • nodejs-expert.skill.md1.6 KB
  • output-validation.skill.md5.4 KB
  • pbt-strategy.skill.md8 KB
  • performant-ai.skill.md3.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.