CLICK HERE FOR THE FULL PROJECT
Comprehensive LLM protection toolset aligned to addressing OWASP vulnerabilities
Author: DeWitt Gibson https://www.linkedin.com/in/dewitt-gibson/
Full Documentaion and Usage Instructions: DOCS
Please see the Projects and Issues tab above for completion roadmap
LLMGuardian follows a modular and secure architecture designed to provide comprehensive protection for LLM applications. Below is the detailed project structure with explanations for each component:
LLMGuardian/
├── .github/ # GitHub specific configurations
│ ├── workflows/ # GitHub Actions workflows
│ ├── CODEOWNERS # Repository ownership rules
│ ├── ISSUE_TEMPLATE/ # Issue reporting templates
│ └── PULL_REQUEST_TEMPLATE.md # PR guidelines
├── .circleci/ # config files for using CircleCI https://circleci.com/
│
├── src/ # Source code
│ └── llmguardian/ # Main package directory
│ ├── cli/ # Command-line interface
│ ├── dashboard/ # Streamlit dashboard
│ ├── core/ # Core functionality
│ ├── scanners/ # Security scanning modules
│ ├── defenders/ # Defense mechanisms
│ ├── monitors/ # Monitoring components
│ ├── api/ # API integration
| ├── vectors/ # Embeddings protection / supply chain vulnerabilities
| ├── data/ # Sensive data exposure / data poisoning
| ├── agency/ # Excessive agency protection
│ └── utils/ # Utility functions
│
├── tests/ # Test suite
│ ├── unit/ # Unit tests
│ ├── integration/ # Integration tests
│ └── security/ # Security-specific tests
│
├── docs/ # Documentation
├── scripts/ # Utility scripts
├── page/ # Files for GitHub pages
├── requirements/ # Dependencies
├── docker/ # Docker configurations
└── config/ # Various config files
-
Scanners (
src/llmguardian/scanners/
)- Prompt injection detection
- Data leakage scanning
- Model security validation
- Output validation checks
-
Defenders (
src/llmguardian/defenders/
)- Input sanitization
- Output filtering
- Rate limiting
- Token validation
-
Monitors (
src/llmguardian/monitors/
)- Real-time usage tracking
- Threat detection
- Anomaly monitoring
-
Vectors (
src/llmguardian/vectors/
)- Embedding weaknesses
- Supply chain vulnerabilities
- Montior vector stores
-
Data (
src/llmguardian/data/
)- Sensitive information disclosure
- Protection from data poisoning
- Data sanitizing
-
Agency (
src/llmguardian/agency/
)- Permission management
- Scope limitation
- Safe execution
-
CLI (
src/llmguardian/cli/
)- Command-line interface
- Interactive tools
- Configuration management
-
API (
src/llmguardian/api/
)- RESTful endpoints
- Middleware
- Integration interfaces
-
Core (
src/llmguardian/core/
)- Configuration management
- Logging setup
- Core functionality
- Tests (
tests/
)
- Unit tests for individual components
- Integration tests for system functionality
- Security-specific test cases
- Vulnerability testing
- Documentation (
docs/
)
- API documentation
- Implementation guides
- Security best practices
- Usage examples
- Docker (
docker/
)
- Containerization support
- Development environment
- Production deployment
- Scripts (
scripts/
)- Setup utilities
- Development tools
- Security checking scripts
- Dashboard(
src/llmguardian/dashboard/
)
- Streamlit app
- Visualization
- Monitoring and control
pyproject.toml
: Project metadata and dependenciessetup.py
: Package setup configurationrequirements/*.txt
: Environment-specific dependencies.pre-commit-config.yaml
: Code quality hooksCONTRIBUTING.md
: Contribution guidelinesLICENSE
: MIT license terms
The structure follows these key principles:
- Modularity: Each component is self-contained and independently maintainable
- Security-First: Security considerations are built into the architecture
- Scalability: Easy to extend and add new security features
- Testability: Comprehensive test coverage and security validation
- Usability: Clear organization and documentation
To start working with this structure:
- Fork the repository
- Create and activate a virtual environment
- Install dependencies from the appropriate requirements file
- Run the test suite to ensure everything is working
- Follow the contribution guidelines for making changes