Skip to content

Commit ecd90d1

Browse files
authored
Merge pull request #59 from osspkg/dev002
use multi config + change build git version
2 parents d5d656d + dbc21ea commit ecd90d1

File tree

17 files changed

+358
-672
lines changed

17 files changed

+358
-672
lines changed

.deb.yaml

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
package: deb-builder
2-
source: deb-builder
3-
version: '1:0.5.0'
4-
architecture:
5-
- amd64
6-
- arm64
7-
maintainer: The OSSPkg Team <github@osspkg.com>
8-
homepage: https://deb.osspkg.com/
9-
description:
10-
- Debian package builder
11-
section: web
12-
priority: optional
13-
control:
14-
build: devtool build --arch=%arch%
15-
data:
16-
usr/bin/deb-builder: build/deb-builder_%arch%
1+
ver: "2"
2+
packages:
3+
- package: deb-builder
4+
source: deb-builder
5+
version: 'git'
6+
architecture:
7+
- amd64
8+
- arm64
9+
maintainer: The OSSPkg Team <github@osspkg.com>
10+
homepage: https://deb.osspkg.com/
11+
description:
12+
- Debian package builder
13+
section: web
14+
priority: optional
15+
control:
16+
build: goppy build --arch=%arch%
17+
data:
18+
usr/bin/deb-builder: build/deb-builder_%arch%

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
go: [ '1.23.6' ]
14+
go: [ '1.25' ]
1515
steps:
1616
- uses: actions/checkout@v3
1717

.golangci.yml

Lines changed: 40 additions & 180 deletions
Original file line numberDiff line numberDiff line change
@@ -1,202 +1,64 @@
1+
version: "2"
12

23
run:
3-
go: "1.23"
4-
concurrency: 4
4+
go: "1.25"
55
timeout: 5m
66
tests: false
77
issues-exit-code: 1
88
modules-download-mode: readonly
9+
allow-parallel-runners: true
910

1011
issues:
11-
exclude-use-default: false
12-
max-issues-per-linter: 100
13-
max-same-issues: 4
12+
max-issues-per-linter: 0
13+
max-same-issues: 0
1414
new: false
15-
exclude-files:
16-
- ".+_test.go"
17-
exclude-dirs:
18-
- "vendor$"
15+
fix: false
1916

2017
output:
2118
formats:
22-
- format: line-number
23-
sort-results: true
19+
text:
20+
print-linter-name: true
21+
print-issued-lines: true
2422

25-
linters-settings:
26-
govet:
27-
check-shadowing: true
28-
enable:
29-
- asmdecl
30-
- assign
31-
- atomic
32-
- atomicalign
33-
- bools
34-
- buildtag
35-
- cgocall
36-
- composites
37-
- copylocks
38-
- deepequalerrors
39-
- errorsas
40-
- findcall
41-
- framepointer
42-
- httpresponse
43-
- ifaceassert
44-
- loopclosure
45-
- lostcancel
46-
- nilfunc
47-
- nilness
48-
- printf
49-
- reflectvaluecompare
50-
- shadow
51-
- shift
52-
- sigchanyzer
53-
- sortslice
54-
- stdmethods
55-
- stringintconv
56-
- structtag
57-
- testinggoroutine
58-
- tests
59-
- unmarshal
60-
- unreachable
61-
- unsafeptr
62-
- unusedresult
63-
- unusedwrite
64-
disable:
65-
- fieldalignment
66-
gofmt:
67-
simplify: true
68-
errcheck:
69-
check-type-assertions: true
70-
check-blank: true
71-
gocyclo:
72-
min-complexity: 30
73-
misspell:
74-
locale: US
75-
prealloc:
76-
simple: true
77-
range-loops: true
78-
for-loops: true
79-
unparam:
80-
check-exported: false
81-
gci:
82-
skip-generated: true
83-
custom-order: false
84-
gosec:
85-
includes:
86-
- G101 # Look for hard coded credentials
87-
- G102 # Bind to all interfaces
88-
- G103 # Audit the use of unsafe block
89-
- G104 # Audit errors not checked
90-
- G106 # Audit the use of ssh.InsecureIgnoreHostKey
91-
- G107 # Url provided to HTTP request as taint input
92-
- G108 # Profiling endpoint automatically exposed on /debug/pprof
93-
- G109 # Potential Integer overflow made by strconv.Atoi result conversion to int16/32
94-
- G110 # Potential DoS vulnerability via decompression bomb
95-
- G111 # Potential directory traversal
96-
- G112 # Potential slowloris attack
97-
- G113 # Usage of Rat.SetString in math/big with an overflow (CVE-2022-23772)
98-
- G114 # Use of net/http serve function that has no support for setting timeouts
99-
- G201 # SQL query construction using format string
100-
- G202 # SQL query construction using string concatenation
101-
- G203 # Use of unescaped data in HTML templates
102-
- G204 # Audit use of command execution
103-
- G301 # Poor file permissions used when creating a directory
104-
- G302 # Poor file permissions used with chmod
105-
- G303 # Creating tempfile using a predictable path
106-
- G304 # File path provided as taint input
107-
- G305 # File traversal when extracting zip/tar archive
108-
- G306 # Poor file permissions used when writing to a new file
109-
- G307 # Deferring a method which returns an error
110-
- G401 # Detect the usage of DES, RC4, MD5 or SHA1
111-
- G402 # Look for bad TLS connection settings
112-
- G403 # Ensure minimum RSA key length of 2048 bits
113-
- G404 # Insecure random number source (rand)
114-
- G501 # Import blocklist: crypto/md5
115-
- G502 # Import blocklist: crypto/des
116-
- G503 # Import blocklist: crypto/rc4
117-
- G504 # Import blocklist: net/http/cgi
118-
- G505 # Import blocklist: crypto/sha1
119-
- G601 # Implicit memory aliasing of items from a range statement
120-
excludes:
121-
- G101 # Look for hard coded credentials
122-
- G102 # Bind to all interfaces
123-
- G103 # Audit the use of unsafe block
124-
- G104 # Audit errors not checked
125-
- G106 # Audit the use of ssh.InsecureIgnoreHostKey
126-
- G107 # Url provided to HTTP request as taint input
127-
- G108 # Profiling endpoint automatically exposed on /debug/pprof
128-
- G109 # Potential Integer overflow made by strconv.Atoi result conversion to int16/32
129-
- G110 # Potential DoS vulnerability via decompression bomb
130-
- G111 # Potential directory traversal
131-
- G112 # Potential slowloris attack
132-
- G113 # Usage of Rat.SetString in math/big with an overflow (CVE-2022-23772)
133-
- G114 # Use of net/http serve function that has no support for setting timeouts
134-
- G201 # SQL query construction using format string
135-
- G202 # SQL query construction using string concatenation
136-
- G203 # Use of unescaped data in HTML templates
137-
- G204 # Audit use of command execution
138-
- G301 # Poor file permissions used when creating a directory
139-
- G302 # Poor file permissions used with chmod
140-
- G303 # Creating tempfile using a predictable path
141-
- G304 # File path provided as taint input
142-
- G305 # File traversal when extracting zip/tar archive
143-
- G306 # Poor file permissions used when writing to a new file
144-
- G307 # Deferring a method which returns an error
145-
- G401 # Detect the usage of DES, RC4, MD5 or SHA1
146-
- G402 # Look for bad TLS connection settings
147-
- G403 # Ensure minimum RSA key length of 2048 bits
148-
- G404 # Insecure random number source (rand)
149-
- G501 # Import blocklist: crypto/md5
150-
- G502 # Import blocklist: crypto/des
151-
- G503 # Import blocklist: crypto/rc4
152-
- G504 # Import blocklist: net/http/cgi
153-
- G505 # Import blocklist: crypto/sha1
154-
- G601 # Implicit memory aliasing of items from a range statement
155-
exclude-generated: true
156-
severity: medium
157-
confidence: medium
158-
concurrency: 12
159-
config:
160-
global:
161-
nosec: true
162-
"#nosec": "#my-custom-nosec"
163-
show-ignored: true
164-
audit: true
165-
G101:
166-
pattern: "(?i)passwd|pass|password|pwd|secret|token|pw|apiKey|bearer|cred"
167-
ignore_entropy: false
168-
entropy_threshold: "80.0"
169-
per_char_threshold: "3.0"
170-
truncate: "32"
171-
G104:
172-
fmt:
173-
- Fscanf
174-
G111:
175-
pattern: "http\\.Dir\\(\"\\/\"\\)|http\\.Dir\\('\\/'\\)"
176-
G301: "0750"
177-
G302: "0600"
178-
G306: "0600"
179-
180-
lll:
181-
line-length: 130
182-
tab-width: 1
183-
staticcheck:
184-
go: "1.15"
185-
# SAxxxx checks in https://staticcheck.io/docs/configuration/options/#checks
186-
# Default: ["*"]
187-
checks: [ "*", "-SA1019" ]
23+
formatters:
24+
exclusions:
25+
paths:
26+
- vendors/
27+
enable:
28+
- gofmt
29+
- goimports
18830

18931
linters:
190-
disable-all: true
32+
settings:
33+
staticcheck:
34+
checks:
35+
- all
36+
- -S1023
37+
- -ST1000
38+
- -ST1003
39+
- -ST1020
40+
gosec:
41+
excludes:
42+
- G104
43+
- G115
44+
- G204
45+
- G301
46+
- G302
47+
- G304
48+
- G306
49+
- G401
50+
- G501
51+
- G505
52+
exclusions:
53+
paths:
54+
- vendors/
55+
default: none
19156
enable:
19257
- govet
193-
- gofmt
19458
- errcheck
19559
- misspell
19660
- gocyclo
19761
- ineffassign
198-
- goimports
199-
- nakedret
20062
- unparam
20163
- unused
20264
- prealloc
@@ -207,5 +69,3 @@ linters:
20769
- errorlint
20870
- bodyclose
20971
- gosec
210-
- lll
211-
fast: false

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ pre-commit: license setup lint build tests
3030
ci: install setup lint build tests
3131

3232
deb:
33-
deb-builder build
33+
deb-builder build --base-dir=./build --tmp-dir=/tmp/deb-build
3434

3535
local: build
3636
cp ./build/deb-builder_amd64 $(GOPATH)/bin/deb-builder

go.mod

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
module github.com/osspkg/deb-builder
22

3-
go 1.23.6
3+
go 1.25.3
44

55
require (
6-
github.com/stretchr/testify v1.8.4
6+
github.com/stretchr/testify v1.11.1
77
go.osspkg.com/archives v1.1.0
88
go.osspkg.com/console v0.3.3
9-
go.osspkg.com/ioutils v0.5.1
10-
golang.org/x/crypto v0.37.0
9+
go.osspkg.com/encrypt v0.5.1
10+
go.osspkg.com/ioutils v0.7.3
1111
gopkg.in/yaml.v3 v3.0.1
1212
)
1313

1414
require (
1515
github.com/davecgh/go-spew v1.1.1 // indirect
1616
github.com/pmezard/go-difflib v1.0.0 // indirect
17-
go.osspkg.com/errors v0.3.1 // indirect
17+
go.osspkg.com/errors v0.4.0 // indirect
18+
golang.org/x/crypto v0.43.0 // indirect
1819
)

go.sum

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,22 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c
22
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
33
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
44
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
5-
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
6-
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
5+
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
6+
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
77
go.osspkg.com/archives v1.1.0 h1:oXW46spG1Qh2Tofcokl24hY8Ggsf019jQjLhRcqtPcc=
88
go.osspkg.com/archives v1.1.0/go.mod h1:Yj7p+GBlZzAHkFasjLoo7glfPJ14wO8f3a34ChCI3Bg=
9+
go.osspkg.com/casecheck v0.3.0 h1:x15blEszElbrHrEH5H02JIIhGIg/lGZzIt1kQlD3pwM=
10+
go.osspkg.com/casecheck v0.3.0/go.mod h1:TRFXDMFJEOtnlp3ET2Hix3osbxwPWhvaiT/HfD3+gBA=
911
go.osspkg.com/console v0.3.3 h1:UB/pPoPsgWbyNFix8pEMQHbsXdMv/UK/dgsbRknCH2A=
1012
go.osspkg.com/console v0.3.3/go.mod h1:IknBCliH6mX/ogHa6wbycnGDFYixCGH3WuNc5W5tQe8=
11-
go.osspkg.com/errors v0.3.1 h1:F9m/EEd/Ot2jba/TV7tvVRIpWXzIpNLc7vRJKcBD86A=
12-
go.osspkg.com/errors v0.3.1/go.mod h1:dKXe6Rt07nzY7OyKQNZ8HGBicZ2uQ5TKEoVFnVFOK44=
13-
go.osspkg.com/ioutils v0.5.1 h1:qzoOECBxChZUxmp6p72XvQRHjDFsVw1kJ2oaFZycNv8=
14-
go.osspkg.com/ioutils v0.5.1/go.mod h1:XRASOo5GKzVaJMCXXZQ4//ymPWq90iyKm1qTQcBEsyo=
15-
golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE=
16-
golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc=
13+
go.osspkg.com/encrypt v0.5.1 h1:DaYhos4Si9Mzi1LBW2mkin7TPQGkKvlwI+aq/a8Z6ko=
14+
go.osspkg.com/encrypt v0.5.1/go.mod h1:mGDe5PTd+i6cntpiOaesAaD7498ypqPbbMPbI89PK4c=
15+
go.osspkg.com/errors v0.4.0 h1:E17+WyUzTXEHCTxGm8lOMPOOojzHG1lsOuQtTVGoATQ=
16+
go.osspkg.com/errors v0.4.0/go.mod h1:s75ZovPemYtrCtRPVsbQNq9MgMbmLMK1NEypr+uwjXI=
17+
go.osspkg.com/ioutils v0.7.3 h1:QF+Ra0bHoU3MGMGH5PGdV2lRLq1rWPdv/OB+v5UTjkI=
18+
go.osspkg.com/ioutils v0.7.3/go.mod h1:RO/43IM//Wq8RnLvEzivDAuM37mnLW3eWxTCVmkUaY4=
19+
golang.org/x/crypto v0.43.0 h1:dduJYIi3A3KOfdGOHX8AVZ/jGiyPa3IbBozJ5kNuE04=
20+
golang.org/x/crypto v0.43.0/go.mod h1:BFbav4mRNlXJL4wNeejLpWxB7wMbc79PdRGhWKncxR0=
1721
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
1822
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
1923
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=

0 commit comments

Comments
 (0)