Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM cgr.dev/chainguard/python:latest-dev AS builder

WORKDIR /app
COPY pyproject.toml README.md ./
COPY src/ src/
RUN python -m venv .venv
RUN .venv/bin/pip install --no-cache-dir .

FROM cgr.dev/chainguard/python:latest

COPY --from=builder /app/.venv /app/.venv

ENV PATH="/app/.venv/bin:$PATH"
WORKDIR /scan

ENTRYPOINT ["skillspector"]
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: help install install-dev langgraph-dev test test-unit test-integration test-cov test-ci lint lint-fix format format-check clean build
.PHONY: help install install-dev langgraph-dev test test-unit test-integration test-cov test-ci lint lint-fix format format-check clean build docker-build

# Prefer uv if available, else use pip (set when Makefile is parsed)
UV := $(shell command -v uv 2>/dev/null)
Expand All @@ -24,6 +24,7 @@ help:
@echo " make format-check - Check code formatting with ruff"
@echo " make clean - Remove build artifacts and cache files"
@echo " make build - Build the package"
@echo " make docker-build - Build the Docker image"

install:
@if [ -n "$(UV)" ]; then uv sync; else pip install -e .; fi
Expand Down Expand Up @@ -94,3 +95,8 @@ clean:
build: clean
python -m build

# Build the Docker image
docker-build:
docker build -t skillspector .


36 changes: 35 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,40 @@ make install
make install-dev
```

### Docker (no Python required)

Run SkillSpector without installing Python by pulling the pre-built image or building it locally from the included [Dockerfile](Dockerfile). The image is based on [Chainguard's minimal Python image](https://images.chainguard.dev/directory/image/python/versions), which has a near-zero CVE footprint.

**Build the image:**

```bash
docker build -t skillspector .
```

**Scan a local directory** (mount it into `/scan`, which is the container's working directory):

```bash
docker run --rm -v "$(pwd)/my-skill:/scan/my-skill" skillspector scan ./my-skill/
```

**Scan with LLM analysis** (pass credentials as environment variables):

```bash
docker run --rm \
-v "$(pwd)/my-skill:/scan/my-skill" \
-e SKILLSPECTOR_PROVIDER=anthropic \
-e ANTHROPIC_API_KEY=sk-ant-... \
skillspector scan ./my-skill/
```

**Write a report to the host filesystem:**

```bash
docker run --rm \
-v "$(pwd):/scan" \
skillspector scan ./my-skill/ --format json --output report.json
```

### Basic Usage

```bash
Expand Down Expand Up @@ -88,7 +122,7 @@ local OpenAI-compatible servers (Ollama, vLLM, llama.cpp) and managed
inference gateways.

| Provider (`SKILLSPECTOR_PROVIDER`) | Credential env var | Endpoint | Default model |
|----------|----|----|----|
| ---------- | ---- | ---- | ---- |
| `openai` | `OPENAI_API_KEY` (+ optional `OPENAI_BASE_URL`) | api.openai.com (or any OpenAI-compatible URL) | `gpt-5.4` |
| `anthropic` | `ANTHROPIC_API_KEY` | api.anthropic.com | `claude-opus-4-6` |
| `nv_build` | `NVIDIA_INFERENCE_KEY` | build.nvidia.com | `deepseek-ai/deepseek-v4-flash` |
Expand Down