You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# The file will be in the current folder where you run the command
44
+
# The file will be in the current folder where you run the command
45
45
# and you can check the checksum like this
46
46
echo"<check sum from the check sum file> gosec_vX.Y.Z_OS.tar.gz"| sha256sum -c -
47
47
@@ -66,7 +66,7 @@ jobs:
66
66
env:
67
67
GO111MODULE: on
68
68
steps:
69
-
- name: Checkout Source
69
+
- name: Checkout Source
70
70
uses: actions/checkout@v2
71
71
- name: Run Gosec Security Scanner
72
72
uses: securego/gosec@master
@@ -114,11 +114,11 @@ directory you can supply `./...` as the input argument.
114
114
- G402: Look for bad TLS connection settings
115
115
- G403: Ensure minimum RSA key length of 2048 bits
116
116
- G404: Insecure random number source (rand)
117
-
- G501: Import blacklist: crypto/md5
118
-
- G502: Import blacklist: crypto/des
119
-
- G503: Import blacklist: crypto/rc4
120
-
- G504: Import blacklist: net/http/cgi
121
-
- G505: Import blacklist: crypto/sha1
117
+
- G501: Import blocklist: crypto/md5
118
+
- G502: Import blocklist: crypto/des
119
+
- G503: Import blocklist: crypto/rc4
120
+
- G504: Import blocklist: net/http/cgi
121
+
- G505: Import blocklist: crypto/sha1
122
122
- G601: Implicit memory aliasing of items from a range statement
123
123
124
124
### Retired rules
@@ -161,7 +161,7 @@ A number of global settings can be provided in a configuration file as follows:
161
161
# Run with a global configuration file
162
162
$ gosec -conf config.json .
163
163
```
164
-
Also some rules accept configuration. For instance on rule `G104`, it is possible to define packages along with a list
164
+
Also some rules accept configuration. For instance on rule `G104`, it is possible to define packages along with a list
165
165
of functions which will be skipped when auditing the not checked errors:
166
166
167
167
```JSON
@@ -186,14 +186,14 @@ You can also configure the hard-coded credentials rule `G101` with additional pa
186
186
}
187
187
```
188
188
189
-
### Dependencies
189
+
### Dependencies
190
190
191
191
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,
192
192
the dependencies need to be explicitly downloaded by running the `go get -d` command before the scan.
193
193
194
194
### Excluding test files and folders
195
195
196
-
gosec will ignore test files across all packages and any dependencies in your vendor directory.
196
+
gosec will ignore test files across all packages and any dependencies in your vendor directory.
197
197
198
198
The scanning of test files can be enabled with the following flag:
199
199
@@ -233,7 +233,7 @@ func main(){
233
233
```
234
234
235
235
When a specific false positive has been identified and verified as safe, you may wish to suppress only that single rule (or a specific set of rules)
236
-
within a section of code, while continuing to scan for other problems. To do this, you can list the rule(s) to be suppressed within
236
+
within a section of code, while continuing to scan for other problems. To do this, you can list the rule(s) to be suppressed within
237
237
the `#nosec` annotation, e.g: `/* #nosec G401 */` or `// #nosec G201 G202 G203`
238
238
239
239
In some cases you may also want to revisit places where `#nosec` annotations
@@ -300,7 +300,7 @@ You can also build locally the docker image by using the command:
300
300
make image
301
301
```
302
302
303
-
You can run the `gosec` tool in a container against your local Go project. You only have to mount the project
303
+
You can run the `gosec` tool in a container against your local Go project. You only have to mount the project
304
304
into a volume as follows:
305
305
306
306
```bash
@@ -327,4 +327,4 @@ This will generate the `rules/tls_config.go` file which will contain the current
327
327
328
328
## Who is using gosec?
329
329
330
-
This is a [list](USERS.md) with some of the gosec's users.
330
+
This is a [list](USERS.md) with some of the gosec's users.
0 commit comments