Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Container image for triage pipeline sandboxes. Pin the base image to the
# exact @cloudflare/sandbox SDK version in package.json.
FROM docker.io/cloudflare/sandbox:0.12.3
FROM docker.io/cloudflare/sandbox:0.12.5

RUN apt-get update \
&& apt-get install -y --no-install-recommends \
Expand Down Expand Up @@ -29,4 +29,8 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs \
| sh -s -- -y --no-modify-path --profile minimal --default-toolchain none \
&& chmod -R a+w "$RUSTUP_HOME" "$CARGO_HOME"

# Adversary agent commands run as this user while the sandbox control plane
# remains root for the other workflows that share this image.
RUN useradd --create-home --shell /bin/bash sandbox-agent

EXPOSE 8080
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"dependencies": {
"@biomejs/biome": "2.5.9",
"@cloudflare/codemode": "^0.5.1",
"@cloudflare/sandbox": "^0.12.3",
"@cloudflare/sandbox": "0.12.5",
"@flue/github": "^2.0.3",
"@flue/runtime": "^2.0.3",
"hono": "4.12.32",
Expand Down
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions src/adversary/agents/blue-team.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,13 @@ export function BlueTeam() {
env as unknown as AdversarySandboxEnv,
input.sandboxId,
);
useSandbox(adversaryAgentSandbox(sandbox, BLUE_DIR, input.skill.name), {
cwd: BLUE_DIR,
});
useSandbox(
adversaryAgentSandbox(sandbox, {
cwd: BLUE_DIR,
mountedSkillName: input.skill.name,
}),
{ cwd: BLUE_DIR },
);

const writeResult = useDataWriter('result', { schema: blueTeamResultSchema });
useTool({
Expand Down
12 changes: 9 additions & 3 deletions src/adversary/agents/purple-team.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,15 @@ export function PurpleTeam() {
env as unknown as AdversarySandboxEnv,
input.sandboxId,
);
useSandbox(adversaryAgentSandbox(sandbox, RED_DIR, input.skill.name), {
cwd: RED_DIR,
});
useSandbox(
adversaryAgentSandbox(sandbox, {
cwd: RED_DIR,
mountedSkillName: input.skill.name,
readablePaths: [RED_DIR, BLUE_DIR, BLUE_PATCH_PATH],
writablePaths: [RED_DIR, BLUE_DIR],
}),
{ cwd: RED_DIR },
);

const writeResult = useDataWriter('result', {
schema: purpleTeamResultSchema,
Expand Down
Loading
Loading