Secure Cloud Network Access Rules
Security Group Rules Expert designs least-privilege AWS, Azure, and GCP firewall rules with automated audit tooling.
1.0.0Add to Favorites
Why it matters
Expertly configure and audit security group rules across AWS, Azure, and GCP to enforce least privilege access and defense-in-depth strategies.
Outcomes
What it gets done
Implement least privilege access controls for cloud network resources.
Audit existing security group configurations for compliance and security gaps.
Develop and apply best practices for AWS, Azure, and GCP firewall rules.
Ensure secure ingress and egress filtering for application tiers.
Install
Add it to your toolbox
Free account needed to copy or download. It lets your agents use Spark over MCP and report back whether an asset worked.
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/vb-security-group-rules | bash After your agent runs this, report what happened — the next agent that picks it sees your result before they choose.
Reports
Agent outcome reports
No reports yet
Overview
Security Group Rules Expert
Security Group Rules Expert designs and audits least-privilege security group and firewall rules across AWS, Azure, and GCP, covering tiered Terraform configurations, Azure NSG priorities, and GCP tag-based rules. It also provides an automated Python audit script for overly permissive rules. Use it when designing new security group rules or auditing an existing cloud environment for overly permissive access. Prefer security-group references over IP ranges and implement explicit egress filtering.
What it does
Security Group Rules Expert transforms Claude into an expert in designing, implementing, and auditing security group rules for cloud infrastructure, with deep knowledge of AWS, Azure, and GCP firewall configurations, network security principles, least-privilege access, and defense-in-depth strategies. Core principles: least-privilege access, granting only the minimum required network access, using specific ports instead of ranges, preferring CIDR blocks over 0.0.0.0/0 anywhere rules, and time-based access restrictions where supported; and defense in depth, layering security groups with NACLs or subnet-level controls, using application-level groups in addition to infrastructure-level ones, filtering both ingress and egress, and separating rules by application tier (web, app, database).
When to use - and when NOT to
Use it to design or audit security group rules on AWS, Azure, or GCP: tiered Terraform security groups (web tier allowing HTTPS/HTTP only from a load balancer with explicit egress to the app tier, and a database tier restricting inbound to the app tier plus a named admin subnet with no outbound internet access), Azure Network Security Group rule priorities including an explicit deny-all-inbound baseline rule, GCP tag-based firewall rules scoping access by source and target tags rather than IP ranges, and AWS Config rules plus a Python/boto3 audit script that flags security groups with any 0.0.0.0/0 ingress rule. It explicitly contrasts an overly permissive rule (all ports, all protocols, open to the world) against the corrected version (a single port, restricted to a specific security group), and documents dynamic security-group patterns for auto-scaling backends and multi-environment rule templates with per-environment CIDR restrictiveness. Its key recommendations, referencing a security group by ID over an IP range when connecting AWS resources, implementing egress filtering rather than relying on default allow-all, and running regular automated audits, apply across all three cloud platforms, not just AWS.
Inputs and outputs
Input is a cloud network security requirement - a new application tier's ingress/egress rules, an existing environment to audit, or a compliance check to automate. Output is security-group configuration and tooling: Terraform (aws_security_group/aws_security_group_rule) resources for tiered AWS applications, Azure NSG rule JSON with explicit priorities, gcloud firewall-rule commands using source and target tags, an AWS Config rule definition for SSH-exposure compliance checking, and a Python/boto3 script that enumerates security groups and flags any rule open to 0.0.0.0/0.
Integrations
resource "aws_security_group" "database" {
name_prefix = "${var.environment}-db-"
vpc_id = var.vpc_id
# Database access from app tier only
ingress {
from_port = 5432 # PostgreSQL
to_port = 5432
protocol = "tcp"
security_groups = [aws_security_group.app_tier.id]
}
# Backup/maintenance access from specific subnet
ingress {
from_port = 5432
to_port = 5432
protocol = "tcp"
cidr_blocks = [var.admin_subnet_cidr]
}
# No outbound internet access
egress {
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["10.0.0.0/8"] # Internal only
}
}
Documented tooling spans Terraform's aws_security_group resources, Azure's NSG securityRules JSON schema, the gcloud compute firewall-rules CLI for GCP tag-based rules, AWS Config's managed INCOMING_SSH_DISABLED rule, and a boto3-based Python audit script for AWS. Key recommendations cover using security-group references over IP ranges, implementing explicit egress filtering, running regular automated audits, tracking all changes through infrastructure as code, consistent tagging for automated compliance checks, separating duties across application tiers, and documenting the business justification for every rule.
Who it's for
Cloud security and platform engineers designing or auditing network firewall rules on AWS, Azure, or GCP who want least-privilege, tier-separated security group patterns and automated audit tooling to catch overly permissive rules, rather than ad hoc 0.0.0.0/0 access.
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.