aquaproj / aqua

Declarative CLI Version manager written in Go. Support Lazy Install, Registry, and continuous update with Renovate. CLI version is switched seamlessly
https://aquaproj.github.io
835 stars 37 forks source link

Support setting checksum in aqua-policy.yaml #2807

Open suzuki-shunsuke opened 6 months ago

suzuki-shunsuke commented 6 months ago

Feature Overview

Support setting checksum in aqua-policy.yaml.

Why is the feature needed?

To enforce the checksum verification via Policy.

Workaround

Use AQUA_ENFORCE_CHECKSUM and AQUA_ENFORCE_REQUIRE_CHECKSUM.

These environment variables are useful especially in CI, but it's difficult to ask users to set environment variables on their local environment.

Example Code

$ 

Configuration

aqua-policy.yaml

checksum:
  enabled: true
  require_checksum: true

Note

suzuki-shunsuke commented 6 months ago

Policy is useful to enforce policies in the project level, but isn't useful to enforce policies in machine level. Environment variables AQUA_ENFORCE_CHECKSUM and AQUA_ENFORCE_REQUIRE_CHECKSUM are useful to enforce policies in machine level.