fix: feat: disinto secrets add — store individual encrypted secrets (#31) #35

Merged
dev-bot merged 2 commits from fix/issue-31 into main 2026-03-28 19:14:03 +00:00
Collaborator

Fixes #31

Changes

Fixes #31 ## Changes
dev-bot added 1 commit 2026-03-28 18:48:34 +00:00
fix: feat: disinto secrets add — store individual encrypted secrets (#31)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
ci/woodpecker/push/smoke-init removed
ci/woodpecker/pr/smoke-init removed
289f389398
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Collaborator

AI Review

Security

  • high bin/disinto:2061: IFS= read -r value does not suppress terminal echo. The typed secret will be displayed in the terminal, defeating the purpose of a secrets manager. Use IFS= read -rs value (the -s flag suppresses echo) and follow with a blank echo >&2 to restore the newline:
printf 'Enter value for %s: ' "$name" >&2
local value
IFS= read -rs value
echo >&2

Minor

  • low bin/disinto:2067: No guard against silently overwriting an existing ${name}.enc. A typo in NAME could clobber a stored secret without warning. Consider checking [ -f "$enc_path" ] and requiring --force or prompting for confirmation.

Everything else looks good

  • .gitignore correctly excludes secrets/ to prevent encrypted files from being committed.
  • _secrets_ensure_age_key helper is clean and correctly reused by add.
  • Extending show to dispatch on whether a name argument is present (individual vs. bulk) is the right design.
  • printf '%s' "$value" | age -r ... correctly avoids exposing the value via process arguments.

Verdict

REQUEST_CHANGES — read -r does not suppress terminal echo — secret value is visible to anyone watching the screen


Reviewed at 289f389 | AGENTS.md

## AI Review <!-- reviewed: 289f389398bfc93334d4897ecad28a639e04ff99 --> ### Security - **high** `bin/disinto:2061`: `IFS= read -r value` does not suppress terminal echo. The typed secret will be displayed in the terminal, defeating the purpose of a secrets manager. Use `IFS= read -rs value` (the `-s` flag suppresses echo) and follow with a blank `echo >&2` to restore the newline: ```bash printf 'Enter value for %s: ' "$name" >&2 local value IFS= read -rs value echo >&2 ``` ### Minor - **low** `bin/disinto:2067`: No guard against silently overwriting an existing `${name}.enc`. A typo in NAME could clobber a stored secret without warning. Consider checking `[ -f "$enc_path" ]` and requiring `--force` or prompting for confirmation. ### Everything else looks good - `.gitignore` correctly excludes `secrets/` to prevent encrypted files from being committed. - `_secrets_ensure_age_key` helper is clean and correctly reused by `add`. - Extending `show` to dispatch on whether a name argument is present (individual vs. bulk) is the right design. - `printf '%s' "$value" | age -r ...` correctly avoids exposing the value via process arguments. ### Verdict **REQUEST_CHANGES** — read -r does not suppress terminal echo — secret value is visible to anyone watching the screen --- *Reviewed at `289f389` | [AGENTS.md](AGENTS.md)*
review-bot requested changes 2026-03-28 19:08:06 +00:00
Dismissed
review-bot left a comment
Collaborator

AI Review: REQUEST_CHANGES — read -r does not suppress terminal echo — secret value is visible to anyone watching the screen

AI Review: **REQUEST_CHANGES** — read -r does not suppress terminal echo — secret value is visible to anyone watching the screen
dev-bot force-pushed fix/issue-31 from 289f389398 to ec58cb1745 2026-03-28 19:10:57 +00:00 Compare
Collaborator

AI Re-review (round 2)

Previous Findings

  • high terminal echo on secret input → FIXED: IFS= read -rs value + echo >&2 added at bin/disinto:2062–2063.
  • low silent overwrite of existing secret → FIXED: overwrite guard with [y/N] confirmation prompt added at bin/disinto:2068–2076.

New Code (incremental diff)

The incremental commits also include:

  • Removal of .woodpecker/smoke-init.yml (unrelated cleanup, already merged to main — no concern).
  • Mount of ~/.config/sops/age into agent containers (bin/disinto:232) — correct companion fix so agents can decrypt individual secrets at runtime.

No new issues found.

Verdict

APPROVE — Both previous findings addressed: silent read and overwrite guard are now in place


Reviewed at ec58cb1 | Previous: 289f389 | AGENTS.md

## AI Re-review (round 2) <!-- reviewed: ec58cb17457b495ce9177f12d9b388cd5d080558 --> ### Previous Findings - **high** terminal echo on secret input → **FIXED**: `IFS= read -rs value` + `echo >&2` added at bin/disinto:2062–2063. - **low** silent overwrite of existing secret → **FIXED**: overwrite guard with `[y/N]` confirmation prompt added at bin/disinto:2068–2076. ### New Code (incremental diff) The incremental commits also include: - Removal of `.woodpecker/smoke-init.yml` (unrelated cleanup, already merged to main — no concern). - Mount of `~/.config/sops/age` into agent containers (bin/disinto:232) — correct companion fix so agents can decrypt individual secrets at runtime. No new issues found. ### Verdict **APPROVE** — Both previous findings addressed: silent read and overwrite guard are now in place --- *Reviewed at `ec58cb1` | Previous: `289f389` | [AGENTS.md](AGENTS.md)*
review-bot approved these changes 2026-03-28 19:12:27 +00:00
review-bot left a comment
Collaborator

AI Re-review (round 2): APPROVE — Both previous findings addressed: silent read and overwrite guard are now in place

AI Re-review (round 2): **APPROVE** — Both previous findings addressed: silent read and overwrite guard are now in place
dev-bot merged commit d231d21a8c into main 2026-03-28 19:14:03 +00:00
dev-bot deleted branch fix/issue-31 2026-03-28 19:14:03 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: johba/disinto#35
No description provided.