@etalon/cli 1.0.2 → 1.0.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.
|
@@ -11,7 +11,7 @@ var ETALON_VERSION = "1.0.0";
|
|
|
11
11
|
var DEFAULT_OPTIONS = {
|
|
12
12
|
deep: false,
|
|
13
13
|
timeout: 3e4,
|
|
14
|
-
waitForNetworkIdle:
|
|
14
|
+
waitForNetworkIdle: false,
|
|
15
15
|
userAgent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36",
|
|
16
16
|
viewport: { width: 1920, height: 1080 },
|
|
17
17
|
vendorDbPath: ""
|
|
@@ -74,8 +74,8 @@ async function checkConsent(url, options = {}) {
|
|
|
74
74
|
postRejectRequests.push(req);
|
|
75
75
|
}
|
|
76
76
|
});
|
|
77
|
-
await page.goto(url, { waitUntil: "
|
|
78
|
-
await page.waitForTimeout(
|
|
77
|
+
await page.goto(url, { waitUntil: "domcontentloaded", timeout });
|
|
78
|
+
await page.waitForTimeout(3e3);
|
|
79
79
|
const { bannerDetected, bannerType, rejectSelector } = await detectBanner(page);
|
|
80
80
|
let rejectButtonFound = false;
|
|
81
81
|
let rejectClicked = false;
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
scanSite
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-YN7IXPMI.js";
|
|
5
5
|
|
|
6
6
|
// src/index.ts
|
|
7
7
|
import { Command } from "commander";
|
|
@@ -778,14 +778,14 @@ var program = new Command();
|
|
|
778
778
|
program.name("etalon").description("ETALON \u2014 Open-source privacy auditor. Scan websites for trackers and GDPR compliance.").version(VERSION).hook("preAction", () => {
|
|
779
779
|
showBanner();
|
|
780
780
|
});
|
|
781
|
-
program.command("scan").description("Scan a website for third-party trackers").argument("<url>", "URL to scan").option("-f, --format <format>", "Output format: text, json, sarif", "text").option("-d, --deep", "Deep scan: scroll page, interact with consent dialogs", false).option("-t, --timeout <ms>", "Navigation timeout in milliseconds", "30000").option("--
|
|
781
|
+
program.command("scan").description("Scan a website for third-party trackers").argument("<url>", "URL to scan").option("-f, --format <format>", "Output format: text, json, sarif", "text").option("-d, --deep", "Deep scan: scroll page, interact with consent dialogs", false).option("-t, --timeout <ms>", "Navigation timeout in milliseconds", "30000").option("--idle", "Wait for network idle (slower but more thorough)").option("--config <path>", "Path to etalon.yaml config file").action(async (url, options) => {
|
|
782
782
|
const normalizedUrl = normalizeUrl(url);
|
|
783
783
|
const format = options.format ?? "text";
|
|
784
784
|
const config = loadConfig(options.config);
|
|
785
785
|
const scanOptions = {
|
|
786
786
|
deep: options.deep,
|
|
787
787
|
timeout: parseInt(options.timeout, 10),
|
|
788
|
-
waitForNetworkIdle: options.idle
|
|
788
|
+
waitForNetworkIdle: options.idle === true
|
|
789
789
|
};
|
|
790
790
|
if (config?.scan) {
|
|
791
791
|
if (config.scan.timeout && !options.timeout) scanOptions.timeout = config.scan.timeout;
|
|
@@ -923,7 +923,7 @@ program.command("consent-check").description("Test if trackers fire before/after
|
|
|
923
923
|
const format = options.format ?? "text";
|
|
924
924
|
const spinner = format === "text" ? ora(`Checking consent on ${normalizedUrl}...`).start() : null;
|
|
925
925
|
try {
|
|
926
|
-
const { checkConsent } = await import("./consent-checker-
|
|
926
|
+
const { checkConsent } = await import("./consent-checker-QRPTMQWN.js");
|
|
927
927
|
const result = await checkConsent(normalizedUrl, {
|
|
928
928
|
timeout: parseInt(options.timeout ?? "15000", 10)
|
|
929
929
|
});
|
|
@@ -977,7 +977,7 @@ program.command("policy-check").description("Cross-reference privacy policy text
|
|
|
977
977
|
const format = options.format ?? "text";
|
|
978
978
|
const spinner = format === "text" ? ora(`Analyzing privacy policy for ${normalizedUrl}...`).start() : null;
|
|
979
979
|
try {
|
|
980
|
-
const { checkPolicy } = await import("./policy-checker-
|
|
980
|
+
const { checkPolicy } = await import("./policy-checker-SQTI766W.js");
|
|
981
981
|
const result = await checkPolicy(normalizedUrl, {
|
|
982
982
|
timeout: parseInt(options.timeout ?? "30000", 10),
|
|
983
983
|
policyUrl: options.policyUrl
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
scanSite
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-YN7IXPMI.js";
|
|
5
5
|
|
|
6
6
|
// src/policy-checker.ts
|
|
7
7
|
import { chromium } from "playwright";
|
|
@@ -82,7 +82,7 @@ async function findPolicyPage(page, siteUrl) {
|
|
|
82
82
|
return null;
|
|
83
83
|
}
|
|
84
84
|
async function extractPolicyText(page, policyUrl) {
|
|
85
|
-
await page.goto(policyUrl, { waitUntil: "
|
|
85
|
+
await page.goto(policyUrl, { waitUntil: "domcontentloaded", timeout: 2e4 });
|
|
86
86
|
await page.waitForTimeout(1e3);
|
|
87
87
|
const text = await page.evaluate(() => {
|
|
88
88
|
const doc = globalThis.document;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etalon/cli",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "ETALON
|
|
3
|
+
"version": "1.0.3",
|
|
4
|
+
"description": "ETALON — Privacy audit tool for websites. Scan any site for trackers and GDPR compliance.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"type": "module",
|
|
@@ -40,4 +40,4 @@
|
|
|
40
40
|
"type": "git",
|
|
41
41
|
"url": "https://github.com/NMA-vc/etalon"
|
|
42
42
|
}
|
|
43
|
-
}
|
|
43
|
+
}
|