cdk-insights 0.2.0-beta.2 → 0.2.0-beta.4
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/README.md +66 -38
- package/dist/cli/entry.js +5 -5
- package/package.json +11 -2
package/README.md
CHANGED
|
@@ -23,12 +23,12 @@ CDK Insights helps you identify security vulnerabilities, cost optimization oppo
|
|
|
23
23
|
|
|
24
24
|
```bash
|
|
25
25
|
# Run immediately without installing anything
|
|
26
|
-
npx cdk-insights
|
|
26
|
+
npx cdk-insights scan
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
That's it! CDK Insights will:
|
|
30
30
|
|
|
31
|
-
1.
|
|
31
|
+
1. Scan your CDK stacks
|
|
32
32
|
2. Show you issues it found
|
|
33
33
|
3. Provide recommendations to fix them
|
|
34
34
|
|
|
@@ -46,13 +46,41 @@ npm install --save-dev cdk-insights
|
|
|
46
46
|
```json
|
|
47
47
|
{
|
|
48
48
|
"scripts": {
|
|
49
|
-
"
|
|
50
|
-
"analyze:all": "cdk-insights analyze --all",
|
|
51
|
-
"analyze:security": "cdk-insights analyze --services IAM,S3,Lambda"
|
|
49
|
+
"cdk-insights": "node scripts/cdk-insights-wrapper.js"
|
|
52
50
|
}
|
|
53
51
|
}
|
|
54
52
|
```
|
|
55
53
|
|
|
54
|
+
**Using NPM Scripts (Recommended):**
|
|
55
|
+
|
|
56
|
+
After installing, you can use convenient npm scripts:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
# Basic scan
|
|
60
|
+
npm run scan
|
|
61
|
+
|
|
62
|
+
# Scan all stacks
|
|
63
|
+
npm run scan:all
|
|
64
|
+
|
|
65
|
+
# Different output formats
|
|
66
|
+
npm run scan:json
|
|
67
|
+
npm run scan:markdown
|
|
68
|
+
npm run scan:summary
|
|
69
|
+
|
|
70
|
+
# Setup CDK Nag integration
|
|
71
|
+
npm run cdk-insights -- setup-cdk-nag
|
|
72
|
+
|
|
73
|
+
# Install Git pre-commit hooks
|
|
74
|
+
npm run cdk-insights -- hook
|
|
75
|
+
|
|
76
|
+
# Cache management
|
|
77
|
+
npm run cdk-insights -- cache-status
|
|
78
|
+
npm run cdk-insights -- cache:clear
|
|
79
|
+
|
|
80
|
+
# Configuration
|
|
81
|
+
npm run cdk-insights -- config list
|
|
82
|
+
```
|
|
83
|
+
|
|
56
84
|
**For Personal Use:**
|
|
57
85
|
|
|
58
86
|
```bash
|
|
@@ -60,7 +88,7 @@ npm install --save-dev cdk-insights
|
|
|
60
88
|
npm install -g cdk-insights
|
|
61
89
|
|
|
62
90
|
# Use from anywhere
|
|
63
|
-
cdk-insights
|
|
91
|
+
cdk-insights scan
|
|
64
92
|
```
|
|
65
93
|
|
|
66
94
|
## 📖 How to Use CDK Insights
|
|
@@ -68,14 +96,14 @@ cdk-insights analyze
|
|
|
68
96
|
### Basic Commands
|
|
69
97
|
|
|
70
98
|
```bash
|
|
71
|
-
#
|
|
72
|
-
cdk-insights
|
|
99
|
+
# Scan a specific stack
|
|
100
|
+
cdk-insights scan MyStack
|
|
73
101
|
|
|
74
|
-
#
|
|
75
|
-
cdk-insights
|
|
102
|
+
# Scan all stacks in your project
|
|
103
|
+
cdk-insights scan --all
|
|
76
104
|
|
|
77
105
|
# Interactive mode (recommended for first time)
|
|
78
|
-
cdk-insights
|
|
106
|
+
cdk-insights scan
|
|
79
107
|
```
|
|
80
108
|
|
|
81
109
|
### What You'll See
|
|
@@ -104,19 +132,19 @@ Choose how you want to see your results:
|
|
|
104
132
|
|
|
105
133
|
```bash
|
|
106
134
|
# Table format (default) - great for quick review
|
|
107
|
-
cdk-insights
|
|
135
|
+
cdk-insights scan --output table
|
|
108
136
|
|
|
109
137
|
# Markdown format - perfect for GitHub issues and PRs
|
|
110
|
-
cdk-insights
|
|
138
|
+
cdk-insights scan --output markdown
|
|
111
139
|
|
|
112
140
|
# JSON format - ideal for CI/CD pipelines
|
|
113
|
-
cdk-insights
|
|
141
|
+
cdk-insights scan --output json
|
|
114
142
|
|
|
115
143
|
# Summary format - just the essentials
|
|
116
|
-
cdk-insights
|
|
144
|
+
cdk-insights scan --output summary
|
|
117
145
|
```
|
|
118
146
|
|
|
119
|
-
## 🔍 What Gets
|
|
147
|
+
## 🔍 What Gets Scanned
|
|
120
148
|
|
|
121
149
|
CDK Insights checks your infrastructure across these AWS services:
|
|
122
150
|
|
|
@@ -143,28 +171,28 @@ CDK Insights checks your infrastructure across these AWS services:
|
|
|
143
171
|
|
|
144
172
|
```bash
|
|
145
173
|
# Focus on security issues
|
|
146
|
-
cdk-insights
|
|
174
|
+
cdk-insights scan --services IAM,S3,KMS,SecretsManager
|
|
147
175
|
```
|
|
148
176
|
|
|
149
177
|
### Cost Optimization
|
|
150
178
|
|
|
151
179
|
```bash
|
|
152
180
|
# Find cost savings opportunities
|
|
153
|
-
cdk-insights
|
|
181
|
+
cdk-insights scan --services EC2,DynamoDB,RDS,EBS
|
|
154
182
|
```
|
|
155
183
|
|
|
156
184
|
### Before Deployments
|
|
157
185
|
|
|
158
186
|
```bash
|
|
159
|
-
# Full
|
|
160
|
-
cdk-insights
|
|
187
|
+
# Full scan before going to production
|
|
188
|
+
cdk-insights scan --all --output markdown
|
|
161
189
|
```
|
|
162
190
|
|
|
163
191
|
### In Your CI/CD Pipeline
|
|
164
192
|
|
|
165
193
|
```bash
|
|
166
194
|
# Automated checks in your deployment process
|
|
167
|
-
cdk-insights
|
|
195
|
+
cdk-insights scan --output json | jq '.summary.totalIssues'
|
|
168
196
|
```
|
|
169
197
|
|
|
170
198
|
## ⚙️ Configuration
|
|
@@ -175,7 +203,7 @@ Set your preferences once and CDK Insights will remember them:
|
|
|
175
203
|
# Set your preferred output format
|
|
176
204
|
cdk-insights config set output markdown
|
|
177
205
|
|
|
178
|
-
# Set default services to
|
|
206
|
+
# Set default services to scan
|
|
179
207
|
cdk-insights config set services IAM,S3,Lambda
|
|
180
208
|
|
|
181
209
|
# View your current settings
|
|
@@ -208,19 +236,19 @@ CDK Insights offers three flexible tiers to meet your needs:
|
|
|
208
236
|
|
|
209
237
|
**Core Features**:
|
|
210
238
|
|
|
211
|
-
- ✅ Basic static
|
|
212
|
-
- ✅ Multi-stack
|
|
239
|
+
- ✅ Basic static scanning (5 scans/month)
|
|
240
|
+
- ✅ Multi-stack scanning (10 stacks/month)
|
|
213
241
|
- ✅ Table, JSON, and Markdown output formats
|
|
214
242
|
- ✅ CLI tool access
|
|
215
|
-
- ✅ Local
|
|
243
|
+
- ✅ Local scanning
|
|
216
244
|
- ✅ Community support
|
|
217
245
|
- ✅ Basic security checks
|
|
218
246
|
- ✅ Basic reporting
|
|
219
247
|
|
|
220
248
|
**Limits**:
|
|
221
249
|
|
|
222
|
-
- 5 basic
|
|
223
|
-
- 10 multi-stack
|
|
250
|
+
- 5 basic scans per month
|
|
251
|
+
- 10 multi-stack scans per month
|
|
224
252
|
- 1 team member
|
|
225
253
|
- 5 project fingerprints
|
|
226
254
|
|
|
@@ -234,7 +262,7 @@ CDK Insights offers three flexible tiers to meet your needs:
|
|
|
234
262
|
|
|
235
263
|
**Everything in Free, plus**:
|
|
236
264
|
|
|
237
|
-
- ✅ **Unlimited** basic and multi-stack
|
|
265
|
+
- ✅ **Unlimited** basic and multi-stack scanning
|
|
238
266
|
- ✅ AI-powered recommendations (100/month)
|
|
239
267
|
- ✅ Contextual fix suggestions (100/month)
|
|
240
268
|
- ✅ Smart prioritization
|
|
@@ -245,9 +273,9 @@ CDK Insights offers three flexible tiers to meet your needs:
|
|
|
245
273
|
- ✅ GitHub integration (100 integrations/month)
|
|
246
274
|
- ✅ Team dashboards
|
|
247
275
|
- ✅ Shared configurations (10 configs)
|
|
248
|
-
- ✅ Cloud-based
|
|
249
|
-
- ✅ Parallel
|
|
250
|
-
- ✅ Caching & incremental
|
|
276
|
+
- ✅ Cloud-based scanning
|
|
277
|
+
- ✅ Parallel scanning
|
|
278
|
+
- ✅ Caching & incremental scanning
|
|
251
279
|
- ✅ Large project support (1000+ resources)
|
|
252
280
|
- ✅ Email support
|
|
253
281
|
- ✅ SOC2 & HIPAA compliance
|
|
@@ -275,7 +303,7 @@ CDK Insights offers three flexible tiers to meet your needs:
|
|
|
275
303
|
**Everything in Pro, plus**:
|
|
276
304
|
|
|
277
305
|
- ✅ **Unlimited** AI recommendations and contextual fixes
|
|
278
|
-
- ✅ Historical trend
|
|
306
|
+
- ✅ Historical trend scanning
|
|
279
307
|
- ✅ Dependency mapping
|
|
280
308
|
- ✅ Custom AI training
|
|
281
309
|
- ✅ Executive summaries
|
|
@@ -326,7 +354,7 @@ CDK Insights offers three flexible tiers to meet your needs:
|
|
|
326
354
|
|
|
327
355
|
| Feature Category | Free | Pro | Enterprise |
|
|
328
356
|
| ----------------- | --------- | ---------- | ---------- |
|
|
329
|
-
| **
|
|
357
|
+
| **Scanning** | 5/month | Unlimited | Unlimited |
|
|
330
358
|
| **AI Features** | ❌ | 100/month | Unlimited |
|
|
331
359
|
| **Team Features** | 1 user | 5 users | Unlimited |
|
|
332
360
|
| **Integrations** | Basic | GitHub | All |
|
|
@@ -343,10 +371,10 @@ Create GitHub issues directly from your findings:
|
|
|
343
371
|
|
|
344
372
|
```bash
|
|
345
373
|
# Create issues for all findings
|
|
346
|
-
cdk-insights
|
|
374
|
+
cdk-insights scan --with-issue
|
|
347
375
|
|
|
348
376
|
# Create issues for critical findings only
|
|
349
|
-
cdk-insights
|
|
377
|
+
cdk-insights scan --with-issue --rule-filter Security
|
|
350
378
|
```
|
|
351
379
|
|
|
352
380
|
## 📊 Understanding Your Results
|
|
@@ -378,9 +406,9 @@ cdk-insights analyze --with-issue --rule-filter Security
|
|
|
378
406
|
- Ensure you have read access to your CDK project files
|
|
379
407
|
- Check that your AWS credentials are configured
|
|
380
408
|
|
|
381
|
-
**"
|
|
409
|
+
**"Scan is slow"**
|
|
382
410
|
|
|
383
|
-
- Use `--services` to limit what gets
|
|
411
|
+
- Use `--services` to limit what gets scanned
|
|
384
412
|
- Try `--output summary` for faster results
|
|
385
413
|
|
|
386
414
|
### Getting Help
|
|
@@ -395,4 +423,4 @@ CDK Insights is licensed under the MIT License. Some functionality integrates wi
|
|
|
395
423
|
|
|
396
424
|
---
|
|
397
425
|
|
|
398
|
-
**Ready to improve your CDK infrastructure?** Start with `npx cdk-insights
|
|
426
|
+
**Ready to improve your CDK infrastructure?** Start with `npx cdk-insights scan` and discover what insights await! 🚀
|
package/dist/cli/entry.js
CHANGED
|
@@ -90588,8 +90588,8 @@ async function runStackAnalysis(finalConfig, fingerprint, authToken, licenseInfo
|
|
|
90588
90588
|
await runAnalysis(analysisConfig);
|
|
90589
90589
|
}
|
|
90590
90590
|
var analyzeCommand = {
|
|
90591
|
-
command: "
|
|
90592
|
-
describe: "
|
|
90591
|
+
command: "scan [stackName]",
|
|
90592
|
+
describe: "Scan CDK stacks for best practices and security issues",
|
|
90593
90593
|
builder: (yargs) => yargs.positional("stackName", {
|
|
90594
90594
|
type: "string",
|
|
90595
90595
|
describe: "Name of the stack to analyze"
|
|
@@ -90970,7 +90970,7 @@ var createHelpTable = () => {
|
|
|
90970
90970
|
colWidths: [30, 80]
|
|
90971
90971
|
});
|
|
90972
90972
|
helpTable.push(
|
|
90973
|
-
["
|
|
90973
|
+
["scan", "Scan CDK stacks for best practices and security issues"],
|
|
90974
90974
|
["synth", "Run `cdk synth` automatically before analysis"],
|
|
90975
90975
|
["hook", "Install Git pre-commit hook for CDK Insights"],
|
|
90976
90976
|
["reset", "Clear saved prompt answers and CLI preferences"],
|
|
@@ -90978,8 +90978,8 @@ var createHelpTable = () => {
|
|
|
90978
90978
|
["cache-status", "Show cache status and statistics"],
|
|
90979
90979
|
["setup-cdk-nag", "Interactive setup to add cdk-nag to your CDK project"],
|
|
90980
90980
|
["--output", "Specify output format (json, markdown, table)"],
|
|
90981
|
-
["--all", "
|
|
90982
|
-
["--services", "Comma-separated list of AWS services to
|
|
90981
|
+
["--all", "Scan all stacks"],
|
|
90982
|
+
["--services", "Comma-separated list of AWS services to scan"],
|
|
90983
90983
|
["--with-issue", "Create GitHub issues for findings"],
|
|
90984
90984
|
["--summary-only", "Only show summary in console"],
|
|
90985
90985
|
["--redact", "Redact sensitive resource names in output"],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cdk-insights",
|
|
3
|
-
"version": "0.2.0-beta.
|
|
3
|
+
"version": "0.2.0-beta.4",
|
|
4
4
|
"description": "AWS CDK security and cost analysis tool with AI-powered insights",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -53,7 +53,16 @@
|
|
|
53
53
|
"publish:latest": "npm run build && npm publish --tag latest",
|
|
54
54
|
"version:beta": "npm version prerelease --preid=beta",
|
|
55
55
|
"version:alpha": "npm version prerelease --preid=alpha",
|
|
56
|
-
"version:rc": "npm version prerelease --preid=rc"
|
|
56
|
+
"version:rc": "npm version prerelease --preid=rc",
|
|
57
|
+
"cdk-insights": "node scripts/cdk-insights-wrapper.js",
|
|
58
|
+
"scan": "node scripts/cdk-insights-wrapper.js scan",
|
|
59
|
+
"scan:all": "node scripts/cdk-insights-wrapper.js scan --all",
|
|
60
|
+
"scan:json": "node scripts/cdk-insights-wrapper.js scan --format json",
|
|
61
|
+
"scan:markdown": "node scripts/cdk-insights-wrapper.js scan --format markdown",
|
|
62
|
+
"scan:summary": "node scripts/cdk-insights-wrapper.js scan --format summary",
|
|
63
|
+
"scan:with-issues": "node scripts/cdk-insights-wrapper.js scan --withIssue",
|
|
64
|
+
"cache:clear": "node scripts/cdk-insights-wrapper.js cache clear",
|
|
65
|
+
"cache:status": "node scripts/cdk-insights-wrapper.js cache status"
|
|
57
66
|
},
|
|
58
67
|
"publishConfig": {
|
|
59
68
|
"access": "public"
|