GitLab Advanced SAST rules: Python

  • Tier: Ultimate
  • Offering: GitLab.com, GitLab Self-Managed, GitLab Dedicated

Rules used by GitLab Advanced SAST to detect vulnerabilities in Python code.

Rule IDRule descriptionCWEOWASP Top 10
python-dill-deserialization-usage-taintDeserialization of untrusted dataCWE-502A8:2017, A08:2021
python-django-sqli-raw-taintImproper neutralization of special elements used in an SQL Command (‘SQL Injection’)CWE-89A1:2017, A03:2021
python-django-sqli-rawsql-extra-taintImproper neutralization of special elements used in an SQL Command (‘SQL Injection’)CWE-89A1:2017, A03:2021
python-django-ssti-context-taintImproper neutralization of special elements used in a template engineCWE-1336A1:2017, A03:2021
python-django-xss-httpresponse-taintImproper neutralization of input during web page generation (‘Cross-site Scripting’)CWE-79A1:2017, A03:2021
python-django-xss-mark-safe-atomicImproper neutralization of input during web page generation (‘Cross-site Scripting’)CWE-79A7:2017, A03:2021
python-flask-misconfiguration-app-debug-atomicActive debug codeCWE-489A6:2017, A05:2021
python-flask-misconfiguration-cors-credentials-allowed-atomicPermissive cross-domain policy with untrusted domainsCWE-942A6:2017, A05:2021
python-flask-misconfiguration-cors-credentials-dynamic-origin-taintPermissive cross-domain policy with untrusted domainsCWE-942A6:2017, A05:2021
python-flask-misconfiguration-cors-wildcard-atomicPermissive cross-domain policy with untrusted domainsCWE-942A6:2017, A05:2021
python-flask-misconfiguration-httponly-false-atomicSensitive cookie without ‘HttpOnly’ flagCWE-1004A6:2017, A05:2021
python-flask-misconfiguration-samesite-none-atomicSensitive cookie with improper SameSite attributeCWE-1275A6:2017, A05:2021
python-flask-openredirect-taintURL redirection to untrusted site (‘Open Redirect’)CWE-601A01:2021, A5:2017
python-flask-ssrf-host-header-injection-taintServer-Side Request Forgery (SSRF)CWE-918A1:2017, A10:2021
python-flask-ssti-rendertemplatestring-taintImproper neutralization of special elements used in a template engineCWE-1336A1:2017, A03:2021
python-flask-xss-markup-taintImproper neutralization of input during web page generation (‘Cross-site Scripting’)CWE-79A1:2017, A03:2021
python-graphene-dos-graphiql-no-depth-limit-atomicAllocation of resources without limits or throttlingCWE-770A6:2017, A05:2021
python-httpserver-crlfi-taintImproper neutralization of CRLF sequences in HTTP headers (‘HTTP Request/Response Splitting’)CWE-113A1:2017, A03:2021
python-jinja2-xss-autoescape-false-atomicImproper encoding or escaping of outputCWE-116A7:2017, A03:2021
python-jsonpickle-deserialization-decode-taintDeserialization of untrusted dataCWE-502A8:2017, A08:2021
python-lang-accesscontrol-hardcoded-tmp-atomicInsecure temporary fileCWE-377A5:2017, A01:2021
python-lang-accesscontrol-httpbasicauth-atomicWeak authenticationCWE-1390A5:2017, A01:2021
python-lang-cmdi-asyncio-taintImproper neutralization of special elements used in an OS Command (‘OS Command Injection’)CWE-78A1:2017, A03:2021
python-lang-cmdi-code-run-taintImproper neutralization of special elements used in an OS Command (‘OS Command Injection’)CWE-78A1:2017, A03:2021
python-lang-cmdi-eval-taintImproper neutralization of directives in dynamically evaluated code (‘Eval Injection’)CWE-95A1:2017, A03:2021
python-lang-cmdi-globals-taintImproper neutralization of special elements used in an OS Command (‘OS Command Injection’)CWE-78A1:2017, A03:2021
python-lang-cmdi-linux-wildcard-atomicImproper neutralization of wildcards or matching symbolsCWE-155A1:2017, A03:2021
python-lang-cmdi-os-exec-taintImproper neutralization of special elements used in an OS Command (‘OS Command Injection’)CWE-78A1:2017, A03:2021
python-lang-cmdi-paramiko-calls-taintImproper neutralization of special elements used in an OS Command (‘OS Command Injection’)CWE-78A1:2017, A03:2021
python-lang-cmdi-spawn-process-taintImproper neutralization of special elements used in an OS Command (‘OS Command Injection’)CWE-78A1:2017, A03:2021
python-lang-cmdi-subinterpreters-taintImproper neutralization of special elements used in an OS Command (‘OS Command Injection’)CWE-78A1:2017, A03:2021
python-lang-cmdi-subprocess-taintImproper neutralization of special elements used in an OS Command (‘OS Command Injection’)CWE-78A1:2017, A03:2021
python-lang-cmdi-system-call-taintImproper neutralization of special elements used in an OS Command (‘OS Command Injection’)CWE-78A1:2017, A03:2021
python-lang-codei-exec-used-taintImproper control of generation of code (‘Code Injection’)CWE-94A1:2017, A03:2021
python-lang-crypto-cipher-blowfish-atomicUse of a broken or risky cryptographic algorithmCWE-327A3:2017, A02:2021
python-lang-crypto-cipher-des-atomicUse of a broken or risky cryptographic algorithmCWE-327A3:2017, A02:2021
python-lang-crypto-ftplib-atomicCleartext transmission of sensitive informationCWE-319A3:2017, A02:2021
python-lang-crypto-hash-md4-atomicUse of a broken or risky cryptographic algorithmCWE-327A3:2017, A02:2021
python-lang-crypto-hash-md5-atomicUse of a broken or risky cryptographic algorithmCWE-327A3:2017, A02:2021
python-lang-crypto-hash-sha1-atomicUse of a broken or risky cryptographic algorithmCWE-327A3:2017, A02:2021
python-lang-crypto-hash-xor-atomicUse of a broken or risky cryptographic algorithmCWE-327A3:2017, A02:2021
python-lang-crypto-hazmat-cipher-blowfish-atomicUse of a broken or risky cryptographic algorithmCWE-327A3:2017, A02:2021
python-lang-crypto-hazmat-cipher-idea-atomicUse of a Broken or Risky Cryptographic AlgorithmCWE-327A3:2017, A02:2021
python-lang-crypto-hazmat-cipher-insecure-algo-atomicUse of a broken or risky cryptographic algorithmCWE-327A3:2017, A02:2021
python-lang-crypto-hazmat-encrypt-ec-size-atomicInadequate encryption strengthCWE-326A3:2017, A02:2021
python-lang-crypto-hazmat-hash-md5-atomicUse of a broken or risky cryptographic algorithmCWE-327A3:2017, A02:2021
python-lang-crypto-hazmat-hash-sha1-atomicUse of a broken or risky cryptographic algorithmCWE-327A3:2017, A02:2021
python-lang-crypto-hazmat-modes-ecb-atomicUse of a broken or risky cryptographic algorithmCWE-327A3:2017, A02:2021
python-lang-crypto-httpconnectionpool-atomicCleartext transmission of sensitive informationCWE-319A3:2017, A02:2021
python-lang-crypto-import-telnetlib-atomicCleartext transmission of sensitive informationCWE-319A3:2017, A02:2021
python-lang-crypto-insecure-random-atomicUse of cryptographically weak pseudo-random number generator (PRNG)CWE-338A3:2017, A02:2021
python-lang-crypto-jwt-none-alg-atomicUse of a Broken or Risky Cryptographic AlgorithmCWE-327A3:2017, A02:2021
python-lang-crypto-pycrypto-import-atomicUse of unmaintained third party componentsCWE-1104A9:2017, A02:2021
python-lang-crypto-request-certification-verify-atomicImproper certificate validationCWE-295A2:2017, A07:2021
python-lang-crypto-ssl-bad-version-atomicInadequate Encryption StrengthCWE-326A3:2017, A02:2021
python-lang-crypto-ssl-unverified-context-atomicImproper certificate validationCWE-295A2:2017, A07:2021
python-lang-crypto-weak-algo-atomicUse of a broken or risky cryptographic algorithmCWE-327A3:2017, A02:2021
python-lang-crypto-weak-cipher-suites-taintUse of a broken or risky cryptographic algorithmCWE-327A3:2017, A02:2021
python-lang-crypto-weak-key-atomicInadequate encryption strengthCWE-326A3:2017, A02:2021
python-lang-dos-loop-taintUnchecked input for loop conditionCWE-606A6:2017, A05:2021
python-lang-dos-redos-taintInefficient regular expression complexityCWE-1333A1:2017, A03:2021
python-lang-ldapi-taintImproper neutralization of special elements used in an LDAP query (‘LDAP Injection’)CWE-90A1:2017, A03:2021
python-lang-marshal-deserialization-taintDeserialization of untrusted dataCWE-502A8:2017, A08:2021
python-lang-misconfiguration-bad-permission-atomicIncorrect permission assignment for critical resourceCWE-732A5:2017, A01:2021
python-lang-misconfiguration-bind-all-interfaces-atomicBinding to an unrestricted IP addressCWE-1327A6:2017, A05:2021
python-lang-misconfiguration-config-logging-insecure-listen-atomicImproper control of generation of code (‘Code Injection’)CWE-94A1:2017, A03:2021
python-lang-misconfiguration-graphiql-interface-enabled-atomicExposure of sensitive system information to an unauthorized control sphereCWE-497A6:2017, A05:2021
python-lang-misconfiguration-ssh-nohost-key-verification-atomicKey exchange without entity authenticationCWE-322A5:2017, A07:2021
python-lang-misconfiguration-tempfile-mktemp-used-atomicInsecure temporary fileCWE-377A3:2017, A01:2021
python-lang-misconfiguration-without-timeout-atomicAllocation of resources without limits or throttlingCWE-770A6:2017, A05:2021
python-lang-pathtraversal-file-low-taintImproper limitation of a pathname to a restricted directory (‘Path Traversal’)CWE-22A5:2017, A01:2021
python-lang-pathtraversal-file-taintImproper limitation of a pathname to a restricted directory (‘Path Traversal’)CWE-22A5:2017, A01:2021
python-lang-pathtraversal-tarfile-taintImproper limitation of a pathname to a restricted directory (‘Path Traversal’)CWE-22A5:2017, A01:2021
python-lang-pathtraversal-urllib-taintRelative path traversalCWE-23A5:2017, A01:2021
python-lang-pickle-deserialization-taintDeserialization of untrusted dataCWE-502A8:2017, A08:2021
python-lang-sqli-aiopg-taintImproper neutralization of special elements used in an SQL Command (‘SQL Injection’)CWE-89A1:2017, A03:2021
python-lang-sqli-asyncpg-taintImproper neutralization of special elements used in an SQL Command (‘SQL Injection’)CWE-89A1:2017, A03:2021
python-lang-sqli-hardcoded-sql-expression-taintImproper neutralization of special elements used in an SQL Command (‘SQL Injection’)CWE-89A1:2017, A03:2021
python-lang-sqli-pg8000-taintImproper neutralization of special elements used in an SQL Command (‘SQL Injection’)CWE-89A1:2017, A03:2021
python-lang-sqli-psycopg-taintImproper neutralization of special elements used in an SQL command (‘SQL Injection’)CWE-89A1:2017, A03:2021
python-lang-ssrf-aiohttp-taintServer-side request forgery (SSRF)CWE-918A1:2017, A10:2021
python-lang-ssrf-ftplib-smtplib-taintServer-side request forgery (SSRF)CWE-918A1:2017, A10:2021
python-lang-ssrf-httpx-taintServer-side request forgery (SSRF)CWE-918A1:2017, A10:2021
python-lang-ssrf-requests-taintServer-side request forgery (SSRF)CWE-918A1:2017, A10:2021
python-lang-ssrf-socket-taintServer-side request forgery (SSRF)CWE-918A1:2017, A10:2021
python-lang-xpathi-taintImproper neutralization of data within XPath expressions (XPath Injection)CWE-643A1:2017, A03:2021
python-lang-xxe-xml-expatbuilder-taintImproper restriction of XML external entity reference (‘XXE’)CWE-611A4:2017, A03:2021
python-lang-xxe-xml-expatreader-taintImproper restriction of XML external entity reference (‘XXE’)CWE-611A4:2017, A03:2021
python-lang-xxe-xml-minidom-taintImproper restriction of XML external entity reference (‘XXE’)CWE-611A4:2017, A03:2021
python-lang-xxe-xml-pulldom-taintImproper restriction of XML external entity reference (‘XXE’)CWE-611A4:2017, A03:2021
python-lang-xxe-xml-sax-taintImproper restriction of XML external entity reference (‘XXE’)CWE-611A4:2017, A03:2021
python-lang-xxe-xml-taintImproper restriction of XML external entity reference (‘XXE’)CWE-611A4:2017, A03:2021
python-mako-xss-template-atomicImproper neutralization of input during web page generation (‘Cross-site Scripting’)CWE-79A7:2017, A03:2021
python-mako-xss-template-taintImproper neutralization of input during web page generation (‘Cross-site Scripting’)CWE-79A7:2017, A03:2021
python-pyjwt-crypto-jwt-signature-verification-disabled-atomicImproper verification of cryptographic signatureCWE-347A3:2017, A02:2021
python-pyramid-csrf-origin-check-atomicCross-site request forgery (CSRF)CWE-352A5:2017, A01:2021
python-pysnmp-crypto-insecure-version-atomicCleartext transmission of sensitive informationCWE-319A3:2017, A02:2021
python-pysnmp-crypto-weak-cryptography-atomicCleartext transmission of sensitive informationCWE-319A3:2017, A02:2021
python-pyyaml-deserialization-load-taintDeserialization of untrusted dataCWE-502A8:2017, A08:2021
python-ruamel-deserialization-yaml-taintDeserialization of untrusted dataCWE-502A8:2017, A08:2021
python-shelve-deserialization-usage-taintDeserialization of untrusted dataCWE-502A8:2017, A08:2021
python-sqlalchemy-sqli-execute-taintImproper neutralization of special elements used in an SQL command (‘SQL Injection’)CWE-89A1:2017, A03:2021
python-sqlalchemy-sqli-raw-functions-taintImproper neutralization of special elements used in an SQL command (‘SQL Injection’)CWE-89A1:2017, A03:2021
python-webserver-asyncio-ssrf-taintServer-side request forgery (SSRF)CWE-918A1:2017, A10:2021
python-webserver-http-httplib-client-ssrf-taintServer-side request forgery (SSRF)CWE-918A1:2017, A10:2021
python-webserver-paramiko-ssrf-taintServer-side request forgery (SSRF)CWE-918A1:2017, A10:2021
python-webserver-pycurl-ssrf-taintServer-side request forgery (SSRF)CWE-918A1:2017, A10:2021
python-webserver-urllib3-ssrf-taintServer-side request forgery (SSRF)CWE-918A1:2017, A10:2021