Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/hive-priv/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas fdb847cd87 hive-priv: stop run_forge_admin's bail! from reproducing --password
The comment above the bail! named the gap itself: stderr went through
redact_secret_line, but args.join(" ") did not. hive-c0re passes a
live --password value as an argument on user create and
change-password, so any non-zero forgejo admin exit put the plaintext
password in the error string, and from there into hive-c0re's warn!
log (journal + VictoriaLogs) and hivectl's returned error.

Add describe_forge_admin, a pure function that names the invocation by
its leading verb path and stops at the first flag, same approach as
hive-c0re's own describe_forge_admin (forge/mod.rs, from #2936) and
for the same reason: the verbs are a closed set this crate chooses,
argument values never are, so an allowlist over shape excludes any
future secret-bearing flag by construction instead of by someone
remembering to redact its value.

Unit tests cover: a --password value dropped, the --password=value
form also dropped (it starts with '-', so the take_while excludes the
whole argument), and a control that the verb path still appears.
Closes #4670.
2026-09-24 14:45:51 +02:00
..
main.rs hive-priv: stop run_forge_admin's bail! from reproducing --password 2026-09-24 14:45:51 +02:00