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
|
protected String getUserMenu(Map<String, Object> data) {
if (!getPropertyString("horizontal_menu").isEmpty()) {
String html = "";
if ((Boolean) data.get("is_logged_in")) {
User user = (User) data.get("user");
String email = user.getEmail();
if (email == null) {
email = "";
}
if (email.contains(";")) {
email = email.split(";")[0];
}
if (email.contains(",")) {
email = email.split(",")[0];
}
String profileImageTag = "";
if (getPropertyString("userImage").isEmpty()) {
String url = (email != null && !email.isEmpty()) ?
new Gravatar()
.setSize(20)
.setHttps(true)
.setRating(Rating.PARENTAL_GUIDANCE_SUGGESTED)
.setStandardDefaultImage(DefaultImage.IDENTICON)
.getUrl(email)
: "//www.gravatar.com/avatar/default?d=identicon";
profileImageTag = "<img class=\"gravatar\" alt=\"gravatar\" width=\"30\" height=\"30\" data-lazysrc=\""+url+"\" onError=\"this.onerror = '';this.style.display='none';\"/> ";
} else if ("hashVariable".equals(getPropertyString("userImage"))) {
String url = AppUtil.processHashVariable(getPropertyString("userImageUrlHash"), null, StringUtil.TYPE_HTML, null, AppUtil.getCurrentAppDefinition());
if (AppUtil.containsHashVariable(url) || url == null || url.isEmpty()) {
url = data.get("context_path") + "/" + getPathName() + "/user.png";
}
profileImageTag = "<img alt=\"profile\" width=\"30\" height=\"30\" src=\""+url+"\" /> ";
}
html += "<li class=\"user-link dropdown\">\n"
+ " <a data-toggle=\"dropdown\" class=\"btn dropdown-toggle\">\n"
+ " " + profileImageTag + StringUtil.stripHtmlTag(DirectoryUtil.getUserFullName(user), new String[]{}) + "\n"
+ " <span class=\"caret\"></span>\n"
+ " </a>\n";
html += "<ul class=\"dropdown-menu\">\n";
if (!"true".equals(getPropertyString("profile")) && !user.getReadonly()) {
html += " <li><a href=\"" + data.get("base_link") + PROFILE +"\"><i class=\"fa fa-user\"></i> " + ResourceBundleUtil.getMessage("theme.universal.profile") + "</a></li>\n";
}
Object[] shortcut = (Object[]) getProperty("userMenu");
if (shortcut != null && shortcut.length > 0) {
for (Object o : shortcut) {
Map link = (HashMap) o;
String href = link.get("href").toString();
String label = link.get("label").toString();
String target = (link.get("target") == null)?"":link.get("target").toString();
if ("divider".equalsIgnoreCase(label)) {
html += "<li class=\"divider\"></li>\n";
} else if (href.isEmpty()) {
html += "<li class=\"dropdown-menu-title\"><span>" + label + "</span></li>\n";
} else {
if (!href.contains("/")) {
href = data.get("base_link") + href;
}
html += "<li><a href=\"" + href + "\" target=\""+target+"\">" + label + "</a></li>\n";
}
}
}
html += " <li><a href=\"" + data.get("logout_link") + "\"><i class=\"fa fa-power-off\"></i> " + ResourceBundleUtil.getMessage("theme.universal.logout") + "</a></li>\n"
+ "</ul>";
} else {
html += "<li class=\"user-link\">\n"
+ " <a href=\"" + data.get("login_link") + "\" class=\"btn\">\n"
+ " <i class=\"fa fa-user white\"></i> " + ResourceBundleUtil.getMessage("ubuilder.login") + "\n"
+ " </a>\n";
}
html += "</li>";
return html;
} else {
return "";
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserMenu
File: wflow-core/src/main/java/org/joget/plugin/enterprise/UniversalTheme.java
Repository: jogetworkflow/jw-community
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-4560
|
MEDIUM
| 6.1
|
jogetworkflow/jw-community
|
getUserMenu
|
wflow-core/src/main/java/org/joget/plugin/enterprise/UniversalTheme.java
|
ecf8be8f6f0cb725c18536ddc726d42a11bdaa1b
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean getShow4All() {
return show4all;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getShow4All
File: src/com/dotmarketing/portlets/workflows/model/WorkflowSearcher.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-4040
|
MEDIUM
| 6.5
|
dotCMS/core
|
getShow4All
|
src/com/dotmarketing/portlets/workflows/model/WorkflowSearcher.java
|
bc4db5d71dc67015572f8e4c6fdf87e29b854d02
| 0
|
Analyze the following code function for security vulnerabilities
|
private void receivedSignalingMessage(Signaling signaling) throws IOException {
String messageType = signaling.getType();
if (!isConnectionEstablished() && !currentCallStatus.equals(CallStatus.CONNECTING)) {
return;
}
if ("usersInRoom".equals(messageType)) {
processUsersInRoom((List<HashMap<String, Object>>) signaling.getMessageWrapper());
} else if ("message".equals(messageType)) {
NCSignalingMessage ncSignalingMessage = LoganSquare.parse(signaling.getMessageWrapper().toString(),
NCSignalingMessage.class);
processMessage(ncSignalingMessage);
} else {
Log.e(TAG, "unexpected message type when receiving signaling message");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: receivedSignalingMessage
File: app/src/main/java/com/nextcloud/talk/activities/CallActivity.java
Repository: nextcloud/talk-android
The code follows secure coding practices.
|
[
"CWE-732",
"CWE-200"
] |
CVE-2022-41926
|
MEDIUM
| 5.5
|
nextcloud/talk-android
|
receivedSignalingMessage
|
app/src/main/java/com/nextcloud/talk/activities/CallActivity.java
|
bb7e82fbcbd8c10d0d0128d736c41cec0f79e7d0
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void removeTenantUser(String username, UserRegistrationConfigDTO signupConfig,
String serverURL) throws RemoteException,
UserAdminUserAdminException {
UserAdminStub userAdminStub = new UserAdminStub(null, serverURL + "UserAdmin");
String adminUsername = signupConfig.getAdminUserName();
String adminPassword = signupConfig.getAdminPassword();
CarbonUtils.setBasicAccessSecurityHeaders(adminUsername, adminPassword, userAdminStub._getServiceClient());
String tenantAwareUserName = MultitenantUtils.getTenantAwareUsername(username);
int index = tenantAwareUserName.indexOf(UserCoreConstants.DOMAIN_SEPARATOR);
//remove the 'PRIMARY' part from the user name
if (index > 0) {
if(tenantAwareUserName.substring(0, index)
.equalsIgnoreCase(UserCoreConstants.PRIMARY_DEFAULT_DOMAIN_NAME)){
tenantAwareUserName = tenantAwareUserName.substring(index + 1);
}
}
userAdminStub.deleteUser(tenantAwareUserName);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeTenantUser
File: components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
Repository: wso2/carbon-apimgt
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2018-20736
|
LOW
| 3.5
|
wso2/carbon-apimgt
|
removeTenantUser
|
components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
|
490f2860822f89d745b7c04fa9570bd86bef4236
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isDefaultRow() {
return getRowState().defaultRow;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isDefaultRow
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
|
isDefaultRow
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void onPause() {
super.onPause();
// When the user exits the compose view, see if this draft needs saving.
// Don't save unnecessary drafts if we are only changing the orientation.
if (!isChangingConfigurations()) {
saveIfNeeded();
if (isFinishing() && !mPerformedSendOrDiscard && !isBlank()) {
// log saving upon backing out of activity. (we avoid logging every sendOrSave()
// because that method can be invoked many times in a single compose session.)
logSendOrSave(true /* save */);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onPause
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
|
onPause
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String history(String pipelineName) {
return BASE + HISTORY_PATH.replaceAll(":pipeline_name", pipelineName);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: history
File: spark/spark-base/src/main/java/com/thoughtworks/go/spark/Routes.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-697"
] |
CVE-2022-39308
|
MEDIUM
| 5.9
|
gocd
|
history
|
spark/spark-base/src/main/java/com/thoughtworks/go/spark/Routes.java
|
236d4baf92e6607f2841c151c855adcc477238b8
| 0
|
Analyze the following code function for security vulnerabilities
|
public Material get(Material other) {
for (Material material : this) {
if (material.isSameFlyweight(other)) {
return material;
}
}
throw new RuntimeException("Material not found: " + other);//IMP: because, config can change between BCPS call and build cause production - shilpa/jj
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: get
File: domain/src/main/java/com/thoughtworks/go/config/materials/Materials.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-39309
|
MEDIUM
| 6.5
|
gocd
|
get
|
domain/src/main/java/com/thoughtworks/go/config/materials/Materials.java
|
691b479f1310034992da141760e9c5d1f5b60e8a
| 0
|
Analyze the following code function for security vulnerabilities
|
public String generateWebToken(Object principal) {
Key key = getJWTKey();
Map<String, Object> claims = new HashMap<>();
claims.put("principal", getPrincipalForWebToken(principal));
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
ObjectOutputStream objectOutputStream;
try {
objectOutputStream = new ObjectOutputStream(bytes);
objectOutputStream.writeObject(principal);
objectOutputStream.close();
} catch (IOException e) {
throw new RuntimeException(e);
}
claims.put("serialized-principal", bytes.toByteArray());
int expireAfterMinutes = portofinoConfiguration.getInt(JWT_EXPIRATION_PROPERTY, 30);
return Jwts.builder().
setClaims(claims).
setExpiration(new DateTime().plusMinutes(expireAfterMinutes).toDate()).
signWith(key, SignatureAlgorithm.HS512).
compact();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: generateWebToken
File: portofino-core/src/main/java/com/manydesigns/portofino/shiro/AbstractPortofinoRealm.java
Repository: ManyDesigns/Portofino
The code follows secure coding practices.
|
[
"CWE-347"
] |
CVE-2021-29451
|
MEDIUM
| 6.4
|
ManyDesigns/Portofino
|
generateWebToken
|
portofino-core/src/main/java/com/manydesigns/portofino/shiro/AbstractPortofinoRealm.java
|
8c754a0ad234555e813dcbf9e57d637f9f23d8fb
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void xxunzipcpio(ZipInputStream zis, File of) {
try(BufferedOutputStream bos = new BufferedOutputStream (new FileOutputStream(of), FileUtils.BSIZE)) {
FileUtils.cpio(new BufferedInputStream(zis), bos, "unzip:" + of.getName());
bos.flush();
} catch(IOException e) {
handleIOException("", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: xxunzipcpio
File: src/main/java/org/olat/core/util/ZipUtil.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-39180
|
HIGH
| 9
|
OpenOLAT
|
xxunzipcpio
|
src/main/java/org/olat/core/util/ZipUtil.java
|
5668a41ab3f1753102a89757be013487544279d5
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getActualDisplayHeight() {
DisplayMetrics dm = getContext().getResources().getDisplayMetrics();
return dm.heightPixels;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getActualDisplayHeight
File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
getActualDisplayHeight
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public void setWeb(String space)
{
setSpace(space);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setWeb
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
|
setWeb
|
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
|
@Nullable
Task getOrganizedTask() {
return task != null ? task.getOrganizedTask() : null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getOrganizedTask
File: services/core/java/com/android/server/wm/ActivityRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21145
|
HIGH
| 7.8
|
android
|
getOrganizedTask
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public final void writeExternal(final ObjectOutput out) throws IOException {
boolean firstRound = false;
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
ObjectOutputStream os = stream.get();
if (os == null) {
os = new ObjectOutputStream(baos);
firstRound = true;
stream.set(os);
}
os.writeObject(this.userBean);
os.writeObject(this.unloadedProperties);
os.writeObject(this.objectFactory);
os.writeObject(this.constructorArgTypes);
os.writeObject(this.constructorArgs);
final byte[] bytes = baos.toByteArray();
out.writeObject(bytes);
if (firstRound) {
stream.remove();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeExternal
File: src/main/java/org/apache/ibatis/executor/loader/AbstractSerialStateHolder.java
Repository: mybatis/mybatis-3
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2020-26945
|
MEDIUM
| 5.1
|
mybatis/mybatis-3
|
writeExternal
|
src/main/java/org/apache/ibatis/executor/loader/AbstractSerialStateHolder.java
|
9caf480e05c389548c9889362c2cb080d728b5d8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<String> getCrossProfileWidgetProviders(int profileId) {
synchronized (getLockObject()) {
if (mOwners == null) {
return Collections.emptyList();
}
ComponentName ownerComponent = mOwners.getProfileOwnerComponent(profileId);
if (ownerComponent == null) {
return Collections.emptyList();
}
DevicePolicyData policy = getUserDataUnchecked(profileId);
ActiveAdmin admin = policy.mAdminMap.get(ownerComponent);
if (admin == null || admin.crossProfileWidgetProviders == null
|| admin.crossProfileWidgetProviders.isEmpty()) {
return Collections.emptyList();
}
return admin.crossProfileWidgetProviders;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCrossProfileWidgetProviders
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
|
getCrossProfileWidgetProviders
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getVolumeUuidForPackage(PackageParser.Package pkg) {
if (isExternal(pkg)) {
if (TextUtils.isEmpty(pkg.volumeUuid)) {
return StorageManager.UUID_PRIMARY_PHYSICAL;
} else {
return pkg.volumeUuid;
}
} else {
return StorageManager.UUID_PRIVATE_INTERNAL;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getVolumeUuidForPackage
File: services/core/java/com/android/server/pm/PackageManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2016-2497
|
HIGH
| 7.5
|
android
|
getVolumeUuidForPackage
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
public JavaType containedTypeOrUnknown(int index) {
JavaType t = containedType(index);
return (t == null) ? TypeFactory.unknownType() : t;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: containedTypeOrUnknown
File: src/main/java/com/fasterxml/jackson/databind/JavaType.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2019-16942
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
containedTypeOrUnknown
|
src/main/java/com/fasterxml/jackson/databind/JavaType.java
|
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
| 0
|
Analyze the following code function for security vulnerabilities
|
public static Object convertToType(String val, Class<?> clazz) {
if (val == null)
return null;
if ("".equals(val) && !String.class.equals(clazz))
return null;
if (Location.class.isAssignableFrom(clazz)) {
LocationEditor ed = new LocationEditor();
ed.setAsText(val);
return ed.getValue();
} else if (User.class.isAssignableFrom(clazz)) {
UserEditor ed = new UserEditor();
ed.setAsText(val);
return ed.getValue();
} else if (Date.class.isAssignableFrom(clazz)) {
// all HTML Form Entry dates should be submitted as yyyy-mm-dd
try {
DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
df.setLenient(false);
return df.parse(val);
}
catch (ParseException e) {
throw new IllegalArgumentException(e);
}
} else if (Double.class.isAssignableFrom(clazz)) {
return Double.valueOf(val);
} else if (Integer.class.isAssignableFrom(clazz)) {
return Integer.valueOf(val);
} else if (Concept.class.isAssignableFrom(clazz)) {
ConceptEditor ed = new ConceptEditor();
ed.setAsText(val);
return ed.getValue();
} else if (Drug.class.isAssignableFrom(clazz)) {
DrugEditor ed = new DrugEditor();
ed.setAsText(val);
return ed.getValue();
} else if (Patient.class.isAssignableFrom(clazz)) {
PatientEditor ed = new PatientEditor();
ed.setAsText(val);
return ed.getValue();
} else if (Person.class.isAssignableFrom(clazz)) {
PersonEditor ed = new PersonEditor();
ed.setAsText(val);
return ed.getValue();
} else if (EncounterType.class.isAssignableFrom(clazz)) {
EncounterTypeEditor ed = new EncounterTypeEditor();
ed.setAsText(val);
return ed.getValue();
} else {
return val;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: convertToType
File: api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java
Repository: openmrs/openmrs-module-htmlformentry
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-16521
|
HIGH
| 7.5
|
openmrs/openmrs-module-htmlformentry
|
convertToType
|
api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java
|
9dcd304688e65c31cac5532fe501b9816ed975ae
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void testDeserializationAsFloatEdgeCase06() throws Exception
{
// Into the positive zone where everything becomes zero.
String input = "1e64";
Duration value = READER.without(DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS)
.readValue(input);
assertEquals(0, value.getSeconds());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: testDeserializationAsFloatEdgeCase06
File: datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestDurationDeserialization.java
Repository: FasterXML/jackson-modules-java8
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-1000873
|
MEDIUM
| 4.3
|
FasterXML/jackson-modules-java8
|
testDeserializationAsFloatEdgeCase06
|
datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestDurationDeserialization.java
|
ba27ce5909dfb49bcaf753ad3e04ecb980010b0b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Object removeObject(Object key) {
return delegate.removeObject(key);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeObject
File: src/main/java/org/apache/ibatis/cache/decorators/SerializedCache.java
Repository: mybatis/mybatis-3
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2020-26945
|
MEDIUM
| 5.1
|
mybatis/mybatis-3
|
removeObject
|
src/main/java/org/apache/ibatis/cache/decorators/SerializedCache.java
|
9caf480e05c389548c9889362c2cb080d728b5d8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test(expected = DateTimeException.class)
public void testDeserializationAsFloatEdgeCase03() throws Exception
{
// Instant can't go this low
String input = Instant.MIN.getEpochSecond() + ".1";
MAPPER.readValue(input, Instant.class);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: testDeserializationAsFloatEdgeCase03
File: datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestInstantSerialization.java
Repository: FasterXML/jackson-modules-java8
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-1000873
|
MEDIUM
| 4.3
|
FasterXML/jackson-modules-java8
|
testDeserializationAsFloatEdgeCase03
|
datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestInstantSerialization.java
|
ba27ce5909dfb49bcaf753ad3e04ecb980010b0b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean startViewServer(int port) {
if (isSystemSecure()) {
return false;
}
if (!checkCallingPermission(Manifest.permission.DUMP, "startViewServer")) {
return false;
}
if (port < 1024) {
return false;
}
if (mViewServer != null) {
if (!mViewServer.isRunning()) {
try {
return mViewServer.start();
} catch (IOException e) {
Slog.w(TAG, "View server did not start");
}
}
return false;
}
try {
mViewServer = new ViewServer(this, port);
return mViewServer.start();
} catch (IOException e) {
Slog.w(TAG, "View server did not start");
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startViewServer
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
|
startViewServer
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
public void add(org.xwiki.rest.model.jaxb.Object obj) throws Exception
{
add(obj, true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: add
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
|
add
|
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
|
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
| 0
|
Analyze the following code function for security vulnerabilities
|
private UserAccounts getUserAccountsNotChecked(int userId) {
synchronized (mUsers) {
UserAccounts accounts = mUsers.get(userId);
boolean validateAccounts = false;
if (accounts == null) {
File preNDbFile = new File(mInjector.getPreNDatabaseName(userId));
File deDbFile = new File(mInjector.getDeDatabaseName(userId));
accounts = new UserAccounts(mContext, userId, preNDbFile, deDbFile);
mUsers.append(userId, accounts);
purgeOldGrants(accounts);
AccountManager.invalidateLocalAccountsDataCaches();
validateAccounts = true;
}
// open CE database if necessary
if (!accounts.accountsDb.isCeDatabaseAttached() && mLocalUnlockedUsers.get(userId)) {
Log.i(TAG, "User " + userId + " is unlocked - opening CE database");
synchronized (accounts.dbLock) {
synchronized (accounts.cacheLock) {
File ceDatabaseFile = new File(mInjector.getCeDatabaseName(userId));
accounts.accountsDb.attachCeDatabase(ceDatabaseFile);
}
}
syncDeCeAccountsLocked(accounts);
}
if (validateAccounts) {
validateAccountsInternal(accounts, true /* invalidateAuthenticatorCache */);
}
return accounts;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserAccountsNotChecked
File: services/core/java/com/android/server/accounts/AccountManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-502"
] |
CVE-2023-45777
|
HIGH
| 7.8
|
android
|
getUserAccountsNotChecked
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
private void processPluginUpgradeSqlFile(File localFilePath, PackageType xmlPackage) {
File pluginUpgradeSqlFile = new File(localFilePath + File.separator + pluginProperties.getUpgradeDbSql());
if (pluginUpgradeSqlFile.exists()) {
String keyName = xmlPackage.getName() + "/" + xmlPackage.getVersion() + "/"
+ pluginProperties.getUpgradeDbSql();
log.info("Uploading upgrade sql {} to MinIO {}", pluginUpgradeSqlFile.getAbsolutePath(), keyName);
String upgradeSqlUrl = s3Client.uploadFile(pluginProperties.getPluginPackageBucketName(), keyName,
pluginUpgradeSqlFile);
log.info("Upgrade sql {} has been uploaded to MinIO {}", pluginProperties.getUpgradeDbSql(), upgradeSqlUrl);
} else {
log.info("Upgrade sql {} is not included in package.", pluginProperties.getUpgradeDbSql());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: processPluginUpgradeSqlFile
File: platform-core/src/main/java/com/webank/wecube/platform/core/service/plugin/PluginArtifactsMgmtService.java
Repository: WeBankPartners/wecube-platform
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-45746
|
MEDIUM
| 5
|
WeBankPartners/wecube-platform
|
processPluginUpgradeSqlFile
|
platform-core/src/main/java/com/webank/wecube/platform/core/service/plugin/PluginArtifactsMgmtService.java
|
1164dae43c505f8a0233cc049b2689d6ca6d0c37
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean getAdaptiveFetch() throws SQLException {
checkClosed();
return adaptiveFetch;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAdaptiveFetch
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
|
getAdaptiveFetch
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
public PdfObject getPdfObjectRelease(int idx) {
PdfObject obj = getPdfObject(idx);
releaseLastXrefPartial();
return obj;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPdfObjectRelease
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
|
getPdfObjectRelease
|
java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
|
9b0cbb76c8434a8505f02ada02a94263dcae9247
| 0
|
Analyze the following code function for security vulnerabilities
|
@GET
@Path("posts/{messageKey}/attachments")
@Operation(summary = "Get attachments", description = "Retrieves the attachments of the message.")
@ApiResponse(responseCode = "200", description = "Ok.")
@ApiResponse(responseCode = "404", description = "The message not found")
@Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
public Response getAttachments(@PathParam("messageKey") Long messageKey, @Context UriInfo uriInfo) {
//load message
Message mess = fom.loadMessage(messageKey);
if(mess == null) {
return Response.serverError().status(Status.NOT_FOUND).build();
}
if(!forum.equalsByPersistableKey(mess.getForum())) {
return Response.serverError().status(Status.CONFLICT).build();
}
FileVO[] attachments = getAttachments(mess, uriInfo);
return Response.ok(attachments).build();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAttachments
File: src/main/java/org/olat/modules/fo/restapi/ForumWebService.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-41242
|
HIGH
| 7.9
|
OpenOLAT
|
getAttachments
|
src/main/java/org/olat/modules/fo/restapi/ForumWebService.java
|
c450df7d7ffe6afde39ebca6da9136f1caa16ec4
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getUserAccessCondition( CurrentUserGroupInfo currentUserGroupInfo, String access )
{
String userUid = currentUserGroupInfo.getUserUID();
return Stream.of(
jsonbFunction( HAS_USER_ID, userUid ),
jsonbFunction( CHECK_USER_ACCESS, userUid, access ) )
.collect( joining( " and ", "(", ")" ) );
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserAccessCondition
File: dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/association/ProgramOrganisationUnitAssociationsQueryBuilder.java
Repository: dhis2/dhis2-core
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-24848
|
MEDIUM
| 6.5
|
dhis2/dhis2-core
|
getUserAccessCondition
|
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/association/ProgramOrganisationUnitAssociationsQueryBuilder.java
|
3b245d04a58b78f0dc9bae8559f36ee4ca36dfac
| 0
|
Analyze the following code function for security vulnerabilities
|
SparseArray<ActivityInterceptorCallback> getActivityInterceptorCallbacks() {
return mActivityInterceptorCallbacks;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getActivityInterceptorCallbacks
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
|
getActivityInterceptorCallbacks
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void onPrepareDialog(int id, Dialog dialog) {
super.onPrepareDialog(id, dialog);
mCurrentDialogId = id;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onPrepareDialog
File: src/com/android/phone/settings/VoicemailSettingsActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-862"
] |
CVE-2023-35665
|
HIGH
| 7.8
|
android
|
onPrepareDialog
|
src/com/android/phone/settings/VoicemailSettingsActivity.java
|
674039e70e1c5bf29b808899ac80c709acc82290
| 0
|
Analyze the following code function for security vulnerabilities
|
protected HeaderEntry<K, V> newHeaderEntry(int h, K name, V value, HeaderEntry<K, V> next) {
return new HeaderEntry<K, V>(h, name, value, next, head);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: newHeaderEntry
File: codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-436",
"CWE-113"
] |
CVE-2022-41915
|
MEDIUM
| 6.5
|
netty
|
newHeaderEntry
|
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
|
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
| 0
|
Analyze the following code function for security vulnerabilities
|
public static EndElement getNextEndElement(XMLEventReader xmlEventReader) throws ParsingException {
try {
while (xmlEventReader.hasNext()) {
XMLEvent xmlEvent = xmlEventReader.nextEvent();
if (xmlEvent == null || xmlEvent.isEndElement())
return (EndElement) xmlEvent;
}
} catch (XMLStreamException e) {
throw logger.parserException(e);
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNextEndElement
File: saml-core/src/main/java/org/keycloak/saml/common/util/StaxParserUtil.java
Repository: keycloak
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2017-2582
|
MEDIUM
| 4
|
keycloak
|
getNextEndElement
|
saml-core/src/main/java/org/keycloak/saml/common/util/StaxParserUtil.java
|
0cb5ba0f6e83162d221681f47b470c3042eef237
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isInSourceViewMode()
{
String currentURL = getDriver().getCurrentUrl();
return currentURL.contains("/view/") && currentURL.contains("viewer=code");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isInSourceViewMode
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
|
isInSourceViewMode
|
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
|
@Reference
public void setSecurityService(SecurityService securityService) {
this.securityService = securityService;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSecurityService
File: modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/impl/IngestServiceImpl.java
Repository: opencast
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2022-29237
|
MEDIUM
| 5.5
|
opencast
|
setSecurityService
|
modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/impl/IngestServiceImpl.java
|
8d5ec1614eed109b812bc27b0c6d3214e456d4e7
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isUidDeviceOwnerLocked(int appUid) {
ensureLocked();
final String deviceOwnerPackageName = mOwners.getDeviceOwnerComponent()
.getPackageName();
try {
String[] pkgs = mInjector.getIPackageManager().getPackagesForUid(appUid);
if (pkgs == null) {
return false;
}
for (String pkg : pkgs) {
if (deviceOwnerPackageName.equals(pkg)) {
return true;
}
}
} catch (RemoteException e) {
return false;
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isUidDeviceOwnerLocked
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
|
isUidDeviceOwnerLocked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequiresPermission(value = android.Manifest.permission.INTERACT_ACROSS_USERS,
conditional = true)
public @Nullable ComponentName getProfileOwnerAsUser(@NonNull UserHandle user) {
if (mService != null) {
try {
return mService.getProfileOwnerAsUser(user.getIdentifier());
} catch (RemoteException re) {
throw re.rethrowFromSystemServer();
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProfileOwnerAsUser
File: core/java/android/app/admin/DevicePolicyManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
getProfileOwnerAsUser
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
private NetworkAgentConfig getNetworkAgentConfigInternal(WifiConfiguration config) {
boolean explicitlySelected = false;
// Non primary CMMs is never user selected. This prevents triggering the No Internet
// dialog for those networks, which is difficult to handle.
if (isPrimary() && isRecentlySelectedByTheUser(config)) {
// If explicitlySelected is true, the network was selected by the user via Settings
// or QuickSettings. If this network has Internet access, switch to it. Otherwise,
// switch to it only if the user confirms that they really want to switch, or has
// already confirmed and selected "Don't ask again".
explicitlySelected =
mWifiPermissionsUtil.checkNetworkSettingsPermission(config.lastConnectUid);
if (mVerboseLoggingEnabled) {
log("Network selected by UID " + config.lastConnectUid
+ " explicitlySelected=" + explicitlySelected);
}
}
NetworkAgentConfig.Builder naConfigBuilder = new NetworkAgentConfig.Builder()
.setLegacyType(ConnectivityManager.TYPE_WIFI)
.setLegacyTypeName(NETWORKTYPE)
.setExplicitlySelected(explicitlySelected)
.setUnvalidatedConnectivityAcceptable(
explicitlySelected && config.noInternetAccessExpected)
.setPartialConnectivityAcceptable(config.noInternetAccessExpected);
if (config.carrierMerged) {
String subscriberId = null;
TelephonyManager subMgr = mTelephonyManager.createForSubscriptionId(
config.subscriptionId);
if (subMgr != null) {
subscriberId = subMgr.getSubscriberId();
}
if (subscriberId != null) {
naConfigBuilder.setSubscriberId(subscriberId);
}
}
if (mVcnManager == null && SdkLevel.isAtLeastS()) {
mVcnManager = mContext.getSystemService(VcnManager.class);
}
if (mVcnManager != null && mVcnPolicyChangeListener == null) {
mVcnPolicyChangeListener = new WifiVcnNetworkPolicyChangeListener();
mVcnManager.addVcnNetworkPolicyChangeListener(new HandlerExecutor(getHandler()),
mVcnPolicyChangeListener);
}
return naConfigBuilder.build();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNetworkAgentConfigInternal
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
|
getNetworkAgentConfigInternal
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void engineUpdateAAD(byte[] input, int inputOffset, int inputLen) {
if (aad == null) {
aad = Arrays.copyOfRange(input, inputOffset, inputLen);
} else {
int newSize = aad.length + inputLen;
byte[] newaad = new byte[newSize];
System.arraycopy(aad, 0, newaad, 0, aad.length);
System.arraycopy(input, inputOffset, newaad, aad.length, inputLen);
aad = newaad;
}
}
|
Vulnerability Classification:
- CWE: CWE-264
- CVE: CVE-2016-2461
- Severity: HIGH
- CVSS Score: 7.6
Description: Fix updateAAD when offset is not 0
Due to AAD data not being reset when a Cipher instance was re-used, this
bug was never uncovered by tests that actually exercise this case.
(cherry picked from commit 95cf7b9b7fbabb77cd341f17da79c947bcc934ab)
Bug: 27696681
Bug: 27324690
Change-Id: Iae9b5794f212a8fc4eeff2a651332e7490f5cada
Function: engineUpdateAAD
File: src/main/java/org/conscrypt/OpenSSLCipher.java
Repository: android
Fixed Code:
protected void engineUpdateAAD(byte[] input, int inputOffset, int inputLen) {
if (aad == null) {
aad = Arrays.copyOfRange(input, inputOffset, inputOffset + inputLen);
} else {
int newSize = aad.length + inputLen;
byte[] newaad = new byte[newSize];
System.arraycopy(aad, 0, newaad, 0, aad.length);
System.arraycopy(input, inputOffset, newaad, aad.length, inputLen);
aad = newaad;
}
}
|
[
"CWE-264"
] |
CVE-2016-2461
|
HIGH
| 7.6
|
android
|
engineUpdateAAD
|
src/main/java/org/conscrypt/OpenSSLCipher.java
|
1638945d4ed9403790962ec7abed1b7a232a9ff8
| 1
|
Analyze the following code function for security vulnerabilities
|
public void removeSettingsForPackageLocked(String packageName, int userId) {
// Global and secure settings are signature protected. Apps signed
// by the platform certificate are generally not uninstalled and
// the main exception is tests. We trust components signed
// by the platform certificate and do not do a clean up after them.
final int systemKey = makeKey(SETTINGS_TYPE_SYSTEM, userId);
SettingsState systemSettings = mSettingsStates.get(systemKey);
if (systemSettings != null) {
systemSettings.removeSettingsForPackageLocked(packageName);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeSettingsForPackageLocked
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
|
removeSettingsForPackageLocked
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
ff86ff28cf82124f8e65833a2dd8c319aea08945
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<SelectOption> getPlatformOptions() {
List<SelectOption> options = getPluginManager().getPluginMetaInfoList()
.stream()
.map(pluginMetaInfo -> new SelectOption(pluginMetaInfo.getLabel(), pluginMetaInfo.getKey()))
.collect(Collectors.toList());
List<ServiceIntegration> integrations = baseIntegrationService.getAll(SessionUtils.getCurrentWorkspaceId());
// 过滤掉服务集成中没有的选项
return options.stream()
.filter(option ->
integrations.stream()
.filter(integration -> StringUtils.equals(integration.getPlatform(), option.getValue()))
.collect(Collectors.toList()).size() > 0
)
.distinct()
.collect(Collectors.toList());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPlatformOptions
File: test-track/backend/src/main/java/io/metersphere/service/PlatformPluginService.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2022-23544
|
MEDIUM
| 6.1
|
metersphere
|
getPlatformOptions
|
test-track/backend/src/main/java/io/metersphere/service/PlatformPluginService.java
|
d0f95b50737c941b29d507a4cc3545f2dc6ab121
| 0
|
Analyze the following code function for security vulnerabilities
|
public @Nullable BigDecimal getBigDecimal(
int columnIndex, int scale) throws SQLException {
connection.getLogger().log(Level.FINEST, " getBigDecimal columnIndex: {0}", columnIndex);
return (BigDecimal) getNumeric(columnIndex, scale, false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getBigDecimal
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
|
getBigDecimal
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
public static int numberOfLines(@Nonnull final String text) {
int result = 1;
for (int i = 0; i < text.length(); i++) {
if (text.charAt(i) == '\n') {
result++;
}
}
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: numberOfLines
File: mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java
Repository: raydac/netbeans-mmd-plugin
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000542
|
MEDIUM
| 6.8
|
raydac/netbeans-mmd-plugin
|
numberOfLines
|
mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java
|
9fba652bf06e649186b8f9e612d60e9cc15097e9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public ParceledListSlice<SecurityEvent> retrievePreRebootSecurityLogs(ComponentName admin,
String packageName) {
if (!mHasFeature) {
return null;
}
final CallerIdentity caller = getCallerIdentity(admin, packageName);
if (admin != null) {
Preconditions.checkCallAuthorization(
isProfileOwnerOfOrganizationOwnedDevice(caller)
|| isDefaultDeviceOwner(caller));
} else {
// A delegate app passes a null admin component, which is expected
Preconditions.checkCallAuthorization(
isCallerDelegate(caller, DELEGATION_SECURITY_LOGGING));
}
Preconditions.checkCallAuthorization(isOrganizationOwnedDeviceWithManagedProfile()
|| areAllUsersAffiliatedWithDeviceLocked());
DevicePolicyEventLogger
.createEvent(DevicePolicyEnums.RETRIEVE_PRE_REBOOT_SECURITY_LOGS)
.setAdmin(caller.getComponentName())
.write();
if (!mContext.getResources().getBoolean(R.bool.config_supportPreRebootSecurityLogs)
|| !mInjector.securityLogGetLoggingEnabledProperty()) {
return null;
}
recordSecurityLogRetrievalTime();
ArrayList<SecurityEvent> output = new ArrayList<SecurityEvent>();
try {
SecurityLog.readPreviousEvents(output);
int enabledUser = getSecurityLoggingEnabledUser();
if (enabledUser != UserHandle.USER_ALL) {
SecurityLog.redactEvents(output, enabledUser);
}
return new ParceledListSlice<SecurityEvent>(output);
} catch (IOException e) {
Slogf.w(LOG_TAG, "Fail to read previous events" , e);
return new ParceledListSlice<SecurityEvent>(Collections.<SecurityEvent>emptyList());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: retrievePreRebootSecurityLogs
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
|
retrievePreRebootSecurityLogs
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean equals(Object other) {
final World ref = worldRef.get();
if (ref == null) {
return false;
} else if (other == null) {
return false;
} else if ((other instanceof BukkitWorld)) {
World otherWorld = ((BukkitWorld) other).worldRef.get();
return ref.equals(otherWorld);
} else if (other instanceof com.sk89q.worldedit.world.World) {
return ((com.sk89q.worldedit.world.World) other).getName().equals(ref.getName());
} else {
return false;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: equals
File: worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java
Repository: IntellectualSites/FastAsyncWorldEdit
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-35925
|
MEDIUM
| 5.5
|
IntellectualSites/FastAsyncWorldEdit
|
equals
|
worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java
|
3a8dfb4f7b858a439c35f7af1d56d21f796f61f5
| 0
|
Analyze the following code function for security vulnerabilities
|
private SAML11AttributeStatementType createAttributeStatement(List<String> roles) {
SAML11AttributeStatementType attrStatement = null;
for (String role : roles) {
if (attrStatement == null) {
attrStatement = new SAML11AttributeStatementType();
}
SAML11AttributeType attr = new SAML11AttributeType("Role", URI.create("urn:picketlink:role"));
attr.add(role);
attrStatement.add(attr);
}
return attrStatement;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createAttributeStatement
File: picketlink-tomcat-common/src/main/java/org/picketlink/identity/federation/bindings/tomcat/idp/AbstractIDPValve.java
Repository: picketlink/picketlink-bindings
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2015-3158
|
MEDIUM
| 4
|
picketlink/picketlink-bindings
|
createAttributeStatement
|
picketlink-tomcat-common/src/main/java/org/picketlink/identity/federation/bindings/tomcat/idp/AbstractIDPValve.java
|
341a37aefd69e67b6b5f6d775499730d6ccaff0d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Transactional
@Override
public void clone(Project project, String repositoryUrl) {
Project parent = project.getParent();
if (parent != null && parent.isNew())
create(parent);
dao.persist(project);
User user = SecurityUtils.getUser();
UserAuthorization authorization = new UserAuthorization();
authorization.setProject(project);
authorization.setUser(user);
authorization.setRole(roleManager.getOwner());
project.getUserAuthorizations().add(authorization);
user.getAuthorizations().add(authorization);
userAuthorizationManager.save(authorization);
FileUtils.cleanDir(project.getGitDir());
new CloneCommand(project.getGitDir()).mirror(true).from(repositoryUrl).call();
checkSanity(project);
listenerRegistry.post(new ProjectCreated(project));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clone
File: server-core/src/main/java/io/onedev/server/entitymanager/impl/DefaultProjectManager.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2022-39205
|
CRITICAL
| 9.8
|
theonedev/onedev
|
clone
|
server-core/src/main/java/io/onedev/server/entitymanager/impl/DefaultProjectManager.java
|
f1e97688e4e19d6de1dfa1d00e04655209d39f8e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isCustomMappingValid(BaseClass bclass, String custommapping1)
{
try {
Metadata metadata = this.store.getMetadata(bclass.getName(), custommapping1, null);
return isValidCustomMapping(bclass, metadata);
} catch (Exception e) {
return false;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isCustomMappingValid
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-459"
] |
CVE-2023-36468
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
isCustomMappingValid
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
|
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
| 0
|
Analyze the following code function for security vulnerabilities
|
private void calculateStartAndEndRow() {
this.startRow = this.pageNum > 0 ? (this.pageNum - 1) * this.pageSize : 0;
this.endRow = this.startRow + this.pageSize * (this.pageNum > 0 ? 1 : 0);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: calculateStartAndEndRow
File: src/main/java/com/github/pagehelper/Page.java
Repository: pagehelper/Mybatis-PageHelper
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-28111
|
HIGH
| 7.5
|
pagehelper/Mybatis-PageHelper
|
calculateStartAndEndRow
|
src/main/java/com/github/pagehelper/Page.java
|
554a524af2d2b30d09505516adc412468a84d8fa
| 0
|
Analyze the following code function for security vulnerabilities
|
private static native long nativeGetThemeFreeFunction();
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nativeGetThemeFreeFunction
File: core/java/android/content/res/AssetManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-415"
] |
CVE-2023-40103
|
HIGH
| 7.8
|
android
|
nativeGetThemeFreeFunction
|
core/java/android/content/res/AssetManager.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
private Map.Entry<XMLEvent, Object> getDataEventEntry(XMLEventReader reader, Key key) {
Object value = key.defaultValue;
final Map.Entry<XMLEvent, String> peekEntry = peekRecursively(reader, null);
if (peekEntry.getValue() != null) {
value = key.parseValue(peekEntry.getValue());
}
return new AbstractMap.SimpleEntry<>(peekEntry.getKey(), value);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDataEventEntry
File: core/src/main/java/apoc/export/graphml/XmlGraphMLReader.java
Repository: neo4j/apoc
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2023-23926
|
HIGH
| 8.1
|
neo4j/apoc
|
getDataEventEntry
|
core/src/main/java/apoc/export/graphml/XmlGraphMLReader.java
|
3202b421b21973b2f57a43b33c88f3f6901cfd2a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void unregisterUserSwitchObserver(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(UNREGISTER_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: unregisterUserSwitchObserver
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
unregisterUserSwitchObserver
|
core/java/android/app/ActivityManagerNative.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
private ByteBuffer loadFileFromDir(final File loadPath, final File file) {
try {
if (file.isAbsolute()) {
return isFileWithinDirectory(loadPath, file)
? loadFile(file)
: null;
}
else {
final File f = new File(loadPath, file.getPath());
return f.isFile()
? loadFile(new File(loadPath, file.getPath()))
: null;
}
}
catch (Exception ex) {
throw new VncException(
String.format("Failed to load file '%s'", file.getPath()),
ex);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: loadFileFromDir
File: src/main/java/com/github/jlangch/venice/impl/util/io/LoadPaths.java
Repository: jlangch/venice
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-36007
|
LOW
| 3.3
|
jlangch/venice
|
loadFileFromDir
|
src/main/java/com/github/jlangch/venice/impl/util/io/LoadPaths.java
|
c942c73136333bc493050910f171a48e6f575b23
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void dropRows(JsonArray keys) {
onDropRows(keys);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dropRows
File: server/src/main/java/com/vaadin/data/provider/DataCommunicator.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2021-33609
|
MEDIUM
| 4
|
vaadin/framework
|
dropRows
|
server/src/main/java/com/vaadin/data/provider/DataCommunicator.java
|
9a93593d9f3802d2881fc8ad22dbc210d0d1d295
| 0
|
Analyze the following code function for security vulnerabilities
|
public String[] getCcAddresses() {
return getAddressesFromList(mCc);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCcAddresses
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
|
getCcAddresses
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
public static PatientProgram getClosestFutureProgramEnrollment(Patient patient, Program program, Date date) {
if (patient == null)
throw new IllegalArgumentException("patient should not be null");
if (program == null)
throw new IllegalArgumentException("program should not be null");
if (date == null)
throw new IllegalArgumentException("date should not be null");
if (patient.getPatientId() == null)
return null;
PatientProgram closestProgram = null;
List<PatientProgram> patientPrograms = Context.getProgramWorkflowService().getPatientPrograms(patient, program,
date, null, null, null, false);
for (PatientProgram pp : patientPrograms) {
if ((closestProgram == null || pp.getDateEnrolled().before(closestProgram.getDateEnrolled()))
&& pp.getDateEnrolled().after(date)) {
closestProgram = pp;
}
}
return closestProgram;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getClosestFutureProgramEnrollment
File: api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java
Repository: openmrs/openmrs-module-htmlformentry
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-16521
|
HIGH
| 7.5
|
openmrs/openmrs-module-htmlformentry
|
getClosestFutureProgramEnrollment
|
api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java
|
9dcd304688e65c31cac5532fe501b9816ed975ae
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void postStartActivityDismissingKeyguard(final Intent intent, int delay) {
mHandler.postDelayed(() ->
handleStartActivityDismissingKeyguard(intent, true /*onlyProvisioned*/), delay);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: postStartActivityDismissingKeyguard
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
|
postStartActivityDismissingKeyguard
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean getHintLaunchesActivity() {
return (mFlags & FLAG_HINT_LAUNCHES_ACTIVITY) != 0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getHintLaunchesActivity
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
getHintLaunchesActivity
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setOauthBasePath(String basePath) {
for(Authentication auth : authentications.values()) {
if (auth instanceof OAuth) {
((OAuth) auth).setBasePath(basePath);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setOauthBasePath
File: samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
setOauthBasePath
|
samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
private void dumpInternal(PrintWriter pw) {
JSONObject dump = new JSONObject();
try {
dump.put("service", "Fingerprint Manager");
JSONArray sets = new JSONArray();
for (UserInfo user : UserManager.get(getContext()).getUsers()) {
final int userId = user.getUserHandle().getIdentifier();
final int N = mFingerprintUtils.getFingerprintsForUser(mContext, userId).size();
JSONObject set = new JSONObject();
set.put("id", userId);
set.put("count", N);
sets.put(set);
}
dump.put("prints", sets);
} catch (JSONException e) {
Slog.e(TAG, "dump formatting failure", e);
}
pw.println(dump);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpInternal
File: services/core/java/com/android/server/fingerprint/FingerprintService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
dumpInternal
|
services/core/java/com/android/server/fingerprint/FingerprintService.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int read(byte[] b) throws IOException {
return read(b, 0, b.length);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: read
File: src/main/java/net/lingala/zip4j/io/inputstream/InflaterInputStream.java
Repository: srikanth-lingala/zip4j
The code follows secure coding practices.
|
[
"CWE-346"
] |
CVE-2023-22899
|
MEDIUM
| 5.9
|
srikanth-lingala/zip4j
|
read
|
src/main/java/net/lingala/zip4j/io/inputstream/InflaterInputStream.java
|
ddd8fdc8ad0583eb4a6172dc86c72c881485c55b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public FileOutputStream openStream() throws IOException {
return new FileOutputStream(file, modes.contains(APPEND));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: openStream
File: android/guava/src/com/google/common/io/Files.java
Repository: google/guava
The code follows secure coding practices.
|
[
"CWE-552"
] |
CVE-2023-2976
|
HIGH
| 7.1
|
google/guava
|
openStream
|
android/guava/src/com/google/common/io/Files.java
|
feb83a1c8fd2e7670b244d5afd23cba5aca43284
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public OutputStream createResponseOutputStream() {
return new ResteasyReactiveOutputStream(this);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createResponseOutputStream
File: independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/VertxResteasyReactiveRequestContext.java
Repository: quarkusio/quarkus
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-0981
|
MEDIUM
| 6.5
|
quarkusio/quarkus
|
createResponseOutputStream
|
independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/VertxResteasyReactiveRequestContext.java
|
96c64fd8f09c02a497e2db366c64dd9196582442
| 0
|
Analyze the following code function for security vulnerabilities
|
public void attachFile(List<String> spaces, String page, String name, InputStream is, boolean failIfExists)
throws Exception
{
AttachmentReference reference =
new AttachmentReference(name, new DocumentReference(getCurrentWiki(), spaces, page));
attachFile(reference, is, failIfExists);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: attachFile
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
|
attachFile
|
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 int getResultCode() { return mResultCode; }
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getResultCode
File: core/java/android/app/ActivityOptions.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-20918
|
CRITICAL
| 9.8
|
android
|
getResultCode
|
core/java/android/app/ActivityOptions.java
|
51051de4eb40bb502db448084a83fd6cbfb7d3cf
| 0
|
Analyze the following code function for security vulnerabilities
|
public FilePath getWorkspaceFor(TopLevelItem item) {
for (WorkspaceLocator l : WorkspaceLocator.all()) {
FilePath workspace = l.locate(item, this);
if (workspace != null) {
return workspace;
}
}
return new FilePath(expandVariablesForDirectory(workspaceDir, item));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getWorkspaceFor
File: core/src/main/java/jenkins/model/Jenkins.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-2065
|
MEDIUM
| 4.3
|
jenkinsci/jenkins
|
getWorkspaceFor
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isVisibleToCaller(PhoneAccountHandle accountHandle) {
if (accountHandle == null) {
return false;
}
return isVisibleToCaller(mPhoneAccountRegistrar.getPhoneAccount(accountHandle));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isVisibleToCaller
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
|
isVisibleToCaller
|
src/com/android/server/telecom/TelecomServiceImpl.java
|
2750faaa1ec819eed9acffea7bd3daf867fda444
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isBlockedCandidate() {
return blockedCandidate;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isBlockedCandidate
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
|
isBlockedCandidate
|
activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
|
00921f2
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean canClearIdentity(int callingPid, int callingUid, int userId) {
if (UserHandle.getUserId(callingUid) == userId) {
return true;
}
if (checkComponentPermission(INTERACT_ACROSS_USERS, callingPid,
callingUid, -1, true) == PackageManager.PERMISSION_GRANTED
|| checkComponentPermission(INTERACT_ACROSS_USERS_FULL, callingPid,
callingUid, -1, true) == PackageManager.PERMISSION_GRANTED) {
return true;
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: canClearIdentity
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
|
canClearIdentity
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public void drawImage(Object graphics, Object img, int x, int y, int w, int h) {
((AndroidGraphics) graphics).drawImage(img, x, y, w, h);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: drawImage
File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
drawImage
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean removeBond(BluetoothDevice device) {
enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM, "Need BLUETOOTH ADMIN permission");
DeviceProperties deviceProp = mRemoteDevices.getDeviceProperties(device);
if (deviceProp == null || deviceProp.getBondState() != BluetoothDevice.BOND_BONDED) {
return false;
}
Message msg = mBondStateMachine.obtainMessage(BondStateMachine.REMOVE_BOND);
msg.obj = device;
mBondStateMachine.sendMessage(msg);
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeBond
File: src/com/android/bluetooth/btservice/AdapterService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-362",
"CWE-20"
] |
CVE-2016-3760
|
MEDIUM
| 5.4
|
android
|
removeBond
|
src/com/android/bluetooth/btservice/AdapterService.java
|
122feb9a0b04290f55183ff2f0384c6c53756bd8
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setRowDescriptionGenerator(RowDescriptionGenerator generator,
ContentMode contentMode) {
if (contentMode == null) {
throw new IllegalArgumentException("Content mode cannot be null");
}
rowDescriptionGenerator = generator;
getState().hasDescriptions = (generator != null
|| cellDescriptionGenerator != null);
getState().rowTooltipContentMode = contentMode;
datasourceExtension.refreshCache();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setRowDescriptionGenerator
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
|
setRowDescriptionGenerator
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
public void readDescriptor(InputStream stream) throws XarException, IOException
{
DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder dBuilder;
try {
dBuilder = dbFactory.newDocumentBuilder();
} catch (ParserConfigurationException e) {
throw new XarException("Failed to create a new Document builder", e);
}
Document doc;
try {
// DocumentBuilder#parse close the passed stream which is not what we want
doc = dBuilder.parse(new CloseShieldInputStream(stream));
} catch (SAXException e) {
throw new XarException("Failed to parse XML document", e);
}
// Normalize the document
doc.getDocumentElement().normalize();
// Read the document
NodeList children = doc.getChildNodes();
for (int i = 0; i < children.getLength(); ++i) {
Node node = children.item(i);
if (node.getNodeType() == Node.ELEMENT_NODE) {
Element element = (Element) node;
if (element.getTagName().equals(XarModel.ELEMENT_PACKAGE)) {
readDescriptorPackage(element);
break;
}
}
}
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2023-27480
- Severity: HIGH
- CVSS Score: 7.7
Description: XWIKI-20320: Disallow DOCTYPE in the XAR descriptor
Function: readDescriptor
File: xwiki-platform-core/xwiki-platform-xar/xwiki-platform-xar-model/src/main/java/org/xwiki/xar/XarPackage.java
Repository: xwiki/xwiki-platform
Fixed Code:
public void readDescriptor(InputStream stream) throws XarException, IOException
{
DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder dBuilder;
try {
// Prevent XXE attack
dbFactory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
dBuilder = dbFactory.newDocumentBuilder();
} catch (ParserConfigurationException e) {
throw new XarException("Failed to create a new Document builder", e);
}
Document doc;
try {
// DocumentBuilder#parse close the passed stream which is not what we want
doc = dBuilder.parse(new CloseShieldInputStream(stream));
} catch (SAXException e) {
throw new XarException("Failed to parse XML document", e);
}
// Normalize the document
doc.getDocumentElement().normalize();
// Read the document
NodeList children = doc.getChildNodes();
for (int i = 0; i < children.getLength(); ++i) {
Node node = children.item(i);
if (node.getNodeType() == Node.ELEMENT_NODE) {
Element element = (Element) node;
if (element.getTagName().equals(XarModel.ELEMENT_PACKAGE)) {
readDescriptorPackage(element);
break;
}
}
}
}
|
[
"CWE-611"
] |
CVE-2023-27480
|
HIGH
| 7.7
|
xwiki/xwiki-platform
|
readDescriptor
|
xwiki-platform-core/xwiki-platform-xar/xwiki-platform-xar-model/src/main/java/org/xwiki/xar/XarPackage.java
|
e3527b98fdd8dc8179c24dc55e662b2c55199434
| 1
|
Analyze the following code function for security vulnerabilities
|
@NonNull ActiveAdmin getProfileOwnerLocked(final CallerIdentity caller) {
ensureLocked();
final ComponentName poAdminComponent = mOwners.getProfileOwnerComponent(caller.getUserId());
Preconditions.checkState(poAdminComponent != null,
"No profile owner for user %d", caller.getUid());
ActiveAdmin poAdmin = getUserData(caller.getUserId()).mAdminMap.get(poAdminComponent);
Preconditions.checkState(poAdmin != null,
"No device profile owner for caller %d", caller.getUid());
Preconditions.checkCallAuthorization(poAdmin.getUid() == caller.getUid(),
"Admin %s is not owned by uid %d", poAdminComponent,
caller.getUid());
Preconditions.checkCallAuthorization(
!caller.hasAdminComponent()
|| poAdmin.info.getComponent().equals(caller.getComponentName()),
"Caller component %s is not profile owner",
caller.getComponentName());
return poAdmin;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProfileOwnerLocked
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
|
getProfileOwnerLocked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
protected static List<Node> getChildrenByName(Node node, String name) {
List<Node> matches = new ArrayList<>();
NodeList children = node.getChildNodes();
// search children
for (int i = 0; i < children.getLength(); i++) {
Node child = children.item(i);
if (child.getNodeName().equals(name)) {
matches.add(child);
}
}
return matches;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getChildrenByName
File: src/edu/stanford/nlp/ie/machinereading/common/DomReader.java
Repository: stanfordnlp/CoreNLP
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-3878
|
HIGH
| 7.5
|
stanfordnlp/CoreNLP
|
getChildrenByName
|
src/edu/stanford/nlp/ie/machinereading/common/DomReader.java
|
e5bbe135a02a74b952396751ed3015e8b8252e99
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public PhoneAccountHandle getSimCallManagerForUser(int user) {
synchronized (mLock) {
try {
Log.startSession("TSI.gSCMFU");
final int callingUid = Binder.getCallingUid();
if (user != ActivityManager.getCurrentUser()) {
enforceCrossUserPermission(callingUid);
}
long token = Binder.clearCallingIdentity();
try {
return mPhoneAccountRegistrar.getSimCallManager(UserHandle.of(user));
} finally {
Binder.restoreCallingIdentity(token);
}
} catch (Exception e) {
Log.e(this, e, "getSimCallManager");
throw e;
} finally {
Log.endSession();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSimCallManagerForUser
File: src/com/android/server/telecom/TelecomServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21394
|
MEDIUM
| 5.5
|
android
|
getSimCallManagerForUser
|
src/com/android/server/telecom/TelecomServiceImpl.java
|
68dca62035c49e14ad26a54f614199cb29a3393f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
@Contract(pure = true)
public static MethodHandles.Lookup getTrusted() {
SecurityCheck.LIMITER.preGetTrustedLookup(null);
return RootLookupHolder.ROOT;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTrusted
File: api/src/main/java/io/github/karlatemp/unsafeaccessor/Root.java
Repository: Karlatemp/UnsafeAccessor
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-31139
|
MEDIUM
| 4.3
|
Karlatemp/UnsafeAccessor
|
getTrusted
|
api/src/main/java/io/github/karlatemp/unsafeaccessor/Root.java
|
4ef83000184e8f13239a1ea2847ee401d81585fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setUpdateDate(Date updateDate) {
this.updateDate = updateDate;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUpdateDate
File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/trade/TradeOrder.java
Repository: sanluan/PublicCMS
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-21333
|
LOW
| 3.5
|
sanluan/PublicCMS
|
setUpdateDate
|
publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/trade/TradeOrder.java
|
b4d5956e65b14347b162424abb197a180229b3db
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void reportSuccessfulPasswordAttempt(int userHandle) {
Preconditions.checkArgumentNonnegative(userHandle, "Invalid userId");
final CallerIdentity caller = getCallerIdentity();
Preconditions.checkCallAuthorization(hasFullCrossUsersPermission(caller, userHandle));
Preconditions.checkCallAuthorization(hasCallingOrSelfPermission(BIND_DEVICE_ADMIN));
synchronized (getLockObject()) {
DevicePolicyData policy = getUserData(userHandle);
if (policy.mFailedPasswordAttempts != 0 || policy.mPasswordOwner >= 0) {
mInjector.binderWithCleanCallingIdentity(() -> {
policy.mFailedPasswordAttempts = 0;
policy.mPasswordOwner = -1;
saveSettingsLocked(userHandle);
if (mHasFeature) {
sendAdminCommandForLockscreenPoliciesLocked(
DeviceAdminReceiver.ACTION_PASSWORD_SUCCEEDED,
DeviceAdminInfo.USES_POLICY_WATCH_LOGIN, userHandle);
}
});
}
}
if (mInjector.securityLogIsLoggingEnabled()) {
SecurityLog.writeEvent(SecurityLog.TAG_KEYGUARD_DISMISS_AUTH_ATTEMPT, /*result*/ 1,
/*method strength*/ 1);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: reportSuccessfulPasswordAttempt
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
|
reportSuccessfulPasswordAttempt
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public int getPasswordQuality(@Nullable ComponentName admin) {
return getPasswordQuality(admin, myUserId());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPasswordQuality
File: core/java/android/app/admin/DevicePolicyManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
getPasswordQuality
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setAlwaysFinish(boolean enabled) {
enforceCallingPermission(android.Manifest.permission.SET_ALWAYS_FINISH,
"setAlwaysFinish()");
long ident = Binder.clearCallingIdentity();
try {
Settings.Global.putInt(
mContext.getContentResolver(),
Settings.Global.ALWAYS_FINISH_ACTIVITIES, enabled ? 1 : 0);
synchronized (this) {
mAlwaysFinishActivities = enabled;
}
} finally {
Binder.restoreCallingIdentity(ident);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAlwaysFinish
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
|
setAlwaysFinish
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
private UserSummary toUserResponse(User user, boolean includePermissions, Optional<AllUserSessions> optSessions) {
final Set<String> roleIds = user.getRoleIds();
Set<String> roleNames = Collections.emptySet();
if (!roleIds.isEmpty()) {
roleNames = userManagementService.getRoleNames(user);
if (roleNames.isEmpty()) {
LOG.error("Unable to load role names for role IDs {} for user {}", roleIds, user);
}
}
boolean sessionActive = false;
Date lastActivity = null;
String clientAddress = null;
if (optSessions.isPresent()) {
final AllUserSessions sessions = optSessions.get();
final Optional<MongoDbSession> mongoDbSession = sessions.forUser(user);
if (mongoDbSession.isPresent()) {
final MongoDbSession session = mongoDbSession.get();
sessionActive = true;
lastActivity = session.getLastAccessTime();
clientAddress = session.getHost();
}
}
List<WildcardPermission> wildcardPermissions;
List<GRNPermission> grnPermissions;
if (includePermissions) {
wildcardPermissions = userManagementService.getWildcardPermissionsForUser(user);
grnPermissions = userManagementService.getGRNPermissionsForUser(user);
} else {
wildcardPermissions = ImmutableList.of();
grnPermissions = ImmutableList.of();
}
return UserSummary.create(
user.getId(),
user.getName(),
user.getEmail(),
user.getFirstName().orElse(null),
user.getLastName().orElse(null),
user.getFullName(),
wildcardPermissions,
grnPermissions,
user.getPreferences(),
user.getTimeZone() == null ? null : user.getTimeZone().getID(),
user.getSessionTimeoutMs(),
user.isReadOnly(),
user.isExternalUser(),
user.getStartpage(),
roleNames,
sessionActive,
lastActivity,
clientAddress,
user.getAccountStatus(),
user.isServiceAccount()
);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toUserResponse
File: graylog2-server/src/main/java/org/graylog2/rest/resources/users/UsersResource.java
Repository: Graylog2/graylog2-server
The code follows secure coding practices.
|
[
"CWE-613"
] |
CVE-2023-41041
|
LOW
| 3.1
|
Graylog2/graylog2-server
|
toUserResponse
|
graylog2-server/src/main/java/org/graylog2/rest/resources/users/UsersResource.java
|
bb88f3d0b2b0351669ab32c60b595ab7242a3fe3
| 0
|
Analyze the following code function for security vulnerabilities
|
@LogMessage(level = Level.WARN)
@Message(id = 714, value = "HttpContextLifecycle guard leak detected. The Servlet container is not fully compliant. The value was {0}", format = Format.MESSAGE_FORMAT)
void guardLeak(int value);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: guardLeak
File: impl/src/main/java/org/jboss/weld/logging/ServletLogger.java
Repository: weld/core
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2014-8122
|
MEDIUM
| 4.3
|
weld/core
|
guardLeak
|
impl/src/main/java/org/jboss/weld/logging/ServletLogger.java
|
8e413202fa1af08c09c580f444e4fd16874f9c65
| 0
|
Analyze the following code function for security vulnerabilities
|
public static int size2(Object o) throws Exception {
if(o==null) return 0;
return ASTSizeFunction.sizeOf(o,Introspector.getUberspect());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: size2
File: core/src/main/java/hudson/Functions.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-310"
] |
CVE-2014-2061
|
MEDIUM
| 5
|
jenkinsci/jenkins
|
size2
|
core/src/main/java/hudson/Functions.java
|
bf539198564a1108b7b71a973bf7de963a6213ef
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public SerializationServiceBuilder setByteOrder(ByteOrder byteOrder) {
this.byteOrder = byteOrder;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setByteOrder
File: hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/DefaultSerializationServiceBuilder.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
setByteOrder
|
hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/DefaultSerializationServiceBuilder.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
public NMapRun getResult() {
OnePassParser parser = new OnePassParser() ;
NMapRun nmapRun = parser.parse(results.getOutput(), OnePassParser.STRING_INPUT ) ;
return nmapRun ;
}
|
Vulnerability Classification:
- CWE: CWE-78
- CVE: CVE-2018-17228
- Severity: HIGH
- CVSS Score: 7.5
Description: Adding hosts validation fixing https://github.com/narkisr/nmap4j/issues/9
Function: getResult
File: src/main/java/org/nmap4j/Nmap4j.java
Repository: narkisr/nmap4j
Fixed Code:
public NMapRun getResult() {
OnePassParser parser = new OnePassParser();
NMapRun nmapRun = parser.parse(results.getOutput(), OnePassParser.STRING_INPUT);
return nmapRun;
}
|
[
"CWE-78"
] |
CVE-2018-17228
|
HIGH
| 7.5
|
narkisr/nmap4j
|
getResult
|
src/main/java/org/nmap4j/Nmap4j.java
|
06b58aa3345d2f977553685a026b93e61f0c491e
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public CommandData getCommandData() {
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCommandData
File: src/main/java/de/presti/ree6/commands/impl/community/RedditNotifier.java
Repository: Ree6-Applications/Ree6
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-39302
|
MEDIUM
| 5.4
|
Ree6-Applications/Ree6
|
getCommandData
|
src/main/java/de/presti/ree6/commands/impl/community/RedditNotifier.java
|
459b5bc24f0ea27e50031f563373926e94b9aa0a
| 0
|
Analyze the following code function for security vulnerabilities
|
public ModalDialog setDraggable(final boolean draggable)
{
this.draggable = draggable;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDraggable
File: src/main/java/org/projectforge/web/dialog/ModalDialog.java
Repository: micromata/projectforge-webapp
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2013-7251
|
MEDIUM
| 6.8
|
micromata/projectforge-webapp
|
setDraggable
|
src/main/java/org/projectforge/web/dialog/ModalDialog.java
|
422de35e3c3141e418a73bfb39b430d5fd74077e
| 0
|
Analyze the following code function for security vulnerabilities
|
private static boolean isSplitConfigurationChange(int configDiff) {
return (configDiff & (ActivityInfo.CONFIG_LOCALE | ActivityInfo.CONFIG_DENSITY)) != 0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isSplitConfigurationChange
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
|
isSplitConfigurationChange
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String getHomeUrlWithHostNotProtocol(HttpServletRequest request) {
return request.getHeader("host") + request.getContextPath() + "/";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getHomeUrlWithHostNotProtocol
File: common/src/main/java/com/zrlog/web/util/WebTools.java
Repository: 94fzb/zrlog
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-21316
|
MEDIUM
| 4.3
|
94fzb/zrlog
|
getHomeUrlWithHostNotProtocol
|
common/src/main/java/com/zrlog/web/util/WebTools.java
|
b921c1ae03b8290f438657803eee05226755c941
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nonnull
@Override
public List<IBaseResource> getResources(final int theFromIndex, final int theToIndex) {
TransactionTemplate template = new TransactionTemplate(myTxManager);
template.execute(new TransactionCallbackWithoutResult() {
@Override
protected void doInTransactionWithoutResult(@Nonnull TransactionStatus theStatus) {
boolean entityLoaded = ensureSearchEntityLoaded();
assert entityLoaded;
}
});
assert mySearchEntity != null;
assert mySearchEntity.getSearchType() != null;
switch (mySearchEntity.getSearchType()) {
case HISTORY:
return template.execute(theStatus -> doHistoryInTransaction(theFromIndex, theToIndex));
case SEARCH:
case EVERYTHING:
default:
List<IBaseResource> retVal = doSearchOrEverything(theFromIndex, theToIndex);
/*
* If we got fewer resources back than we asked for, it's possible that the search
* completed. If that's the case, the cached version of the search entity is probably
* no longer valid so let's force a reload if it gets asked for again (most likely
* because someone is calling size() on us)
*/
if (retVal.size() < theToIndex - theFromIndex) {
mySearchEntity = null;
}
return retVal;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getResources
File: hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaBundleProvider.java
Repository: hapifhir/hapi-fhir
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-32053
|
MEDIUM
| 5
|
hapifhir/hapi-fhir
|
getResources
|
hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaBundleProvider.java
|
a5e4f56e1c6f55093ff334cf698ffdeea2f33960
| 0
|
Analyze the following code function for security vulnerabilities
|
public void pushPacket(IPacket packet,
IOFSwitch sw,
OFBufferId bufferId,
OFPort inPort,
OFPort outPort,
FloodlightContext cntx,
boolean flush) {
if (log.isTraceEnabled()) {
log.trace("PacketOut srcSwitch={} inPort={} outPort={}",
new Object[] {sw, inPort, outPort});
}
OFPacketOut.Builder pob = sw.getOFFactory().buildPacketOut();
// set actions
List<OFAction> actions = new ArrayList<OFAction>();
actions.add(sw.getOFFactory().actions().buildOutput().setPort(outPort).setMaxLen(Integer.MAX_VALUE).build());
pob.setActions(actions);
// set buffer_id, in_port
pob.setBufferId(bufferId);
pob.setInPort(inPort);
// set data - only if buffer_id == -1
if (pob.getBufferId() == OFBufferId.NO_BUFFER) {
if (packet == null) {
log.error("BufferId is not set and packet data is null. " +
"Cannot send packetOut. " +
"srcSwitch={} inPort={} outPort={}",
new Object[] {sw, inPort, outPort});
return;
}
byte[] packetData = packet.serialize();
pob.setData(packetData);
}
counterPacketOut.increment();
sw.write(pob.build());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: pushPacket
File: src/main/java/net/floodlightcontroller/loadbalancer/LoadBalancer.java
Repository: floodlight
The code follows secure coding practices.
|
[
"CWE-362",
"CWE-476"
] |
CVE-2015-6569
|
MEDIUM
| 4.3
|
floodlight
|
pushPacket
|
src/main/java/net/floodlightcontroller/loadbalancer/LoadBalancer.java
|
7f5bedb625eec3ff4d29987c31cef2553a962b36
| 0
|
Analyze the following code function for security vulnerabilities
|
private List<Block> parsePlainText(String content)
{
if (StringUtils.isEmpty(content)) {
return Collections.emptyList();
}
try {
return this.plainTextParser.parse(new StringReader(content)).getChildren().get(0).getChildren();
} catch (ParseException e) {
// This shouldn't happen since the parser cannot throw an exception since the source is a memory
// String.
throw new RuntimeException("Failed to parse [" + content + "] as plain text", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parsePlainText
File: xwiki-platform-core/xwiki-platform-rendering/xwiki-platform-rendering-macros/xwiki-platform-rendering-macro-rss/src/main/java/org/xwiki/rendering/internal/macro/rss/RssMacro.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-29202
|
CRITICAL
| 9
|
xwiki/xwiki-platform
|
parsePlainText
|
xwiki-platform-core/xwiki-platform-rendering/xwiki-platform-rendering-macros/xwiki-platform-rendering-macro-rss/src/main/java/org/xwiki/rendering/internal/macro/rss/RssMacro.java
|
5c7ebe47c2897e92d8f04fe2e15027e84dc3ec03
| 0
|
Analyze the following code function for security vulnerabilities
|
public BaseClass getRedirectClass(XWikiContext context) throws XWikiException
{
return getMandatoryClass(context, new DocumentReference(context.getWikiId(), SYSTEM_SPACE, "GlobalRedirect"));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRedirectClass
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
|
getRedirectClass
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception {
if (evt instanceof HttpExpectationFailedEvent) {
switch (currentState) {
case READ_FIXED_LENGTH_CONTENT:
case READ_VARIABLE_LENGTH_CONTENT:
case READ_CHUNK_SIZE:
reset();
break;
default:
break;
}
}
super.userEventTriggered(ctx, evt);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: userEventTriggered
File: codec-http/src/main/java/io/netty/handler/codec/http/HttpObjectDecoder.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-444"
] |
CVE-2019-16869
|
MEDIUM
| 5
|
netty
|
userEventTriggered
|
codec-http/src/main/java/io/netty/handler/codec/http/HttpObjectDecoder.java
|
39cafcb05c99f2aa9fce7e6597664c9ed6a63a95
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void killForegroundAppsForUser(int userHandle) {
synchronized (ActivityManagerService.this) {
final ArrayList<ProcessRecord> procs = new ArrayList<>();
final int NP = mProcessNames.getMap().size();
for (int ip = 0; ip < NP; ip++) {
final SparseArray<ProcessRecord> apps = mProcessNames.getMap().valueAt(ip);
final int NA = apps.size();
for (int ia = 0; ia < NA; ia++) {
final ProcessRecord app = apps.valueAt(ia);
if (app.persistent) {
// We don't kill persistent processes.
continue;
}
if (app.removed) {
procs.add(app);
} else if (app.userId == userHandle && app.foregroundActivities) {
app.removed = true;
procs.add(app);
}
}
}
final int N = procs.size();
for (int i = 0; i < N; i++) {
removeProcessLocked(procs.get(i), false, true, "kill all fg");
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: killForegroundAppsForUser
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
|
killForegroundAppsForUser
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public CommitException getCause() {
return cause;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCause
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
|
getCause
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
public static List<Structure> getStructuresByUser(User user, String condition, String orderBy,int limit,int offset,String direction) {
PaginatedArrayList<Structure> structures = new PaginatedArrayList<Structure>();
List<Permissionable> toReturn = new ArrayList<Permissionable>();
int internalLimit = 500;
int internalOffset = 0;
boolean done = false;
List<Structure> resultList = new ArrayList<Structure>();
HibernateUtil dh = new HibernateUtil(Structure.class);
int countLimit = 100;
int size = 0;
try {
String type = ((Inode) Structure.class.newInstance()).getType();
String query = "from inode in class " + Structure.class.getName();
// condition
query += (UtilMethods.isSet(condition) ? " where inode.type ='"+type+"' and " + condition : " where inode.type ='"+type+"'");
// order
query += (UtilMethods.isSet(orderBy) ? " order by " + orderBy + "" : "");
query += ((UtilMethods.isSet(orderBy) && UtilMethods.isSet(direction)) ? " " + direction : "");
dh.setQuery(query.toString());
while(!done) {
dh.setFirstResult(internalOffset);
dh.setMaxResults(internalLimit);
resultList = dh.list();
PermissionAPI permAPI = APILocator.getPermissionAPI();
toReturn.addAll(permAPI.filterCollection(resultList, PermissionAPI.PERMISSION_READ, false, user));
if(countLimit > 0 && toReturn.size() >= countLimit + offset)
done = true;
else if(resultList.size() < internalLimit)
done = true;
internalOffset += internalLimit;
}
if(offset > toReturn.size()) {
size = 0;
} else if(countLimit > 0) {
int toIndex = offset + countLimit > toReturn.size()?toReturn.size():offset + countLimit;
size = toReturn.subList(offset, toIndex).size();
} else if (offset > 0) {
size = toReturn.subList(offset, toReturn.size()).size();
}
structures.setTotalResults(size);
int from = offset<toReturn.size()?offset:0;
int pageLimit = 0;
for(int i=from;i<toReturn.size();i++){
if(pageLimit<limit || limit<=0){
structures.add((Structure) toReturn.get(i));
pageLimit+=1;
}else{
break;
}
}
} catch (Exception e) {
Logger.warn(StructureFactory.class, "getStructuresByUser failed:" + e, e);
throw new DotRuntimeException(e.toString());
}
return structures;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStructuresByUser
File: src/com/dotmarketing/portlets/structure/factories/StructureFactory.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-2355
|
HIGH
| 7.5
|
dotCMS/core
|
getStructuresByUser
|
src/com/dotmarketing/portlets/structure/factories/StructureFactory.java
|
897f3632d7e471b7a73aabed5b19f6f53d4e5562
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean startUserInBackground(int userid) throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeInt(userid);
mRemote.transact(START_USER_IN_BACKGROUND_TRANSACTION, data, reply, 0);
reply.readException();
boolean result = reply.readInt() != 0;
reply.recycle();
data.recycle();
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startUserInBackground
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
startUserInBackground
|
core/java/android/app/ActivityManagerNative.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean matches(InetAddress address) {
var entry = address.getAddress();
if (entry.length != min.length) return false;
for (var i = 0; i < entry.length; i++) {
var value = 0xFF & entry[i];
if (value < (0xFF & min[i]) || value > (0xFF & max[i])) return false;
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: matches
File: projects/core/src/main/java/dan200/computercraft/core/apis/http/options/AddressPredicate.java
Repository: cc-tweaked/CC-Tweaked
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2023-37262
|
HIGH
| 8.8
|
cc-tweaked/CC-Tweaked
|
matches
|
projects/core/src/main/java/dan200/computercraft/core/apis/http/options/AddressPredicate.java
|
4bbde8c50c00bc572578ab2cff609b3443d10ddf
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.