Skip to content

Commit d5e82b1

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 71fcf27 + 926368d commit d5e82b1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+1318
-900
lines changed

.github/SECURITY.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
The most recent version "release" version to appear on the
6+
[releases][1] page is currently supported.
7+
8+
## Reporting a Vulnerability
9+
10+
To report a vulnerability, please use the
11+
[Privately reporting a security vulnerability][2]
12+
facility.
13+
14+
[1]: https://github.com/cactus/go-camo/releases
15+
[2]: https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing/privately-reporting-a-security-vulnerability#privately-reporting-a-security-vulnerability

.github/dependabot.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "gomod" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
labels:
11+
- dependencies
12+
schedule:
13+
interval: "weekly"
14+
day: "monday"

.github/workflows/codeql-analysis.yml

+19-7
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: "CodeQL"
22

33
on:
44
push:
5-
branches: ['**']
5+
branches: [master]
66
pull_request:
77
# The branches below must be a subset of the branches above
88
branches: [main]
@@ -13,23 +13,35 @@ jobs:
1313
analyse:
1414
name: Analyse
1515
runs-on: ubuntu-latest
16+
permissions:
17+
security-events: write
18+
actions: read
1619

1720
steps:
1821
- name: Checkout repository
19-
uses: actions/checkout@v2
22+
uses: actions/checkout@v4
2023
with:
2124
# We must fetch at least the immediate parents so that if this is
2225
# a pull request then we can checkout the head.
2326
fetch-depth: 2
2427

28+
- name: Setup Go
29+
uses: actions/setup-go@v5
30+
with:
31+
go-version: '>=1.22.0'
32+
check-latest: true
33+
id: go
34+
35+
- name: Build
36+
env:
37+
GOPROXY: "https://proxy.golang.org"
38+
run: make build
39+
2540
# Initializes the CodeQL tools for scanning.
2641
- name: Initialize CodeQL
27-
uses: github/codeql-action/init@v1
42+
uses: github/codeql-action/init@v2
2843
with:
2944
languages: go
3045

31-
- name: build
32-
run: make build
33-
3446
- name: Perform CodeQL Analysis
35-
uses: github/codeql-action/analyze@v1
47+
uses: github/codeql-action/analyze@v2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: publish-docker-images
2+
on:
3+
workflow_dispatch:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
build:
10+
name: docker-publish
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Src Checkout
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
18+
fetch-tags: true
19+
20+
- name: write tags env vars
21+
run: |
22+
TAG=$(git describe --tags)
23+
LATEST_TAG=$(git tag -l | grep -viE '(alpha|beta)' | sort -V | tail -n 1)
24+
GITHASH="$(git rev-parse HEAD)"
25+
echo "TAG=$TAG"
26+
echo "TAG=${TAG}" >> "$GITHUB_ENV"
27+
echo "LATEST_TAG=${LATEST_TAG}"
28+
echo "LATEST_TAG=${LATEST_TAG}" >> "$GITHUB_ENV"
29+
echo "GITHASH=${GITHASH}"
30+
echo "GITHASH=${GITHASH}" >> "$GITHUB_ENV"
31+
32+
- name: Docker meta
33+
id: meta
34+
uses: docker/metadata-action@v5
35+
with:
36+
images: |
37+
cactus4docker/go-camo
38+
ghcr.io/cactus/go-camo
39+
tags: |
40+
# set latest tag for master branch
41+
type=raw,value=${{ env.TAG }}
42+
type=raw,value=latest,enable=${{ env.TAG == env.LATEST_TAG }}
43+
44+
- name: Set up QEMU
45+
uses: docker/setup-qemu-action@v3
46+
47+
- name: Set up Docker Buildx
48+
uses: docker/setup-buildx-action@v3
49+
50+
- name: Login to Docker Hub
51+
uses: docker/login-action@v3
52+
with:
53+
password: ${{ secrets.DOCKER_PASSWORD }}
54+
username: ${{ secrets.DOCKER_USERNAME }}
55+
56+
- name: Login to GitHub Container Registry
57+
uses: docker/login-action@v3
58+
with:
59+
registry: ghcr.io
60+
username: ${{ github.actor }}
61+
password: ${{ secrets.GITHUB_TOKEN }}
62+
63+
- name: Build and push
64+
uses: docker/build-push-action@v5
65+
with:
66+
context: .
67+
push: true
68+
provenance: false
69+
sbom: false
70+
file: ./docker/Dockerfile
71+
platforms: linux/amd64,linux/arm64
72+
cache-from: type=local,src=/tmp/.buildx-cache
73+
cache-to: type=local,dest=/tmp/.buildx-cache
74+
build-args: |
75+
GITHASH=${{env.GITHASH}}
76+
APP_VER=${{env.TAG}}
77+
tags: ${{ steps.meta.outputs.tags }}
78+
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/publish-docker.yml

-57
This file was deleted.

.github/workflows/unit-tests.yml

+50-21
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,28 @@
11
name: unit-tests
22
on:
3+
workflow_dispatch:
34
push:
4-
branches: ['**']
5+
branches: ["**"]
56
pull_request:
67
branches: [main]
78

