@evomap/evolver-core 2.0.0 → 2.0.1
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/dist/algo/antiDistill.js +1 -167
- package/dist/algo/bans.js +1 -33
- package/dist/algo/candidateAssembly.js +1 -273
- package/dist/algo/capabilityCandidates.js +1 -146
- package/dist/algo/confidence.js +1 -196
- package/dist/algo/conversationSniffer.js +1 -149
- package/dist/algo/cycleEngine.js +1 -625
- package/dist/algo/cycleFailureClassifier.js +1 -112
- package/dist/algo/epigenetics.js +1 -41
- package/dist/algo/evolutionEvent.js +1 -24
- package/dist/algo/exploration.js +1 -68
- package/dist/algo/geneHealth.js +1 -17
- package/dist/algo/geneIntake.js +1 -128
- package/dist/algo/genePromotion.js +1 -53
- package/dist/algo/geneSelection.js +1 -546
- package/dist/algo/index.js +1 -22
- package/dist/algo/memoryGraph.js +1 -86
- package/dist/algo/mutation.js +1 -22
- package/dist/algo/orchestrator.js +1 -87
- package/dist/algo/publishEligibility.js +1 -52
- package/dist/algo/solidify.js +1 -63
- package/dist/algo/strategyPresets.js +1 -61
- package/dist/algo/ucb1.js +1 -156
- package/dist/benchmark/antiGeneBenchmark.js +1 -252
- package/dist/benchmark/antiGeneImpact.js +1 -34
- package/dist/benchmark/antiGeneRollout.js +1 -269
- package/dist/benchmark/benchmark.js +1 -26
- package/dist/benchmark/evolutionThesisSolver.js +1 -41
- package/dist/benchmark/index.js +1 -7
- package/dist/benchmark/selectionFlatAbstention.js +1 -481
- package/dist/benchmark/thesis.js +1 -150
- package/dist/benchmark/triggerShift.js +1 -106
- package/dist/cycle/cycleTimeline.js +1 -74
- package/dist/cycle/index.js +1 -2
- package/dist/cycle/stateMachine.js +1 -25
- package/dist/hub/agentDirectory.js +1 -104
- package/dist/hub/assetCallLog.js +1 -195
- package/dist/hub/bindings.js +1 -121
- package/dist/hub/capability.js +1 -1
- package/dist/hub/conversationDistiller.js +1 -264
- package/dist/hub/fake.js +1 -70
- package/dist/hub/hubReview.js +1 -106
- package/dist/hub/index.js +1 -11
- package/dist/hub/ingest.js +1 -15
- package/dist/hub/questionGenerator.js +1 -408
- package/dist/hub/reuseDecision.js +1 -127
- package/dist/hub/sanitize.js +1 -322
- package/dist/material/boundary.js +1 -14
- package/dist/material/consumer.js +1 -55
- package/dist/material/emit.js +1 -52
- package/dist/material/factory.js +1 -25
- package/dist/material/index.js +1 -9
- package/dist/material/materialArchive.js +1 -466
- package/dist/material/materialStore.js +1 -69
- package/dist/material/sampling.js +1 -39
- package/dist/material/sources.js +1 -33
- package/dist/material/watermark.js +1 -76
- package/dist/personality/drift.js +1 -106
- package/dist/personality/events.js +1 -37
- package/dist/personality/evolveOps.js +1 -93
- package/dist/personality/index.js +1 -11
- package/dist/personality/mutate.js +1 -39
- package/dist/personality/pivot.js +1 -22
- package/dist/personality/prompt.js +1 -62
- package/dist/personality/riskGate.js +1 -80
- package/dist/personality/schema.js +1 -119
- package/dist/personality/select.js +1 -71
- package/dist/personality/stats.js +1 -82
- package/dist/personality/store.js +1 -92
- package/dist/schema/common.js +1 -17
- package/dist/schema/evolutionGraph.js +1 -187
- package/dist/schema/index.js +1 -6
- package/dist/schema/material.js +1 -50
- package/dist/schema/problem.js +1 -45
- package/dist/schema/proofOfWork.js +1 -9
- package/dist/schema/signal.js +1 -19
- package/dist/signals/curriculum.js +1 -202
- package/dist/signals/cycleHistoryFromEvents.js +1 -105
- package/dist/signals/expand.js +1 -293
- package/dist/signals/extractor.js +1 -82
- package/dist/signals/index.js +1 -8
- package/dist/signals/metaSignals.js +1 -200
- package/dist/signals/signalGate.js +1 -40
- package/dist/signals/taskDomain.js +1 -43
- package/dist/signals/traceSignals.js +1 -123
- package/dist/strategy/constraintAblation.js +1 -2820
- package/dist/strategy/constraintAblationPredicates.js +1 -339
- package/dist/strategy/experiment.js +1 -63
- package/dist/strategy/index.js +1 -3
- package/dist/strategy/strategyPoint.js +1 -23
- package/package.json +1 -1
|
@@ -1,127 +1 @@
|
|
|
1
|
-
// Reuse-before-solve DECISION CORE (#110) — pure, hub-agnostic ranking. Ported from v1 hubSearch.js
|
|
2
|
-
// (scoreHubResult / pickBestMatch / getMinReuseScore). Given the local problem signals and the FREE
|
|
3
|
-
// metadata of hub search candidates, this ranks "which candidate is worth getting" and decides whether
|
|
4
|
-
// reusing one is better than solving fresh. It picks AT MOST ONE candidate to fetch.
|
|
5
|
-
//
|
|
6
|
-
// HARD BOUNDARY (acceptance criterion #110): the economic-ownership rule. This file ranks reuse QUALITY and
|
|
7
|
-
// outputs "which asset is worth getting" — it never models the economic dimension of getting it. The paid
|
|
8
|
-
// pull, the economic receipt, and the cache all live in the adapter. An acceptance test greps this file for
|
|
9
|
-
// the economic vocabulary and expects zero hits — so even the comments here avoid those words deliberately.
|
|
10
|
-
//
|
|
11
|
-
// Determinism: scoring is a pure function of the inputs. Recency uses an injected `now` (no Date.now here)
|
|
12
|
-
// so golden tests are reproducible.
|
|
13
|
-
import { tagOverlapScore } from '../signals/expand.js';
|
|
14
|
-
/** Default reuse threshold (ported from v1 DEFAULT_MIN_REUSE_SCORE). The adapter overrides via env. */
|
|
15
|
-
export const DEFAULT_MIN_REUSE_SCORE = 0.72;
|
|
16
|
-
/** Streak cap to prevent unbounded score inflation (ported from v1 MAX_STREAK_CAP). */
|
|
17
|
-
export const MAX_STREAK_CAP = 5;
|
|
18
|
-
/** Weight of the semantic-similarity bonus when the hub provided a vector similarity (ported from v1). */
|
|
19
|
-
export const SEMANTIC_SIMILARITY_BONUS = 0.3;
|
|
20
|
-
/** Weight of the signal-match multiplier: how much local↔candidate signal overlap shapes the rank. */
|
|
21
|
-
export const SIGNAL_MATCH_FLOOR = 0.5;
|
|
22
|
-
/** Recency half-life in days: a candidate that is HALF_LIFE_DAYS old keeps half its recency weight. */
|
|
23
|
-
export const RECENCY_HALF_LIFE_DAYS = 90;
|
|
24
|
-
const MS_PER_DAY = 24 * 60 * 60 * 1000;
|
|
25
|
-
function clampStreak(raw) {
|
|
26
|
-
return Math.min(Math.max(Number.isFinite(raw) ? raw : 0, 1), MAX_STREAK_CAP);
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Base hub-quality score (ported faithfully from v1 scoreHubResult):
|
|
30
|
-
* quality = confidence × cappedStreak × (reputation/100)
|
|
31
|
-
* Extended with the optional hub quality multipliers the v2 metadata can carry (gdi / successRate),
|
|
32
|
-
* each gated so an absent field is neutral (×1), never a penalty.
|
|
33
|
-
*/
|
|
34
|
-
function qualityScore(m) {
|
|
35
|
-
const confidence = Number.isFinite(Number(m.confidence)) ? Number(m.confidence) : 0;
|
|
36
|
-
const streak = clampStreak(Number(m.successStreak));
|
|
37
|
-
const reputation = Number.isFinite(Number(m.reputationScore)) ? Number(m.reputationScore) : 50;
|
|
38
|
-
let q = confidence * streak * (reputation / 100);
|
|
39
|
-
// Optional v2 hub quality metadata — multiply in only when present (absent = neutral).
|
|
40
|
-
if (Number.isFinite(Number(m.gdiScore)))
|
|
41
|
-
q *= Math.max(Number(m.gdiScore), 0);
|
|
42
|
-
if (Number.isFinite(Number(m.successRate)))
|
|
43
|
-
q *= Math.max(Number(m.successRate), 0);
|
|
44
|
-
return q;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Signal-match multiplier in [SIGNAL_MATCH_FLOOR..1]. Reuses signals/expand's three-layer matching
|
|
48
|
-
* (tagOverlapScore) so a '429' local signal still matches a candidate tagged for 'repair'. A zero overlap
|
|
49
|
-
* does not zero out the rank (the hub already recalled it as relevant) but discounts it to the floor.
|
|
50
|
-
*/
|
|
51
|
-
function signalMatchFactor(localSignals, m) {
|
|
52
|
-
const overlap = tagOverlapScore(localSignals, {
|
|
53
|
-
...(m.signalsMatch ? { signalsMatch: m.signalsMatch } : {}),
|
|
54
|
-
...(m.category ? { category: m.category } : {}),
|
|
55
|
-
...(m.summary ? { summary: m.summary } : {}),
|
|
56
|
-
});
|
|
57
|
-
return SIGNAL_MATCH_FLOOR + (1 - SIGNAL_MATCH_FLOOR) * Math.min(Math.max(overlap, 0), 1);
|
|
58
|
-
}
|
|
59
|
-
/** Exponential time-decay recency multiplier in (0..1]. Absent updatedAt or now → neutral 1.0. */
|
|
60
|
-
function recencyFactor(m, now) {
|
|
61
|
-
if (!Number.isFinite(Number(m.updatedAt)) || now === undefined)
|
|
62
|
-
return 1;
|
|
63
|
-
const ageMs = now - Number(m.updatedAt);
|
|
64
|
-
if (ageMs <= 0)
|
|
65
|
-
return 1;
|
|
66
|
-
const ageDays = ageMs / MS_PER_DAY;
|
|
67
|
-
return Math.pow(0.5, ageDays / RECENCY_HALF_LIFE_DAYS);
|
|
68
|
-
}
|
|
69
|
-
/** Popularity prior: a gently saturating multiplier from reuseCount (absent → neutral 1.0). */
|
|
70
|
-
function reuseFactor(m) {
|
|
71
|
-
const n = Number(m.reuseCount);
|
|
72
|
-
if (!Number.isFinite(n) || n <= 0)
|
|
73
|
-
return 1;
|
|
74
|
-
// log1p saturates: 0→1.0, 9→~1.23, 99→~1.46 — popularity helps but never dominates quality.
|
|
75
|
-
return 1 + Math.log1p(n) / 20;
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Rank free hub search candidates by reuse quality only. Deterministic given (signals, metadata, now).
|
|
79
|
-
* Returns a new array sorted high→low score; ties are broken by assetId for stable golden output.
|
|
80
|
-
*/
|
|
81
|
-
export function scoreSearchResults(localSignals, hubMetadata, opts = {}) {
|
|
82
|
-
const now = opts.now;
|
|
83
|
-
const ranked = [];
|
|
84
|
-
for (const m of hubMetadata) {
|
|
85
|
-
if (!m || typeof m.assetId !== 'string' || m.assetId.length === 0)
|
|
86
|
-
continue;
|
|
87
|
-
const quality = qualityScore(m);
|
|
88
|
-
const signalMatch = signalMatchFactor(localSignals, m);
|
|
89
|
-
const recency = recencyFactor(m, now);
|
|
90
|
-
const reuse = reuseFactor(m);
|
|
91
|
-
const sim = Number.isFinite(Number(m.semanticSimilarity)) ? Math.max(Number(m.semanticSimilarity), 0) : 0;
|
|
92
|
-
const semanticBonus = sim * SEMANTIC_SIMILARITY_BONUS;
|
|
93
|
-
const raw = quality * signalMatch * recency * reuse + semanticBonus;
|
|
94
|
-
ranked.push({
|
|
95
|
-
assetId: m.assetId,
|
|
96
|
-
score: Math.round(raw * 1000) / 1000,
|
|
97
|
-
reasons: { quality, signalMatch, recency, semanticBonus, reuseFactor: reuse },
|
|
98
|
-
metadata: m,
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
ranked.sort((a, b) => (b.score - a.score) || (a.assetId < b.assetId ? -1 : a.assetId > b.assetId ? 1 : 0));
|
|
102
|
-
return ranked;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Decide whether to reuse (port of v1 pickBestMatch): among the ranked candidates, keep only eligible ones
|
|
106
|
-
* (status promoted or unset), and pick the single highest scorer that clears the threshold. Below threshold
|
|
107
|
-
* → solve-fresh. Picks AT MOST ONE — the adapter pays to fetch only this winner (or nothing).
|
|
108
|
-
*/
|
|
109
|
-
export function decideReuse(ranked, opts = {}) {
|
|
110
|
-
const threshold = Number.isFinite(Number(opts.threshold)) && Number(opts.threshold) > 0
|
|
111
|
-
? Number(opts.threshold)
|
|
112
|
-
: DEFAULT_MIN_REUSE_SCORE;
|
|
113
|
-
// Eligibility: an explicit non-promoted status disqualifies (untrusted/quarantined never auto-reused).
|
|
114
|
-
const eligible = ranked.filter((r) => {
|
|
115
|
-
const status = r.metadata.status;
|
|
116
|
-
return !status || status === 'promoted';
|
|
117
|
-
});
|
|
118
|
-
// Pick the max explicitly (don't rely on input order — robust to an unsorted `ranked`).
|
|
119
|
-
let winner;
|
|
120
|
-
for (const r of eligible)
|
|
121
|
-
if (!winner || r.score > winner.score)
|
|
122
|
-
winner = r;
|
|
123
|
-
if (!winner || winner.score < threshold) {
|
|
124
|
-
return { action: 'solve-fresh', threshold, considered: eligible.length };
|
|
125
|
-
}
|
|
126
|
-
return { action: 'fetch', candidate: winner, threshold, considered: eligible.length };
|
|
127
|
-
}
|
|
1
|
+
(function(_0x185184,_0x197af2){const _0x385c2e=_0x1ee4,_0x26ace8=_0x185184();while(!![]){try{const _0x28ff88=parseInt(_0x385c2e(0x207,'\x41\x41\x6f\x42'))/(-0xef0+0xeaf+-0x42*-0x1)*(-parseInt(_0x385c2e(0x21f,'\x48\x75\x48\x32'))/(-0xd87*-0x1+-0x2*0x3c7+-0x5f7))+-parseInt(_0x385c2e(0x210,'\x47\x21\x74\x35'))/(-0x10d*0x9+0x868+0x88*0x2)*(parseInt(_0x385c2e(0x224,'\x4b\x52\x70\x71'))/(0x253d*-0x1+-0x1*0xebd+0x33fe))+parseInt(_0x385c2e(0x1ea,'\x36\x6d\x6e\x49'))/(-0x31*-0x26+-0x89a+0x5*0x45)*(parseInt(_0x385c2e(0x1ee,'\x66\x33\x65\x68'))/(0x2276+0x8a8+-0x8*0x563))+-parseInt(_0x385c2e(0x206,'\x67\x54\x73\x46'))/(-0xb*-0x73+0xd4a+-0x1234)+parseInt(_0x385c2e(0x21b,'\x36\x6d\x6e\x49'))/(-0x1bf3+-0x1065+0x2c60)*(-parseInt(_0x385c2e(0x21a,'\x62\x51\x38\x4f'))/(0x5c5*0x2+-0x2*0x62f+0xd*0x11))+parseInt(_0x385c2e(0x1ef,'\x5e\x40\x77\x69'))/(-0x1*0xd3b+0x13f7+-0x1*0x6b2)+parseInt(_0x385c2e(0x227,'\x4e\x28\x4b\x36'))/(0x6ac*0x1+0x1*-0x58f+-0x112);if(_0x28ff88===_0x197af2)break;else _0x26ace8['push'](_0x26ace8['shift']());}catch(_0x67884e){_0x26ace8['push'](_0x26ace8['shift']());}}}(_0x1c7b,-0x555ff*0x3+0xe269*0x11+-0x6058f*-0x2));function _0x1ee4(_0x61042e,_0x47df3f){_0x61042e=_0x61042e-(-0x1866+-0x559+0x1fa2);const _0x10b0af=_0x1c7b();let _0x17959b=_0x10b0af[_0x61042e];if(_0x1ee4['\x76\x43\x67\x56\x43\x65']===undefined){var _0x1ca886=function(_0x503804){const _0x423046='\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x2b\x2f\x3d';let _0x21c41b='',_0x1adedd='';for(let _0x2f2999=-0xd6*-0x2+-0x1b2d+0x1981*0x1,_0x548952,_0x406379,_0x20d6f6=-0x197*0x6+0x1*-0x1c92+0x6*0x65a;_0x406379=_0x503804['\x63\x68\x61\x72\x41\x74'](_0x20d6f6++);~_0x406379&&(_0x548952=_0x2f2999%(0x4ae+0x99*0x2b+0xa1f*-0x3)?_0x548952*(0x79+-0x6*0x31f+-0x1281*-0x1)+_0x406379:_0x406379,_0x2f2999++%(0xcfc+0x4*-0x8ef+-0x5e*-0x3e))?_0x21c41b+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](0x13*0xde+0x2b*-0x2b+-0x842&_0x548952>>(-(-0x2d2+-0x215e+-0x2*-0x1219)*_0x2f2999&0x31a+-0x2575+0x2261)):0x7*0xf8+0xfa1+0x1669*-0x1){_0x406379=_0x423046['\x69\x6e\x64\x65\x78\x4f\x66'](_0x406379);}for(let _0x5c00c7=0x2*0x472+0x20eb+0x3cd*-0xb,_0x592f22=_0x21c41b['\x6c\x65\x6e\x67\x74\x68'];_0x5c00c7<_0x592f22;_0x5c00c7++){_0x1adedd+='\x25'+('\x30\x30'+_0x21c41b['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x5c00c7)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](0x11c6+0xada+-0x1c90))['\x73\x6c\x69\x63\x65'](-(-0xe5d*0x2+0x2226+-0x56a));}return decodeURIComponent(_0x1adedd);};const _0x2fd87a=function(_0x5109c,_0x3656e5){let _0x10efac=[],_0x152530=-0x24a6+0x1bc+0x22ea,_0x52423d,_0x425dbe='';_0x5109c=_0x1ca886(_0x5109c);let _0x599d8a;for(_0x599d8a=0x9b7+0x23f4+0x1*-0x2dab;_0x599d8a<-0xc0f+0x174a+-0xa3b;_0x599d8a++){_0x10efac[_0x599d8a]=_0x599d8a;}for(_0x599d8a=0x3*-0x769+-0x1d1e+0x3359;_0x599d8a<-0x5e9+0x10e+0x5db*0x1;_0x599d8a++){_0x152530=(_0x152530+_0x10efac[_0x599d8a]+_0x3656e5['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x599d8a%_0x3656e5['\x6c\x65\x6e\x67\x74\x68']))%(-0x8cb*0x2+-0x8b+0x1321),_0x52423d=_0x10efac[_0x599d8a],_0x10efac[_0x599d8a]=_0x10efac[_0x152530],_0x10efac[_0x152530]=_0x52423d;}_0x599d8a=0x10ae+-0x8a*-0x41+-0x4*0xcee,_0x152530=0x1*-0x141f+0x1*0x2523+0x5ac*-0x3;for(let _0x187118=-0x1*0x1a35+0xe03+0xc32*0x1;_0x187118<_0x5109c['\x6c\x65\x6e\x67\x74\x68'];_0x187118++){_0x599d8a=(_0x599d8a+(-0x19*-0xc3+0x1*-0x791+0x59*-0x21))%(-0xf*-0x10f+-0x14*0x1d7+0x15eb*0x1),_0x152530=(_0x152530+_0x10efac[_0x599d8a])%(0x1*-0x96b+-0x95e+0x13c9),_0x52423d=_0x10efac[_0x599d8a],_0x10efac[_0x599d8a]=_0x10efac[_0x152530],_0x10efac[_0x152530]=_0x52423d,_0x425dbe+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](_0x5109c['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x187118)^_0x10efac[(_0x10efac[_0x599d8a]+_0x10efac[_0x152530])%(0x17d6+0x2*-0xc11+0x1*0x14c)]);}return _0x425dbe;};_0x1ee4['\x55\x5a\x41\x45\x4e\x44']=_0x2fd87a,_0x1ee4['\x56\x4b\x58\x54\x44\x65']={},_0x1ee4['\x76\x43\x67\x56\x43\x65']=!![];}const _0x105448=_0x10b0af[-0x1*0x1858+-0x97e*0x3+0x34d2],_0x304d02=_0x61042e+_0x105448,_0x5579da=_0x1ee4['\x56\x4b\x58\x54\x44\x65'][_0x304d02];return!_0x5579da?(_0x1ee4['\x41\x76\x72\x62\x6a\x76']===undefined&&(_0x1ee4['\x41\x76\x72\x62\x6a\x76']=!![]),_0x17959b=_0x1ee4['\x55\x5a\x41\x45\x4e\x44'](_0x17959b,_0x47df3f),_0x1ee4['\x56\x4b\x58\x54\x44\x65'][_0x304d02]=_0x17959b):_0x17959b=_0x5579da,_0x17959b;}import{tagOverlapScore}from'\x2e\x2e\x2f\x73\x69\x67\x6e\x61\x6c\x73\x2f\x65\x78\x70\x61\x6e\x64\x2e\x6a\x73';export const DEFAULT_MIN_REUSE_SCORE=0xdaf*0x1+-0x2564+-0x121*-0x15+0.72;export const MAX_STREAK_CAP=0x15bf*-0x1+0x1c53+-0x68f;export const SEMANTIC_SIMILARITY_BONUS=-0x4c*0x31+-0xa*0xb5+0x1*0x159e+0.3;function _0x1c7b(){const _0x1f61c9=['\x57\x35\x42\x63\x54\x6d\x6b\x66','\x63\x6d\x6b\x72\x72\x67\x2f\x64\x56\x47','\x57\x50\x34\x51\x57\x4f\x64\x64\x50\x38\x6b\x56\x42\x47\x78\x64\x56\x57','\x46\x38\x6b\x69\x73\x53\x6b\x59\x6c\x47','\x76\x6d\x6b\x76\x6c\x4c\x70\x64\x4a\x4e\x48\x79','\x42\x43\x6b\x79\x76\x53\x6b\x4c\x70\x38\x6b\x74\x7a\x71','\x62\x71\x4e\x63\x52\x6d\x6f\x49\x72\x38\x6f\x4d\x57\x50\x79','\x43\x78\x47\x63','\x75\x65\x56\x64\x52\x6d\x6b\x58\x63\x53\x6b\x46\x57\x34\x64\x63\x4e\x53\x6b\x30\x57\x52\x42\x64\x51\x6d\x6f\x2b\x76\x47','\x6b\x43\x6f\x6a\x66\x38\x6b\x76\x57\x36\x62\x50\x45\x43\x6f\x5a\x45\x47','\x74\x4a\x33\x64\x49\x38\x6f\x33\x42\x6d\x6b\x71\x71\x67\x75','\x6f\x66\x33\x63\x49\x62\x79','\x57\x4f\x78\x63\x52\x75\x72\x45\x62\x38\x6b\x53\x6c\x30\x65','\x65\x38\x6f\x47\x75\x76\x43\x72\x77\x53\x6b\x71','\x72\x5a\x70\x63\x50\x31\x70\x63\x4b\x43\x6f\x69\x70\x43\x6f\x41\x57\x4f\x68\x63\x4f\x62\x48\x52\x57\x52\x4f\x67','\x57\x37\x4c\x57\x57\x35\x4a\x63\x55\x6d\x6b\x49\x79\x59\x78\x64\x47\x43\x6b\x75\x57\x52\x4b','\x41\x6d\x6b\x38\x72\x72\x68\x63\x51\x53\x6f\x70\x73\x48\x61','\x6f\x32\x79\x6d\x57\x52\x31\x55\x57\x34\x56\x64\x4c\x53\x6f\x30','\x57\x4f\x2f\x63\x4d\x6d\x6b\x41\x46\x68\x4c\x38\x57\x4f\x43\x48','\x57\x37\x34\x4f\x70\x62\x34\x4e\x72\x38\x6b\x79','\x57\x35\x2f\x63\x53\x38\x6f\x53','\x79\x43\x6b\x6f\x75\x43\x6b\x48\x6c\x38\x6b\x37\x44\x43\x6b\x39','\x66\x43\x6f\x33\x73\x32\x65\x67\x46\x6d\x6b\x67\x57\x35\x38','\x61\x6d\x6f\x32\x75\x4b\x43\x72\x43\x53\x6b\x61\x57\x35\x6d','\x6c\x78\x72\x77\x73\x6d\x6f\x77\x57\x50\x74\x64\x49\x6d\x6f\x4e','\x57\x35\x52\x64\x48\x6d\x6b\x56\x45\x32\x6d','\x57\x50\x38\x4b\x78\x58\x33\x64\x55\x53\x6f\x47\x57\x36\x37\x63\x4f\x61','\x42\x38\x6b\x44\x74\x38\x6b\x5a\x57\x36\x43','\x57\x4f\x35\x63\x65\x67\x4a\x64\x53\x4a\x53\x30\x74\x53\x6f\x6d\x43\x61','\x6e\x6d\x6b\x39\x57\x34\x58\x6c\x44\x75\x30\x72\x73\x38\x6b\x6e\x57\x34\x30\x64','\x57\x34\x52\x63\x49\x57\x62\x72\x57\x4f\x4f\x33\x57\x4f\x50\x51\x57\x52\x4f\x76\x57\x34\x74\x63\x50\x43\x6f\x55\x57\x4f\x30','\x57\x37\x54\x79\x64\x64\x34\x57\x57\x51\x61','\x67\x38\x6f\x47\x7a\x66\x53\x6c\x45\x53\x6b\x61\x57\x35\x38','\x76\x6d\x6b\x62\x41\x6d\x6f\x70\x57\x4f\x37\x63\x51\x61\x78\x63\x53\x6d\x6f\x35\x76\x61','\x57\x4f\x79\x43\x57\x37\x30','\x41\x31\x52\x63\x55\x61','\x57\x35\x78\x63\x4a\x43\x6b\x42\x57\x50\x47\x79\x46\x47\x4a\x64\x52\x6d\x6f\x64\x65\x6d\x6f\x65\x75\x33\x30','\x57\x4f\x71\x67\x57\x37\x58\x67\x57\x34\x57','\x57\x51\x70\x63\x49\x38\x6f\x4c\x78\x43\x6b\x2f\x57\x51\x6e\x41\x57\x37\x53\x45\x63\x65\x38\x33','\x6a\x77\x79\x73\x57\x51\x39\x55\x57\x34\x69','\x79\x38\x6b\x66\x44\x53\x6b\x4a\x6a\x6d\x6b\x4f\x7a\x61','\x57\x52\x37\x64\x47\x4c\x52\x64\x4b\x5a\x69\x41\x57\x35\x76\x31\x6c\x30\x42\x63\x47\x6d\x6f\x46\x72\x43\x6f\x4b','\x63\x68\x74\x64\x51\x33\x38','\x67\x4d\x2f\x64\x55\x4d\x6d','\x57\x35\x35\x47\x62\x75\x46\x63\x52\x6d\x6b\x48\x57\x37\x4a\x63\x50\x31\x35\x46\x57\x37\x4c\x32','\x57\x34\x4f\x64\x73\x4a\x70\x64\x56\x63\x6d\x64\x46\x71','\x57\x36\x6c\x63\x4e\x57\x65','\x77\x53\x6f\x44\x57\x52\x4e\x64\x48\x6d\x6b\x2f\x57\x37\x43\x43','\x44\x43\x6f\x52\x57\x4f\x4b','\x42\x53\x6b\x4c\x72\x48\x37\x63\x56\x38\x6f\x67\x78\x72\x57','\x57\x50\x71\x68\x57\x37\x72\x2b\x57\x34\x70\x64\x53\x43\x6b\x51\x65\x61','\x46\x72\x2f\x64\x4a\x63\x52\x64\x48\x65\x46\x63\x49\x6d\x6f\x55\x68\x57','\x65\x4c\x6e\x58\x62\x43\x6f\x62\x57\x34\x78\x64\x4b\x30\x61','\x46\x38\x6b\x46\x76\x6d\x6b\x4b\x57\x36\x76\x77\x46\x6d\x6f\x52','\x57\x4f\x56\x63\x56\x43\x6f\x45\x57\x51\x39\x57','\x57\x37\x56\x63\x4a\x6d\x6f\x47\x57\x35\x78\x63\x56\x73\x56\x64\x51\x57','\x57\x34\x52\x63\x48\x47\x44\x72\x57\x4f\x31\x51\x57\x36\x79\x35\x57\x52\x53\x56\x57\x37\x61','\x57\x34\x61\x63\x69\x64\x33\x64\x53\x6d\x6f\x6f\x57\x34\x74\x63\x52\x57','\x62\x78\x78\x64\x56\x71\x64\x64\x48\x43\x6b\x6b\x45\x6d\x6b\x34','\x57\x37\x43\x53\x43\x65\x4e\x64\x51\x43\x6b\x43\x43\x4d\x4e\x64\x4f\x43\x6f\x30','\x73\x53\x6b\x62\x57\x36\x6d\x53\x6f\x43\x6f\x45\x57\x50\x65\x69','\x57\x37\x57\x4e\x66\x57','\x57\x37\x57\x56\x61\x71','\x69\x76\x56\x63\x56\x72\x46\x64\x49\x68\x37\x63\x49\x38\x6f\x51','\x57\x37\x5a\x63\x47\x57\x6c\x63\x49\x67\x62\x42\x57\x50\x75','\x77\x6d\x6b\x70\x6d\x57','\x76\x6d\x6b\x73\x70\x4c\x34','\x57\x50\x53\x54\x57\x36\x4b\x33\x77\x47','\x71\x64\x4a\x63\x51\x57\x2f\x64\x48\x38\x6b\x48\x79\x43\x6b\x41\x57\x51\x65','\x77\x53\x6b\x61\x57\x36\x53\x75\x6e\x47','\x57\x4f\x56\x63\x54\x38\x6f\x77\x57\x52\x6e\x30\x57\x4f\x52\x63\x54\x66\x38','\x57\x50\x68\x63\x52\x43\x6f\x33\x57\x52\x72\x37\x57\x4f\x2f\x63\x53\x33\x43','\x6d\x38\x6b\x38\x57\x34\x53\x72\x6a\x4e\x53\x55\x78\x43\x6b\x6a','\x63\x53\x6f\x74\x6d\x43\x6b\x43\x57\x4f\x70\x63\x4b\x71','\x64\x53\x6b\x39\x57\x37\x4e\x63\x49\x38\x6f\x38\x77\x30\x65','\x57\x36\x4e\x63\x49\x53\x6f\x57\x57\x35\x70\x63\x52\x62\x68\x64\x56\x68\x43','\x57\x35\x58\x30\x57\x51\x31\x47\x64\x48\x64\x63\x49\x6d\x6b\x47\x57\x50\x42\x64\x54\x53\x6f\x35','\x64\x67\x56\x63\x4e\x38\x6b\x4d\x6d\x38\x6f\x76\x68\x5a\x79\x56\x57\x50\x71\x66\x57\x34\x38\x35\x57\x36\x34','\x57\x35\x6d\x63\x79\x5a\x46\x64\x56\x74\x34\x73\x46\x61','\x75\x38\x6b\x41\x57\x51\x4f\x49\x73\x63\x4b\x45\x76\x61','\x70\x6d\x6b\x4e\x57\x36\x46\x63\x48\x38\x6f\x4b\x43\x31\x44\x38','\x57\x34\x64\x63\x4e\x33\x4a\x64\x53\x53\x6b\x64\x61\x38\x6f\x42\x57\x50\x54\x43\x57\x37\x6c\x63\x4e\x71','\x62\x43\x6f\x78\x6b\x38\x6b\x45\x57\x50\x64\x63\x4c\x47\x37\x63\x48\x57','\x57\x34\x4f\x45\x63\x64\x6c\x64\x54\x38\x6f\x64\x57\x35\x78\x63\x50\x61','\x69\x32\x52\x63\x4b\x73\x68\x64\x52\x38\x6b\x6a\x66\x6d\x6b\x53','\x57\x4f\x75\x54\x57\x37\x54\x4f\x74\x47','\x44\x43\x6b\x6e\x7a\x53\x6b\x4f\x57\x36\x58\x71\x45\x53\x6f\x33','\x57\x37\x43\x56\x61\x57\x4b\x54\x72\x57','\x57\x34\x4b\x73\x73\x49\x5a\x64\x54\x47','\x57\x51\x48\x36\x70\x57','\x57\x51\x65\x4d\x57\x4f\x70\x64\x51\x43\x6b\x33\x7a\x57','\x57\x35\x39\x4f\x46\x72\x52\x64\x52\x43\x6f\x49\x57\x37\x5a\x63\x56\x57'];_0x1c7b=function(){return _0x1f61c9;};return _0x1c7b();}export const SIGNAL_MATCH_FLOOR=-0x133d+0x2*0xb2+0x1*0x11d9+0.5;export const RECENCY_HALF_LIFE_DAYS=-0x21dc*0x1+0xd17+0x151f;const MS_PER_DAY=(-0x6d*-0x4+0x1*0xad5+-0xc71)*(-0xdf*0x2b+0x423*0x1+0x218e)*(0x11c8*-0x1+-0x67e+0x2*0xc41)*(-0x19b*0x10+0x2*0x1337+0x3a*-0x27);function clampStreak(_0x508443){const _0x3c24a3=_0x1ee4;return Math[_0x3c24a3(0x22c,'\x4e\x28\x4b\x36')](Math[_0x3c24a3(0x221,'\x68\x62\x79\x6a')](Number[_0x3c24a3(0x21e,'\x4c\x75\x49\x49')](_0x508443)?_0x508443:0x2dd+0xeb8+0x7*-0x283,-0x1d22+0x11*-0x17d+0xd9c*0x4),MAX_STREAK_CAP);}function qualityScore(_0x3a6db2){const _0xf3a9f2=_0x1ee4,_0x23d0ca=Number[_0xf3a9f2(0x1f8,'\x41\x41\x6f\x42')](Number(_0x3a6db2[_0xf3a9f2(0x1f6,'\x39\x25\x4f\x35')+'\x63\x65']))?Number(_0x3a6db2[_0xf3a9f2(0x237,'\x57\x72\x71\x36')+'\x63\x65']):-0x2b*-0x85+0x8b3+-0x1f0a,_0x4ac725=clampStreak(Number(_0x3a6db2[_0xf3a9f2(0x1ed,'\x59\x62\x49\x7a')+'\x74\x72\x65\x61\x6b'])),_0x1dfd66=Number[_0xf3a9f2(0x1f5,'\x57\x72\x71\x36')](Number(_0x3a6db2[_0xf3a9f2(0x215,'\x4c\x75\x49\x49')+_0xf3a9f2(0x226,'\x31\x5d\x40\x37')]))?Number(_0x3a6db2[_0xf3a9f2(0x20f,'\x49\x73\x73\x4e')+_0xf3a9f2(0x211,'\x35\x5b\x58\x37')]):-0x583+0x1*0x177c+-0x11c7;let _0x193ca3=_0x23d0ca*_0x4ac725*(_0x1dfd66/(0x1441+0x1*-0x1101+-0x2dc));if(Number[_0xf3a9f2(0x216,'\x70\x28\x4b\x5a')](Number(_0x3a6db2[_0xf3a9f2(0x214,'\x4c\x75\x49\x49')])))_0x193ca3*=Math['\x6d\x61\x78'](Number(_0x3a6db2['\x67\x64\x69\x53\x63\x6f\x72\x65']),0x1*-0x17b3+-0x19dd+0x3190);if(Number[_0xf3a9f2(0x1e9,'\x28\x6b\x5d\x76')](Number(_0x3a6db2[_0xf3a9f2(0x238,'\x74\x45\x4e\x57')+'\x61\x74\x65'])))_0x193ca3*=Math['\x6d\x61\x78'](Number(_0x3a6db2[_0xf3a9f2(0x218,'\x39\x46\x45\x40')+_0xf3a9f2(0x220,'\x53\x63\x54\x66')]),0x175*-0x9+0x4*0x73b+-0xfcf);return _0x193ca3;}function signalMatchFactor(_0x403525,_0x4429d9){const _0x18b360=_0x1ee4,_0x3d41e4=tagOverlapScore(_0x403525,{..._0x4429d9[_0x18b360(0x22f,'\x6f\x4e\x64\x63')+_0x18b360(0x228,'\x6f\x5a\x23\x64')]?{'\x73\x69\x67\x6e\x61\x6c\x73\x4d\x61\x74\x63\x68':_0x4429d9[_0x18b360(0x1e8,'\x28\x6b\x5d\x76')+_0x18b360(0x1e4,'\x4b\x37\x36\x6a')]}:{},..._0x4429d9[_0x18b360(0x233,'\x41\x41\x6f\x42')]?{'\x63\x61\x74\x65\x67\x6f\x72\x79':_0x4429d9[_0x18b360(0x1f4,'\x48\x75\x48\x32')]}:{},..._0x4429d9[_0x18b360(0x23e,'\x4e\x28\x4b\x36')]?{'\x73\x75\x6d\x6d\x61\x72\x79':_0x4429d9[_0x18b360(0x22d,'\x48\x61\x6d\x67')]}:{}});return SIGNAL_MATCH_FLOOR+(-0x2383+-0x254f*0x1+-0x67*-0xb5-SIGNAL_MATCH_FLOOR)*Math[_0x18b360(0x1e3,'\x4b\x37\x36\x6a')](Math[_0x18b360(0x1fe,'\x75\x6c\x7a\x72')](_0x3d41e4,-0x47d+-0x7*0x13b+-0x1a*-0x81),-0xe87+0xbfb*0x3+-0x1569*0x1);}function recencyFactor(_0x26c62d,_0x4bc896){const _0x218b2a=_0x1ee4;if(!Number[_0x218b2a(0x1f0,'\x62\x51\x38\x4f')](Number(_0x26c62d[_0x218b2a(0x20e,'\x6f\x4e\x64\x63')+'\x74']))||_0x4bc896===undefined)return-0x2195*0x1+0xb*-0x9a+0x2834;const _0x5d7fbd=_0x4bc896-Number(_0x26c62d['\x75\x70\x64\x61\x74\x65\x64\x41'+'\x74']);if(_0x5d7fbd<=0x19*0x2f+-0x9b2+0x1*0x51b)return 0x1adc+-0x1*-0x2405+-0x1f7*0x20;const _0x13e4e7=_0x5d7fbd/MS_PER_DAY;return Math[_0x218b2a(0x22e,'\x36\x6d\x6e\x49')](0x1990+0x3*0xa5a+-0x389e+0.5,_0x13e4e7/RECENCY_HALF_LIFE_DAYS);}function reuseFactor(_0x29b76d){const _0x478579=_0x1ee4,_0x189194=Number(_0x29b76d[_0x478579(0x20a,'\x23\x69\x4a\x57')+'\x6e\x74']);if(!Number['\x69\x73\x46\x69\x6e\x69\x74\x65'](_0x189194)||_0x189194<=0x328*-0x1+-0xbeb+0x11*0xe3)return-0x3*0xa94+0x1f85*-0x1+-0x2*-0x1fa1;return 0x781*-0x5+0x1*0x1c19+0x96d*0x1+Math[_0x478579(0x1f7,'\x66\x33\x65\x68')](_0x189194)/(-0x1a44+0x1b15+0x15*-0x9);}export function scoreSearchResults(_0x58c4df,_0x22c539,_0x12a15a={}){const _0x298893=_0x1ee4,_0x5dc721=_0x12a15a['\x6e\x6f\x77'],_0x5ef8b6=[];for(const _0x137c1b of _0x22c539){if(_0x298893(0x1e7,'\x4b\x29\x2a\x58')!==_0x298893(0x223,'\x53\x63\x54\x66'))return{'\x61\x63\x74\x69\x6f\x6e':_0x298893(0x230,'\x53\x63\x54\x66')+_0x298893(0x212,'\x57\x46\x5e\x59'),'\x74\x68\x72\x65\x73\x68\x6f\x6c\x64':_0x123c3d,'\x63\x6f\x6e\x73\x69\x64\x65\x72\x65\x64':_0x1c42db[_0x298893(0x1eb,'\x48\x75\x48\x32')]};else{if(!_0x137c1b||typeof _0x137c1b[_0x298893(0x202,'\x4b\x37\x36\x6a')]!==_0x298893(0x21d,'\x5e\x76\x50\x48')||_0x137c1b[_0x298893(0x204,'\x67\x54\x73\x46')][_0x298893(0x1fc,'\x7a\x53\x38\x69')]===-0x1d*0x10d+0x1*0x878+0x1601)continue;const _0x497271=qualityScore(_0x137c1b),_0x35b4c8=signalMatchFactor(_0x58c4df,_0x137c1b),_0x34f297=recencyFactor(_0x137c1b,_0x5dc721),_0x3f12f6=reuseFactor(_0x137c1b),_0x359a08=Number['\x69\x73\x46\x69\x6e\x69\x74\x65'](Number(_0x137c1b[_0x298893(0x208,'\x5e\x40\x77\x69')+_0x298893(0x200,'\x7a\x53\x38\x69')+'\x74\x79']))?Math[_0x298893(0x1fb,'\x77\x35\x6a\x43')](Number(_0x137c1b[_0x298893(0x1f1,'\x66\x23\x49\x58')+_0x298893(0x1f2,'\x4e\x32\x63\x78')+'\x74\x79']),0x1637+0x1135*0x1+0x4*-0x9db):0x1324+0x1*0x1369+0x268d*-0x1,_0xde4978=_0x359a08*SEMANTIC_SIMILARITY_BONUS,_0x17c066=_0x497271*_0x35b4c8*_0x34f297*_0x3f12f6+_0xde4978;_0x5ef8b6[_0x298893(0x209,'\x26\x4e\x38\x41')]({'\x61\x73\x73\x65\x74\x49\x64':_0x137c1b[_0x298893(0x20b,'\x4c\x75\x49\x49')],'\x73\x63\x6f\x72\x65':Math[_0x298893(0x1e5,'\x66\x33\x65\x68')](_0x17c066*(-0x144f+0x3*-0xb03+0x3940))/(-0x139*-0x1d+-0x135*0x14+-0x769),'\x72\x65\x61\x73\x6f\x6e\x73':{'\x71\x75\x61\x6c\x69\x74\x79':_0x497271,'\x73\x69\x67\x6e\x61\x6c\x4d\x61\x74\x63\x68':_0x35b4c8,'\x72\x65\x63\x65\x6e\x63\x79':_0x34f297,'\x73\x65\x6d\x61\x6e\x74\x69\x63\x42\x6f\x6e\x75\x73':_0xde4978,'\x72\x65\x75\x73\x65\x46\x61\x63\x74\x6f\x72':_0x3f12f6},'\x6d\x65\x74\x61\x64\x61\x74\x61':_0x137c1b});}}return _0x5ef8b6[_0x298893(0x229,'\x6f\x5a\x23\x64')]((_0x5015bd,_0x2c8a4e)=>_0x2c8a4e[_0x298893(0x1fa,'\x62\x51\x38\x4f')]-_0x5015bd['\x73\x63\x6f\x72\x65']||(_0x5015bd[_0x298893(0x235,'\x59\x62\x49\x7a')]<_0x2c8a4e[_0x298893(0x203,'\x31\x5d\x40\x37')]?-(-0xb*-0x13+0x487+0x557*-0x1):_0x5015bd['\x61\x73\x73\x65\x74\x49\x64']>_0x2c8a4e[_0x298893(0x1ec,'\x4e\x32\x63\x78')]?-0x1*0x925+0x1284+-0x95e:0xc4c+0x252c+-0x62f*0x8)),_0x5ef8b6;}export function decideReuse(_0x23c200,_0x3d2fe4={}){const _0x2aa976=_0x1ee4,_0x45e368=Number['\x69\x73\x46\x69\x6e\x69\x74\x65'](Number(_0x3d2fe4[_0x2aa976(0x232,'\x74\x53\x31\x35')+'\x64']))&&Number(_0x3d2fe4['\x74\x68\x72\x65\x73\x68\x6f\x6c'+'\x64'])>-0x11a+-0xfd3*-0x2+-0x1*0x1e8c?Number(_0x3d2fe4['\x74\x68\x72\x65\x73\x68\x6f\x6c'+'\x64']):DEFAULT_MIN_REUSE_SCORE,_0x27848a=_0x23c200[_0x2aa976(0x1f9,'\x35\x5b\x58\x37')](_0x483671=>{const _0xa0cc36=_0x2aa976;if(_0xa0cc36(0x1ff,'\x73\x48\x70\x24')==='\x41\x52\x4b\x73\x6f'){const _0x446b35=_0x483671[_0xa0cc36(0x213,'\x31\x5d\x40\x37')]['\x73\x74\x61\x74\x75\x73'];return!_0x446b35||_0x446b35===_0xa0cc36(0x22b,'\x62\x51\x38\x4f');}else return _0x58c474[_0xa0cc36(0x23c,'\x35\x5b\x58\x37')](_0x31af84[_0xa0cc36(0x23b,'\x35\x5b\x58\x37')](_0x44bfd9[_0xa0cc36(0x23d,'\x26\x4e\x38\x41')](_0x3a8214)?_0x3565d8:0x37a*0x1+0x2ea+0x1*-0x664,0x4*0x1eb+0x2*-0xa6d+0xd2f),_0x4f0de0);});let _0x271a59;for(const _0x22aeed of _0x27848a)if(!_0x271a59||_0x22aeed[_0x2aa976(0x234,'\x28\x6b\x5d\x76')]>_0x271a59[_0x2aa976(0x201,'\x31\x5d\x40\x37')])_0x271a59=_0x22aeed;if(!_0x271a59||_0x271a59[_0x2aa976(0x219,'\x41\x41\x6f\x42')]<_0x45e368)return{'\x61\x63\x74\x69\x6f\x6e':_0x2aa976(0x23a,'\x4b\x29\x2a\x58')+_0x2aa976(0x205,'\x21\x64\x5d\x49'),'\x74\x68\x72\x65\x73\x68\x6f\x6c\x64':_0x45e368,'\x63\x6f\x6e\x73\x69\x64\x65\x72\x65\x64':_0x27848a[_0x2aa976(0x225,'\x49\x73\x73\x4e')]};return{'\x61\x63\x74\x69\x6f\x6e':_0x2aa976(0x217,'\x47\x21\x74\x35'),'\x63\x61\x6e\x64\x69\x64\x61\x74\x65':_0x271a59,'\x74\x68\x72\x65\x73\x68\x6f\x6c\x64':_0x45e368,'\x63\x6f\x6e\x73\x69\x64\x65\x72\x65\x64':_0x27848a['\x6c\x65\x6e\x67\x74\x68']};}
|
package/dist/hub/sanitize.js
CHANGED
|
@@ -1,322 +1 @@
|
|
|
1
|
-
// Pre-publish sanitize (ported from v1 src/gep/sanitize.js): before any asset leaves for the hub, deep-redact
|
|
2
|
-
// strings (30+ secret/path/email patterns) and scan for leaks (25 scanners + reverse env-value detection).
|
|
3
|
-
// Pure functions, never throw — the block decision is returned to the chokepoint (bindings), which raises a
|
|
4
|
-
// terminal PublishRejectedError. Command point: when redaction changes content the asset_id MUST be recomputed
|
|
5
|
-
// (computeAssetId excludes asset_id by default), else the published body hash won't match its id and the hub
|
|
6
|
-
// rejects it. See feedback_public_repo_no_internal_leak.
|
|
7
|
-
import { computeAssetId } from '../wire/index.js';
|
|
8
|
-
export const REDACTED = '[REDACTED]';
|
|
9
|
-
/** Redaction patterns (ported verbatim from v1, 30 entries). A match is replaced with [REDACTED]. */
|
|
10
|
-
const REDACT_PATTERNS = [
|
|
11
|
-
// API keys & tokens (generic)
|
|
12
|
-
/Bearer\s+[A-Za-z0-9-._~+/]+=*/g,
|
|
13
|
-
/"?node_secret"?\s*[:=]\s*["']?[A-Za-z0-9-._~+/]{16,}["']?/gi,
|
|
14
|
-
/sk-[A-Za-z0-9]{20,}/g,
|
|
15
|
-
/"?token"?[=:]\s*["']?[A-Za-z0-9-._~+/]{16,}["']?/gi,
|
|
16
|
-
/api[_-]?key[=:]\s*["']?[A-Za-z0-9-._~+/]{16,}["']?/gi,
|
|
17
|
-
/secret[=:]\s*["']?[A-Za-z0-9-._~+/]{16,}["']?/gi,
|
|
18
|
-
/password[=:]\s*["']?[^\s"',;)}\]]{6,}["']?/gi,
|
|
19
|
-
// GitHub tokens (ghp_, gho_, ghu_, ghs_, ghr_, github_pat_)
|
|
20
|
-
/ghp_[A-Za-z0-9]{36,}/g,
|
|
21
|
-
/gho_[A-Za-z0-9]{36,}/g,
|
|
22
|
-
/ghu_[A-Za-z0-9]{36,}/g,
|
|
23
|
-
/ghs_[A-Za-z0-9]{36,}/g,
|
|
24
|
-
/ghr_[A-Za-z0-9]{36,}/g,
|
|
25
|
-
/github_pat_[A-Za-z0-9_]{22,}/g,
|
|
26
|
-
// AWS access keys
|
|
27
|
-
/AKIA[0-9A-Z]{16}/g,
|
|
28
|
-
// OpenAI / Anthropic tokens
|
|
29
|
-
/sk-proj-[A-Za-z0-9-_]{20,}/g,
|
|
30
|
-
/sk-ant-[A-Za-z0-9-_]{20,}/g,
|
|
31
|
-
// npm tokens
|
|
32
|
-
/npm_[A-Za-z0-9]{36,}/g,
|
|
33
|
-
// Slack tokens (bot/user/app/refresh/verification)
|
|
34
|
-
/xox[baprsv]-[A-Za-z0-9-]{10,}/g,
|
|
35
|
-
// JSON Web Tokens (header.payload.signature)
|
|
36
|
-
/eyJ[A-Za-z0-9_-]+\.eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]{20,}/g,
|
|
37
|
-
// Azure storage connection strings (redact the key field only)
|
|
38
|
-
/AccountKey=[^;\s]+/gi,
|
|
39
|
-
// Azure AD client secret + App Insights instrumentation key (value only)
|
|
40
|
-
/client_secret=[A-Za-z0-9~._-]{8,}/gi,
|
|
41
|
-
/instrumentationkey=[0-9a-fA-F-]{20,}/gi,
|
|
42
|
-
// Discord bot tokens: three base64url segments (uppercase leading char avoids matching dotted lowercase identifiers).
|
|
43
|
-
/\b[MNO][A-Za-z0-9_-]{23,}\.[A-Za-z0-9_-]{6}\.[A-Za-z0-9_-]{27,}\b/g,
|
|
44
|
-
// Private keys
|
|
45
|
-
/-----BEGIN\s+(?:RSA\s+|EC\s+|DSA\s+|OPENSSH\s+)?PRIVATE\s+KEY-----[\s\S]*?-----END\s+(?:RSA\s+|EC\s+|DSA\s+|OPENSSH\s+)?PRIVATE\s+KEY-----/g,
|
|
46
|
-
// Basic auth in URLs (redact only credentials, keep :// and @)
|
|
47
|
-
/(?<=:\/\/)[^@\s]+:[^@\s]+(?=@)/g,
|
|
48
|
-
// Email addresses
|
|
49
|
-
/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/g,
|
|
50
|
-
// .env file references — only when the dot-env token looks like a real path (preceded by a path separator) or
|
|
51
|
-
// carries a suffix like `.env.production`. Bare prose mentions such as "Read from `.env` file" are intentionally
|
|
52
|
-
// NOT matched: the filename itself is a convention, not a secret, and over-redacting it strips useful debugging
|
|
53
|
-
// context from capsules without protecting anything the patterns above don't already cover (keys/tokens inside
|
|
54
|
-
// the env file). Ported from v1 src/gep/sanitize.js (PR #151).
|
|
55
|
-
/\.env\.[a-zA-Z]+\b/g,
|
|
56
|
-
/(?<=[\\/])\.env\b/g,
|
|
57
|
-
];
|
|
58
|
-
// Post-filter allowlist (ported from v1 src/gep/sanitize.js, PR #151): strings the patterns above — and the path
|
|
59
|
-
// anonymizer below — WILL catch but that are not actually sensitive. If any entry matches a captured string it is
|
|
60
|
-
// kept verbatim instead of being redacted / anonymized / flagged as a leak. Keeping this as a post-filter rather
|
|
61
|
-
// than bolting more lookaheads into every pattern keeps the patterns readable and the carve-outs easy to audit.
|
|
62
|
-
const REDACT_ALLOWLIST = [
|
|
63
|
-
// --- CI runner paths --- (well-known build infrastructure, no user PII)
|
|
64
|
-
/^\/home\/runner(?:[/]|$)/, // GitHub Actions Linux
|
|
65
|
-
/^\/Users\/runner(?:[/]|$)/, // GitHub Actions macOS
|
|
66
|
-
/^\/home\/circleci(?:[/]|$)/, // CircleCI Linux
|
|
67
|
-
/^\/Users\/distiller(?:[/]|$)/, // CircleCI macOS
|
|
68
|
-
/^\/home\/vsts(?:[/]|$)/, // Azure Pipelines
|
|
69
|
-
/^\/home\/travis(?:[/]|$)/, // Travis CI
|
|
70
|
-
/^\/home\/jenkins(?:[/]|$)/, // Jenkins default
|
|
71
|
-
// --- Bot / no-reply / SSH-alias addresses --- (not personal mailboxes)
|
|
72
|
-
// The domain MUST be anchored to a well-known public code host. An open noreply@<anything> allowlist would leak
|
|
73
|
-
// internal corp infra domains like noreply@internal-codename.corp (Bugbot PR #151 Low).
|
|
74
|
-
/^(?:noreply|no-reply|donotreply|do-not-reply)@(?:github\.com|users\.noreply\.github\.com|gitlab\.com|bitbucket\.org|npmjs\.com|claude\.ai|anthropic\.com)$/i,
|
|
75
|
-
/^[0-9]+\+[a-zA-Z0-9._-]+@users\.noreply\.github\.com$/i, // GitHub commit-author noreply (full digits+user form)
|
|
76
|
-
// The ssh_target scanner's local part is [a-zA-Z0-9_.-]{1,64} (no `+`), so `8275028+user@users.noreply.github.com`
|
|
77
|
-
// is captured as just `user@users.noreply.github.com` — the full-form anchor above can't match the truncated
|
|
78
|
-
// value. Allow any local part on this domain since the domain itself is by design non-personal (Bugbot PR #151
|
|
79
|
-
// round 2 Medium).
|
|
80
|
-
/^[a-zA-Z0-9_.-]+@users\.noreply\.github\.com$/i,
|
|
81
|
-
/^git@github\.com$/i, // SSH alias, not a real mailbox
|
|
82
|
-
/^git@gitlab\.com$/i,
|
|
83
|
-
/^git@bitbucket\.org$/i,
|
|
84
|
-
];
|
|
85
|
-
function isAllowlisted(match) {
|
|
86
|
-
for (const re of REDACT_ALLOWLIST)
|
|
87
|
-
if (re.test(match))
|
|
88
|
-
return true;
|
|
89
|
-
return false;
|
|
90
|
-
}
|
|
91
|
-
// Anonymize (not redact) local filesystem paths (#12): a file path is usually the gene's CONTENT ("fix
|
|
92
|
-
// ~/proj/src/auth.ts"), not a secret — only the user/home prefix is PII. Strip the prefix to `~`, keeping the
|
|
93
|
-
// rest of the path so the shared experience stays useful, instead of [REDACTED]-ing the whole thing.
|
|
94
|
-
const ANONYMIZE_PATTERNS = [
|
|
95
|
-
[/\/(?:home|Users)\/[^/\s"',;)}\]]+/g, '~'], // /home/alice/proj → ~/proj
|
|
96
|
-
[/[A-Za-z]:\\Users\\[^\\/\s"',;)}\]]+/g, '~'], // C:\Users\alice\proj → ~\proj
|
|
97
|
-
];
|
|
98
|
-
/** Apply every redaction pattern (secrets → [REDACTED]) then anonymize local paths (~/...) to a single string. */
|
|
99
|
-
export function redactString(s) {
|
|
100
|
-
if (typeof s !== 'string' || !s)
|
|
101
|
-
return s;
|
|
102
|
-
let out = s;
|
|
103
|
-
for (const p of REDACT_PATTERNS) {
|
|
104
|
-
p.lastIndex = 0;
|
|
105
|
-
out = out.replace(p, (m) => (isAllowlisted(m) ? m : REDACTED));
|
|
106
|
-
}
|
|
107
|
-
for (const [p, rep] of ANONYMIZE_PATTERNS) {
|
|
108
|
-
p.lastIndex = 0;
|
|
109
|
-
out = out.replace(p, (m) => (isAllowlisted(m) ? m : rep));
|
|
110
|
-
}
|
|
111
|
-
return out;
|
|
112
|
-
}
|
|
113
|
-
/** Deep redaction: recursively redact string values in objects/arrays (keys untouched). Returns a copy; does not mutate the input. */
|
|
114
|
-
export function redactDeep(v) {
|
|
115
|
-
if (typeof v === 'string')
|
|
116
|
-
return redactString(v);
|
|
117
|
-
if (Array.isArray(v))
|
|
118
|
-
return v.map((x) => redactDeep(x));
|
|
119
|
-
if (v && typeof v === 'object') {
|
|
120
|
-
const out = {};
|
|
121
|
-
for (const [k, val] of Object.entries(v))
|
|
122
|
-
out[k] = redactDeep(val);
|
|
123
|
-
return out;
|
|
124
|
-
}
|
|
125
|
-
return v;
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* Redact a single asset and RECOMPUTE its asset_id (command point). When redaction changes content, the id must
|
|
129
|
-
* change with it, otherwise the published body and id disagree. computeAssetId excludes the asset_id field by
|
|
130
|
-
* default; on the rare null return we fall back to the original id.
|
|
131
|
-
*/
|
|
132
|
-
export function sanitizeAsset(asset) {
|
|
133
|
-
const redacted = redactDeep(asset);
|
|
134
|
-
const id = computeAssetId(redacted);
|
|
135
|
-
return { ...redacted, asset_id: id ?? asset.asset_id };
|
|
136
|
-
}
|
|
137
|
-
/** Leak scanners (ported verbatim from v1, 25 entries): each match yields an env-var replacement suggestion. */
|
|
138
|
-
const LEAK_SCANNERS = [
|
|
139
|
-
{ type: 'api_key', pattern: /sk-[A-Za-z0-9]{20,}/g, suggest: 'process.env.OPENAI_API_KEY' },
|
|
140
|
-
{ type: 'api_key', pattern: /sk-proj-[A-Za-z0-9-_]{20,}/g, suggest: 'process.env.OPENAI_API_KEY' },
|
|
141
|
-
{ type: 'api_key', pattern: /sk-ant-[A-Za-z0-9-_]{20,}/g, suggest: 'process.env.ANTHROPIC_API_KEY' },
|
|
142
|
-
{ type: 'api_key', pattern: /AKIA[0-9A-Z]{16}/g, suggest: 'process.env.AWS_ACCESS_KEY_ID' },
|
|
143
|
-
{ type: 'github_token', pattern: /gh(?:p|o|u|s|r)_[A-Za-z0-9]{36,}/g, suggest: 'process.env.GITHUB_TOKEN' },
|
|
144
|
-
{ type: 'github_token', pattern: /github_pat_[A-Za-z0-9_]{22,}/g, suggest: 'process.env.GITHUB_TOKEN' },
|
|
145
|
-
{ type: 'npm_token', pattern: /npm_[A-Za-z0-9]{36,}/g, suggest: 'process.env.NPM_TOKEN' },
|
|
146
|
-
{ type: 'slack_token', pattern: /xox[baprsv]-[A-Za-z0-9-]{10,}/g, suggest: 'process.env.SLACK_TOKEN' },
|
|
147
|
-
{ type: 'jwt', pattern: /eyJ[A-Za-z0-9_-]+\.eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]{20,}/g, suggest: 'process.env.JWT' },
|
|
148
|
-
{ type: 'azure_key', pattern: /AccountKey=[^;\s]+/gi, suggest: 'process.env.AZURE_STORAGE_KEY' },
|
|
149
|
-
{ type: 'azure_client_secret', pattern: /client_secret=[A-Za-z0-9~._-]{8,}/gi, suggest: 'process.env.AZURE_CLIENT_SECRET' },
|
|
150
|
-
{ type: 'azure_instrumentation_key', pattern: /instrumentationkey=[0-9a-fA-F-]{20,}/gi, suggest: 'process.env.APPINSIGHTS_INSTRUMENTATIONKEY' },
|
|
151
|
-
{ type: 'discord_token', pattern: /\b[MNO][A-Za-z0-9_-]{23,}\.[A-Za-z0-9_-]{6}\.[A-Za-z0-9_-]{27,}\b/g, suggest: 'process.env.DISCORD_TOKEN' },
|
|
152
|
-
{ type: 'bearer_token', pattern: /Bearer\s+[A-Za-z0-9-._~+/]{20,}=*/g, suggest: 'process.env.AUTH_TOKEN' },
|
|
153
|
-
{ type: 'proxy_token', pattern: /"?token"?[=:]\s*["']?[A-Za-z0-9-._~+/]{16,}["']?/gi, suggest: 'proxy token (ephemeral, stored in settings.json)' },
|
|
154
|
-
{ type: 'private_key', pattern: /-----BEGIN\s+(?:RSA\s+|EC\s+|DSA\s+|OPENSSH\s+)?PRIVATE\s+KEY-----/g, suggest: 'process.env.PRIVATE_KEY_PATH' },
|
|
155
|
-
{ type: 'db_url', pattern: /(?:mongodb|postgres|postgresql|mysql|redis|amqp):\/\/[^\s"',;)}\]]{10,}/gi, suggest: 'process.env.DATABASE_URL' },
|
|
156
|
-
{ type: 'local_path', pattern: /\/home\/[a-zA-Z0-9_.-]+\//g, suggest: 'process.env.HOME' },
|
|
157
|
-
{ type: 'local_path', pattern: /\/Users\/[a-zA-Z0-9_.-]+\//g, suggest: 'process.env.HOME' },
|
|
158
|
-
{ type: 'local_path', pattern: /[A-Z]:\\Users\\[a-zA-Z0-9_.-]+\\/g, suggest: 'process.env.USERPROFILE' },
|
|
159
|
-
{ type: 'internal_ip', pattern: /\b(?:10\.\d{1,3}\.\d{1,3}\.\d{1,3}|172\.(?:1[6-9]|2\d|3[01])\.\d{1,3}\.\d{1,3}|192\.168\.\d{1,3}\.\d{1,3})(?::\d{2,5})?\b/g, suggest: 'process.env.SERVICE_HOST' },
|
|
160
|
-
// Bounded quantifiers ({1,64}/{1,255}/{2,24}) instead of unbounded `+`: the unbounded user/host classes against
|
|
161
|
-
// a required `@`/`.` anchor backtrack O(n^2) on long untrusted hub content (100k took ~6s — a real ReDoS, #198).
|
|
162
|
-
// The bounds cover every realistic ssh target (usernames <=64, hosts <=255, TLDs <=24) and make the scan linear.
|
|
163
|
-
{ type: 'ssh_target', pattern: /[a-zA-Z0-9_.-]{1,64}@(?:(?:\d{1,3}\.){3}\d{1,3}|[a-zA-Z0-9.-]{1,255}\.[a-zA-Z]{2,24})/g, suggest: 'process.env.SSH_HOST' },
|
|
164
|
-
{ type: 'password', pattern: /password[=:]\s*["']?[^\s"',;)}\]]{6,}["']?/gi, suggest: 'process.env.PASSWORD' },
|
|
165
|
-
{ type: 'secret', pattern: /secret[=:]\s*["']?[A-Za-z0-9-._~+/]{16,}["']?/gi, suggest: 'process.env.SECRET' },
|
|
166
|
-
{ type: 'basic_auth', pattern: /:\/\/[^@\s:]+:[^@\s]+@/g, suggest: 'process.env.SERVICE_URL' },
|
|
167
|
-
];
|
|
168
|
-
/** Env keys skipped by the reverse-value scan (non-sensitive; ported verbatim from v1). */
|
|
169
|
-
const ENV_SCAN_SKIP_KEYS = new Set([
|
|
170
|
-
'PATH', 'HOME', 'SHELL', 'TERM', 'LANG', 'USER', 'LOGNAME',
|
|
171
|
-
'PWD', 'OLDPWD', 'SHLVL', 'HOSTNAME', 'DISPLAY', 'EDITOR',
|
|
172
|
-
'PAGER', 'LESS', 'LS_COLORS', 'COLORTERM', 'TERM_PROGRAM',
|
|
173
|
-
'XDG_SESSION_ID', 'XDG_RUNTIME_DIR', 'DBUS_SESSION_BUS_ADDRESS',
|
|
174
|
-
'SSH_AUTH_SOCK', 'SSH_AGENT_PID', '_',
|
|
175
|
-
]);
|
|
176
|
-
const ENV_VALUE_FILESYSTEM_PATH_RE = /^(\/|[A-Za-z]:\\)/;
|
|
177
|
-
const ENV_VALUE_URL_RE = /^[a-z][a-z0-9+.-]*:\/\//i;
|
|
178
|
-
const SENSITIVE_ENV_KEY_PARTS = new Set([
|
|
179
|
-
'WEBHOOK', 'TOKEN', 'SECRET', 'PASSWORD', 'PASS', 'PASSWD', 'PASSPHRASE',
|
|
180
|
-
'KEY', 'CREDENTIAL', 'CREDENTIALS', 'SIGNATURE', 'SIGNED', 'DSN', 'BEARER',
|
|
181
|
-
'COOKIE', 'SESSION', 'CERT', 'CERTIFICATE',
|
|
182
|
-
]);
|
|
183
|
-
const SENSITIVE_ENV_KEY_RE = /WEBHOOK|TOKEN|SECRET|PASSWORD|CREDENTIAL|SIGNATURE|SIGNED|DSN|BEARER|COOKIE|SESSION|APIKEY|ACCESSKEY|PRIVATEKEY|CERTIFICATE/;
|
|
184
|
-
const HIGH_RISK_URL_QUERY_KEYS = new Set([
|
|
185
|
-
'token', 'access_token', 'auth', 'authorization', 'api_key', 'apikey', 'key',
|
|
186
|
-
'secret', 'signature', 'sig', 'signed', 'x-amz-signature', 'x-amz-credential',
|
|
187
|
-
'x-amz-security-token', 'x-goog-signature', 'x-goog-credential',
|
|
188
|
-
'sharedaccesssignature',
|
|
189
|
-
]);
|
|
190
|
-
function normalizeEnvKey(key) {
|
|
191
|
-
const normalized = key.toUpperCase().replace(/[^A-Z0-9]+/g, '_').replace(/^_+|_+$/g, '');
|
|
192
|
-
return normalized || key.toUpperCase();
|
|
193
|
-
}
|
|
194
|
-
function isFilesystemPathEnvValue(value) {
|
|
195
|
-
return ENV_VALUE_FILESYSTEM_PATH_RE.test(value);
|
|
196
|
-
}
|
|
197
|
-
function isUrlEnvValue(value) {
|
|
198
|
-
return ENV_VALUE_URL_RE.test(value);
|
|
199
|
-
}
|
|
200
|
-
function isSensitiveEnvKey(key) {
|
|
201
|
-
const normalized = normalizeEnvKey(key);
|
|
202
|
-
const parts = normalized.split(/[^A-Z0-9]+/).filter(Boolean);
|
|
203
|
-
if (parts.some((part) => SENSITIVE_ENV_KEY_PARTS.has(part)))
|
|
204
|
-
return true;
|
|
205
|
-
return SENSITIVE_ENV_KEY_RE.test(normalized);
|
|
206
|
-
}
|
|
207
|
-
function isHighRiskUrlEnvValue(value) {
|
|
208
|
-
if (!isUrlEnvValue(value))
|
|
209
|
-
return false;
|
|
210
|
-
let parsed;
|
|
211
|
-
try {
|
|
212
|
-
parsed = new URL(value);
|
|
213
|
-
}
|
|
214
|
-
catch {
|
|
215
|
-
return false;
|
|
216
|
-
}
|
|
217
|
-
if (parsed.username || parsed.password)
|
|
218
|
-
return true;
|
|
219
|
-
const hostname = parsed.hostname.toLowerCase();
|
|
220
|
-
const pathname = parsed.pathname.toLowerCase();
|
|
221
|
-
if (/(^|\.)hooks?\./.test(hostname) || /(^|\.)webhooks?\./.test(hostname))
|
|
222
|
-
return true;
|
|
223
|
-
if (/\/(?:api\/)?webhooks?\//.test(pathname) || /\/hooks?\//.test(pathname))
|
|
224
|
-
return true;
|
|
225
|
-
if (/\/(?:tokens?|secrets?|signed|signatures?|credentials?)\//.test(pathname))
|
|
226
|
-
return true;
|
|
227
|
-
for (const queryKey of parsed.searchParams.keys()) {
|
|
228
|
-
if (HIGH_RISK_URL_QUERY_KEYS.has(queryKey.toLowerCase()))
|
|
229
|
-
return true;
|
|
230
|
-
}
|
|
231
|
-
return false;
|
|
232
|
-
}
|
|
233
|
-
function shouldSkipEnvValueReverseScan(key, value) {
|
|
234
|
-
if (isSensitiveEnvKey(key))
|
|
235
|
-
return false;
|
|
236
|
-
if (isFilesystemPathEnvValue(value))
|
|
237
|
-
return true;
|
|
238
|
-
if (isUrlEnvValue(value) && !isHighRiskUrlEnvValue(value))
|
|
239
|
-
return true;
|
|
240
|
-
return false;
|
|
241
|
-
}
|
|
242
|
-
const clip = (s) => (s.length > 60 ? s.slice(0, 57) + '...' : s);
|
|
243
|
-
/** Pattern-scan content for sensitive info. Does not mutate content; returns a structured result. */
|
|
244
|
-
export function scanForLeaks(content) {
|
|
245
|
-
if (typeof content !== 'string' || !content)
|
|
246
|
-
return { found: false, leaks: [] };
|
|
247
|
-
const leaks = [];
|
|
248
|
-
const seen = new Set();
|
|
249
|
-
for (const scanner of LEAK_SCANNERS) {
|
|
250
|
-
scanner.pattern.lastIndex = 0;
|
|
251
|
-
let m;
|
|
252
|
-
while ((m = scanner.pattern.exec(content)) !== null) {
|
|
253
|
-
const val = m[0];
|
|
254
|
-
// Apply the same allowlist redactString uses: CI runner roots and bot/no-reply/SSH-alias addresses are not
|
|
255
|
-
// leaks. Without this, strict-mode sanitizeBundle would block a publish over a `/home/runner/` path or
|
|
256
|
-
// `noreply@github.com` (an ssh_target) — exactly the false positives the allowlist exists to fix, and a
|
|
257
|
-
// contradiction with redactString, which keeps them verbatim (Bugbot PR #151 Medium).
|
|
258
|
-
if (isAllowlisted(val))
|
|
259
|
-
continue;
|
|
260
|
-
const key = scanner.type + ':' + val;
|
|
261
|
-
if (seen.has(key))
|
|
262
|
-
continue;
|
|
263
|
-
seen.add(key);
|
|
264
|
-
leaks.push({ type: scanner.type, value: clip(val), suggestion: scanner.suggest });
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
return { found: leaks.length > 0, leaks };
|
|
268
|
-
}
|
|
269
|
-
/** Reverse detection: if any process.env value (>=8 chars) appears verbatim in content, an env value was hardcoded and should be replaced with the env reference. */
|
|
270
|
-
export function detectEnvValueLeaks(content, env) {
|
|
271
|
-
if (typeof content !== 'string' || !content)
|
|
272
|
-
return [];
|
|
273
|
-
const leaks = [];
|
|
274
|
-
for (const [key, val] of Object.entries(env)) {
|
|
275
|
-
if (!val || val.length < 8)
|
|
276
|
-
continue;
|
|
277
|
-
if (ENV_SCAN_SKIP_KEYS.has(normalizeEnvKey(key)))
|
|
278
|
-
continue;
|
|
279
|
-
// Env paths and ordinary URLs are often reproducible runtime metadata; sensitive keys and high-risk URLs still scan.
|
|
280
|
-
if (shouldSkipEnvValueReverseScan(key, val))
|
|
281
|
-
continue;
|
|
282
|
-
if (content.includes(val))
|
|
283
|
-
leaks.push({ type: 'env_value_leak', value: REDACTED, suggestion: 'process.env.' + key });
|
|
284
|
-
}
|
|
285
|
-
return leaks;
|
|
286
|
-
}
|
|
287
|
-
/** Full leak check: pattern scan + reverse env-value detection. */
|
|
288
|
-
export function fullLeakCheck(content, env) {
|
|
289
|
-
const scan = scanForLeaks(content);
|
|
290
|
-
const envLeaks = detectEnvValueLeaks(content, env);
|
|
291
|
-
const all = scan.leaks.concat(envLeaks);
|
|
292
|
-
return { found: all.length > 0, leaks: all };
|
|
293
|
-
}
|
|
294
|
-
/** Leak types that are PII (anonymized, not credentials) and so must NOT hard-block a strict publish (#12). */
|
|
295
|
-
const PII_ONLY_LEAK_TYPES = new Set(['local_path']);
|
|
296
|
-
/** Read the leak-check mode from env (EVOLVER_LEAK_CHECK, default strict, matching v1). */
|
|
297
|
-
export function leakCheckModeFromEnv(env) {
|
|
298
|
-
const v = (env['EVOLVER_LEAK_CHECK'] ?? '').toLowerCase();
|
|
299
|
-
return v === 'warn' || v === 'off' ? v : 'strict';
|
|
300
|
-
}
|
|
301
|
-
/**
|
|
302
|
-
* Pre-publish sanitize of a bundle (pure, never throws):
|
|
303
|
-
* 1) mode != off: scan the ORIGINAL (pre-redaction) content for leaks; strict + found → blocked=true (chokepoint refuses); warn → flag only.
|
|
304
|
-
* 2) REGARDLESS of mode, always deep-redact every asset + recompute asset_id (the leak-proof floor; off only skips the scan, not the redaction).
|
|
305
|
-
*/
|
|
306
|
-
export function sanitizeBundle(bundle, opts) {
|
|
307
|
-
const mode = opts.mode ?? leakCheckModeFromEnv(opts.env);
|
|
308
|
-
let leaks = [];
|
|
309
|
-
if (mode !== 'off') {
|
|
310
|
-
const combined = bundle.map((a) => JSON.stringify(a)).join('');
|
|
311
|
-
leaks = fullLeakCheck(combined, opts.env).leaks;
|
|
312
|
-
}
|
|
313
|
-
// #12: a bare local path is PII (anonymized to ~/ by the redaction floor), not a credential — it must not
|
|
314
|
-
// hard-block a publish in strict mode. Real secrets (everything else) still block. Path leaks stay reported.
|
|
315
|
-
const blocked = mode === 'strict' && leaks.some((l) => !PII_ONLY_LEAK_TYPES.has(l.type));
|
|
316
|
-
const sanitized = bundle.map((a) => sanitizeAsset(a));
|
|
317
|
-
return { bundle: sanitized, blocked, leaks, mode };
|
|
318
|
-
}
|
|
319
|
-
/** Collapse a leak list into a one-line human-readable summary (for logs / rejection reason). */
|
|
320
|
-
export function summarizeLeaks(leaks) {
|
|
321
|
-
return leaks.map((l) => `${l.type}→${l.suggestion}`).join('; ');
|
|
322
|
-
}
|
|
1
|
+
const _0x3098bb=_0x2d1b;(function(_0x57efb7,_0x1d03e7){const _0x61274e=_0x2d1b,_0x579ee5=_0x57efb7();while(!![]){try{const _0x40dc49=-parseInt(_0x61274e(0x2f6,'\x70\x73\x51\x6a'))/(-0x1*0x107b+0x4e8+-0xf7*-0xc)*(parseInt(_0x61274e(0x20e,'\x55\x65\x4b\x40'))/(-0xb04+-0x26c9+0x31cf))+parseInt(_0x61274e(0x2d4,'\x25\x78\x37\x21'))/(-0x21c3+-0x1*-0xcc9+-0x3*-0x6ff)+parseInt(_0x61274e(0x2e2,'\x43\x32\x4a\x54'))/(0x199a+-0x721+-0x1275)*(-parseInt(_0x61274e(0x219,'\x6e\x32\x59\x42'))/(0x2*0x17e+0x18b7+-0x1bae))+-parseInt(_0x61274e(0x1fe,'\x70\x73\x51\x6a'))/(-0x1117+-0xdd*-0x29+-0x1248)*(parseInt(_0x61274e(0x22f,'\x7a\x63\x37\x64'))/(0x142a+0xa48+-0x1e6b))+parseInt(_0x61274e(0x2da,'\x78\x77\x46\x55'))/(0x16b2+0x6*-0x596+0xada)+-parseInt(_0x61274e(0x245,'\x78\x77\x46\x55'))/(0x2*-0x121d+0x1*-0x1a15+0x3e58)+parseInt(_0x61274e(0x21b,'\x55\x65\x4b\x40'))/(0x8*-0x42+0x1844+-0x162a);if(_0x40dc49===_0x1d03e7)break;else _0x579ee5['push'](_0x579ee5['shift']());}catch(_0x2bded3){_0x579ee5['push'](_0x579ee5['shift']());}}}(_0x3cbb,-0x173b4+0x152ad8+0x2*-0x44081));import{computeAssetId}from'\x2e\x2e\x2f\x77\x69\x72\x65\x2f\x69\x6e\x64\x65\x78\x2e\x6a\x73';export const REDACTED='\x5b\x52\x45\x44\x41\x43\x54\x45'+'\x44\x5d';const REDACT_PATTERNS=[/Bearer\s+[A-Za-z0-9-._~+/]+=*/g,/"?node_secret"?\s*[:=]\s*["']?[A-Za-z0-9-._~+/]{16,}["']?/gi,/sk-[A-Za-z0-9]{20,}/g,/"?token"?[=:]\s*["']?[A-Za-z0-9-._~+/]{16,}["']?/gi,/api[_-]?key[=:]\s*["']?[A-Za-z0-9-._~+/]{16,}["']?/gi,/secret[=:]\s*["']?[A-Za-z0-9-._~+/]{16,}["']?/gi,/password[=:]\s*["']?[^\s"',;)}\]]{6,}["']?/gi,/ghp_[A-Za-z0-9]{36,}/g,/gho_[A-Za-z0-9]{36,}/g,/ghu_[A-Za-z0-9]{36,}/g,/ghs_[A-Za-z0-9]{36,}/g,/ghr_[A-Za-z0-9]{36,}/g,/github_pat_[A-Za-z0-9_]{22,}/g,/AKIA[0-9A-Z]{16}/g,/sk-proj-[A-Za-z0-9-_]{20,}/g,/sk-ant-[A-Za-z0-9-_]{20,}/g,/npm_[A-Za-z0-9]{36,}/g,/xox[baprsv]-[A-Za-z0-9-]{10,}/g,/eyJ[A-Za-z0-9_-]+\.eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]{20,}/g,/AccountKey=[^;\s]+/gi,/client_secret=[A-Za-z0-9~._-]{8,}/gi,/instrumentationkey=[0-9a-fA-F-]{20,}/gi,/\b[MNO][A-Za-z0-9_-]{23,}\.[A-Za-z0-9_-]{6}\.[A-Za-z0-9_-]{27,}\b/g,/-----BEGIN\s+(?:RSA\s+|EC\s+|DSA\s+|OPENSSH\s+)?PRIVATE\s+KEY-----[\s\S]*?-----END\s+(?:RSA\s+|EC\s+|DSA\s+|OPENSSH\s+)?PRIVATE\s+KEY-----/g,/(?<=:\/\/)[^@\s]+:[^@\s]+(?=@)/g,/[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}/g,/\.env\.[a-zA-Z]+\b/g,/(?<=[\\/])\.env\b/g],REDACT_ALLOWLIST=[/^\/home\/runner(?:[/]|$)/,/^\/Users\/runner(?:[/]|$)/,/^\/home\/circleci(?:[/]|$)/,/^\/Users\/distiller(?:[/]|$)/,/^\/home\/vsts(?:[/]|$)/,/^\/home\/travis(?:[/]|$)/,/^\/home\/jenkins(?:[/]|$)/,/^(?:noreply|no-reply|donotreply|do-not-reply)@(?:github\.com|users\.noreply\.github\.com|gitlab\.com|bitbucket\.org|npmjs\.com|claude\.ai|anthropic\.com)$/i,/^[0-9]+\+[a-zA-Z0-9._-]+@users\.noreply\.github\.com$/i,/^[a-zA-Z0-9_.-]+@users\.noreply\.github\.com$/i,/^git@github\.com$/i,/^git@gitlab\.com$/i,/^git@bitbucket\.org$/i];function isAllowlisted(_0x5a29d8){const _0x59e463=_0x2d1b;for(const _0x679747 of REDACT_ALLOWLIST)if(_0x679747[_0x59e463(0x255,'\x70\x73\x51\x6a')](_0x5a29d8))return!![];return![];}const ANONYMIZE_PATTERNS=[[/\/(?:home|Users)\/[^/\s"',;)}\]]+/g,'\x7e'],[/[A-Za-z]:\\Users\\[^\\/\s"',;)}\]]+/g,'\x7e']];export function redactString(_0x2af832){const _0x29b93c=_0x2d1b;if(typeof _0x2af832!==_0x29b93c(0x27c,'\x78\x77\x46\x55')||!_0x2af832)return _0x2af832;let _0x307917=_0x2af832;for(const _0x4e501b of REDACT_PATTERNS){_0x4e501b[_0x29b93c(0x283,'\x61\x61\x33\x30')+'\x78']=-0x11c3*0x2+0x19ca+0x1c*0x59,_0x307917=_0x307917['\x72\x65\x70\x6c\x61\x63\x65'](_0x4e501b,_0x13da0a=>isAllowlisted(_0x13da0a)?_0x13da0a:REDACTED);}for(const [_0x4d647e,_0x12c002]of ANONYMIZE_PATTERNS){_0x4d647e[_0x29b93c(0x2ed,'\x78\x77\x46\x55')+'\x78']=-0x8f0+0x237+0x6b9,_0x307917=_0x307917[_0x29b93c(0x223,'\x55\x6e\x52\x49')](_0x4d647e,_0x16d58f=>isAllowlisted(_0x16d58f)?_0x16d58f:_0x12c002);}return _0x307917;}export function redactDeep(_0xfb9e1b){const _0x477900=_0x2d1b;if(typeof _0xfb9e1b===_0x477900(0x24b,'\x70\x73\x51\x6a'))return redactString(_0xfb9e1b);if(Array[_0x477900(0x29f,'\x7a\x66\x52\x77')](_0xfb9e1b))return _0xfb9e1b['\x6d\x61\x70'](_0x3d870b=>redactDeep(_0x3d870b));if(_0xfb9e1b&&typeof _0xfb9e1b==='\x6f\x62\x6a\x65\x63\x74'){const _0x1fbccf={};for(const [_0x3db804,_0xee3e23]of Object['\x65\x6e\x74\x72\x69\x65\x73'](_0xfb9e1b))_0x1fbccf[_0x3db804]=redactDeep(_0xee3e23);return _0x1fbccf;}return _0xfb9e1b;}export function sanitizeAsset(_0x339403){const _0x3b3667=_0x2d1b,_0x14b982=redactDeep(_0x339403),_0x206a80=computeAssetId(_0x14b982);return{..._0x14b982,'\x61\x73\x73\x65\x74\x5f\x69\x64':_0x206a80??_0x339403[_0x3b3667(0x242,'\x30\x66\x72\x46')]};}const LEAK_SCANNERS=[{'\x74\x79\x70\x65':_0x3098bb(0x2ef,'\x2a\x43\x58\x46'),'\x70\x61\x74\x74\x65\x72\x6e':/sk-[A-Za-z0-9]{20,}/g,'\x73\x75\x67\x67\x65\x73\x74':_0x3098bb(0x2ee,'\x43\x32\x4a\x54')+_0x3098bb(0x266,'\x7a\x63\x37\x64')+_0x3098bb(0x230,'\x40\x39\x46\x63')+'\x45\x59'},{'\x74\x79\x70\x65':_0x3098bb(0x28c,'\x25\x78\x37\x21'),'\x70\x61\x74\x74\x65\x72\x6e':/sk-proj-[A-Za-z0-9-_]{20,}/g,'\x73\x75\x67\x67\x65\x73\x74':_0x3098bb(0x210,'\x7a\x63\x37\x64')+_0x3098bb(0x205,'\x68\x26\x5e\x5d')+_0x3098bb(0x2fd,'\x51\x41\x32\x43')+'\x45\x59'},{'\x74\x79\x70\x65':_0x3098bb(0x2f0,'\x43\x32\x4a\x54'),'\x70\x61\x74\x74\x65\x72\x6e':/sk-ant-[A-Za-z0-9-_]{20,}/g,'\x73\x75\x67\x67\x65\x73\x74':_0x3098bb(0x20d,'\x61\x61\x33\x30')+'\x65\x6e\x76\x2e\x41\x4e\x54\x48'+_0x3098bb(0x29e,'\x4d\x31\x46\x55')+_0x3098bb(0x25e,'\x73\x67\x30\x72')},{'\x74\x79\x70\x65':_0x3098bb(0x275,'\x73\x67\x30\x72'),'\x70\x61\x74\x74\x65\x72\x6e':/AKIA[0-9A-Z]{16}/g,'\x73\x75\x67\x67\x65\x73\x74':_0x3098bb(0x2d9,'\x45\x67\x59\x4b')+_0x3098bb(0x279,'\x4c\x4f\x34\x5d')+_0x3098bb(0x2ad,'\x48\x21\x41\x50')+'\x45\x59\x5f\x49\x44'},{'\x74\x79\x70\x65':_0x3098bb(0x249,'\x4b\x5e\x40\x50')+_0x3098bb(0x237,'\x62\x39\x42\x44'),'\x70\x61\x74\x74\x65\x72\x6e':/gh(?:p|o|u|s|r)_[A-Za-z0-9]{36,}/g,'\x73\x75\x67\x67\x65\x73\x74':'\x70\x72\x6f\x63\x65\x73\x73\x2e'+_0x3098bb(0x217,'\x73\x67\x30\x72')+'\x55\x42\x5f\x54\x4f\x4b\x45\x4e'},{'\x74\x79\x70\x65':_0x3098bb(0x2aa,'\x37\x32\x57\x29')+_0x3098bb(0x23c,'\x78\x77\x46\x55'),'\x70\x61\x74\x74\x65\x72\x6e':/github_pat_[A-Za-z0-9_]{22,}/g,'\x73\x75\x67\x67\x65\x73\x74':_0x3098bb(0x24c,'\x41\x4e\x52\x54')+'\x65\x6e\x76\x2e\x47\x49\x54\x48'+_0x3098bb(0x2d1,'\x34\x61\x6b\x21')},{'\x74\x79\x70\x65':_0x3098bb(0x300,'\x34\x61\x6b\x21')+'\x6e','\x70\x61\x74\x74\x65\x72\x6e':/npm_[A-Za-z0-9]{36,}/g,'\x73\x75\x67\x67\x65\x73\x74':_0x3098bb(0x246,'\x79\x64\x51\x36')+_0x3098bb(0x289,'\x33\x52\x4b\x2a')+_0x3098bb(0x207,'\x79\x64\x51\x36')},{'\x74\x79\x70\x65':_0x3098bb(0x20a,'\x68\x26\x5e\x5d')+_0x3098bb(0x2a9,'\x61\x62\x24\x6c'),'\x70\x61\x74\x74\x65\x72\x6e':/xox[baprsv]-[A-Za-z0-9-]{10,}/g,'\x73\x75\x67\x67\x65\x73\x74':_0x3098bb(0x271,'\x78\x77\x46\x55')+_0x3098bb(0x2fa,'\x55\x6e\x52\x49')+_0x3098bb(0x23e,'\x51\x41\x32\x43')},{'\x74\x79\x70\x65':_0x3098bb(0x256,'\x74\x4b\x67\x5e'),'\x70\x61\x74\x74\x65\x72\x6e':/eyJ[A-Za-z0-9_-]+\.eyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]{20,}/g,'\x73\x75\x67\x67\x65\x73\x74':_0x3098bb(0x290,'\x33\x52\x4b\x2a')+'\x65\x6e\x76\x2e\x4a\x57\x54'},{'\x74\x79\x70\x65':_0x3098bb(0x2b8,'\x37\x32\x57\x29')+'\x79','\x70\x61\x74\x74\x65\x72\x6e':/AccountKey=[^;\s]+/gi,'\x73\x75\x67\x67\x65\x73\x74':_0x3098bb(0x1fd,'\x73\x67\x30\x72')+_0x3098bb(0x2c2,'\x70\x45\x61\x38')+_0x3098bb(0x2d7,'\x51\x41\x32\x43')+_0x3098bb(0x2fe,'\x59\x4c\x51\x63')},{'\x74\x79\x70\x65':_0x3098bb(0x2be,'\x74\x4b\x67\x5e')+_0x3098bb(0x24a,'\x74\x48\x39\x55')+_0x3098bb(0x20f,'\x59\x73\x52\x53'),'\x70\x61\x74\x74\x65\x72\x6e':/client_secret=[A-Za-z0-9~._-]{8,}/gi,'\x73\x75\x67\x67\x65\x73\x74':_0x3098bb(0x201,'\x61\x62\x24\x6c')+_0x3098bb(0x2b2,'\x78\x77\x46\x55')+_0x3098bb(0x227,'\x55\x6e\x52\x49')+_0x3098bb(0x243,'\x74\x48\x39\x55')},{'\x74\x79\x70\x65':'\x61\x7a\x75\x72\x65\x5f\x69\x6e'+_0x3098bb(0x231,'\x79\x64\x51\x36')+_0x3098bb(0x248,'\x45\x67\x59\x4b')+'\x79','\x70\x61\x74\x74\x65\x72\x6e':/instrumentationkey=[0-9a-fA-F-]{20,}/gi,'\x73\x75\x67\x67\x65\x73\x74':_0x3098bb(0x201,'\x61\x62\x24\x6c')+_0x3098bb(0x260,'\x68\x26\x5e\x5d')+_0x3098bb(0x282,'\x70\x45\x61\x38')+_0x3098bb(0x2cf,'\x4b\x5e\x40\x50')+'\x4e\x54\x41\x54\x49\x4f\x4e\x4b'+'\x45\x59'},{'\x74\x79\x70\x65':_0x3098bb(0x2cb,'\x2a\x43\x58\x46')+_0x3098bb(0x244,'\x6d\x48\x79\x59'),'\x70\x61\x74\x74\x65\x72\x6e':/\b[MNO][A-Za-z0-9_-]{23,}\.[A-Za-z0-9_-]{6}\.[A-Za-z0-9_-]{27,}\b/g,'\x73\x75\x67\x67\x65\x73\x74':_0x3098bb(0x2cd,'\x4b\x5e\x40\x50')+_0x3098bb(0x2f5,'\x79\x44\x32\x30')+_0x3098bb(0x25f,'\x70\x73\x51\x6a')+'\x4e'},{'\x74\x79\x70\x65':'\x62\x65\x61\x72\x65\x72\x5f\x74'+_0x3098bb(0x2dd,'\x68\x26\x5e\x5d'),'\x70\x61\x74\x74\x65\x72\x6e':/Bearer\s+[A-Za-z0-9-._~+/]{20,}=*/g,'\x73\x75\x67\x67\x65\x73\x74':_0x3098bb(0x239,'\x76\x37\x2a\x5d')+_0x3098bb(0x25b,'\x61\x62\x24\x6c')+'\x5f\x54\x4f\x4b\x45\x4e'},{'\x74\x79\x70\x65':'\x70\x72\x6f\x78\x79\x5f\x74\x6f'+_0x3098bb(0x1f5,'\x25\x78\x37\x21'),'\x70\x61\x74\x74\x65\x72\x6e':/"?token"?[=:]\s*["']?[A-Za-z0-9-._~+/]{16,}["']?/gi,'\x73\x75\x67\x67\x65\x73\x74':_0x3098bb(0x2e0,'\x4c\x4f\x34\x5d')+_0x3098bb(0x228,'\x25\x78\x37\x21')+'\x65\x6d\x65\x72\x61\x6c\x2c\x20'+'\x73\x74\x6f\x72\x65\x64\x20\x69'+_0x3098bb(0x265,'\x61\x62\x24\x6c')+_0x3098bb(0x291,'\x57\x46\x6f\x52')},{'\x74\x79\x70\x65':_0x3098bb(0x259,'\x45\x32\x30\x6a')+_0x3098bb(0x238,'\x33\x4e\x4b\x4c'),'\x70\x61\x74\x74\x65\x72\x6e':/-----BEGIN\s+(?:RSA\s+|EC\s+|DSA\s+|OPENSSH\s+)?PRIVATE\s+KEY-----/g,'\x73\x75\x67\x67\x65\x73\x74':'\x70\x72\x6f\x63\x65\x73\x73\x2e'+_0x3098bb(0x277,'\x28\x76\x56\x57')+_0x3098bb(0x229,'\x51\x41\x32\x43')+_0x3098bb(0x2f2,'\x77\x33\x31\x2a')},{'\x74\x79\x70\x65':_0x3098bb(0x257,'\x70\x73\x51\x6a'),'\x70\x61\x74\x74\x65\x72\x6e':/(?:mongodb|postgres|postgresql|mysql|redis|amqp):\/\/[^\s"',;)}\]]{10,}/gi,'\x73\x75\x67\x67\x65\x73\x74':_0x3098bb(0x2ab,'\x59\x4c\x51\x63')+'\x65\x6e\x76\x2e\x44\x41\x54\x41'+_0x3098bb(0x27e,'\x55\x65\x4b\x40')},{'\x74\x79\x70\x65':_0x3098bb(0x2e4,'\x57\x46\x6f\x52')+'\x74\x68','\x70\x61\x74\x74\x65\x72\x6e':/\/home\/[a-zA-Z0-9_.-]+\//g,'\x73\x75\x67\x67\x65\x73\x74':_0x3098bb(0x26c,'\x55\x65\x4b\x40')+_0x3098bb(0x2d2,'\x45\x32\x30\x6a')},{'\x74\x79\x70\x65':_0x3098bb(0x2a4,'\x79\x44\x32\x30')+'\x74\x68','\x70\x61\x74\x74\x65\x72\x6e':/\/Users\/[a-zA-Z0-9_.-]+\//g,'\x73\x75\x67\x67\x65\x73\x74':_0x3098bb(0x292,'\x33\x4e\x4b\x4c')+_0x3098bb(0x2f4,'\x64\x72\x34\x63')},{'\x74\x79\x70\x65':_0x3098bb(0x25a,'\x70\x55\x30\x32')+'\x74\x68','\x70\x61\x74\x74\x65\x72\x6e':/[A-Z]:\\Users\\[a-zA-Z0-9_.-]+\\/g,'\x73\x75\x67\x67\x65\x73\x74':_0x3098bb(0x247,'\x70\x45\x61\x38')+_0x3098bb(0x2b0,'\x41\x4e\x52\x54')+'\x50\x52\x4f\x46\x49\x4c\x45'},{'\x74\x79\x70\x65':_0x3098bb(0x297,'\x51\x41\x32\x43')+_0x3098bb(0x2d8,'\x55\x6e\x52\x49'),'\x70\x61\x74\x74\x65\x72\x6e':/\b(?:10\.\d{1,3}\.\d{1,3}\.\d{1,3}|172\.(?:1[6-9]|2\d|3[01])\.\d{1,3}\.\d{1,3}|192\.168\.\d{1,3}\.\d{1,3})(?::\d{2,5})?\b/g,'\x73\x75\x67\x67\x65\x73\x74':_0x3098bb(0x1ff,'\x70\x73\x51\x6a')+_0x3098bb(0x20b,'\x79\x64\x51\x36')+_0x3098bb(0x284,'\x77\x50\x34\x5d')},{'\x74\x79\x70\x65':_0x3098bb(0x27d,'\x55\x65\x4b\x40')+'\x65\x74','\x70\x61\x74\x74\x65\x72\x6e':/[a-zA-Z0-9_.-]{1,64}@(?:(?:\d{1,3}\.){3}\d{1,3}|[a-zA-Z0-9.-]{1,255}\.[a-zA-Z]{2,24})/g,'\x73\x75\x67\x67\x65\x73\x74':_0x3098bb(0x213,'\x7a\x66\x52\x77')+_0x3098bb(0x2c0,'\x4b\x5e\x40\x50')+'\x48\x4f\x53\x54'},{'\x74\x79\x70\x65':_0x3098bb(0x23b,'\x64\x72\x34\x63'),'\x70\x61\x74\x74\x65\x72\x6e':/password[=:]\s*["']?[^\s"',;)}\]]{6,}["']?/gi,'\x73\x75\x67\x67\x65\x73\x74':_0x3098bb(0x2b5,'\x79\x44\x32\x30')+_0x3098bb(0x1f6,'\x57\x46\x6f\x52')+'\x57\x4f\x52\x44'},{'\x74\x79\x70\x65':_0x3098bb(0x2d6,'\x48\x21\x41\x50'),'\x70\x61\x74\x74\x65\x72\x6e':/secret[=:]\s*["']?[A-Za-z0-9-._~+/]{16,}["']?/gi,'\x73\x75\x67\x67\x65\x73\x74':_0x3098bb(0x2cd,'\x4b\x5e\x40\x50')+_0x3098bb(0x24f,'\x6b\x63\x2a\x4e')+'\x45\x54'},{'\x74\x79\x70\x65':_0x3098bb(0x2e9,'\x59\x4c\x51\x63')+'\x74\x68','\x70\x61\x74\x74\x65\x72\x6e':/:\/\/[^@\s:]+:[^@\s]+@/g,'\x73\x75\x67\x67\x65\x73\x74':_0x3098bb(0x1f2,'\x6d\x48\x79\x59')+_0x3098bb(0x272,'\x43\x32\x4a\x54')+'\x49\x43\x45\x5f\x55\x52\x4c'}],ENV_SCAN_SKIP_KEYS=new Set([_0x3098bb(0x1f1,'\x4b\x5e\x40\x50'),_0x3098bb(0x26d,'\x2a\x43\x58\x46'),_0x3098bb(0x2a8,'\x6e\x32\x59\x42'),'\x54\x45\x52\x4d',_0x3098bb(0x2c9,'\x33\x4e\x4b\x4c'),_0x3098bb(0x2a7,'\x7a\x66\x52\x77'),_0x3098bb(0x2b4,'\x64\x72\x34\x63'),_0x3098bb(0x1fb,'\x70\x73\x51\x6a'),_0x3098bb(0x2a6,'\x70\x55\x30\x32'),_0x3098bb(0x23f,'\x61\x62\x24\x6c'),_0x3098bb(0x21f,'\x77\x50\x34\x5d'),_0x3098bb(0x253,'\x5b\x44\x51\x48'),_0x3098bb(0x2b1,'\x76\x37\x2a\x5d'),_0x3098bb(0x2b9,'\x4d\x31\x46\x55'),'\x4c\x45\x53\x53',_0x3098bb(0x232,'\x6d\x48\x79\x59')+'\x53',_0x3098bb(0x23d,'\x45\x32\x30\x6a')+'\x4d',_0x3098bb(0x1f3,'\x73\x67\x30\x72')+_0x3098bb(0x2c8,'\x34\x64\x4e\x6c'),_0x3098bb(0x280,'\x68\x26\x5e\x5d')+_0x3098bb(0x29a,'\x59\x4c\x51\x63'),_0x3098bb(0x22c,'\x77\x50\x34\x5d')+_0x3098bb(0x27a,'\x74\x4b\x67\x5e'),_0x3098bb(0x200,'\x74\x48\x39\x55')+_0x3098bb(0x26e,'\x74\x4b\x67\x5e')+_0x3098bb(0x269,'\x37\x32\x57\x29'),_0x3098bb(0x21d,'\x59\x73\x52\x53')+_0x3098bb(0x24e,'\x79\x64\x51\x36'),_0x3098bb(0x2c5,'\x34\x64\x4e\x6c')+_0x3098bb(0x296,'\x6d\x48\x79\x59'),'\x5f']),ENV_VALUE_FILESYSTEM_PATH_RE=/^(\/|[A-Za-z]:\\)/,ENV_VALUE_URL_RE=/^[a-z][a-z0-9+.-]*:\/\//i,SENSITIVE_ENV_KEY_PARTS=new Set([_0x3098bb(0x2df,'\x70\x45\x61\x38'),'\x54\x4f\x4b\x45\x4e',_0x3098bb(0x2cc,'\x40\x39\x46\x63'),_0x3098bb(0x2eb,'\x45\x67\x59\x4b'),_0x3098bb(0x235,'\x6d\x48\x79\x59'),'\x50\x41\x53\x53\x57\x44',_0x3098bb(0x211,'\x73\x67\x30\x72')+'\x53\x45',_0x3098bb(0x299,'\x77\x33\x31\x2a'),_0x3098bb(0x2bb,'\x28\x76\x56\x57')+'\x41\x4c','\x43\x52\x45\x44\x45\x4e\x54\x49'+_0x3098bb(0x254,'\x59\x4c\x51\x63'),_0x3098bb(0x1f9,'\x34\x61\x6b\x21')+'\x45',_0x3098bb(0x293,'\x62\x39\x42\x44'),_0x3098bb(0x2d3,'\x76\x37\x2a\x5d'),_0x3098bb(0x2d0,'\x45\x67\x59\x4b'),'\x43\x4f\x4f\x4b\x49\x45','\x53\x45\x53\x53\x49\x4f\x4e','\x43\x45\x52\x54','\x43\x45\x52\x54\x49\x46\x49\x43'+'\x41\x54\x45']),SENSITIVE_ENV_KEY_RE=/WEBHOOK|TOKEN|SECRET|PASSWORD|CREDENTIAL|SIGNATURE|SIGNED|DSN|BEARER|COOKIE|SESSION|APIKEY|ACCESSKEY|PRIVATEKEY|CERTIFICATE/,HIGH_RISK_URL_QUERY_KEYS=new Set(['\x74\x6f\x6b\x65\x6e',_0x3098bb(0x26b,'\x41\x4e\x52\x54')+_0x3098bb(0x270,'\x4b\x5e\x40\x50'),_0x3098bb(0x2c3,'\x79\x64\x51\x36'),_0x3098bb(0x215,'\x73\x5e\x79\x52')+_0x3098bb(0x1f4,'\x30\x66\x72\x46'),_0x3098bb(0x2dc,'\x51\x41\x32\x43'),_0x3098bb(0x233,'\x79\x44\x32\x30'),_0x3098bb(0x27f,'\x64\x72\x34\x63'),_0x3098bb(0x28f,'\x33\x52\x4b\x2a'),_0x3098bb(0x281,'\x73\x67\x30\x72')+'\x65',_0x3098bb(0x2e3,'\x33\x52\x4b\x2a'),_0x3098bb(0x2ba,'\x25\x78\x37\x21'),_0x3098bb(0x251,'\x34\x61\x6b\x21')+'\x67\x6e\x61\x74\x75\x72\x65',_0x3098bb(0x209,'\x5b\x44\x51\x48')+_0x3098bb(0x2a2,'\x77\x50\x34\x5d'),_0x3098bb(0x2bf,'\x74\x48\x39\x55')+_0x3098bb(0x26f,'\x7a\x66\x52\x77')+_0x3098bb(0x25c,'\x74\x48\x39\x55'),_0x3098bb(0x225,'\x64\x72\x34\x63')+_0x3098bb(0x218,'\x7a\x66\x52\x77'),_0x3098bb(0x206,'\x70\x73\x51\x6a')+_0x3098bb(0x2b7,'\x40\x39\x46\x63')+'\x6c',_0x3098bb(0x2ae,'\x61\x61\x33\x30')+'\x63\x65\x73\x73\x73\x69\x67\x6e'+_0x3098bb(0x2e8,'\x79\x64\x51\x36')]);function normalizeEnvKey(_0x3e7d40){const _0x1f20b2=_0x3098bb,_0x3df7a0=_0x3e7d40[_0x1f20b2(0x295,'\x45\x32\x30\x6a')+_0x1f20b2(0x278,'\x59\x4c\x51\x63')]()['\x72\x65\x70\x6c\x61\x63\x65'](/[^A-Z0-9]+/g,'\x5f')[_0x1f20b2(0x264,'\x62\x39\x42\x44')](/^_+|_+$/g,'');return _0x3df7a0||_0x3e7d40['\x74\x6f\x55\x70\x70\x65\x72\x43'+_0x1f20b2(0x1f0,'\x48\x21\x41\x50')]();}function isFilesystemPathEnvValue(_0x5aaa28){const _0x38824f=_0x3098bb;return ENV_VALUE_FILESYSTEM_PATH_RE[_0x38824f(0x22e,'\x34\x61\x6b\x21')](_0x5aaa28);}function isUrlEnvValue(_0x2777d2){const _0xf54d59=_0x3098bb;return ENV_VALUE_URL_RE[_0xf54d59(0x2db,'\x33\x52\x4b\x2a')](_0x2777d2);}function isSensitiveEnvKey(_0x1f61f8){const _0x226f49=_0x3098bb,_0x523aaf=normalizeEnvKey(_0x1f61f8),_0x5a6161=_0x523aaf[_0x226f49(0x2f3,'\x78\x77\x46\x55')](/[^A-Z0-9]+/)[_0x226f49(0x212,'\x55\x65\x4b\x40')](Boolean);if(_0x5a6161[_0x226f49(0x208,'\x7a\x63\x37\x64')](_0x564354=>SENSITIVE_ENV_KEY_PARTS[_0x226f49(0x216,'\x45\x32\x30\x6a')](_0x564354)))return!![];return SENSITIVE_ENV_KEY_RE[_0x226f49(0x267,'\x43\x32\x4a\x54')](_0x523aaf);}function _0x2d1b(_0x2bda6e,_0x4f3eea){_0x2bda6e=_0x2bda6e-(-0x1*0x217a+0x2de+-0x823*-0x4);const _0x2a6038=_0x3cbb();let _0x4fc4d8=_0x2a6038[_0x2bda6e];if(_0x2d1b['\x59\x79\x6e\x4f\x59\x59']===undefined){var _0x19a54c=function(_0x58f43c){const _0x2b9c1a='\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x2b\x2f\x3d';let _0x11cae1='',_0x6e0760='';for(let _0x40ccb5=0xf*-0xb5+-0x1431+0x1ecc,_0x3fe4e1,_0x5c6996,_0x46cbd2=0x21a9+-0xf*0xec+-0x13d5*0x1;_0x5c6996=_0x58f43c['\x63\x68\x61\x72\x41\x74'](_0x46cbd2++);~_0x5c6996&&(_0x3fe4e1=_0x40ccb5%(-0x493+-0x1*0xee1+0x1378)?_0x3fe4e1*(0x1*0x3a6+-0xfb5+0xc4f)+_0x5c6996:_0x5c6996,_0x40ccb5++%(-0xcef*-0x2+0x31*0x97+-0x83*0x6b))?_0x11cae1+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](-0x249*0xa+-0x216*-0xc+-0x12f&_0x3fe4e1>>(-(0x1834+0x5d8+-0x2*0xf05)*_0x40ccb5&-0x373+-0xe2d+0x1f6*0x9)):0x1d1d+0x14d0*0x1+-0x31ed){_0x5c6996=_0x2b9c1a['\x69\x6e\x64\x65\x78\x4f\x66'](_0x5c6996);}for(let _0x2f8e3a=-0x1951+-0x151a*-0x1+0x437,_0x373278=_0x11cae1['\x6c\x65\x6e\x67\x74\x68'];_0x2f8e3a<_0x373278;_0x2f8e3a++){_0x6e0760+='\x25'+('\x30\x30'+_0x11cae1['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x2f8e3a)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](0x1e5c+0x1b69+-0x39b5))['\x73\x6c\x69\x63\x65'](-(-0x10af*0x2+-0x332*-0x3+0x1*0x17ca));}return decodeURIComponent(_0x6e0760);};const _0xf31df6=function(_0x1436a3,_0xcab2cd){let _0x152962=[],_0x4dc537=0x223e+-0x1cbe+0x4*-0x160,_0x49e460,_0x4fb788='';_0x1436a3=_0x19a54c(_0x1436a3);let _0x592858;for(_0x592858=-0x15a5+-0x2089+0x362e;_0x592858<-0x3*0x670+-0x1*0x2232+0x3682;_0x592858++){_0x152962[_0x592858]=_0x592858;}for(_0x592858=0x1*0xaa+0x21e+-0x2c8;_0x592858<-0x19e7+0x1efe+-0x417;_0x592858++){_0x4dc537=(_0x4dc537+_0x152962[_0x592858]+_0xcab2cd['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x592858%_0xcab2cd['\x6c\x65\x6e\x67\x74\x68']))%(-0x1*0x9ec+-0x1921+0x240d),_0x49e460=_0x152962[_0x592858],_0x152962[_0x592858]=_0x152962[_0x4dc537],_0x152962[_0x4dc537]=_0x49e460;}_0x592858=-0x2*-0x110+-0x1fdf*-0x1+-0x21ff,_0x4dc537=-0x1795+0x2075*0x1+-0x8e0;for(let _0x24da90=-0x174a+0x1737+0x13;_0x24da90<_0x1436a3['\x6c\x65\x6e\x67\x74\x68'];_0x24da90++){_0x592858=(_0x592858+(-0x1*0x15c+0x731*0x4+0x1b67*-0x1))%(-0x11a0+-0x2535+-0x1*-0x37d5),_0x4dc537=(_0x4dc537+_0x152962[_0x592858])%(0x11a*-0x2+-0x1a5b+-0x7*-0x439),_0x49e460=_0x152962[_0x592858],_0x152962[_0x592858]=_0x152962[_0x4dc537],_0x152962[_0x4dc537]=_0x49e460,_0x4fb788+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](_0x1436a3['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x24da90)^_0x152962[(_0x152962[_0x592858]+_0x152962[_0x4dc537])%(0xf26+-0x1*0x23ed+0x15c7)]);}return _0x4fb788;};_0x2d1b['\x44\x57\x4b\x48\x76\x70']=_0xf31df6,_0x2d1b['\x74\x70\x6f\x55\x72\x45']={},_0x2d1b['\x59\x79\x6e\x4f\x59\x59']=!![];}const _0x4574fb=_0x2a6038[-0x6df+-0xa*-0x1e0+0x1*-0xbe1],_0x34bdf7=_0x2bda6e+_0x4574fb,_0x567d34=_0x2d1b['\x74\x70\x6f\x55\x72\x45'][_0x34bdf7];return!_0x567d34?(_0x2d1b['\x4a\x45\x52\x4e\x4a\x55']===undefined&&(_0x2d1b['\x4a\x45\x52\x4e\x4a\x55']=!![]),_0x4fc4d8=_0x2d1b['\x44\x57\x4b\x48\x76\x70'](_0x4fc4d8,_0x4f3eea),_0x2d1b['\x74\x70\x6f\x55\x72\x45'][_0x34bdf7]=_0x4fc4d8):_0x4fc4d8=_0x567d34,_0x4fc4d8;}function isHighRiskUrlEnvValue(_0x4b2f59){const _0x23ea5d=_0x3098bb;if(!isUrlEnvValue(_0x4b2f59))return![];let _0x5e160f;try{'\x69\x76\x45\x7a\x4e'!==_0x23ea5d(0x214,'\x57\x46\x6f\x52')?_0x5e160f=new URL(_0x4b2f59):(_0x4d439a[_0x23ea5d(0x294,'\x4b\x5e\x40\x50')+'\x78']=-0x1*-0xd54+0x13*0x1e1+-0xb*0x475,_0x533893=_0x491743[_0x23ea5d(0x2fc,'\x45\x67\x59\x4b')](_0x270d32,_0x273ed9=>_0x9c170(_0x273ed9)?_0x273ed9:_0x10c994));}catch{return![];}if(_0x5e160f[_0x23ea5d(0x1fc,'\x6e\x32\x59\x42')]||_0x5e160f[_0x23ea5d(0x2e6,'\x70\x55\x30\x32')])return!![];const _0x2b6750=_0x5e160f[_0x23ea5d(0x1f8,'\x76\x37\x2a\x5d')][_0x23ea5d(0x2bd,'\x2a\x32\x28\x5b')+'\x61\x73\x65'](),_0x3e221d=_0x5e160f[_0x23ea5d(0x2b6,'\x6d\x48\x79\x59')][_0x23ea5d(0x29c,'\x34\x61\x6b\x21')+_0x23ea5d(0x234,'\x7a\x66\x52\x77')]();if(/(^|\.)hooks?\./[_0x23ea5d(0x29d,'\x74\x48\x39\x55')](_0x2b6750)||/(^|\.)webhooks?\./[_0x23ea5d(0x2a1,'\x4c\x4f\x34\x5d')](_0x2b6750))return!![];if(/\/(?:api\/)?webhooks?\//['\x74\x65\x73\x74'](_0x3e221d)||/\/hooks?\//[_0x23ea5d(0x224,'\x73\x67\x30\x72')](_0x3e221d))return!![];if(/\/(?:tokens?|secrets?|signed|signatures?|credentials?)\//[_0x23ea5d(0x22e,'\x34\x61\x6b\x21')](_0x3e221d))return!![];for(const _0x2e3bbd of _0x5e160f['\x73\x65\x61\x72\x63\x68\x50\x61'+_0x23ea5d(0x23a,'\x40\x39\x46\x63')]['\x6b\x65\x79\x73']()){if(_0x23ea5d(0x2c7,'\x25\x78\x37\x21')===_0x23ea5d(0x2fb,'\x64\x72\x34\x63'))return _0x2c04d9[_0x23ea5d(0x252,'\x34\x61\x6b\x21')](_0x2eb32c=>_0x2eb32c[_0x23ea5d(0x2a3,'\x64\x72\x34\x63')]+'\u2192'+_0x2eb32c[_0x23ea5d(0x286,'\x61\x61\x33\x30')+'\x6f\x6e'])[_0x23ea5d(0x28b,'\x45\x32\x30\x6a')]('\x3b\x20');else{if(HIGH_RISK_URL_QUERY_KEYS[_0x23ea5d(0x2e1,'\x37\x32\x57\x29')](_0x2e3bbd[_0x23ea5d(0x274,'\x45\x67\x59\x4b')+_0x23ea5d(0x287,'\x74\x4b\x67\x5e')]()))return!![];}}return![];}function shouldSkipEnvValueReverseScan(_0x2a695c,_0x21f8cf){if(isSensitiveEnvKey(_0x2a695c))return![];if(isFilesystemPathEnvValue(_0x21f8cf))return!![];if(isUrlEnvValue(_0x21f8cf)&&!isHighRiskUrlEnvValue(_0x21f8cf))return!![];return![];}const clip=_0x16de38=>_0x16de38[_0x3098bb(0x2de,'\x4d\x31\x46\x55')]>-0x3ad+-0x1d7*-0x5+-0x2a5*0x2?_0x16de38[_0x3098bb(0x2e5,'\x76\x37\x2a\x5d')](0x3*-0xaf4+0x1e31+0x2ab,0x258d+0x10c*0x20+-0x6*0xbce)+_0x3098bb(0x26a,'\x48\x21\x41\x50'):_0x16de38;export function scanForLeaks(_0x5b0294){const _0x522889=_0x3098bb;if(typeof _0x5b0294!==_0x522889(0x288,'\x6d\x48\x79\x59')||!_0x5b0294)return{'\x66\x6f\x75\x6e\x64':![],'\x6c\x65\x61\x6b\x73':[]};const _0x1a2d24=[],_0x45e4ff=new Set();for(const _0xa58025 of LEAK_SCANNERS){_0xa58025[_0x522889(0x2ec,'\x64\x72\x34\x63')]['\x6c\x61\x73\x74\x49\x6e\x64\x65'+'\x78']=-0xffd+0x7a1+0x85c;let _0x38675d;while((_0x38675d=_0xa58025[_0x522889(0x220,'\x43\x32\x4a\x54')][_0x522889(0x263,'\x4d\x31\x46\x55')](_0x5b0294))!==null){if(_0x522889(0x24d,'\x62\x39\x42\x44')===_0x522889(0x25d,'\x30\x66\x72\x46'))_0x64577[_0x522889(0x2a0,'\x70\x73\x51\x6a')+'\x78']=0x1fae+0x53*-0x49+-0x803,_0x35956c=_0x112d88[_0x522889(0x28a,'\x77\x50\x34\x5d')](_0x6f72e1,_0x16c60f=>_0x10428b(_0x16c60f)?_0x16c60f:_0x3a902b);else{const _0x39da9d=_0x38675d[-0x255*0xb+-0x7ca*-0x5+-0xd4b];if(isAllowlisted(_0x39da9d))continue;const _0x523dbd=_0xa58025[_0x522889(0x2f7,'\x33\x52\x4b\x2a')]+'\x3a'+_0x39da9d;if(_0x45e4ff[_0x522889(0x2ce,'\x34\x61\x6b\x21')](_0x523dbd))continue;_0x45e4ff[_0x522889(0x2f8,'\x55\x65\x4b\x40')](_0x523dbd),_0x1a2d24[_0x522889(0x241,'\x5b\x44\x51\x48')]({'\x74\x79\x70\x65':_0xa58025[_0x522889(0x262,'\x7a\x66\x52\x77')],'\x76\x61\x6c\x75\x65':clip(_0x39da9d),'\x73\x75\x67\x67\x65\x73\x74\x69\x6f\x6e':_0xa58025['\x73\x75\x67\x67\x65\x73\x74']});}}}return{'\x66\x6f\x75\x6e\x64':_0x1a2d24[_0x522889(0x285,'\x34\x64\x4e\x6c')]>0x3b2+-0xc*-0x2c+-0x5c2,'\x6c\x65\x61\x6b\x73':_0x1a2d24};}export function detectEnvValueLeaks(_0x4d77e6,_0xd4a09f){const _0x49a138=_0x3098bb;if(typeof _0x4d77e6!==_0x49a138(0x2b3,'\x59\x4c\x51\x63')||!_0x4d77e6)return[];const _0x128bd1=[];for(const [_0x4511f7,_0x51335e]of Object[_0x49a138(0x276,'\x31\x31\x6b\x50')](_0xd4a09f)){if(_0x49a138(0x261,'\x64\x72\x34\x63')!=='\x6f\x52\x6c\x5a\x72'){const _0x4eed79=_0x3d685a(_0x2f4e47),_0x30ca9a=_0x4eed79['\x73\x70\x6c\x69\x74'](/[^A-Z0-9]+/)[_0x49a138(0x1fa,'\x2a\x43\x58\x46')](_0x45117d);if(_0x30ca9a[_0x49a138(0x2e7,'\x43\x32\x4a\x54')](_0x55fd3e=>_0x274ddf[_0x49a138(0x2ff,'\x79\x64\x51\x36')](_0x55fd3e)))return!![];return _0x2281d7[_0x49a138(0x22b,'\x79\x44\x32\x30')](_0x4eed79);}else{if(!_0x51335e||_0x51335e[_0x49a138(0x236,'\x79\x44\x32\x30')]<0x2590+0x221d+-0x47a5)continue;if(ENV_SCAN_SKIP_KEYS[_0x49a138(0x240,'\x4d\x31\x46\x55')](normalizeEnvKey(_0x4511f7)))continue;if(shouldSkipEnvValueReverseScan(_0x4511f7,_0x51335e))continue;if(_0x4d77e6[_0x49a138(0x20c,'\x34\x64\x4e\x6c')](_0x51335e))_0x128bd1[_0x49a138(0x1f7,'\x55\x6e\x52\x49')]({'\x74\x79\x70\x65':_0x49a138(0x22a,'\x51\x41\x32\x43')+_0x49a138(0x2c1,'\x76\x37\x2a\x5d'),'\x76\x61\x6c\x75\x65':REDACTED,'\x73\x75\x67\x67\x65\x73\x74\x69\x6f\x6e':'\x70\x72\x6f\x63\x65\x73\x73\x2e'+_0x49a138(0x21a,'\x48\x21\x41\x50')+_0x4511f7});}}return _0x128bd1;}export function fullLeakCheck(_0x564cfd,_0x5e32f1){const _0x5a7802=_0x3098bb,_0xa9d7a3=scanForLeaks(_0x564cfd),_0x382c97=detectEnvValueLeaks(_0x564cfd,_0x5e32f1),_0x47358a=_0xa9d7a3['\x6c\x65\x61\x6b\x73'][_0x5a7802(0x204,'\x74\x48\x39\x55')](_0x382c97);return{'\x66\x6f\x75\x6e\x64':_0x47358a[_0x5a7802(0x222,'\x4b\x5e\x40\x50')]>0x1e8+-0x1d14+-0x94*-0x2f,'\x6c\x65\x61\x6b\x73':_0x47358a};}const PII_ONLY_LEAK_TYPES=new Set([_0x3098bb(0x21e,'\x74\x4b\x67\x5e')+'\x74\x68']);function _0x3cbb(){const _0x4b9119=['\x57\x52\x6d\x30\x57\x35\x31\x6e\x67\x62\x56\x64\x54\x5a\x57','\x57\x52\x6c\x63\x4b\x38\x6b\x41','\x6c\x76\x47\x4d\x57\x4f\x46\x63\x4c\x57\x56\x63\x4c\x66\x50\x57\x44\x53\x6b\x47','\x57\x35\x6d\x31\x70\x61','\x73\x33\x65\x4b\x71\x5a\x47\x41\x6d\x68\x79','\x46\x38\x6b\x64\x57\x52\x42\x63\x48\x48\x38','\x57\x36\x47\x79\x57\x51\x78\x63\x56\x63\x4b\x54\x57\x51\x68\x63\x49\x61','\x42\x57\x35\x39\x57\x35\x71','\x57\x50\x64\x64\x49\x6d\x6f\x4b\x57\x52\x44\x49','\x6d\x57\x7a\x30\x57\x52\x62\x57\x57\x50\x64\x63\x4f\x43\x6b\x6f','\x57\x4f\x38\x64\x57\x37\x6e\x2b\x70\x4e\x4a\x64\x49\x58\x79','\x63\x63\x75\x62\x64\x73\x78\x63\x4a\x47\x2f\x63\x4a\x71','\x57\x34\x33\x64\x56\x38\x6b\x33\x57\x51\x47\x72\x57\x34\x64\x63\x48\x47','\x73\x66\x46\x63\x55\x6d\x6f\x75\x57\x52\x70\x63\x4d\x75\x71\x78','\x42\x62\x6e\x2f\x57\x35\x6c\x64\x48\x49\x2f\x63\x53\x58\x4b','\x57\x37\x4b\x69\x57\x35\x4b\x45\x79\x32\x78\x64\x4a\x47','\x46\x72\x66\x35\x57\x36\x37\x64\x49\x64\x4e\x63\x55\x71','\x78\x53\x6f\x38\x65\x43\x6f\x49\x57\x34\x65','\x6a\x75\x2f\x63\x51\x33\x61','\x76\x30\x42\x63\x50\x38\x6f\x6a\x57\x4f\x34','\x57\x35\x4a\x64\x53\x6d\x6b\x31\x57\x37\x69\x38\x57\x37\x33\x63\x50\x74\x34','\x57\x35\x2f\x64\x56\x59\x6c\x63\x48\x53\x6b\x39\x57\x51\x4e\x64\x4e\x67\x69','\x74\x6d\x6f\x44\x57\x52\x47\x58\x57\x35\x2f\x64\x4d\x4c\x75','\x57\x35\x71\x4c\x6b\x58\x53','\x6d\x6d\x6b\x6e\x61\x71','\x57\x36\x4a\x64\x47\x6d\x6f\x44\x42\x6d\x6b\x52\x6b\x33\x4a\x63\x4a\x43\x6b\x6d\x64\x71','\x57\x4f\x2f\x64\x48\x75\x37\x63\x4e\x31\x75\x32\x70\x67\x43','\x57\x37\x52\x64\x54\x6d\x6b\x73\x57\x50\x43\x67','\x6b\x47\x65\x49\x6d\x48\x70\x63\x4f\x4a\x47','\x63\x47\x54\x39\x57\x52\x64\x63\x4b\x73\x78\x64\x55\x43\x6b\x68','\x66\x64\x48\x6d\x57\x50\x58\x6b','\x57\x50\x4e\x64\x4e\x43\x6f\x49','\x6d\x53\x6b\x32\x43\x4c\x33\x63\x56\x58\x6c\x63\x54\x48\x61','\x57\x51\x4c\x57\x70\x61','\x68\x4e\x48\x63\x57\x4f\x34','\x6c\x6d\x6b\x57\x45\x73\x42\x64\x52\x53\x6b\x44\x41\x31\x47','\x7a\x53\x6f\x43\x69\x53\x6f\x65\x57\x36\x31\x4f\x57\x37\x39\x56','\x57\x36\x62\x4c\x57\x36\x37\x63\x52\x43\x6f\x50','\x79\x72\x43\x6c','\x71\x4e\x61\x58\x64\x61\x71\x65\x65\x30\x71','\x57\x50\x52\x64\x4e\x4b\x56\x64\x4d\x71','\x7a\x6d\x6b\x61\x57\x51\x5a\x63\x4b\x72\x74\x63\x4f\x38\x6f\x56\x57\x51\x47','\x64\x38\x6b\x70\x77\x65\x5a\x63\x49\x49\x4e\x63\x49\x63\x43','\x57\x37\x34\x72\x57\x35\x57\x31\x42\x78\x69','\x6c\x43\x6f\x6a\x57\x50\x4b','\x57\x36\x42\x64\x53\x53\x6b\x50\x6a\x38\x6b\x62\x6b\x6d\x6f\x57\x71\x47','\x71\x53\x6f\x52\x68\x38\x6f\x51\x57\x35\x44\x6c\x57\x35\x34\x6f','\x74\x38\x6b\x53\x57\x36\x4c\x61\x57\x37\x37\x64\x4c\x33\x46\x64\x53\x53\x6f\x6b\x57\x4f\x4f','\x64\x43\x6f\x53\x57\x52\x69\x78\x57\x34\x6c\x64\x50\x31\x42\x63\x54\x61','\x57\x36\x6e\x73\x57\x51\x75\x65\x57\x51\x6d\x72\x41\x47\x79','\x61\x6d\x6b\x42\x57\x4f\x56\x64\x4f\x6d\x6b\x65\x6e\x66\x68\x64\x48\x61','\x41\x62\x48\x47\x57\x35\x71','\x57\x37\x42\x64\x52\x38\x6b\x36','\x57\x34\x72\x2f\x57\x50\x34\x30\x57\x50\x30\x32','\x46\x33\x54\x66\x57\x34\x4b\x35\x75\x53\x6f\x31\x57\x35\x38','\x62\x43\x6b\x5a\x57\x52\x4f\x42\x57\x34\x4a\x64\x53\x57\x4a\x64\x55\x71','\x57\x51\x78\x64\x53\x38\x6f\x41\x57\x4f\x62\x6a','\x46\x4e\x70\x63\x49\x6d\x6b\x47','\x45\x53\x6b\x46\x74\x64\x70\x63\x52\x6d\x6f\x6a\x57\x50\x74\x63\x49\x61','\x41\x78\x4c\x73\x57\x4f\x71\x44\x78\x43\x6f\x65\x57\x37\x34','\x57\x50\x74\x64\x4b\x53\x6f\x4e\x57\x36\x54\x75\x57\x50\x33\x63\x47\x72\x38','\x57\x50\x35\x30\x69\x6d\x6b\x31\x70\x65\x56\x64\x53\x43\x6b\x6f','\x74\x48\x76\x31\x62\x71\x4a\x64\x47\x4c\x44\x41','\x79\x6d\x6f\x79\x76\x6d\x6b\x30\x57\x51\x6c\x63\x4e\x53\x6f\x41\x57\x52\x2f\x63\x54\x38\x6f\x39\x57\x37\x37\x63\x51\x4c\x4b','\x78\x6d\x6f\x6d\x46\x57','\x46\x77\x37\x63\x49\x53\x6b\x4d\x6d\x4b\x62\x63\x75\x71','\x79\x53\x6f\x79\x69\x38\x6f\x41\x57\x36\x6a\x57\x57\x37\x39\x48','\x6e\x38\x6b\x61\x63\x43\x6f\x33\x57\x37\x70\x64\x4c\x61','\x57\x50\x68\x63\x51\x43\x6f\x69\x64\x48\x5a\x63\x4f\x6d\x6f\x6b\x57\x37\x4f','\x76\x32\x79\x62\x72\x62\x57','\x57\x50\x33\x64\x47\x43\x6b\x4a\x57\x50\x4f\x61\x57\x36\x6d\x49\x57\x51\x69','\x57\x34\x42\x63\x55\x4c\x4f','\x76\x38\x6f\x33\x62\x53\x6b\x4e\x57\x37\x76\x58\x57\x37\x4c\x4f','\x57\x4f\x4a\x63\x56\x6d\x6f\x6a\x64\x61\x33\x63\x50\x53\x6f\x6c\x57\x52\x65','\x57\x51\x6c\x63\x53\x6d\x6f\x38\x79\x6d\x6b\x2f\x6c\x53\x6f\x41\x79\x72\x37\x63\x4f\x71','\x57\x51\x31\x54\x6c\x38\x6f\x53','\x79\x53\x6f\x42\x76\x43\x6b\x32\x57\x51\x68\x63\x4c\x43\x6f\x7a\x57\x34\x4e\x63\x4d\x38\x6f\x33\x57\x34\x78\x63\x49\x4d\x5a\x64\x48\x71','\x63\x4a\x4c\x7a\x61\x5a\x46\x63\x52\x71','\x46\x43\x6f\x36\x71\x38\x6b\x4e\x69\x4e\x52\x64\x56\x38\x6f\x39','\x78\x38\x6b\x57\x79\x43\x6f\x2b\x57\x52\x43\x73\x7a\x68\x79','\x70\x53\x6b\x78\x57\x52\x34\x74\x57\x4f\x78\x64\x56\x43\x6f\x61\x64\x57','\x42\x61\x62\x4b\x57\x34\x78\x64\x48\x49\x37\x63\x52\x47','\x57\x52\x4a\x63\x50\x4d\x47','\x69\x4c\x58\x34\x57\x51\x68\x64\x48\x43\x6b\x44','\x57\x50\x4a\x64\x4a\x4b\x4a\x64\x4e\x77\x43\x7a\x67\x61','\x72\x53\x6f\x38\x61\x38\x6f\x39','\x57\x34\x78\x63\x53\x38\x6b\x4b\x57\x52\x6d\x42\x57\x35\x78\x64\x48\x71\x47','\x7a\x53\x6b\x61\x57\x52\x42\x63\x49\x57','\x57\x51\x2f\x64\x54\x68\x56\x64\x56\x75\x38\x2f\x6d\x33\x61','\x79\x72\x43\x6c\x73\x61\x52\x64\x4e\x49\x65\x37','\x63\x48\x7a\x4e\x57\x51\x37\x63\x49\x49\x4e\x64\x56\x38\x6b\x74','\x6c\x49\x58\x75\x57\x51\x37\x63\x54\x57\x33\x64\x49\x53\x6b\x35','\x57\x34\x37\x64\x54\x63\x46\x64\x4e\x61','\x6c\x53\x6b\x43\x57\x51\x4f\x79\x57\x50\x4e\x64\x51\x43\x6f\x64\x68\x47','\x73\x76\x46\x63\x55\x57','\x6b\x6d\x6b\x4a\x42\x68\x79','\x70\x63\x4e\x64\x4c\x53\x6f\x32\x7a\x32\x6e\x64\x66\x74\x42\x63\x4e\x6d\x6f\x55','\x77\x53\x6b\x55\x57\x34\x72\x6e\x57\x50\x56\x63\x55\x4a\x38\x4a','\x57\x4f\x6c\x64\x49\x6d\x6f\x4a\x57\x52\x62\x51\x57\x52\x33\x63\x56\x74\x30','\x65\x6d\x6b\x72\x73\x71\x42\x64\x48\x6d\x6b\x49\x76\x59\x71','\x57\x35\x56\x64\x4f\x74\x33\x64\x47\x38\x6b\x43\x57\x50\x4b','\x57\x4f\x64\x63\x51\x6d\x6f\x63','\x64\x6d\x6b\x64\x72\x72\x79','\x57\x35\x42\x64\x54\x64\x52\x64\x4a\x38\x6b\x6e\x57\x4f\x47','\x57\x36\x68\x64\x52\x76\x46\x63\x48\x57','\x57\x35\x52\x63\x4e\x38\x6f\x65','\x46\x6d\x6b\x44\x57\x52\x64\x63\x48\x48\x2f\x63\x53\x43\x6f\x58\x57\x36\x6d','\x41\x43\x6b\x67\x57\x37\x7a\x2f','\x57\x34\x33\x64\x56\x38\x6b\x57\x57\x51\x38\x64\x57\x35\x33\x63\x4d\x48\x38','\x73\x31\x33\x63\x52\x53\x6f\x6f','\x57\x36\x33\x63\x4c\x67\x78\x63\x49\x48\x50\x70\x57\x50\x37\x63\x4c\x47','\x61\x62\x31\x32\x57\x52\x37\x63\x49\x49\x4e\x64\x51\x61','\x69\x38\x6b\x48\x57\x51\x4a\x64\x4c\x43\x6b\x54','\x57\x51\x4c\x6f\x77\x71','\x43\x53\x6f\x68\x78\x4a\x79','\x57\x36\x62\x49\x57\x37\x74\x63\x50\x38\x6f\x5a\x57\x34\x62\x55\x57\x36\x79','\x57\x37\x48\x64\x57\x52\x75\x75\x57\x51\x34\x68\x45\x57','\x6b\x6d\x6b\x54\x46\x73\x64\x64\x50\x71','\x66\x71\x46\x64\x56\x43\x6b\x78\x57\x34\x70\x64\x48\x48\x44\x67\x57\x4f\x53\x42\x57\x50\x47\x6c\x6f\x61\x47','\x57\x4f\x68\x64\x4a\x53\x6f\x2b\x57\x51\x7a\x49\x57\x51\x56\x63\x4f\x67\x43','\x57\x51\x64\x63\x54\x78\x74\x64\x4a\x53\x6b\x74\x79\x38\x6b\x33\x57\x52\x79','\x6f\x72\x61\x37\x6d\x72\x5a\x63\x4e\x4a\x42\x63\x52\x61','\x6b\x76\x62\x49\x57\x51\x37\x64\x48\x6d\x6b\x78\x41\x53\x6b\x51','\x57\x34\x35\x31\x57\x50\x34\x4a\x57\x51\x6d\x58\x73\x4a\x79','\x64\x53\x6f\x51\x57\x51\x38\x44\x57\x34\x4e\x64\x53\x57','\x68\x48\x74\x63\x48\x6d\x6f\x72\x57\x52\x2f\x64\x48\x6d\x6f\x6e\x46\x71','\x57\x37\x37\x64\x53\x65\x4a\x63\x49\x6d\x6b\x69','\x57\x51\x37\x64\x52\x38\x6f\x45\x57\x4f\x7a\x6d','\x68\x63\x6e\x44\x72\x61\x46\x63\x4e\x61\x37\x63\x4b\x57','\x61\x71\x64\x63\x4a\x71','\x6a\x6d\x6f\x52\x46\x4d\x2f\x63\x53\x76\x64\x63\x52\x48\x57','\x6d\x43\x6b\x4e\x42\x57','\x72\x53\x6f\x37\x46\x47\x37\x63\x4d\x53\x6b\x4c\x57\x51\x34','\x65\x63\x54\x75','\x63\x43\x6f\x37\x57\x51\x34\x61','\x77\x43\x6b\x4f\x44\x47','\x67\x43\x6f\x38\x57\x4f\x69\x62\x57\x35\x78\x64\x55\x61','\x6d\x38\x6b\x4b\x43\x61','\x57\x35\x37\x63\x51\x75\x64\x63\x53\x59\x4c\x56\x57\x52\x37\x63\x4d\x57','\x57\x37\x71\x77\x57\x52\x78\x63\x52\x4a\x69\x44\x57\x51\x70\x63\x4a\x71','\x66\x43\x6b\x68\x57\x50\x6c\x63\x52\x43\x6b\x47\x65\x4e\x42\x63\x4f\x47','\x57\x34\x48\x37\x57\x50\x75\x35','\x57\x36\x54\x6a\x57\x37\x37\x63\x47\x43\x6f\x53','\x45\x38\x6f\x67\x6f\x38\x6f\x6d\x57\x36\x53','\x6d\x53\x6f\x6d\x57\x50\x4b\x52\x57\x37\x70\x64\x4d\x32\x37\x64\x4e\x57','\x46\x33\x54\x66\x57\x34\x4b\x33\x75\x53\x6f\x47\x57\x35\x47','\x57\x35\x6c\x64\x4a\x6d\x6b\x56\x57\x4f\x79\x67','\x57\x50\x78\x63\x4f\x53\x6f\x78\x63\x61','\x57\x51\x72\x78\x74\x38\x6f\x61','\x57\x37\x5a\x64\x4f\x30\x6c\x63\x48\x43\x6b\x38\x77\x43\x6b\x2f','\x68\x53\x6f\x6a\x57\x50\x46\x64\x50\x53\x6b\x76\x6d\x30\x56\x63\x48\x61','\x41\x68\x6c\x63\x4b\x38\x6f\x52\x67\x67\x6e\x30\x6d\x71','\x41\x61\x72\x4a\x57\x34\x75','\x57\x51\x72\x62\x78\x61','\x57\x4f\x78\x63\x53\x38\x6b\x54\x68\x6d\x6b\x47\x6c\x78\x4e\x63\x54\x47','\x57\x36\x79\x54\x44\x57','\x64\x57\x78\x63\x49\x6d\x6f\x78\x57\x51\x4e\x64\x48\x6d\x6f\x48\x6a\x57','\x69\x43\x6b\x42\x63\x53\x6f\x47\x57\x37\x70\x64\x4c\x43\x6b\x42\x57\x35\x43','\x57\x35\x61\x33\x57\x37\x30\x65','\x79\x6d\x6b\x77\x74\x43\x6f\x72\x57\x4f\x71\x70\x71\x75\x71','\x57\x4f\x6c\x63\x52\x53\x6f\x76\x62\x61\x33\x63\x51\x53\x6b\x75\x57\x51\x61','\x69\x76\x6a\x5a\x57\x51\x47','\x76\x65\x74\x63\x50\x6d\x6f\x64\x57\x50\x2f\x63\x48\x66\x6e\x43','\x45\x71\x39\x4d\x57\x50\x2f\x64\x53\x62\x4e\x63\x4b\x4d\x65','\x57\x37\x33\x64\x53\x4b\x64\x63\x47\x6d\x6b\x5a\x78\x43\x6b\x5a\x78\x47','\x6c\x61\x53\x45\x6d\x71\x78\x63\x50\x63\x2f\x63\x49\x47','\x75\x38\x6f\x50\x67\x43\x6f\x77\x57\x35\x4c\x44\x57\x35\x71','\x57\x36\x65\x45\x57\x51\x33\x64\x53\x6d\x6b\x6b\x57\x51\x53\x66','\x46\x4e\x57\x4d\x62\x43\x6f\x4c\x57\x4f\x64\x63\x56\x66\x53','\x6d\x62\x72\x49','\x57\x51\x79\x4f\x57\x34\x71\x42\x69\x67\x5a\x64\x4b\x61\x57','\x45\x53\x6b\x73\x72\x38\x6f\x61\x57\x50\x38\x65\x72\x47','\x65\x43\x6b\x41\x57\x4f\x65','\x76\x30\x6c\x63\x55\x43\x6f\x6a\x57\x50\x74\x63\x4b\x61','\x69\x53\x6b\x41\x64\x43\x6f\x43\x57\x36\x6c\x64\x48\x38\x6b\x41\x57\x50\x34','\x65\x38\x6b\x4f\x6e\x53\x6f\x67\x57\x34\x4e\x64\x53\x38\x6b\x36\x57\x52\x75','\x57\x35\x42\x64\x55\x38\x6b\x36','\x71\x4c\x66\x30\x57\x52\x47\x4c\x72\x38\x6f\x4a\x57\x34\x69','\x71\x43\x6f\x57\x66\x38\x6f\x4e\x57\x35\x6e\x6d\x57\x35\x48\x73','\x57\x50\x37\x63\x4c\x66\x6c\x64\x51\x53\x6b\x2b\x72\x6d\x6b\x78\x57\x34\x43','\x75\x47\x7a\x50\x65\x49\x74\x64\x4e\x30\x61\x72','\x70\x38\x6b\x42\x57\x51\x47\x79\x57\x4f\x70\x64\x53\x38\x6f\x45\x68\x47','\x57\x50\x54\x2f\x6c\x43\x6b\x2b\x70\x75\x43','\x74\x72\x6a\x39\x61\x71\x4a\x64\x47\x4c\x61\x44','\x75\x53\x6b\x53\x7a\x57','\x6c\x38\x6b\x32\x7a\x63\x5a\x64\x50\x43\x6b\x6a','\x57\x34\x75\x59\x6c\x76\x64\x63\x48\x32\x44\x62\x57\x52\x34','\x62\x6d\x6b\x39\x57\x50\x30\x52\x57\x51\x52\x64\x4e\x38\x6f\x4f','\x57\x34\x74\x63\x54\x65\x64\x63\x51\x57','\x41\x57\x69\x6d\x6e\x30\x4e\x64\x4e\x49\x47','\x57\x52\x61\x5a\x57\x35\x76\x73\x62\x65\x4a\x64\x54\x5a\x4f','\x57\x50\x6e\x4f\x79\x4b\x52\x64\x56\x61\x75\x38\x57\x50\x75\x70\x57\x37\x70\x64\x52\x43\x6f\x31\x57\x52\x30','\x57\x35\x6d\x35\x6f\x61\x5a\x63\x52\x65\x6d','\x57\x35\x61\x55\x6e\x62\x33\x63\x52\x65\x72\x2f\x57\x34\x38','\x71\x67\x31\x50\x73\x63\x43\x51\x6c\x4a\x34','\x57\x34\x68\x63\x49\x6d\x6f\x73\x66\x65\x43\x76\x57\x35\x68\x64\x56\x57','\x57\x35\x33\x64\x4a\x33\x78\x63\x50\x38\x6b\x79\x46\x47','\x69\x4c\x48\x4c\x57\x52\x6c\x64\x55\x6d\x6b\x42\x75\x43\x6b\x37','\x57\x35\x52\x63\x54\x68\x5a\x63\x54\x74\x48\x2b\x57\x51\x4e\x63\x48\x57','\x63\x6d\x6b\x44\x72\x47\x5a\x64\x4a\x57','\x69\x49\x58\x77\x57\x50\x74\x63\x53\x57\x6c\x64\x48\x38\x6b\x47','\x57\x37\x6d\x72\x57\x51\x56\x64\x52\x61','\x70\x4b\x56\x63\x50\x47','\x67\x63\x48\x6a\x57\x4f\x7a\x41\x57\x4f\x53','\x57\x35\x64\x64\x56\x38\x6b\x5a','\x6b\x6d\x6b\x50\x75\x32\x33\x63\x56\x62\x4a\x63\x52\x5a\x79','\x57\x35\x6e\x31\x57\x4f\x6d\x4a','\x57\x50\x6e\x47\x45\x53\x6f\x51\x6a\x31\x56\x64\x54\x62\x57','\x57\x4f\x4a\x63\x51\x6d\x6f\x4d\x68\x57\x56\x63\x53\x53\x6f\x61','\x65\x43\x6f\x2f\x57\x51\x34\x61\x57\x36\x37\x64\x55\x4b\x68\x64\x56\x57','\x57\x52\x43\x4a\x57\x34\x66\x62','\x65\x38\x6b\x38\x57\x4f\x47\x50\x57\x52\x2f\x64\x4c\x43\x6f\x53\x6a\x47','\x57\x34\x4e\x64\x50\x38\x6b\x5a\x57\x52\x4b','\x57\x35\x42\x64\x56\x4a\x46\x64\x49\x43\x6b\x76\x57\x52\x2f\x64\x56\x30\x61','\x57\x36\x70\x64\x50\x30\x69','\x57\x35\x43\x31\x57\x50\x6c\x63\x4e\x57\x4b\x67','\x57\x52\x74\x63\x49\x6d\x6f\x49\x70\x57','\x57\x34\x64\x64\x49\x43\x6b\x6a\x67\x43\x6b\x4a','\x67\x38\x6b\x6d\x57\x4f\x4f','\x57\x52\x33\x63\x4d\x38\x6b\x44\x6d\x6d\x6b\x68\x63\x4e\x78\x63\x4b\x71','\x69\x72\x76\x4f\x57\x52\x50\x32\x57\x52\x5a\x63\x53\x38\x6f\x76','\x57\x4f\x5a\x64\x4e\x43\x6b\x4d\x57\x50\x4b\x6d\x57\x37\x5a\x63\x4d\x61','\x57\x4f\x4c\x61\x67\x53\x6b\x68\x57\x50\x4a\x63\x51\x65\x42\x64\x4a\x61','\x74\x71\x39\x37\x66\x61\x4a\x64\x4c\x75\x75\x78','\x57\x51\x54\x61\x71\x38\x6f\x6e','\x63\x57\x4a\x63\x4e\x43\x6b\x43\x57\x4f\x2f\x64\x50\x6d\x6f\x37\x61\x71','\x73\x43\x6b\x52\x57\x50\x42\x63\x53\x74\x78\x63\x4b\x61','\x71\x76\x4a\x63\x56\x43\x6b\x6f\x57\x52\x56\x63\x52\x78\x75\x47','\x69\x48\x6e\x31\x57\x52\x62\x39\x57\x51\x47','\x57\x37\x68\x64\x4b\x43\x6b\x65\x57\x50\x69\x31\x57\x37\x2f\x63\x52\x71','\x57\x34\x52\x64\x4f\x5a\x56\x64\x49\x38\x6b\x43\x57\x50\x70\x64\x56\x61\x38','\x6c\x6d\x6b\x4a\x79\x49\x33\x64\x50\x43\x6b\x70\x44\x72\x6d','\x41\x43\x6b\x63\x57\x37\x39\x50\x57\x51\x78\x63\x48\x57\x4b\x6a','\x57\x52\x56\x63\x49\x6d\x6b\x43\x6b\x53\x6b\x78\x6e\x30\x68\x63\x47\x61','\x57\x50\x66\x55\x42\x43\x6f\x4d\x6e\x47','\x45\x72\x53\x63\x62\x4b\x46\x64\x4e\x57','\x77\x65\x61\x76\x42\x38\x6f\x57\x57\x50\x5a\x63\x4f\x75\x71','\x6b\x53\x6f\x77\x57\x51\x4f\x37\x57\x37\x2f\x64\x49\x31\x69\x55\x79\x63\x37\x63\x47\x6d\x6b\x72\x57\x4f\x38','\x57\x35\x70\x64\x48\x78\x78\x63\x51\x58\x69\x48\x57\x37\x46\x64\x56\x71','\x75\x53\x6b\x4c\x44\x38\x6f\x54\x57\x52\x34\x73\x44\x33\x53','\x57\x35\x38\x39\x57\x50\x65\x36\x57\x4f\x7a\x56\x78\x64\x61','\x6b\x31\x44\x47\x57\x36\x4a\x64\x4f\x53\x6b\x4d\x46\x43\x6b\x62','\x41\x43\x6b\x57\x57\x52\x70\x63\x47\x62\x56\x63\x51\x71','\x57\x52\x78\x63\x51\x77\x33\x63\x47\x38\x6b\x33\x73\x53\x6b\x72\x57\x34\x4f','\x57\x50\x64\x64\x49\x43\x6f\x4c\x57\x51\x30','\x44\x53\x6b\x69\x57\x37\x39\x50','\x57\x51\x72\x6a\x63\x38\x6b\x67\x63\x67\x4a\x64\x4b\x43\x6b\x5a','\x68\x43\x6b\x42\x6f\x38\x6f\x6e\x76\x62\x5a\x63\x4d\x53\x6b\x66\x75\x43\x6b\x61\x57\x34\x4c\x33\x6e\x49\x6d','\x45\x61\x53\x75\x64\x66\x61','\x57\x52\x62\x69\x61\x53\x6b\x75','\x57\x37\x33\x63\x55\x38\x6f\x5a\x6d\x61','\x78\x31\x46\x64\x4d\x38\x6b\x68\x57\x4f\x52\x64\x4b\x6d\x6f\x35\x66\x43\x6b\x30\x57\x34\x69','\x57\x37\x57\x72\x57\x34\x6d\x49\x7a\x33\x6c\x64\x4b\x38\x6b\x62','\x73\x6d\x6b\x49\x57\x35\x48\x45\x57\x4f\x37\x63\x50\x57','\x70\x4b\x54\x35\x57\x51\x78\x64\x4c\x6d\x6b\x67\x72\x53\x6f\x57','\x6e\x6d\x6b\x4e\x42\x61','\x62\x33\x44\x66\x57\x50\x6c\x64\x4f\x38\x6b\x47\x45\x6d\x6b\x42','\x67\x49\x65\x74\x64\x64\x46\x63\x4b\x57','\x63\x43\x6b\x65\x71\x66\x42\x63\x48\x64\x42\x63\x4d\x64\x53','\x57\x34\x56\x63\x54\x76\x2f\x64\x51\x57\x62\x75\x57\x50\x42\x63\x47\x71','\x73\x6d\x6b\x38\x57\x50\x65','\x6f\x75\x7a\x43\x78\x62\x46\x63\x49\x77\x65\x4e\x57\x52\x6a\x7a\x43\x6d\x6f\x39\x57\x35\x57','\x57\x51\x74\x63\x4a\x43\x6f\x4f\x69\x73\x2f\x63\x4c\x53\x6f\x52\x57\x4f\x53','\x57\x52\x54\x4d\x6f\x53\x6b\x57\x57\x51\x37\x63\x4a\x57','\x64\x48\x31\x58\x57\x51\x78\x63\x4a\x4a\x37\x64\x50\x38\x6b\x6c','\x57\x52\x78\x64\x47\x4b\x47','\x6b\x62\x79\x39\x70\x72\x46\x63\x53\x49\x37\x64\x50\x57','\x66\x71\x42\x64\x55\x38\x6b\x79\x57\x34\x6c\x64\x47\x58\x47\x2b\x57\x52\x34\x56\x57\x50\x4f\x46\x66\x61','\x57\x35\x71\x35\x6b\x61\x4f','\x6b\x4a\x6a\x6c\x57\x51\x37\x63\x51\x47\x4e\x64\x4e\x57','\x44\x78\x35\x77\x57\x4f\x4b','\x57\x51\x31\x6b\x72\x6d\x6f\x65\x65\x67\x57','\x57\x4f\x46\x63\x47\x4c\x4e\x64\x50\x43\x6b\x35\x78\x38\x6b\x70'];_0x3cbb=function(){return _0x4b9119;};return _0x3cbb();}export function leakCheckModeFromEnv(_0x3285e4){const _0x4cde1a=_0x3098bb,_0x8075d9=(_0x3285e4[_0x4cde1a(0x2d5,'\x7a\x66\x52\x77')+_0x4cde1a(0x2ea,'\x4c\x4f\x34\x5d')+'\x43\x4b']??'')['\x74\x6f\x4c\x6f\x77\x65\x72\x43'+_0x4cde1a(0x27b,'\x61\x62\x24\x6c')]();return _0x8075d9===_0x4cde1a(0x298,'\x31\x31\x6b\x50')||_0x8075d9===_0x4cde1a(0x258,'\x6d\x48\x79\x59')?_0x8075d9:'\x73\x74\x72\x69\x63\x74';}export function sanitizeBundle(_0x1ec559,_0x9c0f11){const _0x379c06=_0x3098bb,_0xe9eef8=_0x9c0f11[_0x379c06(0x2c4,'\x40\x39\x46\x63')]??leakCheckModeFromEnv(_0x9c0f11[_0x379c06(0x268,'\x4d\x31\x46\x55')]);let _0x74366a=[];if(_0xe9eef8!==_0x379c06(0x250,'\x41\x4e\x52\x54')){const _0x6c010a=_0x1ec559[_0x379c06(0x2a5,'\x62\x39\x42\x44')](_0x26f2c3=>JSON[_0x379c06(0x273,'\x62\x39\x42\x44')+'\x79'](_0x26f2c3))[_0x379c06(0x226,'\x76\x37\x2a\x5d')]('');_0x74366a=fullLeakCheck(_0x6c010a,_0x9c0f11[_0x379c06(0x203,'\x6e\x32\x59\x42')])[_0x379c06(0x2f1,'\x73\x67\x30\x72')];}const _0x5e3c5a=_0xe9eef8===_0x379c06(0x21c,'\x6b\x63\x2a\x4e')&&_0x74366a['\x73\x6f\x6d\x65'](_0x39d2ea=>!PII_ONLY_LEAK_TYPES[_0x379c06(0x221,'\x70\x45\x61\x38')](_0x39d2ea[_0x379c06(0x202,'\x43\x32\x4a\x54')])),_0x4fc1ce=_0x1ec559[_0x379c06(0x29b,'\x64\x72\x34\x63')](_0x72902d=>sanitizeAsset(_0x72902d));return{'\x62\x75\x6e\x64\x6c\x65':_0x4fc1ce,'\x62\x6c\x6f\x63\x6b\x65\x64':_0x5e3c5a,'\x6c\x65\x61\x6b\x73':_0x74366a,'\x6d\x6f\x64\x65':_0xe9eef8};}export function summarizeLeaks(_0x21261d){const _0x377f6e=_0x3098bb;return _0x21261d[_0x377f6e(0x22d,'\x78\x77\x46\x55')](_0x5561a0=>_0x5561a0['\x74\x79\x70\x65']+'\u2192'+_0x5561a0[_0x377f6e(0x28d,'\x4c\x4f\x34\x5d')+'\x6f\x6e'])[_0x377f6e(0x2af,'\x4d\x31\x46\x55')]('\x3b\x20');}
|