Skip to content

Commit be1021f

Browse files
authored
Merge pull request #499 from cnvergence/bump-go-ver
2 parents f45dfcc + afc9cfa commit be1021f

35 files changed

Lines changed: 94 additions & 87 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- uses: actions/checkout@v4
3131
- uses: actions/setup-go@v5
3232
with:
33-
go-version: v1.25.4
33+
go-version: v1.26.1
3434
- uses: actions/setup-node@v4
3535
with:
3636
node-version: '20'
@@ -45,7 +45,7 @@ jobs:
4545
- uses: actions/checkout@v4
4646
- uses: actions/setup-go@v5
4747
with:
48-
go-version: v1.25.4
48+
go-version: v1.26.1
4949
- uses: actions/setup-node@v4
5050
with:
5151
node-version: '20'
@@ -60,7 +60,7 @@ jobs:
6060
- uses: actions/checkout@v4
6161
- uses: actions/setup-go@v5
6262
with:
63-
go-version: v1.25.4
63+
go-version: v1.26.1
6464
- run: make test
6565

6666
lint:
@@ -70,7 +70,7 @@ jobs:
7070
- uses: actions/checkout@v4
7171
- uses: actions/setup-go@v5
7272
with:
73-
go-version: v1.25.4
73+
go-version: v1.26.1
7474
- run: make lint
7575

7676
verify:
@@ -80,5 +80,5 @@ jobs:
8080
- uses: actions/checkout@v4
8181
- uses: actions/setup-go@v5
8282
with:
83-
go-version: v1.25.4
83+
go-version: v1.26.1
8484
- run: make verify

.github/workflows/docs-gen-and-push.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434

3535
- uses: actions/setup-go@v5
3636
with:
37-
go-version: v1.25.4
37+
go-version: v1.26.1
3838
cache: true
3939

4040
- uses: actions/setup-python@v5

.github/workflows/goreleaser.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
fetch-depth: 0
2323
- uses: actions/setup-go@v5
2424
with:
25-
go-version: v1.25.4
25+
go-version: v1.26.1
2626
- name: Delete non-semver tags
2727
run: 'git tag -d $(git tag -l | grep -v "^v")'
2828
- name: Set LDFLAGS
@@ -51,4 +51,4 @@ jobs:
5151
if: ${{ always() }}
5252
with:
5353
name: binaries
54-
path: dist/*.tar.gz
54+
path: dist/*.tar.gz

.github/workflows/image.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- uses: actions/checkout@v4
2020
- uses: actions/setup-go@v5
2121
with:
22-
go-version: v1.25.4
22+
go-version: v1.26.1
2323
check-latest: true
2424

2525
# We need this to remove local tags that are not semver so goreleaser doesn't get confused.
@@ -33,7 +33,7 @@ jobs:
3333
# If you notice signing errors, you may need to update the cosign version.
3434
- uses: sigstore/cosign-installer@v3.7.0
3535

36-
36+
3737
- name: Install Helm
3838
uses: azure/setup-helm@v3
3939
with:
@@ -43,7 +43,7 @@ jobs:
4343
run: echo LDFLAGS="$(make ldflags)" | tee -a >> $GITHUB_ENV
4444

4545
# Login to GitHub Container Registry (used by both ko and Docker)
46-
- name: Login to GitHub Container Registry
46+
- name: Login to GitHub Container Registry
4747
uses: docker/login-action@v3
4848
with:
4949
registry: ghcr.io
@@ -134,7 +134,7 @@ jobs:
134134
run: |
135135
# Login to GitHub Container Registry for Helm
136136
echo "${{ github.token }}" | helm registry login ghcr.io --username ${{ github.actor }} --password-stdin
137-
137+
138138
# Set chart version - use tag name if available, otherwise use semver format
139139
if [[ "${{ github.ref_type }}" == "tag" ]]; then
140140
CHART_VERSION="${{ github.ref_name }}"
@@ -143,23 +143,23 @@ jobs:
143143
else
144144
CHART_VERSION="0.0.0-${{ github.sha }}"
145145
fi
146-
146+
147147
# Package and push each chart in deploy/charts/
148148
for chart_dir in deploy/charts/*/; do
149149
if [ -f "${chart_dir}Chart.yaml" ]; then
150150
chart_name=$(basename "$chart_dir")
151151
echo "Processing chart: $chart_name"
152-
152+
153153
# Update chart version and appVersion in Chart.yaml
154154
sed -i "s/^version:.*/version: ${CHART_VERSION}/" "${chart_dir}Chart.yaml"
155155
sed -i "s/^appVersion:.*/appVersion: ${CHART_VERSION}/" "${chart_dir}Chart.yaml"
156-
156+
157157
# Package the chart
158158
helm package "$chart_dir" --version "${CHART_VERSION}"
159-
159+
160160
# Push to GitHub Container Registry
161161
helm push "${chart_name}-${CHART_VERSION}.tgz" "oci://ghcr.io/${{ github.repository_owner }}/charts"
162-
162+
163163
echo "Helm chart pushed to oci://ghcr.io/${{ github.repository_owner }}/charts/${chart_name}:${CHART_VERSION}"
164164
fi
165165
done

