Skip to content

Commit 543c236

Browse files
authored
Merge pull request #24 from pjbgf/pre-release
Bump dependencies and general housekeeping
2 parents 6b905c0 + 4cebe8c commit 543c236

File tree

8 files changed

+87
-21
lines changed

8 files changed

+87
-21
lines changed

.github/dependabot.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ updates:
33
- package-ecosystem: "github-actions"
44
directory: "/"
55
schedule:
6-
interval: "weekly"
6+
interval: "monthly"
77
commit-message:
88
prefix: "build"
99

@@ -13,3 +13,7 @@ updates:
1313
interval: "daily"
1414
commit-message:
1515
prefix: "build"
16+
groups:
17+
golang.org:
18+
patterns:
19+
- "golang.org/*"

.github/workflows/codeql.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: CodeQL
2+
3+
on:
4+
push:
5+
branches: [ "master", "main" ]
6+
pull_request:
7+
schedule:
8+
- cron: '00 5 * * 1'
9+
10+
permissions: {}
11+
12+
jobs:
13+
analyze:
14+
name: Analyze
15+
runs-on: ubuntu-latest
16+
permissions:
17+
actions: read
18+
contents: read
19+
security-events: write
20+
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
language: [ 'go' ]
25+
26+
steps:
27+
- name: Checkout code
28+
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
29+
30+
# Initializes the CodeQL tools for scanning.
31+
- name: Initialize CodeQL
32+
uses: github/codeql-action/init@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5
33+
with:
34+
languages: ${{ matrix.language }}
35+
# xref: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
36+
# xref: https://codeql.github.com/codeql-query-help/go/
37+
queries: security-and-quality
38+
39+
- name: Manual Build
40+
run: go build ./...
41+
42+
- name: Perform CodeQL Analysis
43+
uses: github/codeql-action/analyze@f09c1c0a94de965c15400f5634aa42fac8fb8f88 # v3.27.5
44+
with:
45+
category: "/language:${{matrix.language}}"

.github/workflows/test.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
1-
on: [push, pull_request]
21
name: Test
32

4-
permissions:
5-
contents: read
3+
on:
4+
push:
5+
pull_request:
6+
7+
permissions: {}
68

79
jobs:
810
version-matrix:
911
strategy:
1012
fail-fast: false
1113
matrix:
12-
go-version: [1.20.x, 1.21.x, 1.22.x]
14+
go-version: [1.21.x, 1.22.x, 1.23.x]
1315
platform: [ubuntu-latest, macos-latest, windows-latest]
1416

17+
permissions:
18+
contents: read
19+
1520
runs-on: ${{ matrix.platform }}
1621
steps:
1722
- name: Checkout code

.golangci.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ linters:
1616
- errchkjson
1717
- errname
1818
- errorlint
19-
- execinquery
2019
- exhaustive
21-
- exportloopref
2220
- forcetypeassert
2321
- ginkgolinter
2422
- gocheckcompilerdirectives

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
GOCMD = go
22
GOTEST = $(GOCMD) test
33

4-
GOLANGCI_VERSION ?= v1.57.2
4+
GOLANGCI_VERSION ?= v1.62.2
55
TOOLS_BIN := $(shell mkdir -p build/tools && realpath build/tools)
66

77
GOLANGCI = $(TOOLS_BIN)/golangci-lint-$(GOLANGCI_VERSION)

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
module github.com/go-git/go-git-fixtures/v5
22

33
// go-git supports the last 3 stable Go versions.
4-
go 1.20
4+
go 1.21
55

66
require (
7-
github.com/go-git/go-billy/v5 v5.6.0
7+
github.com/go-git/go-billy/v5 v5.6.1
88
github.com/stretchr/testify v1.10.0
99
)
1010

1111
require (
12-
github.com/cyphar/filepath-securejoin v0.2.5 // indirect
12+
github.com/cyphar/filepath-securejoin v0.3.6 // indirect
1313
github.com/davecgh/go-spew v1.1.1 // indirect
1414
github.com/pmezard/go-difflib v1.0.0 // indirect
15-
golang.org/x/sys v0.24.0 // indirect
15+
golang.org/x/sys v0.28.0 // indirect
1616
gopkg.in/yaml.v3 v3.0.1 // indirect
1717
)

go.sum

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,33 @@
1-
github.com/cyphar/filepath-securejoin v0.2.5 h1:6iR5tXJ/e6tJZzzdMc1km3Sa7RRIVBKAK32O2s7AYfo=
2-
github.com/cyphar/filepath-securejoin v0.2.5/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4=
1+
github.com/cyphar/filepath-securejoin v0.3.6 h1:4d9N5ykBnSp5Xn2JkhocYDkOpURL/18CYMpo6xB9uWM=
2+
github.com/cyphar/filepath-securejoin v0.3.6/go.mod h1:Sdj7gXlvMcPZsbhwhQ33GguGLDGQL7h7bg04C/+u9jI=
33
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
44
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
5-
github.com/go-git/go-billy/v5 v5.6.0 h1:w2hPNtoehvJIxR00Vb4xX94qHQi/ApZfX+nBE2Cjio8=
6-
github.com/go-git/go-billy/v5 v5.6.0/go.mod h1:sFDq7xD3fn3E0GOwUSZqHo9lrkmx8xJhA0ZrfvjBRGM=
5+
github.com/go-git/go-billy/v5 v5.6.1 h1:u+dcrgaguSSkbjzHwelEjc0Yj300NUevrrPphk/SoRA=
6+
github.com/go-git/go-billy/v5 v5.6.1/go.mod h1:0AsLr1z2+Uksi4NlElmMblP5rPcDZNRCD8ujZCRR2BE=
77
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
8+
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
89
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
10+
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
911
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
12+
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
1013
github.com/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k=
14+
github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY=
1115
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
1216
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
13-
github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
17+
github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8=
18+
github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4=
1419
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
1520
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
1621
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56 h1:2dVuKD2vS7b0QIHQbpyTISPd0LeHDbnYEryqj5Q1ug8=
17-
golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys=
18-
golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg=
19-
golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
20-
golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=
22+
golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY=
23+
golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I=
24+
golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4=
25+
golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA=
26+
golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
27+
golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo=
28+
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
2129
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
2230
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
31+
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
2332
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
2433
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

internal/tgz/tgz.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ package tgz
33
import (
44
"archive/tar"
55
"compress/gzip"
6+
"errors"
67
"fmt"
78
"io"
9+
"math"
810
"os"
911

1012
"github.com/go-git/go-billy/v5"
@@ -59,6 +61,9 @@ func unTar(fs billy.Filesystem, src *tar.Reader) error {
5961
}
6062

6163
dst := header.Name
64+
if header.Mode > math.MaxUint32 || header.Mode < 0 {
65+
return errors.New("cannot use header mode as filemode")
66+
}
6267
mode := os.FileMode(header.Mode)
6368
switch header.Typeflag {
6469
case tar.TypeDir:

0 commit comments

Comments
 (0)