gotfparse

module
v0.0.0-...-bd1eac9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2024 License: Apache-2.0

README

gotfparse

gotfparse is a Go library that wraps the defsec parser. This is done to provide an exported function to Python that takes advantage of the capabilities and speed of the defsec HCL parser.

Developing

go mod tidy

You can use the tftest helper command to easily iterate on terraform and preview the JSON output that the gotfparse library produces.

go run cmd/tftest/main.go <path-to-terraform> > output.json

You can use the tfdump helper command to reveal the structure that aquasecurity/defsec creates to assist with identifying anomalies. It exports the original structure, along with interesting attributes, in json format.

go run cmd/tfdump/main.go <path-to-terraform> > output.json

Tips

When using a modern IDE like Visual Studio Code or Goland, open the gotfparse folder as the root of the workspace to ensure all of the Go tooling works as expected.

Directories

Path Synopsis
cmd
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL