Part 3 · Sedgewren (fictional)

Access Review

The control every auditor tests and most companies run in a spreadsheet. This version reads the HR roster and one export per system, applies six rules, and writes a record that shows its own inputs. Then a second script checks that each decision was carried out.

What an auditor will ask

I expect three questions about any access review, and I build the control to answer them before they are asked.

  1. Was it complete? Show every account on every system in scope, including service accounts, with the source files.
  2. Did someone qualified decide? Show who reviewed each exception, what they decided, and when.
  3. Was it followed through? Show that every account marked for removal was removed, and how long it took.

A spreadsheet usually answers the second question and struggles with the other two.

How the review runs

  1. Export. People Operations exports the roster. Each system owner exports the account list. Nothing is typed by hand.
  2. Run. access_review.py matches every account to a person, applies the rules, and writes three files: the full population, the exceptions, and a review record.
  3. Decide. The Head of Security records one decision for each exception: Remove, Change, or Keep with a written reason. Each gets a ticket and a due date.
  4. Follow up. Two weeks later, followup.py runs the same rules on fresh exports and marks each exception Closed, Open, Overdue, or Accepted.
  5. File. The record and the follow-up go into the evidence log under control AC-03.

The review record lists the SHA-256 hash of every input file. Anyone can confirm later that the review ran on those exact exports.

What the first run found

The first review covered the third quarter of 2026 and ran on Monday, October 5.

System Accounts Privileged Service accounts Exceptions
Identity provider 25 3 0 2
Source control 15 3 1 3
Cloud platform 14 11 4 5
Support console 10 3 0 2

It found 12 exceptions: 5 high, 5 medium, 2 low. Each row shows the reviewer's decision and the result of the follow-up on October 19.

No. Severity System and account What the review found Decision Follow-up
001 High Cloud platform: daniel.reyes (Daniel Reyes) Role: Admin. Change. Enroll the account in multi-factor authentication. Closed
002 High Cloud platform: jonas.keller (Jonas Keller) Employee ended 2026-08-14; account still active 52 days later. Role: PowerUser. Remove. Employee left on August 14. Review activity since that date. Closed
003 High Source control: jkeller (Jonas Keller) Employee ended 2026-08-14; account still active 52 days later. Role: member. Remove. Employee left on August 14. Review activity since that date. Closed
004 High Source control: twieczorek-dev (No match) tomasz.w.dev@mailbox.example is not on the roster. Remove. Personal account. Work happens on the company account only. Closed
005 High Support console: nikhil.varma (Nikhil Varma) Contractor ended 2026-07-31; account still active 66 days later. Role: agent. Remove. Contract ended on July 31. Review conversations viewed since that date. Closed
006 Medium Cloud platform: svc-export-legacy (Jonas Keller) Owner left on 2026-08-14. Change. Reassign to the Site Reliability Engineer and rotate the key. Closed
007 Medium Cloud platform: svc-metrics (No match) No owner is recorded. Change. Assign an owner and rotate the key. Overdue
008 Medium Identity provider: chloe.marchetti (Chloe Marchetti) Role: user. Change. Enroll the account in multi-factor authentication. Closed
009 Medium Identity provider: peter.okonkwo (Peter Okonkwo) People holds admin; approved: Engineering, Security. Keep. People Operations creates and disables accounts at hire and exit. Approved by the Head of Security; role matrix updated. Accepted
010 Medium Support console: samir.qureshi (Samir Qureshi) Sales holds admin; approved: Security, Support. Remove. Sales does not need the administrator role. Closed
011 Low Cloud platform: yuki.tanabe (Yuki Tanabe) Last activity 2026-04-18, more than 90 days ago. Remove. No activity since April. The manager confirmed the access is not needed. Closed
012 Low Source control: obrandt (Olivia Brandt) Last activity 2026-05-02, more than 90 days ago. Remove. No activity since May. The manager confirmed the access is not needed. Closed

The account single sign-on missed

One finding explains why the review reads every system and not only the identity provider.

An engineer left on August 14. People Operations disabled him at the identity provider the same day, and the offboarding ticket was closed. But his source control account and his cloud account were created before single sign-on was enforced, so disabling him at the identity provider did not reach them. Fifty-two days later both still worked.

Nobody was careless. The offboarding checklist listed one system when it needed to list four. The review found it, the Head of Security had both accounts removed, and the checklist now names every system. That is control HR-03, and it is marked In progress until a full quarter passes with no account left behind.

This is the result I want from a first review. A control that finds nothing in its first run usually was not looking.

The rules

The dormancy window is 90 days and is set in one configuration file.

Rule What it flags Severity Control
TERMINATED_ACTIVE An account is still active for a person whose employment or contract has ended. High HR-03
NO_ROSTER_MATCH A human account does not match anyone on the HR roster. High AC-02
NO_MFA A human account has no multi-factor authentication. Medium High when the account is privileged AC-01
PRIVILEGE_OUTSIDE_ROLE A privileged role is held by someone whose department is not approved for it. Medium AC-04
SERVICE_ACCOUNT_OWNER A service account has no owner, or its owner has left. Medium AC-06
DORMANT An account has had no activity within the dormancy window. Low AC-03

Two choices are deliberate:

  • A departed person's account gets one finding. The answer is removal, so the script does not also report that the same account lacks multi-factor authentication.
  • Keep is allowed, with a reason. People Operations holds an administrator role at the identity provider because it creates and disables accounts. The reviewer approved it in writing and the role matrix was updated. A review that cannot record an approved exception teaches people to ignore it.

Run it yourself

I built the scripts with an AI coding assistant. They use only the Python standard library, and one command rebuilds every sample output from the sample data.

$ ./run-sample.sh
1. Access review on the October 5 exports
2026-Q3: reviewed 64 accounts across 4 systems; 12 exceptions (5 high, 5 medium, 2 low).
Wrote population.csv, findings.csv, and review-record.md to sample-output/access-review-2026-Q3
2. Follow-up on the October 19 exports (exits 1 when a decision is overdue)
10 closed, 1 accepted, 0 open, 1 overdue
3. File the review and the follow-up as evidence
4. Log evidence in the manifest and verify the hashes
Logged 34 new files; manifest now holds 34.
Checked 34 files: 0 problems.
5. Readiness scorecard (exits 1 when evidence is missing)
2026-Q3: 31 of 32 operating controls have evidence; 0 criteria unmapped.
MISSING  VN-01  Vendor inventory; review records

The repository holds the scripts, the sample data, the outputs, and 19 automated tests that run on every change.

What it does not do yet

  • It reads files, not live systems. Exports keep the inputs visible and hashable, and they work on day one with any system. Pulling the same lists through each system's interface on a schedule is the next step once the rules are settled.
  • It does not decide. It finds exceptions and proves follow-through. A person with authority decides, and the record shows who.
  • It does not replace the offboarding checklist. The review is the net under that process. The process still has to work.