Skip to content

Adds support for mise.toml files and mise Tasks#57

Open
smithjw wants to merge 1 commit into
boostsecurityio:mainfrom
smithjw:main
Open

Adds support for mise.toml files and mise Tasks#57
smithjw wants to merge 1 commit into
boostsecurityio:mainfrom
smithjw:main

Conversation

@smithjw
Copy link
Copy Markdown

@smithjw smithjw commented May 22, 2026

Summary

Adds two probes for mise (jdx/mise), the polyglot tool-version + env-var + task manager:

  • mise: scans foir mise config files (mise.toml family, .config/mise/..., legacy .rtx.) for plaintext secrets in [env] / [[env]] tables and in inline [tasks.] env/run blocks.
  • mise_tasks: scans mise file-task scripts under mise-tasks/, .mise-tasks/, mise/tasks/, .mise/tasks/, .config/mise/tasks/. Parses #MISE env={...} headers (also # [MISE] and //MISE variants) and line-scans the script body.

Both probes share pkg/probe/mise_common.go (file classifier, env-value extractor, scan-context type) - matching the ai_common.go precedent. Findings carry a mise_* metadata vocabulary so consumers can locate the offending env var / task / file role.

Motivation

mise's redact = true table form only suppresses values from mise env output at runtime - the secret itself sits in plaintext on disk. We tested this against a real workstation and immediately caught a ghp_* PAT in ~/.config/mise/config.toml that no other bagel probe surfaces.

- Introduced a new test file `mise_test.go` to cover various scenarios for the `MiseProbe`.
- Implemented tests for:
  - Probe name and enabled state.
  - Execution without a file index and with an empty index.
  - Handling of missing files and invalid TOML lines.
  - Extraction of environment values and detection of plaintext secrets.
  - Classification of file types and handling of nested subtables.
- Ensured that findings are correctly annotated and deduplicated between structured and line scans.
- Added tests for task environment blocks and run strings to verify proper detection of secrets.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant