Hardening: bash allowlist, plaintext credential storage, enforce https for token-bearing providers #10
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: Low / Informational — grouped hardening items from the security audit.
1. Tools grant full shell + filesystem, gated only by PermissionEngine
packages/core/src/tool/bash.tsrunsbash -c <model string>;read/write/edittake arbitrary paths. Default config marksbash/edit/writeasask(packages/core/src/config/index.ts:11), but read/glob/grep/ls fall through to?? "ask", and any tool can be set toallow. Withbash: "allow", a prompt-injection payload in a file the model reads can trigger destructive commands with no gate.bash.2. Credentials stored plaintext on disk
packages/core/src/auth/store.ts:5— tokens live at~/.config/thorny, protected only by0600/0700. Modes are correctly re-clamped on existing files (packages/core/src/storage/index.ts:44).3. Bearer token can be sent over cleartext http
packages/core/src/provider/openai-compatible.ts:73attachesAuthorization: Bearerto whateverbaseUrlresolves to; base URLs come from config/env (packages/core/src/provider/catalog.ts:170-174) with no scheme enforcement. Defaults are https.http://for any provider that carries a key (localhost excepted).Dependency CVEs
bun auditon the current lockfile (238 entries; runtime deps: zod, commander, ink, ink-text-input, react) reports no vulnerabilities. No action needed; re-run in CI.Found via security audit.