Skip to content

Commit c7be14a

Browse files
authored
security: fix clawhub analysis findings (#31)
1 parent f6241f6 commit c7be14a

3 files changed

Lines changed: 19 additions & 1 deletion

File tree

AGENT.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ env:
1616
- name: SEER_API_KEY
1717
description: API key for authenticating with the Seer server
1818
required: true
19+
- name: SEER_MCP_AUTH_TOKEN
20+
description: Bearer token for authenticating MCP HTTP transport clients (required when running the HTTP server; omit for stdio transport)
21+
required: false
1922
---
2023

2124
# seer-cli

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ COPY . .
1818
RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o /seer-cli .
1919

2020
# Stage 2: Final image
21-
FROM alpine:latest
21+
FROM alpine:3.21
2222

2323
RUN apk add --no-cache ca-certificates
2424

install.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,25 @@ echo "Installing ${BIN} ${VERSION} (${OS}/${ARCH})..."
5858
TMP=$(mktemp -d)
5959
trap 'rm -rf "$TMP"' EXIT
6060

61+
CHECKSUMS_FILE="${BIN}_${VERSION_BARE}_checksums.txt"
62+
CHECKSUMS_URL="https://github.com/${REPO}/releases/download/${VERSION}/${CHECKSUMS_FILE}"
63+
6164
if command -v curl > /dev/null 2>&1; then
6265
curl -fsSL "$URL" -o "${TMP}/${ARCHIVE}"
66+
curl -fsSL "$CHECKSUMS_URL" -o "${TMP}/${CHECKSUMS_FILE}"
6367
else
6468
wget -qO "${TMP}/${ARCHIVE}" "$URL"
69+
wget -qO "${TMP}/${CHECKSUMS_FILE}" "$CHECKSUMS_URL"
70+
fi
71+
72+
# ── Verify checksum ───────────────────────────────────────────────────────────
73+
echo "Verifying checksum..."
74+
if command -v sha256sum > /dev/null 2>&1; then
75+
(cd "$TMP" && grep "${ARCHIVE}" "${CHECKSUMS_FILE}" | sha256sum -c -)
76+
elif command -v shasum > /dev/null 2>&1; then
77+
(cd "$TMP" && grep "${ARCHIVE}" "${CHECKSUMS_FILE}" | shasum -a 256 -c -)
78+
else
79+
echo "Warning: sha256sum/shasum not found — skipping checksum verification"
6580
fi
6681

6782
tar -xzf "${TMP}/${ARCHIVE}" -C "$TMP"

0 commit comments

Comments
 (0)