audit.mts 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #!/usr/bin/env zx
  2. import 'zx/globals';
  3. const advisories = [
  4. // === main repo ===
  5. //
  6. // Crate: ed25519-dalek
  7. // Version: 1.0.1
  8. // Title: Double Public Key Signing Function Oracle Attack on `ed25519-dalek`
  9. // Date: 2022-06-11
  10. // ID: RUSTSEC-2022-0093
  11. // URL: https://rustsec.org/advisories/RUSTSEC-2022-0093
  12. // Solution: Upgrade to >=2
  13. 'RUSTSEC-2022-0093',
  14. // Crate: idna
  15. // Version: 0.1.5
  16. // Title: `idna` accepts Punycode labels that do not produce any non-ASCII when decoded
  17. // Date: 2024-12-09
  18. // ID: RUSTSEC-2024-0421
  19. // URL: https://rustsec.org/advisories/RUSTSEC-2024-0421
  20. // Solution: Upgrade to >=1.0.0
  21. // need to solve this depentant tree:
  22. // jsonrpc-core-client v18.0.0 -> jsonrpc-client-transports v18.0.0 -> url v1.7.2 -> idna v0.1.5
  23. 'RUSTSEC-2024-0421',
  24. // === programs/sbf ===
  25. //
  26. // Crate: curve25519-dalek
  27. // Version: 3.2.1
  28. // Title: Timing variability in `curve25519-dalek`'s `Scalar29::sub`/`Scalar52::sub`
  29. // Date: 2024-06-18
  30. // ID: RUSTSEC-2024-0344
  31. // URL: https://rustsec.org/advisories/RUSTSEC-2024-0344
  32. // Solution: Upgrade to >=4.1.3
  33. 'RUSTSEC-2024-0344',
  34. // Crate: tonic
  35. // Version: 0.9.2
  36. // Title: Remotely exploitable Denial of Service in Tonic
  37. // Date: 2024-10-01
  38. // ID: RUSTSEC-2024-0376
  39. // URL: https://rustsec.org/advisories/RUSTSEC-2024-0376
  40. // Solution: Upgrade to >=0.12.3
  41. 'RUSTSEC-2024-0376',
  42. ];
  43. const ignores: string[] = [];
  44. advisories.forEach((x) => {
  45. ignores.push('--ignore');
  46. ignores.push(x);
  47. });
  48. await $`cargo audit ${ignores}`;