Back to browse
GitHub Repository

A unified framework for strengthening CDN security and managing edge protection policies.

2 starsJavaScript

A single security policy for both AWS CloudFront and Cloudflare Workers

by einshutoin·Feb 12, 2026·1 point·0 comments

AI Analysis

●●SolidBig BrainSolve My Problem

YAML-to-code compiler for CDN security, but CloudFront+CF already have native policy tools.

Strengths
  • Abstracts CloudFront Functions vs Lambda@Edge vs Workers runtime differences into single policy definition
  • Policy-as-code approach with linting and drift detection reduces copy-paste security misconfiguration
  • Thoughtful separation of concerns: Edge Functions for normalization/blocking, WAF for rate-limiting/bot defense
Weaknesses
  • Maturity: 2 stars, minimal adoption signals—unclear if real teams use this or if it's proven in production
  • Limited to CloudFront+Cloudflare; misses Azure CDN, Fastly, AWS Shield—fragmentation it claims to solve still exists
Category
Target Audience

Platform engineers, DevOps teams managing multi-CDN infrastructure

Similar To

Terraform CDN modules · AWS CloudFormation WAF templates · Cloudflare Wrangler

Post Description

I released `cdn-security-framework` to abstract away the runtime differences between CDN providers.

You define a policy like "Verify JWT" or "Block SQLi patterns" in YAML. The tool compiles this into: - *AWS:* CloudFront Functions (JS) + Lambda@Edge (for heavier tasks) + WAF Rules. - *Cloudflare:* Workers (TS) using native APIs like `crypto.subtle`.

It handles the platform-specific quirks (e.g., CloudFront's limited JS environment vs Cloudflare's full Node-like environment) so you don't have to rewrite your security logic when switching providers.

Open source and ready for feedback: https://github.com/albert-einshutoin/cdn-security-framework

Similar Projects