@open-agreements/open-agreements 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/README.md +10 -2
  2. package/content/templates/closing-checklist/metadata.yaml +6 -13
  3. package/content/templates/closing-checklist/template.docx +0 -0
  4. package/dist/cli/index.d.ts.map +1 -1
  5. package/dist/cli/index.js +47 -10
  6. package/dist/cli/index.js.map +1 -1
  7. package/dist/commands/checklist.d.ts +21 -1
  8. package/dist/commands/checklist.d.ts.map +1 -1
  9. package/dist/commands/checklist.js +175 -44
  10. package/dist/commands/checklist.js.map +1 -1
  11. package/dist/commands/recipe.js +3 -11
  12. package/dist/commands/recipe.js.map +1 -1
  13. package/dist/core/checklist/index.d.ts +22 -14
  14. package/dist/core/checklist/index.d.ts.map +1 -1
  15. package/dist/core/checklist/index.js +79 -39
  16. package/dist/core/checklist/index.js.map +1 -1
  17. package/dist/core/checklist/jsonl-stores.d.ts +3 -0
  18. package/dist/core/checklist/jsonl-stores.d.ts.map +1 -0
  19. package/dist/core/checklist/jsonl-stores.js +16 -0
  20. package/dist/core/checklist/jsonl-stores.js.map +1 -0
  21. package/dist/core/checklist/schemas.d.ts +2 -2
  22. package/dist/core/checklist/schemas.js +1 -1
  23. package/dist/core/checklist/schemas.js.map +1 -1
  24. package/dist/core/checklist/state-manager.d.ts +146 -0
  25. package/dist/core/checklist/state-manager.d.ts.map +1 -0
  26. package/dist/core/checklist/state-manager.js +147 -0
  27. package/dist/core/checklist/state-manager.js.map +1 -0
  28. package/dist/core/checklist/status-labels.d.ts +6 -0
  29. package/dist/core/checklist/status-labels.d.ts.map +1 -0
  30. package/dist/core/checklist/status-labels.js +29 -0
  31. package/dist/core/checklist/status-labels.js.map +1 -0
  32. package/dist/core/validation/recipe.d.ts.map +1 -1
  33. package/dist/core/validation/recipe.js +47 -61
  34. package/dist/core/validation/recipe.js.map +1 -1
  35. package/package.json +1 -1
  36. package/skills/cloud-service-agreement/SKILL.md +9 -0
  37. package/skills/data-privacy-agreement/SKILL.md +9 -0
  38. package/skills/edit-docx-agreement/CONNECTORS.md +20 -0
  39. package/skills/edit-docx-agreement/SKILL.md +77 -0
  40. package/skills/employment-contract/SKILL.md +9 -0
  41. package/skills/iso-27001-evidence-collection/CONNECTORS.md +23 -0
  42. package/skills/iso-27001-evidence-collection/SKILL.md +300 -0
  43. package/skills/iso-27001-evidence-collection/rules/api-exports.md +191 -0
  44. package/skills/iso-27001-evidence-collection/rules/evidence-types.md +107 -0
  45. package/skills/iso-27001-evidence-collection/rules/screenshot-guide.md +77 -0
  46. package/skills/iso-27001-internal-audit/CONNECTORS.md +23 -0
  47. package/skills/iso-27001-internal-audit/SKILL.md +272 -0
  48. package/skills/iso-27001-internal-audit/rules/access-control.md +191 -0
  49. package/skills/iso-27001-internal-audit/rules/business-continuity.md +94 -0
  50. package/skills/iso-27001-internal-audit/rules/change-management.md +211 -0
  51. package/skills/iso-27001-internal-audit/rules/encryption.md +93 -0
  52. package/skills/iso-27001-internal-audit/rules/incident-response.md +127 -0
  53. package/skills/iso-27001-internal-audit/rules/isms-management.md +164 -0
  54. package/skills/iso-27001-internal-audit/rules/logging-monitoring.md +96 -0
  55. package/skills/iso-27001-internal-audit/rules/people-controls.md +161 -0
  56. package/skills/iso-27001-internal-audit/rules/supplier-management.md +92 -0
  57. package/skills/nda/SKILL.md +9 -0
  58. package/skills/open-agreements/SKILL.md +9 -0
  59. package/skills/safe/SKILL.md +9 -0
  60. package/skills/services-agreement/SKILL.md +9 -0
  61. package/skills/soc2-readiness/CONNECTORS.md +23 -0
  62. package/skills/soc2-readiness/SKILL.md +289 -0
  63. package/skills/soc2-readiness/rules/trust-services.md +230 -0
  64. package/skills/venture-financing/SKILL.md +9 -0
@@ -0,0 +1,23 @@
1
+ # Connectors
2
+
3
+ ## How tool references work
4
+
5
+ This skill uses `~~category` placeholders for optional integrations. The skill works without any connectors configured — they enhance the experience when available.
6
+
7
+ ## Connectors for this skill
8
+
9
+ | Category | Placeholder | Recommended server | Other options |
10
+ |----------|-------------|-------------------|---------------|
11
+ | Compliance data | `~~compliance` | Compliance MCP server (planned — not yet available) | Local `compliance/` directory files |
12
+
13
+ ### Local compliance data (current default)
14
+
15
+ If the `compliance/` directory exists with status and evidence files, the skill reads those directly. No MCP server needed — just ensure `compliance/status/last_refresh.yaml` is current.
16
+
17
+ ### Compliance MCP server (planned)
18
+
19
+ A dedicated compliance MCP server with live test results, evidence freshness tracking, and real-time gap analysis is planned but not yet available. When released, it will be installable as a standard MCP server. Until then, the skill operates in local-data or reference-only mode.
20
+
21
+ ### Fallback: Reference only
22
+
23
+ Without any connector, the skill uses embedded `rules/` files for procedural guidance, control descriptions, and evidence checklists. No organization-specific status data is available in this mode.
@@ -0,0 +1,272 @@
1
+ ---
2
+ name: iso-27001-internal-audit
3
+ description: >-
4
+ Run an ISO 27001 internal audit. Walk through controls by domain, identify
5
+ gaps, collect evidence, and generate findings with corrective action
6
+ recommendations. Uses NIST SP 800-53 (public domain) as canonical reference.
7
+ license: MIT
8
+ compatibility: >-
9
+ Works with any AI agent. Enhanced with compliance MCP server for live
10
+ dashboard data. Falls back to embedded reference files when no live data
11
+ is available.
12
+ metadata:
13
+ author: open-agreements
14
+ version: "0.1.0"
15
+ frameworks:
16
+ - ISO 27001:2022
17
+ - SOC 2 Type II
18
+ - NIST SP 800-53 Rev 5
19
+ ---
20
+
21
+ # ISO 27001 Internal Audit
22
+
23
+ Run a structured internal audit against ISO 27001:2022. This skill walks you through scoping, control assessment, evidence collection, and findings generation — following the same workflow a certified auditor uses.
24
+
25
+ ## Security Model
26
+
27
+ - **No scripts executed** — this skill is markdown-only procedural guidance
28
+ - **No secrets required** — works with public reference data
29
+ - **IP-clean** — all control descriptions are original writing referencing NIST SP 800-53 (public domain). ISO 27001:2022 controls are referenced by section ID only (e.g., "A.5.15"), never by copyrighted title or description
30
+ - **Evidence stays local** — all evidence collection commands output to local filesystem
31
+
32
+ ## When to Use
33
+
34
+ Activate this skill when:
35
+
36
+ 1. **Preparing for a surveillance or certification audit** — run 4-6 weeks before the external audit
37
+ 2. **Performing quarterly internal audit** — ISO 27001 requires at least annual internal audits; quarterly is best practice
38
+ 3. **Post-incident review** — assess whether controls failed and what corrective actions are needed
39
+ 4. **New framework adoption** — map existing controls to ISO 27001 requirements
40
+ 5. **Onboarding a new compliance tool** — validate that automated checks cover the right controls
41
+
42
+ Do NOT use for:
43
+ - Generating the ISO 27001 Statement of Applicability (SoA) from scratch — use `iso-27001-evidence-collection` for evidence gathering first
44
+ - SOC 2-only audits — use `soc2-readiness` instead
45
+ - Reading or interpreting a specific contract clause — use legal agreement skills
46
+
47
+ ## Core Concepts
48
+
49
+ ### Control Domains (ISO 27001:2022 Annex A)
50
+
51
+ ISO 27001:2022 has 93 Annex A controls across 4 domains, plus ISMS clauses 4-10 (30 sub-clauses). This skill covers **48 priority Annex A controls** (of 93 total) — the most critical per domain for cloud-native startups. Remaining controls are lower-tier or typically N/A for cloud-native organizations.
52
+
53
+ | Domain | Controls | Focus |
54
+ |--------|----------|-------|
55
+ | A.5 Organizational | 37 | Policies, roles, incident management, supplier relations |
56
+ | A.6 People | 8 | Screening, training, termination, confidentiality |
57
+ | A.7 Physical | 14 | Facility security, equipment, media — mostly N/A for cloud startups |
58
+ | A.8 Technological | 34 | Access control, crypto, logging, SDLC, network security |
59
+ | Clauses 4-10 | 30 | ISMS management system (context, leadership, planning, support, operation, performance, improvement) |
60
+
61
+ ### Decision Tree: Startup Scoping
62
+
63
+ ```
64
+ Is the organization cloud-native (no owned data centers)?
65
+ ├── YES → Mark A.7.1-A.7.9, A.7.11-A.7.13 as "satisfied by cloud provider SOC 2"
66
+ │ Focus evidence on: laptops, home offices, mobile devices
67
+ ├── NO → Full A.7 assessment required
68
+
69
+ Does the organization develop software?
70
+ ├── YES → A.8.25-A.8.34 (SDLC controls) are in scope
71
+ ├── NO → A.8.25-A.8.34 can be scoped out with justification
72
+
73
+ Does the organization handle PII?
74
+ ├── YES → A.5.34 (privacy) is critical, cross-reference with GDPR/CCPA
75
+ ├── NO → A.5.34 is checkbox tier
76
+ ```
77
+
78
+ ### Control Tiering
79
+
80
+ Not all 93 controls fail equally. Prioritize by audit failure frequency:
81
+
82
+ | Tier | Count | Treatment |
83
+ |------|-------|-----------|
84
+ | **Critical** | ~30 | Full assessment: evidence, interviews, observation |
85
+ | **Relevant** | ~30 | Standard check: evidence review, spot-check |
86
+ | **Checkbox** | ~33 | Verify policy exists or cloud provider covers it |
87
+
88
+ For detailed per-control guidance, load `rules/<domain>.md`.
89
+
90
+ ## Step-by-Step Workflow
91
+
92
+ ### Step 1: Scope and Context
93
+
94
+ 1. **Identify the ISMS scope** — What systems, processes, locations, and people are in scope?
95
+ 2. **Gather the Statement of Applicability (SoA)** — Which of the 93 Annex A controls apply?
96
+ 3. **Review previous audit findings** — What was flagged last time? Are corrective actions closed?
97
+ 4. **Check data freshness** — If using a monitoring dashboard or automated testing system, verify data is < 7 days old
98
+
99
+ ```
100
+ # If compliance MCP is available:
101
+ check_compliance_status(framework="iso27001_2022")
102
+
103
+ # If reading local files:
104
+ # Check compliance/status/last_refresh.yaml for staleness
105
+ ```
106
+
107
+ ### Step 2: ISMS Clause Assessment (Clauses 4-10)
108
+
109
+ Most startups fail here — they treat ISMS as documentation, not a functioning management system.
110
+
111
+ 1. **Clause 5 (Leadership)** — Is there a signed security policy? Who is the ISMS owner? Is there evidence of management review?
112
+ 2. **Clause 6 (Planning)** — Is there a risk assessment? Is it current (< 12 months)? Does it reference the SoA?
113
+ 3. **Clause 7 (Support)** — Is there a competence matrix? Are training records current?
114
+ 4. **Clause 8 (Operation)** — Is the risk treatment plan being executed?
115
+ 5. **Clause 9 (Performance)** — Are there metrics? Has an internal audit been done? Is there a management review record?
116
+ 6. **Clause 10 (Improvement)** — Are nonconformities tracked? Are corrective actions implemented?
117
+
118
+ **Auditor hint**: Auditors look for a CONNECTED chain — risk assessment → SoA → risk treatment plan → evidence of implementation → monitoring → management review → improvement. Any break in the chain is a nonconformity.
119
+
120
+ ### Step 3: Annex A Control Assessment
121
+
122
+ Work through controls by domain, prioritizing Critical tier:
123
+
124
+ 1. **For each Critical control**:
125
+ - Check: Is there a documented policy/procedure?
126
+ - Check: Is there evidence of implementation?
127
+ - Check: Is there evidence of monitoring/review?
128
+ - Record finding: Conformity / Minor nonconformity / Major nonconformity / Observation
129
+
130
+ 2. **For each Relevant control**:
131
+ - Check: Is there evidence of implementation?
132
+ - Spot-check one or two items
133
+ - Record finding
134
+
135
+ 3. **For each Checkbox control**:
136
+ - Verify policy exists or cloud provider SOC 2 covers it
137
+ - Record as conforming or note exception
138
+
139
+ ```
140
+ # If compliance MCP is available:
141
+ get_domain_overview(domain="organizational")
142
+ get_control_guidance(control_id="A.5.15")
143
+ list_evidence_gaps(framework="iso27001_2022", tier="critical")
144
+ ```
145
+
146
+ ### Step 4: Evidence Collection
147
+
148
+ For each finding, collect supporting evidence:
149
+
150
+ 1. **API exports** (preferred) — timestamped JSON/CSV from source systems
151
+ 2. **Screenshots** (when API unavailable) — must include visible system clock
152
+ 3. **Interview notes** — summarize who said what, when
153
+ 4. **Document review** — note document name, version, date reviewed
154
+
155
+ **Evidence naming convention**: `{control_id}_{evidence_type}_{date}.{ext}`
156
+ Example: `A.5.15_user-access-list_2026-02-28.json`
157
+
158
+ For detailed collection commands, load `rules/` files or use the `iso-27001-evidence-collection` skill.
159
+
160
+ ### Step 5: Generate Findings
161
+
162
+ For each nonconformity:
163
+
164
+ ```markdown
165
+ ## Finding: [Short title]
166
+
167
+ - **Control**: A.x.x
168
+ - **NIST Reference**: [NIST control ID]
169
+ - **Severity**: Major / Minor / Observation
170
+ - **Description**: [What was found]
171
+ - **Evidence**: [What evidence supports the finding]
172
+ - **Root Cause**: [Why the control failed]
173
+ - **Corrective Action**: [Specific remediation steps]
174
+ - **Due Date**: [Agreed timeline]
175
+ - **Owner**: [Person responsible]
176
+ ```
177
+
178
+ **Severity definitions**:
179
+ - **Major nonconformity**: Control is missing or completely ineffective. Audit failure risk.
180
+ - **Minor nonconformity**: Control exists but has gaps. Must fix before next surveillance audit.
181
+ - **Observation**: Potential improvement. Not required but recommended.
182
+
183
+ ### Step 6: Audit Report
184
+
185
+ Generate a structured audit report:
186
+
187
+ 1. **Executive summary** — overall ISMS maturity, key findings, recommendation
188
+ 2. **Scope** — what was audited, what was excluded
189
+ 3. **Methodology** — controls assessed, evidence reviewed, people interviewed
190
+ 4. **Findings** — grouped by domain, with severity and corrective actions
191
+ 5. **Positive observations** — what's working well (auditors do note these)
192
+ 6. **Conclusion** — readiness for external audit, recommended timeline
193
+
194
+ ## Quick Reference: Top 10 Controls That Fail Most Often
195
+
196
+ | # | Control | Common Failure | Fix |
197
+ |---|---------|---------------|-----|
198
+ | 1 | A.5.15 | No periodic access review | Schedule quarterly reviews, export user lists |
199
+ | 2 | A.8.8 | No vulnerability scanning | Deploy Dependabot/Snyk, schedule infra scans |
200
+ | 3 | A.5.24 | Incident response plan untested | Run tabletop exercise, document results |
201
+ | 4 | A.8.5 | MFA not enforced everywhere | Enable MFA on all production + admin accounts |
202
+ | 5 | A.5.30 | No business continuity test | Run DR failover test, document RTO/RPO results |
203
+ | 6 | A.8.15 | Audit logs not centralized | Ship logs to SIEM/CloudWatch/Stackdriver |
204
+ | 7 | A.8.9 | No baseline configuration | Document server/container base images |
205
+ | 8 | A.6.1 | Background checks incomplete | Verify all employees have completed screening |
206
+ | 9 | A.8.32 | No change management process | Require PR reviews, document deployment process |
207
+ | 10 | A.5.9 | Asset inventory incomplete | Export from cloud provider + endpoint management |
208
+
209
+ ## DO / DON'T
210
+
211
+ ### DO
212
+ - Collect evidence via API exports with ISO 8601 timestamps — always preferred over screenshots
213
+ - Test controls, don't just review documentation — auditors check implementation, not just policies
214
+ - Interview people at different levels — manager says one thing, engineer may say another
215
+ - Document positive findings — shows the audit is balanced and thorough
216
+ - Keep the SoA aligned with actual controls — gaps between SoA and implementation are major findings
217
+ - Use `screencapture -x ~/evidence/{filename}.png` on macOS when screenshots are necessary
218
+
219
+ ### DON'T
220
+ - Screenshot portals without visible system clock — auditors will reject undated evidence
221
+ - Accept "we have a policy" without checking implementation — "show me" > "tell me"
222
+ - Audit your own work — independence requirement (Clause 9.2) means auditors can't audit their own area
223
+ - Treat checkbox controls as zero-effort — even N/A controls need justification in the SoA
224
+ - Skip ISMS clauses to focus only on Annex A — most first-time failures are in clauses 4-10
225
+
226
+ ## Troubleshooting
227
+
228
+ | Problem | Solution |
229
+ |---------|----------|
230
+ | Data is stale (> 7 days old) | Refresh from monitoring dashboard or re-export from source systems |
231
+ | Can't determine which controls apply | Start with the SoA; if no SoA exists, use the decision tree above |
232
+ | Too many findings to address before audit | Prioritize: fix all Major nonconformities first, then Critical-tier Minors |
233
+ | Evidence timestamps don't match audit period | Re-collect evidence within the audit window (typically 12 months) |
234
+ | Cloud provider controls not documented | Request SOC 2 Type II report from provider; map their controls to your SoA |
235
+ | Internal audit has never been done | This IS the first internal audit — document that in the report and plan for regular cadence |
236
+
237
+ ## Rules
238
+
239
+ For detailed per-control guidance, load the appropriate rules file:
240
+
241
+ | File | Coverage |
242
+ |------|----------|
243
+ | `rules/access-control.md` | A.5.15-A.5.18, A.8.2-A.8.5 — identity, authentication, authorization |
244
+ | `rules/incident-response.md` | A.5.24-A.5.29, A.6.8 — incident lifecycle |
245
+ | `rules/encryption.md` | A.8.24, A.8.10-A.8.12 — cryptographic controls |
246
+ | `rules/change-management.md` | A.8.25-A.8.34, A.8.9, A.8.32 — SDLC and configuration |
247
+ | `rules/logging-monitoring.md` | A.8.15-A.8.17 — audit trails and monitoring |
248
+ | `rules/business-continuity.md` | A.5.30, A.8.13-A.8.14 — backup, DR, BCP |
249
+ | `rules/people-controls.md` | A.6.1-A.6.8 — HR security lifecycle |
250
+ | `rules/supplier-management.md` | A.5.19-A.5.23 — third-party risk |
251
+ | `rules/isms-management.md` | Clauses 4-10 — management system operation |
252
+
253
+ ## Attribution
254
+
255
+ Audit procedures and control guidance developed with [Internal ISO Audit](https://internalisoaudit.com) (Hazel Castro, ISO 27001 Lead Auditor, 14+ years, 100+ audits).
256
+
257
+ ## Runtime Detection
258
+
259
+ This skill operates in three modes, detected automatically:
260
+
261
+ 1. **Compliance MCP server available** (best) — Live dashboard data, automated test results, real-time gap analysis
262
+ - Detected by: `check_compliance_status()` returns data
263
+ - Benefits: Current test pass/fail status, evidence freshness, SLA tracking
264
+
265
+ 2. **Local compliance data available** (good) — Reads `compliance/` directory directly
266
+ - Detected by: `compliance/status/last_refresh.yaml` exists
267
+ - Benefits: Historical test data, evidence status, control mappings
268
+
269
+ 3. **Reference only** (baseline) — Uses embedded `rules/` files, no live data
270
+ - Always available
271
+ - Benefits: Procedural guidance, control descriptions, evidence checklists
272
+ - Limitation: No organization-specific status data
@@ -0,0 +1,191 @@
1
+ # Access Control Rules
2
+
3
+ Per-control audit guidance for identity, authentication, and authorization controls.
4
+
5
+ ## A.5.15 — Access Control Policy & Enforcement
6
+
7
+ **Tier**: Critical | **NIST**: AC-1, AC-2, AC-3, AC-6
8
+
9
+ Ensure access to information and systems is restricted based on business and security requirements. The access control policy should define rules for granting, reviewing, and revoking access based on the principle of least privilege.
10
+
11
+ **Auditor hints**:
12
+ - Auditors want to see the access control POLICY and evidence it's being FOLLOWED — not just that a policy document exists
13
+ - They'll sample 3-5 joiners and 3-5 leavers to verify access was provisioned/revoked correctly
14
+ - Look for: quarterly access reviews with documented decisions (retain/revoke), not just screenshots of user lists
15
+ - Common gap: policy says "least privilege" but admin accounts are used for daily work
16
+
17
+ **Evidence collection**:
18
+ ```bash
19
+ # GitHub org members and roles
20
+ gh api orgs/{org}/members --paginate | jq '.[] | {login, role: .role}'
21
+
22
+ # GCP IAM bindings
23
+ gcloud projects get-iam-policy {project} --format=json | jq '.bindings'
24
+
25
+ # Azure role assignments
26
+ az role assignment list --all --output json
27
+
28
+ # Google Workspace users
29
+ gam print users fields name,email,orgUnitPath,suspended,isAdmin
30
+ ```
31
+
32
+ **Startup pitfalls**:
33
+ - Using shared accounts ("the deploy key") instead of individual credentials
34
+ - No documented process for access requests — "just Slack the admin" isn't auditable
35
+ - Access reviews never done or done once then abandoned
36
+
37
+ ---
38
+
39
+ ## A.5.16 — Identity Management
40
+
41
+ **Tier**: Critical | **NIST**: AC-2, IA-2, IA-4, IA-8, IA-12
42
+
43
+ Manage the full lifecycle of identities — from provisioning through changes to deprovisioning. Each person should have a unique identity; shared/generic accounts should be documented exceptions.
44
+
45
+ **Auditor hints**:
46
+ - Auditors check for unique user IDs — generic accounts like "admin@" or "deploy@" are flags
47
+ - They'll look for identity lifecycle evidence: joiner provisioning, mover role changes, leaver deprovisioning
48
+ - Service accounts count as identities — they need owners and review cycles too
49
+
50
+ **Evidence collection**:
51
+ ```bash
52
+ # List all identities in IdP
53
+ gam print users fields primaryEmail,name,creationTime,lastLoginTime,suspended
54
+
55
+ # Service accounts (GCP)
56
+ gcloud iam service-accounts list --format=json | jq '.[] | {email, displayName, disabled}'
57
+
58
+ # GitHub service/bot accounts
59
+ gh api orgs/{org}/members --paginate | jq '[.[] | select(.type == "Bot")]'
60
+ ```
61
+
62
+ ---
63
+
64
+ ## A.5.17 — Authentication Information
65
+
66
+ **Tier**: Critical | **NIST**: IA-1, IA-5
67
+
68
+ Manage authentication credentials (passwords, tokens, keys, certificates) through their lifecycle. Define minimum strength requirements and enforce MFA where available.
69
+
70
+ **Auditor hints**:
71
+ - MFA is the #1 thing auditors check — if it's not enforced on production systems and admin accounts, expect a finding
72
+ - They'll verify password policy in the IdP matches the documented policy
73
+ - API keys and tokens need rotation schedules — "we'll rotate if compromised" is not a policy
74
+ - SSH keys should have expiration dates or documented rotation cadence
75
+
76
+ **Evidence collection**:
77
+ ```bash
78
+ # Google Workspace MFA enforcement
79
+ gam print users fields primaryEmail,isEnrolledIn2Sv,isEnforcedIn2Sv
80
+
81
+ # GitHub org MFA requirement
82
+ gh api orgs/{org} | jq '{two_factor_requirement_enabled}'
83
+
84
+ # Azure AD MFA status
85
+ az ad user list --query "[].{name:displayName,mfa:strongAuthenticationDetail}" --output json
86
+ ```
87
+
88
+ ---
89
+
90
+ ## A.5.18 — Access Rights
91
+
92
+ **Tier**: Critical | **NIST**: AC-2, PS-5
93
+
94
+ Provision, review, modify, and revoke access rights in accordance with the access control policy. Access rights should be reviewed at regular intervals and promptly revoked when no longer needed.
95
+
96
+ **Auditor hints**:
97
+ - The "48-hour rule": auditors expect access revocation within 24-48 hours of termination, not just at the next quarterly review
98
+ - They'll cross-reference HR termination dates with last-active dates in systems
99
+ - Role changes (promotions, transfers) should trigger access reviews — people accumulate permissions over time
100
+ - Look for orphaned accounts: users who left but still show as active
101
+
102
+ **Evidence collection**:
103
+ ```bash
104
+ # Cross-reference terminated users with active accounts
105
+ # Step 1: Get terminated users from HR system (export CSV)
106
+ # Step 2: Check against active users
107
+ gam print users fields primaryEmail,suspended,lastLoginTime | grep -v "True"
108
+
109
+ # GitHub: check for stale members
110
+ gh api orgs/{org}/members --paginate | jq '.[] | {login, updated_at}'
111
+ ```
112
+
113
+ ---
114
+
115
+ ## A.8.2 — Privileged Access Rights
116
+
117
+ **Tier**: Critical | **NIST**: AC-6
118
+
119
+ Restrict and manage the allocation of privileged access rights (admin, root, superuser). Privileged access should be time-limited where possible and subject to enhanced monitoring.
120
+
121
+ **Auditor hints**:
122
+ - Auditors want a LIST of all privileged users across all systems — if you can't produce this, it's a finding
123
+ - "Everyone is admin" is a common startup pattern and a guaranteed finding
124
+ - Just-in-time (JIT) access is best practice but not required — having a small, documented set of admins is sufficient
125
+ - Privileged access should have separate credentials from daily-use accounts
126
+
127
+ **Evidence collection**:
128
+ ```bash
129
+ # GCP: users with Owner/Editor roles
130
+ gcloud projects get-iam-policy {project} --format=json | \
131
+ jq '.bindings[] | select(.role == "roles/owner" or .role == "roles/editor")'
132
+
133
+ # GitHub: org owners
134
+ gh api orgs/{org}/members?role=admin --paginate | jq '.[].login'
135
+
136
+ # Azure: Global Admins (via MS Graph)
137
+ az rest --method GET \
138
+ --url "https://graph.microsoft.com/v1.0/directoryRoles/$(az rest --method GET --url 'https://graph.microsoft.com/v1.0/directoryRoles' --query "value[?displayName=='Global Administrator'].id" -o tsv)/members" \
139
+ --query "value[].{displayName:displayName,upn:userPrincipalName}" -o json
140
+ ```
141
+
142
+ ---
143
+
144
+ ## A.8.3 — Information Access Restriction
145
+
146
+ **Tier**: Critical | **NIST**: AC-3, AC-6
147
+
148
+ Restrict access to information and application functions based on the access control policy. Systems should enforce access restrictions, not rely on user self-governance.
149
+
150
+ **Auditor hints**:
151
+ - Auditors test this by checking if users have access they shouldn't — especially cross-environment (dev accessing prod data)
152
+ - Database access is a common gap: developers often have direct production database access "for debugging"
153
+ - API key scoping: keys that grant broad access when narrow scope would suffice
154
+
155
+ **Evidence collection**:
156
+ ```bash
157
+ # GCP: check for overly broad IAM roles
158
+ gcloud projects get-iam-policy {project} --format=json | \
159
+ jq '.bindings[] | select(.role | test("roles/(owner|editor|viewer)"))'
160
+
161
+ # GitHub: repo access by team
162
+ gh api orgs/{org}/teams --paginate | jq '.[].slug' | while read team; do
163
+ echo "=== $team ===" && gh api orgs/{org}/teams/$team/repos --paginate | jq '.[].name'
164
+ done
165
+ ```
166
+
167
+ ---
168
+
169
+ ## A.8.5 — Secure Authentication
170
+
171
+ **Tier**: Critical | **NIST**: AC-7, IA-2, IA-6, IA-8, SC-23
172
+
173
+ Implement secure authentication mechanisms including MFA, session management, account lockout, and authentication feedback controls.
174
+
175
+ **Auditor hints**:
176
+ - MFA enforcement is non-negotiable for production and admin access
177
+ - Session timeout should be configured (15-30 min inactive for sensitive systems)
178
+ - Account lockout after failed attempts — check IdP configuration
179
+ - SSO is strongly preferred over individual application passwords
180
+
181
+ **Evidence collection**:
182
+ ```bash
183
+ # Google Workspace: session control and MFA
184
+ gam print users fields primaryEmail,isEnforcedIn2Sv
185
+
186
+ # GitHub: org settings
187
+ gh api orgs/{org} | jq '{two_factor_requirement_enabled, default_repository_permission}'
188
+
189
+ # Check session timeout in cloud console (usually screenshot needed)
190
+ # macOS: screencapture -x ~/evidence/session-config_$(date +%Y-%m-%d).png
191
+ ```
@@ -0,0 +1,94 @@
1
+ # Business Continuity Rules
2
+
3
+ Per-control audit guidance for backup, disaster recovery, and business continuity planning.
4
+
5
+ ## A.5.30 — ICT Readiness for Business Continuity
6
+
7
+ **Tier**: Critical | **NIST**: CP-1, CP-2, CP-3, CP-4
8
+
9
+ Ensure ICT systems can be recovered within required timeframes during disruption. Define RTO (Recovery Time Objective) and RPO (Recovery Point Objective) for critical systems. Test recovery procedures regularly.
10
+
11
+ **Auditor hints**:
12
+ - Auditors check THREE things: (1) BCP/DR plan exists with defined RTO/RPO, (2) the plan has been TESTED, (3) test results are documented
13
+ - A plan tested > 12 months ago is a finding — annual testing is the minimum
14
+ - "We use cloud so we're resilient" is not a BCP — auditors want to see that YOU tested failover, not just that your provider can
15
+ - RTO/RPO should be defined per system based on business impact analysis, not a blanket number
16
+ - The test should include actual recovery steps, not just "we verified the backup exists"
17
+
18
+ **Evidence collection**:
19
+ - Business continuity plan (with version date)
20
+ - Business impact analysis (system criticality, RTO/RPO per system)
21
+ - DR test records (date, scope, participants, results, issues found)
22
+ - Recovery time actuals vs. RTO targets
23
+
24
+ ```bash
25
+ # GCP: verify backup configuration
26
+ gcloud sql instances describe {instance} --format="json(settings.backupConfiguration)"
27
+
28
+ # Azure: check backup policy
29
+ az backup policy list --resource-group {rg} --vault-name {vault} --output json
30
+
31
+ # AWS: backup plans
32
+ # aws backup list-backup-plans --output json
33
+ ```
34
+
35
+ **Startup pitfalls**:
36
+ - Having backups but never testing restore — a backup you can't restore from is worthless
37
+ - No defined RTO/RPO — "as fast as possible" is not a measurable objective
38
+ - BCP covers infrastructure but not data (database backups, secrets, configuration)
39
+ - Single-region deployment with no failover plan
40
+
41
+ ---
42
+
43
+ ## A.8.13 — Information Backup
44
+
45
+ **Tier**: Critical | **NIST**: CP-9
46
+
47
+ Maintain and regularly test backup copies of information, software, and system configurations. Backups should be stored separately from primary systems and encrypted.
48
+
49
+ **Auditor hints**:
50
+ - Auditors verify: backup frequency matches RPO, backups are encrypted, backups are stored in a different location/region
51
+ - They'll ask for a RECENT RESTORE TEST — "we restored a database in Q2" with evidence
52
+ - Automated backups are good but auditors still want to see that someone verified they completed successfully
53
+ - Backup alerts (failure notifications) should be configured and monitored
54
+
55
+ **Evidence collection**:
56
+ ```bash
57
+ # GCP: Cloud SQL backup history
58
+ gcloud sql backups list --instance={instance} --format=json | jq '.[0:5]'
59
+
60
+ # GCP: Cloud Storage versioning (for file backups)
61
+ gsutil versioning get gs://{bucket}
62
+
63
+ # Azure: backup job history
64
+ az backup job list --resource-group {rg} --vault-name {vault} --output json | jq '.[0:5]'
65
+
66
+ # Verify backup encryption
67
+ gcloud sql instances describe {instance} --format="json(settings.dataDiskEncryptionConfiguration)"
68
+ ```
69
+
70
+ ---
71
+
72
+ ## A.8.14 — Redundancy of Information Processing Facilities
73
+
74
+ **Tier**: Relevant | **NIST**: CP-6, CP-7, CP-10
75
+
76
+ Implement sufficient redundancy in information processing facilities to meet availability requirements. This includes compute, storage, network, and power redundancy.
77
+
78
+ **Auditor hints**:
79
+ - For cloud-native startups, this is largely covered by cloud provider SLAs — but auditors want to see you've CHOSEN appropriate service tiers
80
+ - Multi-AZ or multi-region deployment for production is expected for critical systems
81
+ - Database replication configuration should match RTO/RPO requirements
82
+ - Auditors may ask: "What happens if your primary region goes down?" — have an answer
83
+
84
+ **Evidence collection**:
85
+ ```bash
86
+ # GCP: check instance zones/regions
87
+ gcloud compute instances list --format="json(name,zone,status)"
88
+
89
+ # GCP: Cloud SQL HA configuration
90
+ gcloud sql instances describe {instance} --format="json(settings.availabilityType)"
91
+
92
+ # Azure: check resource distribution across regions
93
+ az resource list --output json | jq 'group_by(.location) | .[] | {location: .[0].location, count: length}'
94
+ ```