Skip to main content

Module extract

Module extract 

Source
Expand description

Module extraction types: exports, imports, re-exports, and member info. Module extraction types.

Structs§

ClassHeritageInfo
Additional heritage metadata for an exported class.
DynamicImportInfo
A dynamic import() call.
DynamicImportPattern
A dynamic import with a partially resolved pattern.
ExportInfo
An export declaration.
FlagUse
A feature flag use site.
FunctionComplexity
Complexity metrics for a single function/method/arrow.
ImportInfo
An import declaration.
LocalTypeDeclaration
A module-scope declaration that can be used as a TypeScript type.
MemberAccess
A static member access expression (e.g., Status.Active, MyClass.create()).
MemberInfo
A member of an enum, class, or namespace.
ModuleInfo
Extracted module information from a single file.
NamespaceObjectAlias
One alias entry tying an exported object’s dotted property path to a namespace import.
ParseResult
Result of parsing all files, including incremental cache statistics.
PublicSignatureTypeReference
A reference from an exported symbol’s public signature to a type name.
ReExportInfo
A re-export declaration.
RequireCallInfo
A require() call.
SanitizedSinkArg
A captured sink argument that is itself a recognized sanitizer call.
SinkSite
A captured non-literal sink site. The visitor records EVERY call / member-assign / member-call / tagged-template / jsx-attr whose relevant argument is non-literal; it knows nothing about CWE categories. A fully-literal argument is never captured (conservative trigger).
TaintedBinding
A local binding tied to the flattened member-access path it was initialized from. The analyze layer matches source_path against the data-driven source catalogue; when it matches, local is treated as carrying untrusted input.

Enums§

ExportName
Export identifier.
FlagUseKind
The kind of feature flag pattern detected.
ImportedName
How a symbol is imported.
MemberKind
The kind of member.
SanitizerScope
Sanitizer output domain. Kept intentionally narrow so a sanitizer for one domain cannot suppress a different sink family.
SinkArgKind
The shape of the non-literal argument captured at a sink site. Category-blind like SinkShape, but finer-grained: it lets the catalogue matcher require or exclude specific argument shapes. The discriminator is what distinguishes an unsafe SQL string concatenation or template-into-.execute() from a safely-parameterized sql`${x}` tagged template or an object-literal .execute({ sql, args }) argument.
SinkShape
The syntactic shape of a captured security sink site. Category-blind: the extractor records the shape and the dotted/bare callee path; the analyze layer matches it against the data-driven catalogue. See crates/core/data/security_matchers.toml.
VisibilityTag
Visibility tag from JSDoc/TSDoc comments that suppresses unused-export detection.

Functions§

byte_offset_to_line_col
Convert a byte offset to a 1-based line number and 0-based byte column.
compute_line_offsets
Compute a table of line-start byte offsets from source text.