-
Notifications
You must be signed in to change notification settings - Fork 218
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
Sensitive validator branch #1364
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mtdowling
requested changes
Oct 20, 2022
smithy-linters/src/main/java/software/amazon/smithy/linters/MissingSensitiveTraitValidator.java
Outdated
Show resolved
Hide resolved
smithy-linters/src/main/java/software/amazon/smithy/linters/MissingSensitiveTraitValidator.java
Outdated
Show resolved
Hide resolved
smithy-linters/src/main/java/software/amazon/smithy/linters/MissingSensitiveTraitValidator.java
Outdated
Show resolved
Hide resolved
smithy-linters/src/main/java/software/amazon/smithy/linters/MissingSensitiveTraitValidator.java
Outdated
Show resolved
Hide resolved
smithy-linters/src/main/java/software/amazon/smithy/linters/MissingSensitiveTraitValidator.java
Outdated
Show resolved
Hide resolved
smithy-linters/src/main/java/software/amazon/smithy/linters/MissingSensitiveTraitValidator.java
Outdated
Show resolved
Hide resolved
smithy-linters/src/main/java/software/amazon/smithy/linters/MissingSensitiveTraitValidator.java
Outdated
Show resolved
Hide resolved
smithy-linters/src/main/java/software/amazon/smithy/linters/MissingSensitiveTraitValidator.java
Outdated
Show resolved
Hide resolved
I created a PR here that is used by ReservedWords to support word boundary based term matching. I made an abstraction for this so that it could be used by this linter as well. Let me know what you think. #1461 |
mtdowling
added a commit
that referenced
this pull request
Oct 24, 2022
This commit introduces a new syntax for matching words with the ReservedWords linter and is intended to be used with the upcoming sensitive words linter defined in #1364. In addition to supporting wildcard searches ("*" prefix, suffix, and contains), we now support matching based on word boundaries. This commit introduces the "terms" keyword for word boundary searches and adds dedicated abstractions for word boundary and wildcard matching. For example, "access key id" will match "AccessKeyId", "access_key_id", "accessKeyID", "access_key_id100", "AccesKeyIDValue". It will also match when all the words are concatenated together: "accesskeyid". However, it will not match "accesskey_id" because it only has two word boundaries ("accesskey" and "id").
mtdowling
added a commit
that referenced
this pull request
Oct 24, 2022
This commit introduces a new syntax for matching words with the ReservedWords linter and is intended to be used with the upcoming sensitive words linter defined in #1364. In addition to supporting wildcard searches ("*" prefix, suffix, and contains), we now support matching based on word boundaries. This commit introduces the "terms" keyword for word boundary searches and adds dedicated abstractions for word boundary and wildcard matching. For example, "access key id" will match "AccessKeyId", "access_key_id", "accessKeyID", "access_key_id100", "AccesKeyIDValue". It will also match when all the words are concatenated together: "accesskeyid". However, it will not match "accesskey_id" because it only has two word boundaries ("accesskey" and "id").
rchache
force-pushed
the
SensitiveValidatorBranch
branch
from
October 27, 2022 01:13
d3e810b
to
ae30062
Compare
rchache
force-pushed
the
SensitiveValidatorBranch
branch
from
October 27, 2022 15:23
ae30062
to
d3d2bb5
Compare
mtdowling
requested changes
Nov 9, 2022
smithy-linters/src/main/java/software/amazon/smithy/linters/WordBoundaryMatcher.java
Outdated
Show resolved
Hide resolved
smithy-linters/src/main/java/software/amazon/smithy/linters/WordBoundaryMatcher.java
Outdated
Show resolved
Hide resolved
smithy-linters/src/main/java/software/amazon/smithy/linters/MissingSensitiveTraitValidator.java
Outdated
Show resolved
Hide resolved
smithy-linters/src/main/java/software/amazon/smithy/linters/MissingSensitiveTraitValidator.java
Outdated
Show resolved
Hide resolved
smithy-linters/src/main/java/software/amazon/smithy/linters/MissingSensitiveTraitValidator.java
Show resolved
Hide resolved
smithy-linters/src/main/java/software/amazon/smithy/linters/MissingSensitiveTraitValidator.java
Outdated
Show resolved
Hide resolved
smithy-linters/src/main/java/software/amazon/smithy/linters/MissingSensitiveTraitValidator.java
Show resolved
Hide resolved
mtdowling
approved these changes
Nov 11, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issue #, if available:
Description of changes:
Based on various existing services for sensitive data detection and current AWS sensitive trait usage, generated a default list of words and phrases that likely indicate the data stored inside is sensitive. It is configurable the way the non inclusive terms validator is.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.