Skip to content

Security: masumrpg/react-native-components

Security

SECURITY.md

Security Policy

πŸ”’ Security Policy

We take the security of React Native Components (RNC Theme) very seriously and are committed to protecting our users. This document outlines our security policy and how to report vulnerabilities that are discovered.

πŸ›‘οΈ Supported Versions

We provide security updates for the following versions:

Version Supported
1.x.x βœ… Yes
0.9.x βœ… Yes
0.8.x ⚠️ Critical fixes only
< 0.8 ❌ No

Lifecycle Policy

  • Current Major Version: Receives all security updates
  • Previous Major Version: Receives critical security fixes for 6 months
  • Older Versions: Do not receive security updates

🚨 Reporting Vulnerabilities

Do Not Report Publicly

IMPORTANT: Do not report security vulnerabilities through public GitHub Issues. This could endanger other users.

How to Report

1. Email Security Team

πŸ“§ Email: [email protected]
πŸ” PGP Key: Download PGP Key

2. GitHub Security Advisory

Use GitHub Security Advisory to report privately.

3. Required Information

When reporting a vulnerability, please include:

**Vulnerability Type**: [e.g., XSS, Injection, etc.]
**Affected Component**: [e.g., Button, Input, etc.]
**Affected Versions**: [e.g., 1.0.0 - 1.2.0]
**Severity**: [Critical/High/Medium/Low]
**Description**: Detailed description of the vulnerability
**Steps to Reproduce**: 
1. Step 1
2. Step 2
3. Step 3

**Impact**: What can an attacker achieve?
**Proof of Concept**: Code or screenshots demonstrating the issue
**Suggested Fix**: If you have ideas for fixing
**Discoverer**: Your name/handle (for credit)

⏱️ Response Timeline

We are committed to responding to security reports with the following timeline:

Timeline Action
24 hours Confirmation of report receipt
72 hours Initial assessment and severity rating
7 days Detailed analysis and reproduction
14 days Fix development (for critical issues)
30 days Fix development (for non-critical issues)

Handling Process

  1. Receipt & Confirmation

    • Security team receives report
    • Confirmation sent to reporter
    • Internal ticket created
  2. Assessment & Triage

    • Verification and issue reproduction
    • Severity assessment (CVSS scoring)
    • Impact analysis
  3. Development & Testing

    • Fix development
    • Security testing
    • Regression testing
  4. Release & Disclosure

    • Security patch release
    • Coordinated disclosure
    • Public advisory (if needed)

🎯 Severity Levels

Critical (CVSS 9.0-10.0)

  • Remote code execution
  • Privilege escalation
  • Data breach potential
  • Response: Immediate (24-48 hours)

High (CVSS 7.0-8.9)

  • Significant data exposure
  • Authentication bypass
  • Cross-site scripting (XSS)
  • Response: 3-7 days

Medium (CVSS 4.0-6.9)

  • Information disclosure
  • Denial of service
  • CSRF vulnerabilities
  • Response: 7-14 days

Low (CVSS 0.1-3.9)

  • Minor information leaks
  • Low-impact issues
  • Response: 14-30 days

πŸ† Security Researcher Recognition

Hall of Fame

We appreciate security researchers who help keep the project secure:

Reward Program

Currently we do not have a bug bounty program, but we provide:

  • Public Recognition: Your name in the Hall of Fame
  • CVE Credit: Credit in CVE if applicable
  • Swag: RNC Theme merchandise (for critical findings)
  • Early Access: Beta access to new features

πŸ” Security Best Practices

For Library Users

1. Keep Updated

# Always use the latest version
npm update rnc-theme

# Check for security advisories
npm audit

2. Secure Configuration

// Use secure configuration
import { RNCProvider } from 'rnc-theme';

const App = () => {
  return (
    <RNCProvider
      // Avoid exposing sensitive data in theme
      theme={{
        // ❌ Don't store API keys or secrets
        // apiKey: 'secret-key',
        
        // βœ… Use environment variables
        colors: {
          primary: process.env.EXPO_PUBLIC_PRIMARY_COLOR || '#007AFF'
        }
      }}
    >
      {/* Your app */}
    </RNCProvider>
  );
};

3. Input Validation

// Always validate user input
import { Input } from 'rnc-theme';
import { z } from 'zod';

const schema = z.string().max(100).regex(/^[a-zA-Z0-9\s]+$/);

const SecureInput = () => {
  const handleChange = (value: string) => {
    try {
      const validated = schema.parse(value);
      // Process validated input
    } catch (error) {
      // Handle validation error
    }
  };

  return (
    <Input
      onChangeText={handleChange}
      // Use secure text entry for passwords
      secureTextEntry={true}
    />
  );
};

For Contributors

1. Secure Development

  • Use static analysis tools
  • Review dependencies regularly
  • Follow OWASP guidelines
  • Implement proper error handling

2. Code Review

  • Security-focused code reviews
  • Check for common vulnerabilities
  • Validate input/output handling
  • Review third-party dependencies

3. Testing

# Run security tests
npm run test:security

# Dependency audit
npm audit

# SAST scanning
npm run lint:security

πŸ› οΈ Security Tools & Processes

Automated Security

  • Dependabot: Automated dependency updates
  • CodeQL: Static analysis scanning
  • npm audit: Dependency vulnerability scanning
  • ESLint Security: Security-focused linting rules

Manual Security Reviews

  • Code review with security focus
  • Penetration testing for major releases
  • Third-party security audits (annually)

πŸ“š Security Resources

Guidelines

Tools

πŸ“ž Contact Information

Security Team

General Contact

πŸ“„ Legal

Responsible Disclosure

We follow responsible disclosure principles:

  1. Coordination: Work with reporter on disclosure timeline
  2. Transparency: Clear communication about progress
  3. Credit: Provide appropriate credit to reporter
  4. Protection: Protect users with quick patches

Safe Harbor

We will not take legal action against security researchers who:

  • Report vulnerabilities responsibly
  • Do not access unnecessary data
  • Do not damage systems or data
  • Provide reasonable time for fixes

Last Updated: [Date]
Version: 1.0
Contact: [email protected]

This document will be updated regularly to reflect the latest security practices.

There aren’t any published security advisories