Repository navigation
Conversation
bangyro
approved these changes
Nov 6, 2026
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.
Adds package audit checks that run on every PR, following the setup in MeteoraAg/zap-program#58 and the SDK repos.
New CI jobs
clippy:cargo clippy --locked --all-targets -- -D warningsinci.yml, on the toolchain fromrust-toolchain.toml(1.93.0), the same onecargo_testuses.cargo_deny:cargo deny checkfor advisories, licenses, banned crates and sources, configured indeny.toml. Ignored advisories are listed there, each with a reason.osv_scanner: OSV-Scanner onbun.lock. It can't tell dev dependencies apart inbun.lock, so they're scanned too. Ignored advisories are listed inosv-scanner.toml, each with a reason.cargo_denyandosv_scannerare in a newdependency-audit.yml, which runs on every PR, whatever the base branch or the files changed: new advisories are published against dependencies that are already in the lockfile.clippyhas the sameprograms/dynamic-fee-sharingfilter ascargo_test.Other changes
Clippy fixes in the program code (
programs/dynamic-fee-sharing/src). None of them changes behaviour:#[event_cpi]addsAccountInfofields, which theAccountsderive then flags as deprecated in the impl it generates next to the struct, so the fivepub mod ix_*;declarations get#[allow(deprecated)].#[program]type checks the instruction arguments withlet _: T = panic!()at the crate root, soclippy::diverging_sub_expressionis allowed inlib.rs. Anchor 1.1.2 and later generate neither.#[allow(clippy::too_many_arguments)]oncreate_fee_vaultandFeeVault::initialize.ok_orinstead ofok_or_elsewith a plain value, rangecontains,*xinstead of.clone()on aCopytype, dropped.as_ref()/Box/ field-init shorthand that did nothing,assert!instead ofassert_eq!(…, true)in the SafeMath tests,users.iter().enumerate()instead of an index loop, and a removeduse std::u32.These rewrites change the program binary. The TypeScript tests (16, on litesvm) pass on it.
deny.toml, based on zap-program's. Unmaintained crates count as errors, so the ones with no replacement upstream are ignored individually.publish = falseondynamic-fee-sharing,damm-v2anddynamic-bonding-curve, so cargo-deny skips the license check for them. They have nolicensefield and aren't on crates.io.bunfig.tomlwithminimumReleaseAge = 604800, so bun only resolves versions published at least a week ago.bun updateofws(7.5.10 to 7.5.13 and 8.20.0 to 8.22.0),uuid11.1.0 to 11.1.1 (the copy underrpc-websockets) andbrace-expansion1.1.14 to 1.1.21, within the existing ranges. Only those fourbun.lockentries change. All were released more than a week ago.On-chain crate bump, this changes the program binary:
ruint1.14.0 to 1.17.2 (released 2025-12-28), fixing RUSTSEC-2025-0137.Cargo.lockalso gains entries for ruint's optional dependencies (ark-ff0.5,educe,enum-ordinalize,itertools0.13,syn3), which aren't compiled.Ignored advisories
deny.tomlignores two, both reaching the program:bincode(RUSTSEC-2025-0141, unmaintained, no fix), viaanchor-lang, same as zap-program.ruintRUSTSEC-2026-0220 (wrong overflow flag inoverflowing_shl/shr). The fix is in 1.20.0, which needs rustc 1.90.anchor build1.0.2 passes--tools-version v1.52by default, and those platform-tools ship rustc 1.89: with ruint 1.21.1 the build stops with "ruint@1.21.1 requires rustc 1.90". The program's only ruint shift is theoverflowing_shrinmul_shr, which discards the flag, and the shifted value was always correct.SafeMathimplementschecked_shl/checked_shrforU256/U512, but nothing in the program calls them.osv-scanner.tomlignores 28, none of which has a fix within the versions upstream depends on:@anchor-lang/core>@solana/web3.js, the same as the SDK repos:toml3 (6 advisories;@anchor-lang/coreonly parses Anchor.toml inworkspace, which the tests don't use), andstream-json1 (3) anduuid8 (1) viajayson, which web3.js only loads asjayson/lib/client/browser.bigint-buffer(no patched version), via@solana/spl-token.mocha9 (fixes are in mocha 10+, outside^9.0.3):diff5.0.0 (mocha only callscreatePatch),js-yaml4.1.0 (5, only for.mocharc.yml, which the repo doesn't have),minimatch4.2.1 (3, only for--ignorepatterns, none passed),nanoid3.3.1 (4, mocha callsnanoid()with the default size) andserialize-javascript6.0.0 (4, only used in--parallelmode).Notes
ci.ymlonly run whenprograms/dynamic-fee-sharingchanges. This PR touches that directory, so they run here.actionlintstill reports the two pre-existingSwatinem/rust-cache@v1findings inci.yml. Those jobs were not changed.Checked locally
cargo-deny0.20.2 (the version in cargo-deny-action v2.1.1), run as the action does (--all-features check): passes. Each ignored advisory is still reported without its ignore.osv-scanner scan source -L bun.lock(2.7.0) from the repo root: no issues. The ignore list matches exactly the 28 advisories reported without it.cargo clippy --locked --all-targets -- -D warnings,cargo fmt --checkandcargo test --package dynamic-fee-sharingpass.bun run test(16 passing, litesvm) with bun 1.4.2, afteranchor build --ignore-keyswith anchor-cli 1.0.2 and Solana 3.1.10 (platform-tools v1.52).actionlint1.7.12 ondependency-audit.yml: no findings. The tworust-cache@v1notes inci.ymlwere already onmain.