You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(file): clamp a declared mount cap, and demand identity not full metadata
sandboxFiles reaches the sandbox layer from the request body, so a declared
maxBytes is a caller's number. It may now lower its own mount's ceiling but
never raise it past the one that layer guarantees.
The write path required full UserFile metadata, but size is never read
before the download and the download reports the real content type — so a
reference carrying id, key, url and name was rejected over two fields
nothing depends on. It now asks only for identity and fills the rest.
Uploads already made are also discarded when a later upload throws, not
only when a later file is refused for carrying a secret. Both exits leave
the harvest all-or-nothing.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`Sandbox output file "${name}" contains a resolved secret value and was not returned. Write the file without embedding secret values, or export it to a workspace file where its provenance can be recorded.`,
1986
-
400,
1987
-
args.stdout,
1988
-
args.executionTime
1989
-
),
1958
+
// The harvest is all-or-nothing, so a throw partway through has to take the
1959
+
// uploads that already succeeded with it. Without this they linger in storage
1960
+
// with nothing referencing them, since the failure response carries no keys.
`Sandbox output file "${name}" contains a resolved secret value and was not returned. Write the file without embedding secret values, or export it to a workspace file where its provenance can be recorded.`,
1990
+
400,
1991
+
args.stdout,
1992
+
args.executionTime
1993
+
),
1994
+
}
1990
1995
}
1991
1996
}
1992
-
}
1993
1997
1994
-
constuserFile=awaituploadExecutionFile(
1995
-
{
1996
-
workspaceId: resolvedWorkspaceId,
1997
-
workflowId: args.workflowId,
1998
-
executionId: args.executionId,
1999
-
},
2000
-
buffer,
2001
-
name,
2002
-
mimeType,
2003
-
args.authUserId
2004
-
)
2005
-
files.push(userFile)
1998
+
constuserFile=awaituploadExecutionFile(
1999
+
{
2000
+
workspaceId: resolvedWorkspaceId,
2001
+
workflowId: args.workflowId,
2002
+
executionId: args.executionId,
2003
+
},
2004
+
buffer,
2005
+
name,
2006
+
mimeType,
2007
+
args.authUserId
2008
+
)
2009
+
files.push(userFile)
2010
+
}
2011
+
}catch(error){
2012
+
awaitdiscardUploadedExecutionFiles(files)
2013
+
throwerror
2006
2014
}
2007
2015
2008
2016
// Registers the new keys on the execution so downstream blocks are authorized
0 commit comments