It would be nice if gosec had options to require specifying
- at least one rule to inline
#nosec/gosec:disable annotations (i.e. ban "naked" directives without any rules), in order to avoid inadvertently suppressing other than intended rules that might apply
- a justification present in all
#nosec/gosec:disable annotations, for rationale as it is not always obvious, and this is quite probably security sensitive stuff
For example, golangci-lint (nolint) and revive (revive:disable*) already have these (revive only for justification/reasoning at time of writing).
It would be nice if gosec had options to require specifying
#nosec/gosec:disableannotations (i.e. ban "naked" directives without any rules), in order to avoid inadvertently suppressing other than intended rules that might apply#nosec/gosec:disableannotations, for rationale as it is not always obvious, and this is quite probably security sensitive stuffFor example, golangci-lint (nolint) and revive (revive:disable*) already have these (revive only for justification/reasoning at time of writing).