deepline 0.2.19 → 0.2.20
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/bundling-sources/sdk/src/release.ts +1 -1
- package/dist/bundling-sources/shared_libs/plays/secret-guardrails.ts +0 -42
- package/dist/cli/index.js +5 -31
- package/dist/cli/index.mjs +5 -31
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/plays/bundle-play-file.mjs +0 -30
- package/package.json +1 -1
|
@@ -160,7 +160,7 @@ export const SDK_RELEASE = {
|
|
|
160
160
|
// 0.2.0 makes Dataset Handles uniformly async-only after 0.1.320 briefly
|
|
161
161
|
// exposed storage-dependent synchronous access. This deliberate minor
|
|
162
162
|
// release keeps lazy paging semantics independent of row residency.
|
|
163
|
-
version: '0.2.
|
|
163
|
+
version: '0.2.20',
|
|
164
164
|
contracts: {
|
|
165
165
|
api: {
|
|
166
166
|
name: 'sdk-http-api',
|
|
@@ -5,34 +5,6 @@ const PRIVATE_KEY_PATTERN =
|
|
|
5
5
|
const BEARER_LITERAL_PATTERN = /\bBearer\s+[A-Za-z0-9._~+/=-]{16,}/i;
|
|
6
6
|
const ASSIGNMENT_SECRET_LITERAL_PATTERN =
|
|
7
7
|
/\b(?:api[_-]?key|token|secret|password)\b\s*[:=]\s*['"][^'"]{12,}['"]/i;
|
|
8
|
-
const HIGH_ENTROPY_LITERAL_PATTERN = /['"]([A-Za-z0-9+/=_-]{32,})['"]/g;
|
|
9
|
-
const UUID_IDENTIFIER_PATTERN =
|
|
10
|
-
/^((?:[A-Za-z0-9]+[-_])*)?([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$/i;
|
|
11
|
-
const BOOTSTRAP_RESOURCE_IDENTIFIER_PATTERN =
|
|
12
|
-
/^bootstrap-[0-9a-f]{32}(?:\/[a-z0-9][a-z0-9_-]{0,127})?$/i;
|
|
13
|
-
const SECRET_LABEL_PATTERN =
|
|
14
|
-
/(?:^|[-_])(?:api|auth|access|secret|token|key|password|credential|bearer|sk|pk|live)(?:[-_]|$)/i;
|
|
15
|
-
|
|
16
|
-
function shannonEntropy(value: string): number {
|
|
17
|
-
const counts = new Map<string, number>();
|
|
18
|
-
for (const char of value) counts.set(char, (counts.get(char) ?? 0) + 1);
|
|
19
|
-
return [...counts.values()].reduce((entropy, count) => {
|
|
20
|
-
const p = count / value.length;
|
|
21
|
-
return entropy - p * Math.log2(p);
|
|
22
|
-
}, 0);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
function isNonSecretUuidIdentifier(value: string): boolean {
|
|
26
|
-
const match = UUID_IDENTIFIER_PATTERN.exec(value);
|
|
27
|
-
if (!match) return false;
|
|
28
|
-
const label = match[1] ?? '';
|
|
29
|
-
return !SECRET_LABEL_PATTERN.test(label);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
function isNonSecretBootstrapResourceIdentifier(value: string): boolean {
|
|
33
|
-
return BOOTSTRAP_RESOURCE_IDENTIFIER_PATTERN.test(value);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
8
|
/**
|
|
37
9
|
* Returns the inline-secret findings in a string (empty if none). The throwing
|
|
38
10
|
* validator below and the workflows→plays migration validator both call this so
|
|
@@ -50,20 +22,6 @@ export function collectInlineSecretFindings(sourceCode: string): string[] {
|
|
|
50
22
|
if (ASSIGNMENT_SECRET_LITERAL_PATTERN.test(sourceCode)) {
|
|
51
23
|
findings.push('secret-looking assignment literal');
|
|
52
24
|
}
|
|
53
|
-
for (const match of sourceCode.matchAll(HIGH_ENTROPY_LITERAL_PATTERN)) {
|
|
54
|
-
const literal = match[1] ?? '';
|
|
55
|
-
// UUID-bearing resource names are structured identifiers, not opaque
|
|
56
|
-
// credentials. Keep secret-looking labels on the conservative path.
|
|
57
|
-
if (isNonSecretUuidIdentifier(literal)) continue;
|
|
58
|
-
// Named CI orgs use a deterministic public `bootstrap-<sha256-prefix>`
|
|
59
|
-
// slug. It is an address, not a credential, and owner-qualified ctx.runPlay
|
|
60
|
-
// references must embed it as a literal for static child resolution.
|
|
61
|
-
if (isNonSecretBootstrapResourceIdentifier(literal)) continue;
|
|
62
|
-
if (literal.length >= 40 && shannonEntropy(literal) >= 4.2) {
|
|
63
|
-
findings.push('high-entropy string literal');
|
|
64
|
-
break;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
25
|
return [...new Set(findings)];
|
|
68
26
|
}
|
|
69
27
|
|
package/dist/cli/index.js
CHANGED
|
@@ -1044,7 +1044,7 @@ var SDK_RELEASE = {
|
|
|
1044
1044
|
// 0.2.0 makes Dataset Handles uniformly async-only after 0.1.320 briefly
|
|
1045
1045
|
// exposed storage-dependent synchronous access. This deliberate minor
|
|
1046
1046
|
// release keeps lazy paging semantics independent of row residency.
|
|
1047
|
-
version: "0.2.
|
|
1047
|
+
version: "0.2.20",
|
|
1048
1048
|
contracts: {
|
|
1049
1049
|
api: {
|
|
1050
1050
|
name: "sdk-http-api",
|
|
@@ -6479,6 +6479,10 @@ function collectLocalEnvInfo() {
|
|
|
6479
6479
|
function readCsvRows(csvPath) {
|
|
6480
6480
|
const raw = (0, import_node_fs4.readFileSync)((0, import_node_path4.resolve)(csvPath), "utf-8");
|
|
6481
6481
|
return (0, import_sync.parse)(raw, {
|
|
6482
|
+
// `csv-parse` otherwise treats a BOM before an opening quote as a field
|
|
6483
|
+
// value, then rejects the quote as invalid. A UTF-8 BOM is a valid file
|
|
6484
|
+
// prefix and must not become part of the first column name either.
|
|
6485
|
+
bom: true,
|
|
6482
6486
|
columns: true,
|
|
6483
6487
|
skip_empty_lines: true
|
|
6484
6488
|
});
|
|
@@ -15923,27 +15927,6 @@ var SECRET_ENV_PATTERN = /\bprocess(?:\.env|\[['"]env['"]\])(?:\.|\[['"])([A-Z0-
|
|
|
15923
15927
|
var PRIVATE_KEY_PATTERN = /-----BEGIN (?:RSA |EC |OPENSSH |PGP )?PRIVATE KEY-----/;
|
|
15924
15928
|
var BEARER_LITERAL_PATTERN = /\bBearer\s+[A-Za-z0-9._~+/=-]{16,}/i;
|
|
15925
15929
|
var ASSIGNMENT_SECRET_LITERAL_PATTERN = /\b(?:api[_-]?key|token|secret|password)\b\s*[:=]\s*['"][^'"]{12,}['"]/i;
|
|
15926
|
-
var HIGH_ENTROPY_LITERAL_PATTERN = /['"]([A-Za-z0-9+/=_-]{32,})['"]/g;
|
|
15927
|
-
var UUID_IDENTIFIER_PATTERN = /^((?:[A-Za-z0-9]+[-_])*)?([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$/i;
|
|
15928
|
-
var BOOTSTRAP_RESOURCE_IDENTIFIER_PATTERN = /^bootstrap-[0-9a-f]{32}(?:\/[a-z0-9][a-z0-9_-]{0,127})?$/i;
|
|
15929
|
-
var SECRET_LABEL_PATTERN = /(?:^|[-_])(?:api|auth|access|secret|token|key|password|credential|bearer|sk|pk|live)(?:[-_]|$)/i;
|
|
15930
|
-
function shannonEntropy(value) {
|
|
15931
|
-
const counts = /* @__PURE__ */ new Map();
|
|
15932
|
-
for (const char of value) counts.set(char, (counts.get(char) ?? 0) + 1);
|
|
15933
|
-
return [...counts.values()].reduce((entropy, count) => {
|
|
15934
|
-
const p = count / value.length;
|
|
15935
|
-
return entropy - p * Math.log2(p);
|
|
15936
|
-
}, 0);
|
|
15937
|
-
}
|
|
15938
|
-
function isNonSecretUuidIdentifier(value) {
|
|
15939
|
-
const match = UUID_IDENTIFIER_PATTERN.exec(value);
|
|
15940
|
-
if (!match) return false;
|
|
15941
|
-
const label = match[1] ?? "";
|
|
15942
|
-
return !SECRET_LABEL_PATTERN.test(label);
|
|
15943
|
-
}
|
|
15944
|
-
function isNonSecretBootstrapResourceIdentifier(value) {
|
|
15945
|
-
return BOOTSTRAP_RESOURCE_IDENTIFIER_PATTERN.test(value);
|
|
15946
|
-
}
|
|
15947
15930
|
function collectInlineSecretFindings(sourceCode) {
|
|
15948
15931
|
const findings = [];
|
|
15949
15932
|
for (const match of sourceCode.matchAll(SECRET_ENV_PATTERN)) {
|
|
@@ -15955,15 +15938,6 @@ function collectInlineSecretFindings(sourceCode) {
|
|
|
15955
15938
|
if (ASSIGNMENT_SECRET_LITERAL_PATTERN.test(sourceCode)) {
|
|
15956
15939
|
findings.push("secret-looking assignment literal");
|
|
15957
15940
|
}
|
|
15958
|
-
for (const match of sourceCode.matchAll(HIGH_ENTROPY_LITERAL_PATTERN)) {
|
|
15959
|
-
const literal = match[1] ?? "";
|
|
15960
|
-
if (isNonSecretUuidIdentifier(literal)) continue;
|
|
15961
|
-
if (isNonSecretBootstrapResourceIdentifier(literal)) continue;
|
|
15962
|
-
if (literal.length >= 40 && shannonEntropy(literal) >= 4.2) {
|
|
15963
|
-
findings.push("high-entropy string literal");
|
|
15964
|
-
break;
|
|
15965
|
-
}
|
|
15966
|
-
}
|
|
15967
15941
|
return [...new Set(findings)];
|
|
15968
15942
|
}
|
|
15969
15943
|
|
package/dist/cli/index.mjs
CHANGED
|
@@ -1030,7 +1030,7 @@ var SDK_RELEASE = {
|
|
|
1030
1030
|
// 0.2.0 makes Dataset Handles uniformly async-only after 0.1.320 briefly
|
|
1031
1031
|
// exposed storage-dependent synchronous access. This deliberate minor
|
|
1032
1032
|
// release keeps lazy paging semantics independent of row residency.
|
|
1033
|
-
version: "0.2.
|
|
1033
|
+
version: "0.2.20",
|
|
1034
1034
|
contracts: {
|
|
1035
1035
|
api: {
|
|
1036
1036
|
name: "sdk-http-api",
|
|
@@ -6477,6 +6477,10 @@ function collectLocalEnvInfo() {
|
|
|
6477
6477
|
function readCsvRows(csvPath) {
|
|
6478
6478
|
const raw = readFileSync4(resolve2(csvPath), "utf-8");
|
|
6479
6479
|
return parse(raw, {
|
|
6480
|
+
// `csv-parse` otherwise treats a BOM before an opening quote as a field
|
|
6481
|
+
// value, then rejects the quote as invalid. A UTF-8 BOM is a valid file
|
|
6482
|
+
// prefix and must not become part of the first column name either.
|
|
6483
|
+
bom: true,
|
|
6480
6484
|
columns: true,
|
|
6481
6485
|
skip_empty_lines: true
|
|
6482
6486
|
});
|
|
@@ -15960,27 +15964,6 @@ var SECRET_ENV_PATTERN = /\bprocess(?:\.env|\[['"]env['"]\])(?:\.|\[['"])([A-Z0-
|
|
|
15960
15964
|
var PRIVATE_KEY_PATTERN = /-----BEGIN (?:RSA |EC |OPENSSH |PGP )?PRIVATE KEY-----/;
|
|
15961
15965
|
var BEARER_LITERAL_PATTERN = /\bBearer\s+[A-Za-z0-9._~+/=-]{16,}/i;
|
|
15962
15966
|
var ASSIGNMENT_SECRET_LITERAL_PATTERN = /\b(?:api[_-]?key|token|secret|password)\b\s*[:=]\s*['"][^'"]{12,}['"]/i;
|
|
15963
|
-
var HIGH_ENTROPY_LITERAL_PATTERN = /['"]([A-Za-z0-9+/=_-]{32,})['"]/g;
|
|
15964
|
-
var UUID_IDENTIFIER_PATTERN = /^((?:[A-Za-z0-9]+[-_])*)?([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$/i;
|
|
15965
|
-
var BOOTSTRAP_RESOURCE_IDENTIFIER_PATTERN = /^bootstrap-[0-9a-f]{32}(?:\/[a-z0-9][a-z0-9_-]{0,127})?$/i;
|
|
15966
|
-
var SECRET_LABEL_PATTERN = /(?:^|[-_])(?:api|auth|access|secret|token|key|password|credential|bearer|sk|pk|live)(?:[-_]|$)/i;
|
|
15967
|
-
function shannonEntropy(value) {
|
|
15968
|
-
const counts = /* @__PURE__ */ new Map();
|
|
15969
|
-
for (const char of value) counts.set(char, (counts.get(char) ?? 0) + 1);
|
|
15970
|
-
return [...counts.values()].reduce((entropy, count) => {
|
|
15971
|
-
const p = count / value.length;
|
|
15972
|
-
return entropy - p * Math.log2(p);
|
|
15973
|
-
}, 0);
|
|
15974
|
-
}
|
|
15975
|
-
function isNonSecretUuidIdentifier(value) {
|
|
15976
|
-
const match = UUID_IDENTIFIER_PATTERN.exec(value);
|
|
15977
|
-
if (!match) return false;
|
|
15978
|
-
const label = match[1] ?? "";
|
|
15979
|
-
return !SECRET_LABEL_PATTERN.test(label);
|
|
15980
|
-
}
|
|
15981
|
-
function isNonSecretBootstrapResourceIdentifier(value) {
|
|
15982
|
-
return BOOTSTRAP_RESOURCE_IDENTIFIER_PATTERN.test(value);
|
|
15983
|
-
}
|
|
15984
15967
|
function collectInlineSecretFindings(sourceCode) {
|
|
15985
15968
|
const findings = [];
|
|
15986
15969
|
for (const match of sourceCode.matchAll(SECRET_ENV_PATTERN)) {
|
|
@@ -15992,15 +15975,6 @@ function collectInlineSecretFindings(sourceCode) {
|
|
|
15992
15975
|
if (ASSIGNMENT_SECRET_LITERAL_PATTERN.test(sourceCode)) {
|
|
15993
15976
|
findings.push("secret-looking assignment literal");
|
|
15994
15977
|
}
|
|
15995
|
-
for (const match of sourceCode.matchAll(HIGH_ENTROPY_LITERAL_PATTERN)) {
|
|
15996
|
-
const literal = match[1] ?? "";
|
|
15997
|
-
if (isNonSecretUuidIdentifier(literal)) continue;
|
|
15998
|
-
if (isNonSecretBootstrapResourceIdentifier(literal)) continue;
|
|
15999
|
-
if (literal.length >= 40 && shannonEntropy(literal) >= 4.2) {
|
|
16000
|
-
findings.push("high-entropy string literal");
|
|
16001
|
-
break;
|
|
16002
|
-
}
|
|
16003
|
-
}
|
|
16004
15978
|
return [...new Set(findings)];
|
|
16005
15979
|
}
|
|
16006
15980
|
|
package/dist/index.js
CHANGED
|
@@ -763,7 +763,7 @@ var SDK_RELEASE = {
|
|
|
763
763
|
// 0.2.0 makes Dataset Handles uniformly async-only after 0.1.320 briefly
|
|
764
764
|
// exposed storage-dependent synchronous access. This deliberate minor
|
|
765
765
|
// release keeps lazy paging semantics independent of row residency.
|
|
766
|
-
version: "0.2.
|
|
766
|
+
version: "0.2.20",
|
|
767
767
|
contracts: {
|
|
768
768
|
api: {
|
|
769
769
|
name: "sdk-http-api",
|
package/dist/index.mjs
CHANGED
|
@@ -689,7 +689,7 @@ var SDK_RELEASE = {
|
|
|
689
689
|
// 0.2.0 makes Dataset Handles uniformly async-only after 0.1.320 briefly
|
|
690
690
|
// exposed storage-dependent synchronous access. This deliberate minor
|
|
691
691
|
// release keeps lazy paging semantics independent of row residency.
|
|
692
|
-
version: "0.2.
|
|
692
|
+
version: "0.2.20",
|
|
693
693
|
contracts: {
|
|
694
694
|
api: {
|
|
695
695
|
name: "sdk-http-api",
|
|
@@ -3921,27 +3921,6 @@ var SECRET_ENV_PATTERN = /\bprocess(?:\.env|\[['"]env['"]\])(?:\.|\[['"])([A-Z0-
|
|
|
3921
3921
|
var PRIVATE_KEY_PATTERN = /-----BEGIN (?:RSA |EC |OPENSSH |PGP )?PRIVATE KEY-----/;
|
|
3922
3922
|
var BEARER_LITERAL_PATTERN = /\bBearer\s+[A-Za-z0-9._~+/=-]{16,}/i;
|
|
3923
3923
|
var ASSIGNMENT_SECRET_LITERAL_PATTERN = /\b(?:api[_-]?key|token|secret|password)\b\s*[:=]\s*['"][^'"]{12,}['"]/i;
|
|
3924
|
-
var HIGH_ENTROPY_LITERAL_PATTERN = /['"]([A-Za-z0-9+/=_-]{32,})['"]/g;
|
|
3925
|
-
var UUID_IDENTIFIER_PATTERN = /^((?:[A-Za-z0-9]+[-_])*)?([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$/i;
|
|
3926
|
-
var BOOTSTRAP_RESOURCE_IDENTIFIER_PATTERN = /^bootstrap-[0-9a-f]{32}(?:\/[a-z0-9][a-z0-9_-]{0,127})?$/i;
|
|
3927
|
-
var SECRET_LABEL_PATTERN = /(?:^|[-_])(?:api|auth|access|secret|token|key|password|credential|bearer|sk|pk|live)(?:[-_]|$)/i;
|
|
3928
|
-
function shannonEntropy(value) {
|
|
3929
|
-
const counts = /* @__PURE__ */ new Map();
|
|
3930
|
-
for (const char of value) counts.set(char, (counts.get(char) ?? 0) + 1);
|
|
3931
|
-
return [...counts.values()].reduce((entropy, count) => {
|
|
3932
|
-
const p = count / value.length;
|
|
3933
|
-
return entropy - p * Math.log2(p);
|
|
3934
|
-
}, 0);
|
|
3935
|
-
}
|
|
3936
|
-
function isNonSecretUuidIdentifier(value) {
|
|
3937
|
-
const match = UUID_IDENTIFIER_PATTERN.exec(value);
|
|
3938
|
-
if (!match) return false;
|
|
3939
|
-
const label = match[1] ?? "";
|
|
3940
|
-
return !SECRET_LABEL_PATTERN.test(label);
|
|
3941
|
-
}
|
|
3942
|
-
function isNonSecretBootstrapResourceIdentifier(value) {
|
|
3943
|
-
return BOOTSTRAP_RESOURCE_IDENTIFIER_PATTERN.test(value);
|
|
3944
|
-
}
|
|
3945
3924
|
function collectInlineSecretFindings(sourceCode) {
|
|
3946
3925
|
const findings = [];
|
|
3947
3926
|
for (const match of sourceCode.matchAll(SECRET_ENV_PATTERN)) {
|
|
@@ -3953,15 +3932,6 @@ function collectInlineSecretFindings(sourceCode) {
|
|
|
3953
3932
|
if (ASSIGNMENT_SECRET_LITERAL_PATTERN.test(sourceCode)) {
|
|
3954
3933
|
findings.push("secret-looking assignment literal");
|
|
3955
3934
|
}
|
|
3956
|
-
for (const match of sourceCode.matchAll(HIGH_ENTROPY_LITERAL_PATTERN)) {
|
|
3957
|
-
const literal = match[1] ?? "";
|
|
3958
|
-
if (isNonSecretUuidIdentifier(literal)) continue;
|
|
3959
|
-
if (isNonSecretBootstrapResourceIdentifier(literal)) continue;
|
|
3960
|
-
if (literal.length >= 40 && shannonEntropy(literal) >= 4.2) {
|
|
3961
|
-
findings.push("high-entropy string literal");
|
|
3962
|
-
break;
|
|
3963
|
-
}
|
|
3964
|
-
}
|
|
3965
3935
|
return [...new Set(findings)];
|
|
3966
3936
|
}
|
|
3967
3937
|
function validatePlaySourceHasNoInlineSecrets(input) {
|