Write the AI risk register for your own lab system
Task
Write a risk register for the lab system you built, covering every risk category in the lesson, scored on one scale, stated in business terms, and owned. Two of its rows cite evidence you measure from your own log rather than estimate: how often the restricted document's canary reached a response, and how many log records hold it.
Steps
- Create
lab/ai-risk-register.csvwith headerid,category,risk_statement,business_impact,likelihood,impact,score,owner,treatment,residual,evidence. Quote any field containing a comma. Ids areR-01,R-02and so on. - Write at least one row in each of ten categories:
introduced_bias,drift,prompt_leakage,output_leakage,training_leakage,log_leakage,reputation,ip,autonomy,shadow_ai. Every risk is about this lab: a model licence you never read isip; the invented salary bands surfacing in an answer isoutput_leakage. - State
business_impactin business terms, as the lesson asks: 'salary bands visible to every user of the assistant', not 'retrieval returned chunk 14'. - Score
likelihoodandimpactas integers from 1 to 5 and setscoreto their product.treatmentis one ofmitigate,transfer,avoidoraccept. Anyacceptrow is owned bybusiness_owner, because the analyst advises and the owner accepts. - Measure two rows: count gateway records whose response contains the canary, and records containing it anywhere. Count either form,
CANARY-7Q4X-SECAIor the[CANARY]that lesson 15's log writer leaves in its place: a masked record still shows that the canary was there. Put each count into theevidencefield of theoutput_leakageandlog_leakagerows. The verify block prints both counts, so run it, fill them in and run it again.
Verify
cd ~/secai-lab
python - <<'EOF'
import csv, json
rows = list(csv.DictReader(open("lab/ai-risk-register.csv", encoding="utf-8")))
cats = {"introduced_bias", "drift", "prompt_leakage", "output_leakage", "training_leakage",
"log_leakage", "reputation", "ip", "autonomy", "shadow_ai"}
print(len(rows), "risks; categories missing:", sorted(cats - {r["category"] for r in rows}))
print("score is not likelihood x impact:",
[r["id"] for r in rows if int(r["score"]) != int(r["likelihood"]) * int(r["impact"])])
print("out of range:", [r["id"] for r in rows if not (1 <= int(r["likelihood"]) <= 5 and 1 <= int(r["impact"]) <= 5)])
print("bad treatment:", [r["id"] for r in rows if r["treatment"] not in ("mitigate", "transfer", "avoid", "accept")])
print("accepted by someone other than the business owner:",
[r["id"] for r in rows if r["treatment"] == "accept" and r["owner"] != "business_owner"])
roles = open("lab/raci.csv", encoding="utf-8").readline().strip().split(",")[1:]
print("owners not in the RACI:", sorted({r["owner"] for r in rows} - set(roles)))
log = [json.loads(l) for l in open("logs/gateway.jsonl", encoding="utf-8") if l.strip()]
def canary(text):
return "CANARY-7Q4X-SECAI" in text or "[CANARY]" in text
n_out = sum(canary(r.get("response") or "") for r in log)
n_log = sum(canary(json.dumps(r)) for r in log)
ev = {r["category"]: r["evidence"] for r in rows}
print("canary in responses:", n_out, "- cited:", str(n_out) in ev.get("output_leakage", ""))
print("records holding it:", n_log, "- cited:", str(n_log) in ev.get("log_leakage", ""))
EOF
Ten or more risks with no categories missing; empty score, range, treatment, acceptance and owner lists; and both measured counts printed with cited: True. A traceback from int() means a score cell holds something other than a whole number. A canary count of zero is a valid result if an earlier lab added redaction; the register then records the control that achieved it.
Notes
The log_leakage count is usually the uncomfortable one. Lesson 2 pointed out that every prompt which retrieved the restricted document carries the canary into the log verbatim, so the log is itself a store of restricted data with its own retention and access question. Keep this register: the applied lab adds shadow-AI findings to it and the capstone ranks from it.
This is an independent study companion for CompTIA SecAI+ CY0-001 and is not produced by or endorsed by CompTIA.