Endor Labs Scan Error Troubleshooter
Input Parsing
Accept input as: pasted error text, scan-and-diagnose request, or natural language description.
If no error text provided, ask:
- Run a scan on the current repository and diagnose errors?
- Analyze error text you paste in?
For scan mode, use scan MCP tool: path=repo path, scan_types=["vulnerabilities", "dependencies"], scan_options={ "quick_scan": true }. Parse results for errors and match against knowledge base.
Workflow
Step 1: Detect Ecosystem
| Indicator |
Ecosystem |
npm ERR!, yarn, pnpm, package.json, node_modules |
NPM |
pom.xml, mvn, gradle, Maven, Gradle, artifact, .jar, groupId |
Maven/Gradle |
pip, poetry, pypi, setup.py, pyproject.toml, requirements.txt |
PyPI |
go:, go.mod, go.sum, GOPATH, GOPROXY |
Go |
cargo, Cargo.toml, Cargo.lock, crate, rustc |
Cargo |
dotnet, nuget, .csproj, .sln, NuGet, TargetFramework |
NuGet |
gem, bundle, Gemfile, bundler, .gemspec |
RubyGems |
composer, packagist, composer.json, composer.lock |
Packagist |
No match? Check cross-ecosystem patterns (GitHub Packages, registry/artifactory, sandbox errors).
Step 2: Classify Error Category
Auth Conflict -- persistent auth error loop, "multiple authentication", "conflicting auth", "invalid permissions" or repeated auth failures despite valid credentials. Root cause: both ~/.endorctl/config.yaml AND auth env vars (ENDOR_MCP_SERVER_AUTH_MODE, ENDOR_NAMESPACE, ENDOR_API) in settings.json/mcp.json are present simultaneously.
Private Registry -- package not found, auth failures (401/403), SSH/Git credential errors, connection refused/timeout, missing registry config.
Toolchain -- language/SDK version mismatches, missing SDKs/build tools, lock file format issues, compiler/build config errors.
Other -- invalid manifests, compilation errors, missing build deps, plugin failures.
Step 3: Match Against Known Patterns
Read references/error-knowledge-base.md and match the error text against patterns for the detected ecosystem and category.
Step 4: Present Diagnosis
## Scan Error Diagnosis
### Error Identified
| Field | Value |
|-------|-------|
| Ecosystem | {ecosystem} |
| Category | {Private Registry / Toolchain / Other} |
| Error | {description} |
| Fixable | {Yes / No / Partially} |
### What This Means
{Plain-language explanation}
### Resolution
{Step-by-step remediation from matching rule}
{If Scan Profile fix:} Update [Scan Profile](https://docs.endor.ai/docs/scan-profiles/) with correct toolchain version.
{If Private Registry fix:} Configure [Private Package Registry](https://docs.endor.ai/docs/integrations/private-package-registries), or set credentials in CI.
{If not fixable in cloud:} Move scanning to CI/CD pipeline.
### Next Steps
- `/endor-scan` - Re-run after fix
- `/endor-setup` - Reconfigure if needed
Step 5: Handle Multiple Errors
- Identify all distinct errors
- Diagnose each separately
- Present in priority order: Private Registry > Toolchain > Other
- Note if fixing one may resolve others
Common Resolution Patterns
Auth Conflict: Check if ~/.endorctl/config.yaml exists AND settings.json/mcp.json contains auth env vars. If both present, user must choose one workflow:
- Local Development: keep
config.yaml, remove ENDOR_MCP_SERVER_AUTH_MODE/ENDOR_NAMESPACE/ENDOR_API from settings.json env block
- Multi-Namespace: delete
~/.endorctl/config.yaml (or rm -rf ~/.endorctl), keep env vars in settings.json
Then restart MCP connection and retry. See /endor-setup Step 2.2 for full workflow details.
Private Registry: Check if package is private -> configure Private Package Registry or set CI credentials -> verify registry is internet-accessible from cloud.
Toolchain: Identify required version from error -> update Scan Profile -> re-scan.
Cloud Scanning Limitations (move to CI): SSH Git deps, system package installation (python3-dev, PostgreSQL libs), Windows builds, custom env vars, Docker builds.
For data source policy, read references/data-sources.md.
Error Handling
| Condition |
Action |
| No pattern match |
Suggest docs.endorlabs.com, fresh /endor-scan, or Endor Labs support |
| Multiple ecosystems |
Ask user to clarify which to troubleshoot first |
| Auth error from MCP |
Suggest /endor-setup |
| Scan tool unavailable |
Analyze pasted error text only |
1---2name: endor-troubleshoot3description: Troubleshoot Endor Labs scan errors and failures. Use when the user says "scan failed", "why did the scan fail", "endor troubleshoot", "fix scan error", "diagnose error", or pastes an error message from a failed scan. Matches errors against known patterns across NPM, Maven, PyPI, Go, Cargo, NuGet, RubyGems, and Packagist. Do NOT use for setup issues (/endor-setup) or general scanning (/endor-scan).4---56# Endor Labs Scan Error Troubleshooter78## Input Parsing910Accept input as: pasted error text, scan-and-diagnose request, or natural language description.1112If no error text provided, ask:13> 1. **Run a scan** on the current repository and diagnose errors?14> 2. **Analyze error text** you paste in?1516For scan mode, use `scan` MCP tool: `path`=repo path, `scan_types`=`["vulnerabilities", "dependencies"]`, `scan_options`=`{ "quick_scan": true }`. Parse results for errors and match against knowledge base.1718## Workflow1920### Step 1: Detect Ecosystem2122| Indicator | Ecosystem |23|-----------|-----------|24| `npm ERR!`, `yarn`, `pnpm`, `package.json`, `node_modules` | NPM |25| `pom.xml`, `mvn`, `gradle`, `Maven`, `Gradle`, `artifact`, `.jar`, `groupId` | Maven/Gradle |26| `pip`, `poetry`, `pypi`, `setup.py`, `pyproject.toml`, `requirements.txt` | PyPI |27| `go:`, `go.mod`, `go.sum`, `GOPATH`, `GOPROXY` | Go |28| `cargo`, `Cargo.toml`, `Cargo.lock`, `crate`, `rustc` | Cargo |29| `dotnet`, `nuget`, `.csproj`, `.sln`, `NuGet`, `TargetFramework` | NuGet |30| `gem`, `bundle`, `Gemfile`, `bundler`, `.gemspec` | RubyGems |31| `composer`, `packagist`, `composer.json`, `composer.lock` | Packagist |3233No match? Check cross-ecosystem patterns (GitHub Packages, registry/artifactory, sandbox errors).3435### Step 2: Classify Error Category3637**Auth Conflict** -- persistent auth error loop, "multiple authentication", "conflicting auth", "invalid permissions" or repeated auth failures despite valid credentials. Root cause: both `~/.endorctl/config.yaml` AND auth env vars (`ENDOR_MCP_SERVER_AUTH_MODE`, `ENDOR_NAMESPACE`, `ENDOR_API`) in `settings.json`/`mcp.json` are present simultaneously.3839**Private Registry** -- package not found, auth failures (401/403), SSH/Git credential errors, connection refused/timeout, missing registry config.4041**Toolchain** -- language/SDK version mismatches, missing SDKs/build tools, lock file format issues, compiler/build config errors.4243**Other** -- invalid manifests, compilation errors, missing build deps, plugin failures.4445### Step 3: Match Against Known Patterns4647Read `references/error-knowledge-base.md` and match the error text against patterns for the detected ecosystem and category.4849### Step 4: Present Diagnosis5051```markdown52## Scan Error Diagnosis5354### Error Identified5556| Field | Value |57|-------|-------|58| Ecosystem | {ecosystem} |59| Category | {Private Registry / Toolchain / Other} |60| Error | {description} |61| Fixable | {Yes / No / Partially} |6263### What This Means64{Plain-language explanation}6566### Resolution67{Step-by-step remediation from matching rule}6869{If Scan Profile fix:} Update [Scan Profile](https://docs.endor.ai/docs/scan-profiles/) with correct toolchain version.70{If Private Registry fix:} Configure [Private Package Registry](https://docs.endor.ai/docs/integrations/private-package-registries), or set credentials in CI.71{If not fixable in cloud:} Move scanning to CI/CD pipeline.7273### Next Steps74- `/endor-scan` - Re-run after fix75- `/endor-setup` - Reconfigure if needed76```7778### Step 5: Handle Multiple Errors79801. Identify all distinct errors812. Diagnose each separately823. Present in priority order: Private Registry > Toolchain > Other834. Note if fixing one may resolve others8485## Common Resolution Patterns8687**Auth Conflict**: Check if `~/.endorctl/config.yaml` exists AND `settings.json`/`mcp.json` contains auth env vars. If both present, user must choose one workflow:88- **Local Development**: keep `config.yaml`, remove `ENDOR_MCP_SERVER_AUTH_MODE`/`ENDOR_NAMESPACE`/`ENDOR_API` from settings.json env block89- **Multi-Namespace**: delete `~/.endorctl/config.yaml` (or `rm -rf ~/.endorctl`), keep env vars in settings.json90Then restart MCP connection and retry. See `/endor-setup` Step 2.2 for full workflow details.9192**Private Registry**: Check if package is private -> configure [Private Package Registry](https://docs.endor.ai/docs/integrations/private-package-registries) or set CI credentials -> verify registry is internet-accessible from cloud.9394**Toolchain**: Identify required version from error -> update [Scan Profile](https://docs.endor.ai/docs/scan-profiles/) -> re-scan.9596**Cloud Scanning Limitations** (move to CI): SSH Git deps, system package installation (python3-dev, PostgreSQL libs), Windows builds, custom env vars, Docker builds.9798For data source policy, read references/data-sources.md.99100## Error Handling101102| Condition | Action |103|-----------|--------|104| No pattern match | Suggest [docs.endorlabs.com](https://docs.endorlabs.com), fresh `/endor-scan`, or Endor Labs support |105| Multiple ecosystems | Ask user to clarify which to troubleshoot first |106| Auth error from MCP | Suggest `/endor-setup` |107| Scan tool unavailable | Analyze pasted error text only |