Courses3 levels
Level 1 · Foundations11 courses
Level 2 · Core5 courses
Level 3 · Advanced5 courses
Labs8 topics
Library Practice exams AI Range Pricing Start free

Lesson 04 · 40 minutes

Assess and treat risk in a register with owners and acceptance

After this lesson you can
  • Score a risk before and after treatment with fixed scales
  • Choose between reduce, avoid, transfer and accept, and plan the treatment
  • Catch a risk that nobody accepted or whose treatment is overdue
Lab files of this lesson (24)

The lab folder as it stands after this lesson. Unzip it in ~/krlab.

More

The zip holds every file that the course has printed up to here. To start this lesson with the files of the earlier lessons only, take the zip of the lesson before. Type the code yourself first: you learn more.

Scenario

Brindle Books has its scope and its assets. Asha asks the question that a managing director must ask: "What can hurt us most, what do we do about it, and which risks am I living with?" Carys can answer the first part from memory. The third part needs a record, because "living with a risk" is a decision that somebody takes on a date. You build the register, and a checker that finds a risk that nobody accepted.

Recall

Lesson 3: who is the owner of an asset, and how does the owner differ from the administrator?

The owner is the one named person who answers for the asset: who may use it and which risks are acceptable. The administrator runs the system as the owner decides. For the customer database the owner is Greta and the administrator is Ben.

Lesson 3: what does the checker report for an asset at a location that the scope does not name?

A problem: the asset is in scope, but the scope does not name its location. A person must decide whether the scope grows or the asset becomes a stated exclusion.

The idea

You scored risks in the course "Security fundamentals" (lesson 1): likelihood times impact, each from 1 to 5. This lesson keeps that scale and uses four bands, set in the table below. A register file holds an inherent score (before controls) and a residual score (after controls). The lesson adds what a management system needs on top: a treatment decision, a treatment plan with a date, and a recorded acceptance.

Score15 to 2510 to 145 to 91 to 4
Ratingcriticalhighmediumlow

Risk treatment is the decision about what to do with a risk. There are four options.

OptionMeaningExample at Brindle Books
reduceAdd or improve a control, so that likelihood or impact fallsA second factor on admin accounts
avoidStop the activity that causes the riskRemove the export of customer lists to private phones
transferShare the risk with another party by contract or insuranceThe payment provider handles all card data
acceptDo nothing more, on purposeOld scanner software in the warehouse, low score

Three more ideas complete the picture.

  • The risk owner is the named person who answers for a risk: usually the owner of the asset. The risk owner approves the treatment and accepts what remains.
  • Acceptance is a decision with a name and a date. A residual risk that nobody accepted is not accepted. It is ignored.
  • The risk appetite is the level of risk that the organisation is willing to carry. Above it, acceptance is not an option, and the risk must be treated further. Management sets the level. In this course a residual score of 15 or more is above the appetite.

A transferred risk does not vanish. The payment provider carries the card handling, and Brindle Books still answers to its customers, so a residual score stays.

One risk through the register
RiskInherent scoreTreatmentResidual scoreAcceptancelikelihood x impactreduce, avoid, transfer, acceptafter the planned actionby a named person, on a dateRiskInherent scoreTreatmentResidual scoreAcceptance1234
  1. Risk → Inherent score: likelihood x impact
  2. Inherent score → Treatment: reduce, avoid, transfer, accept
  3. Treatment → Residual score: after the planned action
  4. Residual score → Acceptance: by a named person, on a date

Worked example

Work in ~/krlab/security-governance.

1. Write the register

The asset column holds an id from assets.csv. action and due are the treatment plan, and status is open or done. The last two columns record who accepted the residual risk and when. The drawing takes the first row apart.

The row of risk R1
R1,A1risk id and assetCustomer data is stolen ...the risk4,5likelihood, impact: 20reducetreatmentGretarisk ownerSecond factor ...,2026-10-31,doneaction, due date, status2,5after treatment: 10Asha,2026-11-05accepted by, onR1,A1risk id and assetCustomer data is stolen ...the risk4,5likelihood, impact: 20reducetreatmentGretarisk ownerSecond factor ...,2026-10-31,doneaction, due date, status2,5after treatment: 10Asha,2026-11-05accepted by, on

risks.csv

