sensitive-strings

Scalafix rule for avoiding sensitive interpolations

License

License

MIT
GroupId

GroupId

com.alejandrohdezma
ArtifactId

ArtifactId

sensitive-strings_2.12
Last Version

Last Version

0.2.1
Release Date

Release Date

Type

Type

jar
Description

Description

sensitive-strings
Scalafix rule for avoiding sensitive interpolations
Project URL

Project URL

https://github.com/alejandrohdezma/sensitive-strings
Project Organization

Project Organization

com.alejandrohdezma
Source Code Management

Source Code Management

https://github.com/alejandrohdezma/sensitive-strings

Download sensitive-strings_2.12

How to add to project

<!-- https://jarcasting.com/artifacts/com.alejandrohdezma/sensitive-strings_2.12/ -->
<dependency>
    <groupId>com.alejandrohdezma</groupId>
    <artifactId>sensitive-strings_2.12</artifactId>
    <version>0.2.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.alejandrohdezma/sensitive-strings_2.12/
implementation 'com.alejandrohdezma:sensitive-strings_2.12:0.2.1'
// https://jarcasting.com/artifacts/com.alejandrohdezma/sensitive-strings_2.12/
implementation ("com.alejandrohdezma:sensitive-strings_2.12:0.2.1")
'com.alejandrohdezma:sensitive-strings_2.12:jar:0.2.1'
<dependency org="com.alejandrohdezma" name="sensitive-strings_2.12" rev="0.2.1">
  <artifact name="sensitive-strings_2.12" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.alejandrohdezma', module='sensitive-strings_2.12', version='0.2.1')
)
libraryDependencies += "com.alejandrohdezma" % "sensitive-strings_2.12" % "0.2.1"
[com.alejandrohdezma/sensitive-strings_2.12 "0.2.1"]

Dependencies

compile (2)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.12.10
ch.epfl.scala : scalafix-core_2.12 jar 0.9.7

Project Modules

There are no modules declared in this project.

Scalafix rule for avoiding sensitive interpolations

This rule reports errors when a "sensitive" type is used inside a string interpolation.

Installation

scalafixDependencies += "com.alejandrohdezma" %% "sensitive-strings" % "0.2.1"

Configuration

By default, this rule does not disable any particular type. Add them to symbols configuration.

NoSensitiveStrings.symbols = []
NoSensitiveStrings.regex = []

Examples

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.

Versions

Version
0.2.1
0.2.0
0.1.1
0.1.0