Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add botocore db.statement sanitization for dynamoDB #1662
base: main
Are you sure you want to change the base?
Add botocore db.statement sanitization for dynamoDB #1662
Changes from 23 commits
e2753f1
068b8f6
41d3724
6efcbb8
3df3d25
3cb7488
721b41c
b68de4d
9b17814
05d23b6
18b651d
53d7070
fa461ef
c6073d2
068d3e0
5e11ff5
82f4ba9
38ef502
a876ad0
3b6d054
ceba85d
e08a776
aee58c8
6fc7647
0a6d697
4669538
b4eca22
d9beb26
d6ef436
acc8acc
363a581
cd8baff
28d4176
541e6d7
6fb5545
787ac27
a8b61b8
f2a4623
e4ca88f
5281c38
e9a11db
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
args
is what the botocore library passes tobotocore.client.BaseClient._make_api_call
(the instrumented function). i think currently it is the name of the operation (e.g.Lambda.ListLayers
) and the input parameters (e.g.client.list_layers(<input>)
) as dictionary.This might potentially change in the future, so i think it would be better to pass the
configuration
as separate parameter to_determine_call_context
(and in turn to_AwsSdkCallContext
) instead of adding it to theargs
. This would also avoid issues when e.g. the type ofargs
changes fromtuple
tolist
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
afaik there isn't a specification yet how the
db.statement
should look like for DynamoDB.i think this would be defined first to so that all techs (Js, Ruby, .NET, ....) use a commonly understood format.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I get what you're saying. However, there are several similar merged PRs (#1545, #1547, #1548), and an open discussion in specs. Your call :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it then even make sens to add statement sanitization if the format isn't specced yet? Also when considering that there doesn't seem to be a common query language for DynamoDB (e.g SDK input parameters vs PartiQL).
Personally i don't have a strong opinion about statement capturing/sanitization and i'm just pointing out that it might lead to breaking changes in the future.
If you think this is ok feel free and continue with merging this PR :)