jso-protector 0.4.1 → 0.4.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/CHANGELOG.md +27 -0
- package/LICENSE +2 -2
- package/README.md +7 -3
- package/ai.js +1 -1
- package/bin/jso-protector.js +27 -29
- package/ci/verify-examples.js +4 -1
- package/ci/verify-package.js +37 -10
- package/examples/README.md +4 -2
- package/examples/cli-basic/jso.config.cjs +1 -1
- package/examples/curl/README.md +2 -2
- package/examples/curl/protect.sh +2 -2
- package/examples/helm/Chart.yaml +3 -3
- package/examples/pre-commit/.pre-commit-config.yaml +1 -1
- package/examples/pre-commit/README.md +1 -1
- package/index.d.ts +1 -1
- package/package.json +22 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.3 - 2026-08-30
|
|
4
|
+
|
|
5
|
+
Error messages only. No behaviour changes.
|
|
6
|
+
|
|
7
|
+
- **The "Missing API key" error now says where to get one.** It previously named
|
|
8
|
+
three places to *put* a key and no place to *obtain* one, which left a first-time
|
|
9
|
+
user with a dead end: measured against `javascript-obfuscator`, their first
|
|
10
|
+
command emits working protected output while ours printed this error. The
|
|
11
|
+
message now links the dashboard page that issues a free key, and the npm setup
|
|
12
|
+
guide. Same for "Missing API password", which is shown beside the key.
|
|
13
|
+
- Applied at all six sites - the protect path, `--doctor`, and config validation -
|
|
14
|
+
so the guidance is the same wherever you hit it.
|
|
15
|
+
- Also published under the package's new name, `javascriptobfuscator-com`.
|
|
16
|
+
|
|
17
|
+
## 0.4.2 - 2026-08-27
|
|
18
|
+
|
|
19
|
+
Metadata only. No behaviour changes.
|
|
20
|
+
|
|
21
|
+
- **The package has a public source repository**:
|
|
22
|
+
[richtexteditor/jso-protector](https://github.com/richtexteditor/jso-protector).
|
|
23
|
+
npm now shows Repository and Issues links instead of nothing, which for a
|
|
24
|
+
security tool is the difference between auditable and "trust us". The
|
|
25
|
+
repository holds this package and nothing else - the protection engine runs
|
|
26
|
+
on the hosted API, or on your machine through the bundled `jso-local`
|
|
27
|
+
executable, and is not part of it.
|
|
28
|
+
- `bugs` points at GitHub issues and support@javascriptobfuscator.com.
|
|
29
|
+
|
|
3
30
|
## 0.4.1 - 2026-08-27
|
|
4
31
|
|
|
5
32
|
Documentation only. No behaviour changes: the CLI, the Node API, the plugins,
|
package/LICENSE
CHANGED
|
@@ -54,7 +54,7 @@ open-source licence.
|
|
|
54
54
|
Some functionality transmits source code to the JavaScript Obfuscator hosted
|
|
55
55
|
API and requires a valid, current subscription. Your use of those features is
|
|
56
56
|
additionally governed by the service terms published at
|
|
57
|
-
https://
|
|
57
|
+
https://javascriptobfuscator.com/. Nothing in this licence grants access
|
|
58
58
|
to the hosted service.
|
|
59
59
|
|
|
60
60
|
5. NO WARRANTY
|
|
@@ -87,4 +87,4 @@ open-source licence.
|
|
|
87
87
|
This licence is governed by the laws of the jurisdiction in which the
|
|
88
88
|
copyright holder is established, without regard to conflict-of-law rules.
|
|
89
89
|
|
|
90
|
-
Questions about licensing: https://
|
|
90
|
+
Questions about licensing: https://javascriptobfuscator.com/
|
package/README.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# jso-protector
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/jso-protector)
|
|
4
|
+
[](https://github.com/richtexteditor/jso-protector/actions/workflows/test.yml)
|
|
5
|
+
[](https://www.npmjs.com/package/jso-protector)
|
|
6
|
+
|
|
3
7
|
Obfuscate and protect JavaScript as part of your build: a dependency-free CLI,
|
|
4
8
|
Node API, and plugins for webpack, Vite, Rollup, esbuild, Next.js, Metro, and
|
|
5
9
|
the rest of the toolchain.
|
|
@@ -114,8 +118,8 @@ Two CLI flags help wire `jso-protector` into a CI pipeline that has to debug pro
|
|
|
114
118
|
Upload `dist-protected/jso-report.json` as a build artifact alongside the protected JS so the demangling map is available wherever crash triage happens. For VM beta reviews, `--verify-vm-proof` checks that the source-free report shows `UseVMProtection`, `VMProtectionApplied`, a non-zero virtualized function count, and no unresolved VM warnings. `--vm-proof-pack` turns the same report into a Markdown or JSON reviewer packet with build identity, release label, polymorphism fingerprint, VM pass/fail checklist, review decision, warnings, hot-path/cold-path guidance, recommendations, and a VM Proof Review Assistant for BYO AI or internal reviewers.
|
|
115
119
|
For AI-resistance reviews, `--ai-resistance-evidence` turns the same source-free report into a current evidence checklist: build identity, strong protection options, optional VM proof, runtime-defense evidence, compatibility evidence, a non-scoring attacker-model review matrix, review decision, claim boundaries, a Review Assistant Packet for BYO AI or internal reviewers, and a clear `scoreStatus` that says the Resistance Score is still planned. Add `--ai-resistance-evidence-output reports/ai-resistance-evidence.md` for a reviewer artifact, `--json` for machine-readable evidence, and `--require-vm-proof` when VM-backed evidence must be a hard CI gate.
|
|
116
120
|
|
|
117
|
-
The
|
|
118
|
-
wraps the saved-report workflow too: `report-path`, `vm-proof-pack-report`,
|
|
121
|
+
The GitHub Action that ships in this repository (`ci/github-actions.yml`, and
|
|
122
|
+
the `jso-github-action` package) wraps the saved-report workflow too: `report-path`, `vm-proof-pack-report`,
|
|
119
123
|
and `ai-resistance-evidence-report` outputs let CI upload source-free reviewer
|
|
120
124
|
artifacts beside the protected build, while `build-id` and
|
|
121
125
|
`polymorphism-fingerprint` remain available for runtime crash correlation.
|
|
@@ -1177,7 +1181,7 @@ jso ai compat-scan --config jso.config.json --fail-on error
|
|
|
1177
1181
|
jso ai compat-scan --config jso.config.json --max-files 50 # cap quota burn on huge repos
|
|
1178
1182
|
```
|
|
1179
1183
|
|
|
1180
|
-
Both paths hit the same `/v1/ai/compat-check` endpoint. `--ai-precheck` just folds it into the obfuscation flow so CI doesn't need a second step. Requires a JSO API key with AI access 鈥?FreeTrial works for testing the wire format; Basic and up for production usage. See the [JSO AI quick start](https://javascriptobfuscator.com/
|
|
1184
|
+
Both paths hit the same `/v1/ai/compat-check` endpoint. `--ai-precheck` just folds it into the obfuscation flow so CI doesn't need a second step. Requires a JSO API key with AI access 鈥?FreeTrial works for testing the wire format; Basic and up for production usage. See the [JSO AI quick start](https://javascriptobfuscator.com/docs/aiquickstart.aspx) for tier details.
|
|
1181
1185
|
|
|
1182
1186
|
### AI usage and BYO key health
|
|
1183
1187
|
|
package/ai.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
// JSO AI client. Wraps the four /v1/ai/* endpoints documented at
|
|
4
|
-
// https://javascriptobfuscator.com/
|
|
4
|
+
// https://javascriptobfuscator.com/docs/aiapi.aspx
|
|
5
5
|
//
|
|
6
6
|
// Same auth model as the protect API: { apiKey, apiPassword } (base64
|
|
7
7
|
// values from the dashboard). Reads JSO_API_KEY / JSO_API_PASSWORD from
|
package/bin/jso-protector.js
CHANGED
|
@@ -2656,7 +2656,7 @@ function initConfig(args = {}) {
|
|
|
2656
2656
|
}), null, 2)}\n`, "utf8");
|
|
2657
2657
|
process.stdout.write(`Created ${target}\n`);
|
|
2658
2658
|
process.stdout.write(`Template: ${templateName}\n`);
|
|
2659
|
-
process.stdout.write("
|
|
2659
|
+
process.stdout.write("Install: npm install --save-dev jso-protector\n");
|
|
2660
2660
|
process.stdout.write("Next: jso-protector --config jso.config.json --release-check --json\n");
|
|
2661
2661
|
}
|
|
2662
2662
|
|
|
@@ -4667,8 +4667,8 @@ function normalizeName(name) {
|
|
|
4667
4667
|
}
|
|
4668
4668
|
|
|
4669
4669
|
function assertReady(config) {
|
|
4670
|
-
if (!config.apiKey) throw new Error("Missing API key.
|
|
4671
|
-
if (!config.apiPassword) throw new Error("Missing API password.
|
|
4670
|
+
if (!config.apiKey) throw new Error("Missing API key. Create one free at https://javascriptobfuscator.com/dashboard/APIKeys.aspx, then set JSO_API_KEY (or apiKey in config). Setup guide: https://javascriptobfuscator.com/docs/npmcli.aspx");
|
|
4671
|
+
if (!config.apiPassword) throw new Error("Missing API password. It is shown next to the key at https://javascriptobfuscator.com/dashboard/APIKeys.aspx, then set JSO_API_PASSWORD (or apiPassword in config).");
|
|
4672
4672
|
}
|
|
4673
4673
|
|
|
4674
4674
|
function sha256(value) {
|
|
@@ -4849,8 +4849,8 @@ async function runDoctor(config, args = {}) {
|
|
|
4849
4849
|
const checks = [];
|
|
4850
4850
|
const limitations = collectCompetitorLimitations(args.rawConfig && typeof args.rawConfig === "object" ? args.rawConfig : config, args);
|
|
4851
4851
|
addDoctorCheck(checks, "endpoint", isValidUrl(config.endpoint), `Endpoint: ${config.endpoint}`, "Endpoint must be a valid URL.");
|
|
4852
|
-
addDoctorCheck(checks, "apiKey", !!config.apiKey, "API key is present.", "Missing API key.
|
|
4853
|
-
addDoctorCheck(checks, "apiPassword", !!config.apiPassword, "API password is present.", "Missing API password.
|
|
4852
|
+
addDoctorCheck(checks, "apiKey", !!config.apiKey, "API key is present.", "Missing API key. Create one free at https://javascriptobfuscator.com/dashboard/APIKeys.aspx, then set JSO_API_KEY (or apiKey in config). Setup guide: https://javascriptobfuscator.com/docs/npmcli.aspx");
|
|
4853
|
+
addDoctorCheck(checks, "apiPassword", !!config.apiPassword, "API password is present.", "Missing API password. It is shown next to the key at https://javascriptobfuscator.com/dashboard/APIKeys.aspx, then set JSO_API_PASSWORD (or apiPassword in config).");
|
|
4854
4854
|
addDoctorCheck(checks, "preset", true, `Preset: ${config.preset}`);
|
|
4855
4855
|
addDoctorCheck(checks, "options", Object.keys(config.options || {}).length > 0, `${Object.keys(config.options || {}).length} option(s) enabled.`, "No protection options are enabled.");
|
|
4856
4856
|
|
|
@@ -7119,8 +7119,8 @@ function validateProtectionConfig(config, args = {}) {
|
|
|
7119
7119
|
}
|
|
7120
7120
|
|
|
7121
7121
|
addValidationCheck(checks, "endpoint", isValidUrl(resolved.endpoint) ? "ok" : "error", isValidUrl(resolved.endpoint) ? `Endpoint: ${resolved.endpoint}` : "Endpoint must be a valid HTTP or HTTPS URL.");
|
|
7122
|
-
addValidationCheck(checks, "apiKey", resolved.apiKey ? "ok" : "error", resolved.apiKey ? "API key is present." : "Missing API key.
|
|
7123
|
-
addValidationCheck(checks, "apiPassword", resolved.apiPassword ? "ok" : "error", resolved.apiPassword ? "API password is present." : "Missing API password.
|
|
7122
|
+
addValidationCheck(checks, "apiKey", resolved.apiKey ? "ok" : "error", resolved.apiKey ? "API key is present." : "Missing API key. Create one free at https://javascriptobfuscator.com/dashboard/APIKeys.aspx, then set JSO_API_KEY (or apiKey in config). Setup guide: https://javascriptobfuscator.com/docs/npmcli.aspx");
|
|
7123
|
+
addValidationCheck(checks, "apiPassword", resolved.apiPassword ? "ok" : "error", resolved.apiPassword ? "API password is present." : "Missing API password. It is shown next to the key at https://javascriptobfuscator.com/dashboard/APIKeys.aspx, then set JSO_API_PASSWORD (or apiPassword in config).");
|
|
7124
7124
|
addCredentialStorageValidation(checks, config, args);
|
|
7125
7125
|
addValidationCheck(checks, "preset", "ok", `Preset: ${resolved.preset}`);
|
|
7126
7126
|
addValidationCheck(checks, "paths", resolved.input && resolved.output ? "ok" : "error", resolved.input && resolved.output ? "Input and output paths are configured." : "Input and output paths must be configured.");
|
|
@@ -7647,26 +7647,20 @@ function writeVersion(json) {
|
|
|
7647
7647
|
|
|
7648
7648
|
function writeLocalOnlyGuidance(json) {
|
|
7649
7649
|
const guidance = {
|
|
7650
|
-
ok:
|
|
7651
|
-
|
|
7652
|
-
|
|
7653
|
-
|
|
7654
|
-
|
|
7655
|
-
|
|
7656
|
-
|
|
7657
|
-
|
|
7658
|
-
"npm install --save-dev
|
|
7650
|
+
ok: true,
|
|
7651
|
+
sourceLeavesMachineByDefault: true,
|
|
7652
|
+
sourceCanStayLocal: true,
|
|
7653
|
+
localProtectionFlag: "--local",
|
|
7654
|
+
npmPublished: true,
|
|
7655
|
+
packageDistribution: "npm",
|
|
7656
|
+
message: "Protection runs through the hosted service by default: the files you select are sent to it. If your source must stay on your machine, run this CLI with --local, which uses the bundled jso-local executable and keeps source on-device; it still makes an online entitlement check, and VM bytecode protection remains a hosted step. Everything listed under offlinePreflightCommands runs entirely offline and sends nothing.",
|
|
7657
|
+
installCommands: [
|
|
7658
|
+
"npm install --save-dev jso-protector"
|
|
7659
7659
|
],
|
|
7660
|
-
|
|
7661
|
-
|
|
7662
|
-
"jso-protector": "file:../packages/jso-protector"
|
|
7663
|
-
}
|
|
7664
|
-
},
|
|
7665
|
-
internalTarballCommands: [
|
|
7666
|
-
"npm pack --json",
|
|
7667
|
-
"npm install --save-dev path/to/jso-protector-0.2.0.tgz"
|
|
7660
|
+
localProtectionCommands: [
|
|
7661
|
+
"jso-protector --local --input dist --output dist-protected"
|
|
7668
7662
|
],
|
|
7669
|
-
|
|
7663
|
+
offlinePreflightCommands: [
|
|
7670
7664
|
"jso-protector --config jso.config.json --release-check --json",
|
|
7671
7665
|
"jso-protector --config jso.config.json --competitor-gap-report --json",
|
|
7672
7666
|
"jso-protector --source-map-evidence dist-protected/jso-manifest.json --source-map-evidence-output reports/source-map-evidence.md",
|
|
@@ -7680,12 +7674,16 @@ function writeLocalOnlyGuidance(json) {
|
|
|
7680
7674
|
return;
|
|
7681
7675
|
}
|
|
7682
7676
|
process.stdout.write(`${guidance.message}\n`);
|
|
7683
|
-
process.stdout.write("
|
|
7684
|
-
for (const command of guidance.
|
|
7677
|
+
process.stdout.write("Install:\n");
|
|
7678
|
+
for (const command of guidance.installCommands) {
|
|
7679
|
+
process.stdout.write(`- ${command}\n`);
|
|
7680
|
+
}
|
|
7681
|
+
process.stdout.write("Protect on this machine:\n");
|
|
7682
|
+
for (const command of guidance.localProtectionCommands) {
|
|
7685
7683
|
process.stdout.write(`- ${command}\n`);
|
|
7686
7684
|
}
|
|
7687
|
-
process.stdout.write("
|
|
7688
|
-
for (const command of guidance.
|
|
7685
|
+
process.stdout.write("Offline preflight commands:\n");
|
|
7686
|
+
for (const command of guidance.offlinePreflightCommands) {
|
|
7689
7687
|
process.stdout.write(`- ${command}\n`);
|
|
7690
7688
|
}
|
|
7691
7689
|
}
|
package/ci/verify-examples.js
CHANGED
|
@@ -41,7 +41,10 @@ for (const file of jsonFiles) {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
const readme = fs.readFileSync(path.join(examplesRoot, "README.md"), "utf8");
|
|
44
|
-
|
|
44
|
+
// The package is published as `javascriptobfuscator-com` since 2026-08-30;
|
|
45
|
+
// `jso-protector` is the deprecated former name. Assert the CANONICAL name so
|
|
46
|
+
// this gate cannot go on enforcing a name we no longer tell customers to install.
|
|
47
|
+
if (!readme.includes(`npm install --save-dev javascriptobfuscator-com@${expectedVersion}`)) fail("examples README does not install the current public version under the canonical package name");
|
|
45
48
|
if (readme.includes("intentionally not published to npm")) fail("examples README still says the public package is unpublished");
|
|
46
49
|
|
|
47
50
|
const reactNativeReadme = fs.readFileSync(path.join(examplesRoot, "react-native", "README.md"), "utf8");
|
package/ci/verify-package.js
CHANGED
|
@@ -117,6 +117,18 @@ function exec(command, args, options = {}) {
|
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
function canSpawnChildren() {
|
|
120
|
+
// KNOWN COVERAGE GAP, deliberately left in place. Windows always takes the
|
|
121
|
+
// portable path, so the full verification - the half that installs the packed
|
|
122
|
+
// tarball and runs the CLI from it - never runs on the maintainer's machine.
|
|
123
|
+
// That is why three separate gates still asserting the pre-publication story
|
|
124
|
+
// ("not published to npm", "source can never stay local") survived here and
|
|
125
|
+
// were only caught when CI ran the real path on Linux.
|
|
126
|
+
//
|
|
127
|
+
// Making it run here is not a one-line change: npm is npm.cmd, which Node
|
|
128
|
+
// refuses to spawn without a shell since the 2024 argument-injection
|
|
129
|
+
// hardening, and shelling it changes how `npm pack --json` output arrives.
|
|
130
|
+
// Until someone does that properly, CI is the only place the full path runs -
|
|
131
|
+
// so a green local run is NOT evidence that this gate passes.
|
|
120
132
|
if (process.platform === "win32") {
|
|
121
133
|
return false;
|
|
122
134
|
}
|
|
@@ -238,7 +250,13 @@ import protectTurbopackBuild from "jso-protector/turbopack";
|
|
|
238
250
|
import viteProtector from "jso-protector/vite";
|
|
239
251
|
import webpackProtector from "jso-protector/webpack";
|
|
240
252
|
import webpackLoader from "jso-protector/webpack-loader";
|
|
241
|
-
import
|
|
253
|
+
import { createRequire } from "node:module";
|
|
254
|
+
// Import attributes would be the natural way to read the JSON export, but the
|
|
255
|
+
// syntax changed under us: \`assert { type: "json" }\` was removed in Node 22 and
|
|
256
|
+
// \`with { type: "json" }\` only exists from 18.20 / 20.10. package.json says
|
|
257
|
+
// engines >=18, so neither spelling covers the whole supported range and
|
|
258
|
+
// createRequire does. Caught by CI on Node 22 after passing on Node 24 locally.
|
|
259
|
+
const schema = createRequire(import.meta.url)("jso-protector/schema");
|
|
242
260
|
|
|
243
261
|
assert.equal(typeof api.obfuscate, "function");
|
|
244
262
|
for (const entry of [
|
|
@@ -298,16 +316,21 @@ assert.equal(typeof schema.properties.endpoint, "object");
|
|
|
298
316
|
}
|
|
299
317
|
|
|
300
318
|
const localOnly = JSON.parse(exec(npm, ["exec", "--", "jso-protector", "--local-only", "--json"], { cwd: projectDir }));
|
|
319
|
+
// Third gate found pinning the pre-publication story, after the metadata
|
|
320
|
+
// guard and the CLI's own tests. It asserted the package could never keep
|
|
321
|
+
// source on the machine; --local has done exactly that since before 0.4.0.
|
|
301
322
|
if (
|
|
302
|
-
localOnly.
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
!localOnly.
|
|
323
|
+
localOnly.npmPublished !== true ||
|
|
324
|
+
localOnly.sourceCanStayLocal !== true ||
|
|
325
|
+
localOnly.localProtectionFlag !== "--local" ||
|
|
326
|
+
!Array.isArray(localOnly.offlinePreflightCommands) ||
|
|
327
|
+
!localOnly.offlinePreflightCommands.some((command) => command.includes("--release-check --json")) ||
|
|
328
|
+
!localOnly.offlinePreflightCommands.some((command) => command.includes("--competitor-gap-report --json"))
|
|
306
329
|
) {
|
|
307
330
|
throw new Error(`Local-only guidance output is wrong: ${JSON.stringify(localOnly)}`);
|
|
308
331
|
}
|
|
309
|
-
if (localOnly.
|
|
310
|
-
throw new Error(`
|
|
332
|
+
if (localOnly.packageDistribution !== "npm" || !localOnly.installCommands.some((command) => command === "npm install --save-dev jso-protector")) {
|
|
333
|
+
throw new Error(`Package distribution guidance output is wrong: ${JSON.stringify(localOnly)}`);
|
|
311
334
|
}
|
|
312
335
|
|
|
313
336
|
const samplePath = path.join(projectDir, "sample.js");
|
|
@@ -736,11 +759,15 @@ function verifyPublishMetadataGuard(packageDir) {
|
|
|
736
759
|
if (report.format !== "jso-protector-publish-metadata") {
|
|
737
760
|
throw new Error(`Publish metadata guard reported wrong format: ${JSON.stringify(report)}`);
|
|
738
761
|
}
|
|
739
|
-
|
|
740
|
-
|
|
762
|
+
// The package went public at 0.4.0. This assertion still described the
|
|
763
|
+
// pre-publication policy (localOnly, never publishable) and so failed the
|
|
764
|
+
// moment it ran anywhere the portable shortcut did not apply - which is to
|
|
765
|
+
// say, on CI rather than on the maintainer's machine.
|
|
766
|
+
if (report.ok !== true || report.localOnly !== false || report.proprietaryPublic !== true || report.publishReady !== true) {
|
|
767
|
+
throw new Error(`Publish metadata guard should confirm the published package policy: ${JSON.stringify(report)}`);
|
|
741
768
|
}
|
|
742
769
|
if ((report.issues || []).length) {
|
|
743
|
-
throw new Error(`Publish metadata guard reported unexpected
|
|
770
|
+
throw new Error(`Publish metadata guard reported unexpected issues: ${JSON.stringify(report)}`);
|
|
744
771
|
}
|
|
745
772
|
}
|
|
746
773
|
|
package/examples/README.md
CHANGED
|
@@ -34,10 +34,12 @@ These examples show the common release patterns:
|
|
|
34
34
|
`matchesBaseline` uses `match`, `mismatch`, or `missing` so reviewers can
|
|
35
35
|
see whether a checkout page or frame changed from the approved baseline.
|
|
36
36
|
|
|
37
|
-
Install the published package before running examples
|
|
37
|
+
Install the published package before running examples. The package is now
|
|
38
|
+
published as `javascriptobfuscator-com`; `jso-protector` is the former name and
|
|
39
|
+
is deprecated but still updated:
|
|
38
40
|
|
|
39
41
|
```bash
|
|
40
|
-
npm install --save-dev
|
|
42
|
+
npm install --save-dev javascriptobfuscator-com@0.4.3
|
|
41
43
|
```
|
|
42
44
|
|
|
43
45
|
Repository contributors can instead use the existing `file:../..` development
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
module.exports = ({ env }) => ({
|
|
2
|
-
endpoint: env.JSO_ENDPOINT || "https://
|
|
2
|
+
endpoint: env.JSO_ENDPOINT || "https://javascriptobfuscator.com/HttpApi.ashx",
|
|
3
3
|
apiKey: "$JSO_API_KEY",
|
|
4
4
|
apiPassword: "$JSO_API_PASSWORD",
|
|
5
5
|
projectName: env.CI ? "browser-release-ci" : "browser-release-local",
|
package/examples/curl/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# curl / bash reference implementation
|
|
2
2
|
|
|
3
|
-
The smallest possible compliant client of the [JSO HTTP API](https://javascriptobfuscator.com/
|
|
3
|
+
The smallest possible compliant client of the [JSO HTTP API](https://javascriptobfuscator.com/docs/wireformat.aspx). Use this when:
|
|
4
4
|
|
|
5
5
|
- You need to add JSO protection to a build pipeline written in a language we don't ship a client for.
|
|
6
6
|
- You want a copy-paste reference for what the wire format actually looks like on the network.
|
|
@@ -42,7 +42,7 @@ This is a 100-line shell script. It deliberately doesn't implement:
|
|
|
42
42
|
- The bundler-plugin integration surface (`vite`, `webpack`, `rollup`, ...).
|
|
43
43
|
- Retry logic, exponential backoff, or rate-limit handling.
|
|
44
44
|
|
|
45
|
-
For a production CI integration, use one of the [shipped language clients](https://javascriptobfuscator.com/
|
|
45
|
+
For a production CI integration, use one of the [shipped language clients](https://javascriptobfuscator.com/docs/clients.aspx) instead. The shell script is a reference, not a target.
|
|
46
46
|
|
|
47
47
|
## Verify the response shape
|
|
48
48
|
|
package/examples/curl/protect.sh
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# Use this when the language you need isn't covered by one of the shipped
|
|
5
5
|
# clients (Node / Python / Go / .NET / Ruby / PHP / Rust). The script
|
|
6
6
|
# matches the wire format documented at
|
|
7
|
-
# https://
|
|
7
|
+
# https://javascriptobfuscator.com/docs/wireformat.aspx
|
|
8
8
|
#
|
|
9
9
|
# Required: curl, jq.
|
|
10
10
|
#
|
|
@@ -36,7 +36,7 @@ if [ $# -lt 2 ] || [ $(($# % 2)) -ne 0 ]; then
|
|
|
36
36
|
fi
|
|
37
37
|
|
|
38
38
|
preset="${JSO_PRESET:-balanced}"
|
|
39
|
-
endpoint="${JSO_ENDPOINT:-https://
|
|
39
|
+
endpoint="${JSO_ENDPOINT:-https://javascriptobfuscator.com/HttpApi.ashx}"
|
|
40
40
|
|
|
41
41
|
# Build the Items array from the (input, output) argument pairs.
|
|
42
42
|
items_json="[]"
|
package/examples/helm/Chart.yaml
CHANGED
|
@@ -12,12 +12,12 @@ type: application
|
|
|
12
12
|
version: 0.1.0
|
|
13
13
|
appVersion: "0.2.0"
|
|
14
14
|
|
|
15
|
-
home: https://
|
|
15
|
+
home: https://javascriptobfuscator.com/
|
|
16
16
|
sources:
|
|
17
|
-
- https://
|
|
17
|
+
- https://javascriptobfuscator.com/docs/npmcli.aspx
|
|
18
18
|
maintainers:
|
|
19
19
|
- name: JavaScript Obfuscator
|
|
20
|
-
url: https://
|
|
20
|
+
url: https://javascriptobfuscator.com/contactus.aspx
|
|
21
21
|
|
|
22
22
|
keywords:
|
|
23
23
|
- javascript-obfuscator
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# Pre-commit is the wrong place for that; full protection belongs in CI.
|
|
12
12
|
|
|
13
13
|
repos:
|
|
14
|
-
- repo: https://
|
|
14
|
+
- repo: https://javascriptobfuscator.com/jso-protector-pre-commit
|
|
15
15
|
rev: "v0.2.0" # Pin to a jso-protector release tag.
|
|
16
16
|
hooks:
|
|
17
17
|
- id: jso-release-check
|
|
@@ -41,5 +41,5 @@ The CI templates in `node_modules/jso-protector/ci/` all run `--release-check` B
|
|
|
41
41
|
|
|
42
42
|
## See also
|
|
43
43
|
|
|
44
|
-
- [npm CLI workflow](https://javascriptobfuscator.com/
|
|
44
|
+
- [npm CLI workflow](https://javascriptobfuscator.com/docs/npmcli.aspx)
|
|
45
45
|
- [Build integrations hub](https://javascriptobfuscator.com/build-integrations.aspx)
|
package/index.d.ts
CHANGED
|
@@ -809,7 +809,7 @@ export function main(argv?: string[]): Promise<void>;
|
|
|
809
809
|
export interface AiCredentials {
|
|
810
810
|
apiKey?: string;
|
|
811
811
|
apiPassword?: string;
|
|
812
|
-
endpoint?: string; // default https://
|
|
812
|
+
endpoint?: string; // default https://javascriptobfuscator.com
|
|
813
813
|
timeoutMs?: number; // default 30000
|
|
814
814
|
}
|
|
815
815
|
|
package/package.json
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jso-protector",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "Obfuscate and protect JavaScript in your build or CI: dependency-free CLI, Node API, and webpack/Vite/Rollup/esbuild/Next.js/Metro plugins, with one-command migration from javascript-obfuscator and JS-Confuser configs.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": "JavaScript Obfuscator",
|
|
7
7
|
"homepage": "https://javascriptobfuscator.com/docs/npmcli.aspx",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/richtexteditor/jso-protector.git"
|
|
11
|
+
},
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/richtexteditor/jso-protector/issues",
|
|
14
|
+
"email": "support@javascriptobfuscator.com"
|
|
15
|
+
},
|
|
8
16
|
"keywords": [
|
|
9
17
|
"javascript-obfuscator",
|
|
10
18
|
"obfuscation",
|
|
@@ -50,8 +58,8 @@
|
|
|
50
58
|
"!examples/**/node_modules/**",
|
|
51
59
|
"bun.d.ts",
|
|
52
60
|
"bun.js",
|
|
53
|
-
|
|
54
|
-
|
|
61
|
+
"ai-cli.js",
|
|
62
|
+
"ai.js",
|
|
55
63
|
"browserify.d.ts",
|
|
56
64
|
"browserify.js",
|
|
57
65
|
"esbuild.d.ts",
|
|
@@ -70,7 +78,7 @@
|
|
|
70
78
|
"parcel.js",
|
|
71
79
|
"react-native.d.ts",
|
|
72
80
|
"react-native.js",
|
|
73
|
-
|
|
81
|
+
"release-signer.js",
|
|
74
82
|
"rspack.d.ts",
|
|
75
83
|
"rspack.js",
|
|
76
84
|
"rspack-loader.d.ts",
|
|
@@ -81,7 +89,7 @@
|
|
|
81
89
|
"turbopack.js",
|
|
82
90
|
"vite.d.ts",
|
|
83
91
|
"vite.js",
|
|
84
|
-
|
|
92
|
+
"watermark.js",
|
|
85
93
|
"webpack.d.ts",
|
|
86
94
|
"webpack.js",
|
|
87
95
|
"webpack-loader.d.ts",
|
|
@@ -209,25 +217,26 @@
|
|
|
209
217
|
"./schema": "./jso.config.schema.json"
|
|
210
218
|
},
|
|
211
219
|
"bin": {
|
|
220
|
+
"javascriptobfuscator": "./bin/jso-protector.js",
|
|
212
221
|
"jso-protector": "./bin/jso-protector.js"
|
|
213
222
|
},
|
|
214
223
|
"scripts": {
|
|
215
224
|
"smoke": "node ./bin/jso-protector.js --help && node ./bin/jso-protector.js --config ./jso.config.example.json --dry-run --json",
|
|
216
225
|
"smoke:api": "node ./bin/jso-protector.js --config ./jso.config.example.json --json",
|
|
217
226
|
"test": "node ./test/cli.test.js && node ./test/ai.test.js && node ./test/ai-precheck.test.js && node ./test/ai-script-governance.test.js && node ./test/data-exfiltration-guard.test.js && node ./test/compat-scan.test.js && node ./test/compliance.test.js && node ./test/evidence-forwarder.test.js && node ./test/config-schema.test.js && node ./test/countermeasures.test.js && node ./test/environment-integrity.test.js && node ./test/estimate.test.js && node ./test/github-action.test.js && node ./test/governance.test.js && node ./test/local-bridge.test.js && node ./test/managed-integrity.test.js && node ./test/named-sets.test.js && node ./test/release-signer.test.js && node ./test/scan-watermarks.test.js && node ./test/third-party-inventory.test.js && node ./test/watermark.test.js && node ./test/wire-format-vectors.test.js",
|
|
218
|
-
|
|
219
|
-
|
|
227
|
+
"verify": "npm test && npm run verify:package && npm run verify:examples && npm run verify:publish-metadata && npm run verify:ci && npm run verify:polyglot && npm run verify:ai && npm run verify:verify-scripts-tracked && npm run verify:aspnet-bom && npm run verify:aspnet-compile && npm run verify:endrequest-guard && npm run verify:health-readiness && npm run verify:legacy-soap-security && npm run verify:online-demo-security && npm run verify:parser-engine && npm run verify:emit-validation && npm run verify:emit-validation-modern && npm run verify:runtime-defense-libraries && npm run verify:internal-links && npm run verify:seo && npm run verify:faq-visibility && npm run verify:artifact-claims && npm run verify:runtime-dashboard && npm run verify:payment-page && npm run verify:payment-activation && npm run verify:payment-row-completeness && npm run verify:account-recovery && npm run verify:registration && npm run verify:admin-auth && npm run verify:http-api-auth && npm run verify:request-body-limits && npm run verify:public-form-security && npm run verify:operational-logs && npm run verify:richtexteditor-surface && npm run verify:dashboard-resource-governance && npm run verify:dashboard-diagnostic-surface && npm run verify:web-integrity-policy && npm run verify:entitlements && npm run verify:enterprise-governance && npm run verify:database-migrations && npm run verify:source-secrets && npm run verify:ignored-shipping-secrets && npm run verify:winforms-runtime-floor && npm run verify:ai-billing && npm run verify:ai-key-security && npm run verify:ajax-transport && npm run verify:competitor-gap && npm run verify:parity-defect-sync && npm run verify:source-map-evidence && npm run verify:migration-review && npm run verify:identifier-cache-review && npm run verify:runtime-defense-review && npm run verify:vm-proof && npm run verify:deployment-hygiene && npm run verify:download-artifacts && npm run verify:download-examples && npm run verify:copy-discipline && npm run verify:github-action",
|
|
228
|
+
"verify:release": "npm run verify && npm run verify:corpus-protect && npm run verify:corpus-runtime",
|
|
220
229
|
"verify:verify-scripts-tracked": "node ../polyglot-smoke/check-verify-scripts-tracked.js",
|
|
221
230
|
"verify:parity-defect-sync": "node ../polyglot-smoke/check-parity-defect-sync.js",
|
|
222
231
|
"verify:aspnet-bom": "node ../polyglot-smoke/check-aspnet-bom.js",
|
|
223
232
|
"verify:aspnet-compile": "node ../polyglot-smoke/check-aspnet-compile.js",
|
|
224
233
|
"verify:endrequest-guard": "node ../polyglot-smoke/check-endrequest-guard.js",
|
|
225
234
|
"verify:payment-row-completeness": "node ../polyglot-smoke/check-payment-row-completeness.js",
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
235
|
+
"verify:health-readiness": "node ../polyglot-smoke/check-health-readiness.js",
|
|
236
|
+
"verify:live-health": "node ../polyglot-smoke/check-production-health.js",
|
|
237
|
+
"verify:live-seo": "node ../polyglot-smoke/check-live-seo.js",
|
|
238
|
+
"verify:legacy-soap-security": "node ../polyglot-smoke/check-legacy-soap-security.js",
|
|
239
|
+
"verify:online-demo-security": "node ../polyglot-smoke/check-online-demo-security.js",
|
|
231
240
|
"verify:parser-engine": "node ../polyglot-smoke/check-parser-engine.js",
|
|
232
241
|
"verify:package-closure": "bash ../../tools/verify-package-closure.sh",
|
|
233
242
|
"verify:package-behaviour": "bash ../../tools/verify-package-behaviour.sh",
|
|
@@ -275,7 +284,7 @@
|
|
|
275
284
|
"verify:runtime-defense-review": "node ../polyglot-smoke/check-runtime-defense-review.js",
|
|
276
285
|
"verify:vm-proof": "node ../polyglot-smoke/check-vm-proof-pack.js",
|
|
277
286
|
"verify:deployment-hygiene": "node ../polyglot-smoke/check-archive-hygiene.js",
|
|
278
|
-
|
|
287
|
+
"verify:download-artifacts": "node ../polyglot-smoke/check-download-artifacts.js",
|
|
279
288
|
"verify:download-examples": "node ../polyglot-smoke/check-download-examples.js",
|
|
280
289
|
"verify:copy-discipline": "node ../polyglot-smoke/check-public-copy-discipline.js",
|
|
281
290
|
"verify:github-action": "node ../polyglot-smoke/check-github-action.js",
|