44/100
Needs attention
Found 4 issues (3 high, 1 medium) across 7 functions of core/. 3 were confirmed by running your code; start there. 1 is a code pattern worth a look. 13 of 14 safety questions were answered (10 proved safe, 3 shown to fail).
- Issues
- 4
- Safety questions
- 10 of 14 proved
- CISA guideline
- Needs work
3 high, 1 medium
3 shown to fail, 1 still open
3 suggestions
Issues
Highsplit can divide by zerocore/src/lib.rs:13Confirmed
- What happens
A division or remainder uses a divisor that can be zero. In Rust that panics and stops the request or thread.
- How we know
We ran your code with this input and it broke. Found by Kani and 2 other verifiers.
total = 4250, people = 0- What our AI adds
peoplecomes from a form. If a guest leaves it empty or types 0, the whole request stops.- How to fix it
pub fn split(total: u64, people: u64) -> Option<u64> { total.checked_div(people) }A suggestion, not a tested patch.
Hightip can overflow when multiplyingcore/src/lib.rs:8Confirmed
- What happens
A multiplication can exceed the integer type's range. With overflow checks it panics; without them it silently wraps to a wrong value.
- How we know
We ran your code with this input and it broke. Found by Kani and 2 other verifiers.
bill = 18446744073709551615, percent = 2- What our AI adds
Nothing limits
billorpercent, so one very large number is enough. In a release build the tip would silently become a wrong amount.- How to fix it
pub fn tip(bill: u64, percent: u64) -> Option<u64> { Some(bill.checked_mul(percent)? / 100) }A suggestion, not a tested patch.
Highpeople can panic on unwrapcore/src/lib.rs:28Confirmed
- What happens
unwrap()orexpect()is called on a value that can beNoneorErrfor some inputs.- How we know
We ran your code with this input and it broke. Found by 2 verifiers.
typed = ""- How to fix it
pub fn people(typed: &str) -> Option<u64> { typed.trim().parse().ok() }A suggestion, not a tested patch.
Mediumtip: Money is rounded down (rounding dust)core/src/lib.rs:8Worth a look
- What happens
Integer division floors the result; repeated small amounts can escape fees entirely. Decide explicitly whether to round up, down or carry the remainder.
- How we know
This kind of code often goes wrong. Nothing broke here. Found by one verifier.
Failing input: Any bill below 100 cents gets a tip of 0 at 1 percent.
- How to fix it
Decide how to round:
div_ceil(100)rounds up, or carry the rest over to the next bill.A suggestion, not a tested patch.
CISA guideline
Needs work3 of 10 checks need work, 2 couldn't be decided from the code alone, 3 follow the guideline. 1 point should be fixed now.
From the U.S. statement on cryptography of December 2, 2026 by CISA, NSA and the Office of the National Cyber Director. This part is advice and doesn't change the score. The statement binds U.S. federal systems and their suppliers.
HighA secret is written in the codecore/src/receipt.rs:10Check 8
- Why
We took it out before your code was sent, so we never saw it. But everyone who sees your code has it.
- The code
const UPLOAD_TOKEN: &str = "CODEVERIFY_REMOVED_TOKEN";- What to change
Load it at run time (environment variable, key store, secret manager), and replace this secret.
MediumX25519 key exchange without a post-quantum partcore/src/receipt.rs:8Check 2
- Why
A future quantum computer could work out these keys, and someone who records the data today could read it then. NIST: not to be used after 2035, and to be replaced from 2030. Executive Order 14412 asks important federal systems to move by the end of 2030.
- The code
use x25519_dalek::{EphemeralSecret, PublicKey};- What to change
Use it together with ML-KEM-768 (crate
ml-kem, oraws-lc-rs): put both shared secrets into one key with HKDF. Then an attacker has to break both.- All places
- core/src/receipt.rs:8
- core/src/receipt.rs:16
- core/src/receipt.rs:17
- core/src/receipt.rs:18
- Source
LowEd25519 signaturescore/src/receipt.rs:5Check 3
- Why
A future quantum computer could forge these signatures. NIST: not to be used after 2035, and to be replaced from 2030. Executive Order 14412 asks important federal systems to move by the end of 2031.
- The code
use ed25519_dalek::{Signer, SigningKey};- What to change
Plan the move to ML-DSA (crate
ml-dsa), or sign with both the old and the new algorithm during the move. For signatures that must last very long, SLH-DSA (crateslh-dsa) is the cautious choice. If a blockchain or another protocol fixes the algorithm, you can't change it alone: keep the algorithm in one place, so you can switch when they do.- All places
- core/src/receipt.rs:5
- core/src/receipt.rs:12
- Source
- 1You know which cryptography your code usesHere is the list: 6 uses in your code.Follows
- 2Encryption keys are safe from quantum computersX25519 key exchange: a future quantum computer could read what it protects.Needs work
- 3Signatures are safe from quantum computersEd25519 signatures: a future quantum computer could forge them.Needs work
- 4Nothing retired or unsafe is in useNothing retired was found in your code.Follows
- 5Everyday encryption and hashing are strong enoughAES, AES-192 or AES-256, SHA-2: strong enough.Follows
- 6Network connections are modernNo network connections with TLS were found.Not used here
- 7Algorithms can be swapped quicklyThe code alone doesn't show how hard a switch would be. Nothing with a fixed size was found in saved or sent data.Couldn't tell
- 8Keys and random numbers are handled safelySecret written in the code.Needs work
- 9Software updates are signed in a future-proof wayNo software updates were found.Not used here
- 10Long-lived secrets stay safe past 2030What is encrypted with these keys today could be read later. Does any of it have to stay secret past 2030?Couldn't tell
All cryptography we found (6)
| What | Library | Where | State |
|---|---|---|---|
| Secret written in the code Keys | none | core/src/receipt.rs:10 | Unsafe |
| Ed25519 signatures Signatures | ed25519-dalek | core/src/receipt.rs:5 and 1 more | Quantum-vulnerable |
| X25519 key exchange Key exchange or encryption with public keys | x25519-dalek | core/src/receipt.rs:8 and 3 more | Quantum-vulnerable |
| AES Encryption | aes-gcm | core/src/receipt.rs:3 and 2 more | Strong |
| AES-192 or AES-256 Encryption | aes-gcm | core/src/receipt.rs:4 and 2 more | Strong |
| SHA-2 Hashing | sha2 | core/src/receipt.rs:7 and 1 more | Strong |
- The statement gives a direction and has no list of code rules. These ten checks come from the published rules behind it.
- They bind U.S. federal systems and their suppliers. For everyone else they are advice. They don't change the score above.
What was checked
by Verus, Kani and 15+ other verifiers- VerusProves that written rules about your code hold for every possible input.3 checks6.1 sFound nothing
- KaniExplores every input up to a limit and proves that nothing can panic or overflow within it.13 checks24 sFound something
- 15+ other verifiersLook for memory errors, overflows, crashes, races, risky patterns and rounding mistakes, and check each other's results.26 checks18 sFound something
- Memory
- The code ran with every memory access checked. Some runs stopped with an error; see the issues.
- Files
- 3 from
core. Every file arrived exactly as it was sent. - Secrets
- 1 left out before sending. They were never sent or stored:
- core/src/receipt.rs:10: an upload token
- This run
- 3 min 26 s in a S container, with Claude Opus 5.5. It cost 7.6 credits.