@jinn-network/client 0.1.9-canary.e48da588 → 0.1.9-canary.eb857584
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/build-info.json +3 -3
- package/dist/build-meta.json +1 -1
- package/dist/trajectory/scrub/openredaction-stage.d.ts +0 -55
- package/dist/trajectory/scrub/openredaction-stage.js +2 -76
- package/dist/trajectory/scrub/openredaction-stage.js.map +1 -1
- package/dist/trajectory/scrub/secretlint-stage.d.ts +0 -3
- package/dist/trajectory/scrub/secretlint-stage.js +1 -39
- package/dist/trajectory/scrub/secretlint-stage.js.map +1 -1
- package/package.json +2 -4
- package/dist/bin/jinn-layer.js +0 -9335
package/dist/build-info.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"clientGitSha": "
|
|
2
|
+
"clientGitSha": "eb85758459bfeffdb8083633bfb1e8725bae185d",
|
|
3
3
|
"codeDigest": "sha256:cfd37647ffcc9f98add6751ce2025f46e5bdd2604757bd6bf886457ae2f6c480",
|
|
4
|
-
"builtAt": "2026-07-
|
|
5
|
-
"implVersion": "0.1.9-canary.
|
|
4
|
+
"builtAt": "2026-07-03T10:39:01.633Z",
|
|
5
|
+
"implVersion": "0.1.9-canary.eb857584"
|
|
6
6
|
}
|
package/dist/build-meta.json
CHANGED
|
@@ -21,63 +21,8 @@ import type { ScrubStage } from './types.js';
|
|
|
21
21
|
* stage's job (GLiNER, `mlPiiStage`), which the daemon wires when the model
|
|
22
22
|
* is available; a bare unlabelled name in prose is not regex-detectable at
|
|
23
23
|
* acceptable precision.
|
|
24
|
-
*
|
|
25
|
-
* `LAB_TEST_ID` and `EXAM_ID` are denylisted for the same reason (#1348):
|
|
26
|
-
* both trigger on ubiquitous software words (`\b(?:LAB|TEST|SAMPLE)…` and
|
|
27
|
-
* `\b(?:EXAM|TEST|QUIZ|ASSESSMENT)…`, case-insensitive, same bare
|
|
28
|
-
* `[A-Z0-9]{6,12}` tail) — "test-driven-development" came back as
|
|
29
|
-
* `test-[LAB_8465]-development` — and lab-specimen / exam IDs are not
|
|
30
|
-
* plausible in agent-trajectory content. Nothing in the seeded-secrets
|
|
31
|
-
* fixture pins either pattern.
|
|
32
24
|
*/
|
|
33
25
|
export declare const BARE_WORD_PATTERN_DENYLIST: readonly string[];
|
|
34
|
-
/**
|
|
35
|
-
* Trigger-word patterns excluded for #1372 (kept as a separate block from the
|
|
36
|
-
* bare-word denylist above so parallel denylist additions merge cleanly).
|
|
37
|
-
*
|
|
38
|
-
* These share one pathology: an ordinary English trigger word (`TO`,
|
|
39
|
-
* `APPROVAL`, `PROJECT`, `ORDER`, `REVIEW`, `PASS`, `LOT`, `SO`, `REG`, `WO`,
|
|
40
|
-
* `MISSING`, `RETURN`, `user`, `prod`, `ice`…), case-insensitive, followed by
|
|
41
|
-
* a bare `[A-Z0-9]{n,m}` tail with no intrinsic shape. On the published seed
|
|
42
|
-
* skills' SKILL.md prose every one of them fired — all 42 seed bodies were
|
|
43
|
-
* defaced ("project context" → `project [PROJECT_3875]`, "get your approval
|
|
44
|
-
* before" → `approval [AUTH_5211]`), several mid-word ("something" →
|
|
45
|
-
* `so[SO_1826]`, "workflow" → `wo[WO_3602]`, "regressions" →
|
|
46
|
-
* `[REG]ressions`). Observed trigger words per pattern, from the #1372
|
|
47
|
-
* characterisation over five real seed bodies:
|
|
48
|
-
*
|
|
49
|
-
* - `USERNAME` — "user intent", "user has"; a bare word after "user"/"login"
|
|
50
|
-
* is not a credential. Credentials keep their shaped patterns; person
|
|
51
|
-
* names are the ML PII stage's job (see the `NAME` note above).
|
|
52
|
-
* - `PROJECT_CODE` — "project context", "project goes through".
|
|
53
|
-
* - `CARD_AUTH_CODE` — "approval before" (card auth codes travel with card
|
|
54
|
-
* numbers, which `CREDIT_CARD` still catches).
|
|
55
|
-
* - `IATA_AIRPORT_CODE` — "to use" ("TO" + any 3 capitalisable letters).
|
|
56
|
-
* - `JUDGMENT_NUMBER` — "order should".
|
|
57
|
-
* - `STANDING_ORDER_REF` — "SO" matches inside "something"/"solution".
|
|
58
|
-
* - `PRODUCTION_ID` — "production classes"; nested self-replacement
|
|
59
|
-
* corrupted "NO PRODUCTION CODE" into `PROD[PROD[PROD…`.
|
|
60
|
-
* - `WORK_ORDER_NUMBER` — "wo" matches inside "workflow"/"worktree".
|
|
61
|
-
* - `PERFORMANCE_REVIEW_ID` — "performance problems", "evaluation between".
|
|
62
|
-
* - `TNT_TRACKING` — every clause optional except the tail, so ANY 9- or
|
|
63
|
-
* 13-character word matches ("variation", "statement").
|
|
64
|
-
* - `THEME_PARK_TICKET` — "pass immediately".
|
|
65
|
-
* - `TOURNAMENT_REGISTRATION_ID` — "REG" matches inside "regressions".
|
|
66
|
-
* - `MISSING_PERSON_CASE` — "missing requirements".
|
|
67
|
-
* - `RMA_NUMBER` — "return expected".
|
|
68
|
-
* - `BATCH_LOT_NUMBER` — "a lot faster".
|
|
69
|
-
* - `EMERGENCY_CONTACT` — "ice" (unanchored, matches inside "practice")
|
|
70
|
-
* followed by any 2–4 words.
|
|
71
|
-
*
|
|
72
|
-
* Lab-grade coverage loss is acceptable: these label niche reference numbers
|
|
73
|
-
* (parcel tracking, theme-park tickets, tournament brackets, standing
|
|
74
|
-
* orders, RMAs…) that are implausible in agent-trajectory content and carry
|
|
75
|
-
* no shape of their own beyond the trigger word. Genuinely secret-shaped
|
|
76
|
-
* content keeps its dedicated patterns (emails, cards, SSNs, API keys —
|
|
77
|
-
* pinned below and by the harness-layer seeded-secrets fixture), and the
|
|
78
|
-
* secretlint + plain-patterns stages still run behind this one.
|
|
79
|
-
*/
|
|
80
|
-
export declare const PROSE_TRIGGER_PATTERN_DENYLIST: readonly string[];
|
|
81
26
|
/**
|
|
82
27
|
* Default detector: openredaction's full pattern set minus the audited
|
|
83
28
|
* bare-word matchers. Built via the `patterns` whitelist option (the
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OpenRedaction } from 'openredaction';
|
|
2
2
|
import { classifyKey } from './key-policy.js';
|
|
3
|
-
const VERSION = '0.
|
|
3
|
+
const VERSION = '0.2.0';
|
|
4
4
|
/**
|
|
5
5
|
* Patterns excluded from the default detector (#1331). All three ship with a
|
|
6
6
|
* bare-word regex (`\b[a-zA-Z0-9._]{3,30}\b` or equivalent) that matches
|
|
@@ -21,86 +21,12 @@ const VERSION = '0.3.0';
|
|
|
21
21
|
* stage's job (GLiNER, `mlPiiStage`), which the daemon wires when the model
|
|
22
22
|
* is available; a bare unlabelled name in prose is not regex-detectable at
|
|
23
23
|
* acceptable precision.
|
|
24
|
-
*
|
|
25
|
-
* `LAB_TEST_ID` and `EXAM_ID` are denylisted for the same reason (#1348):
|
|
26
|
-
* both trigger on ubiquitous software words (`\b(?:LAB|TEST|SAMPLE)…` and
|
|
27
|
-
* `\b(?:EXAM|TEST|QUIZ|ASSESSMENT)…`, case-insensitive, same bare
|
|
28
|
-
* `[A-Z0-9]{6,12}` tail) — "test-driven-development" came back as
|
|
29
|
-
* `test-[LAB_8465]-development` — and lab-specimen / exam IDs are not
|
|
30
|
-
* plausible in agent-trajectory content. Nothing in the seeded-secrets
|
|
31
|
-
* fixture pins either pattern.
|
|
32
24
|
*/
|
|
33
25
|
export const BARE_WORD_PATTERN_DENYLIST = [
|
|
34
26
|
'INSTAGRAM_USERNAME',
|
|
35
27
|
'XBOX_GAMERTAG',
|
|
36
28
|
'PSN_ID',
|
|
37
29
|
'NAME',
|
|
38
|
-
'LAB_TEST_ID',
|
|
39
|
-
'EXAM_ID',
|
|
40
|
-
];
|
|
41
|
-
/**
|
|
42
|
-
* Trigger-word patterns excluded for #1372 (kept as a separate block from the
|
|
43
|
-
* bare-word denylist above so parallel denylist additions merge cleanly).
|
|
44
|
-
*
|
|
45
|
-
* These share one pathology: an ordinary English trigger word (`TO`,
|
|
46
|
-
* `APPROVAL`, `PROJECT`, `ORDER`, `REVIEW`, `PASS`, `LOT`, `SO`, `REG`, `WO`,
|
|
47
|
-
* `MISSING`, `RETURN`, `user`, `prod`, `ice`…), case-insensitive, followed by
|
|
48
|
-
* a bare `[A-Z0-9]{n,m}` tail with no intrinsic shape. On the published seed
|
|
49
|
-
* skills' SKILL.md prose every one of them fired — all 42 seed bodies were
|
|
50
|
-
* defaced ("project context" → `project [PROJECT_3875]`, "get your approval
|
|
51
|
-
* before" → `approval [AUTH_5211]`), several mid-word ("something" →
|
|
52
|
-
* `so[SO_1826]`, "workflow" → `wo[WO_3602]`, "regressions" →
|
|
53
|
-
* `[REG]ressions`). Observed trigger words per pattern, from the #1372
|
|
54
|
-
* characterisation over five real seed bodies:
|
|
55
|
-
*
|
|
56
|
-
* - `USERNAME` — "user intent", "user has"; a bare word after "user"/"login"
|
|
57
|
-
* is not a credential. Credentials keep their shaped patterns; person
|
|
58
|
-
* names are the ML PII stage's job (see the `NAME` note above).
|
|
59
|
-
* - `PROJECT_CODE` — "project context", "project goes through".
|
|
60
|
-
* - `CARD_AUTH_CODE` — "approval before" (card auth codes travel with card
|
|
61
|
-
* numbers, which `CREDIT_CARD` still catches).
|
|
62
|
-
* - `IATA_AIRPORT_CODE` — "to use" ("TO" + any 3 capitalisable letters).
|
|
63
|
-
* - `JUDGMENT_NUMBER` — "order should".
|
|
64
|
-
* - `STANDING_ORDER_REF` — "SO" matches inside "something"/"solution".
|
|
65
|
-
* - `PRODUCTION_ID` — "production classes"; nested self-replacement
|
|
66
|
-
* corrupted "NO PRODUCTION CODE" into `PROD[PROD[PROD…`.
|
|
67
|
-
* - `WORK_ORDER_NUMBER` — "wo" matches inside "workflow"/"worktree".
|
|
68
|
-
* - `PERFORMANCE_REVIEW_ID` — "performance problems", "evaluation between".
|
|
69
|
-
* - `TNT_TRACKING` — every clause optional except the tail, so ANY 9- or
|
|
70
|
-
* 13-character word matches ("variation", "statement").
|
|
71
|
-
* - `THEME_PARK_TICKET` — "pass immediately".
|
|
72
|
-
* - `TOURNAMENT_REGISTRATION_ID` — "REG" matches inside "regressions".
|
|
73
|
-
* - `MISSING_PERSON_CASE` — "missing requirements".
|
|
74
|
-
* - `RMA_NUMBER` — "return expected".
|
|
75
|
-
* - `BATCH_LOT_NUMBER` — "a lot faster".
|
|
76
|
-
* - `EMERGENCY_CONTACT` — "ice" (unanchored, matches inside "practice")
|
|
77
|
-
* followed by any 2–4 words.
|
|
78
|
-
*
|
|
79
|
-
* Lab-grade coverage loss is acceptable: these label niche reference numbers
|
|
80
|
-
* (parcel tracking, theme-park tickets, tournament brackets, standing
|
|
81
|
-
* orders, RMAs…) that are implausible in agent-trajectory content and carry
|
|
82
|
-
* no shape of their own beyond the trigger word. Genuinely secret-shaped
|
|
83
|
-
* content keeps its dedicated patterns (emails, cards, SSNs, API keys —
|
|
84
|
-
* pinned below and by the harness-layer seeded-secrets fixture), and the
|
|
85
|
-
* secretlint + plain-patterns stages still run behind this one.
|
|
86
|
-
*/
|
|
87
|
-
export const PROSE_TRIGGER_PATTERN_DENYLIST = [
|
|
88
|
-
'USERNAME',
|
|
89
|
-
'PROJECT_CODE',
|
|
90
|
-
'CARD_AUTH_CODE',
|
|
91
|
-
'IATA_AIRPORT_CODE',
|
|
92
|
-
'JUDGMENT_NUMBER',
|
|
93
|
-
'STANDING_ORDER_REF',
|
|
94
|
-
'PRODUCTION_ID',
|
|
95
|
-
'WORK_ORDER_NUMBER',
|
|
96
|
-
'PERFORMANCE_REVIEW_ID',
|
|
97
|
-
'TNT_TRACKING',
|
|
98
|
-
'THEME_PARK_TICKET',
|
|
99
|
-
'TOURNAMENT_REGISTRATION_ID',
|
|
100
|
-
'MISSING_PERSON_CASE',
|
|
101
|
-
'RMA_NUMBER',
|
|
102
|
-
'BATCH_LOT_NUMBER',
|
|
103
|
-
'EMERGENCY_CONTACT',
|
|
104
30
|
];
|
|
105
31
|
/**
|
|
106
32
|
* Default detector: openredaction's full pattern set minus the audited
|
|
@@ -111,7 +37,7 @@ export const PROSE_TRIGGER_PATTERN_DENYLIST = [
|
|
|
111
37
|
export function buildDefaultDetector() {
|
|
112
38
|
const allTypes = [...new Set(new OpenRedaction().getPatterns().map((p) => p.type))];
|
|
113
39
|
return new OpenRedaction({
|
|
114
|
-
patterns: allTypes.filter((t) => !BARE_WORD_PATTERN_DENYLIST.includes(t)
|
|
40
|
+
patterns: allTypes.filter((t) => !BARE_WORD_PATTERN_DENYLIST.includes(t)),
|
|
115
41
|
});
|
|
116
42
|
}
|
|
117
43
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openredaction-stage.js","sourceRoot":"","sources":["../../../src/trajectory/scrub/openredaction-stage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAkB,MAAM,iBAAiB,CAAC;AAG9D,MAAM,OAAO,GAAG,OAAO,CAAC;AAExB
|
|
1
|
+
{"version":3,"file":"openredaction-stage.js","sourceRoot":"","sources":["../../../src/trajectory/scrub/openredaction-stage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,WAAW,EAAkB,MAAM,iBAAiB,CAAC;AAG9D,MAAM,OAAO,GAAG,OAAO,CAAC;AAExB;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAsB;IAC3D,oBAAoB;IACpB,eAAe;IACf,QAAQ;IACR,MAAM;CACP,CAAC;AAEF;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB;IAClC,MAAM,QAAQ,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,IAAI,aAAa,EAAE,CAAC,WAAW,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpF,OAAO,IAAI,aAAa,CAAC;QACvB,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,0BAA0B,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;KAC1E,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,kBAAkB,CAChC,MAAiB,EACjB,WAA0B,oBAAoB,EAAE;IAEhD,OAAO;QACL,IAAI,EAAE,eAAe;QACrB,OAAO,EAAE,OAAO;QAChB,KAAK,CAAC,KAAK,CAAC,UAAsB;YAChC,MAAM,GAAG,GAAe,EAAE,CAAC;YAC3B,MAAM,UAAU,GAAsB,EAAE,CAAC;YACzC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;gBACtD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,WAAW,CAAC,GAAG,EAAE,MAAM,CAAC,KAAK,SAAS,EAAE,CAAC;oBACxE,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;oBACjB,SAAS;gBACX,CAAC;gBACD,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;gBAC5C,GAAG,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC,QAAQ,CAAC;gBAC3B,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,UAAU,EAAE,CAAC;oBACpC,UAAU,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;gBAClF,CAAC;YACH,CAAC;YACD,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC;QACzC,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -8,9 +8,6 @@ import type { ScrubStage } from './types.js';
|
|
|
8
8
|
* near-random tokens no specific rule matched (≥ 20 chars by entropy alone,
|
|
9
9
|
* or 16–19 chars when the token is a single high-density secret-charset run
|
|
10
10
|
* mixing multiple character classes), replaced with `[SECRET:high-entropy]`.
|
|
11
|
-
* Path-shaped tokens (`owner/repo/slug` and friends, #1348) are judged
|
|
12
|
-
* per-segment rather than whole-token, so slug identifiers survive while a
|
|
13
|
-
* secret embedded as a path segment still redacts.
|
|
14
11
|
* `safe` and non-string values pass through untouched.
|
|
15
12
|
*/
|
|
16
13
|
export declare function secretlintStage(policy: KeyPolicy): ScrubStage;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { lintSource } from '@secretlint/core';
|
|
2
2
|
import { creator } from '@secretlint/secretlint-rule-preset-recommend';
|
|
3
3
|
import { classifyKey } from './key-policy.js';
|
|
4
|
-
const VERSION = '0.
|
|
4
|
+
const VERSION = '0.1.0';
|
|
5
5
|
const PRESET_RULE_ID = '@secretlint/secretlint-rule-preset-recommend';
|
|
6
6
|
// Entropy fallback thresholds. Conservative on purpose: a long token whose
|
|
7
7
|
// character distribution is near-random is almost certainly a key/token, not
|
|
@@ -23,21 +23,6 @@ const ENTROPY_STRICT_LEN = 20;
|
|
|
23
23
|
// characters only (letters, digits, and the `+/=_-` set), with NO natural-language
|
|
24
24
|
// punctuation or spaces.
|
|
25
25
|
const SECRET_CHARSET = /^[A-Za-z0-9+/=_-]+$/;
|
|
26
|
-
// Tuning note (#1348): a path-shaped token — slug segments joined by `/`,
|
|
27
|
-
// e.g. `obra/superpowers/skills/test-driven-development` — is judged
|
|
28
|
-
// per-SEGMENT, not whole-token, but ONLY when the whole token mixes at most
|
|
29
|
-
// 2 character classes. Concatenating several short human-readable slugs
|
|
30
|
-
// inflates whole-token Shannon entropy past 4.0 bits/char purely by
|
|
31
|
-
// length/variety, which was redacting seed-import task summaries as
|
|
32
|
-
// `[SECRET:high-entropy]`; real slugs are overwhelmingly lowercase (1–2
|
|
33
|
-
// classes), while secrets that merely contain `/` or `.` (AWS-style base64
|
|
34
|
-
// keys, `dir/<blob>.tar.gz` filenames) almost always mix 3 classes and keep
|
|
35
|
-
// the original whole-token entropy behaviour. The segment charset excludes
|
|
36
|
-
// `+` and `=`, so base64 blobs containing either are never path-shaped.
|
|
37
|
-
// Residual exposure: a secret with ≤ 2 whole-token character classes whose
|
|
38
|
-
// every `[/.]`-split segment is under 16 chars (or below the entropy bar)
|
|
39
|
-
// qualifies as a path and escapes the fallback.
|
|
40
|
-
const PATH_SHAPED = /^[A-Za-z0-9._-]+(\/[A-Za-z0-9._-]+)+$/;
|
|
41
26
|
function shannonEntropy(s) {
|
|
42
27
|
const freq = {};
|
|
43
28
|
for (const ch of s)
|
|
@@ -69,30 +54,10 @@ function charClassCount(s) {
|
|
|
69
54
|
* classes (so dictionary words + a trailing suffix like `authentication123`,
|
|
70
55
|
* which sit below 4.0 bits/char anyway, are not swept in).
|
|
71
56
|
* Never fires below ENTROPY_MIN_LEN.
|
|
72
|
-
*
|
|
73
|
-
* Path carve-out (#1348): a PATH_SHAPED token whose WHOLE-token character-
|
|
74
|
-
* class count is ≤ 2 is redacted only when at least one `[/.]`-delimited
|
|
75
|
-
* segment independently passes the strict shape gate (length ≥
|
|
76
|
-
* ENTROPY_MIN_LEN, entropy ≥ ENTROPY_MIN_BITS, secret charset, ≥ 2 character
|
|
77
|
-
* classes) — applied at ALL lengths, so a long path of short slugs never
|
|
78
|
-
* trips the whole-token entropy bar, while a real key embedded as a path
|
|
79
|
-
* segment (`api/v1/ghp_…`) still redacts. A path-shaped token mixing ≥ 3
|
|
80
|
-
* whole-token classes never takes the carve-out — real slugs are 1–2
|
|
81
|
-
* classes, and 3-class "paths" are secrets wearing slashes/dots (#1348
|
|
82
|
-
* review finding) — it falls through to the whole-token logic below.
|
|
83
|
-
* Splitting on dots as well as slashes means a sentence full stop or a file
|
|
84
|
-
* extension yields its own (failing) segment instead of poisoning the
|
|
85
|
-
* secret blob next to it. Non-path tokens are unaffected.
|
|
86
57
|
*/
|
|
87
58
|
function isSecretShapedToken(token) {
|
|
88
59
|
if (token.length < ENTROPY_MIN_LEN)
|
|
89
60
|
return false;
|
|
90
|
-
if (PATH_SHAPED.test(token) && charClassCount(token) <= 2) {
|
|
91
|
-
return token.split(/[/.]/).some((segment) => segment.length >= ENTROPY_MIN_LEN &&
|
|
92
|
-
shannonEntropy(segment) >= ENTROPY_MIN_BITS &&
|
|
93
|
-
SECRET_CHARSET.test(segment) &&
|
|
94
|
-
charClassCount(segment) >= 2);
|
|
95
|
-
}
|
|
96
61
|
if (shannonEntropy(token) < ENTROPY_MIN_BITS)
|
|
97
62
|
return false;
|
|
98
63
|
if (token.length >= ENTROPY_STRICT_LEN)
|
|
@@ -111,9 +76,6 @@ function shortRule(ruleId) {
|
|
|
111
76
|
* near-random tokens no specific rule matched (≥ 20 chars by entropy alone,
|
|
112
77
|
* or 16–19 chars when the token is a single high-density secret-charset run
|
|
113
78
|
* mixing multiple character classes), replaced with `[SECRET:high-entropy]`.
|
|
114
|
-
* Path-shaped tokens (`owner/repo/slug` and friends, #1348) are judged
|
|
115
|
-
* per-segment rather than whole-token, so slug identifiers survive while a
|
|
116
|
-
* secret embedded as a path segment still redacts.
|
|
117
79
|
* `safe` and non-string values pass through untouched.
|
|
118
80
|
*/
|
|
119
81
|
export function secretlintStage(policy) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secretlint-stage.js","sourceRoot":"","sources":["../../../src/trajectory/scrub/secretlint-stage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,8CAA8C,CAAC;AACvE,OAAO,EAAE,WAAW,EAAkB,MAAM,iBAAiB,CAAC;AAG9D,MAAM,OAAO,GAAG,OAAO,CAAC;AACxB,MAAM,cAAc,GAAG,8CAA8C,CAAC;AAEtE,2EAA2E;AAC3E,6EAA6E;AAC7E,iFAAiF;AACjF,EAAE;AACF,6EAA6E;AAC7E,8EAA8E;AAC9E,6EAA6E;AAC7E,+EAA+E;AAC/E,yEAAyE;AACzE,6EAA6E;AAC7E,2EAA2E;AAC3E,MAAM,eAAe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W,KAAK,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;oBAChF,UAAU,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;gBAC/E,CAAC;gBAED,iEAAiE;gBACjE,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE;oBACpC,IAAI,mBAAmB,CAAC,KAAK,CAAC,EAAE,CAAC;wBAC/B,UAAU,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC,CAAC;wBACtF,OAAO,uBAAuB,CAAC;oBACjC,CAAC;oBACD,OAAO,KAAK,CAAC;gBACf,CAAC,CAAC,CAAC;gBAEH,GAAG,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;YAClB,CAAC;YAED,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC;QACzC,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jinn-network/client",
|
|
3
|
-
"version": "0.1.9-canary.
|
|
3
|
+
"version": "0.1.9-canary.eb857584",
|
|
4
4
|
"description": "Jinn protocol client — headless daemon for the restoration training loop",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "yarn@4.13.0",
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
"bin": {
|
|
21
21
|
"client": "./dist/bin/jinn.js",
|
|
22
22
|
"jinn": "./dist/bin/jinn.js",
|
|
23
|
-
"jinn-layer": "./dist/bin/jinn-layer.js",
|
|
24
23
|
"jinn-stop-hook": "./dist/bin/jinn-stop-hook.js"
|
|
25
24
|
},
|
|
26
25
|
"main": "./dist/index.js",
|
|
@@ -52,7 +51,7 @@
|
|
|
52
51
|
"typecheck:harness-layer": "tsc --noEmit -p packages/harness-layer/tsconfig.json",
|
|
53
52
|
"dev": "yarn build && node dist/bin/jinn.js",
|
|
54
53
|
"build:sdk": "yarn --cwd ../packages/sdk install --immutable && yarn --cwd ../packages/sdk build",
|
|
55
|
-
"build": "yarn build:sdk && yarn build:spa && tsc && chmod +x dist/bin/jinn.js &&
|
|
54
|
+
"build": "yarn build:sdk && yarn build:spa && tsc && chmod +x dist/bin/jinn.js && rm -rf dist/dashboard && mkdir -p dist/dashboard && cp -R src/dashboard/spa/dist/. dist/dashboard/ && rm -rf dist/templates && cp -R templates dist/templates && rm -rf dist/plugins/learner && mkdir -p dist/plugins && cp -R plugins/learner dist/plugins/learner && mkdir -p dist/scripts && cp scripts/fix-node-pty.mjs scripts/swe-rebench-v2-seed-pool.json scripts/swe-rebench-v2-known-bad.json scripts/swe-rebench-v2-pytest-missing.json dist/scripts/ && mkdir -p dist/solver-types/slates && cp src/solver-types/slates/*.json dist/solver-types/slates/ && node scripts/vendor-sdk.mjs && node scripts/write-dist-build-meta.mjs && yarn typecheck:harness-layer",
|
|
56
55
|
"typecheck": "yarn build:sdk && tsc --noEmit && yarn typecheck:harness-layer",
|
|
57
56
|
"lint:no-late-mount": "node scripts/check-no-late-route-mount.mjs",
|
|
58
57
|
"test": "yarn build:sdk && vitest run",
|
|
@@ -174,7 +173,6 @@
|
|
|
174
173
|
"@types/node": "^25.9.1",
|
|
175
174
|
"@types/semver": "^7.7.1",
|
|
176
175
|
"@types/ws": "^8.18.1",
|
|
177
|
-
"esbuild": "^0.28.0",
|
|
178
176
|
"tsx": "^4.0.0",
|
|
179
177
|
"typescript": "^6.0.3",
|
|
180
178
|
"vitest": "^4.1.8"
|