-
-
Notifications
You must be signed in to change notification settings - Fork 620
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
could not import io/fs (invalid package name: "") #580
Comments
Thanks for reporting this. gosec doesn't support yet Go 1.16. Hopefully this will get fixed soon. |
@ccojocar Thank you. Could you update the snap package as well? |
@030 I don't maintain the snap package. I hope the maintainer will update it soon. |
Hi, @ccojocar! Thanks your effort in resolving this issue so quickly 😄 I'm wondering if you could help us... at our project, we're still seeing this issue with https://github.com/securego/gosec/releases/tag/v2.7.0 and I'll leave the repro steps here, but feel free to ask further questions or point out mistakes of my part! 👇 Steps for reproduction: Clone repo with project for reproduction: $ git clone git@github.com:lcbm/gosec-580.git
$ cd gosec-580 To reproduce locally: # get gosec at the v2.7.0 revision
$ go get github.com/securego/gosec/v2/cmd/gosec@v2.7.0
# run gosec
$ gosec ./...
# or ~/go/bin/gosec ./... To reproduce via GitLab-CI and # run the 'gitlab-runner' docker image
$ docker run --detach --name gitlab-runner --restart always --volume /var/run/docker.sock:/var/run/docker.sock --volume `pwd`:`pwd` gitlab/gitlab-runner:v13.7.0
# execute the 'security_test' job
$ docker exec -it --workdir $(pwd) gitlab-runner gitlab-runner exec docker security_test Go version:
Operating System/Environment:
Expected behavior: I expected the security test command to succeed, as it does with Actual behavior: Local gosec log
GitLab CI log
Other information: .gitlab-ci.yml
|
On my side, it seems that all the files from your repository are scanned successfully without any error:
Can you build the app? |
Thanks for the prompt response! 🎉 That's odd... the issue is also present in our CI and reproducible with the commands in EDIT 👇 I just noticed that I misunderstood your response! Edited my response to answer your question 😅 👇 I tried building
go install github.com/securego/gosec/v2/cmd/gosec@latest If I use $ gosec -v
flag provided but not defined: -v
gosec - Golang security checker
gosec analyzes Go source code to look for common programming mistakes that
can lead to security problems.
VERSION: dev
GIT TAG:
BUILD DATE: Additionally, I tried testing some things on my end... LMK if you have interest in a MR for this commit 😄 |
However, the snap package seems to have the same issue alexmurray/gosec-snap#1 It seems that the go get still downloads the previous version. |
It works when I install gosec using the commands that are depicted in the readme, e.g. raw content install, but the tar.gz looks like to fail as well. |
@030 Have you tried the last released version and it still fails? I cannot reproduce it on my side. |
@ccojocar When I install the tar the issue has been resolved, but when I use the snap it still fails. I will close this ticket as the issue resides in the snap repository. |
Summary
Steps to reproduce the behavior
and use
filepath.WalkDir
gosec version
I assume 2.6.1 as I use snap. Unclear as there is no
version
subcommand` included in the tool.Go version (output of 'go version')
Operating system / Environment
ubuntu 18.04
Expected behavior
no errors
Actual behavior
The text was updated successfully, but these errors were encountered: