-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
77 lines (63 loc) · 2.07 KB
/
Copy pathsetup.sh
File metadata and controls
77 lines (63 loc) · 2.07 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
#!/bin/bash
set -e
echo "🎯 SIN-Code-Security-Bundle Setup"
echo "================================="
# Check Python
if ! command -v python3 &> /dev/null; then
echo "❌ Python 3 nicht gefunden."
exit 1
fi
echo "✅ Python 3: $(python3 --version)"
# Check Go
if ! command -v go &> /dev/null; then
echo "⚠️ Go nicht gefunden. Für CLI bitte installieren: https://go.dev/dl/"
else
echo "✅ Go: $(go version)"
fi
# Create virtual environment
echo "📦 Erstelle virtuelle Umgebung..."
python3 -m venv venv
source venv/bin/activate
# Install Python dependencies
echo "📦 Installiere Python-Dependencies..."
pip install --upgrade pip
pip install -r requirements.txt
# Install all sub-tools
echo "🔧 Installiere Security-Tools..."
# SCA Tool
echo " 📦 SCA Tool..."
pip install osv-scanner || echo " ⚠️ osv-scanner optional"
# Container Tool
echo " 🐳 Container Tool..."
if ! command -v trivy &> /dev/null; then
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin v0.50.1 || echo " ⚠️ Trivy installation failed"
fi
# IaC Tool
echo " 🏗️ IaC Tool..."
pip install checkov || echo " ⚠️ Checkov optional"
# License Tool
echo " 📜 License Tool..."
pip install scancode-toolkit || echo " ⚠️ ScanCode optional"
# DAST Tool
echo " 🎯 DAST Tool..."
if command -v go &> /dev/null; then
go install github.com/projectdiscovery/nuclei/v3/cmd/nuclei@latest || echo " ⚠️ Nuclei optional"
fi
# Build Go CLI
if command -v go &> /dev/null; then
echo "🔨 Baue Go CLI..."
make build
fi
echo ""
echo "✅ Setup abgeschlossen!"
echo ""
echo "📖 Nächste Schritte:"
echo " 1. Aktiviere venv: source venv/bin/activate"
echo " 2. Starte MCP Server: python src/server.py"
echo " 3. Oder nutze CLI: ./bin/sin-security scan ./project --full"
echo ""
echo "🎯 Beispiel-Scans:"
echo " sin-security scan ./my-project --full"
echo " sin-security compliance ./my-project --frameworks cis,nist"
echo " sin-security executive-report ./my-project --format pdf"
echo ""