audit.mjs 766 B

12345678910111213141516171819202122232425262728293031
  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. ];
  21. const ignores = []
  22. advisories.forEach(x => {
  23. ignores.push('--ignore');
  24. ignores.push(x);
  25. });
  26. // Check Solana version.
  27. await $`cargo audit ${ignores}`;