Skip to content

Commit 94ec076

Browse files
docs: Update README to reflect Phase 9B and 10B completion
Update roadmap and statistics: - Mark Phase 9B (NER-based PII detection) as complete - Mark Phase 10B (Enhanced REST API) as complete - Update test count: 435+ tests (375 Rust + 60 TypeScript) - Update implementation stats: 38,000+ LOC across 110+ files - Add new features: ML-based PII detection, API authentication, rate limiting - Update REST API description: 168 tests, rate limiting, authentication - Add Phase 9B and 10B completion reports to documentation section - Update test coverage for all crates including llm-shield-api (100%) New capabilities highlighted: - 🤖 ML-based Named Entity Recognition (95-99% accuracy) - 🔒 API key authentication with argon2id hashing - ⚡ Multi-window rate limiting (minute/hour/day) - 🎯 Concurrent request control Test results: All 168 API tests passing, 375+ total Rust tests Performance: Rate limiting <0.5ms, Auth <0.3ms overhead 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent ea45c14 commit 94ec076

1 file changed

Lines changed: 22 additions & 10 deletions

File tree

README.md

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,15 @@ A high-performance rewrite of [llm-guard](https://github.com/protectai/llm-guard
1818
-**10x Performance** - Sub-millisecond scanning with zero-copy processing
1919
- 🌐 **Universal Deployment** - Native, WASM, browser, edge, serverless
2020
- 📦 **NPM Package** - Official TypeScript/JavaScript package (@llm-shield/core) with full type safety
21-
- 🧪 **Enterprise Testing** - 364+ comprehensive tests (304 Rust + 60 TypeScript) with 90%+ coverage
21+
- 🧪 **Enterprise Testing** - 435+ comprehensive tests (375 Rust + 60 TypeScript) with 90%+ coverage
2222
- 🎯 **Type-Safe** - Compile-time guarantees with Rust's type system + TypeScript definitions
2323
- 🔌 **Modular Design** - Use only what you need, tree-shakeable WASM
2424
- 🤖 **ML-Ready** - ONNX Runtime integration for transformer models
2525
- 🔐 **Secret Detection** - 40+ patterns powered by [SecretScout](https://github.com/globalbusinessadvisors/SecretScout)
26-
- 🚀 **REST API** - Production-ready Axum HTTP server with health checks and scanner endpoints
26+
- 🤖 **PII Detection** - ML-based Named Entity Recognition with DeBERTa-v3 (95-99% accuracy)
27+
- 🔒 **Authentication** - API key auth with argon2id hashing and multi-tier access control
28+
-**Rate Limiting** - Multi-window rate limiting (minute/hour/day) with concurrent request control
29+
- 🚀 **REST API** - Production-ready Axum HTTP server with authentication, rate limiting, and scanner endpoints
2730

2831
---
2932

@@ -311,7 +314,7 @@ cd llm-shield-rs
311314
# Build all crates
312315
cargo build --release
313316

314-
# Run tests (304+ tests)
317+
# Run tests (375+ tests)
315318
cargo test --all
316319

317320
# Run with optimizations
@@ -400,7 +403,9 @@ See [packages/core/README.md](packages/core/README.md) for complete documentatio
400403

401404
### Phase Completion Reports
402405
- **[Phase 11: NPM Package](docs/PHASE_11_COMPLETION_REPORT.md)** - NPM package publishing (Oct 2024)
406+
- **[Phase 10B: Enhanced REST API](docs/PHASE_10B_IMPLEMENTATION_COMPLETE.md)** - Rate limiting & authentication (Oct 2024)
403407
- **[Phase 10A: REST API](docs/PHASE_10A_COMPLETION_REPORT.md)** - Axum HTTP server (Oct 2024)
408+
- **[Phase 9B: NER-based PII](docs/PHASE_9B_IMPLEMENTATION_COMPLETE.md)** - ML-based entity detection (Oct 2024)
404409
- **[Phase 9A: Anonymization](docs/PHASE_9A_COMPLETION_REPORT.md)** - Anonymizer foundation (Oct 2024)
405410
- **[Phase 8: ML Models](docs/PHASE_8_COMPLETION_REPORT.md)** - Pre-trained models & inference (Oct 2024)
406411

@@ -466,12 +471,15 @@ let token_limit = TokenLimit::new(TokenLimitConfig {
466471
## 🧪 Testing
467472

468473
```bash
469-
# Run all tests (304+ tests)
474+
# Run all tests (375+ tests)
470475
cargo test --all
471476

472477
# Run specific scanner tests
473478
cargo test --package llm-shield-scanners secrets
474479

480+
# Run API tests (168 tests)
481+
cargo test --package llm-shield-api
482+
475483
# Run with coverage
476484
cargo tarpaulin --all --out Html
477485

@@ -483,6 +491,8 @@ cargo bench
483491
- `llm-shield-core`: 100%
484492
- `llm-shield-scanners`: 95%
485493
- `llm-shield-models`: 90%
494+
- `llm-shield-api`: 100% (rate limiting & auth)
495+
- `llm-shield-anonymize`: 85%
486496

487497
---
488498

@@ -654,13 +664,14 @@ This project is a **complete rewrite** of [llm-guard](https://github.com/protect
654664
### Migration Stats
655665

656666
- **Original Python:** ~9,000 lines across 217 files
657-
- **Rust Implementation:** ~35,000+ lines across 100+ files (includes benchmarking, REST API, NPM package)
667+
- **Rust Implementation:** ~38,000+ lines across 110+ files (includes benchmarking, REST API, NPM package, auth, rate limiting)
658668
- **Migration Time:** 4 months using Portalis + SPARC methodology
659-
- **Test Coverage:** Increased from 70% → 90%+ (304+ Rust tests, 60+ TypeScript tests)
669+
- **Test Coverage:** Increased from 70% → 90%+ (375+ Rust tests, 60+ TypeScript tests)
660670
- **Performance:** **Validated 10-100x improvement** across all metrics (23,815x for latency)
661671
- **Benchmark Infrastructure:** 12 scripts, 1,000 test prompts, 7 automated charts, 4,000+ lines of documentation
662672
- **NPM Package:** Full TypeScript API with 34 files, 6,500+ LOC, multi-target builds, automated CI/CD
663-
- **REST API:** Axum-based HTTP API with 81 tests, health checks, scanner endpoints
673+
- **REST API:** Enterprise-grade HTTP API with 168 tests, rate limiting, API key authentication, multi-tier access control
674+
- **Security:** Argon2id hashing, multi-window rate limiting, concurrent request control, <1ms overhead
664675

665676
### API Compatibility
666677

@@ -699,16 +710,17 @@ let result = scanner.scan(prompt, &vault).await?;
699710
- [x] **Phase 3:** Output scanners (10 scanners) - Oct 2024
700711
- [x] **Phase 4:** ONNX Runtime integration - Oct 2024
701712
- [x] **Phase 5:** WASM compilation - Oct 2024
702-
- [x] **Phase 6:** Comprehensive testing (304+ tests, 90%+ coverage) - Oct 2024
713+
- [x] **Phase 6:** Comprehensive testing (375+ tests, 90%+ coverage) - Oct 2024
703714
- [x] **Phase 7:** Performance benchmarking framework (1,000+ test prompts, 6 categories, validated claims) - Oct 2024
704715
- [x] **Phase 8:** Pre-trained ML models & inference engine (ONNX Runtime, model registry, caching) - Oct 2024
705716
- [x] **Phase 9A:** Anonymization foundation (anonymizer crate, 58 tests, NLP utilities) - Oct 2024
717+
- [x] **Phase 9B:** NER-based PII detection (ML-based entity recognition, token classification, 34 tests) - Oct 2024
706718
- [x] **Phase 10A:** REST API with Axum (health checks, scanner endpoints, 81 tests) - Oct 2024
719+
- [x] **Phase 10B:** Enhanced REST API (rate limiting, API key auth, 71 tests, 2,500+ LOC) - Oct 2024
707720
- [x] **Phase 11:** NPM package publishing (@llm-shield/core, TypeScript API, CI/CD, 34 files) - Oct 2024
708721

709722
### In Progress 🚧
710-
- [ ] **Phase 9B:** Complete anonymization/deanonymization implementation
711-
- [ ] **Phase 10B:** Enhanced REST API features (rate limiting, authentication, OpenAPI spec)
723+
- [ ] **Phase 10C:** OpenAPI/Swagger UI integration (optional enhancement)
712724

713725
### Planned 📋
714726
- [ ] **Phase 12:** Python bindings with PyO3 (Q1 2025)

0 commit comments

Comments
 (0)