Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
1 change: 1 addition & 0 deletions Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
python3-venv=3.11.2-1+b1 \
curl=7.88.1-10+deb12u14 \
git=1:2.39.5-0+deb12u3 \
gnupg=2.2.40-1.1+deb12u2 \
ca-certificates=20230311+deb12u1 \
iproute2=6.1.0-3 \
iptables=1.8.9-2 \
Expand Down
6 changes: 4 additions & 2 deletions scripts/nemoclaw-start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,14 @@ done
if [ "$(id -u)" -eq 0 ]; then
install -d -o sandbox -g sandbox -m 755 \
/tmp/.npm-cache /tmp/.cache /tmp/.config /tmp/.local/share \
/tmp/.local/state /tmp/.runtime /tmp/.gnupg /tmp/.claude \
/tmp/.local/state /tmp/.runtime /tmp/.claude \
/tmp/npm-global
install -d -o sandbox -g sandbox -m 700 /tmp/.gnupg
else
mkdir -p /tmp/.npm-cache /tmp/.cache /tmp/.config /tmp/.local/share \
/tmp/.local/state /tmp/.runtime /tmp/.gnupg /tmp/.claude \
/tmp/.local/state /tmp/.runtime /tmp/.claude \
/tmp/npm-global
install -d -m 700 /tmp/.gnupg
fi

# ── Drop unnecessary Linux capabilities ──────────────────────────
Expand Down
8 changes: 7 additions & 1 deletion test/service-env.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,15 @@ describe("service environment", () => {
expect(src).toContain("/tmp/.config");
expect(src).toContain("/tmp/.cache");
expect(src).toContain("/tmp/.local/share");
expect(src).toContain("/tmp/.gnupg");
expect(src).toContain("/tmp/npm-global");
});

it("entrypoint creates GNUPGHOME with restrictive permissions", () => {
const scriptPath = join(import.meta.dirname, "../scripts/nemoclaw-start.sh");
const src = readFileSync(scriptPath, "utf-8");
expect(src).toContain("install -d -o sandbox -g sandbox -m 700 /tmp/.gnupg");
expect(src).toContain("install -d -m 700 /tmp/.gnupg");
});
});

describe("proxy environment variables (issue #626)", () => {
Expand Down
Loading