Skip to content
This repository was archived by the owner on Sep 7, 2026. It is now read-only.

ci: configure Pullfrog for Z.AI Coding Plan - #8

Merged
rabesss merged 2 commits into
mainfrom
codex/zai-pullfrog-opencode
Jul 2, 2026
Merged

rabesss merged 2 commits into
mainfrom
codex/zai-pullfrog-opencode

Conversation

@rabesss

@rabesss rabesss commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Configure Pullfrog/OpenCode to use the verified zai-coding-plan/glm-5.2 model.
  • Add or update the repo-root opencode.json provider config for the Z.AI Coding Plan endpoint.
  • Wire the Pullfrog workflow to pass PULLFROG_MODEL, OPENCODE_CONFIG, and ZAI_API_KEY without committing secrets.

Validation

  • jq empty opencode.json
  • yq e . .github/workflows/pullfrog.yml >/dev/null

Notes

This mirrors the working setup validated in rabesss/impartus-cli#81, where Pullfrog loaded inherited secrets and ran as zai-coding-plan/glm-5.2.

@coderabbitai

coderabbitai Bot commented Jul 2, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

@rabesss, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 19 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 3690c634-9e75-4d36-8654-d42e208cab64

📥 Commits

Reviewing files that changed from the base of the PR and between d004d11 and a4b057e.

📒 Files selected for processing (2)
  • .github/workflows/pullfrog.yml
  • opencode.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/zai-pullfrog-opencode

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

CI: add Pullfrog workflow and OpenCode provider config for Z.AI Coding Plan

⚙️ Configuration changes 🕐 10-20 Minutes

Grey Divider

AI Description

• Add a Pullfrog GitHub Actions workflow runnable via manual dispatch.
• Configure Pullfrog/OpenCode to use the Z.AI Coding Plan endpoint and glm-5.2 model.
• Pass ZAI_API_KEY and related provider keys via GitHub Secrets without committing secrets.
Diagram

graph TD
  A["GitHub Actions: pullfrog.yml"] --> B["pullfrog/pullfrog@v0"] --> C["OpenCode config: opencode.json"] --> D["Z.AI API endpoint"]
  A --> E["GitHub Secrets"] --> B
  B --> F["Model: zai-coding-plan/glm-5.2"]

  subgraph Legend
    direction LR
    _wf["Workflow"] ~~~ _act["Action"] ~~~ _cfg["Config file"] ~~~ _ext{{"External API"}} ~~~ _sec["Secrets"}
  end
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Single-source model selection via env only
  • ➕ Avoids duplicating the model value in both with.model and PULLFROG_MODEL
  • ➕ Easier to change model/version in one place
  • ➖ Requires confidence that the action always honors env over input (or vice versa)
  • ➖ May reduce clarity for readers who expect model in with:
2. Parameterize model and provider via workflow_dispatch inputs / repo variables
  • ➕ Allows switching models/providers without editing the workflow
  • ➕ Makes the workflow reusable across branches/environments
  • ➖ Adds more surface area and validation needs (input defaults/allowed values)
  • ➖ Slightly more complex UX for manual runs
3. Reusable workflow (called via workflow_call)
  • ➕ Centralizes Pullfrog wiring across multiple repos
  • ➕ Standardizes secret/env handling and reduces drift
  • ➖ Extra repo/maintenance overhead for the shared workflow
  • ➖ Harder to iterate locally on workflow changes

Recommendation: Current approach is appropriate for a repo-local, opinionated setup: it pins the model/provider, keeps secrets out of git, and matches a known-working configuration. The only meaningful improvement to consider is reducing duplication by choosing either with.model or PULLFROG_MODEL as the single source of truth, or parameterizing the model if frequent switching is expected.

Files changed (2) +86 / -0

Other (2) +86 / -0
pullfrog.ymlAdd Pullfrog workflow dispatch wired to Z.AI model + OpenCode config +63/-0

Add Pullfrog workflow dispatch wired to Z.AI model + OpenCode config

• Introduces a new GitHub Actions workflow that can be run manually with a prompt input. Runs 'pullfrog/pullfrog@v0', pins the model to 'zai-coding-plan/glm-5.2', and passes 'OPENCODE_CONFIG' plus 'ZAI_API_KEY' (and optional other provider keys) via GitHub Secrets.

.github/workflows/pullfrog.yml

opencode.jsonAdd OpenCode provider config for Z.AI Coding Plan endpoint +23/-0

Add OpenCode provider config for Z.AI Coding Plan endpoint

• Adds a repo-root OpenCode configuration enabling only the 'zai-coding-plan' provider. Configures an OpenAI-compatible provider with 'baseURL' set to Z.AI's coding API and pulls the API key from 'ZAI_API_KEY', defining the 'glm-5.2' model with large context/output limits.

opencode.json

@kilo-code-bot

kilo-code-bot Bot commented Jul 2, 2026

Copy link
Copy Markdown

Code Review Summary

The review did not run because the selected model is no longer available.

Choose another model in Kilo Code review settings: https://app.kilo.ai/code-reviews

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request adds a new configuration file "opencode.json" to enable the "zai-coding-plan" provider with the "glm-5.2" model. The reviewer recommends explicitly defining the "model" and "small_model" keys at the root of the configuration to ensure OpenCode can correctly resolve the default models and avoid potential errors.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread opencode.json
Comment on lines +1 to +4
{
"$schema": "https://opencode.ai/config.json",
"enabled_providers": ["zai-coding-plan"],
"provider": {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

To ensure OpenCode automatically selects the newly configured zai-coding-plan/glm-5.2 model as the default model for both primary and lightweight tasks, you should explicitly define the model and small_model keys in the root of the configuration. Without these, OpenCode may fail to resolve a default model or attempt to use an unavailable provider.

{
  "$schema": "https://opencode.ai/config.json",
  "enabled_providers": ["zai-coding-plan"],
  "model": "zai-coding-plan/glm-5.2",
  "small_model": "zai-coding-plan/glm-5.2",
  "provider": {

@qodo-code-review

qodo-code-review Bot commented Jul 2, 2026 •

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (3) 📘 Rule violations (0) 📜 Skill insights (0)

Context used
✅ Compliance rules (platform): 8 rules

Grey Divider


Action required

1. Unpinned third-party action 🐞 Bug ⛨ Security
Description
The workflow uses pullfrog/pullfrog@v0, which is not pinned to an immutable commit SHA; the code
executed by this workflow can change if the tag moves. Because this job passes secrets via
environment variables, tag movement or compromise can escalate to secret exfiltration.
Code

.github/workflows/pullfrog.yml[R28-32]

+      - name: Run agent
+        uses: pullfrog/pullfrog@v0
+        with:
+          prompt: ${{ inputs.prompt }}
+          model: zai-coding-plan/glm-5.2
Evidence
The workflow directly uses a mutable tag for a third-party action in the only execution step, so the
reviewed code is not what will necessarily run in the future.

.github/workflows/pullfrog.yml[28-36]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The workflow references a third-party GitHub Action using a mutable tag (`pullfrog/pullfrog@v0`). Mutable tags can be retargeted, causing the workflow to execute different code than what was reviewed.

### Issue Context
This job also provides secrets in `env`, increasing the potential impact of a supply-chain issue.

### Fix Focus Areas
- .github/workflows/pullfrog.yml[28-36]

### Suggested fix
Pin `pullfrog/pullfrog` to a specific commit SHA (and optionally add a comment noting the upstream release/version). Consider enabling Dependabot updates for GitHub Actions so you still get automated upgrades while keeping immutability.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


2. Unnecessary secrets exposed 🐞 Bug ⛨ Security
Description
The Pullfrog step exports many provider API keys into the environment even though opencode.json
only enables zai-coding-plan and only references ZAI_API_KEY, increasing the blast radius if the
action (or anything it runs) is compromised. This also makes it easier to accidentally depend on
unrelated credentials later without noticing.
Code

.github/workflows/pullfrog.yml[R33-49]

+        env:
+          PULLFROG_MODEL: zai-coding-plan/glm-5.2
+          OPENCODE_CONFIG: ${{ github.workspace }}/opencode.json
+          ZAI_API_KEY: ${{ secrets.ZAI_API_KEY }}
+
+          # add at least one provider API key
+          ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
+          CLAUDE_CODE_OAUTH_TOKEN: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
+          OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
+          GOOGLE_GENERATIVE_AI_API_KEY:
+            ${{ secrets.GOOGLE_GENERATIVE_AI_API_KEY }}
+          GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
+          XAI_API_KEY: ${{ secrets.XAI_API_KEY }}
+          DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }}
+          MOONSHOT_API_KEY: ${{ secrets.MOONSHOT_API_KEY }}
+          OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
+          OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}
Evidence
The repo config explicitly enables only the zai-coding-plan provider and references only
ZAI_API_KEY, yet the workflow exports many additional secrets into the runtime environment of a
third-party action step.

opencode.json[3-11]
.github/workflows/pullfrog.yml[33-49]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`.github/workflows/pullfrog.yml` injects many unrelated provider secrets (Anthropic/OpenAI/etc.) into the Pullfrog job environment, but `opencode.json` enables only the `zai-coding-plan` provider and reads only `ZAI_API_KEY`. This unnecessarily exposes additional secrets to a third-party action and any subprocesses it executes.

### Issue Context
- `opencode.json` selects `zai-coding-plan` as the only enabled provider and pulls its key from `{env:ZAI_API_KEY}`.
- The workflow still passes a large set of other API keys as environment variables.

### Fix Focus Areas
- .github/workflows/pullfrog.yml[33-49]
- opencode.json[3-11]

### Suggested fix
Keep only the secrets required for the configured provider (likely `ZAI_API_KEY`, and any strictly required Pullfrog/OpenCode non-provider tokens if applicable). If you want optional multi-provider support, consider documenting an explicit switch and only exporting the relevant provider key(s) when that provider is selected.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

3. Overbroad OIDC token permission 🐞 Bug ⛨ Security
Description
The job grants id-token: write even though the workflow doesn’t use OIDC anywhere, which allows
any step in the job to mint an OIDC token. This is avoidable privilege that can be abused if a
workflow dependency is compromised or later modified.
Code

.github/workflows/pullfrog.yml[R20-22]

+    permissions:
+      id-token: write
+      contents: read
Evidence
The workflow explicitly grants id-token: write, while the job’s steps are only checkout and the
Pullfrog action, with no OIDC-consuming steps present in this workflow file.

.github/workflows/pullfrog.yml[20-32]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The Pullfrog job requests `permissions: id-token: write` but does not perform any OIDC-based auth in the shown steps. This is broader privilege than necessary.

### Issue Context
OIDC tokens can be exchanged for cloud credentials when org/repo trust policies exist. Keeping `id-token: write` only when needed reduces the impact of any compromised or misbehaving action.

### Fix Focus Areas
- .github/workflows/pullfrog.yml[20-22]

### Suggested fix
Remove `id-token: write` (or set it to `none`) unless you add a concrete OIDC consumer step that requires it.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

Comment on lines +33 to +49
env:
PULLFROG_MODEL: zai-coding-plan/glm-5.2
OPENCODE_CONFIG: ${{ github.workspace }}/opencode.json
ZAI_API_KEY: ${{ secrets.ZAI_API_KEY }}

# add at least one provider API key
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
CLAUDE_CODE_OAUTH_TOKEN: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
GOOGLE_GENERATIVE_AI_API_KEY:
${{ secrets.GOOGLE_GENERATIVE_AI_API_KEY }}
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
XAI_API_KEY: ${{ secrets.XAI_API_KEY }}
DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }}
MOONSHOT_API_KEY: ${{ secrets.MOONSHOT_API_KEY }}
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

1. Unnecessary secrets exposed 🐞 Bug ⛨ Security

The Pullfrog step exports many provider API keys into the environment even though opencode.json
only enables zai-coding-plan and only references ZAI_API_KEY, increasing the blast radius if the
action (or anything it runs) is compromised. This also makes it easier to accidentally depend on
unrelated credentials later without noticing.
Agent Prompt
### Issue description
`.github/workflows/pullfrog.yml` injects many unrelated provider secrets (Anthropic/OpenAI/etc.) into the Pullfrog job environment, but `opencode.json` enables only the `zai-coding-plan` provider and reads only `ZAI_API_KEY`. This unnecessarily exposes additional secrets to a third-party action and any subprocesses it executes.

### Issue Context
- `opencode.json` selects `zai-coding-plan` as the only enabled provider and pulls its key from `{env:ZAI_API_KEY}`.
- The workflow still passes a large set of other API keys as environment variables.

### Fix Focus Areas
- .github/workflows/pullfrog.yml[33-49]
- opencode.json[3-11]

### Suggested fix
Keep only the secrets required for the configured provider (likely `ZAI_API_KEY`, and any strictly required Pullfrog/OpenCode non-provider tokens if applicable). If you want optional multi-provider support, consider documenting an explicit switch and only exporting the relevant provider key(s) when that provider is selected.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +20 to +22
permissions:
id-token: write
contents: read

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remediation recommended

2. Overbroad oidc token permission 🐞 Bug ⛨ Security

The job grants id-token: write even though the workflow doesn’t use OIDC anywhere, which allows
any step in the job to mint an OIDC token. This is avoidable privilege that can be abused if a
workflow dependency is compromised or later modified.
Agent Prompt
### Issue description
The Pullfrog job requests `permissions: id-token: write` but does not perform any OIDC-based auth in the shown steps. This is broader privilege than necessary.

### Issue Context
OIDC tokens can be exchanged for cloud credentials when org/repo trust policies exist. Keeping `id-token: write` only when needed reduces the impact of any compromised or misbehaving action.

### Fix Focus Areas
- .github/workflows/pullfrog.yml[20-22]

### Suggested fix
Remove `id-token: write` (or set it to `none`) unless you add a concrete OIDC consumer step that requires it.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +28 to +32
- name: Run agent
uses: pullfrog/pullfrog@v0
with:
prompt: ${{ inputs.prompt }}
model: zai-coding-plan/glm-5.2

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Action required

3. Unpinned third-party action 🐞 Bug ⛨ Security

The workflow uses pullfrog/pullfrog@v0, which is not pinned to an immutable commit SHA; the code
executed by this workflow can change if the tag moves. Because this job passes secrets via
environment variables, tag movement or compromise can escalate to secret exfiltration.
Agent Prompt
### Issue description
The workflow references a third-party GitHub Action using a mutable tag (`pullfrog/pullfrog@v0`). Mutable tags can be retargeted, causing the workflow to execute different code than what was reviewed.

### Issue Context
This job also provides secrets in `env`, increasing the potential impact of a supply-chain issue.

### Fix Focus Areas
- .github/workflows/pullfrog.yml[28-36]

### Suggested fix
Pin `pullfrog/pullfrog` to a specific commit SHA (and optionally add a comment noting the upstream release/version). Consider enabling Dependabot updates for GitHub Actions so you still get automated upgrades while keeping immutability.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

@greptile-apps

greptile-apps Bot commented Jul 2, 2026 •

Copy link
Copy Markdown

Greptile Summary

This PR wires up the Pullfrog coding-agent workflow to use a Z.AI provider (zai-coding-plan/glm-5.2) by adding opencode.json with the provider/model config and extending the workflow environment with ZAI_API_KEY, OPENCODE_CONFIG, and PULLFROG_MODEL.

  • opencode.json (new): Declares the zai-coding-plan provider using @ai-sdk/openai-compatible, pointing at https://api.z.ai/api/coding/paas/v4, with glm-5.2 as the enabled model and reasoningEffort: \"xhigh\" in the AISDK request options.
  • pullfrog.yml (modified): Adds model: zai-coding-plan/glm-5.2 under with:, and injects PULLFROG_MODEL, OPENCODE_CONFIG, and ZAI_API_KEY into the action's env: block alongside the existing suite of other provider keys.

Confidence Score: 3/5

Not safe to merge as-is: multiple real defects in the changed files need to be addressed before this configuration should run in CI.

The workflow passes nine high-value API keys to an unpinned third-party action that only needs one, grants an OIDC minting permission the Z.AI flow has no use for, and the opencode.json config uses a reasoningEffort value ("xhigh") that falls outside the documented set, meaning every agent invocation will either error or silently ignore the field. Together these represent concrete, present defects in the introduced code.

Both changed files need attention: .github/workflows/pullfrog.yml for the permission and secret-scoping issues, and opencode.json for the unrecognized reasoningEffort value.

Important Files Changed

Filename Overview
opencode.json New provider config for Z.AI Coding Plan endpoint; uses non-standard reasoningEffort: "xhigh" that may be rejected or silently dropped by the API.
.github/workflows/pullfrog.yml Wires ZAI provider into the Pullfrog job; retains broad secret exposure to an unpinned third-party action and grants unnecessary id-token: write; model is specified in two places.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
    actor Dev as Developer
    participant GH as GitHub Actions
    participant PF as pullfrog/pullfrog@v0
    participant OC as OpenCode Runtime
    participant ZAI as Z.AI API

    Dev->>GH: workflow_dispatch (prompt)
    GH->>GH: "actions/checkout@v6"
    GH->>PF: "Run agent with model=zai-coding-plan/glm-5.2 + env block"
    PF->>OC: Load config from OPENCODE_CONFIG path
    OC->>OC: Parse opencode.json, resolve ZAI_API_KEY
    OC->>ZAI: POST /api/coding/paas/v4 (model: glm-5.2, reasoningEffort: xhigh)
    ZAI-->>OC: Response or 400 if reasoningEffort invalid
    OC-->>PF: Agent result
    PF-->>GH: Step complete
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
    actor Dev as Developer
    participant GH as GitHub Actions
    participant PF as pullfrog/pullfrog@v0
    participant OC as OpenCode Runtime
    participant ZAI as Z.AI API

    Dev->>GH: workflow_dispatch (prompt)
    GH->>GH: "actions/checkout@v6"
    GH->>PF: "Run agent with model=zai-coding-plan/glm-5.2 + env block"
    PF->>OC: Load config from OPENCODE_CONFIG path
    OC->>OC: Parse opencode.json, resolve ZAI_API_KEY
    OC->>ZAI: POST /api/coding/paas/v4 (model: glm-5.2, reasoningEffort: xhigh)
    ZAI-->>OC: Response or 400 if reasoningEffort invalid
    OC-->>PF: Agent result
    PF-->>GH: Step complete
Loading

Reviews (3): Last reviewed commit: "ci: set max OpenCode reasoning effort" | Re-trigger Greptile

Comment on lines +29 to +49
uses: pullfrog/pullfrog@v0
with:
prompt: ${{ inputs.prompt }}
model: zai-coding-plan/glm-5.2
env:
PULLFROG_MODEL: zai-coding-plan/glm-5.2
OPENCODE_CONFIG: ${{ github.workspace }}/opencode.json
ZAI_API_KEY: ${{ secrets.ZAI_API_KEY }}

# add at least one provider API key
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
CLAUDE_CODE_OAUTH_TOKEN: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
GOOGLE_GENERATIVE_AI_API_KEY:
${{ secrets.GOOGLE_GENERATIVE_AI_API_KEY }}
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
XAI_API_KEY: ${{ secrets.XAI_API_KEY }}
DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }}
MOONSHOT_API_KEY: ${{ secrets.MOONSHOT_API_KEY }}
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 security Broad secret exposure to unverified third-party action

The pullfrog/pullfrog@v0 action (a third-party action pinned only to a mutable floating tag) receives ten high-value API secrets in the same env block — including ANTHROPIC_API_KEY, CLAUDE_CODE_OAUTH_TOKEN, OPENAI_API_KEY, GEMINI_API_KEY, and others. If this action is compromised or updated maliciously, all those secrets are exfiltrated in one step. Only ZAI_API_KEY and OPENCODE_CONFIG are actually required to run the Z.AI provider; every other key should be removed from this job's environment.

with:
fetch-depth: 1
- name: Run agent
uses: pullfrog/pullfrog@v0

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 security Third-party action pinned to a mutable floating tag

pullfrog/pullfrog@v0 uses a mutable version tag. Any update pushed to that tag — including a malicious one — is silently picked up on the next run. Pin to a full commit SHA to protect against this supply-chain vector.

Suggested change
uses: pullfrog/pullfrog@v0
uses: pullfrog/pullfrog@<COMMIT-SHA> # pin to a specific commit SHA

Comment on lines +30 to +34
with:
prompt: ${{ inputs.prompt }}
model: zai-coding-plan/glm-5.2
env:
PULLFROG_MODEL: zai-coding-plan/glm-5.2

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Redundant model specification

The model is specified twice: once in with: model: (which the Pullfrog action reads directly) and again in env: PULLFROG_MODEL:. If these two values ever diverge during maintenance, the effective model may differ from what is documented in the workflow. Pick one authoritative source.

Suggested change
with:
prompt: ${{ inputs.prompt }}
model: zai-coding-plan/glm-5.2
env:
PULLFROG_MODEL: zai-coding-plan/glm-5.2
with:
prompt: ${{ inputs.prompt }}
model: zai-coding-plan/glm-5.2
env:
# PULLFROG_MODEL: zai-coding-plan/glm-5.2 # redundant if with: model: is the canonical source

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Comment on lines +20 to +22
permissions:
id-token: write
contents: read

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 security id-token: write granted to a job running a third-party action

The id-token: write permission allows the job to mint OIDC tokens that can be used to authenticate against cloud providers. Since pullfrog/pullfrog@v0 is a third-party action running with access to the same environment, a compromised version of that action could use this token. Drop this permission if OIDC authentication isn't explicitly required by the Pullfrog action for the Z.AI provider.

Comment thread opencode.json
"options": {
"aisdk": {
"request": {
"reasoningEffort": "xhigh"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Non-standard reasoningEffort value

"xhigh" is not a recognized value in the OpenAI-compatible API spec — the valid options are "low", "medium", and "high". When @ai-sdk/openai-compatible forwards this to the Z.AI endpoint, the API will either reject every agent request with a 400-series error or silently drop the field and run without any reasoning constraint. If Z.AI does support a custom "xhigh" tier, a comment citing their docs would clarify the intent; otherwise "high" is the correct value to use here.

@rabesss
rabesss force-pushed the codex/zai-pullfrog-opencode branch from 455de25 to a4b057e Compare July 2, 2026 10:57
@rabesss
rabesss merged commit 16a3442 into main Jul 2, 2026
6 of 7 checks passed
@rabesss
rabesss deleted the codex/zai-pullfrog-opencode branch July 2, 2026 10:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant