/** * Bash/Shell Language Plugin * * Provides Bash-specific AST handling and taint patterns for Shell scripts. */ import type { Node as SyntaxNode } from 'web-tree-sitter'; import type { TypeInfo, CallInfo, ImportInfo } from '../../types/index.js'; import type { LanguageNodeTypes, ExtractionContext, FrameworkInfo, TaintSourcePattern, TaintSinkPattern } from '../types.js'; import { BaseLanguagePlugin } from './base.js'; /** * Bash/Shell language plugin implementation. */ export declare class BashPlugin extends BaseLanguagePlugin { readonly id: "bash"; readonly name = "Bash/Shell"; readonly extensions: string[]; readonly wasmPath = "tree-sitter-bash.wasm"; readonly nodeTypes: LanguageNodeTypes; /** * Shell scripts don't have a formal framework concept. */ detectFramework(_context: ExtractionContext): FrameworkInfo | undefined; /** * Bash taint source patterns. * In shell, tainted data enters via `read` (stdin) and * `curl`/`wget` (HTTP responses for supply-chain attack detection). */ getBuiltinSources(): TaintSourcePattern[]; /** * Bash taint sink patterns. * Key sinks: eval (CWE-94), bash/sh -c (CWE-78), DB clients (CWE-89), * file operations (CWE-22), SSRF via curl/wget (CWE-918). */ getBuiltinSinks(): TaintSinkPattern[]; /** * Shell has no OOP receiver types. */ getReceiverType(_node: SyntaxNode, _context: ExtractionContext): string | undefined; /** * Bash string literals: quoted strings and raw ($'...') strings. */ isStringLiteral(node: SyntaxNode): boolean; /** * Extract string value from bash string literal, stripping quotes. */ getStringValue(node: SyntaxNode): string | undefined; extractTypes(_context: ExtractionContext): TypeInfo[]; extractCalls(_context: ExtractionContext): CallInfo[]; extractImports(_context: ExtractionContext): ImportInfo[]; extractPackage(_context: ExtractionContext): string | undefined; } //# sourceMappingURL=bash.d.ts.map