-
-
Notifications
You must be signed in to change notification settings - Fork 7
Description
The purpose of this issue is to ask if we are being pedantic about some of these imports:
If we look at https://github.com/informalsystems/gosec/blob/a284576b08668f2835734b359b27faea587a98b1/rules/sdk/blocklist.go#L71-L78
we can see a bunch of critical packages rejected, but I see lots of valid uses for a bunch of them like:
a) reflect: used in the SDK when interfaces are passed into say (*BaseApp).MountStores to return a correct error message indicating that an interface wasn't accepted -- this one is okay to flag as wrong per cosmos/cosmos-sdk#10392 but there are so many instances where using reflect is warranted like https://github.com/cosmos/cosmos-sdk/search?q=reflect
b) runtime is used in cosmosvisor to retrieve the operating system and architecture as well as for finding stack traces per https://github.com/cosmos/cosmos-sdk/search?q=runtime
c) math/rand: we use rand seeded to generate random numbers
d) crypto/rand: we use rand to generate private keys in crypto/keys/itnernal/ecdsa in GenPrivKey