-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathintegrated-demo.ps1
More file actions
87 lines (73 loc) · 2.74 KB
/
Copy pathintegrated-demo.ps1
File metadata and controls
87 lines (73 loc) · 2.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# Configure terminal appearance
$Host.UI.RawUI.BackgroundColor = "Black"
$Host.UI.RawUI.ForegroundColor = "White"
Clear-Host
$global:previewOpened = $false
function Write-Animated {
param(
[string]$Text,
[string]$ForegroundColor = "White",
[int]$Speed = 30
)
$Text.ToCharArray() | ForEach-Object {
Write-Host $_ -NoNewline -ForegroundColor $ForegroundColor
Start-Sleep -Milliseconds $Speed
}
Write-Host
}
# Header
Write-Host "`n"
Write-Host " CloudGuardStack Security Analysis" -ForegroundColor Cyan
Write-Host "Initializing security assessment..." -ForegroundColor Yellow
Start-Sleep -Seconds 1
# Stage 1: IAM Analysis
Write-Host "`n Running IAM Security Scan..." -ForegroundColor Green
python scanners/iam_entitlement/demo_generator.py
Start-Sleep -Seconds 1
# Render initial graphs (IAM) in terminal
Write-Host "`n→ Rendering IAM Analysis Graphs..." -ForegroundColor Magenta
python scripts/render_demo_graphs.py
Start-Sleep -Seconds 1
# Stage 2: Storage Analysis
Write-Host "`n Analyzing Storage Security..." -ForegroundColor Green
python scanners/storage_auditor/demo_generator.py --include-remediation-plan
Start-Sleep -Seconds 1
# Render updated graphs in terminal with storage analysis
Write-Host "`n→ Rendering Storage Analysis Graphs..." -ForegroundColor Magenta
python scripts/render_demo_graphs.py
Start-Sleep -Seconds 1
# Stage 3: Results Summary
Write-Host "`n"
Write-Host "" -ForegroundColor Cyan
Write-Host " Critical Security Findings" -ForegroundColor Red
Write-Host "" -ForegroundColor Cyan
$findings = @(
@{Text=" High-Risk Admin Account Detected"; Details="Unrestricted access, immediate action required"},
@{Text=" Public Storage Buckets: 3"; Details="Exposed to internet access"},
@{Text=" Sensitive Data Exposed"; Details="Credentials found in config files"},
@{Text=" Configuration Issues: 4"; Details="Non-compliant security settings"}
)
foreach ($finding in $findings) {
Write-Host $finding.Text -ForegroundColor Red
Write-Host " $($finding.Details)" -ForegroundColor DarkGray
Start-Sleep -Milliseconds 800
}
# Stage 4: Remediation Plan
Write-Host "`n"
Write-Host "" -ForegroundColor Green
Write-Host " Generated Remediation Plan" -ForegroundColor Green
Write-Host "" -ForegroundColor Green
$remediation = @(
"1. Implement least-privilege access model",
"2. Secure public storage endpoints",
"3. Encrypt sensitive configurations",
"4. Apply security baseline"
)
foreach ($step in $remediation) {
Write-Host " $step" -ForegroundColor Green
Start-Sleep -Milliseconds 600
}
# Completion
Write-Host "`n"
Write-Host " Security Analysis Complete" -ForegroundColor Cyan
Write-Host "Security Analysis Complete - Report Generated" -ForegroundColor DarkGray