Skip to content

docs-platform: no committed lockfile, so Dependabot cannot apply npm security updates #214

Closed

Description

@scttfrdmn

Three open Dependabot alerts against vite in docs-platform/package.json (one high, two medium) cannot be fixed automatically, and the security-update job fails every time it runs.

Evidence

Dependabot run 30760432471, 2026-08-02, verbatim:

updater | INFO <job_1500600656> Checking if vite  needs updating
updater | INFO <job_1500600656> Latest version is 8.2.0
updater | INFO <job_1500600656> Dependabot cannot update vulnerable dependencies for projects
          without a lockfile or pinned version requirement as the currently installed version
          of vite is not known.
| Type                          | Details                     |
| dependency_file_not_supported | { "dependency-name": "vite" }|

The job exits 1, so the alert stays open and the run shows as a failure.

Cause

docs-platform/ has package.json but no package-lock.json:

$ ls docs-platform/
docker-compose.yml  Dockerfile  guide  index.md  package.json  playground  README.md  src

package.json declares ranges ("vite": "^5.0.10"), not exact versions. For a security update
Dependabot has to know the installed version to decide whether it is vulnerable and what the
minimal safe bump is; a range alone does not tell it. Version updates to the range do work — only
security updates are blocked.

sdks/javascript/ has the same shape. ci.yml:291 documents the choice there:

No lockfile is committed, so npm install rather than npm ci.

So CI resolves fresh versions on every run in that directory, which is a reproducibility gap of its
own: a green PR does not mean the same tree will be green tomorrow.

Fix

Commit package-lock.json for docs-platform/ and sdks/javascript/, then switch ci.yml:294
from npm install --no-audit --no-fund to npm ci. That closes the three alerts, makes the
JavaScript SDK job reproducible, and lets npm audit mean something.

Worth deciding first whether docs-platform/ is still live — no workflow builds or deploys it
(grep -rl docs-platform .github/workflows/ returns nothing), so it may be a candidate for
deletion instead, which would close the alerts by removing the manifest. That is the cheaper answer
if the platform is abandoned.

Context

Found while fixing Dependabot coverage. .github/dependabot.yml now declares the npm ecosystem
for both directories, and the comment there points at this issue for the lockfile limitation.

