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
|
void removeMetaEntries() {
metaEntries.clear();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeMetaEntries
File: core/java/android/util/jar/StrictJarVerifier.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21253
|
MEDIUM
| 5.5
|
android
|
removeMetaEntries
|
core/java/android/util/jar/StrictJarVerifier.java
|
84df68840b6f2407146e722ebd95a7d8bc6e3529
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getUserName(String user, String format, XWikiContext context)
{
return getUserName(user, format, true, context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserName
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
|
getUserName
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void displayView(StringBuffer buffer, String name, String prefix, BaseCollection object, boolean isolated,
XWikiContext context)
{
String contentTypeString = getContentType();
ContentType contentType = ContentType.getByValue(contentTypeString);
if (contentType == ContentType.PURE_TEXT) {
super.displayView(buffer, name, prefix, object, context);
} else if (contentType == ContentType.VELOCITY_CODE) {
StringBuffer result = new StringBuffer();
super.displayView(result, name, prefix, object, context);
if (getObjectDocumentSyntax(object, context).equals(Syntax.XWIKI_1_0)) {
buffer.append(context.getWiki().parseContent(result.toString(), context));
} else {
// Don't do anything since this mode is deprecated and not supported in the new rendering.
buffer.append(result);
}
} else {
BaseProperty property = (BaseProperty) object.safeget(name);
if (property != null) {
String content = property.toText();
XWikiDocument sdoc = getObjectDocument(object, context);
if (sdoc != null) {
if (contentType == ContentType.VELOCITYWIKI) {
// Start with a pass of Velocity
// TODO: maybe make velocity+wiki a syntax so that getRenderedContent can directly take care
// of that
VelocityEvaluator velocityEvaluator = Utils.getComponent(VelocityEvaluator.class);
content = velocityEvaluator.evaluateVelocityNoException(content,
isolated ? sdoc.getDocumentReference() : null);
}
// Make sure the right author is used to execute the textarea
// Clone the document to void messaging with the cache
if (!Objects.equals(sdoc.getAuthors().getEffectiveMetadataAuthor(),
sdoc.getAuthors().getContentAuthor())) {
sdoc = sdoc.clone();
sdoc.getAuthors().setContentAuthor(sdoc.getAuthors().getEffectiveMetadataAuthor());
}
buffer.append(context.getDoc().getRenderedContent(content, sdoc.getSyntax(), isRestricted(), sdoc,
isolated, context));
} else {
buffer.append(content);
}
}
}
}
|
Vulnerability Classification:
- CWE: CWE-862
- CVE: CVE-2023-41046
- Severity: MEDIUM
- CVSS Score: 6.3
Description: XWIKI-20847/XWIKI-20848: Improve Velocity execution in TextAreaClass
* Add a unit test
* Use AuthorExecutor to set the correct context author
* Check for script right and restricted properties
* Fix a comment
Function: displayView
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/objects/classes/TextAreaClass.java
Repository: xwiki/xwiki-platform
Fixed Code:
@Override
public void displayView(StringBuffer buffer, String name, String prefix, BaseCollection object, boolean isolated,
XWikiContext context)
{
String contentTypeString = getContentType();
ContentType contentType = ContentType.getByValue(contentTypeString);
if (contentType == ContentType.PURE_TEXT) {
super.displayView(buffer, name, prefix, object, context);
} else if (contentType == ContentType.VELOCITY_CODE) {
displayVelocityCode(buffer, name, prefix, object, context);
} else {
BaseProperty<?> property = (BaseProperty<?>) object.safeget(name);
if (property != null) {
String content = property.toText();
XWikiDocument sdoc = getObjectDocument(object, context);
if (contentType == ContentType.VELOCITYWIKI) {
content = maybeEvaluateContent(name, isolated, content, sdoc);
}
if (sdoc != null) {
sdoc = ensureContentAuthorIsMetadataAuthor(sdoc);
buffer.append(
context.getDoc().getRenderedContent(content, sdoc.getSyntax(), isRestricted(), sdoc,
isolated, context));
} else {
buffer.append(XMLUtils.escapeElementText(content));
}
}
}
}
|
[
"CWE-862"
] |
CVE-2023-41046
|
MEDIUM
| 6.3
|
xwiki/xwiki-platform
|
displayView
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/objects/classes/TextAreaClass.java
|
edc52579eeaab1b4514785c134044671a1ecd839
| 1
|
Analyze the following code function for security vulnerabilities
|
private void readStatisticsLocked() {
try {
byte[] data = mStatisticsFile.readFully();
Parcel in = Parcel.obtain();
in.unmarshall(data, 0, data.length);
in.setDataPosition(0);
int token;
int index = 0;
while ((token=in.readInt()) != STATISTICS_FILE_END) {
if (token == STATISTICS_FILE_ITEM
|| token == STATISTICS_FILE_ITEM_OLD) {
int day = in.readInt();
if (token == STATISTICS_FILE_ITEM_OLD) {
day = day - 2009 + 14245; // Magic!
}
DayStats ds = new DayStats(day);
ds.successCount = in.readInt();
ds.successTime = in.readLong();
ds.failureCount = in.readInt();
ds.failureTime = in.readLong();
if (index < mDayStats.length) {
mDayStats[index] = ds;
index++;
}
} else {
// Ooops.
Log.w(TAG, "Unknown stats token: " + token);
break;
}
}
} catch (java.io.IOException e) {
Log.i(TAG, "No initial statistics");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readStatisticsLocked
File: services/core/java/com/android/server/content/SyncStorageEngine.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2016-2424
|
HIGH
| 7.1
|
android
|
readStatisticsLocked
|
services/core/java/com/android/server/content/SyncStorageEngine.java
|
d3383d5bfab296ba3adbc121ff8a7b542bde4afb
| 0
|
Analyze the following code function for security vulnerabilities
|
protected Element elementBeforeImpl(String name) {
String prefix = getPrefixFromQualifiedName(name);
String namespaceURI = this.xmlNode.lookupNamespaceURI(prefix);
return elementBeforeImpl(name, namespaceURI);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: elementBeforeImpl
File: src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
Repository: jmurty/java-xmlbuilder
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2014-125087
|
MEDIUM
| 5.2
|
jmurty/java-xmlbuilder
|
elementBeforeImpl
|
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
|
e6fddca201790abab4f2c274341c0bb8835c3e73
| 0
|
Analyze the following code function for security vulnerabilities
|
LockPatternUtils newLockPatternUtils() {
return new LockPatternUtils(mContext);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: newLockPatternUtils
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
|
newLockPatternUtils
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void setKeyParams() throws Exception {
assertPlotParam("key", "out");
assertPlotParam("key", "left");
assertPlotParam("key", "top");
assertPlotParam("key", "center");
assertPlotParam("key", "right");
assertPlotParam("key", "horiz");
assertPlotParam("key", "box");
assertPlotParam("key", "bottom");
assertInvalidPlotParam("yrange", "out%20right%20top%0aset%20yrange%20[33:system(%20");
}
|
Vulnerability Classification:
- CWE: CWE-78
- CVE: CVE-2023-25826
- Severity: CRITICAL
- CVSS Score: 9.8
Description: Improved fix for #2261.
Regular expressions wouldn't catch the newlines or possibly other
control characters. Now we'll use the TAG validation code to make
sure the inputs are only plain ASCII printables first.
Fixes CVE-2018-12972, CVE-2020-35476
Function: setKeyParams
File: test/tsd/TestGraphHandler.java
Repository: OpenTSDB/opentsdb
Fixed Code:
@Test
public void setKeyParams() throws Exception {
assertPlotParam("key", "out");
assertPlotParam("key", "left");
assertPlotParam("key", "top");
assertPlotParam("key", "center");
assertPlotParam("key", "right");
assertPlotParam("key", "horiz");
assertPlotParam("key", "box");
assertPlotParam("key", "bottom");
assertInvalidPlotParam("key", "out%20right%20top%0aset%20yrange%20[33:system(%20");
assertInvalidPlotParam("key", "%3Bsystem%20%22cat%20/home/ubuntuvm/secret.txt%20%3E/tmp/secret.txt%22%20%22");
}
|
[
"CWE-78"
] |
CVE-2023-25826
|
CRITICAL
| 9.8
|
OpenTSDB/opentsdb
|
setKeyParams
|
test/tsd/TestGraphHandler.java
|
26be40a5e5b6ce8b0b1e4686c4b0d7911e5d8a25
| 1
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setOauthCredentials(String clientId, String clientSecret) {
for (Authentication auth : authentications.values()) {
if (auth instanceof OAuth) {
((OAuth) auth).setCredentials(clientId, clientSecret, isDebugging());
return this;
}
}
throw new RuntimeException("No OAuth2 authentication configured!");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setOauthCredentials
File: samples/client/petstore/java/okhttp-gson-parcelableModel/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
|
setOauthCredentials
|
samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Object makeTransformOrtho(float left, float right, float bottom, float top, float near, float far) {
return CN1Matrix4f.makeOrtho(left, right, bottom, top, near, far);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: makeTransformOrtho
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
|
makeTransformOrtho
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
private void pruneServiceTargets() {
if (DEBUG) Log.d(TAG, "pruneServiceTargets");
for (int i = mServiceTargets.size() - 1; i >= 0; i--) {
final ChooserTargetInfo cti = mServiceTargets.get(i);
if (!hasResolvedTarget(cti.getResolveInfo())) {
if (DEBUG) Log.d(TAG, " => " + i + " " + cti);
mServiceTargets.remove(i);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: pruneServiceTargets
File: core/java/com/android/internal/app/ChooserActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-254",
"CWE-19"
] |
CVE-2016-3752
|
HIGH
| 7.5
|
android
|
pruneServiceTargets
|
core/java/com/android/internal/app/ChooserActivity.java
|
ddbf2db5b946be8fdc45c7b0327bf560b2a06988
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setRequestedHeartbeat(int requestedHeartbeat) {
this.requestedHeartbeat = ensureUnsignedShort(requestedHeartbeat);
if (this.requestedHeartbeat != requestedHeartbeat) {
LOGGER.warn("Requested heartbeat must be between 0 and {}, value has been set to {} instead of {}",
MAX_UNSIGNED_SHORT, this.requestedHeartbeat, requestedHeartbeat);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setRequestedHeartbeat
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
|
setRequestedHeartbeat
|
src/main/java/com/rabbitmq/client/ConnectionFactory.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
private DocumentReference getCurrentAuthorDocumentReference(Right right)
{
if (right == Right.PROGRAM) {
// Defaults to the main wiki reference.
return null;
}
XWikiDocument doc = getProgrammingDocument();
return doc != null ? doc.getDocumentReference() : null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCurrentAuthorDocumentReference
File: xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authorization/xwiki-platform-security-authorization-bridge/src/main/java/org/xwiki/security/authorization/internal/DefaultContextualAuthorizationManager.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-459"
] |
CVE-2023-36468
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
getCurrentAuthorDocumentReference
|
xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authorization/xwiki-platform-security-authorization-bridge/src/main/java/org/xwiki/security/authorization/internal/DefaultContextualAuthorizationManager.java
|
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setOriginalName(String originalName) {
this.originalName = originalName;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setOriginalName
File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/log/LogUpload.java
Repository: sanluan/PublicCMS
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-21333
|
LOW
| 3.5
|
sanluan/PublicCMS
|
setOriginalName
|
publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/log/LogUpload.java
|
b4d5956e65b14347b162424abb197a180229b3db
| 0
|
Analyze the following code function for security vulnerabilities
|
public void onProfileConnectionStateChanged(BluetoothDevice device, int profileId, int newState, int prevState) {
Message m = mHandler.obtainMessage(MESSAGE_PROFILE_CONNECTION_STATE_CHANGED);
m.obj = device;
m.arg1 = profileId;
m.arg2 = newState;
Bundle b = new Bundle(1);
b.putInt("prevState", prevState);
m.setData(b);
mHandler.sendMessage(m);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onProfileConnectionStateChanged
File: src/com/android/bluetooth/btservice/AdapterService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-362",
"CWE-20"
] |
CVE-2016-3760
|
MEDIUM
| 5.4
|
android
|
onProfileConnectionStateChanged
|
src/com/android/bluetooth/btservice/AdapterService.java
|
122feb9a0b04290f55183ff2f0384c6c53756bd8
| 0
|
Analyze the following code function for security vulnerabilities
|
private static DevModeHandlerImpl createInstance(int runningPort,
Lookup lookup, File npmFolder, CompletableFuture<Void> waitFor) {
return new DevModeHandlerImpl(lookup, runningPort, npmFolder, waitFor);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createInstance
File: vaadin-dev-server/src/main/java/com/vaadin/base/devserver/DevModeHandlerImpl.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-172"
] |
CVE-2021-33604
|
LOW
| 1.2
|
vaadin/flow
|
createInstance
|
vaadin-dev-server/src/main/java/com/vaadin/base/devserver/DevModeHandlerImpl.java
|
2a801c42b406a00c44f4a85b4b4e4a4c5bf89adc
| 0
|
Analyze the following code function for security vulnerabilities
|
public Integer getAllowPing() {
return allowPing;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAllowPing
File: src/main/java/cn/luischen/model/ContentDomain.java
Repository: WinterChenS/my-site
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-29638
|
MEDIUM
| 5.4
|
WinterChenS/my-site
|
getAllowPing
|
src/main/java/cn/luischen/model/ContentDomain.java
|
d104f38aaae2f1b76c33fadfcf6b1ef1c6c340ed
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public ParcelFileDescriptor openFile(Uri uri, String mode) throws FileNotFoundException {
final int userId = getUserIdFromUri(uri, UserHandle.getCallingUserId());
if (userId != UserHandle.getCallingUserId()) {
getContext().enforceCallingPermission(Manifest.permission.INTERACT_ACROSS_USERS,
"Access files from the settings of another user");
}
final String callingPackage = getCallingPackage();
if (mode.contains("w") && !Settings.checkAndNoteWriteSettingsOperation(getContext(),
Binder.getCallingUid(), callingPackage, getCallingAttributionTag(),
true /* throwException */)) {
Slog.e(LOG_TAG, "Package: " + callingPackage + " is not allowed to modify "
+ "system settings files.");
}
uri = ContentProvider.getUriWithoutUserId(uri);
final String cacheRingtoneSetting;
final String cacheName;
if (Settings.System.RINGTONE_CACHE_URI.equals(uri)) {
cacheRingtoneSetting = Settings.System.RINGTONE;
cacheName = Settings.System.RINGTONE_CACHE;
} else if (Settings.System.NOTIFICATION_SOUND_CACHE_URI.equals(uri)) {
cacheRingtoneSetting = Settings.System.NOTIFICATION_SOUND;
cacheName = Settings.System.NOTIFICATION_SOUND_CACHE;
} else if (Settings.System.ALARM_ALERT_CACHE_URI.equals(uri)) {
cacheRingtoneSetting = Settings.System.ALARM_ALERT;
cacheName = Settings.System.ALARM_ALERT_CACHE;
} else {
throw new FileNotFoundException("Direct file access no longer supported; "
+ "ringtone playback is available through android.media.Ringtone");
}
int actualCacheOwner;
// Redirect cache to parent if ringtone setting is owned by profile parent
synchronized (mLock) {
actualCacheOwner = resolveOwningUserIdForSystemSettingLocked(userId,
cacheRingtoneSetting);
}
final File cacheFile = new File(getRingtoneCacheDir(actualCacheOwner), cacheName);
return ParcelFileDescriptor.open(cacheFile, ParcelFileDescriptor.parseMode(mode));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: openFile
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
|
openFile
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
ff86ff28cf82124f8e65833a2dd8c319aea08945
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean hasSystemFeature(String name) {
synchronized (mPackages) {
return mAvailableFeatures.containsKey(name);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasSystemFeature
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
|
hasSystemFeature
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isUserRunning(int userId, int flags) {
if (userId != UserHandle.getCallingUserId() && checkCallingPermission(
INTERACT_ACROSS_USERS) != PackageManager.PERMISSION_GRANTED) {
String msg = "Permission Denial: isUserRunning() from pid="
+ Binder.getCallingPid()
+ ", uid=" + Binder.getCallingUid()
+ " requires " + INTERACT_ACROSS_USERS;
Slog.w(TAG, msg);
throw new SecurityException(msg);
}
synchronized (this) {
return mUserController.isUserRunningLocked(userId, flags);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isUserRunning
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
|
isUserRunning
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
int size() {
return mPidMap.size();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: size
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
|
size
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
private void debug(String msg) {
logger.debug(prefix + msg);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: debug
File: src/main/java/org/mozilla/jss/ssl/javax/JSSEngineReferenceImpl.java
Repository: dogtagpki/jss
The code follows secure coding practices.
|
[
"CWE-401"
] |
CVE-2021-4213
|
HIGH
| 7.5
|
dogtagpki/jss
|
debug
|
src/main/java/org/mozilla/jss/ssl/javax/JSSEngineReferenceImpl.java
|
5922560a78d0dee61af8a33cc9cfbf4cfa291448
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean wantNegotiate(SSLEngine engine) {
GrizzlyAsyncHttpProvider.LOGGER.info("ProtocolSelector::wantNegotiate");
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: wantNegotiate
File: providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java
Repository: AsyncHttpClient/async-http-client
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2013-7397
|
MEDIUM
| 4.3
|
AsyncHttpClient/async-http-client
|
wantNegotiate
|
providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java
|
df6ed70e86c8fc340ed75563e016c8baa94d7e72
| 0
|
Analyze the following code function for security vulnerabilities
|
public abstract StringBuilder getErasedSignature(StringBuilder sb);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getErasedSignature
File: src/main/java/com/fasterxml/jackson/databind/JavaType.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2019-16942
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
getErasedSignature
|
src/main/java/com/fasterxml/jackson/databind/JavaType.java
|
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getFocusedStackId() throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFocusedStackId
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
getFocusedStackId
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
private void noteUidProcessState(final int uid, final int state) {
mBatteryStatsService.noteUidProcessState(uid, state);
if (mTrackingAssociations) {
for (int i1=0, N1=mAssociations.size(); i1<N1; i1++) {
ArrayMap<ComponentName, SparseArray<ArrayMap<String, Association>>> targetComponents
= mAssociations.valueAt(i1);
for (int i2=0, N2=targetComponents.size(); i2<N2; i2++) {
SparseArray<ArrayMap<String, Association>> sourceUids
= targetComponents.valueAt(i2);
ArrayMap<String, Association> sourceProcesses = sourceUids.get(uid);
if (sourceProcesses != null) {
for (int i4=0, N4=sourceProcesses.size(); i4<N4; i4++) {
Association ass = sourceProcesses.valueAt(i4);
if (ass.mNesting >= 1) {
// currently associated
long uptime = SystemClock.uptimeMillis();
ass.mStateTimes[ass.mLastState-ActivityManager.MIN_PROCESS_STATE]
+= uptime - ass.mLastStateUptime;
ass.mLastState = state;
ass.mLastStateUptime = uptime;
}
}
}
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: noteUidProcessState
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
|
noteUidProcessState
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setFilterParameterEnabled(boolean theFilterParameterEnabled) {
myFilterParameterEnabled = theFilterParameterEnabled;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setFilterParameterEnabled
File: hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
Repository: hapifhir/hapi-fhir
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-32053
|
MEDIUM
| 5
|
hapifhir/hapi-fhir
|
setFilterParameterEnabled
|
hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
|
f2934b229c491235ab0e7782dea86b324521082a
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean exists(final Path path)
{
return Files.exists(path, LinkOption.NOFOLLOW_LINKS);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: exists
File: src/main/java/cloudsync/connector/LocalFilesystemConnector.java
Repository: HolgerHees/cloudsync
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-4773
|
LOW
| 3.3
|
HolgerHees/cloudsync
|
exists
|
src/main/java/cloudsync/connector/LocalFilesystemConnector.java
|
3ad796833398af257c28e0ebeade68518e0e612a
| 0
|
Analyze the following code function for security vulnerabilities
|
protected boolean getEnableSessionCreation() {
return enable_session_creation;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getEnableSessionCreation
File: src/main/java/org/conscrypt/SSLParametersImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3840
|
HIGH
| 10
|
android
|
getEnableSessionCreation
|
src/main/java/org/conscrypt/SSLParametersImpl.java
|
5af5e93463f4333187e7e35f3bd2b846654aa214
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void escapeXmlAttr(Object o, StringBuilder appendTo) {
if (o == null) {
appendTo.append("null");
return;
}
String s = o.toString();
int length = s.length();
appendTo.ensureCapacity(appendTo.length() + length + CAPACITY);
for (int i = 0; i < length; i++) {
char ch = s.charAt(i);
switch (ch) {
case '\n':
appendTo.append(" ");
break;
case '\r':
appendTo.append(" ");
break;
case '"':
appendTo.append(""");
break;
case '\'':
appendTo.append("'");
break;
case '&':
appendTo.append("&");
break;
case '<':
appendTo.append("<");
break;
default:
appendTo.append(ch);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: escapeXmlAttr
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
|
escapeXmlAttr
|
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
|
80a502d53cc48bf895711ab55f95e3a51e344ac1
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String getInternalJsCssLib(Map<String, Object> data) {
String jsCssLink = "";
// PWA: register service worker
if (!"true".equals(getPropertyString("disablePwa"))) {
WorkflowUserManager workflowUserManager = (WorkflowUserManager)AppUtil.getApplicationContext().getBean("workflowUserManager");
boolean pushEnabled = !"true".equals(getPropertyString("disablePush")) && !workflowUserManager.isCurrentUserAnonymous();
String appId = userview.getParamString("appId");
if (appId != null && !appId.isEmpty()) {
String userviewId = userview.getPropertyString("id");
String key = userview.getParamString("key");
if (key.isEmpty()) {
key = Userview.USERVIEW_KEY_EMPTY_VALUE;
}
boolean isEmbedded = false;
if(data.get("embed") != null){
isEmbedded = (Boolean) data.get("embed");
};
String pwaOnlineNotificationMessage = ResourceBundleUtil.getMessage("pwa.onlineNow");
String pwaOfflineNotificationMessage = ResourceBundleUtil.getMessage("pwa.offlineNow");
String pwaLoginPromptMessage = ResourceBundleUtil.getMessage("pwa.loginPrompt");
String pwaSyncingMessage = ResourceBundleUtil.getMessage("pwa.syncing");
String pwaSyncFailedMessage = ResourceBundleUtil.getMessage("pwa.syncFailed");
String pwaSyncSuccessMessage = ResourceBundleUtil.getMessage("pwa.syncSuccess");
String buildNumber = ResourceBundleUtil.getMessage("build.number");
String serviceWorkerUrl = data.get("context_path") + "/web/userview/" + appId + "/" + userviewId + "/"+key+"/serviceworker";
jsCssLink += "<script>$(function() {"
+ "var initPwaUtil = function(){"
+ "PwaUtil.contextPath = '" + data.get("context_path") + "';"
+ "PwaUtil.userviewKey = '" + key + "';"
+ "PwaUtil.homePageLink = '" + data.get("home_page_link") + "';"
+ "PwaUtil.serviceWorkerPath = '" + serviceWorkerUrl + "';"
+ "PwaUtil.subscriptionApiPath = '" + data.get("context_path") + "/web/console/profile/subscription';"
+ "PwaUtil.pushEnabled = " + pushEnabled + ";"
+ "PwaUtil.currentUsername = '" + workflowUserManager.getCurrentUsername() + "';"
+ "PwaUtil.onlineNotificationMessage = '" + pwaOnlineNotificationMessage + "';"
+ "PwaUtil.offlineNotificationMessage = '" + pwaOfflineNotificationMessage + "';"
+ "PwaUtil.loginPromptMessage = '" + pwaLoginPromptMessage + "';"
+ "PwaUtil.syncingMessage = '" + pwaSyncingMessage + "';"
+ "PwaUtil.syncFailedMessage = '" + pwaSyncFailedMessage + "';"
+ "PwaUtil.syncSuccessMessage = '" + pwaSyncSuccessMessage + "';"
+ "PwaUtil.isEmbedded = " + isEmbedded + ";"
+ "PwaUtil.register();"
+ "PwaUtil.init();"
+ "};"
+ "if (typeof PwaUtil !== \"undefined\") {initPwaUtil();} else { $(document).on(\"PwaUtil.ready\", function(){ initPwaUtil(); });}"
+ "});</script>";
}
}
return jsCssLink;
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2022-4560
- Severity: MEDIUM
- CVSS Score: 6.1
Description: Fixed: wflow-core - Userview - Fixed XSS issue on key parameter. @7.0-SNAPSHOT
Function: getInternalJsCssLib
File: wflow-core/src/main/java/org/joget/plugin/enterprise/UniversalTheme.java
Repository: jogetworkflow/jw-community
Fixed Code:
protected String getInternalJsCssLib(Map<String, Object> data) {
String jsCssLink = "";
// PWA: register service worker
if (!"true".equals(getPropertyString("disablePwa"))) {
WorkflowUserManager workflowUserManager = (WorkflowUserManager)AppUtil.getApplicationContext().getBean("workflowUserManager");
boolean pushEnabled = !"true".equals(getPropertyString("disablePush")) && !workflowUserManager.isCurrentUserAnonymous();
String appId = userview.getParamString("appId");
if (appId != null && !appId.isEmpty()) {
String userviewId = userview.getPropertyString("id");
String key = userview.getParamString("key");
if (key.isEmpty()) {
key = Userview.USERVIEW_KEY_EMPTY_VALUE;
}
boolean isEmbedded = false;
if(data.get("embed") != null){
isEmbedded = (Boolean) data.get("embed");
};
String pwaOnlineNotificationMessage = ResourceBundleUtil.getMessage("pwa.onlineNow");
String pwaOfflineNotificationMessage = ResourceBundleUtil.getMessage("pwa.offlineNow");
String pwaLoginPromptMessage = ResourceBundleUtil.getMessage("pwa.loginPrompt");
String pwaSyncingMessage = ResourceBundleUtil.getMessage("pwa.syncing");
String pwaSyncFailedMessage = ResourceBundleUtil.getMessage("pwa.syncFailed");
String pwaSyncSuccessMessage = ResourceBundleUtil.getMessage("pwa.syncSuccess");
String buildNumber = ResourceBundleUtil.getMessage("build.number");
String serviceWorkerUrl = data.get("context_path") + "/web/userview/" + appId + "/" + userviewId + "/"+key+"/serviceworker";
jsCssLink += "<script>$(function() {"
+ "var initPwaUtil = function(){"
+ "PwaUtil.contextPath = '" + StringUtil.escapeString(data.get("context_path").toString(), StringUtil.TYPE_JAVASCIPT, null) + "';"
+ "PwaUtil.userviewKey = '" + StringUtil.escapeString(key, StringUtil.TYPE_JAVASCIPT, null) + "';"
+ "PwaUtil.homePageLink = '" + StringUtil.escapeString(data.get("home_page_link").toString(), StringUtil.TYPE_JAVASCIPT, null) + "';"
+ "PwaUtil.serviceWorkerPath = '" + StringUtil.escapeString(serviceWorkerUrl, StringUtil.TYPE_JAVASCIPT, null) + "';"
+ "PwaUtil.subscriptionApiPath = '" + StringUtil.escapeString(data.get("context_path").toString(), StringUtil.TYPE_JAVASCIPT, null) + "/web/console/profile/subscription';"
+ "PwaUtil.pushEnabled = " + pushEnabled + ";"
+ "PwaUtil.currentUsername = '" + StringUtil.escapeString(workflowUserManager.getCurrentUsername(), StringUtil.TYPE_JAVASCIPT, null) + "';"
+ "PwaUtil.onlineNotificationMessage = '" + StringUtil.escapeString(pwaOnlineNotificationMessage, StringUtil.TYPE_JAVASCIPT, null) + "';"
+ "PwaUtil.offlineNotificationMessage = '" + StringUtil.escapeString(pwaOfflineNotificationMessage, StringUtil.TYPE_JAVASCIPT, null) + "';"
+ "PwaUtil.loginPromptMessage = '" + StringUtil.escapeString(pwaLoginPromptMessage, StringUtil.TYPE_JAVASCIPT, null) + "';"
+ "PwaUtil.syncingMessage = '" + StringUtil.escapeString(pwaSyncingMessage, StringUtil.TYPE_JAVASCIPT, null) + "';"
+ "PwaUtil.syncFailedMessage = '" + StringUtil.escapeString(pwaSyncFailedMessage, StringUtil.TYPE_JAVA, null) + "';"
+ "PwaUtil.syncSuccessMessage = '" + StringUtil.escapeString(pwaSyncSuccessMessage, StringUtil.TYPE_JAVASCIPT, null) + "';"
+ "PwaUtil.isEmbedded = " + isEmbedded + ";"
+ "PwaUtil.register();"
+ "PwaUtil.init();"
+ "};"
+ "if (typeof PwaUtil !== \"undefined\") {initPwaUtil();} else { $(document).on(\"PwaUtil.ready\", function(){ initPwaUtil(); });}"
+ "});</script>";
}
}
return jsCssLink;
}
|
[
"CWE-79"
] |
CVE-2022-4560
|
MEDIUM
| 6.1
|
jogetworkflow/jw-community
|
getInternalJsCssLib
|
wflow-core/src/main/java/org/joget/plugin/enterprise/UniversalTheme.java
|
ecf8be8f6f0cb725c18536ddc726d42a11bdaa1b
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
int pos = 0;
UserManager um = getContext().getSystemService(UserManager.class);
boolean allowRemoveUser = !um.hasUserRestriction(UserManager.DISALLOW_REMOVE_USER);
boolean canSwitchUsers = um.canSwitchUsers();
if (!mUserCaps.mIsAdmin && allowRemoveUser && canSwitchUsers) {
String nickname = mUserManager.getUserName();
MenuItem removeThisUser = menu.add(0, MENU_REMOVE_USER, pos++,
getResources().getString(R.string.user_remove_user_menu, nickname));
removeThisUser.setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);
}
super.onCreateOptionsMenu(menu, inflater);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onCreateOptionsMenu
File: src/com/android/settings/users/UserSettings.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3889
|
HIGH
| 7.2
|
android
|
onCreateOptionsMenu
|
src/com/android/settings/users/UserSettings.java
|
bd5d5176c74021e8cf4970f93f273ba3023c3d72
| 0
|
Analyze the following code function for security vulnerabilities
|
private void addColumn(SQLiteDatabase db, String dbTable, String columnName,
String columnDefinition) {
db.execSQL("ALTER TABLE " + dbTable + " ADD COLUMN " + columnName + " "
+ columnDefinition);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addColumn
File: src/com/android/providers/downloads/DownloadProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2016-0848
|
HIGH
| 7.2
|
android
|
addColumn
|
src/com/android/providers/downloads/DownloadProvider.java
|
bdc831357e7a116bc561d51bf2ddc85ff11c01a9
| 0
|
Analyze the following code function for security vulnerabilities
|
public synchronized void doSubmitDescription( StaplerRequest req, StaplerResponse rsp ) throws IOException, ServletException {
getPrimaryView().doSubmitDescription(req, rsp);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doSubmitDescription
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
|
doSubmitDescription
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
private void hidePastePopup() {
if (mPastePopupMenu == null) return;
mPastePopupMenu.hide();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hidePastePopup
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-1021"
] |
CVE-2015-1241
|
MEDIUM
| 4.3
|
chromium
|
hidePastePopup
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
9d343ad2ea6ec395c377a4efa266057155bfa9c1
| 0
|
Analyze the following code function for security vulnerabilities
|
public RemoteCallbackList<IResultReceiver> detachCancelListenersLocked() {
RemoteCallbackList<IResultReceiver> listeners = mCancelCallbacks;
mCancelCallbacks = null;
return listeners;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: detachCancelListenersLocked
File: services/core/java/com/android/server/am/PendingIntentRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-20918
|
CRITICAL
| 9.8
|
android
|
detachCancelListenersLocked
|
services/core/java/com/android/server/am/PendingIntentRecord.java
|
8418e3a017428683d173c0c82b0eb02d5b923a4e
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getDeviceManagementRoleHolder(UserHandle user) {
return DevicePolicyManagerService.this.getRoleHolderPackageNameOnUser(
mContext, RoleManager.ROLE_DEVICE_POLICY_MANAGEMENT, user);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDeviceManagementRoleHolder
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
|
getDeviceManagementRoleHolder
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void resetBuffer()
{
this.response.resetBuffer();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resetBuffer
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiServletResponse.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-601"
] |
CVE-2022-23618
|
MEDIUM
| 5.8
|
xwiki/xwiki-platform
|
resetBuffer
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiServletResponse.java
|
5251c02080466bf9fb55288f04a37671108f8096
| 0
|
Analyze the following code function for security vulnerabilities
|
@POST
@Path("threads")
@Operation(summary = "Post threads",
description = "Creates a new thread in the forum of the course node.")
@ApiResponse(responseCode = "200", description = "Ok.",
content = {
@Content(mediaType = "application/json", schema = @Schema(implementation = MessageVO.class)),
@Content(mediaType = "application/xml", schema = @Schema(implementation = MessageVO.class))
})
@ApiResponse(responseCode = "401", description = "The roles of the authenticated user are not sufficient.")
@ApiResponse(responseCode = "404", description = "The author, forum or message not found.")
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
public Response newThreadToForumPost(@FormParam("title") String title,
@FormParam("body") String body, @FormParam("authorKey") Long authorKey,
@Context HttpServletRequest httpRequest) {
return newThreadToForum(title, body, authorKey, httpRequest);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: newThreadToForumPost
File: src/main/java/org/olat/modules/fo/restapi/ForumWebService.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-41242
|
HIGH
| 7.9
|
OpenOLAT
|
newThreadToForumPost
|
src/main/java/org/olat/modules/fo/restapi/ForumWebService.java
|
c450df7d7ffe6afde39ebca6da9136f1caa16ec4
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequestMapping(value = "/{appId}" + CREATE_AND_GET_URL + ".{format:\\w+}", method = RequestMethod.POST)
public final void createReportAndGet(
@PathVariable final String appId,
@PathVariable final String format,
@RequestBody final String requestData,
@RequestParam(value = "inline", defaultValue = "false") final boolean inline,
final HttpServletRequest createReportRequest,
final HttpServletResponse createReportResponse)
throws IOException, ServletException, InterruptedException, NoSuchAppException {
setNoCache(createReportResponse);
String ref = createAndSubmitPrintJob(appId, format, requestData, createReportRequest,
createReportResponse);
if (ref == null) {
error(createReportResponse, "Failed to create a print job", HttpStatus.INTERNAL_SERVER_ERROR);
return;
}
final HandleReportLoadResult<Boolean> handler = new HandleReportLoadResult<Boolean>() {
@Override
public Boolean unknownReference(
final HttpServletResponse httpServletResponse, final String referenceId) {
error(httpServletResponse, "Print with ref=" + referenceId + " unknown",
HttpStatus.NOT_FOUND);
return true;
}
@Override
public Boolean unsupportedLoader(
final HttpServletResponse httpServletResponse, final String referenceId) {
error(httpServletResponse, "Print with ref=" + referenceId + " can not be loaded",
HttpStatus.NOT_FOUND);
return true;
}
@Override
public Boolean successfulPrint(
final PrintJobStatus successfulPrintResult,
final HttpServletResponse httpServletResponse,
final URI reportURI, final ReportLoader loader) throws IOException {
sendReportFile(successfulPrintResult, httpServletResponse, loader, reportURI, inline);
return true;
}
@Override
public Boolean failedPrint(
final PrintJobStatus failedPrintJob, final HttpServletResponse httpServletResponse) {
error(httpServletResponse, failedPrintJob.getError(), HttpStatus.INTERNAL_SERVER_ERROR);
return true;
}
@Override
public Boolean printJobPending(
final HttpServletResponse httpServletResponse, final String referenceId) {
return false;
}
};
boolean isDone = false;
long startWaitTime = System.currentTimeMillis();
final long maxWaitTimeInMillis = TimeUnit.SECONDS.toMillis(this.maxCreateAndGetWaitTimeInSeconds);
while (!isDone && System.currentTimeMillis() - startWaitTime < maxWaitTimeInMillis) {
Thread.sleep(TimeUnit.SECONDS.toMillis(1));
isDone = loadReport(ref, createReportResponse, handler);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createReportAndGet
File: core/src/main/java/org/mapfish/print/servlet/MapPrinterServlet.java
Repository: mapfish/mapfish-print
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-15231
|
MEDIUM
| 4.3
|
mapfish/mapfish-print
|
createReportAndGet
|
core/src/main/java/org/mapfish/print/servlet/MapPrinterServlet.java
|
89155f2506b9cee822e15ce60ccae390a1419d5e
| 0
|
Analyze the following code function for security vulnerabilities
|
private void addSecurityPages() {
add(new DynamicPathPageMapper("login", LoginPage.class));
add(new DynamicPathPageMapper("logout", LogoutPage.class));
add(new DynamicPathPageMapper("signup", SignUpPage.class));
add(new DynamicPathPageMapper("reset-password", PasswordResetPage.class));
add(new DynamicPathPageMapper(SsoProcessPage.MOUNT_PATH + "/${stage}/${connector}", SsoProcessPage.class));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addSecurityPages
File: server-core/src/main/java/io/onedev/server/web/BaseUrlMapper.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2021-21242
|
HIGH
| 7.5
|
theonedev/onedev
|
addSecurityPages
|
server-core/src/main/java/io/onedev/server/web/BaseUrlMapper.java
|
f864053176c08f59ef2d97fea192ceca46a4d9be
| 0
|
Analyze the following code function for security vulnerabilities
|
private void watchDeviceProvisioning(Context context) {
// setting system property based on whether device is provisioned
if (isDeviceProvisioned(context)) {
SystemProperties.set(SYSTEM_PROPERTY_DEVICE_PROVISIONED, "1");
} else {
// watch for device provisioning change
context.getContentResolver().registerContentObserver(
Settings.Global.getUriFor(Settings.Global.DEVICE_PROVISIONED), false,
new ContentObserver(new Handler(Looper.getMainLooper())) {
@Override
public void onChange(boolean selfChange) {
if (isDeviceProvisioned(context)) {
SystemProperties.set(SYSTEM_PROPERTY_DEVICE_PROVISIONED, "1");
context.getContentResolver().unregisterContentObserver(this);
}
}
});
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: watchDeviceProvisioning
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
|
watchDeviceProvisioning
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String getSectionLabelsSql(String sectionIds) {
return "select section_id, label from section where section_id in ("+sectionIds+")";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSectionLabelsSql
File: core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
Repository: OpenClinica
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-24831
|
HIGH
| 7.5
|
OpenClinica
|
getSectionLabelsSql
|
core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
|
b152cc63019230c9973965a98e4386ea5322c18f
| 0
|
Analyze the following code function for security vulnerabilities
|
static void logError(final HttpQuery query, final String msg,
final Throwable e) {
LOG.error(query.channel().toString() + ' ' + msg, e);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: logError
File: src/tsd/GraphHandler.java
Repository: OpenTSDB/opentsdb
The code follows secure coding practices.
|
[
"CWE-78"
] |
CVE-2023-25826
|
CRITICAL
| 9.8
|
OpenTSDB/opentsdb
|
logError
|
src/tsd/GraphHandler.java
|
26be40a5e5b6ce8b0b1e4686c4b0d7911e5d8a25
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isProfileOwner(ComponentName who, int userId) {
final ComponentName profileOwner = mInjector.binderWithCleanCallingIdentity(() ->
getProfileOwnerAsUser(userId));
return who != null && who.equals(profileOwner);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isProfileOwner
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
|
isProfileOwner
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public long getId()
{
return this.doc.getId();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getId
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
|
getId
|
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
|
protected CompletableFuture<Long> internalGetCompactionThreshold(boolean applied) {
return getTopicPoliciesAsyncWithRetry(topicName)
.thenApply(op -> op.map(TopicPolicies::getCompactionThreshold)
.orElseGet(() -> {
if (applied) {
Long namespacePolicy = getNamespacePolicies(namespaceName).compaction_threshold;
return namespacePolicy == null
? pulsar().getConfiguration().getBrokerServiceCompactionThresholdInBytes()
: namespacePolicy;
}
return null;
}));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: internalGetCompactionThreshold
File: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
Repository: apache/pulsar
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-41571
|
MEDIUM
| 4
|
apache/pulsar
|
internalGetCompactionThreshold
|
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
|
5b35bb81c31f1bc2ad98c9fde5b39ec68110ca52
| 0
|
Analyze the following code function for security vulnerabilities
|
public void unregisterStrongAuthTracker(final StrongAuthTracker strongAuthTracker) {
try {
getLockSettings().unregisterStrongAuthTracker(strongAuthTracker.mStub);
} catch (RemoteException e) {
Log.e(TAG, "Could not unregister StrongAuthTracker", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unregisterStrongAuthTracker
File: core/java/com/android/internal/widget/LockPatternUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3908
|
MEDIUM
| 4.3
|
android
|
unregisterStrongAuthTracker
|
core/java/com/android/internal/widget/LockPatternUtils.java
|
96daf7d4893f614714761af2d53dfb93214a32e4
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setUserInfoExpirationDate(Date date)
{
setSessionAttribute(PROP_SESSION_USERINFO_EXPORATIONDATE, date);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUserInfoExpirationDate
File: oidc-authenticator/src/main/java/org/xwiki/contrib/oidc/auth/internal/OIDCClientConfiguration.java
Repository: xwiki-contrib/oidc
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2022-39387
|
HIGH
| 7.5
|
xwiki-contrib/oidc
|
setUserInfoExpirationDate
|
oidc-authenticator/src/main/java/org/xwiki/contrib/oidc/auth/internal/OIDCClientConfiguration.java
|
0247af1417925b9734ab106ad7cd934ee870ac89
| 0
|
Analyze the following code function for security vulnerabilities
|
public void writeStructEnd() throws TException {
lastFieldId_ = lastField_.pop();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeStructEnd
File: thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java
Repository: facebook/fbthrift
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2019-11938
|
MEDIUM
| 5
|
facebook/fbthrift
|
writeStructEnd
|
thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java
|
08c2d412adb214c40bb03be7587057b25d053030
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void connectionServiceFocusGained() {
BindCallback callback = new BindCallback() {
@Override
public void onSuccess() {
try {
mServiceInterface.connectionServiceFocusGained(
Log.getExternalSession(TELECOM_ABBREVIATION));
} catch (RemoteException ignored) {
Log.d(this, "failed to inform the focus gained event");
}
}
@Override
public void onFailure() {}
};
mBinder.bind(callback, null /* null call */);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: connectionServiceFocusGained
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
|
connectionServiceFocusGained
|
src/com/android/server/telecom/ConnectionServiceWrapper.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
@LargeTest
@Test
@FlakyTest
public void testDisconnectSelfManaged() throws Exception {
// Add a self-managed call.
PhoneAccountHandle phoneAccountHandle = mPhoneAccountSelfManaged.getAccountHandle();
startAndMakeActiveIncomingCall("650-555-1212", phoneAccountHandle,
mConnectionServiceFixtureA);
Connection connection = mConnectionServiceFixtureA.mLatestConnection;
// Route self-managed call to speaker.
connection.setAudioRoute(CallAudioState.ROUTE_SPEAKER);
waitForHandlerAction(mConnectionServiceFixtureA.mConnectionServiceDelegate.getHandler(),
TEST_TIMEOUT);
// Place an emergency call.
startAndMakeDialingEmergencyCall("650-555-1212", mPhoneAccountE0.getAccountHandle(),
mConnectionServiceFixtureA);
// Should have reverted back to earpiece.
assertTrueWithTimeout(new Predicate<Void>() {
@Override
public boolean apply(Void aVoid) {
return mInCallServiceFixtureX.mCallAudioState.getRoute()
== CallAudioState.ROUTE_EARPIECE;
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: testDisconnectSelfManaged
File: tests/src/com/android/server/telecom/tests/BasicCallTests.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
testDisconnectSelfManaged
|
tests/src/com/android/server/telecom/tests/BasicCallTests.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
public int startActivity(IApplicationThread caller, String callingPackage, Intent intent,
String resolvedType, IBinder resultTo, String resultWho, int requestCode, int flags,
ProfilerInfo profilerInfo, Bundle options) throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startActivity
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
startActivity
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
@NonNull
public Builder setShowRemoteInputSpinner(boolean showSpinner) {
mN.extras.putBoolean(EXTRA_SHOW_REMOTE_INPUT_SPINNER, showSpinner);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setShowRemoteInputSpinner
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
setShowRemoteInputSpinner
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setSyntaxId(String syntaxId)
{
getDoc().setSyntaxId(syntaxId);
updateAuthor();
updateContentAuthor();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSyntaxId
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
|
setSyntaxId
|
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
|
public boolean cancel(String[] ids) {
if (ids == null || ids.length == 0) {
return false;
}
for (String id : ids) {
Task task = taskMapper.selectByPrimaryKey(id);
if (task != null && task.getBareMetalId() != null) {
task.setStatus(ServiceConstants.TaskStatusEnum.cancelled.name());
taskMapper.updateByPrimaryKey(task);
try {
MqUtil.request(MqConstants.EXCHANGE_NAME, MqConstants.MQ_ROUTINGKEY_DELETION + task.getBareMetalId(), "");
} catch (Exception e) {
LogUtil.error(String.format("delete queue failed!%s", task.getBareMetalId()));
}
failTask(task);
}
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cancel
File: rackshift-server/src/main/java/io/rackshift/service/TaskService.java
Repository: fit2cloud/rackshift
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2023-42405
|
CRITICAL
| 9.8
|
fit2cloud/rackshift
|
cancel
|
rackshift-server/src/main/java/io/rackshift/service/TaskService.java
|
305aea3b20d36591d519f7d04e0a25be05a51e93
| 0
|
Analyze the following code function for security vulnerabilities
|
private Element routeToHtml(RouteData route) {
String text = route.getTemplate();
if (text == null || text.isEmpty()) {
text = "<root>";
}
if (!route.getTemplate().contains(":")) {
return elementAsLink(route.getTemplate(), text);
} else {
Class<? extends Component> target = route.getNavigationTarget();
if (ParameterDeserializer.isAnnotatedParameter(target,
OptionalParameter.class)) {
text += " (supports optional parameter)";
} else {
text += " (requires parameter)";
}
return new Element(Tag.LI).text(text);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: routeToHtml
File: flow-server/src/main/java/com/vaadin/flow/router/RouteNotFoundError.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2021-31412
|
MEDIUM
| 4.3
|
vaadin/flow
|
routeToHtml
|
flow-server/src/main/java/com/vaadin/flow/router/RouteNotFoundError.java
|
c79a7a8dbe1a494ff99a591d2e85b1100fc0aa15
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void saveBatchXTrans(TestContext context) {
List<Object> list = Collections.singletonList(xPojo);
postgresClient = createFoo(context);
postgresClient.startTx(asyncAssertTx(context, trans -> {
postgresClient.saveBatch(trans, FOO, list, context.asyncAssertSuccess(save -> {
final String id = save.getResults().get(0).getString(0);
postgresClient.endTx(trans, context.asyncAssertSuccess(end -> {
postgresClient.getById(FOO, id, context.asyncAssertSuccess(get -> {
context.assertEquals("x", get.getString("key"));
}));
}));
}));
}));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: saveBatchXTrans
File: domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.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
|
saveBatchXTrans
|
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected BeanDeserializerBase asArrayDeserializer() {
SettableBeanProperty[] props = _beanProperties.getPropertiesInInsertionOrder();
return new BeanAsArrayDeserializer(this, props);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: asArrayDeserializer
File: src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializer.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2022-42004
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
asArrayDeserializer
|
src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializer.java
|
063183589218fec19a9293ed2f17ec53ea80ba88
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setTempFolderPath(String tempFolderPath) {
this.tempFolderPath = tempFolderPath;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setTempFolderPath
File: samples/client/petstore/java/okhttp-gson/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
|
setTempFolderPath
|
samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
protected boolean shouldPeek(Entry entry) {
return shouldPeek(entry, entry.notification);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: shouldPeek
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
shouldPeek
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean onTransact(int code, Parcel data, Parcel reply, int flags)
throws RemoteException {
try {
return super.onTransact(code, data, reply, flags);
} catch (RuntimeException e) {
// The account manager only throws security exceptions, so let's
// log all others.
if (!(e instanceof SecurityException || e instanceof IllegalArgumentException)) {
Slog.wtf(TAG, "Account Manager Crash", e);
}
throw e;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onTransact
File: services/core/java/com/android/server/accounts/AccountManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-502"
] |
CVE-2023-45777
|
HIGH
| 7.8
|
android
|
onTransact
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean updateConfiguration(Configuration values) {
enforceCallingPermission(CHANGE_CONFIGURATION, "updateConfiguration()");
synchronized(this) {
if (values == null && mWindowManager != null) {
// sentinel: fetch the current configuration from the window manager
values = mWindowManager.computeNewConfiguration(DEFAULT_DISPLAY);
}
if (mWindowManager != null) {
// Update OOM levels based on display size.
mProcessList.applyDisplaySize(mWindowManager);
}
final long origId = Binder.clearCallingIdentity();
try {
if (values != null) {
Settings.System.clearConfiguration(values);
}
updateConfigurationLocked(values, null, false, false /* persistent */,
UserHandle.USER_NULL, false /* deferResume */,
mTmpUpdateConfigurationResult);
return mTmpUpdateConfigurationResult.changes != 0;
} finally {
Binder.restoreCallingIdentity(origId);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateConfiguration
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
|
updateConfiguration
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public ComponentName getCallingActivity(IBinder token) {
synchronized (this) {
ActivityRecord r = getCallingRecordLocked(token);
return r != null ? r.intent.getComponent() : null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCallingActivity
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
|
getCallingActivity
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
private WindowState findFocusedWindowLocked(DisplayContent displayContent) {
final WindowList windows = displayContent.getWindowList();
for (int i = windows.size() - 1; i >= 0; i--) {
final WindowState win = windows.get(i);
if (localLOGV || DEBUG_FOCUS) Slog.v(
TAG, "Looking for focus: " + i
+ " = " + win
+ ", flags=" + win.mAttrs.flags
+ ", canReceive=" + win.canReceiveKeys());
if (!win.canReceiveKeys()) {
continue;
}
AppWindowToken wtoken = win.mAppToken;
// If this window's application has been removed, just skip it.
if (wtoken != null && (wtoken.removed || wtoken.sendingToBottom)) {
if (DEBUG_FOCUS) Slog.v(TAG, "Skipping " + wtoken + " because "
+ (wtoken.removed ? "removed" : "sendingToBottom"));
continue;
}
// Descend through all of the app tokens and find the first that either matches
// win.mAppToken (return win) or mFocusedApp (return null).
if (wtoken != null && win.mAttrs.type != TYPE_APPLICATION_STARTING &&
mFocusedApp != null) {
ArrayList<Task> tasks = displayContent.getTasks();
for (int taskNdx = tasks.size() - 1; taskNdx >= 0; --taskNdx) {
AppTokenList tokens = tasks.get(taskNdx).mAppTokens;
int tokenNdx = tokens.size() - 1;
for ( ; tokenNdx >= 0; --tokenNdx) {
final AppWindowToken token = tokens.get(tokenNdx);
if (wtoken == token) {
break;
}
if (mFocusedApp == token) {
// Whoops, we are below the focused app... no focus for you!
if (localLOGV || DEBUG_FOCUS_LIGHT) Slog.v(TAG,
"findFocusedWindow: Reached focused app=" + mFocusedApp);
return null;
}
}
if (tokenNdx >= 0) {
// Early exit from loop, must have found the matching token.
break;
}
}
}
if (DEBUG_FOCUS_LIGHT) Slog.v(TAG, "findFocusedWindow: Found new focus @ " + i +
" = " + win);
return win;
}
if (DEBUG_FOCUS_LIGHT) Slog.v(TAG, "findFocusedWindow: No focusable windows.");
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findFocusedWindowLocked
File: services/core/java/com/android/server/wm/WindowManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3875
|
HIGH
| 7.2
|
android
|
findFocusedWindowLocked
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setShouldManageLifetime(NotificationEntry entry, boolean shouldExtend) {
if (shouldExtend) {
mKeyToRemoveOnGutsClosed = entry.getKey();
if (Log.isLoggable(TAG, Log.DEBUG)) {
Log.d(TAG, "Keeping notification because it's showing guts. " + entry.getKey());
}
} else {
if (mKeyToRemoveOnGutsClosed != null
&& mKeyToRemoveOnGutsClosed.equals(entry.getKey())) {
mKeyToRemoveOnGutsClosed = null;
if (Log.isLoggable(TAG, Log.DEBUG)) {
Log.d(TAG, "Notification that was kept for guts was updated. "
+ entry.getKey());
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setShouldManageLifetime
File: packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationGutsManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40098
|
MEDIUM
| 5.5
|
android
|
setShouldManageLifetime
|
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationGutsManager.java
|
d21ffbe8a2eeb2a5e6da7efbb1a0430ba6b022e0
| 0
|
Analyze the following code function for security vulnerabilities
|
public Map<OsuProvider, PasspointConfiguration> getMatchingPasspointConfigsForOsuProviders(
List<OsuProvider> osuProviders) {
Map<OsuProvider, PasspointConfiguration> matchingPasspointConfigs = new HashMap<>();
for (OsuProvider osuProvider : osuProviders) {
Map<String, String> friendlyNamesForOsuProvider = osuProvider.getFriendlyNameList();
if (friendlyNamesForOsuProvider == null) continue;
for (PasspointProvider provider : mProviders.values()) {
PasspointConfiguration passpointConfiguration = provider.getConfig();
Map<String, String> serviceFriendlyNamesForPpsMo =
passpointConfiguration.getServiceFriendlyNames();
if (serviceFriendlyNamesForPpsMo == null) continue;
for (Map.Entry<String, String> entry : serviceFriendlyNamesForPpsMo.entrySet()) {
String lang = entry.getKey();
String friendlyName = entry.getValue();
if (friendlyName == null) continue;
String osuFriendlyName = friendlyNamesForOsuProvider.get(lang);
if (osuFriendlyName == null) continue;
if (friendlyName.equals(osuFriendlyName)) {
matchingPasspointConfigs.put(osuProvider, passpointConfiguration);
break;
}
}
}
}
return matchingPasspointConfigs;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMatchingPasspointConfigsForOsuProviders
File: service/java/com/android/server/wifi/hotspot2/PasspointManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-120"
] |
CVE-2023-21243
|
MEDIUM
| 5.5
|
android
|
getMatchingPasspointConfigsForOsuProviders
|
service/java/com/android/server/wifi/hotspot2/PasspointManager.java
|
5b49b8711efaadadf5052ba85288860c2d7ca7a6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public SerializationServiceBuilder setPartitioningStrategy(PartitioningStrategy partitionStrategy) {
this.partitioningStrategy = partitionStrategy;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setPartitioningStrategy
File: hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/DefaultSerializationServiceBuilder.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
setPartitioningStrategy
|
hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/DefaultSerializationServiceBuilder.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Duration refreshInterval() {
return REFRESH_INTERVAL_DURATION;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: refreshInterval
File: graylog2-server/src/main/java/org/graylog2/lookup/adapters/DnsLookupDataAdapter.java
Repository: Graylog2/graylog2-server
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2023-41045
|
MEDIUM
| 5.3
|
Graylog2/graylog2-server
|
refreshInterval
|
graylog2-server/src/main/java/org/graylog2/lookup/adapters/DnsLookupDataAdapter.java
|
466af814523cffae9fbc7e77bab7472988f03c3e
| 0
|
Analyze the following code function for security vulnerabilities
|
private void ReInitRounds()
{
int i;
jjround = 0x80000001;
for (i = 35; i-- > 0;)
jjrounds[i] = 0x80000000;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: ReInitRounds
File: impl/src/main/java/com/sun/el/parser/ELParserTokenManager.java
Repository: jakartaee/expression-language
The code follows secure coding practices.
|
[
"CWE-917"
] |
CVE-2021-28170
|
MEDIUM
| 5
|
jakartaee/expression-language
|
ReInitRounds
|
impl/src/main/java/com/sun/el/parser/ELParserTokenManager.java
|
b6a3943ac5fba71cbc6719f092e319caa747855b
| 0
|
Analyze the following code function for security vulnerabilities
|
public void switchToAllUnreadItemsFolder() {
updateDetailFragment(SubscriptionExpandableListAdapter.SPECIAL_FOLDERS.ALL_UNREAD_ITEMS.getValue(), true, null, true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: switchToAllUnreadItemsFolder
File: News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java
Repository: nextcloud/news-android
The code follows secure coding practices.
|
[
"CWE-829"
] |
CVE-2021-41256
|
MEDIUM
| 5.8
|
nextcloud/news-android
|
switchToAllUnreadItemsFolder
|
News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java
|
05449cb666059af7de2302df9d5c02997a23df85
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
public AdapterInputConnection getInputConnectionForTest() {
return mInputConnection;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInputConnectionForTest
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
getInputConnectionForTest
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
public void batchUpdateEnv(ApiScenarioBatchRequest request) {
Map<String, String> envMap = request.getEnvMap();
String envType = request.getEnvironmentType();
String envGroupId = request.getEnvironmentGroupId();
Map<String, List<String>> mapping = request.getMapping();
Set<String> set = mapping.keySet();
if (set.isEmpty()) {
return;
}
if (StringUtils.equals(envType, EnvironmentType.GROUP.name()) && StringUtils.isNotBlank(envGroupId)) {
set.forEach(id -> {
ApiScenarioWithBLOBs apiScenario = new ApiScenarioWithBLOBs();
apiScenario.setId(id);
apiScenario.setEnvironmentType(EnvironmentType.GROUP.name());
apiScenario.setEnvironmentGroupId(envGroupId);
apiScenarioMapper.updateByPrimaryKeySelective(apiScenario);
});
} else if (StringUtils.equals(envType, EnvironmentType.JSON.name())) {
set.forEach(id -> {
Map<String, String> newEnvMap = new HashMap<>(16);
if (envMap != null && !envMap.isEmpty()) {
List<String> list = mapping.get(id);
list.forEach(l -> {
newEnvMap.put(l, envMap.get(l));
});
}
if (!newEnvMap.isEmpty()) {
ApiScenarioWithBLOBs apiScenario = new ApiScenarioWithBLOBs();
apiScenario.setId(id);
apiScenario.setEnvironmentType(EnvironmentType.JSON.name());
apiScenario.setEnvironmentJson(JSON.toJSONString(newEnvMap));
apiScenarioMapper.updateByPrimaryKeySelective(apiScenario);
}
});
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: batchUpdateEnv
File: backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2021-45789
|
MEDIUM
| 6.5
|
metersphere
|
batchUpdateEnv
|
backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java
|
d74e02cdff47cdf7524d305d098db6ffb7f61b47
| 0
|
Analyze the following code function for security vulnerabilities
|
public static File createSymbolicDir(File source, File dest) throws IOException {
String sourceDirName = source.getName();
File targetLink = new File(dest, sourceDirName);
Files.createSymbolicLink(targetLink.toPath(), source.toPath());
return targetLink;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createSymbolicDir
File: frontend/archive/src/main/java/org/pytorch/serve/archive/utils/ZipUtils.java
Repository: pytorch/serve
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2023-48299
|
MEDIUM
| 5.3
|
pytorch/serve
|
createSymbolicDir
|
frontend/archive/src/main/java/org/pytorch/serve/archive/utils/ZipUtils.java
|
bfb3d42396727614aef625143b4381e64142f9bb
| 0
|
Analyze the following code function for security vulnerabilities
|
public void beginTransactionWithListener(SQLiteTransactionListener transactionListener) {
beginTransaction(transactionListener, true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: beginTransactionWithListener
File: core/java/android/database/sqlite/SQLiteDatabase.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2018-9493
|
LOW
| 2.1
|
android
|
beginTransactionWithListener
|
core/java/android/database/sqlite/SQLiteDatabase.java
|
ebc250d16c747f4161167b5ff58b3aea88b37acf
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setContentType(final String val) {
contentType = val;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setContentType
File: src/main/java/org/bedework/webdav/servlet/common/PostRequestPars.java
Repository: Bedework/bw-webdav
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-20000
|
MEDIUM
| 5
|
Bedework/bw-webdav
|
setContentType
|
src/main/java/org/bedework/webdav/servlet/common/PostRequestPars.java
|
67283fb8b9609acdb1a8d2e7fefe195b4a261062
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean extract(ArrayList<String> errors, URL source, File target) {
FileOutputStream os = null;
InputStream is = null;
boolean extracting = false;
try {
if (!target.exists() || isStale(source, target) ) {
is = source.openStream();
if (is != null) {
byte[] buffer = new byte[4096];
os = new FileOutputStream(target);
extracting = true;
int read;
while ((read = is.read(buffer)) != -1) {
os.write(buffer, 0, read);
}
os.close();
is.close();
chmod("755", target);
}
}
} catch (Throwable e) {
try {
if (os != null)
os.close();
} catch (IOException e1) {
}
try {
if (is != null)
is.close();
} catch (IOException e1) {
}
if (extracting && target.exists())
target.delete();
errors.add(e.getMessage());
return false;
}
return true;
}
|
Vulnerability Classification:
- CWE: CWE-94
- CVE: CVE-2013-2035
- Severity: MEDIUM
- CVSS Score: 4.4
Description: Simplify shared lib extraction.
Function: extract
File: hawtjni-runtime/src/main/java/org/fusesource/hawtjni/runtime/Library.java
Repository: fusesource/hawtjni
Fixed Code:
private File extract(ArrayList<String> errors, URL source, String prefix, String suffix, File directory) {
File target = null;
try {
FileOutputStream os = null;
InputStream is = null;
try {
target = File.createTempFile(prefix, suffix, directory);
is = source.openStream();
if (is != null) {
byte[] buffer = new byte[4096];
os = new FileOutputStream(target);
int read;
while ((read = is.read(buffer)) != -1) {
os.write(buffer, 0, read);
}
chmod("755", target);
}
target.deleteOnExit();
return target;
} finally {
close(os);
close(is);
}
} catch (Throwable e) {
if( target!=null ) {
target.delete();
}
errors.add(e.getMessage());
}
return null;
}
|
[
"CWE-94"
] |
CVE-2013-2035
|
MEDIUM
| 4.4
|
fusesource/hawtjni
|
extract
|
hawtjni-runtime/src/main/java/org/fusesource/hawtjni/runtime/Library.java
|
92c266170ce98edc200c656bd034a237098b8aa5
| 1
|
Analyze the following code function for security vulnerabilities
|
public WearableExtender setStartScrollBottom(boolean startScrollBottom) {
setFlag(FLAG_START_SCROLL_BOTTOM, startScrollBottom);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setStartScrollBottom
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
setStartScrollBottom
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public SleepToken acquireSleepToken(String tag) {
Preconditions.checkNotNull(tag);
ComponentName requestedVrService = null;
ComponentName callingVrActivity = null;
int userId = -1;
synchronized (ActivityManagerService.this) {
if (mFocusedActivity != null) {
requestedVrService = mFocusedActivity.requestedVrComponent;
callingVrActivity = mFocusedActivity.info.getComponentName();
userId = mFocusedActivity.userId;
}
}
if (requestedVrService != null) {
applyVrMode(false, requestedVrService, userId, callingVrActivity, true);
}
synchronized (ActivityManagerService.this) {
SleepTokenImpl token = new SleepTokenImpl(tag);
mSleepTokens.add(token);
updateSleepIfNeededLocked();
return token;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: acquireSleepToken
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
|
acquireSleepToken
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
public void waitForPixelColorAtCenterOfView(final AwContents awContents,
final AwTestContainerView testContainerView, final int expectedColor) throws Exception {
pollUiThread(new Callable<Boolean>() {
@Override
public Boolean call() throws Exception {
Bitmap bitmap = GraphicsTestUtils.drawAwContents(awContents, 2, 2,
-(float) testContainerView.getWidth() / 2,
-(float) testContainerView.getHeight() / 2);
return bitmap.getPixel(0, 0) == expectedColor;
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: waitForPixelColorAtCenterOfView
File: android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-254"
] |
CVE-2016-5155
|
MEDIUM
| 4.3
|
chromium
|
waitForPixelColorAtCenterOfView
|
android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java
|
b8dcfeb065bbfd777cdc5f5433da9a87f25e6ec6
| 0
|
Analyze the following code function for security vulnerabilities
|
private static UInteger nextSubscriptionId() {
return uint(SUBSCRIPTION_IDS.incrementAndGet());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nextSubscriptionId
File: opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/subscriptions/SubscriptionManager.java
Repository: eclipse/milo
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2022-25897
|
HIGH
| 7.5
|
eclipse/milo
|
nextSubscriptionId
|
opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/subscriptions/SubscriptionManager.java
|
4534381760d7d9f0bf00cbf6a8449bb0d13c6ce5
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<Sysprop> getAllSpaces() {
if (allSpaces == null) {
allSpaces = new LinkedList<>(pc.findQuery("scooldspace", "*", new Pager(Config.DEFAULT_LIMIT)));
}
return allSpaces;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAllSpaces
File: src/main/java/com/erudika/scoold/utils/ScooldUtils.java
Repository: Erudika/scoold
The code follows secure coding practices.
|
[
"CWE-130"
] |
CVE-2022-1543
|
MEDIUM
| 6.5
|
Erudika/scoold
|
getAllSpaces
|
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
public BaseProperty<ObjectPropertyReference> getXObjectProperty(ObjectPropertyReference objectPropertyReference)
{
BaseObject object = getXObject((ObjectReference) objectPropertyReference.getParent());
if (object != null) {
return (BaseProperty<ObjectPropertyReference>) object.getField(objectPropertyReference.getName());
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getXObjectProperty
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
|
getXObjectProperty
|
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 ActionReturnValue runAction(ActionType actionType,
ActionParametersBase params) {
log.debug("Server: RunAction invoked!"); //$NON-NLS-1$
debugAction(actionType, params);
params.setSessionId(getEngineSessionId());
if (params.getCorrelationId() == null) {
params.setCorrelationId(CorrelationIdTracker.getCorrelationId());
}
return getBackend().runAction(actionType, params);
}
|
Vulnerability Classification:
- CWE: CWE-287
- CVE: CVE-2024-0822
- Severity: HIGH
- CVSS Score: 7.5
Description: Disable execution of CreateUserSession from GWT code
CreateUserSesssion should be executed only as a part of login flow, so
explicitly disable execution from GWT code.
Signed-off-by: Martin Perina <mperina@redhat.com>
Function: runAction
File: frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/server/gwt/GenericApiGWTServiceImpl.java
Repository: oVirt/ovirt-engine
Fixed Code:
@Override
public ActionReturnValue runAction(ActionType actionType,
ActionParametersBase params) {
log.debug("Server: RunAction invoked!"); //$NON-NLS-1$
debugAction(actionType, params);
// CreateUserSession should never be invoked from GWT code
if (actionType == ActionType.CreateUserSession) {
ActionReturnValue error = new ActionReturnValue();
error.setSucceeded(false);
error.setFault(new EngineFault(new RuntimeException("Command cannot be executed from client"))); //$NON-NLS-1$
return error;
}
params.setSessionId(getEngineSessionId());
if (params.getCorrelationId() == null) {
params.setCorrelationId(CorrelationIdTracker.getCorrelationId());
}
return getBackend().runAction(actionType, params);
}
|
[
"CWE-287"
] |
CVE-2024-0822
|
HIGH
| 7.5
|
oVirt/ovirt-engine
|
runAction
|
frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/server/gwt/GenericApiGWTServiceImpl.java
|
036f617316f6d7077cd213eb613eb4816e33d1fc
| 1
|
Analyze the following code function for security vulnerabilities
|
static void appendMemInfo(StringBuilder sb, ProcessMemInfo mi) {
appendBasicMemEntry(sb, mi.oomAdj, mi.procState, mi.pss, mi.memtrack, mi.name);
sb.append(" (pid ");
sb.append(mi.pid);
sb.append(") ");
sb.append(mi.adjType);
sb.append('\n');
if (mi.adjReason != null) {
sb.append(" ");
sb.append(mi.adjReason);
sb.append('\n');
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: appendMemInfo
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
|
appendMemInfo
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
private void resetPassword(String passwordToSet) {
if (StringUtils.isBlank(passwordToSet)) {
encryptedPassword = null;
}
setPasswordIfNotBlank(passwordToSet);
}
|
Vulnerability Classification:
- CWE: CWE-668
- CVE: CVE-2022-39309
- Severity: MEDIUM
- CVSS Score: 6.5
Description: SCMMaterial changes #000
* SCMMaterial unlike SCMMaterialConfig objects are used for polling,
they do not need to encrypt the password. Hence removing the
encryptedPassword attribute.
Function: resetPassword
File: domain/src/main/java/com/thoughtworks/go/config/materials/ScmMaterial.java
Repository: gocd
Fixed Code:
private void resetPassword(String passwordToSet) {
setPasswordIfNotBlank(passwordToSet);
}
|
[
"CWE-668"
] |
CVE-2022-39309
|
MEDIUM
| 6.5
|
gocd
|
resetPassword
|
domain/src/main/java/com/thoughtworks/go/config/materials/ScmMaterial.java
|
691b479f1310034992da141760e9c5d1f5b60e8a
| 1
|
Analyze the following code function for security vulnerabilities
|
private void saveUserRestrictionsLocked(int userId) {
saveSettingsLocked(userId);
pushUserRestrictions(userId);
sendChangedNotification(userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: saveUserRestrictionsLocked
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
|
saveUserRestrictionsLocked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable
public SettingsState getSettingsLocked(int type, int userId) {
final int key = makeKey(type, userId);
return peekSettingsStateLocked(key);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSettingsLocked
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
|
getSettingsLocked
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
ff86ff28cf82124f8e65833a2dd8c319aea08945
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setMeta(String meta)
{
if (meta == null) {
if (this.meta != null) {
setMetaDataDirty(true);
}
} else if (!meta.equals(this.meta)) {
setMetaDataDirty(true);
}
this.meta = meta;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setMeta
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
|
setMeta
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean setNetworkLastUsedSecurityParams(int networkId, SecurityParams params) {
WifiConfiguration config = getInternalConfiguredNetwork(networkId);
if (config == null) {
Log.e(TAG, "Cannot find network for " + networkId);
return false;
}
config.getNetworkSelectionStatus().setLastUsedSecurityParams(params);
if (mVerboseLoggingEnabled) {
Log.v(TAG, "Update last used security param for " + config.getProfileKey()
+ " with security type " + params.getSecurityType());
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setNetworkLastUsedSecurityParams
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
|
setNetworkLastUsedSecurityParams
|
service/java/com/android/server/wifi/WifiConfigManager.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getPlainText(String messageId, Object... args) {
String msg = getMessage(messageId, args);
String unescaped = StringEscapeUtils.unescapeHtml(msg);
return StringUtil.toPlainText(unescaped);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPlainText
File: java/code/src/com/redhat/rhn/common/localization/LocalizationService.java
Repository: spacewalkproject/spacewalk
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2016-3079
|
MEDIUM
| 4.3
|
spacewalkproject/spacewalk
|
getPlainText
|
java/code/src/com/redhat/rhn/common/localization/LocalizationService.java
|
7b9ff9ad
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public long getLong(String key, long defaultValue, int userId) throws RemoteException {
checkReadPermission(key, userId);
String value = getStringUnchecked(key, null, userId);
return TextUtils.isEmpty(value) ? defaultValue : Long.parseLong(value);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLong
File: services/core/java/com/android/server/LockSettingsService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-255"
] |
CVE-2016-3749
|
MEDIUM
| 4.6
|
android
|
getLong
|
services/core/java/com/android/server/LockSettingsService.java
|
e83f0f6a5a6f35323f5367f99c8e287c440f33f5
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onTrustManagedChanged(boolean managed, int userId) {
mUserTrustIsManaged.put(userId, managed);
for (int i = 0; i < mCallbacks.size(); i++) {
KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get();
if (cb != null) {
cb.onTrustManagedChanged(userId);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onTrustManagedChanged
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
|
onTrustManagedChanged
|
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public AnnotatedServiceBindingBuilder annotatedService() {
return new AnnotatedServiceBindingBuilder(this);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: annotatedService
File: core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-44487
|
HIGH
| 7.5
|
line/armeria
|
annotatedService
|
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
|
df7f85824a62e997b910b5d6194a3335841065fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public PrintStream createPrintStream(String charset) throws FileNotFoundException, UnsupportedEncodingException {
return new PrintStream(internal, charset);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createPrintStream
File: src/net/sourceforge/plantuml/security/SFile.java
Repository: plantuml
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2023-3431
|
MEDIUM
| 5.3
|
plantuml
|
createPrintStream
|
src/net/sourceforge/plantuml/security/SFile.java
|
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<Proxy> select(URI uri) {
if (mProxyService == null) {
mProxyService = IProxyService.Stub.asInterface(
ServiceManager.getService(PROXY_SERVICE));
}
if (mProxyService == null) {
Log.e(TAG, "select: no proxy service return NO_PROXY");
return Lists.newArrayList(java.net.Proxy.NO_PROXY);
}
String response = null;
String urlString;
try {
urlString = uri.toURL().toString();
} catch (MalformedURLException e) {
urlString = uri.getHost();
}
try {
response = mProxyService.resolvePacFile(uri.getHost(), urlString);
} catch (Exception e) {
Log.e(TAG, "Error resolving PAC File", e);
}
if (response == null) {
return mDefaultList;
}
return parseResponse(response);
}
|
Vulnerability Classification:
- CWE: CWE-20
- CVE: CVE-2016-3763
- Severity: MEDIUM
- CVSS Score: 5.0
Description: Don't pass URL path and username/password to PAC scripts
The URL path could contain credentials that apps don't want exposed
to a potentially malicious PAC script.
Bug: 27593919
Change-Id: I4bb0362fc91f70ad47c4c7453d77d6f9a1e8eeed
Function: select
File: core/java/android/net/PacProxySelector.java
Repository: android
Fixed Code:
@Override
public List<Proxy> select(URI uri) {
if (mProxyService == null) {
mProxyService = IProxyService.Stub.asInterface(
ServiceManager.getService(PROXY_SERVICE));
}
if (mProxyService == null) {
Log.e(TAG, "select: no proxy service return NO_PROXY");
return Lists.newArrayList(java.net.Proxy.NO_PROXY);
}
String response = null;
String urlString;
try {
// Strip path and username/password from URI so it's not visible to PAC script. The
// path often contains credentials the app does not want exposed to a potentially
// malicious PAC script.
if (!"http".equalsIgnoreCase(uri.getScheme())) {
uri = new URI(uri.getScheme(), null, uri.getHost(), uri.getPort(), "/", null, null);
}
urlString = uri.toURL().toString();
} catch (URISyntaxException e) {
urlString = uri.getHost();
} catch (MalformedURLException e) {
urlString = uri.getHost();
}
try {
response = mProxyService.resolvePacFile(uri.getHost(), urlString);
} catch (Exception e) {
Log.e(TAG, "Error resolving PAC File", e);
}
if (response == null) {
return mDefaultList;
}
return parseResponse(response);
}
|
[
"CWE-20"
] |
CVE-2016-3763
|
MEDIUM
| 5
|
android
|
select
|
core/java/android/net/PacProxySelector.java
|
ec2fc50d202d975447211012997fe425496c849c
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public IWindowOrganizerController getWindowOrganizerController() {
return mWindowOrganizerController;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getWindowOrganizerController
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
|
getWindowOrganizerController
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setUsageLimitStartTimeInMillis(long usageLimitStartTimeInMillis) {
mUsageLimitStartTimeInMillis = usageLimitStartTimeInMillis;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUsageLimitStartTimeInMillis
File: framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-120"
] |
CVE-2023-21243
|
MEDIUM
| 5.5
|
android
|
setUsageLimitStartTimeInMillis
|
framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java
|
5b49b8711efaadadf5052ba85288860c2d7ca7a6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public WearableExtender setHintAmbientBigPicture(boolean hintAmbientBigPicture) {
setFlag(FLAG_BIG_PICTURE_AMBIENT, hintAmbientBigPicture);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setHintAmbientBigPicture
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
setHintAmbientBigPicture
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
public void notifyPostedLocked(StatusBarNotification sbn, StatusBarNotification oldSbn) {
// Lazily initialized snapshots of the notification.
TrimCache trimCache = new TrimCache(sbn);
for (final ManagedServiceInfo info : mServices) {
boolean sbnVisible = isVisibleToListener(sbn, info);
boolean oldSbnVisible = oldSbn != null ? isVisibleToListener(oldSbn, info) : false;
// This notification hasn't been and still isn't visible -> ignore.
if (!oldSbnVisible && !sbnVisible) {
continue;
}
final NotificationRankingUpdate update = makeRankingUpdateLocked(info);
// This notification became invisible -> remove the old one.
if (oldSbnVisible && !sbnVisible) {
final StatusBarNotification oldSbnLightClone = oldSbn.cloneLight();
mHandler.post(new Runnable() {
@Override
public void run() {
notifyRemoved(info, oldSbnLightClone, update);
}
});
continue;
}
final StatusBarNotification sbnToPost = trimCache.ForListener(info);
mHandler.post(new Runnable() {
@Override
public void run() {
notifyPosted(info, sbnToPost, update);
}
});
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: notifyPostedLocked
File: services/core/java/com/android/server/notification/NotificationManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3884
|
MEDIUM
| 4.3
|
android
|
notifyPostedLocked
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
@CalledByNative
public String getUrl() {
return mContentViewCore != null ? mContentViewCore.getUrl() : "";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUrl
File: chrome/android/java/src/org/chromium/chrome/browser/Tab.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
getUrl
|
chrome/android/java/src/org/chromium/chrome/browser/Tab.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.