Fix workspace manifest, duplicate/false-positive checks, and TTL auth false positives - #561
Merged
unrealtim-tech merged 5 commits intoSep 1, 2026
Conversation
…e scan_directory_with_checks (SorobanGuard#371)
|
@valoryyaa-byte Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes four Stellar Wave issues in the checks/analyzer crates.
Changes
Cargo.tomlis missingworkspace.packagefields referenced by every crate #256: Added the missingreadme = "README.md"field to[workspace.package]in the rootCargo.toml(keywords/categories were already present). Unblocks manifest parsing for every crate.AuthAfterStorageWriteCheckis registered twice, andscan_directory_with_checksnever deduplicates — real scans emit duplicate findings #371:default_checks_with_config()now derives its list fromall_checks_base()(swapping in the config-drivenUnprotectedAdminCheckinstance) instead of maintaining a second hand-written 35-item list, so a check can no longer be registered twice in one list but not the other.scan_directory_with_checks— the function the CLI actually calls — now deduplicates findings per file, matchingscan_directory/scan_files. Added a test asserting no duplicate check names indefault_checks()/default_checks_with_config(), and a CLI-level test scanning a fixture that tripsauth-after-storage-write, asserting exactly one finding viascan_directory_with_checks.syn::Fileinstead ofcontractimpl_functions_excluding_test#375:UnsafeRandomnessCheckwalked the rawsyn::Fileviavisit::visit_file, so it would flag#[contractimpl]blocks inside#[cfg(test)]modules. Switched it to iteratecontractimpl_functions_excluding_testlike the rest of the checks, and added a regression test with a#[cfg(test)] mod testsfixture. The other three checks named in the issue (unprotected_upgrade,unprotected_token_mint,unprotected_contract_deployment) already usedcontractimpl_functions_excluding_testwith matching regression tests in this checkout — onlyunsafe_randomness.rsneeded the fix.extend_ttl/bumpare counted as storage mutations by both auth checks — TTL bumps are flagged as unauthorized writes #401: Lifted the storage-mutation-call heuristic out ofauth.rs/auth_order.rsinto a singlecrate::util::is_storage_mutation_call, droppingextend_ttl/bumpfrom the matched method names (keptset/remove/append). TTL extension is a permissionless, non-mutating operation in Soroban and shouldn't be flagged bymissing-require-author mis-ordered byauth-after-storage-write. Added a test to each check asserting a function whose only storage call isextend_ttlproduces no finding, and updated thedocs/checks.mdlimitations text for both checks.Closes #256
Closes #371
Closes #375
Closes #401