Skip to content

Commit 0e4655d

Browse files
committed
rules/sdk/blocklist: permit depinject to import unsafe
The cosmos-sdk package "depinject" heavily uses unsafe and reflect code for its core functionality and thus should be allowed to import them. This change shaves off 106 flags from the cosmos-sdk security flags counter: from 805 down to 699
1 parent b887802 commit 0e4655d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rules/sdk/blocklist.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ func (r *blocklistedImport) ID() string {
4343
// Please see https://github.com/cosmos/gosec/issues/44.
4444
func forbiddenFromBlockedImports(ctx *gosec.Context) bool {
4545
switch pkg := ctx.Pkg.Name(); pkg {
46-
case "codegen", "crypto", "secp256k1", "simapp", "simulation", "testutil":
46+
case "codegen", "crypto", "depinject", "secp256k1", "simapp", "simulation", "testutil":
4747
// These packages rely on imports of "unsafe", "crypto/rand", "math/rand"
4848
// for their core functionality like randomization e.g. in simulation or get
4949
// data for randomizing data.

0 commit comments

Comments
 (0)