Add config trust model for authority keys by jeremy · Pull Request #181 · basecamp/basecamp-cli

added 3 commits

March 3, 2026 01:31
Introduce TrustStore type persisted at ~/.config/basecamp/trusted-configs.json.
Path-based trust (not content-based) allows authority keys from local/repo
configs when explicitly approved via the trust store.

Canonical paths (EvalSymlinks + Abs) prevent symlink bypasses. When a file
is deleted, parent-directory symlink resolution preserves canonical form so
stale entries can still be revoked.
loadFromFile now accepts a *TrustStore parameter. Authority keys (base_url,
default_profile, profiles) from local/repo sources are accepted when the
file is trusted, rejected otherwise.

Warnings include the exact file path with shell-safe quoting so users can
copy-paste the remediation command. Export RepoConfigPath for reuse by the
trust subcommand.
basecamp config trust [path] — approve a local/repo config for authority keys
basecamp config untrust [path] — revoke trust (works even if file was deleted)
basecamp config trust --list — show all trusted paths

config set now warns when writing authority keys to untrusted local config.
Trust and untrust use separate path resolution: trust requires the file to
exist, untrust accepts explicit nonexistent paths for stale entry cleanup.

Copilot AI review requested due to automatic review settings

March 3, 2026 09:31

chatgpt-codex-connector[bot]

@jeremy

canonicalizePath now only falls back to the absolute path on
fs.ErrNotExist; other EvalSymlinks errors (permission denied, etc.)
return "" to fail closed on the security boundary.

Warning messages use POSIX single-quote escaping instead of Go %q
double-quoting, preventing shell metacharacter expansion when users
copy-paste the suggested trust command.

@jeremy jeremy deleted the trusted-config branch

March 3, 2026 09:59

jeremy added a commit that referenced this pull request

Mar 5, 2026
Add v0.2.2 feature from PR #181: config trust subsection explaining
authority key protection and trust/untrust commands.

jeremy added a commit that referenced this pull request

Mar 5, 2026
* Document --no-subscribe, --subscribe, and output mode flags in SKILL.md

Add v0.2.2 features from PR #187 that were missing from the agent skill:
- Output modes: --md/-m, --styled, -v/-vv
- Quick reference: "Post silently" row
- Messages: --no-subscribe/--subscribe flags with examples
- Files & Documents: --no-subscribe example for doc create
- Schedule: --no-subscribe/--subscribe flags and example

Closes #189

* Document config trust/untrust commands in SKILL.md

Add v0.2.2 feature from PR #181: config trust subsection explaining
authority key protection and trust/untrust commands.

* Add --markdown alias to output modes in SKILL.md