Skip to content

Commit ace06e3

Browse files
committed
ifc: document why list results use one joined label, not per-item
Explain on LabelSearchIssues (and cross-ref from LabelGistList) that a tool result is delivered as one opaque payload and the IFC engine makes one allow/deny decision per flow at egress, so the only sound bound for a list is the meet of every item's label. Per-item labels would only be load-bearing if the engine could partition a result and route items to different sinks; until then they would invite unsafe declassification of a public item that arrived alongside private data. Doc-only change.
1 parent fcffda3 commit ace06e3

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

pkg/ifc/ifc.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,16 @@ func LabelGetFileContents(isPrivate bool) SecurityLabel {
108108
//
109109
// An empty result set is treated as public-untrusted (no repository data is
110110
// leaked).
111+
//
112+
// Why a single joined label rather than one label per item: a tool result is
113+
// delivered as one opaque payload (a single content block) and the IFC engine
114+
// makes one allow/deny decision per flow at egress. Once the items share a
115+
// buffer in the agent's context they can be copied anywhere together, so the
116+
// only sound bound for the whole result is the meet of every item's label.
117+
// Per-item labels would only become load-bearing if the enforcement engine
118+
// could partition a result and route individual items to different sinks;
119+
// until then they would invite unsafe declassification of a "public" item that
120+
// actually arrived alongside private data.
111121
func LabelSearchIssues(repoVisibilities []bool) SecurityLabel {
112122
for _, isPrivate := range repoVisibilities {
113123
if isPrivate {
@@ -268,6 +278,9 @@ func LabelGist(isPublic bool) SecurityLabel {
268278
// Integrity is untrusted (user-authored content). Confidentiality follows the
269279
// IFC meet: if any gist in the result is secret the joined label is private;
270280
// otherwise public. An empty result is treated as public-untrusted.
281+
//
282+
// See LabelSearchIssues for why list results carry a single joined label
283+
// rather than one label per item.
271284
func LabelGistList(gistVisibilities []bool) SecurityLabel {
272285
for _, isPublic := range gistVisibilities {
273286
if !isPublic {

0 commit comments

Comments
 (0)