mirror of
https://github.com/Threnklyn/wg-ui.git
synced 2026-06-07 06:03:30 +02:00
Fix gosec issues (#57)
* Stricter file permissions when writing /proc/sys/ipv4/ip_forward * Fix gosec issues
This commit is contained in:
@@ -34,7 +34,8 @@ jobs:
|
|||||||
- name: Check security issues with gosec
|
- name: Check security issues with gosec
|
||||||
uses: "cedrickring/golang-action@1.4.1"
|
uses: "cedrickring/golang-action@1.4.1"
|
||||||
with:
|
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:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ func (s *Server) enableIPForward() error {
|
|||||||
|
|
||||||
if string(content) == "0\n" {
|
if string(content) == "0\n" {
|
||||||
log.Info("Enabling sys.net.ipv4.ip_forward")
|
log.Info("Enabling sys.net.ipv4.ip_forward")
|
||||||
return ioutil.WriteFile(p, []byte("1"), 0640)
|
return ioutil.WriteFile(p, []byte("1"), 0600)
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
Reference in New Issue
Block a user