OpenCyber Academy
Professional · Chapter 7 · English
Course code: OCA-028Chapter 07: OCA-028-C007

Chapter 7 — Security governance, risk and compliance: controls and verification

Open, free learning for anyone who wants to protect people and technology. No account is required to read this text or its worked answers.

Lesson map

Lesson 07 published. Map, example, EX031.

flowchart TD
  N0["Learning outcomes"]
  N1["7.1 Sample sizes"]
  N2["Lab — Zero-deviation sample sizes for three tolerabl"]
  N3["7.2 Testing"]
  N4["7.3 Conclusions"]
  N5["Synthesis"]
  N0 --> N1 --> N2 --> N3 --> N4 --> N5
  N5 --> EX["Worked example"]
  EX --> Q["Exercise EX031"]

Logical drawing

flowchart LR
  N0["Learning outcomes"]
  N1["7.1 Sample sizes"]
  N2["Lab — Zero-deviation sample sizes for three tolerabl"]
  N3["7.2 Testing"]
  N4["7.3 Conclusions"]
  N5["Synthesis"]
  N0 --> N1 --> N2 --> N3 --> N4 --> N5 --> Q["EX031"]
[Learning outcomes]
    |
    v
[7.1 Sample sizes]
    |
    v
[Lab — Zero-deviation sample sizes for three tolerabl]
    |
    v
[7.2 Testing]
    |
    v
[7.3 Conclusions]
    |
    v
[Synthesis]
    |
    v
[Worked example] --> [Exercise EX031]

Learning outcomes

You will (1) choose sample sizes for control testing; (2) test a control's operation; (3) state conclusions with their limits.

7.1 Sample sizes

Lena needs to test whether Marston's new-payee authentication works for every payment. Testing all payments is impractical, so she samples. The lab computes the smallest sample with no deviations that supports each tolerable deviation rate with ninety-five percent confidence. For ten percent, twenty-nine items suffice; for five percent, fifty-nine; for three percent, ninety-nine. She learns that tighter conclusions require larger samples, and that the tolerable rate should reflect the control's importance. Fifty-nine is the size she will use for new-payee authentication in the next section.

Lab — Zero-deviation sample sizes for three tolerable rates

"""Smallest zero-deviation sample whose 95% upper bound meets a tolerable rate: (1-t)^n <= 0.05."""
from math import ceil, log
for t in (0.10, 0.05, 0.03):
    n = ceil(log(0.05)/log(1-t)); print(f"tolerable {t:.0%}: sample {n} with no deviations")

Run with python3 lab_n.py. Verified output:

tolerable 10%: sample 29 with no deviations
tolerable 5%: sample 59 with no deviations
tolerable 3%: sample 99 with no deviations

7.2 Testing

Because new-payee authentication protects member funds, Lena chooses a five percent tolerable rate and samples fifty-nine new-payee payments at random from the quarter. For each, she checks the authentication log shows a successful second factor before the payment. All fifty-nine show it. She records the sample method, the selected items, the checks and the results so another person could repeat the test. Mr. Reyes points out that random selection across the whole quarter matters, because a sample from one week could miss a period when the control failed.

7.3 Conclusions

Lena concludes that, with ninety-five percent confidence, the control failed in no more than five percent of new-payee payments during the quarter. She notes limits: the test covers the app channel only, not branch payments, and checks that authentication happened, not that it was resistant to all attacks. She learns that clear conclusions with stated limits are more valuable than broad claims that the control works. Branch payments would need a separate sample before any statement about all new-payee payments could be made.

Worked example

Lena computes 29, 59 and 99 as zero-deviation sample sizes, tests 59 payments with no deviations and states a bounded conclusion.

Synthetic case. Payments and results are synthetic.

Errors and limits

Random sampling misses targeted abuse. Logs may be incomplete.

Exercises

Synthesis

Sized samples support bounded, clearly limited conclusions about control operation.

Continue studying — chapter 07 of 12

← Chapter 06 (draft) · Course chapter index · Chapter 08 (draft) →

Worked answers

EX031. Fifty-nine.

EX032. Ninety-nine.

EX033. Because new-payee authentication protects member funds, so a tight rate is appropriate.

EX034. That the authentication log showed a successful second factor before the payment.

EX035. It covers the app channel only (and shows authentication occurred, not resistance to all attacks).