Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

fix(x-gateway): escape every slash in scoped npm names (CodeQL js/incomplete-sanitization)

r39a6792f0132
diff --git a/plugins/ruflo-x-gateway/src/github-query.mjs b/plugins/ruflo-x-gateway/src/github-query.mjs
index 637548209a..04a76dcc41 100644
--- a/plugins/ruflo-x-gateway/src/github-query.mjs
+++ b/plugins/ruflo-x-gateway/src/github-query.mjs
@@ -329,7 +329,7 @@ export function createGithubQuery({
async registryLatest({ package: name } = {}) {
const n = validateNpmName(name);
- const d = parse(await get(`${NPM_REGISTRY}/${n.replace('/', '%2f')}/latest`, { accept: 'application/json', authed: false }));
+ const d = parse(await get(`${NPM_REGISTRY}/${n.replace(/\//g, '%2f')}/latest`, { accept: 'application/json', authed: false }));
const who = [...(d.maintainers || []).map((m) => m?.name), d._npmUser?.name].filter(Boolean).map((s) => String(s).toLowerCase());
if (!who.some((w) => npmMaintainers.includes(w))) throw new GithubQueryError('owner_not_allowed', 'package is not maintained by an allowlisted npm account');
return { name: d.name, latest: d.version, description: d.description ?? null, license: d.license ?? null, homepage: d.homepage ?? null, repository: d.repository?.url ?? null };