Skip to content

Commit d179826

Browse files
ryan-williamsclaude
andcommitted
fix AWS tag validation: replace * with @ and , with space
AWS tag values only allow `[\p{L}\p{Z}\p{N}_.:/=+\-@]*` — no commas or asterisks. Use space as separator and `@` as wildcard stand-in in `compactAllowlist` output. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent c38a4d4 commit d179826

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/allowlist.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,7 @@ function matchDomainPaths(hostname: string, pathname: string, rule: AllowRuleObj
3737
}
3838

3939
export function compactAllowlist(rules: AllowRule[]): string {
40-
return rules.map(r => typeof r === "string" ? r : r.domain).join(",")
40+
// AWS tag values only allow [\p{L}\p{Z}\p{N}_.:/=+\-@]
41+
// Use space as separator (instead of comma), `@` for `*`
42+
return rules.map(r => typeof r === "string" ? r : r.domain).join(" ").replaceAll("*", "@")
4143
}

0 commit comments

Comments
 (0)