Spaces:
Runtime error
Runtime error
Merge pull request #4 from dewitt4/revert-3-readme
Browse files
README.md
CHANGED
|
@@ -1,135 +1,2 @@
|
|
| 1 |
# LLMGuardian
|
| 2 |
Comprehensive LLM protection toolset aligned to addressing OWASP vulnerabilities
|
| 3 |
-
|
| 4 |
-
# Project Structure
|
| 5 |
-
|
| 6 |
-
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:
|
| 7 |
-
|
| 8 |
-
## Directory Structure
|
| 9 |
-
|
| 10 |
-
```
|
| 11 |
-
LLMGuardian/
|
| 12 |
-
├── .github/ # GitHub specific configurations
|
| 13 |
-
│ ├── workflows/ # GitHub Actions workflows
|
| 14 |
-
│ ├── CODEOWNERS # Repository ownership rules
|
| 15 |
-
│ ├── ISSUE_TEMPLATE/ # Issue reporting templates
|
| 16 |
-
│ └── PULL_REQUEST_TEMPLATE.md # PR guidelines
|
| 17 |
-
│
|
| 18 |
-
├── src/ # Source code
|
| 19 |
-
│ └── llmguardian/ # Main package directory
|
| 20 |
-
│ ├── cli/ # Command-line interface
|
| 21 |
-
│ ├── core/ # Core functionality
|
| 22 |
-
│ ├── scanners/ # Security scanning modules
|
| 23 |
-
│ ├── defenders/ # Defense mechanisms
|
| 24 |
-
│ ├── monitors/ # Monitoring components
|
| 25 |
-
│ ├── api/ # API integration
|
| 26 |
-
│ └── utils/ # Utility functions
|
| 27 |
-
│
|
| 28 |
-
├── tests/ # Test suite
|
| 29 |
-
│ ├── unit/ # Unit tests
|
| 30 |
-
│ ├── integration/ # Integration tests
|
| 31 |
-
│ └── security/ # Security-specific tests
|
| 32 |
-
│
|
| 33 |
-
├── docs/ # Documentation
|
| 34 |
-
├── scripts/ # Utility scripts
|
| 35 |
-
├── requirements/ # Dependencies
|
| 36 |
-
├── docker/ # Docker configurations
|
| 37 |
-
└── [Configuration Files] # Various config files
|
| 38 |
-
```
|
| 39 |
-
|
| 40 |
-
## Component Details
|
| 41 |
-
|
| 42 |
-
### Security Components
|
| 43 |
-
|
| 44 |
-
1. **Scanners (`src/llmguardian/scanners/`)**
|
| 45 |
-
- Prompt injection detection
|
| 46 |
-
- Data leakage scanning
|
| 47 |
-
- Model security validation
|
| 48 |
-
- Output validation checks
|
| 49 |
-
|
| 50 |
-
2. **Defenders (`src/llmguardian/defenders/`)**
|
| 51 |
-
- Input sanitization
|
| 52 |
-
- Output filtering
|
| 53 |
-
- Rate limiting
|
| 54 |
-
- Token validation
|
| 55 |
-
|
| 56 |
-
3. **Monitors (`src/llmguardian/monitors/`)**
|
| 57 |
-
- Real-time usage tracking
|
| 58 |
-
- Threat detection
|
| 59 |
-
- Anomaly monitoring
|
| 60 |
-
|
| 61 |
-
### Core Components
|
| 62 |
-
|
| 63 |
-
4. **CLI (`src/llmguardian/cli/`)**
|
| 64 |
-
- Command-line interface
|
| 65 |
-
- Interactive tools
|
| 66 |
-
- Configuration management
|
| 67 |
-
|
| 68 |
-
5. **API (`src/llmguardian/api/`)**
|
| 69 |
-
- RESTful endpoints
|
| 70 |
-
- Middleware
|
| 71 |
-
- Integration interfaces
|
| 72 |
-
|
| 73 |
-
6. **Core (`src/llmguardian/core/`)**
|
| 74 |
-
- Configuration management
|
| 75 |
-
- Logging setup
|
| 76 |
-
- Core functionality
|
| 77 |
-
|
| 78 |
-
### Testing & Quality Assurance
|
| 79 |
-
|
| 80 |
-
7. **Tests (`tests/`)**
|
| 81 |
-
- Unit tests for individual components
|
| 82 |
-
- Integration tests for system functionality
|
| 83 |
-
- Security-specific test cases
|
| 84 |
-
- Vulnerability testing
|
| 85 |
-
|
| 86 |
-
### Documentation & Support
|
| 87 |
-
|
| 88 |
-
8. **Documentation (`docs/`)**
|
| 89 |
-
- API documentation
|
| 90 |
-
- Implementation guides
|
| 91 |
-
- Security best practices
|
| 92 |
-
- Usage examples
|
| 93 |
-
|
| 94 |
-
9. **Docker (`docker/`)**
|
| 95 |
-
- Containerization support
|
| 96 |
-
- Development environment
|
| 97 |
-
- Production deployment
|
| 98 |
-
|
| 99 |
-
### Development Tools
|
| 100 |
-
|
| 101 |
-
10. **Scripts (`scripts/`)**
|
| 102 |
-
- Setup utilities
|
| 103 |
-
- Development tools
|
| 104 |
-
- Security checking scripts
|
| 105 |
-
|
| 106 |
-
## Key Files
|
| 107 |
-
|
| 108 |
-
- `pyproject.toml`: Project metadata and dependencies
|
| 109 |
-
- `setup.py`: Package setup configuration
|
| 110 |
-
- `requirements/*.txt`: Environment-specific dependencies
|
| 111 |
-
- `.pre-commit-config.yaml`: Code quality hooks
|
| 112 |
-
- `CONTRIBUTING.md`: Contribution guidelines
|
| 113 |
-
- `LICENSE`: MIT license terms
|
| 114 |
-
|
| 115 |
-
## Design Principles
|
| 116 |
-
|
| 117 |
-
The structure follows these key principles:
|
| 118 |
-
|
| 119 |
-
1. **Modularity**: Each component is self-contained and independently maintainable
|
| 120 |
-
2. **Security-First**: Security considerations are built into the architecture
|
| 121 |
-
3. **Scalability**: Easy to extend and add new security features
|
| 122 |
-
4. **Testability**: Comprehensive test coverage and security validation
|
| 123 |
-
5. **Usability**: Clear organization and documentation
|
| 124 |
-
|
| 125 |
-
## Getting Started with Development
|
| 126 |
-
|
| 127 |
-
To start working with this structure:
|
| 128 |
-
|
| 129 |
-
1. Fork the repository
|
| 130 |
-
2. Create and activate a virtual environment
|
| 131 |
-
3. Install dependencies from the appropriate requirements file
|
| 132 |
-
4. Run the test suite to ensure everything is working
|
| 133 |
-
5. Follow the contribution guidelines for making changes
|
| 134 |
-
|
| 135 |
-
For detailed setup instructions, see the Installation and Development sections below.
|
|
|
|
| 1 |
# LLMGuardian
|
| 2 |
Comprehensive LLM protection toolset aligned to addressing OWASP vulnerabilities
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|