A security audit rarely inspects every account, server, change, and log entry. Sampling can produce useful evidence with limited resources, but only when the report describes the population, selection method, and permitted inference. “Twenty-five systems checked and no exception found” says little about hundreds of untested systems without that context.
The buyer needs a plan that connects the procedure objective to a population and sampling unit, separates meaningful strata, explains how deviations are handled, and prevents conclusions from escaping the tested boundary. This is narrower than a general IT project security audit at handover: the subject here is the strength of the inference about untested items.
Define the Assertion First
Sampling begins with an assertion, not a sample size. “Privileged access is reviewed quarterly” requires one population; “firewall changes are approved before implementation” requires another. Define the period, systems, object types, required attribute, and acceptable deviation.
The sampling unit must match the objective. One user, one access request, one change, or one server produces different evidence. Selecting employees while concluding about every role may omit a rare but critical role entirely.
Build the Complete Population
The sampling frame is the list from which items are actually selected. Record its source, extraction time, filters, deduplication, and reconciliation to an independent inventory. Exclusions must be named; an inaccessible branch or missing system cannot quietly disappear from the conclusion.
Test completeness before selection. A CMDB may omit temporary cloud resources, and a change log may omit emergency work performed outside the normal process. A sample from an incomplete list accurately represents only that incomplete list.
Fix the period boundary and the treatment of repeated objects. One account may change several times during a quarter; retaining only its final state can erase an interim unauthorized window. Preserve the population snapshot, generation logic, and original counts with the workpapers.
Separate Meaningful Strata
Random selection across the whole population can miss a small but dangerous group. Divide objects by factors that may change control behavior: criticality, environment, owner, deployment method, privilege, age, and change type. Include items from every material stratum through a stated targeted or random rule.
Scroll sideways to compare
| Stratum | Why risk differs | Selection approach | Limit of inference |
|---|---|---|---|
| Critical production | Failure affects a key service | All highest-criticality items plus a random part of the rest | Does not describe test or development |
| New systems | The control may not be stable yet | All systems introduced during the period | Does not replace mature-system coverage |
| Emergency changes | The process permits another route | Separate sample using the emergency flag | Must not be blended with normal changes |
| Normal changes | Large, relatively homogeneous population | Reproducible random selection | Depends on a complete change log |
Choose a Method and Preserve Reproducibility
Statistical sampling uses probability selection and can support an estimate of sampling risk when its assumptions hold. Nonstatistical sampling uses professional judgment and can be valuable, but it does not support the same numerical generalizations. Targeting the highest-risk objects can find problems, yet it does not show their frequency in the population.
Keep the seed or other reproducible mechanism, a snapshot of the frame, and reasons for manual replacements. If a selected item is unavailable, do not silently replace it with a convenient one. Under the agreed rule, unavailability may count as a deviation or as a distinct scope limitation.
- PopulationDefine the period, sources, unit, and completeness criteria
- StrataSeparate groups where control behavior or risk differs
- SelectApply the declared random, systematic, or targeted method
- EvaluateInvestigate deviations, causes, and the need to expand testing
- ConcludeLimit the statement to the tested population, period, and method
Investigate the Deviation, Not Just the Count
One deviation may be a document mistake or evidence of a systematic gap. Record the nature of the failure, control owner, time, stratum, and common cause. Check neighboring items that share the administrator, template, team, period, or tool.
Set expansion criteria in advance. A privileged-access exception might trigger review of every record for the same role; a defect in a shared CI template might trigger every project on that version; several independent errors might trigger a new sample or full-population check. Fixing the selected item does not establish that the mechanism is fixed.
Severity cannot be reduced to a count. One unauthorized privileged production change can affect the conclusion more than several missing routine fields. Report deviation frequency together with its nature, cause, and consequence rather than hiding those differences behind one percentage.
Work Through a Firewall-Change Example
Consider a fictional company with 4,800 changes in one quarter. An auditor takes 25 rows from the central log and finds no issue. But the log contains 60 emergency changes, while 15 legacy-segment changes live in another system. A general sample may contain none of them.
The proper plan first combines and reconciles the frames. Critical emergency changes form a separate stratum; the legacy segment is either included or stated as a limitation. Each item is checked against its request, approval, actual configuration, implementation time, and later review. A deviation expands the work according to its cause, not according to a desire for a green percentage.
If the legacy system cannot export complete records, 4,800 cannot be described as the full population. State the visible portion, missing period, and affected conclusions. The accountable owner then decides whether to obtain more data, extend the procedures, or explicitly accept the limitation.
Write the Conclusion Without a Blanket Guarantee
The report states the population, sample size and method, represented strata, unavailable items, observed deviations, and their evaluation. “For the selected items, the control operated according to the criterion” is stronger and more honest than “the whole environment is secure.”
Sampling does not confirm every untested system individually. It may support a bounded inference about a population when the frame is complete and the method permits it. An infrastructure and Active Directory penetration test can test technical feasibility for selected controls, while the scope planner separates process audit from authorized technical effects. Pentest.red can independently test selected items and deviation causes without promising complete environmental coverage.
PENTEST.RED
Discuss pentest scope and pricing
We start by agreeing on systems, access, constraints and the expected evidence.
Based on in-depth research, edited for clarity and practical use.