control-testing-sampling
Skill0 starsChanged 11 days agoMITView on GitHub
Test security controls for design and operating effectiveness — test of design vs. operating effectiveness, attribute sampling with sample sizes by control frequency, random selection, exception evaluation and deficiency classification — for internal audit, SOX ITGC, SOC 2 readiness or second-line assurance. Use when planning control tests, choosing sample sizes, or evaluating exceptions found in testing.
In this repository273 other files it gives its agents.
- ad-attack-path-analysisSkill
- adcs-security-reviewSkill
- ad-privileged-access-reviewSkill
- dcsync-detectionSkill
- gpo-security-reviewSkill
- kerberos-attack-detectionSkill
- agent-tool-permission-reviewSkill
- ai-incident-responseSkill
- llm-gateway-controlsSkill
- llm-security-evaluationSkill
- mcp-server-security-reviewSkill
- model-artifact-securitySkill
- prompt-injection-reviewSkill
- rag-security-reviewSkill
- api-abuse-detectionSkill
- api-authorization-testingSkill
- api-inventorySkill
- api-schema-securitySkill
- dast-baselineSkill
- sast-triageSkill
- sca-dependency-riskSkill
- secure-code-reviewSkill
- security-requirementsSkill
- threat-modelingSkill
- asset-criticality-tieringSkill
- asset-inventory-reconciliationSkill
- external-attack-surface-reviewSkill
- shadow-it-discoverySkill
- aws-credential-compromiseSkill
- aws-iam-reviewSkill
- aws-org-guardrailsSkill
- cloudtrail-investigationSkill
- guardduty-triageSkill
- s3-exposure-reviewSkill
- azure-activity-investigationSkill
- azure-rbac-reviewSkill
- conditional-access-reviewSkill
- entra-audit-investigationSkill
- entra-signin-investigationSkill
- backup-assuranceSkill
- critical-service-mappingSkill
- ransomware-recoverySkill
- recovery-exerciseSkill
- cloud-exposure-reviewSkill
- cloud-incident-responseSkill
- cloud-logging-baselineSkill
- cloud-posture-assessmentSkill
- audit-evidence-packageSkill
- continuous-control-monitoringSkill
- control-mappingSkill
- container-incidentSkill
- dockerfile-hardeningSkill
- image-scanningSkill
- runtime-detection-falcoSkill
- db-audit-loggingSkill
- db-exfiltration-investigationSkill
- db-hardeningSkill
- db-privilege-reviewSkill
- data-classificationSkill
- data-discoverySkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 40
Document population source, count, selection method and seed.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Control Testing and Sampling
Design vs. operation
- Test of design (TOD): walkthrough of one instance — if performed as described, would the control prevent/detect the risk?
- Test of operating effectiveness (TOE): did it operate consistently over the period? Requires sampling.
Common sample size guidance (attribute testing, low expected deviation)
| Control frequency | Population/period | Typical sample |
| Annual | 1 | 1 |
| Quarterly | 4 | 2 |
| Monthly | 12 | 2–5 |
| Weekly | 52 | 5–15 |
| Daily | ~250–365 | 20–40 |
| Multiple times per day / transactional | > 365 | 25–60 |
| Automated (system-enforced) | — | 1 per configuration + change management test |
Firms use different tables — follow your audit methodology; these ranges reflect widely used practice.
Random selection (reproducible)
import csv, random
rows = list(csv.DictReader(open("population.csv")))
random.seed(20261031) # record the seed in workpapers
sample = random.sample(rows, k=25)Document population source, count, selection method and seed.
Evaluate exceptions
- Confirm it's a true exception (not a misunderstanding of the control).
- Root cause and whether it's isolated or systemic; consider expanding sample.
- Compensating controls?
- Classify: control deficiency / significant deficiency / material weakness (SOX), or nonconformity minor/major (ISO).
- Remediation plan and retest.
Workpaper fields
Control | Risk | Test procedure | Population (source, count) | Sample (method, size) | Attributes tested | Results | Exceptions | Conclusion | Tester/reviewer/date
Related skills
audit-evidence-package, control-mapping, segregation-of-duties
References
- AICPA Audit Guide: Audit Sampling: https://www.aicpa-cima.com/
- IIA International Professional Practices Framework (Global Internal Audit Standards): https://www.theiia.org/en/standards/
- PCAOB AS 2315 Audit Sampling: https://pcaobus.org/oversight/standards/auditing-standards/details/AS2315
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

