Guides

What's New in m1f v3.2

New features and improvements in m1f version 3.2

import Callout from ’@/components/ui/Callout.astro’;

Version 3.2 brings game-changing security enhancements, blazing-fast performance improvements, and powerful new configuration options to the m1f toolkit. Let’s explore what makes this release special!

πŸš€ Performance Boost: Now 3-5x Faster!

Parallel Processing by Default

No configuration needed – m1f now automatically processes files in parallel, delivering:

  • 3-5x speed improvements for large file sets
  • Smart batch size optimization
  • Thread-safe deduplication
  • Deterministic output ordering

Memory Efficiency

  • Stream-based checksum calculation reduces memory usage by 50%
  • Handles massive files without breaking a sweat
  • 8KB chunk processing prevents out-of-memory errors

πŸ”’ Enterprise-Grade Security

Comprehensive Protection Suite

Version 3.2 takes security seriously with multiple layers of protection:

Path Traversal Protection
Validates all file paths to prevent directory traversal attacks. Your files stay where they belong.

SSRF Protection
Blocks access to private networks and cloud metadata endpoints:

  • Private IP ranges (10.x.x.x, 172.16.x.x, 192.168.x.x)
  • Localhost and link-local addresses
  • Cloud metadata endpoints (169.254.169.254)

Automatic robots.txt Compliance
All web scrapers now respect robots.txt – no configuration needed! This keeps you compliant with website policies automatically.

SSL/TLS Validation
SSL certificate validation is now enabled by default, protecting against man-in-the-middle attacks.

Security Modes

Choose how m1f handles potential security issues:

# Stop on security issues (default)
m1f -s ./src -o bundle.txt --security-check error

# Log warnings but continue
m1f -s ./src -o bundle.txt --security-check warn

# Skip security scanning (not recommended)
m1f -s ./src -o bundle.txt --security-check skip

✨ New Configuration Options

Content Deduplication Control

Sometimes you need duplicate files preserved:

# Keep all duplicate files
m1f -s ./project -o output.txt --allow-duplicate-files

Encoding Flexibility

Working with legacy systems? Control UTF-8 preference:

# Disable UTF-8 preference for legacy encodings
m1f -s ./legacy -o output.txt --no-prefer-utf8-for-text-files

Enhanced Preset System

Configure everything in your preset files:

name: "My Project v3.2"
version: "3.2"

settings:
  enable_content_deduplication: true
  prefer_utf8_for_text_files: true
  security_check: error

include_patterns:
  - "src/**/*.{js,ts,jsx,tsx}"
  - "**/*.md"

per_file_settings:
  "*.min.js":
    processors:
      - minify_content

πŸ”„ Breaking Changes & Migration

1. Simplified File Separators

The file separator format has been streamlined:

  • Before: === path/to/file.txt === SHA256: abc123...
  • After: === path/to/file.txt ===
s1f automatically handles both old and new formats!

2. SSL Validation Default

SSL validation is now enabled by default. For sites with self-signed certificates:

m1f-scrape https://internal-site.com -o ./output --ignore-https-errors

3. Security Scanning Default

Security scanning now stops on sensitive data detection by default. To migrate smoothly:

# Use warn mode during migration
m1f -s . -o bundle.txt --security-check warn

πŸ“Š Performance Benchmarks

Real-world improvements you’ll experience:

Operationv3.1v3.2Improvement
1000+ files bundling30s8s3.75x faster
Large file processing2GB RAM1GB RAM50% less memory
s1f extraction20s10s2x faster

πŸ›‘οΈ Security Audit Results

Version 3.2 passes all security audits with flying colors:

  • βœ… Path traversal vulnerabilities eliminated
  • βœ… SSRF protection implemented
  • βœ… Command injection prevented
  • βœ… SSL validation enforced
  • βœ… robots.txt compliance automatic
  • βœ… JavaScript execution validated

πŸ’‘ Quick Examples

Modern Web Project Bundle

# Automatic parallel processing with security checks
m1f -s ./src -o dist/bundle.txt --preset modern-web.yml

Legacy System Migration

# Handle legacy encodings and preserve duplicates
m1f -s ./legacy -o migration.txt \
  --allow-duplicate-files \
  --no-prefer-utf8-for-text-files \
  --security-check warn

Secure Web Scraping

# Automatic robots.txt compliance and SSL validation
m1f-scrape https://docs.example.com -o ./scraped

🎯 Get Started

Ready to experience the speed and security of v3.2? Update your m1f installation:

pip install --upgrade m1f

Then try the new features:

# Experience the speed boost (parallel processing is automatic!)
m1f -s . -o bundle.txt

# Try the new security features
m1f -s ./project -o secure-bundle.txt --security-check error

Questions? Check our troubleshooting guide or reach out to the community. Happy bundling! πŸš€