@verriflo/secure 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.

Potentially problematic release.


This version of @verriflo/secure might be problematic. Click here for more details.

package/LICENSE ADDED
@@ -0,0 +1,24 @@
1
+ VERRIFLO SECURE - COMMERCIAL SOFTWARE LICENSE
2
+
3
+ Copyright (c) 2026 Verriflo. All rights reserved.
4
+
5
+ This is a legally binding agreement between you (the individual or entity) and Verriflo. By installing, copying, or otherwise using this software, you agree to be bound by the terms of this license.
6
+
7
+ 1. GRANT OF LICENSE
8
+ Verriflo grants you a limited, non-exclusive, non-transferable license to use the @verriflo/secure package in your own commercial or personal projects, strictly contingent upon maintaining an active and valid Verriflo License Key.
9
+
10
+ 2. RESTRICTIONS
11
+ You may NOT under any circumstances:
12
+ a) Redistribute, share, sub-license, or resell this software, in whole or in part, in source or binary form.
13
+ b) Reverse-engineer, decompile, deobfuscate, disassemble, or attempt to derive the source code or underlying logic of the software.
14
+ c) Modify, bypass, or disable the license key verification mechanisms.
15
+ d) Create derivative works based on this software.
16
+
17
+ 3. VERIFICATION
18
+ This software requires external network communication to Verriflo servers to validate your license key. Tampering with this network request is a direct violation of this agreement and will result in immediate license termination.
19
+
20
+ 4. TERMINATION
21
+ This license is effective until terminated. Verriflo reserves the right to terminate your license immediately if you fail to comply with any term of this agreement. Upon termination, you must remove all copies of the software from your applications.
22
+
23
+ 5. DISCLAIMER OF WARRANTY
24
+ THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. IN NO EVENT SHALL VERRIFLO BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,66 @@
1
+ # @verriflo/secure
2
+
3
+ Drop-in, client-side security and DevTools restriction for web applications.
4
+
5
+ Verriflo Secure provides strict, path-based enforcement to prevent unauthorized inspection, debugging, and content scraping. It is designed to be lightweight, incredibly difficult to bypass, and completely invisible in your dependency tree.
6
+
7
+ > **Note:** This is a commercial package. A valid Verriflo Organization ID is required for initialization.
8
+
9
+ ## Features
10
+
11
+ - 🛡️ **DevTools Blocking**: Detects and aggressively blocks browser developer tools across all major browsers.
12
+ - 📍 **Granular Routing**: Enable protection only where you need it (e.g., `['/dashboard/*', '/checkout']`).
13
+ - 📋 **Scraping Prevention**: Disable copy, cut, paste, and text selection on sensitive routes.
14
+ - ⚡ **Zero Overhead**: The initialization and license check are optimized to prevent blocking your main thread.
15
+ - 🔒 **Tamper Resistant**: Self-defending logic prevents users from pausing execution or stepping through the security code.
16
+
17
+ ## Installation
18
+
19
+ ```bash
20
+ pnpm add @verriflo/secure
21
+ ```
22
+
23
+ ## Quick Start
24
+
25
+ Initialize Verriflo Secure as early as possible in your application lifecycle (e.g., in `main.ts`, `index.js`, or `_app.tsx`):
26
+
27
+ ```typescript
28
+ import VerrifloSecure from "@verriflo/secure";
29
+
30
+ VerrifloSecure.init({
31
+ licenseKey: "your-organization-id", // Required
32
+ disablePaths: ["*"], // Block DevTools globally
33
+ disableCopyPaths: ["/premium-content/*"], // Block copying on specific routes
34
+ onDevToolOpen: (type, next) => {
35
+ // Optional: Log attempts to your own backend
36
+ console.warn(`Security alert: DevTools opened via ${type}`);
37
+
38
+ // Call next() to proceed with the default blocking behavior
39
+ next();
40
+ },
41
+ });
42
+ ```
43
+
44
+ ## Configuration API
45
+
46
+ | Option | Type | Default | Description |
47
+ | :------------------- | :--------- | :-------------- | :---------------------------------------------------------- |
48
+ | `licenseKey` | `string` | `undefined` | **Required.** Your active Verriflo Organization ID. |
49
+ | `disablePaths` | `string[]` | `[]` | Array of route patterns where DevTools are blocked. |
50
+ | `disableCopyPaths` | `string[]` | `[]` | Array of route patterns where copying text is blocked. |
51
+ | `disableCutPaths` | `string[]` | `[]` | Array of route patterns where cutting text is blocked. |
52
+ | `disablePastePaths` | `string[]` | `[]` | Array of route patterns where pasting is blocked. |
53
+ | `disableSelectPaths` | `string[]` | `[]` | Array of route patterns where text highlighting is blocked. |
54
+ | `onDevToolOpen` | `function` | `undefined` | Callback fired when an inspection attempt is caught. |
55
+ | `blockedUrl` | `string` | `'about:blank'` | Where to redirect the user if they force-open DevTools. |
56
+
57
+ ## Network Behavior & Edge Cases
58
+
59
+ Because `@verriflo/secure` verifies your license key at runtime, it makes a single, lightweight, asynchronous request on initialization.
60
+
61
+ - If the license is valid, the security policies are silently enforced.
62
+ - If the license key is invalid, expired, or the network request is intentionally blocked by the client, the security module will fail closed and log a standard error to the console.
63
+
64
+ ## License
65
+
66
+ Commercial Proprietary License. See `LICENSE` for exact terms. Unauthorized copying, decompilation, or redistribution is strictly prohibited.