Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
c1289b30
Commit
c1289b30
authored
May 01, 2019
by
Oleg Gaidarenko
Committed by
Carl Bergquist
May 01, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Chore: revise some of the gosec rules (#16713)
parent
51a98565
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
3 deletions
+11
-3
pkg/cmd/grafana-cli/commands/install_command.go
+2
-2
pkg/services/notifications/codes.go
+1
-0
scripts/backend-lint.sh
+4
-1
scripts/gosec.json
+4
-0
No files found.
pkg/cmd/grafana-cli/commands/install_command.go
View file @
c1289b30
...
...
@@ -144,7 +144,7 @@ func downloadFile(pluginName, filePath, url string) (err error) {
}
}()
resp
,
err
:=
http
.
Get
(
url
)
resp
,
err
:=
http
.
Get
(
url
)
// #nosec
if
err
!=
nil
{
return
err
}
...
...
@@ -167,7 +167,7 @@ func extractFiles(body []byte, pluginName string, filePath string) error {
newFile
:=
path
.
Join
(
filePath
,
RemoveGitBuildFromName
(
pluginName
,
zf
.
Name
))
if
zf
.
FileInfo
()
.
IsDir
()
{
err
:=
os
.
Mkdir
(
newFile
,
07
77
)
err
:=
os
.
Mkdir
(
newFile
,
07
55
)
if
permissionsError
(
err
)
{
return
fmt
.
Errorf
(
permissionsDeniedMessage
,
newFile
)
}
...
...
pkg/services/notifications/codes.go
View file @
c1289b30
...
...
@@ -7,6 +7,7 @@ import (
"time"
"github.com/Unknwon/com"
m
"github.com/grafana/grafana/pkg/models"
"github.com/grafana/grafana/pkg/setting"
)
...
...
scripts/backend-lint.sh
View file @
c1289b30
...
...
@@ -39,4 +39,7 @@ exit_if_fail go vet ./pkg/...
exit_if_fail revive
-formatter
stylish
-config
./scripts/revive.toml
# TODO recheck the rules and leave only necessary exclusions
#exit_if_fail gosec -quiet -exclude=G104,G107,G201,G202,G204,G301,G302,G304,G402,G501,G505,G401 ./pkg/...
# exit_if_fail gosec -quiet \
# -exclude=G104,G107,G201,G202,G204,G301,G304,G401,G402,G501 \
# -conf=./scripts/gosec.json \
# ./pkg/...
scripts/gosec.json
0 → 100644
View file @
c1289b30
{
"G302"
:
"0660"
,
"G301"
:
"0755"
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment