Adds support for mise.toml files and mise Tasks#57
Open
smithjw wants to merge 1 commit into
Open
Conversation
- 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.
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.
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//MISEvariants) and line-scans the script body.Both probes share
pkg/probe/mise_common.go(file classifier, env-value extractor, scan-context type) - matching theai_common.goprecedent. Findings carry amise_*metadata vocabulary so consumers can locate the offending env var / task / file role.Motivation
mise's
redact = truetable form only suppresses values frommise envoutput at runtime - the secret itself sits in plaintext on disk. We tested this against a real workstation and immediately caught aghp_*PAT in~/.config/mise/config.tomlthat no other bagel probe surfaces.