Policy Templates
Ready-to-use acceptable use policies, security baselines, and procurement checklists for AI coding tools
title: "Policy Templates" description: "Ready-to-use acceptable use policies, security baselines, and procurement checklists for AI coding tools" section: "Adoption" readTime: "14 min"
Policy Templates
Before rolling out AI coding tools, your organization needs written policies. These templates are starting points — adapt them to your security posture, industry regulations, and legal requirements. Have your legal and security teams review before publishing.
Template 1: Acceptable Use Policy
# AI Coding Tools — Acceptable Use Policy
Version: 1.0 | Effective: [DATE] | Owner: [SECURITY TEAM]
## Purpose
This policy governs the use of AI-assisted coding tools (including but not limited to
GitHub Copilot, Claude Code, and Cursor) by engineering staff.
## Permitted Uses
- Code completion and generation for company projects
- Code review, refactoring, and debugging assistance
- Documentation and test generation
- Learning and skills development
## Prohibited Uses
- Sending customer PII, PHI, or financial data to AI APIs
- Sharing proprietary algorithms classified as trade secrets
- Bypassing code review requirements by attributing AI output as human-reviewed
- Using personal AI tool accounts for company work (use company-provisioned accounts)
- Submitting AI-generated code to open source projects without disclosure per project norms
## Data Classification
| Data Type | May Send to AI? |
|---|---|
| Public documentation | Yes |
| Internal code (no trade secrets) | Yes, with approved tools |
| Customer PII / PHI | No |
| Financial data | No |
| Security credentials / keys | No |
| Trade-secret algorithms | No — escalate to security team |
## Code Review Requirements
AI-generated code is subject to the same review requirements as human-written code.
Engineers are responsible for understanding and verifying all code they commit,
regardless of how it was generated.
## Security Requirements
- All secrets must be in approved secrets managers, never in prompts
- Report suspected prompt injection incidents to security@[company].com
- Report AI-suggested code that appears malicious to security@[company].com
## Compliance
For regulated workloads (SOC 2, HIPAA, PCI-DSS, ISO 27001), consult the security team
before using AI tools. Additional data residency and audit requirements may apply.
## Violations
Violations of this policy may result in access revocation and disciplinary action
per the standard HR process.Template 2: Security Baseline Checklist
# AI Coding Tools Security Baseline
Complete before granting team access.
## Pre-Deployment
- [ ] Vendor DPA (Data Processing Agreement) reviewed and signed
- [ ] Data residency requirements confirmed (EU? US only?)
- [ ] Commercial plan terms confirmed (Claude Team/Enterprise and API: no training on your data by default; verify current terms with the vendor)
- [ ] API key management via secrets manager (not .env files in repos)
- [ ] Network policy updated if outbound API calls need allowlisting
## IDE / Tool Configuration
- [ ] Copilot: confirm the data-sharing / product-improvement setting is disabled at the org level
(exact menu names change — check current GitHub docs)
- [ ] Claude Code: deploy a managed-settings.json (see Template 5) so permission, sandbox, and telemetry settings are enforced rather than left to each developer
- [ ] Cursor: Disable codebase indexing / enable Privacy Mode if code sensitivity requires it
(exact menu names change — check current Cursor docs)
## Repository Hardening
- [ ] .gitignore includes: .env, *.key, *.pem, secrets.*, credentials.*
- [ ] git-secrets or detect-secrets pre-commit hook installed
- [ ] Branch protection rules prevent direct push to main
- [ ] CLAUDE.md / copilot-instructions committed with no-secrets guidance (guidance only — enforce with deny rules and the sandbox, see Template 5)
## Ongoing
- [ ] Monthly review of API usage logs for anomalies
- [ ] Quarterly policy review for new tool features that may change data exposure
- [ ] Annual penetration test includes AI tool integrationsTemplate 3: Procurement Checklist
Use this when evaluating AI coding tool vendors:
# AI Tool Procurement Evaluation Checklist
## Data Privacy
- [ ] Does the vendor train on customer code? (Answer must be: No for enterprise tier)
- [ ] Where is data processed? (Region / data residency)
- [ ] Is there a Data Processing Agreement available?
- [ ] What is the data retention period for prompts and completions?
- [ ] Can we audit what data was sent to the vendor?
## Security
- [ ] SOC 2 Type II report available?
- [ ] Pen test results available under NDA?
- [ ] SSO / SAML support for identity management?
- [ ] Role-based access control (admin vs. user)?
- [ ] Audit logs available for admin review?
## Compliance
- [ ] GDPR compliant (if EU data involved)?
- [ ] HIPAA BAA available (if healthcare data)?
- [ ] FedRAMP authorized (if US government work)?
- [ ] ISO 27001 certified?
## Operability
- [ ] API available for CI/CD integration?
- [ ] Deployment options (Claude Code can run through Amazon Bedrock, Google Vertex AI, or Microsoft Foundry on your own cloud account)?
- [ ] SLA uptime guarantee?
- [ ] Support tier during business hours?
## Commercial
- [ ] Per-seat vs. usage-based pricing?
- [ ] Volume discounts available?
- [ ] Contract term flexibility (monthly vs. annual)?
- [ ] Exit / data portability terms?
## Vendor Health
- [ ] Funding / runway transparency?
- [ ] Support channel response time?
- [ ] Roadmap published and aligned with our needs?Template 4: Incident Response Procedure
# AI Tool Security Incident Response
## Trigger Conditions
Invoke this procedure if:
1. AI tool suggests code containing a hardcoded secret
2. AI output appears to include another organization's proprietary code
3. Suspected prompt injection in code comments or AI outputs
4. AI tool account credentials compromised
## Response Steps
### Immediate (within 1 hour)
1. Revoke the affected API key / access token immediately
2. Scan recently committed code for AI-suggested content that may be affected
3. Notify security@[company].com
### Investigation (within 24 hours)
1. Identify all repositories where affected tool was used in last 30 days
2. Run secret scanning across those repos: including history (for example `gitleaks detect` or `trufflehog git file://.`)
3. Check vendor's audit logs if available
### Remediation
1. Rotate any exposed credentials (assume compromised)
2. If secrets were committed, rewrite history only after rotation (git-filter-repo or BFG) and coordinate any force-push with the team. Rotation, not history rewriting, is what contains the exposure.
### Post-Incident
1. Root cause analysis: how did AI suggest this content?
2. Update CLAUDE.md / copilot-instructions to prevent recurrence
3. Notify affected parties if customer data was involved (legal/compliance review)
4. Publish internal post-mortem within 5 business daysTemplate 5: Claude Code Managed Settings
Policy documents are guidance; managed settings are enforcement. Managed settings sit above user, project, local, and --settings values, so developers cannot override them. Deliver them as managed-settings.json in the system directory, via MDM, or through server-managed settings in the claude.ai admin console (Teams/Enterprise).
| OS | File path |
|---|---|
| macOS | /Library/Application Support/ClaudeCode/managed-settings.json |
| Linux / WSL | /etc/claude-code/managed-settings.json |
| Windows | C:\Program Files\ClaudeCode\managed-settings.json |
An optional managed-settings.d/ directory next to it holds drop-in *.json files, merged alphabetically (for example 10-telemetry.json, 20-security.json).
{
"permissions": {
"disableBypassPermissionsMode": "disable",
"disableAutoMode": "disable",
"deny": [
"Read(./.env)",
"Read(./.env.*)",
"Read(./secrets/**)",
"Bash(curl *)"
]
},
"allowManagedPermissionRulesOnly": true,
"allowManagedHooksOnly": true,
"allowManagedMcpServersOnly": true,
"env": {
"CLAUDE_CODE_ENABLE_TELEMETRY": "1",
"OTEL_METRICS_EXPORTER": "otlp",
"OTEL_EXPORTER_OTLP_PROTOCOL": "grpc",
"OTEL_EXPORTER_OTLP_ENDPOINT": "https://otel-collector.example.com:4317"
}
}Notes:
- Permission rules evaluate deny, then ask, then allow; the first match wins, so deny always beats allow.
- Path rules use the
Read(...)andEdit(...)forms (anEdit(...)rule covers the built-in file-editing tools). There is no.claudeignore; useReaddeny rules, plus the sandbox'sfilesystem.denyReadfor OS-level enforcement against Bash subprocesses. allowManagedPermissionRulesOnlymakes Claude Code ignore permission rules from user, project, and local files. Enable it only after your managed rules cover what teams legitimately need.- Use
strictKnownMarketplacesin managed settings to restrict which plugin marketplaces can be added. - A managed file that cannot be parsed stops Claude Code from starting, so validate the JSON before deploying. Run
/statusin a session to confirm the managed source is active. - Repository
.claude/settings.jsoncannot enable telemetry or choose its destination; set it in managed settings.
A CLAUDE.md rule such as "never read .env" is guidance the model usually follows, not a guarantee. Anything you must enforce belongs in managed settings (permission rules, sandbox, hooks), not in prose policy.
See Security Hardening for the full control set and Deploy managed settings for delivery options.
Adapting These Templates
These templates are starting points. Before publishing, have them reviewed by:
- Your legal team (employment law, IP ownership of AI output)
- Your security team (for alignment with existing security policies)
- HR (for disciplinary language)
Industry-specific additions:
- Healthcare (HIPAA): Add explicit PHI prohibition examples; require BAA with vendor
- Finance (PCI-DSS): Prohibit cardholder data in prompts; require audit trail
- Government (FedRAMP): Require FedRAMP-authorized deployments; verify each vendor's current authorization, or run Claude Code through Bedrock, Vertex AI, or Foundry inside your authorized cloud boundary
- Legal/IP-sensitive: Add section on AI output IP ownership per your jurisdiction