instruction
string | input
string | output
string | cwe_ids
list | cve_id
string | severity
string | cvss_score
float64 | repo_name
string | func_name
string | file_path
string | commit_hash
string | is_vulnerable
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Analyze the following code function for security vulnerabilities
|
@Override
public void onChildItemClicked(long idFeed, Long optional_folder_id) {
if (binding.drawerLayout != null)
binding.drawerLayout.closeDrawer(GravityCompat.START);
updateDetailFragment(idFeed, false, optional_folder_id, true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onChildItemClicked
File: News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java
Repository: nextcloud/news-android
The code follows secure coding practices.
|
[
"CWE-829"
] |
CVE-2021-41256
|
MEDIUM
| 5.8
|
nextcloud/news-android
|
onChildItemClicked
|
News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java
|
05449cb666059af7de2302df9d5c02997a23df85
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
public PastePopupMenu getPastePopupForTest() {
return getPastePopup();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPastePopupForTest
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-1021"
] |
CVE-2015-1241
|
MEDIUM
| 4.3
|
chromium
|
getPastePopupForTest
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
9d343ad2ea6ec395c377a4efa266057155bfa9c1
| 0
|
Analyze the following code function for security vulnerabilities
|
private int getVisibleDatasetsMaxCount() {
if (AutofillManagerService.getVisibleDatasetsMaxCount() > 0) {
final int maxCount = AutofillManagerService.getVisibleDatasetsMaxCount();
if (sVerbose) {
Slog.v(TAG, "overriding maximum visible datasets to " + maxCount);
}
return maxCount;
} else {
return mContext.getResources()
.getInteger(com.android.internal.R.integer.autofill_max_visible_datasets);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getVisibleDatasetsMaxCount
File: services/autofill/java/com/android/server/autofill/ui/DialogFillUi.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-610"
] |
CVE-2023-40133
|
MEDIUM
| 5.5
|
android
|
getVisibleDatasetsMaxCount
|
services/autofill/java/com/android/server/autofill/ui/DialogFillUi.java
|
08becc8c600f14c5529115cc1a1e0c97cd503f33
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getSentTo() {
return sentTo;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSentTo
File: src/main/java/emissary/pickup/WorkBundle.java
Repository: NationalSecurityAgency/emissary
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2021-32634
|
MEDIUM
| 6.5
|
NationalSecurityAgency/emissary
|
getSentTo
|
src/main/java/emissary/pickup/WorkBundle.java
|
40260b1ec1f76cc92361702cc14fa1e4388e19d7
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getMobilePhone(final User user) throws IOException {
return getContactInfo(user, ContactType.mobilePhone.toString());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMobilePhone
File: opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
Repository: OpenNMS/opennms
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2021-25931
|
MEDIUM
| 6.8
|
OpenNMS/opennms
|
getMobilePhone
|
opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
|
607151ea8f90212a3fb37c977fa57c7d58d26a84
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void putValue(String name, Object value) {
if (name == null) {
throw new NullPointerException("name");
}
if (value == null) {
throw new NullPointerException("value");
}
Map<String, Object> values = this.values;
if (values == null) {
// Use size of 2 to keep the memory overhead small
values = this.values = new HashMap<String, Object>(2);
}
Object old = values.put(name, value);
if (value instanceof SSLSessionBindingListener) {
((SSLSessionBindingListener) value).valueBound(new SSLSessionBindingEvent(this, name));
}
notifyUnbound(old, name);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: putValue
File: handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-835"
] |
CVE-2016-4970
|
HIGH
| 7.8
|
netty
|
putValue
|
handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java
|
bc8291c80912a39fbd2303e18476d15751af0bf1
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void visitIconUri(@NonNull Consumer<Uri> visitor, @Nullable Icon icon) {
if (icon == null) return;
final int iconType = icon.getType();
if (iconType == TYPE_URI || iconType == TYPE_URI_ADAPTIVE_BITMAP) {
visitor.accept(icon.getUri());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: visitIconUri
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
visitIconUri
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
private EntityReferenceSerializer<String> getDefaultEntityReferenceSerializer()
{
if (this.defaultEntityReferenceSerializer == null) {
this.defaultEntityReferenceSerializer = Utils.getComponent(EntityReferenceSerializer.TYPE_STRING);
}
return this.defaultEntityReferenceSerializer;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDefaultEntityReferenceSerializer
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
|
getDefaultEntityReferenceSerializer
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
public int checkGrantUriPermission(int callingUid, String targetPkg,
Uri uri, int modeFlags, int userId) throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeInt(callingUid);
data.writeString(targetPkg);
uri.writeToParcel(data, 0);
data.writeInt(modeFlags);
data.writeInt(userId);
mRemote.transact(CHECK_GRANT_URI_PERMISSION_TRANSACTION, data, reply, 0);
reply.readException();
int res = reply.readInt();
data.recycle();
reply.recycle();
return res;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkGrantUriPermission
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
checkGrantUriPermission
|
core/java/android/app/ActivityManagerNative.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
public static int copyRestricted(InputStream in, OutputStream out) throws IOException
{
return copy(in, out, IO_BUFFER_SIZE, MAX_SIZE);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: copyRestricted
File: src/main/java/com/mxgraph/online/Utils.java
Repository: jgraph/drawio
The code follows secure coding practices.
|
[
"CWE-284",
"CWE-79"
] |
CVE-2022-3065
|
HIGH
| 7.5
|
jgraph/drawio
|
copyRestricted
|
src/main/java/com/mxgraph/online/Utils.java
|
59887e45b36f06c8dd4919a32bacd994d9f084da
| 0
|
Analyze the following code function for security vulnerabilities
|
private SSLEngineResult.HandshakeStatus getHandshakeStatus(int pending) {
// Check if we are in the initial handshake phase or shutdown phase
return needPendingStatus() ? pendingStatus(pending) : NOT_HANDSHAKING;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getHandshakeStatus
File: handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-835"
] |
CVE-2016-4970
|
HIGH
| 7.8
|
netty
|
getHandshakeStatus
|
handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java
|
bc8291c80912a39fbd2303e18476d15751af0bf1
| 0
|
Analyze the following code function for security vulnerabilities
|
private void migrate101(File dataDir, Stack<Integer> versions) {
for (File file: dataDir.listFiles()) {
if (file.getName().startsWith("Settings.xml")) {
VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file);
for (Element element: dom.getRootElement().elements()) {
String key = element.elementTextTrim("key");
if (key.equals("JOB_EXECUTORS")) {
Element valueElement = element.element("value");
if (valueElement != null) {
for (Element executorElement: valueElement.elements())
executorElement.addElement("shellAccessEnabled").setText("false");
}
}
}
dom.writeToFile(file, false);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: migrate101
File: server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-338"
] |
CVE-2023-24828
|
HIGH
| 8.8
|
theonedev/onedev
|
migrate101
|
server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
|
d67dd9686897fe5e4ab881d749464aa7c06a68e5
| 0
|
Analyze the following code function for security vulnerabilities
|
private void backupInputDatas(String val, BulkAssessmentDatas datas, VFSContainer tmpDir) {
VFSLeaf inputFile = null;
if(StringHelper.containsNonWhitespace(datas.getDataBackupFile())) {
inputFile = VFSManager.olatRootLeaf(datas.getDataBackupFile());
}
if(inputFile == null) {
String inputFilename = UUID.randomUUID().toString() + ".csv";
inputFile = tmpDir.createChildLeaf(inputFilename);
}
try(OutputStream out = inputFile.getOutputStream(false)) {
IOUtils.write(val, out, StandardCharsets.UTF_8);
datas.setDataBackupFile(inputFile.getRelPath());
} catch (IOException e) {
logError("", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: backupInputDatas
File: src/main/java/org/olat/course/assessment/bulk/DataStepForm.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-39180
|
HIGH
| 9
|
OpenOLAT
|
backupInputDatas
|
src/main/java/org/olat/course/assessment/bulk/DataStepForm.java
|
5668a41ab3f1753102a89757be013487544279d5
| 0
|
Analyze the following code function for security vulnerabilities
|
public OutputPrefixType getOutputPrefixType() {
return outputPrefixType;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getOutputPrefixType
File: java_src/src/main/java/com/google/crypto/tink/PrimitiveSet.java
Repository: tink-crypto/tink
The code follows secure coding practices.
|
[
"CWE-176"
] |
CVE-2020-8929
|
MEDIUM
| 5
|
tink-crypto/tink
|
getOutputPrefixType
|
java_src/src/main/java/com/google/crypto/tink/PrimitiveSet.java
|
93d839a5865b9d950dffdc9d0bc99b71280a8899
| 0
|
Analyze the following code function for security vulnerabilities
|
private CompletableFuture<Void> buildInvalidateFutures(String[] cacheNames, Object key) {
List<CompletableFuture<Boolean>> futures = new ArrayList<>();
for (String cacheName : cacheNames) {
AsyncCache<?> asyncCache = cacheManager.getCache(cacheName).async();
futures.add(asyncCache.invalidate(key));
}
CompletableFuture[] futureArray = futures.toArray(new CompletableFuture[0]);
return CompletableFuture.allOf(futureArray);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: buildInvalidateFutures
File: runtime/src/main/java/io/micronaut/cache/interceptor/CacheInterceptor.java
Repository: micronaut-projects/micronaut-core
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-21700
|
MEDIUM
| 5
|
micronaut-projects/micronaut-core
|
buildInvalidateFutures
|
runtime/src/main/java/io/micronaut/cache/interceptor/CacheInterceptor.java
|
b8ec32c311689667c69ae7d9f9c3b3a8abc96fe3
| 0
|
Analyze the following code function for security vulnerabilities
|
private void notifyMinimumRequiredWifiSecurityLevelChanged(int level) {
mInjector.binderWithCleanCallingIdentity(
() -> mInjector.getWifiManager()
.notifyMinimumRequiredWifiSecurityLevelChanged(level));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: notifyMinimumRequiredWifiSecurityLevelChanged
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
|
notifyMinimumRequiredWifiSecurityLevelChanged
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public abstract BaseXMLBuilder ns(String prefix, String namespaceURI);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: ns
File: src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
Repository: jmurty/java-xmlbuilder
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2014-125087
|
MEDIUM
| 5.2
|
jmurty/java-xmlbuilder
|
ns
|
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
|
e6fddca201790abab4f2c274341c0bb8835c3e73
| 0
|
Analyze the following code function for security vulnerabilities
|
final void setDouble(CharSequence name, double value) {
set(name, String.valueOf(value));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDouble
File: core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2019-16771
|
MEDIUM
| 5
|
line/armeria
|
setDouble
|
core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
|
b597f7a865a527a84ee3d6937075cfbb4470ed20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setVr2dDisplayId(int vr2dDisplayId) {
if (DEBUG_STACK) {
Slog.d(TAG, "setVr2dDisplayId called for: " +
vr2dDisplayId);
}
synchronized (ActivityManagerService.this) {
mVr2dDisplayId = vr2dDisplayId;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setVr2dDisplayId
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
|
setVr2dDisplayId
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean checkAdminPassword(String password) {
if (adminPassword == null) {
return false;
}
byte[] salt = Arrays.copyOf(adminPassword, 32);
byte[] hash = new byte[32];
System.arraycopy(adminPassword, 32, hash, 0, 32);
return Utils.compareSecure(hash, SHA256.getHashWithSalt(password.getBytes(StandardCharsets.UTF_8), salt));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkAdminPassword
File: h2/src/main/org/h2/server/web/WebServer.java
Repository: h2database
The code follows secure coding practices.
|
[
"CWE-312"
] |
CVE-2022-45868
|
HIGH
| 7.8
|
h2database
|
checkAdminPassword
|
h2/src/main/org/h2/server/web/WebServer.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 0
|
Analyze the following code function for security vulnerabilities
|
private String showStatusPage(HttpServletRequest request, HttpServletResponse response) {
Map<String, String> modelMap = new HashMap<>();
modelMap.put("REPLACED_BY_GO:application.css", railsAssetsService.getAssetPath("application.css"));
modelMap.put("REPLACED_BY_GO:patterns/application.css", railsAssetsService.getAssetPath("patterns/application.css"));
modelMap.put("REPLACED_BY_GO:application.js", railsAssetsService.getAssetPath("application.js"));
modelMap.put("REPLACED_BY_GO:cruise.ico", railsAssetsService.getAssetPath("cruise.ico"));
if (addOnConfiguration.isServerInStandby()) {
return viewResolver.resolveView("standby_dashboard", modelMap);
} else {
return viewResolver.resolveView("error", modelMap);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: showStatusPage
File: server/src/main/java/com/thoughtworks/go/addon/businesscontinuity/standby/controller/DashBoardController.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2021-43287
|
MEDIUM
| 5
|
gocd
|
showStatusPage
|
server/src/main/java/com/thoughtworks/go/addon/businesscontinuity/standby/controller/DashBoardController.java
|
41abc210ac4e8cfa184483c9ff1c0cc04fb3511c
| 0
|
Analyze the following code function for security vulnerabilities
|
@NonNull
public Builder setLocalOnly(boolean localOnly) {
setFlag(FLAG_LOCAL_ONLY, localOnly);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setLocalOnly
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
setLocalOnly
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
public User getUser()
{
return this.xwiki.getUser(getXWikiContext());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUser
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2023-37911
|
MEDIUM
| 6.5
|
xwiki/xwiki-platform
|
getUser
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
|
f471f2a392aeeb9e51d59fdfe1d76fccf532523f
| 0
|
Analyze the following code function for security vulnerabilities
|
void onMagnificationChanged(@NonNull MagnificationController controller,
@NonNull Region region, float scale, float centerX, float centerY);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onMagnificationChanged
File: core/java/android/accessibilityservice/AccessibilityService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3923
|
MEDIUM
| 4.3
|
android
|
onMagnificationChanged
|
core/java/android/accessibilityservice/AccessibilityService.java
|
5f256310187b4ff2f13a7abb9afed9126facd7bc
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onVolumeForgotten(String fsUuid) {
if (TextUtils.isEmpty(fsUuid)) {
Slog.w(TAG, "Forgetting internal storage is probably a mistake; ignoring");
return;
}
// Remove any apps installed on the forgotten volume
synchronized (mPackages) {
final List<PackageSetting> packages = mSettings.getVolumePackagesLPr(fsUuid);
for (PackageSetting ps : packages) {
Slog.d(TAG, "Destroying " + ps.name + " because volume was forgotten");
deletePackage(ps.name, new LegacyPackageDeleteObserver(null).getBinder(),
UserHandle.USER_OWNER, PackageManager.DELETE_ALL_USERS);
}
mSettings.onVolumeForgotten(fsUuid);
mSettings.writeLPr();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onVolumeForgotten
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
|
onVolumeForgotten
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean isAdmin(HttpServletRequest request) {
return request.isUserInRole(Config.DEFAULT_ADMIN_ROLE);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isAdmin
File: src/main/java/com/openkm/servlet/admin/BaseServlet.java
Repository: openkm/document-management-system
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2021-3628
|
LOW
| 3.5
|
openkm/document-management-system
|
isAdmin
|
src/main/java/com/openkm/servlet/admin/BaseServlet.java
|
c96f2e33adab3bbf550977b1b62acaa54f86fa03
| 0
|
Analyze the following code function for security vulnerabilities
|
public ValueInstantiator constructValueInstantiator(DeserializationContext ctxt)
throws JsonMappingException
{
final DeserializationConfig config = ctxt.getConfig();
final JavaType delegateType = _computeDelegateType(ctxt,
_creators[C_DELEGATE], _delegateArgs);
final JavaType arrayDelegateType = _computeDelegateType(ctxt,
_creators[C_ARRAY_DELEGATE], _arrayDelegateArgs);
final JavaType type = _beanDesc.getType();
StdValueInstantiator inst = new StdValueInstantiator(config, type);
inst.configureFromObjectSettings(_creators[C_DEFAULT], _creators[C_DELEGATE],
delegateType, _delegateArgs, _creators[C_PROPS],
_propertyBasedArgs);
inst.configureFromArraySettings(_creators[C_ARRAY_DELEGATE],
arrayDelegateType, _arrayDelegateArgs);
inst.configureFromStringCreator(_creators[C_STRING]);
inst.configureFromIntCreator(_creators[C_INT]);
inst.configureFromLongCreator(_creators[C_LONG]);
inst.configureFromDoubleCreator(_creators[C_DOUBLE]);
inst.configureFromBooleanCreator(_creators[C_BOOLEAN]);
return inst;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: constructValueInstantiator
File: src/main/java/com/fasterxml/jackson/databind/deser/impl/CreatorCollector.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2019-16942
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
constructValueInstantiator
|
src/main/java/com/fasterxml/jackson/databind/deser/impl/CreatorCollector.java
|
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void serviceInit(ServiceInitEvent event) {
VaadinService service = event.getSource();
VaadinContext context = service.getContext();
checkLicense(service.getDeploymentConfiguration());
// associate servlet context with Vaadin servlet/service
context.setAttribute(VaadinServletMarker.class, MARKER_INSTANCE);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: serviceInit
File: flow-osgi/src/main/java/com/vaadin/flow/osgi/support/OSGiVaadinInitialization.java
Repository: vaadin/osgi
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-31407
|
MEDIUM
| 5
|
vaadin/osgi
|
serviceInit
|
flow-osgi/src/main/java/com/vaadin/flow/osgi/support/OSGiVaadinInitialization.java
|
0b82a606eeafdf56a129630f00b9c55a5177b64b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isSafeOperation(@OperationSafetyReason int reason) {
if (VERBOSE_LOG) {
Slogf.v(LOG_TAG, "checking isSafeOperation(%s) using mSafetyChecker %s",
DevicePolicyManager.operationSafetyReasonToString(reason), mSafetyChecker);
}
return mSafetyChecker == null ? true : mSafetyChecker.isSafeOperation(reason);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isSafeOperation
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
|
isSafeOperation
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getActivityStackId(IBinder token) throws RemoteException {
synchronized (this) {
ActivityStack stack = ActivityRecord.getStackLocked(token);
if (stack == null) {
return INVALID_STACK_ID;
}
return stack.mStackId;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getActivityStackId
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3912
|
HIGH
| 9.3
|
android
|
getActivityStackId
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
public ACL getACL() {
return Jenkins.getInstance().getACL();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getACL
File: core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2014-2064
|
MEDIUM
| 5
|
jenkinsci/jenkins
|
getACL
|
core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java
|
fbf96734470caba9364f04e0b77b0bae7293a1ec
| 0
|
Analyze the following code function for security vulnerabilities
|
public void enforceSystemHasVrFeature() {
if (!mContext.getPackageManager().hasSystemFeature(
PackageManager.FEATURE_VR_MODE_HIGH_PERFORMANCE)) {
throw new UnsupportedOperationException("VR mode not supported on this device!");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: enforceSystemHasVrFeature
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
|
enforceSystemHasVrFeature
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
public void addCustomDhcpOptions(@NonNull WifiSsid ssid, @NonNull byte[] oui,
@NonNull List<DhcpOption> options) {
mCustomDhcpOptions.put(new NetworkIdentifier(ssid, oui), options);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addCustomDhcpOptions
File: service/java/com/android/server/wifi/WifiConfigManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
addCustomDhcpOptions
|
service/java/com/android/server/wifi/WifiConfigManager.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isEditorActive() {
return editorActive;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isEditorActive
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
|
isEditorActive
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean releaseActivityInstance(IBinder token) throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeStrongBinder(token);
mRemote.transact(RELEASE_ACTIVITY_INSTANCE_TRANSACTION, data, reply, 0);
reply.readException();
boolean res = reply.readInt() != 0;
data.recycle();
reply.recycle();
return res;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: releaseActivityInstance
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
releaseActivityInstance
|
core/java/android/app/ActivityManagerNative.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public Document toXMLDocument(boolean bWithObjects, boolean bWithRendering, boolean bWithAttachmentContent,
boolean bWithVersions, XWikiContext context) throws XWikiException
{
Document doc = new DOMDocument();
DOMXMLWriter wr = new DOMXMLWriter(doc, new OutputFormat("", true, context.getWiki().getEncoding()));
try {
toXML(wr, bWithObjects, bWithRendering, bWithAttachmentContent, bWithVersions, context);
return doc;
} catch (IOException e) {
throw new RuntimeException(e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toXMLDocument
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
|
toXMLDocument
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setVersion(String version) {
this.version = version;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setVersion
File: base/common/src/main/java/org/dogtagpki/common/Info.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
setVersion
|
base/common/src/main/java/org/dogtagpki/common/Info.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean getBooleanAttributeValue(StartElement startElement, String tag, boolean defaultValue) {
String result = null;
Attribute attr = startElement.getAttributeByName(new QName(tag));
if (attr != null)
result = getAttributeValue(attr);
if (result == null) return defaultValue;
return Boolean.valueOf(result);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getBooleanAttributeValue
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
|
getBooleanAttributeValue
|
saml-core/src/main/java/org/keycloak/saml/common/util/StaxParserUtil.java
|
0cb5ba0f6e83162d221681f47b470c3042eef237
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isDrawShadowFast() {
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isDrawShadowFast
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
|
isDrawShadowFast
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public void clearApplicationUserData(@NonNull ComponentName admin,
@NonNull String packageName, @NonNull @CallbackExecutor Executor executor,
@NonNull OnClearApplicationUserDataListener listener) {
throwIfParentInstance("clearAppData");
Objects.requireNonNull(executor);
Objects.requireNonNull(listener);
try {
mService.clearApplicationUserData(admin, packageName,
new IPackageDataObserver.Stub() {
public void onRemoveCompleted(String pkg, boolean succeeded) {
executor.execute(() ->
listener.onApplicationUserDataCleared(pkg, succeeded));
}
});
} catch (RemoteException re) {
throw re.rethrowFromSystemServer();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearApplicationUserData
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
|
clearApplicationUserData
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@UnstableApi
public ServerBuilder idleTimeout(Duration idleTimeout, boolean keepAliveOnPing) {
requireNonNull(idleTimeout, "idleTimeout");
idleTimeoutMillis = validateIdleTimeoutMillis(idleTimeout.toMillis());
this.keepAliveOnPing = keepAliveOnPing;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: idleTimeout
File: core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-44487
|
HIGH
| 7.5
|
line/armeria
|
idleTimeout
|
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
|
df7f85824a62e997b910b5d6194a3335841065fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getURLToDeletePage(EntityReference reference, boolean affectChildren)
{
String queryString = "confirm=1&async=false";
if (affectChildren) {
queryString += "&affectChildren=true";
}
return getURL(reference, "delete", queryString);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getURLToDeletePage
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
|
getURLToDeletePage
|
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 long readI64() throws TException {
return zigzagToLong(readVarint64());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readI64
File: thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java
Repository: facebook/fbthrift
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2019-11938
|
MEDIUM
| 5
|
facebook/fbthrift
|
readI64
|
thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java
|
08c2d412adb214c40bb03be7587057b25d053030
| 0
|
Analyze the following code function for security vulnerabilities
|
public void updatePersistentConfiguration(Configuration values) {
enforceCallingPermission(android.Manifest.permission.CHANGE_CONFIGURATION,
"updateConfiguration()");
enforceWriteSettingsPermission("updateConfiguration()");
if (values == null) {
throw new NullPointerException("Configuration must not be null");
}
synchronized(this) {
final long origId = Binder.clearCallingIdentity();
updateConfigurationLocked(values, null, true, false);
Binder.restoreCallingIdentity(origId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updatePersistentConfiguration
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2500
|
MEDIUM
| 4.3
|
android
|
updatePersistentConfiguration
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
9878bb99b77c3681f0fda116e2964bac26f349c3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void registerPush(Hashtable metaData, boolean noFallback) {
if (getActivity() == null) {
return;
}
boolean has = hasAndroidMarket();
if (!has) {
Log.d("Codename One", "Device doesn't have Android market/google play can't register for push!");
return;
}
String id = (String)metaData.get(com.codename1.push.Push.GOOGLE_PUSH_KEY);
if (id == null) {
id = Display.getInstance().getProperty("gcm.sender_id", null);
}
if(has) {
Log.d("Codename One", "Sending async push request for id: " + id);
((CodenameOneActivity) getActivity()).registerForPush(id);
} else {
PushNotificationService.forceStartService(getActivity().getPackageName() + ".PushNotificationService", getActivity());
if(!registerServerPush(id, getApplicationKey(), (byte)10, "", getPackageName())) {
sendPushRegistrationError("Server registration error", 1);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: registerPush
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
|
registerPush
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void userPresent(int userId) {
checkWritePermission(userId);
mStrongAuth.reportUnlock(userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: userPresent
File: services/core/java/com/android/server/LockSettingsService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3908
|
MEDIUM
| 4.3
|
android
|
userPresent
|
services/core/java/com/android/server/LockSettingsService.java
|
96daf7d4893f614714761af2d53dfb93214a32e4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void test(TestData testData, TaskLogger jobLogger) {
JobLogManager logManager = OneDev.getInstance(JobLogManager.class);
String jobToken = UUID.randomUUID().toString();
logManager.registerLogger(jobToken, jobLogger);
try {
AgentQuery parsedQeury = AgentQuery.parse(agentQuery, true);
OneDev.getInstance(ResourceManager.class).run(new AgentAwareRunnable() {
@Override
public void runOn(Long agentId, Session agentSession, AgentData agentData) {
jobLogger.log(String.format("Testing on agent '%s'...", agentData.getName()));
List<Map<String, String>> registryLogins = new ArrayList<>();
for (RegistryLogin login: getRegistryLogins()) {
registryLogins.add(CollectionUtils.newHashMap(
"url", login.getRegistryUrl(),
"userName", login.getUserName(),
"password", login.getPassword()));
}
TestDockerJobData jobData = new TestDockerJobData(jobToken, testData.getDockerImage(),
registryLogins, getRunOptions());
try {
WebsocketUtils.call(agentSession, jobData, 0);
} catch (InterruptedException | TimeoutException e) {
new Message(MessageType.CANCEL_JOB, jobToken).sendBy(agentSession);
}
}
}, new HashMap<>(), parsedQeury, new HashMap<>(), jobLogger);
} finally {
logManager.deregisterLogger(jobToken);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: test
File: server-plugin/server-plugin-executor-remotedocker/src/main/java/io/onedev/server/plugin/executor/remotedocker/RemoteDockerExecutor.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-610"
] |
CVE-2022-39206
|
CRITICAL
| 9.9
|
theonedev/onedev
|
test
|
server-plugin/server-plugin-executor-remotedocker/src/main/java/io/onedev/server/plugin/executor/remotedocker/RemoteDockerExecutor.java
|
0052047a5b5095ac6a6b4a73a522d0272fec3a22
| 0
|
Analyze the following code function for security vulnerabilities
|
private void logRecord(String action, String tableName, long accountId,
UserAccounts userAccount, int callingUid) {
class LogRecordTask implements Runnable {
private final String action;
private final String tableName;
private final long accountId;
private final UserAccounts userAccount;
private final int callingUid;
private final long userDebugDbInsertionPoint;
LogRecordTask(final String action,
final String tableName,
final long accountId,
final UserAccounts userAccount,
final int callingUid,
final long userDebugDbInsertionPoint) {
this.action = action;
this.tableName = tableName;
this.accountId = accountId;
this.userAccount = userAccount;
this.callingUid = callingUid;
this.userDebugDbInsertionPoint = userDebugDbInsertionPoint;
}
@Override
public void run() {
synchronized (userAccount.accountsDb.mDebugStatementLock) {
SQLiteStatement logStatement = userAccount.accountsDb.getStatementForLogging();
if (logStatement == null) {
return; // Can't log.
}
logStatement.bindLong(1, accountId);
logStatement.bindString(2, action);
logStatement.bindString(3, mDateFormat.format(new Date()));
logStatement.bindLong(4, callingUid);
logStatement.bindString(5, tableName);
logStatement.bindLong(6, userDebugDbInsertionPoint);
try {
logStatement.execute();
} catch (IllegalStateException | SQLiteFullException e) {
// Guard against crash, DB can already be closed
// since this statement is executed on a handler thread
Slog.w(TAG, "Failed to insert a log record. accountId=" + accountId
+ " action=" + action + " tableName=" + tableName + " Error: " + e);
} finally {
logStatement.clearBindings();
}
}
}
}
long insertionPoint = userAccount.accountsDb.reserveDebugDbInsertionPoint();
if (insertionPoint != -1) {
LogRecordTask logTask = new LogRecordTask(action, tableName, accountId, userAccount,
callingUid, insertionPoint);
mHandler.post(logTask);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: logRecord
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
|
logRecord
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
public ServerBuilder defaultServiceNaming(ServiceNaming defaultServiceNaming) {
virtualHostTemplate.defaultServiceNaming(defaultServiceNaming);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: defaultServiceNaming
File: core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-44487
|
HIGH
| 7.5
|
line/armeria
|
defaultServiceNaming
|
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
|
df7f85824a62e997b910b5d6194a3335841065fd
| 0
|
Analyze the following code function for security vulnerabilities
|
private void connectToNetwork(WifiConfiguration config) {
if ((config != null) && mWifiNative.connectToNetwork(mInterfaceName, config)) {
// Update the internal config once the connection request is accepted.
mWifiConfigManager.setNetworkLastUsedSecurityParams(config.networkId,
config.getNetworkSelectionStatus().getCandidateSecurityParams());
mWifiLastResortWatchdog.noteStartConnectTime(config.networkId);
mWifiMetrics.logStaEvent(mInterfaceName, StaEvent.TYPE_CMD_START_CONNECT, config);
mIsAutoRoaming = false;
transitionTo(mL2ConnectingState);
} else {
loge("CMD_START_CONNECT Failed to start connection to network " + config);
mTargetWifiConfiguration = null;
stopIpClient();
reportConnectionAttemptEnd(
WifiMetrics.ConnectionEvent.FAILURE_CONNECT_NETWORK_FAILED,
WifiMetricsProto.ConnectionEvent.HLF_NONE,
WifiMetricsProto.ConnectionEvent.FAILURE_REASON_UNKNOWN);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: connectToNetwork
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
|
connectToNetwork
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
@JsonProperty("preferences")
protected void setPreferences(PreferenceStore preferences) {
if (preferences != null) {
_preferenceStore = preferences;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setPreferences
File: main/src/com/google/refine/io/FileProjectManager.java
Repository: OpenRefine
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2023-37476
|
HIGH
| 7.8
|
OpenRefine
|
setPreferences
|
main/src/com/google/refine/io/FileProjectManager.java
|
e9c1e65d58b47aec8cd676bd5c07d97b002f205e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onSaveInstanceState(Bundle savedInstanceState) {
Intent pendingIntent = pendingViewIntent.peek();
savedInstanceState.putParcelable("intent", pendingIntent != null ? pendingIntent : getIntent());
if (mMenuSearchView != null && mMenuSearchView.isActionViewExpanded()) {
savedInstanceState.putString("search", mSearchEditText != null ? mSearchEditText.getText().toString() : null);
}
super.onSaveInstanceState(savedInstanceState);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onSaveInstanceState
File: src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
onSaveInstanceState
|
src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onBouncerShowingChanged() {
synchronized (KeyguardViewMediator.this) {
if (mKeyguardStateController.isBouncerShowing()) {
mPendingPinLock = false;
}
adjustStatusBarLocked(mKeyguardStateController.isBouncerShowing(), false);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onBouncerShowingChanged
File: packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21267
|
MEDIUM
| 5.5
|
android
|
onBouncerShowingChanged
|
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
|
d18d8b350756b0e89e051736c1f28744ed31e93a
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean updateConfigurationLocked(Configuration values, ActivityRecord starting,
boolean initLocale) {
return updateConfigurationLocked(values, starting, initLocale, false /* deferResume */);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateConfigurationLocked
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
|
updateConfigurationLocked
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void receiveMessage(Map<String, Object> message) {
String userId = (String)message.get(SetiMessage.USER_ID_FIELD);
String channel = (String)message.get(SetiMessage.CHANNEL_FIELD);
Object data = message.get(SetiMessage.DATA_FIELD);
Set<Location> copy = new HashSet<>();
synchronized (_uid2Location) {
Set<Location> locations = _uid2Location.get(userId);
if (locations != null) {
// Consider cometA, cometB and cometC and a user that is associated
// in both cometA and cometB. When cometC sends a message to the user,
// it knows that the user is in both cometA and cometB (thanks to presence
// messages) and will send a message to both cometA and cometB.
// But cometA also knows from presence messages that the user is also in
// cometB and should not forward the message arriving from cometC to cometB
// since cometC will take care of sending to cometB.
// Hence, we forward the message only locally
for (Location location : locations) {
if (location instanceof LocalLocation) {
copy.add(location);
}
}
}
}
if (_logger.isDebugEnabled()) {
_logger.debug("Received message {} for locations {}", message, copy);
}
for (Location location : copy) {
location.receive(userId, channel, data);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: receiveMessage
File: cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Seti.java
Repository: cometd
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-24721
|
MEDIUM
| 5.5
|
cometd
|
receiveMessage
|
cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Seti.java
|
bb445a143fbf320f17c62e340455cd74acfb5929
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int decryptWithAd(byte[] ad, byte[] ciphertext,
int ciphertextOffset, byte[] plaintext, int plaintextOffset,
int length) throws ShortBufferException, BadPaddingException {
int space;
if (ciphertextOffset > ciphertext.length)
space = 0;
else
space = ciphertext.length - ciphertextOffset;
if (length > space)
throw new ShortBufferException();
if (plaintextOffset > plaintext.length)
space = 0;
else
space = plaintext.length - plaintextOffset;
if (!haskey) {
// The key is not set yet - return the ciphertext as-is.
if (length > space)
throw new ShortBufferException();
if (plaintext != ciphertext || plaintextOffset != ciphertextOffset)
System.arraycopy(ciphertext, ciphertextOffset, plaintext, plaintextOffset, length);
return length;
}
if (length < 16)
Noise.throwBadTagException();
int dataLen = length - 16;
if (dataLen > space)
throw new ShortBufferException();
setup(ad);
poly.update(ciphertext, ciphertextOffset, dataLen);
finish(ad, dataLen);
int temp = 0;
for (int index = 0; index < 16; ++index)
temp |= (polyKey[index] ^ ciphertext[ciphertextOffset + dataLen + index]);
if ((temp & 0xFF) != 0)
Noise.throwBadTagException();
encrypt(ciphertext, ciphertextOffset, plaintext, plaintextOffset, dataLen);
return dataLen;
}
|
Vulnerability Classification:
- CWE: CWE-125, CWE-787
- CVE: CVE-2020-25021
- Severity: HIGH
- CVSS Score: 7.5
Description: Improve array bounds checks in CipherState implementations
Thanks to Pietro Oliva for identifying these issues.
Function: decryptWithAd
File: src/main/java/com/southernstorm/noise/protocol/ChaChaPolyCipherState.java
Repository: rweather/noise-java
Fixed Code:
@Override
public int decryptWithAd(byte[] ad, byte[] ciphertext,
int ciphertextOffset, byte[] plaintext, int plaintextOffset,
int length) throws ShortBufferException, BadPaddingException {
int space;
if (ciphertextOffset < 0 || ciphertextOffset > ciphertext.length)
throw new IllegalArgumentException();
else
space = ciphertext.length - ciphertextOffset;
if (length > space)
throw new ShortBufferException();
if (length < 0 || plaintextOffset < 0 || plaintextOffset > plaintext.length)
throw new IllegalArgumentException();
space = plaintext.length - plaintextOffset;
if (!haskey) {
// The key is not set yet - return the ciphertext as-is.
if (length > space)
throw new ShortBufferException();
if (plaintext != ciphertext || plaintextOffset != ciphertextOffset)
System.arraycopy(ciphertext, ciphertextOffset, plaintext, plaintextOffset, length);
return length;
}
if (length < 16)
Noise.throwBadTagException();
int dataLen = length - 16;
if (dataLen > space)
throw new ShortBufferException();
setup(ad);
poly.update(ciphertext, ciphertextOffset, dataLen);
finish(ad, dataLen);
int temp = 0;
for (int index = 0; index < 16; ++index)
temp |= (polyKey[index] ^ ciphertext[ciphertextOffset + dataLen + index]);
if ((temp & 0xFF) != 0)
Noise.throwBadTagException();
encrypt(ciphertext, ciphertextOffset, plaintext, plaintextOffset, dataLen);
return dataLen;
}
|
[
"CWE-125",
"CWE-787"
] |
CVE-2020-25021
|
HIGH
| 7.5
|
rweather/noise-java
|
decryptWithAd
|
src/main/java/com/southernstorm/noise/protocol/ChaChaPolyCipherState.java
|
18e86b6f8bea7326934109aa9ffa705ebf4bde90
| 1
|
Analyze the following code function for security vulnerabilities
|
public void clearAllBackoffsLocked(SyncQueue syncQueue) {
boolean changed = false;
synchronized (mAuthorities) {
// Clear backoff for all sync adapters.
for (AccountInfo accountInfo : mAccounts.values()) {
for (AuthorityInfo authorityInfo : accountInfo.authorities.values()) {
if (authorityInfo.backoffTime != NOT_IN_BACKOFF_MODE
|| authorityInfo.backoffDelay != NOT_IN_BACKOFF_MODE) {
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.v(TAG, "clearAllBackoffsLocked:"
+ " authority:" + authorityInfo.target
+ " account:" + accountInfo.accountAndUser.account.name
+ " user:" + accountInfo.accountAndUser.userId
+ " backoffTime was: " + authorityInfo.backoffTime
+ " backoffDelay was: " + authorityInfo.backoffDelay);
}
authorityInfo.backoffTime = NOT_IN_BACKOFF_MODE;
authorityInfo.backoffDelay = NOT_IN_BACKOFF_MODE;
changed = true;
}
}
}
// Clear backoff for all sync services.
for (ComponentName service : mServices.keySet()) {
SparseArray<AuthorityInfo> aInfos = mServices.get(service);
for (int i = 0; i < aInfos.size(); i++) {
AuthorityInfo authorityInfo = aInfos.valueAt(i);
if (authorityInfo.backoffTime != NOT_IN_BACKOFF_MODE
|| authorityInfo.backoffDelay != NOT_IN_BACKOFF_MODE) {
authorityInfo.backoffTime = NOT_IN_BACKOFF_MODE;
authorityInfo.backoffDelay = NOT_IN_BACKOFF_MODE;
}
}
syncQueue.clearBackoffs();
}
}
if (changed) {
reportChange(ContentResolver.SYNC_OBSERVER_TYPE_SETTINGS);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearAllBackoffsLocked
File: services/core/java/com/android/server/content/SyncStorageEngine.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2016-2424
|
HIGH
| 7.1
|
android
|
clearAllBackoffsLocked
|
services/core/java/com/android/server/content/SyncStorageEngine.java
|
d3383d5bfab296ba3adbc121ff8a7b542bde4afb
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void testSerializationWithTypeInfo01() throws Exception
{
Instant date = Instant.ofEpochSecond(123456789L, 183917322);
ObjectMapper m = newMapper()
.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, true)
.configure(SerializationFeature.WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS, true);
m.addMixIn(Temporal.class, MockObjectConfiguration.class);
String value = m.writeValueAsString(date);
assertEquals("The value is not correct.", "[\"" + Instant.class.getName() + "\",123456789.183917322]", value);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: testSerializationWithTypeInfo01
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
|
testSerializationWithTypeInfo01
|
datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestInstantSerialization.java
|
ba27ce5909dfb49bcaf753ad3e04ecb980010b0b
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean optBoolean(int index) {
return optBoolean(index, false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: optBoolean
File: src/main/java/org/codehaus/jettison/json/JSONArray.java
Repository: jettison-json/jettison
The code follows secure coding practices.
|
[
"CWE-674",
"CWE-787"
] |
CVE-2022-45693
|
HIGH
| 7.5
|
jettison-json/jettison
|
optBoolean
|
src/main/java/org/codehaus/jettison/json/JSONArray.java
|
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
| 0
|
Analyze the following code function for security vulnerabilities
|
public synchronized Http2HeadersStreamSinkChannel createInitialUpgradeResponseStream() {
if (lastGoodStreamId != 0) {
throw new IllegalStateException();
}
updateStreamIdsCountersInHeaders(1);
Http2HeadersStreamSinkChannel stream = new Http2HeadersStreamSinkChannel(this, 1);
StreamHolder streamHolder = new StreamHolder(stream);
streamHolder.sourceClosed = true;
currentStreams.put(1, streamHolder);
receiveConcurrentStreamsAtomicUpdater.getAndIncrement(this);
return stream;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createInitialUpgradeResponseStream
File: core/src/main/java/io/undertow/protocols/http2/Http2Channel.java
Repository: undertow-io/undertow
The code follows secure coding practices.
|
[
"CWE-214"
] |
CVE-2021-3859
|
HIGH
| 7.5
|
undertow-io/undertow
|
createInitialUpgradeResponseStream
|
core/src/main/java/io/undertow/protocols/http2/Http2Channel.java
|
e43f0ada3f4da6e8579e0020cec3cb1a81e487c2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public final int startActivityAsCaller(IApplicationThread caller, String callingPackage,
Intent intent, String resolvedType, IBinder resultTo, String resultWho, int requestCode,
int startFlags, ProfilerInfo profilerInfo, Bundle options, int userId) {
// This is very dangerous -- it allows you to perform a start activity (including
// permission grants) as any app that may launch one of your own activities. So
// we will only allow this to be done from activities that are part of the core framework,
// and then only when they are running as the system.
final ActivityRecord sourceRecord;
final int targetUid;
final String targetPackage;
synchronized (this) {
if (resultTo == null) {
throw new SecurityException("Must be called from an activity");
}
sourceRecord = mStackSupervisor.isInAnyStackLocked(resultTo);
if (sourceRecord == null) {
throw new SecurityException("Called with bad activity token: " + resultTo);
}
if (!sourceRecord.info.packageName.equals("android")) {
throw new SecurityException(
"Must be called from an activity that is declared in the android package");
}
if (sourceRecord.app == null) {
throw new SecurityException("Called without a process attached to activity");
}
if (UserHandle.getAppId(sourceRecord.app.uid) != Process.SYSTEM_UID) {
// This is still okay, as long as this activity is running under the
// uid of the original calling activity.
if (sourceRecord.app.uid != sourceRecord.launchedFromUid) {
throw new SecurityException(
"Calling activity in uid " + sourceRecord.app.uid
+ " must be system uid or original calling uid "
+ sourceRecord.launchedFromUid);
}
}
targetUid = sourceRecord.launchedFromUid;
targetPackage = sourceRecord.launchedFromPackage;
}
if (userId == UserHandle.USER_NULL) {
userId = UserHandle.getUserId(sourceRecord.app.uid);
}
// TODO: Switch to user app stacks here.
try {
int ret = mStackSupervisor.startActivityMayWait(null, targetUid, targetPackage, intent,
resolvedType, null, null, resultTo, resultWho, requestCode, startFlags, null,
null, null, options, userId, null, null);
return ret;
} catch (SecurityException e) {
// XXX need to figure out how to propagate to original app.
// A SecurityException here is generally actually a fault of the original
// calling activity (such as a fairly granting permissions), so propagate it
// back to them.
/*
StringBuilder msg = new StringBuilder();
msg.append("While launching");
msg.append(intent.toString());
msg.append(": ");
msg.append(e.getMessage());
*/
throw e;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startActivityAsCaller
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3833
|
MEDIUM
| 4.3
|
android
|
startActivityAsCaller
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String getStudyMeasurementUnitsSql(int studyId) {
return "select distinct mu.oc_oid as mu_oid, mu.name from event_definition_crf edc, crf_version cv, versioning_map vm, item, measurement_unit mu"
+ " where edc.study_id =" + studyId + " and edc.crf_id = cv.crf_id" + " and cv.crf_version_id = vm.crf_version_id and vm.item_id = item.item_id "
+ " and item.units = mu.name order by mu.oc_oid";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStudyMeasurementUnitsSql
File: core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
Repository: OpenClinica
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-24831
|
HIGH
| 7.5
|
OpenClinica
|
getStudyMeasurementUnitsSql
|
core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
|
b152cc63019230c9973965a98e4386ea5322c18f
| 0
|
Analyze the following code function for security vulnerabilities
|
final void setFocusedActivityLocked(ActivityRecord r, String reason) {
if (mFocusedActivity != r) {
if (DEBUG_FOCUS) Slog.d(TAG, "setFocusedActivityLocked: r=" + r);
mFocusedActivity = r;
if (r.task != null && r.task.voiceInteractor != null) {
startRunningVoiceLocked();
} else {
finishRunningVoiceLocked();
}
mStackSupervisor.setFocusedStack(r, reason + " setFocusedActivity");
if (r != null) {
mWindowManager.setFocusedApp(r.appToken, true);
}
applyUpdateLockStateLocked(r);
}
EventLog.writeEvent(EventLogTags.AM_FOCUSED_ACTIVITY, mCurrentUserId,
mFocusedActivity == null ? "NULL" : mFocusedActivity.shortComponentName);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setFocusedActivityLocked
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3833
|
MEDIUM
| 4.3
|
android
|
setFocusedActivityLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
private void handleGetDefaultLauncher() throws CommandException {
synchronized (mLock) {
parseOptionsLocked(/* takeUser =*/ true);
final String defaultLauncher = getDefaultLauncher(mUserId);
if (defaultLauncher == null) {
throw new CommandException(
"Failed to get the default launcher for user " + mUserId);
}
// Get the class name of the component from PM to keep the old behaviour.
final List<ResolveInfo> allHomeCandidates = new ArrayList<>();
mPackageManagerInternal.getHomeActivitiesAsUser(allHomeCandidates,
getParentOrSelfUserId(mUserId));
for (ResolveInfo ri : allHomeCandidates) {
final ComponentInfo ci = ri.getComponentInfo();
if (ci.packageName.equals(defaultLauncher)) {
getOutPrintWriter().println("Launcher: " + ci.getComponentName());
break;
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleGetDefaultLauncher
File: services/core/java/com/android/server/pm/ShortcutService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40079
|
HIGH
| 7.8
|
android
|
handleGetDefaultLauncher
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
@POST
@Operation(summary = "Post attachment", description = "Upload the attachment of a message, as parameter.")
@ApiResponse(responseCode = "200", description = "Ok.")
@ApiResponse(responseCode = "404", description = " The identity or the portrait not found")
@Path("posts/{messageKey}/attachments")
@Consumes(MediaType.MULTIPART_FORM_DATA)
@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
public Response replyToPostAttachment(@PathParam("messageKey") Long messageKey, @Context HttpServletRequest request) {
InputStream in = null;
MultipartReader partsReader = null;
try {
partsReader = new MultipartReader(request);
File tmpFile = partsReader.getFile();
in = new FileInputStream(tmpFile);
String filename = partsReader.getValue("filename");
return attachToPost(messageKey, filename, in, request);
} catch (FileNotFoundException e) {
log.error("", e);
return Response.serverError().status(Status.INTERNAL_SERVER_ERROR).build();
} finally {
MultipartReader.closeQuietly(partsReader);
IOUtils.closeQuietly(in);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: replyToPostAttachment
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
|
replyToPostAttachment
|
src/main/java/org/olat/modules/fo/restapi/ForumWebService.java
|
c450df7d7ffe6afde39ebca6da9136f1caa16ec4
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean jsFunction_isRatingActivated() throws APIManagementException {
boolean ratingActivated = false;
APIManagerConfiguration config =
ServiceReferenceHolder.getInstance()
.getAPIManagerConfigurationService()
.getAPIManagerConfiguration();
ratingActivated = Boolean.valueOf(config.getFirstProperty(APIConstants.API_STORE_DISPLAY_RATINGS));
return ratingActivated;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: jsFunction_isRatingActivated
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
|
jsFunction_isRatingActivated
|
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
|
public void addUserRestrictionGlobally(@NonNull @UserManager.UserRestrictionKey String key) {
throwIfParentInstance("addUserRestrictionGlobally");
if (mService != null) {
try {
mService.setUserRestrictionGlobally(mContext.getPackageName(), key);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addUserRestrictionGlobally
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
|
addUserRestrictionGlobally
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getContactServiceProvider(final String userID, final String command) throws IOException {
update();
m_readLock.lock();
try {
final User user = m_users.get(userID);
return _getContactServiceProvider(user, command);
} finally {
m_readLock.unlock();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getContactServiceProvider
File: opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
Repository: OpenNMS/opennms
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2021-25931
|
MEDIUM
| 6.8
|
OpenNMS/opennms
|
getContactServiceProvider
|
opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
|
607151ea8f90212a3fb37c977fa57c7d58d26a84
| 0
|
Analyze the following code function for security vulnerabilities
|
public void closeSystemDialogs(String reason) throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: closeSystemDialogs
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
closeSystemDialogs
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isKeyguardServiceEnabled() {
try {
return mContext.getPackageManager().getServiceInfo(
new ComponentName(mContext, KeyguardService.class), 0).isEnabled();
} catch (NameNotFoundException e) {
return true;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isKeyguardServiceEnabled
File: packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21267
|
MEDIUM
| 5.5
|
android
|
isKeyguardServiceEnabled
|
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
|
d18d8b350756b0e89e051736c1f28744ed31e93a
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getDefaultEditModeInternal(XWikiContext context) throws XWikiException
{
String editModeProperty = "defaultEditMode";
DocumentReference editModeClass =
getCurrentReferenceDocumentReferenceResolver().resolve(XWikiConstant.EDIT_MODE_CLASS);
// check if the current document has any edit mode class object attached to it, and read the edit mode from it
BaseObject editModeObject = this.getXObject(editModeClass);
if (editModeObject != null) {
String defaultEditMode = editModeObject.getStringValue(editModeProperty);
if (StringUtils.isEmpty(defaultEditMode)) {
return "edit";
} else {
return defaultEditMode;
}
}
// otherwise look for included documents
com.xpn.xwiki.XWiki xwiki = context.getWiki();
if (is10Syntax()) {
if (getContent().indexOf("includeForm(") != -1) {
return "inline";
}
} else {
// Algorithm: look in all include macros and for all document included check if one of them
// has an EditModeClass object attached to it, or a SheetClass object (deprecated since 3.1M2) attached to
// it. If so then the edit mode is inline.
// Find all include macros and extract the document names
// TODO: Is there a good way not to hardcode the macro name? The macro itself shouldn't know
// its own name since it's a deployment time concern.
for (Block macroBlock : getXDOM().getBlocks(new MacroBlockMatcher("include"), Axes.CHILD)) {
// Find the document reference to include by checking the macro's "reference" parameter.
// For backward-compatibility we also check for a "document" parameter since this is the parameter name
// that was used prior to XWiki 3.4M1 when the "reference" one was introduced and thus when the
// "document" one was deprecated.
String includedDocumentReference = macroBlock.getParameter("reference");
if (includedDocumentReference == null) {
includedDocumentReference = macroBlock.getParameter("document");
}
if (includedDocumentReference != null) {
// Resolve the document name into a valid Reference
DocumentReference documentReference =
getCurrentMixedDocumentReferenceResolver().resolve(includedDocumentReference);
XWikiDocument includedDocument = xwiki.getDocument(documentReference, context);
if (!includedDocument.isNew()) {
// get the edit mode object, first the new class and then the deprecated class if new class
// is not found
editModeObject = includedDocument.getXObject(editModeClass);
if (editModeObject == null) {
editModeObject = includedDocument.getXObject(SHEETCLASS_REFERENCE);
}
if (editModeObject != null) {
// Use the user-defined default edit mode if set.
String defaultEditMode = editModeObject.getStringValue(editModeProperty);
if (StringUtils.isBlank(defaultEditMode)) {
// TODO: maybe here the real value should be returned if the object is edit mode class,
// and inline only if the object is sheetclass
return "inline";
} else {
return defaultEditMode;
}
}
}
}
}
}
return "edit";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDefaultEditModeInternal
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
|
getDefaultEditModeInternal
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
public int port() {
if (port == Defaults.DEFAULT_PORT) {
if (protocol == null) {
return 80;
}
if (protocol.equalsIgnoreCase("https")) {
return 443;
}
return 80;
}
return port;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: port
File: src/main/java/jodd/http/HttpRequest.java
Repository: oblac/jodd-http
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2022-29631
|
MEDIUM
| 5
|
oblac/jodd-http
|
port
|
src/main/java/jodd/http/HttpRequest.java
|
e50f573c8f6a39212ade68c6eb1256b2889fa8a6
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getXWikiPreference(String prefname, XWikiContext context)
{
return getXWikiPreference(prefname, "", context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getXWikiPreference
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
|
getXWikiPreference
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
private void addDisabledHints(ManagedServiceInfo info, int hints) {
if ((hints & HINT_HOST_DISABLE_EFFECTS) != 0) {
addDisabledHint(info, HINT_HOST_DISABLE_EFFECTS);
}
if ((hints & HINT_HOST_DISABLE_NOTIFICATION_EFFECTS) != 0) {
addDisabledHint(info, HINT_HOST_DISABLE_NOTIFICATION_EFFECTS);
}
if ((hints & HINT_HOST_DISABLE_CALL_EFFECTS) != 0) {
addDisabledHint(info, HINT_HOST_DISABLE_CALL_EFFECTS);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addDisabledHints
File: services/core/java/com/android/server/notification/NotificationManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3884
|
MEDIUM
| 4.3
|
android
|
addDisabledHints
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
public static <T extends Enum<T>> String[] enumNameToStringArray(T[] values) {
int i = 0;
String[] result = new String[values.length];
for (T value : values) {
result[i++] = value.name();
}
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: enumNameToStringArray
File: src/org/opencms/util/CmsStringUtil.java
Repository: alkacon/opencms-core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2013-4600
|
MEDIUM
| 4.3
|
alkacon/opencms-core
|
enumNameToStringArray
|
src/org/opencms/util/CmsStringUtil.java
|
72a05e3ea1cf692e2efce002687272e63f98c14a
| 0
|
Analyze the following code function for security vulnerabilities
|
public ArraySet<String> getFixedImeApps() {
return mFixedImeApps;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFixedImeApps
File: services/core/java/com/android/server/SystemConfig.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3759
|
MEDIUM
| 5
|
android
|
getFixedImeApps
|
services/core/java/com/android/server/SystemConfig.java
|
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void testDeserializationWithTypeInfo02() throws Exception
{
String prefix = "[\"" + Duration.class.getName() + "\",";
ObjectMapper mapper = newMapper();
mapper.configure(DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS, true);
mapper.addMixIn(TemporalAmount.class, MockObjectConfiguration.class);
TemporalAmount value = mapper.readValue(prefix + "13498]", TemporalAmount.class);
assertNotNull("The value should not be null.", value);
assertTrue("The value should be a Duration.", value instanceof Duration);
assertEquals("The value is not correct.", Duration.ofSeconds(13498L), value);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: testDeserializationWithTypeInfo02
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
|
testDeserializationWithTypeInfo02
|
datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestDurationDeserialization.java
|
ba27ce5909dfb49bcaf753ad3e04ecb980010b0b
| 0
|
Analyze the following code function for security vulnerabilities
|
private void createEmbeddedCache() {
GlobalConfigurationBuilder globalBuilder;
if (cacheMode.isClustered()) {
globalBuilder = new GlobalConfigurationBuilder();
globalBuilder.transport().defaultTransport();
} else {
globalBuilder = new GlobalConfigurationBuilder().nonClusteredDefault();
}
globalBuilder.addModule(PrivateGlobalConfigurationBuilder.class).serverMode(true);
org.infinispan.configuration.cache.ConfigurationBuilder builder =
new org.infinispan.configuration.cache.ConfigurationBuilder();
builder.clustering().cacheMode(cacheMode)
.compatibility().enable().marshaller(marshaller);
if (cacheMode.isDistributed() && numOwners != DEFAULT_NUM_OWNERS) {
builder.clustering().hash().numOwners(numOwners);
}
if (cacheMode.isDistributed() && l1Enable) {
builder.clustering().l1().enable();
}
cacheManager = cacheMode.isClustered()
? TestCacheManagerFactory.createClusteredCacheManager(globalBuilder, builder)
: TestCacheManagerFactory.createCacheManager(globalBuilder, builder);
if (!cacheName.isEmpty())
cacheManager.defineConfiguration(cacheName, builder.build());
embeddedCache = cacheName.isEmpty()
? cacheManager.getCache()
: cacheManager.getCache(cacheName);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createEmbeddedCache
File: integrationtests/compatibility-mode-it/src/test/java/org/infinispan/it/compatibility/CompatibilityCacheFactory.java
Repository: infinispan
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2017-15089
|
MEDIUM
| 6.5
|
infinispan
|
createEmbeddedCache
|
integrationtests/compatibility-mode-it/src/test/java/org/infinispan/it/compatibility/CompatibilityCacheFactory.java
|
69be66141eee7abb1c47d46f0a6b74b079709f4b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("Frame(type=").append(type).append(", channel=").append(channel).append(", ");
if (accumulator == null) {
sb.append(payload.length).append(" bytes of payload)");
} else {
sb.append(accumulator.size()).append(" bytes of accumulator)");
}
return sb.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toString
File: src/main/java/com/rabbitmq/client/impl/Frame.java
Repository: rabbitmq/rabbitmq-java-client
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-46120
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-java-client
|
toString
|
src/main/java/com/rabbitmq/client/impl/Frame.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
private BigInteger calculateE(BigInteger n, byte[] message)
{
if (n.bitLength() >= message.length * 8)
{
return new BigInteger(1, message);
}
else
{
byte[] trunc = new byte[n.bitLength() / 8];
System.arraycopy(message, 0, trunc, 0, trunc.length);
return new BigInteger(1, trunc);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: calculateE
File: core/src/main/java/org/bouncycastle/crypto/signers/DSASigner.java
Repository: bcgit/bc-java
The code follows secure coding practices.
|
[
"CWE-361"
] |
CVE-2016-1000341
|
MEDIUM
| 4.3
|
bcgit/bc-java
|
calculateE
|
core/src/main/java/org/bouncycastle/crypto/signers/DSASigner.java
|
acaac81f96fec91ab45bd0412beaf9c3acd8defa
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public IActivityContainer createActivityContainer(IBinder parentActivityToken,
IActivityContainerCallback callback) throws RemoteException {
enforceCallingPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS,
"createActivityContainer()");
synchronized (this) {
if (parentActivityToken == null) {
throw new IllegalArgumentException("parent token must not be null");
}
ActivityRecord r = ActivityRecord.forToken(parentActivityToken);
if (r == null) {
return null;
}
if (callback == null) {
throw new IllegalArgumentException("callback must not be null");
}
return mStackSupervisor.createActivityContainer(r, callback);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createActivityContainer
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3833
|
MEDIUM
| 4.3
|
android
|
createActivityContainer
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void fillInPartJars(List<JARDesc> jars) {
//can not use iterator, will rise ConcurrentModificationException on jars.add(jar);
for (int x = 0; x < jars.size(); x++) {
String part = jars.get(x).getPart();
// "available" field can be affected by two different threads
// working in loadClass(String)
synchronized (available) {
for (JARDesc jar : available) {
if (part != null && part.equals(jar.getPart())) {
if (!jars.contains(jar)) {
jars.add(jar);
}
}
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fillInPartJars
File: core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
Repository: AdoptOpenJDK/IcedTea-Web
The code follows secure coding practices.
|
[
"CWE-345",
"CWE-94",
"CWE-22"
] |
CVE-2019-10182
|
MEDIUM
| 5.8
|
AdoptOpenJDK/IcedTea-Web
|
fillInPartJars
|
core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
|
e0818f521a0711aeec4b913b49b5fc6a52815662
| 0
|
Analyze the following code function for security vulnerabilities
|
private static final void resetAndCopyProperties(Path file, Path destFile) {
Properties props = new Properties();
try (InputStream inStream = Files.newInputStream(file);
OutputStream outStream = Files.newOutputStream(destFile)) {
props.load(inStream);
props.setProperty(VERSION, "0");
props.setProperty(FORUM_KEY, "0");
props.setProperty(MODIFY_AUTHOR, "0");
props.setProperty(UPDATE_COMMENT, "0");
props.setProperty(VIEW_COUNT, "0");
props.setProperty(M_TIME, "0");
props.store(outStream, "");
} catch (Exception e) {
log.error("", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resetAndCopyProperties
File: src/main/java/org/olat/modules/wiki/WikiManager.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-39180
|
HIGH
| 9
|
OpenOLAT
|
resetAndCopyProperties
|
src/main/java/org/olat/modules/wiki/WikiManager.java
|
699490be8e931af0ef1f135c55384db1f4232637
| 0
|
Analyze the following code function for security vulnerabilities
|
private static ReplyFromAccount getDefaultReplyFromAccount(final Account account) {
for (final ReplyFromAccount from : account.getReplyFroms()) {
if (from.isDefault) {
return from;
}
}
return new ReplyFromAccount(account, account.uri, account.getEmailAddress(),
account.getSenderName(), account.getEmailAddress(), true, false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDefaultReplyFromAccount
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
|
getDefaultReplyFromAccount
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean hasRefSpec() {
return RefSpecHelper.hasRefSpec(branch);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasRefSpec
File: domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-77"
] |
CVE-2021-43286
|
MEDIUM
| 6.5
|
gocd
|
hasRefSpec
|
domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
|
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result + ((keyURL == null) ? 0 : keyURL.hashCode());
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hashCode
File: base/common/src/main/java/com/netscape/certsrv/key/KeyRequestInfo.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
hashCode
|
base/common/src/main/java/com/netscape/certsrv/key/KeyRequestInfo.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
protected boolean showHomeBanner() {
String menuId = (String)getRequestParameter("menuId");
String homeMenuId = getUserview().getPropertyString("homeMenuId");
String pwaStartUrl = "index";
boolean showHomeBanner = (menuId == null || homeMenuId.equals(menuId) || pwaStartUrl.equals(menuId)) && !getPropertyString("homeAttractBanner").isEmpty();
return showHomeBanner;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: showHomeBanner
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
|
showHomeBanner
|
wflow-core/src/main/java/org/joget/plugin/enterprise/UniversalTheme.java
|
ecf8be8f6f0cb725c18536ddc726d42a11bdaa1b
| 0
|
Analyze the following code function for security vulnerabilities
|
protected UserDTO.PlatformInfo getUserPlatInfo(String workspaceId) {
return userService.getCurrentPlatformInfo(workspaceId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserPlatInfo
File: test-track/backend/src/main/java/io/metersphere/service/issue/platform/AbstractIssuePlatform.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2022-23544
|
MEDIUM
| 6.1
|
metersphere
|
getUserPlatInfo
|
test-track/backend/src/main/java/io/metersphere/service/issue/platform/AbstractIssuePlatform.java
|
d0f95b50737c941b29d507a4cc3545f2dc6ab121
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setScmCheckoutStrategy(SCMCheckoutStrategy scmCheckoutStrategy) throws IOException {
this.scmCheckoutStrategy = scmCheckoutStrategy;
save();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setScmCheckoutStrategy
File: core/src/main/java/hudson/model/AbstractProject.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
setScmCheckoutStrategy
|
core/src/main/java/hudson/model/AbstractProject.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
private void writeStyles(CellReference cell, JsonObject styles) {
if (cellStyleGenerator != null) {
String style = cellStyleGenerator.getStyle(cell);
put(columnKeys.key(cell.getPropertyId()), style, styles);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeStyles
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
|
writeStyles
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void saveTrans5(TestContext context) {
String id = randomUuid();
postgresClient = createFoo(context);
postgresClient.startTx(asyncAssertTx(context, trans -> {
postgresClient.save(trans, FOO, id, xPojo, context.asyncAssertSuccess(save -> {
postgresClient.endTx(trans, context.asyncAssertSuccess(end -> {
postgresClient.getById(FOO, id, context.asyncAssertSuccess(get -> {
context.assertEquals("x", get.getString("key"));
}));
}));
}));
}));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: saveTrans5
File: domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
saveTrans5
|
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getTimeout() {
return timeout;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTimeout
File: src/main/java/dev/hypera/dragonfly/Dragonfly.java
Repository: HyperaDev/Dragonfly
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-41967
|
HIGH
| 7.5
|
HyperaDev/Dragonfly
|
getTimeout
|
src/main/java/dev/hypera/dragonfly/Dragonfly.java
|
9661375e1135127ca6cdb5712e978bec33cc06b3
| 0
|
Analyze the following code function for security vulnerabilities
|
final void setObject(Iterable<? extends Entry<? extends CharSequence, ?>> headers) {
requireNonNull(headers, "headers");
if (headers == this) {
return;
}
for (Entry<? extends CharSequence, ?> e : headers) {
remove(e.getKey());
}
if (!addFast(headers)) {
addObjectSlow(headers);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setObject
File: core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2019-16771
|
MEDIUM
| 5
|
line/armeria
|
setObject
|
core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
|
b597f7a865a527a84ee3d6937075cfbb4470ed20
| 0
|
Analyze the following code function for security vulnerabilities
|
protected final XmlFile getConfigFile() {
return new XmlFile(new File(Jenkins.getInstance().getRootDir(),getId()+".xml"));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getConfigFile
File: core/src/main/java/hudson/model/Descriptor.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
getConfigFile
|
core/src/main/java/hudson/model/Descriptor.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isValid() {
// ::revert when __CORE__
return owner != null && System.currentTimeMillis() <= this.expirationDate;
// return false;
// ::done
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isValid
File: src/net/sourceforge/plantuml/version/LicenseInfo.java
Repository: plantuml
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2023-3431
|
MEDIUM
| 5.3
|
plantuml
|
isValid
|
src/net/sourceforge/plantuml/version/LicenseInfo.java
|
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Object getObjectProperty(String name) throws JMSException {
if (name.startsWith(PREFIX))
return this.rmqProperties.get(name);
else
return this.userJmsProperties.get(name);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getObjectProperty
File: src/main/java/com/rabbitmq/jms/client/RMQMessage.java
Repository: rabbitmq/rabbitmq-jms-client
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2020-36282
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-jms-client
|
getObjectProperty
|
src/main/java/com/rabbitmq/jms/client/RMQMessage.java
|
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void
do_parse() throws SAXException, IOException
{
parser.parse(getInputSource());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: do_parse
File: ext/java/nokogiri/XmlSaxParserContext.java
Repository: sparklemotion/nokogiri
The code follows secure coding practices.
|
[
"CWE-241"
] |
CVE-2022-29181
|
MEDIUM
| 6.4
|
sparklemotion/nokogiri
|
do_parse
|
ext/java/nokogiri/XmlSaxParserContext.java
|
db05ba9a1bd4b90aa6c76742cf6102a7c7297267
| 0
|
Analyze the following code function for security vulnerabilities
|
private String[] resolveCacheNames(AnnotationValue<CacheConfig> defaultConfig, AnnotationValue<Cacheable> cacheConfig) {
String[] cacheNames = cacheConfig.get(MEMBER_CACHE_NAMES, String[].class).orElse(null);
if (ArrayUtils.isEmpty(cacheNames)) {
cacheNames = defaultConfig.get(MEMBER_CACHE_NAMES, String[].class).orElse(StringUtils.EMPTY_STRING_ARRAY);
}
return cacheNames;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resolveCacheNames
File: runtime/src/main/java/io/micronaut/cache/interceptor/CacheInterceptor.java
Repository: micronaut-projects/micronaut-core
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-21700
|
MEDIUM
| 5
|
micronaut-projects/micronaut-core
|
resolveCacheNames
|
runtime/src/main/java/io/micronaut/cache/interceptor/CacheInterceptor.java
|
b8ec32c311689667c69ae7d9f9c3b3a8abc96fe3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean onInterceptTouchEvent(MotionEvent event) {
if (mBlockTouches || mQs.isCustomizing()) {
return false;
}
initDownStates(event);
if (mHeadsUpTouchHelper.onInterceptTouchEvent(event)) {
mIsExpansionFromHeadsUp = true;
MetricsLogger.count(mContext, COUNTER_PANEL_OPEN, 1);
MetricsLogger.count(mContext, COUNTER_PANEL_OPEN_PEEK, 1);
return true;
}
if (mQsOverscrollExpansionEnabled && !isFullyCollapsed() && onQsIntercept(event)) {
return true;
}
return super.onInterceptTouchEvent(event);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onInterceptTouchEvent
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
onInterceptTouchEvent
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Object ckeditorUploadToolFile(HttpServletRequest request) {
String token = request.getParameter(SysConf.TOKEN);
// 从Redis中获取系统配置【需要传入token】
Map<String, String> qiNiuResultMap = feignUtil.getSystemConfigMap(token);
SystemConfig systemConfig = feignUtil.getSystemConfigByMap(qiNiuResultMap);
Map<String, Object> map = new HashMap<>();
Map<String, Object> errorMap = new HashMap<>();
//引用自己设计的一个工具类
AboutFileUtil af = new AboutFileUtil();
// 转换成多部分request
MultipartHttpServletRequest multiRequest = (MultipartHttpServletRequest) request;
// 取得request中的所有文件名
Iterator<String> iter = multiRequest.getFileNames();
while (iter.hasNext()) {
MultipartFile file = multiRequest.getFile(iter.next());
if (file != null) {
// 获取旧名称
String oldName = file.getOriginalFilename();
// 获取扩展名
String expandedName = FileUtils.getPicExpandedName(oldName);
// 判断是否安全文件
if (!af.isSafe(expandedName)) {
map.put(SysConf.UPLOADED, 0);
errorMap.put(SysConf.MESSAGE, "请上传正确格式的文件");
map.put(SysConf.ERROR, errorMap);
return map;
}
//对文件大小进行限制
if (file.getSize() > (50 * 1024 * 1024)) {
map.put(SysConf.UPLOADED, 0);
errorMap.put(SysConf.MESSAGE, "文件大小不能超过50M");
map.put(SysConf.ERROR, errorMap);
return map;
}
// 设置图片上传服务必要的信息
request.setAttribute(SysConf.USER_UID, SysConf.DEFAULT_UID);
request.setAttribute(SysConf.ADMIN_UID, SysConf.DEFAULT_UID);
request.setAttribute(SysConf.PROJECT_NAME, SysConf.BLOG);
request.setAttribute(SysConf.SORT_NAME, SysConf.ADMIN);
List<MultipartFile> fileData = new ArrayList<>();
fileData.add(file);
String result = fileService.batchUploadFile(request, fileData, systemConfig);
Map<String, Object> resultMap = JsonUtils.jsonToMap(result);
String code = resultMap.get(SysConf.CODE).toString();
if (SysConf.SUCCESS.equals(code)) {
List<HashMap<String, Object>> resultList = (List<HashMap<String, Object>>) resultMap.get(SysConf.DATA);
if (resultList.size() > 0) {
Map<String, Object> picture = resultList.get(0);
String fileName = picture.get(SysConf.PIC_NAME).toString();
map.put(SysConf.UPLOADED, 1);
map.put(SysConf.FILE_NAME, fileName);
// 设置显示方式
if (EFilePriority.QI_NIU.equals(systemConfig.getContentPicturePriority())) {
String qiNiuPictureBaseUrl = systemConfig.getQiNiuPictureBaseUrl();
String qiNiuUrl = qiNiuPictureBaseUrl + picture.get(SysConf.QI_NIU_URL).toString();
map.put(SysConf.URL, qiNiuUrl);
} else if (EFilePriority.MINIO.equals(systemConfig.getContentPicturePriority())) {
String minioPictureBaseUrl = systemConfig.getMinioPictureBaseUrl();
// 设置图片服务根域名
String url = minioPictureBaseUrl + picture.get(SysConf.MINIO_URL).toString();
map.put(SysConf.URL, url);
} else {
String localPictureBaseUrl = systemConfig.getLocalPictureBaseUrl();
// 设置图片服务根域名
String url = localPictureBaseUrl + picture.get(SysConf.PIC_URL).toString();
map.put(SysConf.URL, url);
}
}
return map;
} else {
map.put(SysConf.UPLOADED, 0);
errorMap.put(SysConf.MESSAGE, "上传失败");
map.put(SysConf.ERROR, errorMap);
return map;
}
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: ckeditorUploadToolFile
File: mogu_picture/src/main/java/com/moxi/mogublog/picture/service/impl/FileServiceImpl.java
Repository: moxi624/mogu_blog_v2
The code follows secure coding practices.
|
[
"CWE-434"
] |
CVE-2022-27047
|
HIGH
| 7.5
|
moxi624/mogu_blog_v2
|
ckeditorUploadToolFile
|
mogu_picture/src/main/java/com/moxi/mogublog/picture/service/impl/FileServiceImpl.java
|
2d9eb941cda8fd168f9447cd6b4262f31f074d92
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.