openredaction 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +74 -0
- package/dist/HealthCheck-A5OD4ATR.mjs +12 -0
- package/dist/HealthCheck-A5OD4ATR.mjs.map +1 -0
- package/dist/chunk-7OGNW2MU.mjs +1701 -0
- package/dist/chunk-7OGNW2MU.mjs.map +1 -0
- package/dist/chunk-MYYLGNXS.mjs +149 -0
- package/dist/chunk-MYYLGNXS.mjs.map +1 -0
- package/dist/chunk-WMJKH4XE.mjs +34 -0
- package/dist/chunk-WMJKH4XE.mjs.map +1 -0
- package/dist/chunk-ZRHGDEPC.mjs +297 -0
- package/dist/chunk-ZRHGDEPC.mjs.map +1 -0
- package/dist/cli/test-pattern.js +430 -0
- package/dist/document-AOMZP7UR.mjs +26 -0
- package/dist/document-AOMZP7UR.mjs.map +1 -0
- package/dist/index.cli.js +15093 -0
- package/dist/index.d.mts +4111 -0
- package/dist/index.d.ts +4111 -0
- package/dist/index.js +18488 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +16134 -0
- package/dist/index.mjs.map +1 -0
- package/dist/workers-RMN5POM6.mjs +10 -0
- package/dist/workers-RMN5POM6.mjs.map +1 -0
- package/package.json +82 -0
package/README.md
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# OpenRedaction
|
|
2
|
+
|
|
3
|
+
Production-ready PII detection and redaction library with 571+ built-in patterns, multiple redaction modes, compliance presets, enterprise SaaS features, and zero dependencies.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install openredaction
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { OpenRedaction } from 'openredaction';
|
|
15
|
+
|
|
16
|
+
const shield = new OpenRedaction();
|
|
17
|
+
const result = shield.detect("Email john@example.com or call 07700900123");
|
|
18
|
+
|
|
19
|
+
console.log(result.redacted);
|
|
20
|
+
// "Email [EMAIL_9619] or call [PHONE_UK_MOBILE_9478]"
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Documentation
|
|
24
|
+
|
|
25
|
+
Full documentation available at [GitHub](https://github.com/sam247/openredaction)
|
|
26
|
+
|
|
27
|
+
## Features
|
|
28
|
+
|
|
29
|
+
- ๐ **Fast & Accurate** - 10-20ms for 2-3KB text
|
|
30
|
+
- ๐ฏ **571+ PII Patterns** - Comprehensive coverage across multiple categories
|
|
31
|
+
- ๐ **Enterprise SaaS Ready** - Multi-tenancy, persistent audit logging, webhooks, REST API
|
|
32
|
+
- ๐ **Production Monitoring** - Prometheus metrics, Grafana dashboards, health checks
|
|
33
|
+
- ๐ง **Semantic Detection** - Hybrid NER + regex with 40+ contextual rules
|
|
34
|
+
- ๐จ **Multiple Redaction Modes** - Placeholder, mask-middle, mask-all, format-preserving, token-replace
|
|
35
|
+
- โ
**Built-in Validators** - Luhn, IBAN, NHS, National ID checksums
|
|
36
|
+
- ๐ **Compliance Presets** - GDPR, HIPAA, CCPA, PCI-DSS
|
|
37
|
+
- ๐ญ **Deterministic Placeholders** - Consistent redaction for same values
|
|
38
|
+
- ๐ **Global Coverage** - 50+ countries
|
|
39
|
+
- ๐ **Structured Data Support** - JSON, CSV, XLSX with path/cell tracking
|
|
40
|
+
- ๐ณ **Zero Dependencies** - No external packages required (core)
|
|
41
|
+
- ๐ **TypeScript Native** - Full type safety and IntelliSense
|
|
42
|
+
- ๐งช **Battle Tested** - 276+ passing tests
|
|
43
|
+
|
|
44
|
+
## Pattern Categories
|
|
45
|
+
|
|
46
|
+
### Personal Information
|
|
47
|
+
Email, Phone Numbers (US, UK, International), Names, Social Security Numbers, Passports, Driver's Licenses
|
|
48
|
+
|
|
49
|
+
### Financial (13 patterns)
|
|
50
|
+
Credit Cards, IBANs, Bank Accounts, Swift Codes, Routing Numbers, IFSC, CLABE, BSB, ISIN, CUSIP, SEDOL, LEI, Cryptocurrencies
|
|
51
|
+
|
|
52
|
+
### Government IDs (50+ countries)
|
|
53
|
+
SSN, NINO, NHS, Passports, Tax IDs, UTR, VAT, Company Numbers, ITIN, SIN, and more
|
|
54
|
+
|
|
55
|
+
### Healthcare
|
|
56
|
+
Medical Record Numbers, NHS Numbers, CHI, EHIC, Health Insurance, Prescription Numbers, DEA Numbers, Biometric Data
|
|
57
|
+
|
|
58
|
+
### Digital Identity
|
|
59
|
+
API Keys, OAuth Tokens, JWT, Bearer Tokens, Discord, Steam, Social Media IDs
|
|
60
|
+
|
|
61
|
+
### Industries (25+)
|
|
62
|
+
Retail, Legal, Real Estate, Logistics, Insurance, Healthcare, Emergency Response, Hospitality, Professional Certifications, and more
|
|
63
|
+
|
|
64
|
+
## Enterprise Features
|
|
65
|
+
|
|
66
|
+
- **Persistent Audit Logging** - SQLite/PostgreSQL with cryptographic hashing
|
|
67
|
+
- **Multi-Tenancy** - Tenant isolation, quotas, usage tracking
|
|
68
|
+
- **Prometheus Metrics** - HTTP server with Grafana dashboards
|
|
69
|
+
- **Webhook System** - Event-driven alerts with retry logic
|
|
70
|
+
- **REST API** - Production-ready HTTP API with authentication
|
|
71
|
+
|
|
72
|
+
## License
|
|
73
|
+
|
|
74
|
+
MIT
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
HealthChecker,
|
|
3
|
+
createHealthChecker,
|
|
4
|
+
healthCheckMiddleware
|
|
5
|
+
} from "./chunk-ZRHGDEPC.mjs";
|
|
6
|
+
import "./chunk-WMJKH4XE.mjs";
|
|
7
|
+
export {
|
|
8
|
+
HealthChecker,
|
|
9
|
+
createHealthChecker,
|
|
10
|
+
healthCheckMiddleware
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=HealthCheck-A5OD4ATR.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|