-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Description
Problem (one or two sentences)
The .rooignore file exclusion rules are not consistently enforced - some tools (like read_file) allow reading files that should be excluded, while other tools (like search_files) correctly respect the exclusions.
Context (who is affected and when)
AI agents using Roo Code with a .rooignore file configured to exclude certain files or directories. The exclusion appears to work for some tools but not others, creating an inconsistent security boundary.
Reproduction steps
- Create a
.rooignorefile with exclusion patterns (e.g.,database-redesign/*.sqlortasks.txt) - Use the
read_filetool to attempt reading an excluded file - Observe that the file content is returned despite being in
.rooignore - Use the
search_filestool to search for the same pattern - Observe that
search_filescorrectly returns no results
To provide more context of my repo, this is the .rooignore:
# ==SYNC=AI-AGENT-IGNORE-FILE==
# This file is synchronized across multiple names for different AI agents.
# All variants of this file MUST remain identical.
# Edit any variant and ensure all other variants are updated to match.
# The gitlab-ci pipeline validates that all sync marker files are identical.
# files that should be ignored by AI agents
*.ini
!config.template.ini
tasks.txt
database-redesign/*.sqlRelevant Files in Project:
.gitignore
.gitlab-ci.yml
.rooignore ← exclusion config being tested
config.ini ← excluded by .rooignore
config.template.ini
tasks.txt ← excluded by .rooignore
.roo/
database-redesign/ ← *.sql files excluded by .rooignore
Key Files for the Bug Report:
.rooignore- The exclusion config filetasks.txt- Excluded file that was readable (bug)database-redesign/00_version.sql- Excluded file that was readable (bug)
Expected result
Files listed in .rooignore should be blocked from being read by ALL tools, including read_file, search_files, and list_files.
Actual result
read_file: allows reading excluded files (BUG); search_files: correctly blocks excluded files (works as expected); list_files: shows all files regardless of .rooignore (may be intentional for workspace inventory)
Variations tried (optional)
- Tested with
database-redesign/*.sqlpattern - blocked by search_files but not by read_file - Tested with
tasks.txt- blocked by search_files but not by read_file - Tested with
*.ini- correctly blocked by both tools
App Version
v3.51.1 (7c9722b)
API Provider (optional)
OpenAI Compatible
Model Used (optional)
MiniMax M2.5 229b (self hosted)
Roo Code Task Links (optional)
No response