pub enum Layer {
Global,
Project,
}Expand description
Which layer of the merge order a config file occupies — and therefore who is trusted to have written it.
~/.kranz/config.json is the OPERATOR’s own file.
<repo>/.kranz/config.json ships with the repository, so for any repo the
operator did not author it is attacker-controlled input, and under
workerIsolation: "checkout" it sits inside the session’s writable cwd
where a contained worker can plant it. Without a trust rule that layer
wins the merge and can name the binary kranz executes (claudeBinary),
the endpoint the engine POSTs prompts to (baseUrl), the ambient
credentials copied into contract commands (contractEnvPassthrough), and
the switches that turn containment off — before any sandbox, agent, or
approval gate exists. Every other repo-owned surface already carries a
trust distinction (routing rules are read from the base ref, packs carry a
trust class); this closes the last one.
Variants§
Global
~/.kranz/config.json — written by the operator.
Project
<repo>/.kranz/config.json — written by whoever authored the repo.