Skip to content

PR-02 — Restore deterministic production dependency auditing #115

Open

Description

@Alajmah

Parent: #112

Blocks: #114

Operator outcome

Repository changes that do not modify dependencies can complete the required CI
gate without being blocked by nondeterministic or unidentifiable npm audit
metadata.

The production dependency audit must continue to fail closed for genuine,
unexcepted high or critical findings.

Evidence

PR #114:

  • Base:
    b89eb8a497a2c86e66d4f08c98e0c97f5d05f1ff
  • Head:
    8e9300f4948dfab0d81cf7b9d8d9d97ce5d8da9e
  • CI workflow run:
    31055340009

The original run and a failed-jobs rerun produced the same result:

production-audit: blocking finding for 'minimatch' (severity=high)
has no advisory url — cannot assign a stable identity for exception matching

All other CI jobs passed, including:

  • syntax and source-of-truth checks;
  • web unit tests;
  • core, rules, runtime, dashboard, executor, and integration tests;
  • application, dashboard, executor, and validator image builds;
  • release-tooling validation;
  • DCO;
  • CodeQL.

PR #114 changes only:

  • README.md;
  • packages/web/docker/docker-compose.yml;
  • packages/web/tests/unit/quick-start-contract.test.js.

It does not change dependencies, the lockfile, the audit evaluator, or the
exception registry.

Classification

P1 release-pipeline blocker

The failure prevents an otherwise scope-clean product-readiness change from
passing required CI. The underlying security finding remains unclassified
until its dependency path and advisory identity are established.

This classification must not be interpreted as dismissing or excepting the
reported high-severity finding.

Investigation scope

Establish, with retained evidence:

  1. The exact npm, Node.js, registry, and audit-report versions involved.

  2. The raw npm audit --omit=dev --json record for minimatch.

  3. The complete production dependency path or paths that introduce the
    finding.

  4. Whether the entry is:

    • a direct advisory object;
    • a meta-vulnerability containing only string via references;
    • incomplete registry metadata;
    • an npm audit schema/behavior change;
    • or a genuine unsupported audit-report shape.
  5. Whether the same result reproduces from the frozen master base with the
    same clean install and tool versions.

  6. The correct stable security identity, when one exists.

  7. Whether the affected production dependency can be safely upgraded or
    removed.

Permitted remediation categories for proposal

The investigation may propose one of these outcomes, but implementation is not
authorized by creating this issue:

  • upgrade or remove the affected production dependency;
  • correctly traverse meta-vulnerability references to an underlying advisory;
  • support a verified newer npm audit schema without weakening fail-closed
    behavior;
  • distinguish a registry or npm operational-metadata failure from a confirmed
    vulnerability finding while retaining a blocking result;
  • add a narrowly scoped, expiring exception only when an exact advisory,
    package, range, owner, justification, and tracking issue are available.

Required security properties

Any proposed remediation must preserve all of the following:

  • high and critical production findings remain blocking unless exactly covered
    by an active governed exception;
  • unknown audit schemas fail closed;
  • unidentifiable security findings are not silently ignored;
  • exceptions remain exact, reviewable, owned, time-bounded, and non-stale;
  • no wildcard advisory, package, or version-range matching;
  • evaluator positive and negative tests cover the corrected behavior;
  • the raw audit evidence used for the fix is retained or reproducible.

Explicit exclusions

Acceptance evidence

  1. The failure is reproduced or disproved on the frozen master baseline using
    recorded tool versions.
  2. The exact dependency path and audit-report shape are documented.
  3. The remediation addresses the actual cause rather than matching the error
    string.
  4. Evaluator unit and negative tests pass.
  5. npm audit --omit=dev evaluation behaves deterministically for the retained
    fixture.
  6. A clean CI run passes production-dependency-audit.
  7. All other CI, DCO, CodeQL, source-of-truth, and secret-scanning gates remain
    green.
  8. PR fix(product-readiness): make local quick start reproducible #114 remains free of unrelated dependency-audit changes.

Authorization boundary

Creating this issue authorizes tracking and evidence collection only.

It does not authorize:

Activity

  1. added
    enhancement
    on Aug 6, 2026
  2. gitwire-hq commented on Sep 5, 2026

    @gitwire-hq
    Contributor

    ⏰ GitWire Stale Warning

    This issue has had no activity for 30 days.
    It will be automatically closed in 30 days if no further activity occurs.

    To keep it open, leave a comment or push an update.

  3. Alajmah commented on Nov 22, 2026

    @Alajmah
    ContributorAuthor

    Coverage gap: the production dependency audit does not cover the validator image

    Recorded per the maintainer's review of 2026-11-22 (issue #425). No code change; closing the gap needs its own authorization.

    The gap

    The production-dependency-audit job runs npm audit --omit=dev on the root tree and fails on unexcepted high or critical findings. It assumes that production images omit development dependencies. The validator image does not:

    • validator-image/Dockerfile copies the root package.json and package-lock.json and runs npm ci --include=dev — on purpose, because lint and test need the tooling.
    • So a critical finding in the development tree can sit inside a pinned production image while this gate stays green.

    That is the current state. handlebars 4.7.9 (Dependabot #85, #86, both critical) is in the root lockfile's development tree. The pinned validator image, sha256:e2c10a61…, most likely carries it: the image was created 2026-06-25, and the 27 commits that changed the lockfile from 2026-05-31 to 2026-07-19 all lock the same versions. This is an inference from the Dockerfile and the lockfile history; the image was not inspected directly.

    This is a limit of the gate's coverage model, not of its thresholds. A green run of npm audit --omit=dev does not show that the validator image is free of packages classified as development.

    What would close it — options, none authorized

    Option What it does Cost
    Audit the tree the validator image actually installs A second audit pass on the root lockfile without --omit=dev, with its own exception registry More findings to fix or except; the whole development tree becomes release-blocking
    Build the validator image from a minimal manifest The image installs only what lint and test need A real change to how the validator is built, a rebuild, and a new pinned digest
    Keep the gate and document the residual No change The gap stays open, by decision

    Related

  4. Alajmah commented on Nov 22, 2026

    @Alajmah
    ContributorAuthor

    Second instance of the coverage gap: the dashboard image is not built from the lockfile

    Recorded 2026-11-22, read-only. The trigger was the maintainer's review of #494, which found that docs/Dockerfile installs before the lockfile is copied. Checking the other image builds found the same pattern in the dashboard, where it matters more. No code change; every fix below needs its own authorization.

    The finding

    Image How its dependencies are installed Lockfile used?
    app (Dockerfile) copies package.json and package-lock.json, then npm ci --omit=dev --ignore-scripts (lines 9–16) yes
    validator (validator-image/Dockerfile) copies both, then npm ci --include=dev (lines 37–44) yes — but the whole development tree, see the comment above
    executor-service no dependencies not applicable
    dashboard (packages/web-dashboard/Dockerfile) copies package.json alone, then npm install (lines 4–5) no
    docs (docs/Dockerfile) copies package.json alone, then npm install (lines 4–5); the lockfile arrives only with COPY . ./ on line 6 no
    • The release dashboard image is built from the packages/web-dashboard directory alone (publish-release-images: docker build … packages/web-dashboard). That directory has no lockfile; the repository's is at the root, outside the build context.
    • So the dashboard image gets whatever npm install resolves on build day. Six of its nine direct dependencies are declared as ranges, and every transitive dependency is resolved the same way.
    • The same install-before-lock text is in packages/bot/Dockerfile, packages/demo-dashboard/Dockerfile and plugin-sandbox/Dockerfile. Their build contexts and lockfiles were not checked.

    Evidence from the running dashboard container

    Read from the production dashboard container at release f56b86f (image 55517710b576), read-only. The standalone Next.js output keeps only a few package manifests, so the sample is small: 16 package versions.

    Result Count
    version exists in the root lockfile for that package 13
    version exists nowhere in the root lockfile for that package 3
    Package in the image In the image The root lockfile holds only
    @next/env 16.4.6 15.5.24, 16.3.3
    semver 6.3.2 6.3.1, 7.8.5
    semver (nested under sharp) 7.8.6 6.3.1, 7.8.5

    Three of sixteen versions in the image do not exist in the lockfile. The image was not built from it.

    The lockfile does not describe the dashboard's Next.js package

    A lock-pinned dashboard build is not a matter of copying the lockfile into the context. The root lockfile's entry for the dashboard's next is stale:

    Field in packages/web-dashboard/node_modules/next Value in the root lockfile What the published next@16.4.6 declares
    version 16.4.6 —
    @next/env 16.3.3 16.4.6, exact
    @next/swc-* (eight platform packages) 16.3.3 16.4.6, exact

    An npm ci from this lockfile would pair next 16.4.6 with @next/env 16.3.3. The running image has the consistent pair, 16.4.6 with 16.4.6, only because its build ignores the lockfile.

    What this means

    1. For this issue. The production dependency audit runs npm audit --omit=dev on the root lockfile, and Dependabot reads the same file. Neither describes the dashboard image. The gap recorded in the comment above for the validator image — audit green, image different — has a second instance here.
    2. For chore(deps): docs lockfile — @vue/* 3.5.46, postcss 8.5.33, source-map-js 1.2.4 (Dependabot #76, #77, #41) #493. Its lockfile update changes what CI and the new docs-build job install. The docs image ignores it until docs/Dockerfile is changed.
    3. For any Dockerfile fix. The docs fix is small: copy both manifests, then npm ci, and build the image once to prove it. The dashboard fix is larger, because the lockfile's dashboard subtree must be regenerated first.

    Status

    Item State
    docs/Dockerfile fix authorized to be recorded as an independent, limited follow-up (maintainer's review of #494)
    packages/web-dashboard/Dockerfile fix and the lockfile regeneration it needs not authorized; needs a decision
    Rebuilding or publishing either production image HOLD
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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions