Skip to content

Safe-Harbor-Cybersecurity/harbormaster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Harbormaster

Harbormaster is a lightweight, API-based AI model security tool designed for deployment in Hugging Face environments. It provides comprehensive protection for AI models by addressing OWASP vulnerabilities and implementing robust security measures.

Project Overview

Harbormaster builds upon the security foundations established by LLMGuardian, adapting them for seamless integration with Hugging Face's infrastructure. The project aims to democratize AI security by making enterprise-grade protection accessible to the broader AI community.

Built from LLMGuardian

CLICK HERE FOR THE FULL PROJECT

Comprehensive Large Language Model (LLM) and Artificial Intelligence (AI) protection toolset aligned to addressing OWASP idenitfied top 10 vulnerabilities

Author: DeWitt Gibson https://www.linkedin.com/in/dewitt-gibson/

Key Features

  • Model Security Validation: Comprehensive scanning and validation of AI models
  • Threat Detection: Real-time monitoring and detection of potential security threats
  • Data Protection: Safeguards against sensitive data exposure and poisoning attempts
  • Vector Store Security: Protection for embedding operations and supply chain vulnerabilities
  • Agency Control: Management of model permissions and execution boundaries
  • Hugging Face Integration: Native support for Hugging Face's model ecosystem

Project Structure

harbormaster/
├── .github/                    # GitHub specific configurations
│   ├── workflows/             # GitHub Actions workflows
│   ├── CODEOWNERS            # Repository ownership rules
│   └── ISSUE_TEMPLATE/       # Issue reporting templates
│
├── src/                       # Source code
│   └── harbormaster/         # Main package directory
│       ├── api/              # API endpoints and integration
│       │   ├── routes/       # API route definitions
│       │   └── middleware/   # API middleware components
│       │
│       ├── core/             # Core functionality
│       │   ├── config/       # Configuration management
│       │   ├── logging/      # Logging system
│       │   └── utils/        # Utility functions
│       │
│       ├── security/         # Security components
│       │   ├── scanners/     # Security scanning modules
│       │   ├── defenders/    # Defense mechanisms
│       │   └── monitors/     # Security monitoring
│       │
│       ├── huggingface/      # Hugging Face specific integration
│       │   ├── adapters/     # Model adapters
│       │   └── endpoints/    # Hugging Face endpoints
│       │
│       ├── dashboard/        # Web interface
│       │   ├── components/   # UI components
│       │   └── pages/        # Dashboard pages
│       │
│       └── cli/              # Command-line interface
│
├── tests/                     # Test suite
│   ├── unit/                # Unit tests
│   ├── integration/         # Integration tests
│   └── security/           # Security-specific tests
│
├── docs/                     # Documentation
│   ├── api/                # API documentation
│   ├── guides/             # User guides
│   └── security/          # Security documentation
│
├── examples/                 # Example implementations
├── scripts/                 # Utility scripts
└── docker/                  # Docker configurations

Security Components

Scanners

  • Prompt injection detection
  • Data leakage prevention
  • Model validation checks
  • Output sanitization

Defenders

  • Input sanitization
  • Rate limiting
  • Access control
  • Token validation

Monitors

  • Usage tracking
  • Threat detection
  • Performance monitoring
  • Security logging

Getting Started

Prerequisites

  • Python 3.8+
  • Hugging Face account
  • Docker (optional)

Installation

pip install harbormaster

Quick Start

from harbormaster import HarborMaster

# Initialize Harbormaster
harbor = HarborMaster(api_key="your-api-key")

# Secure your model
secured_model = harbor.secure_model("your-model-id")

# Make secure predictions
result = secured_model.predict("Your input here")

Documentation

Comprehensive documentation is available at docs/. This includes:

  • API Reference
  • Security Best Practices
  • Implementation Guides
  • Example Use Cases

Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

Security

For security concerns, please review our Security Policy. Report vulnerabilities to [email protected]

License

This project is licensed under the MIT License - see the LICENSE file for details.

Citation

@misc{harbormaster,
      title={Harbormaster: Lightweight API-based AI Model Security}, 
      author={Safe-Harbor-Cybersecurity, DeWitt Gibson},
      year={2025},
      url={https://github.com/Safe-Harbor-Cybersecurity/harbormaster}
}

Acknowledgments

This project builds upon the security foundations established by LLMGuardian, adapting and extending them for the Hugging Face ecosystem.

About

Light weight API based AI Model Security tool

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published