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

推荐订阅源

Blog — PlanetScale
Blog — PlanetScale
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Vercel News
Vercel News
B
Blog
腾讯CDC
P
Proofpoint News Feed
Google DeepMind News
Google DeepMind News
N
Netflix TechBlog - Medium
L
LangChain Blog
F
Fortinet All Blogs
T
The Blog of Author Tim Ferriss
人人都是产品经理
人人都是产品经理
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
I
InfoQ
IT之家
IT之家
酷 壳 – CoolShell
酷 壳 – CoolShell
aimingoo的专栏
aimingoo的专栏
D
DataBreaches.Net
Stack Overflow Blog
Stack Overflow Blog
The Cloudflare Blog
Last Week in AI
Last Week in AI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 三生石上(FineUI控件)
T
Tailwind CSS Blog

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(skills): trust managed skill symlink roots · openclaw...
stainlu · 2026-05-15 · via Recent Commits to openclaw:main

@@ -404,6 +404,53 @@ function isPathInsideAnyRoot(rootRealPaths: readonly string[], candidateRealPath

404404

return rootRealPaths.some((rootRealPath) => isPathInside(rootRealPath, candidateRealPath));

405405

}

406406407+

function shouldEnforceConfiguredSkillRootContainment(source: string): boolean {

408+

return source !== "openclaw-managed" && source !== "agents-skills-personal";

409+

}

410+411+

function shouldUseConfiguredSymlinkTargets(source: string): boolean {

412+

return (

413+

source === "openclaw-workspace" ||

414+

source === "openclaw-extra" ||

415+

source === "agents-skills-project"

416+

);

417+

}

418+419+

function resolveSkillRootCandidatePath(params: {

420+

source: string;

421+

rootDir: string;

422+

rootRealPath: string;

423+

candidatePath: string;

424+

allowedSymlinkTargetRealPaths: readonly string[];

425+

}): string | null {

426+

if (!shouldEnforceConfiguredSkillRootContainment(params.source)) {

427+

return tryRealpath(params.candidatePath);

428+

}

429+

return resolveContainedSkillPath({

430+

source: params.source,

431+

rootDir: params.rootDir,

432+

rootRealPath: params.rootRealPath,

433+

candidatePath: params.candidatePath,

434+

allowedSymlinkTargetRealPaths: shouldUseConfiguredSymlinkTargets(params.source)

435+

? params.allowedSymlinkTargetRealPaths

436+

: [],

437+

});

438+

}

439+440+

function resolveSkillFilePath(params: {

441+

source: string;

442+

skillDir: string;

443+

skillDirRealPath: string;

444+

candidatePath: string;

445+

}): string | null {

446+

return resolveContainedSkillPath({

447+

source: params.source,

448+

rootDir: params.skillDir,

449+

rootRealPath: params.skillDirRealPath,

450+

candidatePath: params.candidatePath,

451+

});

452+

}

453+407454

function resolvePluginSkillRootRealPaths(pluginSkillDirs: readonly string[]): string[] {

408455

return pluginSkillDirs

409456

.map((dir) => tryRealpath(dir))

@@ -535,7 +582,7 @@ function loadSkillEntries(

535582

maxEntriesToScan: limits.maxCandidatesPerRoot,

536583

});

537584

const baseDir = resolved.baseDir;

538-

const baseDirRealPath = resolveContainedSkillPath({

585+

const baseDirRealPath = resolveSkillRootCandidatePath({

539586

source: params.source,

540587

rootDir,

541588

rootRealPath,

@@ -549,12 +596,11 @@ function loadSkillEntries(

549596

// If the root itself is a skill directory, just load it directly (but enforce size cap).

550597

const rootSkillMd = path.join(baseDir, "SKILL.md");

551598

if (fs.existsSync(rootSkillMd)) {

552-

const rootSkillRealPath = resolveContainedSkillPath({

599+

const rootSkillRealPath = resolveSkillFilePath({

553600

source: params.source,

554-

rootDir,

555-

rootRealPath: baseDirRealPath,

601+

skillDir: baseDir,

602+

skillDirRealPath: baseDirRealPath,

556603

candidatePath: rootSkillMd,

557-

allowedSymlinkTargetRealPaths,

558604

});

559605

if (!rootSkillRealPath) {

560606

return [];

@@ -642,7 +688,7 @@ function loadSkillEntries(

642688

// skill directories (e.g. ~/.openclaw/skills/coze/koze-retrieval/SKILL.md).

643689

for (const name of limitedChildren) {

644690

const skillDir = path.join(baseDir, name);

645-

const skillDirRealPath = resolveContainedSkillPath({

691+

const skillDirRealPath = resolveSkillRootCandidatePath({

646692

source: params.source,

647693

rootDir,

648694

rootRealPath: baseDirRealPath,

@@ -654,12 +700,11 @@ function loadSkillEntries(

654700

}

655701

const skillMd = path.join(skillDir, "SKILL.md");

656702

if (fs.existsSync(skillMd)) {

657-

const skillMdRealPath = resolveContainedSkillPath({

703+

const skillMdRealPath = resolveSkillFilePath({

658704

source: params.source,

659-

rootDir,

660-

rootRealPath: baseDirRealPath,

705+

skillDir,

706+

skillDirRealPath,

661707

candidatePath: skillMd,

662-

allowedSymlinkTargetRealPaths,

663708

});

664709

if (skillMdRealPath) {

665710

loadCandidateSkill({ skillDir, name, skillMdRealPath });

@@ -701,20 +746,21 @@ function loadSkillEntries(

701746

const nestedDir = path.join(skillDir, nestedName);

702747

const nestedSkillMd = path.join(nestedDir, "SKILL.md");

703748

if (fs.existsSync(nestedSkillMd)) {

704-

const nestedDirRealPath = resolveContainedSkillPath({

749+

const nestedDirRealPath = resolveSkillRootCandidatePath({

705750

source: params.source,

706751

rootDir,

707752

rootRealPath: baseDirRealPath,

708753

candidatePath: nestedDir,

709754

allowedSymlinkTargetRealPaths,

710755

});

711-

const nestedSkillMdRealPath = resolveContainedSkillPath({

712-

source: params.source,

713-

rootDir,

714-

rootRealPath: baseDirRealPath,

715-

candidatePath: nestedSkillMd,

716-

allowedSymlinkTargetRealPaths,

717-

});

756+

const nestedSkillMdRealPath = nestedDirRealPath

757+

? resolveSkillFilePath({

758+

source: params.source,

759+

skillDir: nestedDir,

760+

skillDirRealPath: nestedDirRealPath,

761+

candidatePath: nestedSkillMd,

762+

})

763+

: null;

718764

if (nestedDirRealPath && nestedSkillMdRealPath) {

719765

loadCandidateSkill({

720766

skillDir: nestedDir,