Skip to content

Security/config validator#255

Open
DebasmitaBose0 wants to merge 2 commits into
Akshay473:mainfrom
DebasmitaBose0:security/config-validator
Open

Security/config validator#255
DebasmitaBose0 wants to merge 2 commits into
Akshay473:mainfrom
DebasmitaBose0:security/config-validator

Conversation

@DebasmitaBose0
Copy link
Copy Markdown
Contributor

Closes #254

Summary

This PR implements a robust configuration validation scanner that executes automatically when starting the backend FastAPI server, warning developers of missing configurations while keeping sensitive data securely masked.

Changes Made

  • Created config_validator.py which maps required settings (SUPABASE_URL, ADMIN_TOKEN, etc.), validates their presence, and prints a neat terminal diagnostic summary.
  • Integrated validate_environment() into Server/main.py to run automatically upon application startup.
  • Included secure masking to ensure token/secret contents are never exposed in log outputs.

Testing

  • Ran backend startup locally under multiple states (fully configured, partially configured). Verified warnings print cleanly without crashing the local fallback modes.

Impact

Provides instant and safe debugging help for local developers setting up their server backend.

Checklist

  • Code follows project standards
  • Tested locally
  • No unrelated changes included
  • Responsive design verified
  • Accessibility considered

@vercel
Copy link
Copy Markdown

vercel Bot commented May 31, 2026

@DebasmitaBose0 is attempting to deploy a commit to the akshay473's projects Team on Vercel.

A member of the Team first needs to authorize it.

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.

security: implement FastAPI environment variable configuration diagnostics helper

1 participant