Repository navigation
feat(cli): apply security-sensitive project config keys (#208, part 3b) - #346
Merged
Merged
Conversation
Applies trust, allow, mcp_server, on_pretool/on_posttool/on_turnend, skill, plan_mode, no_auto_mcp, no_skills and [mission] verify/verify_timeout from .tole/config.toml after the trust gate (single startup path). - resolve_list: the highest non-empty layer replaces a whole list (flag > env > config); resolve_bool: flag || config (flags only turn on). - Faces that refuse a flag (serve/acp/mcp/mission) refuse the config-sourced value with the same message plus a --no-config hint; the checks run on the effective values. - Builds lacking the mcp / shell-tools feature reject the matching config keys loudly instead of ignoring them. - config allow/trust feed the same approver as the flags; Destructive stays un-allowlistable (tested end to end). - tole config check shows effective value + source for every key. - README configuration section, threat model, epics and CHANGELOG updated. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
🔍 Cora AI Code Review✅ No issues found. Code looks good! Review powered by cora-code · BYOK · MIT |
…ure-aware In the no-mcp profile (CI job: shell-tools only) mcp_server is shown as unsupported by the build and startup refuses it first, so the tests must not expect an effective value / the mission plan-mode refusal for gated-off keys. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
This was referenced Oct 9, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Part 3b of 3 (final) of the project config
.tole/config.toml: applies the security-sensitive keystrust,allow,mcp_server,on_pretool/on_posttool/on_turnend,skill,plan_mode,no_auto_mcp,no_skillsand[mission]verify/verify_timeoutafter the trust gate, finishes the docs, and closes the feature.Why
Parts #342/#343/#345 validated, gated and applied the low-risk keys. The remaining keys are what make a per-project config useful (
allow,trust, hooks, MCP servers) and what make it dangerous, so they land last, on top of the trust gate, with explicit rules for lists, booleans and the faces that refuse flags.Changes
config_apply.rs:resolve_list(highest non-empty layer replaces the whole list; flag > env > config,TOLE_TRUSTis the env layer fortrust),resolve_bool(flag || config, flags can only turn on),Settings::resolvenow resolves every key;unsupported_keys(loud error formcp_server/no_auto_mcpwithout themcpfeature, hooks/memorywithoutshell-tools);config checkshows effective value + source for every key (lists show the effective list, booleans(config)/(flag)plus the only-on note).main.rs: host settings, trust expansion, per-subcommand--allowfallback,missionverify/timeout all come from the effective values; every face refusal (serve/acp/mcp/mission: hooks, turn-end,--plan-mode,--memory,--skill,--no-skills,--mcp-server) now checks the effective values and, for a config-sourced value, appendsuse --no-config to ignore the project config.check_client_session_flagsis no longermcp-gated so a configskill/no_skillsis refused in every profile.--verify-timeoutisOption<u64>(the[default: 300]stays in the help text,--helpis byte-identical).--no-config, face refusals, trust flow),docs/threat-model.md(sensitive keys only after trust, Destructive never allowlistable via config, faces refuse config hooks, residual: a trusted config is trusted),docs/epics.mdentry (unreleased), CHANGELOG bullet.h_security_sensitive_keys_are_not_applied_yetintests/config_apply.rs, and the unit pairsecurity_keys_do_not_change_any_resolved_setting/check_marks_every_security_key_not_applied...inconfig_apply_tests.rs) are flipped to assert they ARE applied.Closes #208
Testing
resolve_listand the boolean rule; per-key resolution tests (flag/env/config/default).tests/config_sensitive.rs(real binary, mock provider,CODECORA_HOMEon the child only):plan_mode(tool list on the wire),allow,trust, hooks (deny script invoked),mcp_server(spawn attempt, flag replaces list),no_auto_mcp(fakecora),skill/no_skills,missionverify + timeout, face refusals with hint (serve/acp/mcp/mission), flag-sourced refusal has no hint,--no-configdrops everything, Destructive never allowed via configallow/trust(file survives) plus the approver/registry walls.cargo fmt,clippy --workspace --all-targets -D warnings,cargo test --workspace, the--no-default-features/shell-tools/ tole-core checks; e2e also run in the bare and no-mcpprofiles;cora review --stagedclean.🤖 Generated with Claude Code