Repository navigation
feat(trace): e2e adapter for OpenCode 2 - #3662
Merged
Merged
Conversation
Add the OpenCode 2 harness to the Trace end-to-end suite. The suite runs the harnesses that config.yaml lists. The skill files and the user hook file come from the harness, and the suite fails when an agent commits in the checkout that runs it. Assisted-by: Claude Code Signed-off-by: Jose I. Paris <jiparis@chainloop.dev> Chainloop-Trace-Sessions: be5af72c-30e7-48f4-b46c-dc7a5a754c41
Contributor
PR validation — ✅ 3 passing
AI Session Checks —
|
| Status | Policy | Messages |
|---|---|---|
| ✅ Passed | secrets-detection |
- |
⚠️ sast-scan — 3 failing
| Status | Policy | Messages |
|---|---|---|
owasp-top10-2025 |
Weakness from OWASP Top 10 found: CWE-94, "Improper Control of Generation of Code ('Code Injection')" (A05:2025 – Injection) | |
sast |
(error) app/cli/internal/trace/e2e/opencode.go:74: Detected non-static command inside Command. Audit the input to 'exec.Command'. If unverified user data can reach this call site, this is a code injection vulnerability. A malicious actor can inject a malicious script to execute arbitrary code. | |
cwe-top25 |
Weakness from CWE Top 25 found: CWE-94, "Improper Control of Generation of Code ('Code Injection')" | |
| ✅ Passed | cwe-top26-40-cusp |
- |
✅ iac-scan
| Status | Policy | Messages |
|---|---|---|
| ✅ Passed | iac-misconfiguration |
- |
Scans not applied (2)
| Scan | Reason |
|---|---|
vulnerability-scan |
no manifest/lockfile changed |
github-actions-scan |
no workflow files changed |
Security context
✅ Nothing this change touches has a recorded security-fix history.
View in Chainloop ↗ · How this works ↗
Powered by Chainloop and Chainloop Trace
migmartri
previously approved these changes
Oct 19, 2026
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 12 files
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
The ticket prompt asks for the file tool and a separate commit command: a commit in the shell command that writes the file does not carry the session. The media prompt tells the agent not to capture the image, which would replace its base64 in the transcript with a pointer. Assisted-by: Claude Code Signed-off-by: Jose I. Paris <jiparis@chainloop.dev> Chainloop-Trace-Sessions: be5af72c-30e7-48f4-b46c-dc7a5a754c41
The harness map is used only by the e2e test, so a lint run without the e2e tag reported it as unused. Assisted-by: Claude Code Signed-off-by: Jose I. Paris <jiparis@chainloop.dev> Chainloop-Trace-Sessions: be5af72c-30e7-48f4-b46c-dc7a5a754c41
migmartri
approved these changes
Oct 19, 2026
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.
Part of #3635 (spec issue-3635). Adds the OpenCode 2 column to the Chainloop Trace end-to-end suite.
opencode run --standalonewith the JSON output and auto-approved tools. Each session gets a private server, because the shared background server keeps the environment and the plugins of the folder that started it.PWD, not from the working folder of the process. The adapter setsPWDto the workspace. As a guard, the suite now fails when the HEAD of the checkout that runs it changes during a run.config.yamllists. OpenCode 2 is pinned to 2.0.22 withopenrouter/anthropic/claude-haiku-5.5, which needsOPENROUTER_API_KEY. The adapter returns an error when the installed major version is not the one of the column. OpenCode 1.x is not configured yet.AI disclosure: Claude Code helped to write this change.