Creates RPC-style endpoint following layered architecture (Controller → Manager → Repository). Use when creating new API endpoints or CRUD operations.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Security audit for Terraform codebases covering IAM, networking, encryption, secrets, access control, and compliance. Use before prod deploys, periodic audits, or new service security review.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
설치 방법 보기설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.
Runs a 6-area security audit on Terraform codebases. Produces a pass/fail report per area.
* actions on * resourcesExternalId or sts:SourceIdentity# INSECURE — overly broad permissions
resource "aws_iam_policy" "bad" {
policy = jsonencode({
Statement = [{
Effect = "Allow"
Action = "*"
Resource = "*"
}]
})
}
# SECURE — scoped to specific actions and resources
resource "aws_iam_policy" "good" {
policy = jsonencode({
Statement = [{
Effect = "Allow"
Action = ["s3:GetObject", "s3:PutObject"]
Resource = "${aws_s3_bucket.assets.arn}/*"
}]
})
}
# SECURE — IRSA for EKS pods
module "irsa" {
source = "git::https://github.com/{project}/terraform-modules.git//irsa?ref=v1.0.0"
name = "${local.name_prefix}-irsa"
oidc_provider_arn = var.oidc_provider_arn
namespace = var.service
service_account = var.service
policy_arns = [aws_iam_policy.service.arn]
}
0.0.0.0/0 ingress except ALB on 443source_security_group_id, not CIDR# INSECURE — database accessible from anywhere
resource "aws_security_group_rule" "rds_bad" {
type = "ingress"
from_port = 5432
to_port = 5432
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
security_group_id = aws_security_group.rds.id
}
# SECURE — database only from app security group
resource "aws_security_group_rule" "rds_good" {
type = "ingress"
from_port = 5432
to_port = 5432
protocol = "tcp"
source_security_group_id = aws_security_group.app.id
security_group_id = aws_security_group.rds.id
description = "PostgreSQL access from application"
}
storage_encrypted = truessl_enforcement via parameter grouptransit_encryption_enabled = trueat_rest_encryption_enabled = true# INSECURE — no encryption
resource "aws_db_instance" "bad" {
storage_encrypted = false # default
}
# SECURE — encryption enabled
resource "aws_db_instance" "good" {
storage_encrypted = true
kms_key_id = var.rds_kms_key_arn
}
# SECURE — Redis encryption
module "redis" {
source = "git::https://github.com/{project}/terraform-modules.git//elasticache?ref=v1.0.0"
transit_encryption = true
at_rest_encryption = true
auth_token = var.redis_auth_token
}
.tf files or committed .tfvarssecrets.tfvars in .gitignoresensitive = truesensitive output)# INSECURE — password in code
resource "aws_db_instance" "bad" {
password = "SuperSecret123!"
}
# SECURE — from variable, marked sensitive
variable "db_password" {
description = "Database master password"
type = string
sensitive = true
}
resource "aws_db_instance" "good" {
password = var.db_password
}
# SECURE — sensitive output
output "connection_string" {
value = "postgresql://${var.db_user}:${var.db_password}@${aws_db_instance.main.endpoint}/${var.db_name}"
sensitive = true
}
aws-auth ConfigMap restricts access to needed roles# EKS access control
resource "kubernetes_config_map" "aws_auth" {
metadata {
name = "aws-auth"
namespace = "kube-system"
}
data = {
mapRoles = yamlencode([
{
rolearn = var.admin_role_arn
username = "admin"
groups = ["system:masters"]
},
{
rolearn = var.node_role_arn
username = "system:node:{{EC2PrivateDNSName}}"
groups = ["system:bootstrappers", "system:nodes"]
}
])
}
}
{project}-{service}-{env} convention# CORRECT — default tags at provider level
provider "aws" {
default_tags {
tags = {
Project = var.project
Service = var.service
Environment = var.env
ManagedBy = "terraform"
}
}
}
# CORRECT — backup retention
resource "aws_db_instance" "main" {
backup_retention_period = var.env == "prod" ? 30 : 7
backup_window = "03:00-04:00"
}
.tf files in the codebase*/*, public database access, unencrypted storage, secrets in codeProduces a security audit report:
## Terraform Security Audit: {service}
### Overall: Pass | Fail
| Area | Status | Critical | Warnings | Info |
|------------|----------|----------|----------|------|
| IAM | Pass | 0 | 0 | 1 |
| Network | Fail | 1 | 0 | 0 |
| Encryption | Pass | 0 | 1 | 0 |
| Secrets | Pass | 0 | 0 | 0 |
| Access | Pass | 0 | 0 | 1 |
| Compliance | Warning | 0 | 2 | 0 |
### Critical Findings
- **[Network]** Security group `rds_main` allows ingress from 0.0.0.0/0 on port 5432
- File: `modules/{service}/sg.tf:15`
- Fix: Replace `cidr_blocks` with `source_security_group_id`
### Warnings
- **[Encryption]** Redis `at_rest_encryption` not enabled
- File: `modules/{service}/redis.tf:8`
- Fix: Add `at_rest_encryption = true`
### Remediation Priority
1. Fix critical findings before any deployment
2. Address warnings before production promotion
3. Info items for next sprint
아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.
로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.
아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.
Creates RPC-style endpoint following layered architecture (Controller → Manager → Repository). Use when creating new API endpoints or CRUD operations.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Write blog posts, guides, tutorials, and long-form content. Sounds like a real person, not AI. Use when the user wants polished written content.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Design RPC-style APIs with layered architecture (Controller → Manager → Repository). Use when creating new API endpoints, designing API contracts, or reviewing API patterns.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Run a structured brainstorm session for startup ideas. Takes a theme or problem and generates ideas with quick gut-checks. Use when the user wants to explore a space or generate new ideas.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Run real browser QA with Playwright. Use when testing a frontend feature, verifying UI before PR, smoke testing after deploy, or investigating reported visual bugs.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
CI/CD pipeline patterns for GitHub Actions, PR automation, and deployment workflows. Use when setting up CI, fixing broken pipelines, automating PR checks, or configuring deployment.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.