Skip to content

Fix #116: Ship a reusable cross-repo schema drift CI gate (prevent future forks) - #118

Merged
telleroutlook merged 1 commit into
mainfrom
claude/issue-116
Jul 27, 2026
Merged

Fix #116: Ship a reusable cross-repo schema drift CI gate (prevent future forks)#118
telleroutlook merged 1 commit into
mainfrom
claude/issue-116

Conversation

@telleroutlook

Copy link
Copy Markdown
Contributor

Fixes #116

Generated by claude-bot-go worker.

@telleroutlook

Copy link
Copy Markdown
Contributor Author

Summary

Cross-repo schema-drift gate is logically sound and well-covered by tests in both languages; only minor defense-in-depth and CLI-UX suggestions, no blockers.

Severity

low

Blocking findings

  1. .github/workflows/schema-drift.yml:50 inputs.package-version is interpolated directly into the pip-install shell command (and again at line 68 for npm). The workflow_call trust model is the main guardrail, but a consumer that pipes an untrusted value into this input gets shell injection; prefer passing the value via an env: var and referencing $VAR.
  2. bin/cli.js:65 The --version branch is unreachable for the documented invocation: wasmagent-protocol --version leaves args.command === null, so the guard at line 61 prints help and returns 1 before the version check runs. Reorder the version check ahead of the command-null check.
  3. src/wasmagent_protocol/drift.py:185 depends_on_package treats any bare occurrence of the string "wasmagent-protocol" anywhere in pyproject.toml as a dependency, so a comment/tool-config mention would falsely satisfy the check and suppress a legitimate no-package-dep violation; parse the [project] dependencies list instead of a substring test.

Verdict

✅ Approved

Merge risk

low

Audit

  • model: opus
  • effort: high
  • tokens: input=0, output=0
{
  "approved": true,
  "severity": "low",
  "summary": "Cross-repo schema-drift gate is logically sound and well-covered by tests in both languages; only minor defense-in-depth and CLI-UX suggestions, no blockers.",
  "findings": [
    {
      "file": ".github/workflows/schema-drift.yml",
      "line": 50,
      "issue": "inputs.package-version is interpolated directly into the pip-install shell command (and again at line 68 for npm). The workflow_call trust model is the main guardrail, but a consumer that pipes an untrusted value into this input gets shell injection; prefer passing the value via an env: var and referencing $VAR.",
      "kind": "suggestion"
    },
    {
      "file": "bin/cli.js",
      "line": 65,
      "issue": "The --version branch is unreachable for the documented invocation: `wasmagent-protocol --version` leaves args.command === null, so the guard at line 61 prints help and returns 1 before the version check runs. Reorder the version check ahead of the command-null check.",
      "kind": "suggestion"
    },
    {
      "file": "src/wasmagent_protocol/drift.py",
      "line": 185,
      "issue": "depends_on_package treats any bare occurrence of the string \"wasmagent-protocol\" anywhere in pyproject.toml as a dependency, so a comment/tool-config mention would falsely satisfy the check and suppress a legitimate no-package-dep violation; parse the [project] dependencies list instead of a substring test.",
      "kind": "suggestion"
    }
  ],
  "merge_risk": "low",
  "Model": "opus",
  "model": "claude-cli",
  "effort": "high",
  "tokens": {
    "input_tokens": 0,
    "output_tokens": 0
  },
  "same_verdict_count": 1
}

@telleroutlook

Copy link
Copy Markdown
Contributor Author

Merge gate failed: go test ./... exited non-zero.

verify manifest: (defaults — no .claude-bot/verify.yml)
  [FAIL] pip-install (if [ -d .venv ]; then .venv/bin/pip install -e ".[dev]" -q; else pip install -e ".[dev]" -q 2>/dev/null || pip install -e . -q; fi) took 1.102s

Failing command output:
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
    
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
    
    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.
    
    See /usr/share/doc/python3.12/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

@telleroutlook
telleroutlook merged commit a14be48 into main Jul 27, 2026
3 checks passed
@telleroutlook
telleroutlook deleted the claude/issue-116 branch July 27, 2026 01:02
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.

Ship a reusable cross-repo schema drift CI gate (prevent future forks)

1 participant