coleam00/Archon · error
Untrusted source URL for '${slug}': ${entry.sourceUrl} Only
Error message
Untrusted source URL for '${slug}': ${entry.sourceUrl}
Only github.com sources are permitted. What it means
Security guard on the install path: the marketplace entry's `sourceUrl` must start with `https://github.com/` before the command will parse and download from it. Prevents a tampered or malicious marketplace index from making Archon fetch workflow YAML from arbitrary hosts.
Source
Thrown at packages/cli/src/commands/workflow.ts:5151
return res.text();
}
export async function workflowInstallCommand(
slug: string,
cwd: string,
force?: boolean
): Promise<void> {
const entries = await fetchMarketplace();
const entry = entries.find(e => e.slug === slug);
if (!entry) {
console.error(`Error: Workflow '${slug}' not found in marketplace.`);
console.error("Run 'archon workflow search' to browse available workflows.");
throw new Error(`Workflow '${slug}' not found`);
}
if (!entry.sourceUrl.startsWith('https://github.com/')) {
throw new Error(
`Untrusted source URL for '${slug}': ${entry.sourceUrl}\nOnly github.com sources are permitted.`
);
}
if (!/^[a-z0-9-]+$/.test(slug)) {
throw new Error(`Invalid slug '${slug}': must be lowercase alphanumeric with hyphens only.`);
}
const { findRepoRoot } = await import('@archon/git');
const repoRoot = await findRepoRoot(cwd);
if (!repoRoot) {
throw new Error('Not in a git repository. Run archon workflow install from within a git repo.');
}
const { existsSync, mkdirSync, writeFileSync } = await import('node:fs');
const archonDir = join(repoRoot, '.archon');
if (isDirectoryUrl(entry.sourceUrl)) {View on GitHub (pinned to 0773b97458)
Solutions
- Change the entry's sourceUrl to a normal `https://github.com/<owner>/<repo>(/tree/<ref>/<path>)` URL
- If you genuinely need non-GitHub hosting, that is unsupported — mirror the workflow in a GitHub repo
- Verify the marketplace index you point the CLI at is the trusted one
- Re-fetch the official marketplace index if a tampered one was configured
Example fix
// before "sourceUrl": "https://raw.githubusercontent.com/acme/workflows/main/review.yaml" // after "sourceUrl": "https://github.com/acme/workflows/tree/main/review-dir"
Defensive patterns
Strategy: validation
Validate before calling
if (!entry.sourceUrl.startsWith('https://github.com/')) {
throw new Error(`Refusing non-GitHub source: ${entry.sourceUrl}`);
} Type guard
function isGithubSourceUrl(url: string): boolean {
try {
const u = new URL(url);
return u.protocol === 'https:' && u.hostname === 'github.com';
} catch { return false; }
} Try / catch
try {
await workflowInstallCommand(slug);
} catch (e) {
if (e instanceof Error && e.message.includes('Untrusted source URL')) {
// inspect the marketplace entry and correct its sourceUrl
} else throw e;
} Prevention
- Only use trusted, official marketplace indexes
- Audit custom index files for non-github.com sourceUrls before use
- Keep entries in canonical `https://github.com/<owner>/<repo>...` form
- Treat this error as a possible sign of a tampered index
When it happens
Trigger: `workflowInstallCommand` resolves a slug whose marketplace entry has a `sourceUrl` not beginning with `https://github.com/` — e.g. `https://gitlab.com/...`, `http://` (non-TLS), `https://raw.githubusercontent.com/...`, or a relative/garbage URL.
Common situations: Custom/self-hosted marketplace index listing non-GitHub sources; an entry hand-edited to a raw.githubusercontent URL; HTTP URL in a hand-written index; a compromised or third-party index attempting SSRF-style redirection.
Related errors
- Checksum mismatch: expected ${expectedHash}, got ${actualHas
- Expected directory listing from ${url}, got a single file
- Workflow '${slug}' not found
- Downloaded YAML is empty for '${slug}'
- Workflow '${slug}' already exists at ${destPath}. Use --forc
AI-assisted analysis of coleam00/Archon@0773b97458 (2026-09-01).
Data as JSON: /api/errors/5ba39b5834be4c18.
Report an issue: GitHub.