WithProjectContext sets the project name and version that this verifier is evaluating policies for. The values are forwarded to the underlying policy engine, which exposes them on input.chainloop_metadata.project_name / input.chainloop_metadata.project_version_name so policy authors can forward them
(name, version string)
| 181 | // input.chainloop_metadata.project_version_name so policy authors can forward |
| 182 | // them as operands to chainloop.* built-ins. Either value may be empty. |
| 183 | func WithProjectContext(name, version string) PolicyVerifierOption { |
| 184 | return func(o *PolicyVerifierOptions) { |
| 185 | o.ProjectName = name |
| 186 | o.ProjectVersionName = version |
| 187 | } |
| 188 | } |
| 189 | |
| 190 | // WithRuntimeInputs sets policy input values supplied at runtime (e.g. sourced |
| 191 | // from a file via --policy-input-from-file). They are merged additively onto |
no outgoing calls
no test coverage detected