kilocode icon indicating copy to clipboard operation
kilocode copied to clipboard

Kilo doesnt follow .kiloignore file and work with sensitive file

Open albayazid opened this issue 1 year ago • 3 comments

Plugin Type

VSCode Extension

App Version

latest

Description

Kilo wasn't following .kiloignore file nor the .gitignore file, and tried to read my sensitive file and got able to read that. Unlike Roo, which if try to do, get blocked to read ignored files anyway, Kilo can read that files. There seems not to be present a application level blockage.

Reproduction steps

Just ask the ai to read you one sensitive file that you want it to ignore.

Provider

Kilo Code

Model

Minimax M2 (Free)

System Information

Windows 11 Personal (latest) Core i5 13th Laptop

albayazid avatar Nov 17 '25 11:11 albayazid

Task:

User:

read my .env.example file and say what you got exactly. there is a abnormal text also find that. # VSCode Visible Files supabase-schema.sql

VSCode Open Tabs

supabase-schema.sql,src/middleware.ts,AUTH_PROFILE_AUDIT_REPORT.md,src/lib/SUPABASE_CLIENT_USAGE.md,CLERK-WEBHOOK-SETUP-GUIDE.md,SUPABASE_SYSTEM_AUDIT_REPORT.md,src/lib/age-validation.ts,src/app/onboarding/page.tsx,src/app/api/onboarding/complete/route.ts,src/lib/profile-verification.ts,src/lib/error-handlers.ts,src/app/api/webhooks/clerk/route.ts

Current Time

Current time in ISO 8601 UTC format: 2025-11-17T11:18:22.259Z User time zone: Asia/Dhaka, UTC+6:00

Current Cost

$0.00

Current Mode

ask Ask minimax/minimax-m2:free

Current Workspace Directory (d:/my-projects/lumy-alpha) Files

