Skip to content

.rooignore Ineffective for Directory Context, Exposing Sensitive DataΒ #3543

@alexauvray

Description

@alexauvray

App Version

3.16.6

API Provider

OpenRouter

Model Used

Claude 3.7 Sonnet

πŸ” Steps to Reproduce

Description:
When a directory is provided as context, .rooignore is bypassed, and sensitive files (e.g., .env) listed in .rooignore are still processed, leading to unintended exposure of sensitive data in responses. This undermines the purpose of .rooignore and forces manual exclusion of sensitive files, creating a security risk and workflow inefficiency.

Example:
.rooignore contents:

.env
.env.dev
.env.dist
.env.production
node_modules/
.git
dist/

When providing the directory as context, the response included sensitive .env data and concluded with:
Response Image

Problem:
The .rooignore file is rendered ineffective when a directory is used as context, negating its role in protecting sensitive files. Manually curating context to exclude ignored files defeats the purpose of .rooignore and increases the risk of errors.

Expected Behavior:
Files and directories specified in .rooignore should be automatically excluded from processing when a directory is provided as context, ensuring sensitive data is not exposed.

Steps to Reproduce:

  1. Create a .rooignore file listing .env and other sensitive files/directories.
  2. Include a directory containing .env in the context.
  3. Observe that sensitive .env data is included in the response despite being listed in .rooignore.

Impact:

  • Security: Exposure of sensitive data (e.g., API keys, credentials).
  • Usability: Manual exclusion of files undermines .rooignore functionality, increasing complexity.

Suggested Fix:

  • Enforce .rooignore rules during directory context processing to exclude listed files/directories.
  • Add validation or warnings if ignored files are detected in the context.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue - Unassigned / ActionableClear and approved. Available for contributors to pick up.bugSomething isn't workingenhancementNew feature or request

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions