Skip to content

feat(grok): refresh grok CLI metadata#2696

Open
janburzinski wants to merge 2 commits into
mainfrom
emdash/grok-cli-update-vkh7c
Open

feat(grok): refresh grok CLI metadata#2696
janburzinski wants to merge 2 commits into
mainfrom
emdash/grok-cli-update-vkh7c

Conversation

@janburzinski

Copy link
Copy Markdown
Collaborator

Description

  • refresh grok metadata
  • add npm+windows install options
  • add grok -m model flag
  • add grok enterprise env vars
Checklist
  • I kept this PR small and focused
  • I ran a self-review before opening this PR
  • I ran the relevant local checks or explained why not
  • I updated docs when behavior or setup changed
  • I added or updated tests when behavior changed, or explained why not
  • I only added comments where the logic is not obvious
  • I used Conventional Commits for commit
    messages and, when possible, the PR title

@greptile-apps

greptile-apps Bot commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR refreshes Grok CLI metadata across the app and plugin registry. The main changes are:

  • Updated Grok docs URLs.
  • Added npm and Windows install metadata.
  • Switched Grok release metadata to the npm package.
  • Added -m model flag support.
  • Added Grok enterprise env vars to PTY forwarding.

Confidence Score: 5/5

This looks safe to merge after considering whether Grok enterprise env vars should be provider-scoped.

  • No blocking issues found in the changed code.
  • The install and update metadata follows the existing plugin schema.
  • The command builder only emits the Grok model flag when a model is configured.

apps/emdash-desktop/src/main/core/pty/pty-env.ts

Security Review

The new Grok OIDC env vars are forwarded through the global PTY allowlist, so non-Grok agent sessions can inherit Grok enterprise identity configuration from the parent process.

Important Files Changed

Filename Overview
apps/emdash-desktop/src/main/core/pty/pty-env.ts Adds Grok enterprise variables to the global PTY env allowlist.
apps/emdash-desktop/src/main/core/pty/pty-env.test.ts Extends env forwarding tests for the new Grok variables.
apps/emdash-desktop/src/shared/core/agents/agent-provider-registry.ts Updates the shared Grok documentation URL.
apps/emdash-desktop/src/shared/core/agents/agent-provider-registry.test.ts Adds coverage for the Grok docs URL and installer metadata.
packages/plugins/src/agents/impl/grok/index.ts Refreshes Grok plugin install, update, docs, and prompt-command metadata.
packages/plugins/src/agents/impl/index.test.ts Adds Grok plugin registry coverage for install metadata and model flag args.
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
apps/emdash-desktop/src/main/core/pty/pty-env.ts:67-68
**Enterprise OIDC Vars Leak Globally**

When the Electron process has `GROK_OIDC_CLIENT_ID` or `GROK_OIDC_ISSUER` set, `buildAgentEnv()` copies them into every agent PTY, including non-Grok sessions, because this allowlist is not provider-scoped. A Claude/Goose task or its subprocesses can read those Grok enterprise identity details from the inherited environment even though that session did not request Grok auth.

Reviews (1): Last reviewed commit: "feat(grok): refresh CLI metadata" | Re-trigger Greptile

Comment on lines +67 to +68
'GROK_OIDC_CLIENT_ID',
'GROK_OIDC_ISSUER',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 security Enterprise OIDC Vars Leak Globally

When the Electron process has GROK_OIDC_CLIENT_ID or GROK_OIDC_ISSUER set, buildAgentEnv() copies them into every agent PTY, including non-Grok sessions, because this allowlist is not provider-scoped. A Claude/Goose task or its subprocesses can read those Grok enterprise identity details from the inherited environment even though that session did not request Grok auth.

Context Used: AGENTS.md (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/emdash-desktop/src/main/core/pty/pty-env.ts
Line: 67-68

Comment:
**Enterprise OIDC Vars Leak Globally**

When the Electron process has `GROK_OIDC_CLIENT_ID` or `GROK_OIDC_ISSUER` set, `buildAgentEnv()` copies them into every agent PTY, including non-Grok sessions, because this allowlist is not provider-scoped. A Claude/Goose task or its subprocesses can read those Grok enterprise identity details from the inherited environment even though that session did not request Grok auth.

**Context Used:** AGENTS.md ([source](https://app.greptile.com/emdash/github/generalaction/emdash/-/custom-context?memory=c9624c9f-4bb0-42b3-aa19-4ea456b59255))

How can I resolve this? If you propose a fix, please make it concise.

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