MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / WithProjectContext

Function WithProjectContext

pkg/policies/policies.go:183–188  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.
183func 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

Callers 3

addMaterialMethod · 0.92
verifyMaterialFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected