ec-cli

command module
v0.0.0-...-06b94e1 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

README

ec a command line client for HACBS Enterprise Contract

The ec tool is used to evaluate Enterprise Contract policies for Software Supply Chain. Various sub-commands can be used to assert facts about an artifact such as:

  • Validating container image signature
  • Validating container image provenance
  • Evaluating Enterprise Contract policies over the container image provenance
  • Fetching artifact authorization

Consult the documentation for available sub-commands, descriptions and examples of use.

Building

Run make build from the root directory and use the dist/ec executable, or run make dist to build for all supported architectures.

Testing

Run make test to run the unit tests, and make acceptance to run the acceptance tests.

Linting

Run make lint to check for linting issues, and make lint-fix to fix linting issues (formatting, import order, ...).

Demo

Run hack/demo.sh to evaluate the policy against images that have been built ahead of time.

To regenerate those images, say in case of change in the attestation data, run hack/rebuild.sh.

Troubleshooting

The --debug parameter enables debug logging. Setting EC_DEBUG environment variable can be set to prevent deletion of temporary ec-work-* directories so that the attestations, policy and data files can be examined.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
fetch
Define the `ec fetch policy` command
Define the `ec fetch policy` command
inspect
Define the `ec inspect policy` command
Define the `ec inspect policy` command
internal
downloader
Package downloader is a wrapper for the equivalent Conftest package, which is itself mostly a wrapper for hashicorp/go-getter.
Package downloader is a wrapper for the equivalent Conftest package, which is itself mostly a wrapper for hashicorp/go-getter.
lint
Custom ec-cli linters get implemented here
Custom ec-cli linters get implemented here
opa
Functions for inspecting rego code and annotations
Functions for inspecting rego code and annotations
pkg

Jump to

Keyboard shortcuts

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