Skip to main content

Python Scan rules

 

Contrast Scan supports these rules for Python.

Severity

Contrast rule

Engine rule ID

Description

Critical 

Too Much Origins Allowed Rule 

OPT.PYTHON.SECURITY.TooMuchOriginsAllowedRule 

TooMuchOriginsAllowedRule: CORS policy (Cross-origin resource sharing) too broad 

Critical 

Missing Browser Xss Filter 

OPT.PYTHON.DJANGO.MissingBrowserXssFilter 

MissingBrowserXssFilter: Secure browser XSS filter 

Critical 

Code Injection 

OPT.PYTHON.SECURITY.CodeInjection 

CodeInjection: Avoid non-neutralized user-controlled input in dynamic code evaluation 

Critical 

Command Injection 

OPT.PYTHON.SECURITY.CommandInjection 

CommandInjection: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') 

Critical 

Connection String Parameter Pollution 

OPT.PYTHON.SECURITY.ConnectionStringParameterPollution 

ConnectionStringParameterPollution: Connection string polluted with untrusted input 

Critical 

Cross Site Scripting 

OPT.PYTHON.SECURITY.CrossSiteScripting 

CrossSiteScripting: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') 

Critical 

DoS Regexp 

OPT.PYTHON.SECURITY.DoSRegexp 

DoSRegexp: Potential denial-of-service attack through malicious regular expression (ReDoS) 

Critical 

JSON Injection 

OPT.PYTHON.SECURITY.JSONInjection 

JSONInjection: Avoid using non-neutralized user-controlled input into JSON entities - JSON Injection 

Critical 

Ldap Injection 

OPT.PYTHON.SECURITY.LdapInjection 

LdapInjection: Avoid non-neutralized user-controlled input in LDAP search filters 

Critical 

Mail Command Injection 

OPT.PYTHON.SECURITY.MailCommandInjection 

MailCommandInjection: Mail Command Injection 

Critical 

Memcached Injection 

OPT.PYTHON.SECURITY.MemcachedInjection 

MemcachedInjection: Avoid non-neutralized user-controlled input to be stored into a cache 

Critical 

No SQL Injection 

OPT.PYTHON.SECURITY.NoSQLInjection 

NoSQLInjection: Improper neutralization of special elements in data query logic (NoSQL injection) 

Critical 

SQL Injection 

OPT.PYTHON.SECURITY.SqlInjection 

SqlInjection: Avoid SQL code formed with non neutralized user input (vulnerable to SQL Injection attacks) 

Critical 

Stored Cross Site Scripting 

OPT.PYTHON.SECURITY.StoredCrossSiteScripting 

StoredCrossSiteScripting: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') 

Critical 

Xpath Injection 

OPT.PYTHON.SECURITY.XpathInjection 

XpathInjection: Avoid XPath expressions formed with non neutralized user input 

Critical 

Xml Entity Injection 

OPT.PYTHON.SECURITY.XmlEntityInjection 

XmlEntityInjection: XML entity injection 

Critical 

Path Traversal 

OPT.PYTHON.SECURITY.PathTraversal 

PathTraversal: Avoid non-neutralized user-controlled input to be part of a pathname (file or directory) used in I/O operations 

Critical 

Password In Redirect Rule 

OPT.PYTHON.SECURITY.PasswordInRedirectRule 

PasswordInRedirectRule: Password Management - Password in Redirect 

Critical 

Hardcoded Crypto Key 

OPT.PYTHON.SECURITY.HardcodedCryptoKey 

HardcodedCryptoKey: Hardcoded cryptographic keys 

Critical 

Non Random IV With CBC Mode 

OPT.PYTHON.SECURITY.NonRandomIVWithCBCMode 

NonRandomIVWithCBCMode: Not using a Random IV with CBC Mode 

Critical 

Weak Cryptographic Hash In Settings 

OPT.PYTHON.DJANGO.WeakCryptographicHashInSettings 

WeakCryptographicHashInSettings: Weak cryptographic hashes cannot guarantee data integrity 

