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 java.io.@Nullable Reader getCharacterStream(String columnName) throws SQLException { return getCharacterStream(findColumn(columnName)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCharacterStream File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java Repository: pgjdbc The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-31197
HIGH
8
pgjdbc
getCharacterStream
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
739e599d52ad80f8dcd6efedc6157859b1a9d637
0
Analyze the following code function for security vulnerabilities
@Override public boolean handlePinMmiForPhoneAccount( PhoneAccountHandle accountHandle, String dialString, String callingPackage) { synchronized (mLock) { enforcePermissionOrPrivilegedDialer(MODIFY_PHONE_STATE, callingPackage); if (!isVisibleToCaller(accountHandle)) { Log.d(this, "%s is not visible for the calling user [hMMI]", accountHandle); return false; } // Switch identity so that TelephonyManager checks Telecom's permissions instead. long token = Binder.clearCallingIdentity(); boolean retval = false; try { int subId = mPhoneAccountRegistrar .getSubscriptionIdForPhoneAccount(accountHandle); retval = getTelephonyManager().handlePinMmiForSubscriber(subId, dialString); } finally { Binder.restoreCallingIdentity(token); } return retval; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handlePinMmiForPhoneAccount File: src/com/android/server/telecom/TelecomServiceImpl.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-0847
HIGH
7.2
android
handlePinMmiForPhoneAccount
src/com/android/server/telecom/TelecomServiceImpl.java
2750faaa1ec819eed9acffea7bd3daf867fda444
0
Analyze the following code function for security vulnerabilities
public static AsciiString of(CharSequence name) { if (name instanceof AsciiString) { return of((AsciiString) name); } final String lowerCased = Ascii.toLowerCase(requireNonNull(name, "name")); final AsciiString cached = map.get(lowerCased); return cached != null ? cached : AsciiString.cached(lowerCased); }
Vulnerability Classification: - CWE: CWE-74 - CVE: CVE-2019-16771 - Severity: MEDIUM - CVSS Score: 5.0 Description: Merge pull request from GHSA-35fr-h7jr-hh86 Motivation: An `HttpService` can produce a malformed HTTP response when a user specified a malformed HTTP header values, such as: ResponseHeaders.of(HttpStatus.OK "my-header", "foo\r\nbad-header: bar"); Modification: - Add strict header value validation to `HttpHeadersBase` - Add strict header name validation to `HttpHeaderNames.of()`, which is used by `HttpHeadersBase`. Result: - It is not possible anymore to send a bad header value which can be misused for sending additional headers or injecting arbitrary content. Function: of File: core/src/main/java/com/linecorp/armeria/common/HttpHeaderNames.java Repository: line/armeria Fixed Code: public static AsciiString of(CharSequence name) { if (name instanceof AsciiString) { return of((AsciiString) name); } final String lowerCased = Ascii.toLowerCase(requireNonNull(name, "name")); final AsciiString cached = map.get(lowerCased); if (cached != null) { return cached; } return validate(AsciiString.cached(lowerCased)); }
[ "CWE-74" ]
CVE-2019-16771
MEDIUM
5
line/armeria
of
core/src/main/java/com/linecorp/armeria/common/HttpHeaderNames.java
b597f7a865a527a84ee3d6937075cfbb4470ed20
1
Analyze the following code function for security vulnerabilities
public void clearAccessibilityCache() { Message message = mCaller.obtainMessage(DO_CLEAR_ACCESSIBILITY_CACHE); mCaller.sendMessage(message); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: clearAccessibilityCache File: core/java/android/accessibilityservice/AccessibilityService.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2016-3923
MEDIUM
4.3
android
clearAccessibilityCache
core/java/android/accessibilityservice/AccessibilityService.java
5f256310187b4ff2f13a7abb9afed9126facd7bc
0
Analyze the following code function for security vulnerabilities
private void notifyMenuStateChangeFinish(int menuState) { mMenuState = menuState; mController.onMenuStateChangeFinish(menuState); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: notifyMenuStateChangeFinish File: libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuView.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40123
MEDIUM
5.5
android
notifyMenuStateChangeFinish
libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuView.java
7212a4bec2d2f1a74fa54a12a04255d6a183baa9
0
Analyze the following code function for security vulnerabilities
@Override public void transfer(String callId, Uri number, boolean isConfirmationRequired, Session.Info info) throws RemoteException { }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: transfer 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
transfer
tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
9b41a963f352fdb3da1da8c633d45280badfcb24
0
Analyze the following code function for security vulnerabilities
public static WifiScanner.PnoSettings.PnoNetwork createPnoNetwork( WifiConfiguration config) { WifiScanner.PnoSettings.PnoNetwork pnoNetwork = new WifiScanner.PnoSettings.PnoNetwork(config.SSID); if (config.hiddenSSID) { pnoNetwork.flags |= WifiScanner.PnoSettings.PnoNetwork.FLAG_DIRECTED_SCAN; } pnoNetwork.flags |= WifiScanner.PnoSettings.PnoNetwork.FLAG_A_BAND; pnoNetwork.flags |= WifiScanner.PnoSettings.PnoNetwork.FLAG_G_BAND; if (config.isSecurityType(WifiConfiguration.SECURITY_TYPE_PSK)) { pnoNetwork.authBitField |= WifiScanner.PnoSettings.PnoNetwork.AUTH_CODE_PSK; } else if (config.isSecurityType(WifiConfiguration.SECURITY_TYPE_EAP)) { pnoNetwork.authBitField |= WifiScanner.PnoSettings.PnoNetwork.AUTH_CODE_EAPOL; } else { pnoNetwork.authBitField |= WifiScanner.PnoSettings.PnoNetwork.AUTH_CODE_OPEN; } return pnoNetwork; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createPnoNetwork File: service/java/com/android/server/wifi/WifiConfigurationUtil.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21252
MEDIUM
5.5
android
createPnoNetwork
service/java/com/android/server/wifi/WifiConfigurationUtil.java
50b08ee30e04d185e5ae97a5f717d436fd5a90f3
0
Analyze the following code function for security vulnerabilities
boolean isClientLocal() { return mClient instanceof IWindow.Stub; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isClientLocal 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
isClientLocal
services/core/java/com/android/server/wm/WindowState.java
7428962d3b064ce1122809d87af65099d1129c9e
0
Analyze the following code function for security vulnerabilities
private JsonValue readValue(int depth) throws IOException, ParseException { if(current==123) { ++depth; } /* The following has been refrenced for the resolution of the vulnerability: https://github.com/FasterXML/jackson-databind/commit/fcfc4998ec23f0b1f7f8a9521c2b317b6c25892b */ if(depth>MAX_DEPTH) { throw error("The passed json has exhausted the depth supported of "+MAX_DEPTH+"."); } switch(current) { case '\'': case '"': return readString(); case '[': return readArray(depth); case '{': return readObject(false, depth); default: return readTfnns(); } }
Vulnerability Classification: - CWE: CWE-787 - CVE: CVE-2023-34620 - Severity: HIGH - CVSS Score: 7.5 Description: general fix Function: readValue File: src/main/org/hjson/HjsonParser.java Repository: hjson/hjson-java Fixed Code: private JsonValue readValue(int depth) throws IOException, ParseException { /* The following has been refrenced for the resolution of the vulnerability: https://github.com/FasterXML/jackson-databind/commit/fcfc4998ec23f0b1f7f8a9521c2b317b6c25892b */ if(depth>MAX_DEPTH) { throw error("The passed json has exhausted the depth supported of "+MAX_DEPTH+"."); } switch(current) { case '\'': case '"': return readString(); case '[': return readArray(depth + 1); case '{': return readObject(false, depth + 1); default: return readTfnns(); } }
[ "CWE-787" ]
CVE-2023-34620
HIGH
7.5
hjson/hjson-java
readValue
src/main/org/hjson/HjsonParser.java
00e3b1325cb6c2b80b347dbec9181fd17ce0a599
1
Analyze the following code function for security vulnerabilities
@CalledByNative public boolean loadIfNeeded() { return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: loadIfNeeded File: chrome/android/java/src/org/chromium/chrome/browser/Tab.java Repository: chromium The code follows secure coding practices.
[ "CWE-20" ]
CVE-2014-3159
MEDIUM
6.4
chromium
loadIfNeeded
chrome/android/java/src/org/chromium/chrome/browser/Tab.java
98a50b76141f0b14f292f49ce376e6554142d5e2
0
Analyze the following code function for security vulnerabilities
void dumpLastANRLocked(PrintWriter pw) { pw.println("WINDOW MANAGER LAST ANR (dumpsys window lastanr)"); if (mLastANRState == null) { pw.println(" <no ANR has occurred since boot>"); } else { pw.println(mLastANRState); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: dumpLastANRLocked 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
dumpLastANRLocked
services/core/java/com/android/server/wm/WindowManagerService.java
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
0
Analyze the following code function for security vulnerabilities
public ApiClient setServers(List<ServerConfiguration> servers) { this.servers = servers; updateBasePath(); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setServers File: samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/ApiClient.java Repository: OpenAPITools/openapi-generator The code follows secure coding practices.
[ "CWE-668" ]
CVE-2021-21430
LOW
2.1
OpenAPITools/openapi-generator
setServers
samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
@Override public boolean isBrowserReusable(SubversionSCM x, SubversionSCM y) { ModuleLocation[] xl = x.getLocations(), yl = y.getLocations(); if (xl.length != yl.length) return false; for (int i = 0; i < xl.length; i++) if (!xl[i].getURL().equals(yl[i].getURL())) return false; return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isBrowserReusable 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
isBrowserReusable
src/main/java/hudson/scm/SubversionSCM.java
7d4562d6f7e40de04bbe29577b51c79f07d05ba6
0
Analyze the following code function for security vulnerabilities
private List<ApiMethodUrlDTO> getMethodUrlDTOByHashTreeJsonObj(JSONObject obj) { List<ApiMethodUrlDTO> returnList = new ArrayList<>(); if (obj != null && obj.containsKey("hashTree")) { JSONArray hashArr = obj.getJSONArray("hashTree"); for (int i = 0; i < hashArr.size(); i++) { JSONObject elementObj = hashArr.getJSONObject(i); if (elementObj == null) { continue; } if (elementObj.containsKey("url") && elementObj.containsKey("method")) { String url = elementObj.getString("url"); String method = elementObj.getString("method"); ApiMethodUrlDTO dto = new ApiMethodUrlDTO(url, method); if (!returnList.contains(dto)) { returnList.add(dto); } } if (elementObj.containsKey("path") && elementObj.containsKey("method")) { String path = elementObj.getString("path"); String method = elementObj.getString("method"); ApiMethodUrlDTO dto = new ApiMethodUrlDTO(path, method); if (!returnList.contains(dto)) { returnList.add(dto); } } if (elementObj.containsKey("id") && elementObj.containsKey("refType")) { String refType = elementObj.getString("refType"); String id = elementObj.getString("id"); if (StringUtils.equals("CASE", refType)) { ApiDefinition apiDefinition = apiTestCaseService.findApiUrlAndMethodById(id); if (apiDefinition != null) { ApiMethodUrlDTO dto = new ApiMethodUrlDTO(apiDefinition.getPath(), apiDefinition.getMethod()); if (!returnList.contains(dto)) { returnList.add(dto); } } } else if (StringUtils.equals("API", refType)) { ApiDefinition apiDefinition = apiDefinitionService.selectUrlAndMethodById(id); if (apiDefinition != null) { ApiMethodUrlDTO dto = new ApiMethodUrlDTO(apiDefinition.getPath(), apiDefinition.getMethod()); if (!returnList.contains(dto)) { returnList.add(dto); } } } } List<ApiMethodUrlDTO> stepUrlList = this.getMethodUrlDTOByHashTreeJsonObj(elementObj); if (CollectionUtils.isNotEmpty(stepUrlList)) { Collection unionList = CollectionUtils.union(returnList, stepUrlList); returnList = new ArrayList<>(unionList); } } } return returnList; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getMethodUrlDTOByHashTreeJsonObj File: backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java Repository: metersphere The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2021-45789
MEDIUM
6.5
metersphere
getMethodUrlDTOByHashTreeJsonObj
backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java
d74e02cdff47cdf7524d305d098db6ffb7f61b47
0
Analyze the following code function for security vulnerabilities
private void sendSupplicantConnectionChangedBroadcast(boolean connected) { Intent intent = new Intent(WifiManager.SUPPLICANT_CONNECTION_CHANGE_ACTION); intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT); intent.putExtra(WifiManager.EXTRA_SUPPLICANT_CONNECTED, connected); String summary = "broadcast=SUPPLICANT_CONNECTION_CHANGE_ACTION" + " EXTRA_SUPPLICANT_CONNECTED=" + connected; if (mVerboseLoggingEnabled) Log.d(getTag(), "Queuing " + summary); mBroadcastQueue.queueOrSendBroadcast( mClientModeManager, () -> { if (mVerboseLoggingEnabled) Log.d(getTag(), "Sending " + summary); mContext.sendBroadcastAsUser(intent, UserHandle.ALL); }); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sendSupplicantConnectionChangedBroadcast File: service/java/com/android/server/wifi/ClientModeImpl.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21242
CRITICAL
9.8
android
sendSupplicantConnectionChangedBroadcast
service/java/com/android/server/wifi/ClientModeImpl.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
@Override public void sendMessageToClientModeImpl(Message msg) { sendMessage(msg); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sendMessageToClientModeImpl File: service/java/com/android/server/wifi/ClientModeImpl.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21242
CRITICAL
9.8
android
sendMessageToClientModeImpl
service/java/com/android/server/wifi/ClientModeImpl.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
public String getKey() { if (this.keyCache == null) { this.keyCache = getUidStringEntityReferenceSerializer().serialize(getDocumentReferenceWithLocale()); } return this.keyCache; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getKey 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
getKey
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
db3d1c62fc5fb59fefcda3b86065d2d362f55164
0
Analyze the following code function for security vulnerabilities
public void checkApiScenarioReferenceId() { List<ApiScenarioWithBLOBs> scenarioNoRefs = extApiScenarioMapper.selectByNoReferenceId(); for (ApiScenarioWithBLOBs model : scenarioNoRefs) { apiScenarioReferenceIdService.saveByApiScenario(model); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkApiScenarioReferenceId File: backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java Repository: metersphere The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2021-45789
MEDIUM
6.5
metersphere
checkApiScenarioReferenceId
backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java
d74e02cdff47cdf7524d305d098db6ffb7f61b47
0
Analyze the following code function for security vulnerabilities
public boolean hideStatusBarIconsWhenExpanded() { return mNotificationPanel.hideStatusBarIconsWhenExpanded(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hideStatusBarIconsWhenExpanded 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
hideStatusBarIconsWhenExpanded
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
static void enforceNotIsolatedCaller(String caller) { if (UserHandle.isIsolated(Binder.getCallingUid())) { throw new SecurityException("Isolated process not allowed to call " + caller); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: enforceNotIsolatedCaller 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
enforceNotIsolatedCaller
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
1120bc7e511710b1b774adf29ba47106292365e7
0
Analyze the following code function for security vulnerabilities
public JSONArray put(int index, int value) throws JSONException { put(index, Integer.valueOf(value)); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: put File: src/main/java/org/codehaus/jettison/json/JSONArray.java Repository: jettison-json/jettison The code follows secure coding practices.
[ "CWE-674", "CWE-787" ]
CVE-2022-45693
HIGH
7.5
jettison-json/jettison
put
src/main/java/org/codehaus/jettison/json/JSONArray.java
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
0
Analyze the following code function for security vulnerabilities
@Override public void onTrustChanged(int userId) { if (userId == KeyguardUpdateMonitor.getCurrentUser()) { synchronized (KeyguardViewMediator.this) { notifyTrustedChangedLocked(mUpdateMonitor.getUserHasTrust(userId)); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onTrustChanged 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
onTrustChanged
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
d18d8b350756b0e89e051736c1f28744ed31e93a
0
Analyze the following code function for security vulnerabilities
private PostgresClient postgresClient(String tenant) { try { postgresClient = PostgresClient.getInstance(vertx, tenant); } catch (Throwable e) { setRootLevel(Level.DEBUG); throw e; } return postgresClient; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: postgresClient 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
postgresClient
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
public static HtmlForm getHtmlFormFromUiResource(ResourceFactory resourceFactory, FormService formService, HtmlFormEntryService htmlFormEntryService, String providerAndPath) throws IOException { return getHtmlFormFromUiResource(resourceFactory, formService, htmlFormEntryService, providerAndPath, (Encounter) null); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getHtmlFormFromUiResource File: api/src/main/java/org/openmrs/module/htmlformentryui/HtmlFormUtil.java Repository: openmrs/openmrs-module-htmlformentryui The code follows secure coding practices.
[ "CWE-79" ]
CVE-2021-4284
MEDIUM
6.1
openmrs/openmrs-module-htmlformentryui
getHtmlFormFromUiResource
api/src/main/java/org/openmrs/module/htmlformentryui/HtmlFormUtil.java
811990972ea07649ae33c4b56c61c3b520895f07
0
Analyze the following code function for security vulnerabilities
public int getFetchSize() throws SQLException { checkClosed(); if (adaptiveFetch) { return lastUsedFetchSize; } else { return fetchSize; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getFetchSize File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java Repository: pgjdbc The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-31197
HIGH
8
pgjdbc
getFetchSize
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
739e599d52ad80f8dcd6efedc6157859b1a9d637
0
Analyze the following code function for security vulnerabilities
protected JsonDeserializer<?> _findCustomCollectionLikeDeserializer(CollectionLikeType type, DeserializationConfig config, BeanDescription beanDesc, TypeDeserializer elementTypeDeserializer, JsonDeserializer<?> elementDeserializer) throws JsonMappingException { for (Deserializers d : _factoryConfig.deserializers()) { JsonDeserializer<?> deser = d.findCollectionLikeDeserializer(type, config, beanDesc, elementTypeDeserializer, elementDeserializer); if (deser != null) { return deser; } } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: _findCustomCollectionLikeDeserializer File: src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java Repository: FasterXML/jackson-databind The code follows secure coding practices.
[ "CWE-502" ]
CVE-2019-16942
HIGH
7.5
FasterXML/jackson-databind
_findCustomCollectionLikeDeserializer
src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
0
Analyze the following code function for security vulnerabilities
public void removeHeaderRow(int index) { getHeader().removeRow(index); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeHeaderRow File: server/src/main/java/com/vaadin/ui/Grid.java Repository: vaadin/framework The code follows secure coding practices.
[ "CWE-79" ]
CVE-2019-25028
MEDIUM
4.3
vaadin/framework
removeHeaderRow
server/src/main/java/com/vaadin/ui/Grid.java
c40bed109c3723b38694ed160ea647fef5b28593
0
Analyze the following code function for security vulnerabilities
public void init(byte[] P) { try { mac.init(new SecretKeySpec(P, macAlgorithm)); } catch (InvalidKeyException e) { throw new RuntimeException(e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: init File: src/main/java/net/lingala/zip4j/crypto/PBKDF2/MacBasedPRF.java Repository: srikanth-lingala/zip4j The code follows secure coding practices.
[ "CWE-346" ]
CVE-2023-22899
MEDIUM
5.9
srikanth-lingala/zip4j
init
src/main/java/net/lingala/zip4j/crypto/PBKDF2/MacBasedPRF.java
ddd8fdc8ad0583eb4a6172dc86c72c881485c55b
0
Analyze the following code function for security vulnerabilities
private static int hashCodeAsciiSanitizeInt(CharSequence value, int offset) { if (BIG_ENDIAN_NATIVE_ORDER) { // mimic a unsafe.getInt call on a big endian machine return (value.charAt(offset + 3) & 0x1f) | (value.charAt(offset + 2) & 0x1f) << 8 | (value.charAt(offset + 1) & 0x1f) << 16 | (value.charAt(offset) & 0x1f) << 24; } return (value.charAt(offset + 3) & 0x1f) << 24 | (value.charAt(offset + 2) & 0x1f) << 16 | (value.charAt(offset + 1) & 0x1f) << 8 | (value.charAt(offset) & 0x1f); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hashCodeAsciiSanitizeInt File: common/src/main/java/io/netty/util/internal/PlatformDependent.java Repository: netty The code follows secure coding practices.
[ "CWE-668", "CWE-378", "CWE-379" ]
CVE-2022-24823
LOW
1.9
netty
hashCodeAsciiSanitizeInt
common/src/main/java/io/netty/util/internal/PlatformDependent.java
185f8b2756a36aaa4f973f1a2a025e7d981823f1
0
Analyze the following code function for security vulnerabilities
private List<SyncInfo> getCurrentSyncsLocked(int userId) { ArrayList<SyncInfo> syncs = mCurrentSyncs.get(userId); if (syncs == null) { syncs = new ArrayList<SyncInfo>(); mCurrentSyncs.put(userId, syncs); } return syncs; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCurrentSyncsLocked 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
getCurrentSyncsLocked
services/core/java/com/android/server/content/SyncStorageEngine.java
d3383d5bfab296ba3adbc121ff8a7b542bde4afb
0
Analyze the following code function for security vulnerabilities
@Override public void onReceive(Context context, Intent intent) { if (Intent.ACTION_USER_SWITCHED.equals(intent.getAction())) { // tickle the settings observer: this first ensures that we're // observing the relevant settings for the newly-active user, // and then updates our own bookkeeping based on the now- // current user. mSettingsObserver.onChange(false); // force a re-application of focused window sysui visibility. // the window may never have been shown for this user // e.g. the keyguard when going through the new-user setup flow synchronized (mWindowManagerFuncs.getWindowManagerLock()) { mLastSystemUiFlags = 0; updateSystemUiVisibilityLw(); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onReceive File: policy/src/com/android/internal/policy/impl/PhoneWindowManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-0812
MEDIUM
6.6
android
onReceive
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
84669ca8de55d38073a0dcb01074233b0a417541
0
Analyze the following code function for security vulnerabilities
@Override public void showRepostFormWarningDialog(final ContentViewCore contentViewCore) { RepostFormWarningDialog warningDialog = new RepostFormWarningDialog( new Runnable() { @Override public void run() { contentViewCore.cancelPendingReload(); } }, new Runnable() { @Override public void run() { contentViewCore.continuePendingReload(); } }); Activity activity = (Activity) mContext; warningDialog.show(activity.getFragmentManager(), null); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: showRepostFormWarningDialog File: chrome/android/java/src/org/chromium/chrome/browser/Tab.java Repository: chromium The code follows secure coding practices.
[ "CWE-20" ]
CVE-2014-3159
MEDIUM
6.4
chromium
showRepostFormWarningDialog
chrome/android/java/src/org/chromium/chrome/browser/Tab.java
98a50b76141f0b14f292f49ce376e6554142d5e2
0
Analyze the following code function for security vulnerabilities
private RetentionPolicies getRetentionPolicies(TopicName topicName, TopicPolicies topicPolicies) { RetentionPolicies retentionPolicies = topicPolicies.getRetentionPolicies(); if (retentionPolicies == null){ try { retentionPolicies = getNamespacePoliciesAsync(topicName.getNamespaceObject()) .thenApply(policies -> policies.retention_policies) .get(1L, TimeUnit.SECONDS); } catch (Exception e) { throw new RestException(e); } } return retentionPolicies; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRetentionPolicies File: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java Repository: apache/pulsar The code follows secure coding practices.
[ "CWE-863" ]
CVE-2021-41571
MEDIUM
4
apache/pulsar
getRetentionPolicies
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
5b35bb81c31f1bc2ad98c9fde5b39ec68110ca52
0
Analyze the following code function for security vulnerabilities
@Override public void handleResultRows(Query fromQuery, Field[] fields, List<Tuple> tuples, @Nullable ResultCursor cursor) { PgResultSet.this.rows = tuples; PgResultSet.this.cursor = cursor; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handleResultRows File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java Repository: pgjdbc The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-31197
HIGH
8
pgjdbc
handleResultRows
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
739e599d52ad80f8dcd6efedc6157859b1a9d637
0
Analyze the following code function for security vulnerabilities
public String getProfileURL() { return profileURL; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getProfileURL File: base/common/src/main/java/com/netscape/certsrv/profile/ProfileDataInfo.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
getProfileURL
base/common/src/main/java/com/netscape/certsrv/profile/ProfileDataInfo.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
public @NotNull SshdConfigBuilder with(String key, String value) { sshdConfig += key + " " + value + "\n"; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: with File: src/itest/java/com/hierynomus/sshj/SshdContainer.java Repository: hierynomus/sshj The code follows secure coding practices.
[ "CWE-354" ]
CVE-2023-48795
MEDIUM
5.9
hierynomus/sshj
with
src/itest/java/com/hierynomus/sshj/SshdContainer.java
94fcc960e0fb198ddec0f7efc53f95ac627fe083
0
Analyze the following code function for security vulnerabilities
private static void fireStop(final Jooby app, final Logger log, final List<Throwing.Consumer<Registry>> onStop) { // stop services onStop.forEach(c -> Try.run(() -> c.accept(app)) .onFailure(x -> log.error("shutdown of {} resulted in error", c, x))); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: fireStop File: jooby/src/main/java/org/jooby/Jooby.java Repository: jooby-project/jooby The code follows secure coding practices.
[ "CWE-22" ]
CVE-2020-7647
MEDIUM
5
jooby-project/jooby
fireStop
jooby/src/main/java/org/jooby/Jooby.java
34f526028e6cd0652125baa33936ffb6a8a4a009
0
Analyze the following code function for security vulnerabilities
public int getResponseCode() { return mResponseCode; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getResponseCode File: core/java/android/service/gatekeeper/GateKeeperResponse.java Repository: android The code follows secure coding practices.
[ "CWE-502" ]
CVE-2017-0806
HIGH
9.3
android
getResponseCode
core/java/android/service/gatekeeper/GateKeeperResponse.java
b87c968e5a41a1a09166199bf54eee12608f3900
0
Analyze the following code function for security vulnerabilities
private boolean isJarFormat(File jarFile) throws IOException { JarInputStream jarIn = new JarInputStream(new FileInputStream(jarFile)); JarEntry entry = jarIn.getNextJarEntry(); // the next entry should be JAR_FORMAT entry = jarIn.getNextJarEntry(); String format = entry.getName(); jarIn.close(); if (format.equalsIgnoreCase(ArchivePlugin.JAR_VERSION_TAG)) { return true; } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isJarFormat File: Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/archive/ArchivePlugin.java Repository: NationalSecurityAgency/ghidra The code follows secure coding practices.
[ "CWE-22" ]
CVE-2019-13623
MEDIUM
6.8
NationalSecurityAgency/ghidra
isJarFormat
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/archive/ArchivePlugin.java
6c0171c9200b4490deb94abf3c92d1b3da59f9bf
0
Analyze the following code function for security vulnerabilities
int size() { if (refsn != null) return refsn.size(); else return sizep; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: size File: java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java Repository: pdftk-java/pdftk The code follows secure coding practices.
[ "CWE-835" ]
CVE-2021-37819
HIGH
7.5
pdftk-java/pdftk
size
java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
9b0cbb76c8434a8505f02ada02a94263dcae9247
0
Analyze the following code function for security vulnerabilities
@Override public void toJson(Map json, Revision revision) { json.put("folder", getFolder() == null ? "" : getFolder()); json.put("scmType", getTypeForDisplay()); json.put("location", getLocation()); if (!CaseInsensitiveString.isBlank(getName())) { json.put("materialName", CaseInsensitiveString.str(getName())); } json.put("action", "Modified"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toJson 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
toJson
domain/src/main/java/com/thoughtworks/go/config/materials/ScmMaterial.java
691b479f1310034992da141760e9c5d1f5b60e8a
0
Analyze the following code function for security vulnerabilities
public String tags() { return "tags"; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: tags File: web/src/main/java/com/zrlog/web/controller/blog/ArticleController.java Repository: 94fzb/zrlog The code follows secure coding practices.
[ "CWE-79" ]
CVE-2020-21316
MEDIUM
4.3
94fzb/zrlog
tags
web/src/main/java/com/zrlog/web/controller/blog/ArticleController.java
b921c1ae03b8290f438657803eee05226755c941
0
Analyze the following code function for security vulnerabilities
void settingsGlobalPutString(String name, String value) { Settings.Global.putString(mContext.getContentResolver(), name, value); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: settingsGlobalPutString 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
settingsGlobalPutString
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
public HttpConnection connection() { return httpConnection; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: connection File: src/main/java/jodd/http/HttpRequest.java Repository: oblac/jodd-http The code follows secure coding practices.
[ "CWE-74" ]
CVE-2022-29631
MEDIUM
5
oblac/jodd-http
connection
src/main/java/jodd/http/HttpRequest.java
e50f573c8f6a39212ade68c6eb1256b2889fa8a6
0
Analyze the following code function for security vulnerabilities
@Override public List<String> listPolicyExemptApps() { CallerIdentity caller = getCallerIdentity(); Preconditions.checkCallAuthorization( hasCallingOrSelfPermission(permission.MANAGE_DEVICE_ADMINS) || isDefaultDeviceOwner(caller) || isProfileOwner(caller)); return listPolicyExemptAppsUnchecked(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: listPolicyExemptApps 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
listPolicyExemptApps
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
public void rollbackToPreviousVersion(String space, String page) { rollBackTo(space, page, "previous"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: rollbackToPreviousVersion 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
rollbackToPreviousVersion
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
protected Long checkoutMultiSelectValue(Field field, Cell cell) { long mVal = 0; for (String s : cell.asString().split(MVAL_SPLIT)) { mVal += MultiSelectManager.instance.findMultiItemByLabel(s.trim(), field); } return mVal == 0 ? null : mVal; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkoutMultiSelectValue File: src/main/java/com/rebuild/core/service/dataimport/RecordCheckout.java Repository: getrebuild/rebuild The code follows secure coding practices.
[ "CWE-89" ]
CVE-2023-1495
MEDIUM
6.5
getrebuild/rebuild
checkoutMultiSelectValue
src/main/java/com/rebuild/core/service/dataimport/RecordCheckout.java
c9474f84e5f376dd2ade2078e3039961a9425da7
0
Analyze the following code function for security vulnerabilities
@Override public void setImportance(String pkg, int uid, int importance) { enforceSystemOrSystemUI("Caller not system or systemui"); setNotificationsEnabledForPackageImpl(pkg, uid, importance != NotificationListenerService.Ranking.IMPORTANCE_NONE); mRankingHelper.setImportance(pkg, uid, importance); savePolicyFile(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setImportance File: services/core/java/com/android/server/notification/NotificationManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2016-3884
MEDIUM
4.3
android
setImportance
services/core/java/com/android/server/notification/NotificationManagerService.java
61e9103b5725965568e46657f4781dd8f2e5b623
0
Analyze the following code function for security vulnerabilities
@Override public void dispose() { if (executionJob != null && !executionJob.isCancelled()) { executionJob.cancel(true); executionJob = null; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: dispose File: bundles/org.openhab.binding.exec/src/main/java/org/openhab/binding/exec/internal/handler/ExecHandler.java Repository: openhab/openhab-addons The code follows secure coding practices.
[ "CWE-863" ]
CVE-2020-5242
HIGH
9.3
openhab/openhab-addons
dispose
bundles/org.openhab.binding.exec/src/main/java/org/openhab/binding/exec/internal/handler/ExecHandler.java
4c4cb664f2e2c3866aadf117d22fb54aa8dd0031
0
Analyze the following code function for security vulnerabilities
private int replaceFragment(Fragment fragment, int transition, String tag) { FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction(); fragmentTransaction.setTransition(transition); fragmentTransaction.replace(R.id.wait, fragment, tag); final int transactionId = fragmentTransaction.commitAllowingStateLoss(); return transactionId; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: replaceFragment 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
replaceFragment
src/com/android/mail/compose/ComposeActivity.java
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
0
Analyze the following code function for security vulnerabilities
protected Object mapObject(JsonParser p, DeserializationContext ctxt, Map<Object,Object> m) throws IOException { JsonToken t = p.currentToken(); if (t == JsonToken.START_OBJECT) { t = p.nextToken(); } if (t == JsonToken.END_OBJECT) { return m; } // NOTE: we are guaranteed to point to FIELD_NAME String key = p.currentName(); do { p.nextToken(); // and possibly recursive merge here Object old = m.get(key); Object newV; if (old != null) { newV = deserialize(p, ctxt, old); } else { newV = deserialize(p, ctxt); } if (newV != old) { m.put(key, newV); } } while ((key = p.nextFieldName()) != null); return m; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: mapObject File: src/main/java/com/fasterxml/jackson/databind/deser/std/UntypedObjectDeserializer.java Repository: FasterXML/jackson-databind The code follows secure coding practices.
[ "CWE-787" ]
CVE-2020-36518
MEDIUM
5
FasterXML/jackson-databind
mapObject
src/main/java/com/fasterxml/jackson/databind/deser/std/UntypedObjectDeserializer.java
8238ab41d0350fb915797c89d46777b4496b74fd
0
Analyze the following code function for security vulnerabilities
@Override public SessionListener getSessionListenerProxy() { return sessionListenerProxy; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSessionListenerProxy File: sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java Repository: apache/mina-sshd The code follows secure coding practices.
[ "CWE-354" ]
CVE-2023-48795
MEDIUM
5.9
apache/mina-sshd
getSessionListenerProxy
sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
6b0fd46f64bcb75eeeee31d65f10242660aad7c1
0
Analyze the following code function for security vulnerabilities
private int getRootTaskId() { final Task rootTask = getRootTask(); if (rootTask == null) { return INVALID_TASK_ID; } return rootTask.mTaskId; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRootTaskId 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
getRootTaskId
services/core/java/com/android/server/wm/WindowState.java
7428962d3b064ce1122809d87af65099d1129c9e
0
Analyze the following code function for security vulnerabilities
@Override public ResourceRenderer getStyleRenderer() { return styleRenderer; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getStyleRenderer 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
getStyleRenderer
framework/impl/src/main/java/org/ajax4jsf/resource/ResourceBuilderImpl.java
6cbad2a6dcb70d3e33a6ce5879b1a3ad79eb1aec
0
Analyze the following code function for security vulnerabilities
public BaseClass getGlobalRightsClass(XWikiContext context) throws XWikiException { return getRightsClass("XWikiGlobalRights", context); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getGlobalRightsClass 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
getGlobalRightsClass
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
f9a677408ffb06f309be46ef9d8df1915d9099a4
0
Analyze the following code function for security vulnerabilities
public boolean inputDispatchingTimedOut(final ProcessRecord proc, final ActivityRecord activity, final ActivityRecord parent, final boolean aboveSystem, String reason) { if (checkCallingPermission(android.Manifest.permission.FILTER_EVENTS) != PackageManager.PERMISSION_GRANTED) { throw new SecurityException("Requires permission " + android.Manifest.permission.FILTER_EVENTS); } final String annotation; if (reason == null) { annotation = "Input dispatching timed out"; } else { annotation = "Input dispatching timed out (" + reason + ")"; } if (proc != null) { synchronized (this) { if (proc.debugging) { return false; } if (mDidDexOpt) { // Give more time since we were dexopting. mDidDexOpt = false; return false; } if (proc.instrumentationClass != null) { Bundle info = new Bundle(); info.putString("shortMsg", "keyDispatchingTimedOut"); info.putString("longMsg", annotation); finishInstrumentationLocked(proc, Activity.RESULT_CANCELED, info); return true; } } mHandler.post(new Runnable() { @Override public void run() { mAppErrors.appNotResponding(proc, activity, parent, aboveSystem, annotation); } }); } return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: inputDispatchingTimedOut File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3912
HIGH
9.3
android
inputDispatchingTimedOut
services/core/java/com/android/server/am/ActivityManagerService.java
6c049120c2d749f0c0289d822ec7d0aa692f55c5
0
Analyze the following code function for security vulnerabilities
@Override public Loggable<String, LogWatch> withLogWaitTimeout(Integer logWaitTimeout) { return new PodOperationsImpl(getContext().withLogWaitTimeout(logWaitTimeout)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: withLogWaitTimeout File: kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/PodOperationsImpl.java Repository: fabric8io/kubernetes-client The code follows secure coding practices.
[ "CWE-22" ]
CVE-2021-20218
MEDIUM
5.8
fabric8io/kubernetes-client
withLogWaitTimeout
kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/PodOperationsImpl.java
325d67cc80b73f049a5d0cea4917c1f2709a8d86
0
Analyze the following code function for security vulnerabilities
public String loadResource(String filePath) { if (filePath == null) { return ""; } if (FILE_CACHE.containsKey(filePath)) { return FILE_CACHE.get(filePath); } String template = ""; try (InputStream in = getClass().getClassLoader().getResourceAsStream(filePath)) { try (Scanner s = new Scanner(in).useDelimiter("\\A")) { template = s.hasNext() ? s.next() : ""; if (!StringUtils.isBlank(template)) { FILE_CACHE.put(filePath, template); } } } catch (Exception ex) { logger.info("Couldn't load resource '{}'.", filePath); } return template; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: loadResource 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
loadResource
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
62a0e92e1486ddc17676a7ead2c07ff653d167ce
0
Analyze the following code function for security vulnerabilities
@Override public void checkAccess(ThreadGroup g) { if (RobocodeProperties.isSecurityOff()) { return; } Thread c = Thread.currentThread(); if (isSafeThread(c)) { return; } super.checkAccess(g); final ThreadGroup cg = c.getThreadGroup(); if (cg == null) { // What the heck is going on here? JDK 1.3 is sending me a dead thread. // This crashes the entire jvm if I don't return here. return; } // Bug fix #382 Unable to run robocode.bat -- Access Control Exception if ("SeedGenerator Thread".equals(c.getName()) && "SeedGenerator ThreadGroup".equals(cg.getName())) { return; // The SeedGenerator might create a thread, which needs to be silently ignored } IHostedThread robotProxy = threadManager.getLoadedOrLoadingRobotProxy(c); if (robotProxy == null) { throw new AccessControlException("Preventing " + c.getName() + " from access to " + g.getName()); } if (cg.activeCount() > 5) { String message = "Robots are only allowed to create up to 5 threads!"; robotProxy.punishSecurityViolation(message); throw new AccessControlException(message); } }
Vulnerability Classification: - CWE: CWE-862 - CVE: CVE-2019-10648 - Severity: HIGH - CVSS Score: 7.5 Description: Bug-406: DNS interaction is not blocked by Robocode's security manager + test(s) to verify the fix Function: checkAccess File: robocode.host/src/main/java/net/sf/robocode/host/security/RobocodeSecurityManager.java Repository: robo-code/robocode Fixed Code: @Override public void checkAccess(ThreadGroup g) { if (RobocodeProperties.isSecurityOff()) { return; } Thread c = Thread.currentThread(); if (isSafeThread(c)) { return; } super.checkAccess(g); final ThreadGroup cg = c.getThreadGroup(); if (cg == null) { // What the heck is going on here? JDK 1.3 is sending me a dead thread. // This crashes the entire jvm if I don't return here. return; } // Bug fix #382 Unable to run robocode.bat -- Access Control Exception if ("SeedGenerator Thread".equals(c.getName()) && "SeedGenerator ThreadGroup".equals(cg.getName())) { return; // The SeedGenerator might create a thread, which needs to be silently ignored } IHostedThread robotProxy = threadManager.getLoadedOrLoadingRobotProxy(c); if (robotProxy == null) { throw new AccessControlException("Preventing " + c.getName() + " from access to " + g.getName()); } if (cg.activeCount() > 5) { String message = "Robots are only allowed to create up to 5 threads!"; robotProxy.punishSecurityViolation(message); throw new SecurityException(message); } }
[ "CWE-862" ]
CVE-2019-10648
HIGH
7.5
robo-code/robocode
checkAccess
robocode.host/src/main/java/net/sf/robocode/host/security/RobocodeSecurityManager.java
836c84635e982e74f2f2771b2c8640c3a34221bd
1
Analyze the following code function for security vulnerabilities
public JWSAlgorithm getPreferredJwsAlgorithm() { return preferredJwsAlgorithm; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPreferredJwsAlgorithm 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
getPreferredJwsAlgorithm
pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java
22b82ffd702a132d9f09da60362fc6264fc281ae
0
Analyze the following code function for security vulnerabilities
@Override public void setPasswordMinimumLowerCase(ComponentName who, int length, boolean parent) { if (notSupportedOnAutomotive("setPasswordMinimumLowerCase")) { return; } Objects.requireNonNull(who, "ComponentName is null"); final int userId = mInjector.userHandleGetCallingUserId(); synchronized (getLockObject()) { ActiveAdmin ap = getActiveAdminForCallerLocked( who, DeviceAdminInfo.USES_POLICY_LIMIT_PASSWORD, parent); ensureMinimumQuality( userId, ap, PASSWORD_QUALITY_COMPLEX, "setPasswordMinimumLowerCase"); final PasswordPolicy passwordPolicy = ap.mPasswordPolicy; if (passwordPolicy.lowerCase != length) { passwordPolicy.lowerCase = length; updatePasswordValidityCheckpointLocked(userId, parent); saveSettingsLocked(userId); } logPasswordQualitySetIfSecurityLogEnabled(who, userId, parent, passwordPolicy); } DevicePolicyEventLogger .createEvent(DevicePolicyEnums.SET_PASSWORD_MINIMUM_LOWER_CASE) .setAdmin(who) .setInt(length) .write(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setPasswordMinimumLowerCase 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
setPasswordMinimumLowerCase
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
@Override public ApplicationBasicInfo[] getApplicationBasicInfo(String tenantDomain, String username, int offset, int limit) throws IdentityApplicationManagementException { ApplicationBasicInfo[] applicationBasicInfoArray; try { startTenantFlow(tenantDomain, username); ApplicationDAO appDAO = ApplicationMgtSystemConfig.getInstance().getApplicationDAO(); if (appDAO instanceof PaginatableFilterableApplicationDAO) { // Invoking pre listeners. Collection<ApplicationMgtListener> listeners = getApplicationMgtListeners(); for (ApplicationMgtListener listener : listeners) { if (listener.isEnable() && listener instanceof AbstractApplicationMgtListener && !((AbstractApplicationMgtListener) listener).doPreGetApplicationBasicInfo (tenantDomain, username, offset, limit)) { if (log.isDebugEnabled()) { log.debug("Invoking pre listener: " + listener.getClass().getName()); } return new ApplicationBasicInfo[0]; } } applicationBasicInfoArray = ((PaginatableFilterableApplicationDAO) appDAO) .getApplicationBasicInfo(offset, limit); // Invoking post listeners. for (ApplicationMgtListener listener : listeners) { if (listener.isEnable() && listener instanceof AbstractApplicationMgtListener && !((AbstractApplicationMgtListener) listener).doPostGetApplicationBasicInfo (tenantDomain, username, offset, limit, applicationBasicInfoArray)) { if (log.isDebugEnabled()) { log.debug("Invoking post listener: " + listener.getClass().getName()); } return new ApplicationBasicInfo[0]; } } } else { throw new UnsupportedOperationException("Application pagination is not supported in " + appDAO.getClass().getName() + " with tenant domain: " + tenantDomain); } } finally { endTenantFlow(); } return applicationBasicInfoArray; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getApplicationBasicInfo 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
getApplicationBasicInfo
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
@Override public void checkPackageDefinition(String pkg) { try { if (enterPublicInterface()) return; LOG.info("PKG-DEF: {}", pkg); //$NON-NLS-1$ super.checkPackageDefinition(pkg); if (SecurityConstants.STACK_WHITELIST.stream().anyMatch(pkg::startsWith)) throw new SecurityException(formatLocalized("security.error_package_definition", pkg)); //$NON-NLS-1$ } finally { exitPublicInterface(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkPackageDefinition File: src/main/java/de/tum/in/test/api/security/ArtemisSecurityManager.java Repository: ls1intum/Ares The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2024-23683
HIGH
8.2
ls1intum/Ares
checkPackageDefinition
src/main/java/de/tum/in/test/api/security/ArtemisSecurityManager.java
af4f28a56e2fe600d8750b3b415352a0a3217392
0
Analyze the following code function for security vulnerabilities
private void validateDestFolderPath() { if (isBlank(folder)) { return; } if (!new FilePathTypeValidator().isPathValid(folder)) { errors().add(FOLDER, FilePathTypeValidator.errorMessage("directory", getFolder())); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: validateDestFolderPath File: config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java Repository: gocd The code follows secure coding practices.
[ "CWE-77" ]
CVE-2021-43286
MEDIUM
6.5
gocd
validateDestFolderPath
config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
0
Analyze the following code function for security vulnerabilities
private boolean isInAllowList(List<SFile> allowlist) { final String path = getCleanPathSecure(); for (SFile allow : allowlist) if (path.startsWith(allow.getCleanPathSecure())) // File directory is in the allowlist return true; return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isInAllowList 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
isInAllowList
src/net/sourceforge/plantuml/security/SFile.java
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
0
Analyze the following code function for security vulnerabilities
public File prepareDownloadFile(Response response) throws IOException { String filename = null; String contentDisposition = (String) response.getHeaders().getFirst("Content-Disposition"); if (contentDisposition != null && !"".equals(contentDisposition)) { // Get filename from the Content-Disposition header. Pattern pattern = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?"); Matcher matcher = pattern.matcher(contentDisposition); if (matcher.find()) filename = matcher.group(1); } String prefix; String suffix = null; if (filename == null) { prefix = "download-"; suffix = ""; } else { int pos = filename.lastIndexOf('.'); if (pos == -1) { prefix = filename + "-"; } else { prefix = filename.substring(0, pos) + "-"; suffix = filename.substring(pos); } // File.createTempFile requires the prefix to be at least three characters long if (prefix.length() < 3) prefix = "download-"; } if (tempFolderPath == null) return File.createTempFile(prefix, suffix); else return File.createTempFile(prefix, suffix, new File(tempFolderPath)); }
Vulnerability Classification: - CWE: CWE-668 - CVE: CVE-2021-21430 - Severity: LOW - CVSS Score: 2.1 Description: use Files.createTempFile Function: prepareDownloadFile File: samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/ApiClient.java Repository: OpenAPITools/openapi-generator Fixed Code: public File prepareDownloadFile(Response response) throws IOException { String filename = null; String contentDisposition = (String) response.getHeaders().getFirst("Content-Disposition"); if (contentDisposition != null && !"".equals(contentDisposition)) { // Get filename from the Content-Disposition header. Pattern pattern = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?"); Matcher matcher = pattern.matcher(contentDisposition); if (matcher.find()) filename = matcher.group(1); } String prefix; String suffix = null; if (filename == null) { prefix = "download-"; suffix = ""; } else { int pos = filename.lastIndexOf('.'); if (pos == -1) { prefix = filename + "-"; } else { prefix = filename.substring(0, pos) + "-"; suffix = filename.substring(pos); } // Files.createTempFile requires the prefix to be at least three characters long if (prefix.length() < 3) prefix = "download-"; } if (tempFolderPath == null) return Files.createTempFile(prefix, suffix).toFile(); else return Files.createTempFile(Paths.get(tempFolderPath), prefix, suffix).toFile(); }
[ "CWE-668" ]
CVE-2021-21430
LOW
2.1
OpenAPITools/openapi-generator
prepareDownloadFile
samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
1
Analyze the following code function for security vulnerabilities
@Override public void onCommand(Object o) { serviceLock.readLock().lock(); try { if (!(o instanceof Command)) { throw new RuntimeException("Protocol violation - Command corrupted: " + o.toString()); } Command command = (Command) o; if (!brokerService.isStopping()) { Response response = service(command); if (response != null && !brokerService.isStopping()) { dispatchSync(response); } } else { throw new BrokerStoppedException("Broker " + brokerService + " is being stopped"); } } finally { serviceLock.readLock().unlock(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onCommand 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
onCommand
activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
00921f2
0
Analyze the following code function for security vulnerabilities
@Deprecated public String getParent() { String parentReferenceAsString; if (getParentReference() != null) { parentReferenceAsString = getDefaultEntityReferenceSerializer().serialize(getRelativeParentReference()); } else { parentReferenceAsString = ""; } return parentReferenceAsString; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getParent 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
getParent
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
db3d1c62fc5fb59fefcda3b86065d2d362f55164
0
Analyze the following code function for security vulnerabilities
public boolean isWebhooksEnabled() { return CONF.webhooksEnabled(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isWebhooksEnabled 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
isWebhooksEnabled
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
62a0e92e1486ddc17676a7ead2c07ff653d167ce
0
Analyze the following code function for security vulnerabilities
public String createContentFile(SysSite site, CmsContent entity, CmsCategory category, boolean createMultiContentPage, String templatePath, String filePath, Integer pageIndex) throws IOException, TemplateException { Map<String, Object> model = new HashMap<>(); initContentUrl(site, entity); initContentCover(site, entity); initCategoryUrl(site, category); model.put("content", entity); model.put("category", category); CmsContentAttribute attribute = contentAttributeService.getEntity(entity.getId()); if (null != attribute) { Map<String, String> map = ExtendUtils.getExtendMap(attribute.getData()); map.put("text", attribute.getText()); map.put("source", attribute.getSource()); map.put("sourceUrl", attribute.getSourceUrl()); map.put("wordCount", String.valueOf(attribute.getWordCount())); model.put("attribute", map); } else { model.put("attribute", attribute); } if (CommonUtils.empty(filePath)) { filePath = category.getContentPath(); } String realTemplatePath = siteComponent.getWebTemplateFilePath(site, templatePath); CmsPageMetadata metadata = metadataComponent.getTemplateMetadata(realTemplatePath); CmsPageData data = metadataComponent.getTemplateData(siteComponent.getCurrentSiteWebTemplateFilePath(site, templatePath)); Map<String, Object> metadataMap = metadata.getAsMap(data); String fullTemplatePath = SiteComponent.getFullTemplatePath(site, templatePath); if (null != attribute && CommonUtils.notEmpty(filePath) && CommonUtils.notEmpty(attribute.getText())) { String pageBreakTag = null; if (-1 < attribute.getText().indexOf(CommonConstants.getCkeditorPageBreakTag())) { pageBreakTag = CommonConstants.getCkeditorPageBreakTag(); } else if (-1 < attribute.getText().indexOf(CommonConstants.getKindEditorPageBreakTag())) { pageBreakTag = CommonConstants.getKindEditorPageBreakTag(); } else { pageBreakTag = CommonConstants.getUeditorPageBreakTag(); } String[] texts = StringUtils.splitByWholeSeparator(attribute.getText(), pageBreakTag); if (createMultiContentPage) { for (int i = 1; i < texts.length; i++) { PageHandler page = new PageHandler(i + 1, 1, texts.length, null); model.put("text", texts[i]); model.put("page", page); createStaticFile(site, fullTemplatePath, filePath, i + 1, metadataMap, model); } pageIndex = 1; } PageHandler page = new PageHandler(pageIndex, 1, texts.length, null); model.put("page", page); model.put("text", texts[page.getPageIndex() - 1]); } return createStaticFile(site, fullTemplatePath, filePath, pageIndex, metadataMap, model); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createContentFile File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/logic/component/template/TemplateComponent.java Repository: sanluan/PublicCMS The code follows secure coding practices.
[ "CWE-89" ]
CVE-2020-20914
CRITICAL
9.8
sanluan/PublicCMS
createContentFile
publiccms-parent/publiccms-core/src/main/java/com/publiccms/logic/component/template/TemplateComponent.java
bf24c5dd9177cb2da30d0f0a62cf8e130003c2ae
0
Analyze the following code function for security vulnerabilities
@Override protected void setServiceInterface(IBinder binder) { mServiceInterface = IConnectionService.Stub.asInterface(binder); Log.v(this, "Adding Connection Service Adapter."); addConnectionServiceAdapter(mAdapter); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setServiceInterface File: src/com/android/server/telecom/ConnectionServiceWrapper.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21283
MEDIUM
5.5
android
setServiceInterface
src/com/android/server/telecom/ConnectionServiceWrapper.java
9b41a963f352fdb3da1da8c633d45280badfcb24
0
Analyze the following code function for security vulnerabilities
void updateForegroundServiceUsageStats(ComponentName service, int userId, boolean started) { if (DEBUG_SWITCH) { Slog.d(TAG_SWITCH, "updateForegroundServiceUsageStats: comp=" + service + " started=" + started); } if (mUsageStatsService != null) { mUsageStatsService.reportEvent(service, userId, started ? UsageEvents.Event.FOREGROUND_SERVICE_START : UsageEvents.Event.FOREGROUND_SERVICE_STOP, 0, null); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateForegroundServiceUsageStats 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
updateForegroundServiceUsageStats
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
protected Client buildHttpClient() { // use the default client config if not yet initialized if (clientConfig == null) { clientConfig = getDefaultClientConfig(); } ClientBuilder clientBuilder = ClientBuilder.newBuilder(); customizeClientBuilder(clientBuilder); clientBuilder = clientBuilder.withConfig(clientConfig); return clientBuilder.build(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: buildHttpClient File: samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiClient.java Repository: OpenAPITools/openapi-generator The code follows secure coding practices.
[ "CWE-668" ]
CVE-2021-21430
LOW
2.1
OpenAPITools/openapi-generator
buildHttpClient
samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
public void registerUserSwitchObserver(IUserSwitchObserver observer) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); data.writeStrongBinder(observer != null ? observer.asBinder() : null); mRemote.transact(REGISTER_USER_SWITCH_OBSERVER_TRANSACTION, data, reply, 0); reply.readException(); data.recycle(); reply.recycle(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: registerUserSwitchObserver File: core/java/android/app/ActivityManagerNative.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
registerUserSwitchObserver
core/java/android/app/ActivityManagerNative.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
protected void cleanupComponents() { // We must ensure we clean the ThreadLocal variables located in the Container and Execution // components as otherwise we will have a potential memory leak. container.removeRequest(); container.removeResponse(); container.removeSession(); execution.removeContext(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: cleanupComponents File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiAction.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-862" ]
CVE-2022-23617
MEDIUM
4
xwiki/xwiki-platform
cleanupComponents
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiAction.java
b35ef0edd4f2ff2c974cbeef6b80fcf9b5a44554
0
Analyze the following code function for security vulnerabilities
public void setXClass(BaseClass xwikiClass) { xwikiClass.setOwnerDocument(this); this.xClass = xwikiClass; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setXClass 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
setXClass
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 insertGlobalSetting(String name, String value, String tag, boolean makeDefault, int requestingUserId, boolean forceNotify, boolean overrideableByRestore) { if (DEBUG) { Slog.v(LOG_TAG, "insertGlobalSetting(" + name + ", " + value + ", " + ", " + tag + ", " + makeDefault + ", " + requestingUserId + ", " + forceNotify + ")"); } return mutateGlobalSetting(name, value, tag, makeDefault, requestingUserId, MUTATION_OPERATION_INSERT, forceNotify, 0, overrideableByRestore); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: insertGlobalSetting File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40117
HIGH
7.8
android
insertGlobalSetting
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
ff86ff28cf82124f8e65833a2dd8c319aea08945
0
Analyze the following code function for security vulnerabilities
@Override @SuppressWarnings("unchecked") public Iterator<Tuple<MediaPackage, String>> getAllMediaPackages() throws SearchServiceDatabaseException { List<SearchEntity> searchEntities = null; EntityManager em = null; try { em = emf.createEntityManager(); Query query = em.createNamedQuery("Search.findAll"); searchEntities = (List<SearchEntity>) query.getResultList(); } catch (Exception e) { logger.error("Could not retrieve all episodes: {}", e.getMessage()); throw new SearchServiceDatabaseException(e); } finally { em.close(); } List<Tuple<MediaPackage, String>> mediaPackageList = new LinkedList<Tuple<MediaPackage, String>>(); try { for (SearchEntity entity : searchEntities) { MediaPackage mediaPackage = MediaPackageParser.getFromXml(entity.getMediaPackageXML()); mediaPackageList.add(Tuple.tuple(mediaPackage, entity.getOrganization().getId())); } } catch (Exception e) { logger.error("Could not parse series entity: {}", e.getMessage()); throw new SearchServiceDatabaseException(e); } return mediaPackageList.iterator(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAllMediaPackages File: modules/search-service-impl/src/main/java/org/opencastproject/search/impl/persistence/SearchServiceDatabaseImpl.java Repository: opencast The code follows secure coding practices.
[ "CWE-863" ]
CVE-2021-21318
MEDIUM
5.5
opencast
getAllMediaPackages
modules/search-service-impl/src/main/java/org/opencastproject/search/impl/persistence/SearchServiceDatabaseImpl.java
b18c6a7f81f08ed14884592a6c14c9ab611ad450
0
Analyze the following code function for security vulnerabilities
@Override public SaServletFilter setExcludeList(List<String> pathList) { excludeList = pathList; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setExcludeList File: sa-token-starter/sa-token-spring-boot3-starter/src/main/java/cn/dev33/satoken/filter/SaServletFilter.java Repository: dromara/Sa-Token The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-44794
CRITICAL
9.8
dromara/Sa-Token
setExcludeList
sa-token-starter/sa-token-spring-boot3-starter/src/main/java/cn/dev33/satoken/filter/SaServletFilter.java
954efeb73277f924f836da2a25322ea35ee1bfa3
0
Analyze the following code function for security vulnerabilities
@Override @Deprecated public String encodeRedirectUrl(String arg0) { return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: encodeRedirectUrl File: h2/src/test/org/h2/test/server/TestWeb.java Repository: h2database The code follows secure coding practices.
[ "CWE-312" ]
CVE-2022-45868
HIGH
7.8
h2database
encodeRedirectUrl
h2/src/test/org/h2/test/server/TestWeb.java
23ee3d0b973923c135fa01356c8eaed40b895393
0
Analyze the following code function for security vulnerabilities
public int getUnregisterModelTimeout() { return Integer.parseInt(prop.getProperty(TS_UNREGISTER_MODEL_TIMEOUT, "120")); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getUnregisterModelTimeout File: frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java Repository: pytorch/serve The code follows secure coding practices.
[ "CWE-918" ]
CVE-2023-43654
CRITICAL
9.8
pytorch/serve
getUnregisterModelTimeout
frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java
391bdec3348e30de173fbb7c7277970e0b53c8ad
0
Analyze the following code function for security vulnerabilities
private Set<Integer> getProfileIdsLocked(int userId) { Set<Integer> userIds = new HashSet<Integer>(); final List<UserInfo> profiles = getUserManagerLocked().getProfiles( userId, false /* enabledOnly */); for (UserInfo user : profiles) { userIds.add(Integer.valueOf(user.id)); } return userIds; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getProfileIdsLocked File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-2500
MEDIUM
4.3
android
getProfileIdsLocked
services/core/java/com/android/server/am/ActivityManagerService.java
9878bb99b77c3681f0fda116e2964bac26f349c3
0
Analyze the following code function for security vulnerabilities
@Override public String getMSSQLScript() { return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getMSSQLScript File: dotCMS/src/main/java/com/dotmarketing/startup/runonce/Task05165CreateContentTypeWorkflowActionMappingTable.java Repository: dotCMS/core The code follows secure coding practices.
[ "CWE-79" ]
CVE-2020-17542
LOW
3.5
dotCMS/core
getMSSQLScript
dotCMS/src/main/java/com/dotmarketing/startup/runonce/Task05165CreateContentTypeWorkflowActionMappingTable.java
782c342b660d359a71e190c8b5110bc651736591
0
Analyze the following code function for security vulnerabilities
public abstract BaseXMLBuilder text(String value, boolean replaceText);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: text File: src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java Repository: jmurty/java-xmlbuilder The code follows secure coding practices.
[ "CWE-611" ]
CVE-2014-125087
MEDIUM
5.2
jmurty/java-xmlbuilder
text
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
e6fddca201790abab4f2c274341c0bb8835c3e73
0
Analyze the following code function for security vulnerabilities
private static String toLuceneDateWithFormat(String dateString, String format) { try { if (!UtilMethods.isSet(dateString)) return ""; SimpleDateFormat sdf = new SimpleDateFormat(format); Date date = sdf.parse(dateString); String returnValue = toLuceneDate(date); 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: toLuceneDateWithFormat 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
toLuceneDateWithFormat
src/com/dotcms/content/elasticsearch/business/ESContentFactoryImpl.java
897f3632d7e471b7a73aabed5b19f6f53d4e5562
0
Analyze the following code function for security vulnerabilities
public static final native void setThreadScheduler(int tid, int policy, int priority) throws IllegalArgumentException;
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setThreadScheduler File: core/java/android/os/Process.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3911
HIGH
9.3
android
setThreadScheduler
core/java/android/os/Process.java
2c7008421cb67f5d89f16911bdbe36f6c35311ad
0
Analyze the following code function for security vulnerabilities
public void createTenant(String tenant) { StopWatch stopWatch = StopWatch.createStarted(); log.info("START - SETUP:CreateTenant: tenantKey: {}", tenant); try { tenantListRepository.addTenant(tenant); databaseService.create(tenant); databaseService.migrate(tenant); addUaaSpecification(tenant); addLoginsSpecification(tenant); addRoleSpecification(tenant); addPermissionSpecification(tenant); addDefaultEmailTemplates(tenant); log.info("STOP - SETUP:CreateTenant: tenantKey: {}, result: OK, time = {} ms", tenant, stopWatch.getTime()); } catch (Exception e) { log.info("STOP - SETUP:CreateTenant: tenantKey: {}, result: FAIL, error: {}, time = {} ms", tenant, e.getMessage(), stopWatch.getTime()); throw e; } }
Vulnerability Classification: - CWE: CWE-89 - CVE: CVE-2019-15557 - Severity: HIGH - CVSS Score: 7.5 Description: fix create schema for new tenant Function: createTenant File: src/main/java/com/icthh/xm/uaa/service/tenant/TenantService.java Repository: xm-online/xm-uaa Fixed Code: public void createTenant(String tenant) { StopWatch stopWatch = StopWatch.createStarted(); log.info("START - SETUP:CreateTenant: tenantKey: {}", tenant); try { tenantListRepository.addTenant(tenant); databaseService.create(tenant.toLowerCase()); databaseService.migrate(tenant.toLowerCase()); addUaaSpecification(tenant); addLoginsSpecification(tenant); addRoleSpecification(tenant); addPermissionSpecification(tenant); addDefaultEmailTemplates(tenant); log.info("STOP - SETUP:CreateTenant: tenantKey: {}, result: OK, time = {} ms", tenant, stopWatch.getTime()); } catch (Exception e) { log.info("STOP - SETUP:CreateTenant: tenantKey: {}, result: FAIL, error: {}, time = {} ms", tenant, e.getMessage(), stopWatch.getTime()); throw e; } }
[ "CWE-89" ]
CVE-2019-15557
HIGH
7.5
xm-online/xm-uaa
createTenant
src/main/java/com/icthh/xm/uaa/service/tenant/TenantService.java
de1bb967b81c0cfe9854b13c030512b85200f7e3
1
Analyze the following code function for security vulnerabilities
private Scope getScope(BaseObject obj) { if (obj != null) { StringProperty scopeProperty = (StringProperty) obj.getField(TranslationDocumentModel.TRANSLATIONCLASS_PROP_SCOPE); if (scopeProperty != null) { String scopeString = scopeProperty.getValue(); return EnumUtils.getEnum(Scope.class, scopeString.toUpperCase()); } } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getScope File: xwiki-platform-core/xwiki-platform-localization/xwiki-platform-localization-sources/xwiki-platform-localization-source-wiki/src/main/java/org/xwiki/localization/wiki/internal/DocumentTranslationBundleFactory.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-74" ]
CVE-2023-29510
HIGH
8.8
xwiki/xwiki-platform
getScope
xwiki-platform-core/xwiki-platform-localization/xwiki-platform-localization-sources/xwiki-platform-localization-source-wiki/src/main/java/org/xwiki/localization/wiki/internal/DocumentTranslationBundleFactory.java
d06ff8a58480abc7f63eb1d4b8b366024d990643
0
Analyze the following code function for security vulnerabilities
private long zigzagToLong(long n) { return (n >>> 1) ^ -(n & 1); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: zigzagToLong File: thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java Repository: facebook/fbthrift The code follows secure coding practices.
[ "CWE-770" ]
CVE-2019-11938
MEDIUM
5
facebook/fbthrift
zigzagToLong
thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java
08c2d412adb214c40bb03be7587057b25d053030
0
Analyze the following code function for security vulnerabilities
@Override public DocumentReference getContentAuthorReference() { return this.contentAuthorReference; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getContentAuthorReference 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
getContentAuthorReference
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 isRollbackRequired(IdentityApplicationManagementException ex) { // If the error code indicates an application conflict we don't need to rollback since it will affect the // already existing app. return !StringUtils.equals(ex.getErrorCode(), APPLICATION_ALREADY_EXISTS.getCode()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isRollbackRequired 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
isRollbackRequired
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
public void deleteSpace(String space) { getDriver().get(getURLToDeleteSpace(space)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: deleteSpace 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
deleteSpace
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 static User authenticate(String email, String password, Response response) throws UnauthorizedException { // FIXME: Allow only one login attempt per email address every 5 seconds. Add email addrs to a ConcurrentTreeSet // or something (*if* the email addr is already in the database, to prevent DoS), and every 5s, purge old // entries from the tree. If an attempt is made in less than 5s, then return an error rather than blocking for // up to 5s, again to prevent DoS. User user = findByEmail(email); if (user != null) { // Get the hash password from the salt + clear password (N.B. It takes 80ms to run BCrypt) if (!FEDERATED_LOGIN_PASSWORD_HASH_PLACEHOLDER.equals(user.passwordHash) && Hash.checkPassword(password, user.passwordHash)) { // User successfully authenticated. user.logIn(response); return user; } } // If user was not successfully logged in for some reason, delete cookie to be extra paranoid user.logOut(response); return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: authenticate File: src/gribbit/auth/User.java Repository: lukehutch/gribbit The code follows secure coding practices.
[ "CWE-346" ]
CVE-2014-125071
MEDIUM
5.2
lukehutch/gribbit
authenticate
src/gribbit/auth/User.java
620418df247aebda3dd4be1dda10fe229ea505dd
0
Analyze the following code function for security vulnerabilities
public boolean is10Syntax() { return is10Syntax(getSyntaxId()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: is10Syntax 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
is10Syntax
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
db3d1c62fc5fb59fefcda3b86065d2d362f55164
0
Analyze the following code function for security vulnerabilities
@Override public void killApplicationProcess(String processName, int uid) { if (processName == null) { return; } int callerUid = Binder.getCallingUid(); // Only the system server can kill an application if (callerUid == SYSTEM_UID) { synchronized (this) { ProcessRecord app = getProcessRecordLocked(processName, uid, true); if (app != null && app.thread != null) { try { app.thread.scheduleSuicide(); } catch (RemoteException e) { // If the other end already died, then our work here is done. } } else { Slog.w(TAG, "Process/uid not found attempting kill of " + processName + " / " + uid); } } } else { throw new SecurityException(callerUid + " cannot kill app process: " + processName); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: killApplicationProcess 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
killApplicationProcess
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
void showNextToastLocked() { ToastRecord record = mToastQueue.get(0); while (record != null) { if (DBG) Slog.d(TAG, "Show pkg=" + record.pkg + " callback=" + record.callback); try { record.callback.show(); scheduleTimeoutLocked(record); return; } catch (RemoteException e) { Slog.w(TAG, "Object died trying to show notification " + record.callback + " in package " + record.pkg); // remove it from the list and let the process die int index = mToastQueue.indexOf(record); if (index >= 0) { mToastQueue.remove(index); } keepProcessAliveLocked(record.pid); if (mToastQueue.size() > 0) { record = mToastQueue.get(0); } else { record = null; } } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: showNextToastLocked File: services/core/java/com/android/server/notification/NotificationManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2016-3884
MEDIUM
4.3
android
showNextToastLocked
services/core/java/com/android/server/notification/NotificationManagerService.java
61e9103b5725965568e46657f4781dd8f2e5b623
0
Analyze the following code function for security vulnerabilities
public String getSpaceId(String space) { if (StringUtils.isBlank(space)) { return DEFAULT_SPACE; } String s = StringUtils.contains(space, Para.getConfig().separator()) ? StringUtils.substring(space, 0, space.lastIndexOf(Para.getConfig().separator())) : "scooldspace:" + space; return "scooldspace".equals(s) ? space : s; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSpaceId 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
getSpaceId
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
62a0e92e1486ddc17676a7ead2c07ff653d167ce
0
Analyze the following code function for security vulnerabilities
private IdentityApplicationManagementServerException buildServerException(String message, Throwable ex) { return new IdentityApplicationManagementServerException(UNEXPECTED_SERVER_ERROR.getCode(), message, ex); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: buildServerException 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
buildServerException
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
public boolean isLockscreenPublicMode(int userId) { if (userId == UserHandle.USER_ALL) { return mLockscreenPublicMode.get(mCurrentUserId, false); } return mLockscreenPublicMode.get(userId, false); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isLockscreenPublicMode 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
isLockscreenPublicMode
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
public boolean isRunning(boolean traceError) { return service.isRunning(traceError); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isRunning File: h2/src/main/org/h2/tools/Server.java Repository: h2database The code follows secure coding practices.
[ "CWE-312" ]
CVE-2022-45868
HIGH
7.8
h2database
isRunning
h2/src/main/org/h2/tools/Server.java
23ee3d0b973923c135fa01356c8eaed40b895393
0