Skip to content

ci: unit tests on main with Node 24; declare and prune dependencies - #196

Draft
pritesh-jain-cstk wants to merge 4 commits into
test/MKT-22130-content-type-sidebarfrom
chore/MKT-22131-ci-and-deps
Draft

pritesh-jain-cstk wants to merge 4 commits into
test/MKT-22130-content-type-sidebarfrom
chore/MKT-22131-ci-and-deps

Conversation

@pritesh-jain-cstk

@pritesh-jain-cstk pritesh-jain-cstk commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Branch graph

Epic MKT-21672. This PR is highlighted. Only [Routine] depends on [Tests]; the rest are independent.

graph LR
  main --> bug["Bug: host-only listeners MKT-22128"]
  main --> hyg["Security: Dependabot MKT-22129"]
  main --> s191["Snyk axios: existing #191"]
  main --> tests["[Tests] MKT-22130"]
  tests --> ci["[Routine] MKT-22131"]
  main --> docs["[Docs] MKT-22132"]
  style routine fill:#f9d71c,stroke:#333,stroke-width:2px
Loading

What

Jira: MKT-22131

Depends on #195 (base branch; CI runs its tests).

Consumer impact: dist/src/**/*.d.ts has no diff. dist/index.js differs only in the embedded copy of package.json (used for SDK_VERSION). Installing the package no longer pulls loader-utils, which no source file imports. webpack bundles all code into dist/index.js, so nothing at runtime changes.

  • .github/workflows/unit-test.yml: push trigger master -> main (wiki gotcha unit-test-workflow-triggers-on-master: merges to main ran no tests), Node from the new .nvmrc (24, current LTS; was 18, end of life), actions v4 with npm cache, a build step, and test:coverage. No coverage threshold: 79% against a bar of 90. Workflow files need @contentstack/security-admin review; this is a draft and no review is requested.
  • Lint runs in CI as its own lint job (npm run lint, no --fix). main had 8 warnings under --max-warnings=0; this PR fixes the 5 that leave dist/src/**/*.d.ts byte-identical (prefer-const, no-inferrable-types; checked by building before and after). The 3 left are on exported types ({} in types.ts:273, String in stack.types.ts:149-150); fixing them changes the published typings, so they are filed as MKT-22133. The lint job fails until MKT-22133 is done; no continue-on-error, no eslint-disable. Build and tests are a separate job and stay green.
  • package.json: declares @jest/globals (imported by __test__/entry.test.ts) at the installed 27.5.1; removes loader-utils (dependency) and @babel/preset-env, @testing-library/jest-dom, babel-loader, ts-node, webpack-dev-server (devDependencies), all imported or configured nowhere. The lock only loses 319 entries; no remaining entry changes version. @babel/core left for fix: bump 2 deps to resolve Snyk vulnerabilities #191. Supersedes Snyk [Snyk] Upgrade loader-utils from 3.2.1 to 3.3.1 #112.
  • Overlap: fix: bump 2 deps to resolve Snyk vulnerabilities #191 and chore(security): automated dependency & lint fixes #189 also change package-lock.json; whichever merges second needs npm install to resolve the lock.

Readiness items

routine.dependencies, CI hygiene

Commands (exit codes, Node 24 locally)

Command main this branch
npm ci 0 0
npm run lint 1 (8 warnings) 1 (3 warnings, MKT-22133)
npm run build 0 0 (Node 24)
npx tsc --noEmit -p . 0 0
npm test 0 (249 passed) 0
npm audit --omit=dev 1 (3 High: axios, follow-redirects; fixed by #191) 1 (unchanged)
npm run test:coverage 0 (249 passed) 0 (252 passed)

CI: security-sca fails here as on main: the lock pins axios 1.16.0 (8 High). That is fixed by #191 (MKT-22129 links it), not by this PR. The pre-push hook (npm test) passed on every push; none bypassed. Local Snyk cannot authenticate (SNYK-0005); the PR's Snyk checks are the scan.

🤖 Generated with Claude Code

PriteshJain and others added 2 commits November 4, 2026 08:29
…verage (MKT-22131)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…2131)

