fix: harden agent, benchmark, and UI against security, correctness, and stability issues#118
Merged
Merged
Conversation
…nd stability issues
|
This PR was closed because the active competition accepts only scoped Leaderboard UI submissions.
Update the PR title, description, and files, then reopen the PR. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Repo-wide review follow-up. Fixes security, correctness, and stability issues across the Python agent/runtime,
imagent-bench, andimagent-ui. One atomic change set; no behavior changes to intended designs (those are documented in-code instead).Motivation
A careful review of all sub-projects surfaced a credential leak, untrusted-code-with-secrets exposure, a reproducible agent crash, and several unauthenticated/DoS-prone UI endpoints, plus assorted correctness and test-hygiene gaps.
Changes
Critical
_normalize_repository_identifierso remote-URL tokens can't leak intobenchmark-report.json.GITHUB_TOKEN/GH_TOKEN, keepsOPENROUTER_API_KEY).Python agent / runtime
SyntaxErrorcrash in_extract_expression(dates,"8+").allowed_tools: null; read all JSON assets; restrict_image_bytes_from_urlto http(s).requires-python->>=3.11; stop CLI defaults clobbering--config-jsonvalues.imagent-bench
_percentilep=100; fix misleading ranking label; tolerate non-intID/seed; dedupesys.path; document intentional judge/raster limits.imagent-ui
lib/security.ts: rate limiter, concurrency cap, client-IP, optionalIMAGENT_UI_API_SECRETauth gate.generate/verify: auth gate, rate limits, subprocess timeout+kill, input validation, generic errors, run-dir pruning../..run ids; never serve SVG inline (+nosniff); security headers innext.config.mjsand Caddyfile; remove dead attach-image UI + orphaned CSS.Testing
python -m pytest tests imagent-bench/tests-> 39 passed.npm run lintclean,npm run buildsucceeds (15 routes).