hyperhive/hive-c0re/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas 44572d1e1a fix(#2911): keep the forge token out of argv
`forge_git_url` spliced `core:<token>@` between scheme and authority, and
that URL is a process argument. `/proc/<pid>/cmdline` is mode 0444 —
world-readable — so the core admin token, which provisions every agent's
forge account, was published to any local user for the lifetime of each
git child. Seven call sites built such a URL.

The credential now travels in the environment instead:
`git_command_authed` sets `http.extraHeader` via `GIT_CONFIG_*`, which
git reads exactly like a config file, and `/proc/<pid>/environ` is 0400 —
owner-only. Same credential, materially smaller audience. The remote is a
plain `http://forge/<org>/<repo>.git`, and `forge_git_url` no longer takes
a token, so the old shape cannot be rebuilt by accident.

`knowledge`'s clone was the one place a credentialed URL was stored as a
named remote — git persists the clone URL into `.git/config`, so the
token sat on disk and every later `pull` authenticated from there. That
is the case `forge::repos::push_config` documents as forbidden ("the
tokenised URL ... deliberately never stored as a named remote"). `pull`
now rewrites `origin` to the plain URL first, which also scrubs the
persisted token from existing deployments, and authenticates from the
environment when a token is available. The repo is public, so the pull
still works without one.

Three call sites also stopped spawning `Command::new("git")` directly,
so they honour the `HYPERHIVE_GIT` path the NixOS module bakes in and
the `kill_on_drop` every other git spawn gets.

The two URL-shape tests now assert the *absence* of a credential, and a
new one decodes the header back to `core:<token>` — without that, a
malformed header would leave every forge operation silently anonymous
with the other assertions still green.
2026-08-02 13:21:42 +02:00
..
agent_config feat: derive BUN_JSC_forceRAMSize from effective per-agent MemoryMax= 2026-07-26 21:56:25 +02:00
dashboard knowledge: ping every agent when internal/knowledge changes 2026-08-02 03:10:06 +02:00
forge fix(#2911): keep the forge token out of argv 2026-08-02 13:21:42 +02:00
job_queue hive-c0re: finish chrono-clock migration 2026-08-02 02:12:19 +02:00
lifecycle fix(#2911): keep the forge token out of argv 2026-08-02 13:21:42 +02:00
socket_server hive-c0re: finish chrono-clock migration 2026-08-02 02:12:19 +02:00
stats hive-c0re: finish chrono-clock migration 2026-08-02 02:12:19 +02:00
stores hive-c0re: finish chrono-clock migration 2026-08-02 02:12:19 +02:00
workers fix(#2911): keep the forge token out of argv 2026-08-02 13:21:42 +02:00
actions.rs hive-sh4re: delete now_unix(), the migration's last call sites are gone 2026-08-02 02:12:19 +02:00
container_view.rs resource_limits: read the override map once per SSE scan 2026-07-26 14:56:36 +02:00
coordinator.rs docs(#2815): fix suppress_crash_watch's stale doc comment 2026-08-01 19:13:50 +02:00
dashboard_events.rs refactor(#2815): derive the transient pill from the running node 2026-08-01 16:06:06 +02:00
gateway_nginx.rs sweep: wire gateway-nginx reload + config-repo branch-protection into warning banners 2026-07-16 00:05:29 +02:00
loose_ends.rs hive-c0re: finish chrono-clock migration 2026-08-02 02:12:19 +02:00
main.rs knowledge: ping every agent when internal/knowledge changes 2026-08-02 03:10:06 +02:00
matrix.rs refactor(#2302): type socket wire fields as ident, validated by serde on deserialize 2026-07-20 21:46:18 +02:00
meta.rs fix(#2898): carry hive/swarm display names as build-time options 2026-08-01 12:35:50 +02:00
migrate.rs refactor(#2916): drop the two obsolete startup migrations 2026-08-02 01:41:37 +02:00
paths.rs refactor(#2916): drop the two obsolete startup migrations 2026-08-02 01:41:37 +02:00
priv_client.rs feat(#2862): push a snapshot to a peer hive's store over the mesh 2026-07-31 22:15:37 +02:00
questions.rs delete c0re-side reminder plumbing (#2635 inc 1 commit 6) 2026-07-23 00:12:30 +02:00
server.rs refactor(#2862): one snapshot store per swarm, not one per peer 2026-07-31 22:15:37 +02:00
snapshot_push.rs refactor(#2862): one snapshot store per swarm, not one per peer 2026-07-31 22:15:37 +02:00
webhook_secret.rs chore(#2510): bump indicatif/tower-http/hmac/sha2 to latest majors 2026-07-16 10:42:30 +02:00