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 cancelAccountAccessRequestNotificationIfNeeded(int uid,
boolean checkAccess) {
Account[] accounts = getAccountsAsUser(null, UserHandle.getUserId(uid), "android");
for (Account account : accounts) {
cancelAccountAccessRequestNotificationIfNeeded(account, uid, checkAccess);
}
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cancelAccountAccessRequestNotificationIfNeeded
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 | cancelAccountAccessRequestNotificationIfNeeded | services/core/java/com/android/server/accounts/AccountManagerService.java | f810d81839af38ee121c446105ca67cb12992fc6 | 0 |
Analyze the following code function for security vulnerabilities | public void persistentlyCacheResult(String cacheName, String sql2cache, Handler<AsyncResult<Integer>> replyHandler){
long start = System.nanoTime();
client.getConnection(res -> {
if (res.succeeded()) {
SQLConnection connection = res.result();
try {
String q = "CREATE UNLOGGED TABLE IF NOT EXISTS "
+ schemaName + DOT + cacheName +" AS " + sql2cache;
log.info(q);
connection.update(q,
query -> {
connection.close();
if (query.failed()) {
replyHandler.handle(Future.failedFuture(query.cause()));
} else {
replyHandler.handle(Future.succeededFuture(query.result().getUpdated()));
}
statsTracker("persistentlyCacheResult", "CREATE TABLE AS", start);
});
} catch (Exception e) {
if(connection != null){
connection.close();
}
log.error(e.getMessage(), e);
replyHandler.handle(Future.failedFuture(e));
}
} else {
replyHandler.handle(Future.failedFuture(res.cause()));
}
});
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: persistentlyCacheResult
File: domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices. | [
"CWE-89"
] | CVE-2019-15534 | HIGH | 7.5 | folio-org/raml-module-builder | persistentlyCacheResult | domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java | b7ef741133e57add40aa4cb19430a0065f378a94 | 0 |
Analyze the following code function for security vulnerabilities | final public String getResorucePath() {
return "META-INF/native/"+map(name);
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getResorucePath
File: hawtjni-runtime/src/main/java/org/fusesource/hawtjni/runtime/Library.java
Repository: fusesource/hawtjni
The code follows secure coding practices. | [
"CWE-94"
] | CVE-2013-2035 | MEDIUM | 4.4 | fusesource/hawtjni | getResorucePath | hawtjni-runtime/src/main/java/org/fusesource/hawtjni/runtime/Library.java | 92c266170ce98edc200c656bd034a237098b8aa5 | 0 |
Analyze the following code function for security vulnerabilities | @Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
ProfileData other = (ProfileData) obj;
return Objects.equals(authenticatorId, other.authenticatorId) && Objects.equals(authzAcl, other.authzAcl)
&& Objects.equals(classId, other.classId) && Objects.equals(description, other.description)
&& enabled == other.enabled && Objects.equals(enabledBy, other.enabledBy)
&& Objects.equals(id, other.id) && Objects.equals(inputs, other.inputs)
&& Objects.equals(name, other.name)
&& Objects.equals(outputs, other.outputs) && Objects.equals(policySets, other.policySets)
&& renewal == other.renewal && visible == other.visible && xmlOutput == other.xmlOutput;
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: equals
File: base/common/src/main/java/com/netscape/certsrv/profile/ProfileData.java
Repository: dogtagpki/pki
The code follows secure coding practices. | [
"CWE-611"
] | CVE-2022-2414 | HIGH | 7.5 | dogtagpki/pki | equals | base/common/src/main/java/com/netscape/certsrv/profile/ProfileData.java | 16deffdf7548e305507982e246eb9fd1eac414fd | 0 |
Analyze the following code function for security vulnerabilities | private void prepareZip(HttpServletResponse hres, List<String> selectedFiles) {
VFSRepositoryService vfsRepositoryService = CoreSpringFactory.getImpl(VFSRepositoryService.class);
try(ZipOutputStream zout = new ZipOutputStream(hres.getOutputStream())) {
zout.setLevel(9);
List<VFSItem> vfsFiles = new ArrayList<>();
for (String fileName : selectedFiles) {
VFSItem item = currentContainer.resolve(fileName);
if (item != null) {
vfsFiles.add(item);
// update download counter
if (item instanceof VFSLeaf && item.canMeta() == VFSConstants.YES) {
vfsRepositoryService.increaseDownloadCount((VFSLeaf)item);
}
}
}
for (VFSItem item:vfsFiles) {
ZipUtil.addToZip(item, "", zout, new VFSSystemItemFilter(), false);
}
zout.flush();
} catch (IOException e) {
String className = e.getClass().getSimpleName();
if("ClientAbortException".equals(className)) {
log.debug("client browser probably abort when downloading zipped files", e);
} else {
log.error("client browser probably abort when downloading zipped files", e);
}
} catch (Exception e) {
log.error("", e);
}
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: prepareZip
File: src/main/java/org/olat/core/commons/modules/bc/commands/CmdDownloadZip.java
Repository: OpenOLAT
The code follows secure coding practices. | [
"CWE-22"
] | CVE-2021-41152 | MEDIUM | 4 | OpenOLAT | prepareZip | src/main/java/org/olat/core/commons/modules/bc/commands/CmdDownloadZip.java | 418bb509ffcb0e25ab4390563c6c47f0458583eb | 0 |
Analyze the following code function for security vulnerabilities | public boolean isTopActivityImmersive()
throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
mRemote.transact(IS_TOP_ACTIVITY_IMMERSIVE_TRANSACTION, data, reply, 0);
reply.readException();
boolean res = reply.readInt() == 1;
data.recycle();
reply.recycle();
return res;
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isTopActivityImmersive
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices. | [
"CWE-264"
] | CVE-2016-3832 | HIGH | 8.3 | android | isTopActivityImmersive | core/java/android/app/ActivityManagerNative.java | e7cf91a198de995c7440b3b64352effd2e309906 | 0 |
Analyze the following code function for security vulnerabilities | public boolean scheduleBuild(Cause c) {
return scheduleBuild(getQuietPeriod(), c);
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: scheduleBuild
File: core/src/main/java/hudson/model/AbstractProject.java
Repository: jenkinsci/jenkins
The code follows secure coding practices. | [
"CWE-264"
] | CVE-2013-7330 | MEDIUM | 4 | jenkinsci/jenkins | scheduleBuild | core/src/main/java/hudson/model/AbstractProject.java | 36342d71e29e0620f803a7470ce96c61761648d8 | 0 |
Analyze the following code function for security vulnerabilities | private Iterable<? extends Node> asIterable(final NamedNodeMap pNodeList) {
return new Iterable<Node>() {
public Iterator<Node> iterator() {
return new Iterator<Node>() {
private int index;
public boolean hasNext() {
return pNodeList != null && pNodeList.getLength() > index;
}
public Node next() {
return pNodeList.item(index++);
}
public void remove() {
throw new UnsupportedOperationException("Method remove not supported");
}
};
}
};
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: asIterable
File: imageio/imageio-metadata/src/main/java/com/twelvemonkeys/imageio/metadata/xmp/XMPReader.java
Repository: haraldk/TwelveMonkeys
The code follows secure coding practices. | [
"CWE-611"
] | CVE-2021-23792 | HIGH | 7.5 | haraldk/TwelveMonkeys | asIterable | imageio/imageio-metadata/src/main/java/com/twelvemonkeys/imageio/metadata/xmp/XMPReader.java | da4efe98bf09e1cce91b7633cb251958a200fc80 | 0 |
Analyze the following code function for security vulnerabilities | static boolean scheduleAsRegularPriority(int tid, boolean suppressLogs) {
try {
Process.setThreadScheduler(tid, Process.SCHED_OTHER, 0);
return true;
} catch (IllegalArgumentException e) {
if (!suppressLogs) {
Slog.w(TAG, "Failed to set scheduling policy, thread does not exist:\n" + e);
}
} catch (SecurityException e) {
if (!suppressLogs) {
Slog.w(TAG, "Failed to set scheduling policy, not allowed:\n" + e);
}
}
return false;
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: scheduleAsRegularPriority
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 | scheduleAsRegularPriority | services/core/java/com/android/server/am/ActivityManagerService.java | 962fb40991f15be4f688d960aa00073683ebdd20 | 0 |
Analyze the following code function for security vulnerabilities | public Jooby lang(final String... languages) {
this.languages = languages;
return this;
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: lang
File: jooby/src/main/java/org/jooby/Jooby.java
Repository: jooby-project/jooby
The code follows secure coding practices. | [
"CWE-22"
] | CVE-2020-7647 | MEDIUM | 5 | jooby-project/jooby | lang | jooby/src/main/java/org/jooby/Jooby.java | 34f526028e6cd0652125baa33936ffb6a8a4a009 | 0 |
Analyze the following code function for security vulnerabilities | public Future<?> reCreateIndex() {
return dao.reCreateIndex();
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: reCreateIndex
File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/logic/service/cms/CmsContentService.java
Repository: sanluan/PublicCMS
The code follows secure coding practices. | [
"CWE-79"
] | CVE-2020-21333 | LOW | 3.5 | sanluan/PublicCMS | reCreateIndex | publiccms-parent/publiccms-core/src/main/java/com/publiccms/logic/service/cms/CmsContentService.java | b4d5956e65b14347b162424abb197a180229b3db | 0 |
Analyze the following code function for security vulnerabilities | @Override
public void setPendingIntentWhitelistDuration(IIntentSender target, long duration) {
if (!(target instanceof PendingIntentRecord)) {
Slog.w(TAG, "markAsSentFromNotification(): not a PendingIntentRecord: " + target);
return;
}
((PendingIntentRecord) target).setWhitelistDuration(duration);
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setPendingIntentWhitelistDuration
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices. | [
"CWE-264"
] | CVE-2016-3912 | HIGH | 9.3 | android | setPendingIntentWhitelistDuration | services/core/java/com/android/server/am/ActivityManagerService.java | 6c049120c2d749f0c0289d822ec7d0aa692f55c5 | 0 |
Analyze the following code function for security vulnerabilities | protected void updateCurrentRssView() {
NewsReaderDetailFragment ndf = getNewsReaderDetailFragment();
if (ndf != null) {
//ndf.reloadAdapterFromScratch();
ndf.updateCurrentRssView();
}
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateCurrentRssView
File: News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java
Repository: nextcloud/news-android
The code follows secure coding practices. | [
"CWE-829"
] | CVE-2021-41256 | MEDIUM | 5.8 | nextcloud/news-android | updateCurrentRssView | News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java | 05449cb666059af7de2302df9d5c02997a23df85 | 0 |
Analyze the following code function for security vulnerabilities | @Override
protected void finalize() {
CatLog.d(this, "Service finalized");
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: finalize
File: src/java/com/android/internal/telephony/cat/CatService.java
Repository: android
The code follows secure coding practices. | [
"CWE-264"
] | CVE-2015-3843 | HIGH | 9.3 | android | finalize | src/java/com/android/internal/telephony/cat/CatService.java | b48581401259439dc5ef6dcf8b0f303e4cbefbe9 | 0 |
Analyze the following code function for security vulnerabilities | @Override
public boolean areNotificationsEnabledForPackage(String pkg, int uid) {
checkCallerIsSystemOrSameApp(pkg);
return (mAppOps.checkOpNoThrow(AppOpsManager.OP_POST_NOTIFICATION, uid, pkg)
== AppOpsManager.MODE_ALLOWED) && !isPackageSuspendedForUser(pkg, uid);
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: areNotificationsEnabledForPackage
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 | areNotificationsEnabledForPackage | services/core/java/com/android/server/notification/NotificationManagerService.java | 61e9103b5725965568e46657f4781dd8f2e5b623 | 0 |
Analyze the following code function for security vulnerabilities | public static BufferedImage getArecibo() {
return getImage("arecibo.png");
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getArecibo
File: src/net/sourceforge/plantuml/version/PSystemVersion.java
Repository: plantuml
The code follows secure coding practices. | [
"CWE-284"
] | CVE-2023-3431 | MEDIUM | 5.3 | plantuml | getArecibo | src/net/sourceforge/plantuml/version/PSystemVersion.java | fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e | 0 |
Analyze the following code function for security vulnerabilities | @Override
public Operation.OperationResult executeFixedCostOperation(
final MessageFrame frame, final EVM evm) {
Bytes shiftAmount = frame.popStackItem();
if (shiftAmount.size() > 4 && (shiftAmount = shiftAmount.trimLeadingZeros()).size() > 4) {
frame.popStackItem();
frame.pushStackItem(UInt256.ZERO);
} else {
final int shiftAmountInt = shiftAmount.toInt();
final Bytes value = leftPad(frame.popStackItem());
if (shiftAmountInt >= 256) {
frame.pushStackItem(UInt256.ZERO);
} else {
frame.pushStackItem(value.shiftRight(shiftAmountInt));
}
}
return successResponse;
} | Vulnerability Classification:
- CWE: CWE-681
- CVE: CVE-2021-41272
- Severity: MEDIUM
- CVSS Score: 5.0
Description: Shift Optimization (#3039)
Reduce shift calculations to shifts that may have an actual result.
Signed-off-by: Danno Ferrin <danno.ferrin@gmail.com>
Function: executeFixedCostOperation
File: evm/src/main/java/org/hyperledger/besu/evm/operation/ShrOperation.java
Repository: hyperledger/besu
Fixed Code:
@Override
public Operation.OperationResult executeFixedCostOperation(
final MessageFrame frame, final EVM evm) {
Bytes shiftAmount = frame.popStackItem();
if (shiftAmount.size() > 4 && (shiftAmount = shiftAmount.trimLeadingZeros()).size() > 4) {
frame.popStackItem();
frame.pushStackItem(UInt256.ZERO);
} else {
final int shiftAmountInt = shiftAmount.toInt();
final Bytes value = leftPad(frame.popStackItem());
if (shiftAmountInt >= 256 || shiftAmountInt < 0) {
frame.pushStackItem(UInt256.ZERO);
} else {
frame.pushStackItem(value.shiftRight(shiftAmountInt));
}
}
return successResponse;
} | [
"CWE-681"
] | CVE-2021-41272 | MEDIUM | 5 | hyperledger/besu | executeFixedCostOperation | evm/src/main/java/org/hyperledger/besu/evm/operation/ShrOperation.java | 4170524ac3b45185704fcfbdeeb71b0b05dfa0a1 | 1 |
Analyze the following code function for security vulnerabilities | @Deprecated
public void setTemplate(String template)
{
DocumentReference templateReference = null;
if (!StringUtils.isEmpty(template)) {
templateReference = getCurrentMixedDocumentReferenceResolver().resolve(template);
}
setTemplateDocumentReference(templateReference);
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setTemplate
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 | setTemplate | 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 String getKey() {
return key;
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getKey
File: test-track/backend/src/main/java/io/metersphere/service/issue/platform/AbstractIssuePlatform.java
Repository: metersphere
The code follows secure coding practices. | [
"CWE-918"
] | CVE-2022-23544 | MEDIUM | 6.1 | metersphere | getKey | test-track/backend/src/main/java/io/metersphere/service/issue/platform/AbstractIssuePlatform.java | d0f95b50737c941b29d507a4cc3545f2dc6ab121 | 0 |
Analyze the following code function for security vulnerabilities | @Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
RESTMessage other = (RESTMessage) obj;
if (attributes == null) {
if (other.attributes != null)
return false;
} else if (!attributes.equals(other.attributes))
return false;
if (className == null) {
if (other.className != null)
return false;
} else if (!className.equals(other.className))
return false;
return true;
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: equals
File: base/common/src/main/java/com/netscape/certsrv/base/RESTMessage.java
Repository: dogtagpki/pki
The code follows secure coding practices. | [
"CWE-611"
] | CVE-2022-2414 | HIGH | 7.5 | dogtagpki/pki | equals | base/common/src/main/java/com/netscape/certsrv/base/RESTMessage.java | 16deffdf7548e305507982e246eb9fd1eac414fd | 0 |
Analyze the following code function for security vulnerabilities | @Override
public Boolean isUsedInFetchArtifact(PipelineConfig pipelineConfig) {
return false;
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isUsedInFetchArtifact
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 | isUsedInFetchArtifact | config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java | 6fa9fb7a7c91e760f1adc2593acdd50f2d78676b | 0 |
Analyze the following code function for security vulnerabilities | public DateFormat getDateFormat() {
return dateFormat;
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDateFormat
File: samples/client/petstore/java/retrofit2-play26/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 | getDateFormat | samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/ApiClient.java | 2c576483f26f85b3979c6948a131f585c237109a | 0 |
Analyze the following code function for security vulnerabilities | public AsyncHttpClientConfigBean addRequestFilter(RequestFilter requestFilter) {
requestFilters.add(requestFilter);
return this;
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addRequestFilter
File: api/src/main/java/org/asynchttpclient/AsyncHttpClientConfigBean.java
Repository: AsyncHttpClient/async-http-client
The code follows secure coding practices. | [
"CWE-345"
] | CVE-2013-7397 | MEDIUM | 4.3 | AsyncHttpClient/async-http-client | addRequestFilter | api/src/main/java/org/asynchttpclient/AsyncHttpClientConfigBean.java | df6ed70e86c8fc340ed75563e016c8baa94d7e72 | 0 |
Analyze the following code function for security vulnerabilities | @Override
public void unregisterAccountListener(String[] accountTypes, String opPackageName) {
int callingUid = Binder.getCallingUid();
mAppOpsManager.checkPackage(callingUid, opPackageName);
int userId = UserHandle.getCallingUserId();
final long identityToken = clearCallingIdentity();
try {
UserAccounts accounts = getUserAccounts(userId);
unregisterAccountListener(accountTypes, opPackageName, accounts);
} finally {
restoreCallingIdentity(identityToken);
}
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unregisterAccountListener
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 | unregisterAccountListener | services/core/java/com/android/server/accounts/AccountManagerService.java | f810d81839af38ee121c446105ca67cb12992fc6 | 0 |
Analyze the following code function for security vulnerabilities | public String getCustomWorkspace() {
return customWorkspace;
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCustomWorkspace
File: core/src/main/java/hudson/model/AbstractProject.java
Repository: jenkinsci/jenkins
The code follows secure coding practices. | [
"CWE-264"
] | CVE-2013-7330 | MEDIUM | 4 | jenkinsci/jenkins | getCustomWorkspace | core/src/main/java/hudson/model/AbstractProject.java | 36342d71e29e0620f803a7470ce96c61761648d8 | 0 |
Analyze the following code function for security vulnerabilities | private void stopDhcpSetup() {
/* Restore power save and suspend optimizations */
handlePostDhcpSetup();
stopIpClient();
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: stopDhcpSetup
File: service/java/com/android/server/wifi/ClientModeImpl.java
Repository: android
The code follows secure coding practices. | [
"CWE-Other"
] | CVE-2023-21242 | CRITICAL | 9.8 | android | stopDhcpSetup | service/java/com/android/server/wifi/ClientModeImpl.java | 72e903f258b5040b8f492cf18edd124b5a1ac770 | 0 |
Analyze the following code function for security vulnerabilities | private void setContentType(
final HttpServletResponse statusResponse,
final String jsonpCallback) {
if (StringUtils.isEmpty(jsonpCallback)) {
statusResponse.setContentType("application/json; charset=utf-8");
} else {
statusResponse.setContentType("application/javascript; charset=utf-8");
}
} | Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2020-15231
- Severity: MEDIUM
- CVSS Score: 4.3
Description: Remove JSONP support
See: https://github.com/mapfish/mapfish-print/security/code-scanning/5?query=ref%3Arefs%2Fheads%2Fmaster
Function: setContentType
File: core/src/main/java/org/mapfish/print/servlet/MapPrinterServlet.java
Repository: mapfish/mapfish-print
Fixed Code:
private void setContentType(final HttpServletResponse statusResponse) {
statusResponse.setContentType("application/json; charset=utf-8");
} | [
"CWE-79"
] | CVE-2020-15231 | MEDIUM | 4.3 | mapfish/mapfish-print | setContentType | core/src/main/java/org/mapfish/print/servlet/MapPrinterServlet.java | 89155f2506b9cee822e15ce60ccae390a1419d5e | 1 |
Analyze the following code function for security vulnerabilities | @NonNull ActiveAdmin getProfileOwnerOrDeviceOwnerLocked(final CallerIdentity caller) {
ensureLocked();
// Try to find an admin which can use reqPolicy
final ComponentName poAdminComponent = mOwners.getProfileOwnerComponent(caller.getUserId());
final ComponentName doAdminComponent = mOwners.getDeviceOwnerComponent();
if (poAdminComponent == null && doAdminComponent == null) {
throw new IllegalStateException(
String.format("No profile or device owner for user %d", caller.getUid()));
}
if (poAdminComponent != null) {
return getProfileOwnerLocked(caller);
}
return getDeviceOwnerLocked(caller);
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProfileOwnerOrDeviceOwnerLocked
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 | getProfileOwnerOrDeviceOwnerLocked | services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java | ed3f25b7222d4cff471f2b7d22d1150348146957 | 0 |
Analyze the following code function for security vulnerabilities | public <V> void fireColumnVisibilityChangeEvent(Column<T, V> column,
boolean hidden, boolean userOriginated) {
fireEvent(new ColumnVisibilityChangeEvent(this, column, hidden,
userOriginated));
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fireColumnVisibilityChangeEvent
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 | fireColumnVisibilityChangeEvent | server/src/main/java/com/vaadin/ui/Grid.java | c40bed109c3723b38694ed160ea647fef5b28593 | 0 |
Analyze the following code function for security vulnerabilities | private void appendDropBoxProcessHeaders(ProcessRecord process, String processName,
StringBuilder sb) {
// Watchdog thread ends up invoking this function (with
// a null ProcessRecord) to add the stack file to dropbox.
// Do not acquire a lock on this (am) in such cases, as it
// could cause a potential deadlock, if and when watchdog
// is invoked due to unavailability of lock on am and it
// would prevent watchdog from killing system_server.
if (process == null) {
sb.append("Process: ").append(processName).append("\n");
return;
}
// Note: ProcessRecord 'process' is guarded by the service
// instance. (notably process.pkgList, which could otherwise change
// concurrently during execution of this method)
synchronized (this) {
sb.append("Process: ").append(processName).append("\n");
int flags = process.info.flags;
IPackageManager pm = AppGlobals.getPackageManager();
sb.append("Flags: 0x").append(Integer.toString(flags, 16)).append("\n");
for (int ip=0; ip<process.pkgList.size(); ip++) {
String pkg = process.pkgList.keyAt(ip);
sb.append("Package: ").append(pkg);
try {
PackageInfo pi = pm.getPackageInfo(pkg, 0, UserHandle.getCallingUserId());
if (pi != null) {
sb.append(" v").append(pi.versionCode);
if (pi.versionName != null) {
sb.append(" (").append(pi.versionName).append(")");
}
}
} catch (RemoteException e) {
Slog.e(TAG, "Error getting package info: " + pkg, e);
}
sb.append("\n");
}
}
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: appendDropBoxProcessHeaders
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices. | [
"CWE-284"
] | CVE-2015-3833 | MEDIUM | 4.3 | android | appendDropBoxProcessHeaders | services/core/java/com/android/server/am/ActivityManagerService.java | aaa0fee0d7a8da347a0c47cef5249c70efee209e | 0 |
Analyze the following code function for security vulnerabilities | @Override
public void endDocument() throws SAXException {
globalParams.clear();
tagQueue.clear();
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: endDocument
File: src/main/java/org/codelibs/fess/util/GsaConfigParser.java
Repository: codelibs/fess
The code follows secure coding practices. | [
"CWE-611"
] | CVE-2018-1000822 | HIGH | 7.5 | codelibs/fess | endDocument | src/main/java/org/codelibs/fess/util/GsaConfigParser.java | faa265b8d8f1c71e1bf3229fba5f8cc58a5611b7 | 0 |
Analyze the following code function for security vulnerabilities | public LibraryInfo findLibraryWithZipDirectoryEntryScan(String libraryName,
String localePrefix,
String contract, FacesContext ctx, boolean forceScan) {
ClassLoader loader = Util.getCurrentLoader(this);
String basePath;
if (localePrefix == null) {
basePath = getBasePath(contract) + '/' + libraryName + '/';
} else {
basePath = getBasePath(contract)
+ '/'
+ localePrefix
+ '/'
+ libraryName
+ '/';
}
URL basePathURL = loader.getResource(basePath);
if (basePathURL == null) {
// try using this class' loader (necessary when running in OSGi)
basePathURL = this.getClass().getClassLoader().getResource(basePath);
if (basePathURL == null) {
if (null != localePrefix && libraryName.equals("javax.faces")) {
return null;
}
if (enableMissingResourceLibraryDetection || forceScan) {
if (null == libraryScanner) {
libraryScanner = new ZipDirectoryEntryScanner();
}
if (!libraryScanner.libraryExists(libraryName, localePrefix)) {
return null;
}
}
}
}
return new LibraryInfo(libraryName, null, localePrefix, contract, this);
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findLibraryWithZipDirectoryEntryScan
File: impl/src/main/java/com/sun/faces/application/resource/ClasspathResourceHelper.java
Repository: eclipse-ee4j/mojarra
The code follows secure coding practices. | [
"CWE-22"
] | CVE-2020-6950 | MEDIUM | 4.3 | eclipse-ee4j/mojarra | findLibraryWithZipDirectoryEntryScan | impl/src/main/java/com/sun/faces/application/resource/ClasspathResourceHelper.java | cefbb9447e7be560e59da2da6bd7cb93776f7741 | 0 |
Analyze the following code function for security vulnerabilities | private static native @Nullable Configuration[] nativeGetSizeConfigurations(long ptr); | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nativeGetSizeConfigurations
File: core/java/android/content/res/AssetManager.java
Repository: android
The code follows secure coding practices. | [
"CWE-415"
] | CVE-2023-40103 | HIGH | 7.8 | android | nativeGetSizeConfigurations | core/java/android/content/res/AssetManager.java | c3bc12c484ef3bbca4cec19234437c45af5e584d | 0 |
Analyze the following code function for security vulnerabilities | public boolean isDeviceIdAttestationSupported() {
PackageManager pm = mContext.getPackageManager();
return pm.hasSystemFeature(PackageManager.FEATURE_DEVICE_ID_ATTESTATION);
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isDeviceIdAttestationSupported
File: core/java/android/app/admin/DevicePolicyManager.java
Repository: android
The code follows secure coding practices. | [
"CWE-862"
] | CVE-2023-40089 | HIGH | 7.8 | android | isDeviceIdAttestationSupported | core/java/android/app/admin/DevicePolicyManager.java | e2e05f488da6abc765a62e7faf10cb74e729732e | 0 |
Analyze the following code function for security vulnerabilities | public void addPermission(TypePermission permission) {
if (securityMapper != null) {
securityInitialized |= permission.equals(NoTypePermission.NONE) || permission.equals(AnyTypePermission.ANY);
securityMapper.addPermission(permission);
}
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addPermission
File: xstream/src/java/com/thoughtworks/xstream/XStream.java
Repository: x-stream/xstream
The code follows secure coding practices. | [
"CWE-78"
] | CVE-2020-26217 | HIGH | 9.3 | x-stream/xstream | addPermission | xstream/src/java/com/thoughtworks/xstream/XStream.java | 0fec095d534126931c99fd38e9c6d41f5c685c1a | 0 |
Analyze the following code function for security vulnerabilities | public static int compress(byte[] input, int inputOffset, int inputLength, byte[] output, int outputOffset)
throws IOException
{
return rawCompress(input, inputOffset, inputLength, output, outputOffset);
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: compress
File: src/main/java/org/xerial/snappy/Snappy.java
Repository: xerial/snappy-java
The code follows secure coding practices. | [
"CWE-190"
] | CVE-2023-34454 | HIGH | 7.5 | xerial/snappy-java | compress | src/main/java/org/xerial/snappy/Snappy.java | d0042551e4a3509a725038eb9b2ad1f683674d94 | 0 |
Analyze the following code function for security vulnerabilities | @Override
public int read(byte[] b, int off, int len) throws IOException {
try {
int n;
while ((n = inflater.inflate(b, off, len)) == 0) {
if (inflater.finished() || inflater.needsDictionary()) {
return -1;
}
if (inflater.needsInput()) {
fill();
}
}
return n;
} catch (DataFormatException e) {
throw new IOException(e);
}
} | 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 | static native void registerNatives(); | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: registerNatives
File: jcl/src/java.base/share/classes/java/lang/invoke/InterfaceHandle.java
Repository: eclipse-openj9/openj9
The code follows secure coding practices. | [
"CWE-440",
"CWE-250"
] | CVE-2021-41035 | HIGH | 7.5 | eclipse-openj9/openj9 | registerNatives | jcl/src/java.base/share/classes/java/lang/invoke/InterfaceHandle.java | c6e0d9296ff9a3084965d83e207403de373c0bad | 0 |
Analyze the following code function for security vulnerabilities | private void saveSettingsGradle() throws IOException {
TemplateFile tmpl = TemplateFile.fromResources("/export/settings.gradle.tmpl");
tmpl.add("applicationName", applicationParams.getApplicationName());
tmpl.save(new File(projectDir, "settings.gradle"));
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: saveSettingsGradle
File: jadx-core/src/main/java/jadx/core/export/ExportGradleProject.java
Repository: skylot/jadx
The code follows secure coding practices. | [
"CWE-611"
] | CVE-2022-0219 | MEDIUM | 4.3 | skylot/jadx | saveSettingsGradle | jadx-core/src/main/java/jadx/core/export/ExportGradleProject.java | d22db30166e7cb369d72be41382bb63ac8b81c52 | 0 |
Analyze the following code function for security vulnerabilities | public Map<String, Map<String, java.lang.Object>> getTOC(int init, int max, boolean numbered)
{
getXWikiContext().put("tocNumbered", new Boolean(numbered));
return TOCGenerator.generateTOC(getContent(), init, max, numbered, getXWikiContext());
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTOC
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices. | [
"CWE-863"
] | CVE-2022-23615 | MEDIUM | 5.5 | xwiki/xwiki-platform | getTOC | xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java | 7ab0fe7b96809c7a3881454147598d46a1c9bbbe | 0 |
Analyze the following code function for security vulnerabilities | @Override
protected void onFinishInflate() {
super.onFinishInflate();
mEmergencyOnly = (TextView) findViewById(R.id.header_emergency_calls_only);
mDateTimeAlarmGroup = (ViewGroup) findViewById(R.id.date_time_alarm_group);
mDateTimeAlarmGroup.findViewById(R.id.empty_time_view).setVisibility(View.GONE);
mDateTimeGroup = (ViewGroup) findViewById(R.id.date_time_group);
mDateTimeGroup.setPivotX(0);
mDateTimeGroup.setPivotY(0);
mShowFullAlarm = getResources().getBoolean(R.bool.quick_settings_show_full_alarm);
mExpandIndicator = (ExpandableIndicator) findViewById(R.id.expand_indicator);
mHeaderQsPanel = (QuickQSPanel) findViewById(R.id.quick_qs_panel);
mSettingsButton = (SettingsButton) findViewById(R.id.settings_button);
mSettingsContainer = findViewById(R.id.settings_button_container);
mSettingsButton.setOnClickListener(this);
mAlarmStatusCollapsed = findViewById(R.id.alarm_status_collapsed);
mAlarmStatus = (TextView) findViewById(R.id.alarm_status);
mAlarmStatus.setOnClickListener(this);
mMultiUserSwitch = (MultiUserSwitch) findViewById(R.id.multi_user_switch);
mMultiUserAvatar = (ImageView) mMultiUserSwitch.findViewById(R.id.multi_user_avatar);
// RenderThread is doing more harm than good when touching the header (to expand quick
// settings), so disable it for this view
((RippleDrawable) mSettingsButton.getBackground()).setForceSoftware(true);
((RippleDrawable) mExpandIndicator.getBackground()).setForceSoftware(true);
updateResources();
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onFinishInflate
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStatusBarHeader.java
Repository: android
The code follows secure coding practices. | [
"CWE-264"
] | CVE-2016-3886 | HIGH | 7.2 | android | onFinishInflate | packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStatusBarHeader.java | 6ca6cd5a50311d58a1b7bf8fbef3f9aa29eadcd5 | 0 |
Analyze the following code function for security vulnerabilities | private boolean isSupportedSetupEventCommand(CatCmdMessage cmdMsg) {
boolean flag = true;
for (int eventVal: cmdMsg.getSetEventList().eventList) {
CatLog.d(this,"Event: " + eventVal);
switch (eventVal) {
/* Currently android is supporting only the below events in SetupEventList
* Language Selection. */
case IDLE_SCREEN_AVAILABLE_EVENT:
case LANGUAGE_SELECTION_EVENT:
break;
default:
flag = false;
}
}
return flag;
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isSupportedSetupEventCommand
File: src/java/com/android/internal/telephony/cat/CatService.java
Repository: android
The code follows secure coding practices. | [
"CWE-264"
] | CVE-2015-3843 | HIGH | 9.3 | android | isSupportedSetupEventCommand | src/java/com/android/internal/telephony/cat/CatService.java | b48581401259439dc5ef6dcf8b0f303e4cbefbe9 | 0 |
Analyze the following code function for security vulnerabilities | private void addRole(String roleName)
{
if (roleName != null)
{
try
{
Principal p = super.createIdentity(roleName);
if (trace) {
log.trace("Assign user '" + getIdentity().getName() + "' to role " + roleName);
}
userRoles.addMember(p);
}
catch (Exception e)
{
if (log.isDebugEnabled())
log.debug("Failed to create principal: " + roleName, e);
}
}
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addRole
File: jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/AdvancedLdapLoginModule.java
Repository: wildfly-security/jboss-negotiation
The code follows secure coding practices. | [
"CWE-200"
] | CVE-2015-1849 | MEDIUM | 4.3 | wildfly-security/jboss-negotiation | addRole | jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/AdvancedLdapLoginModule.java | 0dc9d191b6eb1d13b8f0189c5b02ba6576f4722e | 0 |
Analyze the following code function for security vulnerabilities | @GetMapping("{postId:\\d+}/comments/top_view")
public Page<CommentWithHasChildrenVO> listTopComments(@PathVariable("postId") Integer postId,
@RequestParam(name = "page", required = false, defaultValue = "0") int page,
@SortDefault(sort = "createTime", direction = DESC) Sort sort) {
Page<CommentWithHasChildrenVO> result = postCommentService.pageTopCommentsBy(postId, CommentStatus.PUBLISHED, PageRequest.of(page, optionService.getCommentPageSize(), sort));
return postCommentService.filterIpAddress(result);
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: listTopComments
File: src/main/java/run/halo/app/controller/content/api/PostController.java
Repository: halo-dev/halo
The code follows secure coding practices. | [
"CWE-79"
] | CVE-2020-19007 | LOW | 3.5 | halo-dev/halo | listTopComments | src/main/java/run/halo/app/controller/content/api/PostController.java | d6b3d6cb5d681c7d8d64fd48de6c7c99b696bb8b | 0 |
Analyze the following code function for security vulnerabilities | @Override
public boolean isPackageSignedByKeySet(String packageName, KeySet ks) {
if (packageName == null || ks == null) {
return false;
}
synchronized(mPackages) {
final PackageParser.Package pkg = mPackages.get(packageName);
if (pkg == null) {
Slog.w(TAG, "KeySet requested for unknown package:" + packageName);
throw new IllegalArgumentException("Unknown package: " + packageName);
}
IBinder ksh = ks.getToken();
if (ksh instanceof KeySetHandle) {
KeySetManagerService ksms = mSettings.mKeySetManagerService;
return ksms.packageIsSignedByLPr(packageName, (KeySetHandle) ksh);
}
return false;
}
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isPackageSignedByKeySet
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 | isPackageSignedByKeySet | services/core/java/com/android/server/pm/PackageManagerService.java | a75537b496e9df71c74c1d045ba5569631a16298 | 0 |
Analyze the following code function for security vulnerabilities | @Override
public boolean convertToTranslucent(IBinder token, ActivityOptions options) {
final long origId = Binder.clearCallingIdentity();
try {
synchronized (this) {
final ActivityRecord r = ActivityRecord.isInStackLocked(token);
if (r == null) {
return false;
}
int index = r.task.mActivities.lastIndexOf(r);
if (index > 0) {
ActivityRecord under = r.task.mActivities.get(index - 1);
under.returningOptions = options;
}
final boolean translucentChanged = r.changeWindowTranslucency(false);
if (translucentChanged) {
r.task.stack.convertToTranslucent(r);
}
mStackSupervisor.ensureActivitiesVisibleLocked(null, 0);
mWindowManager.setAppFullscreen(token, false);
return translucentChanged;
}
} finally {
Binder.restoreCallingIdentity(origId);
}
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: convertToTranslucent
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices. | [
"CWE-284"
] | CVE-2015-3833 | MEDIUM | 4.3 | android | convertToTranslucent | services/core/java/com/android/server/am/ActivityManagerService.java | aaa0fee0d7a8da347a0c47cef5249c70efee209e | 0 |
Analyze the following code function for security vulnerabilities | @NonNull
public BigPictureStyle showBigPictureWhenCollapsed(boolean show) {
mShowBigPictureWhenCollapsed = show;
return this;
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: showBigPictureWhenCollapsed
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices. | [
"CWE-862"
] | CVE-2023-21288 | MEDIUM | 5.5 | android | showBigPictureWhenCollapsed | core/java/android/app/Notification.java | 726247f4f53e8cc0746175265652fa415a123c0c | 0 |
Analyze the following code function for security vulnerabilities | public PRIndirectReference getPageOrigRefRelease(int pageNum) {
PRIndirectReference ref = getPageOrigRef(pageNum);
releasePage(pageNum);
return ref;
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPageOrigRefRelease
File: java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
Repository: pdftk-java/pdftk
The code follows secure coding practices. | [
"CWE-835"
] | CVE-2021-37819 | HIGH | 7.5 | pdftk-java/pdftk | getPageOrigRefRelease | java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java | 9b0cbb76c8434a8505f02ada02a94263dcae9247 | 0 |
Analyze the following code function for security vulnerabilities | ConfigurablePropertyAccessor propertyAccessor(Object target) {
return this.directFieldAccess ? new DirectFieldAccessor(target) : new BeanWrapperImpl(target);
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: propertyAccessor
File: web/play-java-forms/src/main/java/play/data/Form.java
Repository: playframework
The code follows secure coding practices. | [
"CWE-400"
] | CVE-2022-31018 | MEDIUM | 5 | playframework | propertyAccessor | web/play-java-forms/src/main/java/play/data/Form.java | 15393b736df939e35e275af2347155f296c684f2 | 0 |
Analyze the following code function for security vulnerabilities | private static void enforceMaxStringLength(String str, String argName) {
Preconditions.checkArgument(
str.length() <= MAX_POLICY_STRING_LENGTH, argName + " loo long");
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: enforceMaxStringLength
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 | enforceMaxStringLength | services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java | e2e05f488da6abc765a62e7faf10cb74e729732e | 0 |
Analyze the following code function for security vulnerabilities | Boolean checkProjectExist(String relateId); | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkProjectExist
File: framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/track/issue/IssuesPlatform.java
Repository: metersphere
The code follows secure coding practices. | [
"CWE-918"
] | CVE-2022-23544 | MEDIUM | 6.1 | metersphere | checkProjectExist | framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/track/issue/IssuesPlatform.java | d0f95b50737c941b29d507a4cc3545f2dc6ab121 | 0 |
Analyze the following code function for security vulnerabilities | @Override
public void getMyMemoryState(ActivityManager.RunningAppProcessInfo outInfo) {
enforceNotIsolatedCaller("getMyMemoryState");
synchronized (this) {
ProcessRecord proc;
synchronized (mPidsSelfLocked) {
proc = mPidsSelfLocked.get(Binder.getCallingPid());
}
fillInProcMemInfo(proc, outInfo);
}
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMyMemoryState
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices. | [
"CWE-284"
] | CVE-2015-3833 | MEDIUM | 4.3 | android | getMyMemoryState | services/core/java/com/android/server/am/ActivityManagerService.java | aaa0fee0d7a8da347a0c47cef5249c70efee209e | 0 |
Analyze the following code function for security vulnerabilities | public int getMaxRedirects() {
return maxRedirects;
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMaxRedirects
File: api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java
Repository: AsyncHttpClient/async-http-client
The code follows secure coding practices. | [
"CWE-345"
] | CVE-2013-7397 | MEDIUM | 4.3 | AsyncHttpClient/async-http-client | getMaxRedirects | api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java | df6ed70e86c8fc340ed75563e016c8baa94d7e72 | 0 |
Analyze the following code function for security vulnerabilities | @Override
boolean shouldGetActivityMetadata() {
return true;
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: shouldGetActivityMetadata
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 | shouldGetActivityMetadata | core/java/com/android/internal/app/ChooserActivity.java | ddbf2db5b946be8fdc45c7b0327bf560b2a06988 | 0 |
Analyze the following code function for security vulnerabilities | public void enterSafeMode() throws RemoteException {
Parcel data = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
mRemote.transact(ENTER_SAFE_MODE_TRANSACTION, data, null, 0);
data.recycle();
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: enterSafeMode
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices. | [
"CWE-264"
] | CVE-2016-3832 | HIGH | 8.3 | android | enterSafeMode | core/java/android/app/ActivityManagerNative.java | e7cf91a198de995c7440b3b64352effd2e309906 | 0 |
Analyze the following code function for security vulnerabilities | @Override
public String unzip(File zipfile) throws IOException {
return unzip(zipfile, null);
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unzip
File: dspace-api/src/main/java/org/dspace/app/itemimport/ItemImportServiceImpl.java
Repository: DSpace
The code follows secure coding practices. | [
"CWE-22"
] | CVE-2022-31195 | HIGH | 7.2 | DSpace | unzip | dspace-api/src/main/java/org/dspace/app/itemimport/ItemImportServiceImpl.java | 7af52a0883a9dbc475cf3001f04ed11b24c8a4c0 | 0 |
Analyze the following code function for security vulnerabilities | @Override
public String getHost() {
return host;
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getHost
File: smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
Repository: igniterealtime/Smack
The code follows secure coding practices. | [
"CWE-362"
] | CVE-2016-10027 | MEDIUM | 4.3 | igniterealtime/Smack | getHost | smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java | a9d5cd4a611f47123f9561bc5a81a4555fe7cb04 | 0 |
Analyze the following code function for security vulnerabilities | @Override
public void setSystemControlledUserRestriction(String key, boolean value, int userId) {
checkSystemOrRoot("setSystemControlledUserRestriction");
synchronized (mPackagesLock) {
Bundle restrictions = getUserRestrictions(userId);
restrictions.putBoolean(key, value);
setUserRestrictionsInternalLocked(restrictions, userId);
}
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSystemControlledUserRestriction
File: services/core/java/com/android/server/pm/UserManagerService.java
Repository: android
The code follows secure coding practices. | [
"CWE-264"
] | CVE-2016-2457 | LOW | 2.1 | android | setSystemControlledUserRestriction | services/core/java/com/android/server/pm/UserManagerService.java | 12332e05f632794e18ea8c4ac52c98e82532e5db | 0 |
Analyze the following code function for security vulnerabilities | int getPort() {
return mPort;
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPort
File: core/java/android/bluetooth/BluetoothSocket.java
Repository: Genymobile/f2ut_platform_frameworks_base
The code follows secure coding practices. | [
"CWE-Other"
] | CVE-2014-9908 | LOW | 3.3 | Genymobile/f2ut_platform_frameworks_base | getPort | core/java/android/bluetooth/BluetoothSocket.java | f24cec326f5f65c693544fb0b92c37f633bacda2 | 0 |
Analyze the following code function for security vulnerabilities | @Override
public void onTouchSlopExceeded() {
mStackScroller.removeLongPressCallback();
mStackScroller.checkSnoozeLeavebehind();
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onTouchSlopExceeded
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
Repository: android
The code follows secure coding practices. | [
"CWE-Other"
] | CVE-2017-0822 | HIGH | 7.5 | android | onTouchSlopExceeded | packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java | c574568aaede7f652432deb7707f20ae54bbdf9a | 0 |
Analyze the following code function for security vulnerabilities | @Override
public void setDataBaseUrl(Properties dbconfig, String host, String port, String database, String timeZone)
throws IOException, URISyntaxException {
StringBuilder sb = new StringBuilder();
sb.append("jdbc:mysql://");
sb.append(host);
sb.append(":");
if (CommonUtils.empty(port)) {
sb.append(getDefaultPort());
} else {
sb.append(port);
}
sb.append("/");
sb.append(database);
sb.append("?characterEncoding=UTF-8&useSSL=false");
if (CommonUtils.notEmpty(timeZone)) {
try {
sb.append("&serverTimezone=GMT");
sb.append(URLEncoder.encode(timeZone, Constants.DEFAULT_CHARSET_NAME));
} catch (UnsupportedEncodingException e) {
}
}
dbconfig.setProperty("jdbc.url", sb.toString());
dbconfig.setProperty("jdbc.driverClassName", "com.mysql.cj.jdbc.Driver");
} | Vulnerability Classification:
- CWE: CWE-89
- CVE: CVE-2020-20914
- Severity: CRITICAL
- CVSS Score: 9.8
Description: https://github.com/sanluan/PublicCMS/issues/29
Function: setDataBaseUrl
File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/common/database/CmsUpgrader.java
Repository: sanluan/PublicCMS
Fixed Code:
@Override
public void setDataBaseUrl(Properties dbconfig, String host, String port, String database, String timeZone)
throws IOException, URISyntaxException {
StringBuilder sb = new StringBuilder();
sb.append("jdbc:mysql://");
sb.append(host);
sb.append(":");
if (CommonUtils.empty(port)) {
sb.append(getDefaultPort());
} else {
sb.append(port);
}
sb.append("/");
sb.append(database);
sb.append("?characterEncoding=UTF-8&useSSL=false&useAffectedRows=true");
if (CommonUtils.notEmpty(timeZone)) {
try {
sb.append("&serverTimezone=GMT");
sb.append(URLEncoder.encode(timeZone, Constants.DEFAULT_CHARSET_NAME));
} catch (UnsupportedEncodingException e) {
}
}
dbconfig.setProperty("jdbc.url", sb.toString());
dbconfig.setProperty("jdbc.driverClassName", "com.mysql.cj.jdbc.Driver");
} | [
"CWE-89"
] | CVE-2020-20914 | CRITICAL | 9.8 | sanluan/PublicCMS | setDataBaseUrl | publiccms-parent/publiccms-core/src/main/java/com/publiccms/common/database/CmsUpgrader.java | bf24c5dd9177cb2da30d0f0a62cf8e130003c2ae | 1 |
Analyze the following code function for security vulnerabilities | @Override
public boolean isSecureConnection() {
return usingTLS;
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isSecureConnection
File: smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
Repository: igniterealtime/Smack
The code follows secure coding practices. | [
"CWE-362"
] | CVE-2016-10027 | MEDIUM | 4.3 | igniterealtime/Smack | isSecureConnection | smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java | a9d5cd4a611f47123f9561bc5a81a4555fe7cb04 | 0 |
Analyze the following code function for security vulnerabilities | public RemoteViews createBigContentView() {
RemoteViews result = null;
if (useExistingRemoteView(mN.bigContentView)) {
return fullyCustomViewRequiresDecoration(false /* fromStyle */)
? minimallyDecoratedBigContentView(mN.bigContentView) : mN.bigContentView;
}
if (mStyle != null) {
result = mStyle.makeBigContentView();
if (fullyCustomViewRequiresDecoration(true /* fromStyle */)) {
result = minimallyDecoratedBigContentView(result);
}
}
if (result == null) {
if (bigContentViewRequired()) {
StandardTemplateParams p = mParams.reset()
.viewType(StandardTemplateParams.VIEW_TYPE_BIG)
.allowTextWithProgress(true)
.fillTextsFrom(this);
result = applyStandardTemplateWithActions(getBigBaseLayoutResource(), p,
null /* result */);
}
}
makeHeaderExpanded(result);
return result;
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createBigContentView
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices. | [
"CWE-862"
] | CVE-2023-21288 | MEDIUM | 5.5 | android | createBigContentView | core/java/android/app/Notification.java | 726247f4f53e8cc0746175265652fa415a123c0c | 0 |
Analyze the following code function for security vulnerabilities | private Endpoint getEndPoint(String hint) throws URISyntaxException
{
// TODO: use URI directly when upgrading to a version of XWiki providing a URI converter
String uriString = getProperty(PROPPREFIX_ENDPOINT + hint, String.class);
// If no direct endpoint is provider assume it's a XWiki OIDC provider and generate the endpoint from the hint
URI uri;
if (uriString == null) {
if (getProperty(PROP_XWIKIPROVIDER, String.class) != null) {
uri = this.manager.createEndPointURI(getXWikiProvider().toString(), hint);
} else {
uri = null;
}
} else {
uri = new URI(uriString);
}
// If we still don't have any endpoint URI, return null
if (uri == null) {
return null;
}
// Find custom headers
Map<String, List<String>> headers = new LinkedHashMap<>();
List<String> entries = getProperty(PROPPREFIX_ENDPOINT + hint + ".headers", List.class);
if (entries != null) {
for (String entry : entries) {
int index = entry.indexOf(':');
if (index > 0 && index < entry.length() - 1) {
headers.computeIfAbsent(entry.substring(0, index), key -> new ArrayList<>())
.add(entry.substring(index + 1));
}
}
}
return new Endpoint(uri, headers);
} | Vulnerability Classification:
- CWE: CWE-287
- CVE: CVE-2022-39387
- Severity: HIGH
- CVSS Score: 7.5
Description: OIDC-118: Fix bad handling of request parameters
Function: getEndPoint
File: oidc-authenticator/src/main/java/org/xwiki/contrib/oidc/auth/internal/OIDCClientConfiguration.java
Repository: xwiki-contrib/oidc
Fixed Code:
private Endpoint getEndPoint(String hint) throws URISyntaxException
{
// TODO: use URI directly when upgrading to a version of XWiki providing a URI converter
String uriString = getProperty(PROPPREFIX_ENDPOINT + hint, String.class);
// If no direct endpoint is provider assume it's a XWiki OIDC provider and generate the endpoint from the hint
URI uri;
if (uriString == null) {
if (getProperty(PROP_XWIKIPROVIDER, String.class) != null) {
uri = this.manager.createEndPointURI(getXWikiProvider().toString(), hint);
} else {
uri = null;
}
} else {
uri = new URI(uriString);
}
// If we still don't have any endpoint URI, try the request
if (uri == null) {
uriString = getRequestParameter(PROPPREFIX_ENDPOINT + hint);
if (uriString == null) {
String provider = getRequestParameter(PROP_XWIKIPROVIDER);
if (provider == null) {
return null;
}
uri = this.manager.createEndPointURI(provider, hint);
} else {
uri = new URI(uriString);
}
}
// Find custom headers
Map<String, List<String>> headers = new LinkedHashMap<>();
List<String> entries = getProperty(PROPPREFIX_ENDPOINT + hint + ".headers", List.class);
if (entries != null) {
for (String entry : entries) {
int index = entry.indexOf(':');
if (index > 0 && index < entry.length() - 1) {
headers.computeIfAbsent(entry.substring(0, index), key -> new ArrayList<>())
.add(entry.substring(index + 1));
}
}
}
return new Endpoint(uri, headers);
} | [
"CWE-287"
] | CVE-2022-39387 | HIGH | 7.5 | xwiki-contrib/oidc | getEndPoint | oidc-authenticator/src/main/java/org/xwiki/contrib/oidc/auth/internal/OIDCClientConfiguration.java | 0247af1417925b9734ab106ad7cd934ee870ac89 | 1 |
Analyze the following code function for security vulnerabilities | public static String getBuildRevision() {
return BUILD_REVISION;
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getBuildRevision
File: modules/library/metadata/src/main/java/org/geotools/util/factory/GeoTools.java
Repository: geotools
The code follows secure coding practices. | [
"CWE-917"
] | CVE-2022-24818 | HIGH | 7.5 | geotools | getBuildRevision | modules/library/metadata/src/main/java/org/geotools/util/factory/GeoTools.java | 4f70fa3234391dd0cda883a20ab0ec75688cba49 | 0 |
Analyze the following code function for security vulnerabilities | protected void writeLine(final String iContent) throws IOException {
if (iContent != null)
channel.outStream.write(iContent.getBytes());
channel.outStream.write(OHttpUtils.EOL);
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeLine
File: server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/ONetworkProtocolHttpAbstract.java
Repository: orientechnologies/orientdb
The code follows secure coding practices. | [
"CWE-352"
] | CVE-2015-2912 | MEDIUM | 6.8 | orientechnologies/orientdb | writeLine | server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/ONetworkProtocolHttpAbstract.java | d5a45e608ba8764fd817c1bdd7cf966564e828e9 | 0 |
Analyze the following code function for security vulnerabilities | public ApiClient setServerVariables(Map<String, String> serverVariables) {
this.serverVariables = serverVariables;
updateBasePath();
return this;
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setServerVariables
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 | setServerVariables | 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 | public String getPreviousPageUrl(int step) throws IndexUnreachableException, DAOException {
return getPageUrlRelativeToCurrentPage(step * -1);
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPreviousPageUrl
File: goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java
Repository: intranda/goobi-viewer-core
The code follows secure coding practices. | [
"CWE-79"
] | CVE-2023-29014 | MEDIUM | 6.1 | intranda/goobi-viewer-core | getPreviousPageUrl | goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java | c29efe60e745a94d03debc17681c4950f3917455 | 0 |
Analyze the following code function for security vulnerabilities | @VisibleForTesting
String getUserEnteredApnType() {
// if user has not specified a type, map it to "ALL APN TYPES THAT ARE NOT READ-ONLY"
// but if user enter empty type, map it just for default
String userEnteredApnType = mApnType.getText();
if (userEnteredApnType != null) userEnteredApnType = userEnteredApnType.trim();
if ((TextUtils.isEmpty(userEnteredApnType)
|| APN_TYPE_ALL.equals(userEnteredApnType))) {
userEnteredApnType = getEditableApnType(APN_TYPES);
}
Log.d(TAG, "getUserEnteredApnType: changed apn type to editable apn types: "
+ userEnteredApnType);
return userEnteredApnType;
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserEnteredApnType
File: src/com/android/settings/network/apn/ApnEditor.java
Repository: android
The code follows secure coding practices. | [
"CWE-Other"
] | CVE-2023-40125 | HIGH | 7.8 | android | getUserEnteredApnType | src/com/android/settings/network/apn/ApnEditor.java | 63d464c3fa5c7b9900448fef3844790756e557eb | 0 |
Analyze the following code function for security vulnerabilities | public void remove() {
mListView.removeCallbacks(this);
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: remove
File: services/autofill/java/com/android/server/autofill/ui/DialogFillUi.java
Repository: android
The code follows secure coding practices. | [
"CWE-Other",
"CWE-610"
] | CVE-2023-40133 | MEDIUM | 5.5 | android | remove | services/autofill/java/com/android/server/autofill/ui/DialogFillUi.java | 08becc8c600f14c5529115cc1a1e0c97cd503f33 | 0 |
Analyze the following code function for security vulnerabilities | public String display(String fieldname, String type, BaseObject obj, boolean isolated, XWikiContext context)
{
return display(fieldname, type, "", obj, isolated, context);
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: display
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 | display | 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 Profile readAuthUser(HttpServletRequest req) {
Profile authUser = null;
User u = pc.me(HttpUtils.getStateParam(CONF.authCookie(), req));
if (u != null && isEmailDomainApproved(u.getEmail())) {
return getOrCreateProfile(u, req);
}
return authUser;
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readAuthUser
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 | readAuthUser | src/main/java/com/erudika/scoold/utils/ScooldUtils.java | 62a0e92e1486ddc17676a7ead2c07ff653d167ce | 0 |
Analyze the following code function for security vulnerabilities | private void doLoad() {
/* Perhaps a custom version is specified */
String version = System.getProperty("library."+name+".version");
if (version == null) {
version = this.version;
}
ArrayList<String> errors = new ArrayList<String>();
/* Try loading library from a custom library path */
String customPath = System.getProperty("library."+name+".path");
if (customPath != null) {
if( version!=null && load(errors, file(customPath, map(name + "-" + version))) )
return;
if( load(errors, file(customPath, map(name))) )
return;
}
/* Try loading library from java library path */
if( version!=null && load(errors, name + getBitModel() + "-" + version) )
return;
if( version!=null && load(errors, name + "-" + version) )
return;
if( load(errors, name ) )
return;
/* Try extracting the library from the jar */
if( classLoader!=null ) {
if( exractAndLoad(errors, version, customPath, getPlatformSpecifcResourcePath()) )
return;
if( exractAndLoad(errors, version, customPath, getOperatingSystemSpecifcResourcePath()) )
return;
// For the simpler case where only 1 platform lib is getting packed into the jar
if( exractAndLoad(errors, version, customPath, getResorucePath()) )
return;
}
/* Failed to find the library */
throw new UnsatisfiedLinkError("Could not load library. Reasons: " + errors.toString());
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doLoad
File: hawtjni-runtime/src/main/java/org/fusesource/hawtjni/runtime/Library.java
Repository: fusesource/hawtjni
The code follows secure coding practices. | [
"CWE-94"
] | CVE-2013-2035 | MEDIUM | 4.4 | fusesource/hawtjni | doLoad | hawtjni-runtime/src/main/java/org/fusesource/hawtjni/runtime/Library.java | 92c266170ce98edc200c656bd034a237098b8aa5 | 0 |
Analyze the following code function for security vulnerabilities | public void setAnonymousIdentity(WifiConfiguration configuration) {
if (!configuration.isPasspoint()) {
return;
}
PasspointProvider provider = mProviders.get(configuration.getProfileKey());
if (provider != null) {
provider.setAnonymousIdentity(configuration.enterpriseConfig.getAnonymousIdentity());
mWifiConfigManager.saveToStore(true);
}
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAnonymousIdentity
File: service/java/com/android/server/wifi/hotspot2/PasspointManager.java
Repository: android
The code follows secure coding practices. | [
"CWE-120"
] | CVE-2023-21243 | MEDIUM | 5.5 | android | setAnonymousIdentity | service/java/com/android/server/wifi/hotspot2/PasspointManager.java | 5b49b8711efaadadf5052ba85288860c2d7ca7a6 | 0 |
Analyze the following code function for security vulnerabilities | @Override
public void removeProject(String name, AsyncMethodCallback resultHandler) {
// Metadata must be updated first because it cannot be updated if the project is removed.
handle(mds.removeProject(SYSTEM, name)
.thenCompose(unused -> executor.execute(Command.removeProject(SYSTEM, name))),
resultHandler);
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeProject
File: server/src/main/java/com/linecorp/centraldogma/server/internal/thrift/CentralDogmaServiceImpl.java
Repository: line/centraldogma
The code follows secure coding practices. | [
"CWE-862"
] | CVE-2021-38388 | MEDIUM | 6.5 | line/centraldogma | removeProject | server/src/main/java/com/linecorp/centraldogma/server/internal/thrift/CentralDogmaServiceImpl.java | e83b558ef9eaa44f71b7d9236bdec9f68c85b8bd | 0 |
Analyze the following code function for security vulnerabilities | @PUT
@Path("blog")
@Operation(summary = "Attaches an blog building block", description = "Attaches an blog building block")
@ApiResponse(responseCode = "200", description = "The course node metadatas", content = {
@Content(mediaType = "application/json", schema = @Schema(implementation = CourseNodeVO.class)),
@Content(mediaType = "application/xml", schema = @Schema(implementation = CourseNodeVO.class)) })
@ApiResponse(responseCode = "401", description = "The roles of the authenticated user are not sufficient")
@ApiResponse(responseCode = "404", description = "The course or parentNode not found")
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
public Response attachBlog(@PathParam("courseId") Long courseId, @QueryParam("parentNodeId") String parentNodeId,
@QueryParam("position") Integer position, @QueryParam("shortTitle") @DefaultValue("undefined") String shortTitle,
@QueryParam("longTitle") @DefaultValue("undefined") String longTitle, @QueryParam("objectives") @DefaultValue("undefined") String objectives,
@QueryParam("visibilityExpertRules") String visibilityExpertRules, @QueryParam("accessExpertRules") String accessExpertRules,
@QueryParam("repoEntry") Long blogResourceableId, @Context HttpServletRequest request) {
RepositoryManager rm = RepositoryManager.getInstance();
RepositoryEntry blogRepoEntry = rm.lookupRepositoryEntry(blogResourceableId);
if(blogRepoEntry == null) {
return Response.serverError().status(Status.NOT_FOUND).build();
}
BlogCustomConfig config = new BlogCustomConfig(blogRepoEntry);
return attach(courseId, parentNodeId, "blog", position, shortTitle, longTitle, objectives, visibilityExpertRules, accessExpertRules, config, request);
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: attachBlog
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 | attachBlog | src/main/java/org/olat/restapi/repository/course/CourseElementWebService.java | c450df7d7ffe6afde39ebca6da9136f1caa16ec4 | 0 |
Analyze the following code function for security vulnerabilities | private static File canonical(final File file) {
try {
return file.getCanonicalFile();
}
catch(IOException ex) {
throw new VncException(
String.format(
"The file '%s' can not be converted to a canonical path!",
file.getPath()),
ex);
}
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: canonical
File: src/main/java/com/github/jlangch/venice/impl/util/io/LoadPaths.java
Repository: jlangch/venice
The code follows secure coding practices. | [
"CWE-22"
] | CVE-2022-36007 | LOW | 3.3 | jlangch/venice | canonical | src/main/java/com/github/jlangch/venice/impl/util/io/LoadPaths.java | c942c73136333bc493050910f171a48e6f575b23 | 0 |
Analyze the following code function for security vulnerabilities | @Override
public BaseBlock getFullBlock(BlockVector3 position) {
BukkitImplAdapter adapter = WorldEditPlugin.getInstance().getBukkitImplAdapter();
if (adapter != null) {
return adapter.getFullBlock(BukkitAdapter.adapt(getWorld(), position));
} else {
return getBlock(position).toBaseBlock();
}
} | Vulnerability Classification:
- CWE: CWE-400
- CVE: CVE-2023-35925
- Severity: MEDIUM
- CVSS Score: 5.5
Description: feat: prevent edits outside +/- 30,000,000 blocks
Function: getFullBlock
File: worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java
Repository: IntellectualSites/FastAsyncWorldEdit
Fixed Code:
@Override
public BaseBlock getFullBlock(BlockVector3 position) {
//FAWE start - safe edit region
testCoords(position);
//FAWE end
BukkitImplAdapter adapter = WorldEditPlugin.getInstance().getBukkitImplAdapter();
if (adapter != null) {
return adapter.getFullBlock(BukkitAdapter.adapt(getWorld(), position));
} else {
return getBlock(position).toBaseBlock();
}
} | [
"CWE-400"
] | CVE-2023-35925 | MEDIUM | 5.5 | IntellectualSites/FastAsyncWorldEdit | getFullBlock | worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java | 3a8dfb4f7b858a439c35f7af1d56d21f796f61f5 | 1 |
Analyze the following code function for security vulnerabilities | @Override
public View getView(int position, View convertView, ViewGroup parent) {
return getItem(position).view;
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getView
File: services/autofill/java/com/android/server/autofill/ui/DialogFillUi.java
Repository: android
The code follows secure coding practices. | [
"CWE-Other",
"CWE-610"
] | CVE-2023-40133 | MEDIUM | 5.5 | android | getView | services/autofill/java/com/android/server/autofill/ui/DialogFillUi.java | 08becc8c600f14c5529115cc1a1e0c97cd503f33 | 0 |
Analyze the following code function for security vulnerabilities | public PendingIntent getRunningServiceControlPanel(ComponentName service)
throws RemoteException; | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRunningServiceControlPanel
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices. | [
"CWE-264"
] | CVE-2016-3832 | HIGH | 8.3 | android | getRunningServiceControlPanel | core/java/android/app/IActivityManager.java | e7cf91a198de995c7440b3b64352effd2e309906 | 0 |
Analyze the following code function for security vulnerabilities | public static String getRelativeResource(String s) throws ContentError {
return getRelativeResource(rootClass, s);
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRelativeResource
File: src/main/java/org/lemsml/jlems/io/util/JUtil.java
Repository: LEMS/jLEMS
The code follows secure coding practices. | [
"CWE-22"
] | CVE-2022-4583 | HIGH | 8.8 | LEMS/jLEMS | getRelativeResource | src/main/java/org/lemsml/jlems/io/util/JUtil.java | 8c224637d7d561076364a9e3c2c375daeaf463dc | 0 |
Analyze the following code function for security vulnerabilities | void finishUserBoot(UserState uss) {
synchronized (this) {
if (uss.mState == UserState.STATE_BOOTING
&& mStartedUsers.get(uss.mHandle.getIdentifier()) == uss) {
uss.mState = UserState.STATE_RUNNING;
final int userId = uss.mHandle.getIdentifier();
Intent intent = new Intent(Intent.ACTION_BOOT_COMPLETED, null);
intent.putExtra(Intent.EXTRA_USER_HANDLE, userId);
intent.addFlags(Intent.FLAG_RECEIVER_NO_ABORT);
broadcastIntentLocked(null, null, intent,
null, null, 0, null, null,
new String[] {android.Manifest.permission.RECEIVE_BOOT_COMPLETED},
AppOpsManager.OP_NONE, null, true, false, MY_PID, Process.SYSTEM_UID,
userId);
}
}
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: finishUserBoot
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices. | [
"CWE-200"
] | CVE-2016-2500 | MEDIUM | 4.3 | android | finishUserBoot | services/core/java/com/android/server/am/ActivityManagerService.java | 9878bb99b77c3681f0fda116e2964bac26f349c3 | 0 |
Analyze the following code function for security vulnerabilities | @Override
public Float get(RowScale object) {
return object.mScale;
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: get
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 | get | core/java/com/android/internal/app/ChooserActivity.java | ddbf2db5b946be8fdc45c7b0327bf560b2a06988 | 0 |
Analyze the following code function for security vulnerabilities | @Deprecated
public static String verifyRealmRedirectUri(KeycloakSession session, String redirectUri) {
Set<String> validRedirects = getValidateRedirectUris(session);
return verifyRedirectUri(session, null, redirectUri, validRedirects, true);
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: verifyRealmRedirectUri
File: services/src/main/java/org/keycloak/protocol/oidc/utils/RedirectUtils.java
Repository: keycloak
The code follows secure coding practices. | [
"CWE-79"
] | CVE-2022-4361 | MEDIUM | 6.1 | keycloak | verifyRealmRedirectUri | services/src/main/java/org/keycloak/protocol/oidc/utils/RedirectUtils.java | a1cfe6e24e5b34792699a00b8b4a8016a5929e3a | 0 |
Analyze the following code function for security vulnerabilities | private String bearerMultiDescription(Set<String> raw) {
final String[] values = getResources().getStringArray(R.array.bearer_entries);
final StringBuilder retVal = new StringBuilder();
boolean first = true;
for (String bearer : raw) {
int bearerIndex = mBearerMulti.findIndexOfValue(bearer);
try {
if (first) {
retVal.append(values[bearerIndex]);
first = false;
} else {
retVal.append(", " + values[bearerIndex]);
}
} catch (ArrayIndexOutOfBoundsException e) {
// ignore
}
}
final String val = retVal.toString();
if (!TextUtils.isEmpty(val)) {
return val;
}
return null;
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: bearerMultiDescription
File: src/com/android/settings/network/apn/ApnEditor.java
Repository: android
The code follows secure coding practices. | [
"CWE-Other"
] | CVE-2023-40125 | HIGH | 7.8 | android | bearerMultiDescription | src/com/android/settings/network/apn/ApnEditor.java | 63d464c3fa5c7b9900448fef3844790756e557eb | 0 |
Analyze the following code function for security vulnerabilities | private boolean removeTaskByIdLocked(int taskId, boolean killProcess) {
TaskRecord tr = mStackSupervisor.anyTaskForIdLocked(taskId);
if (tr != null) {
tr.removeTaskActivitiesLocked();
cleanUpRemovedTaskLocked(tr, killProcess);
if (tr.isPersistable) {
notifyTaskPersisterLocked(null, true);
}
return true;
}
Slog.w(TAG, "Request to remove task ignored for non-existent task " + taskId);
return false;
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeTaskByIdLocked
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices. | [
"CWE-284"
] | CVE-2015-3833 | MEDIUM | 4.3 | android | removeTaskByIdLocked | services/core/java/com/android/server/am/ActivityManagerService.java | aaa0fee0d7a8da347a0c47cef5249c70efee209e | 0 |
Analyze the following code function for security vulnerabilities | public void updateServiceGroup(IServiceConnection connection, int group, int importance) {
synchronized (this) {
mServices.updateServiceGroupLocked(connection, group, importance);
}
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateServiceGroup
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 | updateServiceGroup | services/core/java/com/android/server/am/ActivityManagerService.java | d10b27e539f7bc91c2360d429b9d05f05274670d | 0 |
Analyze the following code function for security vulnerabilities | protected String getFilePath() {
String path = this.get.get("path");
return getFilePath(path);
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFilePath
File: src/main/java/com/jflyfox/modules/filemanager/FileManager.java
Repository: jflyfox/jfinal_cms
The code follows secure coding practices. | [
"CWE-74"
] | CVE-2021-37262 | MEDIUM | 5 | jflyfox/jfinal_cms | getFilePath | src/main/java/com/jflyfox/modules/filemanager/FileManager.java | e7fd0fe9362464c4d2bd308318eecc89a847b116 | 0 |
Analyze the following code function for security vulnerabilities | private void enforceRestrictedSystemSettingsMutationForCallingPackage(int operation,
String name, int userId) {
// System/root/shell can mutate whatever secure settings they want.
final int callingUid = Binder.getCallingUid();
final int appId = UserHandle.getAppId(callingUid);
if (appId == android.os.Process.SYSTEM_UID
|| appId == Process.SHELL_UID
|| appId == Process.ROOT_UID) {
return;
}
switch (operation) {
case MUTATION_OPERATION_INSERT:
// Insert updates.
case MUTATION_OPERATION_UPDATE: {
if (Settings.System.PUBLIC_SETTINGS.contains(name)) {
return;
}
// The calling package is already verified.
PackageInfo packageInfo = getCallingPackageInfoOrThrow(userId);
// Privileged apps can do whatever they want.
if ((packageInfo.applicationInfo.privateFlags
& ApplicationInfo.PRIVATE_FLAG_PRIVILEGED) != 0) {
return;
}
warnOrThrowForUndesiredSecureSettingsMutationForTargetSdk(
packageInfo.applicationInfo.targetSdkVersion, name);
} break;
case MUTATION_OPERATION_DELETE: {
if (Settings.System.PUBLIC_SETTINGS.contains(name)
|| Settings.System.PRIVATE_SETTINGS.contains(name)) {
throw new IllegalArgumentException("You cannot delete system defined"
+ " secure settings.");
}
// The calling package is already verified.
PackageInfo packageInfo = getCallingPackageInfoOrThrow(userId);
// Privileged apps can do whatever they want.
if ((packageInfo.applicationInfo.privateFlags &
ApplicationInfo.PRIVATE_FLAG_PRIVILEGED) != 0) {
return;
}
warnOrThrowForUndesiredSecureSettingsMutationForTargetSdk(
packageInfo.applicationInfo.targetSdkVersion, name);
} break;
}
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: enforceRestrictedSystemSettingsMutationForCallingPackage
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 | enforceRestrictedSystemSettingsMutationForCallingPackage | packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java | ff86ff28cf82124f8e65833a2dd8c319aea08945 | 0 |
Analyze the following code function for security vulnerabilities | protected abstract void writeAmqpBody(ByteArrayOutputStream out) throws IOException; | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeAmqpBody
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 | writeAmqpBody | src/main/java/com/rabbitmq/jms/client/RMQMessage.java | f647e5dbfe055a2ca8cbb16dd70f9d50d888b638 | 0 |
Analyze the following code function for security vulnerabilities | private void updateGroup(HttpServletRequest request, WebGroup newGroup) {
String[] users = request.getParameterValues("selectedUsers");
List<String> userList = users == null ? Collections.<String>emptyList() : Arrays.asList(users);
newGroup.setUsers(new ArrayList<String>(userList));
String[] selectedCategories = request.getParameterValues("selectedCategories");
List<String> categoryList = selectedCategories == null ? Collections.<String>emptyList() : Arrays.asList(selectedCategories);
newGroup.setAuthorizedCategories(new ArrayList<String>(categoryList));
Vector<Object> newSchedule = new Vector<>();
ChoiceFormat days = new ChoiceFormat("0#Mo|1#Tu|2#We|3#Th|4#Fr|5#Sa|6#Su");
Collection<String> dutySchedules = newGroup.getDutySchedules();
dutySchedules.clear();
int dutyCount = WebSecurityUtils.safeParseInt(request.getParameter("dutySchedules"));
for (int duties = 0; duties < dutyCount; duties++) {
newSchedule.clear();
String deleteFlag = request.getParameter("deleteDuty" + duties);
// don't save any duties that were marked for deletion
if (deleteFlag == null) {
for (int i = 0; i < 7; i++) {
String curDayFlag = request.getParameter("duty" + duties + days.format(i));
if (curDayFlag != null) {
newSchedule.addElement(Boolean.TRUE);
} else {
newSchedule.addElement(Boolean.FALSE);
}
}
newSchedule.addElement(request.getParameter("duty" + duties + "Begin"));
newSchedule.addElement(request.getParameter("duty" + duties + "End"));
DutySchedule newDuty = new DutySchedule(newSchedule);
dutySchedules.add(newDuty.toString());
}
}
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateGroup
File: opennms-webapp/src/main/java/org/opennms/web/controller/admin/group/GroupController.java
Repository: OpenNMS/opennms
The code follows secure coding practices. | [
"CWE-352",
"CWE-79"
] | CVE-2021-25929 | LOW | 3.5 | OpenNMS/opennms | updateGroup | opennms-webapp/src/main/java/org/opennms/web/controller/admin/group/GroupController.java | eb08b5ed4c5548f3e941a1f0d0363ae4439fa98c | 0 |
Analyze the following code function for security vulnerabilities | private void collectVaadinServlets(Set<VaadinServlet> servlets,
ServiceReference<?> reference) {
Bundle[] bundles = reference.getUsingBundles();
if (bundles == null) {
return;
}
Stream.of(bundles)
.map(bundle -> bundle.getBundleContext().getService(reference))
.filter(VaadinServlet.class::isInstance)
.map(VaadinServlet.class::cast).forEach(servlets::add);
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: collectVaadinServlets
File: flow-osgi/src/main/java/com/vaadin/flow/osgi/support/AppConfigFactoryTracker.java
Repository: vaadin/osgi
The code follows secure coding practices. | [
"CWE-668"
] | CVE-2021-31407 | MEDIUM | 5 | vaadin/osgi | collectVaadinServlets | flow-osgi/src/main/java/com/vaadin/flow/osgi/support/AppConfigFactoryTracker.java | 3e17674c2e3f88b6e682872c42b7d0ad7d9c4ad8 | 0 |
Analyze the following code function for security vulnerabilities | @Override
public void onChange(boolean selfChange, Uri uri, @UserIdInt int userId) {
if (mUri.equals(uri)) {
onChange();
}
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onChange
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 | onChange | services/core/java/com/android/server/am/ActivityManagerService.java | 962fb40991f15be4f688d960aa00073683ebdd20 | 0 |
Analyze the following code function for security vulnerabilities | public void setSource(@Nullable String source) {
this.source = source;
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSource
File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/OpsGenieNotifier.java
Repository: codecentric/spring-boot-admin
The code follows secure coding practices. | [
"CWE-94"
] | CVE-2022-46166 | CRITICAL | 9.8 | codecentric/spring-boot-admin | setSource | spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/OpsGenieNotifier.java | c14c3ec12533f71f84de9ce3ce5ceb7991975f75 | 0 |
Analyze the following code function for security vulnerabilities | private boolean updateUserPictureAndName(Profile showUser, String picture, String name) {
boolean updateProfile = false;
boolean updateUser = false;
User u = showUser.getUser();
if (CONF.avatarEditsEnabled() && !StringUtils.isBlank(picture)) {
updateProfile = avatarRepository.store(showUser, picture);
}
if (CONF.nameEditsEnabled() && !StringUtils.isBlank(name)) {
showUser.setName(name);
if (StringUtils.isBlank(showUser.getOriginalName())) {
showUser.setOriginalName(name);
}
if (!u.getName().equals(name)) {
u.setName(name);
updateUser = true;
}
updateProfile = true;
}
if (updateUser) {
utils.getParaClient().update(u);
}
return updateProfile;
} | Vulnerability Classification:
- CWE: CWE-130
- CVE: CVE-2022-1543
- Severity: MEDIUM
- CVSS Score: 6.5
Description: fixed profile name not limited in length
Function: updateUserPictureAndName
File: src/main/java/com/erudika/scoold/controllers/ProfileController.java
Repository: Erudika/scoold
Fixed Code:
private boolean updateUserPictureAndName(Profile showUser, String picture, String name) {
boolean updateProfile = false;
boolean updateUser = false;
User u = showUser.getUser();
if (CONF.avatarEditsEnabled() && !StringUtils.isBlank(picture)) {
updateProfile = avatarRepository.store(showUser, picture);
}
if (CONF.nameEditsEnabled() && !StringUtils.isBlank(name)) {
showUser.setName(StringUtils.abbreviate(name, 256));
if (StringUtils.isBlank(showUser.getOriginalName())) {
showUser.setOriginalName(name);
}
if (!u.getName().equals(name)) {
u.setName(name);
updateUser = true;
}
updateProfile = true;
}
if (updateUser) {
utils.getParaClient().update(u);
}
return updateProfile;
} | [
"CWE-130"
] | CVE-2022-1543 | MEDIUM | 6.5 | Erudika/scoold | updateUserPictureAndName | src/main/java/com/erudika/scoold/controllers/ProfileController.java | 62a0e92e1486ddc17676a7ead2c07ff653d167ce | 1 |
Analyze the following code function for security vulnerabilities | public String getParamMessage() {
return m_paramMessage;
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getParamMessage
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 | getParamMessage | src/org/opencms/workplace/CmsDialog.java | 72a05e3ea1cf692e2efce002687272e63f98c14a | 0 |
Analyze the following code function for security vulnerabilities | public void setUserIsMonkey(boolean monkey) throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeInt(monkey ? 1 : 0);
mRemote.transact(SET_USER_IS_MONKEY_TRANSACTION, data, reply, 0);
reply.readException();
data.recycle();
reply.recycle();
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUserIsMonkey
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices. | [
"CWE-264"
] | CVE-2016-3832 | HIGH | 8.3 | android | setUserIsMonkey | core/java/android/app/ActivityManagerNative.java | e7cf91a198de995c7440b3b64352effd2e309906 | 0 |
Analyze the following code function for security vulnerabilities | @Override
public T addTimeMillis(K name, long value) {
return add(name, fromTimeMillis(name, value));
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addTimeMillis
File: codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
Repository: netty
The code follows secure coding practices. | [
"CWE-436",
"CWE-113"
] | CVE-2022-41915 | MEDIUM | 6.5 | netty | addTimeMillis | codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java | fe18adff1c2b333acb135ab779a3b9ba3295a1c4 | 0 |
Analyze the following code function for security vulnerabilities | @Override
public <K, V> RemoteCache<K, V> getCache(boolean forceReturnValue) {
//As per the HotRod protocol specification, the default cache is identified by an empty string
return createRemoteCache("", forceReturnValue);
} | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCache
File: client/hotrod-client/src/main/java/org/infinispan/client/hotrod/RemoteCacheManager.java
Repository: infinispan
The code follows secure coding practices. | [
"CWE-502"
] | CVE-2017-15089 | MEDIUM | 6.5 | infinispan | getCache | client/hotrod-client/src/main/java/org/infinispan/client/hotrod/RemoteCacheManager.java | efc44b7b0a5dd4f44773808840dd9785cabcf21c | 0 |
Analyze the following code function for security vulnerabilities | Object parseMessage(
CodedInputStream input,
ExtensionRegistryLite registry,
Descriptors.FieldDescriptor descriptor,
Message defaultInstance)
throws IOException; | No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseMessage
File: java/core/src/main/java/com/google/protobuf/MessageReflection.java
Repository: protocolbuffers/protobuf
The code follows secure coding practices. | [
"CWE-Other"
] | CVE-2022-3509 | HIGH | 7.5 | protocolbuffers/protobuf | parseMessage | java/core/src/main/java/com/google/protobuf/MessageReflection.java | a3888f53317a8018e7a439bac4abeb8f3425d5e9 | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.