@sysid/sandbox-runtime-improved 0.0.56-sysid.1 → 0.0.61-sysid.1

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.
Files changed (116) hide show
  1. package/README.md +43 -2
  2. package/dist/index.d.ts +3 -3
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +1 -1
  5. package/dist/index.js.map +1 -1
  6. package/dist/sandbox/credential-mask-files.d.ts +72 -0
  7. package/dist/sandbox/credential-mask-files.d.ts.map +1 -0
  8. package/dist/sandbox/credential-mask-files.js +146 -0
  9. package/dist/sandbox/credential-mask-files.js.map +1 -0
  10. package/dist/sandbox/credential-sentinel.d.ts +72 -0
  11. package/dist/sandbox/credential-sentinel.d.ts.map +1 -0
  12. package/dist/sandbox/credential-sentinel.js +130 -0
  13. package/dist/sandbox/credential-sentinel.js.map +1 -0
  14. package/dist/sandbox/domain-pattern.d.ts +36 -0
  15. package/dist/sandbox/domain-pattern.d.ts.map +1 -0
  16. package/dist/sandbox/domain-pattern.js +60 -0
  17. package/dist/sandbox/domain-pattern.js.map +1 -0
  18. package/dist/sandbox/http-proxy.d.ts +32 -1
  19. package/dist/sandbox/http-proxy.d.ts.map +1 -1
  20. package/dist/sandbox/http-proxy.js +10 -2
  21. package/dist/sandbox/http-proxy.js.map +1 -1
  22. package/dist/sandbox/linux-sandbox-utils.d.ts +15 -0
  23. package/dist/sandbox/linux-sandbox-utils.d.ts.map +1 -1
  24. package/dist/sandbox/linux-sandbox-utils.js +106 -47
  25. package/dist/sandbox/linux-sandbox-utils.js.map +1 -1
  26. package/dist/sandbox/listen-in-range.d.ts +12 -0
  27. package/dist/sandbox/listen-in-range.d.ts.map +1 -0
  28. package/dist/sandbox/listen-in-range.js +43 -0
  29. package/dist/sandbox/listen-in-range.js.map +1 -0
  30. package/dist/sandbox/macos-sandbox-utils.d.ts +11 -0
  31. package/dist/sandbox/macos-sandbox-utils.d.ts.map +1 -1
  32. package/dist/sandbox/macos-sandbox-utils.js +69 -14
  33. package/dist/sandbox/macos-sandbox-utils.js.map +1 -1
  34. package/dist/sandbox/mitm-ca.d.ts +18 -2
  35. package/dist/sandbox/mitm-ca.d.ts.map +1 -1
  36. package/dist/sandbox/mitm-ca.js +49 -9
  37. package/dist/sandbox/mitm-ca.js.map +1 -1
  38. package/dist/sandbox/mitm-leaf.d.ts.map +1 -1
  39. package/dist/sandbox/mitm-leaf.js +24 -6
  40. package/dist/sandbox/mitm-leaf.js.map +1 -1
  41. package/dist/sandbox/mux-proxy.d.ts +59 -0
  42. package/dist/sandbox/mux-proxy.d.ts.map +1 -0
  43. package/dist/sandbox/mux-proxy.js +159 -0
  44. package/dist/sandbox/mux-proxy.js.map +1 -0
  45. package/dist/sandbox/request-filter.d.ts +11 -1
  46. package/dist/sandbox/request-filter.d.ts.map +1 -1
  47. package/dist/sandbox/request-filter.js.map +1 -1
  48. package/dist/sandbox/sandbox-config.d.ts +254 -25
  49. package/dist/sandbox/sandbox-config.d.ts.map +1 -1
  50. package/dist/sandbox/sandbox-config.js +200 -13
  51. package/dist/sandbox/sandbox-config.js.map +1 -1
  52. package/dist/sandbox/sandbox-manager.d.ts +4 -0
  53. package/dist/sandbox/sandbox-manager.d.ts.map +1 -1
  54. package/dist/sandbox/sandbox-manager.js +601 -194
  55. package/dist/sandbox/sandbox-manager.js.map +1 -1
  56. package/dist/sandbox/sandbox-schemas.d.ts +15 -0
  57. package/dist/sandbox/sandbox-schemas.d.ts.map +1 -1
  58. package/dist/sandbox/sandbox-utils.d.ts +42 -6
  59. package/dist/sandbox/sandbox-utils.d.ts.map +1 -1
  60. package/dist/sandbox/sandbox-utils.js +115 -27
  61. package/dist/sandbox/sandbox-utils.js.map +1 -1
  62. package/dist/sandbox/socks-proxy.d.ts +11 -5
  63. package/dist/sandbox/socks-proxy.d.ts.map +1 -1
  64. package/dist/sandbox/socks-proxy.js +13 -81
  65. package/dist/sandbox/socks-proxy.js.map +1 -1
  66. package/dist/sandbox/tls-terminate-proxy.d.ts +2 -2
  67. package/dist/sandbox/tls-terminate-proxy.d.ts.map +1 -1
  68. package/dist/sandbox/tls-terminate-proxy.js +31 -5
  69. package/dist/sandbox/tls-terminate-proxy.js.map +1 -1
  70. package/dist/sandbox/windows-sandbox-utils.d.ts +347 -11
  71. package/dist/sandbox/windows-sandbox-utils.d.ts.map +1 -1
  72. package/dist/sandbox/windows-sandbox-utils.js +437 -45
  73. package/dist/sandbox/windows-sandbox-utils.js.map +1 -1
  74. package/package.json +7 -4
  75. package/vendor/seccomp/build.ts +8 -30
  76. package/vendor/srt-win/build.ts +21 -0
  77. package/dist/vendor/seccomp/Dockerfile.build +0 -6
  78. package/dist/vendor/seccomp/arm64/apply-seccomp +0 -0
  79. package/dist/vendor/seccomp/build.ts +0 -91
  80. package/dist/vendor/seccomp/x64/apply-seccomp +0 -0
  81. package/dist/vendor/seccomp-src/apply-seccomp.c +0 -280
  82. package/dist/vendor/seccomp-src/seccomp-unix-block.c +0 -148
  83. package/dist/vendor/srt-win/Cargo.lock +0 -361
  84. package/dist/vendor/srt-win/Cargo.toml +0 -46
  85. package/dist/vendor/srt-win/ci/cleanup.ps1 +0 -49
  86. package/dist/vendor/srt-win/ci/smoke-exec.ps1 +0 -446
  87. package/dist/vendor/srt-win/ci/smoke.ps1 +0 -307
  88. package/dist/vendor/srt-win/src/job.rs +0 -102
  89. package/dist/vendor/srt-win/src/launch.rs +0 -732
  90. package/dist/vendor/srt-win/src/lib.rs +0 -20
  91. package/dist/vendor/srt-win/src/main.rs +0 -669
  92. package/dist/vendor/srt-win/src/self_protect.rs +0 -169
  93. package/dist/vendor/srt-win/src/sid.rs +0 -296
  94. package/dist/vendor/srt-win/src/token.rs +0 -341
  95. package/dist/vendor/srt-win/src/util.rs +0 -42
  96. package/dist/vendor/srt-win/src/wfp.rs +0 -992
  97. package/dist/vendor/srt-win/src/winsta.rs +0 -209
  98. package/dist/vendor/srt-win/tests/sd_access_check_matrix.rs +0 -259
  99. package/vendor/seccomp-src/apply-seccomp.c +0 -280
  100. package/vendor/seccomp-src/seccomp-unix-block.c +0 -148
  101. package/vendor/srt-win/Cargo.lock +0 -361
  102. package/vendor/srt-win/Cargo.toml +0 -46
  103. package/vendor/srt-win/ci/cleanup.ps1 +0 -49
  104. package/vendor/srt-win/ci/smoke-exec.ps1 +0 -446
  105. package/vendor/srt-win/ci/smoke.ps1 +0 -307
  106. package/vendor/srt-win/src/job.rs +0 -102
  107. package/vendor/srt-win/src/launch.rs +0 -732
  108. package/vendor/srt-win/src/lib.rs +0 -20
  109. package/vendor/srt-win/src/main.rs +0 -669
  110. package/vendor/srt-win/src/self_protect.rs +0 -169
  111. package/vendor/srt-win/src/sid.rs +0 -296
  112. package/vendor/srt-win/src/token.rs +0 -341
  113. package/vendor/srt-win/src/util.rs +0 -42
  114. package/vendor/srt-win/src/wfp.rs +0 -992
  115. package/vendor/srt-win/src/winsta.rs +0 -209
  116. package/vendor/srt-win/tests/sd_access_check_matrix.rs +0 -259
