@@ -684,6 +684,7 @@ linters-settings:
684
684
gosec :
685
685
# To select a subset of rules to run.
686
686
# Available rules: https://github.com/securego/gosec#available-rules
687
+ # Default: [] - means include all rules
687
688
includes :
688
689
- G101
689
690
- G102
@@ -719,6 +720,7 @@ linters-settings:
719
720
720
721
# To specify a set of rules to explicitly exclude.
721
722
# Available rules: https://github.com/securego/gosec#available-rules
723
+ # Default: []
722
724
excludes :
723
725
- G101
724
726
- G102
@@ -771,17 +773,66 @@ linters-settings:
771
773
concurrency : 12
772
774
773
775
# To specify the configuration of rules.
774
- # The configuration of rules is not fully documented by gosec:
775
- # https://github.com/securego/gosec#configuration
776
- # https://github.com/securego/gosec/blob/569328eade2ccbad4ce2d0f21ee158ab5356a5cf/rules/rulelist.go#L60-L102
777
776
config :
778
- G306 : " 0600"
779
777
G101 :
778
+ # Regexp pattern for variables and constants to find.
779
+ # Default: "(?i)passwd|pass|password|pwd|secret|token|pw|apiKey|bearer|cred"
780
780
pattern : " (?i)example"
781
+ # If true, complain about all cases (even with low entropy).
782
+ # Default: false
781
783
ignore_entropy : false
784
+ # Maximum allowed entropy of the string.
785
+ # Default: "80.0"
782
786
entropy_threshold : " 80.0"
787
+ # Maximum allowed value of entropy/string length.
788
+ # Is taken into account if entropy >= entropy_threshold/2.
789
+ # Default: "3.0"
783
790
per_char_threshold : " 3.0"
791
+ # Calculate entropy for first N chars of the string.
792
+ # Default: "16"
784
793
truncate : " 32"
794
+ # Additional functions to ignore while checking unhandled errors.
795
+ # Following functions always ignored:
796
+ # bytes.Buffer:
797
+ # - Write
798
+ # - WriteByte
799
+ # - WriteRune
800
+ # - WriteString
801
+ # fmt:
802
+ # - Print
803
+ # - Printf
804
+ # - Println
805
+ # - Fprint
806
+ # - Fprintf
807
+ # - Fprintln
808
+ # strings.Builder:
809
+ # - Write
810
+ # - WriteByte
811
+ # - WriteRune
812
+ # - WriteString
813
+ # io.PipeWriter:
814
+ # - CloseWithError
815
+ # hash.Hash:
816
+ # - Write
817
+ # os:
818
+ # - Unsetenv
819
+ # Default: {}
820
+ G104 :
821
+ fmt :
822
+ - Fscanf
823
+ G111 :
824
+ # Regexp pattern to find potential directory traversal.
825
+ # Default: "http\\.Dir\\(\"\\/\"\\)|http\\.Dir\\('\\/'\\)"
826
+ pattern : " custom\\ .Dir\\ (\\ )"
827
+ # Maximum allowed permissions mode for os.Mkdir and os.MkdirAll
828
+ # Default: "0750"
829
+ G301 : " 0750"
830
+ # Maximum allowed permissions mode for os.OpenFile and os.Chmod
831
+ # Default: "0600"
832
+ G302 : " 0600"
833
+ # Maximum allowed permissions mode for os.WriteFile and ioutil.WriteFile
834
+ # Default: "0600"
835
+ G306 : " 0600"
785
836
786
837
govet :
787
838
# Report about shadowed variables.
0 commit comments