scv-bilara 3.181.1 → 3.182.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scv-bilara",
3
- "version": "3.181.1",
3
+ "version": "3.182.2",
4
4
  "description": "SuttaCentral bilara-data library",
5
5
  "main": "index.js",
6
6
  "directories": {
@@ -15,7 +15,7 @@
15
15
  "log-instance": "^1.6.0",
16
16
  "memo-again": "^0.10.0",
17
17
  "merkle-json": "^2.2.0",
18
- "scv-esm": "^1.115.837",
18
+ "scv-esm": "^1.115.838",
19
19
  "suttacentral-api": "^2.17.67",
20
20
  "tmp": "^0.2.3"
21
21
  },
@@ -0,0 +1,315 @@
1
+ #!/bin/bash
2
+
3
+ # SSH Quantum Safety Evaluation Script
4
+ # Evaluates local computer's SSH quantum safety compliance with GitHub 2025 guidelines
5
+ #
6
+ # Usage:
7
+ # ./ssh-quantum-safety.sh (check system SSH capabilities only)
8
+ # ./ssh-quantum-safety.sh --check-certificates (also check local SSH key types)
9
+ # ./ssh-quantum-safety.sh --reference (show GitHub documentation reference)
10
+ # ./ssh-quantum-safety.sh --intro (show non-technical summary)
11
+
12
+ check_certificates=false
13
+
14
+ # Function to print intro
15
+ print_intro() {
16
+ cat <<'EOF'
17
+ ## GitHub SSH Quantum Security Update - What You Need to Know
18
+
19
+ **The Problem:**
20
+ GitHub updated their security in September 2025 to protect your code
21
+ from a future threat. Hackers could theoretically record your SSH
22
+ connections and store them. If quantum computers become powerful enough
23
+ (which experts expect in 10-20+ years), they could decrypt those old
24
+ recordings and access your data. This is called a "store now, decrypt
25
+ later" attack.
26
+
27
+ **The Solution:**
28
+ GitHub added a new, stronger type of encryption to SSH connections that
29
+ even quantum computers won't be able to break. It's a hybrid approach
30
+ that combines old, trusted methods with new quantum-resistant methods.
31
+
32
+ **What You Need to Do:**
33
+ This program will help you evaluate your system for safe Github access:
34
+
35
+ 1. It will check your OpenSSH version: ssh -V
36
+ - If it says 9.0 or newer: You're good. Nothing to do.
37
+ - If it says 8.x or older: Update OpenSSH to version 9.0 or newer
38
+
39
+ 2. It will verify you have the new algorithm available: ssh -Q kex
40
+ - Look for sntrup761x25519-sha512 in the output
41
+ - If it's there: ✓ You have quantum-safe protection
42
+ - If it's not there: Update OpenSSH
43
+
44
+ 3. It can (with your permission) also check your SSL certificates
45
+
46
+ The script will give recommendations about any action you should take
47
+ EOF
48
+ }
49
+
50
+ # Parse arguments
51
+ while [[ $# -gt 0 ]]; do
52
+ case $1 in
53
+ --check-certificates)
54
+ check_certificates=true
55
+ shift
56
+ ;;
57
+ --reference)
58
+ cat <<'EOF'
59
+ ## GitHub SSH Quantum-Safe Change (September 2025)
60
+
61
+ **Algorithm:** `sntrup761x25519-sha512`
62
+ - Hybrid: Streamlined NTRU Prime (post-quantum) + X25519 (classical)
63
+ - Protects against "store now, decrypt later" attacks from future quantum computers
64
+
65
+ **Rollout:**
66
+ - September 17, 2025 on GitHub.com and GitHub Enterprise Cloud
67
+ - Excluded US region (requires FIPS-approved cryptography)
68
+ - Included in GitHub Enterprise Server 3.19
69
+
70
+ **Requirements:**
71
+ - OpenSSH 9.0+ (automatic support)
72
+ - Older clients fall back gracefully to existing algorithms
73
+
74
+ **What You Need to Do:**
75
+ Most users: nothing. Just verify with `ssh -Q kex` that you see the post-quantum algorithms.
76
+
77
+ **See:** https://github.blog/engineering/platform-security/post-quantum-security-for-ssh-access-on-github/
78
+ EOF
79
+ exit 0
80
+ ;;
81
+ --intro)
82
+ print_intro
83
+ exit 0
84
+ ;;
85
+ *)
86
+ echo "Unknown option: $1"
87
+ echo "Usage: $0 [--check-certificates] [--reference] [--summary]"
88
+ exit 1
89
+ ;;
90
+ esac
91
+ done
92
+
93
+ set -e
94
+
95
+ RED='\033[0;31m'
96
+ YELLOW='\033[1;33m'
97
+ GREEN='\033[0;32m'
98
+ BLUE='\033[0;34m'
99
+ NC='\033[0m' # No Color
100
+
101
+ # Track findings
102
+ has_post_quantum=false
103
+ openssh_version=""
104
+ openssh_major=""
105
+ openssh_minor=""
106
+ post_quantum_algos=()
107
+ key_types=()
108
+ issues=()
109
+ recommendations=()
110
+
111
+ # Function to check OpenSSH version
112
+ check_openssh_version() {
113
+ echo -e "${BLUE}1. OpenSSH Version${NC}"
114
+ local openssh_full=$(ssh -V 2>&1)
115
+ echo " $openssh_full"
116
+
117
+ openssh_version=$(echo "$openssh_full" | grep -oE 'OpenSSH_[0-9.]+' | grep -oE '[0-9.]+' | head -1)
118
+ openssh_major=$(echo "$openssh_version" | cut -d. -f1)
119
+ openssh_minor=$(echo "$openssh_version" | cut -d. -f2)
120
+
121
+ if [[ $openssh_major -gt 9 ]] || [[ $openssh_major -eq 9 && $openssh_minor -ge 0 ]]; then
122
+ echo -e " ${GREEN}✓ OpenSSH $openssh_version supports post-quantum algorithms${NC}"
123
+ has_post_quantum=true
124
+ else
125
+ echo -e " ${RED}✗ OpenSSH $openssh_version is too old (9.0+ required)${NC}"
126
+ issues+=("OpenSSH version $openssh_version does not support post-quantum algorithms")
127
+ recommendations+=("Upgrade to OpenSSH 9.0 or newer")
128
+ fi
129
+
130
+ echo ""
131
+ }
132
+
133
+ # Function to check available key exchange algorithms
134
+ check_kex_algorithms() {
135
+ echo -e "${BLUE}2. Available Key Exchange Algorithms${NC}"
136
+ local all_kex=$(ssh -Q kex)
137
+
138
+ # Check for post-quantum algorithms
139
+ if echo "$all_kex" | grep -q "sntrup761x25519-sha512"; then
140
+ post_quantum_algos+=("sntrup761x25519-sha512")
141
+ echo -e " ${GREEN}✓ sntrup761x25519-sha512 (NTRU Prime hybrid)${NC}"
142
+ fi
143
+
144
+ if echo "$all_kex" | grep -q "mlkem768x25519-sha256"; then
145
+ post_quantum_algos+=("mlkem768x25519-sha256")
146
+ echo -e " ${GREEN}✓ mlkem768x25519-sha256 (ML-KEM hybrid)${NC}"
147
+ fi
148
+
149
+ if [[ ${#post_quantum_algos[@]} -eq 0 ]]; then
150
+ echo -e " ${RED}✗ No post-quantum key exchange algorithms found${NC}"
151
+ issues+=("No post-quantum key exchange algorithms available")
152
+ recommendations+=("Upgrade OpenSSH to 9.0 or newer")
153
+ else
154
+ echo -e " ${GREEN}✓ Found ${#post_quantum_algos[@]} post-quantum algorithm(s)${NC}"
155
+ fi
156
+
157
+ echo ""
158
+ }
159
+
160
+ # Function to run interview mode
161
+ run_interview() {
162
+ echo -e "${BLUE}=== SSH Quantum Safety Evaluation ===${NC}\n"
163
+
164
+ echo -e "${BLUE}"
165
+ PMT="Let's start with an introduction to this tool [ENTER]:"
166
+ read -p "$PMT"
167
+ echo -e "${NC}"
168
+ print_intro
169
+ echo ""
170
+
171
+ echo -e "${BLUE}"
172
+ PMT="Let's check your ssh version [ENTER]:"
173
+ read -p "$PMT"
174
+ echo -e "${NC}"
175
+ check_openssh_version
176
+ echo ""
177
+
178
+ echo -e "${BLUE}"
179
+ PMT="Let's check your ssh algorithms [ENTER]:"
180
+ read -p "$PMT"
181
+ echo -e "${NC}"
182
+ check_kex_algorithms
183
+ echo ""
184
+
185
+ echo -e "${BLUE}"
186
+ PMT="Review summary of your test results [ENTER]:"
187
+ read -p "$PMT"
188
+ echo -e "${NC}"
189
+ echo ""
190
+ }
191
+
192
+ # Function to check local SSH key types
193
+ check_ssh_keys() {
194
+ echo -e "${BLUE}3. Local SSH Key Types${NC}"
195
+
196
+ if [[ ! -d ~/.ssh ]]; then
197
+ echo -e " ${YELLOW}⚠ No ~/.ssh directory found${NC}"
198
+ recommendations+=("Generate SSH keys if needed")
199
+ else
200
+ key_count=0
201
+ has_weak_keys=false
202
+ has_modern_keys=false
203
+
204
+ for keyfile in ~/.ssh/*.pub; do
205
+ if [[ ! -f "$keyfile" ]]; then
206
+ continue
207
+ fi
208
+
209
+ key_count=$((key_count + 1))
210
+ key_type=$(ssh-keygen -l -f "$keyfile" 2>/dev/null | awk '{print $NF}' | tr -d '()')
211
+ key_name=$(basename "$keyfile")
212
+
213
+ case "$key_type" in
214
+ ED25519)
215
+ echo -e " ${GREEN}✓ $key_name: ED25519 (excellent)${NC}"
216
+ has_modern_keys=true
217
+ key_types+=("ED25519")
218
+ ;;
219
+ ECDSA)
220
+ echo -e " ${GREEN}✓ $key_name: ECDSA (good)${NC}"
221
+ has_modern_keys=true
222
+ key_types+=("ECDSA")
223
+ ;;
224
+ RSA)
225
+ # Check RSA key size
226
+ key_bits=$(ssh-keygen -l -f "$keyfile" 2>/dev/null | awk '{print $1}')
227
+ if [[ $key_bits -ge 2048 ]]; then
228
+ echo -e " ${YELLOW}⚠ $key_name: RSA-$key_bits (acceptable but older)${NC}"
229
+ key_types+=("RSA-$key_bits")
230
+ else
231
+ echo -e " ${RED}✗ $key_name: RSA-$key_bits (too weak, minimum 2048)${NC}"
232
+ has_weak_keys=true
233
+ issues+=("RSA key $key_name is less than 2048 bits")
234
+ fi
235
+ ;;
236
+ DSA|ssh-dss)
237
+ echo -e " ${RED}✗ $key_name: DSA (DEPRECATED by GitHub)${NC}"
238
+ has_weak_keys=true
239
+ issues+=("DSA key $key_name is deprecated and cannot be used with GitHub")
240
+ recommendations+=("Replace $key_name with ED25519 or ECDSA key")
241
+ ;;
242
+ *)
243
+ echo -e " ${YELLOW}⚠ $key_name: Unknown type ($key_type)${NC}"
244
+ ;;
245
+ esac
246
+ done
247
+
248
+ if [[ $key_count -eq 0 ]]; then
249
+ echo -e " ${YELLOW}⚠ No SSH public keys found in ~/.ssh${NC}"
250
+ recommendations+=("Generate SSH keys: ssh-keygen -t ed25519 -C 'your_email@example.com'")
251
+ fi
252
+ fi
253
+
254
+ echo ""
255
+ }
256
+
257
+ # Run interview first
258
+ run_interview
259
+
260
+ # Call function only if --check-certificates flag was passed
261
+ if [[ $check_certificates == true ]]; then
262
+ check_ssh_keys
263
+ else
264
+ echo -e "${BLUE}3. Local SSH Key Types${NC}"
265
+ echo -e " ${YELLOW}⚠ Not checked (use --check-certificates to enable)${NC}"
266
+ echo ""
267
+ fi
268
+
269
+ # 4. Summary and recommendations
270
+ echo -e "${BLUE}Quantum Safety Assessment${NC}"
271
+
272
+ if [[ ${#issues[@]} -eq 0 ]]; then
273
+ echo -e " ${GREEN}✓ Full post-quantum safety compliance${NC}"
274
+ echo -e " ${GREEN}✓ Your SSH setup meets GitHub 2025 guidelines${NC}"
275
+ safety_level="FULL"
276
+ elif [[ $has_post_quantum == true ]]; then
277
+ echo -e " ${YELLOW}⚠ Partial post-quantum safety${NC}"
278
+ echo -e " ${YELLOW}Your system supports post-quantum algorithms, but has some issues${NC}"
279
+ safety_level="PARTIAL"
280
+ else
281
+ echo -e " ${RED}✗ No post-quantum safety${NC}"
282
+ safety_level="NONE"
283
+ fi
284
+
285
+ echo ""
286
+ echo -e "${BLUE}5. Recommendations${NC}"
287
+
288
+ if [[ ${#recommendations[@]} -eq 0 ]]; then
289
+ echo -e " ${GREEN}✓ No action required${NC}"
290
+ else
291
+ for ((i=0; i<${#recommendations[@]}; i++)); do
292
+ echo -e " $((i+1)). ${recommendations[$i]}"
293
+ done
294
+ fi
295
+
296
+ echo ""
297
+ echo -e "${BLUE}=== Summary ===${NC}"
298
+ echo "OpenSSH Version: $openssh_version"
299
+ echo "Post-Quantum Algorithms: ${#post_quantum_algos[@]} available"
300
+ echo "Safety Level: $safety_level"
301
+ echo ""
302
+
303
+ if [[ ${#issues[@]} -gt 0 ]]; then
304
+ echo -e "${RED}Issues Found:${NC}"
305
+ for ((i=0; i<${#issues[@]}; i++)); do
306
+ echo -e " $((i+1)). ${issues[$i]}"
307
+ done
308
+ echo ""
309
+ fi
310
+
311
+ if [[ ${#issues[@]} -eq 0 ]]; then
312
+ exit 0
313
+ else
314
+ exit 1
315
+ fi