MCPcopy Create free account

hub / github.com/anthropics/defending-code-reference-harness / functions

Functions364 in github.com/anthropics/defending-code-reference-harness

↓ 1 callersFunction_ensure_clone
Clone if missing, fetch if present. Partial clone (blobless) for speed.
harness/novelty.py:67
↓ 1 callersFunction_focus_hint
(crash: CrashArtifact, diff_source_root: str | None = None)
harness/patch_grade.py:248
↓ 1 callersFunction_mk_crash
(output=ASAN_OVERFLOW_WRITE)
tests/test_asan.py:134
↓ 1 callersFunction_one
(idx: int, entries)
harness/cli.py:1346
↓ 1 callersFunction_parse_exit_code
(s: str | None)
harness/find.py:103
↓ 1 callersFunction_parse_score
(s: str | None)
harness/grade.py:103
↓ 1 callersFunction_progress_line
Print a one-line summary of an assistant message to stderr. Tool calls show name + key arg; text shows a truncated preview.
harness/agent.py:113
↓ 1 callersMethod_pump
(a: socket.socket, b: socket.socket)
scripts/egress_proxy.py:53
↓ 1 callersFunction_report_one
( idx: int, sig: tuple[str, str], entries: list[tuple[Path, str, dict]], target: TargetConfig,
harness/cli.py:1107
↓ 1 callersFunction_run_all
Build once, optionally recon, then dispatch N find+grade cycles.
harness/cli.py:650
↓ 1 callersFunction_run_once
One find(+grade) attempt. Assumes image is already built. Writes result.json to out_dir before returning — stragglers no longer block disk wr
harness/cli.py:215
↓ 1 callersFunction_stream_report
Write an exploitability report for one crash. If re_report, preserve the existing report as report_v1.json and run a compare agent after the n
harness/cli.py:463
↓ 1 callersFunction_style_score
( diff: bytes, model: str, image_tag: str, container_name: str, agent_env: dict[str, str]
harness/patch_grade.py:274
↓ 1 callersFunction_terminate_subprocesses
SIGKILL all direct children. The SDK's claude subprocess (Node) does not die when we do — it gets orphaned to init and keeps executing Bash tool
harness/cli.py:97
↓ 1 callersFunction_write_result
( out_dir: Path, diff: bytes, verdict: PatchVerdict, rationale: str, variants: str, by
harness/patch.py:186
↓ 1 callersFunctionbuild_recon_prompt
( github_url: str, commit: str, source_root: str, binary_path: str, )
harness/prompts/recon_prompt.py:62
↓ 1 callersFunctioncontainer_env
Env to set on the agent container at ``docker run`` time. Auth credentials (``ANTHROPIC_API_KEY`` or ``CLAUDE_CODE_OAUTH_TOKEN``) pass straig
harness/sandbox.py:95
↓ 1 callersFunctiongrade_report
LLM-score the five analysis sections + escalation bonus, extract tokens. Fresh container — the grader must not see any state the report-agent
harness/report.py:115
↓ 1 callersFunctionmain
()
harness/cli.py:809
↓ 1 callersFunctionmain
()
scripts/egress_proxy.py:80
↓ 1 callersFunctionproxy
()
harness/sandbox.py:31
↓ 1 callersFunctionrun_compare
Pick the canonical report after a DUP_BETTER re-report. Returns (winner, reasoning, agent_result, elapsed). winner is "A" or "B"; defaults to
harness/judge.py:90
↓ 1 callersFunctionrun_grade
Verify a CrashArtifact in a fresh container. workspace_dir: host-side results dir where we also persist poc.bin so it survives the container
harness/grade.py:26
↓ 1 callersFunctionrun_judge
Decide whether a freshly-graded crash warrants a report. Returns (verdict, agent_result, elapsed). If the agent emits no parseable judgment,
harness/judge.py:25
↓ 1 callersMethodto_dict
(self)
harness/artifacts.py:26
↓ 1 callersMethodto_dict
(self)
harness/artifacts.py:52
↓ 1 callersMethodto_dict
(self)
harness/artifacts.py:86
Function_clear_auth
(monkeypatch)
tests/test_cli_auth.py:16
Function_f
(container, cmd, timeout=None)
tests/test_patch_grade.py:156
Function_on_signal
Best-effort container cleanup on SIGTERM/SIGINT. find.py/grade.py/recon.py have finally: blocks that rm their containers, but finally only ru
harness/cli.py:125
Function_root
(tmp_path, monkeypatch)
tests/test_skill_checkpoint.py:23
Functionagent_container
Spawn the per-phase agent container and tear it down on exit. All find/grade/report/recon/judge agents go through this so the "every agent ru
harness/sandbox.py:59
Functionbuild
Build a docker image from a directory containing a Dockerfile.
harness/docker_ops.py:15
Functioncommit
Snapshot a container's filesystem as a new image. Used by re-attack to run a find-agent against the patched binary without rebuilding.
harness/docker_ops.py:144
Methoddo_CONNECT
(self)
scripts/egress_proxy.py:34
Functionensure
Build (if missing) and return the agent-image tag for ``target_tag``.
harness/agent_image.py:67
Functionexec_sh
Run a shell command inside a container and return (rc, stdout, stderr). Unlike read_file/write_file this passes the command through sh -c so shel
harness/docker_ops.py:125
Methodfrom_dict
(cls, d: dict[str, Any])
harness/artifacts.py:32
Methodfrom_dict
(cls, d: dict[str, Any])
harness/artifacts.py:56
Methodfrom_dict
(cls, d: dict[str, Any])
harness/artifacts.py:92
Methodfrom_dict
(cls, d: dict[str, Any])
harness/artifacts.py:115
Methodfrom_dict
(cls, d: dict[str, Any])
harness/artifacts.py:138
Functionimage_exists
Check whether an image tag exists locally.
harness/docker_ops.py:116
Methodlast_assistant_message
(self)
harness/agent.py:180
Methodlog_message
(self, format, *args)
scripts/egress_proxy.py:76
Functionmock_docker
()
tests/test_patch_grade.py:163
Functionnetwork
()
harness/sandbox.py:35
Methodpassed
(self)
harness/artifacts.py:78
Functionpermission_mode
Permission mode for in-container ``claude -p`` sessions. With gVisor + the egress allowlist, the container is the boundary and the auto-mode
harness/sandbox.py:46
Functionread_file
Read a file from inside a container. Returns b'' if the file doesn't exist — that's the detection for "agent narrated a PoC path it never wrote".
harness/docker_ops.py:86
Functionrequire
Return an error message if the sandbox isn't configured; else None.
harness/sandbox.py:107
Functionrm
Remove a container, force-killing if running. Idempotent.
harness/docker_ops.py:111
Functionrmi
Remove an image tag. Idempotent.
harness/docker_ops.py:151
Functionrun
Start a container, detached, interactive. Cleans up any existing container with the same name first (clean slate). ``runtime`` selects an OCI
harness/docker_ops.py:24
Functionsetup_done
()
tests/test_agent_sandbox.py:38
Functiontest_accept_dos_section_off_by_default
()
tests/test_focus.py:71
Functiontest_accept_dos_section_renders_when_enabled
()
tests/test_focus.py:77
Functiontest_agent_base_image_ships_prompted_tools
find/patch prompts list ``xxd`` and ``gdb`` as available; they aren't in ``gcc:14`` and the agent image only inherits ``/work`` from the target
tests/test_sandbox.py:123
Functiontest_agent_container_network_default_tracks_sandbox
No override → the sandbox default (vp-internal under gVisor, bridge without).
tests/test_sandbox.py:94
Functiontest_agent_container_network_override
``network="none"`` pins the T0–T2 patch grader to no egress regardless of sandbox mode — it never runs ``claude -p``.
tests/test_sandbox.py:109
Functiontest_agent_container_passes_mounts_through
(monkeypatch)
tests/test_sandbox.py:81
Functiontest_agent_tag_distinguishes_committed_snapshots
Re-attack commits ``<name>:patched-<uuid>``; it must not collide with the original target's agent image.
tests/test_sandbox.py:42
Functiontest_all_optional_sections_render_in_order
()
tests/test_found_bugs.py:262
Functiontest_allocation_too_big_no_op
()
tests/test_asan.py:65
Functiontest_api_key
(monkeypatch)
tests/test_cli_auth.py:21
Functiontest_append
(tmp_path)
tests/test_skill_checkpoint.py:81
Functiontest_append_and_read_excerpts
(tmp_path)
tests/test_found_bugs.py:184
Functiontest_append_writes_raw_excerpt
(tmp_path)
tests/test_found_bugs.py:169
Functiontest_apply_fail_is_t0_fail
(mock_docker)
tests/test_patch_grade.py:189
Functiontest_assertion_failure
()
tests/test_asan.py:70
Functiontest_assertion_overrides_abrt
()
tests/test_asan.py:75
Functiontest_assigned_focus_empty_list
()
tests/test_focus.py:91
Functiontest_assigned_focus_round_robin
()
tests/test_focus.py:96
Functiontest_assigned_focus_single_area
()
tests/test_focus.py:101
Functiontest_bare_abrt_without_assertion
()
tests/test_asan.py:86
Functiontest_blocks_to_text_empty
()
tests/test_xml_parse.py:65
Functiontest_blocks_to_text_extracts_textblocks
()
tests/test_xml_parse.py:52
Functiontest_blocks_to_text_string_passthrough
()
tests/test_xml_parse.py:61
Functiontest_both_sections_render_in_order
()
tests/test_focus.py:56
Functiontest_build_prompt_attack_surface
()
tests/test_report.py:116
Functiontest_build_prompt_has_raw_asan_no_preparse
()
tests/test_report.py:122
Functiontest_build_prompt_novelty_off
()
tests/test_report.py:99
Functiontest_build_prompt_novelty_on
()
tests/test_report.py:106
Functiontest_claude_cli_runs_under_gvisor
Check 4: agent_image.ensure() produced a working CLI layer.
tests/test_agent_sandbox.py:92
Functiontest_compare_prompt_has_both
()
tests/test_judge.py:93
Functiontest_compare_prompt_wraps_both_reports_in_nonce_blocks
()
tests/test_untrusted.py:170
Functiontest_concurrent_section_describes_readonly_mount
()
tests/test_found_bugs.py:245
Functiontest_concurrent_section_mentions_asan_excerpt
()
tests/test_found_bugs.py:254
Functiontest_concurrent_section_omitted_without_path
()
tests/test_found_bugs.py:240
Functiontest_concurrent_section_renders_with_path
()
tests/test_found_bugs.py:232
Functiontest_confine_rejects_escape
(tmp_path)
tests/test_skill_checkpoint.py:117
Functiontest_container_env_passes_auth_unchanged_without_proxy
(monkeypatch)
tests/test_sandbox.py:61
Functiontest_container_env_threads_proxy
(monkeypatch)
tests/test_sandbox.py:55
Functiontest_crash_artifact_from_dict_missing_dup_check
()
tests/test_artifacts.py:22
Functiontest_crash_artifact_roundtrip
()
tests/test_artifacts.py:7
Functiontest_crash_file_from_frame
()
tests/test_report.py:78
Functiontest_crashsite_diff_passes_t0_t1
Symptom-only fix (guards memcpy with too-loose bound) passes T1 for the specific PoC but is wrong — re-attack would catch it (mocked unit test
tests/test_patch_grade_e2e.py:79
Functiontest_dedup_empty_dir
(tmp_path)
tests/test_dedup.py:184
Functiontest_dedup_groups_duplicates
(tmp_path)
tests/test_dedup.py:105
Functiontest_dedup_includes_rejected
(tmp_path)
tests/test_dedup.py:117
← previousnext →101–200 of 364, ranked by callers