@@ -1,148 +0,0 @@
1
- /*
2
- * Seccomp BPF filter generator to block Unix domain socket creation
3
- *
4
- * This program generates a seccomp-bpf filter that blocks the socket() syscall
5
- * when called with AF_UNIX as the domain argument. This prevents creation of
6
- * Unix domain sockets while allowing all other socket types (AF_INET, AF_INET6, etc.)
7
- * and all other syscalls.
8
- *
9
- * The filter is exported in a format compatible with bubblewrap's --seccomp flag.
10
- *
11
- * SECURITY LIMITATION - 32-bit x86 (ia32):
12
- * TODO: This filter does NOT block socketcall() syscall, which is a security issue
13
- * on 32-bit x86 systems. On ia32, the socket() syscall doesn't exist - instead,
14
- * all socket operations are multiplexed through socketcall():
15
- * - socketcall(SYS_SOCKET, [AF_UNIX, ...]) - can bypass this filter
16
- * - socketcall(SYS_SOCKETPAIR, [AF_UNIX, ...]) - can bypass this filter
17
- *
18
- * To fix this, we need to add conditional rules that:
19
- * 1. Check if socketcall() exists on the current architecture (32-bit x86 only)
20
- * 2. Block socketcall(SYS_SOCKET, ...) when first arg of sub-call is AF_UNIX
21
- * 3. Block socketcall(SYS_SOCKETPAIR, ...) when first arg of sub-call is AF_UNIX
22
- *
23
- * This requires inspecting the arguments passed to socketcall, which is more
24
- * complex BPF logic. For now, 32-bit x86 is not supported.
25
- *
26
- * Compilation:
27
- * gcc -o seccomp-unix-block seccomp-unix-block.c -lseccomp
28
- *
29
- * Usage:
30
- * ./seccomp-unix-block <output-file> [arch]
31
- *
32
- * If arch is given (x86_64 or aarch64), the filter is generated for that
33
- * architecture instead of the native one. Lets a single-arch builder emit
34
- * filters for both x64 and arm64.
35
- *
36
- * Dependencies:
37
- * - libseccomp (libseccomp-dev package on Debian/Ubuntu)
38
- */
39
-
40
- #include <errno.h>
41
- #include <fcntl.h>
42
- #include <stdio.h>
43
- #include <stdlib.h>
44
- #include <string.h>
45
- #include <unistd.h>
46
- #include <seccomp.h>
47
- #include <sys/socket.h>
48
- #include <sys/stat.h>
49
- #include <sys/types.h>
50
-
51
- int main(int argc, char *argv[]) {
52
- scmp_filter_ctx ctx;
53
- int rc;
54
-
55
- if (argc < 2 || argc > 3) {
56
- fprintf(stderr, "Usage: %s <output-file> [x86_64|aarch64]\n", argv[0]);
57
- return 1;
58
- }
59
-
60
- const char *output_file = argv[1];
61
- const char *arch_name = (argc == 3) ? argv[2] : NULL;
62
-
63
- /* Create seccomp context with default action ALLOW */
64
- ctx = seccomp_init(SCMP_ACT_ALLOW);
65
- if (ctx == NULL) {
66
- fprintf(stderr, "Error: Failed to initialize seccomp context\n");
67
- return 1;
68
- }
69
-
70
- if (arch_name != NULL) {
71
- uint32_t target;
72
- if (strcmp(arch_name, "x86_64") == 0) {
73
- target = SCMP_ARCH_X86_64;
74
- } else if (strcmp(arch_name, "aarch64") == 0) {
75
- target = SCMP_ARCH_AARCH64;
76
- } else {
77
- fprintf(stderr, "Error: Unsupported arch '%s'\n", arch_name);
78
- seccomp_release(ctx);
79
- return 1;
80
- }
81
- if (target != seccomp_arch_native()) {
82
- rc = seccomp_arch_remove(ctx, SCMP_ARCH_NATIVE);
83
- if (rc == 0) rc = seccomp_arch_add(ctx, target);
84
- if (rc < 0) {
85
- fprintf(stderr, "Error: Failed to set target arch: %s\n", strerror(-rc));
86
- seccomp_release(ctx);
87
- return 1;
88
- }
89
- }
90
- }
91
-
92
- /* Add rule to block socket(AF_UNIX, ...) */
93
- /* socket() syscall signature: int socket(int domain, int type, int protocol) */
94
- /* arg0 = domain (AF_UNIX = 1) */
95
- /* Use SCMP_CMP_MASKED_EQ with a 32-bit mask: the domain argument is a 32-bit
96
- * int, so the kernel ignores the upper 32 bits of the register. A plain
97
- * SCMP_CMP_EQ would compare all 64 bits and miss calls where the upper bits
98
- * are set. */
99
- rc = seccomp_rule_add(ctx, SCMP_ACT_ERRNO(EPERM), SCMP_SYS(socket), 1,
100
- SCMP_A0(SCMP_CMP_MASKED_EQ, 0xffffffff, AF_UNIX));
101
- if (rc < 0) {
102
- fprintf(stderr, "Error: Failed to add seccomp rule: %s\n", strerror(-rc));
103
- seccomp_release(ctx);
104
- return 1;
105
- }
106
-
107
- /* Block io_uring entirely. IORING_OP_SOCKET (Linux 5.19+) creates sockets
108
- * in kernel context without going through the socket() syscall, bypassing
109
- * the rule above. seccomp cannot inspect io_uring SQEs (they live in a
110
- * shared-memory ring), so the only safe option is to deny ring creation
111
- * and use. Blocking all three syscalls also covers the case of an
112
- * inherited ring fd. */
113
- int io_uring_calls[] = {
114
- SCMP_SYS(io_uring_setup),
115
- SCMP_SYS(io_uring_enter),
116
- SCMP_SYS(io_uring_register),
117
- };
118
- for (size_t i = 0; i < sizeof(io_uring_calls) / sizeof(io_uring_calls[0]); i++) {
119
- rc = seccomp_rule_add(ctx, SCMP_ACT_ERRNO(EPERM), io_uring_calls[i], 0);
120
- if (rc < 0) {
121
- fprintf(stderr, "Error: Failed to add io_uring rule: %s\n", strerror(-rc));
122
- seccomp_release(ctx);
123
- return 1;
124
- }
125
- }
126
-
127
- /* Export the filter to a file */
128
- int fd = open(output_file, O_CREAT | O_WRONLY | O_TRUNC, 0600);
129
- if (fd < 0) {
130
- fprintf(stderr, "Error: Failed to open output file: %s\n", strerror(errno));
131
- seccomp_release(ctx);
132
- return 1;
133
- }
134
-
135
- rc = seccomp_export_bpf(ctx, fd);
136
- if (rc < 0) {
137
- fprintf(stderr, "Error: Failed to export seccomp filter: %s\n", strerror(-rc));
138
- close(fd);
139
- seccomp_release(ctx);
140
- return 1;
141
- }
142
-
143
- /* Clean up */
144
- close(fd);
145
- seccomp_release(ctx);
146
-
147
- return 0;
148
- }
@@ -1,361 +0,0 @@
1
- # This file is automatically @generated by Cargo.
2
- # It is not intended for manual editing.
3
- version = 4
4
-
5
- [[package]]
6
- name = "anstream"
7
- version = "1.0.0"
8
- source = "registry+https://github.com/rust-lang/crates.io-index"
9
- checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d"
10
- dependencies = [
11
- "anstyle",
12
- "anstyle-parse",
13
- "anstyle-query",
14
- "anstyle-wincon",
15
- "colorchoice",
16
- "is_terminal_polyfill",
17
- "utf8parse",
18
- ]
19
-
20
- [[package]]
21
- name = "anstyle"
22
- version = "1.0.14"
23
- source = "registry+https://github.com/rust-lang/crates.io-index"
24
- checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000"
25
-
26
- [[package]]
27
- name = "anstyle-parse"
28
- version = "1.0.0"
29
- source = "registry+https://github.com/rust-lang/crates.io-index"
30
- checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e"
31
- dependencies = [
32
- "utf8parse",
33
- ]
34
-
35
- [[package]]
36
- name = "anstyle-query"
37
- version = "1.1.5"
38
- source = "registry+https://github.com/rust-lang/crates.io-index"
39
- checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc"
40
- dependencies = [
41
- "windows-sys",
42
- ]
43
-
44
- [[package]]
45
- name = "anstyle-wincon"
46
- version = "3.0.11"
47
- source = "registry+https://github.com/rust-lang/crates.io-index"
48
- checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d"
49
- dependencies = [
50
- "anstyle",
51
- "once_cell_polyfill",
52
- "windows-sys",
53
- ]
54
-
55
- [[package]]
56
- name = "anyhow"
57
- version = "1.0.102"
58
- source = "registry+https://github.com/rust-lang/crates.io-index"
59
- checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c"
60
-
61
- [[package]]
62
- name = "clap"
63
- version = "4.6.1"
64
- source = "registry+https://github.com/rust-lang/crates.io-index"
65
- checksum = "1ddb117e43bbf7dacf0a4190fef4d345b9bad68dfc649cb349e7d17d28428e51"
66
- dependencies = [
67
- "clap_builder",
68
- "clap_derive",
69
- ]
70
-
71
- [[package]]
72
- name = "clap_builder"
73
- version = "4.6.0"
74
- source = "registry+https://github.com/rust-lang/crates.io-index"
75
- checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f"
76
- dependencies = [
77
- "anstream",
78
- "anstyle",
79
- "clap_lex",
80
- "strsim",
81
- ]
82
-
83
- [[package]]
84
- name = "clap_derive"
85
- version = "4.6.1"
86
- source = "registry+https://github.com/rust-lang/crates.io-index"
87
- checksum = "f2ce8604710f6733aa641a2b3731eaa1e8b3d9973d5e3565da11800813f997a9"
88
- dependencies = [
89
- "heck",
90
- "proc-macro2",
91
- "quote",
92
- "syn",
93
- ]
94
-
95
- [[package]]
96
- name = "clap_lex"
97
- version = "1.1.0"
98
- source = "registry+https://github.com/rust-lang/crates.io-index"
99
- checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9"
100
-
101
- [[package]]
102
- name = "colorchoice"
103
- version = "1.0.5"
104
- source = "registry+https://github.com/rust-lang/crates.io-index"
105
- checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570"
106
-
107
- [[package]]
108
- name = "heck"
109
- version = "0.5.0"
110
- source = "registry+https://github.com/rust-lang/crates.io-index"
111
- checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
112
-
113
- [[package]]
114
- name = "is_terminal_polyfill"
115
- version = "1.70.2"
116
- source = "registry+https://github.com/rust-lang/crates.io-index"
117
- checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"
118
-
119
- [[package]]
120
- name = "itoa"
121
- version = "1.0.18"
122
- source = "registry+https://github.com/rust-lang/crates.io-index"
123
- checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
124
-
125
- [[package]]
126
- name = "memchr"
127
- version = "2.8.0"
128
- source = "registry+https://github.com/rust-lang/crates.io-index"
129
- checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
130
-
131
- [[package]]
132
- name = "once_cell_polyfill"
133
- version = "1.70.2"
134
- source = "registry+https://github.com/rust-lang/crates.io-index"
135
- checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"
136
-
137
- [[package]]
138
- name = "proc-macro2"
139
- version = "1.0.106"
140
- source = "registry+https://github.com/rust-lang/crates.io-index"
141
- checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
142
- dependencies = [
143
- "unicode-ident",
144
- ]
145
-
146
- [[package]]
147
- name = "quote"
148
- version = "1.0.45"
149
- source = "registry+https://github.com/rust-lang/crates.io-index"
150
- checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
151
- dependencies = [
152
- "proc-macro2",
153
- ]
154
-
155
- [[package]]
156
- name = "serde"
157
- version = "1.0.228"
158
- source = "registry+https://github.com/rust-lang/crates.io-index"
159
- checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
160
- dependencies = [
161
- "serde_core",
162
- "serde_derive",
163
- ]
164
-
165
- [[package]]
166
- name = "serde_core"
167
- version = "1.0.228"
168
- source = "registry+https://github.com/rust-lang/crates.io-index"
169
- checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
170
- dependencies = [
171
- "serde_derive",
172
- ]
173
-
174
- [[package]]
175
- name = "serde_derive"
176
- version = "1.0.228"
177
- source = "registry+https://github.com/rust-lang/crates.io-index"
178
- checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
179
- dependencies = [
180
- "proc-macro2",
181
- "quote",
182
- "syn",
183
- ]
184
-
185
- [[package]]
186
- name = "serde_json"
187
- version = "1.0.150"
188
- source = "registry+https://github.com/rust-lang/crates.io-index"
189
- checksum = "e8014e44b4736ed0538adeecded0fce2a272f22dc9578a7eb6b2d9993c74cfb9"
190
- dependencies = [
191
- "itoa",
192
- "memchr",
193
- "serde",
194
- "serde_core",
195
- "zmij",
196
- ]
197
-
198
- [[package]]
199
- name = "srt-win"
200
- version = "0.0.1"
201
- dependencies = [
202
- "anyhow",
203
- "clap",
204
- "serde",
205
- "serde_json",
206
- "windows",
207
- ]
208
-
209
- [[package]]
210
- name = "strsim"
211
- version = "0.11.1"
212
- source = "registry+https://github.com/rust-lang/crates.io-index"
213
- checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
214
-
215
- [[package]]
216
- name = "syn"
217
- version = "2.0.117"
218
- source = "registry+https://github.com/rust-lang/crates.io-index"
219
- checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
220
- dependencies = [
221
- "proc-macro2",
222
- "quote",
223
- "unicode-ident",
224
- ]
225
-
226
- [[package]]
227
- name = "unicode-ident"
228
- version = "1.0.24"
229
- source = "registry+https://github.com/rust-lang/crates.io-index"
230
- checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
231
-
232
- [[package]]
233
- name = "utf8parse"
234
- version = "0.2.2"
235
- source = "registry+https://github.com/rust-lang/crates.io-index"
236
- checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
237
-
238
- [[package]]
239
- name = "windows"
240
- version = "0.62.2"
241
- source = "registry+https://github.com/rust-lang/crates.io-index"
242
- checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580"
243
- dependencies = [
244
- "windows-collections",
245
- "windows-core",
246
- "windows-future",
247
- "windows-numerics",
248
- ]
249
-
250
- [[package]]
251
- name = "windows-collections"
252
- version = "0.3.2"
253
- source = "registry+https://github.com/rust-lang/crates.io-index"
254
- checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610"
255
- dependencies = [
256
- "windows-core",
257
- ]
258
-
259
- [[package]]
260
- name = "windows-core"
261
- version = "0.62.2"
262
- source = "registry+https://github.com/rust-lang/crates.io-index"
263
- checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb"
264
- dependencies = [
265
- "windows-implement",
266
- "windows-interface",
267
- "windows-link",
268
- "windows-result",
269
- "windows-strings",
270
- ]
271
-
272
- [[package]]
273
- name = "windows-future"
274
- version = "0.3.2"
275
- source = "registry+https://github.com/rust-lang/crates.io-index"
276
- checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb"
277
- dependencies = [
278
- "windows-core",
279
- "windows-link",
280
- "windows-threading",
281
- ]
282
-
283
- [[package]]
284
- name = "windows-implement"
285
- version = "0.60.2"
286
- source = "registry+https://github.com/rust-lang/crates.io-index"
287
- checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf"
288
- dependencies = [
289
- "proc-macro2",
290
- "quote",
291
- "syn",
292
- ]
293
-
294
- [[package]]
295
- name = "windows-interface"
296
- version = "0.59.3"
297
- source = "registry+https://github.com/rust-lang/crates.io-index"
298
- checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358"
299
- dependencies = [
300
- "proc-macro2",
301
- "quote",
302
- "syn",
303
- ]
304
-
305
- [[package]]
306
- name = "windows-link"
307
- version = "0.2.1"
308
- source = "registry+https://github.com/rust-lang/crates.io-index"
309
- checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
310
-
311
- [[package]]
312
- name = "windows-numerics"
313
- version = "0.3.1"
314
- source = "registry+https://github.com/rust-lang/crates.io-index"
315
- checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26"
316
- dependencies = [
317
- "windows-core",
318
- "windows-link",
319
- ]
320
-
321
- [[package]]
322
- name = "windows-result"
323
- version = "0.4.1"
324
- source = "registry+https://github.com/rust-lang/crates.io-index"
325
- checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5"
326
- dependencies = [
327
- "windows-link",
328
- ]
329
-
330
- [[package]]
331
- name = "windows-strings"
332
- version = "0.5.1"
333
- source = "registry+https://github.com/rust-lang/crates.io-index"
334
- checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091"
335
- dependencies = [
336
- "windows-link",
337
- ]
338
-
339
- [[package]]
340
- name = "windows-sys"
341
- version = "0.61.2"
342
- source = "registry+https://github.com/rust-lang/crates.io-index"
343
- checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
344
- dependencies = [
345
- "windows-link",
346
- ]
347
-
348
- [[package]]
349
- name = "windows-threading"
350
- version = "0.2.1"
351
- source = "registry+https://github.com/rust-lang/crates.io-index"
352
- checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37"
353
- dependencies = [
354
- "windows-link",
355
- ]
356
-
357
- [[package]]
358
- name = "zmij"
359
- version = "1.0.21"
360
- source = "registry+https://github.com/rust-lang/crates.io-index"
361
- checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"
@@ -1,46 +0,0 @@
1
- [package]
2
- name = "srt-win"
3
- version = "0.0.1"
4
- edition = "2024"
5
- publish = false
6
- description = "Windows network sandbox helper for sandbox-runtime"
7
-
8
- [lib]
9
- name = "srt_win"
10
- path = "src/lib.rs"
11
-
12
- [[bin]]
13
- name = "srt-win"
14
- path = "src/main.rs"
15
-
16
- [dependencies]
17
- anyhow = "1"
18
- clap = { version = "4", features = ["derive"] }
19
- serde = { version = "1", features = ["derive"] }
20
- serde_json = "1"
21
-
22
- [target.'cfg(windows)'.dependencies]
23
- windows = { version = "0.62.2", features = [
24
- "Win32_Foundation",
25
- "Win32_System_Threading",
26
- "Win32_System_Memory",
27
- "Win32_System_Rpc",
28
- "Win32_System_SystemServices",
29
- "Win32_System_JobObjects",
30
- "Win32_System_StationsAndDesktops",
31
- "Win32_System_Console",
32
- "Win32_Graphics_Gdi",
33
- "Win32_Security",
34
- "Win32_Security_Authorization",
35
- "Win32_NetworkManagement_WindowsFilteringPlatform",
36
- "Win32_NetworkManagement_NetManagement",
37
- "Win32_UI_Shell",
38
- "Win32_UI_WindowsAndMessaging",
39
- "Win32_System_Registry",
40
- ] }
41
-
42
- [profile.release]
43
- opt-level = 2
44
- lto = "thin"
45
- codegen-units = 1
46
- strip = "symbols"
@@ -1,49 +0,0 @@
1
- <#
2
- Best-effort teardown of any state smoke.ps1 may have left behind.
3
- Intended for `if: always()` in CI; safe to run locally too.
4
-
5
- Targets the same fixed test sublayer as smoke.ps1 (NOT the
6
- production default), plus the per-run random alt sublayer if
7
- smoke.ps1 wrote one to $env:SRT_ALT_GUID.
8
-
9
- Usage:
10
- pwsh vendor/srt-win/ci/cleanup.ps1 <path-to-srt-win.exe> [group-name]
11
- #>
12
- param(
13
- [Parameter(Mandatory = $true)]
14
- [string]$Exe,
15
- [string]$GroupName = 'srt-ci-test',
16
- # Must match smoke.ps1's default.
17
- [string]$TestSublayer = 'a91b6f12-4c0e-4e30-b1f7-3d52890ce117',
18
- # Must match smoke.ps1's single-install section.
19
- [string]$InstallSublayer = 'b2e8a6c4-1f73-4d09-9e25-c7b0d3a48f61',
20
- # Must match smoke-exec.ps1's default.
21
- [string]$ExecSublayer = '5b0e64f4-09f1-4c2e-8c97-4d2c0f4e9b7d',
22
- # Must match test/sandbox/winsrt.test.ts.
23
- [string]$TsSublayer = '7c1f0e90-3a2b-4f5d-9e8c-1d2e3f4a5b6c'
24
- )
25
-
26
- $ErrorActionPreference = 'SilentlyContinue'
27
-
28
- if (-not (Test-Path $Exe)) {
29
- Write-Host "cleanup: $Exe not found; nothing to do"
30
- exit 0
31
- }
32
-
33
- if ($env:SRT_ALT_GUID) {
34
- & $Exe wfp uninstall --sublayer-guid $env:SRT_ALT_GUID
35
- }
36
- & $Exe wfp uninstall --sublayer-guid $TestSublayer
37
- & $Exe wfp uninstall --sublayer-guid $InstallSublayer
38
- & $Exe wfp uninstall --sublayer-guid $ExecSublayer
39
- & $Exe wfp uninstall --sublayer-guid $TsSublayer
40
- # winsrt.test.ts installWindowsSandbox round-trip row uses this
41
- # sublayer + a per-process group name `srt-ts-test-<pid>`. The test
42
- # tears down via uninstallWindowsSandbox(); this is belt-and-braces
43
- # in case it crashed mid-row. The group name is per-pid so we can't
44
- # delete it here — harmless leftover state on an ephemeral runner.
45
- & $Exe wfp uninstall --sublayer-guid 8d2f1e91-4b3c-5a6e-af9d-2e3f4a5b6c7d
46
- & $Exe wfp uninstall --sublayer-guid 9e3a2fa2-5c4d-6b7f-ba0e-3f4a5b6c7d8e
47
- & $Exe group delete --name $GroupName
48
- & $Exe group delete --name "$GroupName-inst"
49
- exit 0