Zabbix Threat Control transforms Zabbix monitoring into a vulnerability assessment system using the Vulners API. It scans hosts monitored by Zabbix for security vulnerabilities in installed packages and reports them back to Zabbix for centralized monitoring and alerting.
This is a Go reimplementation of the original zabbix-threat-control Python project.
Download the latest binary from the Releases page.
go install github.com/kidoz/zabbix-threat-control-go@latestRPM and DEB packages are available in releases. The package installs as zabbix-threat-control-main and symlinks into /opt/monitoring/zabbix-threat-control/.
ZTC reads its configuration from a YAML or legacy INI file.
- Default path:
/opt/monitoring/zabbix-threat-control/ztc.conf - Example config:
configs/ztc.yaml.example
zabbix:
front_url: "http://zabbix.example.com"
api_user: Admin
api_password: zabbix
vulners:
api_key: YOUR_VULNERS_API_KEY
scan:
min_cvss: 1.0
workers: 4The original Python project's .conf format is supported with limitations. Files with .conf or .ini extensions are auto-detected as INI. Python-only keys (VulnersProxyHost, TrustedZabbixUsers, UseZabbixAgentToFix, SSHUser, LogFile, DebugLevel, etc.) are recognized but silently skipped with a warning. Use ztc migrate-config to convert to the new YAML format.
All settings can be overridden via environment variables with the ZTC_ prefix:
export ZTC_ZABBIX_FRONT_URL=http://zabbix.example.com
export ZTC_VULNERS_API_KEY=your-keyztc migrate-config --input /opt/monitoring/zabbix-threat-control/ztc.conf --output /etc/ztc.yaml# Scan hosts for vulnerabilities and push results to Zabbix
ztc scan
# Scan specific hosts
ztc scan --hosts host1,host2
# Prepare Zabbix (create templates, virtual hosts, dashboard)
ztc prepare
# Fix vulnerabilities on a specific host
ztc fix --host HOST_ID
# Fix vulnerabilities for a specific bulletin
ztc fix --bulletin BULLETIN_ID
# Show version
ztc version
# Migrate legacy config
ztc migrate-configZTC can also run as a Zabbix Agent 2 loadable plugin (ztc-plugin), allowing scan results to be collected directly by the agent.
go build -o ztc-plugin ./cmd/ztc-plugin/The plugin binary is Linux-only (Zabbix Agent 2 requirement).
CLI (ztc)
+-- scanner --> Zabbix API (host/item data)
| Vulners API (vulnerability audit)
| zabbix_sender (push results)
+-- fixer --> Zabbix API (host lookup)
| SSH / zabbix_get (remote execution)
+-- prepare --> Zabbix API (templates, hosts, dashboard)
Requires Go 1.25+. A justfile is provided for common tasks:
# Install dev tools (golangci-lint, gofumpt, govulncheck)
just tools
# Build both binaries
just build
# Run tests
just test
# Run linter
just lint
# Run all quality checks (lint + vet + test)
just check
# Scan dependencies for known vulnerabilities
just vulncheck
# Format code
just fmtgo build -o ztc .
go build -o ztc-plugin ./cmd/ztc-plugin/
go test ./...
go vet ./...
golangci-lint run ./...
govulncheck ./...This project is licensed under the MIT License - see the LICENSE file for details.