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 (66) 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/delaware-franchise-tax/SKILL.md +56 -19
  39. package/skills/delaware-franchise-tax/reference/ecorp-portal-playwright-notes.md +136 -0
  40. package/skills/edit-docx-agreement/CONNECTORS.md +20 -0
  41. package/skills/edit-docx-agreement/SKILL.md +77 -0
  42. package/skills/employment-contract/SKILL.md +9 -0
  43. package/skills/iso-27001-evidence-collection/CONNECTORS.md +23 -0
  44. package/skills/iso-27001-evidence-collection/SKILL.md +300 -0
  45. package/skills/iso-27001-evidence-collection/rules/api-exports.md +191 -0
  46. package/skills/iso-27001-evidence-collection/rules/evidence-types.md +107 -0
  47. package/skills/iso-27001-evidence-collection/rules/screenshot-guide.md +77 -0
  48. package/skills/iso-27001-internal-audit/CONNECTORS.md +23 -0
  49. package/skills/iso-27001-internal-audit/SKILL.md +272 -0
  50. package/skills/iso-27001-internal-audit/rules/access-control.md +191 -0
  51. package/skills/iso-27001-internal-audit/rules/business-continuity.md +94 -0
  52. package/skills/iso-27001-internal-audit/rules/change-management.md +211 -0
  53. package/skills/iso-27001-internal-audit/rules/encryption.md +93 -0
  54. package/skills/iso-27001-internal-audit/rules/incident-response.md +127 -0
  55. package/skills/iso-27001-internal-audit/rules/isms-management.md +164 -0
  56. package/skills/iso-27001-internal-audit/rules/logging-monitoring.md +96 -0
  57. package/skills/iso-27001-internal-audit/rules/people-controls.md +161 -0
  58. package/skills/iso-27001-internal-audit/rules/supplier-management.md +92 -0
  59. package/skills/nda/SKILL.md +9 -0
  60. package/skills/open-agreements/SKILL.md +9 -0
  61. package/skills/safe/SKILL.md +9 -0
  62. package/skills/services-agreement/SKILL.md +9 -0
  63. package/skills/soc2-readiness/CONNECTORS.md +23 -0
  64. package/skills/soc2-readiness/SKILL.md +289 -0
  65. package/skills/soc2-readiness/rules/trust-services.md +230 -0
  66. package/skills/venture-financing/SKILL.md +9 -0
@@ -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
+ ```
@@ -0,0 +1,211 @@
1
+ # Change Management Rules
2
+
3
+ Per-control audit guidance for SDLC, configuration management, and change control.
4
+
5
+ ## A.8.25 — Secure Development Lifecycle
6
+
7
+ **Tier**: Critical | **NIST**: SA-3, SA-8
8
+
9
+ Establish rules for secure development of software and systems. Apply security requirements throughout the SDLC — design, development, testing, deployment, and maintenance.
10
+
11
+ **Auditor hints**:
12
+ - Auditors want to see SDLC DOCUMENTED, not just practiced informally
13
+ - They'll check: threat modeling (even lightweight), secure coding guidelines, pre-deployment security checks
14
+ - For startups: a documented PR review checklist that includes security considerations is sufficient
15
+ - "We do code review" is not enough — show that security is part of the review criteria
16
+
17
+ **Evidence collection**:
18
+ ```bash
19
+ # GitHub: branch protection requires reviews
20
+ gh api repos/{owner}/{repo}/branches/{branch}/protection | jq '{
21
+ required_pull_request_reviews: .required_pull_request_reviews.required_approving_review_count,
22
+ enforce_admins: .enforce_admins.enabled,
23
+ required_status_checks: .required_status_checks.contexts
24
+ }'
25
+
26
+ # GitHub: recent PRs showing review process
27
+ gh pr list --state merged --limit 10 --json number,title,reviewDecision,mergedAt
28
+ ```
29
+
30
+ ---
31
+
32
+ ## A.8.26 — Application Security Requirements
33
+
34
+ **Tier**: Relevant | **NIST**: SA-3
35
+
36
+ Define and document security requirements for applications, including authentication, authorization, input validation, and data protection requirements.
37
+
38
+ **Auditor hints**:
39
+ - Auditors check if security requirements are captured BEFORE development, not added after
40
+ - For web apps: OWASP Top 10 coverage is expected
41
+ - API security requirements should address authentication, rate limiting, and input validation
42
+ - If you use third-party libraries, security requirements should cover dependency management
43
+
44
+ ---
45
+
46
+ ## A.8.27 — Secure System Architecture and Engineering Principles
47
+
48
+ **Tier**: Checkbox | **NIST**: SA-8
49
+
50
+ Apply secure engineering principles to system architecture. Design systems with defense in depth, least privilege, and fail-secure defaults.
51
+
52
+ **Auditor hints**:
53
+ - Auditors look for architecture documentation that shows security considerations
54
+ - Network segmentation (or VPC design) is the most common check
55
+ - Zero trust principles are increasingly expected but not yet required
56
+ - For cloud: show that environments are isolated (dev/staging/prod separation)
57
+
58
+ ---
59
+
60
+ ## A.8.28 — Secure Coding
61
+
62
+ **Tier**: Relevant | **NIST**: SI-10, SI-11
63
+
64
+ Apply secure coding practices to minimize vulnerabilities. Address input validation, output encoding, error handling, and cryptographic usage in code.
65
+
66
+ **Auditor hints**:
67
+ - Auditors may review a recent security-relevant code change to verify practices
68
+ - SAST (static analysis) tool usage is strong evidence — even a free tool like Semgrep or CodeQL
69
+ - Dependency scanning (Dependabot, Snyk) counts as part of secure coding
70
+ - Error messages should not leak internal details (stack traces, SQL queries, file paths)
71
+
72
+ **Evidence collection**:
73
+ ```bash
74
+ # GitHub: code scanning alerts (CodeQL/SAST)
75
+ gh api repos/{owner}/{repo}/code-scanning/alerts --paginate | jq 'length'
76
+
77
+ # GitHub: Dependabot alerts
78
+ gh api repos/{owner}/{repo}/dependabot/alerts?state=open | jq 'length'
79
+ ```
80
+
81
+ ---
82
+
83
+ ## A.8.29 — Security Testing in Development and Acceptance
84
+
85
+ **Tier**: Checkbox | **NIST**: SA-11
86
+
87
+ Define and implement security testing processes during development and before production deployment. This includes functional security testing, vulnerability scanning, and penetration testing.
88
+
89
+ **Auditor hints**:
90
+ - Annual penetration test is expected for SOC 2 and increasingly for ISO
91
+ - For startups: automated security scanning in CI/CD is acceptable evidence between annual pentests
92
+ - Acceptance testing should include security test cases, not just functional tests
93
+ - Bug bounty programs count as continuous security testing
94
+
95
+ ---
96
+
97
+ ## A.8.30 — Outsourced Development
98
+
99
+ **Tier**: Checkbox | **NIST**: SR-5
100
+
101
+ When development is outsourced, define and enforce security requirements with the external party. Monitor compliance and ensure secure handover.
102
+
103
+ **Auditor hints**:
104
+ - If you use contractors for development, auditors check: NDAs, access provisioning/deprovisioning, code ownership
105
+ - Contractor access should be time-limited and revoked at contract end
106
+ - Code review requirements should apply equally to internal and external developers
107
+
108
+ ---
109
+
110
+ ## A.8.31 — Separation of Development, Test, and Production Environments
111
+
112
+ **Tier**: Checkbox | **NIST**: SA-3
113
+
114
+ Separate development, testing, and production environments to reduce the risk of unauthorized access or changes to production systems.
115
+
116
+ **Auditor hints**:
117
+ - Auditors check: can a developer push directly to production? Is prod data used in dev?
118
+ - Environment separation means: different accounts/projects/subscriptions, not just different folders
119
+ - Database access: dev should NOT have production database credentials
120
+ - CI/CD pipeline should be the ONLY path to production
121
+
122
+ **Evidence collection**:
123
+ ```bash
124
+ # GCP: list projects (should show separate dev/staging/prod)
125
+ gcloud projects list --format="json(projectId,name)"
126
+
127
+ # Azure: list subscriptions
128
+ az account list --output json | jq '.[].{name, id, state}'
129
+ ```
130
+
131
+ ---
132
+
133
+ ## A.8.32 — Change Management
134
+
135
+ **Tier**: Critical | **NIST**: CM-3, SA-10
136
+
137
+ Manage changes to information processing facilities and systems through a formal change management process. Changes should be requested, assessed, approved, implemented, and reviewed.
138
+
139
+ **Auditor hints**:
140
+ - Auditors want to see a CHANGE RECORD for every production change — git history is excellent evidence
141
+ - They'll sample 5-10 recent changes and check: was there a request, review, approval, and implementation record?
142
+ - Emergency changes ("hotfixes") must have retroactive review — skipping the process is acceptable if documented
143
+ - Rollback capability should exist — auditors may ask "what happens if this change fails?"
144
+
145
+ **Evidence collection**:
146
+ ```bash
147
+ # GitHub: recent merged PRs (change records)
148
+ gh pr list --state merged --limit 20 --json number,title,author,reviewDecision,mergedAt,mergedBy
149
+
150
+ # GitHub: branch protection (prevents unreviewed changes)
151
+ gh api repos/{owner}/{repo}/branches/main/protection | jq '{
152
+ required_reviews: .required_pull_request_reviews.required_approving_review_count,
153
+ dismiss_stale_reviews: .required_pull_request_reviews.dismiss_stale_reviews
154
+ }'
155
+
156
+ # GitHub: deployment history
157
+ gh api repos/{owner}/{repo}/deployments --paginate | jq '.[0:10] | .[] | {environment, created_at, sha: .sha[0:8]}'
158
+ ```
159
+
160
+ ---
161
+
162
+ ## A.8.33 — Test Information
163
+
164
+ **Tier**: Checkbox | **NIST**: SA-11
165
+
166
+ Ensure test data is adequately protected, especially when production data is used for testing. Anonymize or mask production data before use in non-production environments.
167
+
168
+ **Auditor hints**:
169
+ - If you use production data for testing, it must be masked — this is where many startups fail
170
+ - Synthetic test data is always preferred
171
+ - Test databases should have the same access controls as the environment warrants
172
+ - Automated tests should not contain hardcoded credentials or real PII
173
+
174
+ ---
175
+
176
+ ## A.8.34 — Protection of Information Systems During Audit Testing
177
+
178
+ **Tier**: Checkbox | **NIST**: CA-2
179
+
180
+ Protect production systems from disruption during audit testing. Audit activities (vulnerability scans, penetration tests) should be planned and authorized to minimize business impact.
181
+
182
+ **Auditor hints**:
183
+ - Auditors check that THEIR OWN testing is authorized and scoped — they'll ask you to sign off on the test plan
184
+ - Penetration tests should have written authorization (Rules of Engagement document)
185
+ - Vulnerability scans on production should be scheduled during low-traffic periods
186
+
187
+ ---
188
+
189
+ ## A.8.9 — Configuration Management
190
+
191
+ **Tier**: Critical | **NIST**: CM-1, CM-2, CM-3, CM-4, CM-6, CM-7, SA-10, SI-7
192
+
193
+ Define, document, and maintain secure configurations for hardware, software, and network components. Establish baselines and monitor for drift.
194
+
195
+ **Auditor hints**:
196
+ - Auditors want to see BASELINE CONFIGURATIONS — what is the "known good" state of your systems?
197
+ - For cloud: Infrastructure as Code (Terraform, CloudFormation) IS your configuration baseline
198
+ - Configuration drift detection is increasingly expected — even a weekly diff of IaC vs. deployed state
199
+ - Container images should be built from documented base images with pinned versions
200
+
201
+ **Evidence collection**:
202
+ ```bash
203
+ # Terraform: show current state
204
+ terraform state list | head -20
205
+
206
+ # GCP: export compute instance configurations
207
+ gcloud compute instances list --format=json | jq '.[] | {name, machineType, status}'
208
+
209
+ # Docker: list base images
210
+ docker image ls --format "table {{.Repository}}\t{{.Tag}}\t{{.Size}}"
211
+ ```
@@ -0,0 +1,93 @@
1
+ # Encryption Rules
2
+
3
+ Per-control audit guidance for cryptographic controls.
4
+
5
+ ## A.8.24 — Use of Cryptography
6
+
7
+ **Tier**: Critical | **NIST**: SC-8, SC-12, SC-13, SC-17, SC-28
8
+
9
+ Define and implement rules for cryptographic controls including key management. Use cryptography to protect data confidentiality, integrity, and authenticity — both in transit and at rest.
10
+
11
+ **Auditor hints**:
12
+ - Auditors check TWO things: (1) is encryption enabled, (2) is key management documented
13
+ - "Encryption at rest" must cover databases, backups, AND local storage (laptops)
14
+ - "Encryption in transit" means TLS 1.2+ for all external connections — auditors will check with `openssl s_client`
15
+ - Key rotation policy must exist even if rotation is automated — document the cadence
16
+ - Deprecated algorithms are findings: MD5, SHA-1, DES, 3DES, RC4, TLS 1.0/1.1
17
+
18
+ **Evidence collection**:
19
+ ```bash
20
+ # Check TLS configuration on a domain
21
+ openssl s_client -connect example.com:443 -tls1_2 < /dev/null 2>&1 | grep -E "Protocol|Cipher"
22
+
23
+ # GCP: check encryption at rest (default is Google-managed keys)
24
+ gcloud sql instances describe {instance} --format="json(settings.ipConfiguration,settings.dataDiskEncryptionConfiguration)"
25
+
26
+ # Azure: check encryption at rest
27
+ az storage account show --name {account} --query "encryption" --output json
28
+
29
+ # GitHub: check for secrets in repos (Dependabot/secret scanning)
30
+ gh api repos/{owner}/{repo}/secret-scanning/alerts --paginate | jq 'length'
31
+
32
+ # macOS FileVault status
33
+ fdesetup status
34
+ ```
35
+
36
+ **Startup pitfalls**:
37
+ - Using default cloud encryption (fine) but not documenting the key management approach
38
+ - Storing API keys/secrets in code repositories — use vault/secrets manager
39
+ - No certificate inventory — TLS certs expire and cause outages
40
+ - Assuming HTTPS means all traffic is encrypted — internal service-to-service traffic may not use TLS
41
+
42
+ ---
43
+
44
+ ## A.8.10 — Information Deletion
45
+
46
+ **Tier**: Relevant | **NIST**: SC-28
47
+
48
+ Delete information when no longer needed, in accordance with the retention policy. Deletion should be verifiable and cover all copies (backups, replicas, caches).
49
+
50
+ **Auditor hints**:
51
+ - Auditors check the DATA RETENTION SCHEDULE and verify it's being followed
52
+ - "We keep everything forever" is technically compliant but a GDPR risk if you handle PII
53
+ - Backup retention is often overlooked — if backups contain deleted data, the deletion isn't complete
54
+ - Soft-delete vs. hard-delete: auditors want to know which you use and whether soft-deleted data is eventually purged
55
+
56
+ ---
57
+
58
+ ## A.8.11 — Data Masking
59
+
60
+ **Tier**: Relevant | **NIST**: SC-28
61
+
62
+ Use data masking techniques to limit exposure of sensitive data, especially in non-production environments. Masking should maintain data utility while preventing unauthorized access to actual values.
63
+
64
+ **Auditor hints**:
65
+ - The main question: "Does your staging/dev environment use production data?"
66
+ - If yes, is it masked/anonymized? If no, how do you generate test data?
67
+ - Masking must be irreversible for non-production — tokenization is acceptable if the token store is access-controlled
68
+ - Logs are a common masking gap — sensitive data in debug logs
69
+
70
+ ---
71
+
72
+ ## A.8.12 — Data Leakage Prevention
73
+
74
+ **Tier**: Relevant | **NIST**: MP-7
75
+
76
+ Apply measures to prevent unauthorized disclosure of information. Monitor for and block data exfiltration through email, web uploads, USB devices, and other channels.
77
+
78
+ **Auditor hints**:
79
+ - For startups, DLP usually means: email scanning for attachments with sensitive data, endpoint USB controls, and cloud storage access restrictions
80
+ - Auditors won't expect enterprise DLP software from a startup, but they will ask: "What prevents an employee from emailing the customer database?"
81
+ - GitHub is a DLP vector — check that repos are private by default and secret scanning is enabled
82
+
83
+ **Evidence collection**:
84
+ ```bash
85
+ # GitHub: verify private-by-default repo setting
86
+ gh api orgs/{org} | jq '{default_repository_permission, members_can_create_public_repositories}'
87
+
88
+ # GitHub: secret scanning alerts
89
+ gh api orgs/{org}/secret-scanning/alerts --paginate | jq 'length'
90
+
91
+ # macOS: check if USB storage is restricted
92
+ profiles show -type configuration | grep -i "removable"
93
+ ```