← Back to Portfolio

Heimdall Security Suite

Security & Compliance

Multi-tenant security orchestration platform combining vulnerability scanning, compliance management, credential automation, and third-party integrations.

Python FastAPI Next.js PostgreSQL Redis AWS

title: Heimdall - Enterprise Security & Compliance Suite slug: heimdall-security-suite description: Multi-tenant AI security platform with scanning, compliance, and automation status: Product published: published category: Security & Compliance technologies: - Python - FastAPI - Next.js - PostgreSQL - Redis - AWS github: https://github.com/macleodlabs/heimdall website: https://checkcode.dev date: 2025-01-15 featured: true hero: true logo: media/img_3662.png

Heimdall - Enterprise Security & Compliance Suite

Multi-tenant security orchestration platform combining vulnerability scanning, compliance management, credential automation, and third-party integrations.

Architecture Overview

graph TB
    subgraph "Frontend Layer"
        UI[Heimdall UI<br/>Next.js Dashboard]
    end
    
    subgraph "Orchestration Layer"
        ORCH[Heimdall Orchestrator<br/>Workflow Engine]
        TASK[Heimdall Task<br/>Async Jobs]
    end
    
    subgraph "Integration Layer"
        INT[Heimdall Integrations<br/>GitHub, AWS, etc.]
        CRED[Credits Server<br/>Usage Tracking]
    end
    
    subgraph "Infrastructure"
        INFRA[Heimdall Infra<br/>AWS CDK + ECS]
        DB[(PostgreSQL<br/>Multi-tenant)]
        CACHE[(Redis<br/>Job Queue)]
        SECRETS[AWS Secrets<br/>Manager]
    end
    
    UI --> ORCH
    ORCH --> TASK
    ORCH --> INT
    INT --> SECRETS
    TASK --> DB
    TASK --> CACHE
    ORCH --> CRED
    INFRA -.deploys.-> UI
    INFRA -.deploys.-> ORCH
    INFRA -.deploys.-> TASK

Core Components

1. Heimdall UI

Modern Next.js dashboard with:

Tech Stack:

{
  "framework": "Next.js 14",
  "auth": "PropelAuth",
  "styling": "Tailwind CSS",
  "components": "Shadcn/ui",
  "i18n": "next-intl"
}

2. Heimdall Orchestrator

Workflow execution engine:

Workflow Example:

from taskiq import TaskiqScheduler

@broker.task
async def security_scan_workflow(tenant_id: str, repo_url: str):
    # Clone repository with caching
    repo = await git_service.clone_cached(repo_url)
    
    # Execute scanners in parallel
    results = await asyncio.gather(
        vulnerability_scan(repo),
        code_quality_scan(repo),
        compliance_check(repo)
    )
    
    # Deduplicate and store
    await dedup_service.process(results)
    return results

3. Heimdall Task

Distributed job processing:

4. Heimdall Integrations

Generic integration framework:

Integration Interface:

from heimdall_integrations.core import BaseIntegration

class GitHubIntegration(BaseIntegration):
    category = "git"
    
    async def authenticate(self, config: Dict) -> bool:
        # OAuth flow with token management
        pass
    
    async def fetch_repos(self, org: str) -> List[Repository]:
        # Paginated API calls with caching
        pass

5. Heimdall Infra

AWS deployment automation:

CDK Stack:

from aws_cdk import Stack
from aws_cdk import aws_ecs as ecs

class HeimdallStack(Stack):
    def __init__(self, scope, id, **kwargs):
        super().__init__(scope, id, **kwargs)
        
        # Multi-tenant database with schema isolation
        self.rds = rds.DatabaseInstance(...)
        
        # ECS cluster with auto-scaling
        self.cluster = ecs.Cluster(self, "HeimdallCluster")
        
        # Fargate services for each component
        self.ui_service = ecs_patterns.ApplicationLoadBalancedFargateService(...)
        self.orchestrator_service = ecs.FargateService(...)

6. Credits Server

Usage tracking and billing:

Key Features

Multi-Tenant Architecture

┌─────────────────────────────────────┐
│ Tenant A                            │
│ ├── Schema: tenant_a                │
│ ├── S3 Prefix: tenants/a/           │
│ ├── Secrets: heimdall/tenant-a/*    │
│ └── Credits: 10,000 remaining       │
├─────────────────────────────────────┤
│ Tenant B                            │
│ ├── Schema: tenant_b                │
│ ├── S3 Prefix: tenants/b/           │
│ ├── Secrets: heimdall/tenant-b/*    │
│ └── Credits: 5,000 remaining        │
└─────────────────────────────────────┘

Security Scanning Pipeline

Trigger → Clone Repo → Parallel Scans → Deduplication → Storage
                       ├── Vulnerability
                       ├── Code Quality  
                       ├── Secrets Detection
                       └── Compliance Check

Compliance Automation

Performance Metrics

Deployment Options

Docker Compose (Development)

docker-compose up -d
# Access UI at localhost:3000

AWS (Production)

cd heimdall_infra
cdk deploy --all
# Deploys complete infrastructure

Kubernetes (Enterprise)

kubectl apply -f k8s/
# Helm charts available

Use Cases

1. Continuous Security Monitoring

Automated scans on every commit with PR integration and Slack notifications.

2. Compliance Auditing

Track regulatory compliance across multiple repositories with evidence collection.

3. White-Label Security Platform

Resell as branded security solution with per-customer customization.

4. DevSecOps Integration

Embed security checks in CI/CD pipelines with GitHub Actions integration.

Technical Highlights

Status

Production-ready multi-tenant security platform with 5+ components working in concert. Deployed on AWS with full automation and monitoring.


Part of MacLeod Labs Enterprise Security Portfolio