mirror of
https://github.com/db9979/sshtermy.git
synced 2026-12-06 04:34:08 +01:00
* Absicherung: Tests auf Windows/macOS, govulncheck, Dependabot, Fuzz-Tests, Signatur-Anleitung - CI: Job platforms (windows-latest, macos-latest), vuln (govulncheck), fuzz (15 s je Ziel) - Go immer neuester 1.26-Patch (check-latest) statt fest 1.26.0 - Dependabot für Go-Module und Actions (wöchentlich, gruppiert) - Fuzz-Tests: Terminal-Emulator, Bildsequenzen, Telnet, PPK, LLDP/ARP/MAC, Import, Host-Übersicht, trzsz-Dateinamen - PPK: Argon2-Werte aus der Datei begrenzt (1 GiB, 1000 Durchläufe) - release.yml: Warnung bei unsigniertem Release, Abbruch bei Public Key ohne Secret - docs/signatur.md, make fuzz / make vuln Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUifSEzjZLFvqVjcUxz * Signatur-Anleitung: keygen im Repository-Ordner ausführen Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUifSEzjZLFvqVjcUxz * Host-Übersicht macOS: Laufzeit aus kern.boottime richtig lesen (sed nahm usec statt sec) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUifSEzjZLFvqVjcUxz * Import ssh_config: Include nur normale Dateien bis 1 MiB, höchstens 64 (Fuzz-Fund: Import hing) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUifSEzjZLFvqVjcUxz * Windows: Switch-Auflegen auch bei WSAECONNRESET erkennen, Latenz nie 0; Tests plattformfest - isHangup: WSAECONNRESET/WSAECONNABORTED per Fehlercode (deutscher Windows-Text half der Textsuche nicht) - Keepalive-Latenz mindestens 1 ns (Windows-Uhr gröber als localhost-Rundreise) - Tests: USERPROFILE neben HOME, Unix-Rechte nur außerhalb Windows prüfen, Server-Skript-Test nicht unter Git-Bash, Windows-Pfad mit Laufwerk Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUifSEzjZLFvqVjcUxz * Sixel: Zahlen deckeln (Fuzz-Fund: überlaufende Wiederholung hielt das Terminal Sekunden bis endlos fest) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUifSEzjZLFvqVjcUxz * Eigenes Fenster (Windows): Named Pipe mit Puffer, Schreiben blockiert nicht mehr bis zum Lesen Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018i4GUifSEzjZLFvqVjcUxz --------- Co-authored-by: Claude <noreply@anthropic.com>
50 lines
1.6 KiB
Go
50 lines
1.6 KiB
Go
package termemu
|
|
|
|
import (
|
|
"io"
|
|
"testing"
|
|
)
|
|
|
|
// FuzzImageFilter: Bildsequenzen (Sixel, kitty, iTerm2) kommen ungeprüft vom
|
|
// Server. Kein Absturz, kein Hängen, auch wenn sie in zwei Teilen ankommen.
|
|
func FuzzImageFilter(f *testing.F) {
|
|
f.Add([]byte("\x1bPq#0;2;100;0;0#0~~~~-~~~~\x1b\\"), 5)
|
|
f.Add([]byte("\x1b_Ga=T,f=100;iVBORw0KGgo=\x1b\\"), 3)
|
|
f.Add([]byte("\x1b_Ga=t,i=7,m=1;AAAA\x1b\\\x1b_Gm=0;AAAA\x1b\\\x1b_Ga=p,i=7\x1b\\"), 20)
|
|
f.Add([]byte("\x1b]1337;File=inline=1;width=5:R0lGODlhAQABAAAAACw=\x07"), 9)
|
|
f.Add([]byte("\x1bP0;1;0q\"1;1;4000;4000#1;1;360;50;100!4000~\x1b\\"), 1)
|
|
f.Fuzz(func(t *testing.T, b []byte, cut int) {
|
|
fl := &imageFilter{
|
|
size: func() (int, int) { return 80, 24 },
|
|
col: func() int { return 0 },
|
|
reply: func([]byte) {},
|
|
}
|
|
if cut < 0 {
|
|
cut = -cut
|
|
}
|
|
cut %= len(b) + 1
|
|
fl.filter(b[:cut])
|
|
fl.filter(b[cut:])
|
|
decodeSixel(b)
|
|
})
|
|
}
|
|
|
|
// FuzzTerm: beliebige Bytes vom Server durch den ganzen Emulator, mit
|
|
// Größenänderung dazwischen und Lesen des Bildschirms danach.
|
|
func FuzzTerm(f *testing.F) {
|
|
f.Add([]byte("\x1b[2J\x1b[1;1Hhallo\x1b[38;2;1;2;3mfarbe\x1b[0m\r\n\x1b[?1049h\x1b[5n\x1b]52;c;aGFsbG8=\x07"), uint8(40), uint8(10))
|
|
f.Add([]byte("\x1b[999;999H\x1b[3J\x1b]0;titel\x07\x1b[?2004h\x1b[c\x1b]133;D;1\x07"), uint8(1), uint8(1))
|
|
f.Fuzz(func(t *testing.T, b []byte, w, h uint8) {
|
|
tm := New(80, 24, io.Discard)
|
|
defer tm.Close()
|
|
half := len(b) / 2
|
|
_, _ = tm.Write(b[:half])
|
|
tm.Resize(int(w%200)+1, int(h%100)+1)
|
|
_, _ = tm.Write(b[half:])
|
|
tm.View("", func(s string) string { return s })
|
|
tm.PlainLines(50)
|
|
tm.TypedInput()
|
|
tm.TakeClipboard()
|
|
})
|
|
}
|