Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@kubb/ast

Latest version: v0.0.0-canary-20261129203936

Overview

Last scanned
29 Nov 2026
Published
29 Nov 2026
npm package Publisher: stijnvanhulle
1,864 Stars
152 Forks
591 Versions
1.7M Downloads
TypeScript Repo language

Scan summary

@kubb/ast was last scanned on 29 Nov 2026 at version 0.0.0-canary-20261129203936. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 591 versions; the latest 5 were published within 2 days (28 and 29 Nov 2026).
  • Findings: No rules fired in version 0.0.0-canary-20261129203936.
  • Downloads: 1,730,335 downloads.

Versions

591 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.0.0-canary-20261129203936 LATEST 29 Nov 2026 No rules fired
0.0.0-canary-20261129202820 29 Nov 2026 No rules fired
0.0.0-canary-20261128235407 28 Nov 2026 No rules fired
5.28.6 28 Nov 2026 Not shown
0.0.0-canary-20261128194753 28 Nov 2026 Not shown

No rules fired in 0.0.0-canary-20261129203936

Findings

Findings for v0.0.0-canary-20261129203936. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.0.0-canary-20261129203936; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

@kubb/ast

Spec-agnostic AST layer for Kubb

Defines the node tree, visitor pattern, factory functions, and type guards used across every Kubb code generation plugin.

Imports

Path Contents
@kubb/ast Runtime: node definitions, guards, visitor, macro engine, constants
ast.factory (via @kubb/ast) Node constructors (createSchema, createFile, and friends), the ts.factory analogue
kubb/kit Re-exports the ast and factory namespaces, the way most Kubb code reaches the AST without a direct dependency

@kubb/ast is an internal library. Inside the Kubb ecosystem the whole surface travels on the ast namespace from kubb/kit, so plugins and templates reach it there instead of depending on this package directly. The examples below import from @kubb/ast for clarity; through kubb/kit the same calls read as ast.node.transform, ast.factory.createSchema, and so on.

Node tree

InputNode
├── schemas: SchemaNode[]
└── operations: OperationNode[]
    ├── parameters: ParameterNode[]   → SchemaNode
    ├── requestBody?: SchemaNode
    └── responses: ResponseNode[]     → SchemaNode?

SchemaNode (discriminated union)
  object        → properties: PropertyNode[] → SchemaNode
  array | tuple → items: SchemaNode[]
  union | intersection → members: SchemaNode[]
  enum | ref | string | number | integer | bigint
  boolean | null | any | unknown | void
  date | datetime | time | uuid | email | url | blob

Usage

Factory

Constructors are available as ast.factory from @kubb/ast, mirroring ts.factory.createX.

import { ast } from '@kubb/ast'

const { createInput, createSchema, createProperty } = ast.factory

const root = createInput({
  schemas: [
    createSchema({
      name: 'Pet',
      type: 'object',
      properties: [
        createProperty({
          name: 'id',
          schema: createSchema({ type: 'integer' }),
          required: true,
        }),
        createProperty({
          name: 'name',
          schema: createSchema({ type: 'string' }),
          required: true,
        }),
      ],
    }),
  ],
})
Visitor
import { ast } from '@kubb/ast'

// Immutable transformation
const updated = ast.node.transform(root, {
  schema(node) {
    return { ...node, description: 'generated' }
  },
})

// Extraction
const types = ast.node.collect<string>(root, {
  schema(node) {
    return node.type
  },
})
Guards
import { ast } from '@kubb/ast'
import type { Node } from '@kubb/ast'

function process(node: Node) {
  if (node.kind === 'Schema') {
    const obj = ast.schema.narrow(node, 'object')
    obj?.properties?.forEach((p) => console.log(p.name))
  }
}
Refs
import { ast } from '@kubb/ast'

ast.ref.getName({ kind: 'Schema', type: 'ref', ref: '#/components/schemas/Pet' }) // 'Pet'

Adding a node

Adding a node touches three files.

  1. Define the node type and its createFoo function in its own src/nodes/*.ts file, and add the kind to NodeKind in src/nodes/base.ts.
  2. Add the type to the Node union and re-export createFoo in src/nodes/index.ts, and export the type from src/types.ts.
  3. When the node has children or a visitor callback, add it to VISITOR_KEYS and VISITOR_KEY_BY_KIND in src/visitor.ts.

Supporting Kubb

Kubb is an open source project, and its development is funded entirely by sponsors. If you would like to become a sponsor, please consider:

License

MIT

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @kubb/ast

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

Copy of Template Design OX Blog (3)
Research

Ruby2Shell: Ruby Memory Corruption Flaws Expose Applications to Remote Code Execution, But is it an Actual Risk?

Critical Apache HTTP Server Flaw Exposes Web Servers to RCE (1)
CVE

CVE-2026-119618: Critical Apache HTTP Server Flaw Exposes Web Servers to Remote Code Execution

Frame 2085668439 (1)
Group 1261154229