Skip to content

Commit

Permalink
Updates to the new name(space)s, and some cleanup
Browse files Browse the repository at this point in the history
Static tests are expected to fail at the moment. Further cleanup is
required, but some issues are either false positives, or will need more
extensive rewrites/refactors to address. Hopefully most of the most
egregious issues are already addressed, though.

Oh, and we also move frorm Travis to GitHub Actions. Huzzah!
  • Loading branch information
danhunsaker committed Feb 18, 2022
1 parent 987f0ee commit e815e20
Show file tree
Hide file tree
Showing 242 changed files with 1,782 additions and 1,962 deletions.
87 changes: 87 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:

jobs:
static:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Run the checks
uses: danhunsaker/golang-github-actions@main
with:
run: misspell,fmt,vet,cyclo,imports,ineffassign,errcheck,sec,shadow,staticcheck
ignore-defer: true
flags: '{"sec": "-exclude=G104"}'
token: ${{ secrets.GITHUB_TOKEN }}
env:
PATH: '/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/setup-go@v2
with:
go-version: '^1.17'

- name: Setup dependencies
run: |
go get -t ./...
- name: Run the tests
run: go test -v ./...

build:
runs-on: ubuntu-latest
needs: test
if: github.event_name != 'pull_request'
# These permissions are needed to interact with GitHub's OIDC Token endpoint.
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v2

# the default image for act doesn't include this tool, but the actual GHA environment does...
- name: (LOCAL ONLY) Install AWS CLI
if: github.actor == 'nektos/act'
run: |
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip -q awscliv2.zip
sudo ./aws/install
- uses: actions/setup-go@v2
with:
go-version: '^1.17'

- name: Setup dependencies
run: |
go install github.com/mitchellh/gox@latest
go get -t ./...
- name: Build
run: |
./scripts/build.sh
- name: Configure AWS credentials for publication
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/s3-write
role-duration-seconds: 1200
aws-region: us-east-1

- name: Publish
run: |
./scripts/upload.sh
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ _testmain.go
# Project specific files
.DS_Store
TODO
nanobox
nanobox-*
microbox
microbox-*
updater/updater
updater/updater-*
.build
Expand All @@ -36,3 +36,5 @@ Icon
.sync
nb.setup
vendor/*/
.env
.secrets
30 changes: 0 additions & 30 deletions .travis.yml

This file was deleted.

19 changes: 11 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
## 2.3.1 (unreleased)
## 2.4.0 (unreleased)

FEATURES:
- Switch to the microbox name and namespaces for all future distribution
- Build for all the same os/arch combos as Docker itself
- Switch from vendored dependencies to go modules
- Allow `-v` and `--version` to print version [#612](https://github.com/nanobox-io/nanobox/pull/612)
- Make nanobox-server service able to survive reboots [#612](https://github.com/nanobox-io/nanobox/pull/612)
- Add dns alias' to run and dry-run containers [#592](https://github.com/nanobox-io/nanobox/pull/592)
- Support service configuration enhancements [#586](https://github.com/nanobox-io/nanobox/pull/586)
- Support password protected ssh keys [#576](https://github.com/nanobox-io/nanobox/pull/576)[#580](https://github.com/nanobox-io/nanobox/pull/580)[#582](https://github.com/nanobox-io/nanobox/pull/582)
- Support password protected ssh keys [#576](https://github.com/nanobox-io/nanobox/pull/576) [#580](https://github.com/nanobox-io/nanobox/pull/580) [#582](https://github.com/nanobox-io/nanobox/pull/582)
- Untrack vendored files [#567](https://github.com/nanobox-io/nanobox/pull/567)

BUG FIXES:
Expand All @@ -14,7 +17,7 @@ BUG FIXES:
- Fix panic on linux if nfs isn't running [#601](https://github.com/nanobox-io/nanobox/pull/601)
- Handle `nanobox-update` not being in global path [#596](https://github.com/nanobox-io/nanobox/pull/596)
- Fix fast notify watcher warning typos [#594](https://github.com/nanobox-io/nanobox/pull/594)
- Update `--help` docs for cli [#593](https://github.com/nanobox-io/nanobox/pull/593)[#598](https://github.com/nanobox-io/nanobox/pull/598)
- Update `--help` docs for cli [#593](https://github.com/nanobox-io/nanobox/pull/593) [#598](https://github.com/nanobox-io/nanobox/pull/598)
- Only pull `nanobox/*` images on `update-images` [#591](https://github.com/nanobox-io/nanobox/pull/591)
- Only add valid, un-password protected ssh keys [#572](https://github.com/nanobox-io/nanobox/pull/572)
- Fix regression and allow multiple apps on osx [#571](https://github.com/nanobox-io/nanobox/pull/571)
Expand All @@ -24,8 +27,8 @@ BUG FIXES:
## 2.3.0 (Sept 1, 2017)

FEATURES:
- Support setting custom tunnel destination port [#561](https://github.com/nanobox-io/nanobox/pull/561)[#564](https://github.com/nanobox-io/nanobox/pull/564)
- Support streaming production logs [#549](https://github.com/nanobox-io/nanobox/pull/549)[#562](https://github.com/nanobox-io/nanobox/pull/562)
- Support setting custom tunnel destination port [#561](https://github.com/nanobox-io/nanobox/pull/561) [#564](https://github.com/nanobox-io/nanobox/pull/564)
- Support streaming production logs [#549](https://github.com/nanobox-io/nanobox/pull/549) [#562](https://github.com/nanobox-io/nanobox/pull/562)
- Allow either username or email address for login [#565](https://github.com/nanobox-io/nanobox/pull/565)

BUG FIXES:
Expand All @@ -42,7 +45,7 @@ FEATURES:
- Support loading evars from files [#535](https://github.com/nanobox-io/nanobox/pull/535)
- Unify removing evars (case insensitivity) [#539](https://github.com/nanobox-io/nanobox/pull/535)
- Add universal versioning [#506](https://github.com/nanobox-io/nanobox/pull/506)
- Add suggestions for common problems [#515](https://github.com/nanobox-io/nanobox/pull/515)[#517](https://github.com/nanobox-io/nanobox/pull/517)[#521](https://github.com/nanobox-io/nanobox/pull/521)
- Add suggestions for common problems [#515](https://github.com/nanobox-io/nanobox/pull/515) [#517](https://github.com/nanobox-io/nanobox/pull/517) [#521](https://github.com/nanobox-io/nanobox/pull/521)

BUG FIXES:
- Check for boxfile and validate in separate steps [#512](https://github.com/nanobox-io/nanobox/pull/512)
Expand Down Expand Up @@ -88,14 +91,14 @@ FEATURES:

BUG FIXES:
- Add idempotency to linux systemd service start [#399](https://github.com/nanobox-io/nanobox/pull/399)
- Fix an issue where the dev container disappeard unexpectedly [#402](https://github.com/nanobox-io/nanobox/pull/402)
- Fix an issue where the dev container disappeared unexpectedly [#402](https://github.com/nanobox-io/nanobox/pull/402)
- Fix an issue that caused us to pull s3 for updates every time [#396](https://github.com/nanobox-io/nanobox/pull/396)
- Fix an issue with /etc/exports on osx [#392](https://github.com/nanobox-io/nanobox/pull/392)

FEATURES:
- Make linux startup system more flexable [#397](https://github.com/nanobox-io/nanobox/pull/397)
- Optimize display of summarized test [#395](https://github.com/nanobox-io/nanobox/pull/395)
- Add a check in for boxfile existance [#388](https://github.com/nanobox-io/nanobox/pull/388)
- Add a check in for boxfile existence [#388](https://github.com/nanobox-io/nanobox/pull/388)

## 2.0.3 (February 23, 2017)

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 Nanobox
Copyright (c) 2019 Microbox

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
80 changes: 57 additions & 23 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,41 +1,75 @@
TAG=`git describe --always --tags --abbrev=0 | tr -d "[v\r\n]"`
COMMIT=`git rev-parse --short HEAD | tr -d "[ \r\n\']"`
BUILD_DATE=`date -u +%y%m%dT%H%M`
GITSTATUS='$(shell git status 2> /dev/null | tail -n1)'
DIRTY="$(shell [ $(GITSTATUS) = 'no changes added to commit (use "git add" and/or "git commit -a")' ] && echo -n "*")"
GO_LDFLAGS="-s -X github.com/nanobox-io/nanobox/util/odin.apiKey=$(API_KEY) -X github.com/nanobox-io/nanobox/models.nanoVersion=$(TAG) -X github.com/nanobox-io/nanobox/models.nanoCommit=$(COMMIT)$(DIRTY) -X github.com/nanobox-io/nanobox/models.nanoBuild=$(BUILD_DATE)"
TAG=$(shell git describe --always --tags --abbrev=0 | tr -d "[v\r\n]")
TAGDIR=$(shell echo $(TAG) | sed -E 's/([0-9]+)\..+/v\1/')
COMMIT=$(shell git rev-parse --short HEAD | tr -d "[ \r\n\']")
BUILD_DATE=$(shell date -u +%Y%m%dT%H%M%S)
GITSTATUS=$(shell git status 2> /dev/null | tail -n1)
DIRTY=$(shell [ "$(GITSTATUS)" = 'nothing to commit, working tree clean' ] || echo -n "+")
GO_LDFLAGS="-s -X github.com/mu-box/microbox/util/odin.apiKey=$(API_KEY) -X github.com/mu-box/microbox/models.microVersion=$(TAG) -X github.com/mu-box/microbox/models.microCommit=$(COMMIT)$(DIRTY) -X github.com/mu-box/microbox/models.microBuild=$(BUILD_DATE)"

default: build
default: all

local: linux windows darwin

clean:
@echo "Cleaning old builds"
@rm -rf "./.build"

all: build

# go get github.com/mitchellh/gox
build: clean
@echo "Building nanobox"
@gox -ldflags=$(GO_LDFLAGS) -osarch "darwin/amd64 linux/amd64 windows/amd64" -output="./.build/v2/{{.OS}}/{{.Arch}}/nanobox"
@echo -en "Nanobox Version $(TAG)-$(BUILD_DATE) ($(COMMIT))" > ./.build/v2/version
@echo "Building nanobox-update"
@cd ./updater && gox -osarch "darwin/amd64 linux/amd64 windows/amd64" -ldflags="-s" -output="../.build/v2/{{.OS}}/{{.Arch}}/nanobox-update"
@echo "Building microbox"
@gox -ldflags=$(GO_LDFLAGS) -osarch "darwin/amd64 darwin/arm64 linux/amd64 linux/arm linux/arm64 linux/s390x windows/amd64" -output="./.build/$(TAGDIR)/{{.OS}}/{{.Arch}}/microbox"
@echo -n "Microbox Version $(TAG)-$(BUILD_DATE) ($(COMMIT)$(DIRTY))" > ./.build/$(TAGDIR)/version
@echo "Building microbox-update"
@cd ./updater && gox -osarch "darwin/amd64 darwin/arm64 linux/amd64 linux/arm linux/arm64 linux/s390x windows/amd64" -ldflags="-s" -output="../.build/$(TAGDIR)/{{.OS}}/{{.Arch}}/microbox-update"


native:
@echo "Building microbox (native os/arch)"
@go build -ldflags=$(GO_LDFLAGS) -o microbox


linux: linux-amd64 linux-arm32 linux-arm64 linux-s390x

linux-amd64:
@echo "Building microbox-linux-amd64"
@GOOS=linux GOARCH=amd64 go build -ldflags=$(GO_LDFLAGS) -o microbox-linux-amd64

linux-arm32:
@echo "Building microbox-linux-arm32"
@GOOS=linux GOARCH=arm go build -ldflags=$(GO_LDFLAGS) -o microbox-linux-arm32

linux-arm64:
@echo "Building microbox-linux-arm64"
@GOOS=linux GOARCH=arm64 go build -ldflags=$(GO_LDFLAGS) -o microbox-linux-arm64

linux-s390x:
@echo "Building microbox-linux-s390x"
@GOOS=linux GOARCH=s390x go build -ldflags=$(GO_LDFLAGS) -o microbox-linux-s390x


windows: windows-amd64

windows-amd64:
@echo "Building microbox-windows-amd64"
@GOOS=windows GOARCH=amd64 go build -ldflags=$(GO_LDFLAGS) -o microbox-windows-amd64


darwin: darwin-amd64 darwin-arm64

linux:
@echo "Building nanobox-linux"
@GOOS=linux go build -ldflags=$(GO_LDFLAGS) -o nanobox-linux
darwin-amd64:
@echo "Building microbox-darwin-amd64"
@GOOS=darwin GOARCH=amd64 go build -ldflags=$(GO_LDFLAGS) -o microbox-darwin-amd64

windows:
@echo "Building nanobox-windows"
@GOOS=windows go build -ldflags=$(GO_LDFLAGS) -o nanobox-windows
darwin-arm64:
@echo "Building microbox-darwin-arm64"
@GOOS=darwin GOARCH=arm64 go build -ldflags=$(GO_LDFLAGS) -o microbox-darwin-arm64

darwin:
@echo "Building nanobox-darwin"
@GOOS=darwin go build -ldflags=$(GO_LDFLAGS) -o nanobox-darwin

# go get github.com/kardianos/govendor
test:
@govendor test +local -v
@go test -v ./...


.PHONY: fmt test clean build linux windows darwin
.PHONY: test clean all build native linux windows windows-amd64 darwin darwin-amd64 darwin-arm64
Loading

8 comments on commit e815e20

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠ misspell failed (.)

util/provider/dockermachine.go:93:26: "exportfs" is a misspelling of "exports"
util/provider/dockermachine.go:94:40: "exportfs" is a misspelling of "exports"
util/provider/dockermachine.go:95:40: "exportfs" is a misspelling of "exports"
util/provider/share/share_linux.go:296:21: "exportfs" is a misspelling of "exports"

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠ gocyclo failed (.)

6 function(s) exceeding a complexity of 15

Show Detail
27 odin doRequest util/odin/odin.go:326:1
25 processors ConfigureSet processors/configure_set.go:10:1
21 main main main.go:33:1
19 env Setup processors/env/setup.go:21:1
18 models (*Config).makeValid models/config.go:48:1
16 util OsArchDetect util/os.go:85:1
Average: 3.4
Total: 2846

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠ ineffassign failed (.)

/github/workspace/models/config.go:104:2: ineffectual assignment to c
/github/workspace/models/console.go:30:2: ineffectual assignment to c
/github/workspace/models/provider.go:34:2: ineffectual assignment to a

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠ errcheck failed (.)

commands/commands.go:44:24:	processors.SubmitLog(strings.Replace(ccmd.CommandPath(), "microbox ", "", 1))
commands/commands.go:123:42:	MicroboxCmd.PersistentFlags().MarkHidden("endpoint")
commands/commands.go:125:42:	MicroboxCmd.PersistentFlags().MarkHidden("internal")
commands/configure.go:89:16:	json.Unmarshal(jsonData, &configMap)
commands/dev/start.go:47:15:	provider.Init()
commands/dns/add.go:38:15:	app.Generate(env, name)
commands/evar/add.go:53:22:	production_evar.Add(env, name, evars)
commands/evar/list.go:49:23:	production_evar.List(env, name)
commands/evar/load.go:59:22:	production_evar.Add(env, name, evars)
commands/evar/remove.go:59:25:	production_evar.Remove(env, name, evars)
commands/server/server.go:69:15:	rpc.Register(controller)
commands/server/server.go:161:9:	w.Write([]byte("pong\n"))
commands/server/server.go:165:21:	http.ListenAndServe(":65000", handle{})
commands/sim/start.go:44:15:	provider.Init()
generators/containers/containers_test.go:64:15:	dhcp.ReturnIP(net.ParseIP(result.IP))
main.go:121:30:	commands.MicroboxCmd.Execute()
main.go:184:13:	config.Save()
main.go:189:19:	reader.ReadString('\n')
main.go:192:20:	processors.Implode()
main.go:198:13:	config.Save()
main.go:201:20:	providerModel.Save()
main.go:204:13:	os.Unsetenv("DOCKER_TLS_VERIFY")
main.go:205:13:	os.Unsetenv("DOCKER_MACHINE_NAME")
main.go:206:13:	os.Unsetenv("DOCKER_HOST")
main.go:207:13:	os.Unsetenv("DOCKER_CERT_PATH")
models/app.go:77:14:	env.Generate()
models/db_test.go:66:5:	put("user", "1", mickey)
models/db_test.go:67:5:	put("user", "2", minnie)
models/db_test.go:68:5:	put("user", "3", donald)
models/db_test.go:84:5:	put("user", "1", mickey)
models/db_test.go:85:5:	put("user", "2", minnie)
models/models.go:7:9:	getAll(bucket, &v)
models/models.go:11:5:	get(bucket, key, &v)
processors/app/deploy.go:71:21:	display.OpenContext("Finalizing deploy")
processors/app/deploy.go:74:19:	display.StartTask("Running before_live hooks")
processors/app/deploy.go:76:20:	display.ErrorTask()
processors/app/deploy.go:79:18:	display.StopTask()
processors/app/deploy.go:82:19:	display.StartTask("Updating router")
processors/app/deploy.go:84:20:	display.ErrorTask()
processors/app/deploy.go:87:18:	display.StopTask()
processors/app/deploy.go:89:19:	display.StartTask("Running after_live hooks")
processors/app/deploy.go:91:20:	display.ErrorTask()
processors/app/deploy.go:94:18:	display.StopTask()
processors/app/destroy.go:28:18:	locker.LocalLock()
processors/app/destroy.go:47:21:	display.OpenContext("%s (%s)", envModel.Name, appModel.DisplayName())
processors/app/destroy.go:51:24:	docker.ContainerRemove(fmt.Sprintf("microbox_%s", appModel.ID))
processors/app/destroy.go:75:21:	display.OpenContext("Removing components")
processors/app/destroy.go:85:20:	display.StartTask("Skipping (no components)")
processors/app/destroy.go:86:19:	display.StopTask()
processors/app/destroy.go:101:19:	display.StartTask("Releasing IPs")
processors/app/destroy.go:108:21:	display.ErrorTask()
processors/app/destroy.go:127:23:	docker.ImageRemove(tag, false)
processors/app/dns/add.go:58:14:	display.Info("\n%s %s added\n", display.TaskComplete, name)
processors/app/dns/remove.go:41:14:	display.Info("\n%s %s removed\n", display.TaskComplete, name)
processors/app/dns/remove_all.go:33:14:	display.Info("\n%s removed all\n", display.TaskComplete)
processors/app/setup.go:20:18:	locker.LocalLock()
processors/app/setup.go:57:19:	display.StartTask("Reserving IPs")
processors/app/setup.go:64:21:	display.ErrorTask()
processors/app/setup.go:79:22:	display.ErrorTask()
processors/app/setup.go:91:22:	display.ErrorTask()
processors/app/setup.go:104:20:	display.ErrorTask()
processors/app/start.go:16:21:	display.OpenContext("%s (%s)", envModel.Name, appModel.DisplayName())
processors/app/start.go:26:20:	display.StartTask("Restoring App")
processors/app/start.go:27:19:	display.StopTask()
processors/app/start.go:32:12:	reserveIPs(appModel)
processors/app/start.go:34:18:	locker.LocalLock()
processors/app/stop.go:22:18:	locker.LocalLock()
processors/app/stop.go:38:21:	display.OpenContext("%s (%s)", envModel.Name, appModel.DisplayName())
processors/app/stop.go:51:19:	display.StartTask("Pausing App")
processors/app/stop.go:52:18:	display.StopTask()
processors/app/stop.go:55:18:	stopDevContainer(appModel)
processors/build.go:16:18:	locker.LocalLock()
processors/clean.go:13:19:	locker.GlobalLock()
processors/clean.go:16:21:	display.OpenContext("Cleaning stale environments")
processors/clean.go:33:20:	display.StartTask("Skipping (none detected)")
processors/clean.go:34:19:	display.StopTask()
processors/code/build.go:22:21:	display.OpenContext("Building runtime")
processors/code/build.go:32:24:	docker.ContainerRemove(container_generator.BuildName())
processors/code/build.go:34:19:	display.StartTask("Starting docker container")
processors/code/build.go:44:18:	display.StopTask()
processors/code/build.go:69:15:	envModel.Save()
processors/code/build.go:81:19:	display.StartTask("Preparing environment for build")
processors/code/build.go:131:19:	display.StartTask("Gathering requirements")
processors/code/build.go:168:19:	display.StartTask("Mounting cache_dirs")
processors/code/build.go:185:19:	display.StartTask("Installing binaries and runtimes")
processors/code/build.go:202:19:	display.StartTask("Packaging build")
processors/code/code.go:34:19:	display.StartTask("Pulling %s image", buildImage)
processors/code/code.go:50:20:	display.ErrorTask()
processors/code/compile.go:21:21:	display.OpenContext("Compiling application")
processors/code/compile.go:31:24:	docker.ContainerRemove(container_generator.CompileName())
processors/code/compile.go:33:19:	display.StartTask("Starting docker container")
processors/code/compile.go:43:18:	display.StopTask()
processors/code/compile.go:65:19:	display.StartTask("Preparing environment for compile")
processors/code/compile.go:115:19:	display.StartTask("Compiling code")
processors/code/destroy.go:17:21:	display.OpenContext(componentModel.Label)
processors/code/destroy.go:33:20:	display.ErrorTask()
processors/code/destroy.go:42:19:	display.StartTask("Destroying docker container")
processors/code/destroy.go:51:20:	display.ErrorTask()
processors/code/destroy.go:60:19:	display.StartTask("Releasing IPs")
processors/code/destroy.go:66:20:	display.ErrorTask()
processors/code/publish.go:20:21:	display.OpenContext("Deploying app")
processors/code/publish.go:35:19:	display.StartTask("Starting docker container")
processors/code/publish.go:38:24:	docker.ContainerRemove(container_generator.PublishName())
processors/code/publish.go:45:20:	display.ErrorTask()
processors/code/publish.go:51:18:	display.StopTask()
processors/code/publish.go:56:19:	display.StartTask("Uploading")
processors/code/publish.go:89:20:	display.ErrorTask()
processors/code/publish.go:100:18:	display.StopTask()
processors/code/setup.go:31:21:	display.OpenContext(componentModel.Label)
processors/code/setup.go:42:20:	display.StartTask("Pulling %s image", componentModel.Image)
processors/code/setup.go:49:21:	display.ErrorTask()
processors/code/setup.go:52:19:	display.StopTask()
processors/code/setup.go:56:19:	display.StartTask("Starting docker container")
processors/code/setup.go:58:20:	display.ErrorTask()
processors/code/setup.go:68:24:	docker.ContainerRemove(config.Name)
processors/code/setup.go:73:20:	display.ErrorTask()
processors/code/setup.go:76:18:	display.StopTask()
processors/code/setup.go:91:19:	display.StartTask("Fetching build from warehouse")
processors/code/setup.go:93:20:	display.ErrorTask()
processors/code/setup.go:96:18:	display.StopTask()
processors/code/setup.go:102:19:	display.StartTask("Starting services")
processors/code/setup.go:104:20:	display.ErrorTask()
processors/code/setup.go:110:20:	display.ErrorTask()
processors/code/setup.go:113:18:	display.StopTask()
processors/code/sync.go:15:21:	display.OpenContext("Syncing code components")
processors/code/sync.go:20:18:	locker.LocalLock()
processors/code/sync.go:36:21:	display.OpenContext("Removing old")
processors/code/sync.go:64:21:	display.OpenContext("Starting new")
processors/code/sync.go:69:18:	locker.LocalLock()
processors/compile.go:15:18:	locker.LocalLock()
processors/component/clean.go:27:21:	display.OpenContext("Cleaning dirty components")
processors/component/destroy.go:17:21:	display.OpenContext(componentModel.Label)
processors/component/destroy.go:49:19:	display.StartTask("Destroying docker container")
processors/component/destroy.go:59:20:	display.ErrorTask()
processors/component/destroy.go:68:19:	display.StartTask("Releasing IPs")
processors/component/destroy.go:81:21:	display.ErrorTask()
processors/component/setup.go:32:21:	display.OpenContext(componentModel.Label)
processors/component/setup.go:55:20:	display.StartTask("Pulling %s image", componentModel.Image)
processors/component/setup.go:63:25:	componentModel.Delete()
processors/component/setup.go:64:21:	display.ErrorTask()
processors/component/setup.go:67:19:	display.StopTask()
processors/component/setup.go:75:19:	display.StartTask("Starting docker container")
processors/component/setup.go:81:24:	docker.ContainerRemove(config.Name)
processors/component/setup.go:86:20:	display.ErrorTask()
processors/component/setup.go:89:18:	display.StopTask()
processors/component/setup.go:119:19:	display.StartTask("Reserve IP")
processors/component/setup.go:135:21:	display.StopTask()
processors/component/setup.go:145:19:	display.StopTask()
processors/component/setup.go:155:19:	display.StartTask("Gathering requirements")
processors/component/setup.go:180:19:	display.StartTask("Configuring services")
processors/component/setup.go:185:20:	display.ErrorTask()
processors/component/start.go:20:21:	display.OpenContext(componentModel.Label)
processors/component/start.go:38:19:	display.StartTask("Start docker container")
processors/component/start_all.go:25:21:	display.OpenContext("Starting components")
processors/component/stop.go:19:21:	display.OpenContext(componentModel.Label)
processors/component/stop.go:32:19:	display.StartTask("Stopping docker container")
processors/component/stop.go:36:20:	display.ErrorTask()
processors/component/stop_all.go:25:21:	display.OpenContext("Stopping components")
processors/component/sync.go:14:21:	display.OpenContext("Syncing data components")
processors/component/sync.go:46:21:	display.OpenContext("Removing old")
processors/component/sync.go:87:20:	display.StartTask("Skipping (up-to-date)")
processors/component/sync.go:88:19:	display.StopTask()
processors/component/sync.go:96:21:	display.OpenContext("Launching new")
processors/component/sync.go:130:20:	display.StartTask("Skipping (up-to-date)")
processors/component/sync.go:131:19:	display.StopTask()
processors/configure.go:51:98:	exec.Command("open", "https://microbox.rocks/installing-microbox-on-macos-high-sierra/").Start()
processors/configure.go:54:18:	models.DoneRead()
processors/configure.go:105:14:	config.Save()
processors/configure.go:136:13:	config.Save()
processors/configure.go:144:12:	fmt.Fprint(os.Stdout, text)
processors/configure.go:145:12:	fmt.Scanln(&answer)
processors/configure.go:151:13:	fmt.Scanln(&answer)
processors/configure.go:161:12:	fmt.Scanln(&answer)
processors/configure.go:166:13:	fmt.Scanln(&answer)
processors/env/destroy.go:19:18:	locker.LocalLock()
processors/env/destroy.go:55:21:	docker.VolumeRemove(fmt.Sprintf("microbox_%s_app", env.ID))
processors/env/destroy.go:56:21:	docker.VolumeRemove(fmt.Sprintf("microbox_%s_cache", env.ID))
processors/env/destroy.go:57:21:	docker.VolumeRemove(fmt.Sprintf("microbox_%s_mount", env.ID))
processors/env/destroy.go:58:21:	docker.VolumeRemove(fmt.Sprintf("microbox_%s_deploy", env.ID))
processors/env/destroy.go:59:21:	docker.VolumeRemove(fmt.Sprintf("microbox_%s_build", env.ID))
processors/env/mount.go:20:19:	display.StartTask("Mounting codebase")
processors/env/mount.go:34:21:	display.ErrorTask()
processors/env/mount.go:45:20:	display.ErrorTask()
processors/env/setup.go:102:21:	display.OpenContext("Preparing environment")
processors/env/setup.go:111:20:	display.ErrorTask()
processors/env/unmount.go:21:19:	display.StartTask(env.Name)
processors/env/unmount.go:32:21:	display.ErrorTask()
processors/env/unmount.go:43:20:	display.ErrorTask()
processors/env/unmount.go:58:21:	display.ErrorTask()
processors/implode.go:21:21:	display.OpenContext("Imploding Microbox")
processors/implode.go:53:21:	purgeConfiguration()
processors/implode.go:62:19:	display.StartTask("Purging configuration")
processors/platform/setup.go:11:21:	display.OpenContext("Starting components")
processors/provider/bridge/setup.go:28:21:	display.OpenContext("Building bridge")
processors/provider/bridge/setup.go:64:18:	locker.LocalLock()
processors/provider/bridge/setup.go:75:19:	display.StartTask("Starting docker container")
processors/provider/bridge/setup.go:78:20:	display.ErrorTask()
processors/provider/bridge/setup.go:81:18:	display.StopTask()
processors/provider/bridge/setup.go:83:19:	display.StartTask("Setting up container")
processors/provider/bridge/setup.go:103:18:	display.StopTask()
processors/provider/bridge/setup.go:124:19:	display.StartTask("Pulling %s image", image)
processors/provider/bridge/setup.go:139:20:	display.ErrorTask()
processors/provider/bridge/setup.go:151:19:	display.StartTask("Configuring")
processors/provider/destroy.go:14:19:	locker.GlobalLock()
processors/provider/setup.go:19:19:	locker.GlobalLock()
processors/provider/setup.go:25:20:	display.StartTask("Skipping (already running)")
processors/provider/setup.go:26:19:	display.StopTask()
processors/provider/setup.go:40:21:	display.OpenContext("Starting Microbox")
processors/provider/setup.go:58:19:	display.StartTask("Joining virtual network")
processors/provider/setup.go:65:18:	display.StopTask()
processors/provider/setup.go:71:22:	display.CloseContext()
processors/provider/setup.go:92:20:	display.ErrorTask()
processors/provider/setup.go:101:20:	display.ErrorTask()
processors/provider/setup.go:109:20:	display.ErrorTask()
processors/provider/setup.go:121:20:	display.ErrorTask()
processors/provider/setup.go:128:20:	display.ErrorTask()
processors/provider/stop.go:15:19:	locker.GlobalLock()
processors/provider/stop.go:18:21:	display.OpenContext("Stopping Microbox")
processors/run.go:66:18:	locker.LocalLock()
processors/run.go:75:12:	teardown(appModel)
processors/run.go:79:21:	display.OpenContext("Building dev environment")
processors/run.go:90:19:	display.StartTask("Starting docker container")
processors/run.go:93:20:	display.ErrorTask()
processors/run.go:96:18:	display.StopTask()
processors/run.go:101:19:	display.StartTask("Configuring")
processors/run.go:123:18:	display.StopTask()
processors/run.go:129:18:	locker.LocalLock()
processors/run.go:161:19:	display.StartTask("Pulling %s image", image)
processors/run.go:175:20:	display.ErrorTask()
processors/run.go:188:17:	go watch.Watch(container_generator.DevName(), envModel.Directory)
processors/run.go:232:18:	console.Delete()
processors/server/setup.go:27:14:	service.Stop("microbox-vpn")
processors/server/setup.go:28:16:	service.Remove("microbox-vpn")
processors/stop.go:65:21:	display.OpenContext("Stopping Apps and Components")
processors/submit_log.go:51:21:	go odin.SubmitEvent(
processors/update.go:33:21:	display.OpenContext("Updating Images")
processors/update.go:48:20:	display.StartTask("Pulling %s image", image.Slug)
processors/update.go:63:21:	display.ErrorTask()
processors/update.go:67:19:	display.StopTask()
updater/main.go:51:14:	fmt.Scanln(&input)
updater/main.go:76:14:	service.Stop("microbox-server")
updater/main.go:91:13:	fmt.Scanln(&input)
util/config/dirs.go:29:13:	os.MkdirAll(globalDir, 0755)
util/console/console.go:86:14:	console.Save()
util/console/console.go:104:12:	go io.Copy(resp.Conn, os.Stdin)
util/console/console.go:105:9:	io.Copy(os.Stdout, resp.Reader)
util/dhcp/dhcp.go:32:19:	locker.GlobalLock()
util/dhcp/dhcp.go:70:19:	locker.GlobalLock()
util/dhcp/dhcp.go:77:12:	ips.Delete()
util/dhcp/dhcp.go:99:19:	locker.GlobalLock()
util/dhcp/dhcp.go:161:19:	locker.GlobalLock()
util/dhcp/dhcp_test.go:77:15:	dhcp.ReturnIP(one)
util/dhcp/dhcp_test.go:78:15:	dhcp.ReturnIP(three)
util/display/command_error.go:81:18:	odin.SubmitEvent(
util/display/command_error.go:110:13:	fmt.Scanln(&input)
util/display/display.go:197:12:	Out.Write(taskLog.Bytes())
util/display/display.go:367:21:	logFile.WriteString(message)
util/display/docker_percent.go:125:17:	json.Unmarshal(line, &status)
util/display/docker_percent.go:149:14:	fmt.Fprintf(display.Output, "\r\x1b[K")
util/display/docker_percent.go:150:14:	fmt.Fprintf(display.Output, "%s %s", display.Prefix, display.show())
util/display/download_percent.go:69:13:	fmt.Fprintf(dp.Output, "\r\x1b[K")
util/display/download_percent.go:81:13:	fmt.Fprintf(dp.Output, "\r   %.2f/%.2fMB [%-41s %.2f%%]", currentInMB, totalInMB, strings.Repeat("*", int(percent/2.5)), percent)
util/display/download_percent.go:86:13:	fmt.Fprintf(dp.Output, "   %.2fMB", float64(dp.current)/bytesPerMB)
util/display/messages.go:10:23:	os.Stderr.WriteString(fmt.Sprintf(`
util/display/messages.go:30:23:	os.Stderr.WriteString(fmt.Sprintf(`
util/display/messages.go:43:23:	os.Stderr.WriteString(fmt.Sprintf(`
util/display/messages.go:55:23:	os.Stderr.WriteString(fmt.Sprintf(`
util/display/messages.go:65:23:	os.Stderr.WriteString(fmt.Sprintf(`
util/display/messages.go:80:23:	os.Stderr.WriteString(fmt.Sprintf(`
util/display/messages.go:91:23:	os.Stderr.WriteString(fmt.Sprintf(`
util/display/messages.go:105:23:	os.Stderr.WriteString(fmt.Sprintf("%s\n", strings.Repeat("-", len(cmd)+10)))
util/display/messages.go:110:23:	os.Stderr.WriteString(fmt.Sprintf(`
util/display/messages.go:120:23:	os.Stderr.WriteString(fmt.Sprintf(`
util/display/messages.go:130:23:	os.Stderr.WriteString(fmt.Sprintf(`
util/display/messages.go:141:23:	os.Stderr.WriteString(fmt.Sprintf(`
util/display/messages.go:152:23:	os.Stderr.WriteString(fmt.Sprintf(`
util/display/messages.go:163:23:	os.Stderr.WriteString(fmt.Sprintf(`
util/display/messages.go:176:23:	os.Stderr.WriteString(fmt.Sprintf(`
util/display/messages.go:187:23:	os.Stderr.WriteString(fmt.Sprintf(`
util/display/messages.go:202:23:	os.Stderr.WriteString(fmt.Sprintf(`
util/display/messages.go:210:23:	os.Stderr.WriteString(fmt.Sprintf(`
util/display/messages.go:216:23:	os.Stderr.WriteString(fmt.Sprintf(`
util/display/messages.go:229:23:	os.Stderr.WriteString(fmt.Sprintf(`
util/display/messages.go:239:23:	os.Stderr.WriteString(fmt.Sprintf(`
util/display/messages.go:246:23:	os.Stderr.WriteString(fmt.Sprintf(`
util/display/messages.go:258:23:	os.Stderr.WriteString(fmt.Sprintf(`
util/display/messages.go:268:23:	os.Stderr.WriteString(fmt.Sprintf(`
util/display/messages.go:281:23:	os.Stderr.WriteString(fmt.Sprintf(`
util/display/messages.go:291:23:	os.Stderr.WriteString(fmt.Sprintf(`
util/display/messages.go:298:23:	os.Stderr.WriteString(fmt.Sprintf(`
util/display/messages.go:309:23:	os.Stderr.WriteString(fmt.Sprintf(`
util/display/messages.go:318:23:	os.Stderr.WriteString(fmt.Sprintf(`
util/display/messages.go:328:23:	os.Stderr.WriteString(fmt.Sprintf(`
util/display/messages.go:338:23:	os.Stderr.WriteString(fmt.Sprintf(`
util/display/messages.go:349:23:	os.Stderr.WriteString(fmt.Sprintf(`
util/display/messages.go:359:23:	os.Stderr.WriteString(fmt.Sprintf(`
util/display/prefix.go:126:12:	fmt.Sscanf(p.escapeBuf, "\x1b[%dG", number)
util/display/prefix.go:135:12:	fmt.Sscanf(p.escapeBuf, "\x1b[%d;%dH", y, x)
util/display/summary.go:283:16:	io.WriteString(s.Out, header)
util/display/summary.go:296:16:	io.WriteString(s.Out, header)
util/display/summary.go:309:16:	io.WriteString(s.Out, header)
util/display/summary.go:325:16:	io.WriteString(s.Out, reset)
util/display/summary.go:348:16:	io.WriteString(s.Out, header)
util/display/summary.go:349:16:	io.WriteString(s.Out, detail)
util/fileutil/download.go:38:11:	fd.Write(b[:n])
util/hookit/hookit.go:59:20:	display.ErrorTask()
util/microagent/console.go:59:12:	go io.Copy(remoteConn, os.Stdin)
util/microagent/console.go:60:9:	io.Copy(os.Stdout, remoteConn)
util/microagent/console.go:73:11:	resizeTTY(stdOutFD, location, key)
util/microagent/console.go:77:12:	resizeTTY(stdOutFD, location, key)
util/microagent/tunnel.go:87:12:	go io.Copy(conn, remoteConn)
util/provider/bridge/start.go:32:10:	br.Stop(conf, resp)
util/provider/dockermachine.go:130:60:	exec.Command(dockerMachineCmd, "rm", "-f", "microbox").Run()
util/provider/dockermachine.go:193:19:	display.StartTask("Launching VM")
util/provider/dockermachine.go:201:20:	display.ErrorTask()
util/provider/dockermachine.go:205:18:	display.StopTask()
util/provider/dockermachine.go:239:19:	display.StartTask("Shutting down VM")
util/provider/dockermachine.go:242:20:	display.ErrorTask()
util/provider/dockermachine.go:246:18:	display.StopTask()
util/provider/dockermachine.go:276:19:	display.StartTask("Destroying VM")
util/provider/dockermachine.go:279:20:	display.ErrorTask()
util/provider/dockermachine.go:283:18:	display.StopTask()
util/provider/dockermachine.go:309:20:	display.StartTask("Booting VM")
util/provider/dockermachine.go:312:21:	display.ErrorTask()
util/provider/dockermachine.go:316:19:	display.StopTask()
util/provider/dockermachine.go:351:20:	display.StartTask("Configuring Network")
util/provider/dockermachine.go:354:21:	display.ErrorTask()
util/provider/dockermachine.go:358:19:	display.StopTask()
util/provider/dockermachine.go:379:19:	display.StartTask("Loading kernel modules")
util/provider/dockermachine.go:382:20:	display.ErrorTask()
util/provider/dockermachine.go:386:18:	display.StopTask()
util/provider/dockermachine.go:388:19:	display.StartTask("Cleaning DHCP")
util/provider/dockermachine.go:404:13:	process.Run()
util/provider/dockermachine.go:406:18:	display.StopTask()
util/provider/dockermachine.go:421:20:	display.ErrorTask()
util/provider/dockermachine.go:481:12:	os.Setenv("DOCKER_TLS_VERIFY", "1")
util/provider/dockermachine.go:488:11:	os.Setenv("DOCKER_MACHINE_NAME", "microbox")
util/provider/dockermachine.go:489:11:	os.Setenv("DOCKER_HOST", fmt.Sprintf("tcp://%s:2376", inspect.Driver.IPAddress))
util/provider/dockermachine.go:490:11:	os.Setenv("DOCKER_CERT_PATH", inspect.HostOptions.AuthOptions.StorePath)
util/provider/dockermachine.go:806:19:	display.StartTask("Regenerating Docker certs")
util/provider/dockermachine.go:811:20:	display.ErrorTask()
util/provider/dockermachine.go:815:18:	display.StopTask()
util/provider/dockermachine.go:1002:17:	provider.Save()
util/provider/native.go:98:20:	display.StartTask("Removing custom docker network...")
util/provider/native.go:106:21:	display.ErrorTask()
util/provider/native.go:109:19:	display.StopTask()
util/provider/native.go:120:20:	display.StartTask("Setting up custom docker network...")
util/provider/native.go:137:15:	fmt.Sscanf(config.NativeNetworkSpace, "172.%d.0.1/16", &oct)
util/provider/native.go:159:22:	display.ErrorTask()
util/provider/native.go:167:16:	config.Save()
util/provider/native.go:170:20:	display.StopTask()
util/provider/native.go:186:21:	display.ErrorTask()
util/provider/native.go:190:19:	display.StopTask()
util/provider/native.go:203:13:	os.MkdirAll(dir, 0755)
util/provider/native.go:211:13:	os.MkdirAll(dir, 0755)
util/provider/share/share_test.go:22:15:	provider.Save()
util/provider/share/share_test.go:25:11:	os.Remove(share.EXPORTSFILE)
util/provider/share/share_test.go:27:11:	os.Remove(share.EXPORTSFILE)
util/provider/share/share_test.go:28:17:	provider.Delete()
util/service/remove_unix.go:22:11:	os.Remove(serviceConfigFile(name))
util/update/check.go:22:17:	checkTomorrow(&models.Update{})
util/update/check.go:36:16:	checkTomorrow(updateInfo)
util/update/run.go:45:9:	dp.Copy(tmpFile, resp.Body)
util/update/run.go:48:15:	tmpFile.Close()
util/util_unix.go:30:20:	reader.ReadString('\n')
util/watch/crawl_internal_test.go:10:13:	os.MkdirAll("/tmp/microbox/", 0777)
util/watch/crawl_internal_test.go:18:54:	exec.Command("touch", "/tmp/microbox/crawl.tmp").Run()
util/watch/notify.go:47:17:	watcher.Close()
util/watch/notify.go:94:15:	filepath.Walk(path, func(newPath string, info os.FileInfo, err error) error {
util/watch/notify_internal_test.go:11:13:	os.MkdirAll("/tmp/microbox/", 0777)
util/watch/notify_internal_test.go:17:21:	notifyWatcher.watch()
util/watch/notify_internal_test.go:20:18:	ioutil.WriteFile("/tmp/microbox/notify.tmp", []byte("hi"), 0777)
util/watch/watch.go:145:17:	util.DockerExec(container, "root", "ctime", changeList, nil)

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠ gosec failed (.)

Summary:
   Files: 244
   Lines: 19234
   Nosec: 0
  Issues: 89
Show Detail
Results:


[/github/workspace/commands/evar/load.go:113] - G304 (CWE-22): Potential file inclusion via variable (Confidence: HIGH, Severity: MEDIUM)
  > ioutil.ReadFile(filename)

[/github/workspace/generators/hooks/build/user.go:90] - G304 (CWE-22): Potential file inclusion via variable (Confidence: HIGH, Severity: MEDIUM)
  > ioutil.ReadFile(keyFile)

[/github/workspace/processors/log/log.go:193] - G402 (CWE-295): TLS InsecureSkipVerify set true. (Confidence: HIGH, Severity: HIGH)
  > InsecureSkipVerify: true

[/github/workspace/processors/provider/bridge/setup.go:157] - G301 (CWE-276): Expect directory permissions to be 0750 or less (Confidence: HIGH, Severity: MEDIUM)
  > os.MkdirAll(vpnDir, 0755)

[/github/workspace/processors/provider/bridge/setup.go:162] - G306 (CWE-): Expect WriteFile permissions to be 0600 or less (Confidence: HIGH, Severity: MEDIUM)
  > ioutil.WriteFile(ConfigFile(), []byte(BridgeConfig()), 0644)

[/github/workspace/processors/provider/bridge/setup.go:172] - G306 (CWE-): Expect WriteFile permissions to be 0600 or less (Confidence: HIGH, Severity: MEDIUM)
  > ioutil.WriteFile(CaCrt(), []byte(keys["ca.crt"]), 0644)

[/github/workspace/processors/provider/bridge/setup.go:177] - G306 (CWE-): Expect WriteFile permissions to be 0600 or less (Confidence: HIGH, Severity: MEDIUM)
  > ioutil.WriteFile(ClientKey(), []byte(keys["client.key"]), 0644)

[/github/workspace/processors/provider/bridge/setup.go:181] - G306 (CWE-): Expect WriteFile permissions to be 0600 or less (Confidence: HIGH, Severity: MEDIUM)
  > ioutil.WriteFile(ClientCrt(), []byte(keys["client.crt"]), 0644)

[/github/workspace/util/config/dirs.go:29] - G301 (CWE-276): Expect directory permissions to be 0750 or less (Confidence: HIGH, Severity: MEDIUM)
  > os.MkdirAll(globalDir, 0755)

[/github/workspace/util/config/dirs.go:163] - G301 (CWE-276): Expect directory permissions to be 0750 or less (Confidence: HIGH, Severity: MEDIUM)
  > os.MkdirAll(etcDir, 0755)

[/github/workspace/util/config/vars.go:4] - G501 (CWE-327): Blacklisted import crypto/md5: weak cryptographic primitive (Confidence: HIGH, Severity: MEDIUM)
  > "crypto/md5"

[/github/workspace/util/config/vars.go:36] - G401 (CWE-326): Use of weak cryptographic primitive (Confidence: HIGH, Severity: MEDIUM)
  > md5.Sum([]byte(LocalDir()))

[/github/workspace/util/display/display.go:382] - G302 (CWE-276): Expect file permissions to be 0600 or less (Confidence: HIGH, Severity: MEDIUM)
  > os.OpenFile(LogFile, truncate, 0644)

[/github/workspace/util/dns/dns.go:48] - G304 (CWE-22): Potential file inclusion via variable (Confidence: HIGH, Severity: MEDIUM)
  > os.Open(hostsFile)

[/github/workspace/util/dns/dns.go:52] - G307 (CWE-): Deferring unsafe method "*os.File" on type "Close" (Confidence: HIGH, Severity: MEDIUM)
  > defer f.Close()

[/github/workspace/util/dns/dns.go:69] - G304 (CWE-22): Potential file inclusion via variable (Confidence: HIGH, Severity: MEDIUM)
  > os.Open(hostsFile)

[/github/workspace/util/dns/dns.go:73] - G307 (CWE-): Deferring unsafe method "*os.File" on type "Close" (Confidence: HIGH, Severity: MEDIUM)
  > defer f.Close()

[/github/workspace/util/dns/dns.go:115] - G302 (CWE-276): Expect file permissions to be 0600 or less (Confidence: HIGH, Severity: MEDIUM)
  > os.OpenFile(hostsFile, os.O_RDWR|os.O_APPEND, 0644)

[/github/workspace/util/dns/dns.go:119] - G307 (CWE-): Deferring unsafe method "*os.File" on type "Close" (Confidence: HIGH, Severity: MEDIUM)
  > defer f.Close()

[/github/workspace/util/dns/dns.go:155] - G302 (CWE-276): Expect file permissions to be 0600 or less (Confidence: HIGH, Severity: MEDIUM)
  > os.OpenFile(hostsFile, os.O_RDWR, 0644)

[/github/workspace/util/dns/dns.go:159] - G307 (CWE-): Deferring unsafe method "*os.File" on type "Close" (Confidence: HIGH, Severity: MEDIUM)
  > defer f.Close()

[/github/workspace/util/dns/dns.go:185] - G306 (CWE-): Expect WriteFile permissions to be 0600 or less (Confidence: HIGH, Severity: MEDIUM)
  > ioutil.WriteFile(hostsFile, []byte(contents), 0644)

[/github/workspace/util/fileutil/download.go:19] - G307 (CWE-): Deferring unsafe method "*os.File" on type "Close" (Confidence: HIGH, Severity: MEDIUM)
  > defer fd.Close()

[/github/workspace/util/fileutil/download.go:22] - G107 (CWE-88): Potential HTTP request made with variable url (Confidence: MEDIUM, Severity: MEDIUM)
  > http.Get(url)

[/github/workspace/util/microagent/connect.go:13] - G402 (CWE-295): TLS InsecureSkipVerify set true. (Confidence: HIGH, Severity: HIGH)
  > InsecureSkipVerify: true

[/github/workspace/util/microagent/console.go:96] - G107 (CWE-88): Potential HTTP request made with variable url (Confidence: MEDIUM, Severity: MEDIUM)
  > http.Post(url, "plain/text", nil)

[/github/workspace/util/provider/bridge/start.go:36] - G204 (CWE-78): Subprocess launched with function call as argument or cmd arguments (Confidence: HIGH, Severity: MEDIUM)
  > exec.Command(config.VpnPath(), "--config", conf)

[/github/workspace/util/provider/dockermachine.go:47] - G204 (CWE-78): Subprocess launched with variable (Confidence: HIGH, Severity: MEDIUM)
  > exec.Command(vboxManageCmd, "-v")

[/github/workspace/util/provider/dockermachine.go:184] - G204 (CWE-78): Subprocess launched with function call as argument or cmd arguments (Confidence: HIGH, Severity: MEDIUM)
  > exec.Command(cmd[0], cmd[1:]...)

[/github/workspace/util/provider/dockermachine.go:234] - G204 (CWE-78): Subprocess launched with function call as argument or cmd arguments (Confidence: HIGH, Severity: MEDIUM)
  > exec.Command(cmd[0], cmd[1:]...)

[/github/workspace/util/provider/dockermachine.go:271] - G204 (CWE-78): Subprocess launched with function call as argument or cmd arguments (Confidence: HIGH, Severity: MEDIUM)
  > exec.Command(cmd[0], cmd[1:]...)

[/github/workspace/util/provider/dockermachine.go:300] - G204 (CWE-78): Subprocess launched with function call as argument or cmd arguments (Confidence: HIGH, Severity: MEDIUM)
  > exec.Command(cmd[0], cmd[1:]...)

[/github/workspace/util/provider/dockermachine.go:342] - G204 (CWE-78): Subprocess launched with function call as argument or cmd arguments (Confidence: HIGH, Severity: MEDIUM)
  > exec.Command(cmd[0], cmd[1:]...)

[/github/workspace/util/provider/dockermachine.go:370] - G204 (CWE-78): Subprocess launched with function call as argument or cmd arguments (Confidence: HIGH, Severity: MEDIUM)
  > exec.Command(cmd[0], cmd[1:]...)

[/github/workspace/util/provider/dockermachine.go:400] - G204 (CWE-78): Subprocess launched with function call as argument or cmd arguments (Confidence: HIGH, Severity: MEDIUM)
  > exec.Command(cmd[0], cmd[1:]...)

[/github/workspace/util/provider/dockermachine.go:419] - G204 (CWE-78): Subprocess launched with function call as argument or cmd arguments (Confidence: HIGH, Severity: MEDIUM)
  > exec.Command(cmd[0], cmd[1:]...)

[/github/workspace/util/provider/dockermachine.go:514] - G204 (CWE-78): Subprocess launched with function call as argument or cmd arguments (Confidence: HIGH, Severity: MEDIUM)
  > exec.Command(cmd[0], cmd[1:]...)

[/github/workspace/util/provider/dockermachine.go:546] - G204 (CWE-78): Subprocess launched with function call as argument or cmd arguments (Confidence: HIGH, Severity: MEDIUM)
  > exec.Command(cmd[0], cmd[1:]...)

[/github/workspace/util/provider/dockermachine.go:580] - G204 (CWE-78): Subprocess launched with function call as argument or cmd arguments (Confidence: HIGH, Severity: MEDIUM)
  > exec.Command(cmd[0], cmd[1:]...)

[/github/workspace/util/provider/dockermachine.go:615] - G204 (CWE-78): Subprocess launched with function call as argument or cmd arguments (Confidence: HIGH, Severity: MEDIUM)
  > exec.Command(cmd[0], cmd[1:]...)

[/github/workspace/util/provider/dockermachine.go:646] - G204 (CWE-78): Subprocess launched with function call as argument or cmd arguments (Confidence: HIGH, Severity: MEDIUM)
  > exec.Command(cmd[0], cmd[1:]...)

[/github/workspace/util/provider/dockermachine.go:683] - G204 (CWE-78): Subprocess launched with function call as argument or cmd arguments (Confidence: HIGH, Severity: MEDIUM)
  > exec.Command(cmd[0], cmd[1:]...)

[/github/workspace/util/provider/dockermachine.go:714] - G204 (CWE-78): Subprocess launched with function call as argument or cmd arguments (Confidence: HIGH, Severity: MEDIUM)
  > exec.Command(cmd[0], cmd[1:]...)

[/github/workspace/util/provider/dockermachine.go:743] - G204 (CWE-78): Subprocess launched with function call as argument or cmd arguments (Confidence: HIGH, Severity: MEDIUM)
  > exec.Command(cmd[0], cmd[1:]...)

[/github/workspace/util/provider/dockermachine.go:794] - G204 (CWE-78): Subprocess launched with function call as argument or cmd arguments (Confidence: HIGH, Severity: MEDIUM)
  > exec.Command(run[0], run[1:]...)

[/github/workspace/util/provider/dockermachine.go:850] - G204 (CWE-78): Subprocess launched with function call as argument or cmd arguments (Confidence: HIGH, Severity: MEDIUM)
  > exec.Command(cmd[0], cmd[1:]...)

[/github/workspace/util/provider/dockermachine.go:896] - G204 (CWE-78): Subprocess launched with function call as argument or cmd arguments (Confidence: HIGH, Severity: MEDIUM)
  > exec.Command(cmd[0], cmd[1:]...)

[/github/workspace/util/provider/dockermachine.go:931] - G204 (CWE-78): Subprocess launched with function call as argument or cmd arguments (Confidence: HIGH, Severity: MEDIUM)
  > exec.Command(cmd[0], cmd[1:]...)

[/github/workspace/util/provider/dockermachine.go:966] - G204 (CWE-78): Subprocess launched with function call as argument or cmd arguments (Confidence: HIGH, Severity: MEDIUM)
  > exec.Command(cmd[0], cmd[1:]...)

[/github/workspace/util/provider/dockermachine_mount.go:33] - G204 (CWE-78): Subprocess launched with function call as argument or cmd arguments (Confidence: HIGH, Severity: MEDIUM)
  > exec.Command(cmd[0], cmd[1:]...)

[/github/workspace/util/provider/dockermachine_mount.go:155] - G204 (CWE-78): Subprocess launched with function call as argument or cmd arguments (Confidence: HIGH, Severity: MEDIUM)
  > exec.Command(cmd[0], cmd[1:]...)

[/github/workspace/util/provider/dockermachine_mount.go:189] - G204 (CWE-78): Subprocess launched with function call as argument or cmd arguments (Confidence: HIGH, Severity: MEDIUM)
  > exec.Command(cmd[0], cmd[1:]...)

[/github/workspace/util/provider/dockermachine_mount.go:223] - G204 (CWE-78): Subprocess launched with function call as argument or cmd arguments (Confidence: HIGH, Severity: MEDIUM)
  > exec.Command(cmd[0], cmd[1:]...)

[/github/workspace/util/provider/dockermachine_mount.go:253] - G204 (CWE-78): Subprocess launched with function call as argument or cmd arguments (Confidence: HIGH, Severity: MEDIUM)
  > exec.Command(cmd[0], cmd[1:]...)

[/github/workspace/util/provider/dockermachine_mount.go:276] - G204 (CWE-78): Subprocess launched with function call as argument or cmd arguments (Confidence: HIGH, Severity: MEDIUM)
  > exec.Command(cmd[0], cmd[1:]...)

[/github/workspace/util/provider/dockermachine_mount.go:299] - G204 (CWE-78): Subprocess launched with function call as argument or cmd arguments (Confidence: HIGH, Severity: MEDIUM)
  > exec.Command(cmd[0], cmd[1:]...)

[/github/workspace/util/provider/native.go:86] - G204 (CWE-78): Subprocess launched with variable (Confidence: HIGH, Severity: MEDIUM)
  > exec.Command("docker", cmdParts...)

[/github/workspace/util/provider/native.go:145] - G204 (CWE-78): Subprocess launched with function call as argument or cmd arguments (Confidence: HIGH, Severity: MEDIUM)
  > exec.Command("docker", "network", "create", "--driver=bridge", fmt.Sprintf("--subnet=%s", ipNet.String()), "--opt=\"com.docker.network.driver.mtu=1450\"", "--opt=\"com.docker.network.bridge.name=redd0\"", fmt.Sprintf("--gateway=%s", ip.String()), "microbox")

[/github/workspace/util/provider/native.go:180] - G204 (CWE-78): Subprocess launched with function call as argument or cmd arguments (Confidence: HIGH, Severity: MEDIUM)
  > exec.Command("docker", "network", "create", "--driver=bridge", fmt.Sprintf("--subnet=%s", ipNet.String()), "--opt=\"com.docker.network.driver.mtu=1450\"", "--opt=\"com.docker.network.bridge.name=redd0\"", fmt.Sprintf("--gateway=%s", ip.String()), "microbox")

[/github/workspace/util/provider/native.go:203] - G301 (CWE-276): Expect directory permissions to be 0750 or less (Confidence: HIGH, Severity: MEDIUM)
  > os.MkdirAll(dir, 0755)

[/github/workspace/util/provider/native.go:211] - G301 (CWE-276): Expect directory permissions to be 0750 or less (Confidence: HIGH, Severity: MEDIUM)
  > os.MkdirAll(dir, 0755)

[/github/workspace/util/provider/native.go:288] - G301 (CWE-276): Expect directory permissions to be 0750 or less (Confidence: HIGH, Severity: MEDIUM)
  > os.MkdirAll(filepath.Dir(host), 0755)

[/github/workspace/util/provider/native.go:312] - G204 (CWE-78): Subprocess launched with function call as argument or cmd arguments (Confidence: HIGH, Severity: MEDIUM)
  > exec.Command(command[0], command[1:]...)

[/github/workspace/util/provider/share/share_linux.go:40] - G307 (CWE-): Deferring unsafe method "*os.File" on type "Close" (Confidence: HIGH, Severity: MEDIUM)
  > defer f.Close()

[/github/workspace/util/provider/share/share_linux.go:175] - G306 (CWE-): Expect WriteFile permissions to be 0600 or less (Confidence: HIGH, Severity: MEDIUM)
  > ioutil.WriteFile(EXPORTSFILE, []byte(entry), 0644)

[/github/workspace/util/provider/share/share_linux.go:179] - G302 (CWE-276): Expect file permissions to be 0600 or less (Confidence: HIGH, Severity: MEDIUM)
  > os.OpenFile(EXPORTSFILE, os.O_RDWR|os.O_APPEND, 0644)

[/github/workspace/util/provider/share/share_linux.go:183] - G307 (CWE-): Deferring unsafe method "*os.File" on type "Close" (Confidence: HIGH, Severity: MEDIUM)
  > defer f.Close()

[/github/workspace/util/provider/share/share_linux.go:200] - G302 (CWE-276): Expect file permissions to be 0600 or less (Confidence: HIGH, Severity: MEDIUM)
  > os.OpenFile(EXPORTSFILE, os.O_RDWR, 0644)

[/github/workspace/util/provider/share/share_linux.go:204] - G307 (CWE-): Deferring unsafe method "*os.File" on type "Close" (Confidence: HIGH, Severity: MEDIUM)
  > defer f.Close()

[/github/workspace/util/provider/share/share_linux.go:233] - G306 (CWE-): Expect WriteFile permissions to be 0600 or less (Confidence: HIGH, Severity: MEDIUM)
  > ioutil.WriteFile(EXPORTSFILE, []byte(contents), 0644)

[/github/workspace/util/provider/share/share_linux.go:248] - G302 (CWE-276): Expect file permissions to be 0600 or less (Confidence: HIGH, Severity: MEDIUM)
  > os.OpenFile(EXPORTSFILE, os.O_RDWR, 0644)

[/github/workspace/util/provider/share/share_linux.go:252] - G307 (CWE-): Deferring unsafe method "*os.File" on type "Close" (Confidence: HIGH, Severity: MEDIUM)
  > defer f.Close()

[/github/workspace/util/provider/share/share_linux.go:274] - G306 (CWE-): Expect WriteFile permissions to be 0600 or less (Confidence: HIGH, Severity: MEDIUM)
  > ioutil.WriteFile(EXPORTSFILE, []byte(contents), 0644)

[/github/workspace/util/service/create_linux.go:11] - G306 (CWE-): Expect WriteFile permissions to be 0600 or less (Confidence: HIGH, Severity: MEDIUM)
  > ioutil.WriteFile(serviceConfigFile(name), []byte(serviceConfig(name, command)), 0644)

[/github/workspace/util/service/remove_unix.go:15] - G204 (CWE-78): Subprocess launched with function call as argument or cmd arguments (Confidence: HIGH, Severity: MEDIUM)
  > exec.Command(cmd[0], cmd[1:]...)

[/github/workspace/util/service/service_linux.go:50] - G204 (CWE-78): Subprocess launched with variable (Confidence: HIGH, Severity: MEDIUM)
  > exec.Command("systemctl", "--no-pager", "status", name)

[/github/workspace/util/service/service_linux.go:60] - G204 (CWE-78): Subprocess launched with variable (Confidence: HIGH, Severity: MEDIUM)
  > exec.Command("initctl", "status", name)

[/github/workspace/util/service/start_unix.go:13] - G204 (CWE-78): Subprocess launched with function call as argument or cmd arguments (Confidence: HIGH, Severity: MEDIUM)
  > exec.Command(cmd[0], cmd[1:]...)

[/github/workspace/util/service/stop_unix.go:13] - G204 (CWE-78): Subprocess launched with function call as argument or cmd arguments (Confidence: HIGH, Severity: MEDIUM)
  > exec.Command(cmd[0], cmd[1:]...)

[/github/workspace/util/terminal_size.go:25] - G103 (CWE-242): Use of unsafe calls should be audited (Confidence: HIGH, Severity: LOW)
  > unsafe.Pointer(ws)

[/github/workspace/util/unique.go:4] - G501 (CWE-327): Blacklisted import crypto/md5: weak cryptographic primitive (Confidence: HIGH, Severity: MEDIUM)
  > "crypto/md5"

[/github/workspace/util/unique.go:14] - G401 (CWE-326): Use of weak cryptographic primitive (Confidence: HIGH, Severity: MEDIUM)
  > md5.Sum(i.HardwareAddr)

[/github/workspace/util/update/run.go:24] - G302 (CWE-276): Expect file permissions to be 0600 or less (Confidence: HIGH, Severity: MEDIUM)
  > os.OpenFile(tmpFileName, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0755)

[/github/workspace/util/update/run.go:72] - G204 (CWE-78): Subprocess launched with variable (Confidence: HIGH, Severity: MEDIUM)
  > exec.Command(path, "version")

[/github/workspace/util/update/update.go:22] - G107 (CWE-88): Potential HTTP request made with variable url (Confidence: MEDIUM, Severity: MEDIUM)
  > http.Get(remotePath)

[/github/workspace/util/util.go:5] - G501 (CWE-327): Blacklisted import crypto/md5: weak cryptographic primitive (Confidence: HIGH, Severity: MEDIUM)
  > "crypto/md5"

[/github/workspace/util/util.go:47] - G304 (CWE-22): Potential file inclusion via variable (Confidence: HIGH, Severity: MEDIUM)
  > ioutil.ReadFile(name)

[/github/workspace/util/util.go:56] - G401 (CWE-326): Use of weak cryptographic primitive (Confidence: HIGH, Severity: MEDIUM)
  > md5.Sum(data)

[/github/workspace/util/util_unix.go:34] - G204 (CWE-78): Subprocess launched with function call as argument or cmd arguments (Confidence: HIGH, Severity: MEDIUM)
  > exec.Command("/bin/sh", "-c", fmt.Sprintf("sudo -E %v --internal", command))

Code Reference

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠ shadow failed (.)

commands/steps/run.go:17:4: declaration of "step" shadows declaration at line 13
updater/main.go:61:12: declaration of "err" shadows declaration at line 21
util/exec.go:54:5: declaration of "err" shadows declaration at line 40
util/provider/native.go:140:16: declaration of "err" shadows declaration at line 122
util/provider/share/share_linux.go:72:3: declaration of "err" shadows declaration at line 61
util/provider/share/share_linux.go:124:3: declaration of "err" shadows declaration at line 113

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠ staticcheck failed (.)

commands/build.go:52:9: boxfile.NewFromPath is deprecated: Use NewFromFile instead, which diferentiates between a missing or invalid boxfile  (SA1019)
commands/configure.go:91:2: redundant return statement (S1023)
commands/configure.go:97:2: var prettyJson should be prettyJSON (ST1003)
commands/configure.go:99:2: redundant return statement (S1023)
commands/dns.go:12:2: var DnsCmd should be DNSCmd (ST1003)
commands/inspect.go:12:2: type anything is unused (U1000)
commands/inspect.go:32:2: default case should be first or last in switch statement (ST1015)
commands/log.go:21:2: var logStart is unused (U1000)
commands/log.go:22:2: var logEnd is unused (U1000)
commands/log.go:23:2: var logLimit is unused (U1000)
commands/server/server.go:28:7: const name is unused (U1000)
commands/server/svc_unix.go:7:2: redundant return statement (S1023)
generators/hooks/build/user.go:104:6: x509.IsEncryptedPEMBlock has been deprecated since Go 1.16 because it shouldn't be used: Legacy PEM encryption as specified in RFC 1423 is insecure by design. Since it does not authenticate the ciphertext, it is vulnerable to padding oracle attacks that can let an attacker recover the plaintext.  (SA1019)
generators/hooks/build/user.go:120:16: x509.DecryptPEMBlock has been deprecated since Go 1.16 because it shouldn't be used: Legacy PEM encryption as specified in RFC 1423 is insecure by design. Since it does not authenticate the ciphertext, it is vulnerable to padding oracle attacks that can let an attacker recover the plaintext.  (SA1019)
generators/hooks/code/configure.go:29:3: struct field DnsEntries should be DNSEntries (ST1003)
main.go:140:7: should omit comparison to bool constant, can be simplified to found (S1002)
main.go:146:7: should omit comparison to bool constant, can be simplified to found (S1002)
models/config.go:27:2: struct field SshKey should be SSHKey (ST1003)
models/config.go:28:2: struct field SshEncryptedKeys should be SSHEncryptedKeys (ST1003)
processors/code/build.go:144:9: boxfile.NewFromPath is deprecated: Use NewFromFile instead, which diferentiates between a missing or invalid boxfile  (SA1019)
processors/code/code.go:60:9: boxfile.NewFromPath is deprecated: Use NewFromFile instead, which diferentiates between a missing or invalid boxfile  (SA1019)
processors/component/clean.go:76:3: should use 'return !strings.Contains(err.Error(), "host is down")' instead of 'if strings.Contains(err.Error(), "host is down") { return false }; return true' (S1008)
processors/env/destroy.go:49:2: empty branch (SA9003)
processors/env/unmount.go:73:6: func mounted is unused (U1000)
processors/log/log.go:154:25: os.Kill cannot be trapped (did you mean syscall.SIGTERM?) (SA1016)
processors/platform/mist.go:41:25: os.Kill cannot be trapped (did you mean syscall.SIGTERM?) (SA1016)
processors/provider/bridge/bridge.go:87:5: should use 'return i.Flags&net.FlagUp == net.FlagUp' instead of 'if i.Flags&net.FlagUp != net.FlagUp { return false }; return true' (S1008)
processors/provider/stop.go:22:2: empty branch (SA9003)
updater/main.go:15:1: comment on exported var VERSION should be of the form "VERSION ..." (ST1022)
util/config/dirs.go:119:16: boxfile.NewFromPath is deprecated: Use NewFromFile instead, which diferentiates between a missing or invalid boxfile  (SA1019)
util/config/vars.go:23:9: boxfile.NewFromPath is deprecated: Use NewFromFile instead, which diferentiates between a missing or invalid boxfile  (SA1019)
util/display/command_error.go:75:19: boxfile.NewFromPath is deprecated: Use NewFromFile instead, which diferentiates between a missing or invalid boxfile  (SA1019)
util/display/docker_percent.go:152:3: empty branch (SA9003)
util/display/docker_percent.go:152:6: HasPrefix is a pure function but its return value is ignored (SA4017)
util/display/logs.go:68:80: printf-style function with dynamic format string and no further arguments should use print-style function instead (SA1006)
util/display/logs.go:71:2: redundant return statement (S1023)
util/display/logs.go:110:80: printf-style function with dynamic format string and no further arguments should use print-style function instead (SA1006)
util/display/logs.go:114:2: redundant return statement (S1023)
util/display/messages.go:10:24: unnecessary use of fmt.Sprintf (S1039)
util/display/messages.go:30:24: unnecessary use of fmt.Sprintf (S1039)
util/display/messages.go:43:24: unnecessary use of fmt.Sprintf (S1039)
util/display/messages.go:55:24: unnecessary use of fmt.Sprintf (S1039)
util/display/messages.go:120:24: unnecessary use of fmt.Sprintf (S1039)
util/display/messages.go:130:24: unnecessary use of fmt.Sprintf (S1039)
util/display/messages.go:141:24: unnecessary use of fmt.Sprintf (S1039)
util/display/messages.go:152:24: unnecessary use of fmt.Sprintf (S1039)
util/display/messages.go:163:24: unnecessary use of fmt.Sprintf (S1039)
util/display/messages.go:176:24: unnecessary use of fmt.Sprintf (S1039)
util/display/messages.go:187:24: unnecessary use of fmt.Sprintf (S1039)
util/display/messages.go:229:24: unnecessary use of fmt.Sprintf (S1039)
util/display/messages.go:246:24: unnecessary use of fmt.Sprintf (S1039)
util/display/messages.go:258:24: unnecessary use of fmt.Sprintf (S1039)
util/display/messages.go:268:24: unnecessary use of fmt.Sprintf (S1039)
util/display/messages.go:281:24: unnecessary use of fmt.Sprintf (S1039)
util/display/messages.go:291:24: unnecessary use of fmt.Sprintf (S1039)
util/display/messages.go:298:24: unnecessary use of fmt.Sprintf (S1039)
util/display/messages.go:338:24: unnecessary use of fmt.Sprintf (S1039)
util/display/messages.go:349:24: unnecessary use of fmt.Sprintf (S1039)
util/display/messages.go:359:24: unnecessary use of fmt.Sprintf (S1039)
util/display/prefix.go:47:5: should omit comparison to bool constant, can be simplified to p.firstLine (S1002)
util/display/prefix.go:62:13: should omit comparison to bool constant, can be simplified to p.escapeSeq (S1002)
util/display/prefix.go:69:20: should omit comparison to bool constant, can be simplified to !p.newLine (S1002)
util/display/prefix.go:71:27: should omit comparison to bool constant, can be simplified to !p.newLine (S1002)
util/display/prefix.go:85:7: should omit comparison to bool constant, can be simplified to p.newLine (S1002)
util/display/summary.go:19:18: should use raw string (`...`) with regexp.MustCompile to avoid having to escape twice (S1007)
util/provider/bridge/bridge.go:11:1: comment on exported type Response should be of the form "Response ..." (with optional leading article) (ST1021)
util/provider/dockermachine.go:39:39: error should be returned as the last argument (ST1008)
util/provider/dockermachine.go:496:30: methods on the same type should have the same receiver name (seen 1x "dockermachine", 39x "machine") (ST1016)
util/provider/dockermachine.go:1009:6: func dockerMachineURL is unused (U1000)
util/provider/dockermachine_mount.go:54:3: should use 'return !strings.Contains(string(output), "No such file or directory")' instead of 'if strings.Contains(string(output), "No such file or directory") { return false }; return true' (S1008)
util/provider/dockermachine_mount.go:311:6: func setupCoreUtilsScript is unused (U1000)
util/provider/native.go:28:31: error should be returned as the last argument (ST1008)
util/provider/provider.go:43:2: var verbose is unused (U1000)
util/provider/provider.go:57:15: error should be returned as the last argument (ST1008)
util/provider/share/share_unix.go:39:5: var sudoGid should be sudoGID (ST1003)
util/watch/watch.go:22:5: var ctimeAvailable is unused (U1000)
util/watch/watch.go:127:6: func ctimeCheck is unused (U1000)
util/watch/watch.go:144:6: func ctime is unused (U1000)
util/watch/watch.go:162:2: should replace loop with ignoreFile = append(ignoreFile, stringFields...) (S1011)

Checks Document

@github-actions
Copy link

@github-actions github-actions bot commented on e815e20 Feb 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠ Failure Summary

  • misspell: fail
  • fmt: success!
  • vet: success!
  • cyclo: fail
  • imports: success!
  • ineffassign: fail
  • errcheck: fail
  • sec: fail
  • shadow: fail
  • staticcheck: fail

Please sign in to comment.