@@ -202,6 +202,66 @@ const unsafeRuntimeInvocationCases: UnsafeRuntimeInvocationCase[] = [
202202 tmpPrefix : "openclaw-tsx-eval-" ,
203203 command : [ "tsx" , "--eval" , "console.log('SAFE')" ] ,
204204 } ,
205+ {
206+ name : "rejects busybox applets that cannot be safely bound" ,
207+ binName : "busybox" ,
208+ tmpPrefix : "openclaw-busybox-awk-" ,
209+ command : [ "busybox" , "awk" , 'BEGIN{system("id")}' ] ,
210+ } ,
211+ {
212+ name : "rejects busybox applets even when cwd contains a file named after the applet" ,
213+ binName : "busybox" ,
214+ tmpPrefix : "openclaw-busybox-awk-file-bait-" ,
215+ command : [ "busybox" , "awk" , 'BEGIN{system("id")}' ] ,
216+ setup : ( tmp ) => {
217+ fs . writeFileSync ( path . join ( tmp , "awk" ) , "bait\n" ) ;
218+ } ,
219+ } ,
220+ {
221+ name : "rejects busybox shell applets that forward inline commands" ,
222+ binName : "busybox" ,
223+ tmpPrefix : "openclaw-busybox-shell-inline-" ,
224+ command : [ "busybox" , "sh" , "-c" , "echo SAFE" ] ,
225+ } ,
226+ {
227+ name : "rejects busybox shell applets with script file operands" ,
228+ binName : "busybox" ,
229+ tmpPrefix : "openclaw-busybox-shell-file-" ,
230+ command : [ "busybox" , "sh" , "./run.sh" ] ,
231+ setup : ( tmp ) => {
232+ fs . writeFileSync ( path . join ( tmp , "run.sh" ) , "#!/bin/sh\necho SAFE\n" ) ;
233+ } ,
234+ } ,
235+ {
236+ name : "rejects toybox applets that cannot be safely bound" ,
237+ binName : "toybox" ,
238+ tmpPrefix : "openclaw-toybox-awk-" ,
239+ command : [ "toybox" , "awk" , 'BEGIN{system("id")}' ] ,
240+ } ,
241+ {
242+ name : "rejects toybox applets even when cwd contains a file named after the applet" ,
243+ binName : "toybox" ,
244+ tmpPrefix : "openclaw-toybox-awk-file-bait-" ,
245+ command : [ "toybox" , "awk" , 'BEGIN{system("id")}' ] ,
246+ setup : ( tmp ) => {
247+ fs . writeFileSync ( path . join ( tmp , "awk" ) , "bait\n" ) ;
248+ } ,
249+ } ,
250+ {
251+ name : "rejects toybox shell applets that forward inline commands" ,
252+ binName : "toybox" ,
253+ tmpPrefix : "openclaw-toybox-shell-inline-" ,
254+ command : [ "toybox" , "ash" , "-lc" , "echo SAFE" ] ,
255+ } ,
256+ {
257+ name : "rejects toybox shell applets with script file operands" ,
258+ binName : "toybox" ,
259+ tmpPrefix : "openclaw-toybox-shell-file-" ,
260+ command : [ "toybox" , "ash" , "./run.sh" ] ,
261+ setup : ( tmp ) => {
262+ fs . writeFileSync ( path . join ( tmp , "run.sh" ) , "#!/bin/sh\necho SAFE\n" ) ;
263+ } ,
264+ } ,
205265 {
206266 name : "rejects node inline import operands that cannot be bound to one stable file" ,
207267 binName : "node" ,
0 commit comments