clawdforge/clients
Kayos 7ba7058cd5 clients/bash: apply audit findings — security hardening + correctness fixes (347fdde → new)
Security:
- S1: bearer via tmpfile/--config, not cmdline arg (no /proc/<pid>/cmdline leak)
- S2/S3: JSON-escape user input in --files, --ip-cidrs, token name
- S4: URL-encode token name in revoke
- S5: refuse to source cf.env unless 0600/0400 + owner-matched
- S6: reject ; in upload paths to defeat curl @ filename injection

Correctness:
- B1: refuse cf run - on TTY stdin
- B2: replace fragile files splice with proper JSON-array composer (raw: passthrough in _json_obj_from_assoc)
- B3: disable glob on comma-split (set -f around loop)
- B4: only create stdin tmpfile when actually used
- B5: EXIT trap (was RETURN; missed _die exit)
- B6/B7: --max-time + stderr capture on uploads
- B8: drop bare Bearer header on healthz when no token
- B9: validate admin subcommand before token
- B10: wire _extract_error into HTTP-error path
- U3: dedicated '# --- end help ---' sentinel for cmd_help

New: clients/bash/test/test_cf.sh (curl wrapper mock + 23 assertions covering
all of the above; fully shellcheck-clean).

Audit: memory/clawdforge-audits/bash-347fdde.md
2026-04-28 23:09:06 -07:00
..
bash clients/bash: apply audit findings — security hardening + correctness fixes (347fdde → new) 2026-04-28 23:09:06 -07:00
c clients/c: initial C SDK for clawdforge 2026-04-28 23:01:52 -07:00
cpp clients/cpp: initial C++ SDK for clawdforge 2026-04-28 23:02:51 -07:00
csharp clients/csharp: initial C# SDK for clawdforge 2026-04-28 22:53:09 -07:00
go clients/go: apply audit findings — fmt + doc + test coverage (3c62613 → new) 2026-04-28 23:08:46 -07:00
java clients/java: initial Java SDK for clawdforge 2026-04-28 22:49:06 -07:00
kotlin clients/kotlin: initial Kotlin SDK for clawdforge 2026-04-28 23:04:24 -07:00
mcp clients/mcp: initial MCP server for clawdforge 2026-04-28 22:37:08 -07:00
php clients/php: initial PHP SDK for clawdforge 2026-04-28 22:41:02 -07:00
python clients/python: apply audit findings (90e158f → next) 2026-04-28 23:07:38 -07:00
ruby clients/ruby: apply audit findings (b1d6e3f -> new) 2026-04-28 23:07:49 -07:00
rust clients/rust: initial Rust SDK for clawdforge 2026-04-28 22:35:16 -07:00
swift clients/swift: initial Swift SDK for clawdforge 2026-04-28 22:48:27 -07:00
typescript clients/typescript: initial TypeScript SDK for clawdforge 2026-04-28 22:42:46 -07:00