stacklok / minder

Software Supply Chain Security Platform
https://minder-docs.stacklok.dev/
Apache License 2.0
252 stars 35 forks source link

Add template support to evaluation details. #4532

Closed blkt closed 1 week ago

blkt commented 1 week ago

Summary

This change extends error type available for use in evaluation engines with support for go templates. This error type supports rendering complex templates along with the usual string rendering. Despite the type itself being the same, a new constructor was added to avoid a bigger refactoring. Ideally, the old constructor should be deprecated and all places returning an ErrEvaluationFailed error should use the new one instead.

Templates are internal to Minder and cannot be customized by the end user. Also, template engine choice was arbitrary and can be changed at any time.

Fixes #4525 Fixes #4526

Change Type

Testing

Unit tests.

Review Checklist:

coveralls commented 1 week ago

Coverage Status

coverage: 52.713% (+0.01%) from 52.699% when pulling ebf8c8a23bd1e3f7a42d51c7961e6241988828c1 on enh/improved-vulncheck-evaluation-detail into d869bce785bceee8feba8af274b5dabccbb47740 on main.