Activity

  1. added this to the Future Work milestone on Aug 2, 2026
  2. added
    type: technical-debt
    type: security
    priority: medium
    area: ci-cd
    on Aug 2, 2026
  3. scttfrdmn commented on Aug 2, 2026

    @scttfrdmn
    OwnerAuthor

    The tree cannot build, and that is now proven by execution rather than inferred

    The issue asks whether docs-platform/ is still live before deciding between committing a lockfile
    and deleting the directory. It is not live in a stronger sense than "no workflow builds it": the
    site cannot be built at all
    , and has four independent failures stacked such that fixing each one
    reveals the next. I reproduced them by building a copy of the tree at /tmp/vpprobe with
    npm install and running the vitepress build, patching each failure to reach the following one.

    In order:

    1. The config is CommonJS and vitepress is ESM-only.

    failed to load config from /tmp/vpprobe/.vitepress/config.js
    Error: ... vitepress resolved to an ESM file. ESM file cannot be loaded by `require`
    

    .vitepress/config.js uses module.exports. Renaming to config.mjs is not sufficient on its own
    because of (2). Note the rename must be a rename — copying the file to config.mjs and leaving
    config.js in place still resolves config.js first and reports the identical error, which is worth
    recording because it is the obvious first attempt.

    2. The config calls require() at module scope.

    Dynamic require of "markdown-it-container" is not supported
    

    config.js:143-145 calls require('markdown-it-container') three times inside the markdown config
    hook. Under ESM these have to become static imports, and markdown-it-container is not in
    package.json either.

    3. Three theme components are imported and do not exist on disk.

    .vitepress/theme/index.js imports InteractiveExample.vue, PerformanceChart.vue, and
    ConfigurationBuilder.vue. None of the three files exists anywhere in the repository. Every page
    that uses those components — including playground/index.md, which uses <ApiPlayground />,
    <ConfigurationBuilder />, <CodeRunner>, and <InteractiveExample> — renders nothing.

    4. With the components stubbed out, the build fails on dead links.

    [vitepress] 7 dead link(s) found
    

    Why this changes the decision

    The issue frames the choice as lockfile vs. delete, with delete as "the cheaper answer if the
    platform is abandoned." The evidence settles the premise: this is not a working site with a
    dependency-hygiene problem, it is a site that has never built in this state. Committing a lockfile
    would close three vite alerts on a tree that produces no output, and the npm ci switch in
    ci.yml would then be pinning dependencies for a build nobody can run.

    Repairing it is not a small job either: an ESM config migration, a missing dependency, three Vue
    components to write from scratch, and seven dead links — before any of the content problems below.

    Content state, for whoever makes the call

    Two of these pages were partially corrected under #182 (commit efa8bb8), and the limits of that
    work are relevant here. Between them, guide/getting-started.md and playground/index.md opened
    with curl -sSL https://get.objectfs.io | sh — a domain that has never served anything — and went
    on to use objectfs mount, objectfs unmount, objectfs list-mounts, objectfs status,
    objectfs health, and objectfs metrics --watch. The binary has no subcommands; it takes two
    positional arguments. Also documented and non-existent: an apt repository at
    packages.objectfs.io, a Homebrew tap, an AUR package, "Windows with WSL2" as a supported
    prerequisite, and the --enable-predictive-caching and --cost-optimization flags.

    The shell commands were corrected because a markdown page is read on GitHub whether or not the site
    renders, and a wrong curl | sh is something a reader will type. The SDK code blocks were
    deliberately left alone
    , with the reason stated in-page: the Go example imports
    github.com/scttfrdmn/objectfs/pkg/client, which does not exist, and marking up each divergence
    individually is noise when the containing page cannot render and this issue owns the keep/delete
    decision. guide/index.md:28 still claims "POSIX compliance ensures compatibility with existing
    tools" — the last such claim in the repository — and links community.objectfs.io and
    docs.objectfs.io, neither of which resolves. Those are left for whichever way this goes.

    Related: mkdocs.yml:2 sets site_url: https://objectfs.io, which is a parked registrar page. There
    is no Pages site and no deploy workflow for either documentation tree.

    Recommendation

    Delete docs-platform/. It closes the three vite alerts by removing the manifest, removes a
    documentation tree that has never rendered and whose content describes a different CLI than the one
    that ships, and leaves docs/ — which is in the mkdocs nav, does build, and is being corrected under
    #182 and #208 — as the single documentation surface.

    If it is kept instead, the ordering matters: the four build failures have to be fixed before the
    lockfile, because npm ci against a build that cannot run pins dependencies for nothing.

    No files in docs-platform/ were left modified by the probe; package-lock.json and node_modules/
    from the npm install were removed, since committing a lockfile is this issue's decision and not a
    side effect of an investigation.

  4. added
    effort: xs
    on Aug 3, 2026
  5. scttfrdmn commented on Aug 3, 2026

    @scttfrdmn
    OwnerAuthor

    Raising this to priority: high and moving it out of Future Work, because closing the three vite alerts turned up a second consequence that is worse than the one this issue was filed for.

    The known half: without a lockfile Dependabot refuses security updates outright — "can't update vulnerable dependencies for projects without a lockfile or pinned version requirement as the currently installed version of vite isn't known."

    The half that wasn't known: the dependency graph only contains the manifest's ranges, so an alert can close while the vulnerable code is still installed.

    $ gh api repos/scttfrdmn/objectfs/dependency-graph/sbom \
        --jq '[.sbom.packages[]|select(.name|test("vite|vitepress"))]'
    [{"name":"vite","versionInfo":"^5.0.10"},{"name":"vitepress","versionInfo":"^1.0.0"}]
    

    That is the whole picture GitHub has of this directory. It is two declared ranges, not a resolved tree.

    Why that matters concretely, from #318: [email protected] depends on vite: ^5.4.14 as a regular dependency rather than a peer, so npm nests its own copy. A real install of docs-platform with "vite": "^6.4.3" declared produces [email protected] at the top level and vitepress/node_modules/[email protected] underneath — and the nested copy is the one that builds the docs. npm audit on that tree still reported high vite <=6.4.2.

    But alerts 1–3 were opened against the declared ^5.0.10, and GitHub cannot see the nested copy at all. So bumping the range to ^6.4.3 would have closed all three alerts and left the vulnerable code on disk and executing. A clean alert page and a dirty node_modules, with nothing anywhere reporting the difference.

    #318 works around it with an overrides block, which does force the transitive copy up, and is verified by running npm audit locally rather than by watching the alerts close. That workaround is fine as far as it goes, but note what it costs: the evidence for a security fix in this directory currently has to be produced by hand, on a developer's machine, because neither GitHub nor CI can see the tree that matters. A committed lockfile is what makes the alert page mean something.

    Two other things in the same directory that a lockfile alone won't fix but that bear on how this gets done:

    • docs-platform is not installed by any CI job, so npm audit never runs there. A lockfile plus an npm audit --audit-level=high step is the pair that closes the gap; a lockfile alone just makes Dependabot able to act.
    • The docs platform does not build at all (The documentation platform has never built: four stacked failures and nothing in CI runs the build #317, four independent stacked failures). So a lockfile generated today records the resolution of a tree that has never successfully produced output. Worth doing anyway — the security properties don't depend on the build working — but they should probably land together, since whoever fixes the build will change the resolution.

    effort: xs was right for npm i --package-lock-only && git add package-lock.json. It is still roughly right; the estimate isn't what's changing, the priority is.

  6. added
    priority: high
    on Aug 3, 2026
  7. removed
    priority: medium
    on Aug 3, 2026
  8. scttfrdmn commented on Aug 4, 2026

    @scttfrdmn
    OwnerAuthor

    Status update, since two things have changed that affect this issue directly.

    The build half is fixed. #334 makes vitepress build succeed for the first time and adds a docs-site CI job so a regression is caught rather than accumulating silently. Three independent failures had piled up behind that silence, each only visible after the previous was fixed — missing component imports, a nested equal-length markdown fence closing its own parent block, and a [LICENSE](../LICENSE) dead link leaving the site root. That is the "why it went unnoticed" part of this issue answered: no job ever ran the builder.

    The dependency surface is smaller now. #334 also removes markdown-it, markdown-it-anchor and markdown-it-container (see #299 for the measurement — VitePress bundles its own markdown-it, and the markdown.config hook that appeared to justify the top-level copy was extending the bundled instance, not the declared one). So a lockfile committed now records three fewer trees than one committed last week would have, which is a small argument for doing it after #334 lands rather than before.

    Still open here: committing docs-platform/package-lock.json and switching the docs-site job from npm install --no-audit --no-fund to npm ci. Until then this directory's npm security alerts cannot apply — an alert with no lockfile tracks the manifest range, not the nested copy actually installed, which is how one of them closed without a fix.

    A valid lockfile does now generate cleanly from a fresh node_modules on the #334 tree (npm install exit 0, then npx vitepress build . → build complete in 1.45s, 6 pages, byte-identical output), so there is nothing blocking the commit beyond deciding to make it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: ci-cdeffort: xspriority: hightype: securitytype: technical-debt

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions