Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alejandrohdezma/sensitive-strings
Scalafix rule for avoiding sensitive interpolations
https://github.com/alejandrohdezma/sensitive-strings
scala scalafix scalafix-rule sensitive-data-security
Last synced: about 2 months ago
JSON representation
Scalafix rule for avoiding sensitive interpolations
- Host: GitHub
- URL: https://github.com/alejandrohdezma/sensitive-strings
- Owner: alejandrohdezma
- License: apache-2.0
- Created: 2019-10-08T10:15:40.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-05-15T05:14:33.000Z (8 months ago)
- Last Synced: 2024-05-21T04:13:46.805Z (8 months ago)
- Topics: scala, scalafix, scalafix-rule, sensitive-data-security
- Language: Scala
- Homepage:
- Size: 498 KB
- Stars: 7
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Scalafix rule for avoiding sensitive interpolations
This rule reports errors when a "sensitive" type is used inside a string interpolation.
![](./images/lint-example.png)
## Installation
```sbt
scalafixDependencies += "com.alejandrohdezma" %% "sensitive-strings" % "0.4.0"
```## Configuration
By default, this rule does not disable any particular type. Add them to `symbols` configuration.
```hocon
NoSensitiveStrings.symbols = []
NoSensitiveStrings.regex = []
```### Examples
```hocon
NoSensitiveStrings.symbols = [
com.alejandrohdezma.domain.Password,
com.alejandrohdezma.domain.UserContext,
com.alejandrohdezma.domain.UserAccount
]
NoSensitiveStrings.regex = [
"com\\.alejandrohdezma\\.domain\\..*"
]
```#### Regex
As you can see in the previous example, you can also match against a list of regex using the `regex` configuration and providing a list of patterns.