id,asset,risk,likelihood,impact,treatment,owner,action,due,status,res_likelihood,res_impact,accepted_by,accepted_on
R1,A1,Customer data is stolen with a stolen admin password,4,5,reduce,Greta,Second factor on every admin account,2026-10-31,done,2,5,Asha,2026-11-05
R2,A1,Orders are lost when the database fails,3,4,reduce,Greta,Nightly backup with a restore test every quarter,2026-09-30,done,3,2,Greta,2026-10-02
R3,A3,A stolen laptop exposes internal files,3,3,reduce,Ben,Encrypt every laptop disk,2026-12-15,open,1,3,Ben,2026-10-02
R4,A5,Card data is exposed at checkout,2,5,transfer,Efe,Keep all card handling at the payment provider by contract,2026-08-01,done,1,5,Efe,2026-10-02
R5,A4,A leaver keeps access to payroll,3,4,reduce,Efe,Quarterly access review and a leaver procedure,2026-10-15,done,1,4,Efe,2026-10-02
R6,A6,Old scanner software is attacked,2,2,accept,Hal,,,,2,2,Hal,2026-10-02
R7,A2,An untested change breaks the shop,3,4,reduce,Dev,Change approval with a rollback plan,2026-09-01,done,2,4,Dev,2026-10-02
R8,A1,Customer lists sit on private phones,3,4,avoid,Greta,Remove the export to private devices,2026-10-01,done,1,4,Greta,2026-10-02

2. Write the report and the checker

next(...) takes the first value that fits. sorted(rows, key=...) sorts by a rule, and lambda r: ... is a one-line function without a name that gives the sort key of a row. A minus sign in the key sorts from high to low. all(...) is true when every item is true.

The checker has eleven rules. Scores are from 1 to 5. A risk has an owner. The treatment is one of the four. An accepted risk keeps its score, because nothing was done. Any other treatment has an action and a due date, and an open action is not past its date. The residual score is not above the inherent one. It is below the appetite. Somebody accepted it, less than a year ago. A high residual risk (10 or more) is accepted by a person other than its owner: one level up. The last rule is the rule of this course, and your organisation writes its own.

risks.py

"""risks.py: report and check a risk register with treatment and acceptance. Usage: python3 risks.py risks.csv"""
import sys

from grc import TODAY, day, finish, load

BANDS = [(15, "critical"), (10, "high"), (5, "medium"), (1, "low")]
TREATMENTS = ["reduce", "avoid", "transfer", "accept"]
APPETITE = 15            # a residual score from here up is not acceptable


def rating(score):
    return next(name for floor, name in BANDS if score >= floor)


def scored(path):
    rows = load(path)
    for r in rows:
        r["score"] = int(r["likelihood"]) * int(r["impact"])
        r["res_score"] = int(r["res_likelihood"]) * int(r["res_impact"])
    return rows


def issues(r):
    """Return the problems of one row, as texts."""
    out = []
    if not all(1 <= int(r[f]) <= 5 for f in ("likelihood", "impact", "res_likelihood", "res_impact")):
        out.append("a score is outside 1 to 5")
    if not r["owner"]:
        out.append("no risk owner")
    if r["treatment"] not in TREATMENTS:
        out.append(f"unknown treatment: {r['treatment'] or 'none'}")
    elif r["treatment"] == "accept":
        if r["res_score"] != r["score"]:
            out.append("accepted as it is, but the residual score differs")
    elif not r["action"] or not r["due"]:
        out.append(f"treatment {r['treatment']} has no action or no due date")
    elif r["status"] != "done" and day(r["due"]) < TODAY:
        out.append(f"treatment overdue since {r['due']}")
    if r["res_score"] > r["score"]:
        out.append("the residual score is above the inherent score")
    if r["res_score"] >= APPETITE:
        out.append(f"residual score {r['res_score']} is above the risk appetite")
    if not r["accepted_by"] or not r["accepted_on"]:
        out.append("residual risk accepted by nobody")
    elif (TODAY - day(r["accepted_on"])).days > 365:
        out.append(f"acceptance is over a year old: {r['accepted_on']}")
    elif r["res_score"] >= 10 and r["accepted_by"] == r["owner"]:
        out.append("high residual risk accepted by its own owner")
    return out


def problems(path):
    return [f"{r['id']}: {text}" for r in scored(path) for text in issues(r)]


if __name__ == "__main__":
    print(f"{'id':<4}{'before':<8}{'treatment':<10}{'after':<6}{'rating':<9}{'owner':<7}accepted by")
    for r in sorted(scored(sys.argv[1]), key=lambda r: (-r["res_score"], r["id"])):
        print(f"{r['id']:<4}{r['score']:<8}{r['treatment']:<10}{r['res_score']:<6}{rating(r['res_score']):<9}"
              f"{r['owner']:<7}{r['accepted_by'] or 'NOBODY'}")
    finish(problems(sys.argv[1]))

3. Run it and read the report

