Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add cncoder/serverless-litellm --skill cloudfront-waf-hardeninggit clone --depth 1 https://github.com/cncoder/serverless-litellmWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/cncoder/serverless-litellm/cloudfront-waf-hardening)<a href="https://agentmods.dev/skills/cncoder/serverless-litellm/cloudfront-waf-hardening"><img src="https://agentmods.dev/badge/skills/cncoder/serverless-litellm/cloudfront-waf-hardening/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/cncoder/serverless-litellm/cloudfront-waf-hardening"><img src="https://agentmods.dev/badge/skills/cncoder/serverless-litellm/cloudfront-waf-hardening.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00073 | $0.03286 |
| Opus 5.5 | $0.00029 | $0.01314 |
| Sonnet 5.5 | $0.00015 | $0.00657 |
| Haiku 4.5 | $0.00007 | $0.00329 |
Grade A, and why
cloudfront-waf-hardening scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
curl -s -o /dev/null -w "%{http_code}" https://$CF_DOMAIN/health/liveliness How it starts
The opening of the file, as written. The whole thing — 356 lines — stays where its author put it; the contents beside it link to each section on GitHub.
CloudFront + WAF Hardening
Lock down an ALB-backed service so it is only reachable through CloudFront, with WAF path-level access control.
When to Activate
- Deploying LiteLLM (or any API proxy) on EKS/ECS behind an ALB
- User asks to "add CloudFront" or "lock down ALB" or "hide the ALB"
- Hardening an existing internet-facing ALB
- Restricting public access to API-only paths (no Admin UI)
Architecture
Client (HTTPS)
|
v
CloudFront Distribution
| adds X-CloudFront-Secret header
v
ALB (HTTP :80, SG = CloudFront prefix list only)
|
WAF Web ACL (default: Block)
| Rule: Allow IF secret header matches AND path in whitelist
v
Backend (EKS Pod / ECS Task / EC2)
Three layers of defense:
- ALB Security Group — only allows CloudFront IP ranges (AWS managed prefix list)
- WAF header verification — blocks requests without the correct
X-CloudFront-Secret - WAF path whitelist — even valid CloudFront requests are blocked if the path is not allowed
Prerequisites
- AWS CLI v2 with sufficient IAM permissions (wafv2, cloudfront, ec2, elasticloadbalancing)
- An existing ALB with a known ARN
- The ALB's Security Group ID
- (Optional) An existing K8s Ingress group if using EKS ALB Controller
Step-by-Step Procedure
Step 1: Generate a CloudFront Secret
CF_SECRET=$(python3 -c "import secrets; print(secrets.token_urlsafe(32))")
echo "CloudFront Secret: $CF_SECRET"
Store this value securely. It will be configured in both CloudFront (origin header) and WAF (match rule).
Step 2: Create CloudFront Distribution
Generate the distribution config with a custom origin header:
ALB_DNS="<alb-dns-name>" # e.g. k8s-myapp-abc123.region.elb.amazonaws.com
python3 -c "
import json
config = {
'CallerReference': '$(date +%s)',
'Comment': 'Hardened distribution for ALB',
'Enabled': True,
'Origins': {
'Quantity': 1,
'Items': [{
'Id': 'alb-origin',
'DomainName': '$ALB_DNS',
'CustomOriginConfig': {
'HTTPPort': 80,
'HTTPSPort': 443,
'OriginProtocolPolicy': 'http-only',
'OriginReadTimeout': 60,
'OriginKeepaliveTimeout': 5
},
'CustomHeaders': {
'Quantity': 1,
'Items': [{
'HeaderName': 'X-CloudFront-Secret',
'HeaderValue': '$CF_SECRET'
}]
}
}]
},
'DefaultCacheBehavior': {
'TargetOriginId': 'alb-origin',
'ViewerProtocolPolicy': 'redirect-to-https',
'AllowedMethods': {
'Quantity': 7,
'Items': ['GET','HEAD','OPTIONS','PUT','POST','PATCH','DELETE'],
'CachedMethods': {'Quantity': 2, 'Items': ['GET','HEAD']}
},
'CachePolicyId': '4135ea2d-6df8-44a3-9df3-4b5a84be39ad',
'OriginRequestPolicyId': '216adef6-5c7f-47e4-b989-5492eafa07d3',
'Compress': True
},
'PriceClass': 'PriceClass_200'
}
with open('/tmp/cf-dist.json', 'w') as f:
json.dump({'DistributionConfig': config}, f)
print('Config written to /tmp/cf-dist.json')
"
aws cloudfront create-distribution --cli-input-json file:///tmp/cf-dist.json
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 356 lines · 73 tokens per session scan A d3630adad266
cloudfront-waf-hardening is a skill published in the GitHub repository cncoder/serverless-litellm (2 stars, last pushed 2mo ago), licensed MIT. It adds 73 tokens to every session and 3,286 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other skills, from other repositories
aws-bedrock-custom-model-import-mcp
Manage custom models in Bedrock.
ecs-modernize
Assess an existing app (VMware/EC2) by source code analysis for the replatform vs rearchitect decision, and execute the approved migration onto Amazon ECS. Scope: assessment, strategy decision, migration execution. Covers: source code analysis; language/framework detection (Java, .NET, Spring, Struts, WebSphere…
eks-well-architected-review
Deterministic AWS Well-Architected Framework review of an Amazon EKS cluster (Linux nodes only). Unofficial — not the AWS Well-Architected Tool, no official EKS lens exists, and it maps to no compliance framework (CIS, PCI or otherwise). Collects live data via kubectl and aws, scores it across five of the six pillars…
eks-security
EKS security and compliance assessment — 7-layer hardening stack, CIS/HIPAA/PCI/FedRAMP/SOC2/GDPR audit prep, and 30/60/90 roadmap. Covers OS/AMI selection (Bottlerocket, AL2023, RHEL, Ubuntu), identity (EKS Pod Identity vs IRSA, Access Entries vs aws-auth), workload security (Pod Security Admission, Kyverno/OPA…
ecs-build
Use when building Amazon ECS infrastructure with Terraform, generating apply-ready code for ECS clusters, services, and task definitions across three capacity models — Fargate (FARGATESPOT as capacity provider), EC2 Auto Scaling group providers, and ECS Managed Instances. Covers rolling/blue-green/linear/canary…
eks-ingress-migration
Assess a live EKS cluster's NGINX/Ingress estate and plan migration to Gateway API, the AWS Load Balancer Controller (ALB Ingress), or AWS Transform (ATX). Discovers ingress controllers and routes, scores migration difficulty 0–100 with a separate re-architecture gate, and generates per-cluster reports plus…