unslothai/unsloth · warning · HTTPException
Credential or configuration directories are not browseable.
Error message
Credential or configuration directories are not browseable.
What it means
Raised as a 403 by _resolve_browse_target when contains_sensitive_path_component() flags a resolved intermediate component while walking toward the requested browse path. It blocks browsing through credential/configuration directories (e.g. .ssh, .aws, .gnupg, .config-style paths) even when those directories sit inside an allowed root like the home folder.
Source
Thrown at studio/backend/routes/models.py:1709
current,
exc,
exc_info = True,
)
raise HTTPException(
status_code = 400,
detail = "Invalid path",
) from exc
if not _is_path_inside_allowlist(resolved_child, resolved_roots):
raise HTTPException(
status_code = 403,
detail = (
"Path is not in the browseable allowlist. Register it via "
"POST /api/models/scan-folders first, or pick a directory "
"under your home folder."
),
)
if contains_sensitive_path_component(str(resolved_child)):
raise HTTPException(
status_code = 403,
detail = "Credential or configuration directories are not browseable.",
)
if is_denied_system_path(str(resolved_child)):
raise HTTPException(
status_code = 403,
detail = "System directories are not browseable.",
)
current = resolved_child
if contains_sensitive_path_component(str(current)):
raise HTTPException(
status_code = 403,
detail = "Credential or configuration directories are not browseable.",
)
# Zero-component case: the requested path IS an allowlist root (legacy "/" or a drive root).
if is_denied_system_path(str(current)):
raise HTTPException(View on GitHub (pinned to 203007d190)
Solutions
- Browse a non-sensitive directory instead — the browser is scoped to model/data folders by design.
- Move the data you actually need out of the credential/config directory into a normal folder (or register that folder as a scan folder if appropriate).
- Do not attempt to bypass it; use direct shell access for legitimate credential-file inspection.
Defensive patterns
Strategy: validation
Validate before calling
SENSITIVE = {'.ssh', '.aws', '.gnupg', '.config', '.kube', '.docker'}
def has_sensitive_component(path: str) -> bool:
return bool(SENSITIVE & set(path.strip('/').split('/')))
if has_sensitive_component(browse_path):
raise ValueError('credential/config directories are not browseable') Try / catch
try:
entries = browse(path)
except HTTPError as e:
if e.response.status_code == 403 and 'Credential' in e.response.json()['detail']:
show_user('That folder contains credentials and cannot be browsed here.')
else: raise Prevention
- Never store models/data inside credential or config directories.
- Filter sensitive dot-directories out of the folder picker.
- Treat this 403 as intentional; use shell tooling for credential-file work.
When it happens
Trigger: GET browse-folders with a path that routes through or into a credential/config directory under home, e.g. ~/.ssh/keys, ~/.aws, or another directory whose name matches the sensitive-component list in storage/studio_db.
Common situations: Home directory used as a catch-all storage; users trying to verify a file inside .ssh or .gnupg via the models browser; exploratory browsing of dot-directories.
Related errors
- System directories are not browseable.
- Directory not allowed
- Path is not in the browseable allowlist. Register it via POS
- Linked folder is no longer a regular directory
- Linked source is not a regular file
AI-assisted analysis of unslothai/unsloth@203007d190 (2026-08-15).
Data as JSON: /api/errors/6b7435b9f3f52c7f.
Report an issue: GitHub.