Skip to content

Security: DeepDN/it-asset-manager

Security

SECURITY.md

Security Policy

Supported Versions

We actively support the following versions of IT Asset Manager with security updates:

Version Supported Status
2.x.x ✅ Yes Active Development
1.x.x ✅ Yes Security Updates Only
< 1.0 ❌ No End of Life

Security Features

Built-in Security Measures

  • 🔐 Password Hashing: Secure password storage using Werkzeug's PBKDF2
  • 🛡️ Session Management: Flask-Login secure session handling
  • 🔒 CSRF Protection: Built-in Cross-Site Request Forgery protection
  • ✅ Input Validation: Comprehensive server-side validation
  • 🚫 SQL Injection Prevention: SQLAlchemy ORM with parameterized queries
  • 🌐 XSS Protection: Output escaping and Content Security Policy
  • 🔑 Secure Headers: Security headers implementation
  • 📝 Audit Logging: User action tracking and logging

Docker Security

  • Non-root User: Containers run as non-privileged user
  • Minimal Base Image: Alpine Linux for reduced attack surface
  • Security Scanning: Automated vulnerability scanning in CI/CD
  • Secrets Management: Environment-based secret handling

Reporting a Vulnerability

🚨 Critical Security Issues

DO NOT create public GitHub issues for security vulnerabilities.

For security-related issues, please email us directly at: security@itassetmanager.com

What to Include

When reporting a security vulnerability, please provide:

  1. Vulnerability Description

    • Clear description of the security issue
    • Type of vulnerability (XSS, SQL Injection, etc.)
  2. Reproduction Steps

    • Detailed steps to reproduce the issue
    • Required conditions or configurations
    • Screenshots or proof-of-concept if applicable
  3. Impact Assessment

    • Potential impact of the vulnerability
    • Affected components or features
    • Risk level (Critical, High, Medium, Low)
  4. Environment Details

    • Application version
    • Deployment method (Docker, local, cloud)
    • Browser/client information (if applicable)
  5. Suggested Fix (Optional)

    • Proposed solution or mitigation
    • Code patches if available

Response Timeline

We are committed to addressing security issues promptly:

Severity Initial Response Fix Timeline Public Disclosure
Critical 24 hours 7 days After fix deployment
High 48 hours 14 days After fix deployment
Medium 72 hours 30 days After fix deployment
Low 1 week 60 days After fix deployment

Security Response Process

  1. Acknowledgment: We'll acknowledge receipt within the response timeline
  2. Investigation: Our security team will investigate and validate the issue
  3. Fix Development: We'll develop and test a security fix
  4. Coordinated Disclosure: We'll work with you on responsible disclosure
  5. Release: Security fix will be released and announced
  6. Recognition: Contributors will be credited (if desired)

Security Best Practices

For Administrators

Deployment Security

# 1. Use strong admin passwords
export ADMIN_PASSWORD="$(openssl rand -base64 32)"

# 2. Enable HTTPS in production
# Configure SSL certificates
cp your-cert.pem docker/nginx/ssl/cert.pem
cp your-key.pem docker/nginx/ssl/key.pem

# 3. Secure environment variables
chmod 600 .env
chown root:root .env

# 4. Regular backups with encryption
tar czf - instance/ | gpg --cipher-algo AES256 --compress-algo 1 \
  --symmetric --output backup-$(date +%Y%m%d).tar.gz.gpg

Network Security

# Firewall configuration (Ubuntu/Debian)
sudo ufw allow 22/tcp    # SSH
sudo ufw allow 80/tcp    # HTTP
sudo ufw allow 443/tcp   # HTTPS
sudo ufw --force enable

# Docker security
# Run containers with limited privileges
docker run --user 1000:1000 --read-only --tmpfs /tmp

Database Security

# Use environment variables for database credentials
SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL', 
    'sqlite:///instance/it_assets.db')

# Enable database encryption (for production)
# Use encrypted database solutions like AWS RDS with encryption

For Developers

Secure Coding Practices

# 1. Input validation
from flask_wtf import FlaskForm
from wtforms import StringField, validators

class AssetForm(FlaskForm):
    serial_number = StringField('Serial Number', [
        validators.Length(min=4, max=25),
        validators.Regexp(r'^[A-Z0-9]+$', message="Invalid format")
    ])

# 2. SQL injection prevention
# Good - Using SQLAlchemy ORM
assets = Asset.query.filter(Asset.serial_number == user_input).all()

# Bad - String concatenation
# query = f"SELECT * FROM assets WHERE serial = '{user_input}'"

# 3. XSS prevention
from markupsafe import escape
safe_output = escape(user_input)

# 4. CSRF protection
from flask_wtf.csrf import CSRFProtect
csrf = CSRFProtect(app)

Authentication & Authorization

# Secure password handling
from werkzeug.security import generate_password_hash, check_password_hash

# Hash passwords
password_hash = generate_password_hash(password, method='pbkdf2:sha256')

# Verify passwords
is_valid = check_password_hash(password_hash, password)

# Session security
app.config.update(
    SESSION_COOKIE_SECURE=True,
    SESSION_COOKIE_HTTPONLY=True,
    SESSION_COOKIE_SAMESITE='Lax',
    PERMANENT_SESSION_LIFETIME=timedelta(hours=1)
)

Security Checklist

Pre-Deployment Security Audit

  • Authentication

    • Strong password policy enforced
    • Session timeout configured
    • Secure cookie settings enabled
  • Authorization

    • Role-based access control implemented
    • Principle of least privilege applied
    • Admin functions properly protected
  • Data Protection

    • Sensitive data encrypted at rest
    • Secure data transmission (HTTPS)
    • PII handling compliance
  • Input Validation

    • All user inputs validated
    • File upload restrictions in place
    • SQL injection prevention verified
  • Error Handling

    • No sensitive information in error messages
    • Proper logging without exposing secrets
    • Graceful error handling
  • Infrastructure

    • Firewall rules configured
    • Regular security updates applied
    • Monitoring and alerting enabled

Regular Security Maintenance

Monthly Tasks

  • Review access logs for suspicious activity
  • Update dependencies with security patches
  • Rotate application secrets and keys
  • Backup and test restore procedures

Quarterly Tasks

  • Conduct security assessment
  • Review and update security policies
  • Test incident response procedures
  • Update security documentation

Annual Tasks

  • Comprehensive security audit
  • Penetration testing (if applicable)
  • Security training for team members
  • Review and update security architecture

Incident Response

Security Incident Classification

Critical: Immediate threat to data confidentiality, integrity, or availability High: Significant security risk requiring urgent attention Medium: Security concern requiring timely resolution Low: Minor security issue with minimal impact

Response Steps

  1. Immediate Response

    • Assess and contain the threat
    • Document the incident
    • Notify stakeholders
  2. Investigation

    • Analyze logs and evidence
    • Determine root cause
    • Assess impact and scope
  3. Resolution

    • Implement fixes
    • Test solutions
    • Deploy updates
  4. Recovery

    • Restore normal operations
    • Monitor for recurrence
    • Update security measures
  5. Post-Incident

    • Conduct lessons learned review
    • Update procedures
    • Improve security posture

Security Resources

Tools and References

Security Scanning Tools

# Dependency vulnerability scanning
pip install safety
safety check

# Code security analysis
pip install bandit
bandit -r .

# Docker image scanning
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock \
  -v $(pwd):/root/.cache/ aquasec/trivy image it-asset-manager:latest

Contact Information

Security Team

PGP Key

For encrypted communications, use our PGP key:

-----BEGIN PGP PUBLIC KEY BLOCK-----
[PGP Key would be included here in production]
-----END PGP PUBLIC KEY BLOCK-----

Acknowledgments

We thank the security research community and all contributors who help make IT Asset Manager more secure. Responsible disclosure helps protect all users.

Hall of Fame

Security researchers who have responsibly disclosed vulnerabilities:

  • Your name could be here!

Security is a shared responsibility. Thank you for helping keep IT Asset Manager secure! 🔒

Last updated: July 2025

There aren’t any published security advisories