
!https://raw.githubusercontent.com/kubeshop/testkube/main/assets/testkube-color-gray.png
TestKube ZAP执行器是一款测试执行器,用于在TestKube中运行ZED***代理(ZAP)扫描,帮助用户在TestKube环境中便捷地进行Web应用安全测试。
zap/api(API扫描)、zap/baseline(基线扫描)、zap/full(全面扫描)TestKube默认已集成ZAP执行器。如需手动构建和部署,执行以下命令:
bashkubectl apply -f examples/zap-executor.yaml
通过本地文件创建测试
bash# 创建API扫描测试 kubectl testkube create test --file contrib/executor/zap/examples/zap-tk-api.yaml --type "zap/api" --name api-test --copy-files contrib/executor/zap/examples/zap-tk-api.conf:zap-tk-api.conf # 运行API扫描测试并监控 kubectl testkube run test --watch api-test # 创建基线扫描测试 kubectl testkube create test --file contrib/executor/zap/examples/zap-tk-baseline.yaml --type "zap/baseline" --name baseline-test --copy-files contrib/executor/zap/examples/zap-tk-baseline.conf:zap-tk-baseline.conf # 运行基线扫描测试并监控 kubectl testkube run test --watch baseline-test # 创建全面扫描测试 kubectl testkube create test --file contrib/executor/zap/examples/zap-tk-full.yaml --type "zap/full" --name full-test --copy-files contrib/executor/zap/examples/zap-tk-full.conf:zap-tk-full.conf # 运行全面扫描测试并监控 kubectl testkube run test --watch full-test
通过Git仓库创建测试
bash# 从Git仓库创建API扫描测试 kubectl testkube create test --git-uri https://github.com/kubeshop/testkube.git --type "zap/api" --name git-api-test --executor-args "zap-api.yaml" --git-branch main --git-path contrib/executor/zap/examples # 运行Git仓库API扫描测试并监控 kubectl testkube run test --watch git-api-test # 从Git仓库创建基线扫描测试 kubectl testkube create test --git-uri https://github.com/kubeshop/testkube.git --type "zap/baseline" --name git-baseline-test --executor-args "zap-baseline.yaml" --git-branch main --git-path contrib/executor/zap/examples # 运行Git仓库基线扫描测试并监控 kubectl testkube run test --watch git-baseline-test # 从Git仓库创建全面扫描测试 kubectl testkube create test --git-uri https://github.com/kubeshop/testkube.git --type "zap/full" --name git-full-test --executor-args "zap-full.yaml" --git-branch main --git-path contrib/executor/zap/examples # 运行Git仓库全面扫描测试并监控 kubectl testkube run test --watch full-test-git
ZAP扫描参数通过YAML配置文件定义,示例如下:
yamlapi: # -t 目标API定义地址 target: https://www.example.com/openapi.json # -f API格式,支持openapi、soap或graphql format: openapi # -O 覆盖远程OpenAPI规范中的主机名 hostname: https://www.example.com # -S 安全模式,跳过主动扫描仅执行基线扫描 safe: true # -c 配置文件路径 config: examples/zap-api.conf # -d 显示调试信息 debug: true # -s 简短输出模式 short: false # -l 显示的最低级别:PASS、IGNORE、INFO、WARN或FAIL level: INFO # -c 上下文文件路径 context: examples/context.config # 用于认证扫描的用户名 user: anonymous # 被动扫描等待延迟(秒) delay: 5 # ZAP启动和被动扫描的最大等待时间(分钟) time: 60 # ZAP命令行选项 zap_options: -config aaa=bbb # -I 是否在警告时使ZAP扫描失败 fail_on_warn: false
请通过https://github.com/kubeshop/testkube/issues%E6%8A%A5%E5%91%8A%E6%89%80%E6%9C%89%E9%97%AE%E9%A2%98%E3%80%82
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。




探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
无需登录使用专属域名
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
Harbor Proxy Repository 对接专属域名
Portainer Registries 加速拉取
Nexus3 Docker Proxy 内网缓存
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
docker search 限制
站内搜不到镜像
离线 save/load
插件要用 plugin install
WSL 拉取慢
安全与 digest
新手拉取配置
镜像合规机制
manifest unknown
no matching manifest(架构)
invalid tar header(解压)
TLS 证书失败
DNS 超时
域名连通性排查
410 Gone 排查
402 与流量用尽
401 认证失败
429 限流
D-Bus 凭证提示
413 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务