Skip to content

Security: Hardcoded Database Path in Drizzle Config#882

Closed
tuanaiseo wants to merge 11 commits into
XiaomiMiMo:mainfrom
tuanaiseo:contribai/fix/security/hardcoded-database-path-in-drizzle-confi
Closed

Security: Hardcoded Database Path in Drizzle Config#882
tuanaiseo wants to merge 11 commits into
XiaomiMiMo:mainfrom
tuanaiseo:contribai/fix/security/hardcoded-database-path-in-drizzle-confi

Conversation

@tuanaiseo

Copy link
Copy Markdown

Problem

The drizzle.config.ts file contains a hardcoded absolute database path '/home/thdxr/.local/share opencode/opencode.db' in the dbCredentials.url field. This exposes a developer's personal system path and will cause failures when deployed or used on other machines. The path should be configurable via environment variables.

Severity: medium
File: packages/opencode/drizzle.config.ts

Solution

Replace the hardcoded path with an environment variable fallback, e.g., url: process.env.DATABASE_URL ?? './opencode.db'

Changes

  • packages/opencode/drizzle.config.ts (modified)

Testing

  • Existing tests pass
  • Manual review completed
  • No new warnings/errors introduced

qiaozongming and others added 11 commits June 11, 2026 01:23
docs: correct OpenCode repository URL in README files
…-qrcode

docs: update community group chat QR code
…-qrcode

docs: update community WeChat QR codes
The drizzle.config.ts file contains a hardcoded absolute database path '/home/thdxr/.local/share opencode/opencode.db' in the dbCredentials.url field. This exposes a developer's personal system path and will cause failures when deployed or used on other machines. The path should be configurable via environment variables.

Affected files: drizzle.config.ts

Signed-off-by: tuanaiseo <221258316+tuanaiseo@users.noreply.github.com>
@qiaozongming

Copy link
Copy Markdown
Collaborator

#940

@qiaozongming

Copy link
Copy Markdown
Collaborator

#1117

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants