Repository Analysis

pyca/cryptography

cryptography is a package designed to expose cryptographic primitives and recipes to Python developers.

16.3 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of pyca/cryptography, a Python project with 7,731 GitHub stars. SynthScan v2.0 examined 310,654 lines of code across 601 source files, recording 3730 pattern matches distributed across 13 syntactic categories. The overall adjusted score of 16.3 places this repository in the Moderate AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

16.3
Adjusted Score
16.3
Raw Score
100%
Time Factor
2026-08-28
Last Push
7.7K
Stars
Python
Language
310.7K
Lines of Code
601
Files
3.7K
Pattern Hits
2026-08-29
Scan Date
0.01
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 8MEDIUM 1476LOW 2246

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 3730 distinct pattern matches across 13 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Decorative Section Separators1240 hits · 2508 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_utils.py718 # =============================================STRING
MEDIUMtests/test_utils.py721 # -----------------------------------STRING
MEDIUMtests/test_utils.py725 # ----------STRING
MEDIUMtests/test_utils.py576 # -----------------------------------STRING
MEDIUMtests/test_utils.py580 # ----------STRING
MEDIUMtests/test_utils.py597 # -----------STRING
MEDIUMtests/test_utils.py659 # -------------------------------------------------------STRING
MEDIUMtests/test_utils.py662 # -----------------STRING
MEDIUMtests/test_utils.py694 # -----------------STRING
MEDIUMtests/test_utils.py745 # -----------STRING
MEDIUMtests/test_utils.py820 # -----------------STRING
MEDIUMtests/test_utils.py840 # =============================================STRING
MEDIUMtests/test_utils.py1049 # -----------------------------------STRING
MEDIUMtests/test_utils.py1053 # ----------STRING
MEDIUMtests/test_utils.py1069 # -----------STRING
MEDIUMtests/test_utils.py1125 # -----------------------------------------------------------STRING
MEDIUMtests/test_utils.py1128 # ------------------STRING
MEDIUMtests/test_utils.py1149 # ------------------STRING
MEDIUMtests/test_utils.py1169 # =============================================STRING
MEDIUMtests/bench/test_x509.py50# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/bench/test_x509.py53# ---------------------------------------------------------------------------COMMENT
MEDIUM…raphy_vectors/asymmetric/RSA/pkcs1v15crypt-vectors.txt636# =============================================COMMENT
MEDIUM…raphy_vectors/asymmetric/RSA/pkcs1v15crypt-vectors.txt639# ---------------------------------------------------COMMENT
MEDIUM…raphy_vectors/asymmetric/RSA/pkcs1v15crypt-vectors.txt643# ----------COMMENT
MEDIUM…raphy_vectors/asymmetric/RSA/pkcs1v15crypt-vectors.txt1230# =============================================COMMENT
MEDIUM…raphy_vectors/asymmetric/RSA/pkcs1v15crypt-vectors.txt1233# ---------------------------------------------------COMMENT
MEDIUM…raphy_vectors/asymmetric/RSA/pkcs1v15crypt-vectors.txt1237# ----------COMMENT
MEDIUM…raphy_vectors/asymmetric/RSA/pkcs1v15crypt-vectors.txt1822# =============================================COMMENT
MEDIUM…raphy_vectors/asymmetric/RSA/pkcs1v15crypt-vectors.txt1825# ---------------------------------------------------COMMENT
MEDIUM…raphy_vectors/asymmetric/RSA/pkcs1v15crypt-vectors.txt1829# ----------COMMENT
MEDIUM…raphy_vectors/asymmetric/RSA/pkcs1v15crypt-vectors.txt2419# =============================================COMMENT
MEDIUM…raphy_vectors/asymmetric/RSA/pkcs1v15crypt-vectors.txt2422# ---------------------------------------------------COMMENT
MEDIUM…raphy_vectors/asymmetric/RSA/pkcs1v15crypt-vectors.txt2426# ----------COMMENT
MEDIUM…raphy_vectors/asymmetric/RSA/pkcs1v15crypt-vectors.txt3016# =============================================COMMENT
MEDIUM…raphy_vectors/asymmetric/RSA/pkcs1v15crypt-vectors.txt3019# ---------------------------------------------------COMMENT
MEDIUM…raphy_vectors/asymmetric/RSA/pkcs1v15crypt-vectors.txt3023# ----------COMMENT
MEDIUM…raphy_vectors/asymmetric/RSA/pkcs1v15crypt-vectors.txt3610# =============================================COMMENT
MEDIUM…raphy_vectors/asymmetric/RSA/pkcs1v15crypt-vectors.txt3613# ---------------------------------------------------COMMENT
MEDIUM…raphy_vectors/asymmetric/RSA/pkcs1v15crypt-vectors.txt3617# ----------COMMENT
MEDIUM…raphy_vectors/asymmetric/RSA/pkcs1v15crypt-vectors.txt4232# =============================================COMMENT
MEDIUM…raphy_vectors/asymmetric/RSA/pkcs1v15crypt-vectors.txt4235# ---------------------------------------------------COMMENT
MEDIUM…raphy_vectors/asymmetric/RSA/pkcs1v15crypt-vectors.txt4239# ----------COMMENT
MEDIUM…raphy_vectors/asymmetric/RSA/pkcs1v15crypt-vectors.txt4856# =============================================COMMENT
MEDIUM…raphy_vectors/asymmetric/RSA/pkcs1v15crypt-vectors.txt4859# ---------------------------------------------------COMMENT
MEDIUM…raphy_vectors/asymmetric/RSA/pkcs1v15crypt-vectors.txt4863# ----------COMMENT
MEDIUM…raphy_vectors/asymmetric/RSA/pkcs1v15crypt-vectors.txt5480# =============================================COMMENT
MEDIUM…raphy_vectors/asymmetric/RSA/pkcs1v15crypt-vectors.txt5483# ---------------------------------------------------COMMENT
MEDIUM…raphy_vectors/asymmetric/RSA/pkcs1v15crypt-vectors.txt5487# ----------COMMENT
MEDIUM…raphy_vectors/asymmetric/RSA/pkcs1v15crypt-vectors.txt6101# =============================================COMMENT
MEDIUM…raphy_vectors/asymmetric/RSA/pkcs1v15crypt-vectors.txt6104# ---------------------------------------------------COMMENT
MEDIUM…raphy_vectors/asymmetric/RSA/pkcs1v15crypt-vectors.txt6108# ----------COMMENT
MEDIUM…raphy_vectors/asymmetric/RSA/pkcs1v15crypt-vectors.txt6721# =============================================COMMENT
MEDIUM…raphy_vectors/asymmetric/RSA/pkcs1v15crypt-vectors.txt6724# ---------------------------------------------------COMMENT
MEDIUM…raphy_vectors/asymmetric/RSA/pkcs1v15crypt-vectors.txt6728# ----------COMMENT
MEDIUM…raphy_vectors/asymmetric/RSA/pkcs1v15crypt-vectors.txt7344# =============================================COMMENT
MEDIUM…raphy_vectors/asymmetric/RSA/pkcs1v15crypt-vectors.txt7347# ---------------------------------------------------COMMENT
MEDIUM…raphy_vectors/asymmetric/RSA/pkcs1v15crypt-vectors.txt7351# ----------COMMENT
MEDIUM…raphy_vectors/asymmetric/RSA/pkcs1v15crypt-vectors.txt7970# =============================================COMMENT
MEDIUM…raphy_vectors/asymmetric/RSA/pkcs1v15crypt-vectors.txt7973# ---------------------------------------------------COMMENT
MEDIUM…raphy_vectors/asymmetric/RSA/pkcs1v15crypt-vectors.txt7977# ----------COMMENT
1180 more matches not shown…
Hyper-Verbose Identifiers1196 hits · 992 pts
SeverityFileLineSnippetContext
LOWtests/test_utils.py4428def test_raises_unsupported_algorithm_wrong_type():CODE
LOWtests/test_utils.py4438def test_raises_unsupported_algorithm_wrong_reason():CODE
LOWtests/test_utils.py4447def test_raises_unsupported_no_exc():CODE
LOWtests/test_utils.py4454def test_raises_unsupported_algorithm():CODE
LOWtests/test_utils.py42def test_int_to_bytes_rejects_zero_length():CODE
LOWtests/test_utils.py49def test_check_backend_support_skip():CODE
LOWtests/test_utils.py60def test_check_backend_support_no_skip():CODE
LOWtests/test_utils.py137def test_load_nist_vectors_with_null_chars():CODE
LOWtests/test_utils.py246def test_load_cryptrec_vectors():CODE
LOWtests/test_utils.py288def test_load_cryptrec_vectors_invalid():CODE
LOWtests/test_utils.py356def test_load_hash_vectors_bad_data():CODE
LOWtests/test_utils.py370def test_load_vectors_from_file():CODE
LOWtests/test_utils.py389def test_load_nist_gcm_vectors():CODE
LOWtests/test_utils.py1385def test_load_rsa_nist_vectors():CODE
LOWtests/test_utils.py1558def test_load_rsa_nist_pss_verification_vectors():CODE
LOWtests/test_utils.py1624def test_load_fips_dsa_key_pair_vectors():CODE
LOWtests/test_utils.py2035def test_load_fips_dsa_sig_ver_vectors():CODE
LOWtests/test_utils.py2361def test_load_fips_dsa_sig_gen_vectors():CODE
LOWtests/test_utils.py2657def test_load_fips_ecdsa_key_pair_vectors():CODE
LOWtests/test_utils.py2805def test_load_fips_ecdsa_signing_vectors():CODE
LOWtests/test_utils.py2998def test_load_kasvs_dh_vectors():CODE
LOWtests/test_utils.py3495def test_load_kasvs_ecdh_vectors_empty_vector_data():CODE
LOWtests/test_utils.py3499def test_load_kasvs_ecdh_vectors():CODE
LOWtests/test_utils.py3928def test_load_kasvs_ecdh_kdf_vectors():CODE
LOWtests/test_utils.py4236def test_load_nist_ccm_vectors_dvpt():CODE
LOWtests/test_utils.py4332def test_load_nist_ccm_vectors_vadt():CODE
LOWtests/test_utils.py4472 def test_inspect_deprecated_module(self):CODE
LOWtests/test_warnings.py47 def test_deleting_deprecated_members(self, monkeypatch):CODE
LOWtests/test_doubles.py26 def test_public_bytes_raw_not_implemented(self):CODE
LOWtests/test_doubles.py31 def test_verify_not_implemented(self):CODE
LOWtests/test_doubles.py41 def test_copy_not_implemented(self):CODE
LOWtests/test_doubles.py46 def test_deepcopy_not_implemented(self):CODE
LOWtests/test_doubles.py58 def test_key_size_not_implemented(self):CODE
LOWtests/test_doubles.py63 def test_public_key_not_implemented(self):CODE
LOWtests/test_doubles.py68 def test_sign_not_implemented(self):CODE
LOWtests/test_doubles.py73 def test_private_numbers_not_implemented(self):CODE
LOWtests/test_doubles.py78 def test_private_bytes_not_implemented(self):CODE
LOWtests/test_doubles.py87 def test_copy_not_implemented(self):CODE
LOWtests/test_doubles.py92 def test_deepcopy_not_implemented(self):CODE
LOWtests/test_cobblestone.py110 def test_update_with_empty_data_emits_header(self, variant):CODE
LOWtests/test_cobblestone.py120 def test_exact_chunk_boundary_has_empty_final_chunk(self, variant):CODE
LOWtests/test_cobblestone.py129 def test_decrypter_streams_plaintext_incrementally(self, variant):CODE
LOWtests/test_cobblestone.py182 def test_swapped_chunks_detected(self, variant):CODE
LOWtests/test_cobblestone.py234 def test_ciphertexts_are_randomized(self, variant):CODE
LOWtests/test_cobblestone.py259 def test_update_into_accepts_larger_buffer(self, variant):CODE
LOWtests/test_cobblestone.py269 def test_update_into_buffer_too_small(self, variant):CODE
LOWtests/test_cobblestone.py286 def test_update_into_zero_output(self, variant):CODE
LOWtests/test_cobblestone.py314 def test_decryptor_unusable_after_invalid_tag(self, variant):CODE
LOWtests/test_cobblestone.py330 def test_decryptor_update_into_unusable_after_invalid_tag(self, variant):CODE
LOWtests/test_cobblestone.py349 def test_finalize_only_decryptor_rejects_empty_stream(self, variant):CODE
LOWtests/test_cobblestone.py401 def test_cross_variant_key_sizes_rejected(self):CODE
LOWtests/test_fernet.py115 def test_timestamp_ignored_no_ttl(self, monkeypatch):CODE
LOWtests/test_fernet.py122 def test_ttl_required_in_decrypt_at_time(self):CODE
LOWtests/test_fernet.py209 def test_non_iterable_argument(self):CODE
LOWtests/test_fernet.py252 def test_rotate_preserves_timestamp(self):CODE
LOWtests/test_fernet.py270 def test_rotate_decrypt_no_shared_keys(self):CODE
LOWtests/test_fernet.py280 def test_extract_timestamp_first_fernet_valid_token(self):CODE
LOWtests/test_fernet.py287 def test_extract_timestamp_second_fernet_valid_token(self):CODE
LOWtests/test_fernet.py295 def test_extract_timestamp_no_valid_signature(self):CODE
LOWtests/test_fernet.py303 def test_extract_timestamp_invalid_token(self):CODE
1136 more matches not shown…
Self-Referential Comments236 hits · 706 pts
SeverityFileLineSnippetContext
MEDIUMrelease.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMnoxfile.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/test_utils.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/conftest.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/test_warnings.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/test_doubles.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/test_cobblestone.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/doubles.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/__init__.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/test_fernet.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/utils.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/test_meta.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/test_cryptography_utils.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/deprecated_module.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/bench/test_x509.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/bench/test_aead.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/bench/__init__.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/bench/test_hashes.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/bench/test_fernet.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/bench/test_hkdf.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/bench/test_ec_load.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/bench/test_hmac.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/hazmat/test_oid.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/hazmat/__init__.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/hazmat/asn1/__init__.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/hazmat/asn1/test_api.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/hazmat/asn1/test_serialization.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/hazmat/backends/test_openssl.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/hazmat/backends/__init__.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/hazmat/primitives/test_ec.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/hazmat/primitives/test_aead.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/hazmat/primitives/test_hkdf_vectors.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/hazmat/primitives/test_aes.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/hazmat/primitives/test_xofhash.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/hazmat/primitives/test_rsa.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/hazmat/primitives/test_ciphers.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/hazmat/primitives/test_hmac_vectors.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/hazmat/primitives/test_pkcs7.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/hazmat/primitives/test_pkcs7.py1428 # Create a plain emailSTRING
MEDIUMtests/hazmat/primitives/test_pkcs7.py1413 # Create a signed emailSTRING
MEDIUMtests/hazmat/primitives/test_aes_gcm.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/hazmat/primitives/test_hash_vectors.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/hazmat/primitives/fixtures_dsa.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/hazmat/primitives/test_sm4.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/hazmat/primitives/test_x448.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/hazmat/primitives/test_block.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/hazmat/primitives/test_kbkdf.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/hazmat/primitives/test_ed448.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/hazmat/primitives/test_concatkdf.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/hazmat/primitives/test_x25519.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/hazmat/primitives/__init__.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/hazmat/primitives/test_cmac.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/hazmat/primitives/test_hashes.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/hazmat/primitives/test_hpke.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/hazmat/primitives/test_dh.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/hazmat/primitives/test_kbkdf_vectors.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/hazmat/primitives/test_keywrap.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/hazmat/primitives/test_ed25519.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/hazmat/primitives/test_ssh.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
MEDIUMtests/hazmat/primitives/test_mlkem.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
176 more matches not shown…
Over-Commented Block685 hits · 493 pts
SeverityFileLineSnippetContext
LOWci-constraints-requirements.txt1# This file was autogenerated by uv via the following command:COMMENT
LOWci-constraints-requirements.txt21build==1.6.0 ; python_full_version >= '3.10'COMMENT
LOWci-constraints-requirements.txt41 # colorlogCOMMENT
LOWci-constraints-requirements.txt61 # readme-rendererCOMMENT
LOWci-constraints-requirements.txt81 # via requestsCOMMENT
LOWci-constraints-requirements.txt101markupsafe==3.0.3COMMENT
LOWci-constraints-requirements.txt121 # sphinxCOMMENT
LOWci-constraints-requirements.txt141 # via pytest-benchmarkCOMMENT
LOWci-constraints-requirements.txt161 # viaCOMMENT
LOWci-constraints-requirements.txt181 # noxCOMMENT
LOWci-constraints-requirements.txt201 # cryptography (pyproject.toml:dev)COMMENT
LOWci-constraints-requirements.txt221 # viaCOMMENT
LOWci-constraints-requirements.txt241sphinxcontrib-qthelp==2.0.0COMMENT
LOWci-constraints-requirements.txt261 # cryptography (pyproject.toml)COMMENT
LOWci-constraints-requirements.txt281# cryptography-vectorsCOMMENT
LOWtests/__init__.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
LOWtests/bench/__init__.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
LOWtests/hazmat/__init__.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
LOWtests/hazmat/asn1/__init__.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
LOWtests/hazmat/backends/__init__.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
LOWtests/hazmat/primitives/__init__.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
LOWtests/hazmat/primitives/decrepit/__init__.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
LOWtests/hazmat/primitives/twofactor/__init__.py1# This file is dual licensed under the terms of the Apache License, VersionCOMMENT
LOWtests/x509/verification/test_limbo.py21 VerificationError,COMMENT
LOWtests/x509/verification/test_limbo.py41 # incompatible ways. Our validator always tries (by default) to complyCOMMENT
LOWtests/x509/verification/test_limbo.py61 # We allow CAs that don't have AKIs, which is forbidden underCOMMENT
LOW…ctors/cryptography_vectors/ciphers/Blowfish/bf-ecb.txt181# CIPHERTEXT = F9AD597C49DB005ECOMMENT
LOW…ors/asymmetric/ECDSA/RFC6979/evppkey_ecdsa_rfc6979.txt1#COMMENT
LOW…tors/asymmetric/RSA/oaep-custom/oaep-sha256-sha256.txt1# RSA OAEP SHA2 vectors built for https://github.com/pyca/cryptographyCOMMENT
LOW…tors/asymmetric/RSA/oaep-custom/oaep-sha256-sha256.txt21# Prime 2:COMMENT
LOW…tors/asymmetric/RSA/oaep-custom/oaep-sha256-sha256.txt41d94ae0832e6445ce42331cb06d531a82b1db4baad30f746dc916df24d4e3c2451fff59a6423eb0e1d02d4fe646cf699dfd818c6e97b051COMMENT
LOW…tors/asymmetric/RSA/oaep-custom/oaep-sha256-sha256.txt61# Public keyCOMMENT
LOW…tors/asymmetric/RSA/oaep-custom/oaep-sha256-sha256.txt81# Coefficient:COMMENT
LOW…tors/asymmetric/RSA/oaep-custom/oaep-sha256-sha256.txt101# Encryption:COMMENT
LOW…tors/asymmetric/RSA/oaep-custom/oaep-sha256-sha256.txt121# Modulus:COMMENT
LOW…tors/asymmetric/RSA/oaep-custom/oaep-sha256-sha256.txt141a3dae60f0fa379c43d19aa60d09b3fbda68859a7ba4cb5ec891812cfeff512820da76e2818082e5c3a6c7507d536430e145039e87c3739b211453402COMMENT
LOW…tors/asymmetric/RSA/oaep-custom/oaep-sha256-sha256.txt1615e0c62e6e1b1d7e3e52e58d48b8aa44208882fa8e8a80bfb543299bcbbe6d0a478e460c17ac567e92b0771b4394aa8729bf1ca359eac3fa9b36d65e7COMMENT
LOW…tors/asymmetric/RSA/oaep-custom/oaep-sha256-sha256.txt181# Prime 1:COMMENT
LOW…tors/asymmetric/RSA/oaep-custom/oaep-sha256-sha256.txt201# OAEP Example 3 alg=sha256 mgf1=sha256COMMENT
LOW…tors/asymmetric/RSA/oaep-custom/oaep-sha256-sha256.txt221# =============================================COMMENT
LOW…tors/asymmetric/RSA/oaep-custom/oaep-sha256-sha256.txt241# Prime exponent 2:COMMENT
LOW…tors/asymmetric/RSA/oaep-custom/oaep-sha256-sha256.txt261# Message:COMMENT
LOW…tors/asymmetric/RSA/oaep-custom/oaep-sha256-sha256.txt28110001COMMENT
LOW…tors/asymmetric/RSA/oaep-custom/oaep-sha256-sha256.txt3014046ca8baa3347ca27f49e0d81f9cc1d71be9ba517d4COMMENT
LOW…tors/asymmetric/RSA/oaep-custom/oaep-sha256-sha256.txt32132488cb262d041d6e4dd35f987bf3ca696db1f06ac29a44693COMMENT
LOW…tors/asymmetric/RSA/oaep-custom/oaep-sha256-sha256.txt341# Exponent:COMMENT
LOW…tors/asymmetric/RSA/oaep-custom/oaep-sha256-sha256.txt361# Encryption:COMMENT
LOW…tors/asymmetric/RSA/oaep-custom/oaep-sha256-sha256.txt381# Encryption:COMMENT
LOW…tors/asymmetric/RSA/oaep-custom/oaep-sha256-sha256.txt401# Prime exponent 1:COMMENT
LOW…tors/asymmetric/RSA/oaep-custom/oaep-sha256-sha256.txt421879f5f34610bfadd07b5b7c0e3002006419ef49a34b71349573236e6742a88ba0b451db0c1fa3c224ff98543bc1395ca02f96b32d10f57c5b76e7425COMMENT
LOW…tors/asymmetric/RSA/oaep-custom/oaep-sha256-sha256.txt461# OAEP Example 1 alg=sha256 mgf1=sha256COMMENT
LOW…tors/asymmetric/RSA/oaep-custom/oaep-sha256-sha256.txt481# OAEP Example 5 alg=sha256 mgf1=sha256COMMENT
LOW…tors/asymmetric/RSA/oaep-custom/oaep-sha256-sha256.txt501# Public exponent:COMMENT
LOW…tors/asymmetric/RSA/oaep-custom/oaep-sha256-sha256.txt521# Message:COMMENT
LOW…ectors/asymmetric/RSA/oaep-custom/oaep-sha1-sha224.txt1# RSA OAEP SHA2 vectors built for https://github.com/pyca/cryptographyCOMMENT
LOW…ectors/asymmetric/RSA/oaep-custom/oaep-sha1-sha224.txt21# Prime 2:COMMENT
LOW…ectors/asymmetric/RSA/oaep-custom/oaep-sha1-sha224.txt41d94ae0832e6445ce42331cb06d531a82b1db4baad30f746dc916df24d4e3c2451fff59a6423eb0e1d02d4fe646cf699dfd818c6e97b051COMMENT
LOW…ectors/asymmetric/RSA/oaep-custom/oaep-sha1-sha224.txt61# Public keyCOMMENT
LOW…ectors/asymmetric/RSA/oaep-custom/oaep-sha1-sha224.txt81# Coefficient:COMMENT
LOW…ectors/asymmetric/RSA/oaep-custom/oaep-sha1-sha224.txt101# Encryption:COMMENT
625 more matches not shown…
Unused Imports273 hits · 235 pts
SeverityFileLineSnippetContext
LOWnoxfile.py5CODE
LOWtests/doubles.py5CODE
LOWtests/utils.py5CODE
LOWtests/hazmat/primitives/test_ciphers.py27CODE
LOWtests/hazmat/primitives/test_ciphers.py31CODE
LOWtests/hazmat/primitives/test_hpke.py5CODE
LOWtests/x509/verification/test_limbo.py5CODE
LOWtests/wycheproof/test_mldsa.py5CODE
LOWvectors/cryptography_vectors/__init__.py8CODE
LOWdocs/conf.py61CODE
LOWsrc/cryptography/cobblestone.py5CODE
LOWsrc/cryptography/__init__.py5CODE
LOWsrc/cryptography/__init__.py7CODE
LOWsrc/cryptography/__init__.py7CODE
LOWsrc/cryptography/__init__.py7CODE
LOWsrc/cryptography/utils.py5CODE
LOWsrc/cryptography/__about__.py5CODE
LOWsrc/cryptography/exceptions.py5CODE
LOWsrc/cryptography/fernet.py5CODE
LOWsrc/cryptography/hazmat/__init__.py5CODE
LOWsrc/cryptography/hazmat/_oid.py5CODE
LOWsrc/cryptography/hazmat/asn1/__init__.py5CODE
LOWsrc/cryptography/hazmat/asn1/__init__.py7CODE
LOWsrc/cryptography/hazmat/asn1/__init__.py7CODE
LOWsrc/cryptography/hazmat/asn1/__init__.py7CODE
LOWsrc/cryptography/hazmat/asn1/__init__.py7CODE
LOWsrc/cryptography/hazmat/asn1/__init__.py7CODE
LOWsrc/cryptography/hazmat/asn1/__init__.py7CODE
LOWsrc/cryptography/hazmat/asn1/__init__.py7CODE
LOWsrc/cryptography/hazmat/asn1/__init__.py7CODE
LOWsrc/cryptography/hazmat/asn1/__init__.py7CODE
LOWsrc/cryptography/hazmat/asn1/__init__.py7CODE
LOWsrc/cryptography/hazmat/asn1/__init__.py7CODE
LOWsrc/cryptography/hazmat/asn1/__init__.py7CODE
LOWsrc/cryptography/hazmat/asn1/__init__.py7CODE
LOWsrc/cryptography/hazmat/asn1/__init__.py7CODE
LOWsrc/cryptography/hazmat/asn1/__init__.py7CODE
LOWsrc/cryptography/hazmat/asn1/__init__.py7CODE
LOWsrc/cryptography/hazmat/asn1/__init__.py7CODE
LOWsrc/cryptography/hazmat/asn1/__init__.py7CODE
LOWsrc/cryptography/hazmat/asn1/asn1.py5CODE
LOWsrc/cryptography/hazmat/decrepit/__init__.py5CODE
LOWsrc/cryptography/hazmat/decrepit/ciphers/algorithms.py5CODE
LOWsrc/cryptography/hazmat/decrepit/ciphers/__init__.py5CODE
LOWsrc/cryptography/hazmat/decrepit/ciphers/modes.py5CODE
LOWsrc/cryptography/hazmat/backends/__init__.py5CODE
LOWsrc/cryptography/hazmat/backends/openssl/backend.py5CODE
LOWsrc/cryptography/hazmat/backends/openssl/__init__.py5CODE
LOWsrc/cryptography/hazmat/backends/openssl/__init__.py7CODE
LOWsrc/cryptography/hazmat/primitives/_modes.py5CODE
LOWsrc/cryptography/hazmat/primitives/_serialization.py5CODE
LOWsrc/cryptography/hazmat/primitives/_serialization.py10CODE
LOWsrc/cryptography/hazmat/primitives/_serialization.py11CODE
LOWsrc/cryptography/hazmat/primitives/_serialization.py15CODE
LOWsrc/cryptography/hazmat/primitives/hpke.py5CODE
LOWsrc/cryptography/hazmat/primitives/cmac.py5CODE
LOWsrc/cryptography/hazmat/primitives/_asymmetric.py5CODE
LOWsrc/cryptography/hazmat/primitives/__init__.py5CODE
LOWsrc/cryptography/hazmat/primitives/_cipheralgorithm.py5CODE
LOWsrc/cryptography/hazmat/primitives/poly1305.py5CODE
213 more matches not shown…
Cross-File Repetition8 hits · 40 pts
SeverityFileLineSnippetContext
HIGHsrc/cryptography/hazmat/primitives/asymmetric/x448.py0the raw bytes of the public key. equivalent to public_bytes(raw, raw).STRING
HIGH…c/cryptography/hazmat/primitives/asymmetric/ed25519.py0the raw bytes of the public key. equivalent to public_bytes(raw, raw).STRING
HIGHsrc/cryptography/hazmat/primitives/asymmetric/ed448.py0the raw bytes of the public key. equivalent to public_bytes(raw, raw).STRING
HIGHsrc/cryptography/hazmat/primitives/asymmetric/x25519.py0the raw bytes of the public key. equivalent to public_bytes(raw, raw).STRING
HIGHsrc/cryptography/hazmat/primitives/asymmetric/x448.py0the raw bytes of the private key. equivalent to private_bytes(raw, raw, noencryption()).STRING
HIGH…c/cryptography/hazmat/primitives/asymmetric/ed25519.py0the raw bytes of the private key. equivalent to private_bytes(raw, raw, noencryption()).STRING
HIGHsrc/cryptography/hazmat/primitives/asymmetric/ed448.py0the raw bytes of the private key. equivalent to private_bytes(raw, raw, noencryption()).STRING
HIGHsrc/cryptography/hazmat/primitives/asymmetric/x25519.py0the raw bytes of the private key. equivalent to private_bytes(raw, raw, noencryption()).STRING
Deep Nesting38 hits · 34 pts
SeverityFileLineSnippetContext
LOWtests/utils.py89CODE
LOWtests/utils.py117CODE
LOWtests/utils.py158CODE
LOWtests/utils.py283CODE
LOWtests/utils.py343CODE
LOWtests/utils.py384CODE
LOWtests/utils.py462CODE
LOWtests/utils.py503CODE
LOWtests/utils.py556CODE
LOWtests/utils.py611CODE
LOWtests/utils.py719CODE
LOWtests/utils.py771CODE
LOWtests/utils.py828CODE
LOWtests/hazmat/primitives/test_ec.py531CODE
LOWtests/hazmat/primitives/test_ec.py571CODE
LOWtests/hazmat/primitives/test_ec.py1518CODE
LOWtests/hazmat/primitives/test_aead.py145CODE
LOWtests/hazmat/primitives/test_aead.py331CODE
LOWtests/hazmat/primitives/test_aead.py578CODE
LOWtests/hazmat/primitives/test_hpke.py134CODE
LOWtests/hazmat/primitives/test_hpke.py199CODE
LOWtests/hazmat/primitives/test_hpke.py940CODE
LOWtests/hazmat/primitives/test_keywrap.py31CODE
LOWtests/hazmat/primitives/test_keywrap.py113CODE
LOWtests/hazmat/primitives/test_dsa.py467CODE
LOWtests/x509/test_ocsp.py1373CODE
LOWdocs/development/custom-vectors/seed/generate_seed.py17CODE
LOWdocs/development/custom-vectors/arc4/generate_arc4.py55CODE
LOWdocs/development/custom-vectors/idea/generate_idea.py17CODE
LOWdocs/development/custom-vectors/cast5/generate_cast5.py21CODE
LOW…ustom-vectors/aes-192-gcm-siv/generate_aes192gcmsiv.py44CODE
LOW.github/bin/bump_dependency.py16CODE
LOW.github/bin/merge_rust_coverage.py40CODE
LOW.github/bin/merge_rust_coverage.py59CODE
LOWsrc/cryptography/hazmat/asn1/asn1.py133CODE
LOWsrc/cryptography/hazmat/asn1/asn1.py168CODE
LOWsrc/cryptography/hazmat/primitives/serialization/ssh.py138CODE
LOWsrc/cryptography/hazmat/primitives/serialization/ssh.py986CODE
Modern Structural Boilerplate33 hits · 33 pts
SeverityFileLineSnippetContext
LOWtests/hazmat/backends/test_openssl.py28__all__ = ["rsa_key_2048"]CODE
LOWtests/hazmat/primitives/test_pkcs7.py37__all__ = ["rsa_key_2048"]CODE
LOWtests/hazmat/primitives/test_ssh.py50__all__ = ["rsa_key_2048"]CODE
LOWtests/hazmat/primitives/test_serialization.py51__all__ = ["rsa_key_2048"]CODE
LOWtests/x509/test_x509_ext.py46__all__ = ["rsa_key_2048"]CODE
LOWtests/x509/test_x509.py66__all__ = ["rsa_key_512", "rsa_key_2048"]CODE
LOWtests/x509/test_x509_crlbuilder.py39__all__ = ["rsa_key_512", "rsa_key_2048"]CODE
LOWvectors/cryptography_vectors/__init__.py10__all__ = [CODE
LOWvectors/cryptography_vectors/__about__.py5__all__ = [CODE
LOWsrc/cryptography/cobblestone.py16__all__ = [CODE
LOWsrc/cryptography/__init__.py9__all__ = [CODE
LOWsrc/cryptography/__about__.py7__all__ = [CODE
LOWsrc/cryptography/hazmat/asn1/__init__.py28__all__ = [CODE
LOWsrc/cryptography/hazmat/backends/openssl/__init__.py9__all__ = ["backend"]CODE
LOWsrc/cryptography/hazmat/primitives/hpke.py18__all__ = [CODE
LOWsrc/cryptography/hazmat/primitives/cmac.py9__all__ = ["CMAC"]CODE
LOWsrc/cryptography/hazmat/primitives/poly1305.py9__all__ = ["Poly1305"]CODE
LOWsrc/cryptography/hazmat/primitives/keywrap.py9__all__ = [CODE
LOWsrc/cryptography/hazmat/primitives/hmac.py10__all__ = ["HMAC"]CODE
LOWsrc/cryptography/hazmat/primitives/hashes.py13__all__ = [CODE
LOWsrc/cryptography/hazmat/primitives/kdf/argon2.py17__all__ = ["Argon2d", "Argon2i", "Argon2id"]CODE
LOWsrc/cryptography/hazmat/primitives/kdf/scrypt.py19__all__ = ["Scrypt"]CODE
LOWsrc/cryptography/hazmat/primitives/kdf/pbkdf2.py13__all__ = ["PBKDF2HMAC"]CODE
LOWsrc/cryptography/hazmat/primitives/kdf/hkdf.py16__all__ = ["HKDF", "HKDFExpand"]CODE
LOWsrc/cryptography/hazmat/primitives/kdf/x963kdf.py13__all__ = ["X963KDF"]CODE
LOWsrc/cryptography/hazmat/primitives/kdf/concatkdf.py16__all__ = ["ConcatKDFHMAC", "ConcatKDFHash"]CODE
LOW…yptography/hazmat/primitives/serialization/__init__.py41__all__ = [CODE
LOW…cryptography/hazmat/primitives/serialization/pkcs12.py23__all__ = [CODE
LOWsrc/cryptography/hazmat/primitives/ciphers/aead.py9__all__ = [CODE
LOWsrc/cryptography/hazmat/primitives/ciphers/__init__.py19__all__ = [CODE
LOWsrc/cryptography/x509/oid.py23__all__ = [CODE
LOWsrc/cryptography/x509/verification.py12__all__ = [CODE
LOWsrc/cryptography/x509/__init__.py179__all__ = [CODE
Fake / Example Data6 hits · 8 pts
SeverityFileLineSnippetContext
LOWtests/hazmat/primitives/test_cmac.py47fake_key = b"\x00" * 16CODE
LOWtests/hazmat/primitives/test_cmac.py122 only_if=lambda backend: backend.cipher_supported(ARC4(fake_key), None),CODE
LOWtests/x509/test_x509_ext.py1763 fake_key = DummyEd25519PublicKey(data)CODE
LOWtests/x509/test_x509_ext.py1765 _key_identifier_from_public_key(fake_key)CODE
LOWtests/x509/test_x509_ext.py1772 fake_key = DummyEd25519PublicKey(data[:-1] + b"\x00")CODE
LOWtests/x509/test_x509_ext.py1774 _key_identifier_from_public_key(fake_key)CODE
Redundant / Tautological Comments5 hits · 8 pts
SeverityFileLineSnippetContext
LOWtests/test_utils.py4473 # Check if inspection is supported by _ModuleWithDeprecations.COMMENT
LOWtests/x509/test_x509.py700 # Check if all reason flags can be found in the CRL.COMMENT
LOW.github/bin/bump_downstreams.sh57 # Check if this downstream had updates (commit message file has content)COMMENT
LOWsrc/cryptography/hazmat/asn1/asn1.py331 # Check if this is a Variant[T, Tag] typeCOMMENT
LOWsrc/cryptography/hazmat/primitives/asymmetric/rsa.py281 # Check if a^k is a non-trivial root of unity (mod n)COMMENT
Excessive Try-Catch Wrapping6 hits · 6 pts
SeverityFileLineSnippetContext
LOWtests/wycheproof/test_mlkem.py37 except Exception as e:CODE
LOWtests/wycheproof/test_mlkem.py105 except Exception as e:CODE
LOWdocs/_ext/linkcode_res.py57 except Exception:CODE
LOWdocs/_ext/linkcode_res.py67 except Exception:CODE
LOWdocs/_ext/linkcode_res.py84 except Exception:CODE
LOWdocs/_ext/linkcode_res.py91 except Exception:CODE
AI Structural Patterns3 hits · 2 pts
SeverityFileLineSnippetContext
LOWtests/hazmat/primitives/test_ssh.py404CODE
LOWsrc/cryptography/hazmat/primitives/serialization/ssh.py1228CODE
LOWsrc/cryptography/x509/base.py297CODE
AI Slop Vocabulary1 hit · 2 pts
SeverityFileLineSnippetContext
LOWtests/hazmat/primitives/test_rsa.py124 # just add that to the end of the tupleCOMMENT