fix: extract requires.env and homepage from top-level frontmatter#548
Open
MunemHashmi wants to merge 1 commit intoopenclaw:mainfrom
Open
fix: extract requires.env and homepage from top-level frontmatter#548MunemHashmi wants to merge 1 commit intoopenclaw:mainfrom
MunemHashmi wants to merge 1 commit intoopenclaw:mainfrom
Conversation
…enclaw#522) parseFrontmatterLevelDeclarations did not handle the requires block (env, bins, anyBins, config) or primaryEnv when declared at the top level of SKILL.md frontmatter without a metadata.openclaw wrapper. This caused the security scanner to always show "Required env vars: none" for skills using that format, triggering false-positive suspicious flags. Also extends the evalCtx.homepage fallback chain to check clawdis.homepage and clawdis.links.homepage so skills declaring homepage inside the metadata block are picked up by the scanner.
Contributor
|
@MunemHashmi is attempting to deploy a commit to the Amantus Machina Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
Greptile SummaryThis PR successfully fixes issue #522 by enabling Key Changes:
Technical Quality:
Confidence Score: 5/5
Last reviewed commit: bd57b10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #522
convex/lib/skills.ts:parseFrontmatterLevelDeclarations()now parsesrequiresblock (env,bins,anyBins,config) andprimaryEnvfrom top-level SKILL.md frontmatter when nometadata.openclawwrapper is presentconvex/llmEval.ts:evalCtx.homepagenow falls back toclawdis.homepageandclawdis.links.homepage, so skills declaring homepage inside the metadata block are picked up by the security scannerconvex/lib/skills.test.ts: Two new test cases covering the exact reproduction scenario from the issueRoot cause
When a skill declares
requires.envat the top level of frontmatter (not nested undermetadata.openclaw),parseClawdisMetadatadelegates toparseFrontmatterLevelDeclarations. That fallback function handledenvVars,dependencies,author,links, andhomepage— but notrequires. This meantparsed.clawdis.requireswas always empty, so the security scanner showed "Required env vars: none" and flagged a metadata mismatch.Test plan
bun run test -- convex/lib/skills.test.ts— 30/30 pass (including 2 new tests)bun run lint— 0 warnings, 0 errorsbun run build— successful