instruction
string | input
string | output
string | cwe_ids
list | cve_id
string | severity
string | cvss_score
float64 | repo_name
string | func_name
string | file_path
string | commit_hash
string | is_vulnerable
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Analyze the following code function for security vulnerabilities
|
private void addChatMessageToDB(int direction, String[] tJID,
String message, int delivery_status, long ts, String packetID, String replaceID) {
ContentValues values = new ContentValues();
values.put(ChatConstants.DIRECTION, direction);
values.put(ChatConstants.JID, tJID[0]);
values.put(ChatConstants.RESOURCE, tJID[1]);
values.put(ChatConstants.MESSAGE, message);
values.put(ChatConstants.DELIVERY_STATUS, delivery_status);
values.put(ChatConstants.DATE, ts);
values.put(ChatConstants.PACKET_ID, packetID);
if (replaceID != null) {
// obtain row id for last message with that full JID, or -1
long _id = getRowIdForMessage(tJID[0], tJID[1], direction, replaceID);
Log.d(TAG, "Replacing last message from " + tJID[0] + "/" + tJID[1] + ": " + replaceID + " -> " + packetID);
Uri row = Uri.withAppendedPath(ChatProvider.CONTENT_URI, "" + _id);
if (_id >= 0 && mContentResolver.update(row, values, null, null) == 1)
return;
}
mContentResolver.insert(ChatProvider.CONTENT_URI, values);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addChatMessageToDB
File: src/org/yaxim/androidclient/service/SmackableImp.java
Repository: ge0rg/yaxim
The code follows secure coding practices.
|
[
"CWE-20",
"CWE-346"
] |
CVE-2017-5589
|
MEDIUM
| 4.3
|
ge0rg/yaxim
|
addChatMessageToDB
|
src/org/yaxim/androidclient/service/SmackableImp.java
|
65a38dc77545d9568732189e86089390f0ceaf9f
| 0
|
Analyze the following code function for security vulnerabilities
|
public StreamConnection getStreamConnection(String urlAddress, Map<String, Object> headers, String payload) throws IOException {
switch (this) {
case s3:
return FileUtils.openS3InputStream(urlAddress);
case hdfs:
return FileUtils.openHdfsInputStream(urlAddress);
case ftp:
case http:
case https:
case gs:
return readHttpInputStream(urlAddress, headers, payload, REDIRECT_LIMIT);
default:
try {
return new StreamConnection.FileStreamConnection(URI.create(urlAddress));
} catch (IllegalArgumentException iae) {
try {
return new StreamConnection.FileStreamConnection(new URL(urlAddress).getFile());
} catch (MalformedURLException mue) {
if (mue.getMessage().contains("no protocol")) {
return new StreamConnection.FileStreamConnection(urlAddress);
}
throw mue;
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStreamConnection
File: core/src/main/java/apoc/util/FileUtils.java
Repository: neo4j-contrib/neo4j-apoc-procedures
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-23532
|
MEDIUM
| 6.5
|
neo4j-contrib/neo4j-apoc-procedures
|
getStreamConnection
|
core/src/main/java/apoc/util/FileUtils.java
|
01e63ed2d187cd2a8aa1d78bf831ef0fdd69b522
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setTaskResizeable(int taskId, int resizeableMode) {
synchronized (this) {
final TaskRecord task = mStackSupervisor.anyTaskForIdLocked(
taskId, MATCH_TASK_IN_STACKS_OR_RECENT_TASKS);
if (task == null) {
Slog.w(TAG, "setTaskResizeable: taskId=" + taskId + " not found");
return;
}
task.setResizeMode(resizeableMode);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setTaskResizeable
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
|
setTaskResizeable
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void destroy() {
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: destroy
File: server-core/src/main/java/io/onedev/server/git/GitFilter.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2022-39205
|
CRITICAL
| 9.8
|
theonedev/onedev
|
destroy
|
server-core/src/main/java/io/onedev/server/git/GitFilter.java
|
f1e97688e4e19d6de1dfa1d00e04655209d39f8e
| 0
|
Analyze the following code function for security vulnerabilities
|
void removeAllShortcutsAsync() {
if (!isAppSearchEnabled()) {
return;
}
runAsSystem(() -> fromAppSearch().thenAccept(session ->
session.remove("", getSearchSpec(), mShortcutUser.mExecutor, result -> {
if (!result.isSuccess()) {
Slog.e(TAG, "Failed to remove shortcuts from AppSearch. "
+ result.getErrorMessage());
}
})));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeAllShortcutsAsync
File: services/core/java/com/android/server/pm/ShortcutPackage.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40075
|
MEDIUM
| 5.5
|
android
|
removeAllShortcutsAsync
|
services/core/java/com/android/server/pm/ShortcutPackage.java
|
ae768fbb9975fdab267f525831cb52f485ab0ecc
| 0
|
Analyze the following code function for security vulnerabilities
|
private void clearProvidersAndHostsTagsLocked() {
final int providerCount = mProviders.size();
for (int i = 0; i < providerCount; i++) {
Provider provider = mProviders.get(i);
provider.tag = TAG_UNDEFINED;
}
final int hostCount = mHosts.size();
for (int i = 0; i < hostCount; i++) {
Host host = mHosts.get(i);
host.tag = TAG_UNDEFINED;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearProvidersAndHostsTagsLocked
File: services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-1541
|
MEDIUM
| 4.3
|
android
|
clearProvidersAndHostsTagsLocked
|
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
|
0b98d304c467184602b4c6bce76fda0b0274bc07
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void removeContentProviderExternalAsUser(String name, IBinder token, int userId) {
traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "removeContentProviderExternalAsUser: ", name);
try {
mCpHelper.removeContentProviderExternalAsUser(name, token, userId);
} finally {
Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeContentProviderExternalAsUser
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
|
removeContentProviderExternalAsUser
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
void onRefinementResult(TargetInfo selectedTarget, Intent matchingIntent) {
if (mRefinementResultReceiver != null) {
mRefinementResultReceiver.destroy();
mRefinementResultReceiver = null;
}
if (selectedTarget == null) {
Log.e(TAG, "Refinement result intent did not match any known targets; canceling");
} else if (!checkTargetSourceIntent(selectedTarget, matchingIntent)) {
Log.e(TAG, "onRefinementResult: Selected target " + selectedTarget
+ " cannot match refined source intent " + matchingIntent);
} else if (super.onTargetSelected(selectedTarget.cloneFilledIn(matchingIntent, 0), false)) {
finish();
return;
}
onRefinementCanceled();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onRefinementResult
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
|
onRefinementResult
|
core/java/com/android/internal/app/ChooserActivity.java
|
ddbf2db5b946be8fdc45c7b0327bf560b2a06988
| 0
|
Analyze the following code function for security vulnerabilities
|
public abstract BaseXMLBuilder document();
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: document
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
|
document
|
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
|
e6fddca201790abab4f2c274341c0bb8835c3e73
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setRegisterActivitySubtitle(String registerActivitySubtitle) {
this.registerActivitySubtitle = parser.parseExpression(registerActivitySubtitle,
ParserContext.TEMPLATE_EXPRESSION);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setRegisterActivitySubtitle
File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/MicrosoftTeamsNotifier.java
Repository: codecentric/spring-boot-admin
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2022-46166
|
CRITICAL
| 9.8
|
codecentric/spring-boot-admin
|
setRegisterActivitySubtitle
|
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/MicrosoftTeamsNotifier.java
|
c14c3ec12533f71f84de9ce3ce5ceb7991975f75
| 0
|
Analyze the following code function for security vulnerabilities
|
private Date getDateSecure(ModuleConfiguration moduleConfig, String key) {
Object obj = moduleConfig.get(key);
if(obj instanceof Date) {
return (Date)obj;
}
return moduleConfig.getDateValue(key);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDateSecure
File: src/main/java/org/olat/restapi/repository/course/CourseElementWebService.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-41242
|
HIGH
| 7.9
|
OpenOLAT
|
getDateSecure
|
src/main/java/org/olat/restapi/repository/course/CourseElementWebService.java
|
c450df7d7ffe6afde39ebca6da9136f1caa16ec4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isClosed() {
synchronized (mLock) {
return mDestroyed;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isClosed
File: services/core/java/com/android/server/media/MediaSessionRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21280
|
MEDIUM
| 5.5
|
android
|
isClosed
|
services/core/java/com/android/server/media/MediaSessionRecord.java
|
06e772e05514af4aa427641784c5eec39a892ed3
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void copyResponse(InputStream is, OutputStream out, byte[] head,
boolean base64) throws IOException
{
if (base64)
{
try (BufferedInputStream in = new BufferedInputStream(is,
BUFFER_SIZE))
{
ByteArrayOutputStream os = new ByteArrayOutputStream();
byte[] buffer = new byte[0xFFFF];
os.write(head, 0, head.length);
for (int len = is.read(buffer); len != -1; len = is.read(buffer))
{
os.write(buffer, 0, len);
}
out.write(mxBase64.encodeToString(os.toByteArray(), false).getBytes());
}
}
else
{
out.write(head);
Utils.copy(is, out);
}
}
|
Vulnerability Classification:
- CWE: CWE-400
- CVE: CVE-2023-3398
- Severity: HIGH
- CVSS Score: 7.5
Description: 18.1.3 release
Function: copyResponse
File: src/main/java/com/mxgraph/online/ProxyServlet.java
Repository: jgraph/drawio
Fixed Code:
protected void copyResponse(InputStream is, OutputStream out, byte[] head,
boolean base64) throws IOException
{
if (base64)
{
int total = 0;
try (BufferedInputStream in = new BufferedInputStream(is,
BUFFER_SIZE))
{
ByteArrayOutputStream os = new ByteArrayOutputStream();
byte[] buffer = new byte[0xFFFF];
os.write(head, 0, head.length);
for (int len = is.read(buffer); len != -1; len = is.read(buffer))
{
total += len;
if (total > MAX_FETCH_SIZE)
{
throw new IOException("Size limit exceeded");
}
os.write(buffer, 0, len);
}
out.write(mxBase64.encodeToString(os.toByteArray(), false).getBytes());
}
}
else
{
out.write(head);
Utils.copyRestricted(is, out, MAX_FETCH_SIZE);
}
}
|
[
"CWE-400"
] |
CVE-2023-3398
|
HIGH
| 7.5
|
jgraph/drawio
|
copyResponse
|
src/main/java/com/mxgraph/online/ProxyServlet.java
|
064729fec4262f9373d9fdcafda0be47cd18dd50
| 1
|
Analyze the following code function for security vulnerabilities
|
public static List<Node> getNodes(Node node, String... nodePath) {
List<Node> res = new ArrayList<>();
getMatchingNodes(node, nodePath, 0, res);
return res;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNodes
File: src/edu/stanford/nlp/util/XMLUtils.java
Repository: stanfordnlp/CoreNLP
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-3869
|
MEDIUM
| 5
|
stanfordnlp/CoreNLP
|
getNodes
|
src/edu/stanford/nlp/util/XMLUtils.java
|
5d83f1e8482ca304db8be726cad89554c88f136a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setCountry(String country) {
this.country = country;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setCountry
File: base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
setCountry
|
base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void initialize(PortWithExistingProxyConstraint constraintAnnotation) {
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initialize
File: browserup-proxy-rest/src/main/java/com/browserup/bup/rest/validation/PortWithExistingProxyConstraint.java
Repository: browserup/browserup-proxy
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2020-26282
|
HIGH
| 7.5
|
browserup/browserup-proxy
|
initialize
|
browserup-proxy-rest/src/main/java/com/browserup/bup/rest/validation/PortWithExistingProxyConstraint.java
|
4b38e7a3e20917e5c3329d0d4e9590bed9d578ab
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isVisibleToListener(StatusBarNotification sbn, ManagedServiceInfo listener) {
if (!listener.enabledAndUserMatches(sbn.getUserId())) {
return false;
}
// TODO: remove this for older listeners.
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isVisibleToListener
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
|
isVisibleToListener
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getHint(Context context, boolean isAlpha, int type, boolean isProfile) {
if (isAlpha) {
if (type == TYPE_FINGERPRINT) {
return context.getString(alphaHintForFingerprint);
} else if (type == TYPE_FACE) {
return context.getString(alphaHintForFace);
} else if (type == TYPE_BIOMETRIC) {
return context.getString(alphaHintForBiometrics);
} else if (isProfile) {
return context.getSystemService(DevicePolicyManager.class).getResources()
.getString(alphaHintOverrideForProfile,
() -> context.getString(alphaHintForProfile));
} else {
return context.getString(alphaHint);
}
} else {
if (type == TYPE_FINGERPRINT) {
return context.getString(numericHintForFingerprint);
} else if (type == TYPE_FACE) {
return context.getString(numericHintForFace);
} else if (type == TYPE_BIOMETRIC) {
return context.getString(numericHintForBiometrics);
} else if (isProfile) {
return context.getSystemService(DevicePolicyManager.class).getResources()
.getString(numericHintOverrideForProfile,
() -> context.getString(numericHintForProfile));
} else {
return context.getString(numericHint);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getHint
File: src/com/android/settings/password/ChooseLockPassword.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40117
|
HIGH
| 7.8
|
android
|
getHint
|
src/com/android/settings/password/ChooseLockPassword.java
|
11815817de2f2d70fe842b108356a1bc75d44ffb
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean isState(State state1, State state2, State state3, State state4, State state5) {
return state1 == mState || state2 == mState || state3 == mState || state4 == mState
|| state5 == mState;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isState
File: services/core/java/com/android/server/wm/ActivityRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21145
|
HIGH
| 7.8
|
android
|
isState
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isAccessibilityButtonInNavigationBarOn(SettingsState secureSettings) {
return hasValueInA11yButtonTargets(secureSettings) && !isGestureNavigateEnabled();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isAccessibilityButtonInNavigationBarOn
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
|
isAccessibilityButtonInNavigationBarOn
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
ff86ff28cf82124f8e65833a2dd8c319aea08945
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setAutoUpdateMismatchErrorWithPipelines(Map<CaseInsensitiveString, Boolean> pipelinesWithThisMaterial) {
String message = format("The material of type %s (%s) is used elsewhere with a different value for autoUpdate (\"Poll for changes\"). Those values should be the same. Pipelines: %s", getTypeForDisplay(), getDescription(), join(pipelinesWithThisMaterial));
addError(AUTO_UPDATE, message);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAutoUpdateMismatchErrorWithPipelines
File: config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-77"
] |
CVE-2021-43286
|
MEDIUM
| 6.5
|
gocd
|
setAutoUpdateMismatchErrorWithPipelines
|
config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
|
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
| 0
|
Analyze the following code function for security vulnerabilities
|
public void getContent(XWikiDocument doc, StringBuffer buf)
{
buf.append(doc.getContent());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getContent
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-459"
] |
CVE-2023-36468
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
getContent
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
|
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
| 0
|
Analyze the following code function for security vulnerabilities
|
private float getFloatParam(final HttpServletRequest req, final String paramName, final float defaultValue) {
float value = defaultValue;
String paramValue = req.getParameter(paramName);
if (paramValue != null && !paramValue.isEmpty()) {
try {
value = Float.parseFloat(paramValue);
} catch (NumberFormatException nfe) {
value = defaultValue;
}
}
return value;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFloatParam
File: jbpm-designer-backend/src/main/java/org/jbpm/designer/web/server/TransformerServlet.java
Repository: kiegroup/jbpm-designer
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2017-7545
|
MEDIUM
| 4
|
kiegroup/jbpm-designer
|
getFloatParam
|
jbpm-designer-backend/src/main/java/org/jbpm/designer/web/server/TransformerServlet.java
|
a143f3b92a6a5a527d929d68c02a0c5d914ab81d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void executeURI() throws Exception {
final DataPoints[] datapoints = new DataPoints[1];
datapoints[0] = new MockDataPoints().getMock();
when(query_result.runAsync()).thenReturn(
Deferred.fromResult(datapoints));
final HttpQuery query = NettyMocks.getQuery(tsdb,
"/api/query?start=1h-ago&m=sum:sys.cpu.user");
NettyMocks.mockChannelFuture(query);
rpc.execute(tsdb, query);
final String json =
query.response().getContent().toString(Charset.forName("UTF-8"));
assertTrue(json.contains("\"metric\":\"system.cpu.user\""));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: executeURI
File: test/tsd/TestQueryRpc.java
Repository: OpenTSDB/opentsdb
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-25827
|
MEDIUM
| 6.1
|
OpenTSDB/opentsdb
|
executeURI
|
test/tsd/TestQueryRpc.java
|
ff02c1e95e60528275f69b31bcbf7b2ac625cea8
| 0
|
Analyze the following code function for security vulnerabilities
|
@CalledByNative
public void rendererResponsive() {
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: rendererResponsive
File: components/web_contents_delegate_android/android/java/src/org/chromium/components/web_contents_delegate_android/WebContentsDelegateAndroid.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
rendererResponsive
|
components/web_contents_delegate_android/android/java/src/org/chromium/components/web_contents_delegate_android/WebContentsDelegateAndroid.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
private int checkManagedProfileProvisioningPreCondition(String packageName,
@UserIdInt int callingUserId) {
if (!hasFeatureManagedUsers()) {
return STATUS_MANAGED_USERS_NOT_SUPPORTED;
}
if (getProfileOwnerAsUser(callingUserId) != null) {
// Managed user cannot have a managed profile.
return STATUS_USER_HAS_PROFILE_OWNER;
}
final long ident = mInjector.binderClearCallingIdentity();
try {
final UserHandle callingUserHandle = UserHandle.of(callingUserId);
final boolean hasDeviceOwner;
synchronized (getLockObject()) {
hasDeviceOwner = getDeviceOwnerAdminLocked() != null;
}
final boolean addingProfileRestricted = mUserManager.hasUserRestriction(
UserManager.DISALLOW_ADD_MANAGED_PROFILE, callingUserHandle);
if (mUserManager.getUserInfo(callingUserId).isProfile()) {
Slogf.i(LOG_TAG, "Calling user %d is a profile, cannot add another.",
callingUserId);
// The check is called from inside a managed profile. A managed profile cannot
// be provisioned from within another managed profile.
return STATUS_CANNOT_ADD_MANAGED_PROFILE;
}
// If there's a device owner, the restriction on adding a managed profile must be set.
if (hasDeviceOwner && !addingProfileRestricted) {
Slogf.wtf(LOG_TAG, "Has a device owner but no restriction on adding a profile.");
}
// Do not allow adding a managed profile if there's a restriction.
if (addingProfileRestricted) {
Slogf.i(LOG_TAG, "Adding a profile is restricted: User %s Has device owner? %b",
callingUserHandle, hasDeviceOwner);
return STATUS_CANNOT_ADD_MANAGED_PROFILE;
}
// Bail out if we are trying to provision a work profile but one already exists.
if (!mUserManager.canAddMoreManagedProfiles(
callingUserId, /* allowedToRemoveOne= */ false)) {
Slogf.i(LOG_TAG, "A work profile already exists.");
return STATUS_CANNOT_ADD_MANAGED_PROFILE;
}
} finally {
mInjector.binderRestoreCallingIdentity(ident);
}
return STATUS_OK;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkManagedProfileProvisioningPreCondition
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
|
checkManagedProfileProvisioningPreCondition
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isOctAt(int i) {
char ch = jsonish.charAt(i);
return '0' <= ch && ch <= '7';
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isOctAt
File: src/main/java/com/google/json/JsonSanitizer.java
Repository: OWASP/json-sanitizer
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-13973
|
MEDIUM
| 4.3
|
OWASP/json-sanitizer
|
isOctAt
|
src/main/java/com/google/json/JsonSanitizer.java
|
53ceaac3e0a10e86d512ce96a0056578f2d1978f
| 0
|
Analyze the following code function for security vulnerabilities
|
private static boolean isRmqObjectMessageClass(String clazz) {
return RMQObjectMessage.class.getName().equals(clazz);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isRmqObjectMessageClass
File: src/main/java/com/rabbitmq/jms/client/RMQMessage.java
Repository: rabbitmq/rabbitmq-jms-client
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2020-36282
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-jms-client
|
isRmqObjectMessageClass
|
src/main/java/com/rabbitmq/jms/client/RMQMessage.java
|
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void moveStackToDisplay(int stackId, int displayId) {
enforceCallingPermission(INTERNAL_SYSTEM_WINDOW, "moveStackToDisplay()");
synchronized (this) {
final long ident = Binder.clearCallingIdentity();
try {
if (DEBUG_STACK) Slog.d(TAG_STACK, "moveStackToDisplay: moving stackId=" + stackId
+ " to displayId=" + displayId);
mStackSupervisor.moveStackToDisplayLocked(stackId, displayId, ON_TOP);
} finally {
Binder.restoreCallingIdentity(ident);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: moveStackToDisplay
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
|
moveStackToDisplay
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public void pushStaticVipRoute(boolean inBound, Route route, IPClient client, LBMember member, IOFSwitch pinSwitch) {
List<NodePortTuple> path = route.getPath();
if (path.size() > 0) {
for (int i = 0; i < path.size(); i+=2) {
DatapathId sw = path.get(i).getNodeId();
String entryName;
Match.Builder mb = pinSwitch.getOFFactory().buildMatch();
ArrayList<OFAction> actions = new ArrayList<OFAction>();
OFFlowMod.Builder fmb = pinSwitch.getOFFactory().buildFlowAdd();
fmb.setIdleTimeout(FlowModUtils.INFINITE_TIMEOUT);
fmb.setHardTimeout(FlowModUtils.INFINITE_TIMEOUT);
fmb.setBufferId(OFBufferId.NO_BUFFER);
fmb.setOutPort(OFPort.ANY);
fmb.setCookie(U64.of(0));
fmb.setPriority(FlowModUtils.PRIORITY_MAX);
if (inBound) {
entryName = "inbound-vip-"+ member.vipId+"-client-"+client.ipAddress+"-port-"+client.targetPort
+"-srcswitch-"+path.get(0).getNodeId()+"-sw-"+sw;
mb.setExact(MatchField.ETH_TYPE, EthType.IPv4)
.setExact(MatchField.IP_PROTO, client.nw_proto)
.setExact(MatchField.IPV4_SRC, client.ipAddress)
.setExact(MatchField.IN_PORT, path.get(i).getPortId());
if (client.nw_proto.equals(IpProtocol.TCP)) {
mb.setExact(MatchField.TCP_SRC, client.srcPort);
} else if (client.nw_proto.equals(IpProtocol.UDP)) {
mb.setExact(MatchField.UDP_SRC, client.srcPort);
} else if (client.nw_proto.equals(IpProtocol.SCTP)) {
mb.setExact(MatchField.SCTP_SRC, client.srcPort);
} else if (client.nw_proto.equals(IpProtocol.ICMP)) {
/* no-op */
} else {
log.error("Unknown IpProtocol {} detected during inbound static VIP route push.", client.nw_proto);
}
if (sw.equals(pinSwitch.getId())) {
if (pinSwitch.getOFFactory().getVersion().compareTo(OFVersion.OF_12) < 0) {
actions.add(pinSwitch.getOFFactory().actions().setDlDst(MacAddress.of(member.macString)));
actions.add(pinSwitch.getOFFactory().actions().setNwDst(IPv4Address.of(member.address)));
actions.add(pinSwitch.getOFFactory().actions().output(path.get(i+1).getPortId(), Integer.MAX_VALUE));
} else { // OXM introduced in OF1.2
actions.add(pinSwitch.getOFFactory().actions().setField(pinSwitch.getOFFactory().oxms().ethDst(MacAddress.of(member.macString))));
actions.add(pinSwitch.getOFFactory().actions().setField(pinSwitch.getOFFactory().oxms().ipv4Dst(IPv4Address.of(member.address))));
actions.add(pinSwitch.getOFFactory().actions().output(path.get(i+1).getPortId(), Integer.MAX_VALUE));
}
} else {
actions.add(switchService.getSwitch(path.get(i+1).getNodeId()).getOFFactory().actions().output(path.get(i+1).getPortId(), Integer.MAX_VALUE));
}
} else {
entryName = "outbound-vip-"+ member.vipId+"-client-"+client.ipAddress+"-port-"+client.targetPort
+"-srcswitch-"+path.get(0).getNodeId()+"-sw-"+sw;
mb.setExact(MatchField.ETH_TYPE, EthType.IPv4)
.setExact(MatchField.IP_PROTO, client.nw_proto)
.setExact(MatchField.IPV4_DST, client.ipAddress)
.setExact(MatchField.IN_PORT, path.get(i).getPortId());
if (client.nw_proto.equals(IpProtocol.TCP)) {
mb.setExact(MatchField.TCP_DST, client.srcPort);
} else if (client.nw_proto.equals(IpProtocol.UDP)) {
mb.setExact(MatchField.UDP_DST, client.srcPort);
} else if (client.nw_proto.equals(IpProtocol.SCTP)) {
mb.setExact(MatchField.SCTP_DST, client.srcPort);
} else if (client.nw_proto.equals(IpProtocol.ICMP)) {
/* no-op */
} else {
log.error("Unknown IpProtocol {} detected during outbound static VIP route push.", client.nw_proto);
}
if (sw.equals(pinSwitch.getId())) {
if (pinSwitch.getOFFactory().getVersion().compareTo(OFVersion.OF_12) < 0) {
actions.add(pinSwitch.getOFFactory().actions().setDlSrc(vips.get(member.vipId).proxyMac));
actions.add(pinSwitch.getOFFactory().actions().setNwSrc(IPv4Address.of(vips.get(member.vipId).address)));
actions.add(pinSwitch.getOFFactory().actions().output(path.get(i+1).getPortId(), Integer.MAX_VALUE));
} else { // OXM introduced in OF1.2
actions.add(pinSwitch.getOFFactory().actions().setField(pinSwitch.getOFFactory().oxms().ethSrc(vips.get(member.vipId).proxyMac)));
actions.add(pinSwitch.getOFFactory().actions().setField(pinSwitch.getOFFactory().oxms().ipv4Src(IPv4Address.of(vips.get(member.vipId).address))));
actions.add(pinSwitch.getOFFactory().actions().output(path.get(i+1).getPortId(), Integer.MAX_VALUE));
}
} else {
actions.add(switchService.getSwitch(path.get(i+1).getNodeId()).getOFFactory().actions().output(path.get(i+1).getPortId(), Integer.MAX_VALUE));
}
}
fmb.setActions(actions);
fmb.setPriority(U16.t(LB_PRIORITY));
fmb.setMatch(mb.build());
sfpService.addFlow(entryName, fmb.build(), sw);
}
}
return;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: pushStaticVipRoute
File: src/main/java/net/floodlightcontroller/loadbalancer/LoadBalancer.java
Repository: floodlight
The code follows secure coding practices.
|
[
"CWE-362",
"CWE-476"
] |
CVE-2015-6569
|
MEDIUM
| 4.3
|
floodlight
|
pushStaticVipRoute
|
src/main/java/net/floodlightcontroller/loadbalancer/LoadBalancer.java
|
7f5bedb625eec3ff4d29987c31cef2553a962b36
| 0
|
Analyze the following code function for security vulnerabilities
|
public void incrementNumRebootsSinceLastUse() {
getInternalConfiguredNetworks().forEach(config -> config.numRebootsSinceLastUse++);
saveToStore(false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: incrementNumRebootsSinceLastUse
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
|
incrementNumRebootsSinceLastUse
|
service/java/com/android/server/wifi/WifiConfigManager.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
public static Proxy getProxy(String proxyHost, int proxyPort, String proxyUsername, String proxyPassword) {
if (!"".equals(proxyHost)) {
InetSocketAddress proxyInet = new InetSocketAddress(proxyHost, proxyPort);
if (!"".equals(proxyUsername) && "".equals(proxyPassword)) {
Authenticator authenticator = new Authenticator() {
@Override public PasswordAuthentication getPasswordAuthentication() {
return (new PasswordAuthentication(proxyUsername, proxyPassword.toCharArray()));
}
};
Authenticator.setDefault(authenticator);
}
return new Proxy(Proxy.Type.HTTP, proxyInet);
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProxy
File: cli/ballerina-cli-module/src/main/java/org/ballerinalang/cli/module/util/Utils.java
Repository: ballerina-platform/ballerina-lang
The code follows secure coding practices.
|
[
"CWE-306"
] |
CVE-2021-32700
|
MEDIUM
| 5.8
|
ballerina-platform/ballerina-lang
|
getProxy
|
cli/ballerina-cli-module/src/main/java/org/ballerinalang/cli/module/util/Utils.java
|
4609ffee1744ecd16aac09303b1783bf0a525816
| 0
|
Analyze the following code function for security vulnerabilities
|
private List<String> listPolicyExemptAppsUnchecked() {
// TODO(b/181238156): decide whether it should only list the apps set by the resources,
// or also the "critical" apps defined by PersonalAppsSuspensionHelper (like SMS app).
// If it's the latter, refactor PersonalAppsSuspensionHelper so it (or a superclass) takes
// the resources on constructor.
String[] core = mContext.getResources().getStringArray(R.array.policy_exempt_apps);
String[] vendor = mContext.getResources().getStringArray(R.array.vendor_policy_exempt_apps);
int size = core.length + vendor.length;
Set<String> apps = new ArraySet<>(size);
for (String app : core) {
apps.add(app);
}
for (String app : vendor) {
apps.add(app);
}
return new ArrayList<>(apps);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: listPolicyExemptAppsUnchecked
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
|
listPolicyExemptAppsUnchecked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@GuardedBy("this")
void dumpPermissionsLocked(FileDescriptor fd, PrintWriter pw, String[] args,
int opti, boolean dumpAll, String dumpPackage) {
boolean needSep = false;
boolean printedAnything = false;
pw.println("ACTIVITY MANAGER URI PERMISSIONS (dumpsys activity permissions)");
if (mGrantedUriPermissions.size() > 0) {
boolean printed = false;
int dumpUid = -2;
if (dumpPackage != null) {
try {
dumpUid = mContext.getPackageManager().getPackageUidAsUser(dumpPackage,
MATCH_ANY_USER, 0);
} catch (NameNotFoundException e) {
dumpUid = -1;
}
}
for (int i=0; i<mGrantedUriPermissions.size(); i++) {
int uid = mGrantedUriPermissions.keyAt(i);
if (dumpUid >= -1 && UserHandle.getAppId(uid) != dumpUid) {
continue;
}
final ArrayMap<GrantUri, UriPermission> perms = mGrantedUriPermissions.valueAt(i);
if (!printed) {
if (needSep) pw.println();
needSep = true;
pw.println(" Granted Uri Permissions:");
printed = true;
printedAnything = true;
}
pw.print(" * UID "); pw.print(uid); pw.println(" holds:");
for (UriPermission perm : perms.values()) {
pw.print(" "); pw.println(perm);
if (dumpAll) {
perm.dump(pw, " ");
}
}
}
}
if (!printedAnything) {
pw.println(" (nothing)");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpPermissionsLocked
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
|
dumpPermissionsLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean validate(XWikiContext context) throws XWikiException
{
return validate(null, context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: validate
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
|
validate
|
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 void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: beforeTextChanged
File: src/com/android/settings/password/ChooseLockPassword.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40117
|
HIGH
| 7.8
|
android
|
beforeTextChanged
|
src/com/android/settings/password/ChooseLockPassword.java
|
11815817de2f2d70fe842b108356a1bc75d44ffb
| 0
|
Analyze the following code function for security vulnerabilities
|
public String[] getHeaderFields(String name, Object connection) throws IOException {
HttpURLConnection c = (HttpURLConnection) connection;
List<String> headers = new ArrayList<String>();
// we need to merge headers with differing case since this should be case insensitive
for(String key : c.getHeaderFields().keySet()) {
if(key != null && key.equalsIgnoreCase(name)) {
headers.addAll(c.getHeaderFields().get(key));
}
}
if (headers.size() > 0) {
List<String> v = new ArrayList<String>();
v.addAll(headers);
Collections.reverse(v);
String[] s = new String[v.size()];
v.toArray(s);
return s;
}
// workaround for a bug in some android devices
String f = c.getHeaderField(name);
if(f != null && f.length() > 0) {
return new String[] {f};
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getHeaderFields
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
|
getHeaderFields
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
private void tryFlush() {
if (isIncludePageEndTag(builder.toString())) {
flush();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: tryFlush
File: web/src/main/java/com/zrlog/web/handler/ResponseRenderPrintWriter.java
Repository: 94fzb/zrlog
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-16643
|
LOW
| 3.5
|
94fzb/zrlog
|
tryFlush
|
web/src/main/java/com/zrlog/web/handler/ResponseRenderPrintWriter.java
|
4a91c83af669e31a22297c14f089d8911d353fa1
| 0
|
Analyze the following code function for security vulnerabilities
|
protected JavaType _findRemappedType(DeserializationConfig config, Class<?> rawType) throws JsonMappingException {
JavaType type = mapAbstractType(config, config.constructType(rawType));
return (type == null || type.hasRawClass(rawType)) ? null : type;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _findRemappedType
File: src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2019-16942
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
_findRemappedType
|
src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java
|
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
| 0
|
Analyze the following code function for security vulnerabilities
|
void setVisible(boolean visible) {
if (mVisible != visible) {
mVisible = visible;
if (mCallback != null) {
mHandler.obtainMessage(CONTAINER_CALLBACK_VISIBILITY, visible ? 1 : 0,
0 /* unused */, this).sendToTarget();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setVisible
File: services/core/java/com/android/server/am/ActivityStackSupervisor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3838
|
MEDIUM
| 4.3
|
android
|
setVisible
|
services/core/java/com/android/server/am/ActivityStackSupervisor.java
|
468651c86a8adb7aa56c708d2348e99022088af3
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setCommentForceLogin(boolean commentForceLogin) {
this.commentForceLogin = commentForceLogin;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setCommentForceLogin
File: src/com/dotmarketing/cms/comment/struts/CommentsForm.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-254",
"CWE-264"
] |
CVE-2016-8600
|
MEDIUM
| 5
|
dotCMS/core
|
setCommentForceLogin
|
src/com/dotmarketing/cms/comment/struts/CommentsForm.java
|
cb84b130065c9eed1d1df9e4770ffa5d4bd30569
| 0
|
Analyze the following code function for security vulnerabilities
|
public void getProcessStatesAndOomScoresForPIDs(
/*in*/ int[] pids, /*out*/ int[] states, /*out*/ int[] scores) {
if (scores != null) {
enforceCallingPermission(android.Manifest.permission.GET_PROCESS_STATE_AND_OOM_SCORE,
"getProcessStatesAndOomScoresForPIDs()");
}
if (pids == null) {
throw new NullPointerException("pids");
} else if (states == null) {
throw new NullPointerException("states");
} else if (pids.length != states.length) {
throw new IllegalArgumentException("pids and states arrays have different lengths!");
} else if (scores != null && pids.length != scores.length) {
throw new IllegalArgumentException("pids and scores arrays have different lengths!");
}
synchronized (mProcLock) {
synchronized (mPidsSelfLocked) {
int newestTimeIndex = -1;
long newestTime = Long.MIN_VALUE;
for (int i = 0; i < pids.length; i++) {
ProcessRecord pr = mPidsSelfLocked.get(pids[i]);
if (pr != null) {
final long pendingTopTime =
mPendingStartActivityUids.getPendingTopPidTime(pr.uid, pids[i]);
if (pendingTopTime != PendingStartActivityUids.INVALID_TIME) {
// The uid in mPendingStartActivityUids gets the TOP process state.
states[i] = PROCESS_STATE_TOP;
if (scores != null) {
// The uid in mPendingStartActivityUids gets a better score.
scores[i] = ProcessList.FOREGROUND_APP_ADJ - 1;
}
if (pendingTopTime > newestTime) {
newestTimeIndex = i;
newestTime = pendingTopTime;
}
} else {
states[i] = pr.mState.getCurProcState();
if (scores != null) {
scores[i] = pr.mState.getCurAdj();
}
}
} else {
states[i] = PROCESS_STATE_NONEXISTENT;
if (scores != null) {
scores[i] = ProcessList.INVALID_ADJ;
}
}
}
// The uid with the newest timestamp in mPendingStartActivityUids gets the best
// score.
if (newestTimeIndex != -1) {
if (scores != null) {
scores[newestTimeIndex] = ProcessList.FOREGROUND_APP_ADJ - 2;
}
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProcessStatesAndOomScoresForPIDs
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
|
getProcessStatesAndOomScoresForPIDs
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
@Nullable
public ActivityTaskManagerInternal.PackageConfig getApplicationConfig(String packageName,
int userId) {
return mPackageConfigPersister.findPackageConfiguration(packageName, userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getApplicationConfig
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
|
getApplicationConfig
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
private void dumpInner(PrintWriter pw, DumpFilter filter) {
synchronized (mLock) {
if (filter.shouldDumpDetails()) {
final long now = injectCurrentTimeMillis();
pw.print("Now: [");
pw.print(now);
pw.print("] ");
pw.print(formatTime(now));
pw.print(" Raw last reset: [");
pw.print(mRawLastResetTime.get());
pw.print("] ");
pw.print(formatTime(mRawLastResetTime.get()));
final long last = getLastResetTimeLocked();
pw.print(" Last reset: [");
pw.print(last);
pw.print("] ");
pw.print(formatTime(last));
final long next = getNextResetTimeLocked();
pw.print(" Next reset: [");
pw.print(next);
pw.print("] ");
pw.print(formatTime(next));
pw.println();
pw.println();
pw.print(" Config:");
pw.print(" Max icon dim: ");
pw.println(mMaxIconDimension);
pw.print(" Icon format: ");
pw.println(mIconPersistFormat);
pw.print(" Icon quality: ");
pw.println(mIconPersistQuality);
pw.print(" saveDelayMillis: ");
pw.println(mSaveDelayMillis);
pw.print(" resetInterval: ");
pw.println(mResetInterval);
pw.print(" maxUpdatesPerInterval: ");
pw.println(mMaxUpdatesPerInterval);
pw.print(" maxShortcutsPerActivity: ");
pw.println(mMaxShortcuts);
pw.println();
mStatLogger.dump(pw, " ");
synchronized (mWtfLock) {
pw.println();
pw.print(" #Failures: ");
pw.println(mWtfCount);
if (mLastWtfStacktrace != null) {
pw.print(" Last failure stack trace: ");
pw.println(Log.getStackTraceString(mLastWtfStacktrace));
}
}
pw.println();
}
for (int i = 0; i < mUsers.size(); i++) {
final ShortcutUser user = mUsers.valueAt(i);
if (filter.isUserMatch(user.getUserId())) {
user.dump(pw, " ", filter);
pw.println();
}
}
for (int i = 0; i < mShortcutNonPersistentUsers.size(); i++) {
final ShortcutNonPersistentUser user = mShortcutNonPersistentUsers.valueAt(i);
if (filter.isUserMatch(user.getUserId())) {
user.dump(pw, " ", filter);
pw.println();
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpInner
File: services/core/java/com/android/server/pm/ShortcutService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40079
|
HIGH
| 7.8
|
android
|
dumpInner
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
public Pager pagerFromParams(HttpServletRequest req) {
return pagerFromParams("page", req);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: pagerFromParams
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
|
pagerFromParams
|
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
private void writeGzipped(OutputStream out, Object obj) throws IOException {
ExtendedGZipOutputStream gzip = new ExtendedGZipOutputStream(out);
try {
write(gzip, obj);
gzip.finish();
} finally {
gzip.closeDeflater();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeGzipped
File: hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/JavaDefaultSerializers.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
writeGzipped
|
hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/JavaDefaultSerializers.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int read() throws IOException {
int readLen = read(singleByteBuffer);
if (readLen == -1) {
return -1;
}
return singleByteBuffer[0];
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: read
File: src/main/java/net/lingala/zip4j/io/inputstream/InflaterInputStream.java
Repository: srikanth-lingala/zip4j
The code follows secure coding practices.
|
[
"CWE-346"
] |
CVE-2023-22899
|
MEDIUM
| 5.9
|
srikanth-lingala/zip4j
|
read
|
src/main/java/net/lingala/zip4j/io/inputstream/InflaterInputStream.java
|
ddd8fdc8ad0583eb4a6172dc86c72c881485c55b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public KBTemplate[] filterFindByGroupId_PrevAndNext(long kbTemplateId,
long groupId, OrderByComparator<KBTemplate> orderByComparator)
throws NoSuchTemplateException {
if (!InlineSQLHelperUtil.isEnabled(groupId)) {
return findByGroupId_PrevAndNext(kbTemplateId, groupId,
orderByComparator);
}
KBTemplate kbTemplate = findByPrimaryKey(kbTemplateId);
Session session = null;
try {
session = openSession();
KBTemplate[] array = new KBTemplateImpl[3];
array[0] = filterGetByGroupId_PrevAndNext(session, kbTemplate,
groupId, orderByComparator, true);
array[1] = kbTemplate;
array[2] = filterGetByGroupId_PrevAndNext(session, kbTemplate,
groupId, orderByComparator, false);
return array;
}
catch (Exception e) {
throw processException(e);
}
finally {
closeSession(session);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: filterFindByGroupId_PrevAndNext
File: modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java
Repository: brianchandotcom/liferay-portal
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2017-12647
|
MEDIUM
| 4.3
|
brianchandotcom/liferay-portal
|
filterFindByGroupId_PrevAndNext
|
modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java
|
ef93d984be9d4d478a5c4b1ca9a86f4e80174774
| 0
|
Analyze the following code function for security vulnerabilities
|
public String dialogSpacer() {
return "<div class=\"dialogspacer\" unselectable=\"on\"> </div>";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dialogSpacer
File: src/org/opencms/workplace/CmsDialog.java
Repository: alkacon/opencms-core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2013-4600
|
MEDIUM
| 4.3
|
alkacon/opencms-core
|
dialogSpacer
|
src/org/opencms/workplace/CmsDialog.java
|
72a05e3ea1cf692e2efce002687272e63f98c14a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setStatusActivitySubtitle(String statusActivitySubtitle) {
this.statusActivitySubtitle = parser.parseExpression(statusActivitySubtitle, ParserContext.TEMPLATE_EXPRESSION);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setStatusActivitySubtitle
File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/MicrosoftTeamsNotifier.java
Repository: codecentric/spring-boot-admin
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2022-46166
|
CRITICAL
| 9.8
|
codecentric/spring-boot-admin
|
setStatusActivitySubtitle
|
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/MicrosoftTeamsNotifier.java
|
c14c3ec12533f71f84de9ce3ce5ceb7991975f75
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean hasFingerprintUnlockTimedOut(int userId) {
return !mStrongAuthNotTimedOut.contains(userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasFingerprintUnlockTimedOut
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
|
hasFingerprintUnlockTimedOut
|
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
@DeprecatedAt("2022-08-31")
@Deprecated
public Document parseDocument(String input, ParserOptions parserOptions) throws InvalidSyntaxException {
MultiSourceReader multiSourceReader = MultiSourceReader.newMultiSourceReader()
.string(input, null)
.trackData(true)
.build();
return parseDocument(multiSourceReader, parserOptions);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseDocument
File: src/main/java/graphql/parser/Parser.java
Repository: graphql-java
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2023-28867
|
HIGH
| 7.5
|
graphql-java
|
parseDocument
|
src/main/java/graphql/parser/Parser.java
|
8a1c884c81c0b656db201cfd95881feb0f430a55
| 0
|
Analyze the following code function for security vulnerabilities
|
public ClassLoaderReference getClassLoaderReference() {
return classLoaderReference;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getClassLoaderReference
File: xstream/src/java/com/thoughtworks/xstream/XStream.java
Repository: x-stream/xstream
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-43859
|
MEDIUM
| 5
|
x-stream/xstream
|
getClassLoaderReference
|
xstream/src/java/com/thoughtworks/xstream/XStream.java
|
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void replacePreferredActivity(IntentFilter filter, int match,
ComponentName[] set, ComponentName activity, int userId) {
if (filter.countActions() != 1) {
throw new IllegalArgumentException(
"replacePreferredActivity expects filter to have only 1 action.");
}
if (filter.countDataAuthorities() != 0
|| filter.countDataPaths() != 0
|| filter.countDataSchemes() > 1
|| filter.countDataTypes() != 0) {
throw new IllegalArgumentException(
"replacePreferredActivity expects filter to have no data authorities, " +
"paths, or types; and at most one scheme.");
}
final int callingUid = Binder.getCallingUid();
enforceCrossUserPermission(callingUid, userId, true, false, "replace preferred activity");
synchronized (mPackages) {
if (mContext.checkCallingOrSelfPermission(
android.Manifest.permission.SET_PREFERRED_APPLICATIONS)
!= PackageManager.PERMISSION_GRANTED) {
if (getUidTargetSdkVersionLockedLPr(callingUid)
< Build.VERSION_CODES.FROYO) {
Slog.w(TAG, "Ignoring replacePreferredActivity() from uid "
+ Binder.getCallingUid());
return;
}
mContext.enforceCallingOrSelfPermission(
android.Manifest.permission.SET_PREFERRED_APPLICATIONS, null);
}
PreferredIntentResolver pir = mSettings.mPreferredActivities.get(userId);
if (pir != null) {
// Get all of the existing entries that exactly match this filter.
ArrayList<PreferredActivity> existing = pir.findFilters(filter);
if (existing != null && existing.size() == 1) {
PreferredActivity cur = existing.get(0);
if (DEBUG_PREFERRED) {
Slog.i(TAG, "Checking replace of preferred:");
filter.dump(new LogPrinter(Log.INFO, TAG), " ");
if (!cur.mPref.mAlways) {
Slog.i(TAG, " -- CUR; not mAlways!");
} else {
Slog.i(TAG, " -- CUR: mMatch=" + cur.mPref.mMatch);
Slog.i(TAG, " -- CUR: mSet="
+ Arrays.toString(cur.mPref.mSetComponents));
Slog.i(TAG, " -- CUR: mComponent=" + cur.mPref.mShortComponent);
Slog.i(TAG, " -- NEW: mMatch="
+ (match&IntentFilter.MATCH_CATEGORY_MASK));
Slog.i(TAG, " -- CUR: mSet=" + Arrays.toString(set));
Slog.i(TAG, " -- CUR: mComponent=" + activity.flattenToShortString());
}
}
if (cur.mPref.mAlways && cur.mPref.mComponent.equals(activity)
&& cur.mPref.mMatch == (match&IntentFilter.MATCH_CATEGORY_MASK)
&& cur.mPref.sameSet(set)) {
// Setting the preferred activity to what it happens to be already
if (DEBUG_PREFERRED) {
Slog.i(TAG, "Replacing with same preferred activity "
+ cur.mPref.mShortComponent + " for user "
+ userId + ":");
filter.dump(new LogPrinter(Log.INFO, TAG), " ");
}
return;
}
}
if (existing != null) {
if (DEBUG_PREFERRED) {
Slog.i(TAG, existing.size() + " existing preferred matches for:");
filter.dump(new LogPrinter(Log.INFO, TAG), " ");
}
for (int i = 0; i < existing.size(); i++) {
PreferredActivity pa = existing.get(i);
if (DEBUG_PREFERRED) {
Slog.i(TAG, "Removing existing preferred activity "
+ pa.mPref.mComponent + ":");
pa.dump(new LogPrinter(Log.INFO, TAG), " ");
}
pir.removeFilter(pa);
}
}
}
addPreferredActivityInternal(filter, match, set, activity, true, userId,
"Replacing preferred");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: replacePreferredActivity
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
|
replacePreferredActivity
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setServerIndex(Integer serverIndex) {
this.serverIndex = serverIndex;
updateBasePath();
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setServerIndex
File: samples/client/petstore/java/jersey2-java8-localdatetime/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
|
setServerIndex
|
samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated(since = "2.2M1")
public BaseObject getObject(String className)
{
return getXObject(resolveClassReference(className));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getObject
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2023-29523
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
getObject
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
0d547181389f7941e53291af940966413823f61c
| 0
|
Analyze the following code function for security vulnerabilities
|
public Map<String, Object> findByTitleOrPlainContentLike(int page, int pageSize, String key) {
Map<String, Object> data = new HashMap<>();
String sql = "select l.*,t.typeName,t.alias as typeAlias,(select count(commentId) from " + Comment.TABLE_NAME + " where logId=l.logId) commentSize,u.userName from " + TABLE_NAME + " l inner join user u,type t where rubbish=? and privacy=? and u.userId=l.userId and t.typeId=l.typeId and (l.title like ? or l.plain_content like ?) order by l.logId desc limit ?,?";
data.put("rows", find(sql, rubbish, privacy, "%" + key + "%", "%" + key + "%", ParseUtil.getFirstRecord(page, pageSize), pageSize));
ModelUtil.fillPageData(this, page, pageSize,
"from " + TABLE_NAME + " l inner join user u,type t where rubbish=? and privacy=? and u.userId=l.userId and t.typeId=l.typeId and (l.title like ? or l.plain_content like ?)",
data, new Object[]{rubbish, privacy, "%" + key + "%", "%" + key + "%"});
return data;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findByTitleOrPlainContentLike
File: data/src/main/java/com/zrlog/model/Log.java
Repository: 94fzb/zrlog
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2018-17420
|
MEDIUM
| 6.5
|
94fzb/zrlog
|
findByTitleOrPlainContentLike
|
data/src/main/java/com/zrlog/model/Log.java
|
157b8fbbb64eb22ddb52e7c5754e88180b7c3d4f
| 0
|
Analyze the following code function for security vulnerabilities
|
public void finishVoiceTask(IVoiceInteractionSession session) throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeStrongBinder(session.asBinder());
mRemote.transact(FINISH_VOICE_TASK_TRANSACTION, data, reply, 0);
reply.readException();
data.recycle();
reply.recycle();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: finishVoiceTask
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
finishVoiceTask
|
core/java/android/app/ActivityManagerNative.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setMaxAge(final Integer maxAge) {
this.maxAge = maxAge;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setMaxAge
File: pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java
Repository: pac4j
The code follows secure coding practices.
|
[
"CWE-347"
] |
CVE-2021-44878
|
MEDIUM
| 5
|
pac4j
|
setMaxAge
|
pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java
|
22b82ffd702a132d9f09da60362fc6264fc281ae
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onUserUnlocked(@NonNull TargetUser user) {
synchronized (mService.getGlobalLock()) {
mService.mTaskSupervisor.onUserUnlocked(user.getUserIdentifier());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onUserUnlocked
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
|
onUserUnlocked
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
String getFilteredReferrer(String referrerPackage) {
if (referrerPackage == null || (!referrerPackage.equals(packageName)
&& mWmService.mPmInternal.filterAppAccess(
referrerPackage, info.applicationInfo.uid, mUserId))) {
return null;
}
return referrerPackage;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFilteredReferrer
File: services/core/java/com/android/server/wm/ActivityRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21145
|
HIGH
| 7.8
|
android
|
getFilteredReferrer
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
public Page<E> setPageNum(int pageNum) {
//分页合理化,针对不合理的页码自动处理
this.pageNum = ((reasonable != null && reasonable) && pageNum <= 0) ? 1 : pageNum;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setPageNum
File: src/main/java/com/github/pagehelper/Page.java
Repository: pagehelper/Mybatis-PageHelper
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-28111
|
HIGH
| 7.5
|
pagehelper/Mybatis-PageHelper
|
setPageNum
|
src/main/java/com/github/pagehelper/Page.java
|
554a524af2d2b30d09505516adc412468a84d8fa
| 0
|
Analyze the following code function for security vulnerabilities
|
public byte[] doFinal(byte[] M) {
return mac.doFinal(M);
}
|
Vulnerability Classification:
- CWE: CWE-346
- CVE: CVE-2023-22899
- Severity: MEDIUM
- CVSS Score: 5.9
Description: #485 Calculate AES mac with cache and push back functionality
Function: doFinal
File: src/main/java/net/lingala/zip4j/crypto/PBKDF2/MacBasedPRF.java
Repository: srikanth-lingala/zip4j
Fixed Code:
public byte[] doFinal(byte[] M) {
if (macCache.size() > 0) {
doMacUpdate(0);
}
return mac.doFinal(M);
}
|
[
"CWE-346"
] |
CVE-2023-22899
|
MEDIUM
| 5.9
|
srikanth-lingala/zip4j
|
doFinal
|
src/main/java/net/lingala/zip4j/crypto/PBKDF2/MacBasedPRF.java
|
ddd8fdc8ad0583eb4a6172dc86c72c881485c55b
| 1
|
Analyze the following code function for security vulnerabilities
|
private void enforcePackageIsSystemPackage(String packageName, int userId)
throws RemoteException {
boolean isSystem;
try {
isSystem = isSystemApp(mIPackageManager, packageName, userId);
} catch (IllegalArgumentException e) {
isSystem = false;
}
if (!isSystem) {
throw new IllegalArgumentException("The provided package is not a system package");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: enforcePackageIsSystemPackage
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
|
enforcePackageIsSystemPackage
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setInjectedCode(final String injectedCode) {
this.injectedCode = injectedCode;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setInjectedCode
File: stroom-pipeline/src/main/java/stroom/pipeline/server/parser/CombinedParser.java
Repository: gchq/stroom
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000651
|
HIGH
| 7.5
|
gchq/stroom
|
setInjectedCode
|
stroom-pipeline/src/main/java/stroom/pipeline/server/parser/CombinedParser.java
|
ba30ffd415bd7d32ee40ba4b04035267ce80b499
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean inviteToRoom(String contactJid, String roomJid) {
MultiUserChat muc = multiUserChats.get(roomJid);
if(contactJid.contains("/")) {
contactJid = contactJid.split("/")[0];
}
Log.d(TAG, "invitng contact: "+contactJid+" to room: "+muc);
muc.invite(contactJid, "User "+contactJid+" has invited you to a chat!");
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: inviteToRoom
File: src/org/yaxim/androidclient/service/SmackableImp.java
Repository: ge0rg/yaxim
The code follows secure coding practices.
|
[
"CWE-20",
"CWE-346"
] |
CVE-2017-5589
|
MEDIUM
| 4.3
|
ge0rg/yaxim
|
inviteToRoom
|
src/org/yaxim/androidclient/service/SmackableImp.java
|
65a38dc77545d9568732189e86089390f0ceaf9f
| 0
|
Analyze the following code function for security vulnerabilities
|
private static final int dumpProcessList(PrintWriter pw,
ActivityManagerService service, List list,
String prefix, String normalLabel, String persistentLabel,
String dumpPackage) {
int numPers = 0;
final int N = list.size()-1;
for (int i=N; i>=0; i--) {
ProcessRecord r = (ProcessRecord)list.get(i);
if (dumpPackage != null && !dumpPackage.equals(r.info.packageName)) {
continue;
}
pw.println(String.format("%s%s #%2d: %s",
prefix, (r.persistent ? persistentLabel : normalLabel),
i, r.toString()));
if (r.persistent) {
numPers++;
}
}
return numPers;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpProcessList
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
|
dumpProcessList
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onLockoutReset() {
handleFingerprintLockoutReset();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onLockoutReset
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
|
onLockoutReset
|
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
@GuardedBy({"mPm.mInstallLock", "mPm.mLock"})
private ScanResult scanPackageTracedLI(ParsedPackage parsedPackage,
final @ParsingPackageUtils.ParseFlags int parseFlags,
@PackageManagerService.ScanFlags int scanFlags, long currentTime,
@Nullable UserHandle user, String cpuAbiOverride) throws PackageManagerException {
Trace.traceBegin(TRACE_TAG_PACKAGE_MANAGER, "scanPackage");
try {
return scanPackageNewLI(parsedPackage, parseFlags, scanFlags, currentTime, user,
cpuAbiOverride);
} finally {
Trace.traceEnd(TRACE_TAG_PACKAGE_MANAGER);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: scanPackageTracedLI
File: services/core/java/com/android/server/pm/InstallPackageHelper.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21257
|
HIGH
| 7.8
|
android
|
scanPackageTracedLI
|
services/core/java/com/android/server/pm/InstallPackageHelper.java
|
1aec7feaf07e6d4568ca75d18158445dbeac10f6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public JavaType typeFromId(DatabindContext context, String id) throws IOException {
return _typeFromId(id, context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: typeFromId
File: src/main/java/com/fasterxml/jackson/databind/jsontype/impl/ClassNameIdResolver.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2019-16942
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
typeFromId
|
src/main/java/com/fasterxml/jackson/databind/jsontype/impl/ClassNameIdResolver.java
|
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void loadLibrary(final ClassLoader loader, final String name, final boolean absolute) {
Throwable suppressed = null;
try {
try {
// Make sure the helper is belong to the target ClassLoader.
final Class<?> newHelper = tryToLoadClass(loader, NativeLibraryUtil.class);
loadLibraryByHelper(newHelper, name, absolute);
logger.debug("Successfully loaded the library {}", name);
return;
} catch (UnsatisfiedLinkError e) { // Should by pass the UnsatisfiedLinkError here!
suppressed = e;
} catch (Exception e) {
suppressed = e;
}
NativeLibraryUtil.loadLibrary(name, absolute); // Fallback to local helper class.
logger.debug("Successfully loaded the library {}", name);
} catch (NoSuchMethodError nsme) {
if (suppressed != null) {
ThrowableUtil.addSuppressed(nsme, suppressed);
}
rethrowWithMoreDetailsIfPossible(name, nsme);
} catch (UnsatisfiedLinkError ule) {
if (suppressed != null) {
ThrowableUtil.addSuppressed(ule, suppressed);
}
throw ule;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: loadLibrary
File: common/src/main/java/io/netty/util/internal/NativeLibraryLoader.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-378",
"CWE-379"
] |
CVE-2021-21290
|
LOW
| 1.9
|
netty
|
loadLibrary
|
common/src/main/java/io/netty/util/internal/NativeLibraryLoader.java
|
c735357bf29d07856ad171c6611a2e1a0e0000ec
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean handleAppCrashInActivityController(String processName, int pid,
String shortMsg, String longMsg, long timeMillis, String stackTrace,
Runnable killCrashingAppCallback) {
Runnable targetRunnable = null;
synchronized (mGlobalLock) {
if (mController == null) {
return false;
}
try {
if (!mController.appCrashed(processName, pid, shortMsg, longMsg, timeMillis,
stackTrace)) {
targetRunnable = killCrashingAppCallback;
}
} catch (RemoteException e) {
mController = null;
Watchdog.getInstance().setActivityController(null);
}
}
if (targetRunnable != null) {
targetRunnable.run();
return true;
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleAppCrashInActivityController
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
|
handleAppCrashInActivityController
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
private void expand(int i) {
/* Can the buffer handle i more bytes, if not expand it */
if (bufCount + i <= buf.length) {
return;
}
byte[] newbuf = new byte[(bufCount + i) * 2];
System.arraycopy(buf, 0, newbuf, 0, bufCount);
buf = newbuf;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: expand
File: src/main/java/org/conscrypt/OpenSSLCipher.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2461
|
HIGH
| 7.6
|
android
|
expand
|
src/main/java/org/conscrypt/OpenSSLCipher.java
|
1638945d4ed9403790962ec7abed1b7a232a9ff8
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String changeFileUrlIfImportDirectoryConstrained(String url) throws IOException {
if (isFile(url) && isImportUsingNeo4jConfig()) {
if (!apocConfig().getBoolean(APOC_IMPORT_FILE_ALLOW__READ__FROM__FILESYSTEM)) {
throw new RuntimeException(String.format(ERROR_READ_FROM_FS_NOT_ALLOWED, url));
}
final Path resolvedPath = resolvePath(url);
return resolvedPath
.normalize()
.toUri()
.toString();
}
return url;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: changeFileUrlIfImportDirectoryConstrained
File: core/src/main/java/apoc/util/FileUtils.java
Repository: neo4j-contrib/neo4j-apoc-procedures
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-23532
|
MEDIUM
| 6.5
|
neo4j-contrib/neo4j-apoc-procedures
|
changeFileUrlIfImportDirectoryConstrained
|
core/src/main/java/apoc/util/FileUtils.java
|
01e63ed2d187cd2a8aa1d78bf831ef0fdd69b522
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void testDeserializationWithTypeInfo03() throws Exception
{
Instant date = Instant.ofEpochSecond(123456789L, 422000000);
ObjectMapper m = newMapper()
.disable(DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS)
.addMixIn(Temporal.class, MockObjectConfiguration.class);
Temporal value = m.readValue(
"[\"" + Instant.class.getName() + "\",123456789422]", Temporal.class
);
assertTrue("The value should be an Instant.", value instanceof Instant);
assertEquals("The value is not correct.", date, value);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: testDeserializationWithTypeInfo03
File: datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestInstantSerialization.java
Repository: FasterXML/jackson-modules-java8
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-1000873
|
MEDIUM
| 4.3
|
FasterXML/jackson-modules-java8
|
testDeserializationWithTypeInfo03
|
datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestInstantSerialization.java
|
ba27ce5909dfb49bcaf753ad3e04ecb980010b0b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void thawRotation() {
if (!checkCallingPermission(android.Manifest.permission.SET_ORIENTATION,
"thawRotation()")) {
throw new SecurityException("Requires SET_ORIENTATION permission");
}
if (DEBUG_ORIENTATION) Slog.v(TAG, "thawRotation: mRotation=" + mRotation);
long origId = Binder.clearCallingIdentity();
try {
mPolicy.setUserRotationMode(WindowManagerPolicy.USER_ROTATION_FREE,
777); // rot not used
} finally {
Binder.restoreCallingIdentity(origId);
}
updateRotationUnchecked(false, false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: thawRotation
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
|
thawRotation
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getDepth() {
return mDepth;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDepth
File: core/java/android/content/res/XmlBlock.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-415"
] |
CVE-2023-40103
|
HIGH
| 7.8
|
android
|
getDepth
|
core/java/android/content/res/XmlBlock.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean nonTestNonPrecreatedUsersExist() {
int allowedUsers = UserManager.isHeadlessSystemUserMode() ? 2 : 1;
return mUserManagerInternal.getUsers(/* excludeDying= */ true).stream()
.filter(u -> !u.isForTesting())
.count() > allowedUsers;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nonTestNonPrecreatedUsersExist
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
|
nonTestNonPrecreatedUsersExist
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
private IntValues[] orderWithDefault0(IntValues[] origin, List<String> expectedOrder) {
for (int i = 0; i < origin.length; i++) {
origin[i] = orderWithDefault0(origin[i], expectedOrder);
}
return origin;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: orderWithDefault0
File: oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/h2/dao/H2MetricsQueryDAO.java
Repository: apache/skywalking
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2020-9483
|
MEDIUM
| 5
|
apache/skywalking
|
orderWithDefault0
|
oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/h2/dao/H2MetricsQueryDAO.java
|
2b6aae3b733f9dbeae1d6eff4f1975c723e1e7d1
| 0
|
Analyze the following code function for security vulnerabilities
|
protected boolean decoupleCloseAndGoAway() {
return decoupleCloseAndGoAway;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: decoupleCloseAndGoAway
File: codec-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2ConnectionHandlerBuilder.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-44487
|
HIGH
| 7.5
|
netty
|
decoupleCloseAndGoAway
|
codec-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2ConnectionHandlerBuilder.java
|
58f75f665aa81a8cbcf6ffa74820042a285c5e61
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int hashCode(AsciiString o) {
return o.hashCode();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hashCode
File: core/src/main/java/com/linecorp/armeria/internal/ArmeriaHttpUtil.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2019-16771
|
MEDIUM
| 5
|
line/armeria
|
hashCode
|
core/src/main/java/com/linecorp/armeria/internal/ArmeriaHttpUtil.java
|
b597f7a865a527a84ee3d6937075cfbb4470ed20
| 0
|
Analyze the following code function for security vulnerabilities
|
void pushUserControlDisabledPackagesLocked(int userId) {
final int targetUserId;
final ActiveAdmin owner;
if (getDeviceOwnerUserIdUncheckedLocked() == userId) {
owner = getDeviceOwnerAdminLocked();
targetUserId = UserHandle.USER_ALL;
} else {
owner = getProfileOwnerAdminLocked(userId);
targetUserId = userId;
}
List<String> protectedPackages = (owner == null || owner.protectedPackages == null)
? null : owner.protectedPackages;
mInjector.binderWithCleanCallingIdentity(() ->
mInjector.getPackageManagerInternal().setOwnerProtectedPackages(
targetUserId, protectedPackages));
mUsageStatsManagerInternal.setAdminProtectedPackages(new ArraySet(protectedPackages),
targetUserId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: pushUserControlDisabledPackagesLocked
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
|
pushUserControlDisabledPackagesLocked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setInvertFilter(boolean value) {
invertFilter = value;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setInvertFilter
File: config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-77"
] |
CVE-2021-43286
|
MEDIUM
| 6.5
|
gocd
|
setInvertFilter
|
config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
|
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isCommandHistoryAllowed() {
return commandHistoryString != null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isCommandHistoryAllowed
File: h2/src/main/org/h2/server/web/WebServer.java
Repository: h2database
The code follows secure coding practices.
|
[
"CWE-312"
] |
CVE-2022-45868
|
HIGH
| 7.8
|
h2database
|
isCommandHistoryAllowed
|
h2/src/main/org/h2/server/web/WebServer.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void checkManageOrCreateUsersPermission(String message) {
if (ActivityManager.checkComponentPermission(android.Manifest.permission.MANAGE_USERS,
Binder.getCallingUid(), -1, true) != PackageManager.PERMISSION_GRANTED &&
ActivityManager.checkComponentPermission(android.Manifest.permission.CREATE_USERS,
Binder.getCallingUid(), -1, true) != PackageManager.PERMISSION_GRANTED) {
throw new SecurityException("You need MANAGE_USERS or CREATE_USERS permission to: "
+ message);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkManageOrCreateUsersPermission
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
|
checkManageOrCreateUsersPermission
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean hasBootCompleted() {
return mBootCompleted;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasBootCompleted
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
|
hasBootCompleted
|
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
private void saveAttachmentList(XWikiDocument doc, XWikiContext context) throws XWikiException
{
try {
List<XWikiAttachment> list = doc.getAttachmentList();
for (XWikiAttachment attachment : list) {
saveAttachment(attachment, isDeleted(attachment, doc), context);
}
} catch (Exception e) {
Object[] args = {doc.getDocumentReference()};
throw new XWikiException(XWikiException.MODULE_XWIKI_STORE,
XWikiException.ERROR_XWIKI_STORE_HIBERNATE_SAVING_ATTACHMENT_LIST,
"Exception while saving attachments attachment list of document {0}", e, args);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: saveAttachmentList
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-459"
] |
CVE-2023-36468
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
saveAttachmentList
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
|
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isSortable() {
return sortable;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isSortable
File: server/src/main/java/com/vaadin/ui/Grid.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-25028
|
MEDIUM
| 4.3
|
vaadin/framework
|
isSortable
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
@Bean
public DaoConfig daoConfig() {
DaoConfig retVal = new DaoConfig();
retVal.addSupportedSubscriptionType(Subscription.SubscriptionChannelType.EMAIL);
retVal.addSupportedSubscriptionType(Subscription.SubscriptionChannelType.RESTHOOK);
retVal.addSupportedSubscriptionType(Subscription.SubscriptionChannelType.WEBSOCKET);
retVal.setWebsocketContextPath("/websocketDstu2");
retVal.setAllowContainsSearches(true);
retVal.setAllowMultipleDelete(true);
retVal.setAllowInlineMatchUrlReferences(true);
retVal.setAllowExternalReferences(true);
retVal.getTreatBaseUrlsAsLocal().add("http://hapi.fhir.org/baseDstu2");
retVal.getTreatBaseUrlsAsLocal().add("https://hapi.fhir.org/baseDstu2");
retVal.getTreatBaseUrlsAsLocal().add("http://fhirtest.uhn.ca/baseDstu2");
retVal.getTreatBaseUrlsAsLocal().add("https://fhirtest.uhn.ca/baseDstu2");
retVal.setCountSearchResultsUpTo(TestR4Config.COUNT_SEARCH_RESULTS_UP_TO);
retVal.setIndexMissingFields(DaoConfig.IndexEnabledEnum.ENABLED);
retVal.setFetchSizeDefaultMaximum(10000);
retVal.setWebsocketContextPath("/");
retVal.setFilterParameterEnabled(true);
retVal.setDefaultSearchParamsCanBeOverridden(false);
retVal.getModelConfig().setIndexOnContainedResources(true);
return retVal;
}
|
Vulnerability Classification:
- CWE: CWE-400
- CVE: CVE-2021-32053
- Severity: MEDIUM
- CVSS Score: 5.0
Description: Address DOS issue in History operation
Function: daoConfig
File: hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestDstu2Config.java
Repository: hapifhir/hapi-fhir
Fixed Code:
@Bean
public DaoConfig daoConfig() {
DaoConfig retVal = new DaoConfig();
retVal.addSupportedSubscriptionType(Subscription.SubscriptionChannelType.EMAIL);
retVal.addSupportedSubscriptionType(Subscription.SubscriptionChannelType.RESTHOOK);
retVal.addSupportedSubscriptionType(Subscription.SubscriptionChannelType.WEBSOCKET);
retVal.setWebsocketContextPath("/websocketDstu2");
retVal.setAllowContainsSearches(true);
retVal.setAllowMultipleDelete(true);
retVal.setAllowInlineMatchUrlReferences(true);
retVal.setAllowExternalReferences(true);
retVal.getTreatBaseUrlsAsLocal().add("http://hapi.fhir.org/baseDstu2");
retVal.getTreatBaseUrlsAsLocal().add("https://hapi.fhir.org/baseDstu2");
retVal.getTreatBaseUrlsAsLocal().add("http://fhirtest.uhn.ca/baseDstu2");
retVal.getTreatBaseUrlsAsLocal().add("https://fhirtest.uhn.ca/baseDstu2");
retVal.setCountSearchResultsUpTo(TestR4Config.COUNT_SEARCH_RESULTS_UP_TO);
retVal.setIndexMissingFields(DaoConfig.IndexEnabledEnum.ENABLED);
retVal.setFetchSizeDefaultMaximum(10000);
retVal.setWebsocketContextPath("/");
retVal.setFilterParameterEnabled(true);
retVal.setDefaultSearchParamsCanBeOverridden(false);
retVal.getModelConfig().setIndexOnContainedResources(true);
// retVal.setHistoryCountMode(HistoryCountModeEnum.COUNT_ACCURATE);
return retVal;
}
|
[
"CWE-400"
] |
CVE-2021-32053
|
MEDIUM
| 5
|
hapifhir/hapi-fhir
|
daoConfig
|
hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestDstu2Config.java
|
a5e4f56e1c6f55093ff334cf698ffdeea2f33960
| 1
|
Analyze the following code function for security vulnerabilities
|
protected JsonToken _decodeUndefinedValue() throws IOException {
return JsonToken.VALUE_NULL;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _decodeUndefinedValue
File: cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
Repository: FasterXML/jackson-dataformats-binary
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2020-28491
|
MEDIUM
| 5
|
FasterXML/jackson-dataformats-binary
|
_decodeUndefinedValue
|
cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
|
de072d314af8f5f269c8abec6930652af67bc8e6
| 0
|
Analyze the following code function for security vulnerabilities
|
void setWarningsAsErrors(boolean value) {
mWarningsAsErrors = value;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setWarningsAsErrors
File: src/main/java/com/android/apksig/ApkVerifier.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21253
|
MEDIUM
| 5.5
|
android
|
setWarningsAsErrors
|
src/main/java/com/android/apksig/ApkVerifier.java
|
039f815895f62c9f8af23df66622b66246f3f61e
| 0
|
Analyze the following code function for security vulnerabilities
|
private void execAndFresh(String[] finalCmd) {
outputTextArea.setText(null);
Thread thread = new Thread(() -> {
try {
Process process = ExecUtil.exec(finalCmd);
if (process == null) {
return;
}
InputStream inputStream = process.getInputStream();
if (inputStream == null) {
return;
}
BufferedReader isReader;
if (OSUtil.isWindows()) {
InputStreamReader isr = new InputStreamReader(inputStream,
StandardCharsets.UTF_8);
isReader = new BufferedReader(isr);
} else {
isReader = new BufferedReader(new InputStreamReader(inputStream));
}
String thisLine;
new Thread(() -> {
while (true) {
if (stop) {
logger.info(String.format("stop pid: %d", JNAUtil.getProcessID(process)));
try {
if (!OSUtil.isWindows()) {
new ProcessBuilder("kill", "-9",
Long.toString(JNAUtil.getProcessID(process))).start();
} else {
new ProcessBuilder("cmd.exe", "/c",
String.format("taskkill /f /pid %d", JNAUtil.getProcessID(process))).start();
}
return;
} catch (IOException e) {
throw new RuntimeException(e);
}
}
}
}).start();
while ((!stop) && (thisLine = isReader.readLine()) != null) {
outputTextArea.append(thisLine);
outputTextArea.append("\n");
outputTextArea.setCaretPosition(outputTextArea.getText().length());
}
} catch (Exception ex) {
ex.printStackTrace();
}
});
thread.start();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: execAndFresh
File: src/main/java/com/chaitin/xray/form/MainForm.java
Repository: 4ra1n/super-xray
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2022-41958
|
HIGH
| 7.8
|
4ra1n/super-xray
|
execAndFresh
|
src/main/java/com/chaitin/xray/form/MainForm.java
|
4d0d59663596db03f39d7edd2be251d48b52dcfc
| 0
|
Analyze the following code function for security vulnerabilities
|
public void fastForward(String packageName, int pid, int uid) {
try {
final String reason = TAG + ":fastForward";
mService.tempAllowlistTargetPkgIfPossible(getUid(), getPackageName(),
pid, uid, packageName, reason);
mCb.onFastForward(packageName, pid, uid);
} catch (RemoteException e) {
Log.e(TAG, "Remote failure in fastForward.", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fastForward
File: services/core/java/com/android/server/media/MediaSessionRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21280
|
MEDIUM
| 5.5
|
android
|
fastForward
|
services/core/java/com/android/server/media/MediaSessionRecord.java
|
06e772e05514af4aa427641784c5eec39a892ed3
| 0
|
Analyze the following code function for security vulnerabilities
|
@GetMapping("related-counts")
public Map<String, Integer> relatedCounts(@IdParam(name = "mainid") ID mainid, HttpServletRequest request) {
final ID user = getRequestUser(request);
String[] relateds = getParameterNotNull(request, "relateds").split(",");
Map<String, Integer> countMap = new HashMap<>();
for (String related : relateds) {
// 附件特殊处理
if (related.startsWith("Attachment.")
&& !Application.getPrivilegesManager().allowRead(user, mainid)) {
continue;
}
String sql = buildBaseSql(mainid, related, null, true, user);
// NOTE `项目任务`是获取了全部的相关记录,因此总数可能与实际显示的条目数量不一致
Entity relatedEntity = MetadataHelper.getEntity(related.split("\\.")[0]);
Object[] count = QueryHelper.createQuery(sql, relatedEntity).unique();
countMap.put(related, ObjectUtils.toInt(count[0]));
}
return countMap;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: relatedCounts
File: src/main/java/com/rebuild/web/general/RelatedListController.java
Repository: getrebuild/rebuild
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2023-1495
|
MEDIUM
| 6.5
|
getrebuild/rebuild
|
relatedCounts
|
src/main/java/com/rebuild/web/general/RelatedListController.java
|
c9474f84e5f376dd2ade2078e3039961a9425da7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean canSilentlyInstallPackage(String callerPackage, int callerUid) {
if (callerPackage == null) {
return false;
}
CallerIdentity caller = new CallerIdentity(callerUid, null, null);
if (isUserAffiliatedWithDevice(UserHandle.getUserId(callerUid))
&& (isActiveProfileOwner(callerUid)
|| isDefaultDeviceOwner(caller) || isFinancedDeviceOwner(caller))) {
// device owner or a profile owner affiliated with the device owner
return true;
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: canSilentlyInstallPackage
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
|
canSilentlyInstallPackage
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
private Schema getSchema(Source source, String currentDir, String scriptFileName, SchemaErrorHandler error_handler) throws SAXException {
SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
SchemaResourceResolver resourceResolver = new SchemaResourceResolver(currentDir, scriptFileName, null, error_handler);
schemaFactory.setResourceResolver(resourceResolver);
schemaFactory.setErrorHandler(error_handler);
return schemaFactory.newSchema(source);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSchema
File: ext/java/nokogiri/XmlSchema.java
Repository: sparklemotion/nokogiri
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2020-26247
|
MEDIUM
| 4
|
sparklemotion/nokogiri
|
getSchema
|
ext/java/nokogiri/XmlSchema.java
|
9c87439d9afa14a365ff13e73adc809cb2c3d97b
| 0
|
Analyze the following code function for security vulnerabilities
|
private void writeVarint32(int n) throws TException {
int idx = 0;
while (true) {
if ((n & ~0x7F) == 0) {
buffer[idx++] = (byte) n;
break;
} else {
buffer[idx++] = (byte) ((n & 0x7F) | 0x80);
n >>>= 7;
}
}
trans_.write(buffer, 0, idx);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeVarint32
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
|
writeVarint32
|
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 releaseAnchorView(View anchorView) {
mAnchorViews.remove(anchorView);
mCurrentContainerView.removeView(anchorView);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: releaseAnchorView
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
|
releaseAnchorView
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
9d343ad2ea6ec395c377a4efa266057155bfa9c1
| 0
|
Analyze the following code function for security vulnerabilities
|
private void switchSuperUserResource(WebSession session, String projectId, String workspaceId, UserDTO sessionUser) {
// 获取最新UserDTO
UserDTO user = getUserDTO(sessionUser.getId());
User newUser = new User();
user.setLastWorkspaceId(workspaceId);
sessionUser.setLastWorkspaceId(workspaceId);
user.setLastProjectId(projectId);
BeanUtils.copyProperties(user, newUser);
// 切换工作空间或组织之后更新 session 里的 user
session.getAttributes().put(SessionConstants.ATTR_USER, SessionUser.fromUser(user, session.getId()));
session.getAttributes().put(FindByIndexNameSessionRepository.PRINCIPAL_NAME_INDEX_NAME, sessionUser.getId());
userMapper.updateByPrimaryKeySelective(newUser);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: switchSuperUserResource
File: framework/gateway/src/main/java/io/metersphere/gateway/service/UserLoginService.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2023-32699
|
MEDIUM
| 6.5
|
metersphere
|
switchSuperUserResource
|
framework/gateway/src/main/java/io/metersphere/gateway/service/UserLoginService.java
|
c59e381d368990214813085a1a4877c5ef865411
| 0
|
Analyze the following code function for security vulnerabilities
|
public void updateAppWidget(int appWidgetId, RemoteViews views) {
if (isLocalBinder() && views != null) {
views = views.clone();
}
Message msg = mHandler.obtainMessage(HANDLE_UPDATE, appWidgetId, 0, views);
msg.sendToTarget();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateAppWidget
File: core/java/android/appwidget/AppWidgetHost.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-1541
|
MEDIUM
| 4.3
|
android
|
updateAppWidget
|
core/java/android/appwidget/AppWidgetHost.java
|
0b98d304c467184602b4c6bce76fda0b0274bc07
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.