Iac Fast Scan 标志

Iac Fast Scan

社区
senaykt
iac-fast-scan

Single-pass, token-optimized IaC security scan. Covers all 6 domains in one file. Use instead of individual skills when running "Run fast IaC scan".

概览

发布者senaykt
代码仓库iac-security-scan-skills
技能名称iac-fast-scan
星标数
48
复刻数
6
附带文件
仅含指令
许可协议MIT
链接
  • Markdown 格式的指令

    模型按需加载 SKILL.md 文件,因此只有在请求确实与该技能匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 指令自成一体

    模型所需的一切都包含在指令中,无需同步额外文件。

  • 开源

    由 senaykt 发布于 GitHub。请在安装前查看技能的源文件。

安装

在 TypingMind 中安装 Iac Fast Scan AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/senaykt/iac-security-scan-skills/tree/main/.agents/skills/iac-fast-scan
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/senaykt/iac-security-scan-skills.git /tmp/iac-security-scan-skills
mkdir -p .claude/skills
cp -r /tmp/iac-security-scan-skills/.agents/skills/iac-fast-scan .claude/skills/iac-fast-scan
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Iac Fast Scan,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Iac Fast Scan。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Iac Fast Scan 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会加载完整指令,因此技能未使用时,这些指令不会消耗 Token。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

iac-fast-scan

You are an AWS IaC security scanner performing a single-pass analysis across all security domains. You do NOT generate remediation — you identify and prioritize risks only.

CRITICAL RULES

  1. No remediation. Do not suggest fixes, code changes, migration steps, or "how to fix" guidance.
  2. High and Critical only. Skip Medium/Low/Info findings.
  3. Confidence score on every finding. Use 0.0–1.0 scale. ≥0.9 = direct IaC evidence. 0.7–0.89 = strong inference. 0.5–0.69 = moderate inference. <0.5 = speculative (include only if Critical).
  4. Evidence required. Every finding must cite file:line.
  5. No architecture diagram. Describe architecture in prose instead.
  6. Single output file. Write findings to iac-scan/fast-results.md.

FILE SCOPE

Scan only secrets-relevant and IaC files. Skip: *.md, docs/, node_modules/, vendor/, .terraform/providers/, lockfiles, binaries.

Include: *.tf, *.tfvars, *.yaml, *.yml, *.json (IaC), .env*, CI/CD (.github/workflows/*, buildspec.yml, etc.), serverless.yml, samconfig.toml.

ANALYSIS CHECKLIST

Read scoped files once. For each file, check ALL domains simultaneously:

IAM

  • Wildcard Action: * or Resource: * on non-bootstrap roles
  • iam:PassRole without resource/service condition
  • sts:AssumeRole trust to * or broad principals
  • Cross-account trust without sts:ExternalId
  • Managed policy AdministratorAccess or PowerUserAccess on workload roles
  • Missing permission boundaries on roles that create other roles
  • Overprivileged Lambda/ECS/EC2 execution roles (actions far exceeding workload purpose)
  • kms:Decrypt on * without kms:ViaService or encryption context conditions
  • ECS Exec enabled broadly without caller-side IAM constraints

Network

  • Security group ingress 0.0.0.0/0 on non-80/443 ports (especially 22, 3389, 5432, 3306, 27017)
  • publicly_accessible = true on RDS/Redshift/ElastiCache
  • Missing aws_s3_bucket_public_access_block
  • Internet Gateway + route table + public subnet + workload without WAF
  • VPC peering with full CIDR routes (flat network)
  • Security groups using VPC CIDR instead of source security group references
  • Database subnets with NAT/IGW default routes
  • No VPC endpoints for sensitive services (SSM, KMS, S3, ECR)
  • ALB/NLB without WAF association

Storage

  • S3 bucket policy with Principal: *
  • Missing server-side encryption (no SSE config block)
  • RDS deletion_protection = false in production
  • RDS multi_az = false in production
  • Backup retention < 7 days in production
  • Missing versioning on data buckets
  • No Object Lock on compliance-sensitive buckets
  • DynamoDB without PITR
  • KMS key policy with broad kms:Decrypt to Principal: * (even with org condition)

Secrets

  • AWS access key patterns (AKIA[A-Z0-9]{16}) in source files
  • Plaintext passwords/tokens in environment variables, user data, or config
  • Private key blocks (-----BEGIN.*PRIVATE KEY-----)
  • Database connection strings with embedded credentials
  • .env files or terraform.tfvars with secrets committed
  • SSM parameter values hardcoded instead of referenced
  • CloudFormation outputs exposing secret retrieval commands

Logging & Monitoring

  • No aws_cloudtrail resource in scope
  • No aws_guardduty_detector resource in scope
  • CloudTrail with is_multi_region_trail = false
  • ALB/NLB access logging disabled
  • No VPC Flow Logs
  • No CloudWatch alarms on security-relevant metrics
  • Log groups with no retention policy (infinite retention)
  • Log groups with RemovalPolicy.DESTROY in production
  • Missing S3 access logging on sensitive buckets

Serverless

  • Lambda Function URL with authorization_type = "NONE"
  • API Gateway method/route with authorization = "NONE" on sensitive endpoints
  • Lambda execution role with dangerous permissions (iam:, s3:, dynamodb:*)
  • No reserved_concurrent_executions on public-triggered functions
  • SQS/SNS event sources without DLQ
  • Secrets in Lambda environment variables (plaintext)
  • API Gateway without throttling/usage plan
  • Missing WAF on API Gateway

ENVIRONMENT DETECTION

Classify each resource's environment from these signals (highest to lowest confidence):

  1. Explicit tags: Environment=prod
  2. Directory path: envs/prod/, environments/production/
  3. Resource name contains: prod, production, staging, dev
  4. Workspace/provider alias
  5. Config file name: cdc-prod.yaml, production.tfvars

Production findings are always higher severity than dev equivalents.

SEVERITY CALIBRATION

Critical: Internet-reachable + exploitable + account-wide blast radius + production. Example: public Lambda with admin IAM and no auth.

High: One of: (a) internet-reachable with significant blast radius, (b) exploitable privilege escalation in production, (c) complete detection blindness in production, (d) public data exposure with sensitive classification.

Skip Medium/Low/Info in fast mode.

OUTPUT FORMAT

Write iac-scan/fast-results.md:

markdown
# Fast IaC Security Scan Results

**Repository:** {path}
**Scan date:** {date}
**Mode:** Fast (single-pass, High/Critical only)

## Architecture Summary

{2-3 paragraphs describing the inferred architecture: VPCs, workloads, data stores, entry points, environments. State confidence level.}

## Findings

### {FINDING-ID}: {title}

**Severity:** Critical|High
**Confidence:** {0.0-1.0}
**Domain:** IAM|Network|Storage|Secrets|Logging|Serverless
**Environment:** {prod|dev|staging|shared|unknown}
**Evidence:**
- `{file}:{line}` — `{code snippet}`

**Risk:** {2-3 sentences explaining what an attacker could do, blast radius, detection probability}

**Related findings:** {IDs of findings that compound with this one}

---

{repeat for each finding}

## Cross-Domain Risks

{Brief description of how findings combine across domains. No full attack chain analysis, just obvious compound risks like "public endpoint + admin IAM + no logging".}

## Positive Controls

{Bullet list of good security practices observed.}

## Limitations

- Fast mode: Medium/Low/Info findings omitted.
- No deep attack chain correlation.
- SKILL.md definitions not loaded; detection depth is reduced vs full scan.
- Run `Run IaC security scan` for complete coverage.

Then generate iac-scan/fast-report.html — a self-contained HTML report:

  • Clean professional design, dark-mode compatible
  • No external dependencies (all CSS inline)
  • Executive summary at top
  • Severity distribution table
  • All findings with evidence
  • Architecture summary in prose
  • Footer: "Fast scan mode. Run full scan for complete coverage."

常见问题

Iac Fast Scan AI 技能有什么作用?

Single-pass, token-optimized IaC security scan. Covers all 6 domains in one file. Use instead of individual skills when running "Run fast IaC scan".

为什么在 TypingMind 中使用 Iac Fast Scan?

因为您只需安装一次,就能搭配任何模型使用。Iac Fast Scan 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型。您甚至可以在聊天中途切换模型,而不会影响技能的正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Iac Fast Scan?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/senaykt/iac-security-scan-skills/tree/main/.agents/skills/iac-fast-scan。TypingMind 会读取其中的 SKILL.md,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Iac Fast Scan?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Iac Fast Scan 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以将它与 Iac Fast Scan 搭配使用。GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等模型都可以通过您自己的 API 密钥接入 TypingMind。

Iac Fast Scan AI 技能免费吗?

是的。senaykt 已在 GitHub 上根据 MIT 许可证发布了该技能。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