repo_id
stringclasses
400 values
commit_sha
stringclasses
400 values
commit_index
int32
0
951
in_repo_split
stringclasses
1 value
cross_repo_split
stringclasses
1 value
test_file
stringlengths
7
121
test_function
stringlengths
1
108
assertion_type
stringclasses
32 values
difficulty
stringclasses
8 values
context_lines
int32
3
600
prefix
large_stringlengths
44
113k
target
large_stringlengths
1
498
anchor_sha
stringclasses
400 values
anchor_index
int32
0
951
qna_source
stringclasses
1 value
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
.claude/skills/oss-forensics/github-evidence-kit/tests/test_helpers.py
test_none_returns_now
assert
none_literal
25
import sys from datetime import datetime, timezone from pathlib import Path import pytest sys.path.insert(0, str(Path(__file__).parent.parent)) from src.helpers import ( generate_evidence_id, make_actor, make_repo, make_repo_from_full_name, parse_datetime_lenient, parse_datetime_strict, ) cl...
None
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
.claude/skills/oss-forensics/github-evidence-kit/tests/test_helpers.py
test_iso_format_with_timezone
assert
numeric_literal
24
import sys from datetime import datetime, timezone from pathlib import Path import pytest sys.path.insert(0, str(Path(__file__).parent.parent)) from src.helpers import ( generate_evidence_id, make_actor, make_repo, make_repo_from_full_name, parse_datetime_lenient, parse_datetime_strict, ) cl...
2025
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
.claude/skills/oss-forensics/github-evidence-kit/tests/test_helpers.py
test_creates_actor_with_id
assert
numeric_literal
25
import sys from datetime import datetime, timezone from pathlib import Path import pytest sys.path.insert(0, str(Path(__file__).parent.parent)) from src.helpers import ( generate_evidence_id, make_actor, make_repo, make_repo_from_full_name, parse_datetime_lenient, parse_datetime_strict, ) cl...
12345
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
.claude/skills/oss-forensics/github-evidence-kit/tests/test_integration.py
test_fetch_real_pull_request
assert
numeric_literal
35
import sys from pathlib import Path import pytest sys.path.insert(0, str(Path(__file__).parent.parent)) from src.collectors.api import GitHubAPICollector from src.collectors.archive import GHArchiveCollector from src.collectors.local import LocalGitCollector from src.schema.common import EvidenceSource, IOCType pyt...
1
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
.claude/skills/oss-forensics/github-evidence-kit/tests/test_integration.py
test_fetch_amazon_q_push_event
assert
numeric_literal
40
import sys from pathlib import Path import pytest sys.path.insert(0, str(Path(__file__).parent.parent)) from src.collectors.api import GitHubAPICollector from src.collectors.archive import GHArchiveCollector from src.collectors.local import LocalGitCollector from src.schema.common import EvidenceSource, IOCType pyt...
0
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
.claude/skills/oss-forensics/github-evidence-kit/tests/test_integration.py
test_git_client_get_log_on_real_repo
assert
numeric_literal
50
import sys from pathlib import Path import pytest sys.path.insert(0, str(Path(__file__).parent.parent)) from src.collectors.api import GitHubAPICollector from src.collectors.archive import GHArchiveCollector from src.collectors.local import LocalGitCollector from src.schema.common import EvidenceSource, IOCType pyt...
5
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
.claude/skills/oss-forensics/github-evidence-kit/tests/test_integration.py
test_gharchive_query_returns_empty_for_nonexistent_repo
assert
collection
34
import sys from pathlib import Path import pytest sys.path.insert(0, str(Path(__file__).parent.parent)) from src.collectors.api import GitHubAPICollector from src.collectors.archive import GHArchiveCollector from src.collectors.local import LocalGitCollector from src.schema.common import EvidenceSource, IOCType pyt...
[]
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
.claude/skills/oss-forensics/github-evidence-kit/tests/test_integration.py
test_git_client_get_commit_on_real_repo
assert
numeric_literal
51
import sys from pathlib import Path import pytest sys.path.insert(0, str(Path(__file__).parent.parent)) from src.collectors.api import GitHubAPICollector from src.collectors.archive import GHArchiveCollector from src.collectors.local import LocalGitCollector from src.schema.common import EvidenceSource, IOCType pyt...
40
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
.claude/skills/oss-forensics/github-evidence-kit/tests/test_integration.py
test_fetch_real_commit
assert
none_literal
36
import sys from pathlib import Path import pytest sys.path.insert(0, str(Path(__file__).parent.parent)) from src.collectors.api import GitHubAPICollector from src.collectors.archive import GHArchiveCollector from src.collectors.local import LocalGitCollector from src.schema.common import EvidenceSource, IOCType pyt...
None
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
.claude/skills/oss-forensics/github-evidence-kit/tests/test_integration.py
test_fetch_real_pull_request
assert
bool_literal
36
import sys from pathlib import Path import pytest sys.path.insert(0, str(Path(__file__).parent.parent)) from src.collectors.api import GitHubAPICollector from src.collectors.archive import GHArchiveCollector from src.collectors.local import LocalGitCollector from src.schema.common import EvidenceSource, IOCType pyt...
True
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
.claude/skills/oss-forensics/github-evidence-kit/tests/test_integration.py
test_fetch_revert_pr_7710
assert
numeric_literal
33
import sys from pathlib import Path import pytest sys.path.insert(0, str(Path(__file__).parent.parent)) from src.collectors.api import GitHubAPICollector from src.collectors.archive import GHArchiveCollector from src.collectors.local import LocalGitCollector from src.schema.common import EvidenceSource, IOCType pyt...
7710
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
.claude/skills/oss-forensics/github-evidence-kit/tests/test_parsers.py
test_parses_basic_push
assert
numeric_literal
30
import sys from pathlib import Path import pytest sys.path.insert(0, str(Path(__file__).parent.parent)) from src.parsers import ( _RowContext, parse_create_event, parse_delete_event, parse_fork_event, parse_gharchive_event, parse_issue_event, parse_member_event, parse_public_event, ...
0
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
.claude/skills/oss-forensics/github-evidence-kit/tests/test_parsers.py
test_parses_member_added
assert
numeric_literal
47
import sys from pathlib import Path import pytest sys.path.insert(0, str(Path(__file__).parent.parent)) from src.parsers import ( _RowContext, parse_create_event, parse_delete_event, parse_fork_event, parse_gharchive_event, parse_issue_event, parse_member_event, parse_public_event, ...
456
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
.claude/skills/oss-forensics/github-evidence-kit/tests/test_parsers.py
test_extracts_ref
assert
none_literal
30
import sys from pathlib import Path import pytest sys.path.insert(0, str(Path(__file__).parent.parent)) from src.parsers import ( _RowContext, parse_create_event, parse_delete_event, parse_fork_event, parse_gharchive_event, parse_issue_event, parse_member_event, parse_public_event, ...
None
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
.claude/skills/oss-forensics/github-evidence-kit/tests/test_parsers.py
test_parses_workflow_requested
assert
string_literal
46
import sys from pathlib import Path import pytest sys.path.insert(0, str(Path(__file__).parent.parent)) from src.parsers import ( _RowContext, parse_create_event, parse_delete_event, parse_fork_event, parse_gharchive_event, parse_issue_event, parse_member_event, parse_public_event, ...
"CI"
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
.claude/skills/oss-forensics/github-evidence-kit/tests/test_parsers.py
test_parses_basic_push
assert
string_literal
33
import sys from pathlib import Path import pytest sys.path.insert(0, str(Path(__file__).parent.parent)) from src.parsers import ( _RowContext, parse_create_event, parse_delete_event, parse_fork_event, parse_gharchive_event, parse_issue_event, parse_member_event, parse_public_event, ...
"push"
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
.claude/skills/oss-forensics/github-evidence-kit/tests/test_parsers.py
test_parses_fork_event
assert
string_literal
42
import sys from pathlib import Path import pytest sys.path.insert(0, str(Path(__file__).parent.parent)) from src.parsers import ( _RowContext, parse_create_event, parse_delete_event, parse_fork_event, parse_gharchive_event, parse_issue_event, parse_member_event, parse_public_event, ...
"fork"
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
.claude/skills/oss-forensics/github-evidence-kit/tests/test_parsers.py
test_parses_issue_opened
assert
string_literal
30
import sys from pathlib import Path import pytest sys.path.insert(0, str(Path(__file__).parent.parent)) from src.parsers import ( _RowContext, parse_create_event, parse_delete_event, parse_fork_event, parse_gharchive_event, parse_issue_event, parse_member_event, parse_public_event, ...
"issue"
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
.claude/skills/oss-forensics/github-evidence-kit/tests/test_parsers.py
test_parses_member_added
assert
string_literal
45
import sys from pathlib import Path import pytest sys.path.insert(0, str(Path(__file__).parent.parent)) from src.parsers import ( _RowContext, parse_create_event, parse_delete_event, parse_fork_event, parse_gharchive_event, parse_issue_event, parse_member_event, parse_public_event, ...
"added"
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
.claude/skills/oss-forensics/github-evidence-kit/tests/test_parsers.py
test_parses_member_added
assert
string_literal
48
import sys from pathlib import Path import pytest sys.path.insert(0, str(Path(__file__).parent.parent)) from src.parsers import ( _RowContext, parse_create_event, parse_delete_event, parse_fork_event, parse_gharchive_event, parse_issue_event, parse_member_event, parse_public_event, ...
"owner"
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
.claude/skills/oss-forensics/github-evidence-kit/tests/test_store.py
test_create_empty_store
assert
numeric_literal
19
import json import sys import tempfile from datetime import datetime, timezone from pathlib import Path import pytest sys.path.insert(0, str(Path(__file__).parent.parent)) from src import EvidenceStore, EvidenceSource, load_evidence_from_json class TestEvidenceStoreBasics: def test_create_empty_store(self): ...
0
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
.claude/skills/oss-forensics/github-evidence-kit/tests/test_store.py
test_add_and_get_evidence
assert
numeric_literal
23
import json import sys import tempfile from datetime import datetime, timezone from pathlib import Path import pytest sys.path.insert(0, str(Path(__file__).parent.parent)) from src import EvidenceStore, EvidenceSource, load_evidence_from_json class TestEvidenceStoreBasics: def test_add_and_get_evidence(self, s...
1
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
.claude/skills/oss-forensics/github-evidence-kit/tests/test_store.py
test_clear_store
assert
numeric_literal
22
import json import sys import tempfile from datetime import datetime, timezone from pathlib import Path import pytest sys.path.insert(0, str(Path(__file__).parent.parent)) from src import EvidenceStore, EvidenceSource, load_evidence_from_json class TestEvidenceStoreBasics: def test_clear_store(self, sample_pus...
2
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_api_functions.py
test_x86_64_arch
assert
numeric_literal
19
import pytest from unittest.mock import patch, MagicMock from ..api import ( find_exploit_paths, format_analysis_summary, check_exploit_viability, get_exploit_constraints, list_primitives, get_primitive_requirements, ) class TestGetExploitConstraints: def test_x86_64_arch(self): ""...
6
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_api_functions.py
test_with_input_handler
assert
numeric_literal
20
import pytest from unittest.mock import patch, MagicMock from ..api import ( find_exploit_paths, format_analysis_summary, check_exploit_viability, get_exploit_constraints, list_primitives, get_primitive_requirements, ) class TestGetExploitConstraints: def test_with_input_handler(self): ...
0
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_api_functions.py
test_returns_tuple
assert
numeric_literal
28
import pytest from unittest.mock import patch, MagicMock from ..api import ( find_exploit_paths, format_analysis_summary, check_exploit_viability, get_exploit_constraints, list_primitives, get_primitive_requirements, ) class TestCheckExploitViability: def test_returns_tuple(self): ...
2
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_api_functions.py
test_i386_arch
assert
bool_literal
20
import pytest from unittest.mock import patch, MagicMock from ..api import ( find_exploit_paths, format_analysis_summary, check_exploit_viability, get_exploit_constraints, list_primitives, get_primitive_requirements, ) class TestGetExploitConstraints: def test_i386_arch(self): """T...
True
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_api_functions.py
test_with_input_handler
assert
bool_literal
19
import pytest from unittest.mock import patch, MagicMock from ..api import ( find_exploit_paths, format_analysis_summary, check_exploit_viability, get_exploit_constraints, list_primitives, get_primitive_requirements, ) class TestGetExploitConstraints: def test_with_input_handler(self): ...
False
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_api_functions.py
test_i386_arch
assert
string_literal
18
import pytest from unittest.mock import patch, MagicMock from ..api import ( find_exploit_paths, format_analysis_summary, check_exploit_viability, get_exploit_constraints, list_primitives, get_primitive_requirements, ) class TestGetExploitConstraints: def test_i386_arch(self): """T...
'i386'
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_api_functions.py
test_contains_primitives
assert
variable
19
import pytest from unittest.mock import patch, MagicMock from ..api import ( find_exploit_paths, format_analysis_summary, check_exploit_viability, get_exploit_constraints, list_primitives, get_primitive_requirements, ) class TestListPrimitives: def test_contains_primitives(self): "...
result
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_api_persistence.py
test_save_contains_required_fields
assert
variable
77
import json import os import tempfile import pytest from pathlib import Path from unittest.mock import patch, MagicMock from ..api import ( save_exploit_context, load_exploit_context, print_exploit_context, ) class TestSaveExploitContext: def mock_analysis_result(self): """Mock result from an...
ctx
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_api_persistence.py
test_save_uses_binary_parent_dir_by_default
assert
variable
75
import json import os import tempfile import pytest from pathlib import Path from unittest.mock import patch, MagicMock from ..api import ( save_exploit_context, load_exploit_context, print_exploit_context, ) class TestSaveExploitContext: def mock_analysis_result(self): """Mock result from an...
subdir
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_api_persistence.py
test_full_round_trip
assert
variable
46
import json import os import tempfile import pytest from pathlib import Path from unittest.mock import patch, MagicMock from ..api import ( save_exploit_context, load_exploit_context, print_exploit_context, ) class TestRoundTrip: def test_full_round_trip(self): """Test complete save -> load -...
output
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_api_persistence.py
test_save_includes_libc_offsets
assert
complex_expr
77
import json import os import tempfile import pytest from pathlib import Path from unittest.mock import patch, MagicMock from ..api import ( save_exploit_context, load_exploit_context, print_exploit_context, ) class TestSaveExploitContext: def mock_analysis_result(self): """Mock result from an...
0x50d70
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_api_persistence.py
test_save_includes_libc_offsets
assert
complex_expr
78
import json import os import tempfile import pytest from pathlib import Path from unittest.mock import patch, MagicMock from ..api import ( save_exploit_context, load_exploit_context, print_exploit_context, ) class TestSaveExploitContext: def mock_analysis_result(self): """Mock result from an...
0x1d8698
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_constraints.py
test_strcpy_x86_64_blocks_rop
assert
numeric_literal
20
import pytest from ..constraints import ( analyze_input_constraints, analyze_bad_byte_impact, assess_libc_fingerprinting, InputConstraintAnalysis, BadByteImpact, LibcFingerprintingPotential, ) class TestInputConstraintAnalysis: def test_strcpy_x86_64_blocks_rop(self): """Test that ...
6
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_constraints.py
test_strcpy_i386_rop_may_work
assert
numeric_literal
19
import pytest from ..constraints import ( analyze_input_constraints, analyze_bad_byte_impact, assess_libc_fingerprinting, InputConstraintAnalysis, BadByteImpact, LibcFingerprintingPotential, ) class TestInputConstraintAnalysis: def test_strcpy_i386_rop_may_work(self): """Test that ...
4
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_constraints.py
test_to_dict_complete
assert
variable
19
import pytest from ..constraints import ( analyze_input_constraints, analyze_bad_byte_impact, assess_libc_fingerprinting, InputConstraintAnalysis, BadByteImpact, LibcFingerprintingPotential, ) class TestInputConstraintAnalysis: def test_to_dict_complete(self): """Test that to_dict(...
d
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_constraints.py
test_null_at_position_6
assert
numeric_literal
22
import pytest from ..constraints import ( analyze_input_constraints, analyze_bad_byte_impact, assess_libc_fingerprinting, InputConstraintAnalysis, BadByteImpact, LibcFingerprintingPotential, ) class TestBadByteImpact: def test_null_at_position_6(self): """Test typical x86_64 addres...
0
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_constraints.py
test_partial_overwrite_technique
assert
numeric_literal
22
import pytest from ..constraints import ( analyze_input_constraints, analyze_bad_byte_impact, assess_libc_fingerprinting, InputConstraintAnalysis, BadByteImpact, LibcFingerprintingPotential, ) class TestBadByteImpact: def test_partial_overwrite_technique(self): """Test partial over...
2
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_constraints.py
test_good_fingerprinting_many_symbols
assert
numeric_literal
19
import pytest from ..constraints import ( analyze_input_constraints, analyze_bad_byte_impact, assess_libc_fingerprinting, InputConstraintAnalysis, BadByteImpact, LibcFingerprintingPotential, ) class TestLibcFingerprinting: def test_good_fingerprinting_many_symbols(self): """Test go...
5
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_constraints.py
test_limited_fingerprinting_few_symbols
assert
numeric_literal
19
import pytest from ..constraints import ( analyze_input_constraints, analyze_bad_byte_impact, assess_libc_fingerprinting, InputConstraintAnalysis, BadByteImpact, LibcFingerprintingPotential, ) class TestLibcFingerprinting: def test_limited_fingerprinting_few_symbols(self): """Test ...
3
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_constraints.py
test_poor_fingerprinting_minimal_symbols
assert
numeric_literal
19
import pytest from ..constraints import ( analyze_input_constraints, analyze_bad_byte_impact, assess_libc_fingerprinting, InputConstraintAnalysis, BadByteImpact, LibcFingerprintingPotential, ) class TestLibcFingerprinting: def test_poor_fingerprinting_minimal_symbols(self): """Test...
1
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_constraints.py
test_poor_fingerprinting_minimal_symbols
assert
string_literal
21
import pytest from ..constraints import ( analyze_input_constraints, analyze_bad_byte_impact, assess_libc_fingerprinting, InputConstraintAnalysis, BadByteImpact, LibcFingerprintingPotential, ) class TestLibcFingerprinting: def test_poor_fingerprinting_minimal_symbols(self): """Test...
"low"
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_context.py
test_x86_64_defaults
assert
numeric_literal
17
import pytest from ..context import ( ExploitationConstraints, PayloadConstraints, LibcInfo, ROPGadgetInfo, ELFStructure, AddressSpaceInfo, ) class TestExploitationConstraints: def test_x86_64_defaults(self): """Test x86_64 architecture defaults.""" constraints = Exploitati...
8
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_context.py
test_x86_64_defaults
assert
numeric_literal
18
import pytest from ..context import ( ExploitationConstraints, PayloadConstraints, LibcInfo, ROPGadgetInfo, ELFStructure, AddressSpaceInfo, ) class TestExploitationConstraints: def test_x86_64_defaults(self): """Test x86_64 architecture defaults.""" constraints = Exploitati...
6
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_context.py
test_x86_64_strcpy_blocks_rop
assert
numeric_literal
18
import pytest from ..context import ( ExploitationConstraints, PayloadConstraints, LibcInfo, ROPGadgetInfo, ELFStructure, AddressSpaceInfo, ) class TestExploitationConstraints: def test_x86_64_strcpy_blocks_rop(self): """Test that x86_64 with strcpy blocks ROP.""" constrain...
0
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_context.py
test_i386_defaults
assert
numeric_literal
17
import pytest from ..context import ( ExploitationConstraints, PayloadConstraints, LibcInfo, ROPGadgetInfo, ELFStructure, AddressSpaceInfo, ) class TestExploitationConstraints: def test_i386_defaults(self): """Test i386 architecture defaults.""" constraints = ExploitationCo...
4
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_context.py
test_default_empty
assert
string_literal
18
import pytest from ..context import ( ExploitationConstraints, PayloadConstraints, LibcInfo, ROPGadgetInfo, ELFStructure, AddressSpaceInfo, ) class TestPayloadConstraints: def test_default_empty(self): """Test default empty constraints.""" constraints = PayloadConstraints()...
""
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_context.py
test_i386_strcpy_allows_rop
assert
bool_literal
17
import pytest from ..context import ( ExploitationConstraints, PayloadConstraints, LibcInfo, ROPGadgetInfo, ELFStructure, AddressSpaceInfo, ) class TestExploitationConstraints: def test_i386_strcpy_allows_rop(self): """Test that i386 with strcpy may allow ROP.""" constraint...
True
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_context.py
test_x86_64_strcpy_blocks_rop
assert
bool_literal
17
import pytest from ..context import ( ExploitationConstraints, PayloadConstraints, LibcInfo, ROPGadgetInfo, ELFStructure, AddressSpaceInfo, ) class TestExploitationConstraints: def test_x86_64_strcpy_blocks_rop(self): """Test that x86_64 with strcpy blocks ROP.""" constrain...
False
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_extended_dataclasses.py
test_charset_filtering_fields
assert
numeric_literal
23
import pytest from ..context import ( ROPGadgetInfo, ELFStructure, AddressSpaceInfo, PayloadConstraints, ExploitPrimitive, WriteTarget, ) class TestROPGadgetInfoExtended: def test_charset_filtering_fields(self): """Test charset filtering count fields.""" info = ROPGadgetInf...
5
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_extended_dataclasses.py
test_all_gadgets_list
assert
numeric_literal
21
import pytest from ..context import ( ROPGadgetInfo, ELFStructure, AddressSpaceInfo, PayloadConstraints, ExploitPrimitive, WriteTarget, ) class TestROPGadgetInfoExtended: def test_all_gadgets_list(self): """Test all_gadgets list storage.""" gadgets = [ {'address...
2
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_extended_dataclasses.py
test_init_array_fields
assert
numeric_literal
21
import pytest from ..context import ( ROPGadgetInfo, ELFStructure, AddressSpaceInfo, PayloadConstraints, ExploitPrimitive, WriteTarget, ) class TestELFStructureExtended: def test_init_array_fields(self): """Test .init_array fields.""" struct = ELFStructure( init...
8
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_extended_dataclasses.py
test_max_embeddable_addresses_default
assert
numeric_literal
17
import pytest from ..context import ( ROPGadgetInfo, ELFStructure, AddressSpaceInfo, PayloadConstraints, ExploitPrimitive, WriteTarget, ) class TestPayloadConstraintsExtended: def test_max_embeddable_addresses_default(self): """Test max_embeddable_addresses defaults to 0.""" ...
0
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_extended_dataclasses.py
test_charset_filtering_fields
assert
numeric_literal
21
import pytest from ..context import ( ROPGadgetInfo, ELFStructure, AddressSpaceInfo, PayloadConstraints, ExploitPrimitive, WriteTarget, ) class TestROPGadgetInfoExtended: def test_charset_filtering_fields(self): """Test charset filtering count fields.""" info = ROPGadgetInf...
15
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_extended_dataclasses.py
test_charset_filtering_fields
assert
numeric_literal
22
import pytest from ..context import ( ROPGadgetInfo, ELFStructure, AddressSpaceInfo, PayloadConstraints, ExploitPrimitive, WriteTarget, ) class TestROPGadgetInfoExtended: def test_charset_filtering_fields(self): """Test charset filtering count fields.""" info = ROPGadgetInf...
20
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_extended_dataclasses.py
test_plt_stub_size_default
assert
numeric_literal
17
import pytest from ..context import ( ROPGadgetInfo, ELFStructure, AddressSpaceInfo, PayloadConstraints, ExploitPrimitive, WriteTarget, ) class TestELFStructureExtended: def test_plt_stub_size_default(self): """Test plt_stub_size default value.""" struct = ELFStructure() ...
16
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_extended_dataclasses.py
test_plt_stub_size_custom
assert
numeric_literal
17
import pytest from ..context import ( ROPGadgetInfo, ELFStructure, AddressSpaceInfo, PayloadConstraints, ExploitPrimitive, WriteTarget, ) class TestELFStructureExtended: def test_plt_stub_size_custom(self): """Test setting custom plt_stub_size.""" struct = ELFStructure(plt_...
32
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_extended_dataclasses.py
test_bad_byte_reasons_default
assert
collection
17
import pytest from ..context import ( ROPGadgetInfo, ELFStructure, AddressSpaceInfo, PayloadConstraints, ExploitPrimitive, WriteTarget, ) class TestPayloadConstraintsExtended: def test_bad_byte_reasons_default(self): """Test bad_byte_reasons defaults to empty dict.""" const...
{}
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_extended_dataclasses.py
test_allowed_charset_default
assert
string_literal
17
import pytest from ..context import ( ROPGadgetInfo, ELFStructure, AddressSpaceInfo, PayloadConstraints, ExploitPrimitive, WriteTarget, ) class TestPayloadConstraintsExtended: def test_allowed_charset_default(self): """Test allowed_charset defaults to empty string.""" const...
""
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_extended_dataclasses.py
test_encoding_suggestions_default
assert
collection
17
import pytest from ..context import ( ROPGadgetInfo, ELFStructure, AddressSpaceInfo, PayloadConstraints, ExploitPrimitive, WriteTarget, ) class TestPayloadConstraintsExtended: def test_encoding_suggestions_default(self): """Test encoding_suggestions defaults to empty list.""" ...
[]
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_extended_dataclasses.py
test_extended_gadgets_default_to_none
assert
none_literal
17
import pytest from ..context import ( ROPGadgetInfo, ELFStructure, AddressSpaceInfo, PayloadConstraints, ExploitPrimitive, WriteTarget, ) class TestROPGadgetInfoExtended: def test_extended_gadgets_default_to_none(self): """Test that extended gadget fields default to None.""" ...
None
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_extended_dataclasses.py
test_must_be_printable_flag
assert
bool_literal
17
import pytest from ..context import ( ROPGadgetInfo, ELFStructure, AddressSpaceInfo, PayloadConstraints, ExploitPrimitive, WriteTarget, ) class TestPayloadConstraintsExtended: def test_must_be_printable_flag(self): """Test must_be_printable flag.""" constraints = PayloadCon...
True
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_graph.py
test_init_empty
assert
numeric_literal
13
import pytest from ..graph import ( PrimitiveDependencyGraph, create_dependency_graph, ) class TestPrimitiveDependencyGraph: def test_init_empty(self): """Test initialization with no mitigations.""" graph = PrimitiveDependencyGraph() assert len(graph.active_mitigations) ==
0
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_graph.py
test_get_shortest_path
assert
numeric_literal
17
import pytest from ..graph import ( PrimitiveDependencyGraph, create_dependency_graph, ) class TestPrimitiveDependencyGraph: def test_get_shortest_path(self): """Test getting shortest path.""" graph = PrimitiveDependencyGraph() path = graph.get_shortest_path("format_string_vuln") ...
10
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_graph.py
test_get_primitive_info
assert
none_literal
14
import pytest from ..graph import ( PrimitiveDependencyGraph, create_dependency_graph, ) class TestPrimitiveDependencyGraph: def test_get_primitive_info(self): """Test getting primitive info.""" graph = PrimitiveDependencyGraph() info = graph.get_primitive_info("libc_leak") ...
None
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_graph.py
test_summary
assert
variable
14
import pytest from ..graph import ( PrimitiveDependencyGraph, create_dependency_graph, ) class TestPrimitiveDependencyGraph: def test_summary(self): """Test summary output.""" graph = PrimitiveDependencyGraph(["full_relro"]) summary = graph.summary() assert "PRIMITIVE DEPE...
summary
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_graph.py
test_find_paths_to_goal_basic
assert
complex_expr
20
import pytest from ..graph import ( PrimitiveDependencyGraph, create_dependency_graph, ) class TestPrimitiveDependencyGraph: def test_find_paths_to_goal_basic(self): """Test finding paths to code execution.""" graph = PrimitiveDependencyGraph() paths = graph.find_paths_to_goal("for...
path.steps
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_graph.py
test_get_primitive_info
assert
string_literal
15
import pytest from ..graph import ( PrimitiveDependencyGraph, create_dependency_graph, ) class TestPrimitiveDependencyGraph: def test_get_primitive_info(self): """Test getting primitive info.""" graph = PrimitiveDependencyGraph() info = graph.get_primitive_info("libc_leak") ...
"libc_leak"
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_graph.py
test_find_paths_to_goal_basic
assert
string_literal
19
import pytest from ..graph import ( PrimitiveDependencyGraph, create_dependency_graph, ) class TestPrimitiveDependencyGraph: def test_find_paths_to_goal_basic(self): """Test finding paths to code execution.""" graph = PrimitiveDependencyGraph() paths = graph.find_paths_to_goal("for...
"code_execution"
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_graph.py
test_is_blocked_with_mitigation
assert
string_literal
15
import pytest from ..graph import ( PrimitiveDependencyGraph, create_dependency_graph, ) class TestPrimitiveDependencyGraph: def test_is_blocked_with_mitigation(self): """Test is_blocked when mitigation is active.""" graph = PrimitiveDependencyGraph(["glibc_n_disabled"]) blocked, r...
"glibc_n_disabled"
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_graph.py
test_init_with_mitigations
assert
complex_expr
13
import pytest from ..graph import ( PrimitiveDependencyGraph, create_dependency_graph, ) class TestPrimitiveDependencyGraph: def test_init_with_mitigations(self): """Test initialization with mitigations.""" graph = PrimitiveDependencyGraph(["full_relro", "stack_canary"]) assert "f...
graph.active_mitigations
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_integration.py
test_format_real_analysis_result
assert
numeric_literal
65
import os import subprocess import tempfile import pytest from pathlib import Path from unittest.mock import patch, MagicMock def find_any_elf_binary(): """Find any ELF binary on the system for testing.""" # Try common system binaries that should exist candidates = [ "/bin/ls", "/bin/cat", ...
0
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_integration.py
test_analysis_runs_once_not_multiple_times
assert
numeric_literal
81
import os import subprocess import tempfile import pytest from pathlib import Path from unittest.mock import patch, MagicMock def find_any_elf_binary(): """Find any ELF binary on the system for testing.""" # Try common system binaries that should exist candidates = [ "/bin/ls", "/bin/cat", ...
1
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_integration.py
test_rop_gadget_info_instantiates
assert
collection
62
import os import subprocess import tempfile import pytest from pathlib import Path from unittest.mock import patch, MagicMock def find_any_elf_binary(): """Find any ELF binary on the system for testing.""" # Try common system binaries that should exist candidates = [ "/bin/ls", "/bin/cat", ...
[]
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_integration.py
test_elf_structure_instantiates
assert
numeric_literal
61
import os import subprocess import tempfile import pytest from pathlib import Path from unittest.mock import patch, MagicMock def find_any_elf_binary(): """Find any ELF binary on the system for testing.""" # Try common system binaries that should exist candidates = [ "/bin/ls", "/bin/cat", ...
16
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_integration.py
test_payload_constraints_instantiates
assert
collection
61
import os import subprocess import tempfile import pytest from pathlib import Path from unittest.mock import patch, MagicMock def find_any_elf_binary(): """Find any ELF binary on the system for testing.""" # Try common system binaries that should exist candidates = [ "/bin/ls", "/bin/cat", ...
{}
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_integration.py
test_payload_constraints_instantiates
assert
string_literal
63
import os import subprocess import tempfile import pytest from pathlib import Path from unittest.mock import patch, MagicMock def find_any_elf_binary(): """Find any ELF binary on the system for testing.""" # Try common system binaries that should exist candidates = [ "/bin/ls", "/bin/cat", ...
""
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_integration.py
test_rop_gadgets_serialized_correctly
assert
variable
64
import os import subprocess import tempfile import pytest from pathlib import Path from unittest.mock import patch, MagicMock def find_any_elf_binary(): """Find any ELF binary on the system for testing.""" # Try common system binaries that should exist candidates = [ "/bin/ls", "/bin/cat", ...
rg
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_integration.py
test_payload_constraints_serialized_correctly
assert
variable
63
import os import subprocess import tempfile import pytest from pathlib import Path from unittest.mock import patch, MagicMock def find_any_elf_binary(): """Find any ELF binary on the system for testing.""" # Try common system binaries that should exist candidates = [ "/bin/ls", "/bin/cat", ...
pc
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_integration.py
test_elf_structure_serialized_correctly
assert
variable
63
import os import subprocess import tempfile import pytest from pathlib import Path from unittest.mock import patch, MagicMock def find_any_elf_binary(): """Find any ELF binary on the system for testing.""" # Try common system binaries that should exist candidates = [ "/bin/ls", "/bin/cat", ...
elf
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_integration.py
test_address_space_info_instantiates
assert
none_literal
61
import os import subprocess import tempfile import pytest from pathlib import Path from unittest.mock import patch, MagicMock def find_any_elf_binary(): """Find any ELF binary on the system for testing.""" # Try common system binaries that should exist candidates = [ "/bin/ls", "/bin/cat", ...
None
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_integration.py
test_write_target_instantiates
assert
bool_literal
62
import os import subprocess import tempfile import pytest from pathlib import Path from unittest.mock import patch, MagicMock def find_any_elf_binary(): """Find any ELF binary on the system for testing.""" # Try common system binaries that should exist candidates = [ "/bin/ls", "/bin/cat", ...
True
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_primitives.py
test_score_clamped_to_valid_range
assert
numeric_literal
22
import pytest from ..primitives import ( Primitive, PrimitiveID, PrimitiveType, MitigationID, ConfidenceScore, ExploitPath, get_primitive_definitions, ) class TestConfidenceScore: def test_score_clamped_to_valid_range(self): """Test that score is clamped between 0 and 100.""" ...
0
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_primitives.py
test_basic_path
assert
numeric_literal
23
import pytest from ..primitives import ( Primitive, PrimitiveID, PrimitiveType, MitigationID, ConfidenceScore, ExploitPath, get_primitive_definitions, ) class TestExploitPath: def test_basic_path(self): """Test basic exploit path creation.""" path = ExploitPath( ...
3
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_primitives.py
test_from_reliability_high
assert
numeric_literal
19
import pytest from ..primitives import ( Primitive, PrimitiveID, PrimitiveType, MitigationID, ConfidenceScore, ExploitPath, get_primitive_definitions, ) class TestConfidenceScore: def test_from_reliability_high(self): """Test high reliability score.""" score = Confidenc...
85
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_primitives.py
test_compute_confidence
assert
numeric_literal
26
import pytest from ..primitives import ( Primitive, PrimitiveID, PrimitiveType, MitigationID, ConfidenceScore, ExploitPath, get_primitive_definitions, ) class TestExploitPath: def test_compute_confidence(self): """Test confidence computation.""" path = ExploitPath( ...
90
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_primitives.py
test_returns_copy
assert
variable
23
import pytest from ..primitives import ( Primitive, PrimitiveID, PrimitiveType, MitigationID, ConfidenceScore, ExploitPath, get_primitive_definitions, ) class TestGetPrimitiveDefinitions: def test_returns_copy(self): """Test that function returns a fresh copy each time.""" ...
p2
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_primitives.py
test_score_clamped_to_valid_range
assert
numeric_literal
23
import pytest from ..primitives import ( Primitive, PrimitiveID, PrimitiveType, MitigationID, ConfidenceScore, ExploitPath, get_primitive_definitions, ) class TestConfidenceScore: def test_score_clamped_to_valid_range(self): """Test that score is clamped between 0 and 100.""" ...
100
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_primitives.py
test_compute_confidence
assert
none_literal
24
import pytest from ..primitives import ( Primitive, PrimitiveID, PrimitiveType, MitigationID, ConfidenceScore, ExploitPath, get_primitive_definitions, ) class TestExploitPath: def test_compute_confidence(self): """Test confidence computation.""" path = ExploitPath( ...
None
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_primitives.py
test_from_reliability_low
assert
string_literal
18
import pytest from ..primitives import ( Primitive, PrimitiveID, PrimitiveType, MitigationID, ConfidenceScore, ExploitPath, get_primitive_definitions, ) class TestConfidenceScore: def test_from_reliability_low(self): """Test low reliability score.""" score = ConfidenceS...
"low"
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_primitives.py
test_from_reliability_high
assert
string_literal
18
import pytest from ..primitives import ( Primitive, PrimitiveID, PrimitiveType, MitigationID, ConfidenceScore, ExploitPath, get_primitive_definitions, ) class TestConfidenceScore: def test_from_reliability_high(self): """Test high reliability score.""" score = Confidenc...
"high"
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_primitives.py
test_get_missing_requirements
assert
variable
24
import pytest from ..primitives import ( Primitive, PrimitiveID, PrimitiveType, MitigationID, ConfidenceScore, ExploitPath, get_primitive_definitions, ) class TestPrimitive: def test_get_missing_requirements(self): """Test get_missing_requirements method.""" p = Primiti...
missing
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_primitives.py
test_summary_format
assert
variable
19
import pytest from ..primitives import ( Primitive, PrimitiveID, PrimitiveType, MitigationID, ConfidenceScore, ExploitPath, get_primitive_definitions, ) class TestConfidenceScore: def test_summary_format(self): """Test summary output format.""" score = ConfidenceScore.f...
summary
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_primitives.py
test_from_reliability_medium
assert
string_literal
18
import pytest from ..primitives import ( Primitive, PrimitiveID, PrimitiveType, MitigationID, ConfidenceScore, ExploitPath, get_primitive_definitions, ) class TestConfidenceScore: def test_from_reliability_medium(self): """Test medium reliability score.""" score = Confi...
"medium"
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_primitives.py
test_returns_copy
assert
func_call
20
import pytest from ..primitives import ( Primitive, PrimitiveID, PrimitiveType, MitigationID, ConfidenceScore, ExploitPath, get_primitive_definitions, ) class TestGetPrimitiveDefinitions: def test_returns_copy(self): """Test that function returns a fresh copy each time.""" ...
p2.keys()
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_strategies.py
test_context_warnings_unknown_glibc
assert
numeric_literal
31
import pytest from unittest.mock import patch, MagicMock from packages.exploit_feasibility.profiles import ( TargetContext, TargetProfile, create_local_profile, create_remote_profile, create_web_profile, create_kernel_profile, ) from packages.exploit_feasibility.strategies import ( Analysis...
1
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_strategies.py
test_context_warnings_known_glibc
assert
numeric_literal
31
import pytest from unittest.mock import patch, MagicMock from packages.exploit_feasibility.profiles import ( TargetContext, TargetProfile, create_local_profile, create_remote_profile, create_web_profile, create_kernel_profile, ) from packages.exploit_feasibility.strategies import ( Analysis...
0
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor
gadievron/raptor
4a510397258bda7fac55efdee938ce033c5b9274
7
train
train
packages/exploit_feasibility/tests/test_strategies.py
test_binary_protections_not_applicable
assert
collection
31
import pytest from unittest.mock import patch, MagicMock from packages.exploit_feasibility.profiles import ( TargetContext, TargetProfile, create_local_profile, create_remote_profile, create_web_profile, create_kernel_profile, ) from packages.exploit_feasibility.strategies import ( Analysis...
{}
4a510397258bda7fac55efdee938ce033c5b9274
7
v2_extractor_at_anchor