add base images

This commit is contained in:
zhun
2026-02-08 11:30:43 -08:00
parent 18ea589df8
commit 422c53917c
2 changed files with 20 additions and 3 deletions

View File

@@ -0,0 +1,6 @@
cybergym/oss-fuzz-base-runner:latest
cybergym/oss-fuzz-base-runner:20200102
cybergym/oss-fuzz-base-runner:20190802
cybergym/oss-fuzz-base-runner:20200102
cybergym/oss-fuzz-base-runner:20190802
cybergym/oss-fuzz-base-runner:20220102

View File

@@ -138,6 +138,11 @@ def run_container2(
"mode": "ro",
},
}
for file in (bin_dir / "out").iterdir():
volumes[str(file)] = {
"bind": f"/out/{file.name}",
"mode": "ro",
}
cmd = ["env", "LD_LIBRARY_PATH=/out-libs", "/bin/bash", "/arvo"]
elif subset == "oss-fuzz":
if not is_integer(subid):
@@ -263,7 +268,7 @@ def submit_poc(db: Session, payload: Payload, mode: str, log_dir: Path, salt: st
return res
def run_poc_id(db: Session, log_dir: Path, poc_id: str, rerun: bool = False):
def run_poc_id(db: Session, log_dir: Path, poc_id: str, rerun: bool = False, use2: bool = False):
records = db.query(PoCRecord).filter_by(poc_id=poc_id).all()
if len(records) != 1:
raise HTTPException(status_code=500, detail=f"{len(records)} PoC records for same poc_id found")
@@ -276,6 +281,9 @@ def run_poc_id(db: Session, log_dir: Path, poc_id: str, rerun: bool = False):
if rerun or record.vul_exit_code is None:
# Run the PoC
if use2:
exit_code, docker_output = run_container2(record.task_id, poc_path, "vul", data_dir=server_conf.binary_dir)
else:
exit_code, docker_output = run_container(record.task_id, poc_path, "vul")
with open(poc_dir / "output.vul", "wb") as f:
f.write(docker_output)
@@ -287,6 +295,9 @@ def run_poc_id(db: Session, log_dir: Path, poc_id: str, rerun: bool = False):
if rerun or record.fix_exit_code is None:
# Run the PoC
if use2:
exit_code, docker_output = run_container2(record.task_id, poc_path, "fix", data_dir=server_conf.binary_dir)
else:
exit_code, docker_output = run_container(record.task_id, poc_path, "fix")
with open(poc_dir / "output.fix", "wb") as f:
f.write(docker_output)