diff --git a/.gitignore b/.gitignore index adefb096..bcf8ddfb 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,8 @@ node_modules/ # logs logs *.log +# Tool output kept as evidence +!docs/evidence/**/*.log npm-debug.log* yarn-debug.log* yarn-error.log* diff --git a/docs/evidence/scout/scout-console.log b/docs/evidence/scout/scout-console.log new file mode 100644 index 00000000..fcd9d3a2 --- /dev/null +++ b/docs/evidence/scout/scout-console.log @@ -0,0 +1,507 @@ +info: syncing channel updates for '1.97.0-x86_64-unknown-linux-gnu' +info: latest update on 2026-07-09, rust version 1.97.0 (2d8144b78 2026-07-07) +info: downloading component 'cargo' +info: downloading component 'clippy' +info: downloading component 'rust-analyzer' +info: downloading component 'rust-src' +info: downloading component 'rust-std' for 'wasm32v1-none' +info: downloading component 'rust-std' +info: downloading component 'rustc' +info: downloading component 'rustfmt' +info: installing component 'cargo' +info: installing component 'clippy' +info: installing component 'rust-analyzer' +info: installing component 'rust-src' +info: installing component 'rust-std' for 'wasm32v1-none' +info: installing component 'rust-std' +info: installing component 'rustc' +info: installing component 'rustfmt' +[INFO] Validating CLI arguments... +[INFO] Getting detector names... +[INFO] Compiling detectors... +[INFO] Building detector-helper +[INFO] Running scout... +Warning: `--pipe-stdout` is experimental +Building driver for toolchain `nightly-2025-09-18-x86_64-unknown-linux-gnu` + Updating crates.io index + Locking 128 packages to latest compatible versions + Adding dylint_driver v4.1.2 (available: v6.4.0) + Downloading crates ... + Downloaded potential_utf v0.1.6 + Downloaded idna_adapter v1.2.2 + Downloaded zerofrom-derive v0.1.8 + Downloaded utf8_iter v1.1.0 + Downloaded dylint_driver v4.1.2 + Downloaded zerofrom v0.1.8 + Downloaded yoke-derive v0.8.4 + Downloaded zerovec-derive v0.11.7 + Downloaded toml v0.9.12+spec-1.1.0 + Downloaded socket2 v0.6.5 + Downloaded zerotrie v0.2.5 + Downloaded icu_collections v2.4.0 + Downloaded zerovec v0.11.9 + Downloaded icu_properties v2.4.0 + Downloaded cc v1.11.1 + Downloaded winnow v0.7.15 + Downloaded icu_properties_data v2.4.0 + Downloaded curl v0.4.51 + Downloaded url v2.5.8 + Downloaded toml_edit v0.23.10+spec-1.0.0 + Downloaded icu_locale_core v2.4.0 + Downloaded openssl-sys v0.9.118 + Downloaded icu_normalizer_data v2.4.0 + Downloaded smallvec v1.16.5 + Downloaded litemap v0.8.3 + Downloaded jobserver v0.1.35 + Downloaded icu_provider v2.4.0 + Downloaded erased-serde v0.4.11 + Downloaded displaydoc v0.2.7 + Downloaded yoke v0.8.4 + Downloaded writeable v0.6.4 + Downloaded utf_types v1.0.0 + Downloaded toml_datetime v0.7.5+spec-1.1.0 + Downloaded icu_normalizer v2.4.0 + Downloaded tinystr v0.8.5 + Downloaded synstructure v0.14.0 + Downloaded serde-untagged v0.1.9 + Downloaded pkg-config v0.3.34 + Downloaded find-msvc-tools v0.1.15 + Downloaded libloading v0.8.9 + Downloaded libssh2-sys v0.3.4 + Downloaded libz-sys v1.1.33 + Downloaded curl-sys v0.4.91+curl-8.22.0 + Compiling proc-macro2 v1.0.107 + Compiling quote v1.0.47 + Compiling unicode-ident v1.0.27 + Compiling serde_core v1.0.229 + Compiling libc v0.2.191 + Compiling shlex v2.0.1 + Compiling find-msvc-tools v0.1.15 + Compiling pkg-config v0.3.34 + Compiling stable_deref_trait v1.2.1 + Compiling vcpkg v0.2.15 + Compiling utf_types v1.0.0 + Compiling litemap v0.8.3 + Compiling writeable v0.6.4 + Compiling serde v1.0.229 + Compiling icu_properties_data v2.4.0 + Compiling icu_normalizer_data v2.4.0 + Compiling autocfg v1.5.1 + Compiling utf8_iter v1.1.0 + Compiling memchr v2.8.3 + Compiling smallvec v1.16.5 + Compiling typeid v1.0.3 + Compiling winnow v0.7.15 + Compiling hashbrown v0.17.1 + Compiling equivalent v1.0.3 + Compiling erased-serde v0.4.11 + Compiling percent-encoding v2.3.2 + Compiling regex-syntax v0.8.11 + Compiling form_urlencoded v1.2.2 + Compiling zmij v1.0.23 + Compiling num-traits v0.2.19 + Compiling toml_write v0.1.2 + Compiling thiserror v2.0.21 + Compiling cfg-if v1.0.5 + Compiling aho-corasick v1.1.5 + Compiling getrandom v0.4.3 + Compiling bitflags v2.13.2 + Compiling syn v3.0.10 + Compiling serde_json v1.0.154 + Compiling indexmap v2.14.2 + Compiling log v0.4.35 + Compiling winnow v1.0.5 + Compiling rustix v1.1.6 + Compiling camino v1.2.6 + Compiling toml_parser v1.1.5+spec-1.1.0 + Compiling openssl-probe v0.1.6 + Compiling itoa v1.0.19 + Compiling jobserver v0.1.35 + Compiling ordered-float v2.10.1 + Compiling unicode-xid v0.2.6 + Compiling linux-raw-sys v0.12.1 + Compiling toml_writer v1.2.0+spec-1.1.0 + Compiling anyhow v1.0.104 + Compiling cc v1.11.1 + Compiling fastrand v2.5.0 + Compiling dylint_internal v4.1.2 + Compiling curl v0.4.51 + Compiling rustversion v1.0.23 + Compiling once_cell v1.21.4 + Compiling socket2 v0.6.5 + Compiling if_chain v1.0.3 + Compiling syn v2.0.119 + Compiling utf8parse v0.2.2 + Compiling anstyle-parse v1.0.0 + Compiling anstyle-query v1.1.5 + Compiling regex-automata v0.4.18 + Compiling anstyle v1.0.14 + Compiling jiff-core v0.1.5 + Compiling colorchoice v1.0.5 + Compiling is_terminal_polyfill v1.70.2 + Compiling semver v1.0.28 + Compiling toml_datetime v0.7.5+spec-1.1.0 + Compiling cargo-platform v0.3.3 + Compiling serde-untagged v0.1.9 + Compiling serde_spanned v1.1.3 + Compiling toml_edit v0.23.10+spec-1.0.0 + Compiling toml v0.9.12+spec-1.1.0 + Compiling synstructure v0.14.0 + Compiling jiff v0.2.43 + Compiling libz-sys v1.1.33 + Compiling openssl-sys v0.9.118 + Compiling libssh2-sys v0.3.4 + Compiling libgit2-sys v0.16.2+1.7.2 + Compiling curl-sys v0.4.91+curl-8.22.0 + Compiling tempfile v3.27.0 + Compiling anstream v1.0.0 + Compiling libloading v0.8.9 + Compiling zerofrom-derive v0.1.8 + Compiling yoke-derive v0.8.4 + Compiling zerovec-derive v0.11.7 + Compiling displaydoc v0.2.7 + Compiling serde_derive v1.0.229 + Compiling thiserror-impl v2.0.21 + Compiling regex v1.13.1 + Compiling zerofrom v0.1.8 + Compiling yoke v0.8.4 + Compiling zerotrie v0.2.5 + Compiling zerovec v0.11.9 + Compiling env_filter v2.0.0 + Compiling env_logger v0.11.11 + Compiling tinystr v0.8.5 + Compiling potential_utf v0.1.6 + Compiling icu_locale_core v2.4.0 + Compiling icu_collections v2.4.0 + Compiling icu_provider v2.4.0 + Compiling icu_normalizer v2.4.0 + Compiling icu_properties v2.4.0 + Compiling serde_spanned v0.6.9 + Compiling toml_datetime v0.6.11 + Compiling serde-value v0.7.0 + Compiling toml_edit v0.22.27 + Compiling idna_adapter v1.2.2 + Compiling idna v1.1.0 + Compiling url v2.5.8 + Compiling git2 v0.18.3 + Compiling toml v0.8.23 + Compiling cargo-util-schemas v0.8.2 + Compiling cargo_metadata v0.22.0 + Compiling dylint_driver v4.1.2 + Compiling dylint_driver-nightly-2025-09-18-x86_64-unknown-linux-gnu v0.1.0 (/tmp/.tmpDqWGp0) + Finished `dev` profile [unoptimized + debuginfo] target(s) in 2m 02s +Checking with toolchain `nightly-2025-09-18-x86_64-unknown-linux-gnu` + Compiling proc-macro2 v1.0.107 + Compiling unicode-ident v1.0.24 + Compiling quote v1.0.47 + Compiling serde_core v1.0.229 + Compiling zmij v1.0.23 + Compiling serde v1.0.229 + Compiling serde_json v1.0.151 + Compiling memchr v2.8.3 + Compiling itoa v1.0.18 + Compiling ident_case v1.0.1 + Compiling strsim v0.11.1 + Compiling version_check v0.9.5 + Compiling typenum v1.20.1 + Compiling autocfg v1.5.1 + Compiling schemars v0.8.22 + Compiling dyn-clone v1.0.20 + Compiling data-encoding v2.11.1 + Compiling cfg-if v1.0.4 + Compiling cpufeatures v0.2.17 + Compiling escape-bytes v0.1.1 + Compiling generic-array v0.14.9 + Compiling ethnum v1.5.3 + Compiling semver v1.0.28 + Compiling either v1.18.0 + Compiling thiserror v1.0.69 + Compiling num-traits v0.2.19 + Compiling equivalent v1.0.2 + Compiling itertools v0.13.0 + Compiling hashbrown v0.17.1 + Compiling fnv v1.0.7 + Compiling prettyplease v0.2.37 + Checking byteorder v1.5.0 + Compiling base64 v0.22.1 + Compiling heapless v0.8.0 + Compiling syn v3.0.4 + Compiling syn v2.0.119 + Checking hash32 v0.3.1 + Compiling rustc_version v0.4.1 + Compiling static_assertions v1.1.0 + Compiling indexmap v2.14.0 + Checking stable_deref_trait v1.2.1 + Compiling heck v0.5.0 + Compiling crypto-common v0.1.6 + Compiling block-buffer v0.10.4 + Compiling num-integer v0.1.47 + Compiling digest v0.10.7 + Compiling sha2 v0.10.9 + Compiling num-bigint v0.4.8 + Compiling wasmparser v0.116.1 + Compiling serde_derive v1.0.229 + Compiling darling_core v0.23.0 + Compiling darling_core v0.20.11 + Compiling macro-string v0.1.4 + Compiling cfg_eval v0.1.2 + Compiling num-derive v0.4.2 + Compiling thiserror-impl v1.0.69 + Compiling bytes-lit v0.0.5 + Compiling visibility v0.1.1 + Compiling stellar-macros v0.7.2 + Compiling crate-git-revision v0.0.6 + Compiling hex v0.4.3 + Compiling stellar-strkey v0.0.13 + Compiling stellar-xdr v26.0.1 + Compiling soroban-env-common v26.1.4 + Compiling stellar-strkey v0.0.16 + Compiling darling_macro v0.20.11 + Compiling soroban-sdk v26.1.1 + Compiling darling v0.20.11 + Compiling darling_macro v0.23.0 + Compiling darling v0.23.0 + Compiling serde_with_macros v3.22.0 + Compiling serde_with v3.22.0 + Compiling soroban-spec v26.1.1 + Compiling soroban-spec-rust v26.1.1 + Compiling soroban-env-macros v26.1.4 + Checking soroban-env-guest v26.1.4 + Compiling soroban-sdk-macros v26.1.1 + Checking strata-storage v0.1.0 (/scoutme/crates/strata-storage) + Checking stellar-contract-utils v0.7.2 + Checking stellar-access v0.7.2 + Checking stellar-governance v0.7.2 + Checking strata-bindings v0.1.0 (/scoutme/crates/strata-bindings) + Checking stellar-tokens v0.7.2 + Checking strata-timelock v0.1.0 (/scoutme/crates/strata-timelock) + Checking identity-verifier v0.1.0 (/scoutme/contracts/identity-verifier) + Checking nav-oracle v0.1.0 (/scoutme/contracts/nav-oracle) + Checking compliance v0.1.0 (/scoutme/contracts/compliance) + Checking async-vault v0.1.0 (/scoutme/contracts/async-vault) + Checking share-token v0.1.0 (/scoutme/contracts/share-token) + Finished `release` profile [optimized] target(s) in 1m 14s +warning: [ENHANCEMENT] Assert causes panic. Instead, return a proper error. + --> crates/strata-bindings/src/errors.rs:39:9 + | +39 | / assert!( +40 | | ranges[i - 1].last < ranges[i].first, +41 | | "two contracts' error ranges overlap" +42 | | ); + | |_________^ + | + = note: `#[warn(assert_violation)]` on by default + +warning: [ENHANCEMENT] Use the latest version of Soroban + | + = help: The latest Soroban version is "29.0.1", and your version is "26.1.1" + = note: `#[warn(soroban_version)]` on by default + +warning: [ENHANCEMENT] Use the latest version of Soroban + | + = help: The latest Soroban version is "29.0.1", and your version is "26.1.1" + = note: `#[warn(soroban_version)]` on by default + +warning: [ENHANCEMENT] Use the latest version of Soroban + | + = help: The latest Soroban version is "29.0.1", and your version is "26.1.1" + = note: `#[warn(soroban_version)]` on by default + +warning: [MEDIUM] This storage (vector or map) operation is called without access control + --> crates/strata-timelock/src/queue.rs:51:10 + | +51 | open.push_back(id); + | ^^^^^^^^^ + | + = note: `#[warn(dos_unexpected_revert_with_storage)]` on by default + +warning: [CRITICAL] This addition operation could overflow. + --> crates/strata-timelock/src/queue.rs:53:60 + | +53 | strata_storage::set_instance(e, &Key::TimelockNextId, &(id + 1)); + | ^^^^^^^^ + | + = help: Consider using the checked version of this operation/s + = note: `#[warn(integer_overflow_or_underflow)]` on by default + +warning: [ENHANCEMENT] Use the latest version of Soroban + | + = help: The latest Soroban version is "29.0.1", and your version is "26.1.1" + = note: `#[warn(soroban_version)]` on by default + +warning: [ENHANCEMENT] Use the latest version of Soroban + | + = help: The latest Soroban version is "29.0.1", and your version is "26.1.1" + = note: `#[warn(soroban_version)]` on by default + +warning: [MEDIUM] This storage (vector or map) operation is called without access control + --> contracts/compliance/src/governance.rs:145:17 + | +145 | out.push_back(CompliancePendingChange { + | ^^^^^^^^^ + | + = note: `#[warn(dos_unexpected_revert_with_storage)]` on by default + +warning: [ENHANCEMENT] Use the latest version of Soroban + | + = help: The latest Soroban version is "29.0.1", and your version is "26.1.1" + = note: `#[warn(soroban_version)]` on by default + +warning: [MEDIUM] This storage (vector or map) operation is called without access control + --> contracts/nav-oracle/src/governance.rs:157:17 + | +157 | out.push_back(OraclePendingChange { + | ^^^^^^^^^ + | + = note: `#[warn(dos_unexpected_revert_with_storage)]` on by default + +warning: [CRITICAL] This subtraction operation could underflow. + --> contracts/nav-oracle/src/guards.rs:148:16 + | +148 | let diff = (nav_per_share - last.nav_per_share).abs(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: Consider using the checked version of this operation/s + = note: `#[warn(integer_overflow_or_underflow)]` on by default + +warning: [CRITICAL] This operation could overflow or underflow. + --> contracts/nav-oracle/src/guards.rs:149:17 + | +149 | let bound = last.nav_per_share * (bps as i128) / BPS_DENOM; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: Consider using the checked version of this operation/s + +warning: [ENHANCEMENT] Use the latest version of Soroban + | + = help: The latest Soroban version is "29.0.1", and your version is "26.1.1" + = note: `#[warn(soroban_version)]` on by default + +warning: [MEDIUM] This storage (vector or map) operation is called without access control + --> contracts/share-token/src/governance.rs:174:17 + | +174 | out.push_back(TokenPendingChange { + | ^^^^^^^^^ + | + = note: `#[warn(dos_unexpected_revert_with_storage)]` on by default + +warning: [ENHANCEMENT] Use the latest version of Soroban + | + = help: The latest Soroban version is "29.0.1", and your version is "26.1.1" + = note: `#[warn(soroban_version)]` on by default + +warning: [CRITICAL] This addition operation could overflow. + --> contracts/async-vault/src/governance.rs:181:33 + | +181 | .all(|(i, a)| addresses[i + 1..].iter().all(|b| a != b)) + | ^^^^^ + | + = help: Consider using the checked version of this operation/s + = note: `#[warn(integer_overflow_or_underflow)]` on by default + +warning: [MEDIUM] This storage (vector or map) operation is called without access control + --> contracts/async-vault/src/governance.rs:312:17 + | +312 | out.push_back(VaultPendingChange { + | ^^^^^^^^^ + | + = note: `#[warn(dos_unexpected_revert_with_storage)]` on by default + +warning: [CRITICAL] This subtraction operation could underflow. + --> contracts/async-vault/src/lock_policy.rs:100:5 + | +100 | (balance - frozen).max(0) + | ^^^^^^^^^^^^^^^^^^ + | + = help: Consider using the checked version of this operation/s + +warning: [CRITICAL] This subtraction operation could underflow. + --> contracts/async-vault/src/treasury.rs:25:5 + | +25 | held(e) - state::cancellable_escrow(e) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: Consider using the checked version of this operation/s + +warning: [CRITICAL] This operation could overflow or underflow. + --> contracts/async-vault/src/treasury.rs:31:5 + | +31 | (liquid_reserve(e) - state::committed(e) - wind_down::owed(e)).max(0) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: Consider using the checked version of this operation/s + +warning: [CRITICAL] This subtraction operation could underflow. + --> contracts/async-vault/src/treasury.rs:38:5 + | +38 | (state::committed(e) - liquid_reserve(e)).max(0) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: Consider using the checked version of this operation/s + +warning: [CRITICAL] This addition operation could overflow. + --> contracts/async-vault/src/wind_down.rs:188:5 + | +188 | wd.round += 1; + | ^^^^^^^^^^^^^ + | + = help: Consider using the checked version of this operation/s + +warning: [MINOR] If any of the variants (Ok/Err) is not used, the code could be simplified or it could imply a bug + --> contracts/async-vault/src/lib.rs:1307:9 + | +1307 | Ok(governance::clock(e)) + | ^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: [MINOR] If any of the variants (Ok/Err) is not used, the code could be simplified or it could imply a bug + = note: `#[warn(unused_return_enum)]` on by default + +warning: [ENHANCEMENT] Consider emiting an event when storage is modified + --> contracts/async-vault/src/lib.rs:891:5 + | +891 | pub fn claim_deposit(e: &Env, holder: Address, epoch_id: u64) -> i128 { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: + = note: `#[warn(storage_change_events)]` on by default + +warning: [ENHANCEMENT] Consider emiting an event when storage is modified + --> contracts/async-vault/src/lib.rs:1030:5 + | +1030 | pub fn claim_redeem(e: &Env, holder: Address, epoch_id: u64) -> i128 { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: + +warning: [ENHANCEMENT] Consider emiting an event when storage is modified + --> contracts/async-vault/src/lib.rs:956:5 + | +956 | pub fn cancel_redeem(e: &Env, holder: Address, epoch_id: u64) -> i128 { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: + +warning: [ENHANCEMENT] Consider emiting an event when storage is modified + --> contracts/async-vault/src/lib.rs:923:5 + | +923 | pub fn cancel_deposit(e: &Env, holder: Address, epoch_id: u64) -> i128 { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: + +Summary: ++-------------------+----------+----------+--------+-------+-------------+ +| Crate | Status | Critical | Medium | Minor | Enhancement | ++-------------------+----------+----------+--------+-------+-------------+ +| async_vault | Analyzed | 6 | 1 | 1 | 5 | +| compliance | Analyzed | 0 | 1 | 0 | 1 | +| identity_verifier | Analyzed | 0 | 0 | 0 | 1 | +| nav_oracle | Analyzed | 2 | 1 | 0 | 1 | +| share_token | Analyzed | 0 | 1 | 0 | 1 | +| strata_bindings | Analyzed | 0 | 0 | 0 | 2 | +| strata_storage | Analyzed | 0 | 0 | 0 | 1 | +| strata_timelock | Analyzed | 1 | 1 | 0 | 1 | ++-------------------+----------+----------+--------+-------+-------------+ +report.json successfully generated. +report.md successfully generated. +exit=0