Skip to content

Commit 63a4770

Browse files
sjarmakclaude
andcommitted
fix: close git history bypass in sg_only mode and strip scoring from instructions
Two issues found in staging audit: 1. Git bypass: agents used `git show HEAD:` and `git checkout HEAD --` to recover full source from git history, completely defeating sg_only truncation. Fix: after truncating source files, recommit the truncated state so HEAD reflects empty files. Verifier unaffected (restores from /repo_full/ backup). Regenerated all 66 build-requiring Dockerfile.sg_only. 2. Scoring contamination: 7 code-review, 1 doc-gen, 1 security, and 1 perf instruction.md files contained exact scoring formulas (F1, ground truth, fix_score weights). Replaced with vague "evaluated on detection accuracy and fix quality" to prevent gaming. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 2e56ec6 commit 63a4770

File tree

92 files changed

+648
-723
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+648
-723
lines changed

benchmarks/ccb_build/bustub-hyperloglog-impl-001/environment/Dockerfile.sg_only

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,9 @@ ENV DECRYPTION_KEY="theagentcompany is all you need"
1919
# --- sg_only_env: back up full repo, then truncate source ---
2020
RUN cp -a /workspace /repo_full
2121
RUN find /workspace -type f \( -name "*.py" -o -name "*.pyx" -o -name "*.pyi" -o -name "*.js" -o -name "*.ts" -o -name "*.jsx" -o -name "*.tsx" -o -name "*.mjs" -o -name "*.cjs" -o -name "*.mts" -o -name "*.cts" -o -name "*.go" -o -name "*.java" -o -name "*.kt" -o -name "*.scala" -o -name "*.groovy" -o -name "*.clj" -o -name "*.c" -o -name "*.cc" -o -name "*.cpp" -o -name "*.cxx" -o -name "*.h" -o -name "*.hh" -o -name "*.hpp" -o -name "*.hxx" -o -name "*.rs" -o -name "*.rb" -o -name "*.cs" -o -name "*.fs" -o -name "*.swift" -o -name "*.m" -o -name "*.mm" -o -name "*.vue" -o -name "*.svelte" -o -name "*.sh" -o -name "*.bash" -o -name "*.zsh" -o -name "*.lua" -o -name "*.proto" -o -name "*.thrift" -o -name "*.avsc" -o -name "*.fbs" -o -name "*.yaml" -o -name "*.yml" -o -name "*.toml" -o -name "*.json" -o -name "*.xml" -o -name "*.ini" -o -name "*.cfg" -o -name "*.md" -o -name "*.rst" -o -name "*.txt" -o -name "*.adoc" -o -name "*.cmake" -o -name "*.bzl" -o -name "*.bazel" -o -name "*.sql" -o -name "*.erl" -o -name "*.ex" -o -name "*.exs" -o -name "*.php" -o -name "*.pl" -o -name "*.pm" -o -name "*.r" -o -name "*.R" \) ! -path "*/.git/*" -exec truncate -s 0 {} \;
22+
# Recommit truncated state so git history cannot recover full files.
23+
# Without this, `git show HEAD:<file>` or `git checkout HEAD -- <file>`
24+
# would bypass truncation by reading from the pre-truncation commit.
25+
RUN cd /workspace && git add -A && git commit -m "sg_only truncation" --allow-empty --quiet
2226
RUN touch /tmp/.sg_only_mode && echo '/workspace' > /tmp/.sg_only_workdir
2327
CMD ["bash"]

benchmarks/ccb_build/cgen-deps-install-001/environment/Dockerfile.sg_only

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# dibench-python-inducer-cgen — sg_only_env variant
1+
# cgen-deps-install-001 — sg_only_env variant
22
# Source files truncated so agent must use Sourcegraph MCP for code access.
33
# Verifier wrapper restores full repo before running tests.
44

55
FROM ubuntu:22.04
66

77
ENV DEBIAN_FRONTEND=noninteractive
88

