@tokenoftrust/storefront-runner 2.0.26 → 2.0.27
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/apps/storefront/src/lib/integration/stageDestinationIds.ts +67 -14
- package/apps/storefront/src/lib/integration/tenantAnalyticsDeclarations.ts +1 -1
- package/package.json +1 -1
- package/packages/public-runtime/schemas/managed-analytics/v1/adapter-definition.schema.json +6 -1
- package/packages/public-runtime/schemas/managed-analytics/v1/create-integration-install-request.schema.json +81 -66
- package/packages/public-runtime/schemas/managed-analytics/v1/create-migration-draft-request.schema.json +81 -66
- package/packages/public-runtime/schemas/managed-analytics/v1/integration-revision.schema.json +81 -66
- package/packages/public-runtime/schemas/managed-analytics/v1/migration-draft.schema.json +81 -66
- package/packages/public-runtime/schemas/managed-analytics/v1/revise-integration-install-request.schema.json +81 -66
- package/packages/public-runtime/schemas/managed-analytics/v1/update-migration-draft-request.schema.json +81 -66
- package/packages/public-runtime/src/gtm-migration/draft-generator.ts +1 -1
- package/packages/public-runtime/src/integration/managed-analytics-api-v1.schemas.ts +19 -6
- package/packages/public-runtime/src/integration/managed-analytics-api-v1.ts +49 -15
- package/packages/public-runtime/src/integration/native-amplitude.ts +22 -4
- package/packages/public-runtime/src/integration/native-ga4.ts +69 -38
- package/packages/public-runtime/src/integration/platform-adapters.ts +157 -54
- package/packages/public-runtime/tests/fixtures/integration/managed-analytics-v1/fake-adapter-catalog.json +13 -5
|
@@ -4,12 +4,18 @@
|
|
|
4
4
|
* (rebuilding a stored install's declaration). One parser, so what the console accepts
|
|
5
5
|
* and what actually fires can never disagree.
|
|
6
6
|
*
|
|
7
|
-
* WHY PER STAGE. `
|
|
8
|
-
* `buildPlatformAdapterDeclaration` refuses a non-live stage that reuses
|
|
7
|
+
* WHY PER STAGE. `resolveAdapterDestinationIds` reads only the CURRENT stage's ids, and
|
|
8
|
+
* `buildPlatformAdapterDeclaration` refuses a non-live stage that reuses a live one. So
|
|
9
9
|
* with a single id the runtime is already correct — a non-live stage resolves nothing and
|
|
10
10
|
* dispatches nothing — but the merchant has no way to measure anything off live either.
|
|
11
11
|
* A per-stage map is what makes non-live verification possible without pointing preview
|
|
12
12
|
* traffic at the property that carries real reporting.
|
|
13
|
+
*
|
|
14
|
+
* WHY SEVERAL PER STAGE. A vendor can natively receive one event at more than one
|
|
15
|
+
* property — a GA4 primary alongside a rollup — which is the shape an existing tag
|
|
16
|
+
* container already has. How many a stage may hold is the ADAPTER's declared cap, so an
|
|
17
|
+
* adapter whose runtime sends to exactly one destination refuses a second id here rather
|
|
18
|
+
* than silently dropping it later.
|
|
13
19
|
*/
|
|
14
20
|
import {
|
|
15
21
|
ADAPTER_CONFIG_STAGES,
|
|
@@ -36,9 +42,10 @@ export type StageDestinationIdsResult = StageDestinationIdsOk | StageDestination
|
|
|
36
42
|
* `live` is required because it is the stage that publishes; a non-live stage is optional
|
|
37
43
|
* and simply resolves nothing when absent. Every id is checked against the ADAPTER's own
|
|
38
44
|
* format validator, so a Meta pixel id cannot be accepted where a GA4 measurement id
|
|
39
|
-
* belongs
|
|
40
|
-
*
|
|
41
|
-
*
|
|
45
|
+
* belongs, and a failing id is named by its exact INDEX so a merchant with four of them
|
|
46
|
+
* learns which one is wrong. Reusing a live id on a non-live stage is refused HERE with a
|
|
47
|
+
* field-level message rather than left to the declaration builder, so the console can
|
|
48
|
+
* point at the offending id instead of failing the whole submission opaquely.
|
|
42
49
|
*/
|
|
43
50
|
export function parseStageDestinationIds(
|
|
44
51
|
input: unknown,
|
|
@@ -48,7 +55,7 @@ export function parseStageDestinationIds(
|
|
|
48
55
|
if (typeof input !== "object" || input === null || Array.isArray(input)) {
|
|
49
56
|
return {
|
|
50
57
|
ok: false,
|
|
51
|
-
details: [{ path: base, code: "type", message: "Expected a map of stage to destination
|
|
58
|
+
details: [{ path: base, code: "type", message: "Expected a map of stage to destination identifiers." }],
|
|
52
59
|
};
|
|
53
60
|
}
|
|
54
61
|
if (!platform) {
|
|
@@ -59,7 +66,7 @@ export function parseStageDestinationIds(
|
|
|
59
66
|
const details: StageDestinationIdsError["details"] = [];
|
|
60
67
|
const value: DestinationIdsByEnvironment = {};
|
|
61
68
|
|
|
62
|
-
for (const [stage,
|
|
69
|
+
for (const [stage, raw] of entries) {
|
|
63
70
|
const path = `${base}.${stage}`;
|
|
64
71
|
if (!(ADAPTER_CONFIG_STAGES as readonly string[]).includes(stage)) {
|
|
65
72
|
details.push({
|
|
@@ -69,32 +76,78 @@ export function parseStageDestinationIds(
|
|
|
69
76
|
});
|
|
70
77
|
continue;
|
|
71
78
|
}
|
|
72
|
-
if (
|
|
73
|
-
details.push({
|
|
79
|
+
if (!Array.isArray(raw)) {
|
|
80
|
+
details.push({
|
|
81
|
+
path,
|
|
82
|
+
code: "type",
|
|
83
|
+
message: "Expected an array of destination identifiers.",
|
|
84
|
+
});
|
|
74
85
|
continue;
|
|
75
86
|
}
|
|
76
|
-
|
|
87
|
+
if (raw.length === 0) {
|
|
88
|
+
details.push({
|
|
89
|
+
path,
|
|
90
|
+
code: "empty",
|
|
91
|
+
message: "A configured stage must name at least one destination identifier. Omit the stage to leave it unset.",
|
|
92
|
+
});
|
|
93
|
+
continue;
|
|
94
|
+
}
|
|
95
|
+
if (raw.length > platform.maxDestinationsPerStage) {
|
|
96
|
+
details.push({
|
|
97
|
+
path,
|
|
98
|
+
code: "too_many_destinations",
|
|
99
|
+
message: platform.maxDestinationsPerStage === 1
|
|
100
|
+
? `${platform.name} sends to one destination per stage; this stage names ${raw.length}.`
|
|
101
|
+
: `This stage names ${raw.length} destinations; ${platform.name} accepts at most ${platform.maxDestinationsPerStage} per stage.`,
|
|
102
|
+
});
|
|
103
|
+
continue;
|
|
104
|
+
}
|
|
105
|
+
let stageOk = true;
|
|
106
|
+
raw.forEach((id, index) => {
|
|
107
|
+
if (typeof id !== "string" || !platform.validateId(id)) {
|
|
108
|
+
details.push({
|
|
109
|
+
path: `${path}[${index}]`,
|
|
110
|
+
code: "format",
|
|
111
|
+
message: "Destination identifier has an invalid format.",
|
|
112
|
+
});
|
|
113
|
+
stageOk = false;
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
if (!stageOk) continue;
|
|
117
|
+
const ids = raw as string[];
|
|
118
|
+
if (new Set(ids).size !== ids.length) {
|
|
119
|
+
details.push({
|
|
120
|
+
path,
|
|
121
|
+
code: "duplicate",
|
|
122
|
+
message: "This stage names the same destination identifier twice; each event would be sent to it once per duplicate.",
|
|
123
|
+
});
|
|
124
|
+
continue;
|
|
125
|
+
}
|
|
126
|
+
value[stage as AdapterConfigStage] = ids;
|
|
77
127
|
}
|
|
78
128
|
|
|
79
|
-
|
|
129
|
+
const liveIds = value.live;
|
|
130
|
+
if (!liveIds || liveIds.length === 0) {
|
|
80
131
|
details.push({
|
|
81
132
|
path: `${base}.live`,
|
|
82
133
|
code: "required",
|
|
83
134
|
message: "A live destination identifier is required.",
|
|
84
135
|
});
|
|
85
136
|
} else {
|
|
137
|
+
const live = new Set(liveIds);
|
|
86
138
|
for (const stage of ADAPTER_CONFIG_STAGES) {
|
|
87
139
|
if (stage === "live") continue;
|
|
88
|
-
|
|
140
|
+
(value[stage] ?? []).forEach((id, index) => {
|
|
141
|
+
if (!live.has(id)) return;
|
|
89
142
|
details.push({
|
|
90
|
-
path: `${base}.${stage}`,
|
|
143
|
+
path: `${base}.${stage}[${index}]`,
|
|
91
144
|
code: "live_destination_reused",
|
|
92
145
|
message:
|
|
93
146
|
"A non-live stage must use its own TEST destination, never the live one — " +
|
|
94
147
|
"otherwise preview and candidate traffic lands in the property that carries " +
|
|
95
148
|
"real reporting.",
|
|
96
149
|
});
|
|
97
|
-
}
|
|
150
|
+
});
|
|
98
151
|
}
|
|
99
152
|
}
|
|
100
153
|
|
|
@@ -117,7 +117,7 @@ function readDestination(
|
|
|
117
117
|
return undefined;
|
|
118
118
|
}
|
|
119
119
|
if (!isPlainObject(raw["ids"])) {
|
|
120
|
-
v.add(`${base}.ids`, "type", "ids must be an object of { stage: destinationId }.");
|
|
120
|
+
v.add(`${base}.ids`, "type", "ids must be an object of { stage: destinationId[] }.");
|
|
121
121
|
return undefined;
|
|
122
122
|
}
|
|
123
123
|
return { adapter, ids: raw["ids"] };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tokenoftrust/storefront-runner",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.27",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"description": "World-shareable storefront runner: multi-tenant renderer on Astro/Cloudflare. No control plane.",
|
|
6
6
|
"packageManager": "pnpm@11.9.0",
|
|
@@ -138,7 +138,8 @@
|
|
|
138
138
|
"label",
|
|
139
139
|
"description",
|
|
140
140
|
"kind",
|
|
141
|
-
"required"
|
|
141
|
+
"required",
|
|
142
|
+
"maxEntries"
|
|
142
143
|
],
|
|
143
144
|
"properties": {
|
|
144
145
|
"key": {
|
|
@@ -208,6 +209,10 @@
|
|
|
208
209
|
},
|
|
209
210
|
"required": {
|
|
210
211
|
"type": "boolean"
|
|
212
|
+
},
|
|
213
|
+
"maxEntries": {
|
|
214
|
+
"type": "integer",
|
|
215
|
+
"minimum": 1
|
|
211
216
|
}
|
|
212
217
|
}
|
|
213
218
|
}
|
|
@@ -154,76 +154,91 @@
|
|
|
154
154
|
"minProperties": 1,
|
|
155
155
|
"properties": {
|
|
156
156
|
"candidate": {
|
|
157
|
-
"type": "
|
|
158
|
-
"
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
157
|
+
"type": "array",
|
|
158
|
+
"minItems": 1,
|
|
159
|
+
"uniqueItems": true,
|
|
160
|
+
"items": {
|
|
161
|
+
"type": "string",
|
|
162
|
+
"not": {
|
|
163
|
+
"anyOf": [
|
|
164
|
+
{
|
|
165
|
+
"type": "string",
|
|
166
|
+
"pattern": "(?:[Gg][Tt][Mm]-[A-Za-z0-9]+|[Uu][Aa]-[0-9]+-[0-9]+)"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"type": "string",
|
|
170
|
+
"pattern": "(?:-----BEGIN(?: [A-Z]+)? PRIVATE KEY-----|\\bAKIA[0-9A-Z]{16}\\b|\\bsk-proj-[A-Za-z0-9_-]{8,}\\b|\\bsk-[A-Za-z0-9_-]{20,}\\b|\\b(?:sk|rk)_(?:live|test|prod)_[A-Za-z0-9_-]{8,}\\b|\\b(?:gh[pousr]_|github_pat_)[A-Za-z0-9_]{20,}\\b|\\b(?:npm_|glpat-)[A-Za-z0-9_.-]{8,}\\b|\\bxox[baprs]-[A-Za-z0-9-]{10,}\\b|\\bAIza[A-Za-z0-9_-]{20,}\\b|\\bSG\\.[A-Za-z0-9_.-]{8,}\\b|\\b(?:[Ss]ecret|[Pp]assword|[Cc]redential)[_-][A-Za-z0-9_-]{4,}\\b|\\b[Bb]earer\\s+[A-Za-z0-9._~+/-]{12,}={0,2}\\b|\\beyJ[A-Za-z0-9_-]{8,}\\.[A-Za-z0-9_-]{8,}\\.[A-Za-z0-9_-]+\\b|\\b(?:api[_ -]?[Kk]ey|client[_ -]?[Ss]ecret|[Pp]assword|[Cc]redential|private[_ -]?[Kk]ey)\\s*[:=]\\s*\\S+)"
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"type": "string",
|
|
174
|
+
"pattern": "(?:[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}|\\b[0-9]{3}-[0-9]{2}-[0-9]{4}\\b|\\b(?:[0-9][ -]?){13,19}\\b|(?:^|[^0-9])(?:\\+?1[ .-]?)?(?:\\([2-9][0-9]{2}\\)|[2-9][0-9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
"minLength": 1
|
|
183
|
+
}
|
|
179
184
|
},
|
|
180
185
|
"staged": {
|
|
181
|
-
"type": "
|
|
182
|
-
"
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
186
|
+
"type": "array",
|
|
187
|
+
"minItems": 1,
|
|
188
|
+
"uniqueItems": true,
|
|
189
|
+
"items": {
|
|
190
|
+
"type": "string",
|
|
191
|
+
"not": {
|
|
192
|
+
"anyOf": [
|
|
193
|
+
{
|
|
194
|
+
"type": "string",
|
|
195
|
+
"pattern": "(?:[Gg][Tt][Mm]-[A-Za-z0-9]+|[Uu][Aa]-[0-9]+-[0-9]+)"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"type": "string",
|
|
199
|
+
"pattern": "(?:-----BEGIN(?: [A-Z]+)? PRIVATE KEY-----|\\bAKIA[0-9A-Z]{16}\\b|\\bsk-proj-[A-Za-z0-9_-]{8,}\\b|\\bsk-[A-Za-z0-9_-]{20,}\\b|\\b(?:sk|rk)_(?:live|test|prod)_[A-Za-z0-9_-]{8,}\\b|\\b(?:gh[pousr]_|github_pat_)[A-Za-z0-9_]{20,}\\b|\\b(?:npm_|glpat-)[A-Za-z0-9_.-]{8,}\\b|\\bxox[baprs]-[A-Za-z0-9-]{10,}\\b|\\bAIza[A-Za-z0-9_-]{20,}\\b|\\bSG\\.[A-Za-z0-9_.-]{8,}\\b|\\b(?:[Ss]ecret|[Pp]assword|[Cc]redential)[_-][A-Za-z0-9_-]{4,}\\b|\\b[Bb]earer\\s+[A-Za-z0-9._~+/-]{12,}={0,2}\\b|\\beyJ[A-Za-z0-9_-]{8,}\\.[A-Za-z0-9_-]{8,}\\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nn][Ss][Oo][Ll][Ee])\\s*(?:\\.|\\[)|[A-Za-z_$][A-Za-z0-9_$]*\\s*\\.\\s*[A-Za-z_$][A-Za-z0-9_$]*\\s*\\(|[A-Za-z_$][A-Za-z0-9_$]*\\s*\\([^)]*\\)\\s*;|[Rr][Ee][Tt][Uu][Rr][Nn][^;{}]*;|[Ff][Uu][Nn][Cc][Tt][Ii][Oo][Nn]|=>|(?:[Vv][Aa][Rr]|[Ll][Ee][Tt]|[Cc][Oo][Nn][Ss][Tt])\\s+[A-Za-z_$])"
|
|
208
|
+
}
|
|
209
|
+
]
|
|
210
|
+
},
|
|
211
|
+
"minLength": 1
|
|
212
|
+
}
|
|
203
213
|
},
|
|
204
214
|
"live": {
|
|
205
|
-
"type": "
|
|
206
|
-
"
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
215
|
+
"type": "array",
|
|
216
|
+
"minItems": 1,
|
|
217
|
+
"uniqueItems": true,
|
|
218
|
+
"items": {
|
|
219
|
+
"type": "string",
|
|
220
|
+
"not": {
|
|
221
|
+
"anyOf": [
|
|
222
|
+
{
|
|
223
|
+
"type": "string",
|
|
224
|
+
"pattern": "(?:[Gg][Tt][Mm]-[A-Za-z0-9]+|[Uu][Aa]-[0-9]+-[0-9]+)"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"type": "string",
|
|
228
|
+
"pattern": "(?:-----BEGIN(?: [A-Z]+)? PRIVATE KEY-----|\\bAKIA[0-9A-Z]{16}\\b|\\bsk-proj-[A-Za-z0-9_-]{8,}\\b|\\bsk-[A-Za-z0-9_-]{20,}\\b|\\b(?:sk|rk)_(?:live|test|prod)_[A-Za-z0-9_-]{8,}\\b|\\b(?:gh[pousr]_|github_pat_)[A-Za-z0-9_]{20,}\\b|\\b(?:npm_|glpat-)[A-Za-z0-9_.-]{8,}\\b|\\bxox[baprs]-[A-Za-z0-9-]{10,}\\b|\\bAIza[A-Za-z0-9_-]{20,}\\b|\\bSG\\.[A-Za-z0-9_.-]{8,}\\b|\\b(?:[Ss]ecret|[Pp]assword|[Cc]redential)[_-][A-Za-z0-9_-]{4,}\\b|\\b[Bb]earer\\s+[A-Za-z0-9._~+/-]{12,}={0,2}\\b|\\beyJ[A-Za-z0-9_-]{8,}\\.[A-Za-z0-9_-]{8,}\\.[A-Za-z0-9_-]+\\b|\\b(?:api[_ -]?[Kk]ey|client[_ -]?[Ss]ecret|[Pp]assword|[Cc]redential|private[_ -]?[Kk]ey)\\s*[:=]\\s*\\S+)"
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"type": "string",
|
|
232
|
+
"pattern": "(?:[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}|\\b[0-9]{3}-[0-9]{2}-[0-9]{4}\\b|\\b(?:[0-9][ -]?){13,19}\\b|(?:^|[^0-9])(?:\\+?1[ .-]?)?(?:\\([2-9][0-9]{2}\\)|[2-9][0-9]{2})[ .-]?[0-9]{3}[ .-]?[0-9]{4}(?=$|[^0-9]))"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"type": "string",
|
|
236
|
+
"pattern": "(?:</?[A-Za-z][^>]*>|[Jj][Aa][Vv][Aa][Ss][Cc][Rr][Ii][Pp][Tt]\\s*:|[Ee][Vv][Aa][Ll]\\s*\\(|(?:[Aa][Ll][Ee][Rr][Tt]|[Ff][Ee][Tt][Cc][Hh])\\s*\\(|\\{\\{|\\}\\}|\\$\\{|#[A-Za-z_][A-Za-z0-9_-]*|(?:^|[\\s,>+~])\\.[A-Za-z_-][A-Za-z0-9_-]*(?:$|[\\s,>+~.#[\\:])|\\[[A-Za-z_:][-A-Za-z0-9_:.]*(?:[~|^$*]?=[^\\]]+)?\\]|(?:[Ll][Oo][Cc][Aa][Ll]|[Ss][Ee][Ss][Ss][Ii][Oo][Nn])[Ss][Tt][Oo][Rr][Aa][Gg][Ee]|[Ii][Nn][Dd][Ee][Xx][Ee][Dd][Dd][Bb]|[Qq][Uu][Ee][Rr][Yy][Ss][Ee][Ll][Ee][Cc][Tt][Oo][Rr]|(?:[Ww][Ii][Nn][Dd][Oo][Ww]|[Dd][Oo][Cc][Uu][Mm][Ee][Nn][Tt]|[Gg][Ll][Oo][Bb][Aa][Ll][Tt][Hh][Ii][Ss]|[Cc][Oo][Nn][Ss][Oo][Ll][Ee])\\s*(?:\\.|\\[)|[A-Za-z_$][A-Za-z0-9_$]*\\s*\\.\\s*[A-Za-z_$][A-Za-z0-9_$]*\\s*\\(|[A-Za-z_$][A-Za-z0-9_$]*\\s*\\([^)]*\\)\\s*;|[Rr][Ee][Tt][Uu][Rr][Nn][^;{}]*;|[Ff][Uu][Nn][Cc][Tt][Ii][Oo][Nn]|=>|(?:[Vv][Aa][Rr]|[Ll][Ee][Tt]|[Cc][Oo][Nn][Ss][Tt])\\s+[A-Za-z_$])"
|
|
237
|
+
}
|
|
238
|
+
]
|
|
239
|
+
},
|
|
240
|
+
"minLength": 1
|
|
241
|
+
}
|
|
227
242
|
}
|
|
228
243
|
}
|
|
229
244
|
}
|
|
@@ -127,76 +127,91 @@
|
|
|
127
127
|
"minProperties": 1,
|
|
128
128
|
"properties": {
|
|
129
129
|
"candidate": {
|
|
130
|
-
"type": "
|
|
131
|
-
"
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
130
|
+
"type": "array",
|
|
131
|
+
"minItems": 1,
|
|
132
|
+
"uniqueItems": true,
|
|
133
|
+
"items": {
|
|
134
|
+
"type": "string",
|
|
135
|
+
"not": {
|
|
136
|
+
"anyOf": [
|
|
137
|
+
{
|
|
138
|
+
"type": "string",
|
|
139
|
+
"pattern": "(?:[Gg][Tt][Mm]-[A-Za-z0-9]+|[Uu][Aa]-[0-9]+-[0-9]+)"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"type": "string",
|
|
143
|
+
"pattern": "(?:-----BEGIN(?: [A-Z]+)? PRIVATE KEY-----|\\bAKIA[0-9A-Z]{16}\\b|\\bsk-proj-[A-Za-z0-9_-]{8,}\\b|\\bsk-[A-Za-z0-9_-]{20,}\\b|\\b(?:sk|rk)_(?:live|test|prod)_[A-Za-z0-9_-]{8,}\\b|\\b(?:gh[pousr]_|github_pat_)[A-Za-z0-9_]{20,}\\b|\\b(?:npm_|glpat-)[A-Za-z0-9_.-]{8,}\\b|\\bxox[baprs]-[A-Za-z0-9-]{10,}\\b|\\bAIza[A-Za-z0-9_-]{20,}\\b|\\bSG\\.[A-Za-z0-9_.-]{8,}\\b|\\b(?:[Ss]ecret|[Pp]assword|[Cc]redential)[_-][A-Za-z0-9_-]{4,}\\b|\\b[Bb]earer\\s+[A-Za-z0-9._~+/-]{12,}={0,2}\\b|\\beyJ[A-Za-z0-9_-]{8,}\\.[A-Za-z0-9_-]{8,}\\.[A-Za-z0-9_-]+\\b|\\b(?:api[_ -]?[Kk]ey|client[_ -]?[Ss]ecret|[Pp]assword|[Cc]redential|private[_ -]?[Kk]ey)\\s*[:=]\\s*\\S+)"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
"type": "string",
|
|
147
|
+
"pattern": "(?:[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}|\\b[0-9]{3}-[0-9]{2}-[0-9]{4}\\b|\\b(?:[0-9][ -]?){13,19}\\b|(?:^|[^0-9])(?:\\+?1[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
}
|
|
153
|
+
]
|
|
154
|
+
},
|
|
155
|
+
"minLength": 1
|
|
156
|
+
}
|
|
152
157
|
},
|
|
153
158
|
"staged": {
|
|
154
|
-
"type": "
|
|
155
|
-
"
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
159
|
+
"type": "array",
|
|
160
|
+
"minItems": 1,
|
|
161
|
+
"uniqueItems": true,
|
|
162
|
+
"items": {
|
|
163
|
+
"type": "string",
|
|
164
|
+
"not": {
|
|
165
|
+
"anyOf": [
|
|
166
|
+
{
|
|
167
|
+
"type": "string",
|
|
168
|
+
"pattern": "(?:[Gg][Tt][Mm]-[A-Za-z0-9]+|[Uu][Aa]-[0-9]+-[0-9]+)"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"type": "string",
|
|
172
|
+
"pattern": "(?:-----BEGIN(?: [A-Z]+)? PRIVATE KEY-----|\\bAKIA[0-9A-Z]{16}\\b|\\bsk-proj-[A-Za-z0-9_-]{8,}\\b|\\bsk-[A-Za-z0-9_-]{20,}\\b|\\b(?:sk|rk)_(?:live|test|prod)_[A-Za-z0-9_-]{8,}\\b|\\b(?:gh[pousr]_|github_pat_)[A-Za-z0-9_]{20,}\\b|\\b(?:npm_|glpat-)[A-Za-z0-9_.-]{8,}\\b|\\bxox[baprs]-[A-Za-z0-9-]{10,}\\b|\\bAIza[A-Za-z0-9_-]{20,}\\b|\\bSG\\.[A-Za-z0-9_.-]{8,}\\b|\\b(?:[Ss]ecret|[Pp]assword|[Cc]redential)[_-][A-Za-z0-9_-]{4,}\\b|\\b[Bb]earer\\s+[A-Za-z0-9._~+/-]{12,}={0,2}\\b|\\beyJ[A-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][Aa][Ll][Tt][Hh][Ii][Ss]|[Cc][Oo][Nn][Ss][Oo][Ll][Ee])\\s*(?:\\.|\\[)|[A-Za-z_$][A-Za-z0-9_$]*\\s*\\.\\s*[A-Za-z_$][A-Za-z0-9_$]*\\s*\\(|[A-Za-z_$][A-Za-z0-9_$]*\\s*\\([^)]*\\)\\s*;|[Rr][Ee][Tt][Uu][Rr][Nn][^;{}]*;|[Ff][Uu][Nn][Cc][Tt][Ii][Oo][Nn]|=>|(?:[Vv][Aa][Rr]|[Ll][Ee][Tt]|[Cc][Oo][Nn][Ss][Tt])\\s+[A-Za-z_$])"
|
|
181
|
+
}
|
|
182
|
+
]
|
|
183
|
+
},
|
|
184
|
+
"minLength": 1
|
|
185
|
+
}
|
|
176
186
|
},
|
|
177
187
|
"live": {
|
|
178
|
-
"type": "
|
|
179
|
-
"
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
188
|
+
"type": "array",
|
|
189
|
+
"minItems": 1,
|
|
190
|
+
"uniqueItems": true,
|
|
191
|
+
"items": {
|
|
192
|
+
"type": "string",
|
|
193
|
+
"not": {
|
|
194
|
+
"anyOf": [
|
|
195
|
+
{
|
|
196
|
+
"type": "string",
|
|
197
|
+
"pattern": "(?:[Gg][Tt][Mm]-[A-Za-z0-9]+|[Uu][Aa]-[0-9]+-[0-9]+)"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"type": "string",
|
|
201
|
+
"pattern": "(?:-----BEGIN(?: [A-Z]+)? PRIVATE KEY-----|\\bAKIA[0-9A-Z]{16}\\b|\\bsk-proj-[A-Za-z0-9_-]{8,}\\b|\\bsk-[A-Za-z0-9_-]{20,}\\b|\\b(?:sk|rk)_(?:live|test|prod)_[A-Za-z0-9_-]{8,}\\b|\\b(?:gh[pousr]_|github_pat_)[A-Za-z0-9_]{20,}\\b|\\b(?:npm_|glpat-)[A-Za-z0-9_.-]{8,}\\b|\\bxox[baprs]-[A-Za-z0-9-]{10,}\\b|\\bAIza[A-Za-z0-9_-]{20,}\\b|\\bSG\\.[A-Za-z0-9_.-]{8,}\\b|\\b(?:[Ss]ecret|[Pp]assword|[Cc]redential)[_-][A-Za-z0-9_-]{4,}\\b|\\b[Bb]earer\\s+[A-Za-z0-9._~+/-]{12,}={0,2}\\b|\\beyJ[A-Za-z0-9_-]{8,}\\.[A-Za-z0-9_-]{8,}\\.[A-Za-z0-9_-]+\\b|\\b(?:api[_ -]?[Kk]ey|client[_ -]?[Ss]ecret|[Pp]assword|[Cc]redential|private[_ -]?[Kk]ey)\\s*[:=]\\s*\\S+)"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
"type": "string",
|
|
205
|
+
"pattern": "(?:[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}|\\b[0-9]{3}-[0-9]{2}-[0-9]{4}\\b|\\b(?:[0-9][ -]?){13,19}\\b|(?:^|[^0-9])(?:\\+?1[ .-]?)?(?:\\([2-9][0-9]{2}\\)|[2-9][0-9]{2})[ .-]?[0-9]{3}[ .-]?[0-9]{4}(?=$|[^0-9]))"
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"type": "string",
|
|
209
|
+
"pattern": "(?:</?[A-Za-z][^>]*>|[Jj][Aa][Vv][Aa][Ss][Cc][Rr][Ii][Pp][Tt]\\s*:|[Ee][Vv][Aa][Ll]\\s*\\(|(?:[Aa][Ll][Ee][Rr][Tt]|[Ff][Ee][Tt][Cc][Hh])\\s*\\(|\\{\\{|\\}\\}|\\$\\{|#[A-Za-z_][A-Za-z0-9_-]*|(?:^|[\\s,>+~])\\.[A-Za-z_-][A-Za-z0-9_-]*(?:$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