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
public static PatientIdentifierType getPatientIdentifierType(String id) { PatientIdentifierType identifierType = null; if (id != null) { id = id.trim(); // see if this is parseable int; if so, try looking up by id try { //handle integer: id int identifierTypeId = Integer.parseInt(id); identifierType = Context.getPatientService().getPatientIdentifierType(identifierTypeId); if (identifierType != null) { return identifierType; } } catch (Exception ex) { //do nothing } //get PatientIdentifierType by mapping identifierType = getMetadataByMapping(PatientIdentifierType.class, id); if(identifierType != null){ return identifierType; } //handle uuid id: "a3e1302b-74bf-11df-9768-17cfc9833272", if id matches uuid format if (isValidUuidFormat(id)) { identifierType = Context.getPatientService().getPatientIdentifierTypeByUuid(id); if (identifierType != null) { return identifierType; } } // handle name else { // if it's neither a uuid or id, try identifier type name identifierType = Context.getPatientService().getPatientIdentifierTypeByName(id); } } return identifierType; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPatientIdentifierType File: api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java Repository: openmrs/openmrs-module-htmlformentry The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-16521
HIGH
7.5
openmrs/openmrs-module-htmlformentry
getPatientIdentifierType
api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java
9dcd304688e65c31cac5532fe501b9816ed975ae
0
Analyze the following code function for security vulnerabilities
void setOrientationChanging(boolean changing) { mOrientationChangeTimedOut = false; if (mOrientationChanging == changing) { return; } mOrientationChanging = changing; if (changing) { mLastFreezeDuration = 0; if (mWmService.mRoot.mOrientationChangeComplete && mDisplayContent.shouldSyncRotationChange(this)) { mWmService.mRoot.mOrientationChangeComplete = false; } } else { // The orientation change is completed. If it was hidden by the animation, reshow it. mDisplayContent.finishAsyncRotation(mToken); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setOrientationChanging File: services/core/java/com/android/server/wm/WindowState.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-35674
HIGH
7.8
android
setOrientationChanging
services/core/java/com/android/server/wm/WindowState.java
7428962d3b064ce1122809d87af65099d1129c9e
0
Analyze the following code function for security vulnerabilities
protected byte[] getLastReadRawDataCache() { return cipherInputStream.getLastReadRawDataCache(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLastReadRawDataCache File: src/main/java/net/lingala/zip4j/io/inputstream/DecompressedInputStream.java Repository: srikanth-lingala/zip4j The code follows secure coding practices.
[ "CWE-346" ]
CVE-2023-22899
MEDIUM
5.9
srikanth-lingala/zip4j
getLastReadRawDataCache
src/main/java/net/lingala/zip4j/io/inputstream/DecompressedInputStream.java
ddd8fdc8ad0583eb4a6172dc86c72c881485c55b
0
Analyze the following code function for security vulnerabilities
public BlockCipher get() { return new AESFastEngine(); }
Vulnerability Classification: - CWE: CWE-310 - CVE: CVE-2016-1000339 - Severity: MEDIUM - CVSS Score: 5.0 Description: added better support for DH domain parameters added s box allocation to AESEngine reduced use of AESFastEngine. Function: get File: prov/src/main/java/org/bouncycastle/jcajce/provider/symmetric/AES.java Repository: bcgit/bc-java Fixed Code: public BlockCipher get() { return new AESEngine(); }
[ "CWE-310" ]
CVE-2016-1000339
MEDIUM
5
bcgit/bc-java
get
prov/src/main/java/org/bouncycastle/jcajce/provider/symmetric/AES.java
413b42f4d770456508585c830cfcde95f9b0e93b
1
Analyze the following code function for security vulnerabilities
protected Client buildHttpClient() { // use the default client config if not yet initialized if (clientConfig == null) { clientConfig = getDefaultClientConfig(); } ClientBuilder clientBuilder = ClientBuilder.newBuilder(); customizeClientBuilder(clientBuilder); clientBuilder = clientBuilder.withConfig(clientConfig); return clientBuilder.build(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: buildHttpClient File: samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java Repository: OpenAPITools/openapi-generator The code follows secure coding practices.
[ "CWE-668" ]
CVE-2021-21430
LOW
2.1
OpenAPITools/openapi-generator
buildHttpClient
samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
public @Nullable WifiConfiguration getConfiguredNetwork(int networkId) { WifiConfiguration config = getInternalConfiguredNetwork(networkId); if (config == null) { return null; } // Create a new configuration object with the passwords masked to send out to the external // world. return createExternalWifiConfiguration(config, true, Process.WIFI_UID); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getConfiguredNetwork File: service/java/com/android/server/wifi/WifiConfigManager.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21242
CRITICAL
9.8
android
getConfiguredNetwork
service/java/com/android/server/wifi/WifiConfigManager.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
@Override public StaticHandler setDirectoryTemplate(String directoryTemplate) { this.directoryTemplateResource = directoryTemplate; this.directoryTemplate = null; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setDirectoryTemplate File: vertx-web/src/main/java/io/vertx/ext/web/handler/impl/StaticHandlerImpl.java Repository: vert-x3/vertx-web The code follows secure coding practices.
[ "CWE-22" ]
CVE-2018-12542
HIGH
7.5
vert-x3/vertx-web
setDirectoryTemplate
vertx-web/src/main/java/io/vertx/ext/web/handler/impl/StaticHandlerImpl.java
57a65dce6f4c5aa5e3ce7288685e7f3447eb8f3b
0
Analyze the following code function for security vulnerabilities
public boolean isConfigurable() { return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isConfigurable 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
isConfigurable
core/src/main/java/hudson/model/AbstractProject.java
36342d71e29e0620f803a7470ce96c61761648d8
0
Analyze the following code function for security vulnerabilities
public String buildLockDialog( CmsLockFilter nonBlockingFilter, CmsLockFilter blockingFilter, int hiddenTimeout, boolean includeRelated) throws CmsException { setParamAction(CmsDialog.DIALOG_LOCKS_CONFIRMED); CmsLock lockwp = new CmsLock(getJsp()); lockwp.setBlockingFilter(blockingFilter); lockwp.setNonBlockingFilter(nonBlockingFilter); StringBuffer html = new StringBuffer(512); html.append(htmlStart("help.explorer.contextmenu.lock")); html.append(lockwp.buildIncludeJs()); html.append(buildLockConfirmationMessageJS()); html.append(bodyStart("dialog")); html.append("<div id='lock-body-id' class='hide'>\n"); html.append(dialogStart()); html.append(dialogContentStart(getParamTitle())); html.append(buildLockHeaderBox()); html.append(dialogSpacer()); html.append("<form name='main' action='"); html.append(getDialogUri()); html.append("' method='post' class='nomargin' onsubmit=\"return submitAction('"); html.append(CmsDialog.DIALOG_OK); html.append("', null, 'main');\">\n"); html.append(paramsAsHidden()); html.append("<input type='hidden' name='"); html.append(CmsDialog.PARAM_FRAMENAME); html.append("' value=''>\n"); html.append(buildAjaxResultContainer(key(org.opencms.workplace.commons.Messages.GUI_LOCK_RESOURCES_TITLE_0))); html.append("<div id='conf-msg'></div>\n"); html.append(buildLockAdditionalOptions()); html.append(dialogContentEnd()); html.append(dialogLockButtons()); html.append("</form>\n"); html.append(dialogEnd()); html.append("</div>\n"); html.append(bodyEnd()); html.append(lockwp.buildLockRequest(hiddenTimeout, includeRelated)); html.append(htmlEnd()); return html.toString(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: buildLockDialog 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
buildLockDialog
src/org/opencms/workplace/CmsDialog.java
72a05e3ea1cf692e2efce002687272e63f98c14a
0
Analyze the following code function for security vulnerabilities
void updateActivityUsageStats(ActivityRecord activity, int event) { ComponentName taskRoot = null; final Task task = activity.getTask(); if (task != null) { final ActivityRecord rootActivity = task.getRootActivity(); if (rootActivity != null) { taskRoot = rootActivity.mActivityComponent; } } final Message m = PooledLambda.obtainMessage( ActivityManagerInternal::updateActivityUsageStats, mAmInternal, activity.mActivityComponent, activity.mUserId, event, activity.token, taskRoot); mH.sendMessage(m); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateActivityUsageStats File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40094
HIGH
7.8
android
updateActivityUsageStats
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
1120bc7e511710b1b774adf29ba47106292365e7
0
Analyze the following code function for security vulnerabilities
@Override public IQRequestHandler registerIQRequestHandler(final IQRequestHandler iqRequestHandler) { final String key = XmppStringUtils.generateKey(iqRequestHandler.getElement(), iqRequestHandler.getNamespace()); switch (iqRequestHandler.getType()) { case set: synchronized (setIqRequestHandler) { return setIqRequestHandler.put(key, iqRequestHandler); } case get: synchronized (getIqRequestHandler) { return getIqRequestHandler.put(key, iqRequestHandler); } default: throw new IllegalArgumentException("Only IQ type of 'get' and 'set' allowed"); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: registerIQRequestHandler 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
registerIQRequestHandler
smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
0
Analyze the following code function for security vulnerabilities
private static CharSequence truncateIfLonger(CharSequence input, int maxLength) { return input == null || input.length() <= maxLength ? input : input.subSequence(0, maxLength); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: truncateIfLonger 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
truncateIfLonger
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
public void autodetectAnnotations(boolean mode) { if (annotationConfiguration != null) { annotationConfiguration.autodetectAnnotations(mode); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: autodetectAnnotations File: xstream/src/java/com/thoughtworks/xstream/XStream.java Repository: x-stream/xstream The code follows secure coding practices.
[ "CWE-400" ]
CVE-2021-43859
MEDIUM
5
x-stream/xstream
autodetectAnnotations
xstream/src/java/com/thoughtworks/xstream/XStream.java
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
0
Analyze the following code function for security vulnerabilities
public static String getStack(final StackTraceElement[] stackTrace, final boolean printLine) { if ((stackTrace == null) || (stackTrace.length < 4)) { return ""; } StringBuilder t = new StringBuilder(); for (int i = 3; i < stackTrace.length; i++) { if (!stackTrace[i].getClassName().contains("com.liulishuo.filedownloader")) { continue; } t.append("["); t.append(stackTrace[i].getClassName() .substring("com.liulishuo.filedownloader".length())); t.append(":"); t.append(stackTrace[i].getMethodName()); if (printLine) { t.append("(").append(stackTrace[i].getLineNumber()).append(")]"); } else { t.append("]"); } } return t.toString(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getStack File: library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java Repository: lingochamp/FileDownloader The code follows secure coding practices.
[ "CWE-22" ]
CVE-2018-11248
HIGH
7.5
lingochamp/FileDownloader
getStack
library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java
b023cc081bbecdd2a9f3549a3ae5c12a9647ed7f
0
Analyze the following code function for security vulnerabilities
private static void writeSection(PrintWriter printWriter, String key, Section section) { if (section.getSubSection() == null) { printWriter.printf("[%s]\n", section.getName()); } else { printWriter.printf("[%s \"%s\"]\n", section.getName(), section.getSubSection()); } for (Entry entry : section.getEntries().values()) { writeEntry(printWriter, entry.getKey(), entry.getValue()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: writeSection File: src/main/java/com/gitblit/StoredUserConfig.java Repository: gitblit-org/gitblit The code follows secure coding practices.
[ "CWE-269" ]
CVE-2022-31267
HIGH
7.5
gitblit-org/gitblit
writeSection
src/main/java/com/gitblit/StoredUserConfig.java
9b4afad6f4be212474809533ec2c280cce86501a
0
Analyze the following code function for security vulnerabilities
@Deprecated public String getPrefixedFullName() { return getDefaultEntityReferenceSerializer().serialize(getDocumentReference()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPrefixedFullName 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
getPrefixedFullName
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
private void info(String msg) { logger.info(prefix + msg); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: info File: src/main/java/org/mozilla/jss/ssl/javax/JSSEngineReferenceImpl.java Repository: dogtagpki/jss The code follows secure coding practices.
[ "CWE-401" ]
CVE-2021-4213
HIGH
7.5
dogtagpki/jss
info
src/main/java/org/mozilla/jss/ssl/javax/JSSEngineReferenceImpl.java
5922560a78d0dee61af8a33cc9cfbf4cfa291448
0
Analyze the following code function for security vulnerabilities
@Override public StatusBarNotification get() { StatusBarNotification value = mValue; mValue = null; return value; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: get 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
get
services/core/java/com/android/server/notification/NotificationManagerService.java
61e9103b5725965568e46657f4781dd8f2e5b623
0
Analyze the following code function for security vulnerabilities
public static <P> PrimitiveSet<P> newPrimitiveSet(Class<P> primitiveClass) { return new PrimitiveSet<P>(primitiveClass); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: newPrimitiveSet File: java_src/src/main/java/com/google/crypto/tink/PrimitiveSet.java Repository: tink-crypto/tink The code follows secure coding practices.
[ "CWE-176" ]
CVE-2020-8929
MEDIUM
5
tink-crypto/tink
newPrimitiveSet
java_src/src/main/java/com/google/crypto/tink/PrimitiveSet.java
93d839a5865b9d950dffdc9d0bc99b71280a8899
0
Analyze the following code function for security vulnerabilities
public void attachFile(EntityReference reference, Object is, boolean failIfExists) throws Exception { // make sure the page exist if (!exists(reference.getParent())) { savePage(reference.getParent()); } if (failIfExists) { assertStatusCodes(executePut(AttachmentResource.class, is, toElements(reference)), true, STATUS_CREATED); } else { assertStatusCodes(executePut(AttachmentResource.class, is, toElements(reference)), true, STATUS_CREATED_ACCEPTED); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: attachFile File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2023-35166
HIGH
8.8
xwiki/xwiki-platform
attachFile
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
0
Analyze the following code function for security vulnerabilities
public int getContentLength(Object connection) { return ((HttpURLConnection) connection).getContentLength(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getContentLength File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java Repository: codenameone/CodenameOne The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-4903
MEDIUM
5.1
codenameone/CodenameOne
getContentLength
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
public void register(IPackageMoveObserver callback) { mCallbacks.register(callback); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: register 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
register
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
public void validate(long trustAnchorId) { Optional<TrustAnchor> maybeTrustAnchor = storage.readTx(tx -> trustAnchors.get(tx, Key.of(trustAnchorId))); if (maybeTrustAnchor.isPresent()) { final TrustAnchor trustAnchor = maybeTrustAnchor.get(); Bench.mark0("validateTa " + trustAnchor.getName(), () -> validateTa(trustAnchor)); } else { log.error("Couldn't find trust anchor {}", trustAnchorId); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: validate File: rpki-validator/src/main/java/net/ripe/rpki/validator3/domain/validation/CertificateTreeValidationService.java Repository: RIPE-NCC/rpki-validator-3 The code follows secure coding practices.
[ "CWE-295" ]
CVE-2020-16162
MEDIUM
5
RIPE-NCC/rpki-validator-3
validate
rpki-validator/src/main/java/net/ripe/rpki/validator3/domain/validation/CertificateTreeValidationService.java
3cbf34fed7c0ca00574644a5b5b06f1b54a3f5dc
0
Analyze the following code function for security vulnerabilities
@Override public boolean injectCustomMappings(XWikiDocument doc, XWikiContext inputxcontext) throws XWikiException { XWikiContext context = getExecutionXContext(inputxcontext, true); try { // If we haven't turned of dynamic custom mappings we should not inject them if (context.getWiki().hasDynamicCustomMappings() == false) { return false; } boolean result = false; for (List<BaseObject> objectsOfType : doc.getXObjects().values()) { for (BaseObject object : objectsOfType) { if (object != null) { result |= injectCustomMapping(object.getXClass(context), context); // Each class must be mapped only once break; } } } return result; } finally { restoreExecutionXContext(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: injectCustomMappings File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-459" ]
CVE-2023-36468
HIGH
8.8
xwiki/xwiki-platform
injectCustomMappings
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
0
Analyze the following code function for security vulnerabilities
private static RMQObjectMessage instantiateRmqObjectMessageWithTrustedPackages(List<String> trustedPackages) throws RMQJMSException { try { // instantiate the message object with the thread context classloader Class<?> messageClass = Class.forName(RMQObjectMessage.class.getName(), true, Thread.currentThread().getContextClassLoader()); Constructor<?> constructor = messageClass.getConstructor(List.class); return (RMQObjectMessage) constructor.newInstance(trustedPackages); } catch (NoSuchMethodException e) { throw new RMQJMSException(e); } catch (InvocationTargetException e) { throw new RMQJMSException(e); } catch (IllegalAccessException e) { throw new RMQJMSException(e); } catch (InstantiationException e) { throw new RMQJMSException(e); } catch (ClassNotFoundException e) { throw new RMQJMSException(e); } }
Vulnerability Classification: - CWE: CWE-502 - CVE: CVE-2020-36282 - Severity: HIGH - CVSS Score: 7.5 Description: Use trusted packages in StreamMessage StreamMessage now uses the same "white list" mechanism as ObjectMessage to avoid some arbitrary code execution on deserialization. Even though StreamMessage is supposed to handle only primitive types, it is still to possible to send a message that contains an arbitrary serializable instance. The consuming application application may then execute code from this class on deserialization. The fix consists in using the list of trusted packages that can be set at the connection factory level. Fixes #135 Function: instantiateRmqObjectMessageWithTrustedPackages File: src/main/java/com/rabbitmq/jms/client/RMQMessage.java Repository: rabbitmq/rabbitmq-jms-client Fixed Code: private static RMQObjectMessage instantiateRmqObjectMessageWithTrustedPackages(List<String> trustedPackages) throws RMQJMSException { return (RMQObjectMessage) instantiateRmqMessageWithTrustedPackages(RMQObjectMessage.class.getName(), trustedPackages); }
[ "CWE-502" ]
CVE-2020-36282
HIGH
7.5
rabbitmq/rabbitmq-jms-client
instantiateRmqObjectMessageWithTrustedPackages
src/main/java/com/rabbitmq/jms/client/RMQMessage.java
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
1
Analyze the following code function for security vulnerabilities
public File workingdir(File baseFolder) { if (getFolder() == null) { return baseFolder; } return new File(baseFolder, getFolder()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: workingdir 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
workingdir
config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
0
Analyze the following code function for security vulnerabilities
private static ActivityOptions makeThumbnailAnimation(View source, Bitmap thumbnail, int startX, int startY, OnAnimationStartedListener listener, boolean scaleUp) { ActivityOptions opts = new ActivityOptions(); opts.mPackageName = source.getContext().getPackageName(); opts.mAnimationType = scaleUp ? ANIM_THUMBNAIL_SCALE_UP : ANIM_THUMBNAIL_SCALE_DOWN; opts.mThumbnail = thumbnail; int[] pts = new int[2]; source.getLocationOnScreen(pts); opts.mStartX = pts[0] + startX; opts.mStartY = pts[1] + startY; opts.setOnAnimationStartedListener(source.getHandler(), listener); return opts; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: makeThumbnailAnimation File: core/java/android/app/ActivityOptions.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-20918
CRITICAL
9.8
android
makeThumbnailAnimation
core/java/android/app/ActivityOptions.java
51051de4eb40bb502db448084a83fd6cbfb7d3cf
0
Analyze the following code function for security vulnerabilities
private void notifyContentChanged(final Uri uri, int uriMatch) { Long downloadId = null; if (uriMatch == MY_DOWNLOADS_ID || uriMatch == ALL_DOWNLOADS_ID) { downloadId = Long.parseLong(getDownloadIdFromUri(uri)); } for (Uri uriToNotify : BASE_URIS) { if (downloadId != null) { uriToNotify = ContentUris.withAppendedId(uriToNotify, downloadId); } getContext().getContentResolver().notifyChange(uriToNotify, null); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: notifyContentChanged File: src/com/android/providers/downloads/DownloadProvider.java Repository: android The code follows secure coding practices.
[ "CWE-362" ]
CVE-2016-0848
HIGH
7.2
android
notifyContentChanged
src/com/android/providers/downloads/DownloadProvider.java
bdc831357e7a116bc561d51bf2ddc85ff11c01a9
0
Analyze the following code function for security vulnerabilities
@Override boolean check(CountDownLatchConfig c1, CountDownLatchConfig c2) { return c1 == c2 || !(c1 == null || c2 == null) && nullSafeEqual(c1.getName(), c2.getName()) && nullSafeEqual(c1.getQuorumName(), c2.getQuorumName()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: check File: hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java Repository: hazelcast The code follows secure coding practices.
[ "CWE-502" ]
CVE-2016-10750
MEDIUM
6.8
hazelcast
check
hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
0
Analyze the following code function for security vulnerabilities
boolean isSingleton(String componentProcessName, ApplicationInfo aInfo, String className, int flags) { boolean result = false; // For apps that don't have pre-defined UIDs, check for permission if (UserHandle.getAppId(aInfo.uid) >= Process.FIRST_APPLICATION_UID) { if ((flags & ServiceInfo.FLAG_SINGLE_USER) != 0) { if (ActivityManager.checkUidPermission( INTERACT_ACROSS_USERS, aInfo.uid) != PackageManager.PERMISSION_GRANTED) { ComponentName comp = new ComponentName(aInfo.packageName, className); String msg = "Permission Denial: Component " + comp.flattenToShortString() + " requests FLAG_SINGLE_USER, but app does not hold " + INTERACT_ACROSS_USERS; Slog.w(TAG, msg); throw new SecurityException(msg); } // Permission passed result = true; } } else if ("system".equals(componentProcessName)) { result = true; } else if ((flags & ServiceInfo.FLAG_SINGLE_USER) != 0) { // Phone app and persistent apps are allowed to export singleuser providers. result = UserHandle.isSameApp(aInfo.uid, Process.PHONE_UID) || (aInfo.flags & ApplicationInfo.FLAG_PERSISTENT) != 0; } if (DEBUG_MU) Slog.v(TAG_MU, "isSingleton(" + componentProcessName + ", " + aInfo + ", " + className + ", 0x" + Integer.toHexString(flags) + ") = " + result); return result; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isSingleton 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
isSingleton
services/core/java/com/android/server/am/ActivityManagerService.java
9878bb99b77c3681f0fda116e2964bac26f349c3
0
Analyze the following code function for security vulnerabilities
@AfterPermissionDenied(100) private void onPermissionsDenied() { if (!isVoiceOnlyCall) { if (cameraEnumerator.getDeviceNames().length == 0) { binding.cameraButton.setVisibility(View.GONE); } else if (cameraEnumerator.getDeviceNames().length == 1) { binding.switchSelfVideoButton.setVisibility(View.GONE); } } if ((EffortlessPermissions.hasPermissions(this, PERMISSIONS_CAMERA) || EffortlessPermissions.hasPermissions(this, PERMISSIONS_MICROPHONE))) { checkIfSomeAreApproved(); } else if (!isConnectionEstablished()) { fetchSignalingSettings(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onPermissionsDenied File: app/src/main/java/com/nextcloud/talk/activities/CallActivity.java Repository: nextcloud/talk-android The code follows secure coding practices.
[ "CWE-732", "CWE-200" ]
CVE-2022-41926
MEDIUM
5.5
nextcloud/talk-android
onPermissionsDenied
app/src/main/java/com/nextcloud/talk/activities/CallActivity.java
bb7e82fbcbd8c10d0d0128d736c41cec0f79e7d0
0
Analyze the following code function for security vulnerabilities
public boolean canZoomOutOnUiThread(final AwContents awContents) throws Exception { return runTestOnUiThreadAndGetResult(new Callable<Boolean>() { @Override public Boolean call() throws Exception { return awContents.canZoomOut(); } }); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: canZoomOutOnUiThread File: android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java Repository: chromium The code follows secure coding practices.
[ "CWE-254" ]
CVE-2016-5155
MEDIUM
4.3
chromium
canZoomOutOnUiThread
android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java
b8dcfeb065bbfd777cdc5f5433da9a87f25e6ec6
0
Analyze the following code function for security vulnerabilities
@Override public Route.Collection use(final Class<?> routeClass) { return use("", routeClass); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: use 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
use
jooby/src/main/java/org/jooby/Jooby.java
34f526028e6cd0652125baa33936ffb6a8a4a009
0
Analyze the following code function for security vulnerabilities
public boolean removePasspointConfiguredNetwork(@NonNull String configKey) { WifiConfiguration config = getInternalConfiguredNetwork(configKey); if (config != null && config.isPasspoint()) { Log.d(TAG, "Removing passpoint network config " + config.getProfileKey()); return removeNetwork(config.networkId, config.creatorUid, config.creatorName); } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removePasspointConfiguredNetwork File: service/java/com/android/server/wifi/WifiConfigManager.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21242
CRITICAL
9.8
android
removePasspointConfiguredNetwork
service/java/com/android/server/wifi/WifiConfigManager.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
private void finalizeBackup(OutputStream out) { try { // A standard 'tar' EOF sequence: two 512-byte blocks of all zeroes. byte[] eof = new byte[512 * 2]; // newly allocated == zero filled out.write(eof); } catch (IOException e) { Slog.w(TAG, "Error attempting to finalize backup stream"); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: finalizeBackup File: services/backup/java/com/android/server/backup/BackupManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-3759
MEDIUM
5
android
finalizeBackup
services/backup/java/com/android/server/backup/BackupManagerService.java
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
0
Analyze the following code function for security vulnerabilities
public int getSpanFlags(Object tag) { return mSpanned.getSpanFlags(tag); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSpanFlags File: core/java/android/text/Layout.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2018-9452
MEDIUM
4.3
android
getSpanFlags
core/java/android/text/Layout.java
3b6f84b77c30ec0bab5147b0cffc192c86ba2634
0
Analyze the following code function for security vulnerabilities
@Override public void onCellularConnectivityChanged(@WifiDataStall.CellularDataStatusCode int status) { mWifiConfigManager.onCellularConnectivityChanged(status); // do a scan if no cell data and currently not connect to wifi if (status == WifiDataStall.CELLULAR_DATA_NOT_AVAILABLE && getConnectedWifiConfigurationInternal() == null) { if (mContext.getResources().getBoolean( R.bool.config_wifiScanOnCellularDataLossEnabled)) { mWifiConnectivityManager.forceConnectivityScan(WIFI_WORK_SOURCE); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onCellularConnectivityChanged 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
onCellularConnectivityChanged
service/java/com/android/server/wifi/ClientModeImpl.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
@VisibleForTesting protected void removeAccountInternal(Account account) { removeAccountInternal(getUserAccountsForCaller(), account, getCallingUid()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeAccountInternal 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
removeAccountInternal
services/core/java/com/android/server/accounts/AccountManagerService.java
f810d81839af38ee121c446105ca67cb12992fc6
0
Analyze the following code function for security vulnerabilities
@Override public void initialize() throws InitializationException { ListenerChain chain = new ListenerChain(); setListenerChain(chain); // Construct the listener chain in the right order. Listeners early in the chain are called before listeners // placed later in the chain. chain.addListener(this); chain.addListener(new BlockStateChainingListener(chain)); chain.addListener(new EmptyBlockChainingListener(chain)); chain.addListener(new MetaDataStateChainingListener(chain)); chain.addListener(new AnnotatedXHTMLChainingRenderer(this.linkRenderer, this.imageRenderer, chain)); }
Vulnerability Classification: - CWE: CWE-79 - CVE: CVE-2023-32070 - Severity: MEDIUM - CVSS Score: 6.1 Description: XRENDERING-663: Restrict allowed attributes in HTML rendering * Change HTML renderers to only print allowed attributes and elements. * Add prefix to forbidden attributes to preserve them in XWiki syntax. * Adapt tests to expect that invalid attributes get a prefix. Function: initialize File: xwiki-rendering-syntaxes/xwiki-rendering-syntax-annotatedxhtml/src/main/java/org/xwiki/rendering/internal/renderer/xhtml/AnnotatedXHTMLRenderer.java Repository: xwiki/xwiki-rendering Fixed Code: @Override public void initialize() throws InitializationException { ListenerChain chain = new ListenerChain(); setListenerChain(chain); // Construct the listener chain in the right order. Listeners early in the chain are called before listeners // placed later in the chain. chain.addListener(this); chain.addListener(new BlockStateChainingListener(chain)); chain.addListener(new EmptyBlockChainingListener(chain)); chain.addListener(new MetaDataStateChainingListener(chain)); chain.addListener(new AnnotatedXHTMLChainingRenderer(this.linkRenderer, this.imageRenderer, this.htmlElementSanitizer, chain)); }
[ "CWE-79" ]
CVE-2023-32070
MEDIUM
6.1
xwiki/xwiki-rendering
initialize
xwiki-rendering-syntaxes/xwiki-rendering-syntax-annotatedxhtml/src/main/java/org/xwiki/rendering/internal/renderer/xhtml/AnnotatedXHTMLRenderer.java
c40e2f5f9482ec6c3e71dbf1fff5ba8a5e44cdc1
1
Analyze the following code function for security vulnerabilities
public static void setNotificationChannel(NotificationManager nm, NotificationCompat.Builder mNotifyBuilder, Context context, String soundName) { if (android.os.Build.VERSION.SDK_INT >= 26) { try { NotificationManager mNotificationManager = nm; String id = getServiceProperty("android.NotificationChannel.id", "cn1-channel", context); CharSequence name = getServiceProperty("android.NotificationChannel.name", "Notifications", context); String description = getServiceProperty("android.NotificationChannel.description", "Remote notifications", context); // NotificationManager.IMPORTANCE_LOW = 2 // NotificationManager.IMPORTANCE_HIGH = 4 // <-- Minimum level to produce sound. int importance = Integer.parseInt(getServiceProperty("android.NotificationChannel.importance", "4", context)); // Note: Currently we use a single notification channel for the app, but if the app uses different kinds of // push notifications, then this may not be sufficient. E.g. The app may send both silent push notifications // and regular notifications - but their settings (e.g. sound) are all managed through one channel with // same settings. // TODO Add support for multiple channels. // See https://github.com/codenameone/CodenameOne/issues/2583 Class clsNotificationChannel = Class.forName("android.app.NotificationChannel"); //android.app.NotificationChannel mChannel = new android.app.NotificationChannel(id, name, importance); Constructor constructor = clsNotificationChannel.getConstructor(java.lang.String.class, java.lang.CharSequence.class, int.class); Object mChannel = constructor.newInstance(new Object[]{id, name, importance}); Method method = clsNotificationChannel.getMethod("setDescription", java.lang.String.class); method.invoke(mChannel, new Object[]{description}); //mChannel.setDescription(description); method = clsNotificationChannel.getMethod("enableLights", boolean.class); method.invoke(mChannel, new Object[]{Boolean.parseBoolean(getServiceProperty("android.NotificationChannel.enableLights", "true", context))}); //mChannel.enableLights(Boolean.parseBoolean(getServiceProperty("android.NotificationChannel.enableLights", "true", context))); method = clsNotificationChannel.getMethod("setLightColor", int.class); method.invoke(mChannel, new Object[]{Integer.parseInt(getServiceProperty("android.NotificationChannel.lightColor", "" + android.graphics.Color.RED, context))}); //mChannel.setLightColor(Integer.parseInt(getServiceProperty("android.NotificationChannel.lightColor", "" + android.graphics.Color.RED, context))); method = clsNotificationChannel.getMethod("enableVibration", boolean.class); method.invoke(mChannel, new Object[]{Boolean.parseBoolean(getServiceProperty("android.NotificationChannel.enableVibration", "false", context))}); //mChannel.enableVibration(Boolean.parseBoolean(getServiceProperty("android.NotificationChannel.enableVibration", "false", context))); String vibrationPatternStr = getServiceProperty("android.NotificationChannel.vibrationPattern", null, context); if (vibrationPatternStr != null) { String[] parts = vibrationPatternStr.split(","); int len = parts.length; long[] pattern = new long[len]; for (int i = 0; i < len; i++) { pattern[i] = Long.parseLong(parts[i].trim()); } method = clsNotificationChannel.getMethod("setVibrationPattern", long[].class); method.invoke(mChannel, new Object[]{pattern}); //mChannel.setVibrationPattern(pattern); } String soundUri = getServiceProperty("android.NotificationChannel.soundUri", null, context); if (soundUri != null) { Uri uri= android.net.Uri.parse(soundUri); android.media.AudioAttributes audioAttributes = new android.media.AudioAttributes.Builder() .setContentType(android.media.AudioAttributes.CONTENT_TYPE_SONIFICATION) .setUsage(android.media.AudioAttributes.USAGE_NOTIFICATION) .build(); method = clsNotificationChannel.getMethod("setSound", android.net.Uri.class, android.media.AudioAttributes.class); method.invoke(mChannel, new Object[]{uri, audioAttributes}); } method = NotificationManager.class.getMethod("createNotificationChannel", clsNotificationChannel); method.invoke(mNotificationManager, new Object[]{mChannel}); //mNotificationManager.createNotificationChannel(mChannel); try { // For some reason I can't find the app-support-v4.jar for // API 26 that includes this method so that I can compile in netbeans. // So we use reflection... If someone coming after can find a newer version // that has setChannelId(), please rip out this ugly reflection hack and // replace it with a proper call to mNotifyBuilder.setChannelId(id) mNotifyBuilder.getClass().getMethod("setChannelId", new Class[]{String.class}).invoke(mNotifyBuilder, new Object[]{id}); } catch (Exception ex) { Logger.getLogger(AndroidImplementation.class.getName()).log(Level.SEVERE, null, ex); } //mNotifyBuilder.setChannelId(id); } catch (ClassNotFoundException ex) { Logger.getLogger(AndroidImplementation.class.getName()).log(Level.SEVERE, null, ex); } catch (NoSuchMethodException ex) { Logger.getLogger(AndroidImplementation.class.getName()).log(Level.SEVERE, null, ex); } catch (SecurityException ex) { Logger.getLogger(AndroidImplementation.class.getName()).log(Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { Logger.getLogger(AndroidImplementation.class.getName()).log(Level.SEVERE, null, ex); } catch (IllegalArgumentException ex) { Logger.getLogger(AndroidImplementation.class.getName()).log(Level.SEVERE, null, ex); } catch (InvocationTargetException ex) { Logger.getLogger(AndroidImplementation.class.getName()).log(Level.SEVERE, null, ex); } catch (InstantiationException ex) { Logger.getLogger(AndroidImplementation.class.getName()).log(Level.SEVERE, null, ex); } //mNotifyBuilder.setChannelId(id); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setNotificationChannel File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java Repository: codenameone/CodenameOne The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-4903
MEDIUM
5.1
codenameone/CodenameOne
setNotificationChannel
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
@Override public void setAlpha(float alpha) { super.setAlpha(alpha); updateFullyVisibleState(false /* forceNotFullyVisible */); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setAlpha File: packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2017-0822
HIGH
7.5
android
setAlpha
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
public void onUnlockHintStarted() { mFalsingManager.onUnlockHintStarted(); mKeyguardIndicationController.showTransientIndication(R.string.keyguard_unlock); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onUnlockHintStarted 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
onUnlockHintStarted
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
public boolean isSafeMode() { return safeMode; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isSafeMode File: src/main/java/com/alibaba/fastjson/parser/ParserConfig.java Repository: alibaba/fastjson The code follows secure coding practices.
[ "CWE-502" ]
CVE-2022-25845
MEDIUM
6.8
alibaba/fastjson
isSafeMode
src/main/java/com/alibaba/fastjson/parser/ParserConfig.java
8f3410f81cbd437f7c459f8868445d50ad301f15
0
Analyze the following code function for security vulnerabilities
public WearableExtender setHintContentIntentLaunchesActivity( boolean hintContentIntentLaunchesActivity) { setFlag(FLAG_HINT_CONTENT_INTENT_LAUNCHES_ACTIVITY, hintContentIntentLaunchesActivity); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setHintContentIntentLaunchesActivity File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
setHintContentIntentLaunchesActivity
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
@Reference public void setUserDirectoryService(UserDirectoryService userDirectoryService) { this.userDirectoryService = userDirectoryService; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setUserDirectoryService File: modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/impl/IngestServiceImpl.java Repository: opencast The code follows secure coding practices.
[ "CWE-287" ]
CVE-2022-29237
MEDIUM
5.5
opencast
setUserDirectoryService
modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/impl/IngestServiceImpl.java
8d5ec1614eed109b812bc27b0c6d3214e456d4e7
0
Analyze the following code function for security vulnerabilities
@Nullable public String getUser() { return user; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getUser 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
getUser
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
ActiveAdmin getActiveAdminUncheckedLocked(ComponentName who, int userHandle, boolean parent) { ensureLocked(); if (parent) { Preconditions.checkCallAuthorization(isManagedProfile(userHandle), "You can not call APIs on the parent profile outside a managed profile, " + "userId = %d", userHandle); } ActiveAdmin admin = getActiveAdminUncheckedLocked(who, userHandle); if (admin != null && parent) { admin = admin.getParentActiveAdmin(); } return admin; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getActiveAdminUncheckedLocked 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
getActiveAdminUncheckedLocked
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
public int optInt(String key) { return this.optInt(key, 0); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: optInt File: src/main/java/org/json/JSONObject.java Repository: stleary/JSON-java The code follows secure coding practices.
[ "CWE-770" ]
CVE-2023-5072
HIGH
7.5
stleary/JSON-java
optInt
src/main/java/org/json/JSONObject.java
661114c50dcfd53bb041aab66f14bb91e0a87c8a
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.shiftLeft(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/ShlOperation.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.shiftLeft(shiftAmountInt)); } } return successResponse; }
[ "CWE-681" ]
CVE-2021-41272
MEDIUM
5
hyperledger/besu
executeFixedCostOperation
evm/src/main/java/org/hyperledger/besu/evm/operation/ShlOperation.java
4170524ac3b45185704fcfbdeeb71b0b05dfa0a1
1
Analyze the following code function for security vulnerabilities
public void displayReady() { for (Display display : mDisplays) { displayReady(display.getDisplayId()); } synchronized(mWindowMap) { final DisplayContent displayContent = getDefaultDisplayContentLocked(); readForcedDisplayPropertiesLocked(displayContent); mDisplayReady = true; } try { mActivityManager.updateConfiguration(null); } catch (RemoteException e) { } synchronized(mWindowMap) { mIsTouchDevice = mContext.getPackageManager().hasSystemFeature( PackageManager.FEATURE_TOUCHSCREEN); configureDisplayPolicyLocked(getDefaultDisplayContentLocked()); } try { mActivityManager.updateConfiguration(null); } catch (RemoteException e) { } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: displayReady File: services/core/java/com/android/server/wm/WindowManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3875
HIGH
7.2
android
displayReady
services/core/java/com/android/server/wm/WindowManagerService.java
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
0
Analyze the following code function for security vulnerabilities
public void setEntityResolver(final EntityResolver entityResolver) { saxEntityResolver = entityResolver; engine = null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setEntityResolver File: core/src/java/org/jdom2/input/SAXBuilder.java Repository: hunterhacker/jdom The code follows secure coding practices.
[ "CWE-611" ]
CVE-2021-33813
MEDIUM
5
hunterhacker/jdom
setEntityResolver
core/src/java/org/jdom2/input/SAXBuilder.java
bd3ab78370098491911d7fe9d7a43b97144a234e
0
Analyze the following code function for security vulnerabilities
public Object extractHardRef(Object o) { SoftReference w = (SoftReference) o; if (w != null) { return w.get(); } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: extractHardRef File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java Repository: codenameone/CodenameOne The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-4903
MEDIUM
5.1
codenameone/CodenameOne
extractHardRef
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
public static String marshal(String marshallingFormat, Object entity) { MarshallingFormat format = getFormat(marshallingFormat); if (format == null) { throw new IllegalArgumentException("Unknown marshalling format " + marshallingFormat); } Marshaller marshaller = null; switch (format) { case JAXB: { marshaller = jaxbMarshaller; break; } case JSON: { marshaller = jsonMarshaller; break; } default: { marshaller = jsonMarshaller; break; } } return marshaller.marshall(entity); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: marshal File: kie-server-parent/kie-server-controller/kie-server-controller-rest/src/main/java/org/kie/server/controller/rest/ControllerUtils.java Repository: kiegroup/droolsjbpm-integration The code follows secure coding practices.
[ "CWE-260" ]
CVE-2016-7043
MEDIUM
5
kiegroup/droolsjbpm-integration
marshal
kie-server-parent/kie-server-controller/kie-server-controller-rest/src/main/java/org/kie/server/controller/rest/ControllerUtils.java
e916032edd47aa46d15f3a11909b4804ee20a7e8
0
Analyze the following code function for security vulnerabilities
public void setPageContent(int pageNum, byte content[], int compressionLevel) { PdfDictionary page = getPageN(pageNum); if (page == null) return; PdfObject contents = page.get(PdfName.CONTENTS); freeXref = -1; killXref(contents); if (freeXref == -1) { xrefObj.add(null); freeXref = xrefObj.size() - 1; } page.put(PdfName.CONTENTS, new PRIndirectReference(this, freeXref)); xrefObj.set(freeXref, new PRStream(this, content, compressionLevel)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setPageContent 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
setPageContent
java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
9b0cbb76c8434a8505f02ada02a94263dcae9247
0
Analyze the following code function for security vulnerabilities
public void updateClob(String columnName, @Nullable Clob x) throws SQLException { throw org.postgresql.Driver.notImplemented(this.getClass(), "updateClob(String,Clob)"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateClob File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java Repository: pgjdbc The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-31197
HIGH
8
pgjdbc
updateClob
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
739e599d52ad80f8dcd6efedc6157859b1a9d637
0
Analyze the following code function for security vulnerabilities
private void suspendPersonalAppsInPackageManager(int userId) { mInjector.binderWithCleanCallingIdentity(() -> { try { final String[] appsToSuspend = mInjector.getPersonalAppsForSuspension(userId); final String[] failedApps = mIPackageManager.setPackagesSuspendedAsUser( appsToSuspend, true, null, null, null, PLATFORM_PACKAGE_NAME, userId); if (!ArrayUtils.isEmpty(failedApps)) { Slogf.wtf(LOG_TAG, "Failed to suspend apps: " + String.join(",", failedApps)); } } catch (RemoteException re) { // Shouldn't happen. Slogf.e(LOG_TAG, "Failed talking to the package manager", re); } }); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: suspendPersonalAppsInPackageManager 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
suspendPersonalAppsInPackageManager
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
public void setWorkPoolTimeout(int workPoolTimeout) { this.workPoolTimeout = workPoolTimeout; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setWorkPoolTimeout File: src/main/java/com/rabbitmq/client/ConnectionFactory.java Repository: rabbitmq/rabbitmq-java-client The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-46120
HIGH
7.5
rabbitmq/rabbitmq-java-client
setWorkPoolTimeout
src/main/java/com/rabbitmq/client/ConnectionFactory.java
714aae602dcae6cb4b53cadf009323ebac313cc8
0
Analyze the following code function for security vulnerabilities
public boolean isDeviceOwnerAppOnAnyUser(String packageName) { return isDeviceOwnerAppOnAnyUserInner(packageName, /* callingUserOnly =*/ false); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isDeviceOwnerAppOnAnyUser 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
isDeviceOwnerAppOnAnyUser
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
public void loadIfNecessary() { if (mContentViewCore != null) mContentViewCore.loadIfNecessary(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: loadIfNecessary File: chrome/android/java/src/org/chromium/chrome/browser/Tab.java Repository: chromium The code follows secure coding practices.
[ "CWE-20" ]
CVE-2014-3159
MEDIUM
6.4
chromium
loadIfNecessary
chrome/android/java/src/org/chromium/chrome/browser/Tab.java
98a50b76141f0b14f292f49ce376e6554142d5e2
0
Analyze the following code function for security vulnerabilities
private void advanceToNextFileInput() throws IOException { currentInput = fileInputsIterator.next(); List<URI> uris = currentInput.expandUri().stream().filter(this::shouldBeReadByCurrentNode).toList(); if (uris.size() > 0) { currentInputUriIterator = uris.iterator(); advanceToNextUri(currentInput); } else if (currentInput.isGlobbed()) { URI uri = currentInput.uri(); cursor.uri = uri; throw new IOException("Cannot find any URI matching: " + uri.toString()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: advanceToNextFileInput File: server/src/main/java/io/crate/execution/engine/collect/files/FileReadingIterator.java Repository: crate The code follows secure coding practices.
[ "CWE-22" ]
CVE-2024-24565
MEDIUM
6.5
crate
advanceToNextFileInput
server/src/main/java/io/crate/execution/engine/collect/files/FileReadingIterator.java
4e857d675683095945dd524d6ba03e692c70ecd6
0
Analyze the following code function for security vulnerabilities
public void importRules(File[] rulesFiles, File metadata) throws IOException { // only import rules if versions are ok Meta m = mapper.readValue(metadata, Meta.class); if (VersionUtil.getRulesVersionCompatibility(m.getVersion())) { // Only importing a single rules file now. Reader reader = null; try { reader = new FileReader(rulesFiles[0]); rulesImporter.importObject(reader, m.getVersion()); } finally { if (reader != null) { reader.close(); } } } else { log.warn( i18n.tr( "Incompatible rules: import version {0} older than our version {1}.", m.getVersion(), VersionUtil.getVersionString())); log.warn( i18n.tr("Manifest data will be imported without rules import.")); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: importRules File: src/main/java/org/candlepin/sync/Importer.java Repository: candlepin The code follows secure coding practices.
[ "CWE-264" ]
CVE-2012-6119
LOW
2.1
candlepin
importRules
src/main/java/org/candlepin/sync/Importer.java
f4d93230e58b969c506b4c9778e04482a059b08c
0
Analyze the following code function for security vulnerabilities
public int optInt(String key, int defaultValue) { Object o = opt(key); if (o == null) { return defaultValue; } else { try { return doGetInt(key, o); } catch (JSONException ex) { throw new RuntimeException(ex); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: optInt File: src/main/java/org/codehaus/jettison/json/JSONObject.java Repository: jettison-json/jettison The code follows secure coding practices.
[ "CWE-674", "CWE-787" ]
CVE-2022-45693
HIGH
7.5
jettison-json/jettison
optInt
src/main/java/org/codehaus/jettison/json/JSONObject.java
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
0
Analyze the following code function for security vulnerabilities
@Override public ResourceRenderer getScriptRenderer() { return scriptRenderer; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getScriptRenderer File: framework/impl/src/main/java/org/ajax4jsf/resource/ResourceBuilderImpl.java Repository: nuxeo/richfaces-3.3 The code follows secure coding practices.
[ "CWE-502" ]
CVE-2013-4521
HIGH
7.5
nuxeo/richfaces-3.3
getScriptRenderer
framework/impl/src/main/java/org/ajax4jsf/resource/ResourceBuilderImpl.java
6cbad2a6dcb70d3e33a6ce5879b1a3ad79eb1aec
0
Analyze the following code function for security vulnerabilities
@Override public boolean containsFloat(K name, float value) { return contains(name, fromFloat(name, value)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: containsFloat 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
containsFloat
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
0
Analyze the following code function for security vulnerabilities
public String getURL(String action, String params, boolean redirect, XWikiContext context) { URL url = context.getURLFactory().createURL(getSpace(), getName(), action, params, null, getDatabase(), context); if (redirect && isRedirectAbsolute(context)) { if (url == null) { return null; } else { return url.toString(); } } else { return context.getURLFactory().getURL(url, context); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getURL 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
getURL
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 ApiClient addDefaultHeader(String key, String value) { defaultHeaderMap.put(key, value); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addDefaultHeader File: samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/ApiClient.java Repository: OpenAPITools/openapi-generator The code follows secure coding practices.
[ "CWE-668" ]
CVE-2021-21430
LOW
2.1
OpenAPITools/openapi-generator
addDefaultHeader
samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
public static Hints addDefaultHints(final Hints hints) { final Hints completed = getDefaultHints(); if (hints != null) { completed.add(hints); } return completed; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addDefaultHints 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
addDefaultHints
modules/library/metadata/src/main/java/org/geotools/util/factory/GeoTools.java
4f70fa3234391dd0cda883a20ab0ec75688cba49
0
Analyze the following code function for security vulnerabilities
@Transactional @Listen public void on(EntityRemoved event) { if (event.getEntity() instanceof Project) { Project project = (Project) event.getEntity(); Long projectId = project.getId(); transactionManager.runAfterCommit(new Runnable() { @Override public void run() { cacheLock.writeLock().lock(); try { cache.remove(projectId); } finally { cacheLock.writeLock().unlock(); } } }); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: on File: server-core/src/main/java/io/onedev/server/entitymanager/impl/DefaultProjectManager.java Repository: theonedev/onedev The code follows secure coding practices.
[ "CWE-287" ]
CVE-2022-39205
CRITICAL
9.8
theonedev/onedev
on
server-core/src/main/java/io/onedev/server/entitymanager/impl/DefaultProjectManager.java
f1e97688e4e19d6de1dfa1d00e04655209d39f8e
0
Analyze the following code function for security vulnerabilities
@Override public List<String> getPermittedAccessibilityServices(ComponentName who) { if (!mHasFeature) { return null; } Objects.requireNonNull(who, "ComponentName is null"); final CallerIdentity caller = getCallerIdentity(who); Preconditions.checkCallAuthorization( isDefaultDeviceOwner(caller) || isProfileOwner(caller)); synchronized (getLockObject()) { ActiveAdmin admin = getProfileOwnerOrDeviceOwnerLocked(caller.getUserId()); return admin.permittedAccessiblityServices; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPermittedAccessibilityServices 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
getPermittedAccessibilityServices
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
@Override protected Class<?> resolveClass(ObjectStreamClass desc) throws IOException, ClassNotFoundException { String className = desc.getName(); try { return loadClass(className); } catch (ClassNotFoundException ex) { return super.resolveClass(desc); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: resolveClass File: src/main/java/org/elasticsearch/common/io/ThrowableObjectInputStream.java Repository: elastic/elasticsearch The code follows secure coding practices.
[ "CWE-74" ]
CVE-2015-5377
HIGH
7.5
elastic/elasticsearch
resolveClass
src/main/java/org/elasticsearch/common/io/ThrowableObjectInputStream.java
bf3052d14c874aead7da8855c5fcadf5428a43f2
0
Analyze the following code function for security vulnerabilities
public ServerBuilder port(InetSocketAddress localAddress, SessionProtocol... protocols) { return port(new ServerPort(localAddress, protocols)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: port File: core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java Repository: line/armeria The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-44487
HIGH
7.5
line/armeria
port
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
df7f85824a62e997b910b5d6194a3335841065fd
0
Analyze the following code function for security vulnerabilities
private List<External> checkout(AbstractBuild build, FilePath workspace, TaskListener listener, EnvVars env) throws IOException, InterruptedException { if (repositoryLocationsNoLongerExist(build, listener, env)) { Run lsb = build.getProject().getLastSuccessfulBuild(); if (lsb != null && build.getNumber()-lsb.getNumber()>10 && build.getTimestamp().getTimeInMillis()-lsb.getTimestamp().getTimeInMillis() > TimeUnit2.DAYS.toMillis(1)) { // Disable this project if the location doesn't exist any more, see issue #763 // but only do so if there was at least some successful build, // to make sure that initial configuration error won't disable the build. see issue #1567 // finally, only disable a build if the failure persists for some time. // see http://www.nabble.com/Should-Hudson-have-an-option-for-a-content-fingerprint--td24022683.html listener.getLogger().println("One or more repository locations do not exist anymore for " + build.getProject().getName() + ", project will be disabled."); build.getProject().makeDisabled(true); return null; } } List<External> externals = new ArrayList<External>(); for (ModuleLocation location : getLocations(env, build)) { externals.addAll( workspace.act(new CheckOutTask(build, this, location, build.getTimestamp().getTime(), listener, env))); // olamy: remove null check at it cause test failure // see https://github.com/jenkinsci/subversion-plugin/commit/de23a2b781b7b86f41319977ce4c11faee75179b#commitcomment-1551273 /*if ( externalsFound != null ){ externals.addAll(externalsFound); } else { externals.addAll( new ArrayList<External>( 0 ) ); }*/ } return externals; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkout File: src/main/java/hudson/scm/SubversionSCM.java Repository: jenkinsci/subversion-plugin The code follows secure coding practices.
[ "CWE-255" ]
CVE-2013-6372
LOW
2.1
jenkinsci/subversion-plugin
checkout
src/main/java/hudson/scm/SubversionSCM.java
7d4562d6f7e40de04bbe29577b51c79f07d05ba6
0
Analyze the following code function for security vulnerabilities
@Nullable private WifiConfiguration getConnectingWifiConfigurationInternal() { if (mTargetNetworkId == WifiConfiguration.INVALID_NETWORK_ID) { return null; } return mWifiConfigManager.getConfiguredNetwork(mTargetNetworkId); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getConnectingWifiConfigurationInternal 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
getConnectingWifiConfigurationInternal
service/java/com/android/server/wifi/ClientModeImpl.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
public boolean isAppXml() { return contentTypePars != null && (contentTypePars[0].equals("application/xml") || contentTypePars[0].equals("text/xml")); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isAppXml File: src/main/java/org/bedework/webdav/servlet/common/PostRequestPars.java Repository: Bedework/bw-webdav The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-20000
MEDIUM
5
Bedework/bw-webdav
isAppXml
src/main/java/org/bedework/webdav/servlet/common/PostRequestPars.java
67283fb8b9609acdb1a8d2e7fefe195b4a261062
0
Analyze the following code function for security vulnerabilities
@NonNull @Override public Optional<PendingIntent> createForwardToDeckActionIntent(@NonNull Notification notification, @NonNull User user) { if (APP_NAME.equalsIgnoreCase(notification.app)) { final Intent intent = new Intent(); for (String appPackage : DECK_APP_PACKAGES) { intent.setClassName(appPackage, DECK_ACTIVITY_TO_START); if (packageManager.resolveActivity(intent, 0) != null) { return Optional.of(createPendingIntent(intent, notification, user)); } } } return Optional.empty(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createForwardToDeckActionIntent File: src/main/java/com/nextcloud/client/integrations/deck/DeckApiImpl.java Repository: nextcloud/android The code follows secure coding practices.
[ "CWE-732" ]
CVE-2022-24886
LOW
2.1
nextcloud/android
createForwardToDeckActionIntent
src/main/java/com/nextcloud/client/integrations/deck/DeckApiImpl.java
c01fa0b17050cdcf77a468cc22f4071eae29d464
0
Analyze the following code function for security vulnerabilities
@JsonProperty("PrettyPrint") public String getPrettyPrint() { return prettyPrint; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPrettyPrint File: base/common/src/main/java/com/netscape/certsrv/cert/CertData.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
getPrettyPrint
base/common/src/main/java/com/netscape/certsrv/cert/CertData.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
@Override public Object getNativeGraphics() { if(myView != null){ nullGraphics = null; return myView.getGraphics(); }else{ return getNullGraphics(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getNativeGraphics File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java Repository: codenameone/CodenameOne The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-4903
MEDIUM
5.1
codenameone/CodenameOne
getNativeGraphics
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
public Throwable getReasonClosedCause() { synchronized (connectionSemaphore) { return reasonClosedCause; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getReasonClosedCause File: src/main/java/com/trilead/ssh2/transport/TransportManager.java Repository: connectbot/sshlib The code follows secure coding practices.
[ "CWE-354" ]
CVE-2023-48795
MEDIUM
5.9
connectbot/sshlib
getReasonClosedCause
src/main/java/com/trilead/ssh2/transport/TransportManager.java
5c8b534f6e97db7ac0e0e579331213aa25c173ab
0
Analyze the following code function for security vulnerabilities
public void collectChanges(Consumer<NodeChange> collector) { boolean isAttached = isAttached(); if (isAttached != wasAttached) { if (isAttached) { collector.accept(new NodeAttachChange(this)); // Make all changes show up as if the node was recently attached clearChanges(); forEachFeature(NodeFeature::generateChangesFromEmpty); } else { collector.accept(new NodeDetachChange(this)); } wasAttached = isAttached; } if (!isAttached()) { return; } if (!isVisible()) { doCollectChanges(collector, getDisallowFeatures()); return; } if (isInactive()) { if (isInitialChanges) { // send only required (reported) features updates Stream<NodeFeature> initialFeatures = Stream .concat(featureSet.mappings.keySet().stream() .filter(this::isReportedFeature) .map(this::getFeature), getDisallowFeatures()); doCollectChanges(collector, initialFeatures); } else { doCollectChanges(collector, getDisallowFeatures()); } } else { doCollectChanges(collector, getInitializedFeatures()); } }
Vulnerability Classification: - CWE: CWE-200 - CVE: CVE-2023-25499 - Severity: MEDIUM - CVSS Score: 6.5 Description: Cleanup, and refactoring, in Element, StateNode, UIInternals classes + mvn formatter. Function: collectChanges File: flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java Repository: vaadin/flow Fixed Code: public void collectChanges(Consumer<NodeChange> collector) { boolean isAttached = isAttached(); if (isAttached != wasAttached) { if (isAttached) { collector.accept(new NodeAttachChange(this)); // Make all changes show up as if the node was recently attached clearChanges(); forEachFeature(NodeFeature::generateChangesFromEmpty); } else { collector.accept(new NodeDetachChange(this)); } wasAttached = isAttached; } if (!isAttached()) { return; } if (isInitialChanges && !isVisible()) { if (hasFeature(ElementData.class)) { doCollectChanges(collector, Stream.of(getFeature(ElementData.class))); } return; } if (isInactive()) { if (isInitialChanges) { // send only required (reported) features updates Stream<NodeFeature> initialFeatures = Stream .concat(featureSet.mappings.keySet().stream() .filter(this::isReportedFeature) .map(this::getFeature), getDisallowFeatures()); doCollectChanges(collector, initialFeatures); } else { doCollectChanges(collector, getDisallowFeatures()); } } else { doCollectChanges(collector, getInitializedFeatures()); } }
[ "CWE-200" ]
CVE-2023-25499
MEDIUM
6.5
vaadin/flow
collectChanges
flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
1
Analyze the following code function for security vulnerabilities
public <T> T authenticate(String username, String password, Mapper<T> mapper) { Entry entry = findLdapEntryForAuthentication(username); try { final PasswordWarning warning = performBind(entry.getDn(), password); if (warning != null) { LOG.warn(format("Your password will expire in {0} seconds", warning.getTimeBeforeExpiration())); LOG.warn(format("Remaining authentications before the account will be locked - {0}", warning.getGraceAuthNsRemaining())); LOG.warn(format("Password reset is required - {0}", warning.isChangeAfterReset())); } return mapper.map(entry); } catch (Exception e) { throw new cd.go.authentication.ldap.exception.LdapException(format("Failed to authenticate user `{0}` with ldap server {1}", username, ldapConfiguration.getLdapUrlAsString())); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: authenticate File: src/main/java/cd/go/apacheds/ApacheDsLdapClient.java Repository: gocd/gocd-ldap-authentication-plugin The code follows secure coding practices.
[ "CWE-74" ]
CVE-2022-24832
MEDIUM
4.9
gocd/gocd-ldap-authentication-plugin
authenticate
src/main/java/cd/go/apacheds/ApacheDsLdapClient.java
87fa7dac5d899b3960ab48e151881da4793cfcc3
0
Analyze the following code function for security vulnerabilities
@Override public String getSimpleColumnSQL(SimpleColumn column) { String result = getColumnNameSQL(column.getName()); if (column.getFunctionType() != null) { result = getColumnFunctionSQL(result, column.getFunctionType()); } return result; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSimpleColumnSQL File: dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java Repository: dashbuilder The code follows secure coding practices.
[ "CWE-89" ]
CVE-2016-4999
HIGH
7.5
dashbuilder
getSimpleColumnSQL
dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java
8574899e3b6455547b534f570b2330ff772e524b
0
Analyze the following code function for security vulnerabilities
public String [] getAvailableRecordingMimeTypes(){ // audio/aac and audio/mp4 result in the same thing // AAC are wrapped in an mp4 container. return new String[]{"audio/amr", "audio/aac", "audio/mp4"}; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAvailableRecordingMimeTypes File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java Repository: codenameone/CodenameOne The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-4903
MEDIUM
5.1
codenameone/CodenameOne
getAvailableRecordingMimeTypes
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
@Nullable Task getRootTask() { return task != null ? task.getRootTask() : null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRootTask File: services/core/java/com/android/server/wm/ActivityRecord.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21145
HIGH
7.8
android
getRootTask
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
protected long writeModificationTimestamp(URL resourceUrl, HttpServletRequest request, HttpServletResponse response) { // Find the modification timestamp long lastModifiedTime; URLConnection connection = null; try { connection = resourceUrl.openConnection(); lastModifiedTime = connection.getLastModified(); // Remove milliseconds to avoid comparison problems (milliseconds // are not returned by the browser in the "If-Modified-Since" // header). lastModifiedTime = lastModifiedTime - lastModifiedTime % 1000; response.setDateHeader("Last-Modified", lastModifiedTime); return lastModifiedTime; } catch (Exception e) { getLogger().trace( "Failed to find out last modified timestamp. Continuing without it.", e); } finally { try { // Explicitly close the input stream to prevent it // from remaining hanging // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4257700 if (connection != null) { InputStream is = connection.getInputStream(); if (is != null) { is.close(); } } } catch (IOException e) { getLogger().warn("Error closing URLConnection input stream", e); } } return -1L; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: writeModificationTimestamp File: flow-server/src/main/java/com/vaadin/flow/server/StaticFileServer.java Repository: vaadin/flow The code follows secure coding practices.
[ "CWE-22" ]
CVE-2020-36321
MEDIUM
5
vaadin/flow
writeModificationTimestamp
flow-server/src/main/java/com/vaadin/flow/server/StaticFileServer.java
6ae6460ca4f3a9b50bd46fbf49c807fe67718307
0
Analyze the following code function for security vulnerabilities
public void resetParamsWhereLastConfigWins() { allowedEmptyTags.clear(); requireClosingTags.clear(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: resetParamsWhereLastConfigWins File: src/main/java/org/owasp/validator/html/Policy.java Repository: nahsra/antisamy The code follows secure coding practices.
[ "CWE-79" ]
CVE-2017-14735
MEDIUM
4.3
nahsra/antisamy
resetParamsWhereLastConfigWins
src/main/java/org/owasp/validator/html/Policy.java
82da009e733a989a57190cd6aa1b6824724f6d36
0
Analyze the following code function for security vulnerabilities
private static String readInputStream(InputStream fis) throws NullPointerException, IOException { String sret = null; InputStreamReader insr = new InputStreamReader(fis); BufferedReader fr = new BufferedReader(insr); StringBuffer sb = new StringBuffer(); while (fr.ready()) { sb.append(fr.readLine()); sb.append("\n"); } fr.close(); sret = sb.toString(); return sret; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: readInputStream 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
readInputStream
src/main/java/org/lemsml/jlems/io/util/JUtil.java
8c224637d7d561076364a9e3c2c375daeaf463dc
0
Analyze the following code function for security vulnerabilities
public SerializationConfig addPortableFactory(int factoryId, PortableFactory portableFactory) { getPortableFactories().put(factoryId, portableFactory); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addPortableFactory File: hazelcast/src/main/java/com/hazelcast/config/SerializationConfig.java Repository: hazelcast The code follows secure coding practices.
[ "CWE-502" ]
CVE-2016-10750
MEDIUM
6.8
hazelcast
addPortableFactory
hazelcast/src/main/java/com/hazelcast/config/SerializationConfig.java
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
0
Analyze the following code function for security vulnerabilities
private void handleRenegotiation(HandshakeStatus handshakeStatus) { synchronized (handshakeLock) { if (handshakeStatus == HandshakeStatus.NOT_HANDSHAKING || handshakeStatus == HandshakeStatus.FINISHED) { // Not handshaking return; } if (!handshaken) { // Not renegotiation return; } final boolean renegotiate; if (handshaking) { // Renegotiation in progress or failed already. // i.e. Renegotiation check has been done already below. return; } if (engine.isInboundDone() || engine.isOutboundDone()) { // Not handshaking but closing. return; } if (isEnableRenegotiation()) { // Continue renegotiation. renegotiate = true; } else { // Do not renegotiate. renegotiate = false; // Prevent reentrance of this method. handshaking = true; } if (renegotiate) { // Renegotiate. handshake(); } else { // Raise an exception. fireExceptionCaught( ctx, new SSLException( "renegotiation attempted by peer; " + "closing the connection")); // Close the connection to stop renegotiation. Channels.close(ctx, succeededFuture(ctx.getChannel())); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handleRenegotiation File: src/main/java/org/jboss/netty/handler/ssl/SslHandler.java Repository: netty The code follows secure coding practices.
[ "CWE-119" ]
CVE-2014-3488
MEDIUM
5
netty
handleRenegotiation
src/main/java/org/jboss/netty/handler/ssl/SslHandler.java
2fa9400a59d0563a66908aba55c41e7285a04994
0
Analyze the following code function for security vulnerabilities
public void setTotal(long total) { this.total = total; if (total == -1) { pages = 1; return; } if (pageSize > 0) { pages = (int) (total / pageSize + ((total % pageSize == 0) ? 0 : 1)); } else { pages = 0; } //分页合理化,针对不合理的页码自动处理 if ((reasonable != null && reasonable) && pageNum > pages) { if (pages != 0) { pageNum = pages; } calculateStartAndEndRow(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setTotal File: src/main/java/com/github/pagehelper/Page.java Repository: pagehelper/Mybatis-PageHelper The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-28111
HIGH
7.5
pagehelper/Mybatis-PageHelper
setTotal
src/main/java/com/github/pagehelper/Page.java
554a524af2d2b30d09505516adc412468a84d8fa
0
Analyze the following code function for security vulnerabilities
public DeleteCheckResult checkBeforeDelete(ApiScenarioBatchRequest request) { ServiceUtils.getSelectAllIds(request, request.getCondition(), (query) -> extApiScenarioMapper.selectIdsByQuery(query)); List<String> deleteIds = request.getIds(); DeleteCheckResult result = new DeleteCheckResult(); List<String> checkMsgList = new ArrayList<>(); if (CollectionUtils.isNotEmpty(deleteIds)) { List<ApiScenarioReferenceId> apiScenarioReferenceIdList = apiScenarioReferenceIdService.findByReferenceIdsAndRefType(deleteIds, MsTestElementConstants.REF.name()); if (CollectionUtils.isNotEmpty(apiScenarioReferenceIdList)) { Map<String, List<String>> scenarioDic = new HashMap<>(); apiScenarioReferenceIdList.forEach(item -> { String refreceID = item.getReferenceId(); String scenarioId = item.getApiScenarioId(); if (scenarioDic.containsKey(refreceID)) { scenarioDic.get(refreceID).add(scenarioId); } else { List<String> list = new ArrayList<>(); list.add(scenarioId); scenarioDic.put(refreceID, list); } }); for (Map.Entry<String, List<String>> entry : scenarioDic.entrySet()) { String refreceId = entry.getKey(); List<String> scenarioIdList = entry.getValue(); if (CollectionUtils.isNotEmpty(scenarioIdList)) { String deleteScenarioName = extApiScenarioMapper.selectNameById(refreceId); List<String> scenarioNames = extApiScenarioMapper.selectNameByIdIn(scenarioIdList); if (StringUtils.isNotEmpty(deleteScenarioName) && CollectionUtils.isNotEmpty(scenarioNames)) { String nameListStr = "【"; for (String name : scenarioNames) { nameListStr += name + ","; } if (nameListStr.length() > 1) { nameListStr = nameListStr.substring(0, nameListStr.length() - 1) + "】"; } String msg = deleteScenarioName + " " + Translator.get("delete_check_reference_by") + ": " + nameListStr + " "; checkMsgList.add(msg); } } } } } result.setDeleteFlag(checkMsgList.isEmpty()); result.setCheckMsg(checkMsgList); return result; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkBeforeDelete File: backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java Repository: metersphere The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2021-45789
MEDIUM
6.5
metersphere
checkBeforeDelete
backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java
d74e02cdff47cdf7524d305d098db6ffb7f61b47
0
Analyze the following code function for security vulnerabilities
private void updateChatState(final Conversation conversation, final String msg) { ChatState state = msg.length() == 0 ? Config.DEFAULT_CHATSTATE : ChatState.PAUSED; Account.State status = conversation.getAccount().getStatus(); if (status == Account.State.ONLINE && conversation.setOutgoingChatState(state)) { activity.xmppConnectionService.sendChatState(conversation); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateChatState File: src/main/java/eu/siacs/conversations/ui/ConversationFragment.java Repository: iNPUTmice/Conversations The code follows secure coding practices.
[ "CWE-200" ]
CVE-2018-18467
MEDIUM
5
iNPUTmice/Conversations
updateChatState
src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
7177c523a1b31988666b9337249a4f1d0c36f479
0
Analyze the following code function for security vulnerabilities
public void abort() { if (mAnimationStartedListener != null) { try { mAnimationStartedListener.sendResult(null); } catch (RemoteException e) { } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: abort File: core/java/android/app/ActivityOptions.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-20918
CRITICAL
9.8
android
abort
core/java/android/app/ActivityOptions.java
51051de4eb40bb502db448084a83fd6cbfb7d3cf
0
Analyze the following code function for security vulnerabilities
public IntentBuilder setProfileToUnify(int profileId, LockscreenCredential credential) { mIntent.putExtra(EXTRA_KEY_UNIFICATION_PROFILE_ID, profileId); mIntent.putExtra(EXTRA_KEY_UNIFICATION_PROFILE_CREDENTIAL, credential); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setProfileToUnify File: src/com/android/settings/password/ChooseLockPassword.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40117
HIGH
7.8
android
setProfileToUnify
src/com/android/settings/password/ChooseLockPassword.java
11815817de2f2d70fe842b108356a1bc75d44ffb
0
Analyze the following code function for security vulnerabilities
public SysUser getUserByEmail(@Param("email")String email);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getUserByEmail File: jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysUserMapper.java Repository: jeecgboot/jeecg-boot The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-45208
MEDIUM
4.3
jeecgboot/jeecg-boot
getUserByEmail
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysUserMapper.java
51e2227bfe54f5d67b09411ee9a336750164e73d
0
Analyze the following code function for security vulnerabilities
public boolean isConversationActivationSet() { return conversationActivationEnabled != null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isConversationActivationSet File: impl/src/main/java/org/jboss/weld/servlet/HttpContextLifecycle.java Repository: weld/core The code follows secure coding practices.
[ "CWE-362" ]
CVE-2014-8122
MEDIUM
4.3
weld/core
isConversationActivationSet
impl/src/main/java/org/jboss/weld/servlet/HttpContextLifecycle.java
8e413202fa1af08c09c580f444e4fd16874f9c65
0
Analyze the following code function for security vulnerabilities
@SuppressWarnings("unused") @CalledByNative private void onPinchBeginEventAck() { updateGestureStateListener(GestureEventType.PINCH_BEGIN); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onPinchBeginEventAck File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java Repository: chromium The code follows secure coding practices.
[ "CWE-1021" ]
CVE-2015-1241
MEDIUM
4.3
chromium
onPinchBeginEventAck
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
9d343ad2ea6ec395c377a4efa266057155bfa9c1
0
Analyze the following code function for security vulnerabilities
private CreateOrUpdateArticleResponse save(AdminTokenVO adminTokenVO, CreateArticleRequest createArticleRequest) { Log log = getLog(adminTokenVO, createArticleRequest); new Tag().refreshTag(); CreateOrUpdateArticleResponse updateLogResponse = new CreateOrUpdateArticleResponse(); updateLogResponse.setId(log.getInt("logId")); updateLogResponse.setAlias(log.getStr("alias")); updateLogResponse.setDigest(log.getStr("digest")); if (createArticleRequest instanceof UpdateArticleRequest) { updateLogResponse.setError(log.update() ? 0 : 1); } else { updateLogResponse.setError(log.save() ? 0 : 1); } updateLogResponse.setThumbnail(log.getStr("thumbnail")); return updateLogResponse; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: save File: service/src/main/java/com/zrlog/service/ArticleService.java Repository: 94fzb/zrlog The code follows secure coding practices.
[ "CWE-79" ]
CVE-2019-16643
LOW
3.5
94fzb/zrlog
save
service/src/main/java/com/zrlog/service/ArticleService.java
4a91c83af669e31a22297c14f089d8911d353fa1
0
Analyze the following code function for security vulnerabilities
private String loadText(PackageItemInfo pii, int res, CharSequence nonLocalized) { if (nonLocalized != null) { return nonLocalized.toString(); } if (res != 0) { Resources r = getResources(pii); if (r != null) { try { return r.getString(res); } catch (Resources.NotFoundException e) { } } } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: loadText File: cmds/pm/src/com/android/commands/pm/Pm.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3833
HIGH
9.3
android
loadText
cmds/pm/src/com/android/commands/pm/Pm.java
4e4743a354e26467318b437892a9980eb9b8328a
0
Analyze the following code function for security vulnerabilities
@Override public int numOfService(long startTimestamp, long endTimestamp) throws IOException { StringBuilder sql = new StringBuilder(); List<Object> condition = new ArrayList<>(5); sql.append("select count(1) num from ").append(ServiceTraffic.INDEX_NAME).append(" where "); sql.append(ServiceTraffic.NODE_TYPE).append("=" + NodeType.Normal.value()); return getNum(sql, condition); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: numOfService File: oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/h2/dao/H2MetadataQueryDAO.java Repository: apache/skywalking The code follows secure coding practices.
[ "CWE-89" ]
CVE-2020-13921
HIGH
7.5
apache/skywalking
numOfService
oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/h2/dao/H2MetadataQueryDAO.java
ddb6d9a5019a9c1fe31c364485a4e4b5066fefc3
0
Analyze the following code function for security vulnerabilities
public void setProfileEnabled(@NonNull ComponentName admin) { throwIfParentInstance("setProfileEnabled"); if (mService != null) { try { mService.setProfileEnabled(admin); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setProfileEnabled 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
setProfileEnabled
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0