Repository navigation
docs: add security policy with hardening principles - #186
Conversation
0efab16 to
790eeff
Compare
RonDeBanc
left a comment
There was a problem hiding this comment.
Review: APPROVE
A thorough, well-structured plan. I spot-checked the findings against the current default branch and they hold up:
joinmarket ALL=(ALL) NOPASSWD:ALLinbuild_joininbox.sh— confirmed (finding #1)./dev/shmchmod 0777 and predictable/dev/shm/.pw— confirmed (finding #7).sudo rm -f /dev/shm/*inmenu.quickstart.sh— confirmed (finding #11).verify.git.shnever applied to JoininBox self-updates — confirmed (finding #3), and #190 now addresses it.- The finding ↔ PR cross-references all match reality (#187–#195 cover #2–#11 as listed).
Notes (non-blocking):
- SECURITY.md's "only the latest release is supported" is a policy commitment the maintainer should explicitly sign off on — it sets backporting expectations.
- The honest scoping in "Review scope and limitations" (no ShellCheck/Semgrep in the review env) is appreciated; the repo's
test-shellcheck.ymlworkflow can close that gap once these PRs land. - Finding #1 (unrestricted sudo) is correctly identified as the keystone issue. Agree it needs hardware-tested design before a PR.
Good foundation document — the staged rollout order (break the root-escalation chain first) is the right priority.
Reviewed by Ron DeBanc (Hermes Agent)
10dd94c to
82d7358
Compare
Secrets passed as argv leak via 'ps', shell history and systemd-cgtop.
- refuse any non-help argument with an explanatory error
- passwords are only collected interactively: dialog --passwordbox
as before, with a 'read -s' fallback (with confirmation) when
dialog is unavailable or stdout is not a TTY
- allow independent credentials per account ('joinmarket', 'root',
and 'pi' if present); reusing one password for all accounts is
now an explicit user choice
- keep the mktemp temp-file in /dev/shm (mode 600) with the
cleanup trap; clear it after every read
Fixes finding openoms#8 from SECURITY-HARDENING.md (see PR openoms#186).
Re-verified all findings against the current default branch (16fc83f): - all 9 original findings still present - new: eval-based argument parsing in install.joinmarket.sh (openoms#10) - new: root wildcard deletion in /dev/shm in menu.quickstart.sh (openoms#11) - minor: deprecated apt-key, builder-key import hygiene Map findings to implementation PRs openoms#187-openoms#190 with per-finding status. Add SECURITY.md with private vulnerability reporting, scope, supported-version policy, and coordinated disclosure.
… statuses New implementation PRs: - openoms#191 finding openoms#11 (root wildcard rm in /dev/shm) - openoms#192 finding openoms#8 (passwords via argv) - openoms#193 finding openoms#5 (shared default password) - openoms#194 finding openoms#10 (eval-based arg parsing) - openoms#195 finding openoms#2 (sourcing joinin.conf as code) Only finding openoms#1 (unrestricted sudo) remains without a PR — it needs the root-owned helper redesign tested on hardware first.
82d7358 to
135e7f2
Compare
Secrets passed as argv leak via 'ps', shell history and systemd-cgtop.
- refuse any non-help argument with an explanatory error
- passwords are only collected interactively: dialog --passwordbox
as before, with a 'read -s' fallback (with confirmation) when
dialog is unavailable or stdout is not a TTY
- allow independent credentials per account ('joinmarket', 'root',
and 'pi' if present); reusing one password for all accounts is
now an explicit user choice
- keep the mktemp temp-file in /dev/shm (mode 600) with the
cleanup trap; clear it after every read
Fixes finding openoms#8 from SECURITY-HARDENING.md (see PR openoms#186).
* security: stop accepting passwords as command-line arguments
Secrets passed as argv leak via 'ps', shell history and systemd-cgtop.
- refuse any non-help argument with an explanatory error
- passwords are only collected interactively: dialog --passwordbox
as before, with a 'read -s' fallback (with confirmation) when
dialog is unavailable or stdout is not a TTY
- allow independent credentials per account ('joinmarket', 'root',
and 'pi' if present); reusing one password for all accounts is
now an explicit user choice
- keep the mktemp temp-file in /dev/shm (mode 600) with the
cleanup trap; clear it after every read
Fixes finding #8 from SECURITY-HARDENING.md (see PR #186).
* test: cover interactive password handling
* fix: cancel password prompt cleanly on EOF
---------
Co-authored-by: autoblitzbot <autoblitzbot@users.noreply.github.com>
The staged hardening plan in SECURITY-HARDENING.md has been implemented through PRs openoms#187-openoms#195 (finding openoms#1's scoped-helper migration is tracked separately), so the standalone plan document is removed. SECURITY.md now carries the durable content: the threat model, the design principles the codebase follows (least privilege, config-as-data, fail-closed authenticity, secret handling, boundary validation, unique first-boot credentials, defense in depth, safe failure), and the review methods and regression expectations for future security work.
RonDeBanc
left a comment
There was a problem hiding this comment.
Re-review of bf78ef973 — REQUEST CHANGES
Folding durable guidance into SECURITY.md and dropping the staging plan is the right direction. The scope, threat model, and disclosure structure are good. However, the document currently presents several target-state controls as guarantees the codebase already follows, and its primary confidential reporting route is disabled. These are blocking accuracy defects for a security policy.
1. The documented private reporting route is disabled
The policy directs reporters to GitHub private vulnerability reporting, but GitHub’s API currently returns:
{"enabled": false}for openoms/joininbox. The fallback points to the maintainer profile, which publishes no email address. Please enable private vulnerability reporting or provide a verified confidential contact before merging.
2. “The codebase follows these principles” overstates current implementation
Verified against current master:
- Least privilege:
build_joininbox.shand image sudoers still grantjoinmarket ALL=(ALL) NOPASSWD:ALL; no scoped/etc/sudoers.d/joininboxhelper migration exists. The later limitation acknowledges this, directly contradicting the earlier guarantee. - Configuration:
sourceConf()rejects malformed lines and dangerous metacharacters, but accepts arbitrary syntactically valid keys, permits duplicate keys with last-value-wins behavior, and performs no type validation./etc/joininbox/does not exist and configuration writes are not uniformly atomic. - Authenticity: #190 verifies before installation, but
verify.git.shimports keys into the user’s default GnuPG home—there is no temporaryGNUPGHOMEor--homedir. PR test mode is consent-gated, but remains able to execute code that can use unrestricted sudo. - Secrets: argv passwords and predictable temp files are fixed, but there is no
LoadCredential=use or private0700runtime directory; wallet credentials use mode-0600mktempfiles directly in shared/dev/shm. - Trust-boundary details: Tor installs
/etc/tor/torrc, not a dedicated file under/etc/tor/torrc.d/; interpolated/bin/sh -cusage remains, albeit with validation in the hardened wallet path. - First boot: #193 is still open. Current
masterstill assigns the sharedjoininboxpassword toroot,joinmarket, and optionalpi; SSH is not blocked pending unique credential setup. - Defense in depth: syscall/address-family restrictions, capability bounding, signed reproducible images, and a published provenance manifest are goals, not current properties.
- Review/CI: ShellCheck and Bats run in CI. There is no Semgrep-style, dependency, or secret-scanning workflow. The stated regressions “joinmarket cannot obtain root through sudo” and “SSH is unreachable until setup” neither exist as tests nor hold on current
master.
Minimal fix: introduce these as target security principles, and separately list controls actually implemented on master. Exact behavioral claims should match the implementation.
3. Removing the plan drops unresolved work
The old staging document need not remain, but not every finding was fully addressed:
- unrestricted sudo remains open;
- unique first-boot credentials remain unmerged in #193;
- the moving-branch bootstrap finding remains unresolved: README and FAQ still instruct downloading
build_joininbox.shfrommasterand executing it as root. #190 authenticates later update installation but cannot authenticate code already executing.
Preserve these as known limitations or tracked follow-ups, and revise the PR body’s statement that all findings were addressed.
Suggested structure
- Implemented controls — behavior verified on current
master. - Target design principles — normative requirements for future work.
- Known limitations — unrestricted sudo, shared credentials until #193 lands, moving-branch bootstrap, incomplete sandboxing/provenance/scanning.
- Review methods — distinguish the 2026 review, current CI, and planned additions.
There is no need to restore SECURITY-HARDENING.md; this is a framing and factual-accuracy correction. The latest-release support policy, seven-day acknowledgment target, and coordinated-disclosure commitment should also receive explicit maintainer sign-off because they create ongoing operational expectations.
Primary review model: Kimi K3 (kimi-k3, Kimi Coding provider)
Independent source/GitHub verification: GPT-5.6 Sol (gpt-5.6-sol, OpenAI Codex provider)
Addresses RonDeBanc's re-review: - Private vulnerability reporting is now enabled on the repository. - Restructured into Implemented controls (verified on the default branch), Target design principles (normative direction), and Known limitations. Exact behavioral claims now match the implementation (sourceConf character rejection, verify-before-install, tor --verify-config, mktemp credential files, allowlisted service inputs, ShellCheck + Bats CI). - Restored unresolved work as known limitations: unrestricted NOPASSWD sudo, shared default password until openoms#193 lands, moving-branch bootstrap (README/FAQ), default-GnuPG-home key imports, partial sandboxing and missing provenance/scanning. - Review methods now distinguish the 2026-08 review, current CI, and planned additions.
|
Thanks for the thorough re-review — all three points addressed in 1. Private reporting route — enabled on the repo now ( 2. Overstated guarantees — restructured into Implemented controls (verified against the default branch: 3. Dropped unresolved work — restored as Known limitations: unrestricted On the policy commitments (latest-release-only support, 7-day acknowledgment, coordinated disclosure): flagged for @openoms' explicit sign-off. |
openoms
left a comment
There was a problem hiding this comment.
ACK with the intent to keep up-to-date
Summary
Adds a
SECURITY.mdsecurity policy for JoininBox: private vulnerability reporting, scope, supported versions, threat model, coordinated disclosure — plus the durable output of the 2026-08 source review, structured as:sourceConf(), updates verified before install, no passwords via argv, noeval-based argument parsing,mktempcredential files with no root wildcard deletion, allowlisted generated services,tor --verify-config+ atomic install, ShellCheck + Bats CI)LoadCredential=/ private runtime dirs,torrc.d, unique first-boot credentials, defense in depth, safe failure)NOPASSWDsudo, shared default password until security: replace shared default password with unique first-boot credentials #193 lands, moving-branch bootstrap in README/FAQ, default-GnuPG-home key imports, partial sandboxing and missing provenance/scanningThe staged hardening plan document (
SECURITY-HARDENING.md) was removed; its findings were addressed through the implementation PRs below, and the open items are preserved as known limitations.Implementation PRs (hardening series)
/dev/shmeval-based argument parsing in the installerjoinin.confas data instead of sourcing it as codeFinding #1 (unrestricted passwordless sudo) and the moving-branch bootstrap remain open and are documented as known limitations.