89
jobs:
9-
build:
10-
name: Build
11-
strategy:
12-
matrix:
13-
go: ['1.19.x']
14-
platform: [ubuntu-latest]
15-
runs-on: ${{ matrix.platform }}
16-
steps:
17-
- name: Setup Go ${{ matrix.go }}
18-
uses: actions/setup-go@v1
19-
with:
20-
go-version: ${{ matrix.go }}
21-
id: go
10+
test:
11+
runs-on: ubuntu-latest
2212

13+
steps:
2314
- name: Src Checkout
24-
uses: actions/checkout@v1
15+
uses: actions/checkout@v4
2516
with:
2617
fetch-depth: 1
2718

19+
- name: Setup Go
20+
uses: actions/setup-go@v5
21+
with:
22+
go-version: ">=1.22.0"
23+
check-latest: true
24+
id: go
25+
2826
- name: Build
2927
env:
3028
GOPROXY: "https://proxy.golang.org"
@@ -34,15 +32,46 @@ jobs:
3432
env:
3533
GOPROXY: "https://proxy.golang.org"
3634
run: |
37-
go install honnef.co/go/tools/cmd/[email protected]
38-
go install github.com/securego/gosec/v2/cmd/gosec@latest
39-
hash -r
4035
make check
4136
4237
- name: Tests
4338
env:
4439
GOPROXY: "https://proxy.golang.org"
4540
CI: true
46-
run:
47-
echo "skip"
48-
# run: make test
41+
run: make test
42+
43+
test-qemu:
44+
needs: test
45+
runs-on: ubuntu-latest
46+
strategy:
47+
matrix:
48+
arch: [arm64]
49+
50+
steps:
51+
- name: Src Checkout
52+
uses: actions/checkout@v4
53+
with:
54+
fetch-depth: 1
55+
56+
- name: Setup Go
57+
uses: actions/setup-go@v5
58+
with:
59+
go-version: ">=1.22.0"
60+
check-latest: true
61+
id: go
62+
63+
- name: Install QEMU
64+
uses: docker/setup-qemu-action@v3
65+
66+
- name: Build
67+
env:
68+
GOPROXY: "https://proxy.golang.org"
69+
GOARCH: ${{ matrix.arch }}
70+
run: make build
71+
72+
- name: Tests
73+
env:
74+
GOPROXY: "https://proxy.golang.org"
75+
GOARCH: ${{ matrix.arch }}
76+
CI: true
77+
run: make test

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/.vscode
12
/build
23
/config.json
34
/diagrams
@@ -7,6 +8,7 @@
78
/server.crt
89
/server.csr
910
*.py[co]
11+
/test.py
1012
/test-ruleset.conf
1113
/man/*.html
1214
/man/*.[1-9]

CHANGELOG.adoc

+48
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,54 @@ toc::[]
1919

2020
== HEAD
2121

22+
== v2.4.13 2024-04-22
23+
* Release tagged for arm64 docker building only.
24+
25+
== v2.4.12 2024-04-20
26+
* Update library dependencies.
27+
* Fix docker and github packages publishing issue.
28+
29+
== v2.4.11 2024-04-03
30+
* Update library dependencies.
31+
* Build with Go-1.22.2
32+
33+
== v2.4.10 2024-03-17
34+
* Update library dependencies.
35+
36+
== v2.4.9 2024-02-16
37+
* Minimum Go version now 1.21 due to quic-go dependency, due to better
38+
cryto/tls support for QUIC in Go-1.21.
39+
* Update library dependencies.
40+
41+
== v2.4.8 2023-12-19
42+
* Add `--automaxprocs` flag to set GOMAXPROCS automatically to match Linux
43+
container CPU quota/limits.
44+
* Update library dependencies.
45+
46+
== v2.4.7 - 2023-11-13
47+
* Add http3/quic server support. New flag `--quic`. Requires `--ssl-listen`.
48+
49+
== v2.4.6 - 2023-10-25
50+
* Add `--no-debug-vars` flag to disable /debug/vars when `--metrics` is
51+
enabled. (#66, #67)
52+
53+
== v2.4.5 - 2023-10-23
54+
* fix htrie matching of non punycode (eg. unicode) idna hostnames
55+
* slightly faster logging (update to mlog dependency)
56+
* address a logging issue with missing url path output in
57+
`"built outgoing request"` debug log
58+
* moderate improve performance of hostname rule processing
59+
(approx 12-30% in microbenchmarks)
60+
* slight improvement in request path url processing
61+
(approx 2-4% in microbenchmarks)
62+
* fix /debug/vars being enabled by default (#65) due to expvars import
63+
side effect
64+
65+
== v2.4.4 - 2023-07-25
66+
* update dependencies
67+
* bump version in go.mod (and fix all internal module references) +
68+
ref: discussion link:https://github.com/cactus/go-camo/discussions/62[#62]
69+
2270
== v2.4.3 - 2023-02-18
2371
* update library dependency golang.org/x/net. +
2472
refs:

Dockerfile

-14
This file was deleted.

0 commit comments

Comments
 (0)