securenow 8.11.1 → 8.11.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/NPM_README.md +3 -1
- package/README.md +2 -0
- package/SKILL-API.md +3 -1
- package/SKILL-CLI.md +625 -632
- package/TELEMETRY-SQL.md +6 -1
- package/cidr.js +83 -83
- package/cli/client.js +102 -102
- package/cli/diagnostics.js +4 -0
- package/cli/firewall.js +141 -141
- package/cli/fp.js +638 -638
- package/cli/monitor.js +398 -398
- package/cli/run.js +132 -132
- package/cli/security.js +1866 -1856
- package/cli/ui.js +374 -374
- package/cli.js +923 -922
- package/firewall-cloud.js +202 -202
- package/firewall-iptables.js +139 -139
- package/firewall-only.js +46 -46
- package/firewall-tcp.js +74 -74
- package/firewall.js +1470 -1470
- package/legacy-semconv.js +4 -3
- package/mcp/catalog.js +2358 -2346
- package/nextjs-auto-capture.d.ts +29 -29
- package/nextjs-auto-capture.js +280 -274
- package/nextjs-middleware.d.ts +57 -57
- package/nextjs-middleware.js +274 -268
- package/nextjs-webpack-config.js +79 -79
- package/nextjs-wrapper.d.ts +95 -95
- package/nextjs-wrapper.js +240 -234
- package/nextjs.js +19 -12
- package/nuxt-server-plugin.mjs +11 -5
- package/nuxt.mjs +74 -74
- package/otp-redaction.js +99 -0
- package/package.json +3 -2
- package/register.d.ts +42 -42
- package/register.js +44 -44
- package/resolve-ip.js +13 -13
- package/telemetry-schema.json +3 -1
- package/tracing.js +860 -855
package/legacy-semconv.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
const { isOtpCodeField } = require('./otp-redaction');
|
|
4
|
+
|
|
3
5
|
/**
|
|
4
6
|
* Legacy semantic-convention attributes for the OpenTelemetry 0.221+ /
|
|
5
7
|
* contrib 0.74+ instrumentations, which emit ONLY the stable conventions.
|
|
@@ -24,7 +26,7 @@
|
|
|
24
26
|
* - http.client_ip is NOT derived from the first X-Forwarded-For entry (that
|
|
25
27
|
* value is spoofable). SecureNow's requestHook sets http.client_ip from the
|
|
26
28
|
* trusted-proxy resolver (resolve-ip.js).
|
|
27
|
-
* -
|
|
29
|
+
* - OTP/code and signature-style query parameters (same list upstream redacts on
|
|
28
30
|
* url.query / url.full) are replaced with REDACTED in http.target / http.url.
|
|
29
31
|
* Every other byte of the target is kept exactly as received, so detection
|
|
30
32
|
* rules that match encoded payloads keep working.
|
|
@@ -62,7 +64,6 @@ function defined(attributes) {
|
|
|
62
64
|
function redactSearch(search, paramsToRedact = DEFAULT_REDACTED_QUERY_PARAMS) {
|
|
63
65
|
if (typeof search !== 'string' || search.length < 2 || search[0] !== '?') return search;
|
|
64
66
|
const sensitive = new Set(paramsToRedact || []);
|
|
65
|
-
if (sensitive.size === 0) return search;
|
|
66
67
|
let changed = false;
|
|
67
68
|
const parts = search.slice(1).split('&').map((part) => {
|
|
68
69
|
const eq = part.indexOf('=');
|
|
@@ -71,7 +72,7 @@ function redactSearch(search, paramsToRedact = DEFAULT_REDACTED_QUERY_PARAMS) {
|
|
|
71
72
|
try {
|
|
72
73
|
key = decodeURIComponent(rawKey.replace(/\+/g, ' '));
|
|
73
74
|
} catch (_) {}
|
|
74
|
-
if (!sensitive.has(key)) return part;
|
|
75
|
+
if (!sensitive.has(key) && !isOtpCodeField(key)) return part;
|
|
75
76
|
changed = true;
|
|
76
77
|
return `${rawKey}=${REDACTED}`;
|
|
77
78
|
});
|