Protecting a game project starts before anyone opens an AI assistant: approve the tool, decide which information it may receive, and limit what it can read or do. Pasting code is not the only way to share it—an assistant may use open files, project structure, or terminal output as context. A private repository, .gitignore, or a security key does not by itself prevent that disclosure.
What needs protecting in a game project?
Make a studio-specific data classification before enabling an assistant or agent. The examples below are a practical starting point, not a universal list of files that every studio must block.
- Source and design: proprietary gameplay and engine code, unreleased scenes, and implementation details.
- Unreleased creative work: characters, textures, audio, animation, terrain, narrative, and other assets. This matters for tools that can generate or process assets as well as code.
- Third-party material: partner or licensed content that the studio may not be entitled to disclose to another service.
- Secrets: build and signing keys, platform credentials, tokens, and other credentials.
- Personal or sensitive records: player information and playtest records.
For each class, decide which approved tools may receive it, for what purpose, and under what account or plan. A blanket rule such as “AI is approved” is not enough: different features can use different context, model routes, and retention terms. OWASP’s Secure Coding with AI Cheat Sheet recommends treating AI access as a security consideration rather than assuming ordinary repository controls cover it.
It helps to separate permission to use a tool from permission to share a particular file. A studio might approve an assistant for generic programming questions while prohibiting unreleased source, licensed art, credentials, and player records. A developer can then ask how to implement a general pattern using synthetic names and sample data without uploading the actual scene, asset, or configuration. Where a task cannot be solved with a sanitized example, the studio can make a deliberate exception for a specific feature, account, and data class instead of treating all project material as cleared.
How can a studio reduce what an AI tool can see?
Start with the smallest possible input and verify what the selected feature actually sends. The relevant context may include more than text deliberately pasted into a prompt.
- Use a synthetic or redacted example first. Reproduce the problem without proprietary names, secrets, partner content, or unreleased assets. If that is insufficient, add only the minimum file or excerpt needed.
- Inspect automatic context. Check whether the feature can include open editor tabs, neighboring files, project structure, selected code, or terminal output. OWASP warns that AI tools can read directly from the filesystem; its guidance states that “
.gitignoreonly affects git — AI tools read from the filesystem directly.” - Use documented exclusions, then verify their scope. Do not assume a generic ignore file, a private repository, or an exclusion setting applies to every mode, extension, or connected service.
- Keep secrets outside the readable project tree. Store credentials in a vault or another managed secret store, and avoid mounting credential-bearing home directories into agent environments.
- Inspect outbound requests only through an approved process. If the studio monitors requests, redact secrets and personal data from inspection logs.
OWASP’s guidance on context and filesystem access is in its AI coding security cheat sheet. These are risk-reduction measures, not a guarantee that confidential material can never be disclosed.
Do a small, controlled test when adopting a feature or changing its settings. Use harmless test files with distinctive dummy content, then check the tool’s documented context and the studio’s approved monitoring process to understand which files or outputs it can access. Do not put real keys or personal data into a test. Repeat the check when an extension, mode, connected service, or workspace configuration changes; a previous test does not establish that a newly enabled feature behaves identically.
Also distinguish a file exclusion from an access boundary. Exclusions may be useful, but their scope depends on the particular product and mode. A stronger baseline is to avoid placing sensitive material in the workspace the tool can read in the first place, and to grant only the context necessary for the task.
How should an AI coding agent be isolated?
An autonomous agent should have less access than the developer supervising it. A prompt asking it to behave safely is not an isolation boundary; limit its identity, filesystem, credentials, and network reach.
- Use an attributable, revocable identity. Give the agent its own account or identity where supported, and use short-lived credentials scoped to the task.
- Limit the workspace. Prefer a disposable container or virtual machine without production credentials or a home-directory mount. Expose only the repository or subdirectory necessary for the task.
- Restrict network egress. Permit only the connections the task needs, rather than giving the agent unrestricted access by default.
- Require approval for irreversible actions. Review before deleting, publishing, merging, deploying, or changing production resources.
- Treat retrieved content as untrusted. Issue text, web pages, dependency files, and responses from MCP servers can contain instructions intended to redirect an agent. They are inputs to evaluate, not instructions that should override the studio’s policy.
These controls follow OWASP’s AI Agent and MCP Security guidance. A permission prompt may help with oversight, but it does not replace the technical limits on what the agent can access.
For example, a task to update a gameplay function may need a narrow checkout and permission to edit that code, but not access to signing keys, player databases, unrelated art folders, or production deployment credentials. A disposable environment helps contain mistakes and can be discarded after review. If the agent needs to fetch a dependency or consult an external service, define that need explicitly and limit network access accordingly rather than granting broad access by default.
Short-lived credentials reduce the time an exposed credential remains useful, while a separate identity makes its activity easier to attribute and revoke. Neither measure makes it safe to expose a credential to an AI tool: keep secrets out of the agent-readable workspace and grant only the access actually required.
Do private repositories or .gitignore prevent AI disclosure?
No. They address different boundaries: repository privacy controls who can access the repository, while an AI feature may process content that a user or integration makes available during an active session. .gitignore controls what Git tracks; it does not reliably prevent a filesystem-reading assistant from seeing a file.
GitHub’s documentation says that, starting April 24, 2026, interactions from Copilot Free, Pro, Pro+, and Max accounts may be used to train and improve models unless the individual opts out. It separately says Business and Enterprise customer data are not used to train models under GitHub’s Data Protection Agreement. GitHub’s March 25, 2026 announcement also distinguishes private repository content at rest from code processed during active Copilot use. An individual account’s work in a private repository therefore does not replace checking its training setting and the feature’s data terms. See GitHub’s account policy documentation.
GitHub documents content exclusion for Business and Enterprise organizations, but says it is not supported in Edit and Agent modes of Copilot Chat. Its documentation also identifies possible indirect IDE context, third-party MCP limitations, symlinks, and remote filesystems. Treat exclusion as one guardrail with exceptions, not as a comprehensive confidentiality boundary; review the current Copilot content exclusion documentation for the exact feature and organization scope.
For a studio, this means a private repository and an account policy answer different questions. Repository privacy is about access to the stored code; training terms concern a provider’s use of interactions; active tool use concerns processing needed for the assistant’s response; and content exclusion concerns which context a supported feature can access. A favorable answer to one is not a substitute for checking the others.
What should Unity teams check before using Unity AI?
Unity teams should distinguish organization access from model-improvement settings. Owners or managers can configure organization-wide access to Assistant and Generators in the Unity Dashboard.
- Open the organization’s AI settings in the Unity Dashboard and review who can access Assistant and Generators.
- Decide whether those features are approved for the studio’s classified code and assets; do not assume that access being enabled means all project material is cleared for use.
- Review Improve Unity AI models separately. Unity says Assistant and Generators are on by default, while this model-improvement setting is off by default.
- Revisit the policy when enabling a new feature, particularly an asset generator, because Unity’s settings cover sprite, texture, animation, sound, and terrain generation as well as Assistant.
Unity says the Improve Unity AI models setting governs use of prompts, interactions, and outputs to improve AI models for all users. Turning it off should not be interpreted as stopping the processing needed to answer an authorized request. See Unity’s AI settings documentation for the control descriptions and current scope.
That distinction matters to art teams as much as programmers. Unity’s settings separate Assistant from Generators, and the latter include sprite, texture, animation, sound, and terrain generation. Before using an unreleased character, texture, animation, or sound as input, check whether that feature is enabled for the organization and whether the studio has approved that class of material for that purpose. Do not read a default setting as an approval of every asset or as a promise that prompts are not processed to generate a response.
How are model training, retention, and processing different?
They are separate questions, so assess each separately for every tool and feature: whether submitted data is used to train models, how long service logs or application state are retained, and what processing is required to provide the response.
For example, OpenAI says covered business products and its API do not train on customer inputs or outputs by default. Separately, its API documentation says abuse-monitoring logs may contain customer content and are normally retained for up to 30 days, subject to stated exceptions. Eligible zero-data-retention controls require approval and have endpoint or feature limitations. Those API terms should not be generalized to every ChatGPT feature or third-party integration. See OpenAI’s business data page and its API data controls documentation.
“No training” does not mean “no processing,” and a retention period is not the same as either. A provider may process submitted content to answer a request even when it is not used to train models. Retention can also differ by product, feature, account, or exception. Record the relevant terms for the actual product and integration in use, rather than carrying a claim from one API or plan over to another.
For a studio review, record the answers in a decision sheet rather than relying on a single “private” or “no training” label:
- Which data classes are permitted?
- What context is collected automatically, and what exclusions apply?
- Are training use and opt-out terms clear for this account and plan?
- What abuse-log or application-state retention applies?
- Can third-party tools, extensions, MCP servers, or model routing receive the content?
- What filesystem, credential, and network permissions does an agent have?
- How can the studio investigate and respond to a suspected disclosure?
Compare safeguards across these dimensions instead of trying to assign each vendor one overall “safe” or “unsafe” score. One product may have administrator-managed exclusions with mode limitations; another may have a distinct retention or model-improvement control. The useful question is whether the specific settings, feature, plan, and workflow meet the studio’s requirements for the particular code or asset.
How should teams review AI-generated code and build changes?
Review the change as code authored with assistance, not as a security-validated result. OWASP calls out generated build, package, and CI changes as an elevated execution path and recommends human review, scanning, and testing.
- Inspect the complete diff, including configuration, dependencies, scripts, package manifests, and CI files—not only the code the prompt was about.
- Check whether the change adds network calls, permissions, executable steps, or access to secrets that were not needed for the task.
- Run the studio’s normal review, scanning, and test processes, and have an appropriate maintainer approve sensitive changes.
- Do not treat an assistant’s claim that tests passed, or its own generated test output, as independent evidence that a change is secure.
The relevant recommendations are in OWASP’s Secure Coding with AI Cheat Sheet.
Build, package, and CI files deserve extra scrutiny because they can introduce executable steps or affect how code and dependencies are handled. Review whether a generated change modifies build scripts, pulls in packages, changes deployment behavior, or expands permissions. Keep the review independent: generated tests can be useful, but the assistant’s own output is not evidence that the code or build pipeline is secure.
What should a studio do if confidential material may have been shared?
Contain further exposure first, then establish what was involved. A credential leak calls for immediate credential action; a source or asset disclosure requires determining what content was transmitted and following the studio’s incident process.
- Stop the relevant sharing or agent activity and identify the account, tool, feature, and approximate time involved.
- Determine which files, prompts, terminal output, or assets may have been sent. Preserve the information needed for the incident review while handling logs carefully.
- If a credential may have been exposed, revoke or rotate it promptly. GitHub advises immediate rotation after a secret-scanning alert; its secret scanning documentation explains the alert context.
- Use available repository secret scanning to look for exposed credentials and copies in the repository. A scan cannot establish that content was not transmitted to a service.
- For source code or assets, consult the applicable provider terms and the studio’s incident-response process. Do not assume that submitted content can be universally recalled or deleted after the fact.
Secret scanning is useful for finding credentials in repositories, but it cannot determine whether a prompt or file was already transmitted to a provider. Treat that as a separate incident question. For non-credential material, identify the specific content and product involved, then follow the studio’s established process and the relevant provider terms; there is no universal recall or deletion guarantee established here.
How does an account security key fit into the plan?
A physical authenticator can help secure sign-in to accounts that hold source repositories or art assets. The YubiKey 5 NFC security key is one example of a FIDO2 security key; check whether the account, connector, and sign-in method support it before purchasing or recommending one. It can strengthen account authentication, but it does not stop an authorized developer or agent from sending code or assets to an AI provider. Account security and control over AI context are different safeguards.
What is a practical approval checklist for a studio?
Before enabling a tool or broadening its permissions, make sure the studio can answer these questions and assign an owner for each decision.
- Tool and account: Which exact product, feature, account type, and organization settings are approved?
- Data: Which project classes are allowed, prohibited, or allowed only in redacted form?
- Context: What does the editor, extension, or agent automatically read, and how are exclusions tested for its actual modes?
- Provider handling: What are the training, opt-out, retention, and third-party routing terms for the selected product?
- Agent boundary: Is there a task-scoped identity, disposable workspace, limited network access, and approval for irreversible changes?
- Review and response: Who reviews generated code and build changes, and who handles suspected disclosure or secret rotation?
Reassess the answers when a tool changes features, an organization changes plan, a new integration is connected, or an agent receives broader permissions. No single setting answers all of these questions.
A short written policy is more useful when it names both the owner and the conditions for an exception. For example, specify who can approve a particular data class for a particular product, what redaction or limited context is required, and how the choice is revisited if the plan or feature changes. Keep this approval separate from a broad authorization to install an assistant: enabling a tool does not automatically authorize every team, asset, or workflow to share its content.
Frequently Asked Questions
Can I paste my game’s source code into an AI assistant?
Only if the studio has approved that specific tool, feature, account, and data class for the task. Start with a synthetic or redacted example, then provide only the minimum necessary context. Check whether the feature also reads open files, project structure, or terminal output.
Does a private GitHub repository keep Copilot from training on my code?
A private repository is not a substitute for checking Copilot’s training settings and account terms. GitHub says that, starting April 24, 2026, interactions from Free, Pro, Pro+, and Max accounts may be used to train and improve models unless the individual opts out; Business and Enterprise customer data are not used to train models under GitHub’s Data Protection Agreement.
Will Unity AI use my unreleased art to train models?
Unity says Improve Unity AI models is off by default, while Assistant and Generators are on by default. The model-improvement control covers use of prompts, interactions, and outputs to improve models for all users; it is separate from processing needed to answer an authorized request. Check the organization’s current Unity Dashboard settings and approve asset use by feature and data class.
Does .gitignore stop an agent from reading my keys?
No. .gitignore controls what Git tracks; it is not an AI-access boundary. Keep credentials outside the agent-readable workspace, use a vault or managed secret store, and restrict the agent’s filesystem and credentials.
How do I let an AI agent help without giving it the whole repo?
Use a disposable container or virtual machine and expose only the repository or subdirectory needed for the task. Give the agent a separate attributable identity with short-lived, scoped credentials, restrict network access, and require approval for irreversible changes. Avoid production credentials and home-directory mounts.
Is Copilot content exclusion a complete confidentiality boundary?
No. GitHub documents exclusions for Business and Enterprise organizations, but says they are not supported in Edit and Agent modes of Copilot Chat. The documentation also notes possible indirect IDE context, third-party MCP limitations, symlinks, and remote filesystems. Treat exclusions as one guardrail and check the current scope.
Is switching off model improvement the same as turning off data processing?
No. A service still needs to process an authorized request to produce a response, and retention is a separate matter again. Read each control’s scope rather than treating a model-improvement toggle as a universal privacy switch.
Can a studio know for certain that an AI provider deleted a prompt?
Not from a local repository scan or a training opt-out alone. Whether deletion is available depends on the provider, product, feature, and applicable terms; OpenAI’s API documentation describes retention exceptions and eligibility limits for zero-data-retention controls.
What does OpenAI’s 30-day retention statement mean for a studio?
OpenAI’s API documentation says abuse-monitoring logs may contain customer content and are normally retained for up to 30 days, subject to stated exceptions. Eligible zero-data-retention controls require approval and have endpoint or feature limitations. Do not apply these API details to every ChatGPT product or third-party integration.
Can a physical security key stop an AI assistant from sending my game code?
No. A FIDO2 security key can help protect sign-in to accounts that hold repositories or art assets, but it does not prevent an authorized user or agent from submitting content to an AI service. Check that the key is compatible with the account and sign-in method before relying on it.
Should a game studio ban every AI tool to protect unreleased assets?
Not necessarily. A studio can make a more useful decision by approving specific tools, features, accounts, and data classes, then limiting context and agent permissions. The right policy depends on the studio’s contractual obligations and the service’s actual handling terms.
The Bottom Line
Approve tools and data classes separately, minimize automatic context, keep secrets out of readable workspaces, and isolate agents with scoped access. Check the exact vendor settings and terms for each feature, then review generated code and build changes as ordinary security-sensitive work. No private-repository setting, exclusion, model-improvement toggle, or security key is a complete disclosure boundary.