Skip to content

chore: username restriction - #41

Merged
U-Naveen merged 2 commits into
mainfrom
sec_issues
Sep 8, 2026
Merged

U-Naveen merged 2 commits into
mainfrom
sec_issues

Conversation

@U-Naveen

@U-Naveen U-Naveen commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

prevent malformed/manipulated GitHub usernames from bypassing the intended membership lookup.

prevent malformed/manipulated GitHub usernames from bypassing the intended membership lookup.
@vercel

vercel Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
init-website Ready Ready Preview Sep 8, 2026 3:10pm UTC
init-website-leaderboard-testing Ready Ready Preview Sep 8, 2026 3:10pm UTC

@U-Naveen

U-Naveen commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator Author

Security Fixes

Addressed two critical security vulnerabilities in the GitHub membership and whitelisting flow.

1. GitHub Username Validation Bypass

  • Added strict validation for GitHub usernames.
  • Restricted usernames to valid GitHub username formats and lengths.
  • Added URL encoding before using usernames in GitHub API paths.
  • Added verification that the GitHub API response matches the requested identity.
  • Only active init-club organization memberships are accepted.

2. Unauthorized Member Whitelisting

  • Added authentication checks to the github-lookup-user Edge Function.
  • Anonymous requests are now rejected.
  • Normal members can only verify their own GitHub account.
  • Only administrators can verify and whitelist another GitHub user.
  • The user's existing role is preserved.
  • New users are always created with the member role instead of accepting a role from the request.

Security Flow

Authenticated user
→ Validate GitHub username
→ Verify GitHub identity
→ Verify init-club membership
→ Authorize requested operation
→ Create/update member record

This prevents unauthenticated users and regular members from abusing the GitHub lookup flow to whitelist arbitrary accounts.

This branch was successfully deployed

2 active deployments
Preview – init-website — 586a2966 Deployed Sep 8, 2026 by vercel[bot]
Preview – init-website-leaderboard-testing — 586a2966 Deployed Sep 8, 2026 by vercel[bot]
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.

1 participant