Skip to content

Security: savasp/graphmodel-python

Security

SECURITY.md

Security Policy

πŸ›‘οΈ Supported Versions

We actively support the following versions with security updates:

Version Supported
1.x.x βœ… Active support
0.x.x ❌ End of life

🚨 Reporting a Vulnerability

Please do not report security vulnerabilities through public GitHub issues.

How to Report

  1. Email: Send details to [savas@parastatidis.name]
  2. Include:
    • Description of the vulnerability
    • Steps to reproduce
    • Potential impact assessment
    • Suggested fix (if any)

What to Expect

This is not a supported product but we will do our best to provide:

  • Acknowledgment: Within a week
  • Initial Assessment: Within 2 weeks
  • Regular Updates: Every 1-2 weeks until resolved
  • Resolution Timeline: Varies by severity (see below)

πŸ”’ Security Considerations

Database Connections

  • Always use encrypted connections to Neo4j
  • Implement proper authentication and authorization
  • Use connection pooling securely
  • Validate connection strings

Query Security

  • GraphModel automatically parameterizes queries to prevent injection
  • Be cautious with dynamic query building
  • Validate user inputs before querying
  • Use strongly-typed queries when possible

Data Serialization

  • Complex properties are serialized securely
  • Be aware of deserialization vulnerabilities
  • Validate serialized data sources
  • Consider encryption for sensitive data

Configuration

  • Store connection strings securely (Azure Key Vault, etc.)
  • Use environment variables for sensitive configuration
  • Follow least-privilege principles
  • Regularly rotate credentials

πŸ”§ Best Practices for Users

Connection Security

// βœ… Good - encrypted connection
var graph = new Neo4jGraph("neo4j+s://your-server:7687",
    "username", "password");

// ❌ Avoid - unencrypted connection
var graph = new Neo4jGraph("neo4j://your-server:7687",
    "username", "password");

Input Validation

// βœ… Good - parameterized queries
var users = await graph.Nodes<User>()
    .Where(u => u.Email == email)  // Automatically parameterized
    .ToListAsync();

// βœ… Good - validate inputs
if (string.IsNullOrWhiteSpace(email) || !IsValidEmail(email))
    throw new ArgumentException("Invalid email");

Configuration Security

// βœ… Good - environment variables
var connectionString = Environment.GetEnvironmentVariable("NEO4J_CONNECTION");
var username = Environment.GetEnvironmentVariable("NEO4J_USERNAME");
var password = Environment.GetEnvironmentVariable("NEO4J_PASSWORD");

// ❌ Avoid - hardcoded credentials
var graph = new Neo4jGraph("neo4j://localhost:7687", "neo4j", "password123");

πŸš€ Security Updates

Security updates are released as:

  • Patch releases for supported versions
  • Out-of-band releases for critical vulnerabilities
  • Security advisories on GitHub

πŸ“ Security Checklist

Before deploying to production:

  • Use encrypted database connections
  • Implement proper authentication
  • Validate all user inputs
  • Store credentials securely
  • Enable logging and monitoring
  • Keep dependencies updated
  • Review custom serializers
  • Test with security scanning tools
  • Follow principle of least privilege
  • Implement rate limiting if applicable

πŸ”— Related Resources

πŸ“ž Contact

For security-related questions or concerns:


Thank you for helping keep GraphModel secure! πŸ™

There aren’t any published security advisories