Package org.sonar.python.checks.hotspots
Class HashingDataCheck
- java.lang.Object
-
- org.sonar.plugins.python.api.PythonSubscriptionCheck
-
- org.sonar.python.checks.AbstractCallExpressionCheck
-
- org.sonar.python.checks.hotspots.HashingDataCheck
-
- All Implemented Interfaces:
PythonCheck,SubscriptionCheck
public class HashingDataCheck extends AbstractCallExpressionCheck
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.sonar.plugins.python.api.PythonCheck
PythonCheck.PreciseIssue
-
Nested classes/interfaces inherited from interface org.sonar.plugins.python.api.SubscriptionCheck
SubscriptionCheck.Context
-
-
Constructor Summary
Constructors Constructor Description HashingDataCheck()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Set<String>functionsToCheck()voidinitialize(SubscriptionCheck.Context context)protected booleanisException(CallExpression callExpression)`make_password(password, salt, hasher)` function is sensitive when it's used with a specific hasher name or salt.protected Stringmessage()-
Methods inherited from class org.sonar.python.checks.AbstractCallExpressionCheck
immutableSet, isWithinImport, visitNode
-
Methods inherited from class org.sonar.plugins.python.api.PythonSubscriptionCheck
leaveFile, scanFile
-
-
-
-
Field Detail
-
CHECK_KEY
public static final String CHECK_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
initialize
public void initialize(SubscriptionCheck.Context context)
- Specified by:
initializein interfaceSubscriptionCheck- Overrides:
initializein classAbstractCallExpressionCheck
-
isException
protected boolean isException(CallExpression callExpression)
`make_password(password, salt, hasher)` function is sensitive when it's used with a specific hasher name or salt. No issue should be raised when only the password is provided.make_password(password, salt=salt) # Sensitive make_password(password, hasher=hasher) # Sensitive make_password(password, salt=salt, hasher=hasher) # Sensitive make_password(password) # OK
- Overrides:
isExceptionin classAbstractCallExpressionCheck
-
functionsToCheck
protected Set<String> functionsToCheck()
- Specified by:
functionsToCheckin classAbstractCallExpressionCheck
-
message
protected String message()
- Specified by:
messagein classAbstractCallExpressionCheck
-
-