Skip to content

Commit 4923c82

Browse files
AST-12047 - Fixing our code vulnerabilities | Java wrapper and javascript wrapper
- Fix sast vulnerability
1 parent 692a884 commit 4923c82

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/com/checkmarx/ast/wrapper/Execution.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ private Execution() {
3131
private static final String FILE_NAME_WINDOWS = "cx.exe";
3232
private static final String LINE_SEPARATOR = System.getProperty("line.separator");
3333
private static final String TEMP_DIR = System.getProperty("java.io.tmpdir");
34+
private static final String MD5_ALGORITHM = "MD5";
3435

3536
private static String executable = null;
3637

@@ -161,7 +162,7 @@ private static String md5(InputStream a) {
161162
String md5 = null;
162163
final byte[] buf = new byte[8192];
163164
try {
164-
MessageDigest md = MessageDigest.getInstance("MD5");
165+
MessageDigest md = MessageDigest.getInstance(MD5_ALGORITHM);
165166
int i;
166167
while ((i = a.read(buf)) != -1) {
167168
md.update(buf, 0, i);

0 commit comments

Comments
 (0)