@kernlang/review 3.1.6 → 3.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cache.d.ts +1 -1
- package/dist/cache.js +5 -3
- package/dist/cache.js.map +1 -1
- package/dist/call-graph.d.ts +63 -0
- package/dist/call-graph.js +380 -0
- package/dist/call-graph.js.map +1 -0
- package/dist/concept-rules/boundary-mutation.d.ts +1 -1
- package/dist/concept-rules/boundary-mutation.js.map +1 -1
- package/dist/concept-rules/ignored-error.d.ts +1 -1
- package/dist/concept-rules/ignored-error.js.map +1 -1
- package/dist/concept-rules/illegal-dependency.d.ts +1 -1
- package/dist/concept-rules/illegal-dependency.js.map +1 -1
- package/dist/concept-rules/index.js +1 -6
- package/dist/concept-rules/index.js.map +1 -1
- package/dist/concept-rules/unguarded-effect.d.ts +1 -1
- package/dist/concept-rules/unguarded-effect.js.map +1 -1
- package/dist/concept-rules/unrecovered-effect.d.ts +1 -1
- package/dist/concept-rules/unrecovered-effect.js +2 -1
- package/dist/concept-rules/unrecovered-effect.js.map +1 -1
- package/dist/confidence.js +12 -8
- package/dist/confidence.js.map +1 -1
- package/dist/differ.js +3 -7
- package/dist/differ.js.map +1 -1
- package/dist/external-tools.js +5 -6
- package/dist/external-tools.js.map +1 -1
- package/dist/file-context.d.ts +21 -0
- package/dist/file-context.js +234 -0
- package/dist/file-context.js.map +1 -0
- package/dist/file-role.js +14 -7
- package/dist/file-role.js.map +1 -1
- package/dist/graph.d.ts +1 -1
- package/dist/graph.js +24 -16
- package/dist/graph.js.map +1 -1
- package/dist/index.d.ts +44 -35
- package/dist/index.js +210 -121
- package/dist/index.js.map +1 -1
- package/dist/inferrer.d.ts +8 -2
- package/dist/inferrer.js +80 -47
- package/dist/inferrer.js.map +1 -1
- package/dist/kern-lint.d.ts +3 -4
- package/dist/kern-lint.js +7 -5
- package/dist/kern-lint.js.map +1 -1
- package/dist/llm-bridge.d.ts +23 -7
- package/dist/llm-bridge.js +267 -31
- package/dist/llm-bridge.js.map +1 -1
- package/dist/llm-review.d.ts +16 -2
- package/dist/llm-review.js +240 -35
- package/dist/llm-review.js.map +1 -1
- package/dist/mappers/ts-concepts.d.ts +1 -1
- package/dist/mappers/ts-concepts.js +303 -32
- package/dist/mappers/ts-concepts.js.map +1 -1
- package/dist/norm-miner.d.ts +31 -0
- package/dist/norm-miner.js +119 -0
- package/dist/norm-miner.js.map +1 -0
- package/dist/obligations.d.ts +63 -0
- package/dist/obligations.js +158 -0
- package/dist/obligations.js.map +1 -0
- package/dist/quality-rules.d.ts +3 -3
- package/dist/quality-rules.js +4 -2
- package/dist/quality-rules.js.map +1 -1
- package/dist/reporter.d.ts +7 -2
- package/dist/reporter.js +82 -51
- package/dist/reporter.js.map +1 -1
- package/dist/rule-eval.d.ts +1 -2
- package/dist/rule-eval.js +5 -9
- package/dist/rule-eval.js.map +1 -1
- package/dist/rule-loader.js +16 -14
- package/dist/rule-loader.js.map +1 -1
- package/dist/rules/base.js +153 -69
- package/dist/rules/base.js.map +1 -1
- package/dist/rules/cli.js +23 -19
- package/dist/rules/cli.js.map +1 -1
- package/dist/rules/confidence.d.ts +1 -1
- package/dist/rules/confidence.js +5 -5
- package/dist/rules/confidence.js.map +1 -1
- package/dist/rules/dead-code.d.ts +10 -0
- package/dist/rules/dead-code.js +75 -0
- package/dist/rules/dead-code.js.map +1 -0
- package/dist/rules/dead-logic.js +35 -31
- package/dist/rules/dead-logic.js.map +1 -1
- package/dist/rules/express.d.ts +2 -1
- package/dist/rules/express.js +380 -126
- package/dist/rules/express.js.map +1 -1
- package/dist/rules/fastapi.js +53 -19
- package/dist/rules/fastapi.js.map +1 -1
- package/dist/rules/ground-layer.js +3 -3
- package/dist/rules/ground-layer.js.map +1 -1
- package/dist/rules/index.js +574 -105
- package/dist/rules/index.js.map +1 -1
- package/dist/rules/ink.js +9 -8
- package/dist/rules/ink.js.map +1 -1
- package/dist/rules/kern-source.js +202 -63
- package/dist/rules/kern-source.js.map +1 -1
- package/dist/rules/nextjs.js +88 -33
- package/dist/rules/nextjs.js.map +1 -1
- package/dist/rules/null-safety.js +52 -26
- package/dist/rules/null-safety.js.map +1 -1
- package/dist/rules/nuxt.js +24 -29
- package/dist/rules/nuxt.js.map +1 -1
- package/dist/rules/react.js +355 -69
- package/dist/rules/react.js.map +1 -1
- package/dist/rules/security-v2.js +71 -57
- package/dist/rules/security-v2.js.map +1 -1
- package/dist/rules/security-v3.js.map +1 -1
- package/dist/rules/security-v4.js +54 -27
- package/dist/rules/security-v4.js.map +1 -1
- package/dist/rules/security.js +35 -5
- package/dist/rules/security.js.map +1 -1
- package/dist/rules/terminal.js +17 -5
- package/dist/rules/terminal.js.map +1 -1
- package/dist/rules/vue.js +162 -107
- package/dist/rules/vue.js.map +1 -1
- package/dist/semantic-diff.d.ts +52 -0
- package/dist/semantic-diff.js +342 -0
- package/dist/semantic-diff.js.map +1 -0
- package/dist/spec-checker.js +11 -10
- package/dist/spec-checker.js.map +1 -1
- package/dist/suppression/apply-suppression.d.ts +2 -3
- package/dist/suppression/apply-suppression.js +3 -3
- package/dist/suppression/apply-suppression.js.map +1 -1
- package/dist/suppression/index.d.ts +2 -2
- package/dist/suppression/index.js +1 -1
- package/dist/suppression/index.js.map +1 -1
- package/dist/suppression/parse-directives.d.ts +1 -1
- package/dist/suppression/parse-directives.js +9 -4
- package/dist/suppression/parse-directives.js.map +1 -1
- package/dist/taint-ast.d.ts +20 -0
- package/dist/taint-ast.js +427 -0
- package/dist/taint-ast.js.map +1 -0
- package/dist/taint-crossfile.d.ts +28 -0
- package/dist/taint-crossfile.js +174 -0
- package/dist/taint-crossfile.js.map +1 -0
- package/dist/taint-findings.d.ts +17 -0
- package/dist/taint-findings.js +131 -0
- package/dist/taint-findings.js.map +1 -0
- package/dist/taint-regex.d.ts +61 -0
- package/dist/taint-regex.js +379 -0
- package/dist/taint-regex.js.map +1 -0
- package/dist/taint-types.d.ts +128 -0
- package/dist/taint-types.js +174 -0
- package/dist/taint-types.js.map +1 -0
- package/dist/taint.d.ts +13 -107
- package/dist/taint.js +16 -1067
- package/dist/taint.js.map +1 -1
- package/dist/template-detector.d.ts +2 -2
- package/dist/template-detector.js +11 -16
- package/dist/template-detector.js.map +1 -1
- package/dist/types.d.ts +35 -0
- package/dist/types.js.map +1 -1
- package/package.json +2 -2
package/dist/graph.js
CHANGED
|
@@ -17,16 +17,19 @@ const EXT_FALLBACK = {
|
|
|
17
17
|
};
|
|
18
18
|
export function resolveImportGraph(entryFiles, options = {}) {
|
|
19
19
|
const maxDepth = options.maxDepth ?? 3;
|
|
20
|
-
const project = options.project ??
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
20
|
+
const project = options.project ??
|
|
21
|
+
new Project({
|
|
22
|
+
tsConfigFilePath: options.tsConfigFilePath,
|
|
23
|
+
skipAddingFilesFromTsConfig: true,
|
|
24
|
+
compilerOptions: options.tsConfigFilePath
|
|
25
|
+
? undefined
|
|
26
|
+
: {
|
|
27
|
+
strict: true,
|
|
28
|
+
target: 99,
|
|
29
|
+
module: 99,
|
|
30
|
+
moduleResolution: 100, // Bundler
|
|
31
|
+
},
|
|
32
|
+
});
|
|
30
33
|
const fileMap = new Map();
|
|
31
34
|
const visited = new Set();
|
|
32
35
|
const queue = [];
|
|
@@ -64,10 +67,15 @@ export function resolveImportGraph(entryFiles, options = {}) {
|
|
|
64
67
|
// Collect module references from imports and re-exports (barrel file support)
|
|
65
68
|
const refs = [];
|
|
66
69
|
for (const decl of sf.getImportDeclarations()) {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
70
|
+
try {
|
|
71
|
+
refs.push({
|
|
72
|
+
specifier: decl.getModuleSpecifierValue(),
|
|
73
|
+
resolved: decl.getModuleSpecifierSourceFile(),
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
catch {
|
|
77
|
+
/* skip dynamic imports with non-literal specifiers */
|
|
78
|
+
}
|
|
71
79
|
}
|
|
72
80
|
for (const decl of sf.getExportDeclarations()) {
|
|
73
81
|
const spec = decl.getModuleSpecifierValue();
|
|
@@ -123,7 +131,7 @@ export function resolveImportGraph(entryFiles, options = {}) {
|
|
|
123
131
|
const files = Array.from(fileMap.values());
|
|
124
132
|
return {
|
|
125
133
|
files,
|
|
126
|
-
entryFiles: files.filter(f => f.distance === 0).map(f => f.path),
|
|
134
|
+
entryFiles: files.filter((f) => f.distance === 0).map((f) => f.path),
|
|
127
135
|
totalFiles: files.length,
|
|
128
136
|
skipped,
|
|
129
137
|
};
|
|
@@ -141,7 +149,7 @@ function tryExtensionFallback(project, fromFile, specifier) {
|
|
|
141
149
|
const candidate = base + tsExt;
|
|
142
150
|
// Try resolving relative to the importing file's directory
|
|
143
151
|
const fromDir = fromFile.getDirectoryPath();
|
|
144
|
-
const fullPath = fromDir
|
|
152
|
+
const fullPath = `${fromDir}/${candidate.replace(/^\.\//, '')}`;
|
|
145
153
|
const sf = project.getSourceFile(fullPath);
|
|
146
154
|
if (sf)
|
|
147
155
|
return sf;
|
package/dist/graph.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph.js","sourceRoot":"","sources":["../src/graph.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,OAAO,EAAmB,MAAM,UAAU,CAAC;AAGpD,8DAA8D;AAC9D,MAAM,YAAY,GAA6B;IAC7C,KAAK,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,CAAC,MAAM,CAAC;IAChB,MAAM,EAAE,CAAC,MAAM,CAAC;IAChB,MAAM,EAAE,CAAC,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,UAAU,kBAAkB,
|
|
1
|
+
{"version":3,"file":"graph.js","sourceRoot":"","sources":["../src/graph.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA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C,KAAK,EAAE,MAAM,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC;QAC3D,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC;YAAE,SAAS;QACzC,MAAM,IAAI,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAC/C,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YAC3B,MAAM,SAAS,GAAG,IAAI,GAAG,KAAK,CAAC;YAC/B,2DAA2D;YAC3D,MAAM,OAAO,GAAG,QAAQ,CAAC,gBAAgB,EAAE,CAAC;YAC5C,MAAM,QAAQ,GAAG,GAAG,OAAO,IAAI,SAAS,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,EAAE,CAAC;YAChE,MAAM,EAAE,GAAG,OAAO,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;YAC3C,IAAI,EAAE;gBAAE,OAAO,EAAE,CAAC;QACpB,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -9,54 +9,63 @@
|
|
|
9
9
|
* v2: Unified ReviewFinding pipeline. All findings merged into single array.
|
|
10
10
|
*/
|
|
11
11
|
import type { GraphOptions } from './types.js';
|
|
12
|
-
import type {
|
|
13
|
-
export type {
|
|
14
|
-
export
|
|
15
|
-
export type {
|
|
16
|
-
export
|
|
17
|
-
export {
|
|
18
|
-
export {
|
|
19
|
-
export { inferFromSource, inferFromFile } from './inferrer.js';
|
|
20
|
-
export { classifyFileRole } from './file-role.js';
|
|
21
|
-
export { detectTemplates } from './template-detector.js';
|
|
12
|
+
import type { ReviewConfig, ReviewReport } from './types.js';
|
|
13
|
+
export type { CallGraph, CallSite, FunctionNode } from './call-graph.js';
|
|
14
|
+
export { buildCallGraph } from './call-graph.js';
|
|
15
|
+
export type { ConceptRule, ConceptRuleContext } from './concept-rules/index.js';
|
|
16
|
+
export { runConceptRules } from './concept-rules/index.js';
|
|
17
|
+
export type { ConfidenceGraph, ConfidenceNode, ConfidenceSpec, ConfidenceSummary, DuplicateNameEntry, MultiFileConfidenceGraph, NeedsEntry, SerializedConfidenceGraph, } from './confidence.js';
|
|
18
|
+
export { buildConfidenceGraph, buildMultiFileConfidenceGraph, computeConfidenceSummary, parseConfidence, propagateConfidence, resolveBaseConfidence, serializeGraph, } from './confidence.js';
|
|
22
19
|
export { structuralDiff } from './differ.js';
|
|
23
|
-
export {
|
|
24
|
-
export {
|
|
25
|
-
export
|
|
26
|
-
export {
|
|
27
|
-
export {
|
|
20
|
+
export { linkToNodes, runESLint, runTSCDiagnostics, runTSCDiagnosticsFromPaths } from './external-tools.js';
|
|
21
|
+
export { buildFileContextMap, clearFileContextCache } from './file-context.js';
|
|
22
|
+
export { classifyFileRole } from './file-role.js';
|
|
23
|
+
export { resolveImportGraph } from './graph.js';
|
|
24
|
+
export { inferFromFile, inferFromSource } from './inferrer.js';
|
|
25
|
+
export type { KernLintRule } from './kern-lint.js';
|
|
26
|
+
export { flattenIR, lintKernIR } from './kern-lint.js';
|
|
27
|
+
export type { LLMBridgeConfig, LLMReviewInput, ReviewInstructionOptions } from './llm-bridge.js';
|
|
28
|
+
export { buildReviewInstructions, isLLMAvailable, runLLMReview } from './llm-bridge.js';
|
|
28
29
|
export type { LLMGraphContext } from './llm-review.js';
|
|
29
|
-
export {
|
|
30
|
+
export { buildLLMPrompt, exportKernIR, parseLLMResponse } from './llm-review.js';
|
|
30
31
|
export { extractTsConcepts } from './mappers/ts-concepts.js';
|
|
31
|
-
export {
|
|
32
|
-
export
|
|
33
|
-
export {
|
|
34
|
-
export
|
|
35
|
-
export {
|
|
36
|
-
export
|
|
37
|
-
export {
|
|
38
|
-
export {
|
|
32
|
+
export type { NormViolation } from './norm-miner.js';
|
|
33
|
+
export { mineNorms } from './norm-miner.js';
|
|
34
|
+
export type { ObligationType, ProofObligation } from './obligations.js';
|
|
35
|
+
export { obligationsFromNorms, obligationsFromStructure, synthesizeObligations } from './obligations.js';
|
|
36
|
+
export { runQualityRules } from './quality-rules.js';
|
|
37
|
+
export { assignDefaultConfidence, calculateStats, checkEnforcement, dedup, formatEnforcement, formatReport, formatReportJSON, formatSARIF, formatSARIFWithSuppressions, formatSummary, sortAndDedup, sortFindings, } from './reporter.js';
|
|
38
|
+
export { CONFIDENCE_RULES, lintConfidenceGraph, lintMultiFileConfidenceGraph } from './rules/confidence.js';
|
|
39
|
+
export { actionMissingIdempotent, assumeLowTrust, branchNonExhaustive, collectUnbounded, expectRangeInverted, GROUND_LAYER_RULES, guardWithoutElse, reasonWithoutBasis, } from './rules/ground-layer.js';
|
|
40
|
+
export type { RuleInfo } from './rules/index.js';
|
|
41
|
+
export { getRuleRegistry } from './rules/index.js';
|
|
39
42
|
export type { KernSourceRule } from './rules/kern-source.js';
|
|
40
|
-
export {
|
|
41
|
-
export { parseConfidence, buildConfidenceGraph, buildMultiFileConfidenceGraph, propagateConfidence, resolveBaseConfidence, serializeGraph, computeConfidenceSummary, } from './confidence.js';
|
|
42
|
-
export type { ConfidenceSpec, ConfidenceNode, NeedsEntry, DuplicateNameEntry, ConfidenceGraph, MultiFileConfidenceGraph, SerializedConfidenceGraph, ConfidenceSummary, } from './confidence.js';
|
|
43
|
-
export { lintConfidenceGraph, lintMultiFileConfidenceGraph, CONFIDENCE_RULES } from './rules/confidence.js';
|
|
43
|
+
export { handlerHeavy, KERN_SOURCE_RULES, lintKernSourceIR, missingConfidence, typeModelMismatch, undefinedReference, unusedState, } from './rules/kern-source.js';
|
|
44
44
|
export { isReDoSVulnerable } from './rules/security-v3.js';
|
|
45
|
-
export {
|
|
46
|
-
export
|
|
47
|
-
export {
|
|
48
|
-
export
|
|
45
|
+
export type { SemanticChange } from './semantic-diff.js';
|
|
46
|
+
export { computeSemanticDiff, computeSemanticDiffFromSource, formatSemanticDiff, getOldFileContent, semanticChangesToFindings, } from './semantic-diff.js';
|
|
47
|
+
export type { StrictMode, SuppressionDirective, SuppressionResult } from './suppression/index.js';
|
|
48
|
+
export { applySuppression, configDirectives, isConceptRule, parseDirectives } from './suppression/index.js';
|
|
49
|
+
export type { CrossFileTaintResult, ExportedFunction, TaintPath, TaintResult, TaintSink, TaintSource, } from './taint.js';
|
|
50
|
+
export { analyzeTaint, analyzeTaintCrossFile, buildExportMap, buildImportMap, crossFileTaintToFindings, isSanitizerSufficient, taintToFindings, } from './taint.js';
|
|
51
|
+
export { detectTemplates } from './template-detector.js';
|
|
52
|
+
export type { AnalysisContext, Confidence, EnforceResult, FileContext, FileRole, GraphFile, GraphOptions, GraphResult, InferResult, ReviewConfig, ReviewFinding, ReviewReport, ReviewRule, ReviewStats, RuleContext, RuntimeBoundary, SourceSpan, TemplateMatch, } from './types.js';
|
|
53
|
+
export { createFingerprint } from './types.js';
|
|
49
54
|
import { clearReviewCache } from './cache.js';
|
|
55
|
+
export type { ImplRoute, SpecCheckResult, SpecContract, SpecViolation, ViolationKind } from './spec-checker.js';
|
|
56
|
+
export { checkSpec, checkSpecFiles, extractImplRoutes, extractSpecContracts, matchRoutes, specViolationsToFindings, verifyRouteContract, } from './spec-checker.js';
|
|
50
57
|
export { clearReviewCache };
|
|
51
|
-
|
|
52
|
-
export
|
|
58
|
+
/** Reset the shared project (for tests / watch mode) */
|
|
59
|
+
export declare function resetFsProject(): void;
|
|
53
60
|
/**
|
|
54
61
|
* Review a single file. Auto-detects language from extension.
|
|
62
|
+
* Uses a filesystem-backed ts-morph Project for type-aware analysis.
|
|
55
63
|
* Supports: .ts, .tsx, .py, .kern
|
|
56
64
|
*/
|
|
57
65
|
export declare function reviewFile(filePath: string, config?: ReviewConfig): ReviewReport;
|
|
58
66
|
/**
|
|
59
|
-
* Review TypeScript source code (string).
|
|
67
|
+
* Review TypeScript source code (string). Uses in-memory project (no type resolution).
|
|
68
|
+
* For file-from-disk review with type resolution, use reviewFile() instead.
|
|
60
69
|
*/
|
|
61
70
|
export declare function reviewSource(source: string, filePath?: string, config?: ReviewConfig): ReviewReport;
|
|
62
71
|
/**
|