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)
| 163 | // that should be rejected by the expression validator. |
| 164 | // This is a simple heuristic check for the fuzzer. |
| 165 | func 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 | } |
no outgoing calls
no test coverage detected