@codyswann/lisa 4.84.5 → 4.84.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
- package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
- package/dist/core/upstream-evidence-manifest.js +17 -4
- package/dist/core/upstream-evidence-manifest.js.map +1 -1
- package/package.json +4 -4
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa/hooks/block-host-name-leak.mjs +118 -40
- package/plugins/lisa/hooks/block-host-name-leak.sh +5 -0
- package/plugins/lisa/hooks/host-name-command-context.mjs +397 -0
- package/plugins/lisa-agy/hooks/block-host-name-leak.mjs +118 -40
- package/plugins/lisa-agy/hooks/block-host-name-leak.sh +5 -0
- package/plugins/lisa-agy/hooks/host-name-command-context.mjs +397 -0
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/hooks/block-host-name-leak.mjs +118 -40
- package/plugins/lisa-copilot/hooks/block-host-name-leak.sh +5 -0
- package/plugins/lisa-copilot/hooks/host-name-command-context.mjs +397 -0
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/hooks/block-host-name-leak.mjs +118 -40
- package/plugins/lisa-cursor/hooks/block-host-name-leak.sh +5 -0
- package/plugins/lisa-cursor/hooks/host-name-command-context.mjs +397 -0
- package/plugins/lisa-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-devin/hooks/block-host-name-leak.mjs +118 -40
- package/plugins/lisa-devin/hooks/block-host-name-leak.sh +5 -0
- package/plugins/lisa-devin/hooks/host-name-command-context.mjs +397 -0
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-agy/plugin.json +1 -1
- package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-agy/plugin.json +1 -1
- package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-phaser-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-devin/.devin-plugin/plugin.json +1 -1
- package/plugins/src/base/hooks/block-host-name-leak.mjs +118 -40
- package/plugins/src/base/hooks/block-host-name-leak.sh +5 -0
- package/plugins/src/base/hooks/host-name-command-context.mjs +397 -0
- package/scripts/generate-agy-plugin-artifacts.mjs +7 -3
- package/scripts/lib/host-name-review-cases.mjs +354 -0
- package/scripts/lib/host-name-target-cases.mjs +298 -0
- package/scripts/two-channel-couplings.json +29 -6
- package/scripts/verify-host-name-target-scope.mjs +347 -0
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
/** Actual-wrapper regressions for independently reproduced target/context findings. */
|
|
2
|
+
export function hostNameReviewCases({
|
|
3
|
+
hostCwd,
|
|
4
|
+
lisaCwd,
|
|
5
|
+
unknownCwd,
|
|
6
|
+
body,
|
|
7
|
+
cdStart,
|
|
8
|
+
cdSearch,
|
|
9
|
+
cdHost,
|
|
10
|
+
fixtureName,
|
|
11
|
+
lisa,
|
|
12
|
+
host,
|
|
13
|
+
}) {
|
|
14
|
+
const continuation = "\\\n";
|
|
15
|
+
const cases = [
|
|
16
|
+
[
|
|
17
|
+
"continuation before the noun retains protected inspection",
|
|
18
|
+
hostCwd,
|
|
19
|
+
`gh ${continuation} issue create --repo ${lisa} --body ${fixtureName}`,
|
|
20
|
+
2,
|
|
21
|
+
],
|
|
22
|
+
[
|
|
23
|
+
"continuation between noun and verb retains protected inspection",
|
|
24
|
+
hostCwd,
|
|
25
|
+
`gh issue ${continuation} create --repo ${lisa} --body ${fixtureName}`,
|
|
26
|
+
2,
|
|
27
|
+
],
|
|
28
|
+
[
|
|
29
|
+
"continuation before body text retains protected inspection",
|
|
30
|
+
hostCwd,
|
|
31
|
+
`gh issue create --repo ${lisa} --body ${continuation} ${fixtureName}`,
|
|
32
|
+
2,
|
|
33
|
+
],
|
|
34
|
+
[
|
|
35
|
+
"continuation before a host API endpoint preserves exemption",
|
|
36
|
+
lisaCwd,
|
|
37
|
+
`gh api ${continuation} repos/${host}/issues -f body=${fixtureName}`,
|
|
38
|
+
0,
|
|
39
|
+
],
|
|
40
|
+
[
|
|
41
|
+
"continuation before a protected API endpoint retains inspection",
|
|
42
|
+
hostCwd,
|
|
43
|
+
`gh api ${continuation} repos/${lisa}/issues -f body=${fixtureName}`,
|
|
44
|
+
2,
|
|
45
|
+
],
|
|
46
|
+
[
|
|
47
|
+
"continuation before explicit host repository preserves exemption",
|
|
48
|
+
lisaCwd,
|
|
49
|
+
`gh issue create --repo ${continuation} ${host} --body ${fixtureName}`,
|
|
50
|
+
0,
|
|
51
|
+
],
|
|
52
|
+
[
|
|
53
|
+
"continuation before explicit protected repository retains inspection",
|
|
54
|
+
hostCwd,
|
|
55
|
+
`gh issue create --repo ${continuation} ${lisa} --body ${fixtureName}`,
|
|
56
|
+
2,
|
|
57
|
+
],
|
|
58
|
+
[
|
|
59
|
+
"continuation between noun and verb keeps unknown target guarded",
|
|
60
|
+
unknownCwd,
|
|
61
|
+
`gh issue ${continuation} create --body ${fixtureName}`,
|
|
62
|
+
2,
|
|
63
|
+
],
|
|
64
|
+
[
|
|
65
|
+
"continuation between noun and verb keeps known host allowed",
|
|
66
|
+
hostCwd,
|
|
67
|
+
`gh issue ${continuation} create --repo ${host} --body ${fixtureName}`,
|
|
68
|
+
0,
|
|
69
|
+
],
|
|
70
|
+
[
|
|
71
|
+
"continuation before an API field value retains protected inspection",
|
|
72
|
+
hostCwd,
|
|
73
|
+
`gh api repos/${lisa}/issues -f ${continuation} body=${fixtureName}`,
|
|
74
|
+
2,
|
|
75
|
+
],
|
|
76
|
+
[
|
|
77
|
+
"continuation within an existing verb preserves the word",
|
|
78
|
+
hostCwd,
|
|
79
|
+
`gh issue cre${continuation}ate --repo ${lisa} --body ${fixtureName}`,
|
|
80
|
+
2,
|
|
81
|
+
],
|
|
82
|
+
[
|
|
83
|
+
"double quoted continuation preserves existing body text",
|
|
84
|
+
hostCwd,
|
|
85
|
+
`gh issue create --repo ${lisa} --body "${fixtureName.slice(0, 8)}${continuation}${fixtureName.slice(8)}"`,
|
|
86
|
+
2,
|
|
87
|
+
],
|
|
88
|
+
[
|
|
89
|
+
"a real quoted empty verb stays distinct from continuation whitespace",
|
|
90
|
+
hostCwd,
|
|
91
|
+
`gh issue "" create --repo ${lisa} --body ${fixtureName}`,
|
|
92
|
+
0,
|
|
93
|
+
],
|
|
94
|
+
[
|
|
95
|
+
"continuation after a quoted empty body preserves the empty value",
|
|
96
|
+
hostCwd,
|
|
97
|
+
`gh issue create --repo ${lisa} --body ""${continuation} ${fixtureName}`,
|
|
98
|
+
0,
|
|
99
|
+
],
|
|
100
|
+
[
|
|
101
|
+
"continuation preserves nonliteral argument uncertainty",
|
|
102
|
+
hostCwd,
|
|
103
|
+
`gh issue create --repo ${host} --title "$TITLE${continuation}" --body ${fixtureName}`,
|
|
104
|
+
2,
|
|
105
|
+
{ TITLE: "Unresolved title" },
|
|
106
|
+
],
|
|
107
|
+
[
|
|
108
|
+
"CDPATH inherited lookup cannot certify a host target",
|
|
109
|
+
cdStart,
|
|
110
|
+
`cd target && gh issue create --body ${fixtureName}`,
|
|
111
|
+
2,
|
|
112
|
+
{ CDPATH: cdSearch },
|
|
113
|
+
],
|
|
114
|
+
[
|
|
115
|
+
"CDPATH export lookup cannot certify a host target",
|
|
116
|
+
cdStart,
|
|
117
|
+
`export CDPATH='${cdSearch}'; cd target && gh issue create --body ${fixtureName}`,
|
|
118
|
+
2,
|
|
119
|
+
],
|
|
120
|
+
[
|
|
121
|
+
"CDPATH command assignment cannot certify a host target",
|
|
122
|
+
cdStart,
|
|
123
|
+
`CDPATH='${cdSearch}' cd target && gh issue create --body ${fixtureName}`,
|
|
124
|
+
2,
|
|
125
|
+
],
|
|
126
|
+
[
|
|
127
|
+
"CDPATH standalone assignment cannot certify a host target",
|
|
128
|
+
cdStart,
|
|
129
|
+
`CDPATH='${cdSearch}'; cd target && gh issue create --body ${fixtureName}`,
|
|
130
|
+
2,
|
|
131
|
+
],
|
|
132
|
+
[
|
|
133
|
+
"CDPATH relative body must not be read from the wrong directory",
|
|
134
|
+
cdStart,
|
|
135
|
+
`cd target && gh issue create --repo ${lisa} --body-file body.md`,
|
|
136
|
+
2,
|
|
137
|
+
{ CDPATH: cdSearch },
|
|
138
|
+
"BLOCKED: the working directory",
|
|
139
|
+
],
|
|
140
|
+
[
|
|
141
|
+
"uncertain CDPATH export cannot certify relative body location",
|
|
142
|
+
cdStart,
|
|
143
|
+
`export CDPATH="$SEARCH_PATH"; cd target && gh issue create --repo ${lisa} --body-file body.md`,
|
|
144
|
+
2,
|
|
145
|
+
{ SEARCH_PATH: cdSearch },
|
|
146
|
+
"BLOCKED: the working directory",
|
|
147
|
+
],
|
|
148
|
+
[
|
|
149
|
+
"dot relative cd bypasses CDPATH lookup",
|
|
150
|
+
cdStart,
|
|
151
|
+
`cd ./target && gh issue create --body ${fixtureName}`,
|
|
152
|
+
0,
|
|
153
|
+
{ CDPATH: cdSearch },
|
|
154
|
+
],
|
|
155
|
+
[
|
|
156
|
+
"parent relative cd bypasses CDPATH lookup",
|
|
157
|
+
cdHost,
|
|
158
|
+
`cd ../target && gh issue create --body ${fixtureName}`,
|
|
159
|
+
0,
|
|
160
|
+
{ CDPATH: cdSearch },
|
|
161
|
+
],
|
|
162
|
+
[
|
|
163
|
+
"absolute cd bypasses CDPATH lookup",
|
|
164
|
+
cdStart,
|
|
165
|
+
`cd '${cdHost}' && gh issue create --body ${fixtureName}`,
|
|
166
|
+
0,
|
|
167
|
+
{ CDPATH: cdSearch },
|
|
168
|
+
],
|
|
169
|
+
[
|
|
170
|
+
"empty CDPATH preserves literal relative cd",
|
|
171
|
+
cdStart,
|
|
172
|
+
`cd target && gh issue create --body ${fixtureName}`,
|
|
173
|
+
0,
|
|
174
|
+
],
|
|
175
|
+
[
|
|
176
|
+
"unquoted argv expansion cannot add an unseen winning repo",
|
|
177
|
+
hostCwd,
|
|
178
|
+
`gh issue comment 1 --repo ${host} $ROUTING --body ${fixtureName}`,
|
|
179
|
+
2,
|
|
180
|
+
{ ROUTING: `--repo ${lisa}` },
|
|
181
|
+
],
|
|
182
|
+
[
|
|
183
|
+
"nonliteral consumed option value cannot earn target exemption",
|
|
184
|
+
hostCwd,
|
|
185
|
+
`gh issue create --repo ${host} --title "$TITLE" --body ${fixtureName}`,
|
|
186
|
+
2,
|
|
187
|
+
{ TITLE: "Unresolved title" },
|
|
188
|
+
],
|
|
189
|
+
[
|
|
190
|
+
"literal numeric selector keeps explicit host target",
|
|
191
|
+
lisaCwd,
|
|
192
|
+
`gh issue comment 1 --repo ${host} --body ${fixtureName}`,
|
|
193
|
+
0,
|
|
194
|
+
],
|
|
195
|
+
[
|
|
196
|
+
"standalone unexported repository assignment cannot certify a target",
|
|
197
|
+
lisaCwd,
|
|
198
|
+
`GH_REPO=${host}; gh issue create --body ${fixtureName}`,
|
|
199
|
+
2,
|
|
200
|
+
],
|
|
201
|
+
[
|
|
202
|
+
"API input alone defaults to inspected POST",
|
|
203
|
+
hostCwd,
|
|
204
|
+
`gh api repos/${lisa}/issues --input '${body}'`,
|
|
205
|
+
2,
|
|
206
|
+
],
|
|
207
|
+
[
|
|
208
|
+
"API input explicit POST remains inspected",
|
|
209
|
+
hostCwd,
|
|
210
|
+
`gh api repos/${lisa}/issues --method POST --input '${body}'`,
|
|
211
|
+
2,
|
|
212
|
+
],
|
|
213
|
+
[
|
|
214
|
+
"API input explicit GET remains read only",
|
|
215
|
+
hostCwd,
|
|
216
|
+
`gh api repos/${lisa}/issues --method GET --input '${body}'`,
|
|
217
|
+
0,
|
|
218
|
+
],
|
|
219
|
+
[
|
|
220
|
+
"API input to verified host remains allowed",
|
|
221
|
+
lisaCwd,
|
|
222
|
+
`gh api repos/${host}/issues --input '${body}'`,
|
|
223
|
+
0,
|
|
224
|
+
],
|
|
225
|
+
[
|
|
226
|
+
"mixed host and Lisa issue URLs retain protection",
|
|
227
|
+
hostCwd,
|
|
228
|
+
`gh issue edit https://github.com/${host}/issues/1 https://github.com/${lisa}/issues/2 --body ${fixtureName}`,
|
|
229
|
+
2,
|
|
230
|
+
],
|
|
231
|
+
[
|
|
232
|
+
"host URL and numeric selectors select the common host",
|
|
233
|
+
hostCwd,
|
|
234
|
+
`gh issue edit https://github.com/${host}/issues/1 2 --body ${fixtureName}`,
|
|
235
|
+
0,
|
|
236
|
+
],
|
|
237
|
+
[
|
|
238
|
+
"same-host URL selectors select the common host",
|
|
239
|
+
hostCwd,
|
|
240
|
+
`gh issue edit https://github.com/${host}/issues/1 https://github.com/${host}/issues/2 --body ${fixtureName}`,
|
|
241
|
+
0,
|
|
242
|
+
],
|
|
243
|
+
[
|
|
244
|
+
"host URL batch outranks conflicting Lisa repo flag",
|
|
245
|
+
lisaCwd,
|
|
246
|
+
`gh issue edit https://github.com/${host}/issues/1 https://github.com/${host}/issues/2 --repo ${lisa} --body ${fixtureName}`,
|
|
247
|
+
0,
|
|
248
|
+
],
|
|
249
|
+
[
|
|
250
|
+
"host URL with numeric selector outranks Lisa repo flag",
|
|
251
|
+
lisaCwd,
|
|
252
|
+
`gh issue edit https://github.com/${host}/issues/1 2 --repo ${lisa} --body ${fixtureName}`,
|
|
253
|
+
0,
|
|
254
|
+
],
|
|
255
|
+
[
|
|
256
|
+
"numeric selector before host URL inherits the URL repository",
|
|
257
|
+
lisaCwd,
|
|
258
|
+
`gh issue edit 2 https://github.com/${host}/issues/1 --repo ${lisa} --body ${fixtureName}`,
|
|
259
|
+
0,
|
|
260
|
+
],
|
|
261
|
+
[
|
|
262
|
+
"protected URL batch outranks conflicting host repo flag",
|
|
263
|
+
hostCwd,
|
|
264
|
+
`gh issue edit https://github.com/${lisa}/issues/1 https://github.com/${lisa}/issues/2 --repo ${host} --body ${fixtureName}`,
|
|
265
|
+
2,
|
|
266
|
+
],
|
|
267
|
+
[
|
|
268
|
+
"protected URL with numeric selector outranks host repo flag",
|
|
269
|
+
hostCwd,
|
|
270
|
+
`gh issue edit https://github.com/${lisa}/issues/1 '#2' --repo ${host} --body ${fixtureName}`,
|
|
271
|
+
2,
|
|
272
|
+
],
|
|
273
|
+
[
|
|
274
|
+
"numeric-only issue batch retains explicit host fallback",
|
|
275
|
+
lisaCwd,
|
|
276
|
+
`gh issue edit 1 2 --repo ${host} --body ${fixtureName}`,
|
|
277
|
+
0,
|
|
278
|
+
],
|
|
279
|
+
[
|
|
280
|
+
"numeric-only issue batch retains protected fallback",
|
|
281
|
+
hostCwd,
|
|
282
|
+
`gh issue edit 1 2 --repo ${lisa} --body ${fixtureName}`,
|
|
283
|
+
2,
|
|
284
|
+
],
|
|
285
|
+
[
|
|
286
|
+
"same owner and repository on different URL hosts stay unknown",
|
|
287
|
+
hostCwd,
|
|
288
|
+
`gh issue edit https://github.com/${host}/issues/1 https://other.example/${host}/issues/2 --body ${fixtureName}`,
|
|
289
|
+
2,
|
|
290
|
+
],
|
|
291
|
+
[
|
|
292
|
+
"issue URL repository suffixes remain distinct batch identities",
|
|
293
|
+
hostCwd,
|
|
294
|
+
`gh issue edit https://github.com/${host}/issues/1 https://github.com/${host}.git/issues/2 --body ${fixtureName}`,
|
|
295
|
+
2,
|
|
296
|
+
],
|
|
297
|
+
[
|
|
298
|
+
"invalid selector cannot inherit a host URL repository",
|
|
299
|
+
hostCwd,
|
|
300
|
+
`gh issue edit https://github.com/${host}/issues/1 not-an-issue --body ${fixtureName}`,
|
|
301
|
+
2,
|
|
302
|
+
],
|
|
303
|
+
[
|
|
304
|
+
"nonliteral batch selector cannot inherit a host URL repository",
|
|
305
|
+
hostCwd,
|
|
306
|
+
`gh issue edit https://github.com/${host}/issues/1 $ISSUE_NUMBERS --body ${fixtureName}`,
|
|
307
|
+
2,
|
|
308
|
+
{ ISSUE_NUMBERS: "2" },
|
|
309
|
+
],
|
|
310
|
+
[
|
|
311
|
+
"issue comment retains single-selector boundary",
|
|
312
|
+
hostCwd,
|
|
313
|
+
`gh issue comment https://github.com/${host}/issues/1 https://github.com/${host}/issues/2 --body ${fixtureName}`,
|
|
314
|
+
2,
|
|
315
|
+
],
|
|
316
|
+
[
|
|
317
|
+
"PR edit retains single-selector boundary",
|
|
318
|
+
hostCwd,
|
|
319
|
+
`gh pr edit https://github.com/${host}/pull/1 https://github.com/${host}/pull/2 --body ${fixtureName}`,
|
|
320
|
+
2,
|
|
321
|
+
],
|
|
322
|
+
[
|
|
323
|
+
"unanimous host URL batch compares repository case insensitively",
|
|
324
|
+
lisaCwd,
|
|
325
|
+
`gh issue edit https://github.com/${host}/issues/1 https://github.com/${host.toUpperCase()}/issues/2 --repo ${lisa} --body ${fixtureName}`,
|
|
326
|
+
0,
|
|
327
|
+
],
|
|
328
|
+
];
|
|
329
|
+
for (const noun of ["issue", "pr"])
|
|
330
|
+
for (const verb of ["comment", "edit"]) {
|
|
331
|
+
const kind = noun === "issue" ? "issues" : "pull";
|
|
332
|
+
cases.push(
|
|
333
|
+
[
|
|
334
|
+
`${noun} ${verb} positional Lisa URL outranks host origin`,
|
|
335
|
+
hostCwd,
|
|
336
|
+
`gh ${noun} ${verb} https://github.com/${lisa}/${kind}/1 --body ${fixtureName}`,
|
|
337
|
+
2,
|
|
338
|
+
],
|
|
339
|
+
[
|
|
340
|
+
`${noun} ${verb} positional Lisa URL outranks host repo flag`,
|
|
341
|
+
hostCwd,
|
|
342
|
+
`gh ${noun} ${verb} https://github.com/${lisa}/${kind}/1 --repo ${host} --body ${fixtureName}`,
|
|
343
|
+
2,
|
|
344
|
+
],
|
|
345
|
+
[
|
|
346
|
+
`${noun} ${verb} positional host URL outranks Lisa repo flag`,
|
|
347
|
+
lisaCwd,
|
|
348
|
+
`gh ${noun} ${verb} https://github.com/${host}/${kind}/1 --repo ${lisa} --body ${fixtureName}`,
|
|
349
|
+
0,
|
|
350
|
+
]
|
|
351
|
+
);
|
|
352
|
+
}
|
|
353
|
+
return cases;
|
|
354
|
+
}
|
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
/** Named real-wrapper cases; only synthetic identities are used. */
|
|
2
|
+
export function hostNameTargetCases({
|
|
3
|
+
hostCwd,
|
|
4
|
+
lisaCwd,
|
|
5
|
+
unknownCwd,
|
|
6
|
+
body,
|
|
7
|
+
selectedLisa,
|
|
8
|
+
selectedHost,
|
|
9
|
+
relative,
|
|
10
|
+
quotedHost,
|
|
11
|
+
ambiguous,
|
|
12
|
+
fixtureName,
|
|
13
|
+
lisa,
|
|
14
|
+
host,
|
|
15
|
+
}) {
|
|
16
|
+
return [
|
|
17
|
+
[
|
|
18
|
+
"host explicit --repo allowed",
|
|
19
|
+
hostCwd,
|
|
20
|
+
`gh pr create --repo ${host} --title t --body-file ${body}`,
|
|
21
|
+
0,
|
|
22
|
+
],
|
|
23
|
+
[
|
|
24
|
+
"host explicit -R allowed",
|
|
25
|
+
hostCwd,
|
|
26
|
+
`gh issue create -R ${host} --title t --body-file ${body}`,
|
|
27
|
+
0,
|
|
28
|
+
],
|
|
29
|
+
[
|
|
30
|
+
"host explicit --repo= allowed",
|
|
31
|
+
hostCwd,
|
|
32
|
+
`gh issue create --repo=${host} --title t --body-file ${body}`,
|
|
33
|
+
0,
|
|
34
|
+
],
|
|
35
|
+
[
|
|
36
|
+
"host API endpoint allowed",
|
|
37
|
+
hostCwd,
|
|
38
|
+
`gh api repos/${host}/issues -X POST -f body=${fixtureName}`,
|
|
39
|
+
0,
|
|
40
|
+
],
|
|
41
|
+
[
|
|
42
|
+
"host origin allowed",
|
|
43
|
+
hostCwd,
|
|
44
|
+
`gh issue create --title t --body-file ${body}`,
|
|
45
|
+
0,
|
|
46
|
+
],
|
|
47
|
+
[
|
|
48
|
+
"protected explicit target blocked from host checkout",
|
|
49
|
+
hostCwd,
|
|
50
|
+
`gh issue create --repo ${lisa} --title t --body-file ${body}`,
|
|
51
|
+
2,
|
|
52
|
+
],
|
|
53
|
+
[
|
|
54
|
+
"protected origin blocked",
|
|
55
|
+
lisaCwd,
|
|
56
|
+
`gh issue create --title t --body-file ${body}`,
|
|
57
|
+
2,
|
|
58
|
+
],
|
|
59
|
+
[
|
|
60
|
+
"unknown target remains blocked",
|
|
61
|
+
unknownCwd,
|
|
62
|
+
`gh issue create --title t --body-file ${body}`,
|
|
63
|
+
2,
|
|
64
|
+
],
|
|
65
|
+
[
|
|
66
|
+
"protected clean body allowed",
|
|
67
|
+
lisaCwd,
|
|
68
|
+
`gh pr create --repo ${lisa} --title t --body 'A clean report.'`,
|
|
69
|
+
0,
|
|
70
|
+
],
|
|
71
|
+
[
|
|
72
|
+
"protected read-only request allowed",
|
|
73
|
+
lisaCwd,
|
|
74
|
+
`gh api repos/${lisa}/issues -X GET -F body=@${body}`,
|
|
75
|
+
0,
|
|
76
|
+
],
|
|
77
|
+
[
|
|
78
|
+
"API explicit POST field-file control blocked",
|
|
79
|
+
hostCwd,
|
|
80
|
+
`gh api repos/${lisa}/issues -X POST -F body=@${body}`,
|
|
81
|
+
2,
|
|
82
|
+
],
|
|
83
|
+
[
|
|
84
|
+
"review's See-repos body example remains blocked control",
|
|
85
|
+
lisaCwd,
|
|
86
|
+
`gh pr create --title t --body 'See repos/${host}/issues: ${fixtureName}'`,
|
|
87
|
+
2,
|
|
88
|
+
],
|
|
89
|
+
[
|
|
90
|
+
"API-path-leading body cannot exempt protected write",
|
|
91
|
+
lisaCwd,
|
|
92
|
+
`gh pr create --title t --body 'repos/${host}/issues: ${fixtureName}'`,
|
|
93
|
+
2,
|
|
94
|
+
],
|
|
95
|
+
[
|
|
96
|
+
"API unresolved placeholders retain protection",
|
|
97
|
+
lisaCwd,
|
|
98
|
+
`gh api 'repos/{owner}/{repo}/issues' -f body=${fixtureName}`,
|
|
99
|
+
2,
|
|
100
|
+
],
|
|
101
|
+
[
|
|
102
|
+
"API -F default POST is inspected",
|
|
103
|
+
hostCwd,
|
|
104
|
+
`gh api repos/${lisa}/issues -F body=@${body}`,
|
|
105
|
+
2,
|
|
106
|
+
],
|
|
107
|
+
[
|
|
108
|
+
"effective cd into protected checkout retains protection",
|
|
109
|
+
hostCwd,
|
|
110
|
+
`cd '${lisaCwd}' && gh issue create --title t --body '${fixtureName}'`,
|
|
111
|
+
2,
|
|
112
|
+
],
|
|
113
|
+
[
|
|
114
|
+
"effective cd into host checkout permits host naming itself",
|
|
115
|
+
lisaCwd,
|
|
116
|
+
`cd '${hostCwd}' && gh issue create --title t --body '${fixtureName}'`,
|
|
117
|
+
0,
|
|
118
|
+
],
|
|
119
|
+
[
|
|
120
|
+
"relative body file follows effective command cwd",
|
|
121
|
+
lisaCwd,
|
|
122
|
+
`cd '${relative}' && gh pr create --repo ${lisa} --title t --body-file body.md`,
|
|
123
|
+
2,
|
|
124
|
+
],
|
|
125
|
+
[
|
|
126
|
+
"GH_REPO protected override outranks host origin",
|
|
127
|
+
hostCwd,
|
|
128
|
+
`gh issue create --title t --body-file ${body}`,
|
|
129
|
+
2,
|
|
130
|
+
{ GH_REPO: lisa },
|
|
131
|
+
],
|
|
132
|
+
[
|
|
133
|
+
"GH_REPO host override outranks protected origin",
|
|
134
|
+
lisaCwd,
|
|
135
|
+
`gh issue create --title t --body-file ${body}`,
|
|
136
|
+
0,
|
|
137
|
+
{ GH_REPO: host },
|
|
138
|
+
],
|
|
139
|
+
[
|
|
140
|
+
"selected protected default outranks host origin",
|
|
141
|
+
selectedLisa,
|
|
142
|
+
`gh issue create --title t --body-file ${body}`,
|
|
143
|
+
2,
|
|
144
|
+
],
|
|
145
|
+
[
|
|
146
|
+
"selected host default outranks protected origin",
|
|
147
|
+
selectedHost,
|
|
148
|
+
`gh issue create --title t --body-file ${body}`,
|
|
149
|
+
0,
|
|
150
|
+
],
|
|
151
|
+
|
|
152
|
+
[
|
|
153
|
+
"literal GH_REPO assignment protects Lisa",
|
|
154
|
+
hostCwd,
|
|
155
|
+
`GH_REPO=${lisa} gh issue create --title t --body-file ${body}`,
|
|
156
|
+
2,
|
|
157
|
+
],
|
|
158
|
+
[
|
|
159
|
+
"literal assignment overrides inherited GH_REPO",
|
|
160
|
+
lisaCwd,
|
|
161
|
+
`GH_REPO=${host} gh issue create --title t --body-file ${body}`,
|
|
162
|
+
0,
|
|
163
|
+
{ GH_REPO: lisa },
|
|
164
|
+
],
|
|
165
|
+
[
|
|
166
|
+
"env GH_REPO assignment protects Lisa",
|
|
167
|
+
hostCwd,
|
|
168
|
+
`env GH_REPO=${lisa} gh issue create --title t --body-file ${body}`,
|
|
169
|
+
2,
|
|
170
|
+
],
|
|
171
|
+
[
|
|
172
|
+
"env GH_REPO assignment permits host",
|
|
173
|
+
lisaCwd,
|
|
174
|
+
`env GH_REPO=${host} gh issue create --title t --body-file ${body}`,
|
|
175
|
+
0,
|
|
176
|
+
],
|
|
177
|
+
[
|
|
178
|
+
"explicit host flag outranks GH_REPO",
|
|
179
|
+
lisaCwd,
|
|
180
|
+
`gh issue create --repo ${host} --title t --body-file ${body}`,
|
|
181
|
+
0,
|
|
182
|
+
{ GH_REPO: lisa },
|
|
183
|
+
],
|
|
184
|
+
[
|
|
185
|
+
"quoted directory separator stays literal",
|
|
186
|
+
lisaCwd,
|
|
187
|
+
`cd '${quotedHost}' && gh issue create --title t --body-file ${body}`,
|
|
188
|
+
0,
|
|
189
|
+
],
|
|
190
|
+
[
|
|
191
|
+
"quoted body separators cannot redirect target",
|
|
192
|
+
lisaCwd,
|
|
193
|
+
`gh pr create --title t --body '${fixtureName}; cd ${hostCwd} && gh issue create'`,
|
|
194
|
+
2,
|
|
195
|
+
],
|
|
196
|
+
[
|
|
197
|
+
"quoted repository-flag body stays prose",
|
|
198
|
+
lisaCwd,
|
|
199
|
+
`gh issue create --body '--repo=${host}'`,
|
|
200
|
+
2,
|
|
201
|
+
],
|
|
202
|
+
[
|
|
203
|
+
"last repository alias selects protected target",
|
|
204
|
+
hostCwd,
|
|
205
|
+
`gh issue create --repo ${host} -R ${lisa} --body-file ${body}`,
|
|
206
|
+
2,
|
|
207
|
+
],
|
|
208
|
+
[
|
|
209
|
+
"last repository alias selects host target",
|
|
210
|
+
lisaCwd,
|
|
211
|
+
`gh issue create --repo ${lisa} -R ${host} --body-file ${body}`,
|
|
212
|
+
0,
|
|
213
|
+
],
|
|
214
|
+
[
|
|
215
|
+
"last method alias makes a POST",
|
|
216
|
+
hostCwd,
|
|
217
|
+
`gh api repos/${lisa}/issues -X GET --method POST -F body=@${body}`,
|
|
218
|
+
2,
|
|
219
|
+
],
|
|
220
|
+
[
|
|
221
|
+
"last method alias keeps explicit GET read-only",
|
|
222
|
+
hostCwd,
|
|
223
|
+
`gh api repos/${lisa}/issues -X POST --method GET -F body=@${body}`,
|
|
224
|
+
0,
|
|
225
|
+
],
|
|
226
|
+
[
|
|
227
|
+
"attached -F defaults to POST",
|
|
228
|
+
hostCwd,
|
|
229
|
+
`gh api repos/${lisa}/issues -Fbody=@${body}`,
|
|
230
|
+
2,
|
|
231
|
+
],
|
|
232
|
+
[
|
|
233
|
+
"attached -R permits host target",
|
|
234
|
+
lisaCwd,
|
|
235
|
+
`gh issue create -R${host} --body-file ${body}`,
|
|
236
|
+
0,
|
|
237
|
+
],
|
|
238
|
+
[
|
|
239
|
+
"unsupported cwd prefix retains protection",
|
|
240
|
+
hostCwd,
|
|
241
|
+
`pushd '${lisaCwd}' && gh issue create --body ${fixtureName}`,
|
|
242
|
+
2,
|
|
243
|
+
],
|
|
244
|
+
[
|
|
245
|
+
"unresolved cwd retains protection",
|
|
246
|
+
hostCwd,
|
|
247
|
+
`cd "$UNKNOWN_DIRECTORY" && gh issue create --body ${fixtureName}`,
|
|
248
|
+
2,
|
|
249
|
+
],
|
|
250
|
+
[
|
|
251
|
+
"ambiguous unselected remotes retain protection",
|
|
252
|
+
ambiguous,
|
|
253
|
+
`gh issue create --body-file ${body}`,
|
|
254
|
+
2,
|
|
255
|
+
],
|
|
256
|
+
[
|
|
257
|
+
"host API placeholders resolve safely",
|
|
258
|
+
hostCwd,
|
|
259
|
+
`gh api 'repos/{owner}/{repo}/issues' -f body=${fixtureName}`,
|
|
260
|
+
0,
|
|
261
|
+
],
|
|
262
|
+
[
|
|
263
|
+
"unresolved repository flag retains protection",
|
|
264
|
+
hostCwd,
|
|
265
|
+
`gh issue create --repo '$UNKNOWN_REPOSITORY' --body ${fixtureName}`,
|
|
266
|
+
2,
|
|
267
|
+
],
|
|
268
|
+
[
|
|
269
|
+
"each command in a list retains protection",
|
|
270
|
+
hostCwd,
|
|
271
|
+
`gh issue create --repo ${host} --body ${fixtureName}; gh issue create --repo ${lisa} --body ${fixtureName}`,
|
|
272
|
+
2,
|
|
273
|
+
],
|
|
274
|
+
[
|
|
275
|
+
"actual cwd is separate from detector root",
|
|
276
|
+
relative,
|
|
277
|
+
`gh issue create --repo ${lisa} --body-file body.md`,
|
|
278
|
+
2,
|
|
279
|
+
{ CLAUDE_PROJECT_DIR: lisaCwd },
|
|
280
|
+
],
|
|
281
|
+
[
|
|
282
|
+
"unknown cwd cannot silently inspect a relative body file elsewhere",
|
|
283
|
+
lisaCwd,
|
|
284
|
+
'cd "$UNKNOWN_DIRECTORY" && gh issue create --repo CodySwannGT/lisa --body-file body.md',
|
|
285
|
+
2,
|
|
286
|
+
{},
|
|
287
|
+
"BLOCKED: the working directory",
|
|
288
|
+
],
|
|
289
|
+
[
|
|
290
|
+
"unknown cwd cannot silently inspect a relative API field elsewhere",
|
|
291
|
+
lisaCwd,
|
|
292
|
+
'cd "$UNKNOWN_DIRECTORY" && gh api repos/CodySwannGT/lisa/issues --field body=@body.md',
|
|
293
|
+
2,
|
|
294
|
+
{},
|
|
295
|
+
"BLOCKED: the working directory",
|
|
296
|
+
],
|
|
297
|
+
];
|
|
298
|
+
}
|