High 

Insufficient Session Expiration Rule 

OPT.PYTHON.SECURITY.InsufficientSessionExpirationRule 

InsufficientSessionExpirationRule: Checks that session expiration interval is positive and does not exceed a limit 

High 

Cookie Based Sessions 

OPT.PYTHON.DJANGO.CookieBasedSessions 

CookieBasedSessions: Cookie-based session with a unsafe configuration 

High 

Insufficient Django Settings Session Expiration 

OPT.PYTHON.DJANGO.InsufficientDjangoSettingsSessionExpiration 

InsufficientDjangoSettingsSessionExpiration: Checks that session expiration interval is positive and does not exceed a limit 

High 

Cookie Poisoning 

OPT.PYTHON.SECURITY.CookiePoisoning 

CookiePoisoning: Cookie Poisoning 

High 

Cross Site Request Forgery 

OPT.PYTHON.SECURITY.CrossSiteRequestForgery 

CrossSiteRequestForgery: Cross-site request forgery (CSRF) 

High 

Dont Use Exec 

OPT.PYTHON.SECURITY.DontUseExec 

DontUseExec: Avoid using exec() function 

High 

Header Manipulation 

OPT.PYTHON.SECURITY.HeaderManipulation 

HeaderManipulation: Avoid including unvalidated data in HTTP response header or in Cookies 

High 

Http Parameter Pollution Rule 

OPT.PYTHON.SECURITY.HttpParameterPollutionRule 

HttpParameterPollutionRule: HTTP parameter pollution (HPP) 

High 

Log Forging 

OPT.PYTHON.SECURITY.LogForging 

LogForging: Unvalidated untrusted input in log 

High 

Open Redirect 

OPT.PYTHON.SECURITY.OpenRedirect 

OpenRedirect: Do not allow to control the URL used in a redirect by an unvalidated input 

High 

Resource Injection 

OPT.PYTHON.SECURITY.ResourceInjection 

ResourceInjection: Improper control of resource identifiers ("Resource Injection") 

High 

Server Side Request Forgery 

OPT.PYTHON.SECURITY.ServerSideRequestForgery 

ServerSideRequestForgery: Creation of requests from a vulnerable server using untrusted input (server side request forgery, SSRF) 

High 

Trust Boundary 

OPT.PYTHON.SECURITY.TrustBoundary 

TrustBoundary: Trust boundary violation 

High 

Unsafe Reflection 

OPT.PYTHON.SECURITY.UnsafeReflection 

UnsafeReflection: Use of Externally-Controlled Input to Select Classes or Code ('Unsafe Reflection') 

High 

Xml Injection 

OPT.PYTHON.SECURITY.XmlInjection 

XmlInjection: Avoid using non-neutralized user-controlled input when creating XML documents 

High 

Mass Assigment Attack 

OPT.PYTHON.DJANGO.MassAssigmentAttack 

MassAssigmentAttack: Insufficient form fields validation 

High 

Avoid Calling Magic Methods 

OPT.PYTHON.MAINTAINABILITY.AvoidCallingMagicMethods 

AvoidCallingMagicMethods: Avoid calling magic methods 

High 

Avoid Too Complex Functions 

OPT.PYTHON.MAINTAINABILITY.AvoidTooComplexFunctions 

AvoidTooComplexFunctions: Avoid too complex functions 

High 

Avoid Assignments To True Or False 

OPT.PYTHON.RELIABILITY.AvoidAssignmentsToTrueOrFalse 

AvoidAssignmentsToTrueOrFalse: Avoid assignments to True or False 

High 

Avoid Chained Comparisons Containing Equality 

OPT.PYTHON.RELIABILITY.AvoidChainedComparisonsContainingEquality 

AvoidChainedComparisonsContainingEquality: Avoid chained comparisons containing equality operator 

High 

Avoid Default Mutable Arguments 

OPT.PYTHON.RELIABILITY.AvoidDefaultMutableArguments 

AvoidDefaultMutableArguments: Avoid using default mutable parameters 

High 

Init Cannot Be A Generator 

OPT.PYTHON.RELIABILITY.InitCannotBeAGenerator 

InitCannotBeAGenerator: __init__ method cannot be a generator 

High 

Invalid Open Mode 

OPT.PYTHON.RELIABILITY.InvalidOpenMode 

InvalidOpenMode: Invalid open() mode 

High 

Open Files Using With 

OPT.PYTHON.RELIABILITY.OpenFilesUsingWith 

OpenFilesUsingWith: Open files using the with statement 

High 

Same Method And Field Names 

OPT.PYTHON.RELIABILITY.SameMethodAndFieldNames 

SameMethodAndFieldNames: Methods and class fields should not to be different only by capitalization 

High 

Using Deprecated Module 

OPT.PYTHON.RELIABILITY.UsingDeprecatedModule 

UsingDeprecatedModule: Avoid using deprecated modules 

High 

Cookies In Security Decision 

OPT.PYTHON.SECURITY.CookiesInSecurityDecision 

CookiesInSecurityDecision: Reliance on Cookies without Validation and Integrity Checking in a Security Decision 

High 

Unhandled SSL Error Rule 

OPT.PYTHON.SECURITY.UnhandledSSLErrorRule 

UnhandledSSLErrorRule: Unhandled SSL exception 

High 

User Controlled SQL Primary Key 

OPT.PYTHON.SECURITY.UserControlledSQLPrimaryKey 

UserControlledSQLPrimaryKey: Avoid using an user controlled Primary Key into a query 

High 

Insecure Direct Object References 

OPT.PYTHON.DJANGO.InsecureDirectObjectReferences 

InsecureDirectObjectReferences: Check for user authentication and/ or authorization before let him modifying a sensible system resource 

High 

Missing Function Level Access Control 

OPT.PYTHON.DJANGO.MissingFunctionLevelAccessControl 

MissingFunctionLevelAccessControl: Perform an authorization check when performing an action which requires authorization 

High 

Hardcoded Credential 

OPT.PYTHON.SECURITY.HardcodedCredential 

HardcodedCredential: Empty or hardcoded passwords may compromise system security in a way that cannot be easily remedied 

High 

Hardcoded Ip 

OPT.PYTHON.SECURITY.HardcodedIp 

HardcodedIp: Do not write IP address in source code 

High 

Hardcoded Salt 

OPT.PYTHON.SECURITY.HardcodedSalt 

HardcodedSalt: Use of hardcoded salt 

High 

Insecure Transport 

OPT.PYTHON.SECURITY.InsecureTransport 

InsecureTransport: Insecure transport 

High 

Insufficient Key Size Rule 

OPT.PYTHON.SECURITY.InsufficientKeySizeRule 

InsufficientKeySizeRule: Weak cryptography, insufficient key length 

High 

Server Insecure Transport 

OPT.PYTHON.SECURITY.ServerInsecureTransport 

ServerInsecureTransport: Insecure transport in HTTP servers 

High 

Weak Cryptographic Hash 

OPT.PYTHON.SECURITY.WeakCryptographicHash 

WeakCryptographicHash: Weak cryptographic hash 

High 

Weak Encryption Algorithm 

OPT.PYTHON.SECURITY.WeakEncryptionAlgorithm 

WeakEncryptionAlgorithm: Weak symmetric encryption algorithm 

Info 

Empty Docstring 

OPT.PYTHON.MAINTAINABILITY.EmptyDocstring 

EmptyDocstring: Empty docstring 

Info 

Import Top Of File 

OPT.PYTHON.MAINTAINABILITY.ImportTopOfFile 

ImportTopOfFile: Module level import not at top of file 

Info 

Line Too Long 

OPT.PYTHON.MAINTAINABILITY.LineTooLong 

LineTooLong: Line too long 

Info 

Missing Docstring 

OPT.PYTHON.MAINTAINABILITY.MissingDocstring 

MissingDocstring: Missing docstring 

Info 

Multiple Imports One Line 

