Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion devenv/src/devenv/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3700,7 +3700,19 @@ fn resolve_secretspec_into(
secrets.set_profile(profile_str);
}

let validated_secrets = match secrets.validate()? {
// secretspec 0.19+ gates every access behind a `require_reason` policy that
// defaults to `"agents"`: when the caller is detected as a coding agent and no
// reason is supplied, validate() fails with ReasonRequired regardless of
// `required=false`. Shell activation is automatic (no interactive `secretspec
// get`), so supply a default reason describing it. with_default_reason only
// fills an ABSENT reason — an explicit SECRETSPEC_REASON / with_reason still
// wins and is what gets audited. (The other resolve path,
// resolve_builtin_cachix_auth_token, uses a manifest with require_reason=false
// and so needs no reason.)
let validated_secrets = match secrets
.with_default_reason("devenv shell activation")
.validate()?
{
Ok(validated) => validated,
Err(e) => {
return Err(SecretsNeedPrompting {
Expand Down
Loading