Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: laurentsimon <laurentsimon@google.com>
  • Loading branch information
laurentsimon committed Mar 27, 2024
1 parent 66038fd commit 3e73974
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions pkg/deployment/attestation.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type attestation struct {
}

const (
statementType = "https://in-toto.io/Statement/v1"
predicateType = "https://slsa.dev/deployment/v0.1"
scopeGCPServiceAccount = "cloud.google.com/service_account/v1"
statementType = "https://in-toto.io/Statement/v1"
predicateType = "https://slsa.dev/deployment/v0.1"
scopeGoogleServiceAccount = "cloud.google.com/service_account/v1"
)
4 changes: 2 additions & 2 deletions pkg/deployment/result.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func (r PolicyEvaluationResult) AttestationNew(options ...AttestationCreationOpt
// Add caller options.
opts = append(opts, options...)
scopes := map[string]string{
scopeGCPServiceAccount: r.protection.ServiceAccount,
scopeGoogleServiceAccount: r.protection.GoogleServiceAccount,
}
att, err := CreationNew(subject, scopes, opts...)
if err != nil {
Expand All @@ -50,7 +50,7 @@ func (r PolicyEvaluationResult) isValid() error {
if r.protection == nil {
return fmt.Errorf("%w: nil protection", errs.ErrorInternal)
}
if r.protection.ServiceAccount == "" {
if r.protection.GoogleServiceAccount == "" {
return fmt.Errorf("%w: empty protection service account", errs.ErrorInternal)
}
return nil
Expand Down

0 comments on commit 3e73974

Please sign in to comment.