Skip to content

Conversation

@mdp
Copy link
Owner

@mdp mdp commented Jun 12, 2025

No description provided.

@jazzberry-ai
Copy link

jazzberry-ai bot commented Jun 12, 2025

Bug Report

Name Severity Example test case Description
Help message not displayed correctly Low Run rotp --mode help The help message is not displayed when running in help mode. The help_message method in lib/rotp/cli.rb returns arguments.to_s if options.mode == :help, but the arguments.to_s may not always return a string, resulting in unexpected output.

Comments? Email us. Your free trial ends in 7 days.

@jazzberry-ai
Copy link

jazzberry-ai bot commented Jun 12, 2025

Bug Report

Name Severity Example test case Description
Help mode suppresses warnings and errors Low Run rotp --help --secret invalid When the --help option is used, any warnings or errors that would normally be displayed are suppressed, and only the help message is shown. This could be misleading to the user.

Comments? Email us. Your free trial ends in 7 days.

@jazzberry-ai
Copy link

jazzberry-ai bot commented Jun 12, 2025

Bug Report

Name Severity Example test case Description
Warnings can mask errors. Medium If both warnings and errors exist, only the warning message is displayed. In the output method, the options.warnings are returned before errors. This means if there are warnings present, the error checking logic will be skipped.

Comments? Email us. Your free trial ends in 7 days.

@jazzberry-ai
Copy link

jazzberry-ai bot commented Jun 12, 2025

Bug Report

Name Severity Example test case Description
Invalid secret not detected High rotp --time --secret invalid When an invalid secret is provided, the program calculates and outputs a TOTP value instead of displaying an error message. The error message should be displayed, and the TOTP value should not be calculated when the secret is invalid.

Comments? Email us. Your free trial ends in 7 days.

@jazzberry-ai
Copy link

jazzberry-ai bot commented Jun 12, 2025

Bug Report

Name Severity Example test case Description
Invalid secret is not properly validated Medium rotp --time --secret AAAAAAAA The CLI does not validate if the provided secret, although being a valid base32 string, is a valid secret for the TOTP/HOTP algorithms. This could lead to unexpected behavior or security vulnerabilities.

Comments? Email us. Your free trial ends in 7 days.

@jazzberry-ai
Copy link

jazzberry-ai bot commented Jun 12, 2025

Bug Report

Name Severity Example test case Description
Inconsistent Secret Length Check Medium Use a valid Base32 secret that, when decoded, results in a byte array with length less than 20, but the original secret is sufficiently long (32 characters). The code checks the length of the decoded secret to determine if it meets the minimum security requirement of 160 bits. This is incorrect, as the length of decoded secret does not necessarily represent the actual secret length. The check should be performed on the length of Base32 encoded secret.

Comments? Email us. Your free trial ends in 7 days.

@jazzberry-ai
Copy link

jazzberry-ai bot commented Jun 12, 2025

Bug Report

Name Severity Example test case Description
Stale Decoded Secret Medium 1. Run CLI with a valid secret. 2. Run CLI with the same command, but an invalid secret. The decoded_secret method caches the decoded secret in @decoded_secret. If options.secret changes to an invalid value, the invalid_secret? method might use a stale cached value from a previous valid secret.

Comments? Email us. Your free trial ends in 7 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants