Basic tool for helping with setup of local environments for troubleshooting Hashicorp Sentinel
Go to file
2022-10-10 16:03:28 -07:00
src remove cruft that literally generated junk files 2022-10-10 16:03:28 -07:00
.gitignore third initial commit 2022-10-07 17:29:45 -07:00
package-lock.json binary now installs with npm -g 2022-10-10 15:16:53 -07:00
package.json add installation placeholder docs 2022-10-10 15:44:36 -07:00
README.md add installation placeholder docs 2022-10-10 15:44:36 -07:00
tsconfig.json third initial commit 2022-10-07 17:29:45 -07:00

This tool aims to simplify setting up local reproduction environments for writing and testing Sentinel policies.

At present, navigate to your sentinel policy directory (containing the .hcl) and run main.js there.

Build instructions:

TODO: Remediate required double install. Probably because I'm using nvm

TODO: Fix uninstall

Clone the directory locally, then navigate to that directory and run npm install. Next, run npm run build Finally, run npm install -g if you want stotem in your path

Current functionality:

Checks the CURRENT DIRECTORY recursively(via vsCode's ripgrep package) for references to the Hashicorp Sentinel governance repo helper functions and adds them as http imports to sentinel.hcl if found.

Planned functionality:

WORKING TESTS

Check for v1 imports and print a warning if they're in use

Provide a command line flag to show what values will be after_unknown

TBD: Considering whether an offline/local mode is worth implementing. This would work by replacing the https heredocs with local copies of repo functions included with an npm tarball (or just include it directly in this package)