@sema-agent/core 7.33.2 → 7.33.4
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/CHANGELOG.md +18 -0
- package/dist/core/secret-env.js +10 -5
- package/package.json +1 -1
- package/wire-changes/core@7.33.3.json +43 -0
- package/wire-changes/core@7.33.4.json +36 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## 7.33.4 — 2026-09-27
|
|
2
|
+
|
|
3
|
+
### Security fix — the git-family URL screen stops parsing the authority: any `@` after a `://` is a credential carrier, and on a proxy key any `@` is (#1146; 7.33.3 follow-up; behavior narrowing; +0 exports, +0 wire keys) (@server)
|
|
4
|
+
|
|
5
|
+
- **Before.** 7.33.2 and 7.33.3 read the URL authority — where it ends, which `:` belongs to a password, whether a `[` opens an IP literal — and each reading lost to an adversarial spelling: `https://[alice:secret/part@host` (a `[` that never closes; host review), `https://[a:dead%25x%oops]/part@host`, `https://[abc:def]secret/part@host`, `https://@user:secret@host`, `ssh://token%40host/r.git`, `https:/u:secret@host` (codex), `https://token/part@host` (no colon). In each the KEY cleared its exemption screen or the VALUE row did not fire, and the git group reached the host subprocess; 7.32.1 had withheld it.
|
|
6
|
+
- **Now.** One rule, no parsing: a `GIT_CONFIG_KEY_<i>` / `GIT_CONFIG_VALUE_<i>` value holding a `:/` and, anywhere after it, an `@` or its percent-encoding `%40` is a carrier (`family-rule`) — `:/` because curl reads a single slash as a URL (`https:/u:secret@host`), `%40` because git decodes it before handing the user to ssh (`ssh://token%40host/r.git`); under a proxy key (`http.proxy` / `http.<url>.proxy` / `remote.<name>.proxy`) any `@` / `%40` in the value is. Linear.
|
|
7
|
+
- **Who is hurt / compensation.** Over-drops, fail-closed (KL-1129b): a path / query / fragment `@` (`https://git.example/@scope/pkg`, `https://[::1]/repo@v2.git`, `https://h/?q=a@b`), an scp absolute path with an `@` (`host:/repo@v2.git`), an empty userinfo, a proxy value with `@` in a query, an `http.extraHeader` like `Referer: https://git.example/@scope`. The git group breaks (git exits 128) and a host's group rule withholds it. Compensation: write such a URL into the repository's config, or percent-encode the `@` (`%40`). Never over-dropped: values with no `:/` (`git@host:org/repo.git`, and `git@host:/abs` where the `@` comes first) and URLs with no `@` / `%40` after the `:/`.
|
|
8
|
+
- Pins: `test/backlog1129-git-config-key-family.test.ts` (7.33.4 block: the five review spellings on KEY and VALUE, scp / no-`@` controls, proxy `@`, 1 MiB linearity; the 7.33.1–7.33.3 authority pins re-pinned to the over-match reading).
|
|
9
|
+
|
|
10
|
+
## 7.33.3 — 2026-09-26
|
|
11
|
+
|
|
12
|
+
### Security fix — a credential written into a URL is read as a MODEL could read it: `user:secret/part@host` trips the git-family userinfo screen on KEY and VALUE (#1140; 7.33.2 follow-up; behavior; +0 exports, +0 wire keys) (@server)
|
|
13
|
+
|
|
14
|
+
- **Before.** 7.33.2's userinfo screen read the authority the way git and curl do — it ends at the first `/`, `?` or `#` — so `url.https://alice:secret/part@git.example/.insteadOf` (a password with an unescaped separator) had no userinfo: the KEY cleared its exemption screen, the VALUE row did not fire, and the whole git group reached the host subprocess (server 7.103.0 merge review). 7.32.1 had withheld the group because every KEY fell to the shape rule — a regression relative to the shipped chain.
|
|
15
|
+
- **Now.** One single-pass scanner shared by the KEY exemption and the VALUE credential row: after any `://` (any slash run) the segment up to the first `@` is a userinfo when it has no `/` `?` `#` (RFC reading; a user alone counts, KL-1129b) OR it has a `:` before its first `/` `?` `#` (`user:secret/…@`). A path `@` with no colon before it (`https://git.example/@scope/pkg`) still clears; a URL nested in a path is read on its own; scp forms (`host:/repo@v2.git`, `git@host:path`) never trip. No regex, no backtracking: linear on `://`, `:` and `/` runs.
|
|
16
|
+
- **Who is hurt / compensation.** `https://host:8443/api/@scope/pkg` (a port and a path `@`) is over-dropped and breaks its git group — fail-closed on purpose, KL-1129b; write such a URL without the port or through the repository's config.
|
|
17
|
+
- Pins: `test/backlog1129-git-config-key-family.test.ts` (7.33.3 block: the host-reported KEY / VALUE / `%2F` forms, path-`@`, port over-drop, query colon, nested and second URL, empty userinfo, 4 × 256 KiB linearity).
|
|
18
|
+
|
|
1
19
|
# Changelog
|
|
2
20
|
|
|
3
21
|
## 7.33.2 — 2026-09-26
|
package/dist/core/secret-env.js
CHANGED
|
@@ -15,7 +15,12 @@ const NON_SECRET_ENV_EXACT_NAMES = new Set([
|
|
|
15
15
|
"MAX_BATCH_PREFILL_TOKENS", "MAX_WAITING_TOKENS", "MAX_TOP_N_TOKENS", "RATE_LIMIT_TOKENS",
|
|
16
16
|
"PROMPT_TOKENS", "CONTEXT_TOKENS",
|
|
17
17
|
]);
|
|
18
|
-
|
|
18
|
+
function carriesUrlUserinfo(value) {
|
|
19
|
+
const scheme = value.indexOf(":/");
|
|
20
|
+
if (scheme === -1)
|
|
21
|
+
return false;
|
|
22
|
+
return value.indexOf("@", scheme + 2) !== -1 || value.indexOf("%40", scheme + 2) !== -1;
|
|
23
|
+
}
|
|
19
24
|
const HEADER_LINE_BREAK_RE = /\r\n|\r|\n/;
|
|
20
25
|
const AUTHORIZATION_HEADER_NAME_RE = /^[ \t]*(?:(?:proxy-)?authorization|cookie)[ \t]*:/i;
|
|
21
26
|
const HEADER_CONTENT_RE = /[^ \t\f\v]/;
|
|
@@ -34,18 +39,18 @@ function carriesAuthorizationHeader(value) {
|
|
|
34
39
|
return judge();
|
|
35
40
|
}
|
|
36
41
|
const GIT_PROXY_CONFIG_KEY_RE = /^(?:http(?:\..+)?|remote\..+)\.proxy$/is;
|
|
37
|
-
const
|
|
42
|
+
const proxyValueCarriesUserinfo = (value) => value.includes("@") || value.includes("%40");
|
|
38
43
|
const NON_SECRET_ENV_INDEXED_FAMILIES = [
|
|
39
|
-
{ stem: "GIT_CONFIG_KEY", valueClears: (value) => !
|
|
44
|
+
{ stem: "GIT_CONFIG_KEY", valueClears: (value) => !carriesUrlUserinfo(value) },
|
|
40
45
|
];
|
|
41
46
|
const SECRET_ENV_INDEXED_FAMILIES = [
|
|
42
47
|
{
|
|
43
48
|
stem: "GIT_CONFIG_VALUE",
|
|
44
49
|
credentialWhen: (value, group) => {
|
|
45
|
-
if (carriesAuthorizationHeader(value) ||
|
|
50
|
+
if (carriesAuthorizationHeader(value) || carriesUrlUserinfo(value))
|
|
46
51
|
return true;
|
|
47
52
|
const key = group.sibling("GIT_CONFIG_KEY");
|
|
48
|
-
return key !== undefined && GIT_PROXY_CONFIG_KEY_RE.test(key) &&
|
|
53
|
+
return key !== undefined && GIT_PROXY_CONFIG_KEY_RE.test(key) && proxyValueCarriesUserinfo(value);
|
|
49
54
|
},
|
|
50
55
|
},
|
|
51
56
|
];
|
package/package.json
CHANGED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"repo": "core",
|
|
3
|
+
"version": "7.33.3",
|
|
4
|
+
"from": "aa8e4a621a350bcadeff763fdec25d97ae96370f",
|
|
5
|
+
"to": "v7.33.3",
|
|
6
|
+
"added": [],
|
|
7
|
+
"removed": [],
|
|
8
|
+
"changed": [],
|
|
9
|
+
"narrowed": [],
|
|
10
|
+
"closedSetMembers": [],
|
|
11
|
+
"closedSetsUnreadable": [],
|
|
12
|
+
"typeKeys": [],
|
|
13
|
+
"typeKeysUnreadableArms": [],
|
|
14
|
+
"typeKeysFlattenedCount": 217,
|
|
15
|
+
"declarationMoves": [],
|
|
16
|
+
"mintMoves": [],
|
|
17
|
+
"criteriaObserves": [
|
|
18
|
+
{
|
|
19
|
+
"kind": "typeMember",
|
|
20
|
+
"name": "SecretEnvFinding.key",
|
|
21
|
+
"assertions": [
|
|
22
|
+
"G1.a"
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"kind": "typeMember",
|
|
27
|
+
"name": "SecretEnvFinding.kind",
|
|
28
|
+
"assertions": [
|
|
29
|
+
"G1.a",
|
|
30
|
+
"G1.b"
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"consumersHint": {
|
|
35
|
+
"cli": [],
|
|
36
|
+
"server": [],
|
|
37
|
+
"sdk": [],
|
|
38
|
+
"note": "scanned cli@4e593722 server@bac45dd2 sdk@4031f42 — a name listed is MENTIONED there today, which is evidence of consumption, not proof of it"
|
|
39
|
+
},
|
|
40
|
+
"breakingCount": 0,
|
|
41
|
+
"breakingItems": [],
|
|
42
|
+
"toResolvedAt": "c5da6d6b48d9ad047bb04fea9b494aaa1f87ec2d"
|
|
43
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"repo": "core",
|
|
3
|
+
"version": "7.33.4",
|
|
4
|
+
"from": "a7409841b2648631410f123f396f5cdac7252ae1",
|
|
5
|
+
"to": "v7.33.4",
|
|
6
|
+
"added": [],
|
|
7
|
+
"removed": [],
|
|
8
|
+
"changed": [],
|
|
9
|
+
"narrowed": [],
|
|
10
|
+
"closedSetMembers": [],
|
|
11
|
+
"closedSetsUnreadable": [],
|
|
12
|
+
"typeKeys": [],
|
|
13
|
+
"typeKeysUnreadableArms": [],
|
|
14
|
+
"typeKeysFlattenedCount": 217,
|
|
15
|
+
"declarationMoves": [],
|
|
16
|
+
"mintMoves": [],
|
|
17
|
+
"criteriaObserves": [
|
|
18
|
+
{
|
|
19
|
+
"kind": "typeMember",
|
|
20
|
+
"name": "SecretEnvFinding.kind",
|
|
21
|
+
"assertions": [
|
|
22
|
+
"G1.a",
|
|
23
|
+
"G1.b"
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
],
|
|
27
|
+
"consumersHint": {
|
|
28
|
+
"cli": [],
|
|
29
|
+
"server": [],
|
|
30
|
+
"sdk": [],
|
|
31
|
+
"note": "scanned cli@4e593722 server@920701d6 sdk@10cf14c — a name listed is MENTIONED there today, which is evidence of consumption, not proof of it"
|
|
32
|
+
},
|
|
33
|
+
"breakingCount": 0,
|
|
34
|
+
"breakingItems": [],
|
|
35
|
+
"toResolvedAt": "6c61b6a5ae287d1478e469a21bf93ef2b1f56e61"
|
|
36
|
+
}
|