cdk-insights 0.17.0 → 0.18.1

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.
@@ -1,5 +1,6 @@
1
1
  import type { AnalysisResults, CloudFormationStack, CreateFindingFunction, ServiceName, Severity } from '../../types/analysis.types';
2
2
  import type { ConstructMetadata } from './solutionConstructs/loadConstructMetadata';
3
+ import type { CustomRuleDefinition } from '../../rules/customRules.types';
3
4
  export type AnalysisStatistics = {
4
5
  totalResources: number;
5
6
  analyzedResources: number;
@@ -19,12 +20,14 @@ export type StaticAnalysisOptions = {
19
20
  deduplicateFindings?: boolean;
20
21
  /** Whether to include statistics in result (default: false) */
21
22
  includeStatistics?: boolean;
23
+ /** User-defined custom rules to evaluate */
24
+ customRules?: CustomRuleDefinition[];
22
25
  };
23
26
  export type StaticAnalysisResultWithStats = {
24
27
  findings: AnalysisResults;
25
28
  statistics: AnalysisStatistics;
26
29
  };
27
- export declare const runStaticAnalysis: (cloudformationTemplate: CloudFormationStack, createFinding: CreateFindingFunction, selectedServices?: ServiceName[], solutionsRegistry?: Record<string, ConstructMetadata>) => AnalysisResults;
30
+ export declare const runStaticAnalysis: (cloudformationTemplate: CloudFormationStack, createFinding: CreateFindingFunction, selectedServices?: ServiceName[], solutionsRegistry?: Record<string, ConstructMetadata>, customRules?: CustomRuleDefinition[]) => AnalysisResults;
28
31
  export declare const runStaticAnalysisWithOptions: (cloudformationTemplate: CloudFormationStack, createFinding: CreateFindingFunction, options?: StaticAnalysisOptions) => StaticAnalysisResultWithStats;
29
32
  export type BatchAnalysisResult = {
30
33
  results: Record<string, AnalysisResults>;
@@ -1,4 +1,8 @@
1
1
  import type { UserConfig } from '../types/cli.types';
2
+ /**
3
+ * Recursively strip dangerous keys from an object to prevent prototype pollution.
4
+ */
5
+ export declare function sanitizeObject<T extends Record<string, unknown>>(obj: T): T;
2
6
  export declare const loadUserConfig: () => UserConfig;
3
7
  export declare const saveUserConfig: (config: UserConfig) => void;
4
8
  export declare const resetUserConfig: () => void;
@@ -1,5 +1,5 @@
1
1
  import type { Issue, ServiceName } from '../../types/analysis.types';
2
- export type OutputFormat = 'json' | 'table' | 'markdown' | 'summary' | 'sarif' | 'github-actions';
2
+ export type OutputFormat = 'json' | 'table' | 'markdown' | 'summary' | 'sarif' | 'github-actions' | 'pdf';
3
3
  export interface AnalyzeCommandArgs {
4
4
  stackName?: string;
5
5
  ci?: boolean;