-
Notifications
You must be signed in to change notification settings - Fork 0
fix(adapters): third-wave review findings (#346/#350/#352/#354/#357/#358) #364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "agent-bundle": patch | ||
| --- | ||
|
|
||
| Address the third-wave review findings across the adapters: Codex artifacts honor `plugin.logo` (interface field + shipped image), the generated fallback prompt is bounded to the pinned 128-code-point limit and authored prompts are counted in code points, the transcribed Codex plugin schema rejects backslash parent traversal in component and interface-asset paths and accepts case-insensitive HTTP(S) schemes, Claude marketplace relative paths allow harmless `.` segments again (only `..` escapes), `permission/request` envelopes accept every `tool_input` shape the pinned schema declares, adapter revisions advance for the promoted event contracts (claude 1.22.0, codex 1.6.0, cursor 1.8.0, plugin 1.21.0), the G5 agents provenance note reconciles with the published parity rows, and the repository-owned capability-table hash pins are removed per the documented hashing policy. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -221,8 +221,10 @@ export const validateNativeEventEnvelope = ( | |
| } | ||
| if (canonicalEvent === 'permission/request') { | ||
| requireNativeString(native, 'tool_name'); | ||
| if (typeof native.tool_input !== 'object' || native.tool_input === null || Array.isArray(native.tool_input)) { | ||
| return nativeEventError('native tool_input must be an object'); | ||
| // The pinned permission-request input schema declares `"tool_input": true` | ||
| // (any JSON value), so presence is required but shape is tool-defined. | ||
| if (!Object.hasOwn(native, 'tool_input') || native.tool_input === undefined) { | ||
| return nativeEventError('native tool_input is required'); | ||
|
Comment on lines
+224
to
+227
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This relaxed check applies to Claude as well as Codex, although only the pinned Codex schema declares Useful? React with 👍 / 👎.
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in #397 (merged as d25a9c6). The any-JSON |
||
| } | ||
| requirePermissionMode(native); | ||
| if (target === 'codex') { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The replacement final class matches line terminators, while the negative lookahead's
.*does not. Consequently, a component path containing a newline followed by/../../outsidepasses this schema even though POSIX normalization escapes the plugin root; the same expression is copied into the three interface-asset patterns. Since this schema is the local guard for Codex manifests, exclude line terminators or make the traversal check span every character.Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in #397 (merged as d25a9c6).
plugin.schema.jsonnow excludes line terminators (\n, \r, U+2028, U+2029), other control characters, and backslash-form parent segments incomponentPath,composerIcon,logo,logoDark, andscreenshots[]so a newline followed by/../can no longer slip past the traversal guard;PROVENANCE.jsonsha/bytes re-pinned, Codex adapter revision 1.9.0 / composite plugin adapter 1.24.0, andtests/codex-plugin-validation.test.tsgained negative fixtures with embedded newlines and traversal for every path field.