Language: Java
Label: safe
CWE: CWE-338 \u2014 Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
The product uses a Pseudo-Random Number Generator (PRNG) in a security context, but the PRNG's algorithm is not cryptographically strong.

Code:
	private void migrate110(File dataDir, Stack<Integer> versions) {
		var updateIds = new HashSet<>();
		for (File file: dataDir.listFiles()) {
			if (file.getName().startsWith("Users.xml")) {
				VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file);
				for (Element element: dom.getRootElement().elements()) {
					element.element("accessToken").setText(CryptoUtils.generateSecret());
				}
				dom.writeToFile(file, false);
			}
		}
	}