Skip to content

Commit

Permalink
🧹 Do not explicitly set recording
Browse files Browse the repository at this point in the history
The scanenr initializer should take care.

Signed-off-by: Christian Zunker <[email protected]>
  • Loading branch information
czunker committed Oct 23, 2023
1 parent 4020e2b commit 4b48990
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ dev: build
.PHONY: dev/linux
dev/linux: build
@mkdir -p ~/.packer.d/plugins/github.com/mondoohq/cnspec/
@mv ${BINARY} ~/.packer.d/plugins/github.com/mondoohq/cnspec/${BINARY}_v${VERSION}_x5.0_linux_amd64
@cat ~/.packer.d/plugins/github.com/mondoohq/cnspec/packer-plugin-cnspec_v${VERSION}_x5.0_linux_amd64 | sha256sum -z --tag | cut -d"=" -f2 | tr -d " " > ~/.packer.d/plugins/github.com/mondoohq/cnspec/packer-plugin-cnspec_v${VERSION}_x5.0_linux_amd64_SHA256SUM
@mv ${BINARY} ~/.packer.d/plugins/github.com/mondoohq/cnspec/${BINARY}_${VERSION}_x5.0_linux_amd64
@cat ~/.packer.d/plugins/github.com/mondoohq/cnspec/packer-plugin-cnspec_${VERSION}_x5.0_linux_amd64 | sha256sum -z --tag | cut -d"=" -f2 | tr -d " " > ~/.packer.d/plugins/github.com/mondoohq/cnspec/packer-plugin-cnspec_${VERSION}_x5.0_linux_amd64_SHA256SUM

.PHONY: dev/macos
dev/macos: build
@mkdir -p ~/.packer.d/plugins/github.com/mondoohq/cnspec/
@mv ${BINARY} ~/.packer.d/plugins/github.com/mondoohq/cnspec/${BINARY}_v${VERSION}_macos_amd64
@cat ~/.packer.d/plugins/github.com/mondoohq/cnspec/packer-plugin-cnspec_v${VERSION}_macos_amd64 | shasum --tag | cut -d"=" -f2 | tr -d " " > ~/.packer.d/plugins/github.com/mondoohq/cnspec/packer-plugin-cnspec_v${VERSION}_macos_amd64_SHA256SUM
@mv ${BINARY} ~/.packer.d/plugins/github.com/mondoohq/cnspec/${BINARY}_${VERSION}_macos_amd64
@cat ~/.packer.d/plugins/github.com/mondoohq/cnspec/packer-plugin-cnspec_${VERSION}_macos_amd64 | shasum --tag | cut -d"=" -f2 | tr -d " " > ~/.packer.d/plugins/github.com/mondoohq/cnspec/packer-plugin-cnspec_${VERSION}_macos_amd64_SHA256SUM

test:
@go test -race -count $(COUNT) $(TEST) -timeout=3m
Expand Down Expand Up @@ -77,4 +77,4 @@ license/headers/check:
copywrite headers --plan

license/headers/apply:
copywrite headers
copywrite headers
4 changes: 4 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -341,3 +341,7 @@ require (
mvdan.cc/unparam v0.0.0-20230917202934-3ee2d22f45fb // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)

replace go.mondoo.com/cnspec => /home/christian/workspace/mondoo/github.com/cnspec

replace go.mondoo.com/cnquery => /home/christian/workspace/mondoo/github.com/cnquery
2 changes: 1 addition & 1 deletion provisioner/provisioner.go
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ func (p *Provisioner) executeCnspec(ui packer.Ui, comm packer.Communicator) erro
var err error
if p.config.Incognito {
ui.Message("scan packer build in incognito mode")
scanService := scan.NewLocalScanner(scan.WithRecording(providers.NullRecording{}))
scanService := scan.NewLocalScanner()
result, err = scanService.RunIncognito(context.Background(), scanJob)
if err != nil {
return err
Expand Down

0 comments on commit 4b48990

Please sign in to comment.