MCPcopy
hub / github.com/github/github-mcp-server / LabelRepoUserContent

Function LabelRepoUserContent

pkg/ifc/ifc.go:93–98  ·  view source on GitHub ↗

LabelRepoUserContent returns the IFC label for user-authored content scoped to a repository when that tool has not opted into a more specific integrity policy. Public repository content is untrusted because it may be authored by outside contributors. Private repository content is trusted because use

(isPrivate bool)

Source from the content-addressed store, hash-verified

91// outside contributors. Private repository content is trusted because users who
92// can read it are trusted collaborators.
93func LabelRepoUserContent(isPrivate bool) SecurityLabel {
94 if isPrivate {
95 return PrivateTrusted()
96 }
97 return PublicUntrusted()
98}
99
100// LabelGetFileContents returns the IFC label for a get_file_contents result.
101// Public repository file contents may be authored by anyone via pull requests

Callers 1

TestLabelRepoUserContentFunction · 0.85

Calls 2

PrivateTrustedFunction · 0.85
PublicUntrustedFunction · 0.85

Tested by 1

TestLabelRepoUserContentFunction · 0.68