audit.mjs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #!/usr/bin/env zx
  2. import 'zx/globals';
  3. const advisories = [
  4. // ed25519-dalek: Double Public Key Signing Function Oracle Attack
  5. //
  6. // Remove once repo upgrades to ed25519-dalek v2
  7. 'RUSTSEC-2022-0093',
  8. // curve25519-dalek
  9. //
  10. // Remove once repo upgrades to curve25519-dalek v4
  11. 'RUSTSEC-2024-0344',
  12. // Crate: tonic
  13. // Version: 0.9.2
  14. // Title: Remotely exploitable Denial of Service in Tonic
  15. // Date: 2024-10-01
  16. // ID: RUSTSEC-2024-0376
  17. // URL: https://rustsec.org/advisories/RUSTSEC-2024-0376
  18. // Solution: Upgrade to >=0.12.3
  19. 'RUSTSEC-2024-0376',
  20. // Crate: idna
  21. // Version: 0.1.5
  22. // Title: `idna` accepts Punycode labels that do not produce any non-ASCII when decoded
  23. // Date: 2024-12-09
  24. // ID: RUSTSEC-2024-0421
  25. // URL: https://rustsec.org/advisories/RUSTSEC-2024-0421
  26. // Solution: Upgrade to >=1.0.0
  27. // need to solve this dependency tree:
  28. // jsonrpc-core-client v18.0.0 -> jsonrpc-client-transports v18.0.0 -> url v1.7.2 -> idna v0.1.5
  29. 'RUSTSEC-2024-0421',
  30. ];
  31. const ignores = []
  32. advisories.forEach(x => {
  33. ignores.push('--ignore');
  34. ignores.push(x);
  35. });
  36. // Check Solana version.
  37. await $`cargo audit ${ignores}`;