MCPcopy Create free account
hub / github.com/codeaashu/claude-code / isBlockedOfficialName

Function isBlockedOfficialName

src/utils/plugins/schemas.ts:87–101  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

85 * @returns true if the name is blocked (impersonates official), false if allowed
86 */
87export function isBlockedOfficialName(name: string): boolean {
88 // If it's in the allowed list, it's not blocked
89 if (ALLOWED_OFFICIAL_MARKETPLACE_NAMES.has(name.toLowerCase())) {
90 return false
91 }
92
93 // Block names with non-ASCII characters to prevent homograph attacks
94 // (e.g., using Cyrillic 'а' to impersonate 'anthropic')
95 if (NON_ASCII_PATTERN.test(name)) {
96 return true
97 }
98
99 // Check if it matches the blocked pattern
100 return BLOCKED_OFFICIAL_NAME_PATTERN.test(name)
101}
102
103/**
104 * The official GitHub organization for Anthropic marketplaces.

Callers 1

schemas.tsFile · 0.85

Calls 1

hasMethod · 0.45

Tested by

no test coverage detected