1

I'm having a bit of trouble running gosec with my current setup, both inside my local development machine and GitHub Actions.

When every time it ran this command gosec aminogo/*.go it gives the same set or errors

Golang errors in file: [aminogo/get_user_blogs_from_community.go]:

  > [line 0 : column 0] - importing dir "aminogo/get_user_blogs_from_community.go": cannot find package "." in:
    aminogo/get_user_blogs_from_community.go

to a extend of every file in my package directory

But when I ran the same code to a unit test via go test and build via go build, it works just fine without any package importing related errors

Already tried:

  • Setting up a GOPATH inside the CI environment
  • Moving the source code inside a GOPATH direction
env:
      ...
      CI: "true"
      GOPATH: ${{ github.workspace }}
      GO111MODULE: on

CI Jobs Log Image

All the CI jobs details and logs can be found in here

The CI configuration file can be found here

Thank you

Felix Fong
  • 969
  • 1
  • 8
  • 21

0 Answers0