Skip to content

Commit b54f676

Browse files
authored
Merge pull request #97 from wollomatic/main
prepare v1.10.3
2 parents 370c5ba + 172a27f commit b54f676

File tree

10 files changed

+68
-41
lines changed

10 files changed

+68
-41
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Dependency Review Action
2+
#
3+
# This Action will scan dependency manifest files that change as part of a Pull Request,
4+
# surfacing known-vulnerable versions of the packages declared or updated in the PR.
5+
# Once installed, if the workflow run is marked as required,
6+
# PRs introducing known-vulnerable packages will be blocked from merging.
7+
#
8+
# Source repository: https://github.com/actions/dependency-review-action
9+
name: 'Dependency Review'
10+
on: [pull_request]
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
dependency-review:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Harden the runner (Audit all outbound calls)
20+
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
21+
with:
22+
egress-policy: audit
23+
24+
- name: 'Checkout Repository'
25+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
26+
- name: 'Dependency Review'
27+
uses: actions/dependency-review-action@05fe4576374b728f0c523d6a13d64c25081e0803 # v4.8.3

.github/workflows/docker-image-release.yaml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ jobs:
1717

1818
steps:
1919
- name: Checkout
20-
uses: actions/checkout@v6
21-
22-
- name: Run Gosec Security Scanner
23-
uses: securego/gosec@master
24-
with:
25-
args: ./...
20+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2621

2722
- name: Set up Go
28-
uses: actions/setup-go@v6
23+
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
2924
with:
30-
go-version: '1.25'
25+
go-version: '1.26'
26+
27+
- name: Run Gosec Security Scanner
28+
run: |
29+
go install github.com/securego/gosec/v2/cmd/gosec@v2.23.0
30+
gosec ./...
3131
3232
- name: Run Go tests
3333
run: go test ./...
@@ -37,28 +37,28 @@ jobs:
3737
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT"
3838

3939
- name: Install Cosign
40-
uses: sigstore/cosign-installer@v4.0.0
40+
uses: sigstore/cosign-installer@faadad0cce49287aee09b3a48701e75088a2c6ad # v4.0.0
4141
with:
4242
cosign-release: 'v2.6.1'
4343

4444
- name: Set up Docker Buildx
45-
uses: docker/setup-buildx-action@v3
45+
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
4646

4747
- name: Login to Docker Hub
48-
uses: docker/login-action@v3
48+
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
4949
with:
5050
username: ${{ secrets.DOCKERHUB_USERNAME }}
5151
password: ${{ secrets.DOCKERHUB_TOKEN }}
5252

5353
- name: Login to GitHub Container Registry
54-
uses: docker/login-action@v3
54+
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
5555
with:
5656
registry: ghcr.io
5757
username: ${{ github.actor }}
5858
password: ${{ secrets.GITHUB_TOKEN }}
5959

6060
- name: Build and push Docker Hub image
61-
uses: docker/build-push-action@v6
61+
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
6262
id: push-dockerhub
6363
with:
6464
context: .
@@ -76,7 +76,7 @@ jobs:
7676
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}
7777

7878
- name: Build and push GHCR image
79-
uses: docker/build-push-action@v6
79+
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
8080
id: push-ghcr
8181
with:
8282
context: .

.github/workflows/docker-image-testing.yaml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@ jobs:
1919

2020
steps:
2121
- name: Checkout
22-
uses: actions/checkout@v6
23-
24-
- name: Run Gosec Security Scanner
25-
uses: securego/gosec@master
26-
with:
27-
args: ./...
22+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2823

2924
- name: Set up Go
30-
uses: actions/setup-go@v6
25+
uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0
3126
with:
32-
go-version: '1.25'
27+
go-version: '1.26'
28+
29+
- name: Run Gosec Security Scanner
30+
run: |
31+
go install github.com/securego/gosec/v2/cmd/gosec@v2.23.0
32+
gosec ./...
3333
3434
- name: Run Go tests
3535
run: go test ./...
@@ -40,23 +40,23 @@ jobs:
4040
# cosign-release: 'v2.6.0'
4141

4242
- name: Set up Docker Buildx
43-
uses: docker/setup-buildx-action@v3
43+
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
4444

4545
- name: Login to Docker Hub
46-
uses: docker/login-action@v3
46+
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
4747
with:
4848
username: ${{ secrets.DOCKERHUB_USERNAME }}
4949
password: ${{ secrets.DOCKERHUB_TOKEN }}
5050

5151
- name: Login to GitHub Container Registry
52-
uses: docker/login-action@v3
52+
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
5353
with:
5454
registry: ghcr.io
5555
username: ${{ github.actor }}
5656
password: ${{ secrets.GITHUB_TOKEN }}
5757

5858
- name: Build and push image to Docker Hub and GHCR
59-
uses: docker/build-push-action@v6
59+
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
6060
id: push-all
6161
with:
6262
context: .
@@ -70,7 +70,7 @@ jobs:
7070
ghcr.io/wollomatic/socket-proxy:testing-${{ github.sha }}
7171
7272
# - name: Build and push Docker Hub image
73-
# uses: docker/build-push-action@v6
73+
# uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
7474
# id: push-dockerhub
7575
# with:
7676
# context: .
@@ -88,7 +88,7 @@ jobs:
8888
# COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}
8989
#
9090
# - name: Build and push GHCR image
91-
# uses: docker/build-push-action@v6
91+
# uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
9292
# id: push-ghcr
9393
# with:
9494
# context: .

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# syntax=docker/dockerfile:1
2-
FROM --platform=$BUILDPLATFORM golang:1.26.0-alpine3.23 AS build
2+
FROM --platform=$BUILDPLATFORM golang:1.26.0-alpine3.23@sha256:d4c4845f5d60c6a974c6000ce58ae079328d03ab7f721a0734277e69905473e5 AS build
33
WORKDIR /application
44
COPY . ./
55
ARG TARGETOS

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# socket-proxy
22

33
## Latest image
4-
- `wollomatic/socket-proxy:1.11.2` / `ghcr.io/wollomatic/socket-proxy:1.11.2`
4+
- `wollomatic/socket-proxy:1.11.3` / `ghcr.io/wollomatic/socket-proxy:1.11.3`
55
- `wollomatic/socket-proxy:1` / `ghcr.io/wollomatic/socket-proxy:1`
66

77
> [!IMPORTANT]

examples/docker-compose/dozzle/compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ services:
2424
- docker-proxynet
2525

2626
dozzle:
27-
image: amir20/dozzle:v8.14 # make sure you use the most recent version
27+
image: amir20/dozzle:v10.0 # make sure you use the most recent version
2828
user: 65534:65534
2929
read_only: true
3030
mem_limit: 256M

examples/docker-compose/watchtower/compose.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ services:
1010
- '-allowGET=/v1\..{2}/(containers/.*|images/.*)'
1111
- '-allowPOST=/v1\..{2}/(containers/.*|images/.*|networks/.*)'
1212
- '-allowDELETE=/v1\..{2}/(containers/.*|images/.*)'
13+
- '-allowHEAD=/_ping'
1314
# check socket connection every hour and stop the proxy if it fails (will then be restarted by docker):
1415
- '-watchdoginterval=3600'
1516
- '-stoponwatchdog'
@@ -29,7 +30,10 @@ services:
2930
- docker-proxynet
3031

3132
watchtower:
32-
image: containrrr/watchtower:1.7.1
33+
# image: containrrr/watchtower:1.7.1
34+
# https://github.com/containrrr/watchtower was archived on December 17, 2025.
35+
# https://github.com/nicholas-fedor/watchtower is a maintained fork.
36+
image: ghcr.io/nicholas-fedor/watchtower:1.14.2 # the containrrr repo is no longer maintained
3337
depends_on:
3438
- dockerproxy
3539
command:

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module github.com/wollomatic/socket-proxy
22

3-
go 1.22.6
3+
go 1.26.0

internal/docker/api/types/network/endpoint.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,5 @@ type EndpointSettings struct {
2020

2121
// Copy makes a deep copy of `EndpointSettings`
2222
func (es *EndpointSettings) Copy() *EndpointSettings {
23-
epCopy := *es
24-
return &epCopy
23+
return new(*es)
2524
}

internal/docker/client/request.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,18 +72,15 @@ func (cli *Client) doRequest(req *http.Request) (*http.Response, error) {
7272
return nil, err
7373
}
7474

75-
var uErr *url.Error
76-
if errors.As(err, &uErr) {
77-
var nErr *net.OpError
78-
if errors.As(uErr.Err, &nErr) {
75+
if uErr, ok := errors.AsType[*url.Error](err); ok {
76+
if nErr, ok2 := errors.AsType[*net.OpError](uErr.Err); ok2 {
7977
if os.IsPermission(nErr.Err) {
8078
return nil, errConnectionFailed{fmt.Errorf("permission denied while trying to connect to the Docker daemon socket at %v: %v", cli.host, err)}
8179
}
8280
}
8381
}
8482

85-
var nErr net.Error
86-
if errors.As(err, &nErr) {
83+
if nErr, ok := errors.AsType[net.Error](err); ok {
8784
if nErr.Timeout() {
8885
return nil, connectionFailed(cli.host)
8986
}

0 commit comments

Comments
 (0)