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

Function containsUnauthorizedPattern

pkg/workflow/expression_parser_fuzz_test.go:165–182  ·  view source on GitHub ↗

containsUnauthorizedPattern checks if the content contains patterns that should be rejected by the expression validator. This is a simple heuristic check for the fuzzer.

(content string)

Source from the content-addressed store, hash-verified

163// that should be rejected by the expression validator.
164// This is a simple heuristic check for the fuzzer.
165func containsUnauthorizedPattern(content string) bool {
166 // Check for common unauthorized patterns
167 unauthorizedPatterns := []string{
168 "secrets.GITHUB_TOKEN",
169 "secrets.API_KEY",
170 "secrets.TOKEN",
171 "secrets.MY_SECRET",
172 "github.token",
173 }
174
175 for _, pattern := range unauthorizedPatterns {
176 if strings.Contains(content, pattern) {
177 return true
178 }
179 }
180
181 return false
182}

Callers 1

FuzzExpressionParserFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected