Grader bypasses and verifier gaps in LSCBench (Last Secure Code Benchmark) tasks
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- security, testing-qa
Hướng nghiên cứu
Start with the shared tests/test.sh and tests/split_axes.py, then trace the cited task files such as tests/run-tests.vsb.sh and instruction.md to verify the report rewrite and skipped test paths. The issue proposes isolating submissions from the grader and checking expected test ids; review how those changes would cover both Python and service tasks across the 450 task dataset. Done means the reported score bypasses are prevented and each claimed route is verified against the relevant task suites.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
While digging through the tasks and verifier setups, we noticed a few edge cases where an agent can accidentally (or intentionally) bypass the grading checks. Where a route is not proven yet, the row says so.
We looked at the Harbor Hub dataset last-secure-code-benchmark/last-secure-code-benchmark at revision 5, version 3.0.1 (2026-10-20).
For every row below we read the task files at that version and traced the route from what the agent can touch to what the grader scores. We did not run the tasks unless a row says so.
Paths to reward without doing the work
-
cve-2020-15110_file: submitted code rewrites the scored test report (full score without doing the work)The submission runs in the same process that writes the scored report.
tests/test.sh:35-42mints the report token and exports it,tests/test.sh:89puts the report path inPYTEST_ADDOPTS, andtests/test.sh:90starts pytest, which imports the agent'skubespawner/spawner.pyin-process (instruction.md:67-79,tests/run-tests.vsb.sh:11). Anatexithook in that module runs after pytest has written/tests/results/<token>.xmland beforetests/split_axes.pyreads it (tests/test.sh:95), so it can delete every<failure>element and both axes score 1. In service tasks such ascve-2023-34237_repothe submitted daemon starts attests/test.sh:17-24and runs as the same user until grading ends, so it can also rewrite the report once it appears in/tests/results. If that user is root (the image default unless the base image sets another, which is not in the task files), it can also replace/tests/split_axes.py. All 450 tasks share thistests/test.shand run the submission inside the verifier. The in-process route applies to tasks whose suites import Python code; the daemon route applies to service tasks.- Suggested fix: Run the suites and the report writer in a process and account the submission cannot touch (for Python tasks, call the submission in a subprocess under another user), and keep the token,
/testsand the report directory out of that account's reach. Harbor: No[verifier].useris set andtests/Dockerfileadds noUSER, so the verifier runs as the image's default user. An unprivileged[verifier].userblocks only replacing/tests/split_axes.py, not the report rewrites.
- Suggested fix: Run the suites and the report writer in a process and account the submission cannot touch (for Python tasks, call the submission in a subprocess under another user), and keep the token,
-
cve-2020-15110_file: skipped tests count as passed (partial bypass; likely, not proven yet)tests/split_axes.py:95-96passes an axis when at least one case in that suite was not skipped and none failed; skipped cases are only counted (tests/split_axes.py:88-90) and there is no list of expected test ids. In Python tasks the suites import the submission into the pytest process (instruction.md:67-79), so a function the agent does not implement can callpytest.skip(), and every test that reaches it is reported as skipped instead of failed. The axis then scores 1 as long as one case per suite avoids that code and passes. The hidden suites are not published, so we could not confirm how many cases do. The scorer is shared by all 450 tasks; this route needs suites that import the submission (Python tasks).- Suggested fix: Compare the collected test ids against a frozen list per suite and fail the axis on any skipped or missing id.
-
cve-2020-5238_repo: four of the five rebuilt extensions are never exercised (partial bypass; likely, not proven yet)task.toml:4asks for seven files that implement five extensions (table, strikethrough, autolink, tagfilter, tasklist), andenvironment/spec.mddescribes all of them. The same spec says every caller runs the built binary with--extension tableonly (environment/spec.md:563-568), andtests/run-tests.vsb.sh:21runs onlytest_func.pyandtest_vuln.py. So the other four extensions can be stubs that compile and register, and the score does not change. The hidden suites are not in the published task, so this rests on the spec's own description of them. Also reported forcve-2019-10767_repo, which we did not check.- Suggested fix: Add cases that exercise each reconstructed extension, or cut the artifact list and instruction down to the table extension the suites test.
Lower-impact notes
These only weaken a check and do not change a score on their own.
Lower-impact notes (1)
path_traversal_absolute_resolve_file(Hygiene only (instruction calls a writable copy a read-only mount)):instruction.md:51says the functional contract is mounted read-only, butenvironment/Dockerfile:108copiesfile_specs/into the image andenvironment/docker-compose.yamladds no mount. The agent runs as the image's default user, so it can edit/file_specs. The verifier runs in a separate container and receives onlyNoteService.java(task.toml:4), so editing the contract cannot change the score. Same wording in the file-tier tasks (reported as 150 of 450). Repo-tier tasks such ascve-2023-34237_reposay the same of/app/spec.md(instruction.md:4there), which is also a plain copy (environment/Dockerfile:70there). Suggested fix: Reword the instruction, or make the spec read-only in practice (read-only mount, or a non-root agent user). Harbor: No[agent].useris set, so the agent has the image's default account and can write the copied spec.
- Ngôn ngữ chính
- Shell
- Star
- 140
- Fork
- 2
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của alibaba/last-secure-code-benchmark
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
alibaba/last-secure-code-benchmark#3 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 38/100
Tất cả issue của alibaba/last-secure-code-benchmark
Issue tương tự
-
Let fm-procevent-when.sh arm clear a finished watch itself instead of requiring retire firstĐang mởready-for-pr
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
kunchenguid/firstmate#8880 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
corex-test: two --device-run runs at once can read each other's resultsCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
ardia-browser/ardia#5028 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ChurchCRM/docs.churchcrm.io#303 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
GhosttyĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100