Skip to content

sdks/javascript: no committed lockfile, so nothing scans or reproduces its dependency tree #201

Closed

Description

@scttfrdmn

sdks/javascript/ has a package.json and no committed lockfile — no package-lock.json, no yarn.lock, no pnpm-lock.yaml.

So every install resolves the dependency tree afresh against whatever satisfies the semver ranges that day. Two consequences, and the second is the reason this is filed as security rather than hygiene:

  1. Builds are not reproducible. A bug reported against the JS SDK cannot be tied to a dependency set, because there is no record of one.
  2. There is nothing for a supply-chain audit to read. npm audit, Dependabot, and every SBOM tool key off the lockfile. This repo runs govulncheck against Go and Trivy against the filesystem; the JS SDK's dependencies are scanned by nothing.

Do:

  • Commit a lockfile, generated by whichever package manager the SDK is meant to use. Pick one and say so in the SDK README — the absence of a lockfile is also an absence of that decision.
  • Add the SDK to the security workflow so its dependencies are scanned alongside the Go module.
  • Check the same question for sdks/python (whether it pins, and how) while here — the answer may differ but the reasoning does not.

Verification: a clean-clone npm ci (which requires a lockfile and fails without one) succeeds in CI. That is the check that cannot be satisfied by accident.

Activity

  1. added
    type: security
    priority: medium
    dependencies
    area: sdk
    effort: xs
    on Aug 2, 2026
  2. scttfrdmn commented on Aug 4, 2026

    @scttfrdmn
    OwnerAuthor

    All three asks are answered. Two are done; the third turned out to be a different problem and is now #343.

    1. Commit a lockfile, and say which package manager. Done. sdks/javascript/package-lock.json is tracked, lockfileVersion: 3, 410 packages. That answers the manager question by construction — a v3 lockfile is npm 7+, and the README's install instructions are npm throughout.

    2. Add the SDK to the security workflow. Satisfied, and worth recording how, because it is not by an edit to security.yml. The lockfile was the whole of it. trivy fs detects npm from package-lock.json, so committing the file put this SDK inside a scan that already ran over the whole tree. Verified rather than inferred:

    $ trivy fs --scanners vuln .
    docs-platform/package-lock.json    npm    vulns=0
    go.mod                             gomod  vulns=0
    sdks/java/pom.xml                  pom    vulns=0
    sdks/javascript/package-lock.json  npm    vulns=0
    

    That is this issue's own second sentence coming true: "npm audit, Dependabot, and every SBOM tool key off the lockfile." The lockfile was not one of three fixes, it was the precondition for two of them. Dependabot also has an npm entry for /sdks/javascript and has been opening PRs against it.

    3. Check the same question for sdks/python. Checked, and the answer is no — filed as #343 rather than resolved here, because the reasoning transfers but the fix does not. setup.py declares 16 dependencies as unbounded floors with no lockfile and no pyproject.toml, and the scan above shows why that is the more serious half: Trivy detects Python from requirements.txt / poetry.lock / Pipfile.lock / pyproject.toml, and a bare setup.py is on none of those lists. So sdks/python is absent from that output entirely, and .github/dependabot.yml has no pip ecosystem either. This SDK is scanned by nothing, which is exactly this issue's complaint, in the one place closing this issue does not reach. #343 also notes asyncio>=3.4.3 in install_requires — a stdlib module whose PyPI package is a 2015 Python 3.3 backport.

    Verification, as this issue specified it: "a clean-clone npm ci … succeeds in CI." ci.yml:308, in the sdk-metrics job. And npm ci is the install for docs-platform too as of #337 — same defect, same fix, different directory (#214).

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: sdkdependencieseffort: xspriority: mediumtype: security

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions