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
|
private void encryptionAtRestXmlGenerator(XmlGenerator gen, EncryptionAtRestConfig encryptionAtRestConfig) {
if (encryptionAtRestConfig == null) {
gen.node("encryption-at-rest", "enabled", "false");
return;
}
gen.open("encryption-at-rest", "enabled", encryptionAtRestConfig.isEnabled())
.node("key-size", encryptionAtRestConfig.getKeySize());
commonSymmetricEncInterceptorConfigXmlBodyGenerator(gen, encryptionAtRestConfig);
secureStoreXmlGenerator(gen, encryptionAtRestConfig.getSecureStoreConfig());
gen.close();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: encryptionAtRestXmlGenerator
File: hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-522"
] |
CVE-2023-33264
|
MEDIUM
| 4.3
|
hazelcast
|
encryptionAtRestXmlGenerator
|
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
|
80a502d53cc48bf895711ab55f95e3a51e344ac1
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isProtectedBroadcast(String actionName) {
synchronized (mPackages) {
return mProtectedBroadcasts.contains(actionName);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isProtectedBroadcast
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
|
isProtectedBroadcast
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated(since = "3.0M2")
public void setCreator(String creator)
{
setCreatorReference(userStringToReference(creator));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setCreator
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-74"
] |
CVE-2023-29523
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
setCreator
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
0d547181389f7941e53291af940966413823f61c
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean inputDispatchingTimedOut(ProcessRecord proc, String activityShortComponentName,
ApplicationInfo aInfo, String parentShortComponentName,
WindowProcessController parentProcess, boolean aboveSystem, String reason) {
if (checkCallingPermission(FILTER_EVENTS) != PackageManager.PERMISSION_GRANTED) {
throw new SecurityException("Requires permission " + FILTER_EVENTS);
}
final String annotation;
if (reason == null) {
annotation = "Input dispatching timed out";
} else {
annotation = "Input dispatching timed out (" + reason + ")";
}
if (proc != null) {
synchronized (this) {
if (proc.isDebugging()) {
return false;
}
if (proc.getActiveInstrumentation() != null) {
Bundle info = new Bundle();
info.putString("shortMsg", "keyDispatchingTimedOut");
info.putString("longMsg", annotation);
finishInstrumentationLocked(proc, Activity.RESULT_CANCELED, info);
return true;
}
}
mAnrHelper.appNotResponding(proc, activityShortComponentName, aInfo,
parentShortComponentName, parentProcess, aboveSystem, annotation);
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: inputDispatchingTimedOut
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21292
|
MEDIUM
| 5.5
|
android
|
inputDispatchingTimedOut
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setHandshakeSuccess(Channel channel) {
synchronized (handshakeLock) {
handshaking = false;
handshaken = true;
if (handshakeFuture == null) {
handshakeFuture = future(channel);
}
cancelHandshakeTimeout();
}
if (logger.isDebugEnabled()) {
logger.debug(channel + " HANDSHAKEN: " + engine.getSession().getCipherSuite());
}
handshakeFuture.setSuccess();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setHandshakeSuccess
File: src/main/java/org/jboss/netty/handler/ssl/SslHandler.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2014-3488
|
MEDIUM
| 5
|
netty
|
setHandshakeSuccess
|
src/main/java/org/jboss/netty/handler/ssl/SslHandler.java
|
2fa9400a59d0563a66908aba55c41e7285a04994
| 0
|
Analyze the following code function for security vulnerabilities
|
public void forceGuestUser()
{
setSession(null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: forceGuestUser
File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2023-35166
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
forceGuestUser
|
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
|
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
| 0
|
Analyze the following code function for security vulnerabilities
|
public ViewPage createPage(List<String> spaces, String page, String content, String title, String syntaxId)
{
return createPage(spaces, page, content, title, syntaxId, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createPage
File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2023-35166
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
createPage
|
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
|
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getSvg(boolean raw) {
String result = svg;
if (raw) {
return result;
}
if (result.startsWith("<?xml")) {
final int idx = result.indexOf("<svg");
result = result.substring(idx);
}
if (result.startsWith("<svg")) {
final int idx = result.indexOf(">");
result = "<svg>" + result.substring(idx + 1);
}
final String style = extractSvgStyle();
if (style != null) {
final String background = extractBackground(style);
if (background != null) {
result = result.replaceFirst("<g>", "<g><rect fill=\"" + background + "\" style=\"" + style + "\" /> ");
}
}
if (result.startsWith("<svg>") == false) {
throw new IllegalArgumentException();
}
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSvg
File: src/net/sourceforge/plantuml/ugraphic/UImageSvg.java
Repository: plantuml
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-1231
|
MEDIUM
| 4.3
|
plantuml
|
getSvg
|
src/net/sourceforge/plantuml/ugraphic/UImageSvg.java
|
c9137be051ce98b3e3e27f65f54ec7d9f8886903
| 0
|
Analyze the following code function for security vulnerabilities
|
static public InputStream tryOpenAsArchive(File file, String mimeType) {
return tryOpenAsArchive(file, mimeType, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: tryOpenAsArchive
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
|
tryOpenAsArchive
|
main/src/com/google/refine/importing/ImportingUtilities.java
|
e243e73e4064de87a913946bd320fbbe246da656
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void logAndInvokeOnError(
String operationName, AsyncMethodCallback resultHandler, Throwable cause) {
final CentralDogmaException cde = convert(cause);
CentralDogmaExceptions.log(operationName, cde);
resultHandler.onError(cde);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: logAndInvokeOnError
File: server/src/main/java/com/linecorp/centraldogma/server/internal/thrift/CentralDogmaServiceImpl.java
Repository: line/centraldogma
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2021-38388
|
MEDIUM
| 6.5
|
line/centraldogma
|
logAndInvokeOnError
|
server/src/main/java/com/linecorp/centraldogma/server/internal/thrift/CentralDogmaServiceImpl.java
|
e83b558ef9eaa44f71b7d9236bdec9f68c85b8bd
| 0
|
Analyze the following code function for security vulnerabilities
|
public String[] getAdditionalResponseHeaders() {
return additionalResponseHeaders;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAdditionalResponseHeaders
File: server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/ONetworkProtocolHttpAbstract.java
Repository: orientechnologies/orientdb
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2015-2912
|
MEDIUM
| 6.8
|
orientechnologies/orientdb
|
getAdditionalResponseHeaders
|
server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/ONetworkProtocolHttpAbstract.java
|
d5a45e608ba8764fd817c1bdd7cf966564e828e9
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<ADnsAnswer> resolveIPv6AddressForHostname(String hostName, boolean includeIpVersion)
throws InterruptedException, ExecutionException, UnknownHostException {
return resolveIpAddresses(hostName, DnsRecordType.AAAA, includeIpVersion);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resolveIPv6AddressForHostname
File: graylog2-server/src/main/java/org/graylog2/lookup/adapters/dnslookup/DnsClient.java
Repository: Graylog2/graylog2-server
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2023-41045
|
MEDIUM
| 5.3
|
Graylog2/graylog2-server
|
resolveIPv6AddressForHostname
|
graylog2-server/src/main/java/org/graylog2/lookup/adapters/dnslookup/DnsClient.java
|
466af814523cffae9fbc7e77bab7472988f03c3e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void gotoPage(EntityReference reference, String action, String queryString, String fragment)
{
gotoPage(getURL(reference, action, queryString, fragment));
// Update current wiki
EntityReference wikiReference = reference.extractReference(EntityType.WIKI);
if (wikiReference != null) {
this.currentWiki = wikiReference.getName();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: gotoPage
File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2023-35166
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
gotoPage
|
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
|
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
| 0
|
Analyze the following code function for security vulnerabilities
|
public void finishHeavyWeightApp() throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: finishHeavyWeightApp
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
finishHeavyWeightApp
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
private void handleFingerprintError(int msgId, String errString) {
if (msgId == FingerprintManager.FINGERPRINT_ERROR_CANCELED
&& mFingerprintRunningState == FINGERPRINT_STATE_CANCELLING_RESTARTING) {
setFingerprintRunningState(FINGERPRINT_STATE_STOPPED);
startListeningForFingerprint();
} else {
setFingerprintRunningState(FINGERPRINT_STATE_STOPPED);
}
for (int i = 0; i < mCallbacks.size(); i++) {
KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get();
if (cb != null) {
cb.onFingerprintError(msgId, errString);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleFingerprintError
File: packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
handleFingerprintError
|
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable
@Override
public IBinder getUriPermissionOwnerForActivity(@NonNull IBinder activityToken) {
ActivityTaskManagerService.enforceNotIsolatedCaller("getUriPermissionOwnerForActivity");
synchronized (mGlobalLock) {
ActivityRecord r = ActivityRecord.isInRootTaskLocked(activityToken);
return (r == null) ? null : r.getUriPermissionsLocked().getExternalToken();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUriPermissionOwnerForActivity
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
|
getUriPermissionOwnerForActivity
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void batteryPowerChanged(boolean onBattery) {
// When plugging in, update the CPU stats first before changing
// the plug state.
updateCpuStatsNow();
synchronized (this) {
synchronized(mPidsSelfLocked) {
mOnBattery = DEBUG_POWER ? true : onBattery;
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: batteryPowerChanged
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
|
batteryPowerChanged
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public SessionData decode(String data) {
byte[] bytes = Base64.getDecoder().decode(data);
try (ByteArrayInputStream inputStream = new ByteArrayInputStream(bytes);
ObjectInputStream objectInputStream = new ObjectInputStream(inputStream)) {
return (SessionData) objectInputStream.readObject();
} catch (IOException | ClassNotFoundException e) {
throw new PippoRuntimeException(e, "Cannot deserialize session. A new one will be created.");
}
}
|
Vulnerability Classification:
- CWE: CWE-502
- CVE: CVE-2018-18628
- Severity: HIGH
- CVSS Score: 10.0
Description: Fix issue #458
Function: decode
File: pippo-session-parent/pippo-session/src/main/java/ro/pippo/session/SerializationSessionDataTranscoder.java
Repository: pippo-java/pippo
Fixed Code:
@Override
public SessionData decode(String data) {
byte[] bytes = Base64.getDecoder().decode(data);
try (ByteArrayInputStream inputStream = new ByteArrayInputStream(bytes);
FilteringObjectInputStream objectInputStream = new FilteringObjectInputStream(inputStream)) {
return (SessionData) objectInputStream.readObject();
} catch (IOException | ClassNotFoundException e) {
throw new PippoRuntimeException(e, "Cannot deserialize session. A new one will be created.");
}
}
|
[
"CWE-502"
] |
CVE-2018-18628
|
HIGH
| 10
|
pippo-java/pippo
|
decode
|
pippo-session-parent/pippo-session/src/main/java/ro/pippo/session/SerializationSessionDataTranscoder.java
|
a82347d9d3358e98c89b48579d4285d807a57cc0
| 1
|
Analyze the following code function for security vulnerabilities
|
void resizeTaskLocked(TaskRecord task, Rect bounds) {
task.mResizeable = true;
final ActivityStack currentStack = task.stack;
if (currentStack.isHomeStack()) {
// Can't move task off the home stack. Sorry!
return;
}
final int matchingStackId = mWindowManager.getStackIdWithBounds(bounds);
if (matchingStackId != -1) {
// There is already a stack with the right bounds!
if (currentStack != null && currentStack.mStackId == matchingStackId) {
// Nothing to do here. Already in the right stack...
return;
}
// Move task to stack with matching bounds.
moveTaskToStackLocked(task.taskId, matchingStackId, true);
return;
}
if (currentStack != null && currentStack.numTasks() == 1) {
// Just resize the current stack since this is the task in it.
resizeStackLocked(currentStack.mStackId, bounds);
return;
}
// Create new stack and move the task to it.
final int displayId = (currentStack != null && currentStack.mDisplayId != -1)
? currentStack.mDisplayId : Display.DEFAULT_DISPLAY;
ActivityStack newStack = createStackOnDisplay(getNextStackId(), displayId);
if (newStack == null) {
Slog.e(TAG, "resizeTaskLocked: Can't create stack for task=" + task);
return;
}
moveTaskToStackLocked(task.taskId, newStack.mStackId, true);
resizeStackLocked(newStack.mStackId, bounds);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resizeTaskLocked
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
|
resizeTaskLocked
|
services/core/java/com/android/server/am/ActivityStackSupervisor.java
|
468651c86a8adb7aa56c708d2348e99022088af3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void parseQueryMTypeWDSAndFill() throws Exception {
HttpQuery query = NettyMocks.getQuery(tsdb,
"/api/query?start=1h-ago&m=sum:1h-avg-lerp:sys.cpu.0");
TSQuery tsq = (TSQuery) parseQuery.invoke(rpc, tsdb, query, expressions);
TSSubQuery sub = tsq.getQueries().get(0);
assertEquals("1h-avg-lerp", sub.getDownsample());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseQueryMTypeWDSAndFill
File: test/tsd/TestQueryRpc.java
Repository: OpenTSDB/opentsdb
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-25827
|
MEDIUM
| 6.1
|
OpenTSDB/opentsdb
|
parseQueryMTypeWDSAndFill
|
test/tsd/TestQueryRpc.java
|
ff02c1e95e60528275f69b31bcbf7b2ac625cea8
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean styleDisplaysCustomViewInline() {
return mStyle != null && mStyle.displayCustomViewInline();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: styleDisplaysCustomViewInline
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
styleDisplaysCustomViewInline
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
void setSavedState(@Nullable Bundle savedState) {
mIcicle = savedState;
mHaveState = mIcicle != null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSavedState
File: services/core/java/com/android/server/wm/ActivityRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21145
|
HIGH
| 7.8
|
android
|
setSavedState
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
public String parameterToString(Object param) {
if (param == null) {
return "";
} else if (param instanceof Date) {
return formatDate((Date) param);
} else if (param instanceof OffsetDateTime) {
return formatOffsetDateTime((OffsetDateTime) param);
} else if (param instanceof Collection) {
StringBuilder b = new StringBuilder();
for(Object o : (Collection)param) {
if(b.length() > 0) {
b.append(',');
}
b.append(String.valueOf(o));
}
return b.toString();
} else {
return String.valueOf(param);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parameterToString
File: samples/openapi3/client/petstore/java/jersey2-java8/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
|
parameterToString
|
samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public XDOM display(DocumentModelBridge document, DocumentDisplayerParameters parameters)
{
// Protect against infinite recursion which can happen for instance if the document title displayer is called on
// the current document from the title field or from a script within the first content heading.
Deque<DocumentReference> documentReferenceStack = getDocumentReferenceDeque();
if (documentReferenceStack.contains(document.getDocumentReference())) {
this.logger.warn(
"Infinite recursion detected while displaying the title of [{}]. Using the document name as title.",
document.getDocumentReference());
return getStaticTitle(document);
}
documentReferenceStack.push(document.getDocumentReference());
try {
return displayTitle(document, parameters);
} finally {
documentReferenceStack.pop();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: display
File: xwiki-platform-core/xwiki-platform-display/xwiki-platform-display-api/src/main/java/org/xwiki/display/internal/AbstractDocumentTitleDisplayer.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2023-46244
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
display
|
xwiki-platform-core/xwiki-platform-display/xwiki-platform-display-api/src/main/java/org/xwiki/display/internal/AbstractDocumentTitleDisplayer.java
|
11a9170dfe63e59f4066db67f84dbfce4ed619c6
| 0
|
Analyze the following code function for security vulnerabilities
|
public MessagingStyle addMessage(Message message) {
mMessages.add(message);
if (mMessages.size() > MAXIMUM_RETAINED_MESSAGES) {
mMessages.remove(0);
}
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addMessage
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
addMessage
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean browserHasBack(PeerComponent browserPeer) {
return ((AndroidImplementation.AndroidBrowserComponent) browserPeer).hasBack();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: browserHasBack
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
|
browserHasBack
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
void startLockTaskMode(TaskRecord task) {
final String pkg;
synchronized (this) {
pkg = task.intent.getComponent().getPackageName();
}
boolean isSystemInitiated = Binder.getCallingUid() == Process.SYSTEM_UID;
if (!isSystemInitiated && !isLockTaskAuthorized(pkg)) {
StatusBarManagerInternal statusBarManager = LocalServices.getService(
StatusBarManagerInternal.class);
if (statusBarManager != null) {
statusBarManager.showScreenPinningRequest();
}
return;
}
long ident = Binder.clearCallingIdentity();
try {
synchronized (this) {
// Since we lost lock on task, make sure it is still there.
task = mStackSupervisor.anyTaskForIdLocked(task.taskId);
if (task != null) {
if (!isSystemInitiated
&& ((mStackSupervisor.getFocusedStack() == null)
|| (task != mStackSupervisor.getFocusedStack().topTask()))) {
throw new IllegalArgumentException("Invalid task, not in foreground");
}
mStackSupervisor.setLockTaskModeLocked(task, !isSystemInitiated,
"startLockTask");
}
}
} finally {
Binder.restoreCallingIdentity(ident);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startLockTaskMode
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3833
|
MEDIUM
| 4.3
|
android
|
startLockTaskMode
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void updateDeviceIdleTempWhitelist(int[] appids, int changingAppId, boolean adding) {
synchronized (ActivityManagerService.this) {
mDeviceIdleTempWhitelist = appids;
setAppIdTempWhitelistStateLocked(changingAppId, adding);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateDeviceIdleTempWhitelist
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
|
updateDeviceIdleTempWhitelist
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setVideoProvider(String callId, IVideoProvider videoProvider,
Session.Info sessionInfo) {
Log.startSession(sessionInfo, "CSW.sVP", mPackageAbbreviation);
long token = Binder.clearCallingIdentity();
try {
synchronized (mLock) {
logIncoming("setVideoProvider %s", callId);
Call call = mCallIdMapper.getCall(callId);
if (call != null) {
call.setVideoProvider(videoProvider);
}
}
} catch (Throwable t) {
Log.e(ConnectionServiceWrapper.this, t, "");
throw t;
} finally {
Binder.restoreCallingIdentity(token);
Log.endSession();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setVideoProvider
File: src/com/android/server/telecom/ConnectionServiceWrapper.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
setVideoProvider
|
src/com/android/server/telecom/ConnectionServiceWrapper.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setMyViewsTabBar(MyViewsTabBar myViewsTabBar) {
this.myViewsTabBar = myViewsTabBar;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setMyViewsTabBar
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
|
setMyViewsTabBar
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean canAdminGrantSensorsPermissions() {
if (!mHasFeature) {
return false;
}
return mPolicyCache.canAdminGrantSensorsPermissions();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: canAdminGrantSensorsPermissions
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
|
canAdminGrantSensorsPermissions
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean hasNext() throws TreeReaderException {
try {
return parser.hasNext();
} catch (XMLStreamException e) {
throw new TreeReaderException(e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasNext
File: main/src/com/google/refine/importers/XmlImporter.java
Repository: OpenRefine
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-20157
|
MEDIUM
| 5
|
OpenRefine
|
hasNext
|
main/src/com/google/refine/importers/XmlImporter.java
|
6a0d7d56e4ffb420316ce7849fde881344fbf881
| 0
|
Analyze the following code function for security vulnerabilities
|
public static P4Material p4Material(String serverAndPort, String userName, String password, String view, boolean useTickets) {
final P4Material material = new P4Material(serverAndPort, view, userName);
material.setAutoUpdate(true);
material.setPassword(password);
material.setUseTickets(useTickets);
return material;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: p4Material
File: domain/src/test/java/com/thoughtworks/go/helper/MaterialsMother.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-39309
|
MEDIUM
| 6.5
|
gocd
|
p4Material
|
domain/src/test/java/com/thoughtworks/go/helper/MaterialsMother.java
|
691b479f1310034992da141760e9c5d1f5b60e8a
| 0
|
Analyze the following code function for security vulnerabilities
|
void showRelativeAffiliatedTask(boolean showNextTask) {
RecentsTaskLoader loader = RecentsTaskLoader.getInstance();
RecentsTaskLoadPlan plan = loader.createLoadPlan(mContext);
loader.preloadTasks(plan, true /* isTopTaskHome */);
TaskStack stack = plan.getTaskStack();
// Return early if there are no tasks
if (stack.getTaskCount() == 0) return;
ActivityManager.RunningTaskInfo runningTask = mSystemServicesProxy.getTopMostTask();
// Return early if there is no running task (can't determine affiliated tasks in this case)
if (runningTask == null) return;
// Return early if the running task is in the home stack (optimization)
if (mSystemServicesProxy.isInHomeStack(runningTask.id)) return;
// Find the task in the recents list
ArrayList<Task> tasks = stack.getTasks();
Task toTask = null;
ActivityOptions launchOpts = null;
int taskCount = tasks.size();
int numAffiliatedTasks = 0;
for (int i = 0; i < taskCount; i++) {
Task task = tasks.get(i);
if (task.key.id == runningTask.id) {
TaskGrouping group = task.group;
Task.TaskKey toTaskKey;
if (showNextTask) {
toTaskKey = group.getNextTaskInGroup(task);
launchOpts = ActivityOptions.makeCustomAnimation(mContext,
R.anim.recents_launch_next_affiliated_task_target,
R.anim.recents_launch_next_affiliated_task_source);
} else {
toTaskKey = group.getPrevTaskInGroup(task);
launchOpts = ActivityOptions.makeCustomAnimation(mContext,
R.anim.recents_launch_prev_affiliated_task_target,
R.anim.recents_launch_prev_affiliated_task_source);
}
if (toTaskKey != null) {
toTask = stack.findTaskWithId(toTaskKey.id);
}
numAffiliatedTasks = group.getTaskCount();
break;
}
}
// Return early if there is no next task
if (toTask == null) {
if (numAffiliatedTasks > 1) {
if (showNextTask) {
mSystemServicesProxy.startInPlaceAnimationOnFrontMostApplication(
ActivityOptions.makeCustomInPlaceAnimation(mContext,
R.anim.recents_launch_next_affiliated_task_bounce));
} else {
mSystemServicesProxy.startInPlaceAnimationOnFrontMostApplication(
ActivityOptions.makeCustomInPlaceAnimation(mContext,
R.anim.recents_launch_prev_affiliated_task_bounce));
}
}
return;
}
// Launch the task
if (toTask.isActive) {
// Bring an active task to the foreground
mSystemServicesProxy.moveTaskToFront(toTask.key.id, launchOpts);
} else {
mSystemServicesProxy.startActivityFromRecents(mContext, toTask.key.id,
toTask.activityLabel, launchOpts);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: showRelativeAffiliatedTask
File: packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-0813
|
MEDIUM
| 6.6
|
android
|
showRelativeAffiliatedTask
|
packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java
|
16a76dadcc23a13223e9c2216dad1fe5cad7d6e1
| 0
|
Analyze the following code function for security vulnerabilities
|
final int startActivityInPackage(int uid, String callingPackage,
Intent intent, String resolvedType, IBinder resultTo,
String resultWho, int requestCode, int startFlags, Bundle bOptions, int userId,
IActivityContainer container, TaskRecord inTask) {
userId = mUserController.handleIncomingUser(Binder.getCallingPid(), Binder.getCallingUid(),
userId, false, ALLOW_FULL_ONLY, "startActivityInPackage", null);
// TODO: Switch to user app stacks here.
int ret = mActivityStarter.startActivityMayWait(null, uid, callingPackage, intent,
resolvedType, null, null, resultTo, resultWho, requestCode, startFlags,
null, null, null, bOptions, false, userId, container, inTask);
return ret;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startActivityInPackage
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3912
|
HIGH
| 9.3
|
android
|
startActivityInPackage
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
private static boolean isOsx0() {
boolean osx = "osx".equals(NORMALIZED_OS);
if (osx) {
logger.debug("Platform: MacOS");
}
return osx;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isOsx0
File: common/src/main/java/io/netty/util/internal/PlatformDependent.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-668",
"CWE-378",
"CWE-379"
] |
CVE-2022-24823
|
LOW
| 1.9
|
netty
|
isOsx0
|
common/src/main/java/io/netty/util/internal/PlatformDependent.java
|
185f8b2756a36aaa4f973f1a2a025e7d981823f1
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setPort(int port) {
this.port = port;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setPort
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
|
setPort
|
src/main/java/com/rabbitmq/client/ConnectionFactory.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getGroupParent(int profileId) {
final int parentId = mSecurityPolicy.getProfileParent(profileId);
return (parentId != UNKNOWN_USER_ID) ? parentId : profileId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getGroupParent
File: services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-1541
|
MEDIUM
| 4.3
|
android
|
getGroupParent
|
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
|
0b98d304c467184602b4c6bce76fda0b0274bc07
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public DefaultJpaInstanceConfiguration name(final I18NKey name) {
this.name = name;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: name
File: src/main/java/uk/q3c/krail/jpa/persist/DefaultJpaInstanceConfiguration.java
Repository: KrailOrg/krail-jpa
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-15018
|
MEDIUM
| 5.2
|
KrailOrg/krail-jpa
|
name
|
src/main/java/uk/q3c/krail/jpa/persist/DefaultJpaInstanceConfiguration.java
|
c1e848665492e21ef6cc9be443205e36b9a1f6be
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setBackupEnabled(boolean enable) {
mContext.enforceCallingOrSelfPermission(android.Manifest.permission.BACKUP,
"setBackupEnabled");
Slog.i(TAG, "Backup enabled => " + enable);
long oldId = Binder.clearCallingIdentity();
try {
boolean wasEnabled = mEnabled;
synchronized (this) {
Settings.Secure.putInt(mContext.getContentResolver(),
Settings.Secure.BACKUP_ENABLED, enable ? 1 : 0);
mEnabled = enable;
}
synchronized (mQueueLock) {
if (enable && !wasEnabled && mProvisioned) {
// if we've just been enabled, start scheduling backup passes
KeyValueBackupJob.schedule(mContext);
scheduleNextFullBackupJob(0);
} else if (!enable) {
// No longer enabled, so stop running backups
if (MORE_DEBUG) Slog.i(TAG, "Opting out of backup");
KeyValueBackupJob.cancel(mContext);
// This also constitutes an opt-out, so we wipe any data for
// this device from the backend. We start that process with
// an alarm in order to guarantee wakelock states.
if (wasEnabled && mProvisioned) {
// NOTE: we currently flush every registered transport, not just
// the currently-active one.
HashSet<String> allTransports;
synchronized (mTransports) {
allTransports = new HashSet<String>(mTransports.keySet());
}
// build the set of transports for which we are posting an init
for (String transport : allTransports) {
recordInitPendingLocked(true, transport);
}
mAlarmManager.set(AlarmManager.RTC_WAKEUP, System.currentTimeMillis(),
mRunInitIntent);
}
}
}
} finally {
Binder.restoreCallingIdentity(oldId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setBackupEnabled
File: services/backup/java/com/android/server/backup/BackupManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3759
|
MEDIUM
| 5
|
android
|
setBackupEnabled
|
services/backup/java/com/android/server/backup/BackupManagerService.java
|
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
| 0
|
Analyze the following code function for security vulnerabilities
|
public <T> void get(String table, Class<T> clazz, String[] fields, CQLWrapper filter,
boolean returnCount, Handler<AsyncResult<Results<T>>> replyHandler) {
get(table, clazz, fields, filter, returnCount, true, replyHandler);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: get
File: domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
get
|
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setStream(final InputStreamReader inputStreamReader) {
stream_ = inputStreamReader;
offset = length = characterOffset_ = 0;
lineNumber_ = columnNumber_ = 1;
encoding = inputStreamReader.getEncoding();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setStream
File: src/org/cyberneko/html/HTMLScanner.java
Repository: sparklemotion/nekohtml
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-24839
|
MEDIUM
| 5
|
sparklemotion/nekohtml
|
setStream
|
src/org/cyberneko/html/HTMLScanner.java
|
a800fce3b079def130ed42a408ff1d09f89e773d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public String getTemplate()
{
String templateReferenceAsString;
DocumentReference templateDocumentReference = getTemplateDocumentReference();
if (templateDocumentReference != null) {
templateReferenceAsString = LOCAL_REFERENCE_SERIALIZER.serialize(templateDocumentReference);
} else {
templateReferenceAsString = "";
}
return templateReferenceAsString;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTemplate
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
|
getTemplate
|
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
|
@Override
public int decryptWithAd(byte[] ad, byte[] ciphertext,
int ciphertextOffset, byte[] plaintext, int plaintextOffset,
int length) throws ShortBufferException, BadPaddingException {
int space;
if (ciphertextOffset > ciphertext.length)
space = 0;
else
space = ciphertext.length - ciphertextOffset;
if (length > space)
throw new ShortBufferException();
if (plaintextOffset > plaintext.length)
space = 0;
else
space = plaintext.length - plaintextOffset;
if (keySpec == null) {
// The key is not set yet - return the ciphertext as-is.
if (length > space)
throw new ShortBufferException();
if (plaintext != ciphertext || plaintextOffset != ciphertextOffset)
System.arraycopy(ciphertext, ciphertextOffset, plaintext, plaintextOffset, length);
return length;
}
if (length < 16)
Noise.throwBadTagException();
int dataLen = length - 16;
if (dataLen > space)
throw new ShortBufferException();
try {
setup(ad);
} catch (InvalidKeyException e) {
// Shouldn't happen.
throw new IllegalStateException(e);
} catch (InvalidAlgorithmParameterException e) {
// Shouldn't happen.
throw new IllegalStateException(e);
}
ghash.update(ciphertext, ciphertextOffset, dataLen);
ghash.pad(ad != null ? ad.length : 0, dataLen);
ghash.finish(iv, 0, 16);
int temp = 0;
for (int index = 0; index < 16; ++index)
temp |= (hashKey[index] ^ iv[index] ^ ciphertext[ciphertextOffset + dataLen + index]);
if ((temp & 0xFF) != 0)
Noise.throwBadTagException();
try {
int result = cipher.update(ciphertext, ciphertextOffset, dataLen, plaintext, plaintextOffset);
cipher.doFinal(plaintext, plaintextOffset + result);
} catch (IllegalBlockSizeException e) {
// Shouldn't happen.
throw new IllegalStateException(e);
} catch (BadPaddingException e) {
// Shouldn't happen.
throw new IllegalStateException(e);
}
return dataLen;
}
|
Vulnerability Classification:
- CWE: CWE-125, CWE-787
- CVE: CVE-2020-25021
- Severity: HIGH
- CVSS Score: 7.5
Description: Improve array bounds checks in CipherState implementations
Thanks to Pietro Oliva for identifying these issues.
Function: decryptWithAd
File: src/main/java/com/southernstorm/noise/protocol/AESGCMOnCtrCipherState.java
Repository: rweather/noise-java
Fixed Code:
@Override
public int decryptWithAd(byte[] ad, byte[] ciphertext,
int ciphertextOffset, byte[] plaintext, int plaintextOffset,
int length) throws ShortBufferException, BadPaddingException {
int space;
if (ciphertextOffset < 0 || ciphertextOffset > ciphertext.length)
throw new IllegalArgumentException();
else
space = ciphertext.length - ciphertextOffset;
if (length > space)
throw new ShortBufferException();
if (length < 0 || plaintextOffset < 0 || plaintextOffset > plaintext.length)
throw new IllegalArgumentException();
space = plaintext.length - plaintextOffset;
if (keySpec == null) {
// The key is not set yet - return the ciphertext as-is.
if (length > space)
throw new ShortBufferException();
if (plaintext != ciphertext || plaintextOffset != ciphertextOffset)
System.arraycopy(ciphertext, ciphertextOffset, plaintext, plaintextOffset, length);
return length;
}
if (length < 16)
Noise.throwBadTagException();
int dataLen = length - 16;
if (dataLen > space)
throw new ShortBufferException();
try {
setup(ad);
} catch (InvalidKeyException e) {
// Shouldn't happen.
throw new IllegalStateException(e);
} catch (InvalidAlgorithmParameterException e) {
// Shouldn't happen.
throw new IllegalStateException(e);
}
ghash.update(ciphertext, ciphertextOffset, dataLen);
ghash.pad(ad != null ? ad.length : 0, dataLen);
ghash.finish(iv, 0, 16);
int temp = 0;
for (int index = 0; index < 16; ++index)
temp |= (hashKey[index] ^ iv[index] ^ ciphertext[ciphertextOffset + dataLen + index]);
if ((temp & 0xFF) != 0)
Noise.throwBadTagException();
try {
int result = cipher.update(ciphertext, ciphertextOffset, dataLen, plaintext, plaintextOffset);
cipher.doFinal(plaintext, plaintextOffset + result);
} catch (IllegalBlockSizeException e) {
// Shouldn't happen.
throw new IllegalStateException(e);
} catch (BadPaddingException e) {
// Shouldn't happen.
throw new IllegalStateException(e);
}
return dataLen;
}
|
[
"CWE-125",
"CWE-787"
] |
CVE-2020-25021
|
HIGH
| 7.5
|
rweather/noise-java
|
decryptWithAd
|
src/main/java/com/southernstorm/noise/protocol/AESGCMOnCtrCipherState.java
|
18e86b6f8bea7326934109aa9ffa705ebf4bde90
| 1
|
Analyze the following code function for security vulnerabilities
|
@RequiresNonNull("rows")
private void initRowBuffer() {
thisRow = castNonNull(rows, "rows").get(currentRow);
// We only need a copy of the current row if we're going to
// modify it via an updatable resultset.
if (resultsetconcurrency == ResultSet.CONCUR_UPDATABLE) {
rowBuffer = thisRow.updateableCopy();
} else {
rowBuffer = null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initRowBuffer
File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
Repository: pgjdbc
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-31197
|
HIGH
| 8
|
pgjdbc
|
initRowBuffer
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void setSessionLock(WrappedSession wrappedSession, Lock lock) {
if (wrappedSession == null) {
throw new IllegalArgumentException(
"Can't set a lock for a null session");
}
Object currentSessionLock = wrappedSession
.getAttribute(getLockAttributeName());
assert (currentSessionLock == null
|| currentSessionLock == lock) : "Changing the lock for a session is not allowed";
wrappedSession.setAttribute(getLockAttributeName(), lock);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSessionLock
File: server/src/main/java/com/vaadin/server/VaadinService.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-203"
] |
CVE-2021-31403
|
LOW
| 1.9
|
vaadin/framework
|
setSessionLock
|
server/src/main/java/com/vaadin/server/VaadinService.java
|
d852126ab6f0c43f937239305bd0e9594834fe34
| 0
|
Analyze the following code function for security vulnerabilities
|
public Rectangle getCropBox(PdfDictionary page) {
PdfArray cropBox = (PdfArray)getPdfObjectRelease(page.get(PdfName.CROPBOX));
if (cropBox == null)
return getPageSize(page);
return getNormalizedRectangle(cropBox);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCropBox
File: java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
Repository: pdftk-java/pdftk
The code follows secure coding practices.
|
[
"CWE-835"
] |
CVE-2021-37819
|
HIGH
| 7.5
|
pdftk-java/pdftk
|
getCropBox
|
java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
|
9b0cbb76c8434a8505f02ada02a94263dcae9247
| 0
|
Analyze the following code function for security vulnerabilities
|
public void post(int what, Object obj, Bundle data) {
Message msg = obtainMessage(what, obj);
msg.setData(data);
msg.sendToTarget();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: post
File: services/core/java/com/android/server/media/MediaSessionRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21280
|
MEDIUM
| 5.5
|
android
|
post
|
services/core/java/com/android/server/media/MediaSessionRecord.java
|
06e772e05514af4aa427641784c5eec39a892ed3
| 0
|
Analyze the following code function for security vulnerabilities
|
public Column<T, V> setSortProperty(String... properties) {
Objects.requireNonNull(properties, "Sort properties can't be null");
return setSortOrderProvider(dir -> Arrays.stream(properties)
.map(s -> new QuerySortOrder(s, dir)));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSortProperty
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
|
setSortProperty
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
public final <T extends Item> T getItem(String pathName, Item context, Class<T> type) {
return getItem(pathName,context!=null?context.getParent():null,type);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getItem
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
|
getItem
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
@Transactional(rollbackFor = Exception.class)
public boolean removeLogicDeleted(List<String> userIds) {
String ids = String.format("'%s'", String.join("','", userIds));
// 1. 删除用户
int line = userMapper.deleteLogicDeleted(ids);
// 2. 删除用户部门关系
line += sysUserDepartMapper.delete(new LambdaQueryWrapper<SysUserDepart>().in(SysUserDepart::getUserId, userIds));
//3. 删除用户角色关系
line += sysUserRoleMapper.delete(new LambdaQueryWrapper<SysUserRole>().in(SysUserRole::getUserId, userIds));
//4.同步删除第三方App的用户
try {
dingtalkService.removeThirdAppUser(userIds);
wechatEnterpriseService.removeThirdAppUser(userIds);
} catch (Exception e) {
log.error("同步删除第三方App的用户失败:", e);
}
//5. 删除第三方用户表(因为第4步需要用到第三方用户表,所以在他之后删)
line += sysThirdAccountMapper.delete(new LambdaQueryWrapper<SysThirdAccount>().in(SysThirdAccount::getSysUserId, userIds));
return line != 0;
}
|
Vulnerability Classification:
- CWE: CWE-89
- CVE: CVE-2022-45208
- Severity: MEDIUM
- CVSS Score: 4.3
Description: /sys/user/putRecycleBin is affected by sql injection #4126
/sys/user/deleteRecycleBin is affected by sql injection #4125
Function: removeLogicDeleted
File: jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java
Repository: jeecgboot/jeecg-boot
Fixed Code:
@Override
@Transactional(rollbackFor = Exception.class)
public boolean removeLogicDeleted(List<String> userIds) {
// 1. 删除用户
int line = userMapper.deleteLogicDeleted(userIds);
// 2. 删除用户部门关系
line += sysUserDepartMapper.delete(new LambdaQueryWrapper<SysUserDepart>().in(SysUserDepart::getUserId, userIds));
//3. 删除用户角色关系
line += sysUserRoleMapper.delete(new LambdaQueryWrapper<SysUserRole>().in(SysUserRole::getUserId, userIds));
//4.同步删除第三方App的用户
try {
dingtalkService.removeThirdAppUser(userIds);
wechatEnterpriseService.removeThirdAppUser(userIds);
} catch (Exception e) {
log.error("同步删除第三方App的用户失败:", e);
}
//5. 删除第三方用户表(因为第4步需要用到第三方用户表,所以在他之后删)
line += sysThirdAccountMapper.delete(new LambdaQueryWrapper<SysThirdAccount>().in(SysThirdAccount::getSysUserId, userIds));
return line != 0;
}
|
[
"CWE-89"
] |
CVE-2022-45208
|
MEDIUM
| 4.3
|
jeecgboot/jeecg-boot
|
removeLogicDeleted
|
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java
|
51e2227bfe54f5d67b09411ee9a336750164e73d
| 1
|
Analyze the following code function for security vulnerabilities
|
public Object remove(String key) {
return this.myHashMap.remove(key);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: remove
File: src/main/java/org/codehaus/jettison/json/JSONObject.java
Repository: jettison-json/jettison
The code follows secure coding practices.
|
[
"CWE-674",
"CWE-787"
] |
CVE-2022-45693
|
HIGH
| 7.5
|
jettison-json/jettison
|
remove
|
src/main/java/org/codehaus/jettison/json/JSONObject.java
|
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
| 0
|
Analyze the following code function for security vulnerabilities
|
@GuardedBy("ShortcutService.this.mLock")
private ShortcutInfo getShortcutInfoLocked(
int launcherUserId, @NonNull String callingPackage,
@NonNull String packageName, @NonNull String shortcutId, int userId,
boolean getPinnedByAnyLauncher) {
Preconditions.checkStringNotEmpty(packageName, "packageName");
Preconditions.checkStringNotEmpty(shortcutId, "shortcutId");
throwIfUserLockedL(userId);
throwIfUserLockedL(launcherUserId);
final ShortcutPackage p = getUserShortcutsLocked(userId)
.getPackageShortcutsIfExists(packageName);
if (p == null) {
return null;
}
final ArrayList<ShortcutInfo> list = new ArrayList<>(1);
p.findAll(list, (ShortcutInfo si) -> shortcutId.equals(si.getId()),
/* clone flags=*/ 0, callingPackage, launcherUserId, getPinnedByAnyLauncher);
return list.size() == 0 ? null : list.get(0);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getShortcutInfoLocked
File: services/core/java/com/android/server/pm/ShortcutService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40079
|
HIGH
| 7.8
|
android
|
getShortcutInfoLocked
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
protected VaadinSession loadSession(WrappedSession wrappedSession) {
assert VaadinSession.hasLock(this, wrappedSession);
VaadinSession vaadinSession = readFromHttpSession(wrappedSession);
if (vaadinSession == null) {
return null;
}
vaadinSession.refreshTransients(wrappedSession, this);
return vaadinSession;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: loadSession
File: flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-203"
] |
CVE-2021-31404
|
LOW
| 1.9
|
vaadin/flow
|
loadSession
|
flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
|
621ef1b322737d963bee624b2d2e38cd739903d9
| 0
|
Analyze the following code function for security vulnerabilities
|
public void addDefaultImplementation(Class defaultImplementation, Class ofType) {
if (defaultImplementationsMapper == null) {
throw new com.thoughtworks.xstream.InitializationException("No "
+ DefaultImplementationsMapper.class.getName()
+ " available");
}
defaultImplementationsMapper.addDefaultImplementation(defaultImplementation, ofType);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addDefaultImplementation
File: xstream/src/java/com/thoughtworks/xstream/XStream.java
Repository: x-stream/xstream
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-43859
|
MEDIUM
| 5
|
x-stream/xstream
|
addDefaultImplementation
|
xstream/src/java/com/thoughtworks/xstream/XStream.java
|
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
| 0
|
Analyze the following code function for security vulnerabilities
|
@GuardedBy({"mPm.mLock", "mPm.mInstallLock"})
private AndroidPackage addForInitLI(ParsedPackage parsedPackage,
@ParsingPackageUtils.ParseFlags int parseFlags,
@PackageManagerService.ScanFlags int scanFlags,
@Nullable UserHandle user) throws PackageManagerException {
final Pair<ScanResult, Boolean> scanResultPair = scanSystemPackageLI(
parsedPackage, parseFlags, scanFlags, user);
final ScanResult scanResult = scanResultPair.first;
boolean shouldHideSystemApp = scanResultPair.second;
if (scanResult.mSuccess) {
synchronized (mPm.mLock) {
boolean appIdCreated = false;
try {
final String pkgName = scanResult.mPkgSetting.getPackageName();
final ReconcileRequest reconcileRequest = new ReconcileRequest(
Collections.singletonMap(pkgName, scanResult),
mPm.mPackages,
Collections.singletonMap(pkgName,
mPm.getSettingsVersionForPackage(parsedPackage)));
final Map<String, ReconciledPackage> reconcileResult =
ReconcilePackageUtils.reconcilePackages(reconcileRequest,
mSharedLibraries, mPm.mSettings.getKeySetManagerService(),
mPm.mSettings);
appIdCreated = optimisticallyRegisterAppId(scanResult);
commitReconciledScanResultLocked(reconcileResult.get(pkgName),
mPm.mUserManager.getUserIds());
} catch (PackageManagerException e) {
if (appIdCreated) {
cleanUpAppIdCreation(scanResult);
}
throw e;
}
}
}
if (shouldHideSystemApp) {
synchronized (mPm.mLock) {
mPm.mSettings.disableSystemPackageLPw(parsedPackage.getPackageName(), true);
}
}
if (mIncrementalManager != null && isIncrementalPath(parsedPackage.getPath())) {
if (scanResult.mPkgSetting != null && scanResult.mPkgSetting.isLoading()) {
// Continue monitoring loading progress of active incremental packages
mIncrementalManager.registerLoadingProgressCallback(parsedPackage.getPath(),
new IncrementalProgressListener(parsedPackage.getPackageName(), mPm));
}
}
return scanResult.mPkgSetting.getPkg();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addForInitLI
File: services/core/java/com/android/server/pm/InstallPackageHelper.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21257
|
HIGH
| 7.8
|
android
|
addForInitLI
|
services/core/java/com/android/server/pm/InstallPackageHelper.java
|
1aec7feaf07e6d4568ca75d18158445dbeac10f6
| 0
|
Analyze the following code function for security vulnerabilities
|
private void consumeBodyFrame(Frame f) {
if (f.type == AMQP.FRAME_BODY) {
byte[] fragment = f.getPayload();
this.remainingBodyBytes -= fragment.length;
updateContentBodyState();
if (this.remainingBodyBytes < 0) {
throw new UnsupportedOperationException("%%%%%% FIXME unimplemented");
}
appendBodyFragment(fragment);
} else {
throw new UnexpectedFrameError(f, AMQP.FRAME_BODY);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: consumeBodyFrame
File: src/main/java/com/rabbitmq/client/impl/CommandAssembler.java
Repository: rabbitmq/rabbitmq-java-client
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-46120
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-java-client
|
consumeBodyFrame
|
src/main/java/com/rabbitmq/client/impl/CommandAssembler.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
static boolean isNumberSimilar(Number l, Number r) {
if (!numberIsFinite(l) || !numberIsFinite(r)) {
// non-finite numbers are never similar
return false;
}
// if the classes are the same and implement Comparable
// then use the built in compare first.
if(l.getClass().equals(r.getClass()) && l instanceof Comparable) {
@SuppressWarnings({ "rawtypes", "unchecked" })
int compareTo = ((Comparable)l).compareTo(r);
return compareTo==0;
}
// BigDecimal should be able to handle all of our number types that we support through
// documentation. Convert to BigDecimal first, then use the Compare method to
// decide equality.
final BigDecimal lBigDecimal = objectToBigDecimal(l, null, false);
final BigDecimal rBigDecimal = objectToBigDecimal(r, null, false);
if (lBigDecimal == null || rBigDecimal == null) {
return false;
}
return lBigDecimal.compareTo(rBigDecimal) == 0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isNumberSimilar
File: src/main/java/org/json/JSONObject.java
Repository: stleary/JSON-java
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2023-5072
|
HIGH
| 7.5
|
stleary/JSON-java
|
isNumberSimilar
|
src/main/java/org/json/JSONObject.java
|
661114c50dcfd53bb041aab66f14bb91e0a87c8a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public long ParamAsLong(String key, long default_value)
{
return getConfiguration().getProperty(key, default_value);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: ParamAsLong
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
|
ParamAsLong
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
private ResourceInfo getFromCache(String name, String library, String localePrefix, List<String> contracts) {
if (cache == null) {
return null;
}
return cache.get(name, library, localePrefix, contracts);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFromCache
File: impl/src/main/java/com/sun/faces/application/resource/ResourceManager.java
Repository: eclipse-ee4j/mojarra
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-14371
|
MEDIUM
| 5
|
eclipse-ee4j/mojarra
|
getFromCache
|
impl/src/main/java/com/sun/faces/application/resource/ResourceManager.java
|
1b434748d9239f42eae8aa7d37d7a0930c061e24
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void handleMessage(Message msg) {
switch (msg.what) {
case MSG_NOTIFY_URI_CHANGED: {
final int userId = msg.arg1;
Uri uri = (Uri) msg.obj;
try {
getContext().getContentResolver().notifyChange(uri, null, true, userId);
} catch (SecurityException e) {
Slog.w(LOG_TAG, "Failed to notify for " + userId + ": " + uri, e);
}
if (DEBUG) {
Slog.v(LOG_TAG, "Notifying for " + userId + ": " + uri);
}
} break;
case MSG_NOTIFY_DATA_CHANGED: {
mBackupManager.dataChanged();
scheduleWriteFallbackFilesJob();
} break;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleMessage
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
|
handleMessage
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
ff86ff28cf82124f8e65833a2dd8c319aea08945
| 0
|
Analyze the following code function for security vulnerabilities
|
private static byte[] init__puma_parser_range_lengths_0()
{
return new byte [] {
0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 1, 1,
1, 1, 0, 6, 0, 6, 0, 0, 2, 2, 4, 1,
1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0
};
}
|
Vulnerability Classification:
- CWE: CWE-444
- CVE: CVE-2021-41136
- Severity: LOW
- CVSS Score: 3.6
Description: Merge pull request from GHSA-48w2-rm65-62xx
* Fix HTTP request smuggling vulnerability
See GHSA-48w2-rm65-62xx or CVE-2021-41136 for more info.
* 4.3.9 release note
* 5.5.1 release note
* 5.5.1
Function: init__puma_parser_range_lengths_0
File: ext/puma_http11/org/jruby/puma/Http11Parser.java
Repository: puma
Fixed Code:
private static byte[] init__puma_parser_range_lengths_0()
{
return new byte [] {
0, 3, 3, 3, 0, 0, 0, 0, 0, 0, 1, 1,
1, 1, 0, 6, 0, 6, 1, 1, 2, 2, 4, 1,
1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0
};
}
|
[
"CWE-444"
] |
CVE-2021-41136
|
LOW
| 3.6
|
puma
|
init__puma_parser_range_lengths_0
|
ext/puma_http11/org/jruby/puma/Http11Parser.java
|
acdc3ae571dfae0e045cf09a295280127db65c7f
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public SVNAuthentication createSVNAuthentication(String kind) {
if(kind.equals(ISVNAuthenticationManager.SSL))
try {
SVNSSLAuthentication authentication = new SVNSSLAuthentication(
Base64.decode(certificate.getPlainText().toCharArray()),
Scrambler.descramble(password), false);
authentication.setCertificatePath("dummy"); // TODO: remove this JENKINS-19175 workaround
return authentication;
} catch (IOException e) {
throw new Error(e); // can't happen
}
else
return null; // unexpected authentication type
}
|
Vulnerability Classification:
- CWE: CWE-255
- CVE: CVE-2013-6372
- Severity: LOW
- CVSS Score: 2.1
Description: [FIXED SECURITY-58]
encryption of passphrases wasn't sufficiently secure.
Function: createSVNAuthentication
File: src/main/java/hudson/scm/SubversionSCM.java
Repository: jenkinsci/subversion-plugin
Fixed Code:
@Override
public SVNAuthentication createSVNAuthentication(String kind) {
if(kind.equals(ISVNAuthenticationManager.SSL))
try {
SVNSSLAuthentication authentication = new SVNSSLAuthentication(
Base64.decode(certificate.getPlainText().toCharArray()),
Scrambler.descramble(Secret.toString(password)), false);
authentication.setCertificatePath("dummy"); // TODO: remove this JENKINS-19175 workaround
return authentication;
} catch (IOException e) {
throw new Error(e); // can't happen
}
else
return null; // unexpected authentication type
}
|
[
"CWE-255"
] |
CVE-2013-6372
|
LOW
| 2.1
|
jenkinsci/subversion-plugin
|
createSVNAuthentication
|
src/main/java/hudson/scm/SubversionSCM.java
|
7d4562d6f7e40de04bbe29577b51c79f07d05ba6
| 1
|
Analyze the following code function for security vulnerabilities
|
public boolean tryApiCall(boolean unlimited) {
final ShortcutService s = mShortcutUser.mService;
if (getApiCallCount(unlimited) >= s.mMaxUpdatesPerInterval) {
return false;
}
mApiCallCount++;
scheduleSave();
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: tryApiCall
File: services/core/java/com/android/server/pm/ShortcutPackage.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40075
|
MEDIUM
| 5.5
|
android
|
tryApiCall
|
services/core/java/com/android/server/pm/ShortcutPackage.java
|
ae768fbb9975fdab267f525831cb52f485ab0ecc
| 0
|
Analyze the following code function for security vulnerabilities
|
private UserInfo getUserInfo(@UserIdInt int userId) {
return mInjector.binderWithCleanCallingIdentity(() -> mUserManager.getUserInfo(userId));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserInfo
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
|
getUserInfo
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Media createMedia(InputStream stream, String mimeType, final Runnable onCompletion) throws IOException {
if (getActivity() == null) {
return null;
}
/*if(!checkForPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE, "This is required to play media")){
return null;
}*/
boolean isVideo = mimeType.contains("video");
if (!isVideo && stream instanceof FileInputStream) {
MediaPlayer player = new MediaPlayer();
player.setDataSource(((FileInputStream) stream).getFD());
player.prepare();
return new Audio(getActivity(), player, stream, onCompletion);
}
String extension = MimeTypeMap.getFileExtensionFromUrl(mimeType);
final File temp = File.createTempFile("mtmp", extension == null ? "dat" : extension);
temp.deleteOnExit();
OutputStream out = createFileOuputStream(temp);
byte buf[] = new byte[256];
int len = 0;
while ((len = stream.read(buf, 0, buf.length)) > -1) {
out.write(buf, 0, len);
}
out.close();
stream.close();
final Runnable finish = new Runnable() {
@Override
public void run() {
if(onCompletion != null){
Display.getInstance().callSerially(onCompletion);
// makes sure the file is only deleted after the onCompletion was invoked
Display.getInstance().callSerially(new Runnable() {
@Override
public void run() {
temp.delete();
}
});
return;
}
temp.delete();
}
};
if (isVideo) {
final AndroidImplementation.Video[] retVal = new AndroidImplementation.Video[1];
final boolean[] flag = new boolean[1];
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
VideoView v = new VideoView(getActivity());
v.setZOrderMediaOverlay(true);
v.setVideoURI(Uri.fromFile(temp));
retVal[0] = new AndroidImplementation.Video(v, getActivity(), finish);
flag[0] = true;
synchronized (flag) {
flag.notify();
}
}
});
while (!flag[0]) {
synchronized (flag) {
try {
flag.wait(100);
} catch (InterruptedException ex) {
}
}
}
return retVal[0];
} else {
return createMedia(createFileInputStream(temp), mimeType, finish);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createMedia
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
|
createMedia
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void pushPrinter(WikiPrinter wikiPrinter)
{
super.pushPrinter(wikiPrinter);
getXHTMLWikiPrinter().setWikiPrinter(getPrinter());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: pushPrinter
File: xwiki-rendering-syntaxes/xwiki-rendering-syntax-xhtml/src/main/java/org/xwiki/rendering/internal/renderer/xhtml/XHTMLChainingRenderer.java
Repository: xwiki/xwiki-rendering
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-32070
|
MEDIUM
| 6.1
|
xwiki/xwiki-rendering
|
pushPrinter
|
xwiki-rendering-syntaxes/xwiki-rendering-syntax-xhtml/src/main/java/org/xwiki/rendering/internal/renderer/xhtml/XHTMLChainingRenderer.java
|
c40e2f5f9482ec6c3e71dbf1fff5ba8a5e44cdc1
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public TtyExecOutputErrorable<String, OutputStream, PipedInputStream, ExecWatch> redirectingInput() {
return redirectingInput(null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: redirectingInput
File: kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/PodOperationsImpl.java
Repository: fabric8io/kubernetes-client
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-20218
|
MEDIUM
| 5.8
|
fabric8io/kubernetes-client
|
redirectingInput
|
kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/PodOperationsImpl.java
|
325d67cc80b73f049a5d0cea4917c1f2709a8d86
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean isClientSideInitialized() {
return wasAttached;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isClientSideInitialized
File: flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2023-25499
|
MEDIUM
| 6.5
|
vaadin/flow
|
isClientSideInitialized
|
flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java
|
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
| 0
|
Analyze the following code function for security vulnerabilities
|
public String toXml() {
Element root = new Element("workBundle");
root.addContent(JDOMUtil.simpleElement("bundleId", getBundleId()));
root.addContent(JDOMUtil.simpleElement("outputRoot", getOutputRoot()));
root.addContent(JDOMUtil.simpleElement("eatPrefix", getEatPrefix()));
root.addContent(JDOMUtil.simpleElement("caseId", getCaseId()));
root.addContent(JDOMUtil.simpleElement("sentTo", getSentTo()));
root.addContent(JDOMUtil.simpleElement("errorCount", getErrorCount()));
root.addContent(JDOMUtil.simpleElement("priority", getPriority()));
root.addContent(JDOMUtil.simpleElement("simpleMode", getSimpleMode()));
root.addContent(JDOMUtil.simpleElement("oldestFileModificationTime", getOldestFileModificationTime()));
root.addContent(JDOMUtil.simpleElement("youngestFileModificationTime", getYoungestFileModificationTime()));
root.addContent(JDOMUtil.simpleElement("totalFileSize", getTotalFileSize()));
for (WorkUnit wu : workUnitList) {
Element workunit = new Element("workUnit");
workunit.addContent(JDOMUtil.simpleElement("workFileName", wu.getFileName()));
if (wu.getTransactionId() != null) {
workunit.addContent(JDOMUtil.simpleElement("transactionId", wu.getTransactionId()));
}
workunit.addContent(JDOMUtil.simpleElement("failedToParse", wu.failedToParse()));
workunit.addContent(JDOMUtil.simpleElement("failedToProcess", wu.failedToProcess()));
root.addContent(workunit);
}
Document jdom = new Document(root);
return JDOMUtil.toString(jdom);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toXml
File: src/main/java/emissary/pickup/WorkBundle.java
Repository: NationalSecurityAgency/emissary
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2021-32634
|
MEDIUM
| 6.5
|
NationalSecurityAgency/emissary
|
toXml
|
src/main/java/emissary/pickup/WorkBundle.java
|
40260b1ec1f76cc92361702cc14fa1e4388e19d7
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean isSleepingLocked() {
return mSleeping;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isSleepingLocked
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
|
isSleepingLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void getProcessStatesAndOomScoresFromPids(
/*in*/ int[] pids, /*out*/ int[] states, /*out*/ int[] scores) {
mActivityManagerService.getProcessStatesAndOomScoresForPIDs(
/*in*/ pids, /*out*/ states, /*out*/ scores);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProcessStatesAndOomScoresFromPids
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
|
getProcessStatesAndOomScoresFromPids
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
private static boolean nameContainsForbiddenSequence(String name) {
boolean result = false;
if (name != null) {
name = name.toLowerCase();
result = name.startsWith(".") ||
name.contains("../") ||
name.contains("..\\") ||
name.startsWith("/") ||
name.startsWith("\\") ||
name.endsWith("/") ||
name.contains("..%2f") ||
name.contains("..%5c") ||
name.startsWith("%2f") ||
name.startsWith("%5c") ||
name.endsWith("%2f") ||
name.contains("..\\u002f") ||
name.contains("..\\u005c") ||
name.startsWith("\\u002f") ||
name.startsWith("\\u005c") ||
name.endsWith("\\u002f")
;
}
return result;
}
|
Vulnerability Classification:
- CWE: CWE-22
- CVE: CVE-2020-6950
- Severity: MEDIUM
- CVSS Score: 4.3
Description: Multiple Path Traversal security issues
Function: nameContainsForbiddenSequence
File: impl/src/main/java/com/sun/faces/application/resource/ResourceManager.java
Repository: eclipse-ee4j/mojarra
Fixed Code:
static boolean nameContainsForbiddenSequence(String name) {
boolean result = false;
if (name != null) {
name = name.toLowerCase();
result = name.startsWith(".") ||
name.contains("../") ||
name.contains("..\\") ||
name.startsWith("/") ||
name.startsWith("\\") ||
name.endsWith("/") ||
name.contains("..%2f") ||
name.contains("..%5c") ||
name.startsWith("%2f") ||
name.startsWith("%5c") ||
name.endsWith("%2f") ||
name.contains("..\\u002f") ||
name.contains("..\\u005c") ||
name.startsWith("\\u002f") ||
name.startsWith("\\u005c") ||
name.endsWith("\\u002f")
;
}
return result;
}
|
[
"CWE-22"
] |
CVE-2020-6950
|
MEDIUM
| 4.3
|
eclipse-ee4j/mojarra
|
nameContainsForbiddenSequence
|
impl/src/main/java/com/sun/faces/application/resource/ResourceManager.java
|
cefbb9447e7be560e59da2da6bd7cb93776f7741
| 1
|
Analyze the following code function for security vulnerabilities
|
protected void notifyReconnection() {
// Notify connection listeners of the reconnection.
for (ConnectionListener listener : connectionListeners) {
try {
listener.reconnectionSuccessful();
}
catch (Exception e) {
// Catch and print any exception so we can recover
// from a faulty listener
LOGGER.log(Level.WARNING, "notifyReconnection()", e);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: notifyReconnection
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
|
notifyReconnection
|
smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
|
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public AsyncContext startAsync() {
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startAsync
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
|
startAsync
|
h2/src/test/org/h2/test/server/TestWeb.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 0
|
Analyze the following code function for security vulnerabilities
|
public Builder setUserAgent(String userAgent) {
this.userAgent = userAgent;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUserAgent
File: api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java
Repository: AsyncHttpClient/async-http-client
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2013-7397
|
MEDIUM
| 4.3
|
AsyncHttpClient/async-http-client
|
setUserAgent
|
api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java
|
df6ed70e86c8fc340ed75563e016c8baa94d7e72
| 0
|
Analyze the following code function for security vulnerabilities
|
@PackageManager.PermissionFlags
@RequiresPermission(anyOf = {
android.Manifest.permission.GRANT_RUNTIME_PERMISSIONS,
android.Manifest.permission.REVOKE_RUNTIME_PERMISSIONS,
android.Manifest.permission.GET_RUNTIME_PERMISSIONS
})
//@SystemApi
public int getPermissionFlags(@NonNull String packageName, @NonNull String permissionName,
@NonNull UserHandle user) {
try {
return mPermissionManager.getPermissionFlags(packageName, permissionName,
user.getIdentifier());
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPermissionFlags
File: core/java/android/permission/PermissionManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-281"
] |
CVE-2023-21249
|
MEDIUM
| 5.5
|
android
|
getPermissionFlags
|
core/java/android/permission/PermissionManager.java
|
c00b7e7dbc1fa30339adef693d02a51254755d7f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated(since = "2.2M2")
public void setIntValue(String className, String fieldName, int value)
{
setIntValue(getXClassEntityReferenceResolver().resolve(className, EntityType.DOCUMENT, getDocumentReference()),
fieldName, value);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setIntValue
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-74"
] |
CVE-2023-29523
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
setIntValue
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
0d547181389f7941e53291af940966413823f61c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public void setDocumentReference(DocumentReference reference)
{
// Don't allow setting a null reference for now, ie. don't do anything to preserve backward compatibility
// with previous behavior (i.e. {@link #setFullName}.
if (reference != null) {
// Retro compatibility, make sure <code>this.documentReference</code> does not contain the Locale (for now)
DocumentReference referenceWithoutLocale =
reference.getLocale() != null ? new DocumentReference(reference, (Locale) null) : reference;
if (!referenceWithoutLocale.equals(getDocumentReference())) {
setDocumentReferenceInternal(referenceWithoutLocale);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDocumentReference
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
|
setDocumentReference
|
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
|
@Override
protected EventLoop getEventLoop() {
return ((ConnectionBase) context.request().connection()).channel().eventLoop();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getEventLoop
File: independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/VertxResteasyReactiveRequestContext.java
Repository: quarkusio/quarkus
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-0981
|
MEDIUM
| 6.5
|
quarkusio/quarkus
|
getEventLoop
|
independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/VertxResteasyReactiveRequestContext.java
|
96c64fd8f09c02a497e2db366c64dd9196582442
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isCurrentUserCreator()
{
return this.doc.isCurrentUserCreator(getXWikiContext());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isCurrentUserCreator
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
|
isCurrentUserCreator
|
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 static String[] getReplyToAddresses(String[] replyTo, String from) {
boolean hasReplyTo = false;
for (final String replyToAddress : replyTo) {
if (!TextUtils.isEmpty(replyToAddress)) {
hasReplyTo = true;
}
}
return hasReplyTo ? replyTo : new String[] {from};
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getReplyToAddresses
File: src/com/android/mail/compose/ComposeActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2425
|
MEDIUM
| 4.3
|
android
|
getReplyToAddresses
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
protected final Integer _parseInteger(JsonParser p, DeserializationContext ctxt,
Class<?> targetType)
throws IOException
{
String text;
switch (p.currentTokenId()) {
case JsonTokenId.ID_STRING:
text = p.getText();
break;
case JsonTokenId.ID_NUMBER_FLOAT: // coercing may work too
final CoercionAction act = _checkFloatToIntCoercion(p, ctxt, targetType);
if (act == CoercionAction.AsNull) {
return (Integer) getNullValue(ctxt);
}
if (act == CoercionAction.AsEmpty) {
return (Integer) getEmptyValue(ctxt);
}
return p.getValueAsInt();
case JsonTokenId.ID_NUMBER_INT: // NOTE: caller assumed to check in fast path
return p.getIntValue();
case JsonTokenId.ID_NULL: // null fine for non-primitive
return (Integer) getNullValue(ctxt);
// 29-Jun-2020, tatu: New! "Scalar from Object" (mostly for XML)
case JsonTokenId.ID_START_OBJECT:
text = ctxt.extractScalarFromObject(p, this, targetType);
break;
case JsonTokenId.ID_START_ARRAY:
return (Integer) _deserializeFromArray(p, ctxt);
default:
return (Integer) ctxt.handleUnexpectedToken(getValueType(ctxt), p);
}
final CoercionAction act = _checkFromStringCoercion(ctxt, text);
if (act == CoercionAction.AsNull) {
return (Integer) getNullValue(ctxt);
}
if (act == CoercionAction.AsEmpty) {
return (Integer) getEmptyValue(ctxt);
}
text = text.trim();
if (_checkTextualNull(ctxt, text)) {
return (Integer) getNullValue(ctxt);
}
return _parseInteger(ctxt, text);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _parseInteger
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
|
_parseInteger
|
src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java
|
d78d00ee7b5245b93103fef3187f70543d67ca33
| 0
|
Analyze the following code function for security vulnerabilities
|
private void computeSourceRootTask() {
if (mSourceRecord == null) {
mSourceRootTask = null;
return;
}
if (!mSourceRecord.finishing) {
mSourceRootTask = mSourceRecord.getRootTask();
return;
}
// If the source is finishing, we can't further count it as our source. This is because the
// task it is associated with may now be empty and on its way out, so we don't want to
// blindly throw it in to that task. Instead we will take the NEW_TASK flow and try to find
// a task for it. But save the task information so it can be used when creating the new task.
if ((mLaunchFlags & FLAG_ACTIVITY_NEW_TASK) == 0) {
Slog.w(TAG, "startActivity called from finishing " + mSourceRecord
+ "; forcing " + "Intent.FLAG_ACTIVITY_NEW_TASK for: " + mIntent);
mLaunchFlags |= FLAG_ACTIVITY_NEW_TASK;
// It is not guaranteed that the source record will have a task associated with it.
// For example, if this method is being called for processing a pending activity
// launch, it is possible that the activity has been removed from the task after the
// launch was enqueued.
final Task sourceTask = mSourceRecord.getTask();
if (sourceTask == null || sourceTask.getTopNonFinishingActivity() == null) {
mNewTaskInfo = mSourceRecord.info;
mNewTaskIntent = sourceTask != null ? sourceTask.intent : null;
}
}
mSourceRecord = null;
mSourceRootTask = null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: computeSourceRootTask
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
|
computeSourceRootTask
|
services/core/java/com/android/server/wm/ActivityStarter.java
|
70ec64dc5a2a816d6aa324190a726a85fd749b30
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onAnimationLeashLost(Transaction t) {
super.onAnimationLeashLost(t);
if (mAnimationBoundsLayer != null) {
t.remove(mAnimationBoundsLayer);
mAnimationBoundsLayer = null;
}
if (mAnimatingActivityRegistry != null) {
mAnimatingActivityRegistry.notifyFinished(this);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onAnimationLeashLost
File: services/core/java/com/android/server/wm/ActivityRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21145
|
HIGH
| 7.8
|
android
|
onAnimationLeashLost
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
public ClientConfig getDefaultClientConfig() {
ClientConfig clientConfig = new ClientConfig();
clientConfig.register(MultiPartFeature.class);
clientConfig.register(json);
clientConfig.register(JacksonFeature.class);
clientConfig.property(HttpUrlConnectorProvider.SET_METHOD_WORKAROUND, true);
// turn off compliance validation to be able to send payloads with DELETE calls
clientConfig.property(ClientProperties.SUPPRESS_HTTP_COMPLIANCE_VALIDATION, true);
if (debugging) {
clientConfig.register(new LoggingFeature(java.util.logging.Logger.getLogger(LoggingFeature.DEFAULT_LOGGER_NAME), java.util.logging.Level.INFO, LoggingFeature.Verbosity.PAYLOAD_ANY, 1024*50 /* Log payloads up to 50K */));
clientConfig.property(LoggingFeature.LOGGING_FEATURE_VERBOSITY, LoggingFeature.Verbosity.PAYLOAD_ANY);
// Set logger to ALL
java.util.logging.Logger.getLogger(LoggingFeature.DEFAULT_LOGGER_NAME).setLevel(java.util.logging.Level.ALL);
} else {
// suppress warnings for payloads with DELETE calls:
java.util.logging.Logger.getLogger("org.glassfish.jersey.client").setLevel(java.util.logging.Level.SEVERE);
}
return clientConfig;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDefaultClientConfig
File: samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/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
|
getDefaultClientConfig
|
samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void copyToDir(Directory in, File out, String[] fileNames)
throws DirectoryException {
for (String fileName : fileNames) {
copyToDir(in, out, fileName);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: copyToDir
File: brut.j.dir/src/main/java/brut/directory/DirUtil.java
Repository: iBotPeaches/Apktool
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2024-21633
|
HIGH
| 7.8
|
iBotPeaches/Apktool
|
copyToDir
|
brut.j.dir/src/main/java/brut/directory/DirUtil.java
|
d348c43b24a9de350ff6e5bd610545a10c1fc712
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void allowsFullyQualifiedEntityNamesInQuery() {
assertThat(detectAlias(FQ_QUERY), IS_U);
assertCountQuery(FQ_QUERY, "select count(u) from org.acme.domain.User$Foo_Bar u");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: allowsFullyQualifiedEntityNamesInQuery
File: src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsUnitTests.java
Repository: spring-projects/spring-data-jpa
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-6652
|
MEDIUM
| 6.8
|
spring-projects/spring-data-jpa
|
allowsFullyQualifiedEntityNamesInQuery
|
src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsUnitTests.java
|
b8e7fe
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isUserOrganizationManaged(@UserIdInt int userHandle) {
return getDeviceStateCache().isUserOrganizationManaged(userHandle);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isUserOrganizationManaged
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
|
isUserOrganizationManaged
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public Authentication getAuthentication(HttpServletRequest request, byte[] key, String alias) {
// verify:
String identity = request.getParameter("openid.identity");
if (identity==null)
throw new OpenIdException("Missing 'openid.identity'.");
if (request.getParameter("openid.invalidate_handle")!=null)
throw new OpenIdException("Invalidate handle.");
String sig = request.getParameter("openid.sig");
if (sig==null)
throw new OpenIdException("Missing 'openid.sig'.");
String signed = request.getParameter("openid.signed");
if (signed==null)
throw new OpenIdException("Missing 'openid.signed'.");
if (!returnTo.equals(request.getParameter("openid.return_to")))
throw new OpenIdException("Bad 'openid.return_to'.");
// check sig:
String[] params = signed.split("[\\,]+");
StringBuilder sb = new StringBuilder(1024);
for (String param : params) {
sb.append(param)
.append(':');
String value = request.getParameter("openid." + param);
if (value!=null)
sb.append(value);
sb.append('\n');
}
String hmac = getHmacSha1(sb.toString(), key);
if (!sig.equals(hmac))
throw new OpenIdException("Verify signature failed.");
// set auth:
Authentication auth = new Authentication();
auth.setIdentity(identity);
auth.setEmail(request.getParameter("openid." + alias + ".value.email"));
auth.setLanguage(request.getParameter("openid." + alias + ".value.language"));
auth.setGender(request.getParameter("openid." + alias + ".value.gender"));
auth.setFullname(getFullname(request, alias));
auth.setFirstname(getFirstname(request, alias));
auth.setLastname(getLastname(request, alias));
return auth;
}
|
Vulnerability Classification:
- CWE: CWE-208
- CVE: CVE-2010-10006
- Severity: LOW
- CVSS Score: 1.4
Description: fix timing vulnerability.
Function: getAuthentication
File: JOpenId/src/org/expressme/openid/OpenIdManager.java
Repository: michaelliao/jopenid
Fixed Code:
public Authentication getAuthentication(HttpServletRequest request, byte[] key, String alias) {
// verify:
String identity = request.getParameter("openid.identity");
if (identity==null)
throw new OpenIdException("Missing 'openid.identity'.");
if (request.getParameter("openid.invalidate_handle")!=null)
throw new OpenIdException("Invalidate handle.");
String sig = request.getParameter("openid.sig");
if (sig==null)
throw new OpenIdException("Missing 'openid.sig'.");
String signed = request.getParameter("openid.signed");
if (signed==null)
throw new OpenIdException("Missing 'openid.signed'.");
if (!returnTo.equals(request.getParameter("openid.return_to")))
throw new OpenIdException("Bad 'openid.return_to'.");
// check sig:
String[] params = signed.split("[\\,]+");
StringBuilder sb = new StringBuilder(1024);
for (String param : params) {
sb.append(param)
.append(':');
String value = request.getParameter("openid." + param);
if (value!=null)
sb.append(value);
sb.append('\n');
}
String hmac = getHmacSha1(sb.toString(), key);
if (!safeEquals(sig, hmac))
throw new OpenIdException("Verify signature failed.");
// set auth:
Authentication auth = new Authentication();
auth.setIdentity(identity);
auth.setEmail(request.getParameter("openid." + alias + ".value.email"));
auth.setLanguage(request.getParameter("openid." + alias + ".value.language"));
auth.setGender(request.getParameter("openid." + alias + ".value.gender"));
auth.setFullname(getFullname(request, alias));
auth.setFirstname(getFirstname(request, alias));
auth.setLastname(getLastname(request, alias));
return auth;
}
|
[
"CWE-208"
] |
CVE-2010-10006
|
LOW
| 1.4
|
michaelliao/jopenid
|
getAuthentication
|
JOpenId/src/org/expressme/openid/OpenIdManager.java
|
c9baaa976b684637f0d5a50268e91846a7a719ab
| 1
|
Analyze the following code function for security vulnerabilities
|
void requireAllowedAssociationsLocked(String packageName) {
ensureAllowedAssociations();
if (mAllowedAssociations.get(packageName) == null) {
mAllowedAssociations.put(packageName, new PackageAssociationInfo(packageName,
new ArraySet<>(), /* isDebuggable = */ false));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: requireAllowedAssociationsLocked
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21292
|
MEDIUM
| 5.5
|
android
|
requireAllowedAssociationsLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void registerPendingMessage(Activity activity, Message message) {
ConversationFragment fragment = findConversationFragment(activity);
if (fragment != null) {
fragment.pendingMessage.push(message);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: registerPendingMessage
File: src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
registerPendingMessage
|
src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
@GuardedBy("this")
void removeUriPermissionIfNeededLocked(UriPermission perm) {
if (perm.modeFlags == 0) {
final ArrayMap<GrantUri, UriPermission> perms = mGrantedUriPermissions.get(
perm.targetUid);
if (perms != null) {
if (DEBUG_URI_PERMISSION) Slog.v(TAG_URI_PERMISSION,
"Removing " + perm.targetUid + " permission to " + perm.uri);
perms.remove(perm.uri);
if (perms.isEmpty()) {
mGrantedUriPermissions.remove(perm.targetUid);
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeUriPermissionIfNeededLocked
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
|
removeUriPermissionIfNeededLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public ActivityOptions setLaunchRootTask(WindowContainerToken windowContainerToken) {
mLaunchRootTask = windowContainerToken;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setLaunchRootTask
File: core/java/android/app/ActivityOptions.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-20918
|
CRITICAL
| 9.8
|
android
|
setLaunchRootTask
|
core/java/android/app/ActivityOptions.java
|
51051de4eb40bb502db448084a83fd6cbfb7d3cf
| 0
|
Analyze the following code function for security vulnerabilities
|
public Integer getMaxTimeFrameValue() {
return maxTimeFrameValue;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMaxTimeFrameValue
File: api/src/main/java/org/openmrs/module/appointmentscheduling/AppointmentRequest.java
Repository: openmrs/openmrs-module-appointmentscheduling
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-4727
|
MEDIUM
| 6.1
|
openmrs/openmrs-module-appointmentscheduling
|
getMaxTimeFrameValue
|
api/src/main/java/org/openmrs/module/appointmentscheduling/AppointmentRequest.java
|
2ccbe39c020809765de41eeb8ee4c70b5ec49cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
public WifiConfiguration getSavedNetworkForScanResult(@NonNull ScanResult scanResult) {
WifiConfiguration config = null;
try {
config = mConfiguredNetworks.getByScanResultForCurrentUser(scanResult);
} catch (IllegalArgumentException e) {
Log.e(TAG, "Failed to lookup network from config map", e);
}
if (config != null) {
if (mVerboseLoggingEnabled) {
Log.v(TAG, "getSavedNetworkFromScanResult Found " + config.getProfileKey()
+ " for " + scanResult.SSID + "[" + scanResult.capabilities + "]");
}
}
return config;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSavedNetworkForScanResult
File: service/java/com/android/server/wifi/WifiConfigManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
getSavedNetworkForScanResult
|
service/java/com/android/server/wifi/WifiConfigManager.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void success(final Conversation conversation) {
runOnUiThread(() -> {
switchToConversation(conversation);
hideToast();
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: success
File: src/main/java/eu/siacs/conversations/ui/XmppActivity.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
success
|
src/main/java/eu/siacs/conversations/ui/XmppActivity.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
private void clearCache() {
JFinal.me().getServletContext().removeAttribute(Constants.CACHE_KEY);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearCache
File: web/src/main/java/com/zrlog/web/cache/CacheService.java
Repository: 94fzb/zrlog
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-16643
|
LOW
| 3.5
|
94fzb/zrlog
|
clearCache
|
web/src/main/java/com/zrlog/web/cache/CacheService.java
|
4a91c83af669e31a22297c14f089d8911d353fa1
| 0
|
Analyze the following code function for security vulnerabilities
|
private void handleKeyguardReset() {
if (DEBUG) Log.d(TAG, "handleKeyguardReset");
updateFingerprintListeningState();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleKeyguardReset
File: packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
handleKeyguardReset
|
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean addUpgradableSecurityTypeIfNecessary(WifiConfiguration config) {
try {
addOpenUpgradableSecurityTypeIfNecessary(config);
addPskUpgradableSecurityTypeIfNecessary(config);
addEapUpgradableSecurityTypeIfNecessary(config);
} catch (IllegalArgumentException e) {
Log.e(TAG, "Failed to add upgradable security type");
return false;
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addUpgradableSecurityTypeIfNecessary
File: service/java/com/android/server/wifi/WifiConfigurationUtil.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21252
|
MEDIUM
| 5.5
|
android
|
addUpgradableSecurityTypeIfNecessary
|
service/java/com/android/server/wifi/WifiConfigurationUtil.java
|
50b08ee30e04d185e5ae97a5f717d436fd5a90f3
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.