(root, path)
| 16 | } |
| 17 | |
| 18 | function assertSafePath(root, path) { |
| 19 | if (!path || path.includes("\0")) throw new Error("invalid artifact path"); |
| 20 | const full = resolve(root, path); |
| 21 | const rel = relative(root, full); |
| 22 | if (rel.startsWith("..") || resolve(root, rel) !== full) throw new Error("artifact path escapes workspace"); |
| 23 | return full; |
| 24 | } |
| 25 | |
| 26 | const SECRET_KEYS = ["CLOUDBOX_GITLAB_TOKEN", "GITLAB_TOKEN", "NPM_TOKEN"]; |
| 27 |
no outgoing calls
no test coverage detected