Lesson 03 · 35 minutes
Set the scope and list your assets with owners
- Write a scope statement with context, interested parties and exclusions
- Build an asset inventory with an owner and a classification for every asset
- Find the gaps between the inventory and the scope with a program
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
Carys wants to start the risk assessment of Brindle Books, and stops at the first question: risks to what? Nobody has a list of what the company holds. There is also a cafe in the shop building, run by a tenant, with its own till. Is that part of the security programme or not? You write down what is inside the programme and what is outside, list the assets with an owner for each, and let a program compare the two.
Recall
Lesson 2: which clause of ISO/IEC 27001 asks what the management system covers?
Clause 4, context of the organisation. It deals with who the organisation is, who expects what of it, and the scope of the ISMS. The scope statement of this lesson is the record for it.
Lesson 2: why do you read the scope of a supplier's certificate?
The certificate covers only the sites, services and systems inside its scope. The service that you buy can be outside it, and then the certificate says nothing about that service.
The idea
The scope says which parts of the organisation the management system covers: which sites, teams, systems and services. Everything inside must follow the rules and can be audited. A part that is left out is an exclusion, and it needs a reason. An exclusion with no reason looks like a place to hide a problem, and auditors read the scope first.
The scope follows from two things. The context is what the organisation does and what shapes its security: its business, its size, its technology, the laws that bind it. The interested parties are the people and bodies who expect something of its security: customers, staff, suppliers, regulators. Each expectation is a source of requirements. Clause 4 of ISO/IEC 27001 asks for these three things, and this lesson keeps them in one file.
An asset is anything of value that you want to protect, as the course "Security fundamentals" (lesson 1) defined it. An asset inventory lists the assets, and two columns make it useful.
- The owner is one named person who answers for the asset: who decides who gets access, and who accepts its risks. The owner is not always the person who administers it.
- The classification says how sensitive the asset is, and so how it must be handled.
| Class | Meaning | Handling at Brindle Books |
|---|---|---|
public | Meant for everyone | No limits |
internal | For staff | Not shared outside without a reason |
confidential | Harm if it leaks | Access by need, encrypted in transit and at rest |
restricted | Serious harm or a legal duty | Named people only, access logged |
- Scope statement → Head office: names the site, so its assets are listed
- Scope statement → Warehouse: names it in the same way
- Scope statement → Cloud host: names the hosting provider too
- Scope statement → Cafe till: states the exclusion and gives a reason
A later course, "AI governance for engineers", builds an inventory of AI systems with the same method. Here the method is for every kind of asset: find the ones that nobody listed. The new part is the link to the scope: an asset in a place that the scope does not name is a gap in one of the two files.
Worked example
Work in ~/krlab/security-governance.
1. Write the scope statement
The file has four sections. The names of the sites in "In scope" matter, because the checker looks for them.
scope.md
# Scope of the information security management system of Brindle Books
### Context
Brindle Books sells books online and from one shop. It has 14 staff, a head office, a warehouse and systems at a cloud hosting provider. It handles customer names, addresses and orders. Card payments are handled by a payment provider.
### Interested parties
Customers expect that their data stays private. The school network expects the terms of its contract. Staff expect that payroll data is protected. The payment provider expects its security rules to be kept. The data protection authority expects compliance with the law.
### In scope
All staff. The head office, the warehouse and the systems at the cloud hosting provider. The connection to the payment provider. All information about customers, orders and staff.
### Out of scope
The Cafe till and the cafe network. A tenant runs the cafe as a separate business, on a separate network, and Brindle Books holds no data on it.2. Write the asset inventory
The types are information, software, hardware and service. in_scope is yes or no.
assets.csv
id,name,type,owner,classification,location,in_scope
A1,Customer and order database,information,Greta,confidential,cloud hosting,yes
A2,Shop website,software,Dev,internal,cloud hosting,yes
A3,Staff laptops,hardware,Ben,internal,head office,yes
A4,Payroll records,information,Efe,restricted,head office,yes
A5,Card payment service,service,Efe,restricted,payment provider,yes
A6,Warehouse scanners,hardware,Hal,internal,warehouse,yes
A7,Backup storage,service,Ben,confidential,cloud hosting,yes
A8,Public book catalogue,information,Greta,public,cloud hosting,yes
A9,Cafe till,hardware,Hal,internal,cafe,no3. Write the checker
The checker reads both files. It uses sections from policy_check.py (lesson 1) to read the scope statement. Counter counts how often each value appears. text.lower() gives the text in small letters, so that Cafe and cafe compare as equal. a in b on two texts is true when a appears inside b.
Its rules: the scope has its four sections. Every asset has a unique id, a known type and class, and an owner. The location of an in-scope asset is named in the "In scope" section. An out-of-scope asset is named in the "Out of scope" section, so that every exclusion is stated. The location test is a substring match: it finds a name inside a sentence, and it also accepts part of a longer name ("office" passes for "head office"). A person still decides whether it is the same place.
assets_check.py
"""assets_check.py: check an asset inventory against the scope. Usage: python3 assets_check.py assets.csv scope.md"""
import sys
from collections import Counter
from grc import finish, load
from policy_check import sections
TYPES = ["information", "software", "hardware", "service"]
CLASSES = ["public", "internal", "confidential", "restricted"]
SCOPE_SECTIONS = ["Context", "Interested parties", "In scope", "Out of scope"]
def problems(assets_path, scope_path):
scope = sections(scope_path)
found = [f"scope: section missing or under 8 words: {s}" for s in SCOPE_SECTIONS if len(scope.get(s, "").split()) < 8]
inside, outside = scope.get("In scope", "").lower(), scope.get("Out of scope", "").lower()
rows = load(assets_path)
count = Counter(r["id"] for r in rows)
for r in rows:
name = f"{r['id']} {r['name']}"
if count[r["id"]] > 1:
found.append(f"{name}: the id is used {count[r['id']]} times")
if r["type"] not in TYPES:
found.append(f"{name}: unknown type {r['type']}")
if r["classification"] not in CLASSES:
found.append(f"{name}: unknown classification {r['classification'] or 'none'}")
if not r["owner"]:
found.append(f"{name}: no owner")
if r["in_scope"] == "yes" and r["location"].lower() not in inside:
found.append(f"{name}: in scope, but the scope does not name its location: {r['location']}")
elif r["in_scope"] == "no" and r["name"].lower() not in outside:
found.append(f"{name}: out of scope, but the scope does not state the exclusion")
elif r["in_scope"] not in ("yes", "no"):
found.append(f"{name}: in_scope must be yes or no")
return found
if __name__ == "__main__":
rows = load(sys.argv[1])
for cls in CLASSES:
print(f"{cls:<13}{sum(r['classification'] == cls and r['in_scope'] == 'yes' for r in rows)} in scope")
finish(problems(sys.argv[1], sys.argv[2]))4. Run it
python3 assets_check.py assets.csv scope.mdpublic 1 in scope
internal 3 in scope
confidential 2 in scope
restricted 2 in scope
problems: 0Four of the eight assets in scope are confidential or restricted. Those four get the most attention in the risk assessment of lesson 4.
5. Break both files on purpose
A new laptop pool appears at a place that the scope never named, and somebody removes the cafe from the scope statement without changing the inventory. >> adds a line at the end of a file. grep -v text file prints the lines that do not hold text, and > writes the output of a command into a file.
cp assets.csv test-assets.csv
echo "A10,Loan laptops,hardware,,internal,book fair stand,yes" >> test-assets.csv
grep -v "Cafe till" scope.md > test-scope.md
python3 assets_check.py test-assets.csv test-scope.md | tail -5PROBLEM scope: section missing or under 8 words: Out of scope
PROBLEM A9 Cafe till: out of scope, but the scope does not state the exclusion
PROBLEM A10 Loan laptops: no owner
PROBLEM A10 Loan laptops: in scope, but the scope does not name its location: book fair stand
problems: 4The checker finds the asset with no owner, the location that the scope does not cover, and the exclusion that is no longer stated. The fourth problem is a side effect: without its main sentence the "Out of scope" section is too short. Somebody must now decide: is the book fair stand in scope? That is a decision for Carys, not for a program. Remove the test files with rm test-assets.csv test-scope.md.
6. See the progress in the map
python3 isms_check.py isms_map.csv | head -3 4 Context of the organisation 1 of 1 on file
5 Leadership 1 of 1 on file
6 Planning 1 of 3 on filehead -3 prints the first three lines. Clause 4 now has its record, and clause 6 has the first of three.
Your turn
Nadia sends the scope and the inventory of Marlow Physio. Save both in marlow and check them. There are no steps.
marlow/scope.md
# Scope of the information security management system of Marlow Physio
### Context
Marlow Physio treats patients at three sites. It has 22 staff. Patient records are kept in a booking system that a supplier hosts.
### In scope
All staff. The Riverside site, the Hilltop site and the Station site. The hosted booking system. All patient and staff records.
### Out of scope
The Gym equipment sensors at the Hilltop site. They belong to the landlord and are not connected to the clinic network.marlow/assets.csv
id,name,type,owner,classification,location,in_scope
M1,Patient records,information,Priya,restricted,hosted booking system,yes
M2,Booking system,service,Nadia,confidential,hosted booking system,yes
M3,Reception computers,hardware,Omar,internal,Riverside site,yes
M4,Staff rota,information,,internal,Station site,yes
M5,Therapist tablets,hardware,Omar,secret,home visits,yes
M5,Exercise video library,information,Priya,public,Hilltop site,yes
M6,Gym equipment sensors,hardware,Omar,internal,Hilltop site,no
M7,Old billing computer,hardware,Omar,confidential,storage room,noThen write down what you would ask Nadia about the old billing computer before anybody decides to leave it out.
Check yourself
The owner of the customer database is Greta, the customer service lead, and not Ben, who administers it. Why?
The owner answers for the asset: who may use the data, for what, and which risks are acceptable. Those are business decisions, and Greta's team is the one that uses the data. Ben is the custodian: he runs the system as the owner decides. If the administrator is also the owner, nobody outside IT decides about the data.
Why does an exclusion from the scope need a reason?
The scope decides what is audited. A part that is left out is not checked, so leaving it out is a way to hide a weak spot. A written reason lets a reader judge the exclusion. "A tenant runs it on a separate network and we hold no data on it" can be tested. No reason cannot.
The checker says that an asset is at a location that the scope does not name. Which file is wrong?
The program cannot know. Either the scope is too narrow and must grow, or the asset should not exist there, or it should be an exclusion with a reason. A person with authority decides, and then one of the two files changes.
Why classify the public book catalogue at all?
"Public" is a decision too. It says that nobody needs to protect the confidentiality of that data, so effort goes elsewhere. Its integrity and availability can still matter: a wrong price in the catalogue costs money. Without a class, nobody knows whether the question was asked.
Field notes
- Start the inventory from the processes of the business ("take an order", "pay staff") and ask what each one needs. A list that starts from the server room misses the spreadsheet that runs payroll.
- An owner is a person or a role with a current holder, never a team. When the holder leaves, the asset needs a new owner on the same day. Lesson 7 handles leavers.
- Keep the number of classes small. Four is already many for a small firm. A class is useful only when it changes how people handle the data.
- A narrow scope is allowed, and a certificate states it. Customers who read "the head office only" will ask why the systems that hold their data are outside.
- Services at suppliers are assets too. You cannot administer them, but you can own the decision to use them and the contract. Lesson 9 covers the supplier side.