Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@hivemagnus/magnus-agent

Latest version: v3.3.5

Overview

Last scanned
24 Nov 2026
Published
24 Nov 2026
npm package Publisher: hivemagnus
0 Stars
0 Forks
58 Versions
11.9K Downloads
TypeScript Repo language

Scan summary

@hivemagnus/magnus-agent was last scanned on 24 Nov 2026 at version 3.3.5. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 58 versions; the latest 5 were published on 24 Nov 2026.
  • Findings: 1 rule fired in version 3.3.5 (1 medium). The score describes this version only.
  • Downloads: 11,884 downloads.

Versions

58 versions published
Versions and the rules that fired in each
VersionPublishedStatus
3.3.5 LATEST 24 Nov 2026 1 rule fired
3.3.4 24 Nov 2026 1 rule fired
3.3.3 24 Nov 2026 1 rule fired
3.3.2 24 Nov 2026 Not shown
3.3.1 24 Nov 2026 Not shown

Rules fired in 3.3.5: 1

Findings

1 Medium

Findings for v3.3.5. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

Encoded string decodes to a command or instruction

An encoded string in the package decodes, without being run, to a shell command, a network call, a code-execution call or an instruction aimed at an AI agent. The content was hidden from a plain read of the code. Encoding has legitimate uses, so the decoded content needs review.

MEDIUM
Checking access…

🔒 Create a free account to see all 1 finding with descriptions and instance counts

The score describes 3.3.5; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

@hivemagnus/magnus-agent

