Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 45 additions & 49 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,49 +1,45 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
dist-electron
release
*.local

# Editor directories and files
.vscode/.debug.env
.vscode/settings.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

#lockfile
package-lock.json
pnpm-lock.yaml
yarn.lock
/test-results/
/playwright-report/
/playwright/.cache/

# Env variables
.env
.env.production
.env.development
.env.test
.env.local
.env.development.local
.env.test.local
.env.production.local

mise.toml

# Temporary files
.tmp/
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
dist-electron
release
*.local

# Editor directories and files
.vscode/.debug.env
.vscode/settings.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

#lockfile
package-lock.json
pnpm-lock.yaml
yarn.lock
/test-results/
/playwright-report/
/playwright/.cache/

# Env variables
.env.development.local
.env.test.local
.env.production.local
Comment on lines +36 to +39

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Critical security risk: Base environment files are no longer ignored.

Removing .env, .env.development, .env.test, and .env.production from .gitignore means these files—which typically contain sensitive credentials, API keys, and database URLs—can now be committed to version control. This creates a significant security vulnerability.

Standard practice is to ignore all .env* files and use .env.example or .env.template for non-sensitive defaults.

🔒 Proposed fix to restore env file protection
 # Env variables
+.env
+.env.development
+.env.test
+.env.production
 .env.development.local
 .env.test.local
 .env.production.local
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.gitignore around lines 36 - 39, The .gitignore no longer ignores base
environment files, exposing secrets; restore patterns to ignore all env files
while keeping example/template files tracked by adding entries like ".env",
".env.*", and ".env.local" (or simply ".env*") to .gitignore and explicitly
whitelist any example files (e.g., add "! .env.example" and "! .env.template" if
present) so real credential files are not committed while safe templates remain
in the repo.


mise.toml

# Temporary files
.tmp/
config.bat
52 changes: 26 additions & 26 deletions apps/web/client/src/app/_components/top-bar/user.tsx
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
'use client';

import { CurrentUserAvatar } from '@/components/ui/avatar-dropdown';
import { api } from '@/trpc/react';
import { Routes } from '@/utils/constants';
import { Button } from '@onlook/ui/button';
import Link from 'next/link';

export const AuthButton = () => {
const { data: user } = api.user.get.useQuery();
return (
<div className="flex items-center gap-3 mt-0">
{user ? (
<>
<Button variant="secondary" asChild className="rounded cursor-pointer">
<Link href={Routes.PROJECTS}>Projects</Link>
</Button>
<CurrentUserAvatar className="cursor-pointer hover:opacity-80" />
</>
) : (
<Button variant="secondary" asChild className="rounded cursor-pointer">
<Link href={Routes.LOGIN}>Sign In</Link>
</Button>
)}
</div>
);
'use client';
import { CurrentUserAvatar } from '@/components/ui/avatar-dropdown';
import { api } from '@/trpc/react';
import { Routes } from '@/utils/constants';
import { Button } from '@onlook/ui/button';
import Link from 'next/link';
export const AuthButton = () => {
const { data: user } = api.user.getOptional.useQuery();
return (
<div className="flex items-center gap-3 mt-0">
{user ? (
<>
<Button variant="secondary" asChild className="rounded cursor-pointer">
<Link href={Routes.PROJECTS}>Projects</Link>
</Button>
<CurrentUserAvatar className="cursor-pointer hover:opacity-80" />
</>
) : (
<Button variant="secondary" asChild className="rounded cursor-pointer">
<Link href={Routes.LOGIN}>Sign In</Link>
</Button>
)}
</div>
);
};
Loading