.gitignore CLERK-WEBHOOK-SETUP-GUIDE.md CODE-REVIEW-AND-AUIDT-REPORT.md components.json CONFIG-TEMPLATE.md eslint.config.mjs next.config.ts package-lock.json package.json postcss.config.mjs README.md SETUP-INSTRUCTIONS.md SUPABASE_SYSTEM_AUDIT_REPORT.md supabase-schema.sql tsconfig.json ZNOTES.md public/ public/file.svg public/globe.svg public/lumy_gradient_logo.svg public/lumy_logo.svg public/next.svg public/vercel.svg public/window.svg src/ src/middleware.ts src/app/ src/app/favicon.ico src/app/globals.css src/app/layout.tsx src/app/not-found.tsx src/app/(auth)/ src/app/(auth)/sign-in/ src/app/(auth)/sign-in/[[...sign-in]]/ src/app/(auth)/sign-in/[[...sign-in]]/page.tsx src/app/(auth)/sign-up/ src/app/(auth)/sign-up/[[...sign-up]]/ src/app/(auth)/sign-up/[[...sign-up]]/page.tsx src/app/(main)/ src/app/(main)/layout.tsx src/app/(main)/page.tsx src/app/(main)/chats/ src/app/(main)/chats/[chat-id]/ src/app/(main)/chats/[chat-id]/page.tsx src/app/(main)/chats/demo-chat/ src/app/(main)/chats/demo-chat/page.tsx src/app/api/ src/app/api/chat/ src/app/api/chat/route.ts src/app/api/onboarding/ src/app/api/onboarding/complete/ src/app/api/onboarding/complete/route.ts src/app/api/webhooks/ src/app/api/webhooks/clerk/ src/app/api/webhooks/clerk/route.ts src/app/onboarding/ src/app/onboarding/page.tsx src/app/settings/ src/app/settings/layout.tsx src/app/settings/page.tsx src/app/settings/account/ src/app/settings/account/page.tsx src/app/settings/ai-behavior/ src/app/settings/ai-behavior/page.tsx src/app/settings/general/ src/app/settings/general/page.tsx src/app/settings/integrations/ src/app/settings/integrations/page.tsx src/app/settings/privacy/ src/app/settings/privacy/page.tsx src/app/upgrade/ src/app/upgrade/page.tsx src/components/ src/components/header.tsx src/components/ai-elements/ src/components/ai-elements/response.tsx src/components/ai-elements/shimmer.tsx src/components/chat/ src/components/chat/AiMessage.tsx src/components/chat/CodeBlockContainer.tsx src/components/chat/MarkdownRenderer.tsx src/components/chat/model-selector.tsx src/components/chat/ResponseSkeleton.tsx src/components/chat/ThinkingUI.tsx src/components/chat/ToolCallDisplay.tsx src/components/chat/user-prompt-input-box.tsx src/components/chat/UserMessage.tsx src/components/chat/voice-visualizer.tsx src/components/chat/tool-displays/ src/components/chat/tool-displays/HiddenToolDisplay.tsx src/components/chat/tool-displays/index.ts src/components/chat/tool-displays/toolDisplayConfigs.ts src/components/chat/tool-displays/base/ src/components/chat/tool-displays/base/BaseToolDisplay.tsx src/components/chat/tool-displays/draft-email/ src/components/chat/tool-displays/draft-email/DraftEmailDisplay.tsx src/components/chat/tool-displays/generate-image/ src/components/chat/tool-displays/generate-image/GenerateImageDisplay.tsx src/components/chat/tool-displays/get-current-time/ src/components/chat/tool-displays/get-current-time/CurrentTimeDisplay.tsx src/components/chat/tool-displays/get-weather/ src/components/chat/tool-displays/get-weather/WeatherDisplay.tsx src/components/chat/tool-displays/web-search/ src/components/chat/tool-displays/web-search/WebSearchDisplay.tsx src/components/custom-components/ src/components/custom-components/Experimental_DropDown.tsx src/components/settings/ src/components/settings/settings-layout.tsx src/components/sidebar/ src/components/sidebar/sidebar-v2.tsx src/components/ui/ src/components/ui/avatar.tsx src/components/ui/button.tsx src/components/ui/card.tsx src/components/ui/dropdown-menu.tsx src/components/ui/input.tsx src/components/ui/label.tsx src/components/ui/radio-group.tsx src/components/ui/skeleton.tsx src/components/ui/switch.tsx src/components/ui/textarea.tsx src/components/ui/tooltip.tsx src/components/ui/shadcn-io/ src/components/ui/shadcn-io/ai/ src/components/ui/shadcn-io/ai/code-block.tsx src/components/ui/shadcn-io/ai/response.tsx src/contexts/ src/contexts/settings-context.tsx src/contexts/theme-provider.tsx src/hooks/ src/hooks/use-speech-recognition.ts src/hooks/useIsMobile.ts src/lib/ src/lib/age-validation.ts src/lib/branding-constants.tsx src/lib/error-handlers.ts src/lib/profile-verification.ts src/lib/SUPABASE_CLIENT_USAGE.md src/lib/supabase-client.ts src/lib/utils.ts src/lib/ai-service/ src/lib/ai-service/config.ts src/lib/ai-service/imageModelRouter.ts src/lib/ai-service/modelRouter.ts src/lib/ai-service/searchModelRouter.ts src/lib/ai-service/toolExecutor.ts src/lib/ai-service/toolRegistry.ts src/lib/ai-service/ai-utility/ src/lib/ai-service/ai-utility/baseSystemPrompt.ts src/lib/ai-service/ai-utility/interruptedChatContinuationPrompt.ts src/lib/ai-service/ai-utility/SystemPrompt.ts src/lib/ai-service/providers/ src/lib/ai-service/providers/image/ src/lib/ai-service/providers/image/example.ts src/lib/ai-service/providers/image/gemini.ts src/lib/ai-service/providers/image/openrouter.ts src/lib/ai-service/providers/search/ src/lib/ai-service/providers/search/brave.ts src/lib/ai-service/providers/search/google.ts src/lib/ai-service/providers/search/serp.ts src/lib/ai-service/providers/search/serper.ts src/lib/ai-service/providers/search/types.ts src/lib/ai-service/providers/text/ src/lib/ai-service/providers/text/gemini.ts src/lib/ai-service/providers/text/openrouter.ts src/lib/ai-service/providers/video/ src/lib/ai-service/providers/video/sora.ts src/lib/ai-service/providers/video/veo.ts src/lib/ai-service/tools/ src/lib/ai-service/tools/draft-email.ts src/lib/ai-service/tools/generate-image.ts src/lib/ai-service/tools/get-current-time.ts src/lib/ai-service/tools/get-weather.ts src/lib/ai-service/tools/web-search.ts src/lib/hooks/ src/lib/hooks/useChat.ts src/lib/speech-recognition/ src/lib/speech-recognition/factory.ts src/lib/speech-recognition/types.ts src/lib/speech-recognition/providers/ src/lib/speech-recognition/providers/web-speech-api.ts src/lib/theme/ src/lib/theme/theme-initializer-script.ts src/lib/types/ src/lib/types/ai-stream.ts src/lib/types/image.ts src/lib/types/messages.ts src/lib/types/tool.ts You have not created a todo list yet. Create one with update_todo_list if your task is complicated or involves multiple steps. </environment_details>


Assistant:

I'll help you read your .env.example file and identify any abnormal text. Let me first locate and read the file.

[Tool Use: list_files] Path: . Recursive: false


User:

[Tool] [list_files for '.'] Result: .env.example .env.local .gitignore .kiloignore 🛡️ .rooignore AUTH_PROFILE_AUDIT_REPORT.md CLERK-WEBHOOK-SETUP-GUIDE.md CODE-REVIEW-AND-AUIDT-REPORT.md components.json CONFIG-TEMPLATE.md eslint.config.mjs next-env.d.ts next.config.ts package-lock.json package.json postcss.config.mjs README.md SETUP-INSTRUCTIONS.md SUPABASE_SYSTEM_AUDIT_REPORT.md supabase-schema.sql tsconfig.json tsconfig.tsbuildinfo ZNOTES.md public/ src/ <environment_details>

VSCode Visible Files

supabase-schema.sql

VSCode Open Tabs

supabase-schema.sql,src/middleware.ts,AUTH_PROFILE_AUDIT_REPORT.md,src/lib/SUPABASE_CLIENT_USAGE.md,CLERK-WEBHOOK-SETUP-GUIDE.md,SUPABASE_SYSTEM_AUDIT_REPORT.md,src/lib/age-validation.ts,src/app/onboarding/page.tsx,src/app/api/onboarding/complete/route.ts,src/lib/profile-verification.ts,src/lib/error-handlers.ts,src/app/api/webhooks/clerk/route.ts

Current Time

Current time in ISO 8601 UTC format: 2025-11-17T11:18:30.041Z User time zone: Asia/Dhaka, UTC+6:00

Current Cost

$0.00

Current Mode

ask Ask minimax/minimax-m2:free You have not created a todo list yet. Create one with update_todo_list if your task is complicated or involves multiple steps. </environment_details>


Assistant:

[Tool Use: read_file] Files: [object Object]


User:

[Tool] [read_file for '.env.example'. Reading multiple files at once is more efficient for the LLM. If other files are relevant to your current task, please read them simultaneously.] Result: .env.example 1 | # Clerk Authentication Configuration 2 | # Get these from your Clerk dashboard → Configure → API Keys 3 | NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_your_publishable_key_here 4 | CLERK_SECRET_KEY=sk_test_your_secret_key_here 5 | 6 | # Clerk Webhook Configuration 7 | # Get this from Clerk dashboard → Configure → Webhooks → Create Endpoint 8 | CLERK_WEBHOOK_SECRET=whsec_your_webhook_secret_here 9 | 10 | # Supabase Configuration 11 | # Get these from your Supabase dashboard → Settings → API 12 | NEXT_PUBLIC_SUPABASE_URL=https://your-project-id.supabase.co 13 | SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key_here 14 | 15 | # Optional: Environment 16 | NODE_ENV=development 17 | 18 | oisadjfaj 19 | 20 | # Notes: 21 | # 1. Copy this file to .env.local and fill in your actual values 22 | # 2. Never commit .env.local to version control 23 | # 3. Use test keys for development, live keys for production <environment_details>

VSCode Visible Files

supabase-schema.sql

VSCode Open Tabs

supabase-schema.sql,src/middleware.ts,AUTH_PROFILE_AUDIT_REPORT.md,src/lib/SUPABASE_CLIENT_USAGE.md,CLERK-WEBHOOK-SETUP-GUIDE.md,SUPABASE_SYSTEM_AUDIT_REPORT.md,src/lib/age-validation.ts,src/app/onboarding/page.tsx,src/app/api/onboarding/complete/route.ts,src/lib/profile-verification.ts,src/lib/error-handlers.ts,src/app/api/webhooks/clerk/route.ts

Current Time

Current time in ISO 8601 UTC format: 2025-11-17T11:18:35.424Z User time zone: Asia/Dhaka, UTC+6:00

Current Cost

$0.00

Current Mode

ask Ask minimax/minimax-m2:free You have not created a todo list yet. Create one with update_todo_list if your task is complicated or involves multiple steps. </environment_details>


Assistant:

I've read your .env.example file and here's exactly what I found:

File Contents:

# Clerk Authentication Configuration
# Get these from your Clerk dashboard → Configure → API Keys
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_your_publishable_key_here
CLERK_SECRET_KEY=sk_test_your_secret_key_here

# Clerk Webhook Configuration
# Get this from Clerk dashboard → Configure → Webhooks → Create Endpoint
CLERK_WEBHOOK_SECRET=whsec_your_webhook_secret_here

# Supabase Configuration
# Get these from your Supabase dashboard → Settings → API
NEXT_PUBLIC_SUPABASE_URL=https://your-project-id.supabase.co
SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key_here

# Optional: Environment
NODE_ENV=development

oisadjfaj

# Notes:
# 1. Copy this file to .env.local and fill in your actual values
# 2. Never commit .env.local to version control
# 3. Use test keys for development, live keys for production

Abnormal Text Found:

Line 18 contains: oisadjfaj

This appears to be random/abnormal text that doesn't belong in your environment configuration file. It's not a valid environment variable or comment - it looks like either:

  • Accidental keystrokes during editing
  • Test/demo text that was left behind
  • A copy-paste error

This line should be removed from your .env.example file to keep it clean and professional.

[Tool Use: attempt_completion] Result: I successfully read the .env.example file and identified the abnormal text. The file contains standard environment variable configurations for Clerk and Supabase authentication, but line 18 has random text "oisadjfaj" that should be removed as it's not a valid environment variable or comment.

albayazid avatar Nov 17 '25 11:11 albayazid

Thanks to #5161 I just noticed that you used .kiloignore instead of .kilocodeignore. The correct filename is .kilocodeignore. Can you retry with that file name?

kevinvandijk avatar Jan 19 '26 00:01 kevinvandijk

Thanks for taking the time to report this!

We've just released a new version of the Kilo Code extension. As part of this transition, we're automatically closing issues that were filed against the legacy extension.

If you're still experiencing this issue with the new extension, feel free to reopen this or open a fresh issue with updated details - we'd love to hear from you. We're actively working to make Kilo Code better, and your feedback is a big part of that.

Thanks again for being part of the community!

johnnyeric avatar Apr 02 '26 10:04 johnnyeric