xai-org/grok-build · error
Marketplace source blocked: {}
Error message
Marketplace source blocked: {} What it means
Under a restricted managed-settings marketplace allowlist, adding a marketplace whose source identity is not allowlisted is blocked with 'Marketplace source blocked: {reason}'. Local paths never match the git-URL allowlist, so a strict policy blocks them too — the check intentionally fails closed for security.
Source
Thrown at crates/codegen/xai-grok-pager/src/plugin_cmd.rs:879
if let MarketplaceAddInput::LocalPath(path) = &input
&& !path.is_dir()
{
bail!(
"Local marketplace path not found (or is not a directory): {}",
path.display()
);
}
let identity = match &input {
MarketplaceAddInput::GitUrl(u) => u.clone(),
MarketplaceAddInput::LocalPath(p) => p.display().to_string(),
};
// Local paths never match the git-URL allowlist, so a restricted strictKnownMarketplaces policy blocks them; intentionally fail-closed
let allowlist =
&xai_grok_workspace::permission::resolution::managed_settings().marketplace_allowlist;
if allowlist.is_restricted() && !allowlist.is_url_allowed(&identity) {
bail!("Marketplace source blocked: {}", allowlist.block_reason());
}
let already_configured = match &input {
MarketplaceAddInput::GitUrl(git_url) => {
let normalized = git_url.trim_end_matches(".git");
sources.iter().any(|s| {
matches!(&s.kind, SourceKind::Git { url: u, .. }
if u.trim_end_matches(".git") == normalized)
})
}
MarketplaceAddInput::LocalPath(path) => sources
.iter()
.any(|s| matches!(&s.kind, SourceKind::Local { path: p } if p == path)),
};
if already_configured {
bail!("Marketplace source already configured: {identity}");
}
View on GitHub (pinned to bc7f02eddd)
Solutions
- Ask your workspace admin to allowlist the marketplace URL in managed settings
- Use an approved marketplace URL from the allowlist
- Host your marketplace at an already-approved domain/repo
- Check the current policy via managed settings to see which URLs are permitted
Example fix
// before grok plugin marketplace add ./my-local-market # blocked by strict allowlist // after (admin adds to allowlist first) # managed settings: marketplace_allowlist: ["https://github.com/approved/marketplace.git"] grok plugin marketplace add https://github.com/approved/marketplace.git
Defensive patterns
Strategy: try-catch
Validate before calling
let allowlist = &xai_grok_workspace::permission::resolution::managed_settings()
.marketplace_allowlist;
if allowlist.is_restricted() && !allowlist.is_url_allowed(&identity) {
eprintln!("Blocked by policy: {}", allowlist.block_reason());
std::process::exit(1);
} Type guard
fn is_allowlisted(allowlist: &xai_grok_workspace::permission::resolution::Allowlist, identity: &str) -> bool {
!allowlist.is_restricted() || allowlist.is_url_allowed(identity)
} Try / catch
match marketplace_add(url, None, false, false) {
Err(e) if e.to_string().contains("Marketplace source blocked") => {
eprintln!("Request an allowlist exception from your workspace admin: {e}");
}
Ok(_) => {}
Err(e) => return Err(e),
} Prevention
- Check managed settings for a restricted marketplace_allowlist before attempting adds
- Prefer git URLs over local paths in managed environments (local paths fail closed)
- Maintain an approved-sources list for your team and add marketplaces only from it
- Request policy changes through your admin rather than bypassing the allowlist
When it happens
Trigger: Running `grok plugin marketplace add` in an environment where managed_settings defines a restricted marketplace_allowlist and the computed identity (git URL, or any local path) is not on it.
Common situations: Corporate/managed workspaces restricting plugin sources to approved URLs; trying to add a local-path marketplace while a strict allowlist is active; typo'd URL failing the allowlist match.
Related errors
- unmount {}: {err}
- URL cannot be empty.
- Local marketplace path not found (or is not a directory): {}
- Marketplace source already configured: {identity}
- Provide the source name, git URL, or local path to remove.
AI-assisted analysis of xai-org/grok-build@bc7f02eddd (2026-08-31).
Data as JSON: /api/errors/04092b4a6bdb7ebc.
Report an issue: GitHub.