loader-utils (runtime), @babel/preset-env, @testing-library/jest-dom,
babel-loader, ts-node and webpack-dev-server are imported or configured
nowhere. No remaining lock entry changes version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@snyk-io

snyk-io Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

✅ Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
✅ Open Source Security 0 0 0 0 0 issues
✅ Licenses 0 0 0 0 0 issues
✅ Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check Type Count (with fixes) Without fixes Threshold Result
🔴 Critical Severity 0 0 10 ✅ Passed
🟠 High Severity 6 2 25 ✅ Passed
🟡 Medium Severity 15 2 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

⚠️ Warning: The following vulnerabilities have exceeded their SLA thresholds (days since publication).

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 6 0 30 / 120 days ❌ Failed
🟡 Medium 10 0 90 / 365 days ❌ Failed
🔵 Low 0 0 180 / 365 days ✅ Passed

🟠 High Severity - SLA Breached Issues (with fixes)

Showing 6 issue(s) that have exceeded the 30-day SLA threshold:

  1. Improper Validation of Specified Quantity in Input

    • ID: SNYK-JS-AXIOS-20245044
    • Package: axios@1.16.0
    • Published: 35 days ago (SLA: 30 days)
    • CVSS Score: 8.2
    • CVE: CVE-2026-101901
  2. Allocation of Resources Without Limits or Throttling

    • ID: SNYK-JS-AXIOS-20245062
    • Package: axios@1.16.0
    • Published: 35 days ago (SLA: 30 days)
    • CVSS Score: 8.2
    • CVE: CVE-2026-101906
  3. Server-side Request Forgery (SSRF)

    • ID: SNYK-JS-AXIOS-20245060
    • Package: axios@1.16.0
    • Published: 35 days ago (SLA: 30 days)
    • CVSS Score: 7
    • CVE: CVE-2026-101898
  4. Prototype Pollution

    • ID: SNYK-JS-AXIOS-20245066
    • Package: axios@1.16.0
    • Published: 35 days ago (SLA: 30 days)
    • CVSS Score: 8.3
    • CVE: CVE-2026-101909
  5. Improper Validation of Specified Quantity in Input

    • ID: SNYK-JS-AXIOS-20245046
    • Package: axios@1.16.0
    • Published: 35 days ago (SLA: 30 days)
    • CVSS Score: 8.2
    • CVE: CVE-2026-101901
  6. Unintended Proxy or Intermediary ('Confused Deputy')

    • ID: SNYK-JS-AXIOS-20245048
    • Package: axios@1.16.0
    • Published: 35 days ago (SLA: 30 days)
    • CVSS Score: 7.6
    • CVE: CVE-2026-101905

🟡 Medium Severity - SLA Breached Issues (with fixes)

