Language: JavaScript
Label: safe
CWE: CWE-835 \u2014 Loop with Unreachable Exit Condition ('Infinite Loop')
The product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop.

Code:
  const runner = () => {
    for (const kStr of negativeModInverseCases) {
      const k = new BigInteger(kStr);
      const kinv = k.modInverse(p);
      assert.isAtLeast(kinv.s, 0, "Negative mod inverse");
    }
  };