@runa-ai/runa-cli 0.5.28 → 0.5.31
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/commands/ci/commands/ci-prod-apply.d.ts.map +1 -1
- package/dist/commands/ci/commands/ci-prod-db-operations.d.ts +4 -0
- package/dist/commands/ci/commands/ci-prod-db-operations.d.ts.map +1 -1
- package/dist/commands/ci/utils/env-security.d.ts +58 -0
- package/dist/commands/ci/utils/env-security.d.ts.map +1 -0
- package/dist/commands/ci/utils/execa-helpers.d.ts +4 -0
- package/dist/commands/ci/utils/execa-helpers.d.ts.map +1 -1
- package/dist/commands/ci/utils/github.d.ts +6 -0
- package/dist/commands/ci/utils/github.d.ts.map +1 -1
- package/dist/commands/ci/utils/pgtap-installer.d.ts +3 -0
- package/dist/commands/ci/utils/pgtap-installer.d.ts.map +1 -1
- package/dist/commands/ci/utils/rls-verification.d.ts +3 -0
- package/dist/commands/ci/utils/rls-verification.d.ts.map +1 -1
- package/dist/commands/ci/utils/workflow-idempotency.d.ts +90 -0
- package/dist/commands/ci/utils/workflow-idempotency.d.ts.map +1 -0
- package/dist/commands/db/apply/actors.d.ts.map +1 -1
- package/dist/commands/db/apply/helpers/advisory-lock.d.ts.map +1 -1
- package/dist/commands/db/apply/helpers/pg-schema-diff-helpers.d.ts +4 -0
- package/dist/commands/db/apply/helpers/pg-schema-diff-helpers.d.ts.map +1 -1
- package/dist/commands/db/commands/db-derive-role-passwords.d.ts.map +1 -1
- package/dist/commands/db/commands/db-derive-urls.d.ts.map +1 -1
- package/dist/commands/db/utils/psql.d.ts +57 -0
- package/dist/commands/db/utils/psql.d.ts.map +1 -1
- package/dist/commands/db/utils/seed-manager.d.ts +4 -0
- package/dist/commands/db/utils/seed-manager.d.ts.map +1 -1
- package/dist/commands/env/commands/setup/file-export.d.ts +12 -1
- package/dist/commands/env/commands/setup/file-export.d.ts.map +1 -1
- package/dist/commands/upgrade.d.ts.map +1 -1
- package/dist/config/env-files.d.ts +5 -0
- package/dist/config/env-files.d.ts.map +1 -1
- package/dist/config/env.d.ts +4 -0
- package/dist/config/env.d.ts.map +1 -1
- package/dist/index.js +1294 -477
- package/dist/internal/vuln-checker/analyzers/secret-analyzer.d.ts +5 -0
- package/dist/internal/vuln-checker/analyzers/secret-analyzer.d.ts.map +1 -1
- package/dist/internal/vuln-checker/config/loader.d.ts.map +1 -1
- package/dist/utils/config-updater.d.ts +5 -0
- package/dist/utils/config-updater.d.ts.map +1 -1
- package/dist/utils/github-output-security.d.ts +36 -0
- package/dist/utils/github-output-security.d.ts.map +1 -0
- package/dist/utils/path-security.d.ts +98 -0
- package/dist/utils/path-security.d.ts.map +1 -0
- package/dist/utils/secure-exec.d.ts +22 -12
- package/dist/utils/secure-exec.d.ts.map +1 -1
- package/dist/utils/template-fetcher.d.ts +11 -0
- package/dist/utils/template-fetcher.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -4,6 +4,11 @@
|
|
|
4
4
|
* Purpose: Detect hardcoded secrets, API keys, tokens, and credentials
|
|
5
5
|
* Philosophy: Pattern-based detection with entropy analysis
|
|
6
6
|
*
|
|
7
|
+
* Security (Issue #463):
|
|
8
|
+
* - All regex patterns are designed to avoid ReDoS (catastrophic backtracking)
|
|
9
|
+
* - Input size limits prevent resource exhaustion
|
|
10
|
+
* - Patterns avoid nested quantifiers and complex backreferences
|
|
11
|
+
*
|
|
7
12
|
* Detects:
|
|
8
13
|
* - API keys (AWS, Google, Stripe, GitHub, etc.)
|
|
9
14
|
* - Private keys (RSA, SSH)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secret-analyzer.d.ts","sourceRoot":"","sources":["../../../../src/internal/vuln-checker/analyzers/secret-analyzer.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"secret-analyzer.d.ts","sourceRoot":"","sources":["../../../../src/internal/vuln-checker/analyzers/secret-analyzer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAKH,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,QAAQ,EAAE,OAAO,EAAoB,MAAM,aAAa,CAAC;AAgiClG;;GAEG;AACH,qBAAa,cAAe,YAAW,QAAQ;IAC7C,IAAI,SAAoB;IACxB,UAAU,EAAE,QAAQ,EAAE,CAAc;IAE9B,OAAO,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;YAkB7C,cAAc;IAY5B,OAAO,CAAC,UAAU;CAGnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../../src/internal/vuln-checker/config/loader.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEjE;;GAEG;AACH,wBAAsB,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../../src/internal/vuln-checker/config/loader.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEjE;;GAEG;AACH,wBAAsB,UAAU,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAmBhG;AAED;;GAEG;AACH,wBAAsB,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CA8B5F"}
|
|
@@ -4,6 +4,11 @@
|
|
|
4
4
|
* Purpose: Update runa.config.ts with detected values (e.g., Vercel root directory)
|
|
5
5
|
* Design: Uses regex replacement to preserve existing config structure
|
|
6
6
|
*
|
|
7
|
+
* Security:
|
|
8
|
+
* - Directory paths are validated to prevent injection attacks
|
|
9
|
+
* - Version strings are validated against semver pattern
|
|
10
|
+
* - Special characters are escaped in replacement strings
|
|
11
|
+
*
|
|
7
12
|
* Usage:
|
|
8
13
|
* await updateRunaConfigAppDirectory('apps/dashboard');
|
|
9
14
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-updater.d.ts","sourceRoot":"","sources":["../../src/utils/config-updater.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"config-updater.d.ts","sourceRoot":"","sources":["../../src/utils/config-updater.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAoEH;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAC1C,YAAY,EAAE,MAAM,EACpB,SAAS,GAAE,MAAsB,GAChC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CA6CtC;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,MAAM,EACjB,mBAAmB,EAAE,MAAM,GAAG,IAAI,GACjC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAW5D;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,MAAM,EACf,SAAS,GAAE,MAAsB,GAChC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CA2DtC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI HINT: GitHub Actions Output Security
|
|
3
|
+
*
|
|
4
|
+
* Purpose: Secure validation of GITHUB_OUTPUT file writes
|
|
5
|
+
* Security:
|
|
6
|
+
* - Validates GITHUB_OUTPUT path is within safe directories (Issue #457)
|
|
7
|
+
* - Prevents path traversal attacks via symlink resolution
|
|
8
|
+
* - Blocks writes to sensitive system paths
|
|
9
|
+
*
|
|
10
|
+
* GITHUB_OUTPUT in GitHub Actions:
|
|
11
|
+
* - Set to a file in runner's temp directory (e.g., /home/runner/work/_temp/_runner_file_commands/set_output_*)
|
|
12
|
+
* - Used to pass step outputs via `echo "key=value" >> $GITHUB_OUTPUT`
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Validate that a path is safe for writing GitHub Actions output.
|
|
16
|
+
*
|
|
17
|
+
* SECURITY (Issue #457): Prevents injection attacks via GITHUB_OUTPUT.
|
|
18
|
+
*
|
|
19
|
+
* @param filePath - The file path to validate
|
|
20
|
+
* @returns Object with validation result and resolved path
|
|
21
|
+
*/
|
|
22
|
+
export declare function validateGitHubOutputPath(filePath: string): Promise<{
|
|
23
|
+
valid: boolean;
|
|
24
|
+
resolvedPath: string | null;
|
|
25
|
+
error?: string;
|
|
26
|
+
}>;
|
|
27
|
+
/**
|
|
28
|
+
* Securely write to GITHUB_OUTPUT file.
|
|
29
|
+
*
|
|
30
|
+
* SECURITY (Issue #457): Validates the output path before writing.
|
|
31
|
+
*
|
|
32
|
+
* @param values - Key-value pairs to write
|
|
33
|
+
* @throws CLIError if GITHUB_OUTPUT is not set or path is invalid
|
|
34
|
+
*/
|
|
35
|
+
export declare function writeGitHubOutputSecure(values: Record<string, string>): Promise<void>;
|
|
36
|
+
//# sourceMappingURL=github-output-security.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github-output-security.d.ts","sourceRoot":"","sources":["../../src/utils/github-output-security.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AA0CH;;;;;;;GAOG;AACH,wBAAsB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;IACxE,KAAK,EAAE,OAAO,CAAC;IACf,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC,CAyED;AAED;;;;;;;GAOG;AACH,wBAAsB,uBAAuB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAiC3F"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI HINT: Path Security Utility
|
|
3
|
+
*
|
|
4
|
+
* Purpose: Prevent path traversal attacks in file operations
|
|
5
|
+
* Security: Validates paths don't escape intended directories
|
|
6
|
+
*
|
|
7
|
+
* Pattern:
|
|
8
|
+
* 1. Normalize paths to remove .. sequences
|
|
9
|
+
* 2. Resolve to absolute paths
|
|
10
|
+
* 3. Verify resolved path is within allowed base directory
|
|
11
|
+
* 4. Reject paths containing dangerous characters
|
|
12
|
+
*
|
|
13
|
+
* @see Issue #453 - Path traversal in seed management file operations
|
|
14
|
+
* @see Issue #462 - Path traversal in config and environment file loading
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* Validate that a path doesn't contain dangerous characters.
|
|
18
|
+
* Checks for control characters and shell metacharacters.
|
|
19
|
+
*
|
|
20
|
+
* @param userPath - The path to validate
|
|
21
|
+
* @returns true if safe, false if contains dangerous characters
|
|
22
|
+
*/
|
|
23
|
+
export declare function hasNoDangerousChars(userPath: string): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Check if a path contains path traversal sequences.
|
|
26
|
+
*
|
|
27
|
+
* @param userPath - The path to check
|
|
28
|
+
* @returns true if contains traversal, false otherwise
|
|
29
|
+
*/
|
|
30
|
+
export declare function containsPathTraversal(userPath: string): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Validate that a user-provided path is safe to use within a base directory.
|
|
33
|
+
*
|
|
34
|
+
* Security checks:
|
|
35
|
+
* 1. Path doesn't contain dangerous characters
|
|
36
|
+
* 2. Path doesn't contain path traversal sequences (../)
|
|
37
|
+
* 3. Resolved path is within the base directory
|
|
38
|
+
*
|
|
39
|
+
* @param userPath - The user-provided path (relative)
|
|
40
|
+
* @param baseDir - The base directory the path should be within
|
|
41
|
+
* @returns true if path is safe, false otherwise
|
|
42
|
+
*/
|
|
43
|
+
export declare function validateSafePath(userPath: string, baseDir: string): boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Safely resolve a user path within a base directory.
|
|
46
|
+
* Throws if the path would escape the base directory.
|
|
47
|
+
*
|
|
48
|
+
* @param baseDir - The base directory
|
|
49
|
+
* @param userPath - The user-provided relative path
|
|
50
|
+
* @returns The resolved absolute path
|
|
51
|
+
* @throws Error if path validation fails
|
|
52
|
+
*/
|
|
53
|
+
export declare function resolveSafePath(baseDir: string, userPath: string): string;
|
|
54
|
+
/**
|
|
55
|
+
* Validate a list of paths and return only the safe ones.
|
|
56
|
+
* Logs warnings for rejected paths.
|
|
57
|
+
*
|
|
58
|
+
* @param paths - Array of paths to validate
|
|
59
|
+
* @param baseDir - The base directory paths should be within
|
|
60
|
+
* @param logger - Optional logger for warnings
|
|
61
|
+
* @returns Array of safe paths
|
|
62
|
+
*/
|
|
63
|
+
export declare function filterSafePaths(paths: string[], baseDir: string, logger?: {
|
|
64
|
+
warn: (msg: string) => void;
|
|
65
|
+
}): string[];
|
|
66
|
+
/**
|
|
67
|
+
* SECURITY (Issue #462): Maximum depth for directory traversal operations.
|
|
68
|
+
* Prevents infinite loops and limits resource consumption.
|
|
69
|
+
*/
|
|
70
|
+
export declare const MAX_DIRECTORY_TRAVERSAL_DEPTH = 10;
|
|
71
|
+
/**
|
|
72
|
+
* SECURITY (Issue #462): Validate an environment file suffix.
|
|
73
|
+
* Ensures the suffix doesn't contain path traversal sequences.
|
|
74
|
+
*
|
|
75
|
+
* @param suffix - The suffix to validate (e.g., "development", "preview")
|
|
76
|
+
* @throws Error if suffix contains invalid characters
|
|
77
|
+
*/
|
|
78
|
+
export declare function validateEnvSuffix(suffix: string): void;
|
|
79
|
+
/**
|
|
80
|
+
* SECURITY (Issue #462): Build a safe environment file path.
|
|
81
|
+
* Validates the environment name before constructing the path.
|
|
82
|
+
*
|
|
83
|
+
* @param projectRoot - Project root directory
|
|
84
|
+
* @param envName - Environment name (e.g., "development", "preview")
|
|
85
|
+
* @param local - Whether to append ".local" suffix
|
|
86
|
+
* @returns Safe path to the environment file
|
|
87
|
+
*/
|
|
88
|
+
export declare function buildSafeEnvFilePath(projectRoot: string, envName: string, local?: boolean): string;
|
|
89
|
+
/**
|
|
90
|
+
* SECURITY (Issue #462): Verify a path is contained within a base directory.
|
|
91
|
+
* Prevents escaping the intended directory via path manipulation.
|
|
92
|
+
*
|
|
93
|
+
* @param basePath - The expected parent directory
|
|
94
|
+
* @param targetPath - The path to verify
|
|
95
|
+
* @returns true if targetPath is within basePath
|
|
96
|
+
*/
|
|
97
|
+
export declare function isPathContained(basePath: string, targetPath: string): boolean;
|
|
98
|
+
//# sourceMappingURL=path-security.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"path-security.d.ts","sourceRoot":"","sources":["../../src/utils/path-security.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAiBH;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAc7D;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAW/D;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CA6B3E;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CASzE;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,MAAM,EAAE,EACf,OAAO,EAAE,MAAM,EACf,MAAM,CAAC,EAAE;IAAE,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE,GACvC,MAAM,EAAE,CAQV;AAMD;;;GAGG;AACH,eAAO,MAAM,6BAA6B,KAAK,CAAC;AAQhD;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAiBtD;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,UAAQ,GAAG,MAAM,CAahG;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAI7E"}
|
|
@@ -2,15 +2,21 @@
|
|
|
2
2
|
* AI HINT: Secure Binary Execution Utility
|
|
3
3
|
*
|
|
4
4
|
* Purpose: Prevent PATH manipulation attacks by resolving and validating binary paths
|
|
5
|
-
* Security:
|
|
5
|
+
* Security:
|
|
6
|
+
* - Only allows binaries from trusted directories (Issue #459)
|
|
7
|
+
* - Caches results with PATH change detection
|
|
8
|
+
* - Validates binary exists and is executable before use
|
|
9
|
+
* - Uses shell: false for all executions
|
|
6
10
|
*
|
|
7
11
|
* Pattern:
|
|
8
|
-
* 1. Resolve binary path
|
|
9
|
-
* 2. Cache resolved paths for
|
|
10
|
-
* 3. Validate
|
|
11
|
-
* 4.
|
|
12
|
+
* 1. Resolve binary path by searching trusted directories
|
|
13
|
+
* 2. Cache resolved paths with PATH fingerprint for invalidation
|
|
14
|
+
* 3. Validate the path is in a trusted directory
|
|
15
|
+
* 4. Validate binary exists and is executable before use
|
|
16
|
+
* 5. Use absolute path in execa calls with shell: false
|
|
12
17
|
*
|
|
13
18
|
* @see Issue #380 - User-controlled path binary execution vulnerability
|
|
19
|
+
* @see Issue #459 - PATH injection attack mitigation
|
|
14
20
|
*/
|
|
15
21
|
import { type Options as ExecaOptions, type ResultPromise } from 'execa';
|
|
16
22
|
/**
|
|
@@ -27,11 +33,12 @@ export declare function clearBinaryPathCache(): void;
|
|
|
27
33
|
/**
|
|
28
34
|
* Resolve a binary name to its absolute path.
|
|
29
35
|
*
|
|
30
|
-
* SECURITY:
|
|
36
|
+
* SECURITY (Issue #459):
|
|
31
37
|
* - Only resolves binaries in the TRUSTED_BINARIES list
|
|
32
|
-
* -
|
|
38
|
+
* - Only searches in TRUSTED_DIRECTORIES
|
|
33
39
|
* - Validates the resolved path is executable
|
|
34
|
-
* - Caches results with TTL
|
|
40
|
+
* - Caches results with TTL and PATH fingerprint for invalidation
|
|
41
|
+
* - Re-validates cached paths are still executable
|
|
35
42
|
*
|
|
36
43
|
* @throws Error if binary is not trusted or not found
|
|
37
44
|
*/
|
|
@@ -43,11 +50,11 @@ export declare function isBinaryAvailable(binaryName: string): boolean;
|
|
|
43
50
|
/**
|
|
44
51
|
* Execute a trusted binary with resolved absolute path.
|
|
45
52
|
*
|
|
46
|
-
* SECURITY: This function:
|
|
53
|
+
* SECURITY (Issue #459): This function:
|
|
47
54
|
* 1. Validates the binary is in the trusted list
|
|
48
|
-
* 2. Resolves the absolute path
|
|
55
|
+
* 2. Resolves the absolute path from trusted directories only
|
|
49
56
|
* 3. Validates the path is executable
|
|
50
|
-
* 4. Passes the absolute path to execa
|
|
57
|
+
* 4. Passes the absolute path to execa with shell: false
|
|
51
58
|
*
|
|
52
59
|
* @param binaryName - Name of the trusted binary to execute
|
|
53
60
|
* @param args - Arguments to pass to the binary
|
|
@@ -59,7 +66,10 @@ export declare function secureExeca(binaryName: TrustedBinary, args?: readonly s
|
|
|
59
66
|
* Execute a command relative to node_modules/.bin
|
|
60
67
|
* This is for locally installed packages.
|
|
61
68
|
*
|
|
62
|
-
* SECURITY
|
|
69
|
+
* SECURITY (Issue #459):
|
|
70
|
+
* - Only executes from the project's node_modules/.bin directory
|
|
71
|
+
* - Validates the binary name to prevent path traversal
|
|
72
|
+
* - Uses shell: false
|
|
63
73
|
*/
|
|
64
74
|
export declare function secureExecaLocal(binaryName: string, args?: readonly string[], options?: ExecaOptions & {
|
|
65
75
|
cwd?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secure-exec.d.ts","sourceRoot":"","sources":["../../src/utils/secure-exec.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"secure-exec.d.ts","sourceRoot":"","sources":["../../src/utils/secure-exec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAIH,OAAO,EAAE,KAAK,OAAO,IAAI,YAAY,EAAE,KAAK,aAAa,EAAS,MAAM,OAAO,CAAC;AAMhF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,gIAenB,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AA8D9D;;;GAGG;AACH,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C;AA0GD;;;;;;;;;;;GAWG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAyD5D;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAO7D;AAMD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,WAAW,CACzB,UAAU,EAAE,aAAa,EACzB,IAAI,GAAE,SAAS,MAAM,EAAO,EAC5B,OAAO,CAAC,EAAE,YAAY,GACrB,aAAa,CAIf;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,MAAM,EAClB,IAAI,GAAE,SAAS,MAAM,EAAO,EAC5B,OAAO,CAAC,EAAE,YAAY,GAAG;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GACxC,aAAa,CAsBf;AAMD;;GAEG;AACH,wBAAgB,UAAU,CAAC,IAAI,GAAE,SAAS,MAAM,EAAO,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,aAAa,CAE9F;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,GAAE,SAAS,MAAM,EAAO,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,aAAa,CAE7F;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,IAAI,GAAE,SAAS,MAAM,EAAO,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,aAAa,CAE5F;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,GAAE,SAAS,MAAM,EAAO,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,aAAa,CAEhG;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,IAAI,GAAE,SAAS,MAAM,EAAO,EAC5B,OAAO,CAAC,EAAE,YAAY,GACrB,aAAa,CAEf;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,GAAE,SAAS,MAAM,EAAO,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,aAAa,CAEhG;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,IAAI,GAAE,SAAS,MAAM,EAAO,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,aAAa,CAE9F"}
|
|
@@ -4,6 +4,17 @@
|
|
|
4
4
|
* Purpose: Fetch templates from @r06-dev/runa-templates (GitHub Packages)
|
|
5
5
|
* Used by: init.ts, upgrade.ts (Admin commands only)
|
|
6
6
|
*
|
|
7
|
+
* Security:
|
|
8
|
+
* - Version parameter validated against path traversal attacks (Issue #460)
|
|
9
|
+
* - Cache paths verified to stay within cache base directory (Issue #460)
|
|
10
|
+
* - Workspace resolution limits traversal depth (MAX_WORKSPACE_TRAVERSAL_DEPTH)
|
|
11
|
+
* - Multiple workspace markers required (pnpm-workspace.yaml + package.json)
|
|
12
|
+
* - Path normalization prevents symlink attacks
|
|
13
|
+
* - Token scoping minimizes credential exposure
|
|
14
|
+
*
|
|
15
|
+
* @see Issue #450 - Workspace template path traversal vulnerability
|
|
16
|
+
* @see Issue #460 - Path traversal in template fetcher cache management
|
|
17
|
+
*
|
|
7
18
|
* Authentication Flow:
|
|
8
19
|
* ┌─────────────────────────────────────────────────────────────────┐
|
|
9
20
|
* │ 1. Check workspace (runa-repo development) │
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"template-fetcher.d.ts","sourceRoot":"","sources":["../../src/utils/template-fetcher.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"template-fetcher.d.ts","sourceRoot":"","sources":["../../src/utils/template-fetcher.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AAkEH,MAAM,WAAW,qBAAqB;IACpC,yEAAyE;IACzE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,+BAA+B;IAC/B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,0BAA0B;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,oBAAoB;IACnC,8CAA8C;IAC9C,YAAY,EAAE,MAAM,CAAC;IACrB,+BAA+B;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,+CAA+C;IAC/C,MAAM,EAAE,OAAO,CAAC;CACjB;AA0OD;;;;;;;;GAQG;AACH,wBAAsB,cAAc,CAClC,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAAC,oBAAoB,CAAC,CAgF/B;AAmGD;;GAEG;AACH,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC,CAKzD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@runa-ai/runa-cli",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.31",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "AI-powered DevOps CLI",
|
|
6
6
|
"type": "module",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@dotenvx/dotenvx": "1.51.4",
|
|
29
|
-
"@runa-ai/runa": "^0.5.
|
|
29
|
+
"@runa-ai/runa": "^0.5.31",
|
|
30
30
|
"@runa-ai/runa-xstate-test-plugin": "^0.5.28",
|
|
31
31
|
"@types/node": "22.19.3",
|
|
32
32
|
"boxen": "7.1.1",
|