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(security): add fetch timeouts to verify + IPFS HEAD probe (audit_1776853149979)

Reuvend9fd35956557
diff --git a/v3/@claude-flow/cli/src/commands/verify.ts b/v3/@claude-flow/cli/src/commands/verify.ts
index d3c3c798f1..a2b84b95b1 100644
--- a/v3/@claude-flow/cli/src/commands/verify.ts
+++ b/v3/@claude-flow/cli/src/commands/verify.ts
@@ -56,7 +56,9 @@ const DEFAULT_MANIFEST_URL = 'https://raw.githubusercontent.com/ruvnet/ruflo/{br
async function fetchWitness(branch: string): Promise<Witness> {
const url = DEFAULT_MANIFEST_URL.replace('{branch}', branch);
- const res = await fetch(url);
+ // audit_1776853149979: bare fetch had no timeout — a hung GitHub CDN would
+ // pin the verify command indefinitely. 30s is generous for a sub-MB JSON.
+ const res = await fetch(url, { signal: AbortSignal.timeout(30000) });
if (!res.ok) {
throw new Error(`Failed to fetch manifest from ${url}: ${res.status} ${res.statusText}`);
}
diff --git a/v3/@claude-flow/cli/src/transfer/ipfs/upload.ts b/v3/@claude-flow/cli/src/transfer/ipfs/upload.ts
index ccd6088216..e6cdc45055 100644
--- a/v3/@claude-flow/cli/src/transfer/ipfs/upload.ts
+++ b/v3/@claude-flow/cli/src/transfer/ipfs/upload.ts
@@ -381,6 +381,8 @@ export async function checkContent(
try {
const response = await fetch(`${gateway}/ipfs/${cid}`, {
method: 'HEAD',
+ // audit_1776853149979: HEAD probe should never hang; 10s upper bound.
+ signal: AbortSignal.timeout(10000),
});
if (response.ok) {