python3 risks.py risks.csv
id  before  treatment after rating   owner  accepted by
R1  20      reduce    10    high     Greta  Asha
R7  12      reduce    8     medium   Dev    Dev
R2  12      reduce    6     medium   Greta  Greta
R4  10      transfer  5     medium   Efe    Efe
R5  12      reduce    4     low      Efe    Efe
R6  4       accept    4     low      Hal    Hal
R8  12      avoid     4     low      Greta  Greta
R3  9       reduce    3     low      Ben    Ben
problems: 0

The report puts the highest residual score first, because that is what management lives with. R1 started at 20 and stands at 10 after the second factor: still high, since a stolen password stays possible and the impact is unchanged. Asha accepted it herself, above its owner Greta. R3 shows a score of 3, but its action is still open until 15 December. A residual score is a plan until the action is done.

4. Break the register on purpose

Three faults: nobody accepted R5, the laptop encryption of R3 was due in October and is still open, and Greta accepted the high risk R1 herself. The form /^R5/s/old/new/ makes sed change only the lines that start with R5, and $ in a pattern means the end of the line.

cp risks.csv test-risks.csv
sed -i '/^R5/s/,Efe,2026-10-02$/,,/' test-risks.csv
sed -i '/^R3/s/2026-12-15/2026-10-15/' test-risks.csv
sed -i '/^R1/s/,Asha,2026-11-05$/,Greta,2026-11-05/' test-risks.csv
python3 risks.py test-risks.csv | tail -4
PROBLEM R1: high residual risk accepted by its own owner
PROBLEM R3: treatment overdue since 2026-10-15
PROBLEM R5: residual risk accepted by nobody
problems: 3

Remove the test file with rm test-risks.csv.

Your turn

Nadia sends the register of Marlow Physio. Save it and run your program on it. There are no steps.

marlow/risks.csv

id,asset,risk,likelihood,impact,treatment,owner,action,due,status,res_likelihood,res_impact,accepted_by,accepted_on
K1,M1,Patient records are read by staff with no need,4,4,reduce,Priya,Log every access and review the log monthly,2026-09-01,done,3,4,Priya,2026-09-05
K2,M2,The booking system is down for a day,3,4,transfer,Nadia,Service level agreement with the host,2026-06-01,done,2,3,,
K3,M3,Reception computers miss security updates,4,3,reduce,Omar,Automatic updates on all reception computers,2026-10-01,open,1,3,Omar,2026-08-01
K4,M5,A tablet with records is lost on a home visit,4,5,reduce,Omar,Screen lock on tablets,2026-08-15,done,4,4,Nadia,2026-08-20
K5,M4,The staff rota is changed by mistake,2,2,accept,Nadia,,,,2,2,Nadia,2025-10-01
K6,M1,Paper notes are left in treatment rooms,3,3,reduce,Priya,,,,2,3,Priya,2026-09-05
K7,M2,A weak password opens the booking system,3,5,accept,Nadia,,,,2,5,Rosa,2026-09-05

Then write the two sentences that you would say to Nadia about K7. The register calls it "accept", and the numbers tell another story.

Check yourself

Brindle Books moved all card handling to the payment provider. Why does R4 still have a residual score?

A transfer shares a risk, and does not remove it. If the provider fails, customers still blame the shop, orders stop, and the contract may not cover every loss. The likelihood fell because the shop no longer touches card data. The impact is the same.

Why is "accepted by nobody" a problem even for a low risk?

Acceptance is the proof that somebody with authority saw the risk and decided. Without a name and a date nobody decided, and nobody will look again. For a low risk the decision takes a minute, and it still must be taken.

What is the difference between a risk above the appetite and a high risk that was accepted?

The appetite is the line above which acceptance is not allowed: the organisation decided in advance that it will not carry such a risk, so it must be treated further or the activity must stop. Below the line, a high risk may be accepted, by a person with enough authority, on the record.

R3 shows a residual score of 3 while its action is still open. What should a reader of the report keep in mind?

The residual score describes the state after the planned action. Until the laptops are encrypted, the real risk is still the inherent 9. A careful report shows open actions next to the score. The checker turns an open action that is past its date into a problem.

Field notes

  • ISO/IEC 27001 asks for a defined risk assessment process with criteria, for a risk treatment plan, and for the risk owners to approve the plan and accept the residual risks. This register, with its fixed scales and its acceptance columns, is one way to keep those records.
  • Write the criteria down before you score: what a 4 for impact means in money, in people affected, in days of outage. Without that, two people score the same risk at 2 and at 5.
  • Re-assess on a schedule and after every big change or incident. The one-year limit on an acceptance is the rule of this course. Your organisation sets its own interval.
  • Multiplying two estimates gives a number that looks exact and is not. Use the score to rank and to start the conversation.
  • Insurance is a transfer of money, not of blame or of work. Read what the policy excludes, and keep the controls that it demands, or it will not pay.