cdk-insights 1.10.2 → 1.11.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.
- package/dist/analysis/static/awsServices/CloudWatch/logRetention/cloudWatchLogRetentionChecks.d.ts +2 -2
- package/dist/analysis/static/awsServices/CloudWatch/logRetention/cloudWatchLogRetentionChecks.test.d.ts +1 -0
- package/dist/analysis/static/awsServices/IAM/iamPolicies.d.ts +11 -2
- package/dist/analysis/static/awsServices/Lambda/dlq/lambdaDlqChecks.d.ts +2 -2
- package/dist/analysis/static/awsServices/S3/buckets/bucketChecks.d.ts +2 -2
- package/dist/analysis/static/staticAnalysis.d.ts +8 -2
- package/dist/entry.js +202 -202
- package/dist/helpers/ruleContextHelpers/ruleContextHelpers.d.ts +42 -0
- package/dist/helpers/ruleContextHelpers/ruleContextHelpers.test.d.ts +1 -0
- package/dist/helpers/synthesizeCdkStacks/synthesizeCdkStacks.d.ts +7 -1
- package/dist/index.d.ts +9 -2
- package/dist/index.js +136 -136
- package/dist/types/analysis.types.d.ts +32 -1
- package/package.json +1 -1
package/dist/analysis/static/awsServices/CloudWatch/logRetention/cloudWatchLogRetentionChecks.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { AnalysisResults, CloudFormationStack, CreateFindingFunction } from '../../../../../types/analysis.types';
|
|
2
|
-
export declare const checkCloudWatchLogRetention: (template: CloudFormationStack, createFinding: CreateFindingFunction) => AnalysisResults;
|
|
1
|
+
import type { AnalysisResults, CloudFormationStack, CreateFindingFunction, RuleContext } from '../../../../../types/analysis.types';
|
|
2
|
+
export declare const checkCloudWatchLogRetention: (template: CloudFormationStack, createFinding: CreateFindingFunction, ruleContext?: RuleContext) => AnalysisResults;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,2 +1,11 @@
|
|
|
1
|
-
import type { AnalysisResults, CloudFormationStack, CreateFindingFunction } from '../../../../types/analysis.types';
|
|
2
|
-
|
|
1
|
+
import type { AnalysisResults, CloudFormationStack, CreateFindingFunction, RuleContext } from '../../../../types/analysis.types';
|
|
2
|
+
/**
|
|
3
|
+
* IAM policies created by L3 patterns (AWS Solutions Constructs, cdk-monitoring,
|
|
4
|
+
* etc.) frequently contain wildcards because the pattern's purpose is to wire
|
|
5
|
+
* up sensible permissions for a multi-resource workload. A user fixing this at
|
|
6
|
+
* the CFN-resource level usually means escape-hatching the pattern. Severity
|
|
7
|
+
* stays Security-relevant but is downgraded so CI doesn't gate on what the
|
|
8
|
+
* user can't fix without breaking the pattern. Remediation redirects to the
|
|
9
|
+
* pattern's own props.
|
|
10
|
+
*/
|
|
11
|
+
export declare const checkIamPolicies: (template: CloudFormationStack, createFinding: CreateFindingFunction, ruleContext?: RuleContext) => AnalysisResults;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { AnalysisResults, CloudFormationStack, CreateFindingFunction } from '../../../../../types/analysis.types';
|
|
2
|
-
export declare const checkLambdaDeadLetterQueue: (template: CloudFormationStack, createFinding: CreateFindingFunction) => AnalysisResults;
|
|
1
|
+
import type { AnalysisResults, CloudFormationStack, CreateFindingFunction, RuleContext } from '../../../../../types/analysis.types';
|
|
2
|
+
export declare const checkLambdaDeadLetterQueue: (template: CloudFormationStack, createFinding: CreateFindingFunction, ruleContext?: RuleContext) => AnalysisResults;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { AnalysisResults, CloudFormationStack, CreateFindingFunction } from '../../../../../types/analysis.types';
|
|
2
|
-
export declare const checkS3Buckets: (template: CloudFormationStack, createFinding: CreateFindingFunction) => AnalysisResults;
|
|
1
|
+
import type { AnalysisResults, CloudFormationStack, CreateFindingFunction, RuleContext } from '../../../../../types/analysis.types';
|
|
2
|
+
export declare const checkS3Buckets: (template: CloudFormationStack, createFinding: CreateFindingFunction, ruleContext?: RuleContext) => AnalysisResults;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { CustomRuleDefinition } from '../../rules/customRules.types';
|
|
2
|
-
import type { AnalysisResults, CloudFormationStack, CreateFindingFunction, ServiceName, Severity } from '../../types/analysis.types';
|
|
2
|
+
import type { AnalysisResults, CloudFormationStack, CreateFindingFunction, RuleContext, ServiceName, Severity } from '../../types/analysis.types';
|
|
3
3
|
import type { ConstructMetadata } from './solutionConstructs/loadConstructMetadata';
|
|
4
4
|
export type AnalysisStatistics = {
|
|
5
5
|
totalResources: number;
|
|
@@ -22,12 +22,18 @@ export type StaticAnalysisOptions = {
|
|
|
22
22
|
includeStatistics?: boolean;
|
|
23
23
|
/** User-defined custom rules to evaluate */
|
|
24
24
|
customRules?: CustomRuleDefinition[];
|
|
25
|
+
/**
|
|
26
|
+
* Optional context passed to rules that opt in. Lets rules adapt
|
|
27
|
+
* their behaviour based on construct level (L1/L2/L3) and the user's
|
|
28
|
+
* cdk.json feature flags. Rules that don't use it work unchanged.
|
|
29
|
+
*/
|
|
30
|
+
ruleContext?: RuleContext;
|
|
25
31
|
};
|
|
26
32
|
export type StaticAnalysisResultWithStats = {
|
|
27
33
|
findings: AnalysisResults;
|
|
28
34
|
statistics: AnalysisStatistics;
|
|
29
35
|
};
|
|
30
|
-
export declare const runStaticAnalysis: (cloudformationTemplate: CloudFormationStack, createFinding: CreateFindingFunction, selectedServices?: ServiceName[], solutionsRegistry?: Record<string, ConstructMetadata>, customRules?: CustomRuleDefinition[]) => AnalysisResults;
|
|
36
|
+
export declare const runStaticAnalysis: (cloudformationTemplate: CloudFormationStack, createFinding: CreateFindingFunction, selectedServices?: ServiceName[], solutionsRegistry?: Record<string, ConstructMetadata>, customRules?: CustomRuleDefinition[], ruleContext?: RuleContext) => AnalysisResults;
|
|
31
37
|
export declare const runStaticAnalysisWithOptions: (cloudformationTemplate: CloudFormationStack, createFinding: CreateFindingFunction, options?: StaticAnalysisOptions) => StaticAnalysisResultWithStats;
|
|
32
38
|
export type BatchAnalysisResult = {
|
|
33
39
|
results: Record<string, AnalysisResults>;
|