项目简介
An open-source project in Golang to asess different API Security tools and WAF for detection logic and bypasses

- 项目地址:wallarm/gotestwaf
- Stars:1816
- 主语言:Go
- 主题标签:
#api-security#bugbounty#graphql-security#grpc-security#owasp#rest-security#security#security-testing
基本使用
克隆仓库后阅读 README 文档,按照项目说明进行配置和运行。本项目开源免费,欢迎 Star 和贡献代码。
注意事项
- 请前往项目主页查看最新版本和文档
- 部分项目需要配合 API Key 或配置文件使用
- 建议在隔离环境中测试后再部署到生产环境
本文由自动化整理发布,项目信息来自 GitHub。如有疑问请参考项目官方文档。
安装部署(实操步骤)
1. 前置准备
- 项目仓库:wallarm/gotestwaf(https://github.com/wallarm/gotestwaf)
- 需要本机具备 Git;按项目语言准备对应运行时(Python / Node.js / Go / Java 等)
- 建议先在本机或测试服务器上跑通,再部署到生产环境
- 遇到依赖版本问题时,以仓库 README 与 Releases 说明为准
2. 官方安装 / 启动命令(摘自项目 README,可直接复制执行)
The report file `waf-evaluation-report-<date>.pdf` is available in the `reports` folder of the user directory. You can also specify the directory to save the reports with the `reportPath` parameter and the name of the report file with the `reportName` parameter. To learn advanced configuration options, please use this [link](#configuration-options).
You can found an example of PDF report [here](./docs/report_example.pdf).

## Demos
You can try GoTestWAF by running the demo environment that deploys NGINX‑based [ModSecurity using OWASP Core Rule Set](https://hub.docker.com/r/owasp/modsecurity-crs)
and GoTestWAF evaluating ModSecurity on Docker.
To run the demo environment:
1. Clone this repository and go to the cloned directory:
2. Start ModSecurity from the [Docker image](https://hub.docker.com/r/owasp/modsecurity-crs/) by using the following `make` command:
Settings for running the ModSecurity Docker container are defined in the rule `modsec` of the cloned Makefile. It runs the ModSecurity Docker container on port 8080 with minimal configuration defined in the cloned file `./resources/default.conf.template` and the `PARANOIA` value set to 1.
If required, you can change these settings by editing the rule `modsec` in the cloned Makefile. Available options for ModSecurity configuration are described on [Docker Hub](https://hub.docker.com/r/owasp/modsecurity-crs/).
To stop ModSecurity containers use the following command:
3. Start GoTestWAF with minimal configuration by using one of the following methods:
Start the [Docker image](https://hub.docker.com/r/wallarm/gotestwaf) by using the following `docker pull` and `docker run` commands:
Build the GoTestWAF Docker image from the [Dockerfile](./Dockerfile) and run the
image by using the following `make` commands (make sure ModSec is running on port 8080; if not, update the port value in the Makefile):
3. 部署流程
- 克隆仓库:
git clone https://github.com/wallarm/gotestwaf - 进入目录后按上面的官方命令安装依赖
- 参考 README 的配置说明填写配置文件或环境变量
- 按官方说明启动服务,确认监听端口与访问地址
- 浏览器访问验证功能,确认无报错后再开放外网
4. 常见问题排查
- 依赖安装失败:先升级包管理器,再确认运行时版本符合 README 要求
- 启动报端口占用:修改配置中的端口或释放被占用端口
- 页面打不开:检查防火墙 / 安全组是否放行对应端口
- 功能异常:查看运行日志,对照 Issues 中同类问题处理