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 void delayedStop(final int waitTime, final String reason, Throwable cause) { if (waitTime > 0) { synchronized (this) { pendingStop = true; stopError = cause; } try { stopTaskRunnerFactory.execute(new Runnable() { @Override public void run() { try { Thread.sleep(waitTime); stopAsync(); LOG.info("Stopping {} because {}", transport.getRemoteAddress(), reason); } catch (InterruptedException e) { } } }); } catch (Throwable t) { LOG.warn("Cannot create stopAsync. This exception will be ignored.", t); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: delayedStop File: activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java Repository: apache/activemq The code follows secure coding practices.
[ "CWE-264" ]
CVE-2014-3576
MEDIUM
5
apache/activemq
delayedStop
activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
00921f2
0
Analyze the following code function for security vulnerabilities
@Override public String getParam(String name) { return request.getParameter(name); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getParam File: sa-token-starter/sa-token-servlet/src/main/java/cn/dev33/satoken/servlet/model/SaRequestForServlet.java Repository: dromara/Sa-Token The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-44794
CRITICAL
9.8
dromara/Sa-Token
getParam
sa-token-starter/sa-token-servlet/src/main/java/cn/dev33/satoken/servlet/model/SaRequestForServlet.java
954efeb73277f924f836da2a25322ea35ee1bfa3
0
Analyze the following code function for security vulnerabilities
public int getAppStartMode(int uid, String packageName) { synchronized (this) { return checkAllowBackgroundLocked(uid, packageName, -1, true); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAppStartMode File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3912
HIGH
9.3
android
getAppStartMode
services/core/java/com/android/server/am/ActivityManagerService.java
6c049120c2d749f0c0289d822ec7d0aa692f55c5
0
Analyze the following code function for security vulnerabilities
public void reportActivityFullyDrawn(IBinder token) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); data.writeStrongBinder(token); mRemote.transact(REPORT_ACTIVITY_FULLY_DRAWN_TRANSACTION, data, reply, 0); reply.readException(); data.recycle(); reply.recycle(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: reportActivityFullyDrawn File: core/java/android/app/ActivityManagerNative.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
reportActivityFullyDrawn
core/java/android/app/ActivityManagerNative.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
@Override public T setBoolean(K name, boolean value) { return set(name, fromBoolean(name, value)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setBoolean 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
setBoolean
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
0
Analyze the following code function for security vulnerabilities
public String getGroupSeparator() { return getProperty(PROP_GROUPS_SEPARATOR, String.class); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getGroupSeparator File: oidc-authenticator/src/main/java/org/xwiki/contrib/oidc/auth/internal/OIDCClientConfiguration.java Repository: xwiki-contrib/oidc The code follows secure coding practices.
[ "CWE-287" ]
CVE-2022-39387
HIGH
7.5
xwiki-contrib/oidc
getGroupSeparator
oidc-authenticator/src/main/java/org/xwiki/contrib/oidc/auth/internal/OIDCClientConfiguration.java
0247af1417925b9734ab106ad7cd934ee870ac89
0
Analyze the following code function for security vulnerabilities
@Override public void fillRadialGradient(Object graphics, int startColor, int endColor, int x, int y, int width, int height) { ((AndroidGraphics)graphics).fillRadialGradient(startColor, endColor, x, y, width, height); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: fillRadialGradient 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
fillRadialGradient
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
private void requestTransientBars(WindowState swipeTarget) { synchronized (mWindowManagerFuncs.getWindowManagerLock()) { if (!isUserSetupComplete()) { // Swipe-up for navigation bar is disabled during setup return; } boolean sb = mStatusBarController.checkShowTransientBarLw(); boolean nb = mNavigationBarController.checkShowTransientBarLw(); if (sb || nb) { WindowState barTarget = sb ? mStatusBar : mNavigationBar; if (sb ^ nb && barTarget != swipeTarget) { if (DEBUG) Slog.d(TAG, "Not showing transient bar, wrong swipe target"); return; } if (sb) mStatusBarController.showTransient(); if (nb) mNavigationBarController.showTransient(); mImmersiveModeConfirmation.confirmCurrentPrompt(); updateSystemUiVisibilityLw(); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: requestTransientBars File: policy/src/com/android/internal/policy/impl/PhoneWindowManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-0812
MEDIUM
6.6
android
requestTransientBars
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
84669ca8de55d38073a0dcb01074233b0a417541
0
Analyze the following code function for security vulnerabilities
public ServerBuilder blockingTaskExecutor(ScheduledExecutorService blockingTaskExecutor, boolean shutdownOnStop) { requireNonNull(blockingTaskExecutor, "blockingTaskExecutor"); virtualHostTemplate.blockingTaskExecutor(blockingTaskExecutor, shutdownOnStop); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: blockingTaskExecutor 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
blockingTaskExecutor
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
df7f85824a62e997b910b5d6194a3335841065fd
0
Analyze the following code function for security vulnerabilities
private void handleUnauthorizedResponse(Request request, Response response) throws IOException, ServletException { IDPWebRequestUtil webRequestUtil = new IDPWebRequestUtil(request, getIdpConfiguration(), keyManager); Document samlErrorResponse = null; String referer = request.getHeader("Referer"); String relayState = request.getParameter(GeneralConstants.RELAY_STATE); try { IDPType idpConfiguration = getIdpConfiguration(); samlErrorResponse = webRequestUtil.getErrorResponse(referer, JBossSAMLURIConstants.STATUS_AUTHNFAILED.get(), getIdentityURL(), idpConfiguration.isSupportsSignature()); WebRequestUtilHolder holder = webRequestUtil.getHolder(); holder.setResponseDoc(samlErrorResponse).setDestination(referer).setRelayState(relayState) .setAreWeSendingRequest(false).setPrivateKey(null).setSupportSignature(false).setServletResponse(response) .setErrorResponse(true); holder.setPostBindingRequested(webRequestUtil.hasSAMLRequestInPostProfile()); if (idpConfiguration.isSupportsSignature()) { holder.setSupportSignature(true).setPrivateKey(keyManager.getSigningKey()); } holder.setStrictPostBinding(idpConfiguration.isStrictPostBinding()); webRequestUtil.send(holder); } catch (GeneralSecurityException e) { throw new ServletException(e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handleUnauthorizedResponse File: picketlink-tomcat-common/src/main/java/org/picketlink/identity/federation/bindings/tomcat/idp/AbstractIDPValve.java Repository: picketlink/picketlink-bindings The code follows secure coding practices.
[ "CWE-264" ]
CVE-2015-3158
MEDIUM
4
picketlink/picketlink-bindings
handleUnauthorizedResponse
picketlink-tomcat-common/src/main/java/org/picketlink/identity/federation/bindings/tomcat/idp/AbstractIDPValve.java
341a37aefd69e67b6b5f6d775499730d6ccaff0d
0
Analyze the following code function for security vulnerabilities
public ApiClient setServerVariables(Map<String, String> serverVariables) { this.serverVariables = serverVariables; updateBasePath(); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setServerVariables File: samples/client/petstore/java/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
setServerVariables
samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
protected void doDSPost(Context context, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException, SQLException, AuthorizeException { doDSGet(context, request, response); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: doDSPost File: dspace-jspui/src/main/java/org/dspace/app/webui/servlet/ControlledVocabularyServlet.java Repository: DSpace The code follows secure coding practices.
[ "CWE-601", "CWE-79" ]
CVE-2022-31192
MEDIUM
6.1
DSpace
doDSPost
dspace-jspui/src/main/java/org/dspace/app/webui/servlet/ControlledVocabularyServlet.java
f7758457b7ec3489d525e39aa753cc70809d9ad9
0
Analyze the following code function for security vulnerabilities
protected void storeSession(VaadinSession session, WrappedSession wrappedSession) { assert VaadinSession.hasLock(this, wrappedSession); writeToHttpSession(wrappedSession, session); wrappedSession.setAttribute(getCsrfTokenAttributeName(), session.getCsrfToken()); session.refreshTransients(wrappedSession, this); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: storeSession File: flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java Repository: vaadin/flow The code follows secure coding practices.
[ "CWE-203" ]
CVE-2021-31404
LOW
1.9
vaadin/flow
storeSession
flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
621ef1b322737d963bee624b2d2e38cd739903d9
0
Analyze the following code function for security vulnerabilities
@Override public LocallyAvailableResource get(String... path) { final File file = getFileWhileCleaningInProgress(path); if (file.exists()) { return new DefaultLocallyAvailableResource(getFile(path), checksumService); } else { return null; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: get File: subprojects/core/src/main/java/org/gradle/internal/resource/local/DefaultPathKeyFileStore.java Repository: gradle The code follows secure coding practices.
[ "CWE-22" ]
CVE-2023-35946
MEDIUM
5.5
gradle
get
subprojects/core/src/main/java/org/gradle/internal/resource/local/DefaultPathKeyFileStore.java
859eae2b2acf751ae7db3c9ffefe275aa5da0d5d
0
Analyze the following code function for security vulnerabilities
public void setMatchUrlCache(boolean theMatchUrlCache) { myMatchUrlCache = theMatchUrlCache; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setMatchUrlCache File: hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java Repository: hapifhir/hapi-fhir The code follows secure coding practices.
[ "CWE-400" ]
CVE-2021-32053
MEDIUM
5
hapifhir/hapi-fhir
setMatchUrlCache
hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
f2934b229c491235ab0e7782dea86b324521082a
0
Analyze the following code function for security vulnerabilities
private void actionTruncate(Element ele, String tagName, NodeList eleChildNodes) { /* * Remove all attributes. This is for tags like i, b, u, etc. Purely * formatting without any need for attributes. It also removes any * children. */ NamedNodeMap nnmap = ele.getAttributes(); while (nnmap.getLength() > 0) { addError(ErrorMessageUtil.ERROR_ATTRIBUTE_NOT_IN_POLICY, new Object[]{tagName, HTMLEntityEncoder.htmlEntityEncode(nnmap.item(0).getNodeName())}); ele.removeAttribute(nnmap.item(0).getNodeName()); } int i = 0; int j = 0; int length = eleChildNodes.getLength(); while (i < length) { Node nodeToRemove = eleChildNodes.item(j); if (nodeToRemove.getNodeType() != Node.TEXT_NODE) { ele.removeChild(nodeToRemove); } else { j++; } i++; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: actionTruncate File: src/main/java/org/owasp/validator/html/scan/AntiSamyDOMScanner.java Repository: nahsra/antisamy The code follows secure coding practices.
[ "CWE-79" ]
CVE-2022-28367
MEDIUM
4.3
nahsra/antisamy
actionTruncate
src/main/java/org/owasp/validator/html/scan/AntiSamyDOMScanner.java
0199e7e194dba5e7d7197703f43ebe22401e61ae
0
Analyze the following code function for security vulnerabilities
@Override public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doGet(request, response); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: doPost File: src/edu/stanford/nlp/ie/ner/webapp/NERServlet.java Repository: stanfordnlp/CoreNLP The code follows secure coding practices.
[ "CWE-74" ]
CVE-2021-44550
HIGH
7.5
stanfordnlp/CoreNLP
doPost
src/edu/stanford/nlp/ie/ner/webapp/NERServlet.java
5ee097dbede547023e88f60ed3f430ff09398b87
0
Analyze the following code function for security vulnerabilities
@Override public void killPackageDependents(String packageName, int userId) { enforceCallingPermission(android.Manifest.permission.KILL_UID, "killPackageDependents()"); if (packageName == null) { throw new NullPointerException( "Cannot kill the dependents of a package without its name."); } long callingId = Binder.clearCallingIdentity(); IPackageManager pm = AppGlobals.getPackageManager(); int pkgUid = -1; try { pkgUid = pm.getPackageUid(packageName, MATCH_DEBUG_TRIAGED_MISSING, userId); } catch (RemoteException e) { } if (userId != UserHandle.USER_ALL && pkgUid == -1) { throw new IllegalArgumentException( "Cannot kill dependents of non-existing package " + packageName); } try { synchronized(this) { killPackageProcessesLocked(packageName, UserHandle.getAppId(pkgUid), userId, ProcessList.FOREGROUND_APP_ADJ, false, true, true, false, "dep: " + packageName); } } finally { Binder.restoreCallingIdentity(callingId); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: killPackageDependents File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-863" ]
CVE-2018-9492
HIGH
7.2
android
killPackageDependents
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
public float readFloat() throws TException { trans_.readAll(buffer, 0, 4); int value = bytesToInt(buffer); return Float.intBitsToFloat(value); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: readFloat File: thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java Repository: facebook/fbthrift The code follows secure coding practices.
[ "CWE-770" ]
CVE-2019-11938
MEDIUM
5
facebook/fbthrift
readFloat
thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java
08c2d412adb214c40bb03be7587057b25d053030
0
Analyze the following code function for security vulnerabilities
@Override public void generateData(T item, JsonObject jsonObject) { ColumnState state = getState(false); String communicationId = getConnectorId(); assert communicationId != null : "No communication ID set for column " + state.caption; JsonObject obj = getDataObject(jsonObject, DataCommunicatorConstants.DATA); obj.put(communicationId, generateRendererValue(item, presentationProvider, state.renderer)); String style = styleGenerator.apply(item); if (style != null && !style.isEmpty()) { JsonObject styleObj = getDataObject(jsonObject, GridState.JSONKEY_CELLSTYLES); styleObj.put(communicationId, style); } if (descriptionGenerator != null) { String description = descriptionGenerator.apply(item); if (description != null && !description.isEmpty()) { JsonObject descriptionObj = getDataObject(jsonObject, GridState.JSONKEY_CELLDESCRIPTION); descriptionObj.put(communicationId, description); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: generateData File: server/src/main/java/com/vaadin/ui/Grid.java Repository: vaadin/framework The code follows secure coding practices.
[ "CWE-79" ]
CVE-2019-25028
MEDIUM
4.3
vaadin/framework
generateData
server/src/main/java/com/vaadin/ui/Grid.java
c40bed109c3723b38694ed160ea647fef5b28593
0
Analyze the following code function for security vulnerabilities
public static void prettyPrintXML(final InputStream inputStream, final OutputStream outputStream) { final Reader reader = new InputStreamReader(inputStream, StreamUtil.DEFAULT_CHARSET); final Writer writer = new OutputStreamWriter(outputStream, StreamUtil.DEFAULT_CHARSET); prettyPrintXML(reader, writer); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: prettyPrintXML File: stroom-core-server/src/main/java/stroom/entity/server/util/XMLUtil.java Repository: gchq/stroom The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-1000651
HIGH
7.5
gchq/stroom
prettyPrintXML
stroom-core-server/src/main/java/stroom/entity/server/util/XMLUtil.java
ba30ffd415bd7d32ee40ba4b04035267ce80b499
0
Analyze the following code function for security vulnerabilities
public void resetLastXrefPartial() { lastXrefPartial = -1; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: resetLastXrefPartial 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
resetLastXrefPartial
java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
9b0cbb76c8434a8505f02ada02a94263dcae9247
0
Analyze the following code function for security vulnerabilities
@Override public void dumpForOom(PrintWriter pw) { synchronized (mGlobalLock) { pw.println(" mHomeProcess: " + mHomeProcess); pw.println(" mPreviousProcess: " + mPreviousProcess); if (mHeavyWeightProcess != null) { pw.println(" mHeavyWeightProcess: " + mHeavyWeightProcess); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: dumpForOom 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
dumpForOom
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
1120bc7e511710b1b774adf29ba47106292365e7
0
Analyze the following code function for security vulnerabilities
private synchronized int getLastAssignedStreamOtherSide() { return lastAssignedStreamOtherSide; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLastAssignedStreamOtherSide File: core/src/main/java/io/undertow/protocols/http2/Http2Channel.java Repository: undertow-io/undertow The code follows secure coding practices.
[ "CWE-214" ]
CVE-2021-3859
HIGH
7.5
undertow-io/undertow
getLastAssignedStreamOtherSide
core/src/main/java/io/undertow/protocols/http2/Http2Channel.java
e43f0ada3f4da6e8579e0020cec3cb1a81e487c2
0
Analyze the following code function for security vulnerabilities
@Sessional @Override public String getAvatarUrl(User user) { if (user.isUnknown()) { return AVATARS_BASE_URL + "user.png"; } else if (user.isSystem()) { return AVATARS_BASE_URL + "onedev.png"; } else { File uploadedFile = getUploaded(user); if (uploadedFile.exists()) return AVATARS_BASE_URL + "uploaded/users/" + user.getId() + ".jpg?version=" + uploadedFile.lastModified(); EmailAddress emailAddress = user.getPrimaryEmailAddress(); if (emailAddress == null || !emailAddress.isVerified()) return generateAvatar(user.getName(), null); else if (settingManager.getSystemSetting().isGravatarEnabled()) return Gravatar.getURL(emailAddress.getValue(), GRAVATAR_SIZE); else return generateAvatar(user.getName(), emailAddress.getValue()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAvatarUrl File: server-core/src/main/java/io/onedev/server/web/avatar/DefaultAvatarManager.java Repository: theonedev/onedev The code follows secure coding practices.
[ "CWE-552" ]
CVE-2022-39208
HIGH
7.5
theonedev/onedev
getAvatarUrl
server-core/src/main/java/io/onedev/server/web/avatar/DefaultAvatarManager.java
8aa94e0daf8447cdf76d4f27bfda0a85a7ea5822
0
Analyze the following code function for security vulnerabilities
protected String getStudyGroupClassSql(int studyId) { return "select sgc.study_group_class_id, sgc.name as sgc_name, gct.name as sgc_type, sgc.status_id," + " sgc.subject_assignment, sg.study_group_id, sg.name as sg_name, sg.description from study_group_class sgc," + " study_group sg, group_class_types gct where study_id in (" + studyId + ")" + " and sgc.study_group_class_id = sg.study_group_class_id" + " and sgc.group_class_type_id = gct.group_class_type_id order by sgc.study_group_class_id"; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getStudyGroupClassSql File: core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java Repository: OpenClinica The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-24831
HIGH
7.5
OpenClinica
getStudyGroupClassSql
core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
b152cc63019230c9973965a98e4386ea5322c18f
0
Analyze the following code function for security vulnerabilities
private static boolean isWindows0() { boolean windows = "windows".equals(NORMALIZED_OS); if (windows) { logger.debug("Platform: Windows"); } return windows; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isWindows0 File: common/src/main/java/io/netty/util/internal/PlatformDependent.java Repository: netty The code follows secure coding practices.
[ "CWE-668", "CWE-378", "CWE-379" ]
CVE-2022-24823
LOW
1.9
netty
isWindows0
common/src/main/java/io/netty/util/internal/PlatformDependent.java
185f8b2756a36aaa4f973f1a2a025e7d981823f1
0
Analyze the following code function for security vulnerabilities
@Deprecated public List<String> getBackLinkedPages(XWikiContext context) throws XWikiException { return getStore(context).loadBacklinks(getFullName(), context, true); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getBackLinkedPages 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
getBackLinkedPages
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 static ActivityOptions makeSceneTransitionAnimation(Activity activity, View sharedElement, String sharedElementName) { return makeSceneTransitionAnimation(activity, Pair.create(sharedElement, sharedElementName)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: makeSceneTransitionAnimation File: core/java/android/app/ActivityOptions.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-20918
CRITICAL
9.8
android
makeSceneTransitionAnimation
core/java/android/app/ActivityOptions.java
51051de4eb40bb502db448084a83fd6cbfb7d3cf
0
Analyze the following code function for security vulnerabilities
@Override public Optional<Long> sizeIfKnown() { if (file.isFile()) { return Optional.of(file.length()); } else { return Optional.absent(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sizeIfKnown File: android/guava/src/com/google/common/io/Files.java Repository: google/guava The code follows secure coding practices.
[ "CWE-552" ]
CVE-2023-2976
HIGH
7.1
google/guava
sizeIfKnown
android/guava/src/com/google/common/io/Files.java
feb83a1c8fd2e7670b244d5afd23cba5aca43284
0
Analyze the following code function for security vulnerabilities
@Override public short getShort(K name, short defaultValue) { Short v = getShort(name); return v != null ? v : defaultValue; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getShort 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
getShort
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
0
Analyze the following code function for security vulnerabilities
void updateZoomControls();
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateZoomControls File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java Repository: chromium The code follows secure coding practices.
[ "CWE-20" ]
CVE-2014-3159
MEDIUM
6.4
chromium
updateZoomControls
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
98a50b76141f0b14f292f49ce376e6554142d5e2
0
Analyze the following code function for security vulnerabilities
public static final void appendValueToSql(StringBuilder sql, Object value) { if (value == null) { sql.append("NULL"); } else if (value instanceof Boolean) { Boolean bool = (Boolean)value; if (bool) { sql.append('1'); } else { sql.append('0'); } } else { appendEscapedSQLString(sql, value.toString()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: appendValueToSql File: core/java/android/database/DatabaseUtils.java Repository: android The code follows secure coding practices.
[ "CWE-502" ]
CVE-2023-40121
MEDIUM
5.5
android
appendValueToSql
core/java/android/database/DatabaseUtils.java
3287ac2d2565dc96bf6177967f8e3aed33954253
0
Analyze the following code function for security vulnerabilities
public static int defaultIdleConnectionInPoolTimeoutInMs() { return Integer.getInteger(ASYNC_CLIENT + "idleConnectionInPoolTimeoutInMs", 60 * 1000); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: defaultIdleConnectionInPoolTimeoutInMs File: src/main/java/com/ning/http/client/AsyncHttpClientConfigDefaults.java Repository: AsyncHttpClient/async-http-client The code follows secure coding practices.
[ "CWE-345" ]
CVE-2013-7398
MEDIUM
4.3
AsyncHttpClient/async-http-client
defaultIdleConnectionInPoolTimeoutInMs
src/main/java/com/ning/http/client/AsyncHttpClientConfigDefaults.java
a894583921c11c3b01f160ada36a8bb9d5158e96
0
Analyze the following code function for security vulnerabilities
public char readChar() throws IOException { return primitiveTypes.readChar(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: readChar File: luni/src/main/java/java/io/ObjectInputStream.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2014-7911
HIGH
7.2
android
readChar
luni/src/main/java/java/io/ObjectInputStream.java
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
0
Analyze the following code function for security vulnerabilities
@Override public void beginWikiDocument(String name, FilterEventParameters parameters) throws FilterException { super.beginWikiDocument(name, parameters); if (parameters.containsKey(WikiDocumentFilter.PARAMETER_LOCALE)) { this.currentDefaultLocale = get(Locale.class, WikiDocumentFilter.PARAMETER_LOCALE, parameters, Locale.ROOT); } else { this.currentDefaultLocale = this.localizationContext.getCurrentLocale(); } this.currentLocale = Locale.ROOT; this.currentLocaleParameters = parameters; begin(parameters); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: beginWikiDocument File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/filter/output/XWikiDocumentOutputFilterStream.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-459" ]
CVE-2023-36468
HIGH
8.8
xwiki/xwiki-platform
beginWikiDocument
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/filter/output/XWikiDocumentOutputFilterStream.java
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
0
Analyze the following code function for security vulnerabilities
@Override public NavigationHistory getDirectedNavigationHistory(boolean isForward, int itemLimit) { NavigationHistory history = new NavigationHistory(); if (mNativeContentViewCore != 0) { nativeGetDirectedNavigationHistory( mNativeContentViewCore, history, isForward, itemLimit); } return history; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDirectedNavigationHistory File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java Repository: chromium The code follows secure coding practices.
[ "CWE-20" ]
CVE-2014-3159
MEDIUM
6.4
chromium
getDirectedNavigationHistory
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
98a50b76141f0b14f292f49ce376e6554142d5e2
0
Analyze the following code function for security vulnerabilities
@Override public StackInfo getStackInfo(int windowingMode, int activityType) { enforceCallerIsRecentsOrHasPermission(MANAGE_ACTIVITY_STACKS, "getStackInfo()"); long ident = Binder.clearCallingIdentity(); try { synchronized (this) { return mStackSupervisor.getStackInfo(windowingMode, activityType); } } finally { Binder.restoreCallingIdentity(ident); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getStackInfo File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-863" ]
CVE-2018-9492
HIGH
7.2
android
getStackInfo
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
public JSONObject put(String key, Collection value) throws JSONException { put(key, new JSONArray(value)); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: put 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
put
src/main/java/org/codehaus/jettison/json/JSONObject.java
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
0
Analyze the following code function for security vulnerabilities
@Override public void enqueueToast(String pkg, ITransientNotification callback, int duration) { if (DBG) { Slog.i(TAG, "enqueueToast pkg=" + pkg + " callback=" + callback + " duration=" + duration); } if (pkg == null || callback == null) { Slog.e(TAG, "Not doing toast. pkg=" + pkg + " callback=" + callback); return ; } final boolean isSystemToast = isCallerSystem() || ("android".equals(pkg)); final boolean isPackageSuspended = isPackageSuspendedForUser(pkg, Binder.getCallingUid()); if (ENABLE_BLOCKED_TOASTS && (!noteNotificationOp(pkg, Binder.getCallingUid()) || isPackageSuspended)) { if (!isSystemToast) { Slog.e(TAG, "Suppressing toast from package " + pkg + (isPackageSuspended ? " due to package suspended by administrator." : " by user request.")); return; } } synchronized (mToastQueue) { int callingPid = Binder.getCallingPid(); long callingId = Binder.clearCallingIdentity(); try { ToastRecord record; int index = indexOfToastLocked(pkg, callback); // If it's already in the queue, we update it in place, we don't // move it to the end of the queue. if (index >= 0) { record = mToastQueue.get(index); record.update(duration); } else { // Limit the number of toasts that any given package except the android // package can enqueue. Prevents DOS attacks and deals with leaks. if (!isSystemToast) { int count = 0; final int N = mToastQueue.size(); for (int i=0; i<N; i++) { final ToastRecord r = mToastQueue.get(i); if (r.pkg.equals(pkg)) { count++; if (count >= MAX_PACKAGE_NOTIFICATIONS) { Slog.e(TAG, "Package has already posted " + count + " toasts. Not showing more. Package=" + pkg); return; } } } } record = new ToastRecord(callingPid, pkg, callback, duration); mToastQueue.add(record); index = mToastQueue.size() - 1; keepProcessAliveLocked(callingPid); } // If it's at index 0, it's the current toast. It doesn't matter if it's // new or just been updated. Call back and tell it to show itself. // If the callback fails, this will remove it from the list, so don't // assume that it's valid after this. if (index == 0) { showNextToastLocked(); } } finally { Binder.restoreCallingIdentity(callingId); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: enqueueToast 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
enqueueToast
services/core/java/com/android/server/notification/NotificationManagerService.java
61e9103b5725965568e46657f4781dd8f2e5b623
0
Analyze the following code function for security vulnerabilities
@GuardedBy("mLock") boolean isUidForegroundLocked(int uid) { if (uid == Process.SYSTEM_UID) { // IUidObserver doesn't report the state of SYSTEM, but it always has bound services, // so it's foreground anyway. return true; } // First, check with the local cache. if (isProcessStateForeground(mUidState.get(uid, ActivityManager.MAX_PROCESS_STATE))) { return true; } // If the cache says background, reach out to AM. Since it'll internally need to hold // the AM lock, we use it as a last resort. return isProcessStateForeground(mActivityManagerInternal.getUidProcessState(uid)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isUidForegroundLocked File: services/core/java/com/android/server/pm/ShortcutService.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40079
HIGH
7.8
android
isUidForegroundLocked
services/core/java/com/android/server/pm/ShortcutService.java
96e0524c48c6e58af7d15a2caf35082186fc8de2
0
Analyze the following code function for security vulnerabilities
@JsonProperty("Name") public String getName() { return name; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getName File: base/common/src/main/java/org/dogtagpki/common/Info.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
getName
base/common/src/main/java/org/dogtagpki/common/Info.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
@Override public void syncIssues(Project project, List<IssuesDao> issues) { HashMap<String, List<CustomFieldResourceDTO>> customFieldMap = new HashMap<>(); issues.forEach(item -> { IssuesWithBLOBs issue = issuesMapper.selectByPrimaryKey(item.getId()); Map bug = zentaoClient.getBugById(item.getPlatformId()); issue = getUpdateIssues(issue, bug); customFieldMap.put(item.getId(), baseCustomFieldService.getCustomFieldResourceDTO(issue.getCustomFields())); issue.setId(item.getId()); issuesMapper.updateByPrimaryKeySelective(issue); syncZentaoIssueAttachments(issue); }); customFieldIssuesService.batchEditFields(customFieldMap); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: syncIssues File: test-track/backend/src/main/java/io/metersphere/service/issue/platform/ZentaoPlatform.java Repository: metersphere The code follows secure coding practices.
[ "CWE-918" ]
CVE-2022-23544
MEDIUM
6.1
metersphere
syncIssues
test-track/backend/src/main/java/io/metersphere/service/issue/platform/ZentaoPlatform.java
d0f95b50737c941b29d507a4cc3545f2dc6ab121
0
Analyze the following code function for security vulnerabilities
@Override public Object getItem(int position) { // We have nothing useful to return here. return position; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getItem File: core/java/com/android/internal/app/ChooserActivity.java Repository: android The code follows secure coding practices.
[ "CWE-254", "CWE-19" ]
CVE-2016-3752
HIGH
7.5
android
getItem
core/java/com/android/internal/app/ChooserActivity.java
ddbf2db5b946be8fdc45c7b0327bf560b2a06988
0
Analyze the following code function for security vulnerabilities
@Override protected List<Contentlet> findAllVersions(Identifier identifier) throws DotDataException, DotStateException, DotSecurityException { if(!InodeUtils.isSet(identifier.getInode())) return new ArrayList<Contentlet>(); DotConnect dc = new DotConnect(); dc.setSQL("SELECT inode FROM contentlet WHERE identifier=? order by mod_date desc"); dc.addObject(identifier.getId()); List<Map<String,Object>> list=dc.loadObjectResults(); ArrayList<String> inodes=new ArrayList<String>(list.size()); for(Map<String,Object> r : list) inodes.add(r.get("inode").toString()); return findContentlets(inodes); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: findAllVersions File: src/com/dotcms/content/elasticsearch/business/ESContentFactoryImpl.java Repository: dotCMS/core The code follows secure coding practices.
[ "CWE-89" ]
CVE-2016-2355
HIGH
7.5
dotCMS/core
findAllVersions
src/com/dotcms/content/elasticsearch/business/ESContentFactoryImpl.java
897f3632d7e471b7a73aabed5b19f6f53d4e5562
0
Analyze the following code function for security vulnerabilities
protected QuestionItemImpl processItem(AssessmentItem assessmentItem, String comment, String originalItemFilename, String editor, String editorVersion, AssessmentItemMetadata metadata) { String dir = qpoolFileStorage.generateDir(); return processItem(assessmentItem, comment, originalItemFilename, editor, editorVersion, dir, metadata); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: processItem File: src/main/java/org/olat/ims/qti21/pool/QTI21ImportProcessor.java Repository: OpenOLAT The code follows secure coding practices.
[ "CWE-22" ]
CVE-2021-39180
HIGH
9
OpenOLAT
processItem
src/main/java/org/olat/ims/qti21/pool/QTI21ImportProcessor.java
5668a41ab3f1753102a89757be013487544279d5
0
Analyze the following code function for security vulnerabilities
private static void sendRequestAsBytes(HttpURLConnection connection, byte[] data) throws IOException { connection.setFixedLengthStreamingMode(data.length); try (OutputStream os = connection.getOutputStream()) { os.write(data); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sendRequestAsBytes File: src/net/sourceforge/plantuml/security/SURL.java Repository: plantuml The code follows secure coding practices.
[ "CWE-284" ]
CVE-2023-3431
MEDIUM
5.3
plantuml
sendRequestAsBytes
src/net/sourceforge/plantuml/security/SURL.java
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
0
Analyze the following code function for security vulnerabilities
@Deprecated @Override public int startActivity(IApplicationThread caller, String callingPackage, Intent intent, String resolvedType, IBinder resultTo, String resultWho, int requestCode, int startFlags, ProfilerInfo profilerInfo, Bundle bOptions) { return mActivityTaskManager.startActivity(caller, callingPackage, null, intent, resolvedType, resultTo, resultWho, requestCode, startFlags, profilerInfo, bOptions); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: startActivity File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21292
MEDIUM
5.5
android
startActivity
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
protected String getParentItemOIDsSql(String crfVersionIds) { return "select item_id, oc_oid from item where item_id in (select distinct parent_id from item_form_metadata ifm" + " where crf_version_id in (" + crfVersionIds + ") and ifm.parent_id > 0 )"; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getParentItemOIDsSql File: core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java Repository: OpenClinica The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-24831
HIGH
7.5
OpenClinica
getParentItemOIDsSql
core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
b152cc63019230c9973965a98e4386ea5322c18f
0
Analyze the following code function for security vulnerabilities
void updatePictureInPictureActions( @DrawableRes int iconId, String title, int requestCode) { if (isGreaterEqualOreo() && isPipModePossible()) { final ArrayList<RemoteAction> actions = new ArrayList<>(); final Icon icon = Icon.createWithResource(this, iconId); final PendingIntent intent = PendingIntent.getBroadcast( this, requestCode, new Intent(MICROPHONE_PIP_INTENT_NAME).putExtra(MICROPHONE_PIP_INTENT_EXTRA_ACTION, requestCode), 0); actions.add(new RemoteAction(icon, title, title, intent)); mPictureInPictureParamsBuilder.setActions(actions); setPictureInPictureParams(mPictureInPictureParamsBuilder.build()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updatePictureInPictureActions 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
updatePictureInPictureActions
app/src/main/java/com/nextcloud/talk/activities/CallActivity.java
bb7e82fbcbd8c10d0d0128d736c41cec0f79e7d0
0
Analyze the following code function for security vulnerabilities
private void releaseAllLocksForCurrentUser(final XWikiContext ctx) { try { executeWrite(ctx, session -> { final Query query = session.createQuery("delete from XWikiLock as lock where lock.userName=:userName"); // Using deprecated getUser() because this is how locks are created. // It would be a maintainibility disaster to use different code paths // for calculating names when creating and removing. query.setParameter("userName", ctx.getUser()); query.executeUpdate(); return null; }); } catch (Exception e) { String msg = "Error while deleting active locks held by user."; try { this.endTransaction(ctx, false); } catch (Exception utoh) { msg += " Failed to commit OR rollback [" + utoh.getMessage() + "]"; } throw new UnexpectedException(msg, e); } // If we're in a non-main wiki & the user is global, // switch to the global wiki and delete locks held there. if (!ctx.isMainWiki() && ctx.isMainWiki(ctx.getUserReference().getWikiReference().getName())) { final String cdb = ctx.getWikiId(); try { ctx.setWikiId(ctx.getMainXWiki()); this.releaseAllLocksForCurrentUser(ctx); } finally { ctx.setWikiId(cdb); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: releaseAllLocksForCurrentUser 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
releaseAllLocksForCurrentUser
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 Set<String> checkForDuplicateEntries( List<CentralDirectoryRecord> cdRecords, Result result) { Set<String> cdEntryNames = new HashSet<>(cdRecords.size()); Set<String> duplicateCdEntryNames = null; for (CentralDirectoryRecord cdRecord : cdRecords) { String entryName = cdRecord.getName(); if (!cdEntryNames.add(entryName)) { // This is an error. Report this once per duplicate name. if (duplicateCdEntryNames == null) { duplicateCdEntryNames = new HashSet<>(); } if (duplicateCdEntryNames.add(entryName)) { result.addError(Issue.JAR_SIG_DUPLICATE_ZIP_ENTRY, entryName); } } } return cdEntryNames; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkForDuplicateEntries File: src/main/java/com/android/apksig/internal/apk/v1/V1SchemeVerifier.java Repository: android The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-21253
MEDIUM
5.5
android
checkForDuplicateEntries
src/main/java/com/android/apksig/internal/apk/v1/V1SchemeVerifier.java
41d882324288085fd32ae0bb70dc85f5fd0e2be7
0
Analyze the following code function for security vulnerabilities
@TestApi public long getLastBugReportRequestTime() { try { return mService.getLastBugReportRequestTime(); } catch (RemoteException re) { throw re.rethrowFromSystemServer(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLastBugReportRequestTime 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
getLastBugReportRequestTime
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
byte[] getBuffer() { return buf; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getBuffer File: android/guava/src/com/google/common/io/FileBackedOutputStream.java Repository: google/guava The code follows secure coding practices.
[ "CWE-552" ]
CVE-2023-2976
HIGH
7.1
google/guava
getBuffer
android/guava/src/com/google/common/io/FileBackedOutputStream.java
feb83a1c8fd2e7670b244d5afd23cba5aca43284
0
Analyze the following code function for security vulnerabilities
public boolean isUsingUnifiedPassword(@NonNull ComponentName admin) { throwIfParentInstance("isUsingUnifiedPassword"); if (mService != null) { try { return mService.isUsingUnifiedPassword(admin); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isUsingUnifiedPassword 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
isUsingUnifiedPassword
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
private void createRestCache() throws Exception { RestServer restServer = startProtocolServer(findFreePort(), p -> { RestServerConfigurationBuilder builder = new RestServerConfigurationBuilder(); builder.port(p); rest = new RestServer(); rest.start(builder.build(), cacheManager); return rest; }); restPort = restServer.getPort(); restClient = new HttpClient(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createRestCache File: integrationtests/compatibility-mode-it/src/test/java/org/infinispan/it/compatibility/CompatibilityCacheFactory.java Repository: infinispan The code follows secure coding practices.
[ "CWE-502" ]
CVE-2017-15089
MEDIUM
6.5
infinispan
createRestCache
integrationtests/compatibility-mode-it/src/test/java/org/infinispan/it/compatibility/CompatibilityCacheFactory.java
69be66141eee7abb1c47d46f0a6b74b079709f4b
0
Analyze the following code function for security vulnerabilities
public boolean equalsData(XWikiDocument otherDocument) { // Same Java object, they sure are equal if (this == otherDocument) { return true; } if (ObjectUtils.notEqual(getParentReference(), otherDocument.getParentReference())) { return false; } if (!getFormat().equals(otherDocument.getFormat())) { return false; } if (!getTitle().equals(otherDocument.getTitle())) { return false; } if (!getContent().equals(otherDocument.getContent())) { return false; } if (!getDefaultTemplate().equals(otherDocument.getDefaultTemplate())) { return false; } if (!getValidationScript().equals(otherDocument.getValidationScript())) { return false; } if (ObjectUtils.notEqual(getSyntax(), otherDocument.getSyntax())) { return false; } if (isHidden() != otherDocument.isHidden()) { return false; } // XClass if (!getXClass().equals(otherDocument.getXClass())) { return false; } // XObjects Set<DocumentReference> myObjectClassReferences = getXObjects().keySet(); Set<DocumentReference> otherObjectClassReferences = otherDocument.getXObjects().keySet(); if (!myObjectClassReferences.equals(otherObjectClassReferences)) { return false; } for (DocumentReference reference : myObjectClassReferences) { List<BaseObject> myObjects = getXObjects(reference); List<BaseObject> otherObjects = otherDocument.getXObjects(reference); if (myObjects.size() != otherObjects.size()) { return false; } for (int i = 0; i < myObjects.size(); i++) { if ((myObjects.get(i) == null && otherObjects.get(i) != null) || (myObjects.get(i) != null && otherObjects.get(i) == null)) { return false; } if (myObjects.get(i) == null && otherObjects.get(i) == null) { continue; } if (!myObjects.get(i).equals(otherObjects.get(i))) { return false; } } } // Attachments List<XWikiAttachment> attachments = getAttachmentList(); List<XWikiAttachment> otherAttachments = otherDocument.getAttachmentList(); if (attachments.size() != otherAttachments.size()) { return false; } for (XWikiAttachment attachment : attachments) { XWikiAttachment otherAttachment = otherDocument.getAttachment(attachment.getFilename()); try { if (otherAttachment == null || !attachment.equalsData(otherAttachment, null)) { return false; } } catch (XWikiException e) { throw new RuntimeException( String.format("Failed to compare attachments with reference [%s]", attachment.getReference()), e); } } return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: equalsData 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
equalsData
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
protected static String substituteUrl(final HttpServletRequest request, final String tmpl) { final String[] replacements = { request.getScheme(), // %s request.getServerName(), // %h Integer.toString(request.getServerPort()), // %p getHostHeader(request), // %x request.getContextPath() // %c }; final StringBuilder out = new StringBuilder(48); for (int i = 0; i < tmpl.length();) { final char c = tmpl.charAt(i++); if (c == '%' && i < tmpl.length()) { final char d = tmpl.charAt(i++); for (int key = 0; key < substKeywords.length; ++key) { if (d == substKeywords[key]) { out.append(replacements[key]); break; } } } else { out.append(c); } } return out.toString(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: substituteUrl File: opennms-web-api/src/main/java/org/opennms/web/api/Util.java Repository: OpenNMS/opennms The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-0869
MEDIUM
6.1
OpenNMS/opennms
substituteUrl
opennms-web-api/src/main/java/org/opennms/web/api/Util.java
66b4ba96a18b9952f25a350bbccc2a7e206238d1
0
Analyze the following code function for security vulnerabilities
protected void customizeClientBuilder(ClientBuilder clientBuilder) { // No-op extension point }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: customizeClientBuilder File: samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java Repository: OpenAPITools/openapi-generator The code follows secure coding practices.
[ "CWE-668" ]
CVE-2021-21430
LOW
2.1
OpenAPITools/openapi-generator
customizeClientBuilder
samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
public static Predicate<File> isFile() { return FilePredicate.IS_FILE; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isFile File: guava/src/com/google/common/io/Files.java Repository: google/guava The code follows secure coding practices.
[ "CWE-552" ]
CVE-2023-2976
HIGH
7.1
google/guava
isFile
guava/src/com/google/common/io/Files.java
feb83a1c8fd2e7670b244d5afd23cba5aca43284
0
Analyze the following code function for security vulnerabilities
public void createUserAndLogin(final String username, final String password, Object... properties) { createUserAndLoginWithRedirect(username, password, getURLToNonExistentPage(), properties); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createUserAndLogin 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
createUserAndLogin
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
private boolean isAnyMethod(List<HttpMethod> allowedMethods) { return allowedMethods == CorsOriginConfiguration.ANY_METHOD; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isAnyMethod File: http-server/src/main/java/io/micronaut/http/server/cors/CorsFilter.java Repository: micronaut-projects/micronaut-core The code follows secure coding practices.
[ "CWE-400" ]
CVE-2022-21700
MEDIUM
5
micronaut-projects/micronaut-core
isAnyMethod
http-server/src/main/java/io/micronaut/http/server/cors/CorsFilter.java
b8ec32c311689667c69ae7d9f9c3b3a8abc96fe3
0
Analyze the following code function for security vulnerabilities
@Unstable public Object getObject(ObjectReference objectReference, boolean create) { try { BaseObject obj = this.getDoc().getXObject(objectReference, create, getXWikiContext()); return obj == null ? null : newObjectApi(obj, getXWikiContext()); } catch (Exception e) { return null; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getObject File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-648" ]
CVE-2023-29507
HIGH
7.2
xwiki/xwiki-platform
getObject
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
905cdd7c421dbf8c565557cdc773ab1aa9028f83
0
Analyze the following code function for security vulnerabilities
protected Http2ConnectionDecoder decoder() { return decoder; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: decoder File: codec-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2ConnectionHandlerBuilder.java Repository: netty The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-44487
HIGH
7.5
netty
decoder
codec-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2ConnectionHandlerBuilder.java
58f75f665aa81a8cbcf6ffa74820042a285c5e61
0
Analyze the following code function for security vulnerabilities
public static Structure getDefaultStructure() { Structure structure = null; String dbTrue = com.dotmarketing.db.DbConnectionFactory.getDBTrue(); String condition = "default_structure = " + dbTrue; List list = InodeFactory.getInodesOfClassByCondition(Structure.class,condition); if (list.size() > 0) { structure = (Structure) list.get(0); } else { structure = new Structure(); } return structure; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDefaultStructure File: src/com/dotmarketing/portlets/structure/factories/StructureFactory.java Repository: dotCMS/core The code follows secure coding practices.
[ "CWE-89" ]
CVE-2016-2355
HIGH
7.5
dotCMS/core
getDefaultStructure
src/com/dotmarketing/portlets/structure/factories/StructureFactory.java
897f3632d7e471b7a73aabed5b19f6f53d4e5562
0
Analyze the following code function for security vulnerabilities
public int enableSystemApp(@NonNull ComponentName admin, Intent intent) { throwIfParentInstance("enableSystemApp"); if (mService != null) { try { return mService.enableSystemAppWithIntent(admin, mContext.getPackageName(), intent); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } return 0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: enableSystemApp 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
enableSystemApp
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
private static byte[] init__puma_parser_indicies_0() { return new byte [] { 0, 0, 0, 0, 0, 1, 2, 3, 3, 3, 3, 3, 1, 4, 5, 6, 7, 5, 5, 5, 1, 8, 9, 1, 10, 1, 11, 1, 12, 1, 13, 1, 14, 1, 15, 1, 16, 15, 1, 17, 1, 18, 17, 1, 19, 1, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 1, 22, 1, 23, 24, 23, 23, 23, 23, 23, 23, 23, 23, 1, 26, 27, 25, 29, 28, 30, 1, 1, 1, 1, 1, 31, 32, 1, 1, 1, 1, 1, 33, 34, 35, 34, 34, 34, 34, 1, 8, 1, 9, 1, 1, 1, 1, 35, 36, 1, 38, 1, 1, 39, 1, 1, 37, 40, 1, 42, 1, 1, 1, 1, 41, 43, 1, 45, 1, 1, 1, 1, 44, 2, 46, 46, 46, 46, 46, 1, 2, 47, 47, 47, 47, 47, 1, 2, 48, 48, 48, 48, 48, 1, 2, 49, 49, 49, 49, 49, 1, 2, 50, 50, 50, 50, 50, 1, 2, 51, 51, 51, 51, 51, 1, 2, 52, 52, 52, 52, 52, 1, 2, 53, 53, 53, 53, 53, 1, 2, 54, 54, 54, 54, 54, 1, 2, 55, 55, 55, 55, 55, 1, 2, 56, 56, 56, 56, 56, 1, 2, 57, 57, 57, 57, 57, 1, 2, 58, 58, 58, 58, 58, 1, 2, 59, 59, 59, 59, 59, 1, 2, 60, 60, 60, 60, 60, 1, 2, 61, 61, 61, 61, 61, 1, 2, 62, 62, 62, 62, 62, 1, 2, 63, 63, 63, 63, 63, 1, 2, 1, 1, 0 }; }
Vulnerability Classification: - CWE: CWE-444 - CVE: CVE-2021-41136 - Severity: LOW - CVSS Score: 3.6 Description: Merge pull request from GHSA-48w2-rm65-62xx * Fix HTTP request smuggling vulnerability See GHSA-48w2-rm65-62xx or CVE-2021-41136 for more info. * 4.3.9 release note * 5.5.1 release note * 5.5.1 Function: init__puma_parser_indicies_0 File: ext/puma_http11/org/jruby/puma/Http11Parser.java Repository: puma Fixed Code: private static byte[] init__puma_parser_indicies_0() { return new byte [] { 0, 0, 0, 0, 0, 1, 2, 3, 3, 3, 3, 3, 1, 4, 5, 6, 7, 5, 5, 5, 1, 8, 9, 1, 10, 1, 11, 1, 12, 1, 13, 1, 14, 1, 15, 1, 16, 15, 1, 17, 1, 18, 17, 1, 19, 1, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 1, 22, 1, 23, 24, 23, 23, 23, 23, 23, 23, 23, 23, 1, 25, 26, 27, 25, 1, 28, 29, 28, 1, 30, 1, 1, 1, 1, 1, 31, 32, 1, 1, 1, 1, 1, 33, 34, 35, 34, 34, 34, 34, 1, 8, 1, 9, 1, 1, 1, 1, 35, 36, 1, 38, 1, 1, 39, 1, 1, 37, 40, 1, 42, 1, 1, 1, 1, 41, 43, 1, 45, 1, 1, 1, 1, 44, 2, 46, 46, 46, 46, 46, 1, 2, 47, 47, 47, 47, 47, 1, 2, 48, 48, 48, 48, 48, 1, 2, 49, 49, 49, 49, 49, 1, 2, 50, 50, 50, 50, 50, 1, 2, 51, 51, 51, 51, 51, 1, 2, 52, 52, 52, 52, 52, 1, 2, 53, 53, 53, 53, 53, 1, 2, 54, 54, 54, 54, 54, 1, 2, 55, 55, 55, 55, 55, 1, 2, 56, 56, 56, 56, 56, 1, 2, 57, 57, 57, 57, 57, 1, 2, 58, 58, 58, 58, 58, 1, 2, 59, 59, 59, 59, 59, 1, 2, 60, 60, 60, 60, 60, 1, 2, 61, 61, 61, 61, 61, 1, 2, 62, 62, 62, 62, 62, 1, 2, 63, 63, 63, 63, 63, 1, 2, 1, 1, 0 }; }
[ "CWE-444" ]
CVE-2021-41136
LOW
3.6
puma
init__puma_parser_indicies_0
ext/puma_http11/org/jruby/puma/Http11Parser.java
acdc3ae571dfae0e045cf09a295280127db65c7f
1
Analyze the following code function for security vulnerabilities
final Intent verifyBroadcastLocked(Intent intent) { // Refuse possible leaked file descriptors if (intent != null && intent.hasFileDescriptors() == true) { throw new IllegalArgumentException("File descriptors passed in Intent"); } int flags = intent.getFlags(); if (!mProcessesReady) { // if the caller really truly claims to know what they're doing, go // ahead and allow the broadcast without launching any receivers if ((flags&Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT) != 0) { // This will be turned into a FLAG_RECEIVER_REGISTERED_ONLY later on if needed. } else if ((flags&Intent.FLAG_RECEIVER_REGISTERED_ONLY) == 0) { Slog.e(TAG, "Attempt to launch receivers of broadcast intent " + intent + " before boot completion"); throw new IllegalStateException("Cannot broadcast before boot completed"); } } if ((flags&Intent.FLAG_RECEIVER_BOOT_UPGRADE) != 0) { throw new IllegalArgumentException( "Can't use FLAG_RECEIVER_BOOT_UPGRADE here"); } if ((flags & Intent.FLAG_RECEIVER_FROM_SHELL) != 0) { switch (Binder.getCallingUid()) { case ROOT_UID: case SHELL_UID: break; default: Slog.w(TAG, "Removing FLAG_RECEIVER_FROM_SHELL because caller is UID " + Binder.getCallingUid()); intent.removeFlags(Intent.FLAG_RECEIVER_FROM_SHELL); break; } } return intent; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: verifyBroadcastLocked File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-863" ]
CVE-2018-9492
HIGH
7.2
android
verifyBroadcastLocked
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
public static final void delete(File file) throws IOException { if (file != null) { if (!file.delete()) { throw new IOException("Failed to delete file"); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: delete File: src/main/java/net/sf/mpxj/common/FileHelper.java Repository: joniles/mpxj The code follows secure coding practices.
[ "CWE-377", "CWE-200" ]
CVE-2022-41954
LOW
3.3
joniles/mpxj
delete
src/main/java/net/sf/mpxj/common/FileHelper.java
ae0af24345d79ad45705265d9927fe55e94a5721
0
Analyze the following code function for security vulnerabilities
private void clearManagedSubscriptionsPolicy() { unregisterOnSubscriptionsChangedListener(); SubscriptionManager subscriptionManager = mContext.getSystemService( SubscriptionManager.class); //Iterate over all the subscriptions and remove association with any user. int[] subscriptionIds = subscriptionManager.getActiveSubscriptionIdList(false); for (int subId : subscriptionIds) { subscriptionManager.setSubscriptionUserHandle(subId, null); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: clearManagedSubscriptionsPolicy 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
clearManagedSubscriptionsPolicy
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
public void systemReady() { mPolicy.systemReady(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: systemReady 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
systemReady
services/core/java/com/android/server/wm/WindowManagerService.java
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
0
Analyze the following code function for security vulnerabilities
public void reduction(List<String> ids) { if (CollectionUtils.isNotEmpty(ids)) { extApiScenarioMapper.checkOriginalStatusByIds(ids); //检查原来模块是否还在 ApiScenarioExample example = new ApiScenarioExample(); example.createCriteria().andIdIn(ids); List<ApiScenario> scenarioList = apiScenarioMapper.selectByExample(example); Map<String, List<ApiScenario>> nodeMap = new HashMap<>(); for (ApiScenario api : scenarioList) { String moduleId = api.getApiScenarioModuleId(); if (StringUtils.isEmpty(moduleId)) { moduleId = ""; } if (nodeMap.containsKey(moduleId)) { nodeMap.get(moduleId).add(api); } else { List<ApiScenario> list = new ArrayList<>(); list.add(api); nodeMap.put(moduleId, list); } } ApiScenarioModuleService apiScenarioModuleService = CommonBeanFactory.getBean(ApiScenarioModuleService.class); for (Map.Entry<String, List<ApiScenario>> entry : nodeMap.entrySet()) { String nodeId = entry.getKey(); List<ApiScenario> scenariosListItem = entry.getValue(); Map<String, List<ApiScenario>> projectMap = scenariosListItem.stream().collect(Collectors.groupingBy(ApiScenario::getProjectId)); for (Map.Entry<String, List<ApiScenario>> projectEntry : projectMap.entrySet()) { String projectId = projectEntry.getKey(); List<ApiScenario> checkList = projectEntry.getValue(); if (StringUtils.isNotEmpty(projectId)) { long nodeCount = apiScenarioModuleService.countById(nodeId); if (nodeCount <= 0) { ApiScenarioModule node = apiScenarioModuleService.getDefaultNode(projectId); for (ApiScenario testCase : checkList) { ApiScenarioWithBLOBs updateCase = new ApiScenarioWithBLOBs(); updateCase.setId(testCase.getId()); updateCase.setApiScenarioModuleId(node.getId()); updateCase.setModulePath("/" + node.getName()); apiScenarioMapper.updateByPrimaryKeySelective(updateCase); } } } } } extApiScenarioMapper.reduction(ids); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: reduction 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
reduction
backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java
d74e02cdff47cdf7524d305d098db6ffb7f61b47
0
Analyze the following code function for security vulnerabilities
@Override public Route.Collection delete(final String path1, final String path2, final Route.Filter filter) { return new Route.Collection( new Route.Definition[]{delete(path1, filter), delete(path2, filter)}); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: delete 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
delete
jooby/src/main/java/org/jooby/Jooby.java
34f526028e6cd0652125baa33936ffb6a8a4a009
0
Analyze the following code function for security vulnerabilities
@Override public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException { String name = file.getFileName().toString().toLowerCase(); if(name != null && name.equals("imsmanifest.xml")) { imsmanifestFiles.add(file); } return FileVisitResult.CONTINUE; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: visitFile File: src/main/java/org/olat/ims/qti21/pool/QTI21ImportProcessor.java Repository: OpenOLAT The code follows secure coding practices.
[ "CWE-22" ]
CVE-2021-39180
HIGH
9
OpenOLAT
visitFile
src/main/java/org/olat/ims/qti21/pool/QTI21ImportProcessor.java
5668a41ab3f1753102a89757be013487544279d5
0
Analyze the following code function for security vulnerabilities
private Set<Servlet> handleDestroy(Lookup lookup, ServiceReference<?> reference) { Set<Servlet> servlets = new HashSet<>(); Bundle[] usingBundles = reference.getUsingBundles(); for (Bundle bundle : usingBundles) { Servlet servlet = (Servlet) bundle.getBundleContext() .getService(reference); if (servlet instanceof OSGiVaadinServlet) { ServletContext servletContext = ((VaadinServlet) servlet) .getServletContext(); Lookup servletLookup = new VaadinServletContext(servletContext) .getAttribute(Lookup.class); if (servletLookup == lookup) { servlets.add(servlet); } } } return servlets; }
Vulnerability Classification: - CWE: CWE-668 - CVE: CVE-2021-31407 - Severity: MEDIUM - CVSS Score: 5.0 Description: fix: avoid serving ServletContext resources by StaticFileServer fixes #50 Function: handleDestroy File: flow-osgi/src/main/java/com/vaadin/flow/osgi/support/servlet/OSGiVaadinServlet.java Repository: vaadin/osgi Fixed Code: private Set<Servlet> handleDestroy(Lookup lookup, ServiceReference<?> reference) { Set<Servlet> servlets = new HashSet<>(); Bundle[] usingBundles = reference.getUsingBundles(); usingBundles = usingBundles == null ? new Bundle[0] : usingBundles; for (Bundle bundle : usingBundles) { Servlet servlet = (Servlet) bundle.getBundleContext() .getService(reference); if (servlet instanceof OSGiVaadinServlet) { ServletContext servletContext = ((VaadinServlet) servlet) .getServletContext(); Lookup servletLookup = new VaadinServletContext(servletContext) .getAttribute(Lookup.class); if (servletLookup == lookup) { servlets.add(servlet); } } } return servlets; }
[ "CWE-668" ]
CVE-2021-31407
MEDIUM
5
vaadin/osgi
handleDestroy
flow-osgi/src/main/java/com/vaadin/flow/osgi/support/servlet/OSGiVaadinServlet.java
0b82a606eeafdf56a129630f00b9c55a5177b64b
1
Analyze the following code function for security vulnerabilities
@Override public boolean getScreenCaptureDisabled(ComponentName who, int userHandle, boolean parent) { if (!mHasFeature) { return false; } final CallerIdentity caller = getCallerIdentity(who); Preconditions.checkCallAuthorization(hasFullCrossUsersPermission(caller, userHandle)); if (parent) { Preconditions.checkCallAuthorization( isProfileOwnerOfOrganizationOwnedDevice(getCallerIdentity().getUserId())); } if (isPolicyEngineForFinanceFlagEnabled()) { Boolean disallowed = mDevicePolicyEngine.getResolvedPolicy( PolicyDefinition.SCREEN_CAPTURE_DISABLED, userHandle); return disallowed != null && disallowed; } else { return !mPolicyCache.isScreenCaptureAllowed(userHandle); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getScreenCaptureDisabled 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
getScreenCaptureDisabled
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
public MaterialRevision addRevisionsWithModifications(Material material, Modification... modifications) { final MaterialRevision revision = filterUnsaved(new MaterialRevision(material, modifications)); if (revision.getModifications().isEmpty()) { return revision; } transactionTemplate.execute(new TransactionCallbackWithoutResult() { @Override protected void doInTransactionWithoutResult(TransactionStatus status) { materialRepository.saveMaterialRevision(revision); } }); return revision; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addRevisionsWithModifications File: server/src/test-shared/java/com/thoughtworks/go/server/dao/DatabaseAccessHelper.java Repository: gocd The code follows secure coding practices.
[ "CWE-697" ]
CVE-2022-39308
MEDIUM
5.9
gocd
addRevisionsWithModifications
server/src/test-shared/java/com/thoughtworks/go/server/dao/DatabaseAccessHelper.java
236d4baf92e6607f2841c151c855adcc477238b8
0
Analyze the following code function for security vulnerabilities
protected IActivityManager create() { IBinder b = ServiceManager.getService("activity"); if (false) { Log.v("ActivityManager", "default service binder = " + b); } IActivityManager am = asInterface(b); if (false) { Log.v("ActivityManager", "default service = " + am); } return am; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: create File: core/java/android/app/ActivityManagerNative.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
create
core/java/android/app/ActivityManagerNative.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
public void setSuppressBubble(boolean suppressed) { if (suppressed) { mFlags |= Notification.BubbleMetadata.FLAG_SUPPRESS_BUBBLE; } else { mFlags &= ~Notification.BubbleMetadata.FLAG_SUPPRESS_BUBBLE; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setSuppressBubble File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
setSuppressBubble
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
private void ensureDeviceOwnerUserStarted() { final int userId; synchronized (getLockObject()) { if (!mOwners.hasDeviceOwner()) { return; } userId = mOwners.getDeviceOwnerUserId(); } if (VERBOSE_LOG) { Log.v(LOG_TAG, "Starting non-system DO user: " + userId); } if (userId != UserHandle.USER_SYSTEM) { try { mInjector.getIActivityManager().startUserInBackground(userId); // STOPSHIP Prevent the DO user from being killed. } catch (RemoteException e) { Slogf.w(LOG_TAG, "Exception starting user", e); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: ensureDeviceOwnerUserStarted 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
ensureDeviceOwnerUserStarted
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
@Override public boolean equals(java.lang.Object arg0) { if (!(arg0 instanceof Document)) { return false; } Document d = (Document) arg0; return d.getXWikiContext().equals(getXWikiContext()) && this.doc.equals(d.doc); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: equals File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2022-23615
MEDIUM
5.5
xwiki/xwiki-platform
equals
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
0
Analyze the following code function for security vulnerabilities
private String tryReplace(String href) { String staticResourceBaseUrl = (String) request.getAttribute("staticResourceBaseUrl"); if (staticResourceBaseUrl == null) { staticResourceBaseUrl = baseUrl; } if (href.startsWith(baseUrl) || href.startsWith(staticResourceBaseUrl) || href.startsWith("admin/js") || href.startsWith("admin/markdwon") || href.startsWith("admin/summernote") || href.startsWith("assets")) { String uriPath = href; if (href.startsWith(baseUrl)) { uriPath = href.substring(baseUrl.length()); } else if (href.startsWith(staticResourceBaseUrl)) { uriPath = href.substring(staticResourceBaseUrl.length()); } if (uriPath.contains("?")) { uriPath = uriPath.substring(0, uriPath.lastIndexOf("?")); } uriPath = "/" + uriPath; String flag = CacheService.getFileFlag(uriPath); if (flag != null) { if (href.contains("?")) { href = href + "&t=" + flag; } else { href = href + "?t=" + flag; } } } return href; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: tryReplace File: web/src/main/java/com/zrlog/web/handler/ResponseRenderPrintWriter.java Repository: 94fzb/zrlog The code follows secure coding practices.
[ "CWE-79" ]
CVE-2019-16643
LOW
3.5
94fzb/zrlog
tryReplace
web/src/main/java/com/zrlog/web/handler/ResponseRenderPrintWriter.java
4a91c83af669e31a22297c14f089d8911d353fa1
0
Analyze the following code function for security vulnerabilities
ActivityStarter setActivityOptions(Bundle bOptions) { return setActivityOptions(SafeActivityOptions.fromBundle(bOptions)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setActivityOptions File: services/core/java/com/android/server/wm/ActivityStarter.java Repository: android The code follows secure coding practices.
[ "CWE-269" ]
CVE-2023-21269
HIGH
7.8
android
setActivityOptions
services/core/java/com/android/server/wm/ActivityStarter.java
70ec64dc5a2a816d6aa324190a726a85fd749b30
0
Analyze the following code function for security vulnerabilities
public boolean containsRevisionInBranch(Revision revision) { String[] args = {"branch", "-r", "--contains", revision.getRevision()}; CommandLine gitCommand = gitWd().withArgs(args); try { ConsoleResult consoleResult = runOrBomb(gitCommand); return (consoleResult.outputAsString()).contains(remoteBranch()); } catch (CommandLineException e) { return false; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: containsRevisionInBranch File: domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java Repository: gocd The code follows secure coding practices.
[ "CWE-77" ]
CVE-2021-43286
MEDIUM
6.5
gocd
containsRevisionInBranch
domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
0
Analyze the following code function for security vulnerabilities
@Override public void updateUserConfiguration() { synchronized (mGlobalLock) { final Configuration configuration = new Configuration(getGlobalConfiguration()); final int currentUserId = mAmInternal.getCurrentUserId(); Settings.System.adjustConfigurationForUser(mContext.getContentResolver(), configuration, currentUserId, Settings.System.canWrite(mContext)); updateConfigurationLocked(configuration, null /* starting */, false /* initLocale */, false /* persistent */, currentUserId, false /* deferResume */); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateUserConfiguration 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
updateUserConfiguration
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
1120bc7e511710b1b774adf29ba47106292365e7
0
Analyze the following code function for security vulnerabilities
@Override public FilePath getModuleRoot(FilePath workspace, AbstractBuild build) { if (build == null) { return getModuleRoot(workspace); } // TODO: can't I get the build listener here? TaskListener listener = new LogTaskListener(LOGGER, WARNING); final EnvVars env; try { env = build.getEnvironment(listener); } catch (IOException e) { throw new RuntimeException(e); } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new RuntimeException(e); } if (getLocations().length > 0) return _getModuleRoot(workspace, getLocations()[0].getLocalDir(), env); return workspace; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getModuleRoot 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
getModuleRoot
src/main/java/hudson/scm/SubversionSCM.java
7d4562d6f7e40de04bbe29577b51c79f07d05ba6
0
Analyze the following code function for security vulnerabilities
@Override public @Nullable Object getObject(@Positive int columnIndex) throws SQLException { connection.getLogger().log(Level.FINEST, " getObject columnIndex: {0}", columnIndex); Field field; byte[] value = getRawValue(columnIndex); if (value == null) { return null; } field = fields[columnIndex - 1]; // some fields can be null, mainly from those returned by MetaData methods if (field == null) { wasNullFlag = true; return null; } Object result = internalGetObject(columnIndex, field); if (result != null) { return result; } if (isBinary(columnIndex)) { return connection.getObject(getPGType(columnIndex), null, value); } String stringValue = castNonNull(getString(columnIndex)); return connection.getObject(getPGType(columnIndex), stringValue, null); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getObject 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
getObject
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
739e599d52ad80f8dcd6efedc6157859b1a9d637
0
Analyze the following code function for security vulnerabilities
@Override public int getDefaultVoiceSubId() { return SubscriptionManager.getDefaultVoiceSubscriptionId(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDefaultVoiceSubId File: src/com/android/server/telecom/TelecomServiceImpl.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21394
MEDIUM
5.5
android
getDefaultVoiceSubId
src/com/android/server/telecom/TelecomServiceImpl.java
68dca62035c49e14ad26a54f614199cb29a3393f
0
Analyze the following code function for security vulnerabilities
@NonNull public Builder setAutoCancel(boolean autoCancel) { setFlag(FLAG_AUTO_CANCEL, autoCancel); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setAutoCancel File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
setAutoCancel
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
@Override public String getEndUserSessionMessage(ComponentName admin) { if (!mHasFeature) { return null; } Objects.requireNonNull(admin, "ComponentName is null"); final CallerIdentity caller = getCallerIdentity(admin); Preconditions.checkCallAuthorization(isDefaultDeviceOwner(caller)); synchronized (getLockObject()) { final ActiveAdmin deviceOwner = getDeviceOwnerAdminLocked(); return deviceOwner.endUserSessionMessage; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getEndUserSessionMessage 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
getEndUserSessionMessage
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
public boolean isAllowExternalReferences() { return myModelConfig.isAllowExternalReferences(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isAllowExternalReferences File: hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java Repository: hapifhir/hapi-fhir The code follows secure coding practices.
[ "CWE-400" ]
CVE-2021-32053
MEDIUM
5
hapifhir/hapi-fhir
isAllowExternalReferences
hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
f2934b229c491235ab0e7782dea86b324521082a
0
Analyze the following code function for security vulnerabilities
public String serializeToString(Object obj, Map<String, Object> formParams, String contentType, boolean isBodyNullable) throws ApiException { try { if (contentType.startsWith("multipart/form-data")) { throw new ApiException("multipart/form-data not yet supported for serializeToString (http signature authentication)"); } else if (contentType.startsWith("application/x-www-form-urlencoded")) { String formString = ""; for (Entry<String, Object> param : formParams.entrySet()) { formString = param.getKey() + "=" + URLEncoder.encode(parameterToString(param.getValue()), "UTF-8") + "&"; } if (formString.length() == 0) { // empty string return formString; } else { return formString.substring(0, formString.length() - 1); } } else { if (isBodyNullable) { return obj == null ? "null" : json.getMapper().writeValueAsString(obj); } else { return obj == null ? "" : json.getMapper().writeValueAsString(obj); } } } catch (Exception ex) { throw new ApiException("Failed to perform serializeToString: " + ex.toString()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: serializeToString 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
serializeToString
samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
protected void internalGetLastMessageId(AsyncResponse asyncResponse, boolean authoritative) { Topic topic; try { validateTopicOwnership(topicName, authoritative); validateTopicOperation(topicName, TopicOperation.PEEK_MESSAGES); topic = getTopicReference(topicName); } catch (WebApplicationException wae) { if (log.isDebugEnabled()) { log.debug("[{}] Failed to get last messageId {}, redirecting to other brokers.", clientAppId(), topicName, wae); } resumeAsyncResponseExceptionally(asyncResponse, wae); return; } catch (Exception e) { log.error("[{}] Failed to get last messageId {}", clientAppId(), topicName, e); resumeAsyncResponseExceptionally(asyncResponse, e); return; } if (!(topic instanceof PersistentTopic)) { log.error("[{}] Not supported operation of non-persistent topic {}", clientAppId(), topicName); asyncResponse.resume(new RestException(Status.METHOD_NOT_ALLOWED, "GetLastMessageId on a non-persistent topic is not allowed")); return; } topic.getLastMessageId().whenComplete((v, e) -> { if (e != null) { asyncResponse.resume(new RestException(Status.INTERNAL_SERVER_ERROR, e.getMessage())); } else { asyncResponse.resume(v); } }); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: internalGetLastMessageId File: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java Repository: apache/pulsar The code follows secure coding practices.
[ "CWE-863" ]
CVE-2021-41571
MEDIUM
4
apache/pulsar
internalGetLastMessageId
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
5b35bb81c31f1bc2ad98c9fde5b39ec68110ca52
0
Analyze the following code function for security vulnerabilities
private final String _addDecodedToSymbols(int len, String name) { if (len < 5) { return _symbols.addName(name, _quad1); } if (len < 9) { return _symbols.addName(name, _quad1, _quad2); } if (len < 13) { return _symbols.addName(name, _quad1, _quad2, _quad3); } int qlen = (len + 3) >> 2; return _symbols.addName(name, _quadBuffer, qlen); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: _addDecodedToSymbols File: cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java Repository: FasterXML/jackson-dataformats-binary The code follows secure coding practices.
[ "CWE-770" ]
CVE-2020-28491
MEDIUM
5
FasterXML/jackson-dataformats-binary
_addDecodedToSymbols
cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
de072d314af8f5f269c8abec6930652af67bc8e6
0
Analyze the following code function for security vulnerabilities
@Nullable public static String getElementBody(Element element) { return element.getTextContent(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getElementBody File: bundles/org.jkiss.utils/src/org/jkiss/utils/xml/XMLUtils.java Repository: dbeaver The code follows secure coding practices.
[ "CWE-611" ]
CVE-2021-3836
MEDIUM
4.3
dbeaver
getElementBody
bundles/org.jkiss.utils/src/org/jkiss/utils/xml/XMLUtils.java
4debf8f25184b7283681ed3fb5e9e887d9d4fe22
0
Analyze the following code function for security vulnerabilities
private WorkspaceOfflineReason workspaceOffline(R build) throws IOException, InterruptedException { FilePath ws = build.getWorkspace(); if (ws==null || !ws.exists()) { return WorkspaceOfflineReason.nonexisting_workspace; } Node builtOn = build.getBuiltOn(); if (builtOn == null) { // node built-on doesn't exist anymore return WorkspaceOfflineReason.builton_node_gone; } if (builtOn.toComputer() == null) { // node still exists, but has 0 executors - o.s.l.t. return WorkspaceOfflineReason.builton_node_no_executors; } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: workspaceOffline 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
workspaceOffline
core/src/main/java/hudson/model/AbstractProject.java
36342d71e29e0620f803a7470ce96c61761648d8
0
Analyze the following code function for security vulnerabilities
private List<ApiMethodUrlDTO> getScenarioUseUrl(ApiScenarioWithBLOBs model) { List<ApiMethodUrlDTO> useUrlList = new ArrayList<>(); try { useUrlList = JSONArray.parseArray(model.getUseUrl(), ApiMethodUrlDTO.class); } catch (Exception e) { } return useUrlList; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getScenarioUseUrl 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
getScenarioUseUrl
backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java
d74e02cdff47cdf7524d305d098db6ffb7f61b47
0
Analyze the following code function for security vulnerabilities
@Override public boolean updateMccMncConfiguration(String mcc, String mnc) { int mccInt, mncInt; try { mccInt = Integer.parseInt(mcc); mncInt = Integer.parseInt(mnc); } catch (NumberFormatException | StringIndexOutOfBoundsException ex) { Slog.e(TAG, "Error parsing mcc: " + mcc + " mnc: " + mnc + ". ex=" + ex); return false; } Configuration config = new Configuration(); config.mcc = mccInt; config.mnc = mncInt == 0 ? Configuration.MNC_ZERO : mncInt; return mActivityTaskManager.updateConfiguration(config); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateMccMncConfiguration File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21292
MEDIUM
5.5
android
updateMccMncConfiguration
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
public void onClick(DialogInterface dialog, int which) { if (DBG) log("onClick: button clicked is " + which); dialog.dismiss(); switch (which){ case DialogInterface.BUTTON_NEGATIVE: if (mCurrentDialogId == VoicemailDialogUtil.FWD_GET_RESPONSE_ERROR_DIALOG) { // We failed to get current forwarding settings and the user // does not wish to continue. switchToPreviousVoicemailProvider(); } break; case DialogInterface.BUTTON_POSITIVE: if (mCurrentDialogId == VoicemailDialogUtil.FWD_GET_RESPONSE_ERROR_DIALOG) { // We failed to get current forwarding settings but the user // wishes to continue changing settings to the new vm provider setVoicemailNumberWithCarrier(); } else { finish(); } return; default: // just let the dialog close and go back to the input } // In all dialogs, all buttons except BUTTON_POSITIVE lead to the end of user interaction // with settings UI. If we were called to explicitly configure voice mail then // we finish the settings activity here to come back to whatever the user was doing. final String action = getIntent() != null ? getIntent().getAction() : null; if (ACTION_ADD_VOICEMAIL.equals(action)) { finish(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onClick File: src/com/android/phone/settings/VoicemailSettingsActivity.java Repository: android The code follows secure coding practices.
[ "CWE-Other", "CWE-862" ]
CVE-2023-35665
HIGH
7.8
android
onClick
src/com/android/phone/settings/VoicemailSettingsActivity.java
674039e70e1c5bf29b808899ac80c709acc82290
0
Analyze the following code function for security vulnerabilities
private void clearAllBuildInstances(Pipeline pipeline) { pipeline.getFirstStage().setJobInstances(new JobInstances()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: clearAllBuildInstances File: server/src/test-shared/java/com/thoughtworks/go/server/dao/DatabaseAccessHelper.java Repository: gocd The code follows secure coding practices.
[ "CWE-697" ]
CVE-2022-39308
MEDIUM
5.9
gocd
clearAllBuildInstances
server/src/test-shared/java/com/thoughtworks/go/server/dao/DatabaseAccessHelper.java
236d4baf92e6607f2841c151c855adcc477238b8
0