OPT.PYTHON.MAINTAINABILITY.MultipleImportsOneLine 

MultipleImportsOneLine: Multiple imports in one line 

Info 

Too Many Local Variables 

OPT.PYTHON.MAINTAINABILITY.TooManyLocalVariables 

TooManyLocalVariables: Too many local variables 

Info 

Unnecessary Semicolon 

OPT.PYTHON.MAINTAINABILITY.UnnecessarySemicolon 

UnnecessarySemicolon: Unnecessary semicolon 

Low 

Empty Sequences Are False 

OPT.PYTHON.EFFICIENCY.EmptySequencesAreFalse 

EmptySequencesAreFalse: Empty sequences are False 

Low 

Init Dictionaries With Literals 

OPT.PYTHON.EFFICIENCY.InitDictionariesWithLiterals 

InitDictionariesWithLiterals: Use literals to initialize dictionaries 

Low 

Potential Class Or Static Method 

OPT.PYTHON.EFFICIENCY.PotentialClassOrStaticMethod 

PotentialClassOrStaticMethod: Class methods not accessing instance fields must be static 

Low 

Avoid Assingning A Lambda 

OPT.PYTHON.MAINTAINABILITY.AvoidAssingningALambda 

AvoidAssingningALambda: Avoid assigning the lambda expression 

Low 

Avoid Commented Out Code 

OPT.PYTHON.MAINTAINABILITY.AvoidCommentedOutCode 

AvoidCommentedOutCode: Avoid commented out code blocks 

Low 

Avoid Name Repetition In Comparisons 

OPT.PYTHON.MAINTAINABILITY.AvoidNameRepetitionInComparisons 

AvoidNameRepetitionInComparisons: Avoid unnecessary name repetition in equality comparisions 

Low 

Avoid Nested Empty Blocks 

OPT.PYTHON.MAINTAINABILITY.AvoidNestedEmptyBlocks 

AvoidNestedEmptyBlocks: Avoid unnecessary nested empty blocks 

Low 

Bad Identity Check 

OPT.PYTHON.MAINTAINABILITY.BadIdentityCheck 

BadIdentityCheck: Avoid using the [] {}

Low 

Bad Type Comparison 

OPT.PYTHON.MAINTAINABILITY.BadTypeComparison 

BadTypeComparison: Use isinstance to perform a type comparison 

Low 

Blank Line At End Of File 

OPT.PYTHON.MAINTAINABILITY.BlankLineAtEndOfFile 

BlankLineAtEndOfFile: It should be one single blank line at the end of the file 

Low 

Blank Line Contains Whitespace 

OPT.PYTHON.MAINTAINABILITY.BlankLineContainsWhitespace 

BlankLineContainsWhitespace: Blank lines should not content whitespaces 

Low 

Blank Lines Surrounding Function Or Class 

OPT.PYTHON.MAINTAINABILITY.BlankLinesSurroundingFunctionOrClass 

BlankLinesSurroundingFunctionOrClass: Top level functions and class definitions should be surrounded with two lines 

Low 

Blank Line Surrounding Methods 

OPT.PYTHON.MAINTAINABILITY.BlankLineSurroundingMethods 

BlankLineSurroundingMethods: Class methods should be surrounded with a single blank line 

Low 

Loops Else Clause Always Executed 

OPT.PYTHON.MAINTAINABILITY.LoopsElseClauseAlwaysExecuted 

LoopsElseClauseAlwaysExecuted: Loops else clause is always executed 

Low 

Merge Simple Conditional Branches 

OPT.PYTHON.MAINTAINABILITY.MergeSimpleConditionalBranches 

MergeSimpleConditionalBranches: Simple conditional statements should be merged 

Low 

Remove Statements After Jump 

OPT.PYTHON.MAINTAINABILITY.RemoveStatementsAfterJump 

RemoveStatementsAfterJump: Statements after a jump are dead code 

Low 

Simplify Repetitive Unequal Checks 

OPT.PYTHON.MAINTAINABILITY.SimplifyRepetitiveUnequalChecks 

SimplifyRepetitiveUnequalChecks: Simplify repetetive unequal checks 

Low 

Trailing Whitespace 

OPT.PYTHON.MAINTAINABILITY.TrailingWhitespace 

TrailingWhitespace: Avoid trailing whitespace 

Low 

Use Chained Comparisons 

OPT.PYTHON.MAINTAINABILITY.UseChainedComparisons 

UseChainedComparisons: Consider using chained comparisons 

Low 

Use Negative Index For Last Element 

OPT.PYTHON.MAINTAINABILITY.UseNegativeIndexForLastElement 

UseNegativeIndexForLastElement: Consider using negative indexes to access the last positions of collections 

Low 

Use Proper Inequality Operator 

OPT.PYTHON.PORTABILITY.UseProperInequalityOperator 

UseProperInequalityOperator: Avoid using the <> inequality operator 

Low 

Avoid Pre Increment And Pre Decrement Operators 

OPT.PYTHON.RELIABILITY.AvoidPreIncrementAndPreDecrementOperators 

AvoidPreIncrementAndPreDecrementOperators: Avoid using the pre-increment and pre-decrement operators 

Low 

Avoid Using Return Outside Function 

OPT.PYTHON.RELIABILITY.AvoidUsingReturnOutsideFunction 

AvoidUsingReturnOutsideFunction: Avoid using the return statement outside a function 

Low 

Avoid Using Yield Outside Function 

OPT.PYTHON.RELIABILITY.AvoidUsingYieldOutsideFunction 

AvoidUsingYieldOutsideFunction: Avoid using the yield statement outside a function 

Low 

Handle F I X M E Tags 

OPT.PYTHON.RELIABILITY.HandleFIXMETags 

HandleFIXMETags: Handle FIXME tags 

Low 

No Exception Type Specified 

OPT.PYTHON.RELIABILITY.NoExceptionTypeSpecified 

NoExceptionTypeSpecified: No exception type specified 

Low 

Information Exposure Through Debug Log 

OPT.PYTHON.SECURITY.InformationExposureThroughDebugLog 

InformationExposureThroughDebugLog: Avoid exposing sensitive information through log 

Low 

Password In Comments 

OPT.PYTHON.SECURITY.PasswordInComments 

PasswordInComments: Storing passwords or password details in plaintext anywhere in the system or system code can compromise system security 

Medium 

Plaintext Storage In A Cookie Rule 

OPT.PYTHON.SECURITY.PlaintextStorageInACookieRule 

PlaintextStorageInACookieRule: Cleartext Storage of Sensitive Information in a Cookie 

Medium 

Unsafe Cookie 

OPT.PYTHON.SECURITY.UnsafeCookie 

UnsafeCookie: Generate server-side cookies with adequate security properties 

Medium 

Avoid Host Name Checks Rule 

OPT.PYTHON.SECURITY.AvoidHostNameChecksRule 

AvoidHostNameChecksRule: Avoid checks on client-side hostname, that are not reliable due to DNS poisoning 

Medium 

Format String Injection Rule 

OPT.PYTHON.SECURITY.FormatStringInjectionRule 

FormatStringInjectionRule: Exclude unsanitized user input from format strings 

Medium 

Serialization Injection 

OPT.PYTHON.SECURITY.SerializationInjection 

SerializationInjection: Deserialization of untrusted data 

Medium 

Avoid Unnecessary Materialization 

OPT.PYTHON.EFFICIENCY.AvoidUnnecessaryMaterialization 

AvoidUnnecessaryMaterialization: Use an iterator instead of materializing the list 

Medium 

Improve List Extension 

OPT.PYTHON.EFFICIENCY.ImproveListExtension 

ImproveListExtension: Do not use concatenation to extend lists 

Medium 

Not Using Items To Iterate Dictionary 

OPT.PYTHON.EFFICIENCY.NotUsingItemsToIterateDictionary 

NotUsingItemsToIterateDictionary: Not using items() to iterate over a dictionary 

Medium 

Not Using Zip To Iterate Pair Of Lists 