9-
RUN apt-get update -qq && apt-get install -y -qq \
9+
RUN apt-get update -qq && apt-get install -y -qq --no-install-recommends \
1010
python3 python3-pip git curl ca-certificates \
1111
&& rm -rf /var/lib/apt/lists/*
1212

@@ -17,9 +17,12 @@ COPY repo /app/repo
1717
WORKDIR /app/repo
1818

1919
# --- sg_only_env: back up full repo, then truncate source ---
20-
RUN apt-get update && apt-get install -y --no-install-recommends rsync && rm -rf /var/lib/apt/lists/* || true
2120
RUN cp -a /app/repo /repo_full
2221
RUN find /app/repo -type f \( -name "*.py" -o -name "*.pyx" -o -name "*.pyi" -o -name "*.js" -o -name "*.ts" -o -name "*.jsx" -o -name "*.tsx" -o -name "*.mjs" -o -name "*.cjs" -o -name "*.mts" -o -name "*.cts" -o -name "*.go" -o -name "*.java" -o -name "*.kt" -o -name "*.scala" -o -name "*.groovy" -o -name "*.clj" -o -name "*.c" -o -name "*.cc" -o -name "*.cpp" -o -name "*.cxx" -o -name "*.h" -o -name "*.hh" -o -name "*.hpp" -o -name "*.hxx" -o -name "*.rs" -o -name "*.rb" -o -name "*.cs" -o -name "*.fs" -o -name "*.swift" -o -name "*.m" -o -name "*.mm" -o -name "*.vue" -o -name "*.svelte" -o -name "*.sh" -o -name "*.bash" -o -name "*.zsh" -o -name "*.lua" -o -name "*.proto" -o -name "*.thrift" -o -name "*.avsc" -o -name "*.fbs" -o -name "*.yaml" -o -name "*.yml" -o -name "*.toml" -o -name "*.json" -o -name "*.xml" -o -name "*.ini" -o -name "*.cfg" -o -name "*.md" -o -name "*.rst" -o -name "*.txt" -o -name "*.adoc" -o -name "*.cmake" -o -name "*.bzl" -o -name "*.bazel" -o -name "*.sql" -o -name "*.erl" -o -name "*.ex" -o -name "*.exs" -o -name "*.php" -o -name "*.pl" -o -name "*.pm" -o -name "*.r" -o -name "*.R" \) ! -path "*/.git/*" -exec truncate -s 0 {} \;
22+
# Recommit truncated state so git history cannot recover full files.
23+
# Without this, `git show HEAD:<file>` or `git checkout HEAD -- <file>`
24+
# would bypass truncation by reading from the pre-truncation commit.
25+
RUN cd /app/repo && git add -A && git commit -m "sg_only truncation" --allow-empty --quiet
2326
RUN touch /tmp/.sg_only_mode && echo '/app/repo' > /tmp/.sg_only_workdir
2427

2528
WORKDIR /app/repo

benchmarks/ccb_build/codecoverage-deps-install-001/environment/Dockerfile.sg_only

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,32 @@
1-
# dibench-csharp-irongut-codecoveragesummary — sg_only_env variant
1+
# codecoverage-deps-install-001 — sg_only_env variant
22
# Source files truncated so agent must use Sourcegraph MCP for code access.
33
# Verifier wrapper restores full repo before running tests.
44

55
FROM ubuntu:22.04
66

77
ENV DEBIAN_FRONTEND=noninteractive
88

9-
RUN apt-get update -qq && apt-get install -y -qq \
9+
RUN apt-get update -qq && apt-get install -y -qq --no-install-recommends \
1010
python3 python3-pip git curl ca-certificates \
1111
&& rm -rf /var/lib/apt/lists/*
1212

1313
# Install .NET SDK
14-
RUN apt-get update -qq && apt-get install -y -qq wget && \
14+
RUN apt-get update -qq && apt-get install -y -qq --no-install-recommends wget && \
1515
wget -q https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb && \
1616
dpkg -i packages-microsoft-prod.deb && rm packages-microsoft-prod.deb && \
17-
apt-get update -qq && apt-get install -y -qq dotnet-sdk-8.0
17+
apt-get update -qq && apt-get install -y -qq --no-install-recommends dotnet-sdk-8.0
1818
# Copy repo
1919
COPY repo /app/repo
2020

2121
WORKDIR /app/repo
2222

2323
# --- sg_only_env: back up full repo, then truncate source ---
24-
RUN apt-get update && apt-get install -y --no-install-recommends rsync && rm -rf /var/lib/apt/lists/* || true
2524
RUN cp -a /app/repo /repo_full
2625
RUN find /app/repo -type f \( -name "*.py" -o -name "*.pyx" -o -name "*.pyi" -o -name "*.js" -o -name "*.ts" -o -name "*.jsx" -o -name "*.tsx" -o -name "*.mjs" -o -name "*.cjs" -o -name "*.mts" -o -name "*.cts" -o -name "*.go" -o -name "*.java" -o -name "*.kt" -o -name "*.scala" -o -name "*.groovy" -o -name "*.clj" -o -name "*.c" -o -name "*.cc" -o -name "*.cpp" -o -name "*.cxx" -o -name "*.h" -o -name "*.hh" -o -name "*.hpp" -o -name "*.hxx" -o -name "*.rs" -o -name "*.rb" -o -name "*.cs" -o -name "*.fs" -o -name "*.swift" -o -name "*.m" -o -name "*.mm" -o -name "*.vue" -o -name "*.svelte" -o -name "*.sh" -o -name "*.bash" -o -name "*.zsh" -o -name "*.lua" -o -name "*.proto" -o -name "*.thrift" -o -name "*.avsc" -o -name "*.fbs" -o -name "*.yaml" -o -name "*.yml" -o -name "*.toml" -o -name "*.json" -o -name "*.xml" -o -name "*.ini" -o -name "*.cfg" -o -name "*.md" -o -name "*.rst" -o -name "*.txt" -o -name "*.adoc" -o -name "*.cmake" -o -name "*.bzl" -o -name "*.bazel" -o -name "*.sql" -o -name "*.erl" -o -name "*.ex" -o -name "*.exs" -o -name "*.php" -o -name "*.pl" -o -name "*.pm" -o -name "*.r" -o -name "*.R" \) ! -path "*/.git/*" -exec truncate -s 0 {} \;
26+
# Recommit truncated state so git history cannot recover full files.
27+
# Without this, `git show HEAD:<file>` or `git checkout HEAD -- <file>`
28+
# would bypass truncation by reading from the pre-truncation commit.
29+
RUN cd /app/repo && git add -A && git commit -m "sg_only truncation" --allow-empty --quiet
2730
RUN touch /tmp/.sg_only_mode && echo '/app/repo' > /tmp/.sg_only_workdir
2831

2932
WORKDIR /app/repo
Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,27 @@
1-
# dep-refactor-002 — sg_only_env variant
2-
# Source files truncated so agent must use Sourcegraph MCP for code access.
3-
# Verifier wrapper restores full repo before running tests.
1+
# django-dep-refactor-001 — sg_only_env variant
2+
# No local repo clone — agent uses Sourcegraph MCP exclusively for code access.
43

5-
FROM golang:1.23-bookworm
4+
FROM ubuntu:22.04
65

7-
WORKDIR /workspace
6+
ENV DEBIAN_FRONTEND=noninteractive
87

9-
# Install dependencies
10-
RUN apt-get update && apt-get install -y \
8+
RUN apt-get update && apt-get install -y --no-install-recommends \
119
git \
10+
ca-certificates \
11+
python3 \
1212
curl \
13-
npm \
1413
&& rm -rf /var/lib/apt/lists/*
1514

16-
# Install Claude Code CLI
17-
RUN npm install -g @anthropic-ai/claude-code
15+
WORKDIR /workspace
1816

19-
# Clone Flipt at pinned commit
20-
RUN git clone --filter=blob:none --no-checkout https://github.com/flipt-io/flipt.git . && \
21-
git checkout 3d5a345f94c2adc8a0eaa102c189c08ad4c0f8e8 && \
17+
# Empty git repo so agent can commit work
18+
RUN git init && \
2219
git config user.email "agent@example.com" && \
2320
git config user.name "Agent"
2421

25-
# Download Go module dependencies
26-
RUN go mod download 2>/dev/null || true
22+
RUN mkdir -p /logs/agent /logs/verifier
2723

28-
# --- sg_only_env: back up full repo, then truncate source ---
29-
RUN apt-get update && apt-get install -y --no-install-recommends rsync && rm -rf /var/lib/apt/lists/* || true
30-
RUN cp -a /workspace /repo_full
31-
RUN find /workspace -type f \( -name "*.py" -o -name "*.pyx" -o -name "*.pyi" -o -name "*.js" -o -name "*.ts" -o -name "*.jsx" -o -name "*.tsx" -o -name "*.mjs" -o -name "*.cjs" -o -name "*.mts" -o -name "*.cts" -o -name "*.go" -o -name "*.java" -o -name "*.kt" -o -name "*.scala" -o -name "*.groovy" -o -name "*.clj" -o -name "*.c" -o -name "*.cc" -o -name "*.cpp" -o -name "*.cxx" -o -name "*.h" -o -name "*.hh" -o -name "*.hpp" -o -name "*.hxx" -o -name "*.rs" -o -name "*.rb" -o -name "*.cs" -o -name "*.fs" -o -name "*.swift" -o -name "*.m" -o -name "*.mm" -o -name "*.vue" -o -name "*.svelte" -o -name "*.sh" -o -name "*.bash" -o -name "*.zsh" -o -name "*.lua" -o -name "*.proto" -o -name "*.thrift" -o -name "*.avsc" -o -name "*.fbs" -o -name "*.yaml" -o -name "*.yml" -o -name "*.toml" -o -name "*.json" -o -name "*.xml" -o -name "*.ini" -o -name "*.cfg" -o -name "*.md" -o -name "*.rst" -o -name "*.txt" -o -name "*.adoc" -o -name "*.cmake" -o -name "*.bzl" -o -name "*.bazel" -o -name "*.sql" -o -name "*.erl" -o -name "*.ex" -o -name "*.exs" -o -name "*.php" -o -name "*.pl" -o -name "*.pm" -o -name "*.r" -o -name "*.R" \) ! -path "*/.git/*" ! -path "*/node_modules/*" -exec truncate -s 0 {} \;
32-
RUN touch /tmp/.sg_only_mode && echo '/workspace' > /tmp/.sg_only_workdir
33-
34-
WORKDIR /workspace
24+
# Mark sg_only mode so verifiers can skip local-path checks
25+
RUN touch /tmp/.sg_only_mode
3526

3627
ENTRYPOINT []

benchmarks/ccb_build/dotenv-expand-deps-install-001/environment/Dockerfile.sg_only

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,30 @@
1-
# dibench-js-motdotla-dotenv-expand — sg_only_env variant
1+
# dotenv-expand-deps-install-001 — sg_only_env variant
22
# Source files truncated so agent must use Sourcegraph MCP for code access.
33
# Verifier wrapper restores full repo before running tests.
44

55
FROM ubuntu:22.04
66

77
ENV DEBIAN_FRONTEND=noninteractive
88

9-
RUN apt-get update -qq && apt-get install -y -qq \
9+
RUN apt-get update -qq && apt-get install -y -qq --no-install-recommends \
1010
python3 python3-pip git curl ca-certificates \
1111
&& rm -rf /var/lib/apt/lists/*
1212

1313
# Install Node.js
1414
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
15-
apt-get install -y nodejs
15+
apt-get install -y --no-install-recommends nodejs
1616
# Copy repo
1717
COPY repo /app/repo
1818

1919
WORKDIR /app/repo
2020

2121
# --- sg_only_env: back up full repo, then truncate source ---
22-
RUN apt-get update && apt-get install -y --no-install-recommends rsync && rm -rf /var/lib/apt/lists/* || true
2322
RUN cp -a /app/repo /repo_full
2423
RUN find /app/repo -type f \( -name "*.py" -o -name "*.pyx" -o -name "*.pyi" -o -name "*.js" -o -name "*.ts" -o -name "*.jsx" -o -name "*.tsx" -o -name "*.mjs" -o -name "*.cjs" -o -name "*.mts" -o -name "*.cts" -o -name "*.go" -o -name "*.java" -o -name "*.kt" -o -name "*.scala" -o -name "*.groovy" -o -name "*.clj" -o -name "*.c" -o -name "*.cc" -o -name "*.cpp" -o -name "*.cxx" -o -name "*.h" -o -name "*.hh" -o -name "*.hpp" -o -name "*.hxx" -o -name "*.rs" -o -name "*.rb" -o -name "*.cs" -o -name "*.fs" -o -name "*.swift" -o -name "*.m" -o -name "*.mm" -o -name "*.vue" -o -name "*.svelte" -o -name "*.sh" -o -name "*.bash" -o -name "*.zsh" -o -name "*.lua" -o -name "*.proto" -o -name "*.thrift" -o -name "*.avsc" -o -name "*.fbs" -o -name "*.yaml" -o -name "*.yml" -o -name "*.toml" -o -name "*.json" -o -name "*.xml" -o -name "*.ini" -o -name "*.cfg" -o -name "*.md" -o -name "*.rst" -o -name "*.txt" -o -name "*.adoc" -o -name "*.cmake" -o -name "*.bzl" -o -name "*.bazel" -o -name "*.sql" -o -name "*.erl" -o -name "*.ex" -o -name "*.exs" -o -name "*.php" -o -name "*.pl" -o -name "*.pm" -o -name "*.r" -o -name "*.R" \) ! -path "*/.git/*" -exec truncate -s 0 {} \;
24+
# Recommit truncated state so git history cannot recover full files.
25+
# Without this, `git show HEAD:<file>` or `git checkout HEAD -- <file>`
26+
# would bypass truncation by reading from the pre-truncation commit.
27+
RUN cd /app/repo && git add -A && git commit -m "sg_only truncation" --allow-empty --quiet
2528
RUN touch /tmp/.sg_only_mode && echo '/app/repo' > /tmp/.sg_only_workdir
2629

2730
WORKDIR /app/repo

benchmarks/ccb_build/dotnetkoans-deps-install-001/environment/Dockerfile.sg_only

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,32 @@
1-
# dibench-csharp-dotnetkoans — sg_only_env variant
1+
# dotnetkoans-deps-install-001 — sg_only_env variant
22
# Source files truncated so agent must use Sourcegraph MCP for code access.
33
# Verifier wrapper restores full repo before running tests.
44

55
FROM ubuntu:22.04
66

77
ENV DEBIAN_FRONTEND=noninteractive
88

9-
RUN apt-get update -qq && apt-get install -y -qq \
9+
RUN apt-get update -qq && apt-get install -y -qq --no-install-recommends \
1010
python3 python3-pip git curl ca-certificates \
1111
&& rm -rf /var/lib/apt/lists/*
1212

1313
# Install .NET SDK
14-
RUN apt-get update -qq && apt-get install -y -qq wget && \
14+
RUN apt-get update -qq && apt-get install -y -qq --no-install-recommends wget && \
1515
wget -q https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb && \
1616
dpkg -i packages-microsoft-prod.deb && rm packages-microsoft-prod.deb && \
17-
apt-get update -qq && apt-get install -y -qq dotnet-sdk-8.0
17+
apt-get update -qq && apt-get install -y -qq --no-install-recommends dotnet-sdk-8.0
1818
# Copy repo
1919
COPY repo /app/repo
2020

2121
WORKDIR /app/repo
2222

2323
# --- sg_only_env: back up full repo, then truncate source ---
24-
RUN apt-get update && apt-get install -y --no-install-recommends rsync && rm -rf /var/lib/apt/lists/* || true
2524
RUN cp -a /app/repo /repo_full
2625
RUN find /app/repo -type f \( -name "*.py" -o -name "*.pyx" -o -name "*.pyi" -o -name "*.js" -o -name "*.ts" -o -name "*.jsx" -o -name "*.tsx" -o -name "*.mjs" -o -name "*.cjs" -o -name "*.mts" -o -name "*.cts" -o -name "*.go" -o -name "*.java" -o -name "*.kt" -o -name "*.scala" -o -name "*.groovy" -o -name "*.clj" -o -name "*.c" -o -name "*.cc" -o -name "*.cpp" -o -name "*.cxx" -o -name "*.h" -o -name "*.hh" -o -name "*.hpp" -o -name "*.hxx" -o -name "*.rs" -o -name "*.rb" -o -name "*.cs" -o -name "*.fs" -o -name "*.swift" -o -name "*.m" -o -name "*.mm" -o -name "*.vue" -o -name "*.svelte" -o -name "*.sh" -o -name "*.bash" -o -name "*.zsh" -o -name "*.lua" -o -name "*.proto" -o -name "*.thrift" -o -name "*.avsc" -o -name "*.fbs" -o -name "*.yaml" -o -name "*.yml" -o -name "*.toml" -o -name "*.json" -o -name "*.xml" -o -name "*.ini" -o -name "*.cfg" -o -name "*.md" -o -name "*.rst" -o -name "*.txt" -o -name "*.adoc" -o -name "*.cmake" -o -name "*.bzl" -o -name "*.bazel" -o -name "*.sql" -o -name "*.erl" -o -name "*.ex" -o -name "*.exs" -o -name "*.php" -o -name "*.pl" -o -name "*.pm" -o -name "*.r" -o -name "*.R" \) ! -path "*/.git/*" -exec truncate -s 0 {} \;
26+
# Recommit truncated state so git history cannot recover full files.
27+
# Without this, `git show HEAD:<file>` or `git checkout HEAD -- <file>`
28+
# would bypass truncation by reading from the pre-truncation commit.
29+
RUN cd /app/repo && git add -A && git commit -m "sg_only truncation" --allow-empty --quiet
2730
RUN touch /tmp/.sg_only_mode && echo '/app/repo' > /tmp/.sg_only_workdir
2831

2932
WORKDIR /app/repo

benchmarks/ccb_build/envoy-grpc-server-impl-001/environment/Dockerfile.sg_only

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# crossrepo-impl-002 — sg_only_env variant
1+
# envoy-grpc-server-impl-001 — sg_only_env variant
22
# Source files truncated so agent must use Sourcegraph MCP for code access.
33
# Verifier wrapper restores full repo before running tests.
44

55
FROM ubuntu:22.04
66

77
ENV DEBIAN_FRONTEND=noninteractive
88

9-
RUN apt-get update -qq && apt-get install -y -qq \
9+
RUN apt-get update -qq && apt-get install -y -qq --no-install-recommends \
1010
git \
1111
curl \
1212
ca-certificates \
@@ -36,8 +36,11 @@ RUN mkdir -p /logs/verifier /logs/agent
3636

3737

3838
# --- sg_only_env: back up full repo, then truncate source ---
39-
RUN apt-get update && apt-get install -y --no-install-recommends rsync && rm -rf /var/lib/apt/lists/* || true
4039
RUN cp -a /workspace /repo_full
4140
RUN find /workspace -type f \( -name "*.py" -o -name "*.pyx" -o -name "*.pyi" -o -name "*.js" -o -name "*.ts" -o -name "*.jsx" -o -name "*.tsx" -o -name "*.mjs" -o -name "*.cjs" -o -name "*.mts" -o -name "*.cts" -o -name "*.go" -o -name "*.java" -o -name "*.kt" -o -name "*.scala" -o -name "*.groovy" -o -name "*.clj" -o -name "*.c" -o -name "*.cc" -o -name "*.cpp" -o -name "*.cxx" -o -name "*.h" -o -name "*.hh" -o -name "*.hpp" -o -name "*.hxx" -o -name "*.rs" -o -name "*.rb" -o -name "*.cs" -o -name "*.fs" -o -name "*.swift" -o -name "*.m" -o -name "*.mm" -o -name "*.vue" -o -name "*.svelte" -o -name "*.sh" -o -name "*.bash" -o -name "*.zsh" -o -name "*.lua" -o -name "*.proto" -o -name "*.thrift" -o -name "*.avsc" -o -name "*.fbs" -o -name "*.yaml" -o -name "*.yml" -o -name "*.toml" -o -name "*.json" -o -name "*.xml" -o -name "*.ini" -o -name "*.cfg" -o -name "*.md" -o -name "*.rst" -o -name "*.txt" -o -name "*.adoc" -o -name "*.cmake" -o -name "*.bzl" -o -name "*.bazel" -o -name "*.sql" -o -name "*.erl" -o -name "*.ex" -o -name "*.exs" -o -name "*.php" -o -name "*.pl" -o -name "*.pm" -o -name "*.r" -o -name "*.R" \) ! -path "*/.git/*" -exec truncate -s 0 {} \;
41+
# Recommit truncated state so git history cannot recover full files.
42+
# Without this, `git show HEAD:<file>` or `git checkout HEAD -- <file>`
43+
# would bypass truncation by reading from the pre-truncation commit.
44+
RUN cd /workspace && git add -A && git commit -m "sg_only truncation" --allow-empty --quiet
4245
RUN touch /tmp/.sg_only_mode && echo '/workspace' > /tmp/.sg_only_workdir
4346
CMD ["/bin/bash"]

benchmarks/ccb_build/eslint-markdown-deps-install-001/environment/Dockerfile.sg_only

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,30 @@
1-
# dibench-js-eslint-markdown — sg_only_env variant
1+
# eslint-markdown-deps-install-001 — sg_only_env variant
22
# Source files truncated so agent must use Sourcegraph MCP for code access.
33
# Verifier wrapper restores full repo before running tests.
44

55
FROM ubuntu:22.04
66

77
ENV DEBIAN_FRONTEND=noninteractive
88

9-
RUN apt-get update -qq && apt-get install -y -qq \
9+
RUN apt-get update -qq && apt-get install -y -qq --no-install-recommends \
1010
python3 python3-pip git curl ca-certificates \
1111
&& rm -rf /var/lib/apt/lists/*
1212

1313
# Install Node.js
1414
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
15-
apt-get install -y nodejs
15+
apt-get install -y --no-install-recommends nodejs
1616
# Copy repo
1717
COPY repo /app/repo
1818

1919
WORKDIR /app/repo
2020

2121
# --- sg_only_env: back up full repo, then truncate source ---
22-
RUN apt-get update && apt-get install -y --no-install-recommends rsync && rm -rf /var/lib/apt/lists/* || true
2322
RUN cp -a /app/repo /repo_full
2423
RUN find /app/repo -type f \( -name "*.py" -o -name "*.pyx" -o -name "*.pyi" -o -name "*.js" -o -name "*.ts" -o -name "*.jsx" -o -name "*.tsx" -o -name "*.mjs" -o -name "*.cjs" -o -name "*.mts" -o -name "*.cts" -o -name "*.go" -o -name "*.java" -o -name "*.kt" -o -name "*.scala" -o -name "*.groovy" -o -name "*.clj" -o -name "*.c" -o -name "*.cc" -o -name "*.cpp" -o -name "*.cxx" -o -name "*.h" -o -name "*.hh" -o -name "*.hpp" -o -name "*.hxx" -o -name "*.rs" -o -name "*.rb" -o -name "*.cs" -o -name "*.fs" -o -name "*.swift" -o -name "*.m" -o -name "*.mm" -o -name "*.vue" -o -name "*.svelte" -o -name "*.sh" -o -name "*.bash" -o -name "*.zsh" -o -name "*.lua" -o -name "*.proto" -o -name "*.thrift" -o -name "*.avsc" -o -name "*.fbs" -o -name "*.yaml" -o -name "*.yml" -o -name "*.toml" -o -name "*.json" -o -name "*.xml" -o -name "*.ini" -o -name "*.cfg" -o -name "*.md" -o -name "*.rst" -o -name "*.txt" -o -name "*.adoc" -o -name "*.cmake" -o -name "*.bzl" -o -name "*.bazel" -o -name "*.sql" -o -name "*.erl" -o -name "*.ex" -o -name "*.exs" -o -name "*.php" -o -name "*.pl" -o -name "*.pm" -o -name "*.r" -o -name "*.R" \) ! -path "*/.git/*" -exec truncate -s 0 {} \;
24+
# Recommit truncated state so git history cannot recover full files.
25+
# Without this, `git show HEAD:<file>` or `git checkout HEAD -- <file>`
26+
# would bypass truncation by reading from the pre-truncation commit.
27+
RUN cd /app/repo && git add -A && git commit -m "sg_only truncation" --allow-empty --quiet
2528
RUN touch /tmp/.sg_only_mode && echo '/app/repo' > /tmp/.sg_only_workdir
2629

2730
WORKDIR /app/repo

0 commit comments

Comments
 (0)