{"id": "inv_01", "category": "broken_invariant", "domain": "access_control", "code": "@app.get('/orders/')\n@login_required\ndef get_order(oid):\n o = db.get_order(oid)\n return o.to_json()", "question": "Which invariant does this route fail to enforce?", "A": "An order id must be a positive integer", "B": "A user may read only orders belonging to their own account", "C": "Orders must be returned as JSON", "D": "The route must require a login", "answer": "B"} {"id": "root_01", "category": "root_cause", "domain": "web_security", "code": "# get_doc enforces owner check; export_doc, email_doc, preview_doc each load the doc by id with NO owner check", "question": "What is the best root-cause statement?", "A": "There are three separate IDOR bugs to patch", "B": "Document authorization is not a shared invariant; each route re-implements (and some omit) the check", "C": "The export feature should be removed", "D": "The database is too slow", "answer": "B"} {"id": "chain_01", "category": "chain_valid", "domain": "web_security", "code": "Bug A postcondition: attacker learns a valid internal report_id of another tenant.\nBug B precondition: a valid report_id.\nBug B: export endpoint checks login but not tenant ownership.", "question": "Edge A->B status? (A=proven B=probable C=speculative D=blocked)", "A": "proven", "B": "probable", "C": "speculative", "D": "blocked", "answer": "A"} {"id": "chain_02", "category": "chain_valid", "domain": "access_control", "code": "Bug A postcondition: attacker learns an administrator's email address.\nBug B precondition: possession of a valid administrator session token.", "question": "Edge A->B (email leak -> admin auth) status? (A=proven B=probable C=speculative D=blocked)", "A": "proven", "B": "probable", "C": "speculative", "D": "blocked", "answer": "D"} {"id": "cap_01", "category": "capability", "domain": "web_security", "code": "def update_avatar(req, user):\n user.avatar_url = req.json['avatar_url']\n db.save(user)\n# elsewhere: worker does http_client.get(user.avatar_url)", "question": "What capability does controlling avatar_url most directly grant?", "A": "Knowledge of another user's ID", "B": "Ability to make the server issue a request to an attacker-chosen URL (SSRF primitive)", "C": "Execute arbitrary shell commands", "D": "Nothing; it only stores a string", "answer": "B"} {"id": "miss_01", "category": "missing_check", "domain": "access_control", "code": "@app.delete('/files/')\n@login_required\ndef delete_file(fid):\n db.delete(db.get_file(fid))\n return {'ok':True}", "question": "What check is missing?", "A": "Authentication", "B": "Rate limiting", "C": "Object-level authorization (ownership/tenant of the selected file)", "D": "Input length validation", "answer": "C"} {"id": "conf_01", "category": "confidence", "domain": "web_security", "code": "Claim: 'a normal user can read another tenant's invoice.'\nEvidence: route lacks an ownership check in source; but repository scoping and middleware were NOT reviewed.", "question": "What confidence is warranted?", "A": "High - confirmed exploit", "B": "Medium - plausible but unverified prerequisites remain", "C": "None - no evidence at all", "D": "High - IDOR is always exploitable", "answer": "B"} {"id": "neg_01", "category": "negative_space", "domain": "access_control", "code": "def download_invoice(user, iid):\n if user.is_authenticated:\n return pdf(db.get_invoice(iid))", "question": "What does this code NOT check (that it should)?", "A": "Whether the user is authenticated", "B": "Whether the invoice belongs to the user's org / whether the user may view it", "C": "Whether the PDF renders", "D": "Whether the id is an integer", "answer": "B"} {"id": "state_01", "category": "state_sequence", "domain": "web_security", "code": "approve(p): p.status='approved'\nedit(p,amt): p.amount=amt\nexecute(p): if p.status=='approved': provider.transfer(p.amount)", "question": "Which sequence breaks the invariant 'executed amount == approved amount'?", "A": "approve -> execute", "B": "edit -> approve -> execute", "C": "approve -> edit -> execute", "D": "approve -> approve -> execute", "answer": "C"} {"id": "chain_03", "category": "chain_valid", "domain": "web_security", "code": "Bug A postcondition: attacker can upload an image file to their own gallery.\nBug B precondition: ability to write an EXECUTABLE file into a web-served directory.", "question": "Edge A->B status? (A=proven B=probable C=speculative D=blocked)", "A": "proven", "B": "probable", "C": "speculative", "D": "blocked", "answer": "D"} {"id": "chain_04", "category": "chain_valid", "domain": "web_security", "code": "Bug A postcondition: attacker can set their own profile 'bio' field to arbitrary text.\nBug B precondition: ability to inject HTML that executes in an ADMIN's browser.\nContext: the admin panel renders bios with automatic HTML-escaping.", "question": "Edge A->B status? (escaping is on)", "A": "proven", "B": "probable", "C": "speculative", "D": "blocked", "answer": "D"} {"id": "chain_05", "category": "chain_valid", "domain": "access_control", "code": "Bug A postcondition: attacker learns a valid password-reset token for victim.\nBug B precondition: a valid, unconsumed reset token for the target account.", "question": "Edge A->B status?", "A": "proven", "B": "probable", "C": "speculative", "D": "blocked", "answer": "A"} {"id": "chain_06", "category": "chain_valid", "domain": "cloud_security", "code": "Bug A postcondition: attacker can cause the server to fetch an attacker-chosen URL (SSRF).\nBug B precondition: ability to reach the internal metadata service at 169.254.169.254.\nContext: no network egress policy has been reviewed yet.", "question": "Edge A->B status?", "A": "proven", "B": "probable", "C": "speculative", "D": "blocked", "answer": "C"} {"id": "chain_07", "category": "chain_valid", "domain": "access_control", "code": "Bug A postcondition: attacker obtains a low-privilege API key scoped to read-only.\nBug B precondition: a key with write scope to modify billing.", "question": "Edge A->B status?", "A": "proven", "B": "probable", "C": "speculative", "D": "blocked", "answer": "D"} {"id": "chain_08", "category": "chain_valid", "domain": "access_control", "code": "Bug A postcondition: attacker can enumerate valid usernames via a login timing difference.\nBug B precondition: a list of valid usernames to target with credential stuffing.", "question": "Edge A->B status?", "A": "proven", "B": "probable", "C": "speculative", "D": "blocked", "answer": "A"} {"id": "chain_09", "category": "chain_valid", "domain": "web_security", "code": "Bug A postcondition: attacker controls the 'filename' field stored on an upload.\nBug B precondition: a path that escapes the upload directory when the download service joins it unsanitized.\nContext: download service confirmed to do os.path.join(base, filename) with no canonicalization.", "question": "Edge A->B status?", "A": "proven", "B": "probable", "C": "speculative", "D": "blocked", "answer": "A"} {"id": "chain_10", "category": "chain_valid", "domain": "access_control", "code": "Bug A postcondition: attacker reads another tenant's document TITLE (metadata only).\nBug B precondition: the document's binary CONTENTS.", "question": "Edge A->B status?", "A": "proven", "B": "probable", "C": "speculative", "D": "blocked", "answer": "D"} {"id": "conf_02", "category": "confidence", "domain": "web_security", "code": "Claim: 'the export route allows cross-tenant access.'\nEvidence: route source lacks a tenant check AND the repository query was inspected and also has no tenant filter AND a lab request with a foreign id returned the object.", "question": "Confidence?", "A": "High - proven end to end by code + test", "B": "Medium", "C": "Low", "D": "None", "answer": "A"} {"id": "conf_03", "category": "confidence", "domain": "web_security", "code": "Claim: 'this is remote code execution.'\nEvidence: user input reaches a template render call; the templating engine's sandbox settings were NOT reviewed.", "question": "Confidence in RCE specifically?", "A": "High", "B": "Medium - SSTI primitive shown but sandbox/impact unverified", "C": "Low - no evidence", "D": "None", "answer": "B"} {"id": "conf_04", "category": "confidence", "domain": "access_control", "code": "Claim: 'admin account takeover is possible.'\nEvidence: only that an admin's email address was disclosed.", "question": "Confidence in account takeover?", "A": "High", "B": "Medium", "C": "Low - email alone does not establish authentication", "D": "Confirmed", "answer": "C"}