instruction
string | input
string | output
string | cwe_ids
list | cve_id
string | severity
string | cvss_score
float64 | repo_name
string | func_name
string | file_path
string | commit_hash
string | is_vulnerable
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Analyze the following code function for security vulnerabilities
|
@Override
public int startActivityInPackage(int uid, int realCallingPid, int realCallingUid,
String callingPackage, @Nullable String callingFeatureId, Intent intent,
String resolvedType, IBinder resultTo, String resultWho, int requestCode,
int startFlags, SafeActivityOptions options, int userId, Task inTask, String reason,
boolean validateIncomingUser, PendingIntentRecord originatingPendingIntent,
boolean allowBackgroundActivityStart) {
assertPackageMatchesCallingUid(callingPackage);
return getActivityStartController().startActivityInPackage(uid, realCallingPid,
realCallingUid, callingPackage, callingFeatureId, intent, resolvedType,
resultTo, resultWho, requestCode, startFlags, options, userId, inTask,
reason, validateIncomingUser, originatingPendingIntent,
allowBackgroundActivityStart);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startActivityInPackage
File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40094
|
HIGH
| 7.8
|
android
|
startActivityInPackage
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
int getNextStackId() {
while (true) {
if (++mLastStackId <= HOME_STACK_ID) {
mLastStackId = HOME_STACK_ID + 1;
}
if (getStack(mLastStackId) == null) {
break;
}
}
return mLastStackId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNextStackId
File: services/core/java/com/android/server/am/ActivityStackSupervisor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3838
|
MEDIUM
| 4.3
|
android
|
getNextStackId
|
services/core/java/com/android/server/am/ActivityStackSupervisor.java
|
468651c86a8adb7aa56c708d2348e99022088af3
| 0
|
Analyze the following code function for security vulnerabilities
|
@JsonProperty(TYPE_FIELD)
public abstract Builder type(String type);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: type
File: graylog2-server/src/main/java/org/graylog2/lookup/adapters/DnsLookupDataAdapter.java
Repository: Graylog2/graylog2-server
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2023-41045
|
MEDIUM
| 5.3
|
Graylog2/graylog2-server
|
type
|
graylog2-server/src/main/java/org/graylog2/lookup/adapters/DnsLookupDataAdapter.java
|
466af814523cffae9fbc7e77bab7472988f03c3e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean existsDB(String databaseName) {
if (databaseName.startsWith("file://")) {
return exists(databaseName);
}
File db = new File(getContext().getApplicationInfo().dataDir + "/databases/" + databaseName);
return db.exists();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: existsDB
File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
existsDB
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setCharacterEncoding(String encoding)
throws UnsupportedEncodingException {
// ignore
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setCharacterEncoding
File: h2/src/test/org/h2/test/server/TestWeb.java
Repository: h2database
The code follows secure coding practices.
|
[
"CWE-312"
] |
CVE-2022-45868
|
HIGH
| 7.8
|
h2database
|
setCharacterEncoding
|
h2/src/test/org/h2/test/server/TestWeb.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getFinancedDeviceKioskRoleHolder(String callerPackageName) {
CallerIdentity caller = getCallerIdentity(callerPackageName);
enforcePermission(MANAGE_PROFILE_AND_DEVICE_OWNERS, caller.getPackageName(),
caller.getUserId());
return getFinancedDeviceKioskRoleHolderOnAnyUser();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFinancedDeviceKioskRoleHolder
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
getFinancedDeviceKioskRoleHolder
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void endWikiClass(FilterEventParameters parameters) throws FilterException
{
getBaseClassOutputFilterStream().setEntity(null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: endWikiClass
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/filter/output/XWikiDocumentOutputFilterStream.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-459"
] |
CVE-2023-36468
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
endWikiClass
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/filter/output/XWikiDocumentOutputFilterStream.java
|
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
| 0
|
Analyze the following code function for security vulnerabilities
|
public void afterTextChanged(Editable s) {
// Changing the text while error displayed resets to NeedToConfirm state
if (mUiStage == Stage.ConfirmWrong) {
mUiStage = Stage.NeedToConfirm;
}
// Schedule the UI update.
mTextChangedHandler.notifyAfterTextChanged();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: afterTextChanged
File: src/com/android/settings/password/ChooseLockPassword.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40117
|
HIGH
| 7.8
|
android
|
afterTextChanged
|
src/com/android/settings/password/ChooseLockPassword.java
|
11815817de2f2d70fe842b108356a1bc75d44ffb
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isSupported(String feature, String version) {
return doc.isSupported(feature, version);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isSupported
File: HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java
Repository: LoboEvolution
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000540
|
MEDIUM
| 6.8
|
LoboEvolution
|
isSupported
|
HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java
|
9b75694cedfa4825d4a2330abf2719d470c654cd
| 0
|
Analyze the following code function for security vulnerabilities
|
public ConnectionConfiguration getConfiguration() {
return config;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getConfiguration
File: smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
Repository: igniterealtime/Smack
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2016-10027
|
MEDIUM
| 4.3
|
igniterealtime/Smack
|
getConfiguration
|
smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
|
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
| 0
|
Analyze the following code function for security vulnerabilities
|
public void put(String pkg, boolean granted) {
if (pkg == null) return;
final ArraySet<String> pkgs = getGrantedPackages();
boolean changed;
if (granted) {
changed = pkgs.add(pkg);
} else {
changed = pkgs.remove(pkg);
}
if (!changed) return;
final String setting = TextUtils.join(SEPARATOR, pkgs);
final int currentUser = ActivityManager.getCurrentUser();
Settings.Secure.putStringForUser(getContext().getContentResolver(),
Settings.Secure.ENABLED_NOTIFICATION_POLICY_ACCESS_PACKAGES,
setting,
currentUser);
getContext().sendBroadcastAsUser(new Intent(NotificationManager
.ACTION_NOTIFICATION_POLICY_ACCESS_GRANTED_CHANGED)
.setPackage(pkg)
.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY), new UserHandle(currentUser), null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: put
File: services/core/java/com/android/server/notification/NotificationManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3884
|
MEDIUM
| 4.3
|
android
|
put
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public synchronized SSLEngineResult wrap(
final ByteBuffer[] srcs, final int offset, final int length, final ByteBuffer dst) throws SSLException {
// Check to make sure the engine has not been closed
if (isDestroyed()) {
return CLOSED_NOT_HANDSHAKING;
}
// Throw required runtime exceptions
if (srcs == null) {
throw new IllegalArgumentException("srcs is null");
}
if (dst == null) {
throw new IllegalArgumentException("dst is null");
}
if (offset >= srcs.length || offset + length > srcs.length) {
throw new IndexOutOfBoundsException(
"offset: " + offset + ", length: " + length +
" (expected: offset <= offset + length <= srcs.length (" + srcs.length + "))");
}
if (dst.isReadOnly()) {
throw new ReadOnlyBufferException();
}
HandshakeStatus status = NOT_HANDSHAKING;
// Prepare OpenSSL to work in server mode and receive handshake
if (handshakeState != HandshakeState.FINISHED) {
if (handshakeState != HandshakeState.STARTED_EXPLICITLY) {
// Update accepted so we know we triggered the handshake via wrap
handshakeState = HandshakeState.STARTED_IMPLICITLY;
}
status = handshake();
if (status == NEED_UNWRAP) {
return NEED_UNWRAP_OK;
}
if (engineClosed) {
return NEED_UNWRAP_CLOSED;
}
}
int bytesProduced = 0;
// There was no pending data in the network BIO -- encrypt any application data
int bytesConsumed = 0;
int endOffset = offset + length;
for (int i = offset; i < endOffset; ++ i) {
final ByteBuffer src = srcs[i];
if (src == null) {
throw new IllegalArgumentException("srcs[" + i + "] is null");
}
while (src.hasRemaining()) {
// Write plaintext application data to the SSL engine
int result = writePlaintextData(src);
if (result > 0) {
bytesConsumed += result;
} else {
int sslError = SSL.getError(ssl, result);
switch (sslError) {
case SSL.SSL_ERROR_ZERO_RETURN:
// This means the connection was shutdown correctly, close inbound and outbound
if (!receivedShutdown) {
closeAll();
}
// fall-trough!
case SSL.SSL_ERROR_WANT_READ:
case SSL.SSL_ERROR_WANT_WRITE:
// Break here as this means we need check if there is something pending in the BIO
break;
default:
// Everything else is considered as error
throw shutdownWithError("SSL_write");
}
}
SSLEngineResult pendingNetResult = readPendingBytesFromBIO(dst, bytesConsumed, bytesProduced, status);
if (pendingNetResult != null) {
return pendingNetResult;
}
}
}
// We need to check if pendingWrittenBytesInBIO was checked yet, as we may not checked if the srcs was empty,
// or only contained empty buffers.
if (bytesConsumed == 0) {
SSLEngineResult pendingNetResult = readPendingBytesFromBIO(dst, 0, bytesProduced, status);
if (pendingNetResult != null) {
return pendingNetResult;
}
}
return newResult(bytesConsumed, bytesProduced, status);
}
|
Vulnerability Classification:
- CWE: CWE-835
- CVE: CVE-2016-4970
- Severity: HIGH
- CVSS Score: 7.8
Description: OpenSslEngine writePlaintextData WANT_READ with no data in BIO buffer
Motivation:
CVE-2016-4970
OpenSslEngine.wrap calls SSL_write which may return SSL_ERROR_WANT_READ, and if in this condition there is nothing to read from the BIO the OpenSslEngine and SslHandler will enter an infinite loop.
Modifications:
- Use the error code provided by OpenSSL and go back to the EventLoop selector to detect if the socket is closed
Result:
OpenSslEngine correctly handles the return codes from OpenSSL and does not enter an infinite loop.
Function: wrap
File: handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java
Repository: netty
Fixed Code:
@Override
public synchronized SSLEngineResult wrap(
final ByteBuffer[] srcs, final int offset, final int length, final ByteBuffer dst) throws SSLException {
// Check to make sure the engine has not been closed
if (isDestroyed()) {
return CLOSED_NOT_HANDSHAKING;
}
// Throw required runtime exceptions
if (srcs == null) {
throw new IllegalArgumentException("srcs is null");
}
if (dst == null) {
throw new IllegalArgumentException("dst is null");
}
if (offset >= srcs.length || offset + length > srcs.length) {
throw new IndexOutOfBoundsException(
"offset: " + offset + ", length: " + length +
" (expected: offset <= offset + length <= srcs.length (" + srcs.length + "))");
}
if (dst.isReadOnly()) {
throw new ReadOnlyBufferException();
}
HandshakeStatus status = NOT_HANDSHAKING;
// Prepare OpenSSL to work in server mode and receive handshake
if (handshakeState != HandshakeState.FINISHED) {
if (handshakeState != HandshakeState.STARTED_EXPLICITLY) {
// Update accepted so we know we triggered the handshake via wrap
handshakeState = HandshakeState.STARTED_IMPLICITLY;
}
status = handshake();
if (status == NEED_UNWRAP) {
return NEED_UNWRAP_OK;
}
if (engineClosed) {
return NEED_UNWRAP_CLOSED;
}
}
// There was no pending data in the network BIO -- encrypt any application data
int bytesProduced = 0;
int bytesConsumed = 0;
int endOffset = offset + length;
for (int i = offset; i < endOffset; ++ i) {
final ByteBuffer src = srcs[i];
if (src == null) {
throw new IllegalArgumentException("srcs[" + i + "] is null");
}
while (src.hasRemaining()) {
final SSLEngineResult pendingNetResult;
// Write plaintext application data to the SSL engine
int result = writePlaintextData(src);
if (result > 0) {
bytesConsumed += result;
pendingNetResult = readPendingBytesFromBIO(dst, bytesConsumed, bytesProduced, status);
if (pendingNetResult != null) {
return pendingNetResult;
}
} else {
int sslError = SSL.getError(ssl, result);
switch (sslError) {
case SSL.SSL_ERROR_ZERO_RETURN:
// This means the connection was shutdown correctly, close inbound and outbound
if (!receivedShutdown) {
closeAll();
}
pendingNetResult = readPendingBytesFromBIO(dst, bytesConsumed, bytesProduced, status);
return pendingNetResult != null ? pendingNetResult : CLOSED_NOT_HANDSHAKING;
case SSL.SSL_ERROR_WANT_READ:
// If there is no pending data to read from BIO we should go back to event loop and try to read
// more data [1]. It is also possible that event loop will detect the socket has been closed.
// [1] https://www.openssl.org/docs/manmaster/ssl/SSL_write.html
pendingNetResult = readPendingBytesFromBIO(dst, bytesConsumed, bytesProduced, status);
return pendingNetResult != null ? pendingNetResult :
new SSLEngineResult(getEngineStatus(), NEED_UNWRAP, bytesConsumed, bytesProduced);
case SSL.SSL_ERROR_WANT_WRITE:
// SSL_ERROR_WANT_WRITE typically means that the underlying transport is not writable and we
// should set the "want write" flag on the selector and try again when the underlying transport
// is writable [1]. However we are not directly writing to the underlying transport and instead
// writing to a BIO buffer. The OpenSsl documentation says we should do the following [1]:
//
// "When using a buffering BIO, like a BIO pair, data must be written into or retrieved out of
// the BIO before being able to continue."
//
// So we attempt to drain the BIO buffer below, but if there is no data this condition is
// undefined and we assume their is a fatal error with the openssl engine and close.
// [1] https://www.openssl.org/docs/manmaster/ssl/SSL_write.html
pendingNetResult = readPendingBytesFromBIO(dst, bytesConsumed, bytesProduced, status);
return pendingNetResult != null ? pendingNetResult : NEED_WRAP_CLOSED;
default:
// Everything else is considered as error
throw shutdownWithError("SSL_write");
}
}
}
}
// We need to check if pendingWrittenBytesInBIO was checked yet, as we may not checked if the srcs was empty,
// or only contained empty buffers.
if (bytesConsumed == 0) {
SSLEngineResult pendingNetResult = readPendingBytesFromBIO(dst, 0, bytesProduced, status);
if (pendingNetResult != null) {
return pendingNetResult;
}
}
return newResult(bytesConsumed, bytesProduced, status);
}
|
[
"CWE-835"
] |
CVE-2016-4970
|
HIGH
| 7.8
|
netty
|
wrap
|
handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java
|
bc8291c80912a39fbd2303e18476d15751af0bf1
| 1
|
Analyze the following code function for security vulnerabilities
|
void getBounds(Point outBounds) {
synchronized (mService) {
if (mActivityDisplay != null) {
mActivityDisplay.getBounds(outBounds);
} else {
outBounds.set(0, 0);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getBounds
File: services/core/java/com/android/server/am/ActivityStackSupervisor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3838
|
MEDIUM
| 4.3
|
android
|
getBounds
|
services/core/java/com/android/server/am/ActivityStackSupervisor.java
|
468651c86a8adb7aa56c708d2348e99022088af3
| 0
|
Analyze the following code function for security vulnerabilities
|
public static List<Triple<String, Element, String>> getTagElementTriplesFromFile(File f, String tag) {
List<Triple<String, Element, String>> sents = Generics.newArrayList();
try {
sents = getTagElementTriplesFromFileSAXException(f, tag);
} catch (SAXException e) {
log.warn(e);
}
return sents;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTagElementTriplesFromFile
File: src/edu/stanford/nlp/util/XMLUtils.java
Repository: stanfordnlp/CoreNLP
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-0239
|
HIGH
| 7.5
|
stanfordnlp/CoreNLP
|
getTagElementTriplesFromFile
|
src/edu/stanford/nlp/util/XMLUtils.java
|
1940ffb938dc4f3f5bc5f2a2fd8b35aabbbae3dd
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setReuseCachedSearchResultsForMillis(Long theReuseCachedSearchResultsForMillis) {
myReuseCachedSearchResultsForMillis = theReuseCachedSearchResultsForMillis;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setReuseCachedSearchResultsForMillis
File: hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
Repository: hapifhir/hapi-fhir
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-32053
|
MEDIUM
| 5
|
hapifhir/hapi-fhir
|
setReuseCachedSearchResultsForMillis
|
hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
|
f2934b229c491235ab0e7782dea86b324521082a
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String getAttribute(Element element, String name) {
Attr attr = element.getAttributeNode(name);
return (attr != null)? attr.getValue(): null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAttribute
File: src/edu/stanford/nlp/time/XMLUtils.java
Repository: stanfordnlp/CoreNLP
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-3869
|
MEDIUM
| 5
|
stanfordnlp/CoreNLP
|
getAttribute
|
src/edu/stanford/nlp/time/XMLUtils.java
|
5d83f1e8482ca304db8be726cad89554c88f136a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isCachable() {
// 26-Mar-2015, tatu: With respect to [databind#735], there are concerns over
// cachability. It seems like we SHOULD be safe here; but just in case there
// are problems with false sharing, this may need to be revisited.
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isCachable
File: src/main/java/com/fasterxml/jackson/databind/deser/std/UntypedObjectDeserializer.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2020-36518
|
MEDIUM
| 5
|
FasterXML/jackson-databind
|
isCachable
|
src/main/java/com/fasterxml/jackson/databind/deser/std/UntypedObjectDeserializer.java
|
8238ab41d0350fb915797c89d46777b4496b74fd
| 0
|
Analyze the following code function for security vulnerabilities
|
private final String _finishShortText(int len) throws IOException
{
char[] outBuf = _textBuffer.emptyAndGetCurrentSegment();
if (outBuf.length < len) { // one minor complication
outBuf = _textBuffer.expandCurrentSegment(len);
}
int outPtr = 0;
int inPtr = _inputPtr;
_inputPtr += len;
final byte[] inputBuf = _inputBuffer;
// Let's actually do a tight loop for ASCII first:
final int end = inPtr + len;
int i;
while ((i = inputBuf[inPtr]) >= 0) {
outBuf[outPtr++] = (char) i;
if (++inPtr == end) {
return _textBuffer.setCurrentAndReturn(outPtr);
}
}
final int[] codes = UTF8_UNIT_CODES;
do {
i = inputBuf[inPtr++] & 0xFF;
switch (codes[i]) {
case 0:
break;
case 1:
i = ((i & 0x1F) << 6) | (inputBuf[inPtr++] & 0x3F);
break;
case 2:
i = ((i & 0x0F) << 12)
| ((inputBuf[inPtr++] & 0x3F) << 6)
| (inputBuf[inPtr++] & 0x3F);
break;
case 3:
i = ((i & 0x07) << 18)
| ((inputBuf[inPtr++] & 0x3F) << 12)
| ((inputBuf[inPtr++] & 0x3F) << 6)
| (inputBuf[inPtr++] & 0x3F);
// note: this is the codepoint value; need to split, too
i -= 0x10000;
outBuf[outPtr++] = (char) (0xD800 | (i >> 10));
i = 0xDC00 | (i & 0x3FF);
break;
default: // invalid
_reportError("Invalid byte "+Integer.toHexString(i)+" in Unicode text block");
}
outBuf[outPtr++] = (char) i;
} while (inPtr < end);
return _textBuffer.setCurrentAndReturn(outPtr);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _finishShortText
File: cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
Repository: FasterXML/jackson-dataformats-binary
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2020-28491
|
MEDIUM
| 5
|
FasterXML/jackson-dataformats-binary
|
_finishShortText
|
cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
|
de072d314af8f5f269c8abec6930652af67bc8e6
| 0
|
Analyze the following code function for security vulnerabilities
|
public void updateAppOpsState() {
synchronized(mWindowMap) {
final int numDisplays = mDisplayContents.size();
for (int displayNdx = 0; displayNdx < numDisplays; ++displayNdx) {
final WindowList windows = mDisplayContents.valueAt(displayNdx).getWindowList();
final int numWindows = windows.size();
for (int winNdx = 0; winNdx < numWindows; ++winNdx) {
final WindowState win = windows.get(winNdx);
if (win.mAppOp != AppOpsManager.OP_NONE) {
final int mode = mAppOps.checkOpNoThrow(win.mAppOp, win.getOwningUid(),
win.getOwningPackage());
win.setAppOpVisibilityLw(mode == AppOpsManager.MODE_ALLOWED ||
mode == AppOpsManager.MODE_DEFAULT);
}
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateAppOpsState
File: services/core/java/com/android/server/wm/WindowManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3875
|
HIGH
| 7.2
|
android
|
updateAppOpsState
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getBaseSkin()
{
return this.xwiki.getBaseSkin(getXWikiContext());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getBaseSkin
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2023-37911
|
MEDIUM
| 6.5
|
xwiki/xwiki-platform
|
getBaseSkin
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
|
f471f2a392aeeb9e51d59fdfe1d76fccf532523f
| 0
|
Analyze the following code function for security vulnerabilities
|
byte[] getSessionID() {
return Arrays.copyOf(sessionID, sessionID.length);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSessionID
File: src/main/java/net/schmizz/sshj/transport/KeyExchanger.java
Repository: hierynomus/sshj
The code follows secure coding practices.
|
[
"CWE-354"
] |
CVE-2023-48795
|
MEDIUM
| 5.9
|
hierynomus/sshj
|
getSessionID
|
src/main/java/net/schmizz/sshj/transport/KeyExchanger.java
|
94fcc960e0fb198ddec0f7efc53f95ac627fe083
| 0
|
Analyze the following code function for security vulnerabilities
|
public final boolean isTrackPosition ()
{
return m_bTrackPosition;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isTrackPosition
File: ph-json/src/main/java/com/helger/json/parser/JsonParser.java
Repository: phax/ph-commons
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-34612
|
HIGH
| 7.5
|
phax/ph-commons
|
isTrackPosition
|
ph-json/src/main/java/com/helger/json/parser/JsonParser.java
|
02a4d034dcfb2b6e1796b25f519bf57a6796edce
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onLlcpLinkActivated(NfcDepEndpoint device) {
sendMessage(NfcService.MSG_LLCP_LINK_ACTIVATION, device);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onLlcpLinkActivated
File: src/com/android/nfc/NfcService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3761
|
LOW
| 2.1
|
android
|
onLlcpLinkActivated
|
src/com/android/nfc/NfcService.java
|
9ea802b5456a36f1115549b645b65c791eff3c2c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Element toDOM(Document document) {
Element element = document.createElement("KeyArchivalRequest");
toDOM(document, element);
return element;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toDOM
File: base/common/src/main/java/com/netscape/certsrv/key/KeyArchivalRequest.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
toDOM
|
base/common/src/main/java/com/netscape/certsrv/key/KeyArchivalRequest.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public void initLoadXray() {
logger.info("init load xray module");
if (StringUtil.notEmpty(db.getLastXrayPath()) &&
!db.getLastXrayPath().equals("null")) {
loadXray(db.getLastXrayPath());
}
choseDirButton.addActionListener(e -> {
JFileChooser fileChooser = new JFileChooser();
fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
int option = fileChooser.showOpenDialog(new JFrame());
if (option == JFileChooser.APPROVE_OPTION) {
File file = fileChooser.getSelectedFile();
String absPath = file.getAbsolutePath();
loadXray(absPath);
DB data = new DB();
data.setLastXrayPath(absPath);
try {
Files.write(Paths.get("super-xray.db"), data.getDB().getBytes());
} catch (Exception ex) {
logger.error(ex);
}
} else {
if (LANG == CHINESE) {
xrayPathTextField.setText("你取消了选择");
} else {
xrayPathTextField.setText("Cancel");
}
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initLoadXray
File: src/main/java/com/chaitin/xray/form/MainForm.java
Repository: 4ra1n/super-xray
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2022-41958
|
HIGH
| 7.8
|
4ra1n/super-xray
|
initLoadXray
|
src/main/java/com/chaitin/xray/form/MainForm.java
|
4d0d59663596db03f39d7edd2be251d48b52dcfc
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onBackPressed() {
Display.getInstance().keyPressed(AndroidImplementation.DROID_IMPL_KEY_BACK);
Display.getInstance().keyReleased(AndroidImplementation.DROID_IMPL_KEY_BACK);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onBackPressed
File: Ports/Android/src/com/codename1/impl/android/CodenameOneActivity.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
onBackPressed
|
Ports/Android/src/com/codename1/impl/android/CodenameOneActivity.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
private void maybeEnableCompression() throws NotConnectedException, NoResponseException, SmackException, InterruptedException {
if (!config.isCompressionEnabled()) {
return;
}
maybeCompressFeaturesReceived.checkIfSuccessOrWait();
Compress.Feature compression = getFeature(Compress.Feature.ELEMENT, Compress.NAMESPACE);
if (compression == null) {
// Server does not support compression
return;
}
// If stream compression was offered by the server and we want to use
// compression then send compression request to the server
if ((compressionHandler = maybeGetCompressionHandler(compression)) != null) {
compressSyncPoint.sendAndWaitForResponseOrThrow(new Compress(compressionHandler.getCompressionMethod()));
} else {
LOGGER.warning("Could not enable compression because no matching handler/method pair was found");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: maybeEnableCompression
File: smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
Repository: igniterealtime/Smack
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2016-10027
|
MEDIUM
| 4.3
|
igniterealtime/Smack
|
maybeEnableCompression
|
smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
|
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
| 0
|
Analyze the following code function for security vulnerabilities
|
public abstract BaseXMLBuilder inst(String target, String data);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: inst
File: src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
Repository: jmurty/java-xmlbuilder
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2014-125087
|
MEDIUM
| 5.2
|
jmurty/java-xmlbuilder
|
inst
|
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
|
e6fddca201790abab4f2c274341c0bb8835c3e73
| 0
|
Analyze the following code function for security vulnerabilities
|
IRubyObject validate_document_or_file(ThreadContext context, XmlDocument xmlDocument) {
RubyArray errors = (RubyArray) this.getInstanceVariable("@errors");
ErrorHandler errorHandler = new SchemaErrorHandler(context.runtime, errors);
setErrorHandler(errorHandler);
try {
validate(xmlDocument.getDocument());
}
catch (SAXException ex) {
XmlSyntaxError xmlSyntaxError = XmlSyntaxError.createXMLSyntaxError(context.runtime);
xmlSyntaxError.setException(ex);
errors.append(xmlSyntaxError);
}
catch (IOException ex) {
throw context.runtime.newIOError(ex.getMessage());
}
return errors;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: validate_document_or_file
File: ext/java/nokogiri/XmlSchema.java
Repository: sparklemotion/nokogiri
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2020-26247
|
MEDIUM
| 4
|
sparklemotion/nokogiri
|
validate_document_or_file
|
ext/java/nokogiri/XmlSchema.java
|
9c87439d9afa14a365ff13e73adc809cb2c3d97b
| 0
|
Analyze the following code function for security vulnerabilities
|
public VolumeManager getVolumeManager() {
return this.volumeManager;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getVolumeManager
File: src/main/java/com/github/junrar/Archive.java
Repository: junrar
The code follows secure coding practices.
|
[
"CWE-835"
] |
CVE-2022-23596
|
MEDIUM
| 5
|
junrar
|
getVolumeManager
|
src/main/java/com/github/junrar/Archive.java
|
7b16b3d90b91445fd6af0adfed22c07413d4fab7
| 0
|
Analyze the following code function for security vulnerabilities
|
public SvnMaterial getSvnMaterial() {
return getExistingOrDefaultMaterial(new SvnMaterial("", "", "", false));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSvnMaterial
File: domain/src/main/java/com/thoughtworks/go/config/materials/Materials.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-39309
|
MEDIUM
| 6.5
|
gocd
|
getSvnMaterial
|
domain/src/main/java/com/thoughtworks/go/config/materials/Materials.java
|
691b479f1310034992da141760e9c5d1f5b60e8a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getSystemDialerPackage() {
try {
Log.startSession("TSI.gSDP");
return mDefaultDialerCache.getSystemDialerApplication();
} finally {
Log.endSession();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSystemDialerPackage
File: src/com/android/server/telecom/TelecomServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21394
|
MEDIUM
| 5.5
|
android
|
getSystemDialerPackage
|
src/com/android/server/telecom/TelecomServiceImpl.java
|
68dca62035c49e14ad26a54f614199cb29a3393f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public UserInfo createUser(String name, int flags) {
checkManageUsersPermission("Only the system can create users");
return createUserInternal(name, flags, UserHandle.USER_NULL);
}
|
Vulnerability Classification:
- CWE: CWE-264
- CVE: CVE-2016-3833
- Severity: HIGH
- CVSS Score: 9.3
Description: Reduce shell power over user management.
Remove MANAGE_USERS permission from shell and whitelist it for
some specific functionality.
Bug: 29189712
Change-Id: Ifb37448c091af91991964511e3efb1bb4dea1ff3
Function: createUser
File: services/core/java/com/android/server/pm/UserManagerService.java
Repository: android
Fixed Code:
@Override
public UserInfo createUser(String name, int flags) {
checkManageOrCreateUsersPermission(flags);
return createUserInternal(name, flags, UserHandle.USER_NULL);
}
|
[
"CWE-264"
] |
CVE-2016-3833
|
HIGH
| 9.3
|
android
|
createUser
|
services/core/java/com/android/server/pm/UserManagerService.java
|
01875b0274e74f97edf6b0d5c92de822e0555d03
| 1
|
Analyze the following code function for security vulnerabilities
|
private ImportResponse buildImportErrorResponse(IdentityApplicationManagementClientException e) {
ImportResponse importResponse = new ImportResponse();
importResponse.setResponseCode(ImportResponse.FAILED);
importResponse.setApplicationName(null);
String errorCode = e.getErrorCode() != null ? e.getErrorCode() : INVALID_REQUEST.getCode();
importResponse.setErrorCode(errorCode);
if (e instanceof IdentityApplicationManagementValidationException) {
importResponse.setErrors(((IdentityApplicationManagementValidationException) e).getValidationMsg());
} else {
String message = e.getMessage();
if (StringUtils.isNotBlank(message)) {
importResponse.setErrors(new String[]{e.getMessage()});
}
}
return importResponse;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: buildImportErrorResponse
File: components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
Repository: wso2/carbon-identity-framework
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-42646
|
MEDIUM
| 6.4
|
wso2/carbon-identity-framework
|
buildImportErrorResponse
|
components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
|
e9119883ee02a884f3c76c7bbc4022a4f4c58fc0
| 0
|
Analyze the following code function for security vulnerabilities
|
private static RMQMessage fromAmqpMessage(byte[] b, RMQMessage msg) throws IOException {
msg.readAmqpBody(b);
return msg;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fromAmqpMessage
File: src/main/java/com/rabbitmq/jms/client/RMQMessage.java
Repository: rabbitmq/rabbitmq-jms-client
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2020-36282
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-jms-client
|
fromAmqpMessage
|
src/main/java/com/rabbitmq/jms/client/RMQMessage.java
|
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void readItems(Element design, DesignContext context) {
// Grid handles reading of items in Grid#readData
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readItems
File: server/src/main/java/com/vaadin/ui/Grid.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-25028
|
MEDIUM
| 4.3
|
vaadin/framework
|
readItems
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public ActivityStarter obtain() {
ActivityStarter starter = mStarterPool.acquire();
if (starter == null) {
if (mService.mRootWindowContainer == null) {
throw new IllegalStateException("Too early to start activity.");
}
starter = new ActivityStarter(mController, mService, mSupervisor, mInterceptor);
}
return starter;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: obtain
File: services/core/java/com/android/server/wm/ActivityStarter.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-269"
] |
CVE-2023-21269
|
HIGH
| 7.8
|
android
|
obtain
|
services/core/java/com/android/server/wm/ActivityStarter.java
|
70ec64dc5a2a816d6aa324190a726a85fd749b30
| 0
|
Analyze the following code function for security vulnerabilities
|
public void doLogout( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException {
securityRealm.doLogout(req, rsp);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doLogout
File: core/src/main/java/jenkins/model/Jenkins.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-2065
|
MEDIUM
| 4.3
|
jenkinsci/jenkins
|
doLogout
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean deselect(final Object... itemIds)
throws IllegalArgumentException {
if (itemIds != null) {
// deselect will fire the event
return deselect(Arrays.asList(itemIds));
} else {
throw new IllegalArgumentException(
"Vararg array of itemIds may not be null");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deselect
File: server/src/main/java/com/vaadin/ui/Grid.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-25028
|
MEDIUM
| 4.3
|
vaadin/framework
|
deselect
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
private Cursor getAllSecureSettings(int userId, String[] projection) {
if (DEBUG) {
Slog.v(LOG_TAG, "getAllSecureSettings(" + userId + ")");
}
// Resolve the userId on whose behalf the call is made.
final int callingUserId = resolveCallingUserIdEnforcingPermissionsLocked(userId);
// The relevant "calling package" userId will be the owning userId for some
// profiles, and we can't do the lookup inside our [lock held] loop, so work out
// up front who the effective "new SSAID" user ID for that settings name will be.
final int ssaidUserId = resolveOwningUserIdForSecureSettingLocked(callingUserId,
Settings.Secure.ANDROID_ID);
final PackageInfo ssaidCallingPkg = getCallingPackageInfo(ssaidUserId);
synchronized (mLock) {
List<String> names = getSettingsNamesLocked(SETTINGS_TYPE_SECURE, callingUserId);
final int nameCount = names.size();
String[] normalizedProjection = normalizeProjection(projection);
MatrixCursor result = new MatrixCursor(normalizedProjection, nameCount);
for (int i = 0; i < nameCount; i++) {
String name = names.get(i);
// Determine the owning user as some profile settings are cloned from the parent.
final int owningUserId = resolveOwningUserIdForSecureSettingLocked(callingUserId,
name);
if (!isSecureSettingAccessible(name)) {
// This caller is not permitted to access this setting. Pretend the setting
// doesn't exist.
continue;
}
try {
enforceSettingReadable(name, SETTINGS_TYPE_SECURE, callingUserId);
} catch (SecurityException e) {
// Caller doesn't have permission to read this setting
continue;
}
// As of Android O, the SSAID is read from an app-specific entry in table
// SETTINGS_FILE_SSAID, unless accessed by a system process.
final Setting setting;
if (isNewSsaidSetting(name)) {
setting = getSsaidSettingLocked(ssaidCallingPkg, owningUserId);
} else {
setting = mSettingsRegistry.getSettingLocked(SETTINGS_TYPE_SECURE, owningUserId,
name);
}
appendSettingToCursor(result, setting);
}
return result;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAllSecureSettings
File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40117
|
HIGH
| 7.8
|
android
|
getAllSecureSettings
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
ff86ff28cf82124f8e65833a2dd8c319aea08945
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Policy createFromParcel(Parcel in) {
Policy policy = new Policy();
policy.setMinHomeDownlinkBandwidth(in.readLong());
policy.setMinHomeUplinkBandwidth(in.readLong());
policy.setMinRoamingDownlinkBandwidth(in.readLong());
policy.setMinRoamingUplinkBandwidth(in.readLong());
policy.setExcludedSsidList(in.createStringArray());
policy.setRequiredProtoPortMap(readProtoPortMap(in));
policy.setMaximumBssLoadValue(in.readInt());
policy.setPreferredRoamingPartnerList(readRoamingPartnerList(in));
policy.setPolicyUpdate(in.readParcelable(null));
return policy;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createFromParcel
File: framework/java/android/net/wifi/hotspot2/pps/Policy.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21240
|
MEDIUM
| 5.5
|
android
|
createFromParcel
|
framework/java/android/net/wifi/hotspot2/pps/Policy.java
|
69119d1d3102e27b6473c785125696881bce9563
| 0
|
Analyze the following code function for security vulnerabilities
|
default List<String> getPermissions() {
List<String> permissions = new ArrayList<>();
permissions.add("*:*");
permissions.add(this.getName().replace('_', ':'));
permissions.add(this.getName().substring(0, this.getName().indexOf('_')) + ":*");
return permissions;
}
|
Vulnerability Classification:
- CWE: CWE-400
- CVE: CVE-2021-21369
- Severity: MEDIUM
- CVSS Score: 4.0
Description: Improvements to authenticated JSON-RPC permissions checking (#1144)
* exit early if matching permission found; add test for *:* permission
Signed-off-by: Sally MacFarlane <sally.macfarlane@consensys.net>
Function: getPermissions
File: ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/JsonRpcMethod.java
Repository: hyperledger/besu
Fixed Code:
default List<String> getPermissions() {
List<String> permissions = new ArrayList<>();
permissions.add("*:*");
permissions.add(this.getName().substring(0, this.getName().indexOf('_')) + ":*");
permissions.add(this.getName().replace('_', ':'));
return permissions;
}
|
[
"CWE-400"
] |
CVE-2021-21369
|
MEDIUM
| 4
|
hyperledger/besu
|
getPermissions
|
ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/JsonRpcMethod.java
|
06e35a58c07a30c0fbdc0aae45a3e8b06b53c022
| 1
|
Analyze the following code function for security vulnerabilities
|
private boolean hasLastProjectPermission(UserDTO user) {
if (StringUtils.isNotBlank(user.getLastProjectId())) {
List<UserGroup> projectUserGroups = user.getUserGroups().stream()
.filter(ug -> StringUtils.equals(user.getLastProjectId(), ug.getSourceId()))
.collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(projectUserGroups)) {
Project project = projectMapper.selectByPrimaryKey(user.getLastProjectId());
if (StringUtils.equals(project.getWorkspaceId(), user.getLastWorkspaceId())) {
return true;
}
// last_project_id 和 last_workspace_id 对应不上了
user.setLastWorkspaceId(project.getWorkspaceId());
updateUser(user);
return true;
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasLastProjectPermission
File: framework/gateway/src/main/java/io/metersphere/gateway/service/UserLoginService.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2023-32699
|
MEDIUM
| 6.5
|
metersphere
|
hasLastProjectPermission
|
framework/gateway/src/main/java/io/metersphere/gateway/service/UserLoginService.java
|
c59e381d368990214813085a1a4877c5ef865411
| 0
|
Analyze the following code function for security vulnerabilities
|
private StudyBean getParentStudy(StudyBean study) {
if (study.getParentStudyId() == 0) {
return study;
} else {
StudyBean parentStudy = (StudyBean) sdao().findByPK(study.getParentStudyId());
return parentStudy;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getParentStudy
File: web/src/main/java/org/akaza/openclinica/controller/BatchCRFMigrationController.java
Repository: OpenClinica
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-24830
|
HIGH
| 7.5
|
OpenClinica
|
getParentStudy
|
web/src/main/java/org/akaza/openclinica/controller/BatchCRFMigrationController.java
|
6f864e86543f903bd20d6f9fc7056115106441f3
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String[] appendSelectionArgs(String[] originalValues, String[] newValues) {
if (originalValues == null || originalValues.length == 0) {
return newValues;
}
String[] result = new String[originalValues.length + newValues.length ];
System.arraycopy(originalValues, 0, result, 0, originalValues.length);
System.arraycopy(newValues, 0, result, originalValues.length, newValues.length);
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: appendSelectionArgs
File: core/java/android/database/DatabaseUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2023-40121
|
MEDIUM
| 5.5
|
android
|
appendSelectionArgs
|
core/java/android/database/DatabaseUtils.java
|
3287ac2d2565dc96bf6177967f8e3aed33954253
| 0
|
Analyze the following code function for security vulnerabilities
|
protected boolean setDocumentFields(DocumentReference documentReference, SolrInputDocument solrDocument)
throws Exception
{
XWikiDocument originalDocument = getDocument(documentReference);
if (originalDocument.isNew()) {
return false;
}
solrDocument.setField(FieldUtils.HIDDEN, originalDocument.isHidden());
solrDocument.setField(FieldUtils.WIKI, documentReference.getWikiReference().getName());
solrDocument.setField(FieldUtils.NAME, documentReference.getName());
// Set the fields that are used to query / filter the document hierarchy.
setHierarchyFields(solrDocument, documentReference.getParent());
Locale locale = getLocale(documentReference);
solrDocument.setField(FieldUtils.LOCALE, locale.toString());
solrDocument.setField(FieldUtils.LANGUAGE, locale.getLanguage());
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDocumentFields
File: xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/internal/metadata/AbstractSolrMetadataExtractor.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-312",
"CWE-200"
] |
CVE-2023-50719
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
setDocumentFields
|
xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/internal/metadata/AbstractSolrMetadataExtractor.java
|
3e5272f2ef0dff06a8f4db10afd1949b2f9e6eea
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setColumns(String... columnIds) {
// Must extract to an explicitly typed variable because otherwise javac
// cannot determine which overload of setColumnOrder to use
Column<T, ?>[] newColumnOrder = Stream.of(columnIds)
.map((Function<String, Column<T, ?>>) id -> {
Column<T, ?> column = getColumn(id);
if (column == null) {
column = addColumn(id);
}
return column;
}).toArray(Column[]::new);
setColumnOrder(newColumnOrder);
// The columns to remove are now at the end of the column list
getColumns().stream().skip(columnIds.length)
.forEach(this::removeColumn);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setColumns
File: server/src/main/java/com/vaadin/ui/Grid.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-25028
|
MEDIUM
| 4.3
|
vaadin/framework
|
setColumns
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public XMLBuilder2 text(String value, boolean replaceText) {
super.textImpl(value, replaceText);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: text
File: src/main/java/com/jamesmurty/utils/XMLBuilder2.java
Repository: jmurty/java-xmlbuilder
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2014-125087
|
MEDIUM
| 5.2
|
jmurty/java-xmlbuilder
|
text
|
src/main/java/com/jamesmurty/utils/XMLBuilder2.java
|
e6fddca201790abab4f2c274341c0bb8835c3e73
| 0
|
Analyze the following code function for security vulnerabilities
|
abstract URL getResourceURL(String resourcePath);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getResourceURL
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/skin/AbstractResourceSkin.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-29253
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
getResourceURL
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/skin/AbstractResourceSkin.java
|
4917c8f355717bb636d763844528b1fe0f95e8e2
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setConnectTimeout(int connectionTimeout) {
this.connectionTimeout = connectionTimeout;
httpClient.property(ClientProperties.CONNECT_TIMEOUT, connectionTimeout);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setConnectTimeout
File: samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
setConnectTimeout
|
samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void destroyModules() {
ArrayList values = new ArrayList();
Enumeration names = getServletContext().getAttributeNames();
while (names.hasMoreElements()) {
values.add(names.nextElement());
}
Iterator keys = values.iterator();
while (keys.hasNext()) {
String name = (String) keys.next();
Object value = getServletContext().getAttribute(name);
if (!(value instanceof ModuleConfig)) {
continue;
}
ModuleConfig config = (ModuleConfig) value;
if (this.getProcessorForModule(config) != null) {
this.getProcessorForModule(config).destroy();
}
getServletContext().removeAttribute(name);
PlugIn plugIns[] =
(PlugIn[]) getServletContext().getAttribute(
Globals.PLUG_INS_KEY + config.getPrefix());
if (plugIns != null) {
for (int i = 0; i < plugIns.length; i++) {
int j = plugIns.length - (i + 1);
plugIns[j].destroy();
}
getServletContext().removeAttribute(
Globals.PLUG_INS_KEY + config.getPrefix());
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: destroyModules
File: src/share/org/apache/struts/action/ActionServlet.java
Repository: kawasima/struts1-forever
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-20"
] |
CVE-2016-1181
|
MEDIUM
| 6.8
|
kawasima/struts1-forever
|
destroyModules
|
src/share/org/apache/struts/action/ActionServlet.java
|
eda3a79907ed8fcb0387a0496d0cb14332f250e8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setEnabledProtocols(String[] protocols) {
if (protocols == null) {
// This is correct from the API docs
throw new IllegalArgumentException();
}
boolean sslv2 = false;
boolean sslv3 = false;
boolean tlsv1 = false;
boolean tlsv1_1 = false;
boolean tlsv1_2 = false;
for (String p: protocols) {
if (!SUPPORTED_PROTOCOLS_SET.contains(p)) {
throw new IllegalArgumentException("Protocol " + p + " is not supported.");
}
if (p.equals(PROTOCOL_SSL_V2)) {
sslv2 = true;
} else if (p.equals(PROTOCOL_SSL_V3)) {
sslv3 = true;
} else if (p.equals(PROTOCOL_TLS_V1)) {
tlsv1 = true;
} else if (p.equals(PROTOCOL_TLS_V1_1)) {
tlsv1_1 = true;
} else if (p.equals(PROTOCOL_TLS_V1_2)) {
tlsv1_2 = true;
}
}
synchronized (this) {
if (!isDestroyed()) {
// Enable all and then disable what we not want
SSL.setOptions(ssl, SSL.SSL_OP_ALL);
// Clear out options which disable protocols
SSL.clearOptions(ssl, SSL.SSL_OP_NO_SSLv2 | SSL.SSL_OP_NO_SSLv3 | SSL.SSL_OP_NO_TLSv1 |
SSL.SSL_OP_NO_TLSv1_1 | SSL.SSL_OP_NO_TLSv1_2);
int opts = 0;
if (!sslv2) {
opts |= SSL.SSL_OP_NO_SSLv2;
}
if (!sslv3) {
opts |= SSL.SSL_OP_NO_SSLv3;
}
if (!tlsv1) {
opts |= SSL.SSL_OP_NO_TLSv1;
}
if (!tlsv1_1) {
opts |= SSL.SSL_OP_NO_TLSv1_1;
}
if (!tlsv1_2) {
opts |= SSL.SSL_OP_NO_TLSv1_2;
}
// Disable protocols we do not want
SSL.setOptions(ssl, opts);
} else {
throw new IllegalStateException("failed to enable protocols: " + Arrays.asList(protocols));
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setEnabledProtocols
File: handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-835"
] |
CVE-2016-4970
|
HIGH
| 7.8
|
netty
|
setEnabledProtocols
|
handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java
|
bc8291c80912a39fbd2303e18476d15751af0bf1
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int startActivitiesAsPackage(String packageName, int userId, Intent[] intents,
Bundle bOptions) {
Preconditions.checkNotNull(intents, "intents");
final String[] resolvedTypes = new String[intents.length];
// UID of the package on user userId.
// "= 0" is needed because otherwise catch(RemoteException) would make it look like
// packageUid may not be initialized.
int packageUid = 0;
final long ident = Binder.clearCallingIdentity();
try {
for (int i = 0; i < intents.length; i++) {
resolvedTypes[i] =
intents[i].resolveTypeIfNeeded(mContext.getContentResolver());
}
packageUid = AppGlobals.getPackageManager().getPackageUid(
packageName, PackageManager.MATCH_DEBUG_TRIAGED_MISSING, userId);
} catch (RemoteException e) {
// Shouldn't happen.
} finally {
Binder.restoreCallingIdentity(ident);
}
synchronized (ActivityManagerService.this) {
return mActivityStartController.startActivitiesInPackage(
packageUid, packageName,
intents, resolvedTypes, null /* resultTo */,
SafeActivityOptions.fromBundle(bOptions), userId,
false /* validateIncomingUser */);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startActivitiesAsPackage
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2018-9492
|
HIGH
| 7.2
|
android
|
startActivitiesAsPackage
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isSupervisionComponent(@NonNull ComponentName who) {
if (!mHasFeature) {
return false;
}
synchronized (getLockObject()) {
if (mConstants.USE_TEST_ADMIN_AS_SUPERVISION_COMPONENT) {
final CallerIdentity caller = getCallerIdentity();
if (isAdminTestOnlyLocked(who, caller.getUserId())) {
return true;
}
}
return isSupervisionComponentLocked(who);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isSupervisionComponent
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2023-21284
|
MEDIUM
| 5.5
|
android
|
isSupervisionComponent
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
private void doNextStep(Context context, HttpServletRequest request,
HttpServletResponse response, SubmissionInfo subInfo, SubmissionStepConfig currentStepConfig)
throws ServletException, IOException, SQLException,
AuthorizeException
{
// find current Step number
int currentStepNum;
if (currentStepConfig == null)
{
currentStepNum = -1;
}
else
{
currentStepNum = currentStepConfig.getStepNumber();
}
// as long as there are more steps after the current step,
// do the next step in the current Submission Process
if (subInfo.getSubmissionConfig().hasMoreSteps(currentStepNum))
{
// update the current step & do this step
currentStepNum++;
//flag that we are going to the start of this next step (for JSPStepManager class)
setBeginningOfStep(request, true);
doStep(context, request, response, subInfo, currentStepNum);
}
else
{
//if this submission is in the workflow process,
//forward user back to relevant task page
if(subInfo.isInWorkflow())
{
request.setAttribute("workflow.item", subInfo.getSubmissionItem());
JSPManager.showJSP(request, response,
"/mydspace/perform-task.jsp");
}
else
{
// The Submission is COMPLETE!!
// save our current Submission information into the Request object
saveSubmissionInfo(request, subInfo);
// forward to completion JSP
showProgressAwareJSP(request, response, subInfo, COMPLETE_JSP);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doNextStep
File: dspace-jspui/src/main/java/org/dspace/app/webui/servlet/SubmissionController.java
Repository: DSpace
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-31194
|
HIGH
| 7.2
|
DSpace
|
doNextStep
|
dspace-jspui/src/main/java/org/dspace/app/webui/servlet/SubmissionController.java
|
d1dd7d23329ef055069759df15cfa200c8e3
| 0
|
Analyze the following code function for security vulnerabilities
|
private void migrate71(File dataDir, Stack<Integer> versions) {
Map<String, String> issueScopes = new HashMap<>();
Map<Pair<String, String>, String> issueIds = new HashMap<>();
Map<Pair<String, String>, String> buildIds = new HashMap<>();
Map<Pair<String, String>, String> pullRequestIds = new HashMap<>();
for (File file: dataDir.listFiles()) {
if (file.getName().startsWith("Issues.xml")) {
VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file);
for (Element element: dom.getRootElement().elements()) {
String issueId = element.elementTextTrim("id");
String numberScope = element.elementTextTrim("numberScope");
issueScopes.put(issueId, numberScope);
issueIds.put(new Pair<>(numberScope, element.elementTextTrim("number")), issueId);
}
} else if (file.getName().startsWith("Builds.xml")) {
VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file);
for (Element element: dom.getRootElement().elements()) {
String buildId = element.elementTextTrim("id");
String numberScope = element.elementTextTrim("numberScope");
String number = element.elementTextTrim("number");
buildIds.put(new Pair<>(numberScope, number), buildId);
}
} else if (file.getName().startsWith("PullRequests.xml")) {
VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file);
for (Element element: dom.getRootElement().elements()) {
String pullRequestId = element.elementTextTrim("id");
String numberScope = element.elementTextTrim("numberScope");
String number = element.elementTextTrim("number");
pullRequestIds.put(new Pair<>(numberScope, number), pullRequestId);
}
}
}
for (File file: dataDir.listFiles()) {
if (file.getName().startsWith("IssueFields.xml")) {
VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file);
for (Element element: dom.getRootElement().elements()) {
String issueId = element.elementTextTrim("issue");
String type = element.elementText("type").trim();
String value = element.elementTextTrim("value");
if (type.equals("Issue")) {
String fieldIssueId = issueIds.get(new Pair<>(issueScopes.get(issueId), value));
if (fieldIssueId != null)
element.element("value").setText(fieldIssueId);
else
element.detach();
} else if (type.equals("Build")) {
String fieldBuildId = buildIds.get(new Pair<>(issueScopes.get(issueId), value));
if (fieldBuildId != null)
element.element("value").setText(fieldBuildId);
else
element.detach();
} else if (type.equals("Pull Request")) {
String fieldPullRequestId = pullRequestIds.get(new Pair<>(issueScopes.get(issueId), value));
if (fieldPullRequestId != null)
element.element("value").setText(fieldPullRequestId);
else
element.detach();
}
}
dom.writeToFile(file, false);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: migrate71
File: server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-338"
] |
CVE-2023-24828
|
HIGH
| 8.8
|
theonedev/onedev
|
migrate71
|
server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
|
d67dd9686897fe5e4ab881d749464aa7c06a68e5
| 0
|
Analyze the following code function for security vulnerabilities
|
private AppWithinMinutesHomePage createApplication(String appName)
{
ApplicationCreatePage appCreatePage = AppWithinMinutesHomePage.gotoPage().clickCreateApplication();
appCreatePage.setApplicationName(appName);
ApplicationClassEditPage classEditPage = appCreatePage.clickNextStep();
classEditPage.addField("Short Text");
classEditPage.clickNextStep().clickNextStep().clickFinish();
return AppWithinMinutesHomePage.gotoPage();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createApplication
File: xwiki-platform-core/xwiki-platform-appwithinminutes/xwiki-platform-appwithinminutes-test/xwiki-platform-appwithinminutes-test-docker/src/test/it/org/xwiki/appwithinminutes/test/ui/AppsLiveTableIT.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-29515
|
MEDIUM
| 5.4
|
xwiki/xwiki-platform
|
createApplication
|
xwiki-platform-core/xwiki-platform-appwithinminutes/xwiki-platform-appwithinminutes-test/xwiki-platform-appwithinminutes-test-docker/src/test/it/org/xwiki/appwithinminutes/test/ui/AppsLiveTableIT.java
|
e73b890623efa604adc484ad82f37e31596fe1a6
| 0
|
Analyze the following code function for security vulnerabilities
|
private void registerResource(Bundle bundle) {
Dictionary<String, String> properties = new Hashtable<String, String>();
properties.put(
HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_PATTERN,
getResourceURI());
String contextName = getContextName();
if (contextName != null) {
properties.put(
HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_SELECT,
"(" + HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_NAME
+ "=" + contextName + ")");
}
resourceRegistration = bundle.getBundleContext().registerService(
Servlet.class,
new ResourceServlet(bundle, getResourcePath()), properties);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: registerResource
File: flow-osgi/src/main/java/com/vaadin/flow/osgi/support/AppConfigFactoryTracker.java
Repository: vaadin/osgi
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-31407
|
MEDIUM
| 5
|
vaadin/osgi
|
registerResource
|
flow-osgi/src/main/java/com/vaadin/flow/osgi/support/AppConfigFactoryTracker.java
|
3e17674c2e3f88b6e682872c42b7d0ad7d9c4ad8
| 0
|
Analyze the following code function for security vulnerabilities
|
public DocumentReference getParentReference()
{
// Ensure we always return absolute document references for the parent since we always want well-constructed
// references and since we store the parent reference as relative internally.
if (this.parentReferenceCache == null && getRelativeParentReference() != null) {
this.parentReferenceCache = intern(getExplicitReferenceDocumentReferenceResolver()
.resolve(getRelativeParentReference(), getDocumentReference()));
}
return this.parentReferenceCache;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getParentReference
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-26470
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
getParentReference
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
protected final static double _parseDouble(final String numStr, final boolean useFastParser) throws NumberFormatException
{
return NumberInput.parseDouble(numStr, useFastParser);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _parseDouble
File: src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2022-42003
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
_parseDouble
|
src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java
|
d78d00ee7b5245b93103fef3187f70543d67ca33
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setPersistentVrThread(int tid) {
if (checkCallingPermission(Manifest.permission.RESTRICTED_VR_ACCESS)
!= PERMISSION_GRANTED) {
final String msg = "Permission Denial: setPersistentVrThread() from pid="
+ Binder.getCallingPid()
+ ", uid=" + Binder.getCallingUid()
+ " requires " + Manifest.permission.RESTRICTED_VR_ACCESS;
Slog.w(TAG, msg);
throw new SecurityException(msg);
}
enforceSystemHasVrFeature();
synchronized (mGlobalLock) {
final int pid = Binder.getCallingPid();
final WindowProcessController proc = mProcessMap.getProcess(pid);
mVrController.setPersistentVrThreadLocked(tid, pid, proc);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setPersistentVrThread
File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40094
|
HIGH
| 7.8
|
android
|
setPersistentVrThread
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
final void cancelBroadcastTimeoutLocked() {
if (mPendingBroadcastTimeoutMessage) {
mHandler.removeMessages(BROADCAST_TIMEOUT_MSG, this);
mPendingBroadcastTimeoutMessage = false;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cancelBroadcastTimeoutLocked
File: services/core/java/com/android/server/am/BroadcastQueue.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3912
|
HIGH
| 9.3
|
android
|
cancelBroadcastTimeoutLocked
|
services/core/java/com/android/server/am/BroadcastQueue.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
@SuppressFBWarnings("EI_EXPOSE_REP")
public DomNode getParentNode() {
return parent_;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getParentNode
File: src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
Repository: HtmlUnit/htmlunit
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-2798
|
HIGH
| 7.5
|
HtmlUnit/htmlunit
|
getParentNode
|
src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
|
940dc7fd
| 0
|
Analyze the following code function for security vulnerabilities
|
private <T> T deserialize(String content, Class<T> type) {
if (type == null) {
return null;
}
try {
return MarshallerFactory.getMarshaller(MarshallingFormat.JSON, this.getClass().getClassLoader()).unmarshall(content, type);
} catch ( MarshallingException e ) {
throw new IllegalStateException( "Error while deserializing data received from server!", e );
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deserialize
File: kie-server-parent/kie-server-services/kie-server-services-common/src/main/java/org/kie/server/services/impl/controller/DefaultRestControllerImpl.java
Repository: kiegroup/droolsjbpm-integration
The code follows secure coding practices.
|
[
"CWE-260"
] |
CVE-2016-7043
|
MEDIUM
| 5
|
kiegroup/droolsjbpm-integration
|
deserialize
|
kie-server-parent/kie-server-services/kie-server-services-common/src/main/java/org/kie/server/services/impl/controller/DefaultRestControllerImpl.java
|
e916032edd47aa46d15f3a11909b4804ee20a7e8
| 0
|
Analyze the following code function for security vulnerabilities
|
void playDtmfTone(Call call, char digit) {
if (!mCalls.contains(call)) {
Log.i(this, "Request to play DTMF in a non-existent call %s", call);
} else {
call.playDtmfTone(digit);
mDtmfLocalTonePlayer.playTone(call, digit);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: playDtmfTone
File: src/com/android/server/telecom/CallsManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2423
|
MEDIUM
| 6.6
|
android
|
playDtmfTone
|
src/com/android/server/telecom/CallsManager.java
|
a06c9a4aef69ae27b951523cf72bf72412bf48fa
| 0
|
Analyze the following code function for security vulnerabilities
|
public JSONAware handleGetRequest(String pUri, String pPathInfo, Map<String, String[]> pParameterMap) {
String pathInfo = extractPathInfo(pUri, pPathInfo);
JmxRequest jmxReq =
JmxRequestFactory.createGetRequest(pathInfo,getProcessingParameter(pParameterMap));
if (backendManager.isDebug()) {
logHandler.debug("URI: " + pUri);
logHandler.debug("Path-Info: " + pathInfo);
logHandler.debug("Request: " + jmxReq.toString());
}
return executeRequest(jmxReq);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleGetRequest
File: agent/core/src/main/java/org/jolokia/http/HttpRequestHandler.java
Repository: jolokia
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2014-0168
|
MEDIUM
| 6.8
|
jolokia
|
handleGetRequest
|
agent/core/src/main/java/org/jolokia/http/HttpRequestHandler.java
|
2d9b168cfbbf5a6d16fa6e8a5b34503e3dc42364
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean hasAccessLevel(String level)
{
try {
return getXWikiContext().getWiki().getRightService().hasAccessLevel(level, getXWikiContext().getUser(),
this.getPrefixedFullName(), getXWikiContext());
} catch (Exception e) {
return false;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasAccessLevel
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-23615
|
MEDIUM
| 5.5
|
xwiki/xwiki-platform
|
hasAccessLevel
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
|
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
| 0
|
Analyze the following code function for security vulnerabilities
|
private void syncBlockDb() {
loadPolicyFile();
// sync bans from ranker into app opps
Map<Integer, String> packageBans = mRankingHelper.getPackageBans();
for(Entry<Integer, String> ban : packageBans.entrySet()) {
final int uid = ban.getKey();
final String packageName = ban.getValue();
setNotificationsEnabledForPackageImpl(packageName, uid, false);
}
// sync bans from app opps into ranker
packageBans.clear();
for (UserInfo user : UserManager.get(getContext()).getUsers()) {
final int userId = user.getUserHandle().getIdentifier();
final PackageManager packageManager = getContext().getPackageManager();
List<PackageInfo> packages = packageManager.getInstalledPackagesAsUser(0, userId);
final int packageCount = packages.size();
for (int p = 0; p < packageCount; p++) {
final String packageName = packages.get(p).packageName;
try {
final int uid = packageManager.getPackageUidAsUser(packageName, userId);
if (!checkNotificationOp(packageName, uid)) {
packageBans.put(uid, packageName);
}
} catch (NameNotFoundException e) {
// forget you
}
}
}
for (Entry<Integer, String> ban : packageBans.entrySet()) {
mRankingHelper.setImportance(ban.getValue(), ban.getKey(), IMPORTANCE_NONE);
}
savePolicyFile();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: syncBlockDb
File: services/core/java/com/android/server/notification/NotificationManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3884
|
MEDIUM
| 4.3
|
android
|
syncBlockDb
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
private Response ingest(final String wdID, final HttpServletRequest request) {
/* Note: We use a MultivaluedMap here to ensure that we can get any arbitrary form parameters. This is required to
* enable things like holding for trim or distributing to YouTube. */
final MultivaluedMap<String, String> formData = new MultivaluedHashMap<>();
if (ServletFileUpload.isMultipartContent(request)) {
// parse form fields
try {
for (FileItemIterator iter = new ServletFileUpload().getItemIterator(request); iter.hasNext();) {
FileItemStream item = iter.next();
if (item.isFormField()) {
final String value = Streams.asString(item.openStream(), "UTF-8");
formData.putSingle(item.getFieldName(), value);
}
}
} catch (FileUploadException | IOException e) {
return Response.status(Response.Status.BAD_REQUEST).build();
}
} else {
request.getParameterMap().forEach((key, value) -> formData.put(key, Arrays.asList(value)));
}
final Map<String, String> wfConfig = getWorkflowConfig(formData);
if (StringUtils.isNotBlank(wdID))
wfConfig.put(WORKFLOW_DEFINITION_ID_PARAM, wdID);
final MediaPackage mp;
try {
mp = factory.newMediaPackageBuilder().loadFromXml(formData.getFirst("mediaPackage"));
if (MediaPackageSupport.sanityCheck(mp).isSome()) {
logger.warn("Rejected ingest with invalid mediapackage {}", mp);
return Response.status(Status.BAD_REQUEST).build();
}
} catch (Exception e) {
logger.warn("Rejected ingest without mediapackage");
return Response.status(Status.BAD_REQUEST).build();
}
final String workflowInstance = wfConfig.get(WORKFLOW_INSTANCE_ID_PARAM);
final String workflowDefinition = wfConfig.get(WORKFLOW_DEFINITION_ID_PARAM);
// Adding ingest start time to workflow configuration
wfConfig.put(IngestService.START_DATE_KEY, formatter.format(startCache.asMap().get(mp.getIdentifier().toString())));
final X<WorkflowInstance> ingest = new X<WorkflowInstance>() {
@Override
public WorkflowInstance xapply() throws Exception {
/* Legacy support: Try to convert the workflowInstance to integer */
Long workflowInstanceId = null;
if (StringUtils.isNotBlank(workflowInstance)) {
try {
workflowInstanceId = Long.parseLong(workflowInstance);
} catch (NumberFormatException e) {
// The workflowId is not a long value and might be the media package identifier
wfConfig.put(IngestServiceImpl.LEGACY_MEDIAPACKAGE_ID_KEY, workflowInstance);
}
}
if (workflowInstanceId != null) {
return ingestService.ingest(mp, trimToNull(workflowDefinition), wfConfig, workflowInstanceId);
} else {
return ingestService.ingest(mp, trimToNull(workflowDefinition), wfConfig);
}
}
};
try {
WorkflowInstance workflow = ingest.apply();
startCache.asMap().remove(mp.getIdentifier().toString());
return Response.ok(WorkflowParser.toXml(workflow)).build();
} catch (Exception e) {
logger.warn(e.getMessage(), e);
return Response.serverError().status(Status.INTERNAL_SERVER_ERROR).build();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: ingest
File: modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/endpoint/IngestRestService.java
Repository: opencast
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2020-5230
|
MEDIUM
| 5
|
opencast
|
ingest
|
modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/endpoint/IngestRestService.java
|
bbb473f34ab95497d6c432c81285efb0c739f317
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean processXml() throws WebdavException {
if (!isAppXml()) {
return false;
}
try {
reqRdr = req.getReader();
} catch (final Throwable t) {
throw new WebdavException(t);
}
xmlDoc = parseXml(reqRdr);
getTheReader = false;
return true;
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2018-20000
- Severity: MEDIUM
- CVSS Score: 5.0
Description: secure-xml: welcome secure xml interface providing a safe parser
Function: processXml
File: src/main/java/org/bedework/webdav/servlet/common/PostRequestPars.java
Repository: Bedework/bw-webdav
Fixed Code:
public boolean processXml() throws WebdavException {
if (!isAppXml()) {
return false;
}
try {
reqRdr = req.getReader();
} catch (final Throwable t) {
throw new WebdavException(t);
}
xmlDoc = parseXmlSafely(req.getContentLength(), reqRdr);
getTheReader = false;
return true;
}
|
[
"CWE-611"
] |
CVE-2018-20000
|
MEDIUM
| 5
|
Bedework/bw-webdav
|
processXml
|
src/main/java/org/bedework/webdav/servlet/common/PostRequestPars.java
|
67283fb8b9609acdb1a8d2e7fefe195b4a261062
| 1
|
Analyze the following code function for security vulnerabilities
|
public List<String> getShellArgsList()
{
List<String> shellArgs = new ArrayList<String>();
List<String> existingShellArgs = super.getShellArgsList();
if ( ( existingShellArgs != null ) && !existingShellArgs.isEmpty() )
{
shellArgs.addAll( existingShellArgs );
}
shellArgs.add( "-c" );
return shellArgs;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getShellArgsList
File: src/main/java/org/apache/maven/shared/utils/cli/shell/BourneShell.java
Repository: apache/maven-shared-utils
The code follows secure coding practices.
|
[
"CWE-116"
] |
CVE-2022-29599
|
HIGH
| 7.5
|
apache/maven-shared-utils
|
getShellArgsList
|
src/main/java/org/apache/maven/shared/utils/cli/shell/BourneShell.java
|
2735facbbbc2e13546328cb02dbb401b3776eea3
| 0
|
Analyze the following code function for security vulnerabilities
|
private void addInformationTo(ErrorWriter errorWriter, Class type, Converter converter, Object parent) {
errorWriter.add("class", type.getName());
errorWriter.add("required-type", getRequiredType().getName());
errorWriter.add("converter-type", converter.getClass().getName());
if (converter instanceof ErrorReporter) {
((ErrorReporter)converter).appendErrors(errorWriter);
}
if (parent instanceof ErrorReporter) {
((ErrorReporter)parent).appendErrors(errorWriter);
}
reader.appendErrors(errorWriter);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addInformationTo
File: xstream/src/java/com/thoughtworks/xstream/core/TreeUnmarshaller.java
Repository: x-stream/xstream
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-43859
|
MEDIUM
| 5
|
x-stream/xstream
|
addInformationTo
|
xstream/src/java/com/thoughtworks/xstream/core/TreeUnmarshaller.java
|
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
| 0
|
Analyze the following code function for security vulnerabilities
|
public String ParamAsRealPathVerified(String param)
{
String path;
File fpath;
path = getConfiguration().getProperty(param);
if (path == null) {
return null;
}
fpath = new File(path);
if (fpath.exists()) {
return path;
}
path = getRealPath(path);
if (path == null) {
return null;
}
fpath = new File(path);
if (fpath.exists()) {
return path;
} else {
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: ParamAsRealPathVerified
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-32620
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
ParamAsRealPathVerified
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public void setStringListValue(String className, String fieldName, List value)
{
setStringListValue(
getXClassEntityReferenceResolver().resolve(className, EntityType.DOCUMENT, getDocumentReference()),
fieldName, value);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setStringListValue
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-26470
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
setStringListValue
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isSeparateProfileChallengeAllowedToUnify(int userHandle) {
return getDevicePolicyManager().isProfileActivePasswordSufficientForParent(userHandle);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isSeparateProfileChallengeAllowedToUnify
File: core/java/com/android/internal/widget/LockPatternUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3908
|
MEDIUM
| 4.3
|
android
|
isSeparateProfileChallengeAllowedToUnify
|
core/java/com/android/internal/widget/LockPatternUtils.java
|
96daf7d4893f614714761af2d53dfb93214a32e4
| 0
|
Analyze the following code function for security vulnerabilities
|
public int readUnsignedShort() throws IOException {
return primitiveTypes.readUnsignedShort();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readUnsignedShort
File: luni/src/main/java/java/io/ObjectInputStream.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-7911
|
HIGH
| 7.2
|
android
|
readUnsignedShort
|
luni/src/main/java/java/io/ObjectInputStream.java
|
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean targetMatch(Long tid) {
return targetId.equals(tid);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: targetMatch
File: backend/src/main/java/io/dataease/service/panel/ShareService.java
Repository: dataease
The code follows secure coding practices.
|
[
"CWE-639"
] |
CVE-2023-32310
|
HIGH
| 8.1
|
dataease
|
targetMatch
|
backend/src/main/java/io/dataease/service/panel/ShareService.java
|
72f428e87b5395c03d2f94ef6185fc247ddbc8dc
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean hasImage() {
if (isStyle(MessagingStyle.class) && extras != null) {
final Parcelable[] messages = extras.getParcelableArray(EXTRA_MESSAGES);
if (!ArrayUtils.isEmpty(messages)) {
for (MessagingStyle.Message m : MessagingStyle.Message
.getMessagesFromBundleArray(messages)) {
if (m.getDataUri() != null
&& m.getDataMimeType() != null
&& m.getDataMimeType().startsWith("image/")) {
return true;
}
}
}
} else if (hasLargeIcon()) {
return true;
} else if (extras.containsKey(EXTRA_BACKGROUND_IMAGE_URI)) {
return true;
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasImage
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
hasImage
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
public Connection newConnection(ExecutorService executor, String connectionName) throws IOException, TimeoutException {
return newConnection(executor, Collections.singletonList(new Address(getHost(), getPort())), connectionName);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: newConnection
File: src/main/java/com/rabbitmq/client/ConnectionFactory.java
Repository: rabbitmq/rabbitmq-java-client
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-46120
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-java-client
|
newConnection
|
src/main/java/com/rabbitmq/client/ConnectionFactory.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
public void sessionCreated(HttpSession session) {
SessionHolder.sessionCreated(session);
conversationContextActivator.sessionCreated(session);
sessionInitializedEvent.fire(session);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sessionCreated
File: impl/src/main/java/org/jboss/weld/servlet/HttpContextLifecycle.java
Repository: weld/core
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2014-8122
|
MEDIUM
| 4.3
|
weld/core
|
sessionCreated
|
impl/src/main/java/org/jboss/weld/servlet/HttpContextLifecycle.java
|
8e413202fa1af08c09c580f444e4fd16874f9c65
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void doAddEmail(UserRequest ureq) {
String title = translate("add.email");
removeAsListenerAndDispose(emailCalloutCtrl);
boolean allowExtern = FolderConfig.getSendDocumentToExtern();
emailCalloutCtrl = new EMailCalloutCtrl(ureq, getWindowControl(), allowExtern);
listenTo(emailCalloutCtrl);
removeAsListenerAndDispose(calloutCtrl);
calloutCtrl = new CloseableCalloutWindowController(ureq, getWindowControl(), emailCalloutCtrl.getInitialComponent(), addEmailLink, title, true, null);
listenTo(calloutCtrl);
calloutCtrl.activate();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doAddEmail
File: src/main/java/org/olat/core/util/mail/ui/SendDocumentsByEMailController.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-41152
|
MEDIUM
| 4
|
OpenOLAT
|
doAddEmail
|
src/main/java/org/olat/core/util/mail/ui/SendDocumentsByEMailController.java
|
418bb509ffcb0e25ab4390563c6c47f0458583eb
| 0
|
Analyze the following code function for security vulnerabilities
|
static String guessBetterFormat(ImportingJob job, ArrayNode fileRecords, String bestFormat) {
if (bestFormat != null && fileRecords != null && fileRecords.size() > 0) {
ObjectNode firstFileRecord = JSONUtilities.getObjectElement(fileRecords, 0);
String encoding = getEncoding(firstFileRecord);
String location = JSONUtilities.getString(firstFileRecord, "location", null);
if (location != null) {
File file = new File(job.getRawDataDir(), location);
while (true) {
String betterFormat = null;
List<FormatGuesser> guessers = ImportingManager.formatToGuessers.get(bestFormat);
if (guessers != null) {
for (FormatGuesser guesser : guessers) {
betterFormat = guesser.guess(file, encoding, bestFormat);
if (betterFormat != null) {
break;
}
}
}
if (betterFormat != null && !betterFormat.equals(bestFormat)) {
bestFormat = betterFormat;
} else {
break;
}
}
}
}
return bestFormat;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: guessBetterFormat
File: main/src/com/google/refine/importing/ImportingUtilities.java
Repository: OpenRefine
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-19859
|
MEDIUM
| 4
|
OpenRefine
|
guessBetterFormat
|
main/src/com/google/refine/importing/ImportingUtilities.java
|
e243e73e4064de87a913946bd320fbbe246da656
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<String> getCrossProfileCalendarPackages(ComponentName who) {
if (!mHasFeature) {
return Collections.emptyList();
}
Objects.requireNonNull(who, "ComponentName is null");
final CallerIdentity caller = getCallerIdentity(who);
synchronized (getLockObject()) {
final ActiveAdmin admin = getProfileOwnerLocked(caller);
return admin.mCrossProfileCalendarPackages;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCrossProfileCalendarPackages
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2023-21284
|
MEDIUM
| 5.5
|
android
|
getCrossProfileCalendarPackages
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
private int compareSignaturesRecover(PackageSignatures existingSigs,
PackageParser.Package scannedPkg) {
if (!isRecoverSignatureUpdateNeeded(scannedPkg)) {
return PackageManager.SIGNATURE_NO_MATCH;
}
String msg = null;
try {
if (Signature.areEffectiveMatch(existingSigs.mSignatures, scannedPkg.mSignatures)) {
logCriticalInfo(Log.INFO, "Recovered effectively matching certificates for "
+ scannedPkg.packageName);
return PackageManager.SIGNATURE_MATCH;
}
} catch (CertificateException e) {
msg = e.getMessage();
}
logCriticalInfo(Log.INFO,
"Failed to recover certificates for " + scannedPkg.packageName + ": " + msg);
return PackageManager.SIGNATURE_NO_MATCH;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: compareSignaturesRecover
File: services/core/java/com/android/server/pm/PackageManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2016-2497
|
HIGH
| 7.5
|
android
|
compareSignaturesRecover
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
public static Node getAttribute(Node node, String name) {
return node.getAttributes().getNamedItem(name);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAttribute
File: src/edu/stanford/nlp/time/XMLUtils.java
Repository: stanfordnlp/CoreNLP
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-3869
|
MEDIUM
| 5
|
stanfordnlp/CoreNLP
|
getAttribute
|
src/edu/stanford/nlp/time/XMLUtils.java
|
5d83f1e8482ca304db8be726cad89554c88f136a
| 0
|
Analyze the following code function for security vulnerabilities
|
XMLFormattingPreferences create(final Properties properties) {
SpotlessPreferences.configureCatalog(properties);
return createFormattingPreference(properties);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: create
File: _ext/eclipse-wtp/src/main/java/com/diffplug/spotless/extra/eclipse/wtp/EclipseXmlFormatterStepImpl.java
Repository: diffplug/spotless
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2019-9843
|
MEDIUM
| 5.1
|
diffplug/spotless
|
create
|
_ext/eclipse-wtp/src/main/java/com/diffplug/spotless/extra/eclipse/wtp/EclipseXmlFormatterStepImpl.java
|
b23ee9ef5ba4b65e7bd0e341c76ed197c06ee83d
| 0
|
Analyze the following code function for security vulnerabilities
|
public String url() {
final StringBuilder url = new StringBuilder();
url.append(hostUrl());
if (path != null) {
url.append(path);
}
final String queryString = queryString();
if (StringUtil.isNotBlank(queryString)) {
url.append('?');
url.append(queryString);
}
if (fragment != null) {
url.append('#');
url.append(fragment);
}
return url.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: url
File: src/main/java/jodd/http/HttpRequest.java
Repository: oblac/jodd-http
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2022-29631
|
MEDIUM
| 5
|
oblac/jodd-http
|
url
|
src/main/java/jodd/http/HttpRequest.java
|
e50f573c8f6a39212ade68c6eb1256b2889fa8a6
| 0
|
Analyze the following code function for security vulnerabilities
|
public static int getTypeFromKey(int key) {
return key >>> SETTINGS_TYPE_SHIFT;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTypeFromKey
File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3876
|
HIGH
| 7.2
|
android
|
getTypeFromKey
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
91fc934bb2e5ea59929bb2f574de6db9b5100745
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void share(String text, String image, String mimeType, Rectangle sourceRect){
/*if(!checkForPermission(Manifest.permission.READ_PHONE_STATE, "This is required to perform share")){
return;
}*/
Intent shareIntent = new Intent(android.content.Intent.ACTION_SEND);
if(image == null){
shareIntent.setType("text/plain");
shareIntent.putExtra(android.content.Intent.EXTRA_TEXT, text);
}else{
shareIntent.setType(mimeType);
shareIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse(fixAttachmentPath(image)));
shareIntent.putExtra(Intent.EXTRA_TEXT, text);
}
getContext().startActivity(Intent.createChooser(shareIntent, "Share with..."));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: share
File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
share
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setAutoTimeZoneEnabled(ComponentName who, boolean enabled) {
if (!mHasFeature) {
return;
}
Objects.requireNonNull(who, "ComponentName is null");
final CallerIdentity caller = getCallerIdentity(who);
Preconditions.checkCallAuthorization(isProfileOwnerOnUser0(caller)
|| isProfileOwnerOfOrganizationOwnedDevice(caller) || isDefaultDeviceOwner(caller));
mInjector.binderWithCleanCallingIdentity(() ->
mInjector.settingsGlobalPutInt(Global.AUTO_TIME_ZONE, enabled ? 1 : 0));
DevicePolicyEventLogger
.createEvent(DevicePolicyEnums.SET_AUTO_TIME_ZONE)
.setAdmin(caller.getComponentName())
.setBoolean(enabled)
.write();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAutoTimeZoneEnabled
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2023-21284
|
MEDIUM
| 5.5
|
android
|
setAutoTimeZoneEnabled
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setValidateSearchParameterExpressionsOnSave(boolean theValidateSearchParameterExpressionsOnSave) {
myValidateSearchParameterExpressionsOnSave = theValidateSearchParameterExpressionsOnSave;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setValidateSearchParameterExpressionsOnSave
File: hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
Repository: hapifhir/hapi-fhir
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-32053
|
MEDIUM
| 5
|
hapifhir/hapi-fhir
|
setValidateSearchParameterExpressionsOnSave
|
hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
|
f2934b229c491235ab0e7782dea86b324521082a
| 0
|
Analyze the following code function for security vulnerabilities
|
private static byte[] decrypt(final BlockCipherAdapter cipher, final byte[] data, final int inOff)
{
final int len = data.length - inOff;
final int outSize = cipher.getOutputSize(len);
final byte[] output = new byte[outSize];
int outOff = cipher.processBytes(data, inOff, len, output, 0);
outOff += cipher.doFinal(output, outOff);
cipher.reset();
if (outOff < output.length) {
final byte[] temp = new byte[outOff];
System.arraycopy(output, 0, temp, 0, outOff);
return temp;
}
return output;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: decrypt
File: src/main/java/org/cryptacular/util/CipherUtil.java
Repository: vt-middleware/cryptacular
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2020-7226
|
MEDIUM
| 5
|
vt-middleware/cryptacular
|
decrypt
|
src/main/java/org/cryptacular/util/CipherUtil.java
|
8c6c7528f1e24c6b71f3e36db0cb8a697256ce25
| 0
|
Analyze the following code function for security vulnerabilities
|
public abstract void run() throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: run
File: services/core/java/com/android/server/accounts/AccountManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-502"
] |
CVE-2023-45777
|
HIGH
| 7.8
|
android
|
run
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void binderDied() {
mGateKeeperService.asBinder().unlinkToDeath(this, 0);
mGateKeeperService = null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: binderDied
File: services/core/java/com/android/server/LockSettingsService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-255"
] |
CVE-2016-3749
|
MEDIUM
| 4.6
|
android
|
binderDied
|
services/core/java/com/android/server/LockSettingsService.java
|
e83f0f6a5a6f35323f5367f99c8e287c440f33f5
| 0
|
Analyze the following code function for security vulnerabilities
|
private void computeLaunchingTaskFlags() {
// If the caller is not coming from another activity, but has given us an explicit task into
// which they would like us to launch the new activity, then let's see about doing that.
if (mSourceRecord == null && mInTask != null && mInTask.getRootTask() != null) {
final Intent baseIntent = mInTask.getBaseIntent();
final ActivityRecord root = mInTask.getRootActivity();
if (baseIntent == null) {
ActivityOptions.abort(mOptions);
throw new IllegalArgumentException("Launching into task without base intent: "
+ mInTask);
}
// If this task is empty, then we are adding the first activity -- it
// determines the root, and must be launching as a NEW_TASK.
if (isLaunchModeOneOf(LAUNCH_SINGLE_INSTANCE, LAUNCH_SINGLE_TASK)) {
if (!baseIntent.getComponent().equals(mStartActivity.intent.getComponent())) {
ActivityOptions.abort(mOptions);
throw new IllegalArgumentException("Trying to launch singleInstance/Task "
+ mStartActivity + " into different task " + mInTask);
}
if (root != null) {
ActivityOptions.abort(mOptions);
throw new IllegalArgumentException("Caller with mInTask " + mInTask
+ " has root " + root + " but target is singleInstance/Task");
}
}
// If task is empty, then adopt the interesting intent launch flags in to the
// activity being started.
if (root == null) {
final int flagsOfInterest = FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_MULTIPLE_TASK
| FLAG_ACTIVITY_NEW_DOCUMENT | FLAG_ACTIVITY_RETAIN_IN_RECENTS;
mLaunchFlags = (mLaunchFlags & ~flagsOfInterest)
| (baseIntent.getFlags() & flagsOfInterest);
mIntent.setFlags(mLaunchFlags);
mInTask.setIntent(mStartActivity);
mAddingToTask = true;
// If the task is not empty and the caller is asking to start it as the root of
// a new task, then we don't actually want to start this on the task. We will
// bring the task to the front, and possibly give it a new intent.
} else if ((mLaunchFlags & FLAG_ACTIVITY_NEW_TASK) != 0) {
mAddingToTask = false;
} else {
mAddingToTask = true;
}
} else {
mInTask = null;
// Launch ResolverActivity in the source task, so that it stays in the task bounds
// when in freeform workspace.
// Also put noDisplay activities in the source task. These by itself can be placed
// in any task/root-task, however it could launch other activities like
// ResolverActivity, and we want those to stay in the original task.
if ((mStartActivity.isResolverOrDelegateActivity() || mStartActivity.noDisplay)
&& mSourceRecord != null && mSourceRecord.inFreeformWindowingMode()) {
mAddingToTask = true;
}
}
if (mInTask == null) {
if (mSourceRecord == null) {
// This activity is not being started from another... in this
// case we -always- start a new task.
if ((mLaunchFlags & FLAG_ACTIVITY_NEW_TASK) == 0 && mInTask == null) {
Slog.w(TAG, "startActivity called from non-Activity context; forcing " +
"Intent.FLAG_ACTIVITY_NEW_TASK for: " + mIntent);
mLaunchFlags |= FLAG_ACTIVITY_NEW_TASK;
}
} else if (mSourceRecord.launchMode == LAUNCH_SINGLE_INSTANCE) {
// The original activity who is starting us is running as a single
// instance... this new activity it is starting must go on its
// own task.
mLaunchFlags |= FLAG_ACTIVITY_NEW_TASK;
} else if (isLaunchModeOneOf(LAUNCH_SINGLE_INSTANCE, LAUNCH_SINGLE_TASK)) {
// The activity being started is a single instance... it always
// gets launched into its own task.
mLaunchFlags |= FLAG_ACTIVITY_NEW_TASK;
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: computeLaunchingTaskFlags
File: services/core/java/com/android/server/wm/ActivityStarter.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-269"
] |
CVE-2023-21269
|
HIGH
| 7.8
|
android
|
computeLaunchingTaskFlags
|
services/core/java/com/android/server/wm/ActivityStarter.java
|
70ec64dc5a2a816d6aa324190a726a85fd749b30
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void formCancelled(UserRequest ureq) {
fireEvent(ureq, FolderCommand.FOLDERCOMMAND_FINISHED);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: formCancelled
File: src/main/java/org/olat/core/util/mail/ui/SendDocumentsByEMailController.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-41152
|
MEDIUM
| 4
|
OpenOLAT
|
formCancelled
|
src/main/java/org/olat/core/util/mail/ui/SendDocumentsByEMailController.java
|
418bb509ffcb0e25ab4390563c6c47f0458583eb
| 0
|
Analyze the following code function for security vulnerabilities
|
static JsonNumber getJsonNumber(int num, int bigIntegerScaleLimit) {
return new JsonIntNumber(num, bigIntegerScaleLimit);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getJsonNumber
File: impl/src/main/java/org/eclipse/parsson/JsonNumberImpl.java
Repository: eclipse-ee4j/parsson
The code follows secure coding practices.
|
[
"CWE-834"
] |
CVE-2023-4043
|
HIGH
| 7.5
|
eclipse-ee4j/parsson
|
getJsonNumber
|
impl/src/main/java/org/eclipse/parsson/JsonNumberImpl.java
|
84764ffbe3d0376da242b27a9a526138d0dfb8e6
| 0
|
Analyze the following code function for security vulnerabilities
|
private static Representer newRepresenter() {
Representer representer = new Representer() {
@SuppressWarnings("rawtypes")
@Override
protected NodeTuple representJavaBeanProperty(Object javaBean, Property property,
Object propertyValue,Tag customTag) {
if (propertyValue == null
|| propertyValue instanceof Collection && ((Collection) propertyValue).isEmpty()
|| propertyValue instanceof Map && ((Map) propertyValue).isEmpty()) {
return null;
} else {
return super.representJavaBeanProperty(javaBean, property, propertyValue, customTag);
}
}
};
representer.setDefaultFlowStyle(FlowStyle.BLOCK);
representer.setPropertyUtils(new PropertyUtils() {
@Override
protected Set<Property> createPropertySet(Class<? extends Object> type, BeanAccess bAccess) {
List<Property> properties = new ArrayList<>();
Map<String, Integer> orders = new HashMap<>();
if (type.getAnnotation(Editable.class) != null) {
for (Method getter: BeanUtils.findGetters(type)) {
Editable editable = getter.getAnnotation(Editable.class);
Method setter = BeanUtils.findSetter(getter);
if (editable != null && setter != null) {
String propertyName = BeanUtils.getPropertyName(getter);
try {
properties.add(new MethodProperty(new PropertyDescriptor(propertyName, getter, setter)));
} catch (IntrospectionException e) {
throw new RuntimeException(e);
}
orders.put(propertyName, editable.order());
}
}
}
Collections.sort(properties, new Comparator<Property>() {
@Override
public int compare(Property o1, Property o2) {
return orders.get(o1.getName()) - orders.get(o2.getName());
}
});
return new LinkedHashSet<>(properties);
}
});
return representer;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: newRepresenter
File: server-core/src/main/java/io/onedev/server/migration/VersionedYamlDoc.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2021-21249
|
MEDIUM
| 6.5
|
theonedev/onedev
|
newRepresenter
|
server-core/src/main/java/io/onedev/server/migration/VersionedYamlDoc.java
|
d6fc4212b1ac1e9bbe3ce444e95f9af1e3ab8b66
| 0
|
Analyze the following code function for security vulnerabilities
|
public Column<T, V> setEditable(boolean editable) {
Objects.requireNonNull(editorBinding,
"Column has no editor binding or component defined");
getState().editable = editable;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setEditable
File: server/src/main/java/com/vaadin/ui/Grid.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-25028
|
MEDIUM
| 4.3
|
vaadin/framework
|
setEditable
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean showAssistFromActivity(IBinder token, Bundle args) throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeStrongBinder(token);
data.writeBundle(args);
mRemote.transact(SHOW_ASSIST_FROM_ACTIVITY_TRANSACTION, data, reply, 0);
reply.readException();
boolean res = reply.readInt() != 0;
data.recycle();
reply.recycle();
return res;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: showAssistFromActivity
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
showAssistFromActivity
|
core/java/android/app/ActivityManagerNative.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.