From a2a40de84724c851e1468eb1b4353ee069c31b1d Mon Sep 17 00:00:00 2001 From: Cosmin Cojocar Date: Wed, 15 Apr 2020 16:13:40 +0200 Subject: [PATCH] Update the README with an example to configure the hard-coded credentials rule Signed-off-by: Cosmin Cojocar --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 3443673..7bec401 100644 --- a/README.md +++ b/README.md @@ -171,6 +171,20 @@ of functions which will be skipped when auditing the not checked errors: } ``` +You can also configure the hard-coded credentials rule `G101` with additional patters, or adjust the entropy threshold: + +```JSON +{ + "G101": { + "pattern": "(?i)passwd|pass|password|pwd|secret|private_key|token", + "ingnore_entropy": false, + "entropy_threshold": "80.0", + "per_char_threshold": "3.0", + "trucate": "32" + } +} +``` + ### Dependencies gosec will fetch automatically the dependencies of the code which is being analyzed when go module is turned on (e.g.` GO111MODULE=on`). If this is not the case,