mirror of
https://github.com/PR0M3TH3AN/SeedPass.git
synced 2026-11-06 12:52:04 +00:00
security: keep secrets off argv, fix packaging, add JS supply-chain CI
Secret input: - Values that are secrets can now be read from stdin: `entry add key-value --stdin`, `entry add totp --secret-stdin`, `entry add document --stdin`, and `entry modify --value-stdin`. Arguments are visible in shell history and process listings, so the positional forms now warn (without echoing the secret they are warning about) rather than silently accepting. Packaging (the published package was broken): - `exports` pointed at src/index.ts while `files` shipped only dist/, so an installed package had no entry point; exports now points at the bundle. - A `workspace:*` runtime dependency would have failed any real install. The bundle inlines everything, so the package now declares no runtime dependencies at all. Verified by packing the tarball, installing it into a clean project and running the binary -- and CI now does the same on every change, because this class of mistake is invisible to build and test. - The workspace globs cover apps/* so a future extension cannot sit outside CI. - @types/node aligned with the advertised Node 22 runtime. Release and supply chain: - release-integrity now builds the CLI bundle into dist/ before checksums are generated and signed, so the executable TypeScript artifact is covered by the same manifest and cosign signature as the Python ones. - A new javascript-supply-chain job runs `pnpm audit` and produces a CycloneDX SBOM; the JS tree previously had neither. Also documents two findings that are protocol-level and shared with Python, where changing the port alone would break convergence: tombstone retention allowing deletion replay after the 2048-entry cap, and SSH/PGP sharing a derivation domain (same index yields the same Ed25519 key). Both need a versioned change in both implementations and are recorded in the compatibility matrix rather than silently patched here. 193 core + 70 CLI tests green; pnpm audit clean. Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
1 parent
55879eaa1b
commit
a1df3cfde0
8 files changed
+270
-29
No files matched your search
@@ -98,6 +98,22 @@ nostr, ssh, pgp — every creatable kind.
|
||||
(Python via its legacy fallback, TS via `parseEncryptedFile`), verified in
|
||||
cross-impl phases A/B/F/J.
|
||||
|
||||
**Protocol-level issues shared with Python — not divergences, and not
|
||||
fixable in the port alone.** A security review raised both; changing either
|
||||
in TypeScript only would break cross-implementation convergence, so they
|
||||
need a versioned protocol change in both implementations:
|
||||
|
||||
1. **Tombstone retention allows deletion replay.** Only
|
||||
`TOMBSTONE_RETENTION_CAP` (2048) tombstones are kept, oldest dropped
|
||||
first. Once a tombstone ages out, an untrusted relay can replay the
|
||||
older signed entry and resurrect a deleted secret. Both implementations
|
||||
behave identically today.
|
||||
2. **SSH and PGP share a derivation domain.** Both take BIP-85 app 32 at the
|
||||
entry's index, so an SSH entry and a PGP entry at the same index derive
|
||||
the same raw Ed25519 private key. Fixing it requires distinct application
|
||||
numbers (or an info string) and a compatibility version, since existing
|
||||
keys must keep deriving as they do.
|
||||
|
||||
**Resolved:** TOTP codes for entries with a non-default period/digits used
|
||||
to differ — Python built `pyotp.TOTP(secret)` with library defaults and
|
||||
ignored the entry's recorded values, so an imported 8-digit/45s secret
|
||||
|
||||
Reference in new issue
Block a user