File size: 1,114 Bytes
80018f2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ae29d48
80018f2
 
 
 
 
ae29d48
80018f2
 
 
 
 
ae29d48
80018f2
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import os

# Load Medium task metadata
DIR = os.path.dirname(os.path.abspath(__file__))
CONTRACT_PATH = os.path.join(DIR, "..", "contracts", "medium_multi_vuln.sol")

with open(CONTRACT_PATH, "r") as f:
    CONTRACT_CODE = f.read()

MEDIUM_TASK = {
    "name": "MultiVulnerable",
    "code": CONTRACT_CODE,
    "description": "Identify 3 different vulnerability types across multiple functions.",
    "ground_truth": {
        "vulnerabilities": [
            {
                "type": "unchecked return",
                "line": 24,
                "severity": "medium",
                "description": "Return value of external call is not checked"
            },
            {
                "type": "access control",
                "line": 30,
                "severity": "critical",
                "description": "Sensitive kill function lacks access control"
            },
            {
                "type": "logic flaw",
                "line": 42,
                "severity": "high",
                "description": "Insecure reward mechanism allowing anyone to claim"
            }
        ]
    }
}