CLI 目录 横向对比 FCRS-1.0 标准 /llms.txt
← 返回 CLI 目录

testssl.sh

$ testssl.sh 社区开源 中风险
Dirk Wetter · 浏览器与网页抓取 · GPL-2.0 · macos / linux

testssl.sh 可检测远端 TLS/SSL 服务的支持协议、弱加密套件、证书链及 Heartbleed、ROBOT 等已知漏洞。配合 --quiet --color 0 --jsonfile 可输出无 ANSI 转义符的结构化 JSON 检测报告。

FCRS-1.0 综合评分
81 /100
良好 (Good)
中置信度 (源码/文档)
零摩擦安装命令
brew install testssl
CLI vs MCP 选型建议 仅 CLI 可用

直接从本机网络发起底层 OpenSSL 与自定义 Socket 探测;尚无 MCP 封装能达到同等加密套件检测精度。

Agent 友好度体检单

✓ 原生 JSON 输出
— 字段裁剪
✓ 无头非交互
— 支持 Dry-Run
— 只读模式开关
✓ 支持 NO_COLOR
— 自省/Schema 发现
— 官方 SKILL.md

当前为静态评估(本机尚未安装或尚未运行探针)。可在本地运行 npm run data:probe 并提交 data/probes/ 升级为实测证据。

FCRS-1.0 六维评分拆解

Agent 友好度 19 / 25

支持 --jsonfile、--quiet 与 --color 0 实现稳定自动化,但 JSON 需写入文件(--json 会自动命名文件)而非直接输出到标准输出。

  • Flags --jsonfile, --jsonfile-pretty, --quiet, and --color 0
安全与权限边界 20 / 25

仅执行 TLS 握手探测而不更改远端状态,但全量扫描会对目标主机建立大量连接。

  • Read-only TLS probing; supports scoped checks like -p and -S
安装与运行摩擦 12 / 15

在 macOS 与 Linux 上可通过 Homebrew 和系统包管理器轻松安装,但依赖 Bash/Unix 环境(Windows 需借助 WSL 或 Git Bash)。

  • Available via brew install testssl and Linux distros
能力覆盖与边际价值 14 / 15

单工具即可覆盖完整的 TLS 加密套件、证书链、SNI、STARTTLS 与 CVE 漏洞检测。

  • Tests protocols, ciphers, HSTS, OCSP, and major TLS vulnerabilities
维护与来源背书 8 / 10

在 testssl/testssl.sh 长期维护的经典社区安全工具,采用 GPL-2.0 协议。

  • Established security project with regular cipher/CVE updates
文档与可验证性 8 / 10

提供详尽的 man 手册与 testssl.sh --help,清晰说明输出格式与退出码。

  • Published documentation at https://testssl.sh/doc/

安全边界、鉴权与放权指南

鉴权方式
无需鉴权
凭证存储位置

无需任何凭据或 API 密钥;直接向目标主机发起 TLS 握手探测。

潜在副作用
只读查询 本地写入
费用与配额提示

免费且基于 GPL-2.0 开源的 Bash 脚本,附带预编译 OpenSSL 二进制。

可复制到 CLAUDE.md / AGENTS.md 的安全护栏
# testssl.sh Agent Rules
- Always pass `--quiet --color 0` so output stays free of banners and ANSI escape codes.
- Use `--jsonfile <file>` or `--jsonfile-pretty <file>` for machine parsing.
- Only scan domains or staging endpoints you are authorized to probe.

Agent 高频安全命令配方

只读查询(安全推荐)

扫描 TLS 服务并输出 JSON 报告
testssl.sh --quiet --color 0 --jsonfile tls-report.json example.com:443

关闭启动横幅(--quiet)与 ANSI 颜色(--color 0),并将结构化检测结果写入 tls-report.json。

仅检查协议与服务器默认配置
testssl.sh --quiet --color 0 -p -S example.com

快速只读检查 TLS 协议版本(-p)与服务器证书默认设置(-S)。

核心优势

  • + --quiet --color 0 --jsonfile 可生成干净、结构化的漏洞与加密套件报告。
  • + 零凭据本地运行,具备深入的 STARTTLS 与证书链检测能力。

注意事项与踩坑点

  • ! 默认全量扫描耗时可达 30–90 秒并建立数十次 TLS 连接;快速检查建议使用 -p 或 -S。
  • ! 未在原生 Windows 上提供支持(需 WSL)。

已验证兼容的 Agent 宿主

Claude Code Codex CLI Gemini CLI