OPT.PYTHON.EFFICIENCY.NotUsingZipToIteratePairOfLists 

NotUsingZipToIteratePairOfLists: Not using zip() to iterate over a pair of lists 

Medium 

Avoid Too Deeply Nested Statements 

OPT.PYTHON.MAINTAINABILITY.AvoidTooDeeplyNestedStatements 

AvoidTooDeeplyNestedStatements: Avoid too deeply nested statements 

Medium 

Cls As First Argument 

OPT.PYTHON.MAINTAINABILITY.ClsAsFirstArgument 

ClsAsFirstArgument: The first argument in class methods should be "cls" 

Medium 

Dead Code 

OPT.PYTHON.MAINTAINABILITY.DeadCode 

DeadCode: Avoid dead code 

Medium 

Maximum Module Lines 

OPT.PYTHON.MAINTAINABILITY.MaximumModuleLines 

MaximumModuleLines: Maximum module lines permitted 

Medium 

More Than A Statement Single Line 

OPT.PYTHON.MAINTAINABILITY.MoreThanAStatementSingleLine 

MoreThanAStatementSingleLine: Avoid more than one statement per line 

Medium 

Naming Conventions 

OPT.PYTHON.MAINTAINABILITY.NamingConventions 

NamingConventions: Follow PEP 8 naming conventions for Python elements 

Medium 

Self As First Argument 

OPT.PYTHON.MAINTAINABILITY.SelfAsFirstArgument 

SelfAsFirstArgument: The first argument in instance methods should be "self" 

Medium 

Too Many Arguments 

OPT.PYTHON.MAINTAINABILITY.TooManyArguments 

TooManyArguments: Too much arguments in function, method or lambda 

Medium 

Too Many Statements 

OPT.PYTHON.MAINTAINABILITY.TooManyStatements 

TooManyStatements: Too high number of statements in a method 

Medium 

Unnecessary Pass Stmt 

OPT.PYTHON.MAINTAINABILITY.UnnecessaryPassStmt 

UnnecessaryPassStmt: Avoid using PASS statement when is not necessary 

Medium 

Wildcard Import 

OPT.PYTHON.MAINTAINABILITY.WildcardImport 

WildcardImport: Avoid using * in import statements 

Medium 

Access Dictionary Element 

OPT.PYTHON.PORTABILITY.AccessDictionaryElement 

AccessDictionaryElement: Do not use 'has_key' to access dictionary elements 

Medium 

Avoid Deprecated Raising Exception Form 

OPT.PYTHON.PORTABILITY.AvoidDeprecatedRaisingExceptionForm 

AvoidDeprecatedRaisingExceptionForm: Avoid using the deprecated raising exception form.] 

Medium 

Avoid Print Statement 

OPT.PYTHON.PORTABILITY.AvoidPrintStatement 

AvoidPrintStatement: Avoid using PRINT statement 

Medium 

Dont Use Backticks 

OPT.PYTHON.PORTABILITY.DontUseBackticks 

DontUseBackticks: Avoid using backticks 

Medium 

Hardcoded Absolute Path 

OPT.PYTHON.PORTABILITY.HardcodedAbsolutePath 

HardcodedAbsolutePath: Do not hardcode absolute paths 

Medium 

Property On An Old Style Class 

OPT.PYTHON.PORTABILITY.PropertyOnAnOldStyleClass 

PropertyOnAnOldStyleClass: Avoid using the @property decorator on old-style classes.] 

Medium 

Use New Class Style 

OPT.PYTHON.PORTABILITY.UseNewClassStyle 

UseNewClassStyle: Use the new class definition style 

Medium 

Avoid Assigning Functions Not Returning A Value 

OPT.PYTHON.RELIABILITY.AvoidAssigningFunctionsNotReturningAValue 

AvoidAssigningFunctionsNotReturningAValue: AvoidAssigningFunctionsNotReturningAValue 

Medium 

Avoid Break And Continue Outside Loop 

OPT.PYTHON.RELIABILITY.AvoidBreakAndContinueOutsideLoop 

