qemu,qmp: Enable gas security checker

This commit enables the gas security checker on govmm builds.  The
security checker has signalled 4 issues all of which I've checked
and have determined to be non issues.  These issues are disabled
by this commit.

Signed-off-by: Mark Ryan <mark.d.ryan@intel.com>
This commit is contained in:
Mark Ryan 2018-06-28 15:56:27 +01:00
parent ffc06e6bc4
commit 430e72c63b
4 changed files with 5 additions and 1 deletions

View File

@ -19,4 +19,4 @@ before_install:
script:
- go env
- $GOPATH/bin/goveralls -v -service=travis-ci
- gometalinter --tests --vendor --disable-all --enable=misspell --enable=vet --enable=ineffassign --enable=gofmt --enable=gocyclo --cyclo-over=15 --enable=golint --enable=errcheck --enable=deadcode --enable=staticcheck ./...
- gometalinter --tests --vendor --disable-all --enable=misspell --enable=vet --enable=ineffassign --enable=gofmt --enable=gocyclo --cyclo-over=15 --enable=golint --enable=errcheck --enable=deadcode --enable=staticcheck -enable=gas ./...

View File

@ -45,9 +45,11 @@ func CreateCloudInitISO(ctx context.Context, scratchDir, isoPath string,
userDataPath := path.Join(dataDirPath, "user_data")
defer func() {
/* #nosec */
_ = os.RemoveAll(configDrivePath)
}()
/* #nosec */
err := os.MkdirAll(dataDirPath, 0755)
if err != nil {
return fmt.Errorf("Unable to create config drive directory %s : %v",

View File

@ -1652,6 +1652,7 @@ func LaunchCustomQemu(ctx context.Context, path string, params []string, fds []*
path = "qemu-system-x86_64"
}
/* #nosec */
cmd := exec.Command(path, params...)
if len(fds) > 0 {
logger.Infof("Adding extra file %v", fds)

View File

@ -409,6 +409,7 @@ func (q *QMP) mainLoop() {
if q.cfg.EventCh != nil {
close(q.cfg.EventCh)
}
/* #nosec */
_ = q.conn.Close()
_ = <-fromVMCh
failOutstandingCommands(cmdQueue)