Showing 10 issue(s) that have exceeded the 90-day SLA threshold:

  1. Allocation of Resources Without Limits or Throttling

    • ID: SNYK-JS-AXIOS-18060165
    • Package: axios@1.16.0
    • Published: 105 days ago (SLA: 90 days)
    • CVSS Score: 6.3
    • CVE: CVE-2026-67312
  2. Prototype Pollution

    • ID: SNYK-JS-AXIOS-18065349
    • Package: axios@1.16.0
    • Published: 105 days ago (SLA: 90 days)
    • CVSS Score: 6.3
    • CVE: CVE-2026-67319
  3. Prototype Pollution

    • ID: SNYK-JS-AXIOS-18065355
    • Package: axios@1.16.0
    • Published: 105 days ago (SLA: 90 days)
    • CVSS Score: 6.3
    • CVE: CVE-2026-67316
  4. Permissive List of Allowed Inputs

    • ID: SNYK-JS-AXIOS-18065357
    • Package: axios@1.16.0
    • Published: 105 days ago (SLA: 90 days)
    • CVSS Score: 6.9
    • CVE: CVE-2026-67315
  5. Uncontrolled Recursion

    • ID: SNYK-JS-AXIOS-18060167
    • Package: axios@1.16.0
    • Published: 105 days ago (SLA: 90 days)
    • CVSS Score: 6.3
    • CVE: CVE-2026-67313
  6. Allocation of Resources Without Limits or Throttling

    • ID: SNYK-JS-AXIOS-18060804
    • Package: axios@1.16.0
    • Published: 105 days ago (SLA: 90 days)
    • CVSS Score: 6.3
    • CVE: CVE-2026-67318
  7. Uncontrolled Recursion

    • ID: SNYK-JS-AXIOS-18060730
    • Package: axios@1.16.0
    • Published: 105 days ago (SLA: 90 days)
    • CVSS Score: 6.9
    • CVE: CVE-2026-67321
  8. Prototype Pollution

    • ID: SNYK-JS-AXIOS-18065351
    • Package: axios@1.16.0
    • Published: 105 days ago (SLA: 90 days)
    • CVSS Score: 6.9
    • CVE: CVE-2026-67320
  9. Allocation of Resources Without Limits or Throttling

    • ID: SNYK-JS-AXIOS-18065353
    • Package: axios@1.16.0
    • Published: 105 days ago (SLA: 90 days)
    • CVSS Score: 6.3
    • CVE: CVE-2026-67317
  10. Prototype Pollution

  • ID: SNYK-JS-AXIOS-18060659
  • Package: axios@1.16.0
  • Published: 105 days ago (SLA: 90 days)
  • CVSS Score: 6.3
  • CVE: CVE-2026-67314

ℹ️ Vulnerabilities Without Available Fixes (Informational Only)

The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:

  • Critical without fixes: 0
  • High without fixes: 2
  • Medium without fixes: 2
  • Low without fixes: 0

❌ BUILD FAILED - Security checks failed

Please review and fix the security vulnerabilities before merging.

PriteshJain and others added 2 commits November 4, 2026 08:43
…MKT-22131)

prefer-const and no-inferrable-types only; dist/src/**/*.d.ts is
byte-identical before and after.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The 3 remaining warnings are on exported types (MKT-22133), so this job
fails until that is decided; the build-and-test job is separate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown

🔒 Security Scan Results

ℹ️ Note: Only vulnerabilities with available fixes (upgrades or patches) are counted toward thresholds.

Check Type Count (with fixes) Without fixes Threshold Result
🔴 Critical Severity 0 0 10 ✅ Passed
🟠 High Severity 6 2 25 ✅ Passed
🟡 Medium Severity 15 2 500 ✅ Passed
🔵 Low Severity 0 0 1000 ✅ Passed

⏱️ SLA Breach Summary

⚠️ Warning: The following vulnerabilities have exceeded their SLA thresholds (days since publication).

Severity Breaches (with fixes) Breaches (no fixes) SLA Threshold (with/no fixes) Status
🔴 Critical 0 0 15 / 30 days ✅ Passed
🟠 High 6 0 30 / 120 days ❌ Failed
🟡 Medium 10 0 90 / 365 days ❌ Failed
🔵 Low 0 0 180 / 365 days ✅ Passed

🟠 High Severity - SLA Breached Issues (with fixes)

