Fix Xiaomi MiMo provider integration - #2
Merged
kevincodex1 merged 1 commit intoMay 13, 2026
Merged
kevincodex1 merged 1 commit into
kevincodex1 merged 1 commit into
Conversation
Promote Xiaomi MiMo as a first-tier OpenAI-compatible vendor and align its descriptor with the integration guide. Use the resolving Xiaomi MiMo API host while normalizing the stale docs host alias, wire Xiaomi catalog options into /model, and ensure model selection/display uses OPENAI_MODEL for Xiaomi instead of Claude defaults. Update provider profile/startup handling, OpenAI shim detection, docs, generated integration artifacts, and focused regression tests. Verification: bun run integrations:check; focused bun test provider/model suites; bun run build; bun run smoke.
kevincodex1
merged commit May 13, 2026
4f4eb7c
into
kevincodex1:feat/xiaomi-mimo-provider
2 checks passed
kevincodex1
added a commit
that referenced
this pull request
Jun 23, 2026
Addresses the security review on feat/bash-command-safety-classifier. Each finding traced by reviewer is fixed locally; adversarial tests cover each bypass pattern. P0 — parser bypasses (CRITICAL / HIGH): #1 Escaped backslash before close quote — `echo "test\\" && rm -rf /` slipped through as one quoted echo. The prior `input[i-1] !== '\\'` check fails when the backslash itself is escaped. Replaced with an isCharEscaped() helper that counts consecutive backslashes; a quote is escaped only when preceded by an odd count. Applied in BOTH splitCompound AND tokenize so they agree on quote boundaries. #2 Process substitution not detected — `cat <(curl ...)` passed the cat safe gate. tokenize now returns null on `<(` / `>(` same as it did for `$(` / backticks, degrading to 'unknown'. Twigpine#3 Newline as command separator — `echo safe\nrm -rf /` was treated as one line by splitCompound (bash splits on \n = ;). Added \n to the separator list alongside ; | &. P1 — classification bypasses (MEDIUM): Twigpine#4 Sensitive-path denylist — cat/head/tail/less/more/file/stat/wc and readlink/realpath now consult SENSITIVE_PATH_PATTERNS. /etc/shadow, ~/.ssh/id_rsa, /proc/*/environ, /dev/sd*, ~/.aws/credentials, ~/.kube/config, id_rsa / *.pem / *.key etc. degrade to 'unknown'. Public keys (*.pub) and normal files remain safe. Twigpine#5 `git config key value` misclassified — removed `config` from the READ_ONLY_SUBCOMMANDS list and added explicit unsafe gate: two+ positional args with no --get/--list is a set, marked unsafe. --unset / --replace-all / --add / --unset-all also marked unsafe. Single-arg read form falls to 'unknown' (defers to existing rules). Twigpine#6 `git stash` (bare) misclassified — equivalent to `git stash push`, mutates worktree + index. Safe path now requires `git stash list` or `git stash show`; everything else in stash falls to unsafe or unknown. P2 — hygiene (LOW): Twigpine#7 env / printenv removed from ALWAYS_SAFE_COMMANDS. Plain `env` dumps all environment variables (API keys, tokens) to the caller — not safe to auto-approve. FOO=bar cmd idiom still works via the existing env-assignment-prefix stripping. Twigpine#8 git gc / prune / repack / bisect removed from READ_ONLY_SUBCOMMANDS and added to the unsafe gate. gc repacks + deletes loose objects; bisect start/good/bad/reset/run/skip/terms/replay mutate HEAD. Tests: 35 new adversarial cases across all 8 findings, plus regression coverage (public keys still safe, FOO=bar pwd still safe, git stash list/show still safe). Full suite: 1187/1187 pass. PR intent scan: clean. Co-Authored-By: OpenClaude <openclaude@gitlawb.com>
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.
This is a fixup PR for Twigpine#1152 so the Xiaomi MiMo provider changes can be merged back into Kevin's PR branch.\n\nChanges included:\n- Promote Xiaomi MiMo as a first-tier OpenAI-compatible vendor and align the descriptor with the integration guide.\n- Use the resolving Xiaomi MiMo API host while normalizing the stale docs host alias.\n- Wire Xiaomi catalog options into /model and ensure selection/display uses OPENAI_MODEL instead of Claude defaults.\n- Update provider profile/startup handling, OpenAI shim detection, docs, generated artifacts, and regression tests.\n\nValidation run locally:\n- bun run integrations:check\n- focused provider/model bun tests\n- bun run build\n- bun run smoke