instruction
string
input
string
output
string
cwe_ids
list
cve_id
string
severity
string
cvss_score
float64
repo_name
string
func_name
string
file_path
string
commit_hash
string
is_vulnerable
int64
Analyze the following code function for security vulnerabilities
public ViewPage gotoPage(EntityReference reference) { gotoPage(reference, "view"); return new ViewPage(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: gotoPage File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2023-35166
HIGH
8.8
xwiki/xwiki-platform
gotoPage
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
0
Analyze the following code function for security vulnerabilities
public Structure getStructureByType(String type){ return getStructureByName(type); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getStructureByType File: src/com/dotmarketing/cache/ContentTypeCacheImpl.java Repository: dotCMS/core The code follows secure coding practices.
[ "CWE-89" ]
CVE-2016-2355
HIGH
7.5
dotCMS/core
getStructureByType
src/com/dotmarketing/cache/ContentTypeCacheImpl.java
897f3632d7e471b7a73aabed5b19f6f53d4e5562
0
Analyze the following code function for security vulnerabilities
public boolean hasHandlers() { return (_typeHandler != null) || (_valueHandler != null); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hasHandlers File: src/main/java/com/fasterxml/jackson/databind/JavaType.java Repository: FasterXML/jackson-databind The code follows secure coding practices.
[ "CWE-502" ]
CVE-2019-16942
HIGH
7.5
FasterXML/jackson-databind
hasHandlers
src/main/java/com/fasterxml/jackson/databind/JavaType.java
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
0
Analyze the following code function for security vulnerabilities
public Set<Subscription.SubscriptionChannelType> getSupportedSubscriptionTypes() { return myModelConfig.getSupportedSubscriptionTypes(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSupportedSubscriptionTypes File: hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java Repository: hapifhir/hapi-fhir The code follows secure coding practices.
[ "CWE-400" ]
CVE-2021-32053
MEDIUM
5
hapifhir/hapi-fhir
getSupportedSubscriptionTypes
hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
f2934b229c491235ab0e7782dea86b324521082a
0
Analyze the following code function for security vulnerabilities
@NonNull public BubbleMetadata.Builder setAutoExpandBubble(boolean shouldExpand) { setFlag(FLAG_AUTO_EXPAND_BUBBLE, shouldExpand); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setAutoExpandBubble File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
setAutoExpandBubble
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
public InternetResource getResource(String path) throws ResourceNotFoundException { InternetResource internetResource = (InternetResource) resources .get(path); if (null == internetResource) { throw new ResourceNotFoundException("Resource not registered : " + path); } else { return internetResource; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getResource File: framework/impl/src/main/java/org/ajax4jsf/resource/ResourceBuilderImpl.java Repository: nuxeo/richfaces-3.3 The code follows secure coding practices.
[ "CWE-502" ]
CVE-2013-4521
HIGH
7.5
nuxeo/richfaces-3.3
getResource
framework/impl/src/main/java/org/ajax4jsf/resource/ResourceBuilderImpl.java
6cbad2a6dcb70d3e33a6ce5879b1a3ad79eb1aec
0
Analyze the following code function for security vulnerabilities
private void setAuthService(Class<? extends XWikiAuthService> authClass) { try { if (LOGGER.isDebugEnabled()) { LOGGER.debug("Using AuthClass {}", authClass.getName()); } this.authService = authClass.newInstance(); LOGGER.debug("Initialized AuthService using Reflection."); } catch (Exception e) { LOGGER.warn("Failed to initialize the AuthService from class [{}], fallbacking on standard authenticator", authClass.getName(), e); this.authService = new XWikiAuthServiceImpl(); if (LOGGER.isDebugEnabled()) { LOGGER.debug("Initialized AuthService {} using 'new'.", this.authService.getClass().getName()); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setAuthService File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-287" ]
CVE-2022-36092
HIGH
7.5
xwiki/xwiki-platform
setAuthService
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
71a6d0bb6f8ab718fcfaae0e9b8c16c2d69cd4bb
0
Analyze the following code function for security vulnerabilities
@Override public void startLockTaskMode(int taskId) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); data.writeInt(taskId); mRemote.transact(START_LOCK_TASK_BY_TASK_ID_TRANSACTION, data, reply, 0); reply.readException(); data.recycle(); reply.recycle(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: startLockTaskMode File: core/java/android/app/ActivityManagerNative.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
startLockTaskMode
core/java/android/app/ActivityManagerNative.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
public static Path getResourceCachePath(ResourceToDeploy resource) throws IOException { Path outFile = resource.getDeployedPath(); if (!outFile.toFile().exists()) { try (InputStream in = CacheResourcesManager.class .getResourceAsStream(resource.getResourceFromClasspath())) { FilesUtils.saveToFile(in, outFile); } } return outFile; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getResourceCachePath File: org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/uriresolver/CacheResourcesManager.java Repository: eclipse/lemminx The code follows secure coding practices.
[ "CWE-22" ]
CVE-2019-18212
MEDIUM
4
eclipse/lemminx
getResourceCachePath
org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/uriresolver/CacheResourcesManager.java
e37c399aa266be1b7a43061d4afc43dc230410d2
0
Analyze the following code function for security vulnerabilities
static public int computePasswordQuality(String password) { boolean hasDigit = false; boolean hasNonDigit = false; final int len = password.length(); for (int i = 0; i < len; i++) { if (Character.isDigit(password.charAt(i))) { hasDigit = true; } else { hasNonDigit = true; } } if (hasNonDigit && hasDigit) { return DevicePolicyManager.PASSWORD_QUALITY_ALPHANUMERIC; } if (hasNonDigit) { return DevicePolicyManager.PASSWORD_QUALITY_ALPHABETIC; } if (hasDigit) { return maxLengthSequence(password) > MAX_ALLOWED_SEQUENCE ? DevicePolicyManager.PASSWORD_QUALITY_NUMERIC : DevicePolicyManager.PASSWORD_QUALITY_NUMERIC_COMPLEX; } return DevicePolicyManager.PASSWORD_QUALITY_UNSPECIFIED; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: computePasswordQuality 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
computePasswordQuality
core/java/com/android/internal/widget/LockPatternUtils.java
96daf7d4893f614714761af2d53dfb93214a32e4
0
Analyze the following code function for security vulnerabilities
public String generateGraphObjects(LifeEvent e) { String bareMetalId = e.getBareMetalId(); String workflowName = e.getWorkflowRequestDTO().getWorkflowName(); abstractHandler.paramPreProcess(e); WorkflowWithBLOBs w = workflowService.getByInjectableName(workflowName); LinkedHashMap taskObjects = new LinkedHashMap(); if (w != null) { JSONArray tasks = JSONArray.parseArray(w.getTasks()); // 原 rackhd graph 定义默认参数 JSONObject definitionOptions = JSONObject.parseObject(w.getOptions()); Map<String, JSONObject> taskOptions = definitionOptions.keySet().stream().collect(Collectors.toMap(k -> k, k -> definitionOptions.getJSONObject(k))); Map<String, String> instanceMap = new HashedMap(); for (int i = 0; i < tasks.size(); i++) { JSONObject task = tasks.getJSONObject(i); String taskName = task.getString("taskName"); String taskFName = task.getString("label"); JSONObject taskObj = null; JSONObject baseTaskObj = null; if (StringUtils.isNotBlank(taskName)) { taskObj = JSONObject.parseObject(JSONObject.toJSONString(taskObject.get(taskName))); baseTaskObj = JSONObject.parseObject(JSONObject.toJSONString(baseTask.get(taskObj.getString("implementsTask")))); } else if (task.getJSONObject("taskDefinition") != null) { taskObj = task.getJSONObject("taskDefinition"); baseTaskObj = JSONObject.parseObject(JSONObject.toJSONString(baseTask.get(taskObj.getString("implementsTask")))); } JSONObject finalTaskObj = taskObj; taskObj.keySet().forEach(k -> { task.put(k, finalTaskObj.get(k)); }); task.put("runJob", baseTaskObj.get("runJob")); task.put("state", ServiceConstants.RackHDTaskStatusEnum.pending.name()); task.put("taskStartTime", LocalDateTime.now()); if (task.getJSONObject("options") == null) { task.put("options", extract(e.getWorkflowRequestDTO().getParams(), taskFName)); } else { JSONObject userOptions = extract(e.getWorkflowRequestDTO().getParams(), taskFName); JSONObject options = task.getJSONObject("options"); if (userOptions != null) userOptions.keySet().forEach(k -> { options.put(k, userOptions.get(k)); }); } if (taskOptions.get(task.getString("label")) != null) { taskOptions.get(task.getString("label")).keySet().forEach(k -> { if (!task.getJSONObject("options").containsKey(k)) { task.getJSONObject("options").put(k, taskOptions.get(task.getString("label")).get(k)); } }); } task.put("bareMetalId", bareMetalId); task.put("instanceId", UUIDUtil.newUUID()); //将 waiton的 task label 替换成实例的 instancId instanceMap.put(task.getString("label"), task.getString("instanceId")); if (task.getJSONObject("waitOn") != null) { JSONObject waitOnObj = task.getJSONObject("waitOn"); String label = waitOnObj.keySet().stream().findFirst().get(); waitOnObj.put(instanceMap.get(label), waitOnObj.getString(label)); waitOnObj.remove(label); task.put("waitingOn", waitOnObj); task.remove("waitOn"); } //渲染参数中的 {{}} 形式变量 renderTaskOptions(task); taskObjects.put(task.getString("instanceId"), task); } } return JSONObject.toJSONString(taskObjects); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: generateGraphObjects File: rackshift-server/src/main/java/io/rackshift/service/TaskService.java Repository: fit2cloud/rackshift The code follows secure coding practices.
[ "CWE-89" ]
CVE-2023-42405
CRITICAL
9.8
fit2cloud/rackshift
generateGraphObjects
rackshift-server/src/main/java/io/rackshift/service/TaskService.java
305aea3b20d36591d519f7d04e0a25be05a51e93
0
Analyze the following code function for security vulnerabilities
private boolean shouldWaitForProvisioning() { return !mUpdateMonitor.isDeviceProvisioned() && !isSecure(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: shouldWaitForProvisioning 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
shouldWaitForProvisioning
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
d18d8b350756b0e89e051736c1f28744ed31e93a
0
Analyze the following code function for security vulnerabilities
public int length() { return this.myHashMap.size(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: length File: src/main/java/org/codehaus/jettison/json/JSONObject.java Repository: jettison-json/jettison The code follows secure coding practices.
[ "CWE-674", "CWE-787" ]
CVE-2022-45693
HIGH
7.5
jettison-json/jettison
length
src/main/java/org/codehaus/jettison/json/JSONObject.java
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
0
Analyze the following code function for security vulnerabilities
private void setDefaultsInWifiConfiguration(WifiConfiguration configuration) { configuration.setIpAssignment(IpConfiguration.IpAssignment.DHCP); configuration.setProxySettings(IpConfiguration.ProxySettings.NONE); configuration.status = WifiConfiguration.Status.DISABLED; configuration.getNetworkSelectionStatus().setNetworkSelectionStatus( NetworkSelectionStatus.NETWORK_SELECTION_PERMANENTLY_DISABLED); configuration.getNetworkSelectionStatus().setNetworkSelectionDisableReason( NetworkSelectionStatus.DISABLED_BY_WIFI_MANAGER); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setDefaultsInWifiConfiguration 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
setDefaultsInWifiConfiguration
service/java/com/android/server/wifi/WifiConfigManager.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
private List<RoamingPartner> readRoamingPartnerList(Parcel in) { int size = in.readInt(); if (size == NULL_VALUE) { return null; } List<RoamingPartner> partnerList = new ArrayList<>(); for (int i = 0; i < size; i++) { partnerList.add(in.readParcelable(null)); } return partnerList; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: readRoamingPartnerList File: framework/java/android/net/wifi/hotspot2/pps/Policy.java Repository: android The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-21240
MEDIUM
5.5
android
readRoamingPartnerList
framework/java/android/net/wifi/hotspot2/pps/Policy.java
69119d1d3102e27b6473c785125696881bce9563
0
Analyze the following code function for security vulnerabilities
public static <T> T withEncodedPassword(AuthenticationRequestType type, Properties info, PasswordAction<byte[], T> action) throws PSQLException, IOException { byte[] encodedPassword = withPassword(type, info, password -> { if (password == null) { throw new PSQLException( GT.tr("The server requested password-based authentication, but no password was provided."), PSQLState.CONNECTION_REJECTED); } ByteBuffer buf = StandardCharsets.UTF_8.encode(CharBuffer.wrap(password)); byte[] bytes = new byte[buf.limit()]; buf.get(bytes); return bytes; }); try { return action.apply(encodedPassword); } finally { java.util.Arrays.fill(encodedPassword, (byte) 0); } }
Vulnerability Classification: - CWE: CWE-665 - CVE: CVE-2022-21724 - Severity: HIGH - CVSS Score: 7.5 Description: Merge pull request from GHSA-v7wg-cpwc-24m4 This ensures arbitrary classes can't be passed instead of AuthenticationPlugin, SocketFactory, SSLSocketFactory, CallbackHandler, HostnameVerifier Function: withEncodedPassword File: pgjdbc/src/main/java/org/postgresql/core/v3/AuthenticationPluginManager.java Repository: pgjdbc Fixed Code: public static <T> T withEncodedPassword(AuthenticationRequestType type, Properties info, PasswordAction<byte[], T> action) throws PSQLException, IOException { byte[] encodedPassword = withPassword(type, info, password -> { if (password == null) { throw new PSQLException( GT.tr("The server requested password-based authentication, but no password was provided by plugin {0}", PGProperty.AUTHENTICATION_PLUGIN_CLASS_NAME.get(info)), PSQLState.CONNECTION_REJECTED); } ByteBuffer buf = StandardCharsets.UTF_8.encode(CharBuffer.wrap(password)); byte[] bytes = new byte[buf.limit()]; buf.get(bytes); return bytes; }); try { return action.apply(encodedPassword); } finally { java.util.Arrays.fill(encodedPassword, (byte) 0); } }
[ "CWE-665" ]
CVE-2022-21724
HIGH
7.5
pgjdbc
withEncodedPassword
pgjdbc/src/main/java/org/postgresql/core/v3/AuthenticationPluginManager.java
f4d0ed69c0b3aae8531d83d6af4c57f22312c813
1
Analyze the following code function for security vulnerabilities
public void clone(XWikiDocument document) { this.id = document.id; setDocumentReference(document.getDocumentReference()); setRCSVersion(document.getRCSVersion()); setDocumentArchive(document.getDocumentArchive()); setAuthorReference(document.getAuthorReference()); setContentAuthorReference(document.getContentAuthorReference()); setContent(document.getContent()); setCreationDate(document.getCreationDate()); setDate(document.getDate()); setCustomClass(document.getCustomClass()); setContentUpdateDate(document.getContentUpdateDate()); setTitle(document.getTitle()); setFormat(document.getFormat()); setFromCache(document.isFromCache()); setElements(document.getElements()); setMeta(document.getMeta()); setMostRecent(document.isMostRecent()); setNew(document.isNew()); setStore(document.getStore()); setTemplateDocumentReference(document.getTemplateDocumentReference()); setParentReference(document.getRelativeParentReference()); setCreatorReference(document.getCreatorReference()); setDefaultLocale(document.getDefaultLocale()); setDefaultTemplate(document.getDefaultTemplate()); setValidationScript(document.getValidationScript()); setLocale(document.getLocale()); setXClass(document.getXClass().clone()); setXClassXML(document.getXClassXML()); setComment(document.getComment()); setMinorEdit(document.isMinorEdit()); setSyntax(document.getSyntax()); setHidden(document.isHidden()); cloneXObjects(document); cloneAttachments(document); setContentDirty(document.isContentDirty()); setMetaDataDirty(document.isMetaDataDirty()); this.elements = document.elements; this.originalDocument = document.originalDocument; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: clone 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
clone
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
db3d1c62fc5fb59fefcda3b86065d2d362f55164
0
Analyze the following code function for security vulnerabilities
private boolean isLaunchModeOneOf(int mode1, int mode2, int mode3) { return mode1 == mLaunchMode || mode2 == mLaunchMode || mode3 == mLaunchMode; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isLaunchModeOneOf File: services/core/java/com/android/server/wm/ActivityStarter.java Repository: android The code follows secure coding practices.
[ "CWE-269" ]
CVE-2023-21269
HIGH
7.8
android
isLaunchModeOneOf
services/core/java/com/android/server/wm/ActivityStarter.java
70ec64dc5a2a816d6aa324190a726a85fd749b30
0
Analyze the following code function for security vulnerabilities
private static boolean TomcatSSOLogin(HttpServletRequest request, String userName, String currentPassword) { try { request.login(userName, currentPassword); } catch (ServletException e) { StringManager sm = StringManager.getManager("org.apache.catalina.connector"); if (sm.getString("coyoteRequest.alreadyAuthenticated").equals(e.getMessage())){ return true; } else { Debug.logError(e, module); return false; } } return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: TomcatSSOLogin File: framework/common/src/main/java/org/apache/ofbiz/common/login/LoginServices.java Repository: apache/ofbiz-framework The code follows secure coding practices.
[ "CWE-209" ]
CVE-2021-25958
MEDIUM
5
apache/ofbiz-framework
TomcatSSOLogin
framework/common/src/main/java/org/apache/ofbiz/common/login/LoginServices.java
2f5b8d33e32c4d9a48243cf9e503236acd5aec5c
0
Analyze the following code function for security vulnerabilities
public void addResource(InternetResource resource) { resources.put(resource.getKey(), resource); ResourceRenderer renderer = resource.getRenderer(null); if (renderer == null) { setRenderer(resource, resource.getKey()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addResource File: framework/impl/src/main/java/org/ajax4jsf/resource/ResourceBuilderImpl.java Repository: nuxeo/richfaces-3.3 The code follows secure coding practices.
[ "CWE-502" ]
CVE-2013-4521
HIGH
7.5
nuxeo/richfaces-3.3
addResource
framework/impl/src/main/java/org/ajax4jsf/resource/ResourceBuilderImpl.java
6cbad2a6dcb70d3e33a6ce5879b1a3ad79eb1aec
0
Analyze the following code function for security vulnerabilities
private void setAvailableFileFilters(boolean ownXmlFormat, JFileChooser fileChooser) { if (ownXmlFormat) { fileChooser.resetChoosableFileFilters(); fileChooser.addChoosableFileFilter(filterxml); } else { fileChooser.resetChoosableFileFilters(); fileChooser.addChoosableFileFilter(filterbmp); fileChooser.addChoosableFileFilter(filtereps); fileChooser.addChoosableFileFilter(filtergif); fileChooser.addChoosableFileFilter(filterjpg); fileChooser.addChoosableFileFilter(filterpdf); fileChooser.addChoosableFileFilter(filterpng); fileChooser.addChoosableFileFilter(filtersvg); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setAvailableFileFilters File: umlet-swing/src/main/java/com/baselet/diagram/io/DiagramFileHandler.java Repository: umlet The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-1000548
MEDIUM
6.8
umlet
setAvailableFileFilters
umlet-swing/src/main/java/com/baselet/diagram/io/DiagramFileHandler.java
e1c4cc6ae692cc8d1c367460dbf79343e996f9bd
0
Analyze the following code function for security vulnerabilities
final void sendEndBackup() { if (mObserver != null) { try { mObserver.onEndBackup(); } catch (RemoteException e) { Slog.w(TAG, "full backup observer went away: endBackup"); mObserver = null; } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sendEndBackup 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
sendEndBackup
services/backup/java/com/android/server/backup/BackupManagerService.java
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
0
Analyze the following code function for security vulnerabilities
@Override public void deregisterPush() { boolean has = hasAndroidMarket(); if (has) { ((CodenameOneActivity) getActivity()).stopReceivingPush(); deregisterPushFromServer(); } else { super.deregisterPush(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: deregisterPush 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
deregisterPush
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
public void setPid(int _pid) { pid = _pid; shortStringName = null; stringName = null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setPid File: services/core/java/com/android/server/am/ProcessRecord.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-2500
MEDIUM
4.3
android
setPid
services/core/java/com/android/server/am/ProcessRecord.java
9878bb99b77c3681f0fda116e2964bac26f349c3
0
Analyze the following code function for security vulnerabilities
@Override @WindowManager.LayoutParams.WindowType int getWindowType() { return mAttrs.type; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getWindowType File: services/core/java/com/android/server/wm/WindowState.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-35674
HIGH
7.8
android
getWindowType
services/core/java/com/android/server/wm/WindowState.java
7428962d3b064ce1122809d87af65099d1129c9e
0
Analyze the following code function for security vulnerabilities
@Override public String toString() { return "Files.isFile()"; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toString File: guava/src/com/google/common/io/Files.java Repository: google/guava The code follows secure coding practices.
[ "CWE-552" ]
CVE-2023-2976
HIGH
7.1
google/guava
toString
guava/src/com/google/common/io/Files.java
feb83a1c8fd2e7670b244d5afd23cba5aca43284
0
Analyze the following code function for security vulnerabilities
@Override public void createApplicationTemplate(SpTemplate spTemplate, String tenantDomain) throws IdentityApplicationManagementException { try { ServiceProvider serviceProvider = unmarshalSPTemplate(spTemplate.getContent()); validateSPTemplateExists(spTemplate, tenantDomain); validateUnsupportedTemplateConfigs(serviceProvider); applicationValidatorManager.validateSPConfigurations(serviceProvider, tenantDomain, CarbonContext.getThreadLocalCarbonContext().getUsername()); Collection<ApplicationMgtListener> listeners = getApplicationMgtListeners(); for (ApplicationMgtListener listener : listeners) { if (listener.isEnable()) { listener.doPreCreateApplicationTemplate(serviceProvider, tenantDomain); } } doAddApplicationTemplate(spTemplate, tenantDomain); } catch (IdentityApplicationManagementValidationException e) { log.error("Validation error when creating the application template: " + spTemplate.getName() + " in:" + tenantDomain); logValidationErrorMessages(e); throw new IdentityApplicationManagementClientException(e.getValidationMsg()); } catch (IdentityApplicationManagementException e) { String errorMsg = String.format("Error when creating the application template: %s in tenant: %s", spTemplate.getName(), tenantDomain); throw new IdentityApplicationManagementException(errorMsg, e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createApplicationTemplate File: components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java Repository: wso2/carbon-identity-framework The code follows secure coding practices.
[ "CWE-611" ]
CVE-2021-42646
MEDIUM
6.4
wso2/carbon-identity-framework
createApplicationTemplate
components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
e9119883ee02a884f3c76c7bbc4022a4f4c58fc0
0
Analyze the following code function for security vulnerabilities
@Deprecated boolean hasDrawn() { return mWinAnimator.mDrawState == WindowStateAnimator.HAS_DRAWN; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hasDrawn File: services/core/java/com/android/server/wm/WindowState.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-35674
HIGH
7.8
android
hasDrawn
services/core/java/com/android/server/wm/WindowState.java
7428962d3b064ce1122809d87af65099d1129c9e
0
Analyze the following code function for security vulnerabilities
protected Object getPrincipalForWebToken(Object principal) { return cleanUserPrincipal(principal); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPrincipalForWebToken File: portofino-core/src/main/java/com/manydesigns/portofino/shiro/AbstractPortofinoRealm.java Repository: ManyDesigns/Portofino The code follows secure coding practices.
[ "CWE-347" ]
CVE-2021-29451
MEDIUM
6.4
ManyDesigns/Portofino
getPrincipalForWebToken
portofino-core/src/main/java/com/manydesigns/portofino/shiro/AbstractPortofinoRealm.java
8c754a0ad234555e813dcbf9e57d637f9f23d8fb
0
Analyze the following code function for security vulnerabilities
private boolean isCallerSimCallManager(PhoneAccountHandle targetPhoneAccount) { long token = Binder.clearCallingIdentity(); PhoneAccountHandle accountHandle = null; try { accountHandle = mPhoneAccountRegistrar.getSimCallManagerFromHandle(targetPhoneAccount, mCallsManager.getCurrentUserHandle()); } finally { Binder.restoreCallingIdentity(token); } if (accountHandle != null) { try { mAppOpsManager.checkPackage( Binder.getCallingUid(), accountHandle.getComponentName().getPackageName()); return true; } catch (SecurityException e) { } } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isCallerSimCallManager File: src/com/android/server/telecom/TelecomServiceImpl.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21394
MEDIUM
5.5
android
isCallerSimCallManager
src/com/android/server/telecom/TelecomServiceImpl.java
68dca62035c49e14ad26a54f614199cb29a3393f
0
Analyze the following code function for security vulnerabilities
public boolean isFavTagsNotificationAllowed() { return isNotificationsAllowed() && CONF.emailsForFavtagsAllowed(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isFavTagsNotificationAllowed File: src/main/java/com/erudika/scoold/utils/ScooldUtils.java Repository: Erudika/scoold The code follows secure coding practices.
[ "CWE-130" ]
CVE-2022-1543
MEDIUM
6.5
Erudika/scoold
isFavTagsNotificationAllowed
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
62a0e92e1486ddc17676a7ead2c07ff653d167ce
0
Analyze the following code function for security vulnerabilities
private boolean shouldWaitForNetworkRulesUpdate(int uid) { synchronized (mUidNetworkBlockedReasons) { // TODO: We can reuse this data in // ProcessList#incrementProcStateSeqAndNotifyAppsLOSP instead of calling into // NetworkManagementService. final int uidBlockedReasons = mUidNetworkBlockedReasons.get( uid, BLOCKED_REASON_NONE); // We should only inform the uid to block if it is currently blocked but will be // unblocked once it comes to the TOP state. return uidBlockedReasons != BLOCKED_REASON_NONE && updateBlockedReasonsWithProcState(uidBlockedReasons, PROCESS_STATE_TOP) == BLOCKED_REASON_NONE; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: shouldWaitForNetworkRulesUpdate File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21292
MEDIUM
5.5
android
shouldWaitForNetworkRulesUpdate
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
@Override public String getAlwaysOnVpnPackageForUser(int userHandle) { Preconditions.checkCallAuthorization(isSystemUid(getCallerIdentity()), String.format(NOT_SYSTEM_CALLER_MSG, "call getAlwaysOnVpnPackageForUser")); synchronized (getLockObject()) { ActiveAdmin admin = getDeviceOrProfileOwnerAdminLocked(userHandle); return admin != null ? admin.mAlwaysOnVpnPackage : null; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAlwaysOnVpnPackageForUser File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2023-21284
MEDIUM
5.5
android
getAlwaysOnVpnPackageForUser
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
@Override protected PollingResult compareRemoteRevisionWith(AbstractProject<?,?> project, Launcher launcher, FilePath workspace, final TaskListener listener, SCMRevisionState _baseline) throws IOException, InterruptedException { final SVNRevisionState baseline; if (_baseline instanceof SVNRevisionState) { baseline = (SVNRevisionState)_baseline; } else if (project.getLastBuild()!=null) { baseline = (SVNRevisionState)calcRevisionsFromBuild(project.getLastBuild(), launcher, listener); } else { baseline = new SVNRevisionState(null); } if (project.getLastBuild() == null) { listener.getLogger().println(Messages.SubversionSCM_pollChanges_noBuilds()); return BUILD_NOW; } AbstractBuild<?,?> lastCompletedBuild = project.getLastCompletedBuild(); if (lastCompletedBuild!=null) { EnvVars env = lastCompletedBuild.getEnvironment(listener); EnvVarsUtils.overrideAll(env, lastCompletedBuild.getBuildVariables()); if (repositoryLocationsNoLongerExist(lastCompletedBuild, listener, env)) { // Disable this project, see HUDSON-763 listener.getLogger().println( Messages.SubversionSCM_pollChanges_locationsNoLongerExist(project)); project.makeDisabled(true); return NO_CHANGES; } // are the locations checked out in the workspace consistent with the current configuration? for (ModuleLocation loc : getLocations(env, lastCompletedBuild)) { // baseline.revisions has URIdecoded URL String url; try { url = loc.getSVNURL().toDecodedString(); } catch (SVNException ex) { ex.printStackTrace(listener.error(Messages.SubversionSCM_pollChanges_exception(loc.getURL()))); return BUILD_NOW; } if (!baseline.revisions.containsKey(url)) { listener.getLogger().println( Messages.SubversionSCM_pollChanges_locationNotInWorkspace(url)); return BUILD_NOW; } } } // determine where to perform polling. prefer the node where the build happened, // in case a cluster is non-uniform. see http://www.nabble.com/svn-connection-from-slave-only-td24970587.html VirtualChannel ch=null; Node n = null; if (!isPollFromMaster()) { n = lastCompletedBuild!=null ? lastCompletedBuild.getBuiltOn() : null; if (n!=null) { Computer c = n.toComputer(); if (c!=null) ch = c.getChannel(); } } if (ch==null) ch= MasterComputer.localChannel; final String nodeName = n!=null ? n.getNodeName() : "master"; final SVNLogHandler logHandler = new SVNLogHandler(createSVNLogFilter(), listener); final ISVNAuthenticationProvider authProvider = getDescriptor().createAuthenticationProvider(project); // figure out the remote revisions return ch.call(new CompareAgainstBaselineCallable(baseline, logHandler, project.getName(), listener, authProvider, nodeName)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: compareRemoteRevisionWith File: src/main/java/hudson/scm/SubversionSCM.java Repository: jenkinsci/subversion-plugin The code follows secure coding practices.
[ "CWE-255" ]
CVE-2013-6372
LOW
2.1
jenkinsci/subversion-plugin
compareRemoteRevisionWith
src/main/java/hudson/scm/SubversionSCM.java
7d4562d6f7e40de04bbe29577b51c79f07d05ba6
0
Analyze the following code function for security vulnerabilities
public boolean isDeviceOwnerAppOnCallingUser(String packageName) { return isDeviceOwnerAppOnAnyUserInner(packageName, /* callingUserOnly =*/ true); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isDeviceOwnerAppOnCallingUser File: core/java/android/app/admin/DevicePolicyManager.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40089
HIGH
7.8
android
isDeviceOwnerAppOnCallingUser
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
@Test public void testDeserializationAsFloatEdgeCase08() throws Exception { String input = "1e10000000"; Instant value = MAPPER.readValue(input, Instant.class); assertEquals(0, value.getEpochSecond()); }
Vulnerability Classification: - CWE: CWE-20 - CVE: CVE-2018-1000873 - Severity: MEDIUM - CVSS Score: 4.3 Description: Avoid latency problems converting decimal to time. Fixes https://github.com/FasterXML/jackson-databind/issues/2141 Function: testDeserializationAsFloatEdgeCase08 File: datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestInstantSerialization.java Repository: FasterXML/jackson-modules-java8 Fixed Code: @Test(timeout = 100) public void testDeserializationAsFloatEdgeCase08() throws Exception { String input = "1e10000000"; Instant value = MAPPER.readValue(input, Instant.class); assertEquals(0, value.getEpochSecond()); }
[ "CWE-20" ]
CVE-2018-1000873
MEDIUM
4.3
FasterXML/jackson-modules-java8
testDeserializationAsFloatEdgeCase08
datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestInstantSerialization.java
ba27ce5909dfb49bcaf753ad3e04ecb980010b0b
1
Analyze the following code function for security vulnerabilities
@VisibleForTesting void addAddressesToList(Collection<String> addresses, RecipientEditTextView list) { for (String address : addresses) { addAddressToList(address, list); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addAddressesToList File: src/com/android/mail/compose/ComposeActivity.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-2425
MEDIUM
4.3
android
addAddressesToList
src/com/android/mail/compose/ComposeActivity.java
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
0
Analyze the following code function for security vulnerabilities
public static boolean isCacheable(URL source) { if (source == null) return false; if (source.getProtocol().equals("file")) { return false; } if (source.getProtocol().equals("jar")) { return false; } return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isCacheable 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
isCacheable
core/src/main/java/net/sourceforge/jnlp/cache/CacheUtil.java
2ab070cdac087bd208f64fa8138bb709f8d7680c
0
Analyze the following code function for security vulnerabilities
@Override protected void setPropertyValue(SolrInputDocument solrDocument, BaseProperty<EntityReference> property, TypedValue typedValue, Locale locale) { Object value = typedValue.getValue(); String type = typedValue.getType(); // We need to be able to query an object property alone. EntityReference classReference = property.getObject().getRelativeXClassReference(); EntityReference propertyReference = new EntityReference(property.getName(), EntityType.CLASS_PROPERTY, classReference); String serializedPropertyReference = fieldNameEncoder.encode(fieldNameSerializer.serialize(propertyReference)); String prefix = "property." + serializedPropertyReference; // Note that we're using "addField" because we want to collect all the property values, even from multiple // objects of the same type. solrDocument.addField(FieldUtils.getFieldName(prefix, type, locale), value); // We need to be able to sort by a property value and for this we need a dedicated (single valued) field because // the field we just added is multiValued and multiValued fields are not sortable. // We don't need to sort on properties that hold large localized texts or large strings (e.g. TextArea). if ((type != TypedValue.TEXT && type != TypedValue.STRING) || String.valueOf(value).length() <= getShortTextLimit()) { // Short localized texts are indexed as strings because a sort field is either non-tokenized (i.e. has no // Analyzer) or uses an Analyzer that only produces a single Term (i.e. uses the KeywordTokenizer). String sortType = "sort" + StringUtils.capitalize(type == TypedValue.TEXT ? TypedValue.STRING : type); // We're using "setField" because the sort fields must be single valued. The consequence is that for // properties with multiple values the last value we set will be used for sorting (e.g. if a document has // two objects of the same type then the value from the second object will be used for sorting). solrDocument.setField(FieldUtils.getFieldName(prefix, sortType, locale), value); } // We need to be able to query all properties of a specific type of object at once. String serializedClassReference = fieldNameEncoder.encode(fieldNameSerializer.serialize(classReference)); String objectOfTypeFieldName = "object." + serializedClassReference; // The current method can be called multiple times for the same property value (but with a different type). // Since we don't care about the value type here (all the values are collected in a localized field) we need to // make sure we don't add the same value twice. addFieldValueOnce(solrDocument, FieldUtils.getFieldName(objectOfTypeFieldName, locale), value); // We need to be able to query all objects from a document at once. super.setPropertyValue(solrDocument, property, typedValue, locale); }
Vulnerability Classification: - CWE: CWE-312, CWE-200 - CVE: CVE-2023-50719 - Severity: HIGH - CVSS Score: 7.5 Description: XWIKI-20371: Consider mail obfuscation settings in the Solr indexer * Introduce a new event GeneralMailConfigurationUpdatedEvent to notify the indexer when the mail configuration changed. * Don't index emails when obfuscation is enabled. * Add a test for the object property metadata extractor. * Add a migration to clear the index. * Make sure that indexing is executed with the indexed document in context. Function: setPropertyValue File: xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/internal/metadata/DocumentSolrMetadataExtractor.java Repository: xwiki/xwiki-platform Fixed Code: @Override protected void setPropertyValue(SolrInputDocument solrDocument, BaseProperty<?> property, TypedValue typedValue, Locale locale) { Object value = typedValue.getValue(); String type = typedValue.getType(); // We need to be able to query an object property alone. EntityReference classReference = property.getObject().getRelativeXClassReference(); EntityReference propertyReference = new EntityReference(property.getName(), EntityType.CLASS_PROPERTY, classReference); String serializedPropertyReference = fieldNameEncoder.encode(fieldNameSerializer.serialize(propertyReference)); String prefix = "property." + serializedPropertyReference; // Note that we're using "addField" because we want to collect all the property values, even from multiple // objects of the same type. solrDocument.addField(FieldUtils.getFieldName(prefix, type, locale), value); // We need to be able to sort by a property value and for this we need a dedicated (single valued) field because // the field we just added is multiValued and multiValued fields are not sortable. // We don't need to sort on properties that hold large localized texts or large strings (e.g. TextArea). if ((type != TypedValue.TEXT && type != TypedValue.STRING) || String.valueOf(value).length() <= getShortTextLimit()) { // Short localized texts are indexed as strings because a sort field is either non-tokenized (i.e. has no // Analyzer) or uses an Analyzer that only produces a single Term (i.e. uses the KeywordTokenizer). String sortType = "sort" + StringUtils.capitalize(type == TypedValue.TEXT ? TypedValue.STRING : type); // We're using "setField" because the sort fields must be single valued. The consequence is that for // properties with multiple values the last value we set will be used for sorting (e.g. if a document has // two objects of the same type then the value from the second object will be used for sorting). solrDocument.setField(FieldUtils.getFieldName(prefix, sortType, locale), value); } // We need to be able to query all properties of a specific type of object at once. String serializedClassReference = fieldNameEncoder.encode(fieldNameSerializer.serialize(classReference)); String objectOfTypeFieldName = "object." + serializedClassReference; // The current method can be called multiple times for the same property value (but with a different type). // Since we don't care about the value type here (all the values are collected in a localized field) we need to // make sure we don't add the same value twice. addFieldValueOnce(solrDocument, FieldUtils.getFieldName(objectOfTypeFieldName, locale), value); // We need to be able to query all objects from a document at once. super.setPropertyValue(solrDocument, property, typedValue, locale); }
[ "CWE-312", "CWE-200" ]
CVE-2023-50719
HIGH
7.5
xwiki/xwiki-platform
setPropertyValue
xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/internal/metadata/DocumentSolrMetadataExtractor.java
3e5272f2ef0dff06a8f4db10afd1949b2f9e6eea
1
Analyze the following code function for security vulnerabilities
public URI toURI() { return internal.toURI(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toURI File: src/net/sourceforge/plantuml/security/SFile.java Repository: plantuml The code follows secure coding practices.
[ "CWE-284" ]
CVE-2023-3431
MEDIUM
5.3
plantuml
toURI
src/net/sourceforge/plantuml/security/SFile.java
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
0
Analyze the following code function for security vulnerabilities
@Override public Response processCommitTransactionTwoPhase(TransactionInfo info) throws Exception { TransportConnectionState cs = lookupConnectionState(info.getConnectionId()); context = cs.getContext(); cs.removeTransactionState(info.getTransactionId()); broker.commitTransaction(context, info.getTransactionId(), false); return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: processCommitTransactionTwoPhase File: activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java Repository: apache/activemq The code follows secure coding practices.
[ "CWE-264" ]
CVE-2014-3576
MEDIUM
5
apache/activemq
processCommitTransactionTwoPhase
activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
00921f2
0
Analyze the following code function for security vulnerabilities
public DriverResult loadFromLocal(String localPath) { File driverFile = Paths.get(localPath).toFile(); if (driverFile.exists()) { return new DriverResult(localPath, driverFile); } else { throw DomainErrors.LOAD_DRIVER_FAILED.exception(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: loadFromLocal File: core/src/main/java/com/databasir/core/infrastructure/driver/DriverResources.java Repository: vran-dev/databasir The code follows secure coding practices.
[ "CWE-918" ]
CVE-2022-31196
HIGH
7.5
vran-dev/databasir
loadFromLocal
core/src/main/java/com/databasir/core/infrastructure/driver/DriverResources.java
226c20e0c9124037671a91d6b3e5083bd2462058
0
Analyze the following code function for security vulnerabilities
@Before public void setUp() { oldRootLevel = getRootLevel(); setRootLevel(Level.ERROR); postgresClient = null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setUp File: domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java Repository: folio-org/raml-module-builder The code follows secure coding practices.
[ "CWE-89" ]
CVE-2019-15534
HIGH
7.5
folio-org/raml-module-builder
setUp
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
@Override public Character getChar(K name) { V v = get(name); try { return v != null ? toChar(name, v) : null; } catch (RuntimeException ignore) { return null; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getChar File: codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java Repository: netty The code follows secure coding practices.
[ "CWE-436", "CWE-113" ]
CVE-2022-41915
MEDIUM
6.5
netty
getChar
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
0
Analyze the following code function for security vulnerabilities
public void signalPersistentProcesses(int sig) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); data.writeInt(sig); mRemote.transact(SIGNAL_PERSISTENT_PROCESSES_TRANSACTION, data, reply, 0); reply.readException(); data.recycle(); reply.recycle(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: signalPersistentProcesses File: core/java/android/app/ActivityManagerNative.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
signalPersistentProcesses
core/java/android/app/ActivityManagerNative.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
protected ObjectDeserializer getEnumDeserializer(Class<?> clazz){ return new EnumDeserializer(clazz); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getEnumDeserializer 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
getEnumDeserializer
src/main/java/com/alibaba/fastjson/parser/ParserConfig.java
8f3410f81cbd437f7c459f8868445d50ad301f15
0
Analyze the following code function for security vulnerabilities
void handleConnectionServiceDeath(ConnectionServiceWrapper service) { if (service != null) { for (Call call : mCalls) { if (call.getConnectionService() == service) { if (call.getState() != CallState.DISCONNECTED) { markCallAsDisconnected(call, new DisconnectCause(DisconnectCause.ERROR)); } markCallAsRemoved(call); } } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handleConnectionServiceDeath File: src/com/android/server/telecom/CallsManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-2423
MEDIUM
6.6
android
handleConnectionServiceDeath
src/com/android/server/telecom/CallsManager.java
a06c9a4aef69ae27b951523cf72bf72412bf48fa
0
Analyze the following code function for security vulnerabilities
public String getTitle() { return title; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTitle File: flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java Repository: vaadin/flow The code follows secure coding practices.
[ "CWE-200" ]
CVE-2023-25499
MEDIUM
6.5
vaadin/flow
getTitle
flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
0
Analyze the following code function for security vulnerabilities
public boolean rewrite(File f) throws InvalidKeyException, IOException { AtomicFileWriter w = new AtomicFileWriter(f, "UTF-8"); try { PrintWriter out = new PrintWriter(new BufferedWriter(w)); boolean modified = false; // did we actually change anything? try { FileInputStream fin = new FileInputStream(f); try { BufferedReader r = new BufferedReader(new InputStreamReader(fin, "UTF-8")); String line; StringBuilder buf = new StringBuilder(); while ((line=r.readLine())!=null) { int copied=0; buf.setLength(0); while (true) { int sidx = line.indexOf('>',copied); if (sidx<0) break; int eidx = line.indexOf('<',sidx); if (eidx<0) break; String elementText = line.substring(sidx+1,eidx); String replacement = tryRewrite(elementText); if (!replacement.equals(elementText)) modified = true; buf.append(line.substring(copied,sidx+1)); buf.append(replacement); copied = eidx; } buf.append(line.substring(copied)); out.println(buf.toString()); } } finally { fin.close(); } } finally { out.close(); } if (modified) { w.commit(); } return modified; } finally { w.abort(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: rewrite File: core/src/main/java/hudson/util/SecretRewriter.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-326" ]
CVE-2017-2598
MEDIUM
4
jenkinsci/jenkins
rewrite
core/src/main/java/hudson/util/SecretRewriter.java
e6aa166246d1734f4798a9e31f78842f4c85c28b
0
Analyze the following code function for security vulnerabilities
@Override public void enableQueue() { enabledQueue = true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: enableQueue File: worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/SingleThreadQueueExtent.java Repository: IntellectualSites/FastAsyncWorldEdit The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-35925
MEDIUM
5.5
IntellectualSites/FastAsyncWorldEdit
enableQueue
worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/SingleThreadQueueExtent.java
3a8dfb4f7b858a439c35f7af1d56d21f796f61f5
0
Analyze the following code function for security vulnerabilities
void clearWillReplaceWindows() { ProtoLog.d(WM_DEBUG_ADD_REMOVE, "Resetting app token %s of replacing window marks.", this); for (int i = mChildren.size() - 1; i >= 0; i--) { final WindowState w = mChildren.get(i); w.clearWillReplaceWindow(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: clearWillReplaceWindows 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
clearWillReplaceWindows
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
@Override public int getRequiredPasswordComplexity(String callerPackageName, boolean calledOnParent) { if (!mHasFeature) { return PASSWORD_COMPLEXITY_NONE; } final CallerIdentity caller = getCallerIdentity(); if (isPermissionCheckFlagEnabled()) { int affectedUser = calledOnParent ? getProfileParentId(caller.getUserId()) : caller.getUserId(); enforcePermission(MANAGE_DEVICE_POLICY_LOCK_CREDENTIALS, callerPackageName, affectedUser); } else { Preconditions.checkCallAuthorization( isDefaultDeviceOwner(caller) || isProfileOwner(caller)); Preconditions.checkArgument(!calledOnParent || isProfileOwner(caller)); } synchronized (getLockObject()) { final ActiveAdmin requiredAdmin = getParentOfAdminIfRequired( getDeviceOrProfileOwnerAdminLocked(caller.getUserId()), calledOnParent); return requiredAdmin.mPasswordComplexity; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRequiredPasswordComplexity 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
getRequiredPasswordComplexity
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
private void checkCapabilities() { ncApi.getCapabilities(credentials, ApiUtils.getUrlForCapabilities(baseUrl)) .retry(3) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(new Observer<CapabilitiesOverall>() { @Override public void onSubscribe(@io.reactivex.annotations.NonNull Disposable d) { // unused atm } @Override public void onNext(@io.reactivex.annotations.NonNull CapabilitiesOverall capabilitiesOverall) { // FIXME check for compatible Call API version if (hasExternalSignalingServer) { setupAndInitiateWebSocketsConnection(); } else { joinRoomAndCall(); } } @Override public void onError(@io.reactivex.annotations.NonNull Throwable e) { // unused atm } @Override public void onComplete() { // unused atm } }); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkCapabilities 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
checkCapabilities
app/src/main/java/com/nextcloud/talk/activities/CallActivity.java
bb7e82fbcbd8c10d0d0128d736c41cec0f79e7d0
0
Analyze the following code function for security vulnerabilities
private String getSkinResourcePath(String resource) { String skinFolder = getSkinFolder(); String resourcePath = skinFolder + resource; // Prevent inclusion of templates from other directories Path normalizedResource = Paths.get(resourcePath).normalize(); // Protect against directory attacks. if (!normalizedResource.startsWith(skinFolder)) { LOGGER.warn("Direct access to skin file [{}] refused. Possible break-in attempt!", normalizedResource); return null; } return resourcePath; }
Vulnerability Classification: - CWE: CWE-22 - CVE: CVE-2022-29253 - Severity: MEDIUM - CVSS Score: 4.0 Description: XWIKI-19349: Bad handling of classloader templates path resolution Function: getSkinResourcePath File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/skin/AbstractResourceSkin.java Repository: xwiki/xwiki-platform Fixed Code: private String getSkinResourcePath(String resource) { String skinFolder = getSkinFolder(); String resourcePath = skinFolder + resource; // Prevent access to resources from other directories Path normalizedResource = Paths.get(resourcePath).normalize(); // Protect against directory attacks. if (!normalizedResource.startsWith(skinFolder)) { LOGGER.warn("Direct access to skin file [{}] refused. Possible break-in attempt!", normalizedResource); return null; } return resourcePath; }
[ "CWE-22" ]
CVE-2022-29253
MEDIUM
4
xwiki/xwiki-platform
getSkinResourcePath
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/skin/AbstractResourceSkin.java
4917c8f355717bb636d763844528b1fe0f95e8e2
1
Analyze the following code function for security vulnerabilities
public void setTrackingHeadsUp(boolean tracking) { if (tracking) { mNotificationStackScroller.setTrackingHeadsUp(true); mExpandingFromHeadsUp = true; } // otherwise we update the state when the expansion is finished }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setTrackingHeadsUp File: packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2017-0822
HIGH
7.5
android
setTrackingHeadsUp
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
@Deprecated(since = "4.3M2") public String getDefaultLanguage() { return getDefaultLocale().toString(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDefaultLanguage 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
getDefaultLanguage
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
@Beta @Deprecated public static void append(CharSequence from, File to, Charset charset) throws IOException { asCharSink(to, charset, FileWriteMode.APPEND).write(from); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: append File: android/guava/src/com/google/common/io/Files.java Repository: google/guava The code follows secure coding practices.
[ "CWE-732" ]
CVE-2020-8908
LOW
2.1
google/guava
append
android/guava/src/com/google/common/io/Files.java
fec0dbc4634006a6162cfd4d0d09c962073ddf40
0
Analyze the following code function for security vulnerabilities
public boolean isSSL(){ return getSocketFactory() instanceof SSLSocketFactory || sslContextFactory != null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isSSL 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
isSSL
src/main/java/com/rabbitmq/client/ConnectionFactory.java
714aae602dcae6cb4b53cadf009323ebac313cc8
0
Analyze the following code function for security vulnerabilities
public void startManagedQuickContact(String actualLookupKey, long actualContactId, Intent originalIntent) { startManagedQuickContact(actualLookupKey, actualContactId, false, Directory.DEFAULT, originalIntent); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: startManagedQuickContact File: core/java/android/app/admin/DevicePolicyManager.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40089
HIGH
7.8
android
startManagedQuickContact
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
private JobExecutor getJobExecutor() { if (this.jobExecutor == null) { this.jobExecutor = Utils.getComponent(JobExecutor.class); } return this.jobExecutor; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getJobExecutor File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2021-32620
MEDIUM
4
xwiki/xwiki-platform
getJobExecutor
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
f9a677408ffb06f309be46ef9d8df1915d9099a4
0
Analyze the following code function for security vulnerabilities
@Override public Object getUserData(String key) { return doc.getUserData(key); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getUserData File: HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java Repository: LoboEvolution The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-1000540
MEDIUM
6.8
LoboEvolution
getUserData
HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java
9b75694cedfa4825d4a2330abf2719d470c654cd
0
Analyze the following code function for security vulnerabilities
@Override public boolean getNeedClientAuth() { return clientAuth == ClientAuth.REQUIRE; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getNeedClientAuth File: handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java Repository: netty The code follows secure coding practices.
[ "CWE-835" ]
CVE-2016-4970
HIGH
7.8
netty
getNeedClientAuth
handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java
bc8291c80912a39fbd2303e18476d15751af0bf1
0
Analyze the following code function for security vulnerabilities
public StatusBarWindowView getStatusBarWindow() { return mStatusBarWindow; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getStatusBarWindow 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
getStatusBarWindow
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
@Override public void doGet(HttpServletRequest request, HttpServletResponse response) { doPost(request, response); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: doGet File: core-web/src/main/java/org/silverpeas/core/web/mvc/route/ComponentRequestRouter.java Repository: Silverpeas/Silverpeas-Core The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-47324
MEDIUM
5.4
Silverpeas/Silverpeas-Core
doGet
core-web/src/main/java/org/silverpeas/core/web/mvc/route/ComponentRequestRouter.java
9a55728729a3b431847045c674b3e883507d1e1a
0
Analyze the following code function for security vulnerabilities
@FlakyTest @LargeTest @Test public void testIncomingCallFromContactWithSendToVoicemailIsRejected() throws Exception { Bundle extras = new Bundle(); extras.putParcelable( TelecomManager.EXTRA_INCOMING_CALL_ADDRESS, Uri.fromParts(PhoneAccount.SCHEME_TEL, "650-555-1212", null)); mTelecomSystem.getTelecomServiceImpl().getBinder() .addNewIncomingCall(mPhoneAccountA0.getAccountHandle(), extras); waitForHandlerAction(mConnectionServiceFixtureA.mConnectionServiceDelegate.getHandler(), TEST_TIMEOUT); verify(mConnectionServiceFixtureA.getTestDouble()) .createConnection(any(PhoneAccountHandle.class), anyString(), any(ConnectionRequest.class), eq(true), eq(false), any()); waitForHandlerAction(mConnectionServiceFixtureA.mConnectionServiceDelegate.getHandler(), TEST_TIMEOUT); assertEquals(1, mCallerInfoAsyncQueryFactoryFixture.mRequests.size()); CallerInfo sendToVoicemailCallerInfo = new CallerInfo(); sendToVoicemailCallerInfo.shouldSendToVoicemail = true; sendToVoicemailCallerInfo.contactExists = true; mCallerInfoAsyncQueryFactoryFixture.setResponse(sendToVoicemailCallerInfo); for (CallerInfoAsyncQueryFactoryFixture.Request request : mCallerInfoAsyncQueryFactoryFixture.mRequests) { request.replyWithCallerInfo(sendToVoicemailCallerInfo); } assertTrueWithTimeout(new Predicate<Void>() { @Override public boolean apply(Void aVoid) { return mConnectionServiceFixtureA.mConnectionService.rejectedCallIds.size() == 1; } }); assertTrueWithTimeout(new Predicate<Void>() { @Override public boolean apply(Void aVoid) { return mMissedCallNotifier.missedCallsNotified.size() == 1; } }); verify(mInCallServiceFixtureX.getTestDouble(), never()) .setInCallAdapter(any(IInCallAdapter.class)); verify(mInCallServiceFixtureY.getTestDouble(), never()) .setInCallAdapter(any(IInCallAdapter.class)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: testIncomingCallFromContactWithSendToVoicemailIsRejected File: tests/src/com/android/server/telecom/tests/BasicCallTests.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21283
MEDIUM
5.5
android
testIncomingCallFromContactWithSendToVoicemailIsRejected
tests/src/com/android/server/telecom/tests/BasicCallTests.java
9b41a963f352fdb3da1da8c633d45280badfcb24
0
Analyze the following code function for security vulnerabilities
private void sendDelegationChangedBroadcast(String delegatePackage, ArrayList<String> scopes, int userId) { // Notify delegate package of updates. final Intent intent = new Intent( DevicePolicyManager.ACTION_APPLICATION_DELEGATION_SCOPES_CHANGED); // Only call receivers registered with Context#registerReceiver (don’t wake delegate). intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY); // Limit components this intent resolves to to the delegate package. intent.setPackage(delegatePackage); // Include the list of delegated scopes as an extra. intent.putStringArrayListExtra(DevicePolicyManager.EXTRA_DELEGATION_SCOPES, scopes); // Send the broadcast. mContext.sendBroadcastAsUser(intent, UserHandle.of(userId)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sendDelegationChangedBroadcast File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2023-21284
MEDIUM
5.5
android
sendDelegationChangedBroadcast
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
protected void engineUpdate( byte[] b, int off, int len) throws SignatureException { digest.update(b, off, len); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: engineUpdate File: prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dsa/DSASigner.java Repository: bcgit/bc-java The code follows secure coding practices.
[ "CWE-347" ]
CVE-2016-1000338
MEDIUM
5
bcgit/bc-java
engineUpdate
prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dsa/DSASigner.java
b0c3ce99d43d73a096268831d0d120ffc89eac7f
0
Analyze the following code function for security vulnerabilities
ActivityInfo resolveActivityInfoForIntent(Intent intent, String resolvedType, int userId, int callingUid) { ActivityInfo aInfo = mTaskSupervisor.resolveActivity(intent, resolvedType, 0 /* startFlags */, null /* profilerInfo */, userId, ActivityStarter.computeResolveFilterUid(callingUid, callingUid, UserHandle.USER_NULL)); return mAmInternal.getActivityInfoForUser(aInfo, userId); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: resolveActivityInfoForIntent File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40094
HIGH
7.8
android
resolveActivityInfoForIntent
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
1120bc7e511710b1b774adf29ba47106292365e7
0
Analyze the following code function for security vulnerabilities
static boolean isCompatible(Config c1, Config c2) { if (c1 == c2) { return true; } if (c1 == null || c2 == null) { throw new IllegalArgumentException("One of the two configs is null"); } if (!nullSafeEqual(c1.getGroupConfig().getName(), c2.getGroupConfig().getName())) { return false; } if (!nullSafeEqual(c1.getGroupConfig().getPassword(), c2.getGroupConfig().getPassword())) { throw new HazelcastException("Incompatible group password"); } checkWanConfigs(c1.getWanReplicationConfigs(), c2.getWanReplicationConfigs()); checkCompatibleConfigs("partition group", c1.getPartitionGroupConfig(), c2.getPartitionGroupConfig(), new PartitionGroupConfigChecker()); checkCompatibleConfigs("serialization", c1.getSerializationConfig(), c2.getSerializationConfig(), new SerializationConfigChecker()); checkCompatibleConfigs("services", c1.getServicesConfig(), c2.getServicesConfig(), new ServicesConfigChecker()); checkCompatibleConfigs("management center", c1.getManagementCenterConfig(), c2.getManagementCenterConfig(), new ManagementCenterConfigChecker()); checkCompatibleConfigs("hot restart", c1.getHotRestartPersistenceConfig(), c2.getHotRestartPersistenceConfig(), new HotRestartConfigChecker()); checkCompatibleConfigs("CRDT replication", c1.getCRDTReplicationConfig(), c2.getCRDTReplicationConfig(), new CRDTReplicationConfigChecker()); checkCompatibleConfigs("network", c1.getNetworkConfig(), c2.getNetworkConfig(), new NetworkConfigChecker()); checkCompatibleConfigs("map", c1, c2, c1.getMapConfigs(), c2.getMapConfigs(), new MapConfigChecker()); checkCompatibleConfigs("ringbuffer", c1, c2, c1.getRingbufferConfigs(), c2.getRingbufferConfigs(), new RingbufferConfigChecker()); checkCompatibleConfigs("atomic-long", c1, c2, c1.getAtomicLongConfigs(), c2.getAtomicLongConfigs(), new AtomicLongConfigChecker()); checkCompatibleConfigs("atomic-reference", c1, c2, c1.getAtomicReferenceConfigs(), c2.getAtomicReferenceConfigs(), new AtomicReferenceConfigChecker()); checkCompatibleConfigs("queue", c1, c2, c1.getQueueConfigs(), c2.getQueueConfigs(), new QueueConfigChecker()); checkCompatibleConfigs("semaphore", c1, c2, getSemaphoreConfigsByName(c1), getSemaphoreConfigsByName(c2), new SemaphoreConfigChecker()); checkCompatibleConfigs("lock", c1, c2, c1.getLockConfigs(), c2.getLockConfigs(), new LockConfigChecker()); checkCompatibleConfigs("topic", c1, c2, c1.getTopicConfigs(), c2.getTopicConfigs(), new TopicConfigChecker()); checkCompatibleConfigs("reliable topic", c1, c2, c1.getReliableTopicConfigs(), c2.getReliableTopicConfigs(), new ReliableTopicConfigChecker()); checkCompatibleConfigs("cache", c1, c2, c1.getCacheConfigs(), c2.getCacheConfigs(), new CacheSimpleConfigChecker()); checkCompatibleConfigs("executor", c1, c2, c1.getExecutorConfigs(), c2.getExecutorConfigs(), new ExecutorConfigChecker()); checkCompatibleConfigs("durable executor", c1, c2, c1.getDurableExecutorConfigs(), c2.getDurableExecutorConfigs(), new DurableExecutorConfigChecker()); checkCompatibleConfigs("scheduled executor", c1, c2, c1.getScheduledExecutorConfigs(), c2.getScheduledExecutorConfigs(), new ScheduledExecutorConfigChecker()); checkCompatibleConfigs("map event journal", c1, c2, c1.getMapEventJournalConfigs(), c2.getMapEventJournalConfigs(), new MapEventJournalConfigChecker()); checkCompatibleConfigs("cache event journal", c1, c2, c1.getCacheEventJournalConfigs(), c2.getCacheEventJournalConfigs(), new CacheEventJournalConfigChecker()); checkCompatibleConfigs("multimap", c1, c2, c1.getMultiMapConfigs(), c2.getMultiMapConfigs(), new MultimapConfigChecker()); checkCompatibleConfigs("replicated map", c1, c2, c1.getReplicatedMapConfigs(), c2.getReplicatedMapConfigs(), new ReplicatedMapConfigChecker()); checkCompatibleConfigs("list", c1, c2, c1.getListConfigs(), c2.getListConfigs(), new ListConfigChecker()); checkCompatibleConfigs("set", c1, c2, c1.getSetConfigs(), c2.getSetConfigs(), new SetConfigChecker()); checkCompatibleConfigs("job tracker", c1, c2, c1.getJobTrackerConfigs(), c2.getJobTrackerConfigs(), new JobTrackerConfigChecker()); checkCompatibleConfigs("flake id generator", c1, c2, c1.getFlakeIdGeneratorConfigs(), c2.getFlakeIdGeneratorConfigs(), new FlakeIdGeneratorConfigChecker()); checkCompatibleConfigs("count down latch", c1, c2, c1.getCountDownLatchConfigs(), c2.getCountDownLatchConfigs(), new CountDownLatchConfigChecker()); checkCompatibleConfigs("cardinality estimator", c1, c2, c1.getCardinalityEstimatorConfigs(), c2.getCardinalityEstimatorConfigs(), new CardinalityEstimatorConfigChecker()); checkCompatibleConfigs("pn counter", c1, c2, c1.getPNCounterConfigs(), c2.getPNCounterConfigs(), new PNCounterConfigChecker()); checkCompatibleConfigs("quorum", c1, c2, c1.getQuorumConfigs(), c2.getQuorumConfigs(), new QuorumConfigChecker()); checkCompatibleConfigs("security", c1, c2, singletonMap("", c1.getSecurityConfig()), singletonMap("", c2.getSecurityConfig()), new SecurityConfigChecker()); return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isCompatible File: hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java Repository: hazelcast The code follows secure coding practices.
[ "CWE-502" ]
CVE-2016-10750
MEDIUM
6.8
hazelcast
isCompatible
hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
0
Analyze the following code function for security vulnerabilities
protected void convertNumberToBigDecimal() throws IOException { // Note: this MUST start with more accurate representations, since we don't know which // value is the original one (others get generated when requested) if ((_numTypesValid & (NR_DOUBLE | NR_FLOAT)) != 0) { // Let's parse from String representation, to avoid rounding errors that //non-decimal floating operations would incur _numberBigDecimal = NumberInput.parseBigDecimal(getText()); } else if ((_numTypesValid & NR_BIGINT) != 0) { _numberBigDecimal = new BigDecimal(_numberBigInt); } else if ((_numTypesValid & NR_LONG) != 0) { _numberBigDecimal = BigDecimal.valueOf(_numberLong); } else if ((_numTypesValid & NR_INT) != 0) { _numberBigDecimal = BigDecimal.valueOf(_numberInt); } else { _throwInternal(); } _numTypesValid |= NR_BIGDECIMAL; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: convertNumberToBigDecimal File: cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java Repository: FasterXML/jackson-dataformats-binary The code follows secure coding practices.
[ "CWE-770" ]
CVE-2020-28491
MEDIUM
5
FasterXML/jackson-dataformats-binary
convertNumberToBigDecimal
cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
de072d314af8f5f269c8abec6930652af67bc8e6
0
Analyze the following code function for security vulnerabilities
@Override public boolean isInHomeStack(int taskId) { enforceCallingPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS, "getStackInfo()"); long ident = Binder.clearCallingIdentity(); try { synchronized (this) { TaskRecord tr = mStackSupervisor.anyTaskForIdLocked(taskId); return tr != null && tr.stack != null && tr.stack.isHomeStack(); } } finally { Binder.restoreCallingIdentity(ident); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isInHomeStack File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2015-3833
MEDIUM
4.3
android
isInHomeStack
services/core/java/com/android/server/am/ActivityManagerService.java
aaa0fee0d7a8da347a0c47cef5249c70efee209e
0
Analyze the following code function for security vulnerabilities
private static String toLuceneTime(Date time) { try { SimpleDateFormat df = new SimpleDateFormat("HHmmss"); String returnValue = df.format(time); return returnValue; } catch (Exception ex) { Logger.error(ESContentFactoryImpl.class, ex.toString()); return ERROR_DATE; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toLuceneTime File: src/com/dotcms/content/elasticsearch/business/ESContentFactoryImpl.java Repository: dotCMS/core The code follows secure coding practices.
[ "CWE-89" ]
CVE-2016-2355
HIGH
7.5
dotCMS/core
toLuceneTime
src/com/dotcms/content/elasticsearch/business/ESContentFactoryImpl.java
897f3632d7e471b7a73aabed5b19f6f53d4e5562
0
Analyze the following code function for security vulnerabilities
@RequestMapping("/module/htmlformentry/htmlFormFromFile.form") public void handleRequest(Model model, @RequestParam(value = "filePath", required = false) String filePath, @RequestParam(value = "patientId", required = false) Integer pId, @RequestParam(value = "isFileUpload", required = false) boolean isFileUpload, HttpServletRequest request) throws Exception { if (log.isDebugEnabled()) log.debug("In reference data..."); model.addAttribute("previewHtml", ""); String message = ""; File f = null; try { if (isFileUpload) { MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; MultipartFile multipartFile = multipartRequest.getFile("htmlFormFile"); if (multipartFile != null) { //use the same file for the logged in user f = new File(SystemUtils.JAVA_IO_TMPDIR, TEMP_HTML_FORM_FILE_PREFIX + Context.getAuthenticatedUser().getSystemId()); if (!f.exists()) f.createNewFile(); filePath = f.getAbsolutePath(); FileOutputStream fileOut = new FileOutputStream(f); IOUtils.copy(multipartFile.getInputStream(), fileOut); fileOut.close(); } } else { if (StringUtils.hasText(filePath)) { f = new File(filePath); } else { message = "You must specify a file path to preview from file"; } } if (f != null && f.exists() && f.canRead()) { model.addAttribute("filePath", filePath); StringWriter writer = new StringWriter(); IOUtils.copy(new FileInputStream(f), writer, "UTF-8"); String xml = writer.toString(); Patient p = null; if (pId != null) { p = Context.getPatientService().getPatient(pId); } else { p = HtmlFormEntryUtil.getFakePerson(); } HtmlForm fakeForm = new HtmlForm(); fakeForm.setXmlData(xml); FormEntrySession fes = new FormEntrySession(p, null, Mode.ENTER, fakeForm, request.getSession()); String html = fes.getHtmlToDisplay(); if (fes.getFieldAccessorJavascript() != null) { html += "<script>" + fes.getFieldAccessorJavascript() + "</script>"; } model.addAttribute("previewHtml", html); //clear the error message message = ""; } else { message = "Please specify a valid file path or select a valid file."; } } catch (Exception e) { log.error("An error occurred while loading the html.", e); message = "An error occurred while loading the html. " + e.getMessage(); } model.addAttribute("message", message); model.addAttribute("isFileUpload", isFileUpload); }
Vulnerability Classification: - CWE: CWE-20 - CVE: CVE-2017-12795 - Severity: HIGH - CVSS Score: 7.5 Description: Added privilege check when previewing an uploaded html form Function: handleRequest File: omod/src/main/java/org/openmrs/module/htmlformentry/web/controller/HtmlFormFromFileController.java Repository: openmrs/openmrs-module-htmlformentry Fixed Code: @RequestMapping("/module/htmlformentry/htmlFormFromFile.form") public void handleRequest(Model model, @RequestParam(value = "filePath", required = false) String filePath, @RequestParam(value = "patientId", required = false) Integer pId, @RequestParam(value = "isFileUpload", required = false) boolean isFileUpload, HttpServletRequest request) throws Exception { Context.requirePrivilege("Manage Forms"); if (log.isDebugEnabled()) log.debug("In reference data..."); model.addAttribute("previewHtml", ""); String message = ""; File f = null; try { if (isFileUpload) { MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; MultipartFile multipartFile = multipartRequest.getFile("htmlFormFile"); if (multipartFile != null) { //use the same file for the logged in user f = new File(SystemUtils.JAVA_IO_TMPDIR, TEMP_HTML_FORM_FILE_PREFIX + Context.getAuthenticatedUser().getSystemId()); if (!f.exists()) f.createNewFile(); filePath = f.getAbsolutePath(); FileOutputStream fileOut = new FileOutputStream(f); IOUtils.copy(multipartFile.getInputStream(), fileOut); fileOut.close(); } } else { if (StringUtils.hasText(filePath)) { f = new File(filePath); } else { message = "You must specify a file path to preview from file"; } } if (f != null && f.exists() && f.canRead()) { model.addAttribute("filePath", filePath); StringWriter writer = new StringWriter(); IOUtils.copy(new FileInputStream(f), writer, "UTF-8"); String xml = writer.toString(); Patient p = null; if (pId != null) { p = Context.getPatientService().getPatient(pId); } else { p = HtmlFormEntryUtil.getFakePerson(); } HtmlForm fakeForm = new HtmlForm(); fakeForm.setXmlData(xml); FormEntrySession fes = new FormEntrySession(p, null, Mode.ENTER, fakeForm, request.getSession()); String html = fes.getHtmlToDisplay(); if (fes.getFieldAccessorJavascript() != null) { html += "<script>" + fes.getFieldAccessorJavascript() + "</script>"; } model.addAttribute("previewHtml", html); //clear the error message message = ""; } else { message = "Please specify a valid file path or select a valid file."; } } catch (Exception e) { log.error("An error occurred while loading the html.", e); message = "An error occurred while loading the html. " + e.getMessage(); } model.addAttribute("message", message); model.addAttribute("isFileUpload", isFileUpload); }
[ "CWE-20" ]
CVE-2017-12795
HIGH
7.5
openmrs/openmrs-module-htmlformentry
handleRequest
omod/src/main/java/org/openmrs/module/htmlformentry/web/controller/HtmlFormFromFileController.java
86f35221c8a57cdd7557ce731a56b90db216c8e0
1
Analyze the following code function for security vulnerabilities
private ActiveAdmin getActiveAdminForCaller(@Nullable ComponentName who, CallerIdentity caller) { synchronized (getLockObject()) { if (who != null) { return getActiveAdminUncheckedLocked(who, caller.getUserId()); } return mInjector.binderWithCleanCallingIdentity(() -> { List<ComponentName> activeAdmins = getActiveAdmins(caller.getUserId()); if (activeAdmins != null) { for (ComponentName admin : activeAdmins) { if (admin.getPackageName().equals(caller.getPackageName())) { return getActiveAdminUncheckedLocked(admin, caller.getUserId()); } } } return null; }); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getActiveAdminForCaller 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
getActiveAdminForCaller
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
void makeIntentSenderCanceledLocked(PendingIntentRecord rec) { rec.canceled = true; RemoteCallbackList<IResultReceiver> callbacks = rec.detachCancelListenersLocked(); if (callbacks != null) { mHandler.obtainMessage(DISPATCH_PENDING_INTENT_CANCEL_MSG, callbacks).sendToTarget(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: makeIntentSenderCanceledLocked File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-863" ]
CVE-2018-9492
HIGH
7.2
android
makeIntentSenderCanceledLocked
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
@Override public boolean approveCaCert(String alias, int userId, boolean approval) { Preconditions.checkCallAuthorization(canManageUsers(getCallerIdentity())); synchronized (getLockObject()) { Set<String> certs = getUserData(userId).mAcceptedCaCertificates; boolean changed = (approval ? certs.add(alias) : certs.remove(alias)); if (!changed) { return false; } saveSettingsLocked(userId); } mCertificateMonitor.onCertificateApprovalsChanged(userId); return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: approveCaCert File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2023-21284
MEDIUM
5.5
android
approveCaCert
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
@Deprecated public MethodHandles.Lookup getTrusted() { checkTrusted(); return Root.RootLookupHolder.ROOT; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTrusted File: api/src/main/java/io/github/karlatemp/unsafeaccessor/UnsafeAccess.java Repository: Karlatemp/UnsafeAccessor The code follows secure coding practices.
[ "CWE-863" ]
CVE-2022-31139
MEDIUM
4.3
Karlatemp/UnsafeAccessor
getTrusted
api/src/main/java/io/github/karlatemp/unsafeaccessor/UnsafeAccess.java
4ef83000184e8f13239a1ea2847ee401d81585fd
0
Analyze the following code function for security vulnerabilities
public static void addToZip(int prefix, File file, FileFilter filter, ZipOutputStream zos) throws IOException { String name = file.getCanonicalPath().substring(prefix); if (name.startsWith("/")) { name = name.substring(1); } if (file.isDirectory()) { if (!name.isEmpty()) { ZipEntry entry = new ZipEntry(name + '/'); zos.putNextEntry(entry); } File[] files = file.listFiles(filter); if (files != null) { for (File f : files) { addToZip(prefix, f, filter, zos); } } } else if (file.isFile()) { ZipEntry entry = new ZipEntry(name); zos.putNextEntry(entry); try (FileInputStream fis = (FileInputStream) Files.newInputStream(file.toPath())) { IOUtils.copy(fis, zos); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addToZip File: frontend/archive/src/main/java/org/pytorch/serve/archive/utils/ZipUtils.java Repository: pytorch/serve The code follows secure coding practices.
[ "CWE-22" ]
CVE-2023-48299
MEDIUM
5.3
pytorch/serve
addToZip
frontend/archive/src/main/java/org/pytorch/serve/archive/utils/ZipUtils.java
bfb3d42396727614aef625143b4381e64142f9bb
0
Analyze the following code function for security vulnerabilities
@UserHandleAware public @Nullable String getAlwaysOnVpnPackage() { throwIfParentInstance("getAlwaysOnVpnPackage"); if (mService != null) { try { return mService.getAlwaysOnVpnPackageForUser(myUserId()); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAlwaysOnVpnPackage File: core/java/android/app/admin/DevicePolicyManager.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40089
HIGH
7.8
android
getAlwaysOnVpnPackage
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
@Override public String getAliasForColumnSQL(String alias) { return "\"" + alias + "\""; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAliasForColumnSQL File: dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java Repository: dashbuilder The code follows secure coding practices.
[ "CWE-89" ]
CVE-2016-4999
HIGH
7.5
dashbuilder
getAliasForColumnSQL
dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java
8574899e3b6455547b534f570b2330ff772e524b
0
Analyze the following code function for security vulnerabilities
@Deprecated(since = "12.5RC1") public void rename(DocumentReference newDocumentReference, List<DocumentReference> backlinkDocumentReferences, List<DocumentReference> childDocumentReferences, XWikiContext context) throws XWikiException { // TODO: Do all this in a single DB transaction as otherwise the state will be unknown if // something fails in the middle... // TODO: Why do we verify if the document has just been created and not been saved. // If the user is trying to rename to the same name... In that case, simply exits for efficiency. if (isNew() || getDocumentReference().equals(newDocumentReference)) { return; } context.getWiki().renameByCopyAndDelete(this, newDocumentReference, backlinkDocumentReferences, childDocumentReferences, context); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: rename 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
rename
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
public static PatientProgram getPatientProgramByProgramOnDate(Patient patient, Program program, Date date) { List<PatientProgram> patientPrograms = Context.getProgramWorkflowService().getPatientPrograms(patient, program, null, date, date, null, false); if (patientPrograms.size() > 1) { throw new APIException("Simultaneous program enrollments in same program not supported"); } if (patientPrograms.size() == 1) { return patientPrograms.get(0); } else { return null; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPatientProgramByProgramOnDate 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
getPatientProgramByProgramOnDate
api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java
9dcd304688e65c31cac5532fe501b9816ed975ae
0
Analyze the following code function for security vulnerabilities
public void reportActiveChange() { reportChange(ContentResolver.SYNC_OBSERVER_TYPE_ACTIVE); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: reportActiveChange File: services/core/java/com/android/server/content/SyncStorageEngine.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2016-2424
HIGH
7.1
android
reportActiveChange
services/core/java/com/android/server/content/SyncStorageEngine.java
d3383d5bfab296ba3adbc121ff8a7b542bde4afb
0
Analyze the following code function for security vulnerabilities
public Date getCreateTime() { return createTime; }
Vulnerability Classification: - CWE: CWE-79 - CVE: CVE-2023-7171 - Severity: LOW - CVSS Score: 3.3 Description: fix(novel-admin): 友情链接URL格式校验 Function: getCreateTime File: novel-admin/src/main/java/com/java2nb/novel/domain/FriendLinkDO.java Repository: 201206030/novel-plus Fixed Code: public Date getCreateTime() { return createTime; }
[ "CWE-79" ]
CVE-2023-7171
LOW
3.3
201206030/novel-plus
getCreateTime
novel-admin/src/main/java/com/java2nb/novel/domain/FriendLinkDO.java
d6093d8182362422370d7eaf6c53afde9ee45215
1
Analyze the following code function for security vulnerabilities
@Override public void init(FilterConfig filterConfig) throws ServletException { }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: init File: server-core/src/main/java/io/onedev/server/git/GitFilter.java Repository: theonedev/onedev The code follows secure coding practices.
[ "CWE-287" ]
CVE-2022-39205
CRITICAL
9.8
theonedev/onedev
init
server-core/src/main/java/io/onedev/server/git/GitFilter.java
f1e97688e4e19d6de1dfa1d00e04655209d39f8e
0
Analyze the following code function for security vulnerabilities
public boolean isWithState() { return withState; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isWithState 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
isWithState
pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java
22b82ffd702a132d9f09da60362fc6264fc281ae
0
Analyze the following code function for security vulnerabilities
@Override public PendingIntent getPendingIntentActivityAsApp( int requestCode, @NonNull Intent intent, int flags, Bundle options, String ownerPkg, int ownerUid) { return getPendingIntentActivityAsApp(requestCode, new Intent[] { intent }, flags, options, ownerPkg, ownerUid); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPendingIntentActivityAsApp File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21292
MEDIUM
5.5
android
getPendingIntentActivityAsApp
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
public Registration addAttachListener(Command attachListener) { assert attachListener != null; if (attachListeners == null) { attachListeners = new ArrayList<>(1); } attachListeners.add(attachListener); return () -> removeAttachListener(attachListener); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addAttachListener File: flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java Repository: vaadin/flow The code follows secure coding practices.
[ "CWE-200" ]
CVE-2023-25499
MEDIUM
6.5
vaadin/flow
addAttachListener
flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
0
Analyze the following code function for security vulnerabilities
@Override public void createConnection(PhoneAccountHandle connectionManagerPhoneAccount, String id, ConnectionRequest request, boolean isIncoming, boolean isUnknown, Session.Info info) throws RemoteException { Log.i(ConnectionServiceFixture.this, "createConnection --> " + id); if (mConnectionById.containsKey(id)) { throw new RuntimeException("Connection already exists: " + id); } mLatestConnectionId = id; ConnectionInfo c = new ConnectionInfo(); c.connectionManagerPhoneAccount = connectionManagerPhoneAccount; c.id = id; c.request = request; c.isIncoming = isIncoming; c.isUnknown = isUnknown; c.capabilities |= Connection.CAPABILITY_HOLD | Connection.CAPABILITY_SUPPORT_HOLD; c.videoState = request.getVideoState(); c.mockVideoProvider = new MockVideoProvider(); c.videoProvider = c.mockVideoProvider.getInterface(); c.isConferenceCreated = true; mConnectionById.put(id, c); mConnectionServiceDelegateAdapter.createConnection(connectionManagerPhoneAccount, id, request, isIncoming, isUnknown, null /*Session.Info*/); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createConnection File: tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21283
MEDIUM
5.5
android
createConnection
tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
9b41a963f352fdb3da1da8c633d45280badfcb24
0
Analyze the following code function for security vulnerabilities
public void addDatatransferProgressListener( OnDatatransferProgressListener listener, OCUpload ocUpload ) { if (ocUpload == null || listener == null) { return; } String targetKey = buildRemoteName(ocUpload.getAccountName(), ocUpload.getRemotePath()); mBoundListeners.put(targetKey, listener); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addDatatransferProgressListener File: app/src/main/java/com/owncloud/android/files/services/FileUploader.java Repository: nextcloud/android The code follows secure coding practices.
[ "CWE-22" ]
CVE-2022-39210
MEDIUM
5.5
nextcloud/android
addDatatransferProgressListener
app/src/main/java/com/owncloud/android/files/services/FileUploader.java
cd3bd0845a97e1d43daa0607a122b66b0068c751
0
Analyze the following code function for security vulnerabilities
private int reduceConfigLayout(int curLayout, int rotation, float density, int dw, int dh) { // TODO: Multidisplay: for now only use with default display. // Get the app screen size at this rotation. int w = mPolicy.getNonDecorDisplayWidth(dw, dh, rotation); int h = mPolicy.getNonDecorDisplayHeight(dw, dh, rotation); // Compute the screen layout size class for this rotation. int longSize = w; int shortSize = h; if (longSize < shortSize) { int tmp = longSize; longSize = shortSize; shortSize = tmp; } longSize = (int)(longSize/density); shortSize = (int)(shortSize/density); return Configuration.reduceScreenLayout(curLayout, longSize, shortSize); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: reduceConfigLayout File: services/core/java/com/android/server/wm/WindowManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3875
HIGH
7.2
android
reduceConfigLayout
services/core/java/com/android/server/wm/WindowManagerService.java
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
0
Analyze the following code function for security vulnerabilities
protected void startAppOpsSettingsActivity(String pkg, int uid, ArraySet<Integer> ops, ExpandableNotificationRow row) { if (ops.contains(OP_SYSTEM_ALERT_WINDOW)) { if (ops.contains(OP_CAMERA) || ops.contains(OP_RECORD_AUDIO)) { startAppDetailsSettingsActivity(pkg, uid, null, row); } else { Intent intent = new Intent(Settings.ACTION_MANAGE_APP_OVERLAY_PERMISSION); intent.setData(Uri.fromParts("package", pkg, null)); mNotificationActivityStarter.startNotificationGutsIntent(intent, uid, row); } } else if (ops.contains(OP_CAMERA) || ops.contains(OP_RECORD_AUDIO)) { Intent intent = new Intent(Intent.ACTION_MANAGE_APP_PERMISSIONS); intent.putExtra(Intent.EXTRA_PACKAGE_NAME, pkg); mNotificationActivityStarter.startNotificationGutsIntent(intent, uid, row); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: startAppOpsSettingsActivity File: packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationGutsManager.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40098
MEDIUM
5.5
android
startAppOpsSettingsActivity
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationGutsManager.java
d21ffbe8a2eeb2a5e6da7efbb1a0430ba6b022e0
0
Analyze the following code function for security vulnerabilities
public ClickHouseProtocol getProtocol() { return this.protocol; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getProtocol 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
getProtocol
clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNode.java
4f8d9303eb991b39ec7e7e34825241efa082238a
0
Analyze the following code function for security vulnerabilities
@Override public List<DocumentReference> searchDocumentReferences(String parametrizedSqlClause, List<?> parameterValues, XWikiContext context) throws XWikiException { return searchDocumentReferences(parametrizedSqlClause, 0, 0, parameterValues, context); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: searchDocumentReferences 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
searchDocumentReferences
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
@Override @CacheEvict(value = {CacheConstant.SYS_USERS_CACHE}, allEntries = true) public Result<?> resetPassword(String username, String oldpassword, String newpassword, String confirmpassword) { SysUser user = userMapper.getUserByName(username); String passwordEncode = PasswordUtil.encrypt(username, oldpassword, user.getSalt()); if (!user.getPassword().equals(passwordEncode)) { return Result.error("旧密码输入错误!"); } if (oConvertUtils.isEmpty(newpassword)) { return Result.error("新密码不允许为空!"); } if (!newpassword.equals(confirmpassword)) { return Result.error("两次输入密码不一致!"); } String password = PasswordUtil.encrypt(username, newpassword, user.getSalt()); this.userMapper.update(new SysUser().setPassword(password), new LambdaQueryWrapper<SysUser>().eq(SysUser::getId, user.getId())); return Result.ok("密码重置成功!"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: resetPassword File: jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java Repository: jeecgboot/jeecg-boot The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-45208
MEDIUM
4.3
jeecgboot/jeecg-boot
resetPassword
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java
51e2227bfe54f5d67b09411ee9a336750164e73d
0
Analyze the following code function for security vulnerabilities
private boolean isProcessAliveLocked(ProcessRecord proc) { if (proc.pid <= 0) { if (DEBUG_OOM_ADJ) Slog.d(TAG, "Process hasn't started yet: " + proc); return false; } if (proc.procStatFile == null) { proc.procStatFile = "/proc/" + proc.pid + "/stat"; } mProcessStateStatsLongs[0] = 0; if (!readProcFile(proc.procStatFile, PROCESS_STATE_STATS_FORMAT, null, mProcessStateStatsLongs, null)) { if (DEBUG_OOM_ADJ) Slog.d(TAG, "UNABLE TO RETRIEVE STATE FOR " + proc.procStatFile); return false; } final long state = mProcessStateStatsLongs[0]; if (DEBUG_OOM_ADJ) Slog.d(TAG, "RETRIEVED STATE FOR " + proc.procStatFile + ": " + (char)state); return state != 'Z' && state != 'X' && state != 'x' && state != 'K'; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isProcessAliveLocked File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-863" ]
CVE-2018-9492
HIGH
7.2
android
isProcessAliveLocked
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
public int getNativeScrollYForTest() { return mRenderCoordinates.getScrollYPixInt(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getNativeScrollYForTest File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java Repository: chromium The code follows secure coding practices.
[ "CWE-20" ]
CVE-2014-3159
MEDIUM
6.4
chromium
getNativeScrollYForTest
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
98a50b76141f0b14f292f49ce376e6554142d5e2
0
Analyze the following code function for security vulnerabilities
@Override public void addNewIncomingConference(PhoneAccountHandle phoneAccountHandle, Bundle extras) { try { Log.startSession("TSI.aNIC"); synchronized (mLock) { Log.i(this, "Adding new incoming conference with phoneAccountHandle %s", phoneAccountHandle); if (phoneAccountHandle != null && phoneAccountHandle.getComponentName() != null) { if (isCallerSimCallManager(phoneAccountHandle) && TelephonyUtil.isPstnComponentName( phoneAccountHandle.getComponentName())) { Log.v(this, "Allowing call manager to add incoming conference" + " with PSTN handle"); } else { mAppOpsManager.checkPackage( Binder.getCallingUid(), phoneAccountHandle.getComponentName().getPackageName()); // Make sure it doesn't cross the UserHandle boundary enforceUserHandleMatchesCaller(phoneAccountHandle); enforcePhoneAccountIsRegisteredEnabled(phoneAccountHandle, Binder.getCallingUserHandle()); if (isSelfManagedConnectionService(phoneAccountHandle)) { throw new SecurityException("Self-Managed ConnectionServices cannot add " + "adhoc conference calls"); } } long token = Binder.clearCallingIdentity(); try { mCallsManager.processIncomingConference( phoneAccountHandle, extras); } finally { Binder.restoreCallingIdentity(token); } } else { Log.w(this, "Null phoneAccountHandle. Ignoring request to add new" + " incoming conference"); } } } finally { Log.endSession(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addNewIncomingConference File: src/com/android/server/telecom/TelecomServiceImpl.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21394
MEDIUM
5.5
android
addNewIncomingConference
src/com/android/server/telecom/TelecomServiceImpl.java
68dca62035c49e14ad26a54f614199cb29a3393f
0
Analyze the following code function for security vulnerabilities
public void checkout(File baseDir, Revision revision, SubprocessExecutionContext execCtx) { InMemoryStreamConsumer output = ProcessOutputStreamConsumer.inMemoryConsumer(); this.updateTo(output, baseDir, new RevisionContext(revision), execCtx); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkout File: domain/src/main/java/com/thoughtworks/go/config/materials/ScmMaterial.java Repository: gocd The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-39309
MEDIUM
6.5
gocd
checkout
domain/src/main/java/com/thoughtworks/go/config/materials/ScmMaterial.java
691b479f1310034992da141760e9c5d1f5b60e8a
0
Analyze the following code function for security vulnerabilities
@Override public <T> List<T> search(final String sql, int nb, int start, Object[][] whereParams, List<?> parameterValues, XWikiContext inputxcontext) throws XWikiException { if (sql == null) { return null; } return executeRead(inputxcontext, session -> { try { boolean legacyOrdinal = LegacySessionImplementor.containsLegacyOrdinalStatement(sql); String statement = sql; if (whereParams != null) { statement += generateWhereStatement(whereParams, legacyOrdinal ? -1 : CollectionUtils.size(parameterValues.size())); } statement = filterSQL(statement); Query<T> query = session.createQuery(statement); injectParameterListToQuery(legacyOrdinal ? 0 : 1, query, parameterValues); if (whereParams != null) { int parameterIndex = CollectionUtils.size(parameterValues); if (legacyOrdinal) { ++parameterIndex; } for (Object[] whereParam : whereParams) { query.setParameter(parameterIndex++, whereParam[1]); } } if (start > 0) { query.setFirstResult(start); } if (nb > 0) { query.setMaxResults(nb); } List<T> list = new ArrayList<>(); list.addAll(query.list()); return list; } catch (Exception e) { Object[] args = {sql}; throw new XWikiException(XWikiException.MODULE_XWIKI_STORE, XWikiException.ERROR_XWIKI_STORE_HIBERNATE_SEARCH, "Exception while searching documents with sql {0}", e, args); } }); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: search 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
search
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
0