- Supported Versions
- Reporting a Vulnerability
- Security Best Practices
- Environment Variables and Secrets
- Dependency Security
- Known Security Considerations
- Disclosure Policy
Only the latest version of AstroDex on the main branch is actively maintained and receives security updates.
| Version / Branch | Supported |
|---|---|
main (latest) |
✅ Yes |
| Older forks / branches | ❌ No |
If you are running a forked or older version, we strongly recommend syncing with main regularly.
We take security seriously. If you discover a vulnerability in AstroDex, please do not open a public GitHub issue. Public disclosure before a fix is available puts all users at risk.
-
Open a GitHub Security Advisory This is the preferred and most secure channel. It keeps the report private between you and the maintainers until a fix is ready.
-
Alternatively, contact the maintainer directly via GitHub: @SourabhX16
Please provide as much detail as possible so we can reproduce and address the issue quickly:
- A clear description of the vulnerability
- The component, file, or endpoint affected
- Step-by-step instructions to reproduce the issue
- Proof of concept code or screenshots (if applicable)
- The potential impact or attack scenario
- Any suggested fix or mitigation (optional but appreciated)
| Timeline | Action |
|---|---|
| Within 48 hours | Acknowledgement of your report |
| Within 7 days | Initial assessment and severity classification |
| Within 30 days | A patch or mitigation plan, depending on complexity |
| After fix is released | Public disclosure coordinated with you |
We will keep you informed at every step. If you do not receive an acknowledgement within 48 hours, please follow up via GitHub.
Follow these practices whenever you contribute code to AstroDex:
- Validate and sanitize all user input before processing or rendering
- Use environment variables for all credentials and configuration secrets
- Keep dependencies up to date and audit them regularly with
npm audit - Use TypeScript's strict mode to catch type-related vulnerabilities at compile time
- Follow the principle of least privilege — request only the permissions your code actually needs
- Use
HTTPSfor all external API requests - Prefer well-maintained, widely adopted libraries over custom implementations for cryptography or authentication
- Hard-code API keys, tokens, passwords, or any secrets in source code
- Commit
.env.localor any file containing real credentials - Disable TypeScript strict checks to work around type errors
- Use
dangerouslySetInnerHTMLwithout explicit sanitization (e.g., via DOMPurify) - Suppress ESLint security rules without a documented reason
- Log sensitive user data to the console or external logging services
- Trust client-side data on the server without re-validation
AstroDex uses environment variables to manage sensitive configuration. Mishandling these is one of the most common sources of accidental secret exposure.
| Rule | Detail |
|---|---|
| Never commit secrets | .env.local is in .gitignore — keep it that way |
Use .env.local.example |
Commit a template with placeholder values so contributors know what variables are needed |
| Prefix public variables correctly | Only variables prefixed with NEXT_PUBLIC_ are exposed to the browser. Never prefix a secret variable with NEXT_PUBLIC_ |
| Rotate compromised keys immediately | If a secret is accidentally committed, treat it as compromised and rotate it before removing it from history |
# .env.local.example — copy this file to .env.local and fill in real values
# Supabase (future integration)
NEXT_PUBLIC_SUPABASE_URL=your_supabase_project_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
# NASA API (if applicable)
NASA_API_KEY=your_nasa_api_key
⚠️ NASA_API_KEYdoes not use theNEXT_PUBLIC_prefix because it should only be accessed server-side (e.g., in API routes or Server Components). Exposing it to the browser would allow anyone to use your quota.
- Rotate the secret immediately — invalidate the exposed key before doing anything else
- Remove the secret from the codebase
- Use
git filter-repoor BFG Repo Cleaner to purge it from Git history - Force-push the cleaned history
- Notify the maintainer so the incident can be assessed
Third-party dependencies are a common attack vector. AstroDex uses the following practices to mitigate supply chain risk:
# Run a full audit of installed packages
npm audit
# Automatically fix low-risk vulnerabilities
npm audit fix
# Review high and critical vulnerabilities manually
npm audit --audit-level=highRun npm audit regularly and always before opening a pull request.
- Do not add new dependencies lightly. Every dependency is a potential attack surface. Ask yourself whether the functionality can be achieved with what is already in the project or with native APIs.
- Evaluate packages before adding them:
- Is it actively maintained?
- Does it have a large number of dependents?
- Does it have a clear security policy?
- Are the weekly download numbers reasonable?
- Pin dependency versions in critical situations rather than relying on broad semver ranges
- Do not install packages from untrusted or unknown sources
The following are known areas of the codebase that require careful handling:
- GLSL shaders are compiled and executed on the GPU. While this is sandboxed by the browser, avoid injecting untrusted user input into shader source strings.
- Texture URLs loaded via
useTextureshould always point to trusted, controlled origins to prevent unexpected asset loading.
- The NASA API key should never be exposed to the client. All requests to the NASA API must be proxied through Next.js API routes or Server Components.
- Rate-limit API routes to prevent abuse and protect your API quota.
- Use Row Level Security (RLS) on all Supabase tables. Never rely solely on client-side checks to protect data.
- The
anonkey is safe to expose in the browser only when RLS policies are correctly configured. - Validate all data on the server side in addition to any client-side validation.
- Use Supabase Auth for user identity — do not implement custom authentication unless absolutely necessary.
AstroDex follows a coordinated disclosure model:
- Reporter submits a vulnerability privately
- Maintainers acknowledge and assess the report
- A fix is developed, tested, and released
- A public security advisory is published after the fix is available
- The reporter is credited in the advisory (unless they prefer to remain anonymous)
We ask that reporters:
- Give us a reasonable amount of time to address the issue before any public disclosure
- Avoid accessing, modifying, or deleting user data during any testing
- Act in good faith toward the security and privacy of the project and its users
In return, we commit to:
- Responding promptly and transparently
- Crediting researchers who report valid vulnerabilities
- Not pursuing legal action against good-faith security researchers
| Resource | Link |
|---|---|
| GitHub Security Advisories | Create an advisory |
| npm Audit Docs | docs.npmjs.com/cli/audit |
| Next.js Security | nextjs.org/docs/app/building-your-application/authentication |
| Supabase RLS Guide | supabase.com/docs/guides/auth/row-level-security |
| OWASP Top 10 | owasp.org/www-project-top-ten |
| BFG Repo Cleaner | rtyley.github.io/bfg-repo-cleaner |
This security policy was last updated for the current state of the AstroDex main branch. It will be revised as the project grows and new integrations are added.