Skip to content

Add dependabot config + use npm ci in container build#345

Open
woltspace-jerpint[bot] wants to merge 2 commits into
mainfrom
uxw/dependabot
Open

Add dependabot config + use npm ci in container build#345
woltspace-jerpint[bot] wants to merge 2 commits into
mainfrom
uxw/dependabot

Conversation

@woltspace-jerpint
Copy link
Copy Markdown
Contributor

Summary

  • Adds .github/dependabot.yml covering npm, pip, docker, and github-actions
  • Switches the container build from npm install to npm ci so dependabot's lockfile updates aren't silently overridden at build time

Why these together

Dependabot reviews changes against the lockfile. The current Dockerfile runs npm install && npm install ws node-pty, which (a) can mutate package-lock.json mid-build and (b) the trailing npm install ws node-pty explicitly bypasses the lockfile to fetch latest. Net result: dependabot would approve a pinned version, but production would still get whatever npm resolved at build time. npm ci fixes that — strict lockfile install, no mutation.

This also means future security PRs from dependabot land in package-lock.json and actually ship.

Coverage

Ecosystem Directory What it watches
npm / package.json + package-lock.json (ws, node-pty)
pip /server server/pyproject.toml (FastAPI, uvicorn, jinja2, etc.)
pip /container/bot bot deps (litellm, telegram, slack, pyjwt)
pip / root meta pyproject (superset of the above)
docker /container base image bumps for node:22-slim
github-actions / when workflows land

Weekly cadence, max 5 PRs per ecosystem. Vulnerability alerts fire instantly regardless (those are surfaced via the Security tab, separate from version-bump PRs).

What this does NOT cover

Dependabot only sees manifest-level deps. It can't see:

  • apt packages installed in the Dockerfile (curl, git, gosu, ...)
  • curl|bash installers (uv, bun, cloudflared, claude code cli)
  • the worktui git clone

That layer needs an image scanner (trivy/grype) — separate PR proposed but not included here.

Test plan

  • After merge, dependabot detects all 6 ecosystems on the next scan (visible at github.com/jerpint/woltspace/network/updates)
  • First version-bump PR opens within ~24h (or sooner if anything has a known vuln)
  • Container rebuild succeeds with npm cidocker build -f container/Dockerfile container/ completes
  • No drift in package-lock.json after rebuild (git diff clean)

Two coupled changes so dependabot's PRs actually take effect.

dependabot.yml covers:
- npm (root package.json: ws, node-pty)
- pip (server/, container/bot/, root pyproject — all PEP 621)
- docker (container/Dockerfile — base image bumps)
- github-actions (future-proof for when workflows land)

Weekly cadence per ecosystem, 5 PRs/week cap. Vuln alerts fire instantly regardless of cadence (those are GitHub's Security tab).

Dockerfile: `npm install && npm install ws node-pty` → `npm ci`. The old line had two issues:
1. `npm install` mutates the lockfile and can resolve newer versions than what's pinned, defeating the point of dependabot reviewing PRs.
2. The trailing `npm install ws node-pty` was redundant — both are in package.json — and explicitly bypassed the lockfile to fetch latest.

Verified package-lock.json contains ws + node-pty so `npm ci` produces the same install.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented May 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
woltspace Ready Ready Preview, Comment May 3, 2026 0:36am

server/ and container/bot/ are the source of truth for runtime deps (each has its own uv.lock and is what the Dockerfile actually installs). The root pyproject is only used by the test runner — its runtime dependencies array is a hand-maintained duplicate of the per-service pyprojects, and scanning it would produce duplicate alerts.

Inline comment in dependabot.yml documents the reason so this doesn't get re-added by accident.

Follow-up: slim the root pyproject so its only declared deps are the test extras (pytest + pytest-asyncio). Tracked separately.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants