smart-contract-audit-env / tasks /task_medium.py
Ismail131's picture
Upload folder using huggingface_hub
ae29d48 verified
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"
}
]
}
}