AI Slop Code Risk Monitor

RsaCtfTool/RsaCtfTool

SlopCodeMonitor badge for RsaCtfTool/RsaCtfTool Adjusted legacy signal; badge bands: 25 / 50 / 75 (different from dashboard bands).

RSA attack tool (mainly for ctf) - retrieve private key from weak public key and/or uncipher data

24.9 Elevated pattern signal View on GitHub

Open-Source Code Quality, Security and Technical Debt Review

This report summarizes scanner evidence for RsaCtfTool/RsaCtfTool, a Python project with 7,203 GitHub stars. SynthScan examined 17,320 lines of code across 130 source files, recording 356 pattern matches distributed across 14 syntactic categories. The legacy adjusted pattern signal is 24.9 (Elevated pattern signal); it is not an authorship estimate.

Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.

24.9
Adjusted Signal
24.9
Raw Pattern Score
100%
Time Factor
2026-10-23
Last Push
7.2K
Stars
Python
Language
17.3K
Lines of Code
130
Files
356
Pattern Hits
2026-10-31
Scan Date
0.10
HC Hit Rate

Risk Review · Payload v1

Use each vector to guide manual verification of the underlying findings.

Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.

Cognitive Ownership Risk 58.9/100 · HIGH

Can maintainers explain intent, assumptions, and trade-offs? 301 finding(s).

Hallucinated Dependency & Supply Chain Risk 0.7/100 · LOW

Are imports declared and package/API names verified? 3 finding(s).

Agent Over-Engineering Ratio 65.4/100 · HIGH

Are wrappers, guards, and repeated structures necessary? 302 finding(s).

PR Review Velocity Impact 72.2/100 · HIGH

Which changes need focused human review? 356 finding(s).

What These Metrics Mean

Adjusted Signal
Legacy pattern score normalized per 1,000 scanned lines and multiplied by the repository-level time factor. It is not an estimate of AI authorship.
Raw Pattern Score
Sum of severity- and context-weighted pattern findings before applying the time factor.
Time Factor
A coarse multiplier based on repository last-push metadata. It does not identify when individual code was written.
Pattern Hits
Count of configured pattern findings. Review each location and surrounding code before acting.
HC Hit Rate
High- and critical-severity findings per scanned file. Severity is a configured detector weight, not proof of a vulnerability or authorship.
Lines / Files
Scan coverage denominators used by the legacy normalized score.

Pattern-Signal History

This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.

Severity Breakdown

Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.

CRITICAL 0HIGH 13MEDIUM 11LOW 332

Directory Score Breakdown

This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.

Pattern Findings

The scanner identified 356 distinct pattern matches across 14 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. 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 configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.

