@getmarrow/mcp 3.9.108 → 3.9.110
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/README.md +26 -1
- package/dist/cli.js +44 -3
- package/dist/cli.js.map +1 -1
- package/dist/control-notice.d.ts +13 -0
- package/dist/control-notice.d.ts.map +1 -0
- package/dist/control-notice.js +76 -0
- package/dist/control-notice.js.map +1 -0
- package/dist/control-routes.d.ts +10 -0
- package/dist/control-routes.d.ts.map +1 -0
- package/dist/control-routes.js +81 -0
- package/dist/control-routes.js.map +1 -0
- package/dist/env.d.ts +15 -0
- package/dist/env.d.ts.map +1 -1
- package/dist/env.js +29 -2
- package/dist/env.js.map +1 -1
- package/dist/hook-context.d.ts.map +1 -1
- package/dist/hook-context.js +34 -11
- package/dist/hook-context.js.map +1 -1
- package/dist/hook-contract.d.ts +2 -2
- package/dist/hook-contract.js +1 -1
- package/dist/hook-pre-action.d.ts +10 -2
- package/dist/hook-pre-action.d.ts.map +1 -1
- package/dist/hook-pre-action.js +105 -33
- package/dist/hook-pre-action.js.map +1 -1
- package/dist/hook-session.d.ts.map +1 -1
- package/dist/hook-session.js +12 -7
- package/dist/hook-session.js.map +1 -1
- package/dist/hook-tool-policy.d.ts +1 -1
- package/dist/hook-tool-policy.d.ts.map +1 -1
- package/dist/hook.d.ts.map +1 -1
- package/dist/hook.js +19 -14
- package/dist/hook.js.map +1 -1
- package/dist/host-approval.d.ts +9 -0
- package/dist/host-approval.d.ts.map +1 -1
- package/dist/host-approval.js +22 -0
- package/dist/host-approval.js.map +1 -1
- package/dist/identity-explain.d.ts +35 -0
- package/dist/identity-explain.d.ts.map +1 -0
- package/dist/identity-explain.js +60 -0
- package/dist/identity-explain.js.map +1 -0
- package/dist/ipv4-first.d.ts +7 -0
- package/dist/ipv4-first.d.ts.map +1 -0
- package/dist/ipv4-first.js +60 -0
- package/dist/ipv4-first.js.map +1 -0
- package/dist/key-class.d.ts +16 -0
- package/dist/key-class.d.ts.map +1 -0
- package/dist/key-class.js +37 -0
- package/dist/key-class.js.map +1 -0
- package/dist/keyless-notice.d.ts +10 -0
- package/dist/keyless-notice.d.ts.map +1 -0
- package/dist/keyless-notice.js +47 -0
- package/dist/keyless-notice.js.map +1 -0
- package/dist/normalized-action.d.ts +4 -0
- package/dist/normalized-action.d.ts.map +1 -1
- package/dist/normalized-action.js +60 -27
- package/dist/normalized-action.js.map +1 -1
- package/dist/own-server-identity.d.ts +20 -0
- package/dist/own-server-identity.d.ts.map +1 -1
- package/dist/own-server-identity.js +130 -5
- package/dist/own-server-identity.js.map +1 -1
- package/dist/owner-bypass.d.ts +9 -0
- package/dist/owner-bypass.d.ts.map +1 -0
- package/dist/owner-bypass.js +79 -0
- package/dist/owner-bypass.js.map +1 -0
- package/dist/redact.d.ts +5 -0
- package/dist/redact.d.ts.map +1 -1
- package/dist/redact.js +61 -9
- package/dist/redact.js.map +1 -1
- package/dist/seatbelt/hook.d.ts +3 -1
- package/dist/seatbelt/hook.d.ts.map +1 -1
- package/dist/seatbelt/hook.js +7 -3
- package/dist/seatbelt/hook.js.map +1 -1
- package/dist/seatbelt/mapper.d.ts.map +1 -1
- package/dist/seatbelt/mapper.js +849 -12
- package/dist/seatbelt/mapper.js.map +1 -1
- package/dist/seatbelt/patch-text.d.ts +49 -0
- package/dist/seatbelt/patch-text.d.ts.map +1 -0
- package/dist/seatbelt/patch-text.js +376 -0
- package/dist/seatbelt/patch-text.js.map +1 -0
- package/dist/seatbelt/tables.d.ts +66 -0
- package/dist/seatbelt/tables.d.ts.map +1 -1
- package/dist/seatbelt/tables.js +467 -3
- package/dist/seatbelt/tables.js.map +1 -1
- package/dist/seatbelt/win-protected.d.ts +52 -0
- package/dist/seatbelt/win-protected.d.ts.map +1 -0
- package/dist/seatbelt/win-protected.js +1279 -0
- package/dist/seatbelt/win-protected.js.map +1 -0
- package/dist/self-protect.d.ts +18 -0
- package/dist/self-protect.d.ts.map +1 -0
- package/dist/self-protect.js +185 -0
- package/dist/self-protect.js.map +1 -0
- package/dist/session-id.d.ts +2 -0
- package/dist/session-id.d.ts.map +1 -0
- package/dist/session-id.js +32 -0
- package/dist/session-id.js.map +1 -0
- package/dist/session-loop-guard.d.ts +40 -0
- package/dist/session-loop-guard.d.ts.map +1 -1
- package/dist/session-loop-guard.js +236 -9
- package/dist/session-loop-guard.js.map +1 -1
- package/dist/session-marker.d.ts +7 -0
- package/dist/session-marker.d.ts.map +1 -0
- package/dist/session-marker.js +42 -0
- package/dist/session-marker.js.map +1 -0
- package/dist/win-private-state.d.ts +117 -0
- package/dist/win-private-state.d.ts.map +1 -0
- package/dist/win-private-state.js +544 -0
- package/dist/win-private-state.js.map +1 -0
- package/package.json +1 -1
- package/server.json +2 -2
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export type PatchKind = 'patch' | 'apply' | 'am';
|
|
2
|
+
export declare const MAX_HEADER_CHARS = 4096;
|
|
3
|
+
export declare const MAX_NAMES = 256;
|
|
4
|
+
export interface PatchNames {
|
|
5
|
+
/** Every candidate file name, as the headers spell it (before -p and -d). */
|
|
6
|
+
names: string[];
|
|
7
|
+
/** Why the text is not certain (the first reason), or null. Any doubt is an unknown write. */
|
|
8
|
+
doubt: string | null;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The file names in patch text. `mail` also reads mailbox input (`git am`): a body whose transfer encoding is not
|
|
12
|
+
* plain (quoted-printable, base64) or whose lines are flowed (`format=flowed`) hides the names from this reader,
|
|
13
|
+
* so it is doubt. So is a Content-Type or Content-Transfer-Encoding header that git could read differently from
|
|
14
|
+
* the text here (an RFC 2047 encoded word in it).
|
|
15
|
+
*/
|
|
16
|
+
export declare function readPatchNames(text: string, mail: boolean): PatchNames;
|
|
17
|
+
/**
|
|
18
|
+
* `name` with its first `count` leading components removed: the smallest prefix holding `count` slashes, adjacent
|
|
19
|
+
* slashes counting as one (GNU patch -p, git apply -p). Null when the name has fewer slashes than that.
|
|
20
|
+
*/
|
|
21
|
+
export declare function stripComponents(name: string, count: number): string | null;
|
|
22
|
+
/**
|
|
23
|
+
* Every path a name may stand for. The name as written is always one of them. `git apply` and `git am` strip one
|
|
24
|
+
* component by default; `patch` with no -p keeps the base name only. A name with fewer components than the strip
|
|
25
|
+
* count adds nothing.
|
|
26
|
+
*/
|
|
27
|
+
export declare function targetNames(names: readonly string[], kind: PatchKind, strip: number | null): string[];
|
|
28
|
+
export interface PatchCall {
|
|
29
|
+
/** False for a word the parser does not list (an unknown option, a bad value): the call is an unknown write. */
|
|
30
|
+
ok: boolean;
|
|
31
|
+
why: string;
|
|
32
|
+
/** The -p / --strip value, or null when not given. */
|
|
33
|
+
strip: number | null;
|
|
34
|
+
/** -d / --directory values. */
|
|
35
|
+
dirs: string[];
|
|
36
|
+
/** Patch files named by -i / --input. */
|
|
37
|
+
inputs: string[];
|
|
38
|
+
/** Other files the call writes: -o, -r, --reject-file, --global-reject-file, --build-fake-ancestor. */
|
|
39
|
+
extraWrites: string[];
|
|
40
|
+
/** Words that are not options. */
|
|
41
|
+
operands: string[];
|
|
42
|
+
/** Writes nothing: patch --dry-run, git apply --check/--stat/--numstat/--summary. Only when the parse is certain. */
|
|
43
|
+
readOnly: boolean;
|
|
44
|
+
/** The one word is a help or version request. */
|
|
45
|
+
info: boolean;
|
|
46
|
+
}
|
|
47
|
+
/** Reads the words after `patch`, `git apply` or `git am`. Every word must be literal text (the caller checks). */
|
|
48
|
+
export declare function parsePatchCall(kind: PatchKind, words: readonly string[]): PatchCall;
|
|
49
|
+
//# sourceMappingURL=patch-text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"patch-text.d.ts","sourceRoot":"","sources":["../../src/seatbelt/patch-text.ts"],"names":[],"mappings":"AAUA,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,IAAI,CAAC;AAGjD,eAAO,MAAM,gBAAgB,OAAO,CAAC;AAErC,eAAO,MAAM,SAAS,MAAM,CAAC;AAE7B,MAAM,WAAW,UAAU;IACzB,6EAA6E;IAC7E,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,8FAA8F;IAC9F,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAID;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,UAAU,CAqFtE;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAS1E;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,EAAE,CAcrG;AAED,MAAM,WAAW,SAAS;IACxB,gHAAgH;IAChH,EAAE,EAAE,OAAO,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,sDAAsD;IACtD,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,+BAA+B;IAC/B,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,yCAAyC;IACzC,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,uGAAuG;IACvG,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,kCAAkC;IAClC,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,qHAAqH;IACrH,QAAQ,EAAE,OAAO,CAAC;IAClB,iDAAiD;IACjD,IAAI,EAAE,OAAO,CAAC;CACf;AAwCD,mHAAmH;AACnH,wBAAgB,cAAc,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAgFnF"}
|
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// WK-5: the files a patch writes. `patch`, `git apply` and `git am` write the files their patch text names, so the
|
|
3
|
+
// mapper reads a literal patch file and treats every name in it as a write target (like the destination of tee, cp
|
|
4
|
+
// and mv). This module is text and option parsing only: no file system, no shell, no state.
|
|
5
|
+
//
|
|
6
|
+
// Names are over-collected on purpose. Every `---`, `+++`, `***` and `Index:` line counts, hunk content included (a
|
|
7
|
+
// deleted line `-- x` reads as a header), after any leading run of spaces, tabs and `X` (GNU patch skips that run
|
|
8
|
+
// too), and a name with a space is read both whole and up to its first space. An
|
|
9
|
+
// extra name only matters when it is protected; a real name is never dropped because it looks like content.
|
|
10
|
+
// Whatever the reader cannot be sure of is `doubt`, and the mapper turns doubt into an unknown write (S0, a stop).
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.MAX_NAMES = exports.MAX_HEADER_CHARS = void 0;
|
|
13
|
+
exports.readPatchNames = readPatchNames;
|
|
14
|
+
exports.stripComponents = stripComponents;
|
|
15
|
+
exports.targetNames = targetNames;
|
|
16
|
+
exports.parsePatchCall = parsePatchCall;
|
|
17
|
+
// A header line longer than a path can be is not read (it also bounds the work of the `diff --git` split below).
|
|
18
|
+
exports.MAX_HEADER_CHARS = 4096;
|
|
19
|
+
// A patch that names more files than this is not read; the mapper checks every name against the protected paths.
|
|
20
|
+
exports.MAX_NAMES = 256;
|
|
21
|
+
const ENCODINGS_OK = new Set(['7bit', '8bit', 'binary']);
|
|
22
|
+
/**
|
|
23
|
+
* The file names in patch text. `mail` also reads mailbox input (`git am`): a body whose transfer encoding is not
|
|
24
|
+
* plain (quoted-printable, base64) or whose lines are flowed (`format=flowed`) hides the names from this reader,
|
|
25
|
+
* so it is doubt. So is a Content-Type or Content-Transfer-Encoding header that git could read differently from
|
|
26
|
+
* the text here (an RFC 2047 encoded word in it).
|
|
27
|
+
*/
|
|
28
|
+
function readPatchNames(text, mail) {
|
|
29
|
+
const names = new Set();
|
|
30
|
+
let doubt = null;
|
|
31
|
+
const note = (why) => { if (doubt === null)
|
|
32
|
+
doubt = why; };
|
|
33
|
+
// `soft` names (the words of a plain `diff` command line) are skipped when odd instead of raising doubt.
|
|
34
|
+
const add = (raw, soft) => {
|
|
35
|
+
if (raw === '') {
|
|
36
|
+
if (!soft)
|
|
37
|
+
note('empty_name');
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
if (raw === '/dev/null')
|
|
41
|
+
return;
|
|
42
|
+
if (raw.startsWith('"') || /[\\\u0000-\u001f\u007f]/.test(raw)) {
|
|
43
|
+
if (!soft)
|
|
44
|
+
note('odd_name');
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
if (raw.split('/').includes('..')) {
|
|
48
|
+
if (!soft)
|
|
49
|
+
note('dotdot');
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
if (names.size >= exports.MAX_NAMES) {
|
|
53
|
+
note('too_many_names');
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
names.add(raw);
|
|
57
|
+
};
|
|
58
|
+
// `--- name<TAB>timestamp`: the name ends at the first TAB; with no TAB it may end at the first space.
|
|
59
|
+
const header = (rest) => {
|
|
60
|
+
if (rest.length > exports.MAX_HEADER_CHARS) {
|
|
61
|
+
note('long_header');
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
const body = rest.replace(/^[ \t]+/, '');
|
|
65
|
+
const tab = body.indexOf('\t');
|
|
66
|
+
const whole = (tab === -1 ? body : body.slice(0, tab)).replace(/ +$/, '');
|
|
67
|
+
add(whole, false);
|
|
68
|
+
const space = whole.indexOf(' ');
|
|
69
|
+
if (space > 0)
|
|
70
|
+
add(whole.slice(0, space), false);
|
|
71
|
+
};
|
|
72
|
+
// `diff --git a/x b/y`: the two names are split at every space (a name may hold spaces).
|
|
73
|
+
const gitHeader = (rest) => {
|
|
74
|
+
if (rest.length > exports.MAX_HEADER_CHARS) {
|
|
75
|
+
note('long_header');
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
if (rest.includes('"')) {
|
|
79
|
+
note('odd_name');
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
if (!rest.includes(' ')) {
|
|
83
|
+
note('odd_git_header');
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
for (let i = rest.indexOf(' '); i !== -1 && doubt === null; i = rest.indexOf(' ', i + 1)) {
|
|
87
|
+
add(rest.slice(0, i), false);
|
|
88
|
+
add(rest.slice(i + 1), false);
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
// The mail header (Content-Type or Content-Transfer-Encoding) the current line belongs to, in mail mode.
|
|
92
|
+
let mailHeader = null;
|
|
93
|
+
for (const raw of text.split('\n')) {
|
|
94
|
+
if (doubt !== null)
|
|
95
|
+
break;
|
|
96
|
+
const whole = raw.endsWith('\r') ? raw.slice(0, -1) : raw;
|
|
97
|
+
if (mail) {
|
|
98
|
+
// `git am` un-flows a `format=flowed; delsp=yes` body, the patch part included: a line that ends in a space is
|
|
99
|
+
// joined to the next one and the space is dropped, so a header name split over two mail lines is one name to
|
|
100
|
+
// git. This reader does not follow that, so any flowed mail is doubt, whether the word sits in the Content-Type
|
|
101
|
+
// header, a folded one, a MIME part header (any case) or the body. git format-patch never writes a flowed mail.
|
|
102
|
+
if (/format\s*=\s*"?flowed/i.test(whole)) {
|
|
103
|
+
note('flowed_mail_body');
|
|
104
|
+
continue;
|
|
105
|
+
}
|
|
106
|
+
// `git am` reads a file that starts with `# This series applies on GIT commit` as an StGit series: a list of patch
|
|
107
|
+
// FILES (one name per line), each applied in turn. The names in this file are not patch text and the files they
|
|
108
|
+
// name are never read here, so a series is doubt whatever else the text holds (the spacing and case git ignores too).
|
|
109
|
+
if (/^[ \t]*#[ \t]*this[ \t]+series[ \t]+applies/i.test(whole)) {
|
|
110
|
+
note('stgit_series');
|
|
111
|
+
continue;
|
|
112
|
+
}
|
|
113
|
+
// git also decodes RFC 2047 encoded words (`=?utf-8?q?format=3Dflowed?=`) in a header value before it reads
|
|
114
|
+
// the Content-Type, and it looks for `base64` and `quoted-printable` anywhere in a Content-Transfer-Encoding
|
|
115
|
+
// value. A header is its line at column 0 plus the folded lines under it (they start with a space or a tab).
|
|
116
|
+
if (whole[0] !== ' ' && whole[0] !== '\t')
|
|
117
|
+
mailHeader = /^content-type:/i.test(whole) ? 'type' : /^content-transfer-encoding:/i.test(whole) ? 'encoding' : null;
|
|
118
|
+
if (mailHeader !== null && whole.includes('=?')) {
|
|
119
|
+
note('encoded_mail_header');
|
|
120
|
+
continue;
|
|
121
|
+
}
|
|
122
|
+
if (mailHeader === 'encoding' && /base64|quoted-printable/i.test(whole)) {
|
|
123
|
+
note('encoded_mail_body');
|
|
124
|
+
continue;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
// GNU patch skips any run of spaces, tabs and `X` before it tests a line for a header, so every test reads the
|
|
128
|
+
// line after that run (a header may sit anywhere after the first diff, indented or not).
|
|
129
|
+
let at = 0;
|
|
130
|
+
while (at < whole.length && (whole[at] === ' ' || whole[at] === '\t' || whole[at] === 'X'))
|
|
131
|
+
at += 1;
|
|
132
|
+
const line = whole.slice(at);
|
|
133
|
+
if (/^(?:---|\+\+\+|\*\*\*)[ \t]/.test(line))
|
|
134
|
+
header(line.slice(4));
|
|
135
|
+
else if (line.startsWith('Index:'))
|
|
136
|
+
header(line.slice(6));
|
|
137
|
+
else if (line.startsWith('diff ')) {
|
|
138
|
+
const rest = line.slice(5);
|
|
139
|
+
if (rest.startsWith('--git '))
|
|
140
|
+
gitHeader(rest.slice(6));
|
|
141
|
+
else if (rest.startsWith('--cc ') || rest.startsWith('--combined '))
|
|
142
|
+
note('combined_diff');
|
|
143
|
+
else if (rest.length > exports.MAX_HEADER_CHARS)
|
|
144
|
+
note('long_header');
|
|
145
|
+
else
|
|
146
|
+
for (const word of rest.split(' '))
|
|
147
|
+
if (word !== '' && !word.startsWith('-'))
|
|
148
|
+
add(word, true);
|
|
149
|
+
}
|
|
150
|
+
else if (line.startsWith('==== '))
|
|
151
|
+
note('perforce_header');
|
|
152
|
+
// A patch that makes or changes a symlink (mode 120000) can write through it in a later entry.
|
|
153
|
+
else if (/^(?:new file mode|new mode|old mode|deleted file mode) 120000/.test(line))
|
|
154
|
+
note('symlink_patch');
|
|
155
|
+
else {
|
|
156
|
+
// git spells a move `rename from|to` or, in its older form, `rename old|new` (and `copy` alike).
|
|
157
|
+
const move = /^(?:rename|copy) (?:from|to|old|new) (.*)$/.exec(line);
|
|
158
|
+
if (move) {
|
|
159
|
+
if (move[1].length > exports.MAX_HEADER_CHARS)
|
|
160
|
+
note('long_header');
|
|
161
|
+
else
|
|
162
|
+
add(move[1], false);
|
|
163
|
+
continue;
|
|
164
|
+
}
|
|
165
|
+
// Any other line that opens like a move is a spelling this reader does not know.
|
|
166
|
+
if (/^(?:rename|copy)[ \t]/.test(line)) {
|
|
167
|
+
note('odd_move_header');
|
|
168
|
+
continue;
|
|
169
|
+
}
|
|
170
|
+
if (mail) {
|
|
171
|
+
const encoding = /^content-transfer-encoding:[ \t]*([^\s;]*)/i.exec(whole);
|
|
172
|
+
if (encoding && !ENCODINGS_OK.has(encoding[1].toLowerCase()))
|
|
173
|
+
note('encoded_mail_body');
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
if (doubt === null && names.size === 0)
|
|
178
|
+
note('no_headers');
|
|
179
|
+
return { names: [...names], doubt };
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* `name` with its first `count` leading components removed: the smallest prefix holding `count` slashes, adjacent
|
|
183
|
+
* slashes counting as one (GNU patch -p, git apply -p). Null when the name has fewer slashes than that.
|
|
184
|
+
*/
|
|
185
|
+
function stripComponents(name, count) {
|
|
186
|
+
let at = 0;
|
|
187
|
+
for (let left = count; left > 0; left -= 1) {
|
|
188
|
+
const slash = name.indexOf('/', at);
|
|
189
|
+
if (slash === -1)
|
|
190
|
+
return null;
|
|
191
|
+
at = slash;
|
|
192
|
+
while (name[at] === '/')
|
|
193
|
+
at += 1;
|
|
194
|
+
}
|
|
195
|
+
return name.slice(at);
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Every path a name may stand for. The name as written is always one of them. `git apply` and `git am` strip one
|
|
199
|
+
* component by default; `patch` with no -p keeps the base name only. A name with fewer components than the strip
|
|
200
|
+
* count adds nothing.
|
|
201
|
+
*/
|
|
202
|
+
function targetNames(names, kind, strip) {
|
|
203
|
+
const count = kind === 'patch' ? strip : (strip === null ? 1 : strip);
|
|
204
|
+
const out = new Set();
|
|
205
|
+
for (const name of names) {
|
|
206
|
+
out.add(name);
|
|
207
|
+
if (count === null) {
|
|
208
|
+
const base = name.replace(/\/+$/, '').split('/').pop() || '';
|
|
209
|
+
if (base !== '')
|
|
210
|
+
out.add(base);
|
|
211
|
+
}
|
|
212
|
+
else {
|
|
213
|
+
const stripped = stripComponents(name, count);
|
|
214
|
+
if (stripped !== null && stripped !== '')
|
|
215
|
+
out.add(stripped);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
return [...out];
|
|
219
|
+
}
|
|
220
|
+
const set = (text) => new Set(text.split(/\s+/).filter(Boolean));
|
|
221
|
+
// GNU patch 2.7 (also read by BSD patch): the options it takes and the ones that change which file is written.
|
|
222
|
+
// Left out on purpose, so the call is an unknown write: -B -Y -z -V and their long forms (a backup name can be any
|
|
223
|
+
// path), -e/--ed and -n/--normal (no file headers), --follow-symlinks and --merge.
|
|
224
|
+
const PATCH_SPEC = {
|
|
225
|
+
noValue: set('backup backup-if-mismatch no-backup-if-mismatch binary dry-run force forward ignore-whitespace quiet silent '
|
|
226
|
+
+ 'remove-empty-files reverse set-time set-utc verbose batch posix unified context help version'),
|
|
227
|
+
value: set('directory input output strip fuzz reject-file global-reject-file ifdef debug read-only get reject-format'),
|
|
228
|
+
shortNoValue: 'bEfRstTuZlcNv',
|
|
229
|
+
shortValue: 'dDFgiopxr',
|
|
230
|
+
info: set('--help --version -v'),
|
|
231
|
+
};
|
|
232
|
+
const APPLY_SPEC = {
|
|
233
|
+
noValue: set('stat numstat summary check index cached intent-to-add apply reverse reject unsafe-paths allow-overlap allow-empty '
|
|
234
|
+
+ 'verbose quiet recount inaccurate-eof binary no-add ignore-space-change ignore-whitespace unidiff-zero 3way'),
|
|
235
|
+
value: set('directory include exclude whitespace build-fake-ancestor'),
|
|
236
|
+
shortNoValue: 'vqRzN3',
|
|
237
|
+
shortValue: 'pC',
|
|
238
|
+
info: set('-h --help'),
|
|
239
|
+
};
|
|
240
|
+
const AM_SPEC = {
|
|
241
|
+
noValue: set('signoff keep keep-non-patch keep-cr scissors message-id quiet utf8 3way rerere-autoupdate ignore-space-change '
|
|
242
|
+
+ 'ignore-whitespace committer-date-is-author-date ignore-date reject allow-empty no-verify verify'),
|
|
243
|
+
value: set('directory include exclude whitespace'),
|
|
244
|
+
shortNoValue: 'skcmqu3n',
|
|
245
|
+
shortValue: 'pC',
|
|
246
|
+
info: set('-h --help'),
|
|
247
|
+
};
|
|
248
|
+
const SPECS = { patch: PATCH_SPEC, apply: APPLY_SPEC, am: AM_SPEC };
|
|
249
|
+
/** Reads the words after `patch`, `git apply` or `git am`. Every word must be literal text (the caller checks). */
|
|
250
|
+
function parsePatchCall(kind, words) {
|
|
251
|
+
const spec = SPECS[kind];
|
|
252
|
+
const call = { ok: true, why: '', strip: null, dirs: [], inputs: [], extraWrites: [], operands: [], readOnly: false, info: false };
|
|
253
|
+
const fail = (why) => { call.ok = false; call.why = why; return call; };
|
|
254
|
+
if (words.length === 1 && spec.info.has(words[0])) {
|
|
255
|
+
call.info = true;
|
|
256
|
+
return call;
|
|
257
|
+
}
|
|
258
|
+
const seen = new Set();
|
|
259
|
+
let negated = false;
|
|
260
|
+
let repeated = false;
|
|
261
|
+
let dryRuns = 0;
|
|
262
|
+
let strips = 0;
|
|
263
|
+
const give = (name, value) => {
|
|
264
|
+
switch (name) {
|
|
265
|
+
case 'p':
|
|
266
|
+
case 'strip':
|
|
267
|
+
if (!/^\d{1,6}$/.test(value))
|
|
268
|
+
return 'bad_strip';
|
|
269
|
+
call.strip = Number(value);
|
|
270
|
+
strips += 1;
|
|
271
|
+
return null;
|
|
272
|
+
case 'd':
|
|
273
|
+
case 'directory':
|
|
274
|
+
call.dirs.push(value);
|
|
275
|
+
return null;
|
|
276
|
+
case 'i':
|
|
277
|
+
case 'input':
|
|
278
|
+
call.inputs.push(value);
|
|
279
|
+
return null;
|
|
280
|
+
case 'o':
|
|
281
|
+
case 'output':
|
|
282
|
+
case 'r':
|
|
283
|
+
case 'reject-file':
|
|
284
|
+
case 'global-reject-file':
|
|
285
|
+
case 'build-fake-ancestor':
|
|
286
|
+
call.extraWrites.push(value);
|
|
287
|
+
return null;
|
|
288
|
+
case 'C': return /^\d{1,6}$/.test(value) ? null : 'bad_context';
|
|
289
|
+
default: return null;
|
|
290
|
+
}
|
|
291
|
+
};
|
|
292
|
+
let ended = false;
|
|
293
|
+
for (let i = 0; i < words.length; i += 1) {
|
|
294
|
+
const word = words[i];
|
|
295
|
+
if (ended || word === '-' || !word.startsWith('-')) {
|
|
296
|
+
call.operands.push(word);
|
|
297
|
+
continue;
|
|
298
|
+
}
|
|
299
|
+
if (word === '--') {
|
|
300
|
+
ended = true;
|
|
301
|
+
continue;
|
|
302
|
+
}
|
|
303
|
+
if (word.startsWith('--')) {
|
|
304
|
+
const eq = word.indexOf('=');
|
|
305
|
+
let name = eq === -1 ? word.slice(2) : word.slice(2, eq);
|
|
306
|
+
const attached = eq === -1 ? null : word.slice(eq + 1);
|
|
307
|
+
if (spec.value.has(name)) {
|
|
308
|
+
const value = attached !== null ? attached : words[i + 1];
|
|
309
|
+
if (value === undefined)
|
|
310
|
+
return fail('missing_value');
|
|
311
|
+
if (attached === null)
|
|
312
|
+
i += 1;
|
|
313
|
+
const bad = give(name, value);
|
|
314
|
+
if (bad)
|
|
315
|
+
return fail(bad);
|
|
316
|
+
seen.add(name);
|
|
317
|
+
continue;
|
|
318
|
+
}
|
|
319
|
+
// `--no-<name>` of a listed flag undoes it: the later word wins in git, so no read-only reading is trusted.
|
|
320
|
+
if (!spec.noValue.has(name) && name.startsWith('no-') && spec.noValue.has(name.slice(3)) && attached === null && kind !== 'patch') {
|
|
321
|
+
negated = true;
|
|
322
|
+
name = name.slice(3);
|
|
323
|
+
}
|
|
324
|
+
if (!spec.noValue.has(name))
|
|
325
|
+
return fail('unknown_option');
|
|
326
|
+
// `--unified=3`, `--context=3`: a count only.
|
|
327
|
+
if (attached !== null && !((name === 'unified' || name === 'context') && /^\d{1,6}$/.test(attached)))
|
|
328
|
+
return fail('unknown_option');
|
|
329
|
+
if (name === 'dry-run')
|
|
330
|
+
dryRuns += 1;
|
|
331
|
+
if (seen.has(name))
|
|
332
|
+
repeated = true;
|
|
333
|
+
seen.add(name);
|
|
334
|
+
continue;
|
|
335
|
+
}
|
|
336
|
+
// A short word: one or more letters (patch and git: `-p1`, `-pN`, `-C3`, clusters like `-Nf`).
|
|
337
|
+
for (let k = 1; k < word.length; k += 1) {
|
|
338
|
+
const c = word[k];
|
|
339
|
+
if (spec.shortNoValue.includes(c)) {
|
|
340
|
+
seen.add(`-${c}`);
|
|
341
|
+
continue;
|
|
342
|
+
}
|
|
343
|
+
if (!spec.shortValue.includes(c))
|
|
344
|
+
return fail('unknown_option');
|
|
345
|
+
let value = word.slice(k + 1);
|
|
346
|
+
if (value === '') {
|
|
347
|
+
value = words[i + 1];
|
|
348
|
+
if (value === undefined)
|
|
349
|
+
return fail('missing_value');
|
|
350
|
+
i += 1;
|
|
351
|
+
}
|
|
352
|
+
const bad = give(c, value);
|
|
353
|
+
if (bad)
|
|
354
|
+
return fail(bad);
|
|
355
|
+
seen.add(`-${c}`);
|
|
356
|
+
break;
|
|
357
|
+
}
|
|
358
|
+
// git reads one letter per word for its flags and `-p`/`-C` with a number: a cluster of several flags is a form
|
|
359
|
+
// the parser does not claim, so it is not read.
|
|
360
|
+
if (kind !== 'patch' && word.length > 2 && !/^-[pC]\d+$/.test(word))
|
|
361
|
+
return fail('unknown_option');
|
|
362
|
+
}
|
|
363
|
+
// Repeats that can change the target set (the last one wins in git; patch changes directory in order).
|
|
364
|
+
if (strips > 1 || call.dirs.length > 1 || call.inputs.length > 1)
|
|
365
|
+
return fail('repeated_option');
|
|
366
|
+
if (kind === 'patch') {
|
|
367
|
+
call.readOnly = dryRuns === 1 && call.extraWrites.length === 0;
|
|
368
|
+
}
|
|
369
|
+
else if (kind === 'apply') {
|
|
370
|
+
const reading = ['check', 'stat', 'numstat', 'summary'].some((n) => seen.has(n));
|
|
371
|
+
const writing = ['apply', 'reject', 'index', 'cached', 'intent-to-add', '3way', 'build-fake-ancestor', '-3', '-N'].some((n) => seen.has(n));
|
|
372
|
+
call.readOnly = reading && !writing && !negated && !repeated;
|
|
373
|
+
}
|
|
374
|
+
return call;
|
|
375
|
+
}
|
|
376
|
+
//# sourceMappingURL=patch-text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"patch-text.js","sourceRoot":"","sources":["../../src/seatbelt/patch-text.ts"],"names":[],"mappings":";AAAA,mHAAmH;AACnH,mHAAmH;AACnH,4FAA4F;AAC5F,EAAE;AACF,oHAAoH;AACpH,kHAAkH;AAClH,iFAAiF;AACjF,4GAA4G;AAC5G,mHAAmH;;;AAwBnH,wCAqFC;AAMD,0CASC;AAOD,kCAcC;AA6DD,wCAgFC;AA1RD,iHAAiH;AACpG,QAAA,gBAAgB,GAAG,IAAI,CAAC;AACrC,iHAAiH;AACpG,QAAA,SAAS,GAAG,GAAG,CAAC;AAS7B,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;AAEzD;;;;;GAKG;AACH,SAAgB,cAAc,CAAC,IAAY,EAAE,IAAa;IACxD,MAAM,KAAK,GAAG,IAAI,GAAG,EAAU,CAAC;IAChC,IAAI,KAAK,GAAkB,IAAI,CAAC;IAChC,MAAM,IAAI,GAAG,CAAC,GAAW,EAAQ,EAAE,GAAG,IAAI,KAAK,KAAK,IAAI;QAAE,KAAK,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;IACzE,yGAA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,IAAI,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5I,IAAI,CAAC,QAAQ,GAAG,OAAO,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,IAAI,CAAC,QAAQ,CAAC;IAC/D,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -4,6 +4,7 @@ export declare const LIMITS: Readonly<{
|
|
|
4
4
|
maxSegments: 256;
|
|
5
5
|
maxDepth: 6;
|
|
6
6
|
maxScriptBytes: number;
|
|
7
|
+
maxPatchBytes: number;
|
|
7
8
|
maxPackageJsonBytes: number;
|
|
8
9
|
maxConfigBytes: number;
|
|
9
10
|
maxAliasExpansions: 5;
|
|
@@ -20,6 +21,8 @@ export declare const LIMITS: Readonly<{
|
|
|
20
21
|
maxWords: 1024;
|
|
21
22
|
maxBraceChars: 1024;
|
|
22
23
|
maxParseCost: 24000000;
|
|
24
|
+
maxPsDepth: 4;
|
|
25
|
+
maxEncodedChars: 32767;
|
|
23
26
|
}>;
|
|
24
27
|
export { PRESENT_SECRET_PATTERNS, SECRET_PATTERNS } from '../secret-paths';
|
|
25
28
|
export declare const KEY_EXTENSIONS: RegExp;
|
|
@@ -79,4 +82,67 @@ export declare const ENV_KEYS: Set<string>;
|
|
|
79
82
|
export declare const CWD_KEYS: Set<string>;
|
|
80
83
|
export declare const OPTION_OBJECT_KEYS: Set<string>;
|
|
81
84
|
export declare const LANGUAGE_KEYS: Set<string>;
|
|
85
|
+
export declare const A3_REASONS: ReadonlySet<string>;
|
|
86
|
+
export declare const WIN_DELETE_VERBS: ReadonlySet<string>;
|
|
87
|
+
export declare const WIN_SHELL_DELETE_VERBS: ReadonlySet<string>;
|
|
88
|
+
/** A program word as Windows names it: both separators split the path, a .exe/.cmd/.bat/.com suffix goes, case folds. */
|
|
89
|
+
export declare function windowsProgramName(text: string): string;
|
|
90
|
+
/**
|
|
91
|
+
* A3 rules (i) to (iv) for one command whose program is a delete verb. `words` are its arguments (null = not a literal:
|
|
92
|
+
* a variable, a substitution, several values). True = stop: pipeline input, a recursion marker, an option outside the
|
|
93
|
+
* known non-recursive set, or an argument that is not a plain literal (a `$` expression, a splat, a backtick, `%VAR%`,
|
|
94
|
+
* `!VAR!`, a script block).
|
|
95
|
+
*/
|
|
96
|
+
export declare function windowsDeleteStops(words: ReadonlyArray<string | null>, piped: boolean): boolean;
|
|
97
|
+
/**
|
|
98
|
+
* `windowsDeleteStops(words.slice(p + 1), piped && p === 0)` for every p, from one pass over `words`. A suffix stops when
|
|
99
|
+
* it holds a word that stops on its own or no target at all, so the last word of each kind answers every p. The result is
|
|
100
|
+
* a function of p; each call is constant time.
|
|
101
|
+
*/
|
|
102
|
+
export declare function windowsDeleteStopsFrom(words: ReadonlyArray<string>, pipedFirst: boolean): (p: number) => boolean;
|
|
103
|
+
export declare const WIN_DELETE_WORDS: RegExp;
|
|
104
|
+
export declare const WIN_CMDLET_WORD: RegExp;
|
|
105
|
+
export declare const PS_EVAL_WORDS: RegExp;
|
|
106
|
+
export declare const PS_DYNAMIC_CALL: RegExp;
|
|
107
|
+
export declare const PS_DYNAMIC_AMP: RegExp;
|
|
108
|
+
export declare const PS_BLOCK_CALL: RegExp;
|
|
109
|
+
export declare const PS_SNIFF: RegExp;
|
|
110
|
+
/**
|
|
111
|
+
* .NET and COM deletes of a whole tree (rule v). The text is lower-cased with all white space removed, so padding and
|
|
112
|
+
* spacing change nothing. `strict` (PowerShell / cmd text) also stops `.Delete(<anything but $false/0/false>)`; outside
|
|
113
|
+
* it only the PowerShell-only forms count, so a C# search for `.Delete(true)` keeps its answer.
|
|
114
|
+
*/
|
|
115
|
+
export declare function dotNetTreeDelete(text: string, strict: boolean): boolean;
|
|
116
|
+
export type PsOptionKind = 'command' | 'encoded' | 'file' | 'value' | 'flag';
|
|
117
|
+
export declare function psOption(raw: string): {
|
|
118
|
+
kind: PsOptionKind;
|
|
119
|
+
name: string;
|
|
120
|
+
attached: string | null;
|
|
121
|
+
} | null;
|
|
122
|
+
export declare const PS_EXECUTION_POLICIES: RegExp;
|
|
123
|
+
/** The text of a base64 UTF-16LE -EncodedCommand value, or null when it cannot be read (the caller then stops). */
|
|
124
|
+
export declare function decodeEncodedCommand(value: string): string | null;
|
|
125
|
+
/** PowerShell reads U+2013, U+2014 and U+2015 as the parameter dash and the smart quotes as quotes: the same text with plain ones. */
|
|
126
|
+
export declare function psNormalize(text: string): string;
|
|
127
|
+
/** PowerShell / cmd text with its escapes taken out: a backtick (PowerShell) or caret (cmd) before a line break joins the lines, any other one goes; dashes and quotes plain. */
|
|
128
|
+
export declare function psClean(text: string): string;
|
|
129
|
+
/**
|
|
130
|
+
* The same PowerShell / cmd text with its block braces turned into line breaks and its call operators dropped, so
|
|
131
|
+
* `& { ri -r x }`, `Invoke-Command -ScriptBlock { rd /s x }` and `% { rm $_ }` show their bodies as commands. Quotes and
|
|
132
|
+
* `${name}` are left alone. A reading for the delete checks only; it never replaces the text's own reading.
|
|
133
|
+
*/
|
|
134
|
+
export declare function psFlatten(text: string): string;
|
|
135
|
+
export declare function psDynamicCode(text: string): boolean;
|
|
136
|
+
export declare function psDefaultParameters(text: string): boolean;
|
|
137
|
+
export interface PsStatement {
|
|
138
|
+
words: string[];
|
|
139
|
+
piped: boolean;
|
|
140
|
+
}
|
|
141
|
+
export declare const PS_KEYWORDS: ReadonlySet<string>;
|
|
142
|
+
export declare function psStatements(text: string, cmd: boolean): {
|
|
143
|
+
statements: PsStatement[];
|
|
144
|
+
ok: boolean;
|
|
145
|
+
};
|
|
146
|
+
export declare const PS_OUTPUT_CMDLETS: ReadonlySet<string>;
|
|
147
|
+
export declare const PS_BLOCK_WORDS: ReadonlySet<string>;
|
|
82
148
|
//# sourceMappingURL=tables.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tables.d.ts","sourceRoot":"","sources":["../../src/seatbelt/tables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