github-image-allowlist-cleanup: Clean Up GitHub Image Allowlist #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "task/github-image-allowlist-cleanup"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Assigned idea
Benchmark authoring specification.
Summary: Create a deterministic Next.js maintenance work item that removes the overly broad
github.comremote image allowance while preserving the existing Cloudinary, Unsplash, and GitHub avatar CDN image configuration.Task intent: For this repo, update
next.config.jsso Next/Image no longer allows arbitrary HTTPS images fromgithub.com; keepavatars.githubusercontent.comand the other existing trusted image hosts unchanged, and do not alter the existing strict mode, trailing slash, powered header, TypeScript, or ESLint build settings.Benchmark plan: Construct the task package from the specified commit with a solver-facing request focused only on tightening the remote image allowlist in
next.config.js. The work should be framed as ordinary upstream configuration cleanup for a Next.js app. The hidden checker should be supplied separately astest_outputs.pyand should validate the exported config rather than relying only on text matching.Environment plan: Environment/repo is the checked-out Next.js repository at the fixed commit, with
next.config.jsexporting the current config object. Task/environment should add only the hidden Python pytest verifier and use Node.js to require the config file; no network access or full Next build is required for verification.Verifier plan:
test_outputs.pyshould run from the repository root, invoke Node torequire('./next.config.js'), serialize the exported config to JSON, and assert thatimages.remotePatternscontains exactly the HTTPS hostnamesres.cloudinary.com,images.unsplash.com, andavatars.githubusercontent.com, with nogithub.comentry and noimages.domainsfallback containinggithub.com. It should also assert thatreactStrictModeremains true,trailingSlashremains false,poweredByHeaderremains false,typescript.ignoreBuildErrorsremains true, andeslint.ignoreDuringBuildsremains true.Oracle plan: The oracle solution is a minimal edit to
next.config.js: remove only the remotePatterns object whose hostname isgithub.com, leaving the remaining three remotePatterns entries and all other exported config fields unchanged. The oracle path should be represented as a small patch againstnext.config.js.Difficulty plan: Current coding agents may overcorrect by deleting
avatars.githubusercontent.com, switching to deprecatedimages.domains, adding unrelated hosts, or changing other build flags while touching the config. The verifier should catch those common misreadings by checking both the host allowlist and preservation of unrelated settings.Repo patch scope: Expected upstream edit scope is
next.config.jsonly; no page, component, package, or build-system files should be changed.Anti-leakage notes: Solver-facing text must not mention benchmark, harness, Snorkel, Harbor, std-ts, agent, stage, attempt, retry, generated task, or evaluation context. Present the work only as normal Next.js configuration cleanup.
Approach: Ask the solver to inspect the existing
images.remotePatternsconfiguration, identify the redundant broad GitHub host allowance, and remove that single host entry while preserving the avatar CDN and other trusted providers.Verification: Run
python -m pytest test_outputs.pyfrom the repository root; the verifier should use a Node command to loadnext.config.jsand check the concrete exported config values.Risk: Low implementation risk because the intended patch is a single configuration deletion. The main risk is accidental broad rewrites of the Next config, which the hidden verifier should reject.
Path rules: task package is tasks/; mutable upstream checkout is tasks//environment/repo; benchmark package files are under tasks//task; verifier/container environment belongs under tasks//task/environment; regular and UI verifier logic belongs in task/tests/test_outputs.py and test.sh only runs that file through pytest.
Agent context
Task slug: github-image-allowlist-cleanup
Branch: task/github-image-allowlist-cleanup
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.