Skip to content

Commit

Permalink
fix(logwriter): tighten up parameter patterns (#320)
Browse files Browse the repository at this point in the history
`LogGroupNamePatterns` and `LogGroupNamePrefixes` do not support regular
expressions. Constraining the allowed pattern for either parameter
ensures we error out early if a user attempts to pass in a regular
expression.
  • Loading branch information
jta authored Jul 12, 2024
1 parent e162113 commit f560523
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions apps/logwriter/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,15 @@ Parameters:
`DescribeLogGroups` action for more information.
To subscribe to all log groups, use the wildcard operator *.
Default: ''
AllowedPattern: '^(\*|[a-zA-Z0-9-_\/]*)$'
LogGroupNamePrefixes:
Type: CommaDelimitedList
Description: >-
Comma separated list of prefixes. The lambda function will only apply to
log groups that start with a provided string. To subscribe to all log
groups, use the wildcard operator *.
Default: ''
AllowedPattern: '^(\*|[a-zA-Z0-9-_\/]*)$'
ExcludeLogGroupNamePatterns:
Type: CommaDelimitedList
Description: >-
Expand Down
2 changes: 2 additions & 0 deletions apps/stack/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,14 @@ Parameters:
only apply to log groups that have names that match one of the provided
strings based on a case-sensitive substring search.
Default: ''
AllowedPattern: '^(\*|[a-zA-Z0-9-_\/]*)$'
LogGroupNamePrefixes:
Type: CommaDelimitedList
Description: >-
Comma separated list of prefixes. If not empty, the lambda function will
only apply to log groups that start with a provided string.
Default: ''
AllowedPattern: '^(\*|[a-zA-Z0-9-_\/]*)$'
ExcludeLogGroupNamePatterns:
Type: CommaDelimitedList
Description: >-
Expand Down

0 comments on commit f560523

Please sign in to comment.