llm-mask 0.3.0

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 (88) hide show
  1. package/.github/workflows/llm-mask-check.yml +62 -0
  2. package/LICENSE +21 -0
  3. package/README.md +549 -0
  4. package/dist/audit.d.ts +56 -0
  5. package/dist/audit.d.ts.map +1 -0
  6. package/dist/audit.js +90 -0
  7. package/dist/audit.js.map +1 -0
  8. package/dist/cli-old.d.ts +12 -0
  9. package/dist/cli-old.d.ts.map +1 -0
  10. package/dist/cli-old.js +257 -0
  11. package/dist/cli-old.js.map +1 -0
  12. package/dist/cli.d.ts +19 -0
  13. package/dist/cli.d.ts.map +1 -0
  14. package/dist/cli.js +197 -0
  15. package/dist/cli.js.map +1 -0
  16. package/dist/commands.d.ts +9 -0
  17. package/dist/commands.d.ts.map +1 -0
  18. package/dist/commands.js +121 -0
  19. package/dist/commands.js.map +1 -0
  20. package/dist/config.d.ts +38 -0
  21. package/dist/config.d.ts.map +1 -0
  22. package/dist/config.js +81 -0
  23. package/dist/config.js.map +1 -0
  24. package/dist/context-detection.d.ts +54 -0
  25. package/dist/context-detection.d.ts.map +1 -0
  26. package/dist/context-detection.js +219 -0
  27. package/dist/context-detection.js.map +1 -0
  28. package/dist/diff-masking.d.ts +51 -0
  29. package/dist/diff-masking.d.ts.map +1 -0
  30. package/dist/diff-masking.js +121 -0
  31. package/dist/diff-masking.js.map +1 -0
  32. package/dist/executor.d.ts +105 -0
  33. package/dist/executor.d.ts.map +1 -0
  34. package/dist/executor.js +250 -0
  35. package/dist/executor.js.map +1 -0
  36. package/dist/executor.test.d.ts +5 -0
  37. package/dist/executor.test.d.ts.map +1 -0
  38. package/dist/executor.test.js +500 -0
  39. package/dist/executor.test.js.map +1 -0
  40. package/dist/features.test.d.ts +5 -0
  41. package/dist/features.test.d.ts.map +1 -0
  42. package/dist/features.test.js +118 -0
  43. package/dist/features.test.js.map +1 -0
  44. package/dist/formatter.d.ts +54 -0
  45. package/dist/formatter.d.ts.map +1 -0
  46. package/dist/formatter.js +139 -0
  47. package/dist/formatter.js.map +1 -0
  48. package/dist/index.d.ts +36 -0
  49. package/dist/index.d.ts.map +1 -0
  50. package/dist/index.js +37 -0
  51. package/dist/index.js.map +1 -0
  52. package/dist/language-patterns.d.ts +39 -0
  53. package/dist/language-patterns.d.ts.map +1 -0
  54. package/dist/language-patterns.js +177 -0
  55. package/dist/language-patterns.js.map +1 -0
  56. package/dist/masker.d.ts +100 -0
  57. package/dist/masker.d.ts.map +1 -0
  58. package/dist/masker.js +255 -0
  59. package/dist/masker.js.map +1 -0
  60. package/dist/masker.test.d.ts +11 -0
  61. package/dist/masker.test.d.ts.map +1 -0
  62. package/dist/masker.test.js +162 -0
  63. package/dist/masker.test.js.map +1 -0
  64. package/dist/mcp-server.d.ts +9 -0
  65. package/dist/mcp-server.d.ts.map +1 -0
  66. package/dist/mcp-server.js +494 -0
  67. package/dist/mcp-server.js.map +1 -0
  68. package/dist/patterns.d.ts +25 -0
  69. package/dist/patterns.d.ts.map +1 -0
  70. package/dist/patterns.js +184 -0
  71. package/dist/patterns.js.map +1 -0
  72. package/dist/scanner.d.ts +75 -0
  73. package/dist/scanner.d.ts.map +1 -0
  74. package/dist/scanner.js +247 -0
  75. package/dist/scanner.js.map +1 -0
  76. package/dist/test-utils.d.ts +5 -0
  77. package/dist/test-utils.d.ts.map +1 -0
  78. package/dist/test-utils.js +6 -0
  79. package/dist/test-utils.js.map +1 -0
  80. package/dist/tokenizer.d.ts +62 -0
  81. package/dist/tokenizer.d.ts.map +1 -0
  82. package/dist/tokenizer.js +95 -0
  83. package/dist/tokenizer.js.map +1 -0
  84. package/dist/types.d.ts +63 -0
  85. package/dist/types.d.ts.map +1 -0
  86. package/dist/types.js +16 -0
  87. package/dist/types.js.map +1 -0
  88. package/package.json +60 -0
