AD SPACE AVAILABLE · BRAND PARTNERS WELCOME

How to Configure .codeiumignore and Repository Exclusion Rules in Codeium

365Finds Editorial
Indexed 11,430 Wiki articles

Put 365 Wiki to work with your AI

Copy the prompt below, paste it into the AI you already use, then ask your question.

Download full Skill

Try it with the prompt first. If you use 365 Wiki often, install the full 365Wiki Skill so you do not have to paste it again. No regular AI? Gemini or Microsoft Copilot on the web will work.

365Wiki Skill

Enterprise engineering teams adopting AI code completion tools face a critical security requirement: ensuring proprietary algorithms, API keys, private certificates, and regulated test fixtures are never indexed or exposed to AI context retrieval, while preserving fluid autocomplete for the rest of the codebase. Codeium addresses this through a multi-tiered exclusion architecture spanning workspace-level .codeiumignore files, workstation-level global ignores, and enterprise administrative controls.


Understanding Codeium's Indexing Architecture

To understand how exclusion rules protect sensitive code, teams must understand how Codeium ingests source code:

  1. Local Context Awareness: In developer IDEs (VS Code, JetBrains, or Windsurf / Devin Desktop), Codeium runs an indexing engine that analyzes codebases along semantic boundaries such as classes, functions, and interfaces. This engine parses repository structures into local representations to retrieve relevant code snippets during real-time typing and chat interactions.
  2. Remote Multi-Repository Indexing: In enterprise deployments, Codeium can index repositories server-side to provide cross-repository context awareness across microservices and shared libraries.
  3. Context Construction and Inference: When a developer requests a completion or asks an assistant question, Codeium gathers local cursor context, open tab context, and retrieved semantic snippets from its index. If a sensitive file is indexed, snippets from it could inadvertently be included in inference prompts.

Exclusion configurations prevent files from ever entering these indexing pipelines, eliminating the risk of accidental exposure at the root.


1. Project-Level Configuration: .codeiumignore

The primary mechanism for repository-level control is placing a .codeiumignore file in the root directory of your project workspace.

Placement and Compatibility

Production .codeiumignore Configuration Template

Below is a battle-tested template that enterprise engineering teams can adopt and tailor for their repositories:

# ==============================================================================
# Security & Secret Management
# ==============================================================================
# Environment variable files and local overrides
.env
.env.*
!.env.example

# Cryptographic keys, certificates, and credentials
*.pem
*.key
*.pkcs12
*.pfx
*.cert
*.crt
id_rsa
id_ecdsa
id_ed25519
credentials.json
service-account*.json
secrets/
config/secrets.yml

# Cloud provider and token files
.aws/
.gcp/
.azure/
*token*
*.secret

# ==============================================================================
# Proprietary Core IP & Regulated Algorithms
# ==============================================================================
# Sensitive core intellectual property (e.g., proprietary trading logic, patented math)
src/core/proprietary_engine/
src/crypto/internal_ciphers/
internal/patented_algorithms/

# Note: Whitelist public interfaces if developers need autocomplete against signatures
# !src/core/proprietary_engine/public_interfaces.ts

# ==============================================================================
# Regulated Data, PII, and Heavy Test Fixtures
# ==============================================================================
# Large test dumps, production-like mocks, and synthetic database snapshots
tests/fixtures/prod_dumps/
tests/data/sanitized_pii/
*.sqlite
*.sqlite3
*.db
*.dump
*.parquet
*.csv.gz

# ==============================================================================
# Build Artifacts, Generated Schemas, and Third-Party Blobs
# ==============================================================================
# Compiled code and third-party dependencies (saves indexing memory and CPU)
dist/
build/
out/
target/
vendor/
node_modules/
*.min.js
*.min.css
*.wasm

Key Syntax Rules and Pattern Precedence


2. Workstation-Level Configuration: Global Ignore Files

Engineering teams often require a baseline safeguard on developer machines so that even if a developer clones a repository that lacks a committed .codeiumignore, sensitive patterns remain shielded locally.

Global File Path

Place a global .codeiumignore file in the user's home configuration directory:

Behavior


3. Team and Enterprise Repository Exclusion Controls

While file-level ignore rules handle fine-grained paths, enterprise organizations must govern repository access at the infrastructure level. In enterprise environments (managed via the Codeium Admin Console or Cognition Devin Enterprise Settings), administrators enforce repository-wide indexing and access boundaries.

Enterprise Repository Allowlisting

For organizations utilizing Codeium Remote Indexing across centralized code hosting platforms (GitHub Enterprise Server, GitHub Enterprise Cloud, GitLab Self-Managed, Bitbucket Data Center, or Azure DevOps):

  1. Connector Scoping: When setting up source code management (SCM) connectors in the admin dashboard, administrators select which repositories are synchronized. Repositories not explicitly added to the allowlist are omitted from remote indexing entirely.
  2. Default-Deny Architecture: New repositories created in the SCM provider should remain excluded until administrators explicitly onboard them.
  3. Branch-Level Scoping: Remote indexing can be restricted to designated production or mainline branches (e.g., main or release/*), preventing indexing of unvetted feature branches or experimental spikes.

Identity and Role-Based Access Control (RBAC)

Enterprise context retrieval respects organizational permission boundaries:

Administrative Terminal and File Permissions

In managed enterprise deployments, administrators can enforce strict, tamper-proof client permission rules that take precedence over developer local settings:

{
  "deny": [
    "Read(~/sensitive-data/**)",
    "Read(/etc/security/**)",
    "Write(.env*)"
  ],
  "ask": [
    "Exec(git push*)"
  ],
  "allow": [
    "Read(~/workspace/standard-repo/**)"
  ]
}

These rules prevent local AI agents from accessing, reading, or modifying sensitive files on developer filesystems regardless of what prompt is submitted.


Comparison of Exclusion Layers

Enterprise defense-in-depth requires combining multiple layers of protection:

Control LayerConfiguration ScopePrimary MechanismManaged ByUser Overridable?
Workspace IgnoreSingle repository<repo-root>/.codeiumignoreRepository maintainersYes (locally)
Workstation Global IgnoreAll local repositories~/.codeium/.codeiumignoreDevelopers / IT dotfilesYes (locally)
Enterprise Admin ConsoleOrganization-wideRepository allowlist and branch filteringEnterprise adminsNo
Access Control (RBAC)Multi-repo contextSCM permissions and IdP group syncIT / Security adminsNo
Client Permission PoliciesLocal developer machinesEnterprise MDM / team permission rulesEnterprise adminsNo

Verification and Operational Troubleshooting

After creating or updating ignore configurations, teams should verify that sensitive paths are excluded:

1. Monitor Workspace File Limits and Memory Allocation

2. Verify Suggestion and Chat Boundaries

3. Check Conflicting Settings


Enterprise Defense-in-Depth Best Practices

Configuring ignore files is an essential operational boundary, but security teams should treat it as one part of a comprehensive strategy:

  1. Keep Secrets Out of Source Code: Never store plaintext credentials or private keys in the repository. Use centralized secrets managers (HashiCorp Vault, AWS Secrets Manager, Doppler, 1Password Developer Tools) and inject credentials via environment variables at runtime.
  2. Automate Pre-Commit Scanning: Deploy automated scanners (such as Gitleaks or TruffleHog) in pre-commit hooks and CI/CD pipelines to block credentials from being committed to Git.
  3. Commit .codeiumignore to Version Control: Keep .codeiumignore tracked in the repository root so all team members automatically inherit the exclusion rules upon checkout.
  4. Deploy Zero Data Retention (ZDR) and Hybrid Architectures: For organizations with stringent compliance standards, adopt Enterprise deployments that guarantee zero data retention on prompts and completions, or utilize Hybrid VPC deployments where vector indices and code stay within company-managed boundaries.

References