@redsocs/spam-warden 1.0.7 → 1.1.3

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 CHANGED
@@ -26,17 +26,27 @@ You can test the spam engine interactively, analyze your forms, and generate aut
26
26
  > **Are you a Thai government agency or public sector website administrator?**
27
27
  > Get your free token configuration and drop-in script to protect your online portals from annoying gambling/loan ads and spam campaigns at [redsocs.com/spam-warden](https://redsocs.com/spam-warden).
28
28
 
29
- ### 1. Drop-in Protection (Heuristic Auto-Blocking)
29
+ ### 1. Zero-Config Local Protection (No Telemetry)
30
30
 
31
- Add this script to your page. It will automatically find your most significant forms (using an intelligent heuristic: top 2 forms with >= 2 inputs) and block submission if spam is detected.
31
+ Add this script to your page with the `data-auto-protect` attribute. It will automatically find your most significant forms (using an intelligent heuristic: top 2 forms with >= 2 inputs) and block submission if spam is detected.
32
+
33
+ By default, this mode also enables PII masking (DLP). To disable PII masking, add `data-sd="0"`.
34
+
35
+ ```html
36
+ <script src="https://cdn.redsocs.com/js/spamwarden.min.js" data-auto-protect></script>
37
+ ```
38
+
39
+ ### 2. Enterprise Telemetry (SIEM Integration)
40
+
41
+ If you need to report blocked spam payloads to a central SIEM/SOC, provide a Base64 configuration string via the `client` parameter.
32
42
 
33
43
  ```html
34
44
  <script src="https://cdn.redsocs.com/js/spamwarden.min.js?client=MHxzaWVtLnJlZHNvY3MuY29tL3Yx"></script>
35
45
  ```
36
46
 
37
- _Note: The `client` parameter is a Base64 configuration string of `sdFlag|siemEndpoint` (e.g., `0|siem.redsocs.com/v1` encoded)._
47
+ _Note: The `client` parameter is a Base64 encoded string of `sdFlag|siemEndpoint` (e.g., `0|siem.redsocs.com/v1`)._
38
48
 
39
- ### 2. API Usage (Node or Browser)
49
+ ### 3. API Usage (Node or Browser)
40
50
 
41
51
  ```javascript
42
52
  const result = spamwarden.spamcheck("[Hello, this is a Thai casino & scam ads — and guess what? Your tax pays for my traffic.]");
@@ -105,7 +115,7 @@ You can spin up a local simulation server to test the DOM auto-blocking behavior
105
115
 
106
116
  # About
107
117
 
108
- - **Version:** 1.0.7 (v2 Engine)
118
+ - **Version:** 1.1.3 (Engine v11.06)
109
119
  - **Author:** [RedSocs](https://github.com/RedSocs)
110
120
  - **License:** MIT
111
121
  - **Model Origin:** Trained via [RedSocs/spam-labeler](https://github.com/RedSocs/spam-labeler)
@@ -121,4 +131,4 @@ You can spin up a local simulation server to test the DOM auto-blocking behavior
121
131
  | **Minified Size** | ~2.0 MB (including model) |
122
132
  | **Gzipped Size** | **~341 KB** |
123
133
  | **Dependencies** | 0 (Vanilla JS) |
124
- | **Vocabulary** | 36,017 features |
134
+ | **Vocabulary** | 28106 features |