MCPcopy Create free account
hub / github.com/github/gh-aw / classifyFirewallDomainStatus

Function classifyFirewallDomainStatus

pkg/cli/audit_diff.go:210–221  ·  view source on GitHub ↗

classifyFirewallDomainStatus returns "allowed", "denied", or "mixed" based on request stats

(stats DomainRequestStats)

Source from the content-addressed store, hash-verified

208
209// classifyFirewallDomainStatus returns "allowed", "denied", or "mixed" based on request stats
210func classifyFirewallDomainStatus(stats DomainRequestStats) string {
211 if stats.Allowed > 0 && stats.Blocked == 0 {
212 return "allowed"
213 }
214 if stats.Blocked > 0 && stats.Allowed == 0 {
215 return "denied"
216 }
217 if stats.Allowed > 0 && stats.Blocked > 0 {
218 return "mixed"
219 }
220 return "unknown"
221}
222
223// MCPToolDiffEntry represents the diff for a single MCP tool between two runs
224type MCPToolDiffEntry struct {

Callers 4

buildCrossRunDomainEntryFunction · 0.85
computeFirewallDiffFunction · 0.85
TestDomainStatusFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestDomainStatusFunction · 0.68