Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
cfripper — 用于分析 CloudFormation 模板并检查其安全合规性的库和 CLI 工具。 | Kitploit
工具/GitHubGitHub/skyscanner/cfripper
云基础设施安全静态分析配置审计云安全错误配置
GitHubskyscanner/cfripper

cfripper

用于分析 CloudFormation 模板并检查其安全合规性的库和 CLI 工具。

查看仓库
414572天前Kitploit 审核通过

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享
网站

cfripper 标识

CFRipper

构建状态 PyPI 版本 homebrew 版本 许可证

CFRipper 是一个用于 AWS CloudFormation 模板的库和 CLI 安全分析器。您可以使用 CFRipper 来防止将不安全的 AWS 资源部署到您的云环境中。您可以通过添加新的自定义插件来编写自己的合规性检查。

文档及更多详情请访问 https://cfripper.readthedocs.io/

CLI 用法

常规执行

root@kitploit:~
$ cfripper /tmp/root.yaml /tmp/root_bypass.json --format txt
Analysing /tmp/root.yaml...
Not adding CrossAccountTrustRule failure in rootRole because no AWS Account ID was found in the config.
Valid: False
Issues found:
 - FullWildcardPrincipalRule: rootRole should not allow full wildcard '*', or wildcard in account ID like 'arn:aws:iam::*:12345' at '*'
 - IAMRolesOverprivilegedRule: Role 'rootRole' contains an insecure permission '*' in policy 'root'
Analysing /tmp/root_bypass.json...
Valid: True

使用 "resolve" 标志

root@kitploit:~
$ cfripper /tmp/root.yaml /tmp/root_bypass.json --format txt --resolve
Analysing /tmp/root.yaml...
Not adding CrossAccountTrustRule failure in rootRole because no AWS Account ID was found in the config.
Valid: False
Issues found:
 - FullWildcardPrincipalRule: rootRole should not allow full wildcard '*', or wildcard in account ID like 'arn:aws:iam::*:12345' at '*'
 - IAMRolesOverprivilegedRule: Role 'rootRole' contains an insecure permission '*' in policy 'root'
Analysing /tmp/root_bypass.json...
Not adding CrossAccountTrustRule failure in rootRole because no AWS Account ID was found in the config.
Valid: False
Issues found:
 - IAMRolesOverprivilegedRule: Role 'rootRole' contains an insecure permission '*' in policy 'root'
Monitored issues found:
 - PartialWildcardPrincipalRule: rootRole contains an unknown principal: 123456789012
 - PartialWildcardPrincipalRule: rootRole should not allow wildcard, account-wide or root in resource-id like 'arn:aws:iam::12345:root' at 'arn:aws:iam::123456789012:root'

使用 json 格式和输出文件夹参数

root@kitploit:~
$ cfripper /tmp/root.yaml /tmp/root_bypass.json --format json --resolve --output-folder /tmp
Analysing /tmp/root.yaml...
Not adding CrossAccountTrustRule failure in rootRole because no AWS Account ID was found in the config.
Result saved in /tmp/root.yaml.cfripper.results.json
Analysing /tmp/root_bypass.json...
Not adding CrossAccountTrustRule failure in rootRole because no AWS Account ID was found in the config.
Result saved in /tmp/root_bypass.json.cfripper.results.json

使用规则配置文件

root@kitploit:~
$ cfripper tests/test_templates/config/security_group_firehose_ips.json --rules-config-file cfripper/config/rule_configs/example_rules_config_for_cli.py
Analysing tests/test_templates/config/security_group_firehose_ips.json...
Valid: True

使用规则过滤器文件

root@kitploit:~
$ cfripper tests/test_templates/config/security_group_firehose_ips.json --rules-filters-folder cfripper/config/rule_configs/
example_rules_config_for_cli.py loaded
Analysing tests/test_templates/config/security_group_firehose_ips.json...
Valid: True

退出代码

root@kitploit:~
"""
分析通过参数传入的 AWS CloudFormation 模板。
退出代码:
  - 0 = 所有模板有效且成功扫描
  - 1 = 扫描至少一个模板时出错/出现问题
  - 2 = 至少一个模板不符合 CFRipper 要求(模板已成功扫描)
  - 3 = 扫描模板时出现未知/未处理的异常
"""

开发

前提条件

本项目使用 uv 进行依赖管理。按以下方式安装:

root@kitploit:~
# macOS
brew install uv

# Linux/macOS
curl -LsSf https://astral.sh/uv/install.sh | sh

# Windows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

设置

root@kitploit:~
# 安装开发依赖
make install-dev

# 运行测试(lint + 单元测试)
make test

# 运行 linter
make lint

# 格式化代码
make format

# 更改依赖后更新锁定文件
make lock
下载工具