AvoidBreakAndContinueOutsideLoop: Avoid using the BREAK and CONTINUE statements outside a LOOP 

Medium 

Avoid Capturing Generic Exception 

OPT.PYTHON.RELIABILITY.AvoidCapturingGenericException 

AvoidCapturingGenericException: Avoid capturing generic exceptions 

Medium 

Avoid Characters And Numerals Confusion 

OPT.PYTHON.RELIABILITY.AvoidCharactersAndNumeralsConfusion 

AvoidCharactersAndNumeralsConfusion: Avoid confusion between characters and numerals when used as name identifiers 

Medium 

Avoid Empty Except 

OPT.PYTHON.RELIABILITY.AvoidEmptyExcept 

AvoidEmptyExcept: Avoid using empty except clauses 

Medium 

Avoid Explicit Returns Init 

OPT.PYTHON.RELIABILITY.AvoidExplicitReturnsInit 

AvoidExplicitReturnsInit: Avoid returning a value into __init__ 

Medium 

Avoid Using Return And Yield Together 

OPT.PYTHON.RELIABILITY.AvoidUsingReturnAndYieldTogether 

AvoidUsingReturnAndYieldTogether: Avoid using return inside a generator 

Medium 

Check Exit Method Signature 

OPT.PYTHON.RELIABILITY.CheckExitMethodSignature 

CheckExitMethodSignature: Check __exit__ method signature 

Medium 

Duplicate Argument Name 

OPT.PYTHON.RELIABILITY.DuplicateArgumentName 

DuplicateArgumentName: Avoid using the same name for more than a function argument 

Medium 

Duplicated Field Name With Class 

OPT.PYTHON.RELIABILITY.DuplicatedFieldNameWithClass 

DuplicatedFieldNameWithClass: Avoid using the same name for attibute than the class name 

Medium 

Future Import Is Not The First 

OPT.PYTHON.RELIABILITY.FutureImportIsNotTheFirst 

FutureImportIsNotTheFirst: Avoid to import the __future__ module in the middle of a module 

Medium 

Redefinition Into List Comprehension 

OPT.PYTHON.RELIABILITY.RedefinitionIntoListComprehension 

RedefinitionIntoListComprehension: Avoid variable redefinitions into a list comprehension 

Medium 

Static Method First Argument 

OPT.PYTHON.RELIABILITY.StaticMethodFirstArgument 

StaticMethodFirstArgument: The first argument of static methods should not be neither "self" or "cls" 

Medium 

Unreachable Code 

OPT.PYTHON.RELIABILITY.UnreachableCode 

UnreachableCode: Avoid unreachable code 

Medium 

Execution After Redirect 

OPT.PYTHON.SECURITY.ExecutionAfterRedirect 

ExecutionAfterRedirect: Execution After Redirect (EAR) 

Medium 

Potential Infinite Loop 

OPT.PYTHON.SECURITY.PotentialInfiniteLoop 

PotentialInfiniteLoop: Loop with Unreachable Exit Condition ('Infinite Loop') 

Medium 

Unchecked Input In Loop Condition 

OPT.PYTHON.SECURITY.UncheckedInputInLoopCondition 

UncheckedInputInLoopCondition: Unchecked input in loop condition 

Medium 

Hardcoded Auth Data 

OPT.PYTHON.SECURITY.HardcodedAuthData 

HardcodedAuthData: Use of Hard-coded Credentials 

Medium 

Information Exposure Through Error Message 

OPT.PYTHON.SECURITY.InformationExposureThroughErrorMessage 

InformationExposureThroughErrorMessage: Avoid sensitive information exposure through error messages 

Medium 

Password In Configuration File 

OPT.PYTHON.SECURITY.PasswordInConfigurationFile 

PasswordInConfigurationFile: Use of credentials into configuration file 

Medium 

Insecure Randomness 

OPT.PYTHON.SECURITY.InsecureRandomness 

InsecureRandomness: Standard pseudo-random number generators cannot withstand cryptographic attacks