@@ -0,0 +1,121 @@
1
+ /**
2
+ * Diff masking - mask git diff output for safe LLM code review
3
+ *
4
+ * Preserves diff structure while masking sensitive data
5
+ */
6
+ import { execSync } from 'child_process';
7
+ import { DataMasker } from './masker.js';
8
+ /**
9
+ * Masker for git diff output
10
+ */
11
+ export class DiffMasker {
12
+ masker;
13
+ constructor() {
14
+ this.masker = new DataMasker();
15
+ }
16
+ /**
17
+ * Get git diff and mask it
18
+ */
19
+ maskDiff(options = {}) {
20
+ const diff = this.getDiff(options);
21
+ const lines = diff.split('\n');
22
+ let filesChanged = 0;
23
+ let linesAdded = 0;
24
+ let linesRemoved = 0;
25
+ let masksApplied = 0;
26
+ const maskedLines = lines.map(line => {
27
+ // Track diff metadata
28
+ if (line.startsWith('diff --git')) {
29
+ filesChanged++;
30
+ }
31
+ if (line.startsWith('+') && !line.startsWith('++')) {
32
+ linesAdded++;
33
+ }
34
+ if (line.startsWith('-') && !line.startsWith('--')) {
35
+ linesRemoved++;
36
+ }
37
+ // Don't mask diff metadata
38
+ if (line.startsWith('diff ') ||
39
+ line.startsWith('index ') ||
40
+ line.startsWith('@') ||
41
+ line.startsWith('---') ||
42
+ line.startsWith('+++') ||
43
+ line === '') {
44
+ return line;
45
+ }
46
+ // Mask the line content (preserve the +/- prefix)
47
+ const prefix = line.charAt(0) === '+' || line.charAt(0) === '-' ? line.charAt(0) : '';
48
+ const content = prefix ? line.slice(1) : line;
49
+ const result = this.masker.mask(content, { level: options.level });
50
+ masksApplied += result.stats.total;
51
+ return prefix + result.masked;
52
+ });
53
+ return {
54
+ maskedDiff: maskedLines.join('\n'),
55
+ originalLineCount: lines.length,
56
+ stats: {
57
+ filesChanged,
58
+ linesAdded,
59
+ linesRemoved,
60
+ masksApplied
61
+ }
62
+ };
63
+ }
64
+ /**
65
+ * Get git diff output
66
+ */
67
+ getDiff(options) {
68
+ const args = ['diff', '--color=never', '--unified=3'];
69
+ if (options.base) {
70
+ if (options.head) {
71
+ args.push(`${options.base}...${options.head}`);
72
+ }
73
+ else {
74
+ args.push(options.base);
75
+ }
76
+ }
77
+ if (options.path) {
78
+ args.push('--', options.path);
79
+ }
80
+ try {
81
+ const cmd = ['git'];
82
+ if (options.gitDir) {
83
+ cmd.push(`--git-dir=${options.gitDir}`);
84
+ }
85
+ cmd.push(...args);
86
+ return execSync(cmd.join(' '), {
87
+ encoding: 'utf-8',
88
+ maxBuffer: 50 * 1024 * 1024 // 50MB
89
+ });
90
+ }
91
+ catch (error) {
92
+ throw new Error(`Failed to get git diff: ${error}`);
93
+ }
94
+ }
95
+ /**
96
+ * Format masked diff for display
97
+ */
98
+ format(maskedDiff) {
99
+ const lines = [];
100
+ lines.push('📝 Masked Git Diff');
101
+ lines.push('');
102
+ lines.push(`Files changed: ${maskedDiff.stats.filesChanged}`);
103
+ lines.push(`Lines added: ${maskedDiff.stats.linesAdded}`);
104
+ lines.push(`Lines removed: ${maskedDiff.stats.linesRemoved}`);
105
+ lines.push(`Masks applied: ${maskedDiff.stats.masksApplied}`);
106
+ lines.push('');
107
+ lines.push('---');
108
+ lines.push('');
109
+ lines.push(maskedDiff.maskedDiff);
110
+ return lines.join('\n');
111
+ }
112
+ }
113
+ /**
114
+ * Convenience function to mask git diff
115
+ */
116
+ export function maskDiff(options) {
117
+ const masker = new DiffMasker();
118
+ const result = masker.maskDiff(options);
119
+ return result.maskedDiff;
120
+ }
121
+ //# sourceMappingURL=diff-masking.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diff-masking.js","sourceRoot":"","sources":["../src/diff-masking.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AA0BxC;;GAEG;AACH,MAAM,OAAO,UAAU;IACb,MAAM,CAAY;IAE1B;QACE,IAAI,CAAC,MAAM,GAAG,IAAI,UAAU,EAAE,CAAA;IAChC,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,UAAuB,EAAE;QAChC,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAA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AAqB;IAC5C,MAAM,MAAM,GAAG,IAAI,UAAU,EAAE,CAAA;IAC/B,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;IACvC,OAAO,MAAM,CAAC,UAAU,CAAA;AAC1B,CAAC"}
@@ -0,0 +1,105 @@
1
+ /**
2
+ * Secure executor - run commands and redact sensitive output
3
+ *
4
+ * Key principle: Credentials work for the command, but output is redacted
5
+ * before the LLM sees it.
6
+ */
7
+ import type { MaskResult } from './types.js';
8
+ export interface ExecOptions {
9
+ /** Command to execute (optional for specialized executors like kubectl/ssh) */
10
+ command?: string;
11
+ /** Arguments */
12
+ args?: string[];
13
+ /** Working directory */
14
+ cwd?: string;
15
+ /** Environment variables (merged with process.env) */
16
+ env?: Record<string, string>;
17
+ /** Timeout in milliseconds (default: 30000) */
18
+ timeout?: number;
19
+ /** Redaction level */
20
+ level?: 'basic' | 'standard' | 'aggressive';
21
+ /** Preserve format in redacted output */
22
+ preserveFormat?: boolean;
23
+ /** Redact specific patterns only */
24
+ redactPatterns?: string[];
25
+ /** Include stderr in output */
26
+ includeStderr?: boolean;
27
+ /** Include exit code in output */
28
+ includeExitCode?: boolean;
29
+ }
30
+ export interface ExecResult {
31
+ stdout: string;
32
+ stderr: string;
33
+ exitCode: number | null;
34
+ signal: string | null;
35
+ timedOut: boolean;
36
+ redacted: {
37
+ stdout: string;
38
+ stderr: string;
39
+ stats: MaskResult['stats'];
40
+ };
41
+ }
42
+ export interface KubernetesExecOptions extends ExecOptions {
43
+ /** Kubernetes namespace */
44
+ namespace?: string;
45
+ /** Pod name */
46
+ pod?: string;
47
+ /** Container name */
48
+ container?: string;
49
+ /** Context from kubeconfig */
50
+ context?: string;
51
+ /** Command to execute in pod */
52
+ execCommand?: string;
53
+ }
54
+ export interface SSHExecOptions extends ExecOptions {
55
+ /** SSH host */
56
+ host: string;
57
+ /** SSH user */
58
+ user?: string;
59
+ /** Port */
60
+ port?: number;
61
+ /** Identity file (private key) */
62
+ identity?: string;
63
+ /** Command to run on remote host */
64
+ remoteCommand?: string;
65
+ }
66
+ /**
67
+ * Secure executor - runs commands and redacts output
68
+ */
69
+ export declare class SecureExecutor {
70
+ private masker;
71
+ constructor();
72
+ /**
73
+ * Execute a command and return both original and redacted output
74
+ */
75
+ exec(options: ExecOptions): Promise<ExecResult>;
76
+ /**
77
+ * Execute a kubectl command
78
+ */
79
+ kubectl(options: KubernetesExecOptions): Promise<ExecResult>;
80
+ /**
81
+ * Execute a command via SSH
82
+ */
83
+ ssh(options: SSHExecOptions): Promise<ExecResult>;
84
+ /**
85
+ * Execute a command and return only redacted output (for LLM consumption)
86
+ */
87
+ execRedacted(options: ExecOptions): Promise<string>;
88
+ /**
89
+ * Format exec result for display
90
+ */
91
+ formatResult(result: ExecResult, showOriginal?: boolean): string;
92
+ }
93
+ /**
94
+ * Convenience function
95
+ */
96
+ export declare function execRedacted(options: ExecOptions): Promise<string>;
97
+ /**
98
+ * Kubernetes convenience function
99
+ */
100
+ export declare function kubectl(options: KubernetesExecOptions): Promise<ExecResult>;
101
+ /**
102
+ * SSH convenience function
103
+ */
104
+ export declare function sshExec(options: SSHExecOptions): Promise<ExecResult>;
105
+ //# sourceMappingURL=executor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../src/executor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAE5C,MAAM,WAAW,WAAW;IAC1B,+EAA+E;IAC/E,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,gBAAgB;IAChB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,wBAAwB;IACxB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,sDAAsD;IACtD,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC5B,+CAA+C;IAC/C,OAAO,CAAC,EAAE,MAA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AAa,cAAc;IACzB,OAAO,CAAC,MAAM,CAAY;;IAM1B;;OAEG;IACG,IAAI,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC;IAqGrD;;OAEG;IACG,OAAO,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,UAAU,CAAC;IA4ClE;;OAEG;IACG,GAAG,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,UAAU,CAAC;IAmCvD;;OAEG;IACG,YAAY,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC;IAyBzD;;OAEG;IACH,YAAY,CAAC,MAAM,EAAE,UAAU,EAAE,YAAY,GAAE,OAAe,GAAG,MAAM;CA2CxE;AAED;;GAEG;AACH,wBAAsB,YAAY,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CAGxE;AAED;;GAEG;AACH,wBAAsB,OAAO,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,UAAU,CAAC,CAGjF;AAED;;GAEG;AACH,wBAAsB,OAAO,CAAC,OAAO,EAAE,cAAc,GAAG,OAAO,CAAC,UAAU,CAAC,CAG1E"}
@@ -0,0 +1,250 @@
1
+ /**
2
+ * Secure executor - run commands and redact sensitive output
3
+ *
4
+ * Key principle: Credentials work for the command, but output is redacted
5
+ * before the LLM sees it.
6
+ */
7
+ import { spawn } from 'child_process';
8
+ import { DataMasker } from './masker.js';
9
+ /**
10
+ * Secure executor - runs commands and redacts output
11
+ */
12
+ export class SecureExecutor {
13
+ masker;
14
+ constructor() {
15
+ this.masker = new DataMasker();
16
+ }
17
+ /**
18
+ * Execute a command and return both original and redacted output
19
+ */
20
+ async exec(options) {
21
+ const { command, args = [], cwd, env, timeout = 30000, includeStderr = true, includeExitCode = false, level = 'standard', preserveFormat = false, redactPatterns } = options;
22
+ // Validate command for direct exec calls
23
+ if (!command) {
24
+ throw new Error('Command is required for exec(). Use kubectl() or ssh() for specialized operations.');
25
+ }
26
+ return new Promise((resolve) => {
27
+ const startTime = Date.now();
28
+ let timedOut = false;
29
+ let timeoutHandle;
30
+ // Spawn the process
31
+ const proc = spawn(command, args, {
32
+ cwd,
33
+ env: { ...process.env, ...env },
34
+ timeout: undefined // We handle timeout ourselves
35
+ });
36
+ let stdout = '';
37
+ let stderr = '';
38
+ let exitCode = null;
39
+ let signal = null;
40
+ // Set timeout
41
+ if (timeout > 0) {
42
+ timeoutHandle = setTimeout(() => {
43
+ timedOut = true;
44
+ proc.kill('SIGTERM');
45
+ // Force kill if it doesn't terminate
46
+ setTimeout(() => proc.kill('SIGKILL'), 5000);
47
+ }, timeout);
48
+ }
49
+ // Collect output
50
+ proc.stdout?.on('data', (data) => {
51
+ stdout += data.toString();
52
+ });
53
+ proc.stderr?.on('data', (data) => {
54
+ stderr += data.toString();
55
+ });
56
+ // Handle process exit
57
+ proc.on('close', (code, sig) => {
58
+ if (timeoutHandle) {
59
+ clearTimeout(timeoutHandle);
60
+ }
61
+ const duration = Date.now() - startTime;
62
+ // Redact output
63
+ const maskOptions = { level, preserveFormat };
64
+ // Filter by patterns if specified
65
+ if (redactPatterns && redactPatterns.length > 0) {
66
+ // Custom redaction logic would go here
67
+ // For now, use default masking
68
+ }
69
+ const stdoutResult = this.masker.mask(stdout, maskOptions);
70
+ const stderrResult = this.masker.mask(stderr, maskOptions);
71
+ resolve({
72
+ stdout,
73
+ stderr,
74
+ exitCode: code,
75
+ signal: sig,
76
+ timedOut,
77
+ redacted: {
78
+ stdout: stdoutResult.masked,
79
+ stderr: stderrResult.masked,
80
+ stats: {
81
+ ...stdoutResult.stats,
82
+ byPattern: {
83
+ ...stdoutResult.stats.byPattern,
84
+ ...Object.entries(stderrResult.stats.byPattern).reduce((acc, [k, v]) => ({ ...acc, [k]: (acc[k] || 0) + v }), {})
85
+ },
86
+ total: stdoutResult.stats.total + stderrResult.stats.total
87
+ }
88
+ }
89
+ });
90
+ });
91
+ });
92
+ }
93
+ /**
94
+ * Execute a kubectl command
95
+ */
96
+ async kubectl(options) {
97
+ const args = [];
98
+ // Add context
99
+ if (options.context) {
100
+ args.push('--context', options.context);
101
+ }
102
+ // Add namespace
103
+ if (options.namespace) {
104
+ args.push('--namespace', options.namespace);
105
+ }
106
+ // Build the kubectl command
107
+ if (options.pod) {
108
+ // Exec into a pod
109
+ if (options.container) {
110
+ args.push('exec', '-c', options.container, options.pod, '--');
111
+ }
112
+ else {
113
+ args.push('exec', options.pod, '--');
114
+ }
115
+ // Add command if provided
116
+ if (options.execCommand) {
117
+ args.push(options.execCommand);
118
+ }
119
+ }
120
+ else {
121
+ // Regular kubectl command
122
+ args.push(...(options.args || []));
123
+ }
124
+ return this.exec({
125
+ command: 'kubectl',
126
+ args,
127
+ cwd: options.cwd,
128
+ env: options.env,
129
+ timeout: options.timeout,
130
+ level: options.level,
131
+ preserveFormat: options.preserveFormat,
132
+ includeStderr: options.includeStderr,
133
+ includeExitCode: options.includeExitCode
134
+ });
135
+ }
136
+ /**
137
+ * Execute a command via SSH
138
+ */
139
+ async ssh(options) {
140
+ const args = [];
141
+ // Add port
142
+ if (options.port) {
143
+ args.push('-p', String(options.port));
144
+ }
145
+ // Add identity file
146
+ if (options.identity) {
147
+ args.push('-i', options.identity);
148
+ }
149
+ // Add host
150
+ const host = options.user ? `${options.user}@${options.host}` : options.host;
151
+ args.push(host);
152
+ // Add remote command
153
+ if (options.remoteCommand) {
154
+ args.push(options.remoteCommand);
155
+ }
156
+ return this.exec({
157
+ command: 'ssh',
158
+ args,
159
+ cwd: options.cwd,
160
+ env: options.env,
161
+ timeout: options.timeout,
162
+ level: options.level,
163
+ preserveFormat: options.preserveFormat,
164
+ includeStderr: options.includeStderr,
165
+ includeExitCode: options.includeExitCode
166
+ });
167
+ }
168
+ /**
169
+ * Execute a command and return only redacted output (for LLM consumption)
170
+ */
171
+ async execRedacted(options) {
172
+ const result = await this.exec(options);
173
+ // Combine stdout and stderr
174
+ let output = result.redacted.stdout;
175
+ if (options.includeStderr !== false && result.redacted.stderr) {
176
+ output += '\n' + result.redacted.stderr;
177
+ }
178
+ if (options.includeExitCode && result.exitCode !== null) {
179
+ output += `\n[Exit code: ${result.exitCode}]`;
180
+ }
181
+ if (result.timedOut) {
182
+ output += '\n[Command timed out]';
183
+ }
184
+ if (result.signal) {
185
+ output += `\n[Terminated by signal: ${result.signal}]`;
186
+ }
187
+ return output;
188
+ }
189
+ /**
190
+ * Format exec result for display
191
+ */
192
+ formatResult(result, showOriginal = false) {
193
+ const lines = [];
194
+ if (result.timedOut) {
195
+ lines.push('⏱️ Command timed out');
196
+ }
197
+ if (result.signal) {
198
+ lines.push(`💥 Terminated by signal: ${result.signal}`);
199
+ }
200
+ if (result.exitCode !== null && result.exitCode !== 0) {
201
+ lines.push(`❌ Exit code: ${result.exitCode}`);
202
+ }
203
+ // Show redacted output by default
204
+ if (!showOriginal) {
205
+ lines.push('--- Redacted Output ---');
206
+ lines.push(result.redacted.stdout);
207
+ if (result.redacted.stderr) {
208
+ lines.push('--- Redacted Stderr ---');
209
+ lines.push(result.redacted.stderr);
210
+ }
211
+ if (result.redacted.stats.total > 0) {
212
+ lines.push('');
213
+ lines.push(`🔒 Redacted ${result.redacted.stats.total} item(s)`);
214
+ }
215
+ }
216
+ else {
217
+ // Show original (WARNING: contains sensitive data)
218
+ lines.push('⚠️ ORIGINAL OUTPUT (MAY CONTAIN SENSITIVE DATA)');
219
+ lines.push('---');
220
+ lines.push(result.stdout);
221
+ if (result.stderr) {
222
+ lines.push('--- Stderr ---');
223
+ lines.push(result.stderr);
224
+ }
225
+ }
226
+ return lines.join('\n');
227
+ }
228
+ }
229
+ /**
230
+ * Convenience function
231
+ */
232
+ export async function execRedacted(options) {
233
+ const executor = new SecureExecutor();
234
+ return executor.execRedacted(options);
235
+ }
236
+ /**
237
+ * Kubernetes convenience function
238
+ */
239
+ export async function kubectl(options) {
240
+ const executor = new SecureExecutor();
241
+ return executor.kubectl(options);
242
+ }
243
+ /**
244
+ * SSH convenience function
245
+ */
246
+ export async function sshExec(options) {
247
+ const executor = new SecureExecutor();
248
+ return executor.ssh(options);
249
+ }
250
+ //# sourceMappingURL=executor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executor.js","sourceRoot":"","sources":["../src/executor.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAiExC;;GAEG;AACH,MAAM,OAAO,cAAc;IACjB,MAAM,CAAY;IAE1B;QACE,IAAI,CAAC,MAAM,GAAG,IAAI,UAAU,EAAE,CAAA;IAChC,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,IAAI,CAAC,OAAoB;QAC7B,MAAM,EACJ,OAAO,EACP,IAAI,GAAG,EAAE,EACT,GAAG,EACH,GAAG,EACH,OAAO,GAAG,KAAK,EACf,aAAa,GAAG,IAAI,EACpB,eAAe,GAAG,KAAK,EACvB,KAAK,GAAG,UAAU,EAClB,cAAc,GAAG,KAAK,EACtB,cAAc,EACf,GAAG,OAAO,CAAA;QAEX,yCAAyC;QACzC,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,MAAM,IAAI,KAAK,CAAC,oFAAoF,CAAC,CAAA;QACvG,CAAC;QAED,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YAC7B,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;YAC5B,IAAI,QAAQ,GAAG,KAAK,CAAA;YACpB,IAAI,aAAyC,CAAA;YAE7C,oBAAoB;YACpB,MAAM,IAAI,GAAG,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE;gBAChC,GAAG;gBACH,GAAG,EAAE,EAAE,GAAG,OAAO,CAAC,GAAG,EAAE,GAAG,GAAG,EAAE;gBAC/B,OAAO,EAAE,SAAS,CAAC,8BAA8B;aAClD,CAAC,CAAA;YAEF,IAAI,MAAM,GAAG,EAAE,CA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AI,cAAc,EAAE,CAAA;IACrC,OAAO,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;AAC9B,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Tests for SecureExecutor
3
+ */
4
+ export {};
5
+ //# sourceMappingURL=executor.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"executor.test.d.ts","sourceRoot":"","sources":["../src/executor.test.ts"],"names":[],"mappings":"AAAA;;GAEG"}