Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
with:
persist-credentials: false

- uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
- uses: ossf/scorecard-action@fa7117db83c52d787ae5a89f350999701505d78e # v2.5.0
with:
results_file: results.sarif
results_format: sarif
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@

All notable changes to hp (hittyping) will be documented in this file.

## [0.8.9] - 2026-11-15

### Security

- Container image builds with Go 1.27.4 (`golang:1.27-alpine`); the pinned 1.26 image was Go 1.26.3, which lacks stdlib fixes such as GO-2026-5026 and GO-2026-5942 (fixed in 1.26.6). Release binaries were already built with the latest stable Go
- `go` directive 1.26.2 → 1.27.4, so scanners no longer read the stdlib as vulnerable
- Bump `golang.org/x/crypto` 0.58.0 → 0.59.0 (GO-2026-5932, not reachable from hp), `x/sys` 0.50.0, `x/text` 0.44.0
- CI: `ossf/scorecard-action` v2.4.0 → v2.5.0; v2.4.0 pulls its image from gcr.io, which now fails, so Scorecard had not run since before v0.8.7 and showed fixed advisories

### Changed

- `just verify-release` and `just verify-installed` download into a temp dir instead of the checkout; `just test-verify` checks it

## [0.8.8] - 2026-11-15

### Added
Expand Down
4 changes: 3 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ just lint # Run golangci-lint
just vuln # Run vulnerability check
just ci # Local CI (lint, vuln, test)
just clean # Remove binary
just verify-release # Download + cosign-verify the latest release (into a temp dir, never the checkout)
just test-verify # Check both verify recipes pass and leave the checkout unchanged (network, cosign)
```

Or directly with Go:
Expand Down Expand Up @@ -85,7 +87,7 @@ HTTPS_PROXY=socks5://host:port hp cloudflare.com # Via SOCKS5 proxy

## Architecture

Go application using `spf13/pflag` for POSIX-style CLI flags. Uses latest stable Go (currently 1.26).
Go application using `spf13/pflag` for POSIX-style CLI flags. Uses latest stable Go (currently 1.27).

Key functions:

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.26-alpine@sha256:91eda9776261207ea25fd06b5b7fed8d397dd2c0a283e77f2ab6e91bfa71079d AS builder
FROM golang:1.27-alpine@sha256:eb61c3873c97416fff0116553fff65d67a3549f72e11d9758849a689cdd8b523 AS builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
Expand Down
6 changes: 6 additions & 0 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ If hp evolves toward interactive features, consider migrating to [Bubble Tea](ht

## Completed

### v0.8.9 - Security Refresh

- [x] Container image on Go 1.27.4; go directive 1.27.4; x/crypto v0.59.0
- [x] Scorecard action v2.5.0 (gcr.io image pull was failing)
- [x] Verify recipes download into a temp dir

### v0.8.8 - Fixed-Rate Sending & Agent Skill

- [x] Fixed-rate sending like ping: one glyph per interval, also during outages; time-based loss %
Expand Down
3 changes: 3 additions & 0 deletions docs/release-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ The release workflow will:
# View the release
command gh release view vX.Y.Z

# Verify the signed binary (downloads into a temp dir and prints its path)
just verify-release

# Check container image exists
docker manifest inspect ghcr.io/colangelo/hp:vX.Y.Z

Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
module github.com/ac/hp

go 1.26.2
go 1.27.4

require (
github.com/quic-go/quic-go v0.65.0
github.com/spf13/pflag v1.0.10
golang.org/x/sys v0.49.0
golang.org/x/sys v0.50.0
)

require (
github.com/quic-go/qpack v0.6.0 // indirect
golang.org/x/crypto v0.58.0 // indirect
golang.org/x/crypto v0.59.0 // indirect
golang.org/x/net v0.62.0 // indirect
golang.org/x/text v0.43.0 // indirect
golang.org/x/text v0.44.0 // indirect
)
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ go.uber.org/mock v0.5.2 h1:LbtPTcP8A5k9WPXj54PPPbjcI4Y6lhyOZXn+VS7wNko=
go.uber.org/mock v0.5.2/go.mod h1:wLlUxC2vVTPTaE3UD51E0BGOAElKrILxhVSDYQLld5o=
go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw=
go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg=
golang.org/x/crypto v0.58.0 h1:COkYLr4k7nDI4r6QtMML2AfzeIswWHAJthLS6K/M/54=
golang.org/x/crypto v0.58.0/go.mod h1:Xh+kl5A+M0gMiWDytH2Hhr5Z7WbNCpv/eB/EFgfSk+w=
golang.org/x/crypto v0.59.0 h1:xS2jhqYbzNrpvkWP2YTDf4TJwBy3ykR03i8vFDxEc7c=
golang.org/x/crypto v0.59.0/go.mod h1:veDyUwATGs3c+vN3VfTbzViMGXeTBk3WyhBOkn+F/4U=
golang.org/x/net v0.62.0 h1:18ELalfM5+XNRwzM2nYqXsZQ9ByS1uhj2O/U7+5jqRY=
golang.org/x/net v0.62.0/go.mod h1:WgDCOTH8iwtB66T4/GfI94AHo/hhdb7Hah9NDseQfiI=
golang.org/x/sys v0.49.0 h1:XbzkgYJHdqh/8m2Uu0W/dQv8nktxx4BFHp1M0gROTXA=
golang.org/x/sys v0.49.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og=
golang.org/x/text v0.43.0 h1:1QivrlhwAsnMOcqgOdl9my7s9OyZl8O5/UGUTJVXoWc=
golang.org/x/text v0.43.0/go.mod h1:hbSIYA/amXcRXTFSZqh8tWHEoqRvvbKPJ2uz/KU+a+s=
golang.org/x/sys v0.50.0 h1:dkKZEFTEKaLr1sjhs0WiKqoi8Jj5nHbS3Njmx1UoMJs=
golang.org/x/sys v0.50.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og=
golang.org/x/text v0.44.0 h1:YItdp/mQNGnsmrgpcdA5yQ3bnRxCfo/Tj/iByGW9GGo=
golang.org/x/text v0.44.0/go.mod h1:S4FR1waQ9LbjQTls97SyRjDaUUVkaM+cXwwuG/G+MwY=
42 changes: 32 additions & 10 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,23 @@ verify-release:
ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')
BIN="hp-${OS}-${ARCH}"
BASE_URL="https://github.com/colangelo/HittyPing/releases/latest/download"
echo "Downloading ${BIN}..."
curl -sLO "${BASE_URL}/${BIN}"
curl -sLO "${BASE_URL}/${BIN}.sig"
curl -sLO "${BASE_URL}/${BIN}.pem"
# just runs recipes in the repo root: download elsewhere, never into the checkout
TMP="${TMPDIR:-/tmp}"
DIR=$(mktemp -d "${TMP%/}/hp-verify-release.XXXXXX")
cd "$DIR"
echo "Downloading ${BIN} into ${DIR}..."
curl -fsSLO "${BASE_URL}/${BIN}"
curl -fsSLO "${BASE_URL}/${BIN}.sig"
curl -fsSLO "${BASE_URL}/${BIN}.pem"
echo "Verifying signature..."
cosign verify-blob \
--signature "${BIN}.sig" \
--certificate "${BIN}.pem" \
--certificate-oidc-issuer https://token.actions.githubusercontent.com \
--certificate-identity-regexp 'github.com/colangelo/HittyPing' \
"${BIN}"
echo "Verified! Binary: ${BIN}"
chmod +x "${BIN}"
echo "Verified! Binary: ${DIR}/${BIN}"

# Bump version (major, minor, or patch)
bump PART="patch":
Expand Down Expand Up @@ -104,15 +109,32 @@ verify-installed:
BIN="hp-${OS}-${ARCH}"
BASE_URL="https://github.com/colangelo/HittyPing/releases/download/v${VERSION}"
echo "Found: ${HP_PATH} (v${VERSION})"
# Signatures go to a temp dir that is removed even when verification fails
TMP="${TMPDIR:-/tmp}"
DIR=$(mktemp -d "${TMP%/}/hp-verify-installed.XXXXXX")
trap 'rm -rf "$DIR"' EXIT
echo "Downloading signatures for ${BIN}..."
curl -sLO "${BASE_URL}/${BIN}.sig"
curl -sLO "${BASE_URL}/${BIN}.pem"
curl -fsSL -o "${DIR}/${BIN}.sig" "${BASE_URL}/${BIN}.sig"
curl -fsSL -o "${DIR}/${BIN}.pem" "${BASE_URL}/${BIN}.pem"
echo "Verifying..."
cosign verify-blob \
--signature "${BIN}.sig" \
--certificate "${BIN}.pem" \
--signature "${DIR}/${BIN}.sig" \
--certificate "${DIR}/${BIN}.pem" \
--certificate-oidc-issuer https://token.actions.githubusercontent.com \
--certificate-identity-regexp 'github.com/colangelo/HittyPing' \
"${HP_PATH}"
rm -f "${BIN}.sig" "${BIN}.pem"
echo "Verified! ${HP_PATH} matches signed release v${VERSION}"

# Check that verify-release and verify-installed leave the checkout untouched (needs network, cosign, an installed hp)
test-verify:
#!/usr/bin/env bash
set -euo pipefail
before=$(git status --porcelain --ignored)
out=$(just verify-release 2>&1) || { echo "$out"; echo "FAIL: verify-release exited non-zero"; exit 1; }
bin=$(printf '%s\n' "$out" | sed -n 's/^Verified! Binary: //p')
[[ -x "$bin" && "$bin" != "$PWD"/* ]] || { echo "$out"; echo "FAIL: binary '$bin' missing or inside the checkout"; exit 1; }
"$bin" --skill | grep -q '^name: hp$' || { echo "FAIL: downloaded binary does not print the skill"; exit 1; }
just verify-installed >/dev/null 2>&1 || { echo "FAIL: verify-installed exited non-zero"; exit 1; }
after=$(git status --porcelain --ignored)
[[ "$before" == "$after" ]] || { diff <(echo "$before") <(echo "$after"); echo "FAIL: the checkout changed"; exit 1; }
echo "PASS: both recipes verified and the checkout is unchanged (binary: $bin)"
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
// cleanly pause rendering before the process is actually stopped.
var displayMu sync.Mutex

const version = "0.8.8"
const version = "0.8.9"

//go:embed skills/hp/SKILL.md
var skillText string
Expand Down
Loading