Before, secret was a plain text string, but it could lead to security issue
so we are now handling secrets as `dagger.#Secret` or string.
I've add a new struct SecretStore that expose the inputStore to easily
retrieve secret value.
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
- Update `op.cue` to support secrets
- Update `pipeline.go` to use authTokenSecret & authHeaderSecret
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
This adds support for `--include` and `--exclude` for directory inputs.
For instance, this is what you would want to use when passing dagger
repository as an input:
```
inputs:
repository:
dir:
path: .
exclude:
- '**/node_modules'
- cmd/dagger/dagger
- cmd/dagger/dagger-debug
```
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
- Secrets are never exposed in plaintext in the Cue tree. `dagger query`
won't dump secrets anymore, Cue errors won't contain them either.
- BuildKit-native secrets support through a new `mount` type. This
ensures secrets will never be part of containerd layers, buildkit
cache and generally speaking will never be saved to disk in plaintext.
- Updated netlify as an example
- Added tests
- Changed the Cue definition of a secret to:
```
@dagger(secret)
id: string
}
```
This is to ensure both that setting the wrong input type on a secret
(e.g. `dagger input text`) will fail, and attempting to misuse the
secret (e.g. interpolating, passing as an env variable, etc) will also
fail properly.
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This allows dagger.io/dagger/op.#Op to be maintained in regular
uncommented CUE, but not participate by default in normal dagger
evaluation (given the performance problems it currently introduces).
The "full" #Op can be enabled by passing the "-t fullop" flag:
cue eval -t fullop ./examples/react
(which currently triggers the performance issue).
Signed-off-by: Paul Jolly <paul@myitcv.io>
HACK: the way buildkit works, we can only supply an Auth Provider for the entirety of the build session (`dagger up`). Therefore, we start by scanning all auth in the entire Cue tree and supply an auth provider for all of them.
Drawbacks:
- As soon as you add `auth` in a Pipeline for a registry, all other Pipelines have access to the same registry
- You can't use different credentials for the same registry
Fixes#301
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
* secrets now supports bytes
* error reporting for unhandled content data types in WriteFile
Signed-off-by: Frederick F. Kautz IV <fkautz@alumni.cmu.edu>