Skip to content

test(content-type-sidebar): getData and onSave from the spec - #195

Draft
pritesh-jain-cstk wants to merge 1 commit into
mainfrom
test/MKT-22130-content-type-sidebar
Draft

pritesh-jain-cstk wants to merge 1 commit into
mainfrom
test/MKT-22130-content-type-sidebar

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 tests fill:#f9d71c,stroke:#333,stroke-width:2px
Loading

What

Jira: MKT-22130

Consumer impact: none. Built main and this branch and diffed dist/src/**/*.d.ts: no diff. Tests only.

  • __test__/contentTypeSidebarWidget.test.ts (3 tests). ContentTypeSidebarWidget was the least-covered public location (25% lines, now 95%). Spec: product-wiki developer-hub/04-platform-contracts/app-sdk-reference.md (currentContentType, getData, onSave) and the published JSDoc (getData "Get the current content type data"; onSave runs "every time a content type is saved"). The public location page does not describe the methods.
  • Mutation check: dropping the save update in the constructor, passing the event instead of event.data to the callback, and returning an empty object from getData each fail at least one test.
  • api() 4xx/5xx handling (MKT-19619) is tested by fix: MKT-19619 appSdk.api() drops body/status text/headers on 4xx/5xx #190 (__test__/adapter.test.ts); not repeated here. Note fix: MKT-19619 appSdk.api() drops body/status text/headers on 4xx/5xx #190 targets develop, which is 24 commits behind main.
  • Coverage: 78.46% -> 79.44% lines, still under the bar of 90 (collectCoverageFrom already covers all of src). No threshold added.

Readiness items

tests.from-spec (partly), tests.coverage (partly)

Commands (exit codes, Node 24 locally)

Command main this branch
npm ci 0 0
npm run lint 1 (8 warnings, pre-existing) 1 (same 8, none added)
npm run build 0 0
npx tsc --noEmit -p . 0 0
npm test 0 (249 passed) 0 (252 passed, 79.44% lines)
npm audit --omit=dev 1 (3 High: axios, follow-redirects; fixed by #191) 1 (unchanged)

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

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. 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
  2. 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
  3. 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
  4. 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
  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. 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

🟡 Medium Severity - SLA Breached Issues (with fixes)

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

  1. 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
  2. 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
  3. 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
  4. 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
  5. 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
  6. 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
  7. 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
  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-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