Skip to main content
← All controls
SA-15 / SR-3 NIST SP 800-53 Rev 5

Repo-level scope + opt-out for sensitive code

Demonstrate that AI-assisted development tools respect repository-level scope boundaries and honor opt-out configurations that prevent exposure or processing of designated sensitive code.

Description

What this control does

This control enforces that AI coding assistants and code generation tools operate with repository-level configuration scopes, allowing explicit opt-out mechanisms for sensitive code repositories, directories, or files. Organizations define exclusion patterns (e.g., .gitignore-style rules, repository metadata tags, or policy files) that prevent AI tools from ingesting, learning from, or suggesting code in protected areas such as cryptographic modules, authentication logic, proprietary algorithms, or regulated data handlers. This reduces the risk of sensitive intellectual property or security-critical code being exposed to third-party AI services or included in training datasets.

Control objective

What auditing this proves

Demonstrate that AI-assisted development tools respect repository-level scope boundaries and honor opt-out configurations that prevent exposure or processing of designated sensitive code.

Associated risks

Risks this control addresses

  • Sensitive authentication or cryptographic code is transmitted to external AI services and potentially included in shared training datasets
  • Proprietary algorithms or trade-secret logic are leaked through code completion telemetry or model fine-tuning
  • AI-generated suggestions incorporate patterns from excluded repositories, exposing architecture or vulnerabilities of protected systems
  • Developers inadvertently share code from repositories handling regulated data (PII, PHI, PCI) with third-party AI vendors without data processing agreements
  • Lack of granular opt-out forces blanket disablement of AI tools, reducing developer productivity in non-sensitive contexts
  • Configuration drift allows previously excluded repositories to become accessible to AI tools after repository restructuring or tooling updates
  • Audit trails fail to capture which code was exposed to AI services, preventing breach impact analysis or compliance reporting

Testing procedure

How an auditor verifies this control

  1. Obtain the organization's inventory of repositories and directories classified as sensitive, including cryptographic libraries, authentication modules, proprietary algorithms, and regulated data handlers.
  2. Retrieve the configuration files, policy settings, or metadata that define AI tool exclusions (e.g., .aiignore files, IDE workspace settings, enterprise AI platform configuration exports, version control system hooks).
  3. Select a representative sample of at least 10 repositories spanning sensitive and non-sensitive classifications, ensuring coverage of different teams and technology stacks.
  4. For each sampled repository, inspect the applied AI tool configuration to verify explicit opt-out rules are present for sensitive repositories and absent or permissive for non-sensitive repositories.
  5. Simulate developer activity by opening files in excluded repositories using AI-enabled IDEs or editors, and verify that code completion, inline suggestions, and context transmission are disabled or blocked.
  6. Review telemetry logs, network traffic captures, or AI platform audit logs to confirm no code snippets from excluded repositories were transmitted to AI services during the simulation period.
  7. Interview developers and repository owners to confirm awareness of opt-out mechanisms and validate that the exclusion process is documented and consistently applied during repository creation and classification changes.
  8. Test configuration enforcement by intentionally modifying exclusion rules for a test repository and verifying that changes propagate to developer tools within the defined synchronization window.
Evidence required Configuration exports from AI coding assistant platforms showing repository-level exclusion rules; policy files or metadata tags from version control systems defining sensitive repository scope; screenshots or session recordings demonstrating disabled AI features in excluded repositories; network traffic logs or telemetry exports confirming zero data transmission from sensitive code; change control records for repository classification and opt-out rule updates; developer interview notes and training acknowledgment records.
Pass criteria All sampled sensitive repositories have documented and enforced opt-out configurations that demonstrably prevent AI tool access, telemetry logs confirm zero code transmission from excluded repositories, and developers can articulate the exclusion process and its application to their work.

Where this control is tested

Audit programs including this control