.golangci.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ linters:
6767
- linters:
6868
- goconst
6969
path: (.+)_test\.go
70+
- linters:
71+
- gosec
72+
path: (.+)_test\.go
73+
text: G101
7074
- linters:
7175
- staticcheck
7276
text: QF1008

.ko.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
baseImageOverrides:
2-
github.com/google/ko: golang:1.25.4
2+
github.com/google/ko: golang:1.26.1
33

44
builds:
55
- id: konnector

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ FROM node:20.18.0-alpine3.20 AS ui-build-env
1717
WORKDIR /app
1818

1919
# Install build dependencies needed for native modules
20-
RUN apk add --no-cache python3 make g++
20+
RUN apk add --no-cache python3 make g++
2121

2222
# Copy package files
2323
COPY ./web/package*.json ./
@@ -39,7 +39,7 @@ ENV VITE_BUILD_TARGET=docker
3939
RUN npm run build
4040

4141
# Build Go binary with embedded UI assets
42-
FROM golang:1.25.4 AS go-build-env
42+
FROM golang:1.26.1 AS go-build-env
4343
WORKDIR /app
4444

4545
# Accept build arguments for multi-arch support
@@ -75,4 +75,4 @@ COPY --from=ui-build-env /app/dist /www
7575

7676

7777

78-
ENTRYPOINT ["/bin/backend"]
78+
ENTRYPOINT ["/bin/backend"]

Dockerfile.konnector

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
FROM golang:1.25.4 AS builder
15+
FROM golang:1.26.1 AS builder
1616
WORKDIR /app
1717

1818
# Accept build arguments for multi-arch support
@@ -32,4 +32,4 @@ RUN apk --update add ca-certificates
3232

3333
COPY --from=builder /app/bin/konnector /bin/konnector
3434

35-
ENTRYPOINT ["/bin/konnector"]
35+
ENTRYPOINT ["/bin/konnector"]

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ BOILERPLATE_VERSION := 201dcad9616c117927232ee0bc499ff38a27023e
3232
CODE_GENERATOR_VERSION := v2.4.0
3333
CONTROLLER_GEN_VERSION := v0.17.3
3434
DEX_VERSION := v2.43.1
35-
GOLANGCI_LINT_VERSION := 2.1.6
35+
GOLANGCI_LINT_VERSION := 2.11.3
3636
GORELEASER_VERSION := 2.13.0
3737
GOTESTSUM_VERSION := 1.8.1
3838
HELM_DOCS_VERSION := 1.14.2

backend/auth/handler.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ type AuthHandler struct {
5555
tokenExpiry time.Duration
5656
}
5757

58+
const maxCallbackFormSize int64 = 1 << 20 // 1 MiB
59+
5860
func NewAuthHandler(oidc OIDCProvider, jwtService *JWTService, cookieSigningKey, cookieEncryptionKey []byte, sessionStore session.Store, tokenExpiry time.Duration) *AuthHandler {
5961
return &AuthHandler{
6062
oidc: oidc,
@@ -136,6 +138,7 @@ func (ah *AuthHandler) HandleAuthorize(w http.ResponseWriter, r *http.Request) {
136138
func (ah *AuthHandler) HandleCallback(w http.ResponseWriter, r *http.Request) {
137139
logger := klog.FromContext(r.Context()).WithValues("method", r.Method, "url", r.URL.String())
138140

141+
r.Body = http.MaxBytesReader(w, r.Body, maxCallbackFormSize)
139142
if err := r.ParseForm(); err != nil {
140143
logger.Error(err, "failed to parse form")
141144
ah.respondWithError(w, "", "failed to parse form", http.StatusBadRequest)

0 commit comments

Comments
 (0)