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
@Deprecated(since = "2.2M1") public XWikiDocument getParentDoc() { return new XWikiDocument(getParentReference()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getParentDoc File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-74" ]
CVE-2023-29523
HIGH
8.8
xwiki/xwiki-platform
getParentDoc
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
0d547181389f7941e53291af940966413823f61c
0
Analyze the following code function for security vulnerabilities
@Override public String toXML() throws Exception { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); Document document = builder.newDocument(); Element element = toDOM(document); document.appendChild(element); TransformerFactory transformerFactory = TransformerFactory.newInstance(); Transformer transformer = transformerFactory.newTransformer(); transformer.setOutputProperty(OutputKeys.INDENT, "yes"); transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4"); DOMSource domSource = new DOMSource(document); StringWriter sw = new StringWriter(); StreamResult streamResult = new StreamResult(sw); transformer.transform(domSource, streamResult); return sw.toString(); }
Vulnerability Classification: - CWE: CWE-611 - CVE: CVE-2022-2414 - Severity: HIGH - CVSS Score: 7.5 Description: Disable access to external entities when parsing XML This reduces the vulnerability of XML parsers to XXE (XML external entity) injection. The best way to prevent XXE is to stop using XML altogether, which we do plan to do. Until that happens I consider it worthwhile to tighten the security here though. Function: toXML File: base/common/src/main/java/com/netscape/certsrv/base/PKIException.java Repository: dogtagpki/pki Fixed Code: @Override public String toXML() throws Exception { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); Document document = builder.newDocument(); Element element = toDOM(document); document.appendChild(element); TransformerFactory transformerFactory = TransformerFactory.newInstance(); transformerFactory.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, ""); transformerFactory.setAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET, ""); Transformer transformer = transformerFactory.newTransformer(); transformer.setOutputProperty(OutputKeys.INDENT, "yes"); transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4"); DOMSource domSource = new DOMSource(document); StringWriter sw = new StringWriter(); StreamResult streamResult = new StreamResult(sw); transformer.transform(domSource, streamResult); return sw.toString(); }
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
toXML
base/common/src/main/java/com/netscape/certsrv/base/PKIException.java
16deffdf7548e305507982e246eb9fd1eac414fd
1
Analyze the following code function for security vulnerabilities
public String getMsisdn() { return getMsisdnForSubscriber(getDefaultSubscription()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getMsisdn File: src/java/com/android/internal/telephony/PhoneSubInfoController.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-0831
MEDIUM
4.3
android
getMsisdn
src/java/com/android/internal/telephony/PhoneSubInfoController.java
79eecef63f3ea99688333c19e22813f54d4a31b1
0
Analyze the following code function for security vulnerabilities
public Map<String, String> getResFileMapping() { return mResFileMapping; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getResFileMapping File: brut.apktool/apktool-lib/src/main/java/brut/androlib/res/ResourcesDecoder.java Repository: iBotPeaches/Apktool The code follows secure coding practices.
[ "CWE-22" ]
CVE-2024-21633
HIGH
7.8
iBotPeaches/Apktool
getResFileMapping
brut.apktool/apktool-lib/src/main/java/brut/androlib/res/ResourcesDecoder.java
d348c43b24a9de350ff6e5bd610545a10c1fc712
0
Analyze the following code function for security vulnerabilities
private void hideLocked() { Trace.beginSection("KeyguardViewMediator#hideLocked"); if (DEBUG) Log.d(TAG, "hideLocked"); Message msg = mHandler.obtainMessage(HIDE); mHandler.sendMessage(msg); Trace.endSection(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hideLocked File: packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21267
MEDIUM
5.5
android
hideLocked
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
d18d8b350756b0e89e051736c1f28744ed31e93a
0
Analyze the following code function for security vulnerabilities
public Builder version(ClickHouseVersion version) { version(version != null ? version.toString() : null); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: version File: clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNode.java Repository: ClickHouse/clickhouse-java The code follows secure coding practices.
[ "CWE-209" ]
CVE-2024-23689
HIGH
8.8
ClickHouse/clickhouse-java
version
clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNode.java
4f8d9303eb991b39ec7e7e34825241efa082238a
0
Analyze the following code function for security vulnerabilities
private RemoteInputView findRemoteInputView(View v) { if (v == null) { return null; } return (RemoteInputView) v.findViewWithTag(RemoteInputView.VIEW_TAG); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: findRemoteInputView 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
findRemoteInputView
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
public Column<T, V> setRenderer(Renderer<? super V> renderer) { return setRenderer(ValueProvider.identity(), renderer); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setRenderer 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
setRenderer
server/src/main/java/com/vaadin/ui/Grid.java
c40bed109c3723b38694ed160ea647fef5b28593
0
Analyze the following code function for security vulnerabilities
public ObjectDeserializer getDeserializer(Type type) { ObjectDeserializer deserializer = get(type); if (deserializer != null) { return deserializer; } if (type instanceof Class<?>) { return getDeserializer((Class<?>) type, type); } if (type instanceof ParameterizedType) { Type rawType = ((ParameterizedType) type).getRawType(); if (rawType instanceof Class<?>) { return getDeserializer((Class<?>) rawType, type); } else { return getDeserializer(rawType); } } if (type instanceof WildcardType) { WildcardType wildcardType = (WildcardType) type; Type[] upperBounds = wildcardType.getUpperBounds(); if (upperBounds.length == 1) { Type upperBoundType = upperBounds[0]; return getDeserializer(upperBoundType); } } return JavaObjectDeserializer.instance; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDeserializer File: src/main/java/com/alibaba/fastjson/parser/ParserConfig.java Repository: alibaba/fastjson The code follows secure coding practices.
[ "CWE-502" ]
CVE-2022-25845
MEDIUM
6.8
alibaba/fastjson
getDeserializer
src/main/java/com/alibaba/fastjson/parser/ParserConfig.java
8f3410f81cbd437f7c459f8868445d50ad301f15
0
Analyze the following code function for security vulnerabilities
private void log(ConsoleOutputStreamConsumer outputStreamConsumer, String message, Object... args) { LOG.debug(format(message, args)); outputStreamConsumer.stdOutput(format("[GIT] " + message, args)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: log File: domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java Repository: gocd The code follows secure coding practices.
[ "CWE-77" ]
CVE-2021-43286
MEDIUM
6.5
gocd
log
domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
0
Analyze the following code function for security vulnerabilities
private void sendCompleteResponse(HttpServletResponse response, String errorMessage) throws IOException { if (errorMessage == null) { response.getOutputStream().print(""); } else { response.getOutputStream().print(errorMessage); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sendCompleteResponse File: dotCMS/src/main/java/com/dotmarketing/servlets/AjaxFileUploadServlet.java Repository: dotCMS/core The code follows secure coding practices.
[ "CWE-434" ]
CVE-2017-11466
HIGH
9
dotCMS/core
sendCompleteResponse
dotCMS/src/main/java/com/dotmarketing/servlets/AjaxFileUploadServlet.java
ab2bb2e00b841d131b8734227f9106e3ac31bb99
0
Analyze the following code function for security vulnerabilities
public void updateButtonLayout() { NewsReaderListFragment newsReaderListFragment = getSlidingListFragment(); NewsReaderDetailFragment newsReaderDetailFragment = getNewsReaderDetailFragment(); if(newsReaderListFragment != null && newsReaderDetailFragment != null) { boolean isSyncRunning = OwnCloudSyncService.isSyncRunning(); newsReaderListFragment.setRefreshing(isSyncRunning); newsReaderDetailFragment.binding.swipeRefresh.setRefreshing(isSyncRunning); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateButtonLayout 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
updateButtonLayout
News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java
05449cb666059af7de2302df9d5c02997a23df85
0
Analyze the following code function for security vulnerabilities
@Override public void enterPictureInPictureMode(IBinder token) { final long origId = Binder.clearCallingIdentity(); try { synchronized(this) { if (!mSupportsPictureInPicture) { throw new IllegalStateException("enterPictureInPictureMode: " + "Device doesn't support picture-in-picture mode."); } final ActivityRecord r = ActivityRecord.forTokenLocked(token); if (r == null) { throw new IllegalStateException("enterPictureInPictureMode: " + "Can't find activity for token=" + token); } if (!r.supportsPictureInPicture()) { throw new IllegalArgumentException("enterPictureInPictureMode: " + "Picture-In-Picture not supported for r=" + r); } // Use the default launch bounds for pinned stack if it doesn't exist yet or use the // current bounds. final ActivityStack pinnedStack = mStackSupervisor.getStack(PINNED_STACK_ID); final Rect bounds = (pinnedStack != null) ? pinnedStack.mBounds : mDefaultPinnedStackBounds; mStackSupervisor.moveActivityToPinnedStackLocked( r, "enterPictureInPictureMode", bounds); } } finally { Binder.restoreCallingIdentity(origId); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: enterPictureInPictureMode 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
enterPictureInPictureMode
services/core/java/com/android/server/am/ActivityManagerService.java
6c049120c2d749f0c0289d822ec7d0aa692f55c5
0
Analyze the following code function for security vulnerabilities
private void configureRestServices() { bind(ResourceConfig.class).toProvider(ResourceConfigProvider.class).in(Singleton.class); bind(ServletContainer.class).to(DefaultServletContainer.class); contribute(FilterChainConfigurator.class, new FilterChainConfigurator() { @Override public void configure(FilterChainManager filterChainManager) { filterChainManager.createChain("/rest/**", "noSessionCreation, authcBasic"); } }); contribute(JerseyConfigurator.class, new JerseyConfigurator() { @Override public void configure(ResourceConfig resourceConfig) { resourceConfig.packages(RestConstants.class.getPackage().getName()); } }); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: configureRestServices File: server-core/src/main/java/io/onedev/server/CoreModule.java Repository: theonedev/onedev The code follows secure coding practices.
[ "CWE-94" ]
CVE-2021-21244
HIGH
7.5
theonedev/onedev
configureRestServices
server-core/src/main/java/io/onedev/server/CoreModule.java
4f5dc6fb9e50f2c41c4929b0d8c5824b2cca3d65
0
Analyze the following code function for security vulnerabilities
@JRubyMethod(name = "line") public IRubyObject line(ThreadContext context) { final Integer number = handler.getLine(); if (number == null) { return context.getRuntime().getNil(); } return RubyFixnum.newFixnum(context.getRuntime(), number.longValue()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: line File: ext/java/nokogiri/XmlSaxParserContext.java Repository: sparklemotion/nokogiri The code follows secure coding practices.
[ "CWE-241" ]
CVE-2022-29181
MEDIUM
6.4
sparklemotion/nokogiri
line
ext/java/nokogiri/XmlSaxParserContext.java
db05ba9a1bd4b90aa6c76742cf6102a7c7297267
0
Analyze the following code function for security vulnerabilities
public static List<String> getNodeTexts(Node node, String... nodePath) { List<Node> nodes = getNodes(node, nodePath); if (nodes != null) { List<String> strs = new ArrayList<>(nodes.size()); for (Node n:nodes) { strs.add(n.getTextContent()); } return strs; } else { return null; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getNodeTexts File: src/edu/stanford/nlp/time/XMLUtils.java Repository: stanfordnlp/CoreNLP The code follows secure coding practices.
[ "CWE-611" ]
CVE-2021-3869
MEDIUM
5
stanfordnlp/CoreNLP
getNodeTexts
src/edu/stanford/nlp/time/XMLUtils.java
5d83f1e8482ca304db8be726cad89554c88f136a
0
Analyze the following code function for security vulnerabilities
@Override public void setString(String key, String value, int userId) throws RemoteException { checkWritePermission(userId); setStringUnchecked(key, userId, value); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setString File: services/core/java/com/android/server/LockSettingsService.java Repository: android The code follows secure coding practices.
[ "CWE-255" ]
CVE-2016-3749
MEDIUM
4.6
android
setString
services/core/java/com/android/server/LockSettingsService.java
e83f0f6a5a6f35323f5367f99c8e287c440f33f5
0
Analyze the following code function for security vulnerabilities
public void removeListenerLocked(IOnPermissionsChangeListener listener) { mPermissionListeners.unregister(listener); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeListenerLocked 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
removeListenerLocked
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
@Override public int delete(final Uri uri, final String where, final String[] whereArgs) { if (shouldRestrictVisibility()) { Helpers.validateSelection(where, sAppReadableColumnsSet); } SQLiteDatabase db = mOpenHelper.getWritableDatabase(); int count; int match = sURIMatcher.match(uri); switch (match) { case MY_DOWNLOADS: case MY_DOWNLOADS_ID: case ALL_DOWNLOADS: case ALL_DOWNLOADS_ID: SqlSelection selection = getWhereClause(uri, where, whereArgs, match); deleteRequestHeaders(db, selection.getSelection(), selection.getParameters()); final Cursor cursor = db.query(DB_TABLE, new String[] { Downloads.Impl._ID }, selection.getSelection(), selection.getParameters(), null, null, null); try { while (cursor.moveToNext()) { final long id = cursor.getLong(0); DownloadStorageProvider.onDownloadProviderDelete(getContext(), id); } } finally { IoUtils.closeQuietly(cursor); } count = db.delete(DB_TABLE, selection.getSelection(), selection.getParameters()); break; default: Log.d(Constants.TAG, "deleting unknown/invalid URI: " + uri); throw new UnsupportedOperationException("Cannot delete URI: " + uri); } notifyContentChanged(uri, match); return count; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: delete File: src/com/android/providers/downloads/DownloadProvider.java Repository: android The code follows secure coding practices.
[ "CWE-362" ]
CVE-2016-0848
HIGH
7.2
android
delete
src/com/android/providers/downloads/DownloadProvider.java
bdc831357e7a116bc561d51bf2ddc85ff11c01a9
0
Analyze the following code function for security vulnerabilities
public boolean preserveUIOnRefresh(UIProvider provider, UICreateEvent event) { return provider.isPreservedOnRefresh(event); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: preserveUIOnRefresh File: server/src/main/java/com/vaadin/server/VaadinService.java Repository: vaadin/framework The code follows secure coding practices.
[ "CWE-203" ]
CVE-2021-31403
LOW
1.9
vaadin/framework
preserveUIOnRefresh
server/src/main/java/com/vaadin/server/VaadinService.java
d852126ab6f0c43f937239305bd0e9594834fe34
0
Analyze the following code function for security vulnerabilities
public void use(String resource, Map<String, Object> parameters, XWikiContext context) { useResource(resource, context); // Associate parameters to the resource getParametersMap(context).put(resource, parameters); getSkinExtensionAsync().use(getName(), resource, parameters); }
Vulnerability Classification: - CWE: CWE-79 - CVE: CVE-2023-29206 - Severity: MEDIUM - CVSS Score: 5.4 Description: XWIKI-9119: Refactoring of SkinExtensionPlugin * Provide some tests Function: use File: xwiki-platform-core/xwiki-platform-skin/xwiki-platform-skin-skinx/src/main/java/com/xpn/xwiki/plugin/skinx/AbstractSkinExtensionPlugin.java Repository: xwiki/xwiki-platform Fixed Code: public void use(String resource, Map<String, Object> parameters, XWikiContext context) { useResource(resource, context); // In case a previous call added some parameters, remove them, since the last call for a resource always // discards previous ones. if (parameters == null) { getParametersMap(context).remove(resource); } else { // Associate parameters to the resource getParametersMap(context).put(resource, parameters); } getSkinExtensionAsync().use(getName(), resource, parameters); }
[ "CWE-79" ]
CVE-2023-29206
MEDIUM
5.4
xwiki/xwiki-platform
use
xwiki-platform-core/xwiki-platform-skin/xwiki-platform-skin-skinx/src/main/java/com/xpn/xwiki/plugin/skinx/AbstractSkinExtensionPlugin.java
fe65bc35d5672dd2505b7ac4ec42aec57d500fbb
1
Analyze the following code function for security vulnerabilities
public Object fromXML(URL url, Object root) { return unmarshal(hierarchicalStreamDriver.createReader(url), root); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: fromXML File: xstream/src/java/com/thoughtworks/xstream/XStream.java Repository: x-stream/xstream The code follows secure coding practices.
[ "CWE-400" ]
CVE-2021-43859
MEDIUM
5
x-stream/xstream
fromXML
xstream/src/java/com/thoughtworks/xstream/XStream.java
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
0
Analyze the following code function for security vulnerabilities
public final boolean performGlobalAction(int action) { IAccessibilityServiceConnection connection = AccessibilityInteractionClient.getInstance().getConnection(mConnectionId); if (connection != null) { try { return connection.performGlobalAction(action); } catch (RemoteException re) { Log.w(LOG_TAG, "Error while calling performGlobalAction", re); re.rethrowFromSystemServer(); } } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: performGlobalAction File: core/java/android/accessibilityservice/AccessibilityService.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2016-3923
MEDIUM
4.3
android
performGlobalAction
core/java/android/accessibilityservice/AccessibilityService.java
5f256310187b4ff2f13a7abb9afed9126facd7bc
0
Analyze the following code function for security vulnerabilities
@Override public boolean onPreferenceChange(Preference preference, Object newValue) { if (preference == mAddUserWhenLocked) { Boolean value = (Boolean) newValue; Settings.Global.putInt(getContentResolver(), Settings.Global.ADD_USERS_WHEN_LOCKED, value != null && value ? 1 : 0); return true; } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onPreferenceChange File: src/com/android/settings/users/UserSettings.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3889
HIGH
7.2
android
onPreferenceChange
src/com/android/settings/users/UserSettings.java
bd5d5176c74021e8cf4970f93f273ba3023c3d72
0
Analyze the following code function for security vulnerabilities
@Override public Route.Definition connect(final String path, final Route.OneArgHandler handler) { return appendDefinition(CONNECT, path, handler); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: connect File: jooby/src/main/java/org/jooby/Jooby.java Repository: jooby-project/jooby The code follows secure coding practices.
[ "CWE-22" ]
CVE-2020-7647
MEDIUM
5
jooby-project/jooby
connect
jooby/src/main/java/org/jooby/Jooby.java
34f526028e6cd0652125baa33936ffb6a8a4a009
0
Analyze the following code function for security vulnerabilities
private boolean accountTypeManagesContacts(String accountType, int userId) { if (accountType == null) { return false; } final long identityToken = Binder.clearCallingIdentity(); Collection<RegisteredServicesCache.ServiceInfo<AuthenticatorDescription>> serviceInfos; try { serviceInfos = mAuthenticatorCache.getAllServices(userId); } finally { Binder.restoreCallingIdentity(identityToken); } // Check contacts related permissions for authenticator. for (RegisteredServicesCache.ServiceInfo<AuthenticatorDescription> serviceInfo : serviceInfos) { if (accountType.equals(serviceInfo.type.type)) { return isPermittedForPackage(serviceInfo.type.packageName, userId, Manifest.permission.WRITE_CONTACTS); } } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: accountTypeManagesContacts 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
accountTypeManagesContacts
services/core/java/com/android/server/accounts/AccountManagerService.java
f810d81839af38ee121c446105ca67cb12992fc6
0
Analyze the following code function for security vulnerabilities
public List<ProfileOutput> getOutputs() { return outputs; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getOutputs File: base/common/src/main/java/com/netscape/certsrv/profile/ProfileData.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
getOutputs
base/common/src/main/java/com/netscape/certsrv/profile/ProfileData.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
public Builder setMaxConnectionsPerHost(int maxConnectionPerHost) { this.maxConnectionPerHost = maxConnectionPerHost; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setMaxConnectionsPerHost File: api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java Repository: AsyncHttpClient/async-http-client The code follows secure coding practices.
[ "CWE-345" ]
CVE-2013-7397
MEDIUM
4.3
AsyncHttpClient/async-http-client
setMaxConnectionsPerHost
api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java
df6ed70e86c8fc340ed75563e016c8baa94d7e72
0
Analyze the following code function for security vulnerabilities
private void parseNegativeTerm(final List<Element> elements, final XmlSerializer serializer) throws Exception { final Element last = XmlUtils.getLast(elements); if (last == null) { return; } ExpressionProperties p = new ExpressionProperties(last); if (p.isOperand()) { serializer.attribute(FormulaList.XML_NS, FormulaList.XML_PROP_TEXT, "-" + p.text); XmlUtils.removeLast(elements); } else { serializer.attribute(FormulaList.XML_NS, FormulaList.XML_PROP_CODE, Operators.OperatorType.MULT.getLowerCaseName()); addTextTag("leftTerm", "-1", serializer); parseTerm("rightTerm", elements, serializer, false); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: parseNegativeTerm File: app/src/main/java/com/mkulesh/micromath/io/ImportFromSMathStudio.java Repository: mkulesh/microMathematics The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-1000821
HIGH
7.5
mkulesh/microMathematics
parseNegativeTerm
app/src/main/java/com/mkulesh/micromath/io/ImportFromSMathStudio.java
5c05ac8de16c569ff0a1816f20be235090d3dd9d
0
Analyze the following code function for security vulnerabilities
private void sendConfiguredNetworkChangedBroadcast(int reason) { Intent intent = new Intent(WifiManager.CONFIGURED_NETWORKS_CHANGED_ACTION); intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT); intent.putExtra(WifiManager.EXTRA_MULTIPLE_NETWORKS_CHANGED, true); intent.putExtra(WifiManager.EXTRA_CHANGE_REASON, reason); mContext.sendBroadcastAsUser(intent, UserHandle.ALL, Manifest.permission.ACCESS_WIFI_STATE); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sendConfiguredNetworkChangedBroadcast 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
sendConfiguredNetworkChangedBroadcast
service/java/com/android/server/wifi/WifiConfigManager.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
private static boolean isTrustRootCertListEquals(Map<String, byte[]> list1, Map<String, byte[]> list2) { if (list1 == null || list2 == null) { return list1 == list2; } if (list1.size() != list2.size()) { return false; } for (Map.Entry<String, byte[]> entry : list1.entrySet()) { if (!Arrays.equals(entry.getValue(), list2.get(entry.getKey()))) { return false; } } return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isTrustRootCertListEquals File: framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java Repository: android The code follows secure coding practices.
[ "CWE-120" ]
CVE-2023-21243
MEDIUM
5.5
android
isTrustRootCertListEquals
framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java
5b49b8711efaadadf5052ba85288860c2d7ca7a6
0
Analyze the following code function for security vulnerabilities
@Override public void dump(Appendable out, String indent) throws IOException { dumpObjects(out, indent, new DumpableCollection("observed channels", _channels.keySet())); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: dump 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
dump
cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Oort.java
bb445a143fbf320f17c62e340455cd74acfb5929
0
Analyze the following code function for security vulnerabilities
@Subscribe(threadMode = ThreadMode.BACKGROUND) public void onMessageEvent(SessionDescriptionSendEvent sessionDescriptionSend) throws IOException { NCMessageWrapper ncMessageWrapper = new NCMessageWrapper(); ncMessageWrapper.setEv("message"); ncMessageWrapper.setSessionId(callSession); NCSignalingMessage ncSignalingMessage = new NCSignalingMessage(); ncSignalingMessage.setTo(sessionDescriptionSend.getPeerId()); ncSignalingMessage.setRoomType(sessionDescriptionSend.getVideoStreamType()); ncSignalingMessage.setType(sessionDescriptionSend.getType()); NCMessagePayload ncMessagePayload = new NCMessagePayload(); ncMessagePayload.setType(sessionDescriptionSend.getType()); if (!"candidate".equals(sessionDescriptionSend.getType())) { ncMessagePayload.setSdp(sessionDescriptionSend.getSessionDescription().description); ncMessagePayload.setNick(conversationUser.getDisplayName()); } else { ncMessagePayload.setIceCandidate(sessionDescriptionSend.getNcIceCandidate()); } // Set all we need ncSignalingMessage.setPayload(ncMessagePayload); ncMessageWrapper.setSignalingMessage(ncSignalingMessage); if (!hasExternalSignalingServer) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append("{") .append("\"fn\":\"") .append(StringEscapeUtils.escapeJson(LoganSquare.serialize(ncMessageWrapper.getSignalingMessage()))) .append("\"") .append(",") .append("\"sessionId\":") .append("\"").append(StringEscapeUtils.escapeJson(callSession)).append("\"") .append(",") .append("\"ev\":\"message\"") .append("}"); List<String> strings = new ArrayList<>(); String stringToSend = stringBuilder.toString(); strings.add(stringToSend); int apiVersion = ApiUtils.getSignalingApiVersion(conversationUser, new int[]{ApiUtils.APIv3, 2, 1}); ncApi.sendSignalingMessages(credentials, ApiUtils.getUrlForSignaling(apiVersion, baseUrl, roomToken), strings.toString()) .retry(3) .subscribeOn(Schedulers.io()) .subscribe(new Observer<SignalingOverall>() { @Override public void onSubscribe(@io.reactivex.annotations.NonNull Disposable d) { // unused atm } @Override public void onNext(@io.reactivex.annotations.NonNull SignalingOverall signalingOverall) { receivedSignalingMessages(signalingOverall.getOcs().getSignalings()); } @Override public void onError(@io.reactivex.annotations.NonNull Throwable e) { Log.e(TAG, "", e); } @Override public void onComplete() { // unused atm } }); } else { webSocketClient.sendCallMessage(ncMessageWrapper); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onMessageEvent File: app/src/main/java/com/nextcloud/talk/activities/CallActivity.java Repository: nextcloud/talk-android The code follows secure coding practices.
[ "CWE-732", "CWE-200" ]
CVE-2022-41926
MEDIUM
5.5
nextcloud/talk-android
onMessageEvent
app/src/main/java/com/nextcloud/talk/activities/CallActivity.java
bb7e82fbcbd8c10d0d0128d736c41cec0f79e7d0
0
Analyze the following code function for security vulnerabilities
protected void dismissKeyboardShortcuts() { KeyboardShortcuts.dismiss(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: dismissKeyboardShortcuts 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
dismissKeyboardShortcuts
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
public void setCredentialsRefreshService(CredentialsRefreshService credentialsRefreshService) { this.credentialsRefreshService = credentialsRefreshService; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setCredentialsRefreshService File: src/main/java/com/rabbitmq/client/ConnectionFactory.java Repository: rabbitmq/rabbitmq-java-client The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-46120
HIGH
7.5
rabbitmq/rabbitmq-java-client
setCredentialsRefreshService
src/main/java/com/rabbitmq/client/ConnectionFactory.java
714aae602dcae6cb4b53cadf009323ebac313cc8
0
Analyze the following code function for security vulnerabilities
public String index() { if (AdminTokenThreadLocal.getUser() != null) { initIndex(getRequest()); if (getPara(0) == null || getRequest().getRequestURI().endsWith("admin/") || "login".equals(getPara(0))) { redirect(Constants.ADMIN_INDEX); return null; } else { if ("dashboard".equals(getPara(0))) { fillStatistics(); } else if ("website".equals(getPara(0))) { setAttr("templates", templateService.getAllTemplates(getRequest().getContextPath(), TemplateHelper.getTemplatePathByCookie(getRequest().getCookies()))); } return "/admin/" + getPara(0); } } else { return LOGOUT_URI; } }
Vulnerability Classification: - CWE: CWE-79 - CVE: CVE-2019-16643 - Severity: LOW - CVSS Score: 3.5 Description: Upgrade jar version & fix #54 Signed-off-by: xiaochun <xchun90@163.com> Function: index File: web/src/main/java/com/zrlog/web/controller/admin/page/AdminPageController.java Repository: 94fzb/zrlog Fixed Code: public String index() { if (AdminTokenThreadLocal.getUser() != null) { AdminInterceptor.initIndex(getRequest()); if (getPara(0) == null || getRequest().getRequestURI().endsWith("admin/") || "login".equals(getPara(0))) { redirect(Constants.ADMIN_INDEX); return null; } else { if ("dashboard".equals(getPara(0))) { fillStatistics(); } else if ("website".equals(getPara(0))) { setAttr("templates", templateService.getAllTemplates(getRequest().getContextPath(), TemplateHelper.getTemplatePathByCookie(getRequest().getCookies()))); } return "/admin/" + getPara(0); } } else { return LOGOUT_URI; } }
[ "CWE-79" ]
CVE-2019-16643
LOW
3.5
94fzb/zrlog
index
web/src/main/java/com/zrlog/web/controller/admin/page/AdminPageController.java
4a91c83af669e31a22297c14f089d8911d353fa1
1
Analyze the following code function for security vulnerabilities
public synchronized TopLevelItem createProject( TopLevelItemDescriptor type, String name ) throws IOException { return createProject(type, name, true); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createProject 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
createProject
core/src/main/java/jenkins/model/Jenkins.java
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
0
Analyze the following code function for security vulnerabilities
private void toggleScrollDownButton(AbsListView listView) { if (conversation == null) { return; } if (scrolledToBottom(listView)) { lastMessageUuid = null; hideUnreadMessagesCount(); } else { binding.scrollToBottomButton.setEnabled(true); binding.scrollToBottomButton.show(); if (lastMessageUuid == null) { lastMessageUuid = conversation.getLatestMessage().getUuid(); } if (conversation.getReceivedMessagesCountSinceUuid(lastMessageUuid) > 0) { binding.unreadCountCustomView.setVisibility(View.VISIBLE); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toggleScrollDownButton File: src/main/java/eu/siacs/conversations/ui/ConversationFragment.java Repository: iNPUTmice/Conversations The code follows secure coding practices.
[ "CWE-200" ]
CVE-2018-18467
MEDIUM
5
iNPUTmice/Conversations
toggleScrollDownButton
src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
7177c523a1b31988666b9337249a4f1d0c36f479
0
Analyze the following code function for security vulnerabilities
private SecretKey getKey() { try { if (secret==null) { synchronized (this) { if (secret==null) { byte[] payload = load(); if (payload==null) { payload = ConfidentialStore.get().randomBytes(256); store(payload); } // Due to the stupid US export restriction JDK only ships 128bit version. secret = new SecretKeySpec(payload,0,128/8, ALGORITHM); } } } return secret; } catch (IOException e) { throw new Error("Failed to load the key: "+getId(),e); } }
Vulnerability Classification: - CWE: CWE-326 - CVE: CVE-2017-2598 - Severity: MEDIUM - CVSS Score: 4.0 Description: Merge pull request #105 from jenkinsci-cert/SECURITY-304-t3 [SECURITY-304] Encrypt new secrets with CBC and random IV instead of ECB Function: getKey File: core/src/main/java/jenkins/security/CryptoConfidentialKey.java Repository: jenkinsci/jenkins Fixed Code: private SecretKey getKey() { try { if (secret==null) { synchronized (this) { if (secret==null) { byte[] payload = load(); if (payload==null) { payload = ConfidentialStore.get().randomBytes(256); store(payload); } // Due to the stupid US export restriction JDK only ships 128bit version. secret = new SecretKeySpec(payload,0,128/8, KEY_ALGORITHM); } } } return secret; } catch (IOException e) { throw new Error("Failed to load the key: "+getId(),e); } }
[ "CWE-326" ]
CVE-2017-2598
MEDIUM
4
jenkinsci/jenkins
getKey
core/src/main/java/jenkins/security/CryptoConfidentialKey.java
e6aa166246d1734f4798a9e31f78842f4c85c28b
1
Analyze the following code function for security vulnerabilities
@Override public void setAddress(String callId, Uri address, int presentation, Session.Info sessionInfo) { Log.startSession(sessionInfo, "CSW.sA", mPackageAbbreviation); long token = Binder.clearCallingIdentity(); try { synchronized (mLock) { logIncoming("setAddress %s %s %d", callId, address, presentation); Call call = mCallIdMapper.getCall(callId); if (call != null) { call.setHandle(address, presentation); } } } catch (Throwable t) { Log.e(ConnectionServiceWrapper.this, t, ""); throw t; } finally { Binder.restoreCallingIdentity(token); Log.endSession(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setAddress File: src/com/android/server/telecom/ConnectionServiceWrapper.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21283
MEDIUM
5.5
android
setAddress
src/com/android/server/telecom/ConnectionServiceWrapper.java
9b41a963f352fdb3da1da8c633d45280badfcb24
0
Analyze the following code function for security vulnerabilities
public static void setupDefaultSecurity(final XStream xstream) { if (!xstream.securityInitialized) { xstream.addPermission(NoTypePermission.NONE); xstream.addPermission(NullPermission.NULL); xstream.addPermission(PrimitiveTypePermission.PRIMITIVES); xstream.addPermission(ArrayTypePermission.ARRAYS); xstream.addPermission(InterfaceTypePermission.INTERFACES); xstream.allowTypeHierarchy(Calendar.class); xstream.allowTypeHierarchy(Collection.class); xstream.allowTypeHierarchy(Map.class); xstream.allowTypeHierarchy(Map.Entry.class); xstream.allowTypeHierarchy(Member.class); xstream.allowTypeHierarchy(Number.class); xstream.allowTypeHierarchy(Throwable.class); xstream.allowTypeHierarchy(TimeZone.class); Class type = JVM.loadClassForName("java.lang.Enum"); if (type != null) { xstream.allowTypeHierarchy(type); } type = JVM.loadClassForName("java.nio.file.Path"); if (type != null) { xstream.allowTypeHierarchy(type); } final Set types = new HashSet(); types.add(BitSet.class); types.add(Charset.class); types.add(Class.class); types.add(Currency.class); types.add(Date.class); types.add(DecimalFormatSymbols.class); types.add(File.class); types.add(Locale.class); types.add(Object.class); types.add(Pattern.class); types.add(StackTraceElement.class); types.add(String.class); types.add(StringBuffer.class); types.add(JVM.loadClassForName("java.lang.StringBuilder")); types.add(URL.class); types.add(URI.class); types.add(JVM.loadClassForName("java.util.UUID")); if (JVM.isSQLAvailable()) { types.add(JVM.loadClassForName("java.sql.Timestamp")); types.add(JVM.loadClassForName("java.sql.Time")); types.add(JVM.loadClassForName("java.sql.Date")); } if (JVM.isVersion(8)) { xstream.allowTypeHierarchy(JVM.loadClassForName("java.time.Clock")); types.add(JVM.loadClassForName("java.time.Duration")); types.add(JVM.loadClassForName("java.time.Instant")); types.add(JVM.loadClassForName("java.time.LocalDate")); types.add(JVM.loadClassForName("java.time.LocalDateTime")); types.add(JVM.loadClassForName("java.time.LocalTime")); types.add(JVM.loadClassForName("java.time.MonthDay")); types.add(JVM.loadClassForName("java.time.OffsetDateTime")); types.add(JVM.loadClassForName("java.time.OffsetTime")); types.add(JVM.loadClassForName("java.time.Period")); types.add(JVM.loadClassForName("java.time.Ser")); types.add(JVM.loadClassForName("java.time.Year")); types.add(JVM.loadClassForName("java.time.YearMonth")); types.add(JVM.loadClassForName("java.time.ZonedDateTime")); xstream.allowTypeHierarchy(JVM.loadClassForName("java.time.ZoneId")); types.add(JVM.loadClassForName("java.time.chrono.HijrahDate")); types.add(JVM.loadClassForName("java.time.chrono.JapaneseDate")); types.add(JVM.loadClassForName("java.time.chrono.JapaneseEra")); types.add(JVM.loadClassForName("java.time.chrono.MinguoDate")); types.add(JVM.loadClassForName("java.time.chrono.ThaiBuddhistDate")); types.add(JVM.loadClassForName("java.time.chrono.Ser")); xstream.allowTypeHierarchy(JVM.loadClassForName("java.time.chrono.Chronology")); types.add(JVM.loadClassForName("java.time.temporal.ValueRange")); types.add(JVM.loadClassForName("java.time.temporal.WeekFields")); } types.remove(null); final Iterator iter = types.iterator(); final Class[] classes = new Class[types.size()]; for (int i = 0; i < classes.length; ++i) { classes[i] = (Class)iter.next(); } xstream.allowTypes(classes); } else { throw new IllegalArgumentException("Security framework of XStream instance already initialized"); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setupDefaultSecurity File: xstream/src/java/com/thoughtworks/xstream/XStream.java Repository: x-stream/xstream The code follows secure coding practices.
[ "CWE-78" ]
CVE-2020-26217
HIGH
9.3
x-stream/xstream
setupDefaultSecurity
xstream/src/java/com/thoughtworks/xstream/XStream.java
0fec095d534126931c99fd38e9c6d41f5c685c1a
0
Analyze the following code function for security vulnerabilities
@Override protected String getDatabaseID() { return delegate.getDatabaseID(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDatabaseID File: modules/library/jdbc/src/main/java/org/geotools/jdbc/JDBCJNDIDataStoreFactory.java Repository: geotools The code follows secure coding practices.
[ "CWE-917" ]
CVE-2022-24818
HIGH
7.5
geotools
getDatabaseID
modules/library/jdbc/src/main/java/org/geotools/jdbc/JDBCJNDIDataStoreFactory.java
4f70fa3234391dd0cda883a20ab0ec75688cba49
0
Analyze the following code function for security vulnerabilities
boolean isState(State state1, State state2) { return state1 == mState || state2 == mState; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isState File: services/core/java/com/android/server/wm/ActivityRecord.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21145
HIGH
7.8
android
isState
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
public int getConnectionTimeout() { return this.connectionTimeout; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getConnectionTimeout File: src/main/java/com/rabbitmq/client/ConnectionFactory.java Repository: rabbitmq/rabbitmq-java-client The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-46120
HIGH
7.5
rabbitmq/rabbitmq-java-client
getConnectionTimeout
src/main/java/com/rabbitmq/client/ConnectionFactory.java
714aae602dcae6cb4b53cadf009323ebac313cc8
0
Analyze the following code function for security vulnerabilities
private void transferProfileOwnershipLocked(ComponentName admin, ComponentName target, int profileOwnerUserId) { transferActiveAdminUncheckedLocked(target, admin, profileOwnerUserId); mOwners.transferProfileOwner(target, profileOwnerUserId); Slogf.i(LOG_TAG, "Profile owner set: " + target + " on user " + profileOwnerUserId); mOwners.writeProfileOwner(profileOwnerUserId); mDeviceAdminServiceController.startServiceForAdmin( target.getPackageName(), profileOwnerUserId, "transfer-profile-owner"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: transferProfileOwnershipLocked 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
transferProfileOwnershipLocked
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
public Node getContainer(String tagname) { NodeList list = mDoc.getElementsByTagName(tagname); if (list.getLength() > 0) return list.item(0); return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getContainer File: base/util/src/main/java/com/netscape/cmsutil/xml/XMLObject.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
getContainer
base/util/src/main/java/com/netscape/cmsutil/xml/XMLObject.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
static OriginInfo fromNothing() { return new OriginInfo(null, null, false, false); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: fromNothing 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
fromNothing
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
ActivityStack getFocusedStack() { return mFocusedStack; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getFocusedStack 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
getFocusedStack
services/core/java/com/android/server/am/ActivityStackSupervisor.java
468651c86a8adb7aa56c708d2348e99022088af3
0
Analyze the following code function for security vulnerabilities
@VisibleForTesting public void showMnemonicInfo() { requireDialog().setTitle(R.string.end_to_end_encryption_passphrase_title); textView.setText(R.string.end_to_end_encryption_keywords_description); passphraseTextView.setText(generateMnemonicString(true)); passphraseTextView.setVisibility(View.VISIBLE); positiveButton.setText(R.string.end_to_end_encryption_confirm_button); positiveButton.setVisibility(View.VISIBLE); neutralButton.setVisibility(View.VISIBLE); ThemeButtonUtils.themeBorderlessButton(positiveButton, neutralButton); keyResult = KEY_GENERATE; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: showMnemonicInfo File: src/main/java/com/owncloud/android/ui/dialog/SetupEncryptionDialogFragment.java Repository: nextcloud/android The code follows secure coding practices.
[ "CWE-212" ]
CVE-2021-32658
LOW
2.1
nextcloud/android
showMnemonicInfo
src/main/java/com/owncloud/android/ui/dialog/SetupEncryptionDialogFragment.java
355f3c745b464b741b20a3b96597303490c26333
0
Analyze the following code function for security vulnerabilities
protected String[] getEnabledProtocols() { return enabledProtocols.clone(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getEnabledProtocols File: src/main/java/org/conscrypt/SSLParametersImpl.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3840
HIGH
10
android
getEnabledProtocols
src/main/java/org/conscrypt/SSLParametersImpl.java
5af5e93463f4333187e7e35f3bd2b846654aa214
0
Analyze the following code function for security vulnerabilities
@Column(name = "site_id", nullable = false) public short getSiteId() { return this.siteId; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSiteId File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/trade/TradeOrder.java Repository: sanluan/PublicCMS The code follows secure coding practices.
[ "CWE-79" ]
CVE-2020-21333
LOW
3.5
sanluan/PublicCMS
getSiteId
publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/trade/TradeOrder.java
b4d5956e65b14347b162424abb197a180229b3db
0
Analyze the following code function for security vulnerabilities
static String asDynamicKey(String key) { if (key.isEmpty() || MATCHES_DATA.matcher(key).matches()) { return key; } else { return "data[" + key + "]"; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: asDynamicKey File: web/play-java-forms/src/main/java/play/data/DynamicForm.java Repository: playframework The code follows secure coding practices.
[ "CWE-400" ]
CVE-2022-31018
MEDIUM
5
playframework
asDynamicKey
web/play-java-forms/src/main/java/play/data/DynamicForm.java
15393b736df939e35e275af2347155f296c684f2
0
Analyze the following code function for security vulnerabilities
public void setReadTimeout(final int readTimeout) { this.readTimeout = readTimeout; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setReadTimeout File: pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java Repository: pac4j The code follows secure coding practices.
[ "CWE-347" ]
CVE-2021-44878
MEDIUM
5
pac4j
setReadTimeout
pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java
22b82ffd702a132d9f09da60362fc6264fc281ae
0
Analyze the following code function for security vulnerabilities
protected void showVariables( final String uri, final HttpServletResponse response, final String namespace, final String tag, final boolean includeDoc, final DisplayType displayType, final String... vars ) throws IOException { final VariableHost exporter; if (!Strings.isNullOrEmpty(tag)) { exporter = VarExporter.withTag(tag); } else if (!Strings.isNullOrEmpty(namespace)) { final Optional<VarExporter> maybeExporter = VarExporter.forNamespaceIfExists(namespace); if (!maybeExporter.isPresent()) { response.sendError(HttpServletResponse.SC_NOT_FOUND, "The specified namespace not found"); return; } exporter = maybeExporter.get(); } else { exporter = VarExporter.global(); } final PrintWriter out = response.getWriter(); response.setContentType(displayType.mimeType); switch(displayType) { case HTML: showUsingTemplate(exporter, uri, namespace, includeDoc, varHtmlTemplate, true, out, vars); break; case PLAINTEXT: showUsingTemplate(exporter, uri, namespace, includeDoc, varTextTemplate, false, out, vars); break; // TODO: support json -- exporter JSON is currently broken } out.flush(); out.close(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: showVariables File: varexport/src/main/java/com/indeed/util/varexport/servlet/ViewExportedVariablesServlet.java Repository: indeedeng/util The code follows secure coding practices.
[ "CWE-79" ]
CVE-2020-36634
MEDIUM
5.4
indeedeng/util
showVariables
varexport/src/main/java/com/indeed/util/varexport/servlet/ViewExportedVariablesServlet.java
c0952a9db51a880e9544d9fac2a2218a6bfc9c63
0
Analyze the following code function for security vulnerabilities
@NonNull public Builder setContentTitle(CharSequence title) { mN.extras.putCharSequence(EXTRA_TITLE, safeCharSequence(title)); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setContentTitle File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
setContentTitle
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
protected static String evaluateStaticConstant(String fqn) { int lastPeriod = fqn.lastIndexOf("."); String clazzName = fqn.substring(0, lastPeriod); String constantName = fqn.substring(lastPeriod + 1); try { Class<?> clazz = Context.loadClass(clazzName); Field constantField = clazz.getField(constantName); Object val = constantField.get(null); return val != null ? String.valueOf(val) : null; } catch (Exception ex) { throw new IllegalArgumentException("Unable to evaluate " + fqn, ex); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: evaluateStaticConstant File: api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java Repository: openmrs/openmrs-module-htmlformentry The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-16521
HIGH
7.5
openmrs/openmrs-module-htmlformentry
evaluateStaticConstant
api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java
9dcd304688e65c31cac5532fe501b9816ed975ae
0
Analyze the following code function for security vulnerabilities
@Override public boolean isPartialRequest() { assertNotReleased(); if (partialRequest == null) { partialRequest = isAjaxRequest() || "partial/process".equals(ctx. getExternalContext().getRequestHeaderMap().get("Faces-Request")); } return partialRequest; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isPartialRequest 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
isPartialRequest
impl/src/main/java/com/sun/faces/context/PartialViewContextImpl.java
a3fa9573789ed5e867c43ea38374f4dbd5a8f81f
0
Analyze the following code function for security vulnerabilities
private IDevicePolicyManager getDevicePolicyManager() { synchronized (mService) { if (mDevicePolicyManager == null) { mDevicePolicyManager = IDevicePolicyManager.Stub.asInterface( ServiceManager.checkService(Context.DEVICE_POLICY_SERVICE)); if (mDevicePolicyManager == null) { Slog.w(TAG, "warning: no DEVICE_POLICY_SERVICE"); } } return mDevicePolicyManager; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDevicePolicyManager 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
getDevicePolicyManager
services/core/java/com/android/server/am/ActivityStackSupervisor.java
468651c86a8adb7aa56c708d2348e99022088af3
0
Analyze the following code function for security vulnerabilities
@Override public String getPositionUrl(String position) { State positionState = SerializationUtils.clone(state); positionState.blobIdent.revision = resolvedRevision.name(); positionState.commentId = null; positionState.position = position; PageParameters params = paramsOf(getProject(), positionState); return RequestCycle.get().urlFor(ProjectBlobPage.class, params).toString(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPositionUrl File: server-core/src/main/java/io/onedev/server/web/page/project/blob/ProjectBlobPage.java Repository: theonedev/onedev The code follows secure coding practices.
[ "CWE-434" ]
CVE-2021-21245
HIGH
7.5
theonedev/onedev
getPositionUrl
server-core/src/main/java/io/onedev/server/web/page/project/blob/ProjectBlobPage.java
0c060153fb97c0288a1917efdb17cc426934dacb
0
Analyze the following code function for security vulnerabilities
@Override public ResourceInfo findResource(LibraryInfo library, String resourceName, String localePrefix, boolean compressable, FacesContext ctx) { resourceName = trimLeadingSlash(resourceName); ContractInfo [] outContract = new ContractInfo[1]; outContract[0] = null; String [] outBasePath = new String[1]; outBasePath[0] = null; ClassLoader loader = Util.getCurrentLoader(this); URL basePathURL = findPathConsideringContracts(loader, library, resourceName, localePrefix, outContract, outBasePath, ctx); String basePath = outBasePath[0]; if (null == basePathURL) { basePath = deriveBasePath(library, resourceName, localePrefix); basePathURL = loader.getResource(basePath); } if (null == basePathURL) { // try using this class' loader (necessary when running in OSGi) basePathURL = this.getClass().getClassLoader().getResource(basePath); if (basePathURL == null) { // Try it without the localePrefix if (library != null) { basePath = library.getPath(null) + '/' + resourceName; } else { basePath = getBaseResourcePath() + '/' + resourceName; } basePathURL = loader.getResource(basePath); if (basePathURL == null) { // try using this class' loader (necessary when running in OSGi) basePathURL = this.getClass().getClassLoader().getResource(basePath); if (basePathURL == null) { return null; } } localePrefix = null; } } ClientResourceInfo value; if (library != null) { value = new ClientResourceInfo(library, outContract[0], resourceName, null, compressable, resourceSupportsEL(resourceName, library.getName(), ctx), ctx.isProjectStage(ProjectStage.Development), cacheTimestamp); } else { value = new ClientResourceInfo(outContract[0], resourceName, null, localePrefix, this, compressable, resourceSupportsEL(resourceName, null, ctx), ctx.isProjectStage(ProjectStage.Development), cacheTimestamp); } if (value.isCompressable()) { value = handleCompression(value); } return value; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: findResource File: impl/src/main/java/com/sun/faces/application/resource/ClasspathResourceHelper.java Repository: eclipse-ee4j/mojarra The code follows secure coding practices.
[ "CWE-22" ]
CVE-2020-6950
MEDIUM
4.3
eclipse-ee4j/mojarra
findResource
impl/src/main/java/com/sun/faces/application/resource/ClasspathResourceHelper.java
cefbb9447e7be560e59da2da6bd7cb93776f7741
0
Analyze the following code function for security vulnerabilities
public static String getFullNameWithFamilyNameFirst(PersonName personName) { if (personName == null) { return "[" + Context.getMessageSourceService().getMessage("htmlformentry.unknownProviderName") + "]"; } StringBuffer nameString = new StringBuffer(); if (StringUtils.isNotBlank(personName.getFamilyNamePrefix())) { nameString.append(personName.getFamilyNamePrefix() + " "); } if (StringUtils.isNotBlank(personName.getFamilyName())) { nameString.append(personName.getFamilyName() + " "); } if (StringUtils.isNotBlank(personName.getFamilyName2())) { nameString.append(personName.getFamilyName2() + " "); } if (StringUtils.isNotBlank(personName.getFamilyNameSuffix())) { nameString.append(personName.getFamilyNameSuffix() + " "); } if (nameString.length() > 0) { nameString.deleteCharAt(nameString.length() - 1); // delete trailing space nameString.append(", "); } if (StringUtils.isNotBlank(personName.getPrefix())) { nameString.append(personName.getPrefix() + " "); } if (StringUtils.isNotBlank(personName.getGivenName())) { nameString.append(personName.getGivenName() + " "); } if (StringUtils.isNotBlank(personName.getMiddleName())) { nameString.append(personName.getMiddleName() + " "); } if (StringUtils.isNotBlank(personName.getDegree())) { nameString.append(personName.getDegree() + " "); } if (nameString.length() > 1) { nameString.deleteCharAt(nameString.length() - 1); // delete trailing space } return nameString.toString(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getFullNameWithFamilyNameFirst File: api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java Repository: openmrs/openmrs-module-htmlformentry The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-16521
HIGH
7.5
openmrs/openmrs-module-htmlformentry
getFullNameWithFamilyNameFirst
api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java
9dcd304688e65c31cac5532fe501b9816ed975ae
0
Analyze the following code function for security vulnerabilities
private boolean shouldEncryptWithCredentials(boolean defaultValue) { return isCredentialRequiredToDecrypt(defaultValue) && !isDoNotAskCredentialsOnBootSet(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: shouldEncryptWithCredentials File: core/java/com/android/internal/widget/LockPatternUtils.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3908
MEDIUM
4.3
android
shouldEncryptWithCredentials
core/java/com/android/internal/widget/LockPatternUtils.java
96daf7d4893f614714761af2d53dfb93214a32e4
0
Analyze the following code function for security vulnerabilities
public String[] getRecentRevisions(int nb, XWikiContext context) throws XWikiException { try { Version[] revisions = getVersioningStore(context).getXWikiDocVersions(this, context); int length = nb; // 0 means all revisions if (nb == 0) { length = revisions.length; } if (revisions.length < length) { length = revisions.length; } String[] recentrevs = new String[length]; for (int i = 1; i <= length; i++) { recentrevs[i - 1] = revisions[revisions.length - i].toString(); } return recentrevs; } catch (Exception e) { return new String[0]; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRecentRevisions 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
getRecentRevisions
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
db3d1c62fc5fb59fefcda3b86065d2d362f55164
0
Analyze the following code function for security vulnerabilities
public static OfflineCause create(Localizable d) { if (d==null) return null; return new SimpleOfflineCause(d); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: create File: core/src/main/java/hudson/slaves/OfflineCause.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-200" ]
CVE-2017-2603
LOW
3.5
jenkinsci/jenkins
create
core/src/main/java/hudson/slaves/OfflineCause.java
3cd946cbef82c6da5ccccf3890d0ae4e091c4265
0
Analyze the following code function for security vulnerabilities
public void onActivityResult(int requestCode, final int resultCode, Intent data) { if (requestCode == IntentIntegrator.REQUEST_CODE && callback != null) { final ScanResult sr = callback; if (resultCode == Activity.RESULT_OK) { final String contents = data.getStringExtra("SCAN_RESULT"); final String formatName = data.getStringExtra("SCAN_RESULT_FORMAT"); final byte[] rawBytes = data.getByteArrayExtra("SCAN_RESULT_BYTES"); Display.getInstance().callSerially(new Runnable() { @Override public void run() { sr.scanCompleted(contents, formatName, rawBytes); } }); } else if(resultCode == Activity.RESULT_CANCELED) { Display.getInstance().callSerially(new Runnable() { @Override public void run() { sr.scanCanceled(); } }); } else { Display.getInstance().callSerially(new Runnable() { @Override public void run() { sr.scanError(resultCode, null); } }); } callback = null; } // restore old activity handling if (getActivity() instanceof CodenameOneActivity) { ((CodenameOneActivity) getActivity()).restoreIntentResultListener(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onActivityResult File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java Repository: codenameone/CodenameOne The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-4903
MEDIUM
5.1
codenameone/CodenameOne
onActivityResult
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
boolean isInvalidJar(JARDesc jar) { File cacheFile = tracker.getCacheFile(jar.getLocation()); if (cacheFile == null) { return false;//File cannot be retrieved, do not claim it is an invalid jar } boolean isInvalid = false; try { JarFile jarFile = new JarFile(cacheFile.getAbsolutePath()); jarFile.close(); } catch (IOException ioe) { //Catch a ZipException or any other read failure isInvalid = true; } return isInvalid; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isInvalidJar 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
isInvalidJar
core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
e0818f521a0711aeec4b913b49b5fc6a52815662
0
Analyze the following code function for security vulnerabilities
@Override public boolean isReadOnly(ELContext context, Object base, Object property) { return super.isReadOnly(context, base, validatePropertyName(property)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isReadOnly File: src/main/java/com/hubspot/jinjava/el/ext/JinjavaBeanELResolver.java Repository: HubSpot/jinjava The code follows secure coding practices.
[ "CWE-863" ]
CVE-2020-12668
MEDIUM
6.8
HubSpot/jinjava
isReadOnly
src/main/java/com/hubspot/jinjava/el/ext/JinjavaBeanELResolver.java
5dfa5b87318744a4d020b66d5f7747acc36b213b
0
Analyze the following code function for security vulnerabilities
private static Document loadXML(String filename) throws IOException, ParserConfigurationException, SAXException { DocumentBuilder builder = DocumentBuilderFactory.newInstance() .newDocumentBuilder(); return builder.parse(new File(filename)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: loadXML File: dspace-api/src/main/java/org/dspace/app/itemimport/ItemImport.java Repository: DSpace The code follows secure coding practices.
[ "CWE-22" ]
CVE-2022-31195
HIGH
7.2
DSpace
loadXML
dspace-api/src/main/java/org/dspace/app/itemimport/ItemImport.java
56e76049185bbd87c994128a9d77735ad7af0199
0
Analyze the following code function for security vulnerabilities
public void writeBinary(byte[] bin) throws TException { writeI32(bin.length); trans_.write(bin, 0, bin.length); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: writeBinary File: thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TBinaryProtocol.java Repository: facebook/fbthrift The code follows secure coding practices.
[ "CWE-770" ]
CVE-2019-11938
MEDIUM
5
facebook/fbthrift
writeBinary
thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TBinaryProtocol.java
08c2d412adb214c40bb03be7587057b25d053030
0
Analyze the following code function for security vulnerabilities
private static boolean handleCompress(File folder, OutputStream outputStream) { ZipOutputStream out = null; try { List<File> files = new ArrayList<>(); buildFileList(files, folder); String absPath = folder.getAbsolutePath(); int folderLength = absPath.endsWith("/") ? absPath.length() : absPath.length() + 1; out = new ZipOutputStream(new BufferedOutputStream(outputStream)); for (File file : files) { ZipEntry entry = new ZipEntry(file.getAbsolutePath().substring(folderLength)); out.putNextEntry(entry); if (!handleStreamCopy(new FileInputStream(file), out, true, false)) return false; out.closeEntry(); } return true; } catch (IOException e) { e.printStackTrace(); return false; } finally { try { if (out != null) { out.close(); } } catch (IOException e2) { e2.printStackTrace(); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handleCompress File: APDE/src/main/java/com/calsignlabs/apde/build/dag/CopyBuildTask.java Repository: Calsign/APDE The code follows secure coding practices.
[ "CWE-22" ]
CVE-2020-36628
CRITICAL
9.8
Calsign/APDE
handleCompress
APDE/src/main/java/com/calsignlabs/apde/build/dag/CopyBuildTask.java
c6d64cbe465348c1bfd211122d89e3117afadecf
0
Analyze the following code function for security vulnerabilities
@Override public boolean injectCustomMapping(BaseClass doc1class, XWikiContext inputxcontext) throws XWikiException { return injectCustomMapping(doc1class); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: injectCustomMapping File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-459" ]
CVE-2023-36468
HIGH
8.8
xwiki/xwiki-platform
injectCustomMapping
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
0
Analyze the following code function for security vulnerabilities
private void logStateAndMessage(Message message, State state) { mMessageHandlingStatus = 0; if (mVerboseLoggingEnabled) { logd(" " + state.getClass().getSimpleName() + " " + getLogRecString(message)); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: logStateAndMessage File: service/java/com/android/server/wifi/ClientModeImpl.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21242
CRITICAL
9.8
android
logStateAndMessage
service/java/com/android/server/wifi/ClientModeImpl.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
public static String appendSpaceIfNotNull(String n) { if(n==null) return null; else return n+' '; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: appendSpaceIfNotNull 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
appendSpaceIfNotNull
core/src/main/java/hudson/Functions.java
bf539198564a1108b7b71a973bf7de963a6213ef
0
Analyze the following code function for security vulnerabilities
public String getUserAgent(){ return userAgent; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getUserAgent File: samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java Repository: OpenAPITools/openapi-generator The code follows secure coding practices.
[ "CWE-668" ]
CVE-2021-21430
LOW
2.1
OpenAPITools/openapi-generator
getUserAgent
samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
void resetEditor() { if (isEditorActive()) { /* * Simply force cancel the editing; throwing here would just make * Grid.setContainerDataSource semantics more complicated. */ cancelEditor(); } for (Field<?> editor : getEditorFields()) { editor.setParent(null); } editedItemId = null; editorActive = false; editorFieldGroup = new CustomFieldGroup(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: resetEditor 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
resetEditor
server/src/main/java/com/vaadin/ui/Grid.java
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
0
Analyze the following code function for security vulnerabilities
public String getContactInfo(final String userId, final ContactType contactType) throws IOException { if (userId == null || contactType == null) return null; return getContactInfo(userId, contactType.name()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getContactInfo File: opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java Repository: OpenNMS/opennms The code follows secure coding practices.
[ "CWE-352" ]
CVE-2021-25931
MEDIUM
6.8
OpenNMS/opennms
getContactInfo
opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
607151ea8f90212a3fb37c977fa57c7d58d26a84
0
Analyze the following code function for security vulnerabilities
public static short getShort(byte[] data, int index) { return PlatformDependent0.getShort(data, index); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getShort File: common/src/main/java/io/netty/util/internal/PlatformDependent.java Repository: netty The code follows secure coding practices.
[ "CWE-668", "CWE-378", "CWE-379" ]
CVE-2022-24823
LOW
1.9
netty
getShort
common/src/main/java/io/netty/util/internal/PlatformDependent.java
185f8b2756a36aaa4f973f1a2a025e7d981823f1
0
Analyze the following code function for security vulnerabilities
public String getDefaultTemplate() { return this.doc.getDefaultTemplate(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDefaultTemplate File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2022-23615
MEDIUM
5.5
xwiki/xwiki-platform
getDefaultTemplate
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
0
Analyze the following code function for security vulnerabilities
@Override public void unregisterPhoneAccount(PhoneAccountHandle accountHandle) { synchronized (mLock) { try { enforcePhoneAccountModificationForPackage( accountHandle.getComponentName().getPackageName()); enforceUserHandleMatchesCaller(accountHandle); mPhoneAccountRegistrar.unregisterPhoneAccount(accountHandle); // Broadcast an intent indicating the phone account which was unregistered. long token = Binder.clearCallingIdentity(); try { Intent intent = new Intent(TelecomManager.ACTION_PHONE_ACCOUNT_UNREGISTERED); intent.putExtra(TelecomManager.EXTRA_PHONE_ACCOUNT_HANDLE, accountHandle); Log.i(this, "Sending phone-account unregistered intent as user"); mContext.sendBroadcastAsUser(intent, UserHandle.ALL, PERMISSION_PROCESS_PHONE_ACCOUNT_REGISTRATION); } finally { Binder.restoreCallingIdentity(token); } } catch (Exception e) { Log.e(this, e, "unregisterPhoneAccount %s", accountHandle); throw e; } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: unregisterPhoneAccount 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
unregisterPhoneAccount
src/com/android/server/telecom/TelecomServiceImpl.java
2750faaa1ec819eed9acffea7bd3daf867fda444
0
Analyze the following code function for security vulnerabilities
@Override public String getVersion() { return getRCSVersion().toString(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getVersion 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
getVersion
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
db3d1c62fc5fb59fefcda3b86065d2d362f55164
0
Analyze the following code function for security vulnerabilities
protected EditForm prepareForm(HttpServletRequest request) { EditForm editForm = new EditForm(); editForm.setRequest(request); editForm.readRequest(); return editForm; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: prepareForm File: application-changerequest-default/src/main/java/org/xwiki/contrib/changerequest/internal/handlers/AbstractChangeRequestActionHandler.java Repository: xwiki-contrib/application-changerequest The code follows secure coding practices.
[ "CWE-522" ]
CVE-2023-49280
MEDIUM
6.5
xwiki-contrib/application-changerequest
prepareForm
application-changerequest-default/src/main/java/org/xwiki/contrib/changerequest/internal/handlers/AbstractChangeRequestActionHandler.java
ff0f5368ea04f0e4aa7b33821c707dc68a8c5ca8
0
Analyze the following code function for security vulnerabilities
public String getTagForIntentSender(IIntentSender sender, String prefix) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); data.writeStrongBinder(sender.asBinder()); data.writeString(prefix); mRemote.transact(GET_TAG_FOR_INTENT_SENDER_TRANSACTION, data, reply, 0); reply.readException(); String res = reply.readString(); data.recycle(); reply.recycle(); return res; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTagForIntentSender File: core/java/android/app/ActivityManagerNative.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
getTagForIntentSender
core/java/android/app/ActivityManagerNative.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
public CELLTYPE join(Object... propertyIds) { if (propertyIds.length < 2) { throw new IllegalArgumentException( "You need to merge at least 2 properties"); } Set<CELLTYPE> cells = new HashSet<CELLTYPE>(); for (int i = 0; i < propertyIds.length; ++i) { cells.add(getCell(propertyIds[i])); } return join(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
public ApiClient configureApiKeys(Map<String, String> secrets) { for (Map.Entry<String, Authentication> authEntry : authentications.entrySet()) { Authentication auth = authEntry.getValue(); if (auth instanceof ApiKeyAuth) { String name = authEntry.getKey(); // respect x-auth-id-alias property name = authenticationLookup.containsKey(name) ? authenticationLookup.get(name) : name; if (secrets.containsKey(name)) { ((ApiKeyAuth) auth).setApiKey(secrets.get(name)); } } } return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: configureApiKeys File: samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java Repository: OpenAPITools/openapi-generator The code follows secure coding practices.
[ "CWE-668" ]
CVE-2021-21430
LOW
2.1
OpenAPITools/openapi-generator
configureApiKeys
samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
public static URL getCachedResourceURL(final URL location, final VersionString version, final UpdatePolicy policy) { try { final File f = getCachedResourceFile(location, version, policy); //url was pointing to nowhere eg 404 if (f == null) { //originally f.toUrl was throwing NPE return null; //returning null seems to be better } // TODO: Should be toURI().toURL() return f.toURL(); } catch (MalformedURLException ex) { return location; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCachedResourceURL File: core/src/main/java/net/sourceforge/jnlp/cache/CacheUtil.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
getCachedResourceURL
core/src/main/java/net/sourceforge/jnlp/cache/CacheUtil.java
2ab070cdac087bd208f64fa8138bb709f8d7680c
0
Analyze the following code function for security vulnerabilities
private boolean shouldSkip(GFile file) { String path = file.getPath().toLowerCase(); if (FILES_TO_SKIP.contains(path)) { return true; } if (ArchivePlugin.OLD_FOLDER_PROPERTIES_FILE.equalsIgnoreCase(file.getName())) { // ignore this file in any directory in the archive return true; } String ext = "." + FilenameUtils.getExtension(file.getName()); if (GhidraURL.MARKER_FILE_EXTENSION.equalsIgnoreCase(ext)) { // ignore .gpr marker files, any file name return true; } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: shouldSkip File: Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/archive/RestoreTask.java Repository: NationalSecurityAgency/ghidra The code follows secure coding practices.
[ "CWE-22" ]
CVE-2019-13623
MEDIUM
6.8
NationalSecurityAgency/ghidra
shouldSkip
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/archive/RestoreTask.java
c15364e0a4bd2bcd3bdf13a35afd6ac9607a5164
0
Analyze the following code function for security vulnerabilities
private static List<String> getSignerNames(List<Signer> signers) { if (signers.isEmpty()) { return Collections.emptyList(); } List<String> result = new ArrayList<>(signers.size()); for (Signer signer : signers) { result.add(signer.getName()); } return result; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSignerNames File: src/main/java/com/android/apksig/internal/apk/v1/V1SchemeVerifier.java Repository: android The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-21253
MEDIUM
5.5
android
getSignerNames
src/main/java/com/android/apksig/internal/apk/v1/V1SchemeVerifier.java
41d882324288085fd32ae0bb70dc85f5fd0e2be7
0
Analyze the following code function for security vulnerabilities
@Override public KBTemplate fetchByUuid_Last(String uuid, OrderByComparator<KBTemplate> orderByComparator) { int count = countByUuid(uuid); if (count == 0) { return null; } List<KBTemplate> list = findByUuid(uuid, count - 1, count, orderByComparator); if (!list.isEmpty()) { return list.get(0); } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: fetchByUuid_Last 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
fetchByUuid_Last
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 void tearDown() { BackupManagerService.this.mContext.unbindService(this); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: tearDown File: services/backup/java/com/android/server/backup/BackupManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-3759
MEDIUM
5
android
tearDown
services/backup/java/com/android/server/backup/BackupManagerService.java
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
0
Analyze the following code function for security vulnerabilities
@EnsuresNonNull({"updateValues", "rows"}) private void checkUpdateable() throws SQLException { checkClosed(); if (!isUpdateable()) { throw new PSQLException( GT.tr( "ResultSet is not updateable. The query that generated this result set must select only one table, and must select all primary keys from that table. See the JDBC 2.1 API Specification, section 5.6 for more details."), PSQLState.INVALID_CURSOR_STATE); } if (updateValues == null) { // allow every column to be updated without a rehash. updateValues = new HashMap<String, Object>((int) (fields.length / 0.75), 0.75f); } castNonNull(updateValues, "updateValues"); castNonNull(rows, "rows"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkUpdateable 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
checkUpdateable
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
739e599d52ad80f8dcd6efedc6157859b1a9d637
0
Analyze the following code function for security vulnerabilities
protected boolean isInvalidOperatorNumeric(String operatorNumeric) { return operatorNumeric == null || operatorNumeric.length() < 5 || operatorNumeric.startsWith(INVALID_MCC); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isInvalidOperatorNumeric File: src/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2016-3831
MEDIUM
5
android
isInvalidOperatorNumeric
src/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
f47bc301ccbc5e6d8110afab5a1e9bac1d4ef058
0
Analyze the following code function for security vulnerabilities
public File downloadFileFromResponse(Response response) throws ApiException { try { File file = prepareDownloadFile(response); Files.copy(response.readEntity(InputStream.class), file.toPath(), StandardCopyOption.REPLACE_EXISTING); return file; } catch (IOException e) { throw new ApiException(e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: downloadFileFromResponse File: samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java Repository: OpenAPITools/openapi-generator The code follows secure coding practices.
[ "CWE-668" ]
CVE-2021-21430
LOW
2.1
OpenAPITools/openapi-generator
downloadFileFromResponse
samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
private byte[] decryptBlock( byte[] in_enc, int inOff, int inLen) throws InvalidCipherTextException { byte[] M = null, K = null, K1 = null, K2 = null; int len; // Ensure that the length of the input is greater than the MAC in bytes if (inLen < V.length + mac.getMacSize()) { throw new InvalidCipherTextException("Length of input must be greater than the MAC and V combined"); } if (cipher == null) { // Streaming mode. K1 = new byte[inLen - V.length - mac.getMacSize()]; K2 = new byte[param.getMacKeySize() / 8]; K = new byte[K1.length + K2.length]; kdf.generateBytes(K, 0, K.length); if (V.length != 0) { System.arraycopy(K, 0, K2, 0, K2.length); System.arraycopy(K, K2.length, K1, 0, K1.length); } else { System.arraycopy(K, 0, K1, 0, K1.length); System.arraycopy(K, K1.length, K2, 0, K2.length); } M = new byte[K1.length]; for (int i = 0; i != K1.length; i++) { M[i] = (byte)(in_enc[inOff + V.length + i] ^ K1[i]); } len = K1.length; } else { // Block cipher mode. K1 = new byte[((IESWithCipherParameters)param).getCipherKeySize() / 8]; K2 = new byte[param.getMacKeySize() / 8]; K = new byte[K1.length + K2.length]; kdf.generateBytes(K, 0, K.length); System.arraycopy(K, 0, K1, 0, K1.length); System.arraycopy(K, K1.length, K2, 0, K2.length); // If IV provide use it to initialize the cipher if (IV != null) { cipher.init(false, new ParametersWithIV(new KeyParameter(K1), IV)); } else { cipher.init(false, new KeyParameter(K1)); } M = new byte[cipher.getOutputSize(inLen - V.length - mac.getMacSize())]; len = cipher.processBytes(in_enc, inOff + V.length, inLen - V.length - mac.getMacSize(), M, 0); len += cipher.doFinal(M, len); } // Convert the length of the encoding vector into a byte array. byte[] P2 = param.getEncodingV(); byte[] L2 = null; if (V.length != 0) { L2 = getLengthTag(P2); } // Verify the MAC. int end = inOff + inLen; byte[] T1 = Arrays.copyOfRange(in_enc, end - mac.getMacSize(), end); byte[] T2 = new byte[T1.length]; mac.init(new KeyParameter(K2)); mac.update(in_enc, inOff + V.length, inLen - V.length - T2.length); if (P2 != null) { mac.update(P2, 0, P2.length); } if (V.length != 0) { mac.update(L2, 0, L2.length); } mac.doFinal(T2, 0); if (!Arrays.constantTimeAreEqual(T1, T2)) { throw new InvalidCipherTextException("Invalid MAC."); } // Output the message. return Arrays.copyOfRange(M, 0, len); }
Vulnerability Classification: - CWE: CWE-361 - CVE: CVE-2016-1000345 - Severity: MEDIUM - CVSS Score: 4.3 Description: modified IESEngine so that MAC check is the primary one added general BadBlockException class for asymmetric ciphers. Function: decryptBlock File: core/src/main/java/org/bouncycastle/crypto/engines/IESEngine.java Repository: bcgit/bc-java Fixed Code: private byte[] decryptBlock( byte[] in_enc, int inOff, int inLen) throws InvalidCipherTextException { byte[] M, K, K1, K2; int len = 0; // Ensure that the length of the input is greater than the MAC in bytes if (inLen < V.length + mac.getMacSize()) { throw new InvalidCipherTextException("Length of input must be greater than the MAC and V combined"); } // note order is important: set up keys, do simple encryptions, check mac, do final encryption. if (cipher == null) { // Streaming mode. K1 = new byte[inLen - V.length - mac.getMacSize()]; K2 = new byte[param.getMacKeySize() / 8]; K = new byte[K1.length + K2.length]; kdf.generateBytes(K, 0, K.length); if (V.length != 0) { System.arraycopy(K, 0, K2, 0, K2.length); System.arraycopy(K, K2.length, K1, 0, K1.length); } else { System.arraycopy(K, 0, K1, 0, K1.length); System.arraycopy(K, K1.length, K2, 0, K2.length); } // process the message M = new byte[K1.length]; for (int i = 0; i != K1.length; i++) { M[i] = (byte)(in_enc[inOff + V.length + i] ^ K1[i]); } } else { // Block cipher mode. K1 = new byte[((IESWithCipherParameters)param).getCipherKeySize() / 8]; K2 = new byte[param.getMacKeySize() / 8]; K = new byte[K1.length + K2.length]; kdf.generateBytes(K, 0, K.length); System.arraycopy(K, 0, K1, 0, K1.length); System.arraycopy(K, K1.length, K2, 0, K2.length); // If IV provide use it to initialize the cipher if (IV != null) { cipher.init(false, new ParametersWithIV(new KeyParameter(K1), IV)); } else { cipher.init(false, new KeyParameter(K1)); } M = new byte[cipher.getOutputSize(inLen - V.length - mac.getMacSize())]; // do initial processing len = cipher.processBytes(in_enc, inOff + V.length, inLen - V.length - mac.getMacSize(), M, 0); } // Convert the length of the encoding vector into a byte array. byte[] P2 = param.getEncodingV(); byte[] L2 = null; if (V.length != 0) { L2 = getLengthTag(P2); } // Verify the MAC. int end = inOff + inLen; byte[] T1 = Arrays.copyOfRange(in_enc, end - mac.getMacSize(), end); byte[] T2 = new byte[T1.length]; mac.init(new KeyParameter(K2)); mac.update(in_enc, inOff + V.length, inLen - V.length - T2.length); if (P2 != null) { mac.update(P2, 0, P2.length); } if (V.length != 0) { mac.update(L2, 0, L2.length); } mac.doFinal(T2, 0); if (!Arrays.constantTimeAreEqual(T1, T2)) { throw new InvalidCipherTextException("invalid MAC"); } if (cipher == null) { return M; } else { len += cipher.doFinal(M, len); return Arrays.copyOfRange(M, 0, len); } }
[ "CWE-361" ]
CVE-2016-1000345
MEDIUM
4.3
bcgit/bc-java
decryptBlock
core/src/main/java/org/bouncycastle/crypto/engines/IESEngine.java
21dcb3d9744c83dcf2ff8fcee06dbca7bfa4ef35
1
Analyze the following code function for security vulnerabilities
private void deleteProperty(final HttpServletRequest request, final HttpServletResponse response, final HttpSession session) { final String cacheName = ParamUtils.getStringParameter(request, "cacheName", "").trim(); final String key = ParamUtils.getStringParameter(request, "key", ""); final Optional<Cache<?, ?>> optionalCache = Arrays.stream(CacheFactory.getAllCaches()) .filter(cache -> cacheName.equals(cache.getName())) .findAny() .map(cache -> (Cache<?, ?>) cache); if(optionalCache.isPresent()) { if(optionalCache.get().remove(key) != null ) { session.setAttribute("successMessage", LocaleUtils.getLocalizedString("system.cache-details.deleted", Collections.singletonList(key)) ); final WebManager webManager = new WebManager(); webManager.init(request, response, session, session.getServletContext()); webManager.logEvent(String.format("Key '%s' deleted from cache '%s'", key, cacheName), null); } else { session.setAttribute("errorMessage", LocaleUtils.getLocalizedString("system.cache-details.key_not_found", Collections.singletonList(key)) ); } } else { request.setAttribute("warningMessage", LocaleUtils.getLocalizedString("system.cache-details.cache_not_found", Collections.singletonList(cacheName))); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: deleteProperty File: xmppserver/src/main/java/org/jivesoftware/admin/servlet/SystemCacheDetailsServlet.java Repository: igniterealtime/Openfire The code follows secure coding practices.
[ "CWE-79" ]
CVE-2019-20363
MEDIUM
4.3
igniterealtime/Openfire
deleteProperty
xmppserver/src/main/java/org/jivesoftware/admin/servlet/SystemCacheDetailsServlet.java
b6f758241f3fdd57b48c527a695512f33e26eb74
0
Analyze the following code function for security vulnerabilities
public String encodeRedirectUrl(String url) { return encodeRedirectURL(url); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: encodeRedirectUrl File: src/java/winstone/WinstoneResponse.java Repository: jenkinsci/winstone The code follows secure coding practices.
[ "CWE-79" ]
CVE-2011-4344
LOW
2.6
jenkinsci/winstone
encodeRedirectUrl
src/java/winstone/WinstoneResponse.java
410ed3001d51c689cf59085b7417466caa2ded7b
0
Analyze the following code function for security vulnerabilities
public List<PlatformStatusDTO> getTransitions(String issueKey) { return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTransitions File: test-track/backend/src/main/java/io/metersphere/service/issue/platform/AbstractIssuePlatform.java Repository: metersphere The code follows secure coding practices.
[ "CWE-918" ]
CVE-2022-23544
MEDIUM
6.1
metersphere
getTransitions
test-track/backend/src/main/java/io/metersphere/service/issue/platform/AbstractIssuePlatform.java
d0f95b50737c941b29d507a4cc3545f2dc6ab121
0
Analyze the following code function for security vulnerabilities
String adjustForKeystore(String credential);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: adjustForKeystore File: services/core/java/com/android/server/LockSettingsService.java Repository: android The code follows secure coding practices.
[ "CWE-255" ]
CVE-2016-3749
MEDIUM
4.6
android
adjustForKeystore
services/core/java/com/android/server/LockSettingsService.java
e83f0f6a5a6f35323f5367f99c8e287c440f33f5
0
Analyze the following code function for security vulnerabilities
private void restoreKeyValue() { // Initiating the restore will pass responsibility for the state machine's // progress to the agent callback, so we do not always execute the // next state here. final String packageName = mCurrentPackage.packageName; // Validate some semantic requirements that apply in this way // only to the key/value restore API flow if (mCurrentPackage.applicationInfo.backupAgentName == null || "".equals(mCurrentPackage.applicationInfo.backupAgentName)) { if (MORE_DEBUG) { Slog.i(TAG, "Data exists for package " + packageName + " but app has no agent; skipping"); } EventLog.writeEvent(EventLogTags.RESTORE_AGENT_FAILURE, packageName, "Package has no agent"); executeNextState(UnifiedRestoreState.RUNNING_QUEUE); return; } Metadata metaInfo = mPmAgent.getRestoredMetadata(packageName); if (!signaturesMatch(metaInfo.sigHashes, mCurrentPackage)) { Slog.w(TAG, "Signature mismatch restoring " + packageName); EventLog.writeEvent(EventLogTags.RESTORE_AGENT_FAILURE, packageName, "Signature mismatch"); executeNextState(UnifiedRestoreState.RUNNING_QUEUE); return; } // Good to go! Set up and bind the agent... mAgent = bindToAgentSynchronous( mCurrentPackage.applicationInfo, IApplicationThread.BACKUP_MODE_INCREMENTAL); if (mAgent == null) { Slog.w(TAG, "Can't find backup agent for " + packageName); EventLog.writeEvent(EventLogTags.RESTORE_AGENT_FAILURE, packageName, "Restore agent missing"); executeNextState(UnifiedRestoreState.RUNNING_QUEUE); return; } // And then finally start the restore on this agent try { initiateOneRestore(mCurrentPackage, metaInfo.versionCode); ++mCount; } catch (Exception e) { Slog.e(TAG, "Error when attempting restore: " + e.toString()); keyValueAgentErrorCleanup(); executeNextState(UnifiedRestoreState.RUNNING_QUEUE); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: restoreKeyValue File: services/backup/java/com/android/server/backup/BackupManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-3759
MEDIUM
5
android
restoreKeyValue
services/backup/java/com/android/server/backup/BackupManagerService.java
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
0
Analyze the following code function for security vulnerabilities
boolean isShowing() { return mDialog.isShowing(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isShowing File: services/autofill/java/com/android/server/autofill/ui/DialogFillUi.java Repository: android The code follows secure coding practices.
[ "CWE-Other", "CWE-610" ]
CVE-2023-40133
MEDIUM
5.5
android
isShowing
services/autofill/java/com/android/server/autofill/ui/DialogFillUi.java
08becc8c600f14c5529115cc1a1e0c97cd503f33
0
Analyze the following code function for security vulnerabilities
public CompletableFuture<Void> startAsync() { createExecutorService(); return CompletableFuture.runAsync(start, asyncExecutorService); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: startAsync File: client/hotrod-client/src/main/java/org/infinispan/client/hotrod/RemoteCacheManager.java Repository: infinispan The code follows secure coding practices.
[ "CWE-502" ]
CVE-2017-15089
MEDIUM
6.5
infinispan
startAsync
client/hotrod-client/src/main/java/org/infinispan/client/hotrod/RemoteCacheManager.java
efc44b7b0a5dd4f44773808840dd9785cabcf21c
0