The Magnus node agent. It is a small daemon that runs on each Linux host you manage. It enrolls with a magnus-server Control API, sends heartbeats, and serves authenticated management routes for the server (which HiveXUI, the suite's UI, and the standalone Magnus console call).

The agent is infrastructure, not an LLM runtime. It can manage Hermes Agent, the Codex CLI and Ardent when they are installed on the host. Each of these integrations is optional and stays inert until you configure it.

Features

  • Heartbeat with CPU, memory, disk, network, services, GPU, Docker group services, Wazuh and Tailscale node-key posture.
  • Health checks (/api/v1/health/check) and an unauthenticated readiness probe (/api/v1/ping).
  • Command execution with timeouts, signed results and a durable command ledger.
  • Cron management, including finite managed schedules (see MANAGED_SCHEDULER.md). Nodes upgraded from before 1.1.6 may keep one stale remembered Hermes schedule source per past Hermes run; see Hermes schedule sources remembered before 1.1.6 for the cleanup.
  • File read and write with symlink-resolved path checks. Agent state and secrets can never be read or written through the API.
  • Skill publication, listing and removal, for example from @hivemagnus/magnus-skills.
  • Drift, profiling, trace, workspace, network information and local user routes.
  • Optional OpenTelemetry trace export and journald log forwarding.
  • Optional authenticated UDP discovery of the control node (off by default).

Optional executors:

Executor Routes Active when
Hermes Agent /api/v1/hermes/*, magnus-hermes-sync the hermes CLI is installed for HERMES_USER
Codex CLI /api/v1/codex/* a Codex CLI is found for CODEX_USER
Ardent /api/v1/ardent/* ARDENT_OWNER_USER is set and Ardent is installed
HiveMem credential renewal background a renewal config file and allowlists exist

Requirements

  • Linux with systemd. By default the agent runs as root (privileged mode). You can also run it as an ordinary account with fewer features; see Privileged and unprivileged mode.
  • Node.js ^24.22.3 or ^26.13.1.
  • /usr/bin/flock (util-linux) for command execution.
  • A reachable magnus-server Control API.

Install

sudo npm install --prefix /opt/magnus-agent @hivemagnus/magnus-agent
sudo install -m 0600 /opt/magnus-agent/node_modules/@hivemagnus/magnus-agent/.env.example /opt/magnus-agent/.env

For a quick trial you can also install it globally with npm i -g @hivemagnus/magnus-agent and run magnus-agent --env-file ./agent.env. For production, install it below a stable directory such as /opt/magnus-agent, as shown above. The managed scheduler finds its private .env and state there across upgrades.

Enroll with a magnus-server

  1. In the UI or through the Control API, register the node with the host's FQDN, and issue a one-time enrollment token for it (POST /api/v1/nodes/<nodeId>/enrollment-token, ADMIN).

  2. Edit /opt/magnus-agent/.env:

    CONTROL_API_URL=https://magnus.example.com:4000
    TLS_CERT_PATH=/opt/magnus-agent/certs/agent.crt
    TLS_KEY_PATH=/opt/magnus-agent/certs/agent.key
    NODE_ENV=production

    and enroll the agent once, keeping the token off the process table:

    printf '%s' "$ENROLLMENT_TOKEN" | sudo node node_modules/@hivemagnus/magnus-agent/dist/index.js enroll --token-file -

    From 3.0.0 no shared secret is needed. NODE_MANAGER_SECRET and RESULT_SIGNING_SECRET are only for an explicit (deprecated) NODE_AUTH_MODE=compat.

  3. Validate the configuration, then install the example unit:

    cd /opt/magnus-agent
    sudo node node_modules/@hivemagnus/magnus-agent/dist/index.js check
    sudo cp node_modules/@hivemagnus/magnus-agent/deploy/magnus-agent.service /etc/systemd/system/
    sudo systemctl daemon-reload
    sudo systemctl enable --now magnus-agent
  4. Within a heartbeat interval (30 seconds), the node shows as online on the server.

Use a certificate whose SAN matches the address the server uses to reach the agent. If the Control API uses a private CA, set CONTROL_API_CA_PATH. TLS verification is never disabled.

Privileged and unprivileged mode

MAGNUS_AGENT_PRIVILEGED (default true) selects the mode.

  • Privileged (true): the agent runs as root and every feature is available. If the process is not root, startup fails with a clear message, and so does magnus-agent check. The agent never half-runs as a normal user and never escalates through sudo. Use deploy/magnus-agent.service.
  • Unprivileged (false): the agent runs as an ordinary account, such as a dedicated magnus-agent user. The features below are switched off at startup. Their routes answer 403 with error code AGENT_NOT_PRIVILEGED, and magnus-agent check lists them as disabled. Use deploy/magnus-agent-unprivileged.service, which also applies systemd hardening. Run the listener on a port above 1023 and make sure the TLS key is readable by that account.
Feature Needs privileged mode Unprivileged behaviour
Heartbeat, health, drift, profiling, traces, network info no available
Command execution (/api/v1/commands) no runs as the agent's account
File read/write (/api/v1/files) no limited to what the account may access
Skill publication (/api/v1/skills) no into a skills dir the account owns
Workspace routes no below MAGNUS_AGENT_WORKSPACE_ROOT
Hermes Agent and Codex CLI management no for the agent's own account only
Cron and managed schedules (/api/v1/cron/*) yes 403 AGENT_NOT_PRIVILEGED
Local users and passwords (/api/v1/users/*) yes 403 AGENT_NOT_PRIVILEGED
Automatic system updates (POST /api/v1/health/system-updates/enable) yes 403 AGENT_NOT_PRIVILEGED
Docker group remediation (heartbeat) yes membership is reported, never changed
Ardent management (POST /api/v1/ardent/action) yes 403 AGENT_NOT_PRIVILEGED; state stays readable
HiveMem credential and certificate renewal yes not started
Execution supervisor (MAGNUS_EXECUTION_SUPERVISOR_ENABLED) yes configuration error if enabled

Upgrades

Run sudo magnus-agent install-service (add --unprivileged for the ordinary-account mode) once per node. It does four things:

  • moves the install into /opt/magnus-agent/versions/<X>
  • links ./current
  • installs the upgrade launcher (launcher/launcher.mjs)
  • writes the systemd unit

--dry-run prints the steps first.

After that, the server can upgrade the agent from the console's Upgrade agents action or with magnus-server agents upgrade, in four steps:

  1. The agent downloads the exact version the server names and checks its npm sha512 integrity. It also runs npm audit signatures (MAGNUS_AGENT_UPGRADE_REQUIRE_PROVENANCE).
  2. It installs that version beside the running one and checks that it runs on this Node.js (engines), works with the installed launcher, and reports the requested version. Then it points ./current at it and exits.
  3. The launcher starts the new version on trial.
  4. If the new version does not report an accepted heartbeat within MAGNUS_AGENT_UPGRADE_CONFIRM_SECONDS (default 180), or crashes twice, the launcher switches back to the previous version. A new version that runs but cannot reach the control API gets up to three windows, and the revert reason then says so.

Every step has a time limit, and the whole upgrade stops after 13 minutes (SELF_UPGRADE_TIMEOUT). npm, its lifecycle scripts and the smoke test run without the agent's credentials. The agent uses MAGNUS_AGENT_NPM when set, otherwise the npm that ships with the Node.js it runs on, then npm on PATH. A retried request with the same requestId returns the current state instead of an error.

The state file (upgrade-state.json) and the links are written durably (fsync and rename), and the agent and the launcher lock the state file while they change it. ./last-good points at the last confirmed version. The launcher switches to it when versions/<from> is missing, and when the state file is unreadable and ./current keeps exiting. When a write fails (full or read-only disk), the launcher logs it and still starts an agent instead of crash-looping.

A confirmed version installs its own launcher/launcher.mjs when that declares a higher LAUNCHER_PROTOCOL and passes a self-check; the old file is kept as launcher.mjs.previous. In the --unprivileged mode, launcher/ stays owned by root, so the launcher is updated only by install-service. A release that needs a newer launcher than the node runs is refused with SELF_UPGRADE_LAUNCHER.

The agent writes only inside its install directory and never uses sudo. Set MAGNUS_AGENT_SELF_UPGRADE=false to refuse upgrade requests on a node. Offline nodes can install from local tarballs with MAGNUS_AGENT_UPGRADE_SOURCE_DIR. See UPGRADING.md.

CLI

magnus-agent [start] [--env-file <path>]          Start the agent (default)
magnus-agent check [--json] [--env-file <path>]   Validate configuration without starting
magnus-agent acceptance [--json] [--wait-seconds 60]  Verify native health and recent accepted heartbeat
magnus-agent env-schema                           Print the configuration schema as JSON
magnus-agent install-service [--unprivileged]     (root, once) Versioned layout, upgrade launcher and systemd unit
magnus-agent enroll --token <token>               Bind a new node key with a one-time enrollment token
magnus-agent enroll --token-file <path|->         The same, reading the token from a file or standard input (-)
magnus-agent identity show [--json]               Print this node's id and key fingerprints (never the key)
magnus-agent identity rotate                      Replace the node key (signed with the key it replaces)
magnus-agent identity reset                       Remove the node key and return to the shared node secret
magnus-agent historical-settlements list [--json] [--check]
                                                  How each stored historical-mutation settlement verifies
magnus-agent historical-settlements reseal [--apply]
                                                  (root) Re-MAC settlements signed with a shared key with the node-local keys
magnus-agent historical-settlements prune --unverifiable [--with-records] [--apply]
                                                  (root) Archive settlements no key of this agent verifies
magnus-agent native-snapshot inspect --json       (root) Discover managed native profile storage
magnus-agent native-snapshot ACTION --request-file -
                                                  (root) Quiesce, capture, verify, restore or resume a stopped snapshot
magnus-agent --help | --version

identity reset is only useful under an explicit (deprecated) NODE_AUTH_MODE=compat on both sides; see rollback.

Variables already set in the environment win over --env-file, which may be repeated (an earlier file wins). The agent also reads $AGENT_INSTALL_DIR/.env (default ./.env). The historical-settlements commands are how an agent stops needing COMMAND_RECONCILIATION_SECRET; see Retiring the shared keys.

Configuration

.env.example groups every key into Required and Optional, and magnus-agent env-schema prints them as JSON.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @hivemagnus/magnus-agent

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Ethersphere Hijacked With Crypto Stealing Malware (1)
npm

Ethersphere Hijacked With Crypto Stealing Malware Via Github & npm

CVE

Java4Shell (CVE-2026-114938): Easy to Crash, Hard to Exploit — Less Than 0.12% of JVMs Estimated at Risk of RCE

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

Frame 2085668439 (1)
Group 1261154229