-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdemo.tape
More file actions
105 lines (80 loc) · 2.76 KB
/
demo.tape
File metadata and controls
105 lines (80 loc) · 2.76 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# Rafter CLI — Golden Path Demo
# Renders to demo.gif for README, docs, and social.
# Requires: node >=18, git, vhs
#
# Usage:
# vhs demo.tape # renders demo.gif
#
# NOTE: The fake AWS key is split across two printf args so this file
# itself passes Rafter's secret scanner. It reassembles at runtime.
Output demo.gif
Require git
Require node
Require npm
Set Shell "bash"
Set FontSize 22
Set Width 1200
Set Height 700
Set Padding 20
Set Theme "Dracula"
Set TypingSpeed 40ms
Set WindowBar Colorful
# ── 0. Hidden setup ──────────────────────────────────────────────
# Clean prompt, git identity, temp dir — all invisible to viewer.
Hide
Type "PS1='demo> '"
Enter
Type "export GIT_AUTHOR_NAME='Demo' GIT_AUTHOR_EMAIL='demo@example.com'"
Enter
Type "export GIT_COMMITTER_NAME='Demo' GIT_COMMITTER_EMAIL='demo@example.com'"
Enter
Type "DEMO=$(mktemp -d) && cd $DEMO && git init -q ."
Enter
Type "K1=AKIAIOSF K2=ODNN7EXAMPLE"
Enter
Type "> ~/.rafter/audit.jsonl && clear"
Enter
Sleep 2s
Show
Type "# Rafter — catch secrets before they ship"
Enter
Sleep 1.5s
# ── 1. Plant a fake secret ───────────────────────────────────────
# Key split across printf args so this .tape passes secret scanning.
Type '# 1. A developer drops an AWS key into a config file'
Enter
Type `echo "AWS_ACCESS_KEY_ID=${K1}${K2}" > config.env`
Enter
Type "cat config.env"
Enter
Sleep 1s
# ── 2. Install Rafter ────────────────────────────────────────────
Type "# 2. Install Rafter"
Enter
Type "npm install -g @rafter-security/cli 2>&1 | tail -1"
Enter
Sleep 15s
# ── 3. Scan — shows redacted finding + nonzero exit ──────────────
Type "# 3. Scan for secrets"
Enter
Type 'rafter scan local . ; echo "^ exit code: $?"'
Enter
Sleep 5s
# ── 4. Install pre-commit hook ────────────────────────────────────
Type "# 4. Install the pre-commit hook"
Enter
Sleep 500ms
Type "rafter agent install-hook"
Enter
Sleep 2s
# ── 5. Attempt commit — blocked ──────────────────────────────────
Type "# 5. Try to commit — the hook blocks it"
Enter
Sleep 500ms
Type "git add config.env && git commit -m 'add config'"
Enter
Sleep 5s
# ── 6. Closing ────────────────────────────────────────────────────
Type "# Secrets caught. Commit blocked. That's Rafter."
Enter
Sleep 5s