jdx/mise · error

Config file(s) in {} are not trusted: {} Trust them with `mi

Error message

Config file(s) in {} are not trusted: {}
Trust them with `mise trust`. See https://mise.jdx.dev/cli/trust.html for more information.

What it means

mise refuses to load tasks from configuration files that have not been marked trusted, because config files can execute arbitrary code. When no task matches and untrusted config files exist in the current directory, err_no_task bails with this message listing the files and pointing at `mise trust`.

Source

Thrown at src/task/task_list.rs:317

            let safe_mode = config::Settings::safe_mode();
            let config_files = config_files_in_dir(cwd);
            let untrusted_configs: Vec<_> = config_files
                .iter()
                .filter(|p| {
                    !safe_mode
                        && !is_tool_versions_file(p)
                        && !is_trusted(&config_trust_root(p))
                        && !is_trusted(p)
                })
                .collect();

            if !untrusted_configs.is_empty() {
                let paths = untrusted_configs
                    .iter()
                    .map(display_path)
                    .collect::<Vec<_>>()
                    .join(", ");
                bail!(
                    "Config file(s) in {} are not trusted: {}\nTrust them with `mise trust`. See https://mise.jdx.dev/cli/trust.html for more information.",
                    display_path(cwd),
                    paths
                );
            }
        }

        if let Some(task) = make_task_executable(config, name, task_context).await? {
            return Ok(Some(task));
        }

        // Check if there are non-executable files in task include directories
        if let Some(cwd) = &*dirs::CWD {
            let includes = config::task_includes_for_dir(cwd, &config.config_files)?;
            let excludes = config::task_excludes_for_dir(cwd, &config.config_files)?;
            let non_exec_files = find_non_executable_task_files(&includes, &excludes);
            // The remedy differs by platform and `make_executable_hint` is the only thing that
            // knows how, so it gets one file to name rather than the list. The count and the

View on GitHub (pinned to afd2eddd3a)

Solutions

  1. Run `mise trust` in the project directory to trust the listed config files, then rerun the task
  2. In CI/automation, trust non-interactively up front (e.g. `mise trust` step or the MISE_TRUSTED_CONFIG_PATHS env setting)
  3. Verify the config files are from a source you trust before trusting them

Example fix

# before
$ mise run build
Error: Config file(s) in ~/proj are not trusted: ~/proj/mise.toml

# after
$ mise trust
$ mise run build
Defensive patterns

Strategy: validation

Validate before calling

mise trust --dry-run 2>/dev/null || mise trust

Try / catch

mise run "$TASK" || { mise trust && mise run "$TASK"; }

Prevention

When it happens

Trigger: Running a task from a directory whose mise.toml / .mise.toml / config files were created or modified after last trusting them (new checkout, cloned repo, edited config) so `is_trusted` returns false.

Common situations: Freshly cloned a repo and immediately ran `mise run build`; pulled changes that touched a previously trusted config (hash changed); mise was upgraded to require re-trusting; CI checkout without trust step.

Related errors


AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09). Data as JSON: /api/errors/2748db56ce35db37. Report an issue: GitHub.