Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proper parsing of newer aws sdks #548

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion regexes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ user_agent_parsers:

# AWS S3 Clients
# must come before "Bots General matcher" to catch "boto"/"boto3" before "bot"
- regex: '\b(Boto3?|JetS3t|aws-(?:cli|sdk-(?:cpp|go|java|nodejs|ruby2?|dotnet-(?:\d{1,2}|core)))|s3fs)/(\d+)\.(\d+)(?:\.(\d+)|)'
- regex: '\b(Boto3?|JetS3t|aws-(?:cli|sdk-(?:cpp|go(?:-v2)?|java|js|nodejs|ruby(?:2|3)?|dotnet-(?:\d{1,2}|core)))|s3fs)/(\d+)\.(\d+)(?:\.(\d+)|)'

# SAFE FME
- regex: '(FME)\/(\d+\.\d+)\.(\d+)\.(\d+)'
Expand Down
18 changes: 18 additions & 0 deletions tests/test_ua.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7938,6 +7938,12 @@ test_cases:
major: '2'
minor: '2'
patch: '18'

- user_agent_string: 'aws-sdk-ruby3/3.170.0 ruby/3.0 x86_64-linux-musl aws-sdk-core/3.170'
family: 'aws-sdk-ruby3'
major: '3'
minor: '170'
patch: '0'

- user_agent_string: 'aws-sdk-cpp/1.0.64 Linux/4.4.0-66-generic x86_64'
family: 'aws-sdk-cpp'
Expand All @@ -7950,12 +7956,24 @@ test_cases:
major: '1'
minor: '4'
patch: '12'

- user_agent_string: 'aws-sdk-go-v2/1.18.0 os/linux lang/go/1.20 md/GOOS/linux md/GOARCH/amd64 api/sts/1.18'
family: 'aws-sdk-go-v2'
major: '1'
minor: '18'
patch: '0'

- user_agent_string: 'aws-sdk-nodejs/2.141.0 win32/v8.4.0'
family: 'aws-sdk-nodejs'
major: '2'
minor: '141'
patch: '0'

- user_agent_string: 'aws-sdk-js/3.186.0 os/linux/5.15 lang/js md/nodejs/18.15 api/sts/3.186'
family: 'aws-sdk-js'
major: '3'
minor: '186'
patch: '0'

- user_agent_string: 'JetS3t/0.9.0 (Linux/4.4.0-1044-aws; amd64; en; JVM 1.8.0_131)'
family: 'JetS3t'
Expand Down