-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdemo.sh
More file actions
executable file
·68 lines (54 loc) · 1.89 KB
/
Copy pathdemo.sh
File metadata and controls
executable file
·68 lines (54 loc) · 1.89 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
#!/usr/bin/env bash
set -euo pipefail
BOLD='\033[1m'
DIM='\033[2m'
GREEN='\033[32m'
CYAN='\033[36m'
RESET='\033[0m'
echo -e "${BOLD}=== Signet Interactive Demo ===${RESET}"
echo ""
# 1. Generate identity
echo -e "${CYAN}1. Generating agent identity...${RESET}"
signet identity generate --name demo-agent --unencrypted 2>/dev/null || true
signet identity export --name demo-agent
echo ""
# 2. Sign tool calls with different tools
echo -e "${CYAN}2. Signing tool calls...${RESET}"
signet sign --key demo-agent --tool "Bash" \
--params '{"command":"pip install flask"}' \
--target "mcp://local" > /dev/null
echo -e " ${GREEN}✓${RESET} Bash: pip install flask"
signet sign --key demo-agent --tool "Write" \
--params '{"path":"app.py","content":"from flask import Flask"}' \
--target "mcp://local" > /dev/null
echo -e " ${GREEN}✓${RESET} Write: app.py"
signet sign --key demo-agent --tool "Bash" \
--params '{"command":"python app.py"}' \
--target "mcp://local" > /dev/null
echo -e " ${GREEN}✓${RESET} Bash: python app.py"
signet sign --key demo-agent --tool "Read" \
--params '{"path":"/etc/hosts"}' \
--target "mcp://filesystem" > /dev/null
echo -e " ${GREEN}✓${RESET} Read: /etc/hosts"
signet sign --key demo-agent --tool "github_create_issue" \
--params '{"title":"fix auth bug","body":"details"}' \
--target "mcp://github.local" > /dev/null
echo -e " ${GREEN}✓${RESET} github_create_issue: fix auth bug"
echo ""
# 3. Query audit log
echo -e "${CYAN}3. Audit log:${RESET}"
signet audit --since 1h
echo ""
# 4. Verify chain
echo -e "${CYAN}4. Verifying chain integrity...${RESET}"
signet verify --chain
echo ""
# 5. Verify signatures
echo -e "${CYAN}5. Verifying all signatures...${RESET}"
signet audit --verify
echo ""
# 6. Launch dashboard
echo -e "${CYAN}6. Launching dashboard on port 8384...${RESET}"
echo -e "${DIM} Press Ctrl+C to stop${RESET}"
echo ""
signet dashboard --port 8384