Releases: projectdiscovery/pd-agent
Releases · projectdiscovery/pd-agent
Release list
v0.2.0
A ground-up overhaul of how pd-agent is built, distributed work, and observed.
This release moves the agent off external scanner binaries and onto embedded Go
SDKs, switches work distribution to NATS JetStream, and adds self-update,
local observability, and adaptive parallelism.
Heads-up — breaking changes. The NATS work-distribution protocol, the
agent_group→agent_networkrename, and the cgo-free / SDK build model are
not backward compatible with v0.1.x agents or servers. Upgrade both sides
together.
Highlights
cgo-free build, scanners embedded as Go SDKs
- pd-agent now builds with
CGO_ENABLED=0and runs naabu, httpx, nuclei, tlsx,
and dnsx in-process via their Go SDKs instead of shelling out to external
binaries. Faster startup, no binary management, single static artifact. - nuclei retest and httpx port-probing now run through the SDK path.
NATS JetStream work distribution
- New JetStream worker pool and chunk consumer with protobuf-defined scan and
enumeration chunks. - Direct router with debug, health-check, and stop handlers.
- NATS auth reworked to JWT callbacks for hot-swap credential rotation.
DoubleAckwithMaxDeliver=1to prevent orphaned unacked messages.- Switched all packages from
encoding/jsontojson-iterator/go.
Self-update (OTA) over NATS RPC
- Agents can update their own binary via an RPC command, with preflight probing
of the new binary, a.oldbackup, and an env var to disable updates. - Agent ID persists across updates; update is skipped when running in a
container or already on the requested version.
Local SQLite observability (agentdb)
- Embedded SQLite database for logs, metrics, and active task tracking.
- Panic capture via recover + direct insert; continuous log drain (no ticker).
- Health-check and debug endpoints read live state from SQLite.
- Defaults to
~/.pd-agent; all timestamps forced to UTC.
Adaptive parallelism
- Resource profiler with platform-specific system probes (Linux/macOS/Windows),
auto-detected concurrency, a resizable semaphore, and a runtime scaler. - Split scan/enumeration semaphores; scan parallelism pinned at
NumCPU.
Prerequisite system
- Auto-installs missing scanner tools and validates the browser at startup.
- Warns when Windows Defender exclusions are missing; passes Windows env vars to
subprocesses soos.TempDirresolves correctly.
Peer discovery & enumeration
- ARP (slow-fashion via OS), NDP IPv6, async pingsweep, and IGMP discovery.
- Internal-IP probability ranking.
- Enumeration ports threaded from the work message through to naabu.
- Support for private templates delivered via chunks.
Diagnostics & metrics
- Diagnostic log collector with upload support.
group-metricsendpoint and Prometheus exporter for HPA-based autoscaling.
Notable fixes
- Strip NUL bytes from RPC responses so Postgres
jsonbcolumns accept them. - Fail-fast when
/inreturns no NATS credentials. - Force UTC on all SQLite timestamps (timezone bug).
- Send
agent_networkon heartbeat and deregister calls.
Build & version
- Version is injected at build time via
-ldflags "-X main.Version=<tag>";
query it withpd-agent -version. - gologger replaced with
slog; GoReleaser pipeline adapted for the cgo-free
build across linux (amd64/arm64), macOS, and Windows.
Upgrade notes
- Upgrade agents and the control plane together — the JetStream protocol and the
agent_group→agent_networkrename break v0.1.x compatibility. - Existing deployments relying on external scanner binaries no longer need them;
the agent is self-contained.
Full changelog: v0.1.1...v0.2.0
v0.1.1
What's Changed
Other Changes
- feat: Add Kubernetes subnet auto-discovery with intelligent CIDR aggregation by @ShubhamRasal in #125
- Headless improvements by @Mzack9999 in #124
Full Changelog: v0.1.0...v0.1.1
v0.1.0
What's Changed
- Initial release
Full Changelog: https://github.com/projectdiscovery/pd-agent/commits/v0.1.0