Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Fix gosec issues #57

Merged
merged 2 commits into from
Apr 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ jobs:
- name: Check missing error check
uses: "cedrickring/golang-action@1.4.1"
with:
args: go get github.com/securego/gosec/cmd/gosec; gosec ./... # https://github.com/securego/gosec
# TODO: remove `-exclude=G110` once https://github.com/go-bindata/go-bindata/pull/50 is merged and released
args: go get github.com/securego/gosec/cmd/gosec; gosec -exclude=G110 ./... # https://github.com/securego/gosec
build:
runs-on: ubuntu-latest
steps:
Expand All @@ -46,4 +47,4 @@ jobs:
sudo apt-get update -qq
sudo apt-get -qq -y install buildah
- name: Build the Docker image
run: buildah bud --format=docker --layers -f Dockerfile .
run: buildah bud --format=docker --layers -f Dockerfile .
2 changes: 1 addition & 1 deletion server.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func (s *Server) enableIPForward() error {

if string(content) == "0\n" {
log.Info("Enabling sys.net.ipv4.ip_forward")
return ioutil.WriteFile(p, []byte("1"), 0640)
return ioutil.WriteFile(p, []byte("1"), 0600)
}

return nil
Expand Down