-
Notifications
You must be signed in to change notification settings - Fork 6
Restrict agent internet access on Refactoring (RF) tasks #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mohit-raghavendra
wants to merge
1
commit into
scaleapi:main
Choose a base branch
from
mohit-raghavendra:rf-internet-lockdown
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
data/rf/task-69391d8d1ce51c407be1e531/environment/Dockerfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,21 @@ | ||
| FROM ghcr.io/scaleapi/swe-atlas:swe_atlas_RF_trufflesecurity_trufflehog_69391d8d1ce51c407be1e531_1.0@sha256:53ded8a7c81c92abf3403686725fff8db21e8ececf626ca594b0cff6ae4ab328 | ||
|
|
||
| ENV PATH="/usr/local/go/bin:${PATH}" | ||
|
|
||
| # Make offline (agent-phase, allowlisted) Go builds work without a module proxy. | ||
| # Vendored repos already carry their modules in vendor/ (fetching the full graph | ||
| # would chase dead vanity hosts like go.buf.build); just build from vendor, which | ||
| # also triggers any needed toolchain download. Non-vendored repos: download the | ||
| # module graph. Either way, install the resolved toolchain as the default GOROOT. | ||
| # No WORKDIR override: the base image's WORKDIR is the repo root (varies per repo). | ||
| RUN if [ -d vendor ]; then \ | ||
| GOTOOLCHAIN=auto go build -mod=vendor ./... 2>/dev/null || true; \ | ||
| else \ | ||
| GOTOOLCHAIN=auto go mod download all; \ | ||
| fi && \ | ||
| TC="$(ls -d /go/pkg/mod/golang.org/toolchain@*/ 2>/dev/null | sort -V | tail -1)" && \ | ||
| if [ -n "$TC" ]; then rm -rf /usr/local/go && cp -a "${TC%/}" /usr/local/go && chmod -R a+rX /usr/local/go; fi | ||
|
|
||
| ENV GOPROXY=off \ | ||
| GOSUMDB=off \ | ||
| GOTOOLCHAIN=local | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
data/rf/task-694b4b99829f00e24fd11885/environment/Dockerfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,21 @@ | ||
| FROM ghcr.io/scaleapi/swe-atlas:swe_atlas_RF_trufflesecurity_trufflehog_694b4b99829f00e24fd11885_1.0@sha256:29535eb72b8f6883a83ff50107bf812b5bf1092162ca7a22f7c3d63553f42b5f | ||
|
|
||
| ENV PATH="/usr/local/go/bin:${PATH}" | ||
|
|
||
| # Make offline (agent-phase, allowlisted) Go builds work without a module proxy. | ||
| # Vendored repos already carry their modules in vendor/ (fetching the full graph | ||
| # would chase dead vanity hosts like go.buf.build); just build from vendor, which | ||
| # also triggers any needed toolchain download. Non-vendored repos: download the | ||
| # module graph. Either way, install the resolved toolchain as the default GOROOT. | ||
| # No WORKDIR override: the base image's WORKDIR is the repo root (varies per repo). | ||
| RUN if [ -d vendor ]; then \ | ||
| GOTOOLCHAIN=auto go build -mod=vendor ./... 2>/dev/null || true; \ | ||
| else \ | ||
| GOTOOLCHAIN=auto go mod download all; \ | ||
| fi && \ | ||
| TC="$(ls -d /go/pkg/mod/golang.org/toolchain@*/ 2>/dev/null | sort -V | tail -1)" && \ | ||
| if [ -n "$TC" ]; then rm -rf /usr/local/go && cp -a "${TC%/}" /usr/local/go && chmod -R a+rX /usr/local/go; fi | ||
|
|
||
| ENV GOPROXY=off \ | ||
| GOSUMDB=off \ | ||
| GOTOOLCHAIN=local |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
data/rf/task-694b4b99829f00e24fd11889/environment/Dockerfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,21 @@ | ||
| FROM ghcr.io/scaleapi/swe-atlas:swe_atlas_RF_trufflesecurity_trufflehog_694b4b99829f00e24fd11889_1.0@sha256:68f800df9360a8b9aac766a3f2345a70899f127fa4d7c0b78961c7ca72ea48f4 | ||
|
|
||
| ENV PATH="/usr/local/go/bin:${PATH}" | ||
|
|
||
| # Make offline (agent-phase, allowlisted) Go builds work without a module proxy. | ||
| # Vendored repos already carry their modules in vendor/ (fetching the full graph | ||
| # would chase dead vanity hosts like go.buf.build); just build from vendor, which | ||
| # also triggers any needed toolchain download. Non-vendored repos: download the | ||
| # module graph. Either way, install the resolved toolchain as the default GOROOT. | ||
| # No WORKDIR override: the base image's WORKDIR is the repo root (varies per repo). | ||
| RUN if [ -d vendor ]; then \ | ||
| GOTOOLCHAIN=auto go build -mod=vendor ./... 2>/dev/null || true; \ | ||
| else \ | ||
| GOTOOLCHAIN=auto go mod download all; \ | ||
| fi && \ | ||
| TC="$(ls -d /go/pkg/mod/golang.org/toolchain@*/ 2>/dev/null | sort -V | tail -1)" && \ | ||
| if [ -n "$TC" ]; then rm -rf /usr/local/go && cp -a "${TC%/}" /usr/local/go && chmod -R a+rX /usr/local/go; fi | ||
|
|
||
| ENV GOPROXY=off \ | ||
| GOSUMDB=off \ | ||
| GOTOOLCHAIN=local |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
data/rf/task-696719205599a51110d4b40c/environment/Dockerfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,21 @@ | ||
| FROM ghcr.io/scaleapi/swe-atlas:swe_atlas_RF_trufflesecurity_trufflehog_696719205599a51110d4b40c_1.0@sha256:c6fcd6e39177b9bd30fe550676e838918544f3ba53b02fb488c3f78f29041e1a | ||
|
|
||
| ENV PATH="/usr/local/go/bin:${PATH}" | ||
|
|
||
| # Make offline (agent-phase, allowlisted) Go builds work without a module proxy. | ||
| # Vendored repos already carry their modules in vendor/ (fetching the full graph | ||
| # would chase dead vanity hosts like go.buf.build); just build from vendor, which | ||
| # also triggers any needed toolchain download. Non-vendored repos: download the | ||
| # module graph. Either way, install the resolved toolchain as the default GOROOT. | ||
| # No WORKDIR override: the base image's WORKDIR is the repo root (varies per repo). | ||
| RUN if [ -d vendor ]; then \ | ||
| GOTOOLCHAIN=auto go build -mod=vendor ./... 2>/dev/null || true; \ | ||
| else \ | ||
| GOTOOLCHAIN=auto go mod download all; \ | ||
| fi && \ | ||
| TC="$(ls -d /go/pkg/mod/golang.org/toolchain@*/ 2>/dev/null | sort -V | tail -1)" && \ | ||
| if [ -n "$TC" ]; then rm -rf /usr/local/go && cp -a "${TC%/}" /usr/local/go && chmod -R a+rX /usr/local/go; fi | ||
|
|
||
| ENV GOPROXY=off \ | ||
| GOSUMDB=off \ | ||
| GOTOOLCHAIN=local |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
data/rf/task-696719205599a51110d4b419/environment/Dockerfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,21 @@ | ||
| FROM ghcr.io/scaleapi/swe-atlas:swe_atlas_RF_trufflesecurity_trufflehog_696719205599a51110d4b419_1.0@sha256:2e388e68c3c34864dce03bfc5d35bee9a5af2648fcd991abb8a2bd6a7a486680 | ||
|
|
||
| ENV PATH="/usr/local/go/bin:${PATH}" | ||
|
|
||
| # Make offline (agent-phase, allowlisted) Go builds work without a module proxy. | ||
| # Vendored repos already carry their modules in vendor/ (fetching the full graph | ||
| # would chase dead vanity hosts like go.buf.build); just build from vendor, which | ||
| # also triggers any needed toolchain download. Non-vendored repos: download the | ||
| # module graph. Either way, install the resolved toolchain as the default GOROOT. | ||
| # No WORKDIR override: the base image's WORKDIR is the repo root (varies per repo). | ||
| RUN if [ -d vendor ]; then \ | ||
| GOTOOLCHAIN=auto go build -mod=vendor ./... 2>/dev/null || true; \ | ||
| else \ | ||
| GOTOOLCHAIN=auto go mod download all; \ | ||
| fi && \ | ||
| TC="$(ls -d /go/pkg/mod/golang.org/toolchain@*/ 2>/dev/null | sort -V | tail -1)" && \ | ||
| if [ -n "$TC" ]; then rm -rf /usr/local/go && cp -a "${TC%/}" /usr/local/go && chmod -R a+rX /usr/local/go; fi | ||
|
|
||
| ENV GOPROXY=off \ | ||
| GOSUMDB=off \ | ||
| GOTOOLCHAIN=local |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2>/dev/null || trueensures the Dockerfile layer never fails on compilation errors (intentional—the build may not compile cleanly), but it also hides toolchain-download failures. IfGOTOOLCHAIN=autofails to fetch the required toolchain (e.g., a transient network issue during image build), theTCglob finds nothing, theif [ -n "$TC" ]block is skipped, and the original/usr/local/gois kept intact. WithGOTOOLCHAIN=localbaked in by the subsequentENV, the agent will then use the original (potentially incompatible) toolchain version and produce opaque build failures at run time. At minimum, keeping toolchain-download errors on stderr (omitting2>/dev/null) would make image-build logs actionable. The same pattern is used across all ~25 Go task Dockerfiles.Prompt To Fix With AI