Skip to content

Releases: projectdiscovery/pd-agent

v0.2.0

Choose a tag to compare

@ShubhamRasal ShubhamRasal released this 01 Jun 08:50

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_groupagent_network rename, 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=0 and 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.
  • DoubleAck with MaxDeliver=1 to prevent orphaned unacked messages.
  • Switched all packages from encoding/json to json-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 .old backup, 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 so os.TempDir resolves 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-metrics endpoint and Prometheus exporter for HPA-based autoscaling.

Notable fixes

  • Strip NUL bytes from RPC responses so Postgres jsonb columns accept them.
  • Fail-fast when /in returns no NATS credentials.
  • Force UTC on all SQLite timestamps (timezone bug).
  • Send agent_network on heartbeat and deregister calls.

Build & version

  • Version is injected at build time via -ldflags "-X main.Version=<tag>";
    query it with pd-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_groupagent_network rename 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

Choose a tag to compare

@ehsandeep ehsandeep released this 24 Nov 15:44
bd94ab2

What's Changed

Other Changes

Full Changelog: v0.1.0...v0.1.1

v0.1.0

Choose a tag to compare

@ehsandeep ehsandeep released this 19 Nov 20:45

What's Changed

  • Initial release

Full Changelog: https://github.com/projectdiscovery/pd-agent/commits/v0.1.0