Showing 6 issue(s) that have exceeded the 30-day SLA threshold:

  1. Improper Validation of Specified Quantity in Input

    • ID: SNYK-JS-AXIOS-20245044
    • Package: axios@1.16.0
    • Published: 35 days ago (SLA: 30 days)
    • CVSS Score: 8.2
    • CVE: CVE-2026-101901
  2. Allocation of Resources Without Limits or Throttling

    • ID: SNYK-JS-AXIOS-20245062
    • Package: axios@1.16.0
    • Published: 35 days ago (SLA: 30 days)
    • CVSS Score: 8.2
    • CVE: CVE-2026-101906
  3. Server-side Request Forgery (SSRF)

    • ID: SNYK-JS-AXIOS-20245060
    • Package: axios@1.16.0
    • Published: 35 days ago (SLA: 30 days)
    • CVSS Score: 7
    • CVE: CVE-2026-101898
  4. Improper Validation of Specified Quantity in Input

    • ID: SNYK-JS-AXIOS-20245046
    • Package: axios@1.16.0
    • Published: 35 days ago (SLA: 30 days)
    • CVSS Score: 8.2
    • CVE: CVE-2026-101901
  5. Unintended Proxy or Intermediary ('Confused Deputy')

    • ID: SNYK-JS-AXIOS-20245048
    • Package: axios@1.16.0
    • Published: 35 days ago (SLA: 30 days)
    • CVSS Score: 7.6
    • CVE: CVE-2026-101905
  6. Prototype Pollution

    • ID: SNYK-JS-AXIOS-20245066
    • Package: axios@1.16.0
    • Published: 35 days ago (SLA: 30 days)
    • CVSS Score: 8.3
    • CVE: CVE-2026-101909

🟡 Medium Severity - SLA Breached Issues (with fixes)

Showing 10 issue(s) that have exceeded the 90-day SLA threshold:

  1. Allocation of Resources Without Limits or Throttling

    • ID: SNYK-JS-AXIOS-18060804
    • Package: axios@1.16.0
    • Published: 105 days ago (SLA: 90 days)
    • CVSS Score: 6.3
    • CVE: CVE-2026-67318
  2. Prototype Pollution

    • ID: SNYK-JS-AXIOS-18065349
    • Package: axios@1.16.0
    • Published: 105 days ago (SLA: 90 days)
    • CVSS Score: 6.3
    • CVE: CVE-2026-67319
  3. Allocation of Resources Without Limits or Throttling

    • ID: SNYK-JS-AXIOS-18065353
    • Package: axios@1.16.0
    • Published: 105 days ago (SLA: 90 days)
    • CVSS Score: 6.3
    • CVE: CVE-2026-67317
  4. Uncontrolled Recursion

    • ID: SNYK-JS-AXIOS-18060167
    • Package: axios@1.16.0
    • Published: 105 days ago (SLA: 90 days)
    • CVSS Score: 6.3
    • CVE: CVE-2026-67313
  5. Allocation of Resources Without Limits or Throttling

    • ID: SNYK-JS-AXIOS-18060165
    • Package: axios@1.16.0
    • Published: 105 days ago (SLA: 90 days)
    • CVSS Score: 6.3
    • CVE: CVE-2026-67312
  6. Prototype Pollution

    • ID: SNYK-JS-AXIOS-18060659
    • Package: axios@1.16.0
    • Published: 105 days ago (SLA: 90 days)
    • CVSS Score: 6.3
    • CVE: CVE-2026-67314
  7. Uncontrolled Recursion

    • ID: SNYK-JS-AXIOS-18060730
    • Package: axios@1.16.0
    • Published: 105 days ago (SLA: 90 days)
    • CVSS Score: 6.9
    • CVE: CVE-2026-67321
  8. Permissive List of Allowed Inputs

    • ID: SNYK-JS-AXIOS-18065357
    • Package: axios@1.16.0
    • Published: 105 days ago (SLA: 90 days)
    • CVSS Score: 6.9
    • CVE: CVE-2026-67315
  9. Prototype Pollution

    • ID: SNYK-JS-AXIOS-18065351
    • Package: axios@1.16.0
    • Published: 105 days ago (SLA: 90 days)
    • CVSS Score: 6.9
    • CVE: CVE-2026-67320
  10. Prototype Pollution

  • ID: SNYK-JS-AXIOS-18065355
  • Package: axios@1.16.0
  • Published: 105 days ago (SLA: 90 days)
  • CVSS Score: 6.3
  • CVE: CVE-2026-67316

ℹ️ Vulnerabilities Without Available Fixes (Informational Only)

The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:

  • Critical without fixes: 0
  • High without fixes: 2
  • Medium without fixes: 2
  • Low without fixes: 0

❌ BUILD FAILED - Security checks failed

Please review and fix the security vulnerabilities before merging.

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.

2 participants