Skip to content

Commit 7dfbfa2

Browse files
committed
feat(dagger): add no-strict-validation and debug flags to attestation add
Assisted-by: Claude Code Signed-off-by: Javier Rodriguez <javier@chainloop.dev> Chainloop-Trace-Sessions: 3dbb6096-b771-48ad-bc55-64314e305ac5
1 parent b900a69 commit 7dfbfa2

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

extras/dagger/main.go

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,12 @@ func (att *Attestation) AddRawEvidence(
391391
// "key1=value1,key2=value2"
392392
// +optional
393393
annotations []string,
394+
// Skip strict schema validation for structured materials (SBOM_CYCLONEDX_JSON, OPENAPI_SPEC, ASYNCAPI_SPEC)
395+
// +optional
396+
noStrictValidation bool,
397+
// Enable debug/verbose logging
398+
// +optional
399+
debug bool,
394400
) (*Attestation, error) {
395401
args := []string{
396402
"attestation", "add",
@@ -416,6 +422,14 @@ func (att *Attestation) AddRawEvidence(
416422
)
417423
}
418424

425+
if noStrictValidation {
426+
args = append(args, "--no-strict-validation")
427+
}
428+
429+
if debug {
430+
args = append(args, "--debug")
431+
}
432+
419433
_, err := att.
420434
Container(0).
421435
WithExec(args, execOpts).
@@ -441,6 +455,12 @@ func (att *Attestation) AddFileEvidence(
441455
// "key1=value1,key2=value2"
442456
// +optional
443457
annotations []string,
458+
// Skip strict schema validation for structured materials (SBOM_CYCLONEDX_JSON, OPENAPI_SPEC, ASYNCAPI_SPEC)
459+
// +optional
460+
noStrictValidation bool,
461+
// Enable debug/verbose logging
462+
// +optional
463+
debug bool,
444464
) (*Attestation, error) {
445465
filename, err := path.Name(ctx)
446466
if err != nil {
@@ -473,6 +493,14 @@ func (att *Attestation) AddFileEvidence(
473493
)
474494
}
475495

496+
if noStrictValidation {
497+
args = append(args, "--no-strict-validation")
498+
}
499+
500+
if debug {
501+
args = append(args, "--debug")
502+
}
503+
476504
_, err = att.
477505
Container(0).
478506
// Preserve the filename inside the container

0 commit comments

Comments
 (0)