Skip to content

Commit 8cf7268

Browse files
authored
Merge pull request #209 from projectdiscovery/fix/go-toolchain-cve
bump Go toolchain for CVE-2026-111943
2 parents c4d4d7b + 45c6da2 commit 8cf7268

6 files changed

Lines changed: 25 additions & 15 deletions

File tree

‎.github/workflows/release-binary.yml‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ jobs:
1010
release:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v7
14-
- uses: projectdiscovery/actions/setup/go@v1
13+
- name: "Check out code"
14+
uses: actions/checkout@v7
15+
with:
16+
fetch-depth: 0
17+
- name: "Set up Go"
18+
uses: projectdiscovery/actions/setup/go@v1
1519
- name: "Create release on GitHub"
1620
uses: goreleaser/goreleaser-action@v7
1721
env:
@@ -20,6 +24,6 @@ jobs:
2024
DISCORD_WEBHOOK_ID: "${{ secrets.DISCORD_WEBHOOK_ID }}"
2125
DISCORD_WEBHOOK_TOKEN: "${{ secrets.DISCORD_WEBHOOK_TOKEN }}"
2226
with:
23-
args: "release --rm-dist"
27+
args: "release --clean"
2428
version: latest
2529
workdir: .

‎.goreleaser.yml‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
version: 2
2+
13
before:
24
hooks:
35
- go mod tidy
@@ -16,9 +18,8 @@ builds:
1618
- arm64
1719

1820
archives:
19-
- format: zip
20-
replacements:
21-
darwin: macOS
21+
- formats: [zip]
22+
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ if eq .Os "darwin" }}macOS{{ else }}{{ .Os }}{{ end }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}'
2223

2324
checksum:
2425
algorithm: sha256

‎Dockerfile‎

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
FROM golang:1.27.0-alpine as build-env
2-
RUN go install -v github.com/projectdiscovery/simplehttpserver/cmd/simplehttpserver@latest
1+
# Pinning apk package versions breaks the build once Alpine drops them; the base image tag is the pin.
2+
# hadolint global ignore=DL3018
3+
FROM golang:1.27.3-alpine AS build-env
4+
RUN apk add --no-cache git
5+
WORKDIR /app
6+
COPY . /app
7+
RUN go mod download && go build ./cmd/simplehttpserver
38

4-
FROM alpine:latest
9+
FROM alpine:3.24
510
RUN apk add --no-cache bind-tools ca-certificates
6-
COPY --from=build-env /go/bin/simplehttpserver /usr/local/bin/simplehttpserver
7-
ENTRYPOINT ["simplehttpserver"]
11+
COPY --from=build-env /app/simplehttpserver /usr/local/bin/simplehttpserver
12+
ENTRYPOINT ["simplehttpserver"]

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ SimpleHTTPserver is a go enhanced version of the well known python simplehttpser
3636

3737
# Installing SimpleHTTPserver
3838

39-
SimpleHTTPserver requires **go1.17+** to install successfully. Run the following command to get the repo -
39+
SimpleHTTPserver requires **go1.26.10+** to install successfully. Run the following command to get the repo -
4040

4141
```sh
4242
go install -v github.com/projectdiscovery/simplehttpserver/cmd/simplehttpserver@latest

‎go.mod‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/projectdiscovery/simplehttpserver
22

3-
go 1.25.0
3+
go 1.26.10
44

55
require (
66
github.com/fsnotify/fsnotify v1.10.1

‎internal/runner/watchdog.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ func watchFile(fname string, callback WatchEvent) (watcher *fsnotify.Watcher, er
2525
log.Println("err", err)
2626
}
2727
}
28-
case <-watcher.Errors:
29-
// ignore errors for now
28+
case err := <-watcher.Errors:
29+
log.Println("err", err)
3030
}
3131
}
3232
}()

0 commit comments

Comments
 (0)