Hyper-Verbose Identifiers249 hits · 246 pts
SeverityFileLineSnippetContext
LOWtests/test_number_theory.py82 def test_isqrt_perfect_squares(self):CODE
LOWtests/test_number_theory.py150 def test_next_prime_consecutive(self):CODE
LOWtests/test_number_theory.py165 def test_powmod_large_exponent(self):CODE
LOWtests/test_number_theory.py257 def test_chinese_remainder_basic(self):CODE
LOWtests/test_number_theory.py261 def test_chinese_remainder_same_modulus(self):CODE
LOW⚡tests/test_number_theory.py282 def test_contfrac_to_rational_basic(self):CODE
LOW⚡tests/test_number_theory.py286 def test_contfrac_to_rational_empty(self):CODE
LOW⚡tests/test_number_theory.py290 def test_contfrac_to_rational_multiple_terms(self):CODE
LOW⚡tests/test_number_theory.py309 def test_convergents_multiple_terms(self):CODE
LOW⚡tests/test_number_theory.py319 def test_convergents_single_term(self):CODE
LOW⚡tests/test_number_theory.py326 def test_legendre_quadratic_residue(self):CODE
LOW⚡tests/test_number_theory.py331 def test_legendre_quadratic_non_residue(self):CODE
LOWtests/test_number_theory.py459 def test_common_modulus_attack(self):CODE
LOWtests/test_number_theory.py542 def test_isqrt_rem_perfect_square(self):CODE
LOWtests/test_number_theory.py547 def test_isqrt_rem_non_perfect(self):CODE
LOWtests/test_number_theory.py575 def test_miller_rabin_composite(self):CODE
LOW⚡tests/test_polynomial.py17 def test_coefficients_are_reduced_modulo_modulus(self):CODE
LOW⚡tests/test_polynomial.py22 def test_trailing_zeroes_are_removed(self):CODE
LOW⚡tests/test_polynomial.py27 def test_zero_polynomial_is_canonical(self):CODE
LOW⚡tests/test_polynomial.py89 def test_addition_with_scalar(self):CODE
LOW⚡tests/test_polynomial.py95 def test_addition_with_different_moduli_fails(self):CODE
LOW⚡tests/test_polynomial.py102 def test_addition_with_invalid_operand_fails(self):CODE
LOW⚡tests/test_polynomial.py118 def test_subtraction_is_modular(self):CODE
LOW⚡tests/test_polynomial.py124 def test_subtraction_with_scalar(self):CODE
LOW⚡tests/test_polynomial.py130 def test_subtraction_with_different_moduli_fails(self):CODE
LOW⚡tests/test_polynomial.py137 def test_subtraction_with_invalid_operand_fails(self):CODE
LOW⚡tests/test_polynomial.py153 def test_multiplication_with_scalar(self):CODE
LOW⚡tests/test_polynomial.py159 def test_multiplication_is_modular(self):CODE
LOW⚡tests/test_polynomial.py165 def test_multiplication_with_different_moduli_fails(self):CODE
LOW⚡tests/test_polynomial.py172 def test_multiplication_with_invalid_operand_fails(self):CODE
LOW⚡tests/test_polynomial.py237 def test_floor_division_returns_quotient(self):CODE
LOW⚡tests/test_polynomial.py246 def test_modulo_returns_remainder(self):CODE
LOW⚡tests/test_polynomial.py255 def test_division_by_zero_fails(self):CODE
LOW⚡tests/test_polynomial.py261 def test_noninvertible_leading_coefficient_fails(self):CODE
LOWtests/test_polynomial.py39 def test_invalid_modulus_fails(self):CODE
LOWtests/test_polynomial.py53 def test_different_coefficients_are_not_equal(self):CODE
LOWtests/test_polynomial.py56 def test_different_moduli_are_not_equal(self):CODE
LOWtests/test_polynomial.py197 def test_power_large_exponent(self):CODE
LOWtests/test_polynomial.py205 def test_negative_power_fails(self):CODE
LOWtests/test_polynomial.py225 def test_division_with_remainder(self):CODE
LOWtests/test_polynomial.py278 def test_monic_zero_polynomial(self):CODE
LOWtests/test_polynomial.py306 def test_gcd_of_coprime_polynomials(self):CODE
LOWtests/test_polynomial.py322 def test_evaluation_is_modular(self):CODE
LOWtests/test_polynomial.py338 def test_multiplicative_identity(self):CODE
LOWtests/test_polynomial.py344 def test_division_reconstruction(self):CODE
LOWtests/test_polynomial.py355 def test_affine_polynomial_construction(self):CODE
LOWtests/test_abstract_attack.py19 def test_create_private_key_returns_key_for_valid_factors(self, valid_public_key):CODE
LOWtests/test_abstract_attack.py26 def test_create_private_key_rejects_malformed_values(self, valid_public_key):CODE
LOWtests/test_abstract_attack.py39 def test_create_private_key_from_pqe_rejects_malformed_values(self, p, q, e, n):CODE
LOWtests/test_abstract_attack.py42 def test_helpers_reject_invalid_factor_split(self, valid_public_key):CODE
LOW⚡tests/test_audit_regressions.py80 def test_small_composites_false(self, n):CODE
LOW⚡tests/test_audit_regressions.py83 def test_ilogb_big_int_no_overflow(self):CODE
LOW⚡tests/test_audit_regressions.py91 def test_pollard_rho_never_trivial(self):CODE
LOW⚡tests/test_audit_regressions.py98 def test_lehman_valid_or_none(self):CODE
LOW⚡tests/test_audit_regressions.py143 def test_derives_missing_prime(self):CODE
LOW⚡tests/test_audit_regressions.py149 def test_rejects_non_dividing_prime(self):CODE
LOW⚡tests/test_audit_regressions.py155 def test_rejects_missing_primes(self):CODE
LOW⚡tests/test_audit_regressions.py233 def test_api_key_enables_only_with_package(self, monkeypatch):CODE
LOW⚡tests/test_audit_regressions.py243 def test_missing_api_key_disables(self, monkeypatch):CODE
LOW⚡tests/test_audit_regressions.py253 def test_conspicuous_accepts_phi_inverse(self):CODE
189 more matches not shown…
Deep Nesting39 hits · 38 pts
SeverityFileLineSnippetContext
LOWsrc/RsaCtfTool/main.py349CODE
LOWsrc/RsaCtfTool/main.py365CODE
LOWsrc/RsaCtfTool/main.py495CODE
LOWsrc/RsaCtfTool/main.py651CODE
LOWsrc/RsaCtfTool/lib/algos.py55CODE
LOWsrc/RsaCtfTool/lib/algos.py103CODE
LOWsrc/RsaCtfTool/lib/algos.py174CODE
LOWsrc/RsaCtfTool/lib/algos.py194CODE
LOWsrc/RsaCtfTool/lib/algos.py259CODE
LOWsrc/RsaCtfTool/lib/algos.py353CODE
LOWsrc/RsaCtfTool/lib/algos.py644CODE
LOWsrc/RsaCtfTool/lib/algos.py776CODE
LOWsrc/RsaCtfTool/lib/algos.py794CODE
LOWsrc/RsaCtfTool/lib/algos.py923CODE
LOWsrc/RsaCtfTool/lib/algos.py976CODE
LOWsrc/RsaCtfTool/lib/algos.py1085CODE
LOWsrc/RsaCtfTool/lib/algos.py1130CODE
LOWsrc/RsaCtfTool/lib/algos.py1201CODE
LOWsrc/RsaCtfTool/lib/algos.py1355CODE
LOWsrc/RsaCtfTool/lib/algos.py1408CODE
LOWsrc/RsaCtfTool/lib/algos.py1427CODE
LOWsrc/RsaCtfTool/lib/algos.py700CODE
LOWsrc/RsaCtfTool/lib/algos.py1444CODE
LOWsrc/RsaCtfTool/lib/algos.py1466CODE
LOWsrc/RsaCtfTool/lib/rsa_attack.py83CODE
LOWsrc/RsaCtfTool/lib/rsa_attack.py156CODE
LOWsrc/RsaCtfTool/lib/rsa_attack.py196CODE
LOWsrc/RsaCtfTool/lib/rsa_attack.py229CODE
LOWsrc/RsaCtfTool/lib/rsa_attack.py308CODE
LOWsrc/RsaCtfTool/lib/keys_wrapper.py18CODE
LOWsrc/RsaCtfTool/lib/keys_wrapper.py241CODE
LOWsrc/RsaCtfTool/lib/utils.py63CODE
LOWsrc/RsaCtfTool/lib/utils.py93CODE
LOWsrc/RsaCtfTool/lib/utils.py135CODE
LOWsrc/RsaCtfTool/sage/roca_attack.py50CODE
LOWsrc/RsaCtfTool/attacks/single_key/wolframalpha.py35CODE
LOW…Tool/attacks/single_key/multiple_base_inversion_gcd.py47CODE
LOWsrc/RsaCtfTool/attacks/single_key/ecm2.py21CODE
LOWsrc/RsaCtfTool/attacks/single_key/nonRSA.py14CODE
Empty Error Handlers7 hits · 35 pts
SeverityFileLineSnippetContext
HIGHsrc/RsaCtfTool/lib/keys_wrapper.py73except (ValueError, TypeError):CODE
HIGHsrc/RsaCtfTool/lib/keys_wrapper.py267except Exception:CODE
HIGHsrc/RsaCtfTool/lib/keys_wrapper.py279except Exception:CODE
HIGHsrc/RsaCtfTool/lib/polynomial.py66except (ValueError, TypeError):CODE
HIGHsrc/RsaCtfTool/attacks/single_key/ecm.py76except KeyboardInterrupt:CODE
HIGHsrc/RsaCtfTool/attacks/single_key/partial_d.py51except ValueError:CODE
HIGHsrc/RsaCtfTool/attacks/single_key/ecm2.py79except KeyboardInterrupt:CODE
Decorative Section Separators8 hits · 33 pts
SeverityFileLineSnippetContext
MEDIUM⚡tests/test_regression.py18# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_regression.py21# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_regression.py68# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_regression.py70# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_regression.py128# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_regression.py130# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_regression.py266# ---------------------------------------------------------------------------COMMENT
MEDIUM⚡tests/test_regression.py269# ---------------------------------------------------------------------------COMMENT
Excessive Try-Catch Wrapping29 hits · 28 pts
SeverityFileLineSnippetContext
LOWdocs/failure_modes.md69except Exception:CODE
LOWsrc/RsaCtfTool/main.py274 except Exception as exc:STRING
LOWsrc/RsaCtfTool/main.py383 except Exception:STRING
LOWsrc/RsaCtfTool/main.py610 except Exception:STRING
MEDIUMsrc/RsaCtfTool/main.py266def run_conspicuous_check(args, logger):CODE
LOWsrc/RsaCtfTool/lib/rsa_attack.py242 except Exception:CODE
LOWsrc/RsaCtfTool/lib/rsa_attack.py294 except Exception as e:CODE
LOWsrc/RsaCtfTool/lib/rsa_attack.py327 except Exception:CODE
LOWsrc/RsaCtfTool/lib/rsa_attack.py345 except Exception as e:CODE
LOWsrc/RsaCtfTool/lib/rsa_attack.py454 except Exception as e:CODE
LOWsrc/RsaCtfTool/lib/keys_wrapper.py88 except Exception:CODE
LOWsrc/RsaCtfTool/lib/keys_wrapper.py169 except Exception:CODE
LOWsrc/RsaCtfTool/lib/keys_wrapper.py256 except Exception:CODE
LOWsrc/RsaCtfTool/lib/keys_wrapper.py267 except Exception:CODE
LOWsrc/RsaCtfTool/lib/keys_wrapper.py279 except Exception:CODE
LOWsrc/RsaCtfTool/lib/utils.py42 except Exception:CODE
LOWsrc/RsaCtfTool/lib/utils.py79 except Exception:CODE
LOWsrc/RsaCtfTool/lib/utils.py152 except Exception:CODE
LOWsrc/RsaCtfTool/sage/roca_attack.py128 except Exception:CODE
LOWsrc/RsaCtfTool/attacks/single_key/wolframalpha.py69 except Exception:CODE
LOWsrc/RsaCtfTool/attacks/single_key/wolframalpha.py103 except Exception as e:CODE
LOW…Tool/attacks/single_key/multiple_base_inversion_gcd.py61 except Exception:CODE
LOWsrc/RsaCtfTool/attacks/single_key/factordb.py51 except Exception:CODE
LOWsrc/RsaCtfTool/attacks/single_key/factor_2PN.py23 except Exception:CODE
LOW…c/RsaCtfTool/attacks/single_key/highandlowbitsequal.py19 except Exception:CODE
LOWsrc/RsaCtfTool/attacks/single_key/SQUFOF.py19 except Exception:CODE
LOWsrc/RsaCtfTool/attacks/single_key/z3_solver.py56 except Exception:CODE
LOWsrc/RsaCtfTool/attacks/single_key/z3_solver.py63 except Exception:CODE
LOWsrc/RsaCtfTool/attacks/single_key/euler.py27 except Exception:CODE
Cross-File Repetition4 hits · 20 pts
SeverityFileLineSnippetContext
HIGHsrc/RsaCtfTool/attacks/single_key/fermat.py0-----begin public key----- migfma0gcsqgsib3dqebaquaa4gnadcbiqkbgqcg6zybpnfefpkadglb1idarrl3 gk+vs1csgk1cy3kspypfydlvv7akSTRING
HIGHsrc/RsaCtfTool/attacks/single_key/kraitchik.py0-----begin public key----- migfma0gcsqgsib3dqebaquaa4gnadcbiqkbgqcg6zybpnfefpkadglb1idarrl3 gk+vs1csgk1cy3kspypfydlvv7akSTRING
HIGHsrc/RsaCtfTool/attacks/single_key/lehmer.py0-----begin public key----- migfma0gcsqgsib3dqebaquaa4gnadcbiqkbgqcg6zybpnfefpkadglb1idarrl3 gk+vs1csgk1cy3kspypfydlvv7akSTRING
HIGHsrc/RsaCtfTool/attacks/single_key/lehman.py0-----begin public key----- migfma0gcsqgsib3dqebaquaa4gnadcbiqkbgqcg6zybpnfefpkadglb1idarrl3 gk+vs1csgk1cy3kspypfydlvv7akSTRING
Docstring Block Structure2 hits · 10 pts
SeverityFileLineSnippetContext
HIGHsrc/RsaCtfTool/lib/coppersmith.py75 Find small integer roots of a monic univariate polynomial modulo N. Sage is intentionally not imported here. STRING
HIGHsrc/RsaCtfTool/sage/coppersmith.py21 Sage backend for univariate Coppersmith/Howgrave-Graham. Args: polynomial: Monic univariate Sage polynSTRING
Self-Referential Comments2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMsrc/RsaCtfTool/lib/algos.py145 # Create a look-up tableCOMMENT
MEDIUMsrc/RsaCtfTool/sage/roca_attack.py87 # Create the polynom f(x)COMMENT
Over-Commented Block5 hits · 5 pts
SeverityFileLineSnippetContext
LOWoptional-requirements.txt1# Optional pip packages enabling extra attack modulesCOMMENT
LOWdocs/failure_modes.md161### 20. Recursion depth in continued fraction computationCOMMENT
LOWdocs/failure_modes.md181### 30. `PrivateKey._init_fields` truncates arbitrary `d` to `int` via `self.d = d` with no type checkCOMMENT
LOWsrc/RsaCtfTool/lib/coppersmith.py161COMMENT
LOWsrc/RsaCtfTool/attacks/single_key/siqs.py1#!/usr/bin/env python3COMMENT
Modern Structural Boilerplate4 hits · 4 pts
SeverityFileLineSnippetContext
LOWsrc/RsaCtfTool/lib/coppersmith.py13__all__ = [CODE
LOWsrc/RsaCtfTool/lib/number_theory.py738__all__ = [CODE
LOWsrc/RsaCtfTool/lib/crypto_wrapper.py23__all__ = ["RSA", "PKCS1_OAEP", "number", "long_to_bytes", "bytes_to_long"]CODE
LOWsrc/RsaCtfTool/lib/polynomial.py11__all__ = ["Polynomial", "PolynomialDivisionError"]CODE
Redundant / Tautological Comments3 hits · 2 pts
SeverityFileLineSnippetContext
LOW⚡src/RsaCtfTool/main.py457 # Check if a private key is provided and there's something to decryptSTRING
LOW⚡src/RsaCtfTool/main.py464 # Check if a public key is providedSTRING
LOW⚡src/RsaCtfTool/main.py468 # Check if n and e are providedSTRING
Fake / Example Data1 hit · 2 pts
SeverityFileLineSnippetContext
LOW⚡tests/test_audit_regressions.py239 monkeypatch.setenv("WA_API_KEY", "dummy-key")CODE
Unused Imports2 hits · 1 pts
SeverityFileLineSnippetContext
LOWtests/test_algos.py6CODE
LOWtests/test_algos.py623CODE
AI Structural Patterns1 hit · 1 pts
SeverityFileLineSnippetContext
LOWsrc/RsaCtfTool/lib/keys_wrapper.py207CODE