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

Method unmatched

pkg/policies/runtime_inputs.go:140–155  ·  view source on GitHub ↗

unmatched returns the sorted scope keys declared in ri that were never marked (i.e. matched no policy attachment), so the caller can warn about likely typos. Nil-safe.

(ri *RuntimeInputs)

Source from the content-addressed store, hash-verified

138// (i.e. matched no policy attachment), so the caller can warn about likely
139// typos. Nil-safe.
140func (t *scopeTracker) unmatched(ri *RuntimeInputs) []string {
141 if t == nil || ri == nil {
142 return nil
143 }
144 t.mu.Lock()
145 defer t.mu.Unlock()
146
147 var out []string
148 for scope := range ri.Scoped {
149 if _, ok := t.seen[scope]; !ok {
150 out = append(out, scope)
151 }
152 }
153 slices.Sort(out)
154 return out
155}

Callers 2

VerifyMaterialMethod · 0.80

Calls

no outgoing calls

Tested by 1