mdp/rotp
61.6
Adequate · 6 November 2026
452
lines of production code
Ruby
primary language
4
measurements over time
What this system is
Features
Executable CLI entry point for OTP generation
A new executable script at bin/rotp has been added, allowing users to generate TOTP and HOTP codes directly from the command line. The script initializes the Ruby load path to include the library directory and invokes the ROTP::CLI interface to handle user arguments.
bin · high confidence
New URI class for generating OTP provisioning links
A new ROTP::OTP::URI class has been introduced to generate standard otpauth:// provisioning URIs for TOTP and HOTP secrets. This allows users to easily create scannable QR code data or manual entry strings that include standard parameters (secret, issuer, algorithm, digits, period) as well as any custom provisioning parameters defined on the OTP object, facilitating integration with authenticator apps that support non-standard params like icons.
lib/rotp/otp · high confidence
Behavioural changes
ROTP 6.3.1: New CLI, Base32, and enhanced TOTP/HOTP verification
This release introduces a new command-line interface (lib/rotp/cli.rb) for generating TOTP and HOTP codes, alongside a pure-Ruby Base32 implementation (lib/rotp/base32.rb) that replaces external dependencies. The core OTP classes now support provisioning URIs with issuer and account name parameters, and verification methods have been enhanced: TOTP\#verify now supports time drift (drift\_ahead/drift\_behind) and anti-replay (after), while HOTP\#verify supports counter retries. Additionally, verification uses constant-time comparison to mitigate timing attacks, and the library version is bumped to 6.3.1.
lib/rotp · high confidence
Refactor library structure and dependencies
The library has been restructured to use a native Base32 implementation (lib/rotp/base32) instead of the external 'base32' gem, and now explicitly requires 'openssl' and 'erb' at the top level. The main module has been renamed from 'Rotp' to 'ROTP', and a new URI handler (lib/rotp/otp/uri) has been introduced to support provisioning URIs for both HOTP and TOTP.
lib · high confidence
Test coverage
2 commits adding/updating tests in spec/lib/rotp/otp; Added comprehensive test coverage for OTP generation, CLI, and Base32 utilities; Updated RSpec configuration and added code coverage reporting.
Dependencies
Update gemspec and move development dependencies
The gemspec now declares a minimum Ruby version of 2.3 and includes development dependencies for rake, rspec, simplecov, and timecop, which have been removed from the Gemfile. The base32 dependency has been removed from the gemspec, and the homepage URL has been updated to the GitHub repository.
(dependencies) · high confidence
Housekeeping
Repository maintenance and infrastructure updates
This change introduces several infrastructure and documentation updates: it adds a .dockerignore file, new Dockerfiles for Ruby 2.3, 2.7, and 3.0, and a docker-compose.yml to facilitate testing across these versions. It also adds a Guardfile for automated test running, a LICENSE file, and a release-please configuration. The Rakefile has been removed, and the .gitignore has been updated to exclude .yardoc, coverage, and Gemfile.lock.
(repo-wide) · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings — which rule fired, in which file, on which line, and how to fix it — are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.
Score
- CAI 58 → 62 (+3.6)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 76 → 76 (+0.0)
- Architecture 69 → 69 (+0.0)
- Maturity 44 → 51 (+7.6)
- Readiness 70 → 70 (+0.0)
- Security 74 → 74 (+0.0)
Resolved (8)
- High: security finding (details withheld)
- High: security finding (details withheld)
- Inconsistent naming and parameterization for OTP generation. HOTP and TOTP use .at(...) with specific inputs (count/time), while the base OTP class uses .generate_otp(input). Additionally, TOTP has a convenience method .now() which is not present in HOTP, creating an asymmetry in the API surface for generating the current code.
- Inconsistent verification signatures for the same logical operation. HOTP uses a 'counter' and 'retries' model, while TOTP uses 'drift' parameters and optional time overrides. This forces consumers to write different validation logic for each type despite both being OTP verification.
- Orphaned file (lib/rotp/otp.rb)
- Orphaned file (lib/rotp/totp.rb)
- Workflow token permissions not restricted (.github/workflows/release.yaml)
- Workflow token permissions not restricted (.github/workflows/test.yaml)
New (5)
- High: security finding (details withheld)
- High: security finding (details withheld)
- High: security finding (details withheld)
- Off-boarding risk: anonymized user #1
- PR-triggered workflow without a permissions block (.github/workflows/test.yaml)
Changes since last survey
- 5 commits — 5 feature/other, 0 fixes
By area
- (root) — 3 commits
- lib/rotp — 1 commit
- spec/lib — 1 commit
Notable commits
- change: Add Ruby 4.0 to the CI matrix (#155)
- change: chore(main): release 6.4.0 (#159)
- change: ci: publish gems to RubyGems from the release workflow (#157)
- change: ci: publish to RubyGems via trusted publishing (OIDC) (#158)
- change: feat: add skip_default_uri_params option to provisioning URIs
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
mdp/rotp was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 6 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 50be75c5214cac20d9a39b59c30e48b738ee09a3 — the exact code this score is about.
- Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.2+preprod-5c4e66d9318b.