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
@Override public Class<?> loadClass(String name) throws ClassNotFoundException { Class<?> result = findLoadedClassAll(name); // try parent classloader if (result == null) { try { ClassLoader parent = getParent(); if (parent == null) { parent = ClassLoader.getSystemClassLoader(); } return parent.loadClass(name); } catch (ClassNotFoundException ex) { } } // filter out 'bad' package names like java, javax // validPackage(name); // search this and the extension loaders if (result == null) { try { result = loadClassExt(name); } catch (ClassNotFoundException cnfe) { // Not found in external loader either // Look in 'Class-Path' as specified in the manifest file try { // This field synchronized before iterating over it since it may // be shared data between threads synchronized (classpaths) { for (String classpath : classpaths) { JARDesc desc; try { URL jarUrl = new URL(file.getCodeBase(), classpath); desc = new JARDesc(jarUrl, null, null, false, true, false, true); } catch (MalformedURLException mfe) { throw new ClassNotFoundException(name, mfe); } addNewJar(desc); } } result = loadClassExt(name); return result; } catch (ClassNotFoundException cnfe1) { LOG.error(IcedTeaWebConstants.DEFAULT_ERROR_MESSAGE, cnfe1); } // As a last resort, look in any available indexes // Currently this loads jars directly from the site. We cannot cache it because this // call is initiated from within the applet, which does not have disk read/write permissions // This field synchronized before iterating over it since it may // be shared data between threads synchronized (jarIndexes) { for (JarIndexAccess index : jarIndexes) { // Non-generic code in sun.misc.JarIndex @SuppressWarnings("unchecked") LinkedList<String> jarList = index.get(name.replace('.', '/')); if (jarList != null) { for (String jarName : jarList) { JARDesc desc; try { desc = new JARDesc(new URL(file.getCodeBase(), jarName), null, null, false, true, false, true); } catch (MalformedURLException mfe) { throw new ClassNotFoundException(name); } try { addNewJar(desc); } catch (Exception e) { LOG.error(IcedTeaWebConstants.DEFAULT_ERROR_MESSAGE, e); } } // If it still fails, let it error out result = loadClassExt(name); } } } } } if (result == null) { throw new ClassNotFoundException(name); } return result; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: loadClass File: core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Repository: AdoptOpenJDK/IcedTea-Web The code follows secure coding practices.
[ "CWE-345", "CWE-94", "CWE-22" ]
CVE-2019-10182
MEDIUM
5.8
AdoptOpenJDK/IcedTea-Web
loadClass
core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
e0818f521a0711aeec4b913b49b5fc6a52815662
0
Analyze the following code function for security vulnerabilities
public CmsContent updateCategoryId(short siteId, Serializable id, int categoryId) { CmsContent entity = getEntity(id); if (null != entity && siteId == entity.getSiteId()) { entity.setCategoryId(categoryId); } return entity; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateCategoryId File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/logic/service/cms/CmsContentService.java Repository: sanluan/PublicCMS The code follows secure coding practices.
[ "CWE-79" ]
CVE-2020-21333
LOW
3.5
sanluan/PublicCMS
updateCategoryId
publiccms-parent/publiccms-core/src/main/java/com/publiccms/logic/service/cms/CmsContentService.java
b4d5956e65b14347b162424abb197a180229b3db
0
Analyze the following code function for security vulnerabilities
void clear(String uid) { this.onDemandBundleCache.remove(uid); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: clear File: xwiki-platform-core/xwiki-platform-localization/xwiki-platform-localization-sources/xwiki-platform-localization-source-wiki/src/main/java/org/xwiki/localization/wiki/internal/DocumentTranslationBundleFactory.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-74" ]
CVE-2023-29510
HIGH
8.8
xwiki/xwiki-platform
clear
xwiki-platform-core/xwiki-platform-localization/xwiki-platform-localization-sources/xwiki-platform-localization-source-wiki/src/main/java/org/xwiki/localization/wiki/internal/DocumentTranslationBundleFactory.java
d06ff8a58480abc7f63eb1d4b8b366024d990643
0
Analyze the following code function for security vulnerabilities
@Override public void contextClick(int rowIndex, String rowKey, String columnInternalId, Section section, MouseEventDetails details) { T item = null; if (rowKey != null) { item = getDataCommunicator().getKeyMapper().get(rowKey); } fireEvent(new GridContextClickEvent<>(Grid.this, details, section, rowIndex, item, getColumnByInternalId(columnInternalId))); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: contextClick 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
contextClick
server/src/main/java/com/vaadin/ui/Grid.java
c40bed109c3723b38694ed160ea647fef5b28593
0
Analyze the following code function for security vulnerabilities
public String getOAuth2SecondLoginURL() { return CONF.oauthAuthorizationUrl("second") + "?" + "response_type=code&client_id=" + CONF.oauthAppId("second") + "&scope=" + CONF.oauthScope("second") + "&state=" + getParaAppId() + "&redirect_uri=" + getParaEndpoint() + "/oauth2_auth"; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getOAuth2SecondLoginURL File: src/main/java/com/erudika/scoold/utils/ScooldUtils.java Repository: Erudika/scoold The code follows secure coding practices.
[ "CWE-130" ]
CVE-2022-1543
MEDIUM
6.5
Erudika/scoold
getOAuth2SecondLoginURL
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
62a0e92e1486ddc17676a7ead2c07ff653d167ce
0
Analyze the following code function for security vulnerabilities
protected boolean manuallyChangePresence() { return getBooleanPreference(SettingsActivity.MANUALLY_CHANGE_PRESENCE, R.bool.manually_change_presence); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: manuallyChangePresence File: src/main/java/eu/siacs/conversations/ui/XmppActivity.java Repository: iNPUTmice/Conversations The code follows secure coding practices.
[ "CWE-200" ]
CVE-2018-18467
MEDIUM
5
iNPUTmice/Conversations
manuallyChangePresence
src/main/java/eu/siacs/conversations/ui/XmppActivity.java
7177c523a1b31988666b9337249a4f1d0c36f479
0
Analyze the following code function for security vulnerabilities
@Override public int getDisplayId() { final DisplayContent displayContent = getDisplayContent(); if (displayContent == null) { return Display.INVALID_DISPLAY; } return displayContent.getDisplayId(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDisplayId File: services/core/java/com/android/server/wm/WindowState.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-35674
HIGH
7.8
android
getDisplayId
services/core/java/com/android/server/wm/WindowState.java
7428962d3b064ce1122809d87af65099d1129c9e
0
Analyze the following code function for security vulnerabilities
public static XMLBuilder2 create(String name, String namespaceURI) { try { return new XMLBuilder2(createDocumentImpl(name, namespaceURI)); } catch (ParserConfigurationException e) { throw wrapExceptionAsRuntimeException(e); } }
Vulnerability Classification: - CWE: CWE-611 - CVE: CVE-2014-125087 - Severity: MEDIUM - CVSS Score: 5.2 Description: Disable external entities by default to prevent XXE injection attacks, re #6 XML Builder classes now explicitly enable or disable 'external-general-entities' and 'external-parameter-entities' features of the DocumentBuilderFactory when #create or #parse methods are used. To prevent XML External Entity (XXE) injection attacks, these features are disabled by default. They can only be enabled by passing a true boolean value to new versions of the #create and #parse methods that accept a flag for this feature. Function: create File: src/main/java/com/jamesmurty/utils/XMLBuilder2.java Repository: jmurty/java-xmlbuilder Fixed Code: public static XMLBuilder2 create(String name, String namespaceURI) { return XMLBuilder2.create(name, namespaceURI, false); }
[ "CWE-611" ]
CVE-2014-125087
MEDIUM
5.2
jmurty/java-xmlbuilder
create
src/main/java/com/jamesmurty/utils/XMLBuilder2.java
e6fddca201790abab4f2c274341c0bb8835c3e73
1
Analyze the following code function for security vulnerabilities
public boolean setNetworkValidatedInternetAccess(int networkId, boolean validated) { WifiConfiguration config = getInternalConfiguredNetwork(networkId); if (config == null) { return false; } config.validatedInternetAccess = validated; config.numNoInternetAccessReports = 0; saveToStore(false); return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setNetworkValidatedInternetAccess File: service/java/com/android/server/wifi/WifiConfigManager.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21242
CRITICAL
9.8
android
setNetworkValidatedInternetAccess
service/java/com/android/server/wifi/WifiConfigManager.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
void write(boolean force) { if (force) { writeInternal(); return; } if (SystemClock.elapsedRealtime() - mLastWritten.get() < WRITE_INTERVAL && !DEBUG_DEXOPT) { return; } if (mBackgroundWriteRunning.compareAndSet(false, true)) { new Thread("PackageUsage_DiskWriter") { @Override public void run() { try { writeInternal(); } finally { mBackgroundWriteRunning.set(false); } } }.start(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: write File: services/core/java/com/android/server/pm/PackageManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-119" ]
CVE-2016-2497
HIGH
7.5
android
write
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
@Override public void onServiceDisconnected(ComponentName arg0) { xmppConnectionServiceBound = false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onServiceDisconnected File: src/main/java/eu/siacs/conversations/ui/XmppActivity.java Repository: iNPUTmice/Conversations The code follows secure coding practices.
[ "CWE-200" ]
CVE-2018-18467
MEDIUM
5
iNPUTmice/Conversations
onServiceDisconnected
src/main/java/eu/siacs/conversations/ui/XmppActivity.java
7177c523a1b31988666b9337249a4f1d0c36f479
0
Analyze the following code function for security vulnerabilities
@PostConstruct public void ensureEncrypted() { this.userName = StringUtils.stripToNull(this.userName); setPasswordIfNotBlank(password); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: ensureEncrypted File: domain/src/main/java/com/thoughtworks/go/config/materials/ScmMaterial.java Repository: gocd The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-39309
MEDIUM
6.5
gocd
ensureEncrypted
domain/src/main/java/com/thoughtworks/go/config/materials/ScmMaterial.java
691b479f1310034992da141760e9c5d1f5b60e8a
0
Analyze the following code function for security vulnerabilities
@Override public void onRemoved(final long deviceId, final int fingerId, final int groupId) { mHandler.post(new Runnable() { @Override public void run() { handleRemoved(deviceId, fingerId, groupId); } }); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onRemoved File: services/core/java/com/android/server/fingerprint/FingerprintService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3917
HIGH
7.2
android
onRemoved
services/core/java/com/android/server/fingerprint/FingerprintService.java
f5334952131afa835dd3f08601fb3bced7b781cd
0
Analyze the following code function for security vulnerabilities
private void warnForUnavailableBundledDependencies( Class<? extends Component> componentClass, DependencyInfo dependencies) { if (ui.getSession() == null || !ui.getSession().getConfiguration().isProductionMode()) { return; } List<String> jsDeps = new ArrayList<>(); jsDeps.addAll(dependencies.getJavaScripts().stream() .map(dep -> dep.value()).filter(src -> !UrlUtil.isExternal(src)) .collect(Collectors.toList())); jsDeps.addAll(dependencies.getJsModules().stream() .map(dep -> dep.value()).filter(src -> !UrlUtil.isExternal(src)) .collect(Collectors.toList())); if (!jsDeps.isEmpty()) { maybeWarnAboutDependencies(componentClass, jsDeps); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: warnForUnavailableBundledDependencies File: flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java Repository: vaadin/flow The code follows secure coding practices.
[ "CWE-200" ]
CVE-2023-25499
MEDIUM
6.5
vaadin/flow
warnForUnavailableBundledDependencies
flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
0
Analyze the following code function for security vulnerabilities
private Node getByNodeId(Map<String, String> cache, Transaction tx, StartElement element, XmlNodeExport.NodeType nodeType) { final XmlNodeExport.ExportNode xmlNodeInterface = nodeType.get(); final ExportConfig.NodeConfig nodeConfig = xmlNodeInterface.getNodeConfigReader(this); final String sourceTargetValue = getAttribute(element, QName.valueOf(nodeType.getName())); final String id = cache.get(sourceTargetValue); // without source/target config, we look for the internal id if (StringUtils.isBlank(nodeConfig.label)) { return tx.getNodeByElementId(id); } // with source/target configured, we search a node with a specified label // and with a type specified in sourceType, if present, or string by default final String attribute = getAttribute(element, QName.valueOf(nodeType.getNameType())); final Object value = attribute == null ? sourceTargetValue : Type.forType(attribute).parse(sourceTargetValue); return tx.findNode(Label.label(nodeConfig.label), Optional.ofNullable(nodeConfig.id).orElse("id"), value); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getByNodeId File: core/src/main/java/apoc/export/graphml/XmlGraphMLReader.java Repository: neo4j/apoc The code follows secure coding practices.
[ "CWE-611" ]
CVE-2023-23926
HIGH
8.1
neo4j/apoc
getByNodeId
core/src/main/java/apoc/export/graphml/XmlGraphMLReader.java
3202b421b21973b2f57a43b33c88f3f6901cfd2a
0
Analyze the following code function for security vulnerabilities
public void finishKeyguardFadingAway() { mKeyguardFadingAway = false; mKeyguardGoingAway = false; mKeyguardMonitor.notifyKeyguardDoneFading(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: finishKeyguardFadingAway File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2017-0822
HIGH
7.5
android
finishKeyguardFadingAway
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
void notifyPackageUse(String packageName, int reason) { IPackageManager pm = AppGlobals.getPackageManager(); try { pm.notifyPackageUse(packageName, reason); } catch (RemoteException e) { } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: notifyPackageUse 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
notifyPackageUse
services/core/java/com/android/server/am/ActivityManagerService.java
6c049120c2d749f0c0289d822ec7d0aa692f55c5
0
Analyze the following code function for security vulnerabilities
public void test_point() throws Exception { JSONSerializer serializer = new JSONSerializer(); Assert.assertEquals(AwtCodec.class, serializer.getObjectWriter(Point.class).getClass()); Point point = new Point(3, 4); String text = JSON.toJSONString(point, SerializerFeature.WriteClassName); System.out.println(text); Object obj = JSON.parse(text); Point point2 = (Point) obj; Assert.assertEquals(point, point2); Point point3 = (Point) JSON.parseObject(text, Point.class); Assert.assertEquals(point, point3); }
Vulnerability Classification: - CWE: CWE-502 - CVE: CVE-2022-25845 - Severity: MEDIUM - CVSS Score: 6.8 Description: bug fix for autotype Function: test_point File: src/test/java/com/alibaba/json/bvt/PointTest2.java Repository: alibaba/fastjson Fixed Code: public void test_point() throws Exception { JSONSerializer serializer = new JSONSerializer(); Assert.assertEquals(AwtCodec.class, serializer.getObjectWriter(Point.class).getClass()); Point point = new Point(3, 4); String text = JSON.toJSONString(point, SerializerFeature.WriteClassName); System.out.println(text); Object obj = JSON.parse(text, Feature.SupportAutoType); Point point2 = (Point) obj; Assert.assertEquals(point, point2); Point point3 = (Point) JSON.parseObject(text, Point.class); Assert.assertEquals(point, point3); }
[ "CWE-502" ]
CVE-2022-25845
MEDIUM
6.8
alibaba/fastjson
test_point
src/test/java/com/alibaba/json/bvt/PointTest2.java
8f3410f81cbd437f7c459f8868445d50ad301f15
1
Analyze the following code function for security vulnerabilities
void transformFrameToSurfacePosition(int left, int top, Point outPoint) { outPoint.set(left, top); // If changed, also adjust getTransformationMatrix final WindowContainer parentWindowContainer = getParent(); if (isChildWindow()) { final WindowState parent = getParentWindow(); outPoint.offset(-parent.mWindowFrames.mFrame.left, -parent.mWindowFrames.mFrame.top); // Undo the scale of window position because the relative coordinates for child are // based on the scaled parent. if (mInvGlobalScale != 1f) { outPoint.x = (int) (outPoint.x * mInvGlobalScale + 0.5f); outPoint.y = (int) (outPoint.y * mInvGlobalScale + 0.5f); } // Since the parent was outset by its surface insets, we need to undo the outsetting // with insetting by the same amount. transformSurfaceInsetsPosition(mTmpPoint, parent.mAttrs.surfaceInsets); outPoint.offset(mTmpPoint.x, mTmpPoint.y); } else if (parentWindowContainer != null) { final Rect parentBounds = isStartingWindowAssociatedToTask() ? mStartingData.mAssociatedTask.getBounds() : parentWindowContainer.getBounds(); outPoint.offset(-parentBounds.left, -parentBounds.top); } // The surface size is larger than the window if the window has positive surface insets. transformSurfaceInsetsPosition(mTmpPoint, mAttrs.surfaceInsets); outPoint.offset(-mTmpPoint.x, -mTmpPoint.y); outPoint.y += mSurfaceTranslationY; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: transformFrameToSurfacePosition File: services/core/java/com/android/server/wm/WindowState.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-35674
HIGH
7.8
android
transformFrameToSurfacePosition
services/core/java/com/android/server/wm/WindowState.java
7428962d3b064ce1122809d87af65099d1129c9e
0
Analyze the following code function for security vulnerabilities
public String getTsDefaultServiceHandler() { return getProperty(TS_DEFAULT_SERVICE_HANDLER, null); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTsDefaultServiceHandler File: frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java Repository: pytorch/serve The code follows secure coding practices.
[ "CWE-918" ]
CVE-2023-43654
CRITICAL
9.8
pytorch/serve
getTsDefaultServiceHandler
frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java
391bdec3348e30de173fbb7c7277970e0b53c8ad
0
Analyze the following code function for security vulnerabilities
public int getCurrentThumbnailPage() { synchronized (this) { return viewManager != null ? viewManager.getCurrentThumbnailPage() : 1; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCurrentThumbnailPage File: goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java Repository: intranda/goobi-viewer-core The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-29014
MEDIUM
6.1
intranda/goobi-viewer-core
getCurrentThumbnailPage
goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java
c29efe60e745a94d03debc17681c4950f3917455
0
Analyze the following code function for security vulnerabilities
@Override public String getDefaultBrowserPackageName(int userId) { synchronized (mPackages) { return mSettings.getDefaultBrowserPackageNameLPw(userId); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDefaultBrowserPackageName File: services/core/java/com/android/server/pm/PackageManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-119" ]
CVE-2016-2497
HIGH
7.5
android
getDefaultBrowserPackageName
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
public void initAdvanceConfig() { logger.info("init advance config button"); advanceButton.addActionListener(e -> { String t; if (LANG == CHINESE) { t = "高级配置"; } else { t = "Advance Config"; } JFrame frame = new JFrame(t); frame.setContentPane(new AdvanceConfigForm().advanceConfigPanel); frame.setResizable(true); frame.pack(); frame.setVisible(true); }); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: initAdvanceConfig File: src/main/java/com/chaitin/xray/form/MainForm.java Repository: 4ra1n/super-xray The code follows secure coding practices.
[ "CWE-502" ]
CVE-2022-41958
HIGH
7.8
4ra1n/super-xray
initAdvanceConfig
src/main/java/com/chaitin/xray/form/MainForm.java
4d0d59663596db03f39d7edd2be251d48b52dcfc
0
Analyze the following code function for security vulnerabilities
@Override public void setTurnScreenOn(IBinder token, boolean turnScreenOn) throws RemoteException { synchronized (this) { final ActivityRecord r = ActivityRecord.isInStackLocked(token); if (r == null) { return; } final long origId = Binder.clearCallingIdentity(); try { r.setTurnScreenOn(turnScreenOn); } finally { Binder.restoreCallingIdentity(origId); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setTurnScreenOn 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
setTurnScreenOn
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
protected abstract boolean isDecodingRequest();
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isDecodingRequest File: codec-http/src/main/java/io/netty/handler/codec/http/HttpObjectDecoder.java Repository: netty The code follows secure coding practices.
[ "CWE-444" ]
CVE-2019-16869
MEDIUM
5
netty
isDecodingRequest
codec-http/src/main/java/io/netty/handler/codec/http/HttpObjectDecoder.java
39cafcb05c99f2aa9fce7e6597664c9ed6a63a95
0
Analyze the following code function for security vulnerabilities
public void onLocationAvailability(LocationAvailability var1) { }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onLocationAvailability File: Ports/Android/src/com/codename1/location/AndroidLocationPlayServiceManager.java Repository: codenameone/CodenameOne The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-4903
MEDIUM
5.1
codenameone/CodenameOne
onLocationAvailability
Ports/Android/src/com/codename1/location/AndroidLocationPlayServiceManager.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
@Override public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { super.onRequestPermissionsResult(requestCode, permissions, grantResults); if(grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) { if(requestCode == REQUEST_CODE_PERMISSION_DOWNLOAD_WEB_ARCHIVE) { startDownloadWebPagesForOfflineReading(); } else { Log.d(TAG, "No action defined here yet.."); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onRequestPermissionsResult File: News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java Repository: nextcloud/news-android The code follows secure coding practices.
[ "CWE-829" ]
CVE-2021-41256
MEDIUM
5.8
nextcloud/news-android
onRequestPermissionsResult
News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java
05449cb666059af7de2302df9d5c02997a23df85
0
Analyze the following code function for security vulnerabilities
public static void cursorRowToContentValues(Cursor cursor, ContentValues values) { String[] columns = cursor.getColumnNames(); int length = columns.length; for (int i = 0; i < length; i++) { if (cursor.getType(i) == Cursor.FIELD_TYPE_BLOB) { values.put(columns[i], cursor.getBlob(i)); } else { values.put(columns[i], cursor.getString(i)); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: cursorRowToContentValues File: core/java/android/database/DatabaseUtils.java Repository: android The code follows secure coding practices.
[ "CWE-502" ]
CVE-2023-40121
MEDIUM
5.5
android
cursorRowToContentValues
core/java/android/database/DatabaseUtils.java
3287ac2d2565dc96bf6177967f8e3aed33954253
0
Analyze the following code function for security vulnerabilities
@RequiresPermission(value = MANAGE_DEVICE_POLICY_PACKAGE_STATE, conditional = true) public boolean isPackageSuspended(@Nullable ComponentName admin, String packageName) throws NameNotFoundException { throwIfParentInstance("isPackageSuspended"); if (mService != null) { try { return mService.isPackageSuspended(admin, mContext.getPackageName(), packageName); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } catch (IllegalArgumentException ex) { Log.e(TAG, "IllegalArgumentException checking isPackageSuspended", ex); throw new NameNotFoundException(packageName); } } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isPackageSuspended 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
isPackageSuspended
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
public void reload() { // TODO(dtrainor): Should we try to rebuild the ContentView if it's frozen? if (mContentViewCore != null) mContentViewCore.reload(true); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: reload File: chrome/android/java/src/org/chromium/chrome/browser/Tab.java Repository: chromium The code follows secure coding practices.
[ "CWE-20" ]
CVE-2014-3159
MEDIUM
6.4
chromium
reload
chrome/android/java/src/org/chromium/chrome/browser/Tab.java
98a50b76141f0b14f292f49ce376e6554142d5e2
0
Analyze the following code function for security vulnerabilities
private boolean isUserAllowed(MainSessionController controller, String componentId) { boolean[] userAllowed = {componentId == null || getOrganizationController().isComponentAvailableToUser(componentId, controller.getUserId())}; if (!userAllowed[0]) { // Maybe a case of a personal component instance PersonalComponentInstance.from(componentId).ifPresent( personalComponentInstance -> userAllowed[0] = (personalComponentInstance.getUser().getId().equals(controller.getUserId()))); } return userAllowed[0]; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isUserAllowed File: core-web/src/main/java/org/silverpeas/core/web/mvc/route/ComponentRequestRouter.java Repository: Silverpeas/Silverpeas-Core The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-47324
MEDIUM
5.4
Silverpeas/Silverpeas-Core
isUserAllowed
core-web/src/main/java/org/silverpeas/core/web/mvc/route/ComponentRequestRouter.java
9a55728729a3b431847045c674b3e883507d1e1a
0
Analyze the following code function for security vulnerabilities
private XWikiAttachmentOutputFilterStream getXWikiAttachmentOutputFilterStream() { return (XWikiAttachmentOutputFilterStream) this.attachmentFilter; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getXWikiAttachmentOutputFilterStream 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
getXWikiAttachmentOutputFilterStream
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
public static C3P0Config extractConfigFromXmlDoc(Document doc) throws Exception { Element docElem = doc.getDocumentElement(); if (docElem.getTagName().equals("c3p0-config")) { NamedScope defaults; HashMap configNamesToNamedScopes = new HashMap(); Element defaultConfigElem = DomParseUtils.uniqueChild( docElem, "default-config" ); if (defaultConfigElem != null) defaults = extractNamedScopeFromLevel( defaultConfigElem ); else defaults = new NamedScope(); NodeList nl = DomParseUtils.immediateChildElementsByTagName(docElem, "named-config"); for (int i = 0, len = nl.getLength(); i < len; ++i) { Element namedConfigElem = (Element) nl.item(i); String configName = namedConfigElem.getAttribute("name"); if (configName != null && configName.length() > 0) { NamedScope namedConfig = extractNamedScopeFromLevel( namedConfigElem ); configNamesToNamedScopes.put( configName, namedConfig); } else logger.warning("Configuration XML contained named-config element without name attribute: " + namedConfigElem); } return new C3P0Config( defaults, configNamesToNamedScopes ); } else throw new Exception("Root element of c3p0 config xml should be 'c3p0-config', not '" + docElem.getTagName() + "'."); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: extractConfigFromXmlDoc File: src/java/com/mchange/v2/c3p0/cfg/C3P0ConfigXmlUtils.java Repository: zhutougg/c3p0 The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-20433
HIGH
7.5
zhutougg/c3p0
extractConfigFromXmlDoc
src/java/com/mchange/v2/c3p0/cfg/C3P0ConfigXmlUtils.java
2eb0ea97f745740b18dd45e4a909112d4685f87b
0
Analyze the following code function for security vulnerabilities
public List<String> getIncludedPages(XWikiContext context) { try { return getIncludedPagesInternal(context); } catch (Exception e) { // If an error happens then we return an empty list of included pages. We don't want to fail by throwing an // exception since it'll lead to several errors in the UI (such as in the Information Panel in edit mode). LOGGER.error("Failed to get included pages for [{}]", getDocumentReference(), e); return Collections.emptyList(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getIncludedPages 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
getIncludedPages
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 Column<T, V> setHidden(boolean hidden) { checkColumnIsAttached(); if (hidden != isHidden()) { getState().hidden = hidden; getGrid().fireColumnVisibilityChangeEvent(this, hidden, false); } return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setHidden 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
setHidden
server/src/main/java/com/vaadin/ui/Grid.java
c40bed109c3723b38694ed160ea647fef5b28593
0
Analyze the following code function for security vulnerabilities
private XWikiDocument cloneInternal(DocumentReference newDocumentReference, boolean keepsIdentity, boolean cloneArchive) { XWikiDocument doc = null; try { Constructor<? extends XWikiDocument> constructor = getClass().getConstructor(DocumentReference.class); doc = constructor.newInstance(newDocumentReference); // Make sure the coordinate of the document is fully accurate before any other manipulation doc.setLocale(getLocale()); // use version field instead of getRCSVersion because it returns "1.1" if version==null. doc.version = this.version; doc.id = this.id; if (cloneArchive) { doc.cloneDocumentArchive(this); } else { // Without this explicit initialization, it is possible for the archive to be incorrectly initialized. // For instance, with the archive of the cloned document. // Here we guarantee that further calls of APIs to get the archive will properly populate the data. doc.setDocumentArchive((XWikiDocumentArchive) null); } doc.getAuthors().copyAuthors(getAuthors()); doc.setContent(getContent()); doc.setCreationDate(getCreationDate()); doc.setDate(getDate()); doc.setCustomClass(getCustomClass()); doc.setContentUpdateDate(getContentUpdateDate()); doc.setTitle(getTitle()); doc.setFormat(getFormat()); doc.setFromCache(isFromCache()); doc.setElements(getElements()); doc.setMeta(getMeta()); doc.setMostRecent(isMostRecent()); doc.setNew(isNew()); doc.setStore(getStore()); doc.setTemplateDocumentReference(getTemplateDocumentReference()); doc.setParentReference(getRelativeParentReference()); doc.setDefaultLocale(getDefaultLocale()); doc.setDefaultTemplate(getDefaultTemplate()); doc.setValidationScript(getValidationScript()); doc.setComment(getComment()); doc.setMinorEdit(isMinorEdit()); doc.setSyntax(getSyntax()); doc.setHidden(isHidden()); if (this.xClass != null) { doc.setXClass(this.xClass.clone()); } if (keepsIdentity) { doc.setXClassXML(getXClassXML()); doc.cloneXObjects(this); doc.cloneAttachments(this); } else { doc.getXClass().setCustomMapping(null); doc.duplicateXObjects(this); doc.copyAttachments(this); } doc.setContentDirty(isContentDirty()); doc.setMetaDataDirty(isMetaDataDirty()); doc.elements = this.elements; doc.originalDocument = this.originalDocument; } catch (Exception e) { // This should not happen LOGGER.error("Exception while cloning document", e); } return doc; }
Vulnerability Classification: - CWE: CWE-459 - CVE: CVE-2023-36468 - Severity: HIGH - CVSS Score: 8.8 Description: XWIKI-20594: Mark old revisions and deleted documents as restricted * Introduce a new "restricted" attribute on XWikiDocument * Mark any document that is restored from XML as restricted * Deny script right when the secure document is restricted * Make transformations restricted when the document is restricted * Do not execute Velocity in titles when the document is restricted * Make sure saved documents aren't restricted. * Add tests * Display a warning when a document is rendered in restricted mode and the user is advanced or there is actually an error in the output. Function: cloneInternal File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java Repository: xwiki/xwiki-platform Fixed Code: private XWikiDocument cloneInternal(DocumentReference newDocumentReference, boolean keepsIdentity, boolean cloneArchive) { XWikiDocument doc = null; try { Constructor<? extends XWikiDocument> constructor = getClass().getConstructor(DocumentReference.class); doc = constructor.newInstance(newDocumentReference); // Make sure the coordinate of the document is fully accurate before any other manipulation doc.setLocale(getLocale()); // use version field instead of getRCSVersion because it returns "1.1" if version==null. doc.version = this.version; doc.id = this.id; if (cloneArchive) { doc.cloneDocumentArchive(this); } else { // Without this explicit initialization, it is possible for the archive to be incorrectly initialized. // For instance, with the archive of the cloned document. // Here we guarantee that further calls of APIs to get the archive will properly populate the data. doc.setDocumentArchive((XWikiDocumentArchive) null); } doc.getAuthors().copyAuthors(getAuthors()); doc.setContent(getContent()); doc.setCreationDate(getCreationDate()); doc.setDate(getDate()); doc.setCustomClass(getCustomClass()); doc.setContentUpdateDate(getContentUpdateDate()); doc.setTitle(getTitle()); doc.setFormat(getFormat()); doc.setFromCache(isFromCache()); doc.setElements(getElements()); doc.setMeta(getMeta()); doc.setMostRecent(isMostRecent()); doc.setNew(isNew()); doc.setStore(getStore()); doc.setTemplateDocumentReference(getTemplateDocumentReference()); doc.setParentReference(getRelativeParentReference()); doc.setDefaultLocale(getDefaultLocale()); doc.setDefaultTemplate(getDefaultTemplate()); doc.setValidationScript(getValidationScript()); doc.setComment(getComment()); doc.setMinorEdit(isMinorEdit()); doc.setSyntax(getSyntax()); doc.setHidden(isHidden()); doc.setRestricted(isRestricted()); if (this.xClass != null) { doc.setXClass(this.xClass.clone()); } if (keepsIdentity) { doc.setXClassXML(getXClassXML()); doc.cloneXObjects(this); doc.cloneAttachments(this); } else { doc.getXClass().setCustomMapping(null); doc.duplicateXObjects(this); doc.copyAttachments(this); } doc.setContentDirty(isContentDirty()); doc.setMetaDataDirty(isMetaDataDirty()); doc.elements = this.elements; doc.originalDocument = this.originalDocument; } catch (Exception e) { // This should not happen LOGGER.error("Exception while cloning document", e); } return doc; }
[ "CWE-459" ]
CVE-2023-36468
HIGH
8.8
xwiki/xwiki-platform
cloneInternal
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
1
Analyze the following code function for security vulnerabilities
public void finishDataDelivery(@NonNull String permission, @NonNull AttributionSource attributionSource) { PermissionChecker.finishDataDelivery(mContext, AppOpsManager.permissionToOp(permission), attributionSource); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: finishDataDelivery File: core/java/android/permission/PermissionManager.java Repository: android The code follows secure coding practices.
[ "CWE-281" ]
CVE-2023-21249
MEDIUM
5.5
android
finishDataDelivery
core/java/android/permission/PermissionManager.java
c00b7e7dbc1fa30339adef693d02a51254755d7f
0
Analyze the following code function for security vulnerabilities
private boolean checkFinishBootingLocked() { final boolean booting = mService.mBooting; boolean enableScreen = false; mService.mBooting = false; if (!mService.mBooted) { mService.mBooted = true; enableScreen = true; } if (booting || enableScreen) { mService.postFinishBooting(booting, enableScreen); } return booting; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkFinishBootingLocked File: services/core/java/com/android/server/am/ActivityStackSupervisor.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2016-3838
MEDIUM
4.3
android
checkFinishBootingLocked
services/core/java/com/android/server/am/ActivityStackSupervisor.java
468651c86a8adb7aa56c708d2348e99022088af3
0
Analyze the following code function for security vulnerabilities
private static int shortStrSize(String str) throws UnsupportedEncodingException { return str.getBytes("utf-8").length + 1; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: shortStrSize File: src/main/java/com/rabbitmq/client/impl/Frame.java Repository: rabbitmq/rabbitmq-java-client The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-46120
HIGH
7.5
rabbitmq/rabbitmq-java-client
shortStrSize
src/main/java/com/rabbitmq/client/impl/Frame.java
714aae602dcae6cb4b53cadf009323ebac313cc8
0
Analyze the following code function for security vulnerabilities
@Override public List<String> getEvalScripts() { assertNotReleased(); if (evalScripts == null) { evalScripts = new ArrayList<>(1); } return evalScripts; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getEvalScripts File: impl/src/main/java/com/sun/faces/context/PartialViewContextImpl.java Repository: eclipse-ee4j/mojarra The code follows secure coding practices.
[ "CWE-79" ]
CVE-2019-17091
MEDIUM
4.3
eclipse-ee4j/mojarra
getEvalScripts
impl/src/main/java/com/sun/faces/context/PartialViewContextImpl.java
a3fa9573789ed5e867c43ea38374f4dbd5a8f81f
0
Analyze the following code function for security vulnerabilities
public Api getApi() { return new Api(this); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getApi File: core/src/main/java/jenkins/model/Jenkins.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-79" ]
CVE-2014-2065
MEDIUM
4.3
jenkinsci/jenkins
getApi
core/src/main/java/jenkins/model/Jenkins.java
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
0
Analyze the following code function for security vulnerabilities
private int getStartingWindowType(boolean newTask, boolean taskSwitch, boolean processRunning, boolean allowTaskSnapshot, boolean activityCreated, boolean activityAllDrawn, TaskSnapshot snapshot) { // A special case that a new activity is launching to an existing task which is moving to // front. If the launching activity is the one that started the task, it could be a // trampoline that will be always created and finished immediately. Then give a chance to // see if the snapshot is usable for the current running activity so the transition will // look smoother, instead of showing a splash screen on the second launch. if (!newTask && taskSwitch && processRunning && !activityCreated && task.intent != null && mActivityComponent.equals(task.intent.getComponent())) { final ActivityRecord topAttached = task.getActivity(ActivityRecord::attachedToProcess); if (topAttached != null) { if (topAttached.isSnapshotCompatible(snapshot) // This trampoline must be the same rotation. && mDisplayContent.getDisplayRotation().rotationForOrientation(mOrientation, mDisplayContent.getRotation()) == snapshot.getRotation()) { return STARTING_WINDOW_TYPE_SNAPSHOT; } // No usable snapshot. And a splash screen may also be weird because an existing // activity may be shown right after the trampoline is finished. return STARTING_WINDOW_TYPE_NONE; } } final boolean isActivityHome = isActivityTypeHome(); if ((newTask || !processRunning || (taskSwitch && !activityCreated)) && !isActivityHome) { return STARTING_WINDOW_TYPE_SPLASH_SCREEN; } if (taskSwitch) { if (allowTaskSnapshot) { if (isSnapshotCompatible(snapshot)) { return STARTING_WINDOW_TYPE_SNAPSHOT; } if (!isActivityHome) { return STARTING_WINDOW_TYPE_SPLASH_SCREEN; } } if (!activityAllDrawn && !isActivityHome) { return STARTING_WINDOW_TYPE_SPLASH_SCREEN; } } return STARTING_WINDOW_TYPE_NONE; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getStartingWindowType File: services/core/java/com/android/server/wm/ActivityRecord.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21145
HIGH
7.8
android
getStartingWindowType
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
@Override public boolean hasOrgUnit( Program program, OrganisationUnit organisationUnit ) { return this.programStore.hasOrgUnit( program, organisationUnit ); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hasOrgUnit File: dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/DefaultProgramService.java Repository: dhis2/dhis2-core The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-24848
MEDIUM
6.5
dhis2/dhis2-core
hasOrgUnit
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/DefaultProgramService.java
ef04483a9b177d62e48dcf4e498b302a11f95e7d
0
Analyze the following code function for security vulnerabilities
@Override public ChannelListener getChannelListenerProxy() { return channelListenerProxy; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getChannelListenerProxy File: sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java Repository: apache/mina-sshd The code follows secure coding practices.
[ "CWE-354" ]
CVE-2023-48795
MEDIUM
5.9
apache/mina-sshd
getChannelListenerProxy
sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
6b0fd46f64bcb75eeeee31d65f10242660aad7c1
0
Analyze the following code function for security vulnerabilities
public static void main(String[] args) { if (args.length < 2) { System.out.println("Usage: xml2js path file"); } else { try { Xml2Js fw = new Xml2Js(); // Generates result StringBuffer result = new StringBuffer(); result.append("(function() {\nvar f = {};\n"); List<String> files = fw .walk(new File(new File(".").getCanonicalPath() + File.separator + args[0]), null); Iterator<String> it = files.iterator(); while (it.hasNext()) { result.append(it.next()); } result.append("\n"); result.append("var l = mxStencilRegistry.loadStencil;\n\n"); result.append( "mxStencilRegistry.loadStencil = function(filename, fn)\n{\n"); result.append(" var t = f[filename.substring(STENCIL_PATH.length + 1)];\n"); result.append(" var s = null;\n"); result.append(" if (t != null) {\n"); result.append(" t = pako.inflateRaw(Uint8Array.from(atob(t), function (c) {\n"); result.append(" return c.charCodeAt(0);\n"); result.append(" }), {to: 'string'});\n"); result.append(" s = decodeURIComponent(t);\n"); result.append(" }\n"); result.append(" if (fn != null && s != null) {\n"); result.append( " window.setTimeout(function(){fn(mxUtils.parseXml(s))}, 0);\n"); result.append(" } else {\n"); result.append( " return (s != null) ? mxUtils.parseXml(s) : l.apply(this, arguments)\n"); result.append(" }\n"); result.append("};\n"); result.append("})();\n"); FileWriter writer = new FileWriter( new File(new File(".").getCanonicalPath() + File.separator + args[1])); writer.write(result.toString()); writer.flush(); writer.close(); } catch (IOException ex) { ex.printStackTrace(); } } }
Vulnerability Classification: - CWE: CWE-284, CWE-79 - CVE: CVE-2022-3065 - Severity: HIGH - CVSS Score: 7.5 Description: 20.2.8 release Function: main File: etc/build/Xml2Js.java Repository: jgraph/drawio Fixed Code: public static void main(String[] args) { if (args.length < 2) { System.out.println("Usage: xml2js path file"); } else { try { Xml2Js fw = new Xml2Js(); // Generates result StringBuffer result = new StringBuffer(); result.append("(function() {\nvar f = {};\n"); List<String> files = fw .walk(new File(new File(".").getCanonicalPath() + File.separator + args[0]), null); Iterator<String> it = files.iterator(); while (it.hasNext()) { result.append(it.next()); } result.append("\n"); result.append("var l = mxStencilRegistry.loadStencil;\n\n"); result.append( "mxStencilRegistry.loadStencil = function(filename, fn)\n{\n"); result.append(" var t = f[filename.substring(STENCIL_PATH.length + 1)];\n"); result.append(" var s = null;\n"); result.append(" if (t != null) {\n"); result.append(" s = pako.inflateRaw(Uint8Array.from(atob(t), function (c) {\n"); result.append(" return c.charCodeAt(0);\n"); result.append(" }), {to: 'string'});\n"); result.append(" }\n"); result.append(" if (fn != null && s != null) {\n"); result.append( " window.setTimeout(function(){fn(mxUtils.parseXml(s))}, 0);\n"); result.append(" } else {\n"); result.append( " return (s != null) ? mxUtils.parseXml(s) : l.apply(this, arguments)\n"); result.append(" }\n"); result.append("};\n"); result.append("})();\n"); FileWriter writer = new FileWriter( new File(new File(".").getCanonicalPath() + File.separator + args[1])); writer.write(result.toString()); writer.flush(); writer.close(); } catch (IOException ex) { ex.printStackTrace(); } } }
[ "CWE-284", "CWE-79" ]
CVE-2022-3065
HIGH
7.5
jgraph/drawio
main
etc/build/Xml2Js.java
59887e45b36f06c8dd4919a32bacd994d9f084da
1
Analyze the following code function for security vulnerabilities
private static String computeTableForSetting(Uri uri, String name) { String table = getValidTableOrThrow(uri); if (name != null) { if (sSystemMovedToSecureSettings.contains(name)) { table = TABLE_SECURE; } if (sSystemMovedToGlobalSettings.contains(name)) { table = TABLE_GLOBAL; } if (sSecureMovedToGlobalSettings.contains(name)) { table = TABLE_GLOBAL; } if (sGlobalMovedToSecureSettings.contains(name)) { table = TABLE_SECURE; } } return table; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: computeTableForSetting File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3876
HIGH
7.2
android
computeTableForSetting
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
91fc934bb2e5ea59929bb2f574de6db9b5100745
0
Analyze the following code function for security vulnerabilities
private static EntityReferenceSerializer<String> getCompactWikiEntityReferenceSerializer() { return Utils.getComponent(EntityReferenceSerializer.TYPE_STRING, "compactwiki"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCompactWikiEntityReferenceSerializer File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2021-32620
MEDIUM
4
xwiki/xwiki-platform
getCompactWikiEntityReferenceSerializer
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
f9a677408ffb06f309be46ef9d8df1915d9099a4
0
Analyze the following code function for security vulnerabilities
public CELLTYPE join(CELLTYPE... cells) { if (cells.length < 2) { throw new IllegalArgumentException( "You need to merge at least 2 cells"); } return join(new HashSet<CELLTYPE>(Arrays.asList(cells))); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: join 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
join
server/src/main/java/com/vaadin/ui/Grid.java
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
0
Analyze the following code function for security vulnerabilities
private int _readChar () { try { final int c = m_aReader.read (); if (m_bTrackPosition) { if (m_nBackupChars > 0) { // If previously a char was backed up, don't increase the position! m_nBackupChars--; } else m_aParsePos.updatePosition (c, m_nTabSize); } return c; } catch (final IOException ex) { return EOI; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: _readChar File: ph-json/src/main/java/com/helger/json/parser/JsonParser.java Repository: phax/ph-commons The code follows secure coding practices.
[ "CWE-787" ]
CVE-2023-34612
HIGH
7.5
phax/ph-commons
_readChar
ph-json/src/main/java/com/helger/json/parser/JsonParser.java
02a4d034dcfb2b6e1796b25f519bf57a6796edce
0
Analyze the following code function for security vulnerabilities
private String getSequenceString(@Nullable CharSequence str) { if (str == null) { // A value of null retrieved from a StringPool indicates that retrieval of the // string failed due to incremental installation. The presence of all the XmlBlock // data is verified when it is created, so this exception must not be possible. throw new IllegalStateException("Retrieving a string from the StringPool of an" + " XmlBlock should never fail"); } return str.toString(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSequenceString File: core/java/android/content/res/XmlBlock.java Repository: android The code follows secure coding practices.
[ "CWE-415" ]
CVE-2023-40103
HIGH
7.8
android
getSequenceString
core/java/android/content/res/XmlBlock.java
c3bc12c484ef3bbca4cec19234437c45af5e584d
0
Analyze the following code function for security vulnerabilities
@Deprecated public XWikiDocument copyDocument(String newDocumentName, XWikiContext context) throws XWikiException { return copyDocument(getCurrentMixedDocumentReferenceResolver().resolve(newDocumentName), context); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: copyDocument 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
copyDocument
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 BaseObject updateXObjectFromRequest(EntityReference classReference, String prefix, int num, XWikiContext context) throws XWikiException { DocumentReference absoluteClassReference = resolveClassReference(classReference); int nb; BaseObject oldobject = getXObject(absoluteClassReference, num); if (oldobject == null) { nb = createXObject(classReference, context); oldobject = getXObject(absoluteClassReference, nb); } else { nb = oldobject.getNumber(); } BaseClass baseclass = oldobject.getXClass(context); String newPrefix = prefix + LOCAL_REFERENCE_SERIALIZER.serialize(absoluteClassReference) + "_" + nb; BaseObject newobject = (BaseObject) baseclass.fromMap(Util.getObject(context.getRequest(), newPrefix), oldobject); newobject.setNumber(oldobject.getNumber()); newobject.setGuid(oldobject.getGuid()); setXObject(nb, newobject); return newobject; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateXObjectFromRequest 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
updateXObjectFromRequest
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
db3d1c62fc5fb59fefcda3b86065d2d362f55164
0
Analyze the following code function for security vulnerabilities
@Override public void registerContentObserver(Uri uri, boolean notifyForDescendants, IContentObserver observer, int userHandle) { if (observer == null || uri == null) { throw new IllegalArgumentException("You must pass a valid uri and observer"); } enforceCrossUserPermission(userHandle, "no permission to observe other users' provider view"); if (userHandle < 0) { if (userHandle == UserHandle.USER_CURRENT) { userHandle = ActivityManager.getCurrentUser(); } else if (userHandle != UserHandle.USER_ALL) { throw new InvalidParameterException("Bad user handle for registerContentObserver: " + userHandle); } } synchronized (mRootNode) { mRootNode.addObserverLocked(uri, observer, notifyForDescendants, mRootNode, Binder.getCallingUid(), Binder.getCallingPid(), userHandle); if (false) Log.v(TAG, "Registered observer " + observer + " at " + uri + " with notifyForDescendants " + notifyForDescendants); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: registerContentObserver File: services/core/java/com/android/server/content/ContentService.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-2426
MEDIUM
4.3
android
registerContentObserver
services/core/java/com/android/server/content/ContentService.java
63363af721650e426db5b0bdfb8b2d4fe36abdb0
0
Analyze the following code function for security vulnerabilities
public Form<T> bindFromRequestData( Lang lang, TypedMap attrs, Map<String, String[]> requestData, Map<String, Http.MultipartFormData.FilePart<?>> requestFileData, String... allowedFields) { Map<String, String> data = new HashMap<>(); fillDataWith(data, requestData); return bind(lang, attrs, data, requestFileData, allowedFields); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: bindFromRequestData File: web/play-java-forms/src/main/java/play/data/Form.java Repository: playframework The code follows secure coding practices.
[ "CWE-400" ]
CVE-2022-31018
MEDIUM
5
playframework
bindFromRequestData
web/play-java-forms/src/main/java/play/data/Form.java
15393b736df939e35e275af2347155f296c684f2
0
Analyze the following code function for security vulnerabilities
public static int findSpace(String haystack, int begin) { int space = haystack.indexOf(' ', begin); int nbsp = haystack.indexOf('\u00A0', begin); if (space == -1 && nbsp == -1) { return -1; } else if (space >= 0 && nbsp >= 0) { return Math.min(space, nbsp); } else { // eg one is -1, and the other is >= 0 return Math.max(space, nbsp); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: findSpace File: src/edu/stanford/nlp/util/XMLUtils.java Repository: stanfordnlp/CoreNLP The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-0239
HIGH
7.5
stanfordnlp/CoreNLP
findSpace
src/edu/stanford/nlp/util/XMLUtils.java
1940ffb938dc4f3f5bc5f2a2fd8b35aabbbae3dd
0
Analyze the following code function for security vulnerabilities
@Override public boolean isOnIoThread() { return ((ConnectionBase) request.connection()).channel().eventLoop().inEventLoop(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isOnIoThread File: independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/VertxResteasyReactiveRequestContext.java Repository: quarkusio/quarkus The code follows secure coding practices.
[ "CWE-863" ]
CVE-2022-0981
MEDIUM
6.5
quarkusio/quarkus
isOnIoThread
independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/VertxResteasyReactiveRequestContext.java
96c64fd8f09c02a497e2db366c64dd9196582442
0
Analyze the following code function for security vulnerabilities
protected void closeInternally() throws SQLException { // release resources held (memory for tuples) rows = null; JdbcBlackHole.close(deleteStatement); deleteStatement = null; if (cursor != null) { cursor.close(); cursor = null; } closeRefCursor(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: closeInternally 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
closeInternally
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
739e599d52ad80f8dcd6efedc6157859b1a9d637
0
Analyze the following code function for security vulnerabilities
private static Schema getValidatorFor(final Class<?> clazz) { LOG.trace("finding XSD for class {}", clazz); if (m_schemas.containsKey(clazz)) { return m_schemas.get(clazz); } final List<Source> sources = new ArrayList<>(); final SchemaFactory factory = SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema"); for (final String schemaFileName : getSchemaFilesFor(clazz)) { InputStream schemaInputStream = null; try { if (schemaInputStream == null) { final File schemaFile = new File(System.getProperty("opennms.home") + "/share/xsds/" + schemaFileName); if (schemaFile.exists()) { LOG.trace("Found schema file {} related to {}", schemaFile, clazz); schemaInputStream = new FileInputStream(schemaFile); }; } if (schemaInputStream == null) { final File schemaFile = new File("target/xsds/" + schemaFileName); if (schemaFile.exists()) { LOG.trace("Found schema file {} related to {}", schemaFile, clazz); schemaInputStream = new FileInputStream(schemaFile); }; } if (schemaInputStream == null) { URL schemaResource = Thread.currentThread().getContextClassLoader().getResource("xsds/" + schemaFileName); if (schemaResource == null) { schemaResource = clazz.getClassLoader().getResource("xsds/" + schemaFileName); } if (schemaResource == null) { LOG.debug("Unable to load resource xsds/{} from the classpath.", schemaFileName); } else { LOG.trace("Found schema resource {} related to {}", schemaResource, clazz); schemaInputStream = schemaResource.openStream(); } } if (schemaInputStream == null) { LOG.trace("Did not find a suitable XSD. Skipping."); continue; } else { sources.add(new StreamSource(schemaInputStream)); } } catch (final Throwable t) { LOG.warn("an error occurred while attempting to load {} for validation", schemaFileName); continue; } } if (sources.size() == 0) { LOG.debug("No schema files found for validating {}", clazz); return null; } LOG.trace("Schema sources: {}", sources); try { final Schema schema = factory.newSchema(sources.toArray(EMPTY_SOURCE_LIST)); m_schemas.put(clazz, schema); return schema; } catch (final SAXException e) { LOG.warn("an error occurred while attempting to load schema validation files for class {}", clazz, e); return null; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getValidatorFor File: core/xml/src/main/java/org/opennms/core/xml/JaxbUtils.java Repository: OpenNMS/opennms The code follows secure coding practices.
[ "CWE-611" ]
CVE-2023-0871
MEDIUM
6.1
OpenNMS/opennms
getValidatorFor
core/xml/src/main/java/org/opennms/core/xml/JaxbUtils.java
3c17231714e3d55809efc580a05734ed530f9ad4
0
Analyze the following code function for security vulnerabilities
public boolean removeTriggerGroupToNeverDelete(String group) { if(group != null) return triggerGroupsToNeverDelete.remove(group); return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeTriggerGroupToNeverDelete File: quartz-core/src/main/java/org/quartz/xml/XMLSchedulingDataProcessor.java Repository: quartz-scheduler/quartz The code follows secure coding practices.
[ "CWE-611" ]
CVE-2019-13990
HIGH
7.5
quartz-scheduler/quartz
removeTriggerGroupToNeverDelete
quartz-core/src/main/java/org/quartz/xml/XMLSchedulingDataProcessor.java
a1395ba118df306c7fe67c24fb0c9a95a4473140
0
Analyze the following code function for security vulnerabilities
@Override public String getType(Uri uri) { Arguments args = new Arguments(uri, null, null, true); if (TextUtils.isEmpty(args.name)) { return "vnd.android.cursor.dir/" + args.table; } else { return "vnd.android.cursor.item/" + args.table; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getType File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3876
HIGH
7.2
android
getType
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
91fc934bb2e5ea59929bb2f574de6db9b5100745
0
Analyze the following code function for security vulnerabilities
protected IoWriteFuture sendNewKeys() throws Exception { if (log.isDebugEnabled()) { log.debug("sendNewKeys({}) Send SSH_MSG_NEWKEYS", this); } prepareNewKeys(); Buffer buffer = createBuffer(SshConstants.SSH_MSG_NEWKEYS, Byte.SIZE); IoWriteFuture future; synchronized (encodeLock) { // writePacket() would also work since it would never try to queue the packet, and would never try to // initiate a new KEX, and thus would never try to get the kexLock monitor. If it did, we might get a // deadlock due to lock inversion. It seems safer to push this out directly, though. future = doWritePacket(buffer); // Use the new settings from now on for any outgoing packet setOutputEncoding(); } kexHandler.updateState(() -> kexState.set(KexState.KEYS)); resetIdleTimeout(); /* * According to https://tools.ietf.org/html/rfc8308#section-2.4: * * * If a client sends SSH_MSG_EXT_INFO, it MUST send it as the next packet following the client's first * SSH_MSG_NEWKEYS message to the server. * * If a server sends SSH_MSG_EXT_INFO, it MAY send it at zero, one, or both of the following opportunities: * * + As the next packet following the server's first SSH_MSG_NEWKEYS. */ KexExtensionHandler extHandler = getKexExtensionHandler(); if ((extHandler != null) && extHandler.isKexExtensionsAvailable(this, AvailabilityPhase.NEWKEYS)) { extHandler.sendKexExtensions(this, KexPhase.NEWKEYS); } SimpleImmutableEntry<Integer, DefaultKeyExchangeFuture> flushDone = kexHandler.terminateKeyExchange(); // Flush the queue asynchronously. int numPending = flushDone.getKey().intValue(); if (numPending == 0) { if (log.isDebugEnabled()) { log.debug("handleNewKeys({}) No pending packets to flush at end of KEX", this); } flushDone.getValue().setValue(Boolean.TRUE); } else { if (log.isDebugEnabled()) { log.debug("handleNewKeys({}) {} pending packets to flush at end of KEX", this, numPending); } kexHandler.flushQueue(flushDone.getValue()); } return future; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sendNewKeys File: sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java Repository: apache/mina-sshd The code follows secure coding practices.
[ "CWE-354" ]
CVE-2023-48795
MEDIUM
5.9
apache/mina-sshd
sendNewKeys
sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
6b0fd46f64bcb75eeeee31d65f10242660aad7c1
0
Analyze the following code function for security vulnerabilities
private void revokeAppPermission(Account account, String authTokenType, int uid) { if (account == null || authTokenType == null) { Log.e(TAG, "revokeAppPermission: called with invalid arguments", new Exception()); return; } UserAccounts accounts = getUserAccounts(UserHandle.getUserId(uid)); synchronized (accounts.dbLock) { synchronized (accounts.cacheLock) { accounts.accountsDb.beginTransaction(); try { long accountId = accounts.accountsDb.findDeAccountId(account); if (accountId >= 0) { accounts.accountsDb.deleteGrantsByAccountIdAuthTokenTypeAndUid( accountId, authTokenType, uid); accounts.accountsDb.setTransactionSuccessful(); } } finally { accounts.accountsDb.endTransaction(); } cancelNotification( getCredentialPermissionNotificationId(account, authTokenType, uid), UserHandle.of(accounts.userId)); } } // Listeners are a final CopyOnWriteArrayList, hence no lock needed. for (AccountManagerInternal.OnAppPermissionChangeListener listener : mAppPermissionChangeListeners) { mHandler.post(() -> listener.onAppPermissionChanged(account, uid)); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: revokeAppPermission File: services/core/java/com/android/server/accounts/AccountManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-Other", "CWE-502" ]
CVE-2023-45777
HIGH
7.8
android
revokeAppPermission
services/core/java/com/android/server/accounts/AccountManagerService.java
f810d81839af38ee121c446105ca67cb12992fc6
0
Analyze the following code function for security vulnerabilities
@Column(name = "operate", nullable = false, length = 40) public String getOperate() { return this.operate; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getOperate File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/log/LogOperate.java Repository: sanluan/PublicCMS The code follows secure coding practices.
[ "CWE-79" ]
CVE-2020-21333
LOW
3.5
sanluan/PublicCMS
getOperate
publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/log/LogOperate.java
b4d5956e65b14347b162424abb197a180229b3db
0
Analyze the following code function for security vulnerabilities
private BaseObjectOutputFilterStream getBaseObjectOutputFilterStream() { return (BaseObjectOutputFilterStream) this.objectFilter; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getBaseObjectOutputFilterStream 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
getBaseObjectOutputFilterStream
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
private static com.google.auth.oauth2.UserCredentials refreshAndStoreCredential(Credential credential) throws IOException { if (credential == null) { credential = new AuthorizationCodeInstalledApp( buildCodeFlow(), CommandLinePromptReceiver.newReceiver()) .authorize(DATASTORE_USER_NAME); } else if (credential.getExpirationTimeMilliseconds() < Clock.systemUTC().millis()) { logger.atInfo().log("Access Token Expired. Refreshing."); credential.refreshToken(); StoredCredential .getDefaultDataStore(buildFileDatastoreFactory()) .set(DATASTORE_USER_NAME, new StoredCredential() .setRefreshToken(credential.getRefreshToken()) .setAccessToken(credential.getAccessToken()) .setExpirationTimeMilliseconds(credential.getExpirationTimeMilliseconds())); } return Credentials.usingSecrets(readClientSecrets()).forCredential(credential); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: refreshAndStoreCredential File: src/main/java/dswebquerytobigquery/Authorizer.java Repository: google/sa360-webquery-bigquery The code follows secure coding practices.
[ "CWE-276" ]
CVE-2021-22571
LOW
2.1
google/sa360-webquery-bigquery
refreshAndStoreCredential
src/main/java/dswebquerytobigquery/Authorizer.java
a5d6b6265d4599282216cfad2ba670e95cbbae20
0
Analyze the following code function for security vulnerabilities
private void addPreferredActivityInternal(IntentFilter filter, int match, ComponentName[] set, ComponentName activity, boolean always, int userId, String opname) { // writer int callingUid = Binder.getCallingUid(); enforceCrossUserPermission(callingUid, userId, true, false, "add preferred activity"); if (filter.countActions() == 0) { Slog.w(TAG, "Cannot set a preferred activity with no filter actions"); return; } synchronized (mPackages) { if (mContext.checkCallingOrSelfPermission( android.Manifest.permission.SET_PREFERRED_APPLICATIONS) != PackageManager.PERMISSION_GRANTED) { if (getUidTargetSdkVersionLockedLPr(callingUid) < Build.VERSION_CODES.FROYO) { Slog.w(TAG, "Ignoring addPreferredActivity() from uid " + callingUid); return; } mContext.enforceCallingOrSelfPermission( android.Manifest.permission.SET_PREFERRED_APPLICATIONS, null); } PreferredIntentResolver pir = mSettings.editPreferredActivitiesLPw(userId); Slog.i(TAG, opname + " activity " + activity.flattenToShortString() + " for user " + userId + ":"); filter.dump(new LogPrinter(Log.INFO, TAG), " "); pir.addFilter(new PreferredActivity(filter, match, set, activity, always)); scheduleWritePackageRestrictionsLocked(userId); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addPreferredActivityInternal File: services/core/java/com/android/server/pm/PackageManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-119" ]
CVE-2016-2497
HIGH
7.5
android
addPreferredActivityInternal
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
private void updatePermissionPolicyCache(int userId) { synchronized (getLockObject()) { DevicePolicyData userPolicy = getUserData(userId); mPolicyCache.setPermissionPolicy(userId, userPolicy.mPermissionPolicy); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updatePermissionPolicyCache 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
updatePermissionPolicyCache
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
@Override public int getUserSessionsCount(boolean offline) { String offlineStr = offlineToString(offline); Query query = em.createNamedQuery("findUserSessionsCount"); query.setParameter("offline", offlineStr); Number n = (Number) query.getSingleResult(); return n.intValue(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getUserSessionsCount File: model/jpa/src/main/java/org/keycloak/models/jpa/session/JpaUserSessionPersisterProvider.java Repository: keycloak The code follows secure coding practices.
[ "CWE-770" ]
CVE-2023-6563
HIGH
7.7
keycloak
getUserSessionsCount
model/jpa/src/main/java/org/keycloak/models/jpa/session/JpaUserSessionPersisterProvider.java
11eb952e1df7cbb95b1e2c101dfd4839a2375695
0
Analyze the following code function for security vulnerabilities
private static native int[] nativeAttributeResolutionStack(long ptr, long themePtr, @StyleRes int xmlStyleRes, @AttrRes int defStyleAttr, @StyleRes int defStyleRes);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: nativeAttributeResolutionStack File: core/java/android/content/res/AssetManager.java Repository: android The code follows secure coding practices.
[ "CWE-415" ]
CVE-2023-40103
HIGH
7.8
android
nativeAttributeResolutionStack
core/java/android/content/res/AssetManager.java
c3bc12c484ef3bbca4cec19234437c45af5e584d
0
Analyze the following code function for security vulnerabilities
public void setBackURL(String backURL) { _backURL = backURL; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setBackURL File: util-taglib/src/com/liferay/taglib/ui/HeaderTag.java Repository: brianchandotcom/liferay-portal The code follows secure coding practices.
[ "CWE-79" ]
CVE-2017-12647
MEDIUM
4.3
brianchandotcom/liferay-portal
setBackURL
util-taglib/src/com/liferay/taglib/ui/HeaderTag.java
bd92daa70ab77a40eff0eb18e8e91f3e095694e1
0
Analyze the following code function for security vulnerabilities
@Override public String getSessionControlBeanName() { return "jobDomainPeas"; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSessionControlBeanName File: core-war/src/main/java/org/silverpeas/web/jobdomain/servlets/JobDomainPeasRequestRouter.java Repository: Silverpeas/Silverpeas-Core The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-47324
MEDIUM
5.4
Silverpeas/Silverpeas-Core
getSessionControlBeanName
core-war/src/main/java/org/silverpeas/web/jobdomain/servlets/JobDomainPeasRequestRouter.java
9a55728729a3b431847045c674b3e883507d1e1a
0
Analyze the following code function for security vulnerabilities
protected void delegateUriPermissionsToService(Uri uri) { Intent intent = new Intent(this, XmppConnectionService.class); intent.setAction(Intent.ACTION_SEND); intent.setData(uri); intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); try { startService(intent); } catch (Exception e) { Log.e(Config.LOGTAG,"unable to delegate uri permission",e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: delegateUriPermissionsToService File: src/main/java/eu/siacs/conversations/ui/XmppActivity.java Repository: iNPUTmice/Conversations The code follows secure coding practices.
[ "CWE-200" ]
CVE-2018-18467
MEDIUM
5
iNPUTmice/Conversations
delegateUriPermissionsToService
src/main/java/eu/siacs/conversations/ui/XmppActivity.java
7177c523a1b31988666b9337249a4f1d0c36f479
0
Analyze the following code function for security vulnerabilities
public static String extractXML(Node node, int start, int length) { ExtractHandler handler = null; try { handler = new ExtractHandler(start, length); Transformer xformer = TransformerFactory.newInstance().newTransformer(); xformer.transform(new DOMSource(node), new SAXResult(handler)); return handler.getResult(); } catch (Throwable t) { if (handler != null && handler.isFinished()) { return handler.getResult(); } else { throw new RuntimeException("Failed to extract XML", t); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: extractXML File: xwiki-commons-core/xwiki-commons-xml/src/main/java/org/xwiki/xml/XMLUtils.java Repository: xwiki/xwiki-commons The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-24898
MEDIUM
4
xwiki/xwiki-commons
extractXML
xwiki-commons-core/xwiki-commons-xml/src/main/java/org/xwiki/xml/XMLUtils.java
947e8921ebd95462d5a7928f397dd1b64f77c7d5
0
Analyze the following code function for security vulnerabilities
private boolean isWebDAVResource(HttpServletRequest request) { return request.getRequestURI().contains("/repository/silverpeas/webdav/") || request.getRequestURI().contains("/repository2000/silverpeas/webdav"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isWebDAVResource File: core-war/src/main/java/org/silverpeas/web/token/SessionSynchronizerTokenValidator.java Repository: Silverpeas/Silverpeas-Core The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-47324
MEDIUM
5.4
Silverpeas/Silverpeas-Core
isWebDAVResource
core-war/src/main/java/org/silverpeas/web/token/SessionSynchronizerTokenValidator.java
9a55728729a3b431847045c674b3e883507d1e1a
0
Analyze the following code function for security vulnerabilities
@Override public int getJMSPriority() throws JMSException { return this.getIntProperty(JMS_MESSAGE_PRIORITY); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getJMSPriority File: src/main/java/com/rabbitmq/jms/client/RMQMessage.java Repository: rabbitmq/rabbitmq-jms-client The code follows secure coding practices.
[ "CWE-502" ]
CVE-2020-36282
HIGH
7.5
rabbitmq/rabbitmq-jms-client
getJMSPriority
src/main/java/com/rabbitmq/jms/client/RMQMessage.java
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
0
Analyze the following code function for security vulnerabilities
@Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; if (getClass() != obj.getClass()) return false; CertEnrollmentRequest other = (CertEnrollmentRequest) obj; if (inputs == null) { if (other.inputs != null) return false; } else if (!inputs.equals(other.inputs)) return false; if (outputs == null) { if (other.outputs != null) return false; } else if (!outputs.equals(other.outputs)) return false; if (profileId == null) { if (other.profileId != null) return false; } else if (!profileId.equals(other.profileId)) return false; if (remoteAddr == null) { if (other.remoteAddr != null) return false; } else if (!remoteAddr.equals(other.remoteAddr)) return false; if (remoteHost == null) { if (other.remoteHost != null) return false; } else if (!remoteHost.equals(other.remoteHost)) return false; if (renewal != other.renewal) return false; if (serialNum == null) { if (other.serialNum != null) return false; } else if (!serialNum.equals(other.serialNum)) return false; if (serverSideKeygenP12Passwd == null) { if (other.serverSideKeygenP12Passwd != null) return false; } else if (!serverSideKeygenP12Passwd.equals(other.serverSideKeygenP12Passwd)) return false; return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: equals File: base/common/src/main/java/com/netscape/certsrv/cert/CertEnrollmentRequest.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
equals
base/common/src/main/java/com/netscape/certsrv/cert/CertEnrollmentRequest.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
@Override public List<KBTemplate> findByUuid_C(String uuid, long companyId, int start, int end, OrderByComparator<KBTemplate> orderByComparator) { return findByUuid_C(uuid, companyId, start, end, orderByComparator, true); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: findByUuid_C File: modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java Repository: brianchandotcom/liferay-portal The code follows secure coding practices.
[ "CWE-79" ]
CVE-2017-12647
MEDIUM
4.3
brianchandotcom/liferay-portal
findByUuid_C
modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java
ef93d984be9d4d478a5c4b1ca9a86f4e80174774
0
Analyze the following code function for security vulnerabilities
public boolean isUploadingNow(OCUpload upload) { return upload != null && mCurrentAccount != null && mCurrentUpload != null && upload.getAccountName().equals(mCurrentAccount.name) && upload.getRemotePath().equals(mCurrentUpload.getRemotePath()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isUploadingNow File: src/main/java/com/owncloud/android/files/services/FileUploader.java Repository: nextcloud/android The code follows secure coding practices.
[ "CWE-732" ]
CVE-2022-24886
LOW
2.1
nextcloud/android
isUploadingNow
src/main/java/com/owncloud/android/files/services/FileUploader.java
c01fa0b17050cdcf77a468cc22f4071eae29d464
0
Analyze the following code function for security vulnerabilities
public <P extends Plugin> List<P> getPlugins(Class<P> clazz) { List<P> result = new ArrayList<P>(); for (PluginWrapper w: pluginManager.getPlugins(clazz)) { result.add((P)w.getPlugin()); } return Collections.unmodifiableList(result); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPlugins File: core/src/main/java/jenkins/model/Jenkins.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-79" ]
CVE-2014-2065
MEDIUM
4.3
jenkinsci/jenkins
getPlugins
core/src/main/java/jenkins/model/Jenkins.java
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
0
Analyze the following code function for security vulnerabilities
public RpcWrapper nextOutstandingRpc() { synchronized (_channelMutex) { RpcWrapper result = _activeRpc; _activeRpc = null; _channelMutex.notifyAll(); return result; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: nextOutstandingRpc File: src/main/java/com/rabbitmq/client/impl/AMQChannel.java Repository: rabbitmq/rabbitmq-java-client The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-46120
HIGH
7.5
rabbitmq/rabbitmq-java-client
nextOutstandingRpc
src/main/java/com/rabbitmq/client/impl/AMQChannel.java
714aae602dcae6cb4b53cadf009323ebac313cc8
0
Analyze the following code function for security vulnerabilities
@Test public void testDeserializationAsFloat02() throws Exception { Duration value = READER.without(DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS) .readValue("60.0"); assertNotNull("The value should not be null.", value); Duration exp = Duration.ofSeconds(60L, 0); assertEquals("The value is not correct.", exp, value); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: testDeserializationAsFloat02 File: datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestDurationDeserialization.java Repository: FasterXML/jackson-modules-java8 The code follows secure coding practices.
[ "CWE-20" ]
CVE-2018-1000873
MEDIUM
4.3
FasterXML/jackson-modules-java8
testDeserializationAsFloat02
datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestDurationDeserialization.java
ba27ce5909dfb49bcaf753ad3e04ecb980010b0b
0
Analyze the following code function for security vulnerabilities
public int compareTo(Tag that) { int r = Double.compare(this.ordinal, that.ordinal); if (r!=0) return -r; // descending for ordinal return this.hierarchy.compareTo(that.hierarchy); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: compareTo File: core/src/main/java/hudson/Functions.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-310" ]
CVE-2014-2061
MEDIUM
5
jenkinsci/jenkins
compareTo
core/src/main/java/hudson/Functions.java
bf539198564a1108b7b71a973bf7de963a6213ef
0
Analyze the following code function for security vulnerabilities
@Override public int getMetricsCategory() { return MetricsEvent.DIALOG_FRP; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getMetricsCategory File: src/com/android/settings/password/ChooseLockGeneric.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2018-9501
HIGH
7.2
android
getMetricsCategory
src/com/android/settings/password/ChooseLockGeneric.java
5e43341b8c7eddce88f79c9a5068362927c05b54
0
Analyze the following code function for security vulnerabilities
@Deprecated public WearableExtender addPage(Notification page) { mPages.add(page); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addPage File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
addPage
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
private TemplateManager getTemplateManager() { if (this.templateManager == null) { this.templateManager = Utils.getComponent(TemplateManager.class); } return this.templateManager; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTemplateManager File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2021-32620
MEDIUM
4
xwiki/xwiki-platform
getTemplateManager
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
f9a677408ffb06f309be46ef9d8df1915d9099a4
0
Analyze the following code function for security vulnerabilities
public void setDestinationFolderError(String message) { addError(FOLDER, message); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setDestinationFolderError File: config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java Repository: gocd The code follows secure coding practices.
[ "CWE-77" ]
CVE-2021-43286
MEDIUM
6.5
gocd
setDestinationFolderError
config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
0
Analyze the following code function for security vulnerabilities
@Override public void addPendingTopUid(int uid, int pid, @Nullable IApplicationThread thread) { final boolean isNewPending = mPendingStartActivityUids.add(uid, pid); // If the next top activity is in cached and frozen mode, WM should raise its priority // to unfreeze it. This is done by calling AMS.updateOomAdj that will lower its oom adj. // However, WM cannot hold the AMS clock here so the updateOomAdj operation is performed // in a separate thread asynchronously. Therefore WM can't guarantee AMS will unfreeze // next top activity on time. This race will fail the following binder transactions WM // sends to the activity. After this race issue between WM/ATMS and AMS is solved, this // workaround can be removed. (b/213288355) if (isNewPending && mOomAdjuster != null) { // It can be null in unit test. mOomAdjuster.mCachedAppOptimizer.unfreezeProcess(pid); } // We need to update the network rules for the app coming to the top state so that // it can access network when the device or the app is in a restricted state // (e.g. battery/data saver) but since waiting for updateOomAdj to complete and then // informing NetworkPolicyManager might get delayed, informing the state change as soon // as we know app is going to come to the top state. if (isNewPending && mNetworkPolicyUidObserver != null) { try { final long procStateSeq = mProcessList.getNextProcStateSeq(); mNetworkPolicyUidObserver.onUidStateChanged(uid, PROCESS_STATE_TOP, procStateSeq, PROCESS_CAPABILITY_ALL); if (thread != null && shouldWaitForNetworkRulesUpdate(uid)) { thread.setNetworkBlockSeq(procStateSeq); } } catch (RemoteException e) { Slog.d(TAG, "Error calling setNetworkBlockSeq", e); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addPendingTopUid 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
addPendingTopUid
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
public boolean canProfileOwnerResetPasswordWhenLocked(int userId) { if (mService != null) { try { return mService.canProfileOwnerResetPasswordWhenLocked(userId); } catch (RemoteException re) { throw re.rethrowFromSystemServer(); } } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: canProfileOwnerResetPasswordWhenLocked 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
canProfileOwnerResetPasswordWhenLocked
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
private boolean isCallerSystemApp() { int uid = Binder.getCallingUid(); String[] packages = mPackageManager.getPackagesForUid(uid); for (String packageName : packages) { if (isPackageSystemApp(packageName)) { return true; } } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isCallerSystemApp File: src/com/android/server/telecom/TelecomServiceImpl.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-0847
HIGH
7.2
android
isCallerSystemApp
src/com/android/server/telecom/TelecomServiceImpl.java
2750faaa1ec819eed9acffea7bd3daf867fda444
0
Analyze the following code function for security vulnerabilities
private void handleVerifyStates() throws CommandException { try { verifyStatesForce(); // This will throw when there's an issue. } catch (Throwable th) { throw new CommandException(th.getMessage() + "\n" + Log.getStackTraceString(th)); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handleVerifyStates 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
handleVerifyStates
services/core/java/com/android/server/pm/ShortcutService.java
96e0524c48c6e58af7d15a2caf35082186fc8de2
0
Analyze the following code function for security vulnerabilities
public void setVolume(Volume volume) throws IOException { this.volume = volume; setFile(volume.getReadOnlyAccess(), volume.getLength()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setVolume File: src/main/java/com/github/junrar/Archive.java Repository: junrar The code follows secure coding practices.
[ "CWE-835" ]
CVE-2018-12418
MEDIUM
4.3
junrar
setVolume
src/main/java/com/github/junrar/Archive.java
ad8d0ba8e155630da8a1215cee3f253e0af45817
0
Analyze the following code function for security vulnerabilities
@Override public PackagePolicy getManagedProfileContactsAccessPolicy() { if (!mHasFeature) { return null; } final CallerIdentity caller = getCallerIdentity(); Preconditions.checkCallAuthorization((isProfileOwner(caller) && isManagedProfile(caller.getUserId()))); synchronized (getLockObject()) { ActiveAdmin admin = getProfileOwnerLocked(caller.getUserId()); return (admin != null) ? admin.mManagedProfileContactsAccess : null; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getManagedProfileContactsAccessPolicy 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
getManagedProfileContactsAccessPolicy
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
public String getLatlng() { return latlng; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLatlng File: src/main/java/com/erudika/scoold/core/Profile.java Repository: Erudika/scoold The code follows secure coding practices.
[ "CWE-130" ]
CVE-2022-1543
MEDIUM
6.5
Erudika/scoold
getLatlng
src/main/java/com/erudika/scoold/core/Profile.java
62a0e92e1486ddc17676a7ead2c07ff653d167ce
0
Analyze the following code function for security vulnerabilities
void clearDefaultBrowserIfNeeded(String packageName) { for (int oneUserId : sUserManager.getUserIds()) { String defaultBrowserPackageName = getDefaultBrowserPackageName(oneUserId); if (TextUtils.isEmpty(defaultBrowserPackageName)) continue; if (packageName.equals(defaultBrowserPackageName)) { setDefaultBrowserPackageName(null, oneUserId); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: clearDefaultBrowserIfNeeded File: services/core/java/com/android/server/pm/PackageManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-119" ]
CVE-2016-2497
HIGH
7.5
android
clearDefaultBrowserIfNeeded
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
void hideMenu(final Runnable animationFinishedRunnable, boolean notifyMenuVisibility, boolean resize, @AnimationType int animationType) { if (mMenuState != MENU_STATE_NONE) { cancelDelayedHide(); if (notifyMenuVisibility) { notifyMenuStateChangeStart(MENU_STATE_NONE, resize, null); } mMenuContainerAnimator = new AnimatorSet(); ObjectAnimator menuAnim = ObjectAnimator.ofFloat(mMenuContainer, View.ALPHA, mMenuContainer.getAlpha(), 0f); menuAnim.addUpdateListener(mMenuBgUpdateListener); ObjectAnimator settingsAnim = ObjectAnimator.ofFloat(mSettingsButton, View.ALPHA, mSettingsButton.getAlpha(), 0f); ObjectAnimator dismissAnim = ObjectAnimator.ofFloat(mDismissButton, View.ALPHA, mDismissButton.getAlpha(), 0f); ObjectAnimator enterSplitAnim = ObjectAnimator.ofFloat(mEnterSplitButton, View.ALPHA, mEnterSplitButton.getAlpha(), 0f); mMenuContainerAnimator.playTogether(menuAnim, settingsAnim, dismissAnim, enterSplitAnim); mMenuContainerAnimator.setInterpolator(Interpolators.ALPHA_OUT); mMenuContainerAnimator.setDuration(getFadeOutDuration(animationType)); mMenuContainerAnimator.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { setVisibility(GONE); if (notifyMenuVisibility) { notifyMenuStateChangeFinish(MENU_STATE_NONE); } if (animationFinishedRunnable != null) { animationFinishedRunnable.run(); } } }); mMenuContainerAnimator.start(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hideMenu File: libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuView.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40123
MEDIUM
5.5
android
hideMenu
libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuView.java
7212a4bec2d2f1a74fa54a12a04255d6a183baa9
0
Analyze the following code function for security vulnerabilities
@Test public void executeConnectionThrowsException(TestContext context) throws Exception { postgresClientConnectionThrowsException().execute("SELECT 1", context.asyncAssertFailure()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: executeConnectionThrowsException File: domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java Repository: folio-org/raml-module-builder The code follows secure coding practices.
[ "CWE-89" ]
CVE-2019-15534
HIGH
7.5
folio-org/raml-module-builder
executeConnectionThrowsException
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
@Override public String getName() { return "loadbalancer"; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getName File: src/main/java/net/floodlightcontroller/loadbalancer/LoadBalancer.java Repository: floodlight The code follows secure coding practices.
[ "CWE-362", "CWE-476" ]
CVE-2015-6569
MEDIUM
4.3
floodlight
getName
src/main/java/net/floodlightcontroller/loadbalancer/LoadBalancer.java
7f5bedb625eec3ff4d29987c31cef2553a962b36
0
Analyze the following code function for security vulnerabilities
private static void appendClause(StringBuilder s, String name, String clause) { if (!TextUtils.isEmpty(clause)) { s.append(name); s.append(clause); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: appendClause File: core/java/android/database/sqlite/SQLiteQueryBuilder.java Repository: android The code follows secure coding practices.
[ "CWE-89" ]
CVE-2018-9493
LOW
2.1
android
appendClause
core/java/android/database/sqlite/SQLiteQueryBuilder.java
ebc250d16c747f4161167b5ff58b3aea88b37acf
0
Analyze the following code function for security vulnerabilities
@Override public void connectFailed(URI uri, SocketAddress address, IOException failure) { }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: connectFailed File: core/java/android/net/PacProxySelector.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2016-3763
MEDIUM
5
android
connectFailed
core/java/android/net/PacProxySelector.java
ec2fc50d202d975447211012997fe425496c849c
0
Analyze the following code function for security vulnerabilities
public LocalSession getOortSession() { return _oortSession; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getOortSession File: cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Oort.java Repository: cometd The code follows secure coding practices.
[ "CWE-863" ]
CVE-2022-24721
MEDIUM
5.5
cometd
getOortSession
cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Oort.java
bb445a143fbf320f17c62e340455cd74acfb5929
0