-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest_security_integration.sh
More file actions
executable file
·45 lines (31 loc) · 1.47 KB
/
test_security_integration.sh
File metadata and controls
executable file
·45 lines (31 loc) · 1.47 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
#!/bin/bash
# Test script for TinyBrain Security Knowledge Hub integration
echo "🧠 Testing TinyBrain Security Knowledge Hub Integration"
echo "=================================================="
# Function to send JSON-RPC request
send_request() {
local method="$1"
local params="$2"
local id="$3"
echo "📤 Sending request: $method"
echo "📋 Params: $params"
echo "{\"jsonrpc\": \"2.0\", \"id\": $id, \"method\": \"$method\", \"params\": $params}" | ./tinybrain
echo ""
}
echo "1️⃣ Testing Security Data Summary..."
send_request "get_security_data_summary" "{}" 1
echo "2️⃣ Testing NVD Data Download (small test)..."
send_request "download_security_data" "{\"data_source\": \"nvd\"}" 2
echo "3️⃣ Testing ATT&CK Data Download..."
send_request "download_security_data" "{\"data_source\": \"attack\"}" 3
echo "4️⃣ Testing OWASP Data Download..."
send_request "download_security_data" "{\"data_source\": \"owasp\"}" 4
echo "5️⃣ Testing Security Data Summary After Downloads..."
send_request "get_security_data_summary" "{}" 5
echo "6️⃣ Testing NVD Query..."
send_request "query_nvd" "{\"query\": \"SQL injection\", \"limit\": 5}" 6
echo "7️⃣ Testing ATT&CK Query..."
send_request "query_attack" "{\"query\": \"process injection\", \"limit\": 5}" 7
echo "8️⃣ Testing OWASP Query..."
send_request "query_owasp" "{\"query\": \"authentication\", \"limit\": 5}" 8
echo "✅ Security Knowledge Hub Integration Test Complete!"