惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

J
Java Code Geeks
月光博客
月光博客
D
DataBreaches.Net
云风的 BLOG
云风的 BLOG
F
Fortinet All Blogs
T
The Blog of Author Tim Ferriss
Stack Overflow Blog
Stack Overflow Blog
Blog — PlanetScale
Blog — PlanetScale
aimingoo的专栏
aimingoo的专栏
U
Unit 42
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
MyScale Blog
MyScale Blog
T
Tailwind CSS Blog
N
Netflix TechBlog - Medium
B
Blog
博客园_首页
G
Google Developers Blog
Recent Announcements
Recent Announcements
博客园 - 【当耐特】
P
Proofpoint News Feed
博客园 - 司徒正美
Hugging Face - Blog
Hugging Face - Blog
MongoDB | Blog
MongoDB | Blog
Last Week in AI
Last Week in AI

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(release): keep package output names local · openclaw/...
vincentkoc · 2026-06-17 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -78,6 +78,12 @@ function readEqualsOptionValue(value, optionName) {

7878

return value;

7979

}

8080
81+

function validateOutputName(value) {

82+

if (!/^[A-Za-z0-9][A-Za-z0-9._-]*\.t(?:ar\.)?gz$/u.test(value)) {

83+

throw new Error(`--output-name must be a tarball filename, not a path: ${value}`);

84+

}

85+

}

86+
8187

export function parseArgs(argv) {

8288

const options = {

8389

outputDir: "",

@@ -111,6 +117,9 @@ export function parseArgs(argv) {

111117

throw new Error(`unknown argument: ${arg}`);

112118

}

113119

}

120+

if (options.outputName) {

121+

validateOutputName(options.outputName);

122+

}

114123

return options;

115124

}

116125
Original file line numberDiff line numberDiff line change

@@ -131,9 +131,16 @@ export function parseArgs(argv) {

131131

throw new Error(`unknown argument: ${arg}`);

132132

}

133133

}

134+

validateOutputName(options.outputName);

134135

return options;

135136

}

136137
138+

function validateOutputName(value) {

139+

if (!/^[A-Za-z0-9][A-Za-z0-9._-]*\.t(?:ar\.)?gz$/u.test(value)) {

140+

throw new Error(`--output-name must be a tarball filename, not a path: ${value}`);

141+

}

142+

}

143+
137144

export function validateOpenClawPackageSpec(spec) {

138145

if (!OPENCLAW_PACKAGE_SPEC_RE.test(spec)) {

139146

throw new Error(

Original file line numberDiff line numberDiff line change

@@ -96,6 +96,23 @@ describe("package-openclaw-for-docker", () => {

9696

}

9797

});

9898
99+

it("rejects package artifact output names that escape the output directory", () => {

100+

for (const outputName of [

101+

"../openclaw-current.tgz",

102+

"nested/openclaw-current.tgz",

103+

"openclaw-current.zip",

104+

".openclaw-current.tgz",

105+

]) {

106+

expect(() => parseArgs(["--output-name", outputName])).toThrow(

107+

`--output-name must be a tarball filename, not a path: ${outputName}`,

108+

);

109+

}

110+
111+

expect(parseArgs(["--output-name", "openclaw-current.tar.gz"]).outputName).toBe(

112+

"openclaw-current.tar.gz",

113+

);

114+

});

115+
99116

it("uses build-all as the single bounded package artifact build step", async () => {

100117

const calls: Array<{

101118

command: string;

Original file line numberDiff line numberDiff line change

@@ -165,6 +165,23 @@ describe("resolve-openclaw-package-candidate", () => {

165165

});

166166

});

167167
168+

it("rejects package candidate output names that escape the output directory", () => {

169+

for (const outputName of [

170+

"../openclaw-current.tgz",

171+

"nested/openclaw-current.tgz",

172+

"openclaw-current.zip",

173+

".openclaw-current.tgz",

174+

]) {

175+

expect(() => parseArgs(["--output-name", outputName])).toThrow(

176+

`--output-name must be a tarball filename, not a path: ${outputName}`,

177+

);

178+

}

179+
180+

expect(parseArgs(["--output-name", "openclaw-current.tar.gz"]).outputName).toBe(

181+

"openclaw-current.tar.gz",

182+

);

183+

});

184+
168185

it("resolves npm package candidates through the Windows npm.cmd toolchain shim", () => {

169186

const execPath = "C:\\nodejs\\node.exe";

170187

const npmCmdPath = path.win32.resolve(path.win32.dirname(execPath), "npm.cmd");