Validate reports whether the run result respects the shared result-size guardrail.
(path string)
| 912 | |
| 913 | // Validate reports whether the run result respects the shared result-size guardrail. |
| 914 | func (r RunResult) Validate(path string) error { |
| 915 | if err := ValidateResultSize(r.Value, nestedPath(path, "value")); err != nil { |
| 916 | return err |
| 917 | } |
| 918 | if hasRawClaimTokenField(r.Value) { |
| 919 | return fmt.Errorf("%w: %s must not contain raw lease credentials", ErrValidation, nestedPath(path, "value")) |
| 920 | } |
| 921 | return nil |
| 922 | } |
| 923 | |
| 924 | // Validate reports whether the run failure contains a message and bounded metadata. |
| 925 | func (r RunFailure) Validate(path string) error { |
no test coverage detected