Skip to content

Security: sah1l/devcred

Security

SECURITY.md

Security Policy

Supported Versions

Version Supported
1.x.x
< 1.0

Security Measures

DevCred takes security seriously. Here's how we protect your data:

Token Encryption

  • All OAuth tokens are encrypted at rest using AES-256-GCM
  • Encryption keys are stored separately from the database
  • Tokens are only decrypted in memory during sync operations

Data Privacy

  • We only store aggregate contribution counts (commits, PRs, issues, reviews)
  • No commit messages, code, or file contents are ever stored
  • No personal information beyond what's necessary for account management

Authentication

  • OAuth 2.0 for all platform integrations (no PATs required)
  • Session-based authentication with secure cookies
  • CSRF protection on all forms

Infrastructure

  • HTTPS enforced on all endpoints
  • Rate limiting on public API endpoints
  • Regular dependency updates and security audits

Reporting a Vulnerability

We appreciate responsible disclosure of security vulnerabilities.

How to Report

  1. DO NOT create a public GitHub issue for security vulnerabilities
  2. Email security concerns to: sahilpatel2339@gmail.com (or create a private security advisory on GitHub)
  3. Include:
    • Description of the vulnerability
    • Steps to reproduce
    • Potential impact
    • Any suggested fixes (optional)

What to Expect

  • Acknowledgment: Within 48 hours
  • Initial Assessment: Within 1 week
  • Resolution Timeline: Depends on severity
    • Critical: 24-48 hours
    • High: 1 week
    • Medium: 2 weeks
    • Low: Next release cycle

Rewards

While we don't currently have a formal bug bounty program, we will:

  • Credit you in our security acknowledgments (if desired)
  • Provide a reference letter for significant findings

Security Best Practices for Users

  1. Keep your encryption key secure - Never commit TOKEN_ENCRYPTION_KEY to version control
  2. Use strong secrets - Generate AUTH_SECRET and CRON_SECRET with sufficient entropy
  3. Review OAuth permissions - Only grant the minimum necessary scopes
  4. Monitor connected accounts - Regularly review which accounts are connected
  5. Keep dependencies updated - Run npm audit regularly

Known Security Considerations

OAuth Token Storage

OAuth tokens from connected platforms are stored encrypted in the database. While this provides strong protection at rest, be aware that:

  • Anyone with database access AND the encryption key can decrypt tokens
  • Token refresh happens automatically; ensure your refresh token rotation policies are adequate

Public Widget Endpoints

The /api/widget/[username]/* endpoints are intentionally public (for embedding). They:

  • Only expose aggregate statistics (counts)
  • Are rate-limited to prevent abuse
  • Are cached to reduce database load

Cron Endpoint

The /api/cron/daily endpoint requires a CRON_SECRET bearer token. Ensure this secret is:

  • Sufficiently long (32+ characters)
  • Rotated periodically
  • Not shared or logged

Thank you for helping keep DevCred secure!

There aren’t any published security advisories