Dependency-free TLS inspection CLI for protocols, ciphers, certificates, JSON/Markdown reports, and CI policy checks.
翻译准备中
正在加载完整 README。
查看完整 README ↗tlsanalyzer is a small, dependency-free TLS inspection CLI inspired by sslscan.
It is built for environments where the scanner should be easy to carry, easy to audit and able to run without installing extra packages or fetching runtime dependencies.
tlsanalyzer is in beta-readiness review on the v0.31.x line. Feature growth is paused for now; patch releases are limited to bug fixes, documentation updates and compatibility-preserving hardening while the project gathers real-world usage before a future beta/v1 decision.
External feedback is welcome, especially endpoint compatibility reports, policy false positives/negatives, JSON automation issues and installation or release-verification problems. See Feedback and compatibility reports for useful commands and what to include.
Download a binary from the GitHub releases page, then run:
tlsanalyzer --host example.com
Common examples:
tlsanalyzer --host example.com --min-version 1.2
tlsanalyzer --host example.com --json
tlsanalyzer --host example.com --markdown example.com.md
tlsanalyzer --host example.com --policy modern --sarif tls.sarif --junit tls.xml
tlsanalyzer --host example.com --policy modern
tlsanalyzer --config tlsanalyzer.json --target production --profile modern-ci
tlsanalyzer --targets-file targets.json --concurrency 4 --retries 2 --json
tlsanalyzer --host example.com --require-tls 1.3 --forbid-tls 1.0,1.1 --min-cert-days 30
tlsanalyzer --host example.com --compact
tlsanalyzer --host example.com --cert --output example.pem
tlsanalyzer --host 203.0.113.10 --sni example.com
tlsanalyzer --version
Exit codes are stable for CI: 0 means success, 1 means input/runtime/report failure, 2 means CLI flag parsing failed and 3 means enabled policy checks failed. Single-target input validation reports all detected input errors in one run. Certificate policy checks fail when validation is invalid, skipped or unavailable.
The analyzer package exposes the same single-target scan orchestration used by the CLI:
opts := analyzer.DefaultOptions("example.com")
opts.MinVersion = tls.VersionTLS12
opts.PolicyConfig = policy.Config{Name: policy.NameModern}
result, err := analyzer.Run(opts, analyzer.Hooks{})
if err != nil {
var hookErr *analyzer.HookError
if errors.As(err, &hookErr) {
// A caller-provided hook failed.
}
}
Operational scan failures are returned as structured scan.TLSScanResult statuses such as network_error, timeout and handshake_error. analyzer.Run returns an error only when caller-provided hooks fail.
The tlsprobe package exposes the preview raw TLS 1.3 cipher probe used by the scanner:
results, err := tlsprobe.ProbeTLS13CipherSuites(context.Background(), tlsprobe.Options{
Address: net.JoinHostPort("example.com", "443"),
ServerName: "example.com",
Timeout: 5 * time.Second,
}, tlsprobe.SupportedTLS13CipherSuites())
tlsprobe is ClientHello-only evidence and does not complete full TLS handshakes. See the TLS probe package documentation for status semantics and current limits.
Requirements:
CGO_ENABLED=0 go build -v -ldflags="-X 'github.com/olelbis/tlsanalyzer/build.Version=$(cat VERSION)' -X 'github.com/olelbis/tlsanalyzer/build.BuildUser=Team tlsanalyzer' -X 'github.com/olelbis/tlsanalyzer/build.BuildTime=$(date -u +%Y-%m-%dT%H:%M:%SZ)'" -o tlsanalyzer .
Or use the build script:
./scripts/build.sh
./scripts/build.sh --all
以上为 README 的开头部分。其余内容请阅读原文。 查看完整 README ↗