Skip to content

Commit 166e4f5

Browse files
author
Cosmin Cojocar
committed
Update README file with some more details required to run successfully a scan with the docker image
The current working directory needs to be specified in the docker run option in order for gosec to download the dependencies defined in the go module file. Signed-off-by: Cosmin Cojocar <[email protected]>
1 parent f5cc32a commit 166e4f5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,9 @@ You can run the `gosec` tool in a container against your local Go project. You o
304304
into a volume as follows:
305305

306306
```bash
307-
docker run -it -v <YOUR PROJECT PATH>/<PROJECT>:/<PROJECT> securego/gosec /<PROJECT>/...
307+
docker run --rm -it -w /<PROJECT>/ -v <YOUR PROJECT PATH>/<PROJECT>:/<PROJECT> securego/gosec /<PROJECT>/...
308308
```
309+
**Note:** the current working directory needs to be set with `-w` option in order to get successfully resolved the dependencies from go module file
309310

310311
### Generate TLS rule
311312

0 commit comments

Comments
 (0)