attachStaticIFCLabel attaches a fixed IFC label to a successful tool result when IFC labels are enabled. It is used by tools whose label does not depend on any repository visibility lookup (e.g. security alerts, global advisories, team membership, notification subjects). Error results are left unto
(ctx context.Context, deps ToolDependencies, r *mcp.CallToolResult, label ifc.SecurityLabel)
| 29 | // Error results are left untouched, and the label is omitted entirely when the |
| 30 | // IFC feature flag is disabled. |
| 31 | func attachStaticIFCLabel(ctx context.Context, deps ToolDependencies, r *mcp.CallToolResult, label ifc.SecurityLabel) *mcp.CallToolResult { |
| 32 | if !shouldAttachIFCLabel(ctx, deps, r) { |
| 33 | return r |
| 34 | } |
| 35 | setIFCLabel(r, label) |
| 36 | return r |
| 37 | } |
| 38 | |
| 39 | // attachRepoVisibilityIFCLabel attaches an IFC label derived from a single |
| 40 | // repository's visibility to a successful tool result when IFC labels are |
no test coverage detected