File tree Expand file tree Collapse file tree 8 files changed +35
-13
lines changed Expand file tree Collapse file tree 8 files changed +35
-13
lines changed Original file line number Diff line number Diff line change
1
+ issues :
2
+ exclude-dirs :
3
+ - docs
4
+ max-issues-per-linter : 0
5
+ max-same-issues : 0
6
+ linters :
7
+ enable :
8
+ - errcheck
9
+ - gosec
10
+ - gosimple
11
+ - govet
12
+ - ineffassign
13
+ - staticcheck
14
+ - unused
15
+ run :
16
+ issues-exit-code : 1
17
+ tests : false
18
+ timeout : 10m
Original file line number Diff line number Diff line change 1
- // Copyright 2024 Blink Labs Software
1
+ // Copyright 2025 Blink Labs Software
2
2
//
3
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
4
// you may not use this file except in compliance with the License.
@@ -172,7 +172,7 @@ func testChainSync(f *globalFlags) {
172
172
}()
173
173
o , err := ouroboros .New (
174
174
ouroboros .WithConnection (conn ),
175
- ouroboros .WithNetworkMagic (uint32 (f .networkMagic )),
175
+ ouroboros .WithNetworkMagic (uint32 (f .networkMagic )), // #nosec G115
176
176
ouroboros .WithErrorChan (errorChan ),
177
177
ouroboros .WithNodeToNode (f .ntnProto ),
178
178
ouroboros .WithKeepAlive (true ),
@@ -199,7 +199,7 @@ func testChainSync(f *globalFlags) {
199
199
point = tip .Point
200
200
} else if len (intersectPoint ) > 0 {
201
201
// Slot
202
- slot := uint64 (intersectPoint [0 ].(int ))
202
+ slot := uint64 (intersectPoint [0 ].(int )) // #nosec G115
203
203
// Block hash
204
204
hash , _ := hex .DecodeString (intersectPoint [1 ].(string ))
205
205
point = common .NewPoint (slot , hash )
Original file line number Diff line number Diff line change 1
- // Copyright 2023 Blink Labs Software
1
+ // Copyright 2025 Blink Labs Software
2
2
//
3
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
4
// you may not use this file except in compliance with the License.
@@ -79,7 +79,7 @@ func testLocalTxSubmission(f *globalFlags) {
79
79
}()
80
80
o , err := ouroboros .New (
81
81
ouroboros .WithConnection (conn ),
82
- ouroboros .WithNetworkMagic (uint32 (f .networkMagic )),
82
+ ouroboros .WithNetworkMagic (uint32 (f .networkMagic )), // #nosec G115
83
83
ouroboros .WithErrorChan (errorChan ),
84
84
ouroboros .WithNodeToNode (f .ntnProto ),
85
85
ouroboros .WithKeepAlive (true ),
Original file line number Diff line number Diff line change @@ -19,12 +19,14 @@ import (
19
19
"fmt"
20
20
"log"
21
21
"net/http"
22
- _ "net/http/pprof"
23
22
"os"
24
23
"runtime"
25
24
"runtime/pprof"
26
25
"time"
27
26
27
+ // #nosec G108
28
+ _ "net/http/pprof"
29
+
28
30
ouroboros "github.com/blinklabs-io/gouroboros"
29
31
)
30
32
@@ -70,6 +72,8 @@ func testMemUsage(f *globalFlags) {
70
72
)
71
73
go func () {
72
74
log .Println (
75
+ // This is a test program, no timeouts
76
+ // #nosec G114
73
77
http .ListenAndServe (
74
78
fmt .Sprintf (":%d" , memUsageFlags .debugPort ),
75
79
nil ,
@@ -94,7 +98,7 @@ func testMemUsage(f *globalFlags) {
94
98
}()
95
99
o , err := ouroboros .New (
96
100
ouroboros .WithConnection (conn ),
97
- ouroboros .WithNetworkMagic (uint32 (f .networkMagic )),
101
+ ouroboros .WithNetworkMagic (uint32 (f .networkMagic )), // #nosec G115
98
102
ouroboros .WithErrorChan (errorChan ),
99
103
ouroboros .WithNodeToNode (f .ntnProto ),
100
104
ouroboros .WithKeepAlive (true ),
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ func testQuery(f *globalFlags) {
66
66
}()
67
67
o , err := ouroboros .New (
68
68
ouroboros .WithConnection (conn ),
69
- ouroboros .WithNetworkMagic (uint32 (f .networkMagic )),
69
+ ouroboros .WithNetworkMagic (uint32 (f .networkMagic )), // #nosec G115
70
70
ouroboros .WithErrorChan (errorChan ),
71
71
ouroboros .WithNodeToNode (f .ntnProto ),
72
72
ouroboros .WithKeepAlive (true ),
Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ func testServer(f *globalFlags) {
90
90
}()
91
91
_ , err = ouroboros .New (
92
92
ouroboros .WithConnection (conn ),
93
- ouroboros .WithNetworkMagic (uint32 (f .networkMagic )),
93
+ ouroboros .WithNetworkMagic (uint32 (f .networkMagic )), // #nosec G115
94
94
ouroboros .WithErrorChan (errorChan ),
95
95
ouroboros .WithNodeToNode (f .ntnProto ),
96
96
ouroboros .WithServer (true ),
Original file line number Diff line number Diff line change 1
- // Copyright 2024 Blink Labs Software
1
+ // Copyright 2025 Blink Labs Software
2
2
//
3
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
4
// you may not use this file except in compliance with the License.
@@ -68,7 +68,7 @@ func main() {
68
68
}()
69
69
o , err := ouroboros .New (
70
70
ouroboros .WithConnection (conn ),
71
- ouroboros .WithNetworkMagic (uint32 (f .NetworkMagic )),
71
+ ouroboros .WithNetworkMagic (uint32 (f .NetworkMagic )), // #nosec G115
72
72
ouroboros .WithErrorChan (errorChan ),
73
73
ouroboros .WithNodeToNode (f .NtnProto ),
74
74
ouroboros .WithKeepAlive (true ),
@@ -164,7 +164,7 @@ func handleRequestTxIds(
164
164
EraId : 5 ,
165
165
TxId : txHash ,
166
166
},
167
- Size : uint32 (len (txBytes )),
167
+ Size : uint32 (len (txBytes )), // #nosec G115
168
168
},
169
169
}
170
170
return ret , nil
Original file line number Diff line number Diff line change @@ -203,7 +203,7 @@ func (r ConwayRedeemers) Indexes(tag common.RedeemerTag) []uint {
203
203
func (r ConwayRedeemers ) Value (index uint , tag common.RedeemerTag ) (cbor.LazyValue , common.RedeemerExUnits ) {
204
204
redeemer , ok := r .Redeemers [ConwayRedeemerKey {
205
205
Tag : tag ,
206
- Index : uint32 (index ),
206
+ Index : uint32 (index ), // #nosec G115
207
207
}]
208
208
if ok {
209
209
return redeemer .Data , redeemer .ExUnits
You can’t perform that action at this time.
0 commit comments