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 onOpChanged(int op, String packageName) {
try {
final int userId = ActivityManager.getCurrentUser();
final int uid = mPackageManager.getPackageUidAsUser(packageName, userId);
final int mode = mAppOpsManager.checkOpNoThrow(
AppOpsManager.OP_GET_ACCOUNTS, uid, packageName);
if (mode == AppOpsManager.MODE_ALLOWED) {
final long identity = Binder.clearCallingIdentity();
try {
cancelAccountAccessRequestNotificationIfNeeded(packageName, uid, true);
} finally {
Binder.restoreCallingIdentity(identity);
}
}
} catch (NameNotFoundException e) {
/* ignore */
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onOpChanged
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
|
onOpChanged
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
private void initFeedback(final WebMarkupContainer container)
{
if (formFeedback == null) {
formFeedback = new FeedbackPanel("formFeedback", new ComponentFeedbackMessageFilter(form));
formFeedback.setOutputMarkupId(true);
formFeedback.setOutputMarkupPlaceholderTag(true);
}
container.add(formFeedback);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initFeedback
File: src/main/java/org/projectforge/web/dialog/ModalDialog.java
Repository: micromata/projectforge-webapp
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2013-7251
|
MEDIUM
| 6.8
|
micromata/projectforge-webapp
|
initFeedback
|
src/main/java/org/projectforge/web/dialog/ModalDialog.java
|
422de35e3c3141e418a73bfb39b430d5fd74077e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void endGroup(Map<String, String> parameters)
{
getXHTMLWikiPrinter().printXMLEndElement("div");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: endGroup
File: xwiki-rendering-syntaxes/xwiki-rendering-syntax-xhtml/src/main/java/org/xwiki/rendering/internal/renderer/xhtml/XHTMLChainingRenderer.java
Repository: xwiki/xwiki-rendering
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-32070
|
MEDIUM
| 6.1
|
xwiki/xwiki-rendering
|
endGroup
|
xwiki-rendering-syntaxes/xwiki-rendering-syntax-xhtml/src/main/java/org/xwiki/rendering/internal/renderer/xhtml/XHTMLChainingRenderer.java
|
c40e2f5f9482ec6c3e71dbf1fff5ba8a5e44cdc1
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setUseJvmChmod(final boolean useJvmChmod) {
this.useJvmChmod = useJvmChmod;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUseJvmChmod
File: src/main/java/org/codehaus/plexus/archiver/AbstractUnArchiver.java
Repository: codehaus-plexus/plexus-archiver
The code follows secure coding practices.
|
[
"CWE-22",
"CWE-61"
] |
CVE-2023-37460
|
CRITICAL
| 9.8
|
codehaus-plexus/plexus-archiver
|
setUseJvmChmod
|
src/main/java/org/codehaus/plexus/archiver/AbstractUnArchiver.java
|
54759839fbdf85caf8442076f001d5fd64e0dcb2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setUsbDataSignalingEnabled(String packageName, boolean enabled) {
Objects.requireNonNull(packageName, "Admin package name must be provided");
final CallerIdentity caller = getCallerIdentity(packageName);
if (!isPermissionCheckFlagEnabled()) {
Preconditions.checkCallAuthorization(
isDefaultDeviceOwner(caller) || isProfileOwnerOfOrganizationOwnedDevice(caller),
"USB data signaling can only be controlled by a device owner or "
+ "a profile owner on an organization-owned device.");
Preconditions.checkState(canUsbDataSignalingBeDisabled(),
"USB data signaling cannot be disabled.");
}
synchronized (getLockObject()) {
ActiveAdmin admin;
if (isPermissionCheckFlagEnabled()) {
admin = enforcePermissionAndGetEnforcingAdmin(
/* admin= */ null, MANAGE_DEVICE_POLICY_USB_DATA_SIGNALLING,
caller.getPackageName(),
caller.getUserId()).getActiveAdmin();
} else {
admin = getProfileOwnerOrDeviceOwnerLocked(caller.getUserId());
}
if (admin.mUsbDataSignalingEnabled != enabled) {
admin.mUsbDataSignalingEnabled = enabled;
saveSettingsLocked(caller.getUserId());
updateUsbDataSignal();
}
}
DevicePolicyEventLogger
.createEvent(DevicePolicyEnums.SET_USB_DATA_SIGNALING)
.setAdmin(packageName)
.setBoolean(enabled)
.write();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUsbDataSignalingEnabled
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
setUsbDataSignalingEnabled
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setWebAppConfig(WebAppConfiguration webAppConfig) {
this.webAppConfig = webAppConfig;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setWebAppConfig
File: src/java/winstone/WinstoneResponse.java
Repository: jenkinsci/winstone
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2011-4344
|
LOW
| 2.6
|
jenkinsci/winstone
|
setWebAppConfig
|
src/java/winstone/WinstoneResponse.java
|
410ed3001d51c689cf59085b7417466caa2ded7b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String[] getAlias() {
return new String[] { "yt", "ytnotifier" };
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAlias
File: src/main/java/de/presti/ree6/commands/impl/community/YouTubeNotifier.java
Repository: Ree6-Applications/Ree6
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-39302
|
MEDIUM
| 5.4
|
Ree6-Applications/Ree6
|
getAlias
|
src/main/java/de/presti/ree6/commands/impl/community/YouTubeNotifier.java
|
459b5bc24f0ea27e50031f563373926e94b9aa0a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getPendingIntentFlags(IIntentSender target) {
return mPendingIntentController.getPendingIntentFlags(target);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPendingIntentFlags
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21292
|
MEDIUM
| 5.5
|
android
|
getPendingIntentFlags
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getImageToShow() {
synchronized (lock) {
return imageToShow;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getImageToShow
File: goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java
Repository: intranda/goobi-viewer-core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-29014
|
MEDIUM
| 6.1
|
intranda/goobi-viewer-core
|
getImageToShow
|
goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java
|
c29efe60e745a94d03debc17681c4950f3917455
| 0
|
Analyze the following code function for security vulnerabilities
|
public InputMonitor getInputMonitor() {
return mInputMonitor;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInputMonitor
File: services/core/java/com/android/server/wm/WindowManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3875
|
HIGH
| 7.2
|
android
|
getInputMonitor
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setForegroundDispatch(PendingIntent intent,
IntentFilter[] filters, TechListParcel techListsParcel) {
NfcPermissions.enforceUserPermissions(mContext);
// Short-cut the disable path
if (intent == null && filters == null && techListsParcel == null) {
mNfcDispatcher.setForegroundDispatch(null, null, null);
return;
}
// Validate the IntentFilters
if (filters != null) {
if (filters.length == 0) {
filters = null;
} else {
for (IntentFilter filter : filters) {
if (filter == null) {
throw new IllegalArgumentException("null IntentFilter");
}
}
}
}
// Validate the tech lists
String[][] techLists = null;
if (techListsParcel != null) {
techLists = techListsParcel.getTechLists();
}
mNfcDispatcher.setForegroundDispatch(intent, filters, techLists);
}
|
Vulnerability Classification:
- CWE: CWE-200
- CVE: CVE-2016-3761
- Severity: LOW
- CVSS Score: 2.1
Description: Verify setForegroundDispatch caller is in foreground.
Bug: 28300969
Change-Id: Icadfe70cd06f921badd266e7a4efbae15a8c206a
Function: setForegroundDispatch
File: src/com/android/nfc/NfcService.java
Repository: android
Fixed Code:
@Override
public void setForegroundDispatch(PendingIntent intent,
IntentFilter[] filters, TechListParcel techListsParcel) {
NfcPermissions.enforceUserPermissions(mContext);
if (!mForegroundUtils.isInForeground(Binder.getCallingUid())) {
Log.e(TAG, "setForegroundDispatch: Caller not in foreground.");
return;
}
// Short-cut the disable path
if (intent == null && filters == null && techListsParcel == null) {
mNfcDispatcher.setForegroundDispatch(null, null, null);
return;
}
// Validate the IntentFilters
if (filters != null) {
if (filters.length == 0) {
filters = null;
} else {
for (IntentFilter filter : filters) {
if (filter == null) {
throw new IllegalArgumentException("null IntentFilter");
}
}
}
}
// Validate the tech lists
String[][] techLists = null;
if (techListsParcel != null) {
techLists = techListsParcel.getTechLists();
}
mNfcDispatcher.setForegroundDispatch(intent, filters, techLists);
}
|
[
"CWE-200"
] |
CVE-2016-3761
|
LOW
| 2.1
|
android
|
setForegroundDispatch
|
src/com/android/nfc/NfcService.java
|
9ea802b5456a36f1115549b645b65c791eff3c2c
| 1
|
Analyze the following code function for security vulnerabilities
|
public void reportSuccessfulPasswordAttempt(int userId) {
getDevicePolicyManager().reportSuccessfulPasswordAttempt(userId);
getTrustManager().reportUnlockAttempt(true /* authenticated */, userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: reportSuccessfulPasswordAttempt
File: core/java/com/android/internal/widget/LockPatternUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3908
|
MEDIUM
| 4.3
|
android
|
reportSuccessfulPasswordAttempt
|
core/java/com/android/internal/widget/LockPatternUtils.java
|
96daf7d4893f614714761af2d53dfb93214a32e4
| 0
|
Analyze the following code function for security vulnerabilities
|
private EventDefinitionCRFDAO edcdao() {
return new EventDefinitionCRFDAO(dataSource);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: edcdao
File: web/src/main/java/org/akaza/openclinica/controller/BatchCRFMigrationController.java
Repository: OpenClinica
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-24830
|
HIGH
| 7.5
|
OpenClinica
|
edcdao
|
web/src/main/java/org/akaza/openclinica/controller/BatchCRFMigrationController.java
|
6f864e86543f903bd20d6f9fc7056115106441f3
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void createError(String errMessage) {
throw ErrorUtil.createCommandException(logFormatter.formatLog(errMessage));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createError
File: cli/ballerina-cli-module/src/main/java/org/ballerinalang/cli/module/Pull.java
Repository: ballerina-platform/ballerina-lang
The code follows secure coding practices.
|
[
"CWE-306"
] |
CVE-2021-32700
|
MEDIUM
| 5.8
|
ballerina-platform/ballerina-lang
|
createError
|
cli/ballerina-cli-module/src/main/java/org/ballerinalang/cli/module/Pull.java
|
4609ffee1744ecd16aac09303b1783bf0a525816
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String[] getAccountTypesWithManagementDisabled(String callerPackageName) {
return getAccountTypesWithManagementDisabledAsUser(UserHandle.getCallingUserId(),
callerPackageName, false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAccountTypesWithManagementDisabled
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
getAccountTypesWithManagementDisabled
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void deleteCaptureType( String url_suffix )
{
if( url_suffix == null )
{
throw new IllegalArgumentException( "The url_suffix must not be null." );
}
CaptureType persistent = em.find( CaptureType.class, url_suffix );
if( persistent != null )
{
em.remove( persistent );
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deleteCaptureType
File: src/main/java/com/rtds/svc/CaptureTypeService.java
Repository: jdhwpgmbca/pcapture
The code follows secure coding practices.
|
[
"CWE-754"
] |
CVE-2021-39196
|
MEDIUM
| 6.8
|
jdhwpgmbca/pcapture
|
deleteCaptureType
|
src/main/java/com/rtds/svc/CaptureTypeService.java
|
0f74f431e0970a2e5784dbd955cfa4760e3b1ef7
| 0
|
Analyze the following code function for security vulnerabilities
|
final void finishBooting() {
synchronized (this) {
if (!mBootAnimationComplete) {
mCallFinishBooting = true;
return;
}
mCallFinishBooting = false;
}
ArraySet<String> completedIsas = new ArraySet<String>();
for (String abi : Build.SUPPORTED_ABIS) {
Process.establishZygoteConnectionForAbi(abi);
final String instructionSet = VMRuntime.getInstructionSet(abi);
if (!completedIsas.contains(instructionSet)) {
try {
mInstaller.markBootComplete(VMRuntime.getInstructionSet(abi));
} catch (InstallerException e) {
Slog.w(TAG, "Unable to mark boot complete for abi: " + abi + " (" +
e.getMessage() +")");
}
completedIsas.add(instructionSet);
}
}
IntentFilter pkgFilter = new IntentFilter();
pkgFilter.addAction(Intent.ACTION_QUERY_PACKAGE_RESTART);
pkgFilter.addDataScheme("package");
mContext.registerReceiver(new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
String[] pkgs = intent.getStringArrayExtra(Intent.EXTRA_PACKAGES);
if (pkgs != null) {
for (String pkg : pkgs) {
synchronized (ActivityManagerService.this) {
if (forceStopPackageLocked(pkg, -1, false, false, false, false, false,
0, "query restart")) {
setResultCode(Activity.RESULT_OK);
return;
}
}
}
}
}
}, pkgFilter);
IntentFilter dumpheapFilter = new IntentFilter();
dumpheapFilter.addAction(DumpHeapActivity.ACTION_DELETE_DUMPHEAP);
mContext.registerReceiver(new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
if (intent.getBooleanExtra(DumpHeapActivity.EXTRA_DELAY_DELETE, false)) {
mHandler.sendEmptyMessageDelayed(POST_DUMP_HEAP_NOTIFICATION_MSG, 5*60*1000);
} else {
mHandler.sendEmptyMessage(POST_DUMP_HEAP_NOTIFICATION_MSG);
}
}
}, dumpheapFilter);
// Let system services know.
mSystemServiceManager.startBootPhase(SystemService.PHASE_BOOT_COMPLETED);
synchronized (this) {
// Ensure that any processes we had put on hold are now started
// up.
final int NP = mProcessesOnHold.size();
if (NP > 0) {
ArrayList<ProcessRecord> procs =
new ArrayList<ProcessRecord>(mProcessesOnHold);
for (int ip=0; ip<NP; ip++) {
if (DEBUG_PROCESSES) Slog.v(TAG_PROCESSES, "Starting process on hold: "
+ procs.get(ip));
startProcessLocked(procs.get(ip), "on-hold", null);
}
}
if (mFactoryTest != FactoryTest.FACTORY_TEST_LOW_LEVEL) {
// Start looking for apps that are abusing wake locks.
Message nmsg = mHandler.obtainMessage(CHECK_EXCESSIVE_WAKE_LOCKS_MSG);
mHandler.sendMessageDelayed(nmsg, POWER_CHECK_DELAY);
// Tell anyone interested that we are done booting!
SystemProperties.set("sys.boot_completed", "1");
// And trigger dev.bootcomplete if we are not showing encryption progress
if (!"trigger_restart_min_framework".equals(SystemProperties.get("vold.decrypt"))
|| "".equals(SystemProperties.get("vold.encrypt_progress"))) {
SystemProperties.set("dev.bootcomplete", "1");
}
mUserController.sendBootCompletedLocked(
new IIntentReceiver.Stub() {
@Override
public void performReceive(Intent intent, int resultCode,
String data, Bundle extras, boolean ordered,
boolean sticky, int sendingUser) {
synchronized (ActivityManagerService.this) {
requestPssAllProcsLocked(SystemClock.uptimeMillis(),
true, false);
}
}
});
scheduleStartProfilesLocked();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: finishBooting
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
|
finishBooting
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setWebsocketContextPath(String theWebsocketContextPath) {
myModelConfig.setWebsocketContextPath(theWebsocketContextPath);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setWebsocketContextPath
File: hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
Repository: hapifhir/hapi-fhir
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-32053
|
MEDIUM
| 5
|
hapifhir/hapi-fhir
|
setWebsocketContextPath
|
hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
|
f2934b229c491235ab0e7782dea86b324521082a
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<Action> getActions() {
return mActions;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getActions
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
getActions
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
@GuardedBy("this")
void removePidLocked(int pid, ProcessRecord app) {
final boolean removed;
synchronized (mPidsSelfLocked) {
removed = mPidsSelfLocked.doRemoveInternal(pid, app);
}
if (removed) {
synchronized (sActiveProcessInfoSelfLocked) {
sActiveProcessInfoSelfLocked.remove(pid);
}
mAtmInternal.onProcessUnMapped(pid);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removePidLocked
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21292
|
MEDIUM
| 5.5
|
android
|
removePidLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public static int equalsConstantTime(byte[] bytes1, int startPos1, byte[] bytes2, int startPos2, int length) {
return !hasUnsafe() || !unalignedAccess() ?
ConstantTimeUtils.equalsConstantTime(bytes1, startPos1, bytes2, startPos2, length) :
PlatformDependent0.equalsConstantTime(bytes1, startPos1, bytes2, startPos2, length);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: equalsConstantTime
File: common/src/main/java/io/netty/util/internal/PlatformDependent.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-668",
"CWE-378",
"CWE-379"
] |
CVE-2022-24823
|
LOW
| 1.9
|
netty
|
equalsConstantTime
|
common/src/main/java/io/netty/util/internal/PlatformDependent.java
|
185f8b2756a36aaa4f973f1a2a025e7d981823f1
| 0
|
Analyze the following code function for security vulnerabilities
|
public static long rawCompress(long inputAddr, long inputSize, long destAddr)
throws IOException
{
return impl.rawCompress(inputAddr, inputSize, destAddr);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: rawCompress
File: src/main/java/org/xerial/snappy/Snappy.java
Repository: xerial/snappy-java
The code follows secure coding practices.
|
[
"CWE-190"
] |
CVE-2023-34454
|
HIGH
| 7.5
|
xerial/snappy-java
|
rawCompress
|
src/main/java/org/xerial/snappy/Snappy.java
|
d0042551e4a3509a725038eb9b2ad1f683674d94
| 0
|
Analyze the following code function for security vulnerabilities
|
public ObjectOutputStream createObjectOutputStream(Writer writer) throws IOException {
return createObjectOutputStream(hierarchicalStreamDriver.createWriter(writer), "object-stream");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createObjectOutputStream
File: xstream/src/java/com/thoughtworks/xstream/XStream.java
Repository: x-stream/xstream
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-43859
|
MEDIUM
| 5
|
x-stream/xstream
|
createObjectOutputStream
|
xstream/src/java/com/thoughtworks/xstream/XStream.java
|
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public KBTemplate fetchByPrimaryKey(long kbTemplateId) {
return fetchByPrimaryKey((Serializable)kbTemplateId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fetchByPrimaryKey
File: modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java
Repository: brianchandotcom/liferay-portal
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2017-12647
|
MEDIUM
| 4.3
|
brianchandotcom/liferay-portal
|
fetchByPrimaryKey
|
modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java
|
ef93d984be9d4d478a5c4b1ca9a86f4e80174774
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getParam(String name) {
return request.getQueryParams().getFirst(name);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getParam
File: sa-token-starter/sa-token-reactor-spring-boot3-starter/src/main/java/cn/dev33/satoken/reactor/model/SaRequestForReactor.java
Repository: dromara/Sa-Token
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-44794
|
CRITICAL
| 9.8
|
dromara/Sa-Token
|
getParam
|
sa-token-starter/sa-token-reactor-spring-boot3-starter/src/main/java/cn/dev33/satoken/reactor/model/SaRequestForReactor.java
|
954efeb73277f924f836da2a25322ea35ee1bfa3
| 0
|
Analyze the following code function for security vulnerabilities
|
protected TabChromeWebContentsDelegateAndroid getChromeWebContentsDelegateAndroid() {
return mWebContentsDelegate;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getChromeWebContentsDelegateAndroid
File: chrome/android/java/src/org/chromium/chrome/browser/Tab.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
getChromeWebContentsDelegateAndroid
|
chrome/android/java/src/org/chromium/chrome/browser/Tab.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setRemoteServices(
RemoteServiceCallback callback,
List<ComponentName> componentNames,
List<IBinder> binders) {
try {
callback.onResult(componentNames, binders);
} catch (RemoteException e) {
Log.e(this, e, "setRemoteServices: Contacting ConnectionService %s",
ConnectionServiceWrapper.this.getComponentName());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setRemoteServices
File: src/com/android/server/telecom/ConnectionServiceWrapper.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
setRemoteServices
|
src/com/android/server/telecom/ConnectionServiceWrapper.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getMenuId(UserviewMenu menu) {
String menuId = menu.getPropertyString("id");
if (menu.getPropertyString("customId") != null && menu.getPropertyString("customId").trim().length() > 0) {
menuId = menu.getPropertyString("customId");
}
return menuId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMenuId
File: wflow-core/src/main/java/org/joget/apps/userview/service/UserviewService.java
Repository: jogetworkflow/jw-community
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-4560
|
MEDIUM
| 6.1
|
jogetworkflow/jw-community
|
getMenuId
|
wflow-core/src/main/java/org/joget/apps/userview/service/UserviewService.java
|
ecf8be8f6f0cb725c18536ddc726d42a11bdaa1b
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isSslConnectionPoolEnabled() {
return allowSslConnectionPool;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isSslConnectionPoolEnabled
File: api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java
Repository: AsyncHttpClient/async-http-client
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2013-7397
|
MEDIUM
| 4.3
|
AsyncHttpClient/async-http-client
|
isSslConnectionPoolEnabled
|
api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java
|
df6ed70e86c8fc340ed75563e016c8baa94d7e72
| 0
|
Analyze the following code function for security vulnerabilities
|
private void finishActivityResults(int resultCode, Intent resultData,
NeededUriGrants resultGrants) {
// Send the result if needed
if (resultTo != null) {
if (DEBUG_RESULTS) {
Slog.v(TAG_RESULTS, "Adding result to " + resultTo
+ " who=" + resultWho + " req=" + requestCode
+ " res=" + resultCode + " data=" + resultData);
}
if (resultTo.mUserId != mUserId) {
if (resultData != null) {
resultData.prepareToLeaveUser(mUserId);
}
}
if (info.applicationInfo.uid > 0) {
mAtmService.mUgmInternal.grantUriPermissionUncheckedFromIntent(resultGrants,
resultTo.getUriPermissionsLocked());
}
resultTo.addResultLocked(this, resultWho, requestCode, resultCode, resultData);
resultTo = null;
} else if (DEBUG_RESULTS) {
Slog.v(TAG_RESULTS, "No result destination from " + this);
}
// Make sure this HistoryRecord is not holding on to other resources,
// because clients have remote IPC references to this object so we
// can't assume that will go away and want to avoid circular IPC refs.
results = null;
pendingResults = null;
newIntents = null;
setSavedState(null /* savedState */);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: finishActivityResults
File: services/core/java/com/android/server/wm/ActivityRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21145
|
HIGH
| 7.8
|
android
|
finishActivityResults
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getLine1Number(PhoneAccountHandle accountHandle, String callingPackage) {
if (!canReadPhoneState(callingPackage, "getLine1Number")) {
return null;
}
synchronized (mLock) {
if (!isVisibleToCaller(accountHandle)) {
Log.d(this, "%s is not visible for the calling user [gL1N]", accountHandle);
return null;
}
long token = Binder.clearCallingIdentity();
try {
int subId =
mPhoneAccountRegistrar.getSubscriptionIdForPhoneAccount(accountHandle);
return getTelephonyManager().getLine1NumberForSubscriber(subId);
} catch (Exception e) {
Log.e(this, e, "getSubscriptionIdForPhoneAccount");
throw e;
} finally {
Binder.restoreCallingIdentity(token);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLine1Number
File: src/com/android/server/telecom/TelecomServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-0847
|
HIGH
| 7.2
|
android
|
getLine1Number
|
src/com/android/server/telecom/TelecomServiceImpl.java
|
2750faaa1ec819eed9acffea7bd3daf867fda444
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nonnull
@MustNotContainNull
private static List<JMenuItem> findPopupMenuItems(
@Nonnull final MindMapPanel panel,
@Nonnull final PopUpSection section,
final boolean fullScreenModeActive,
@Nonnull @MayContainNull final List<JMenuItem> list,
@Nonnull DialogProvider dialogProvider,
@Nullable final Topic topicUnderMouse,
@Nonnull @MustNotContainNull final Topic[] selectedTopics,
@Nonnull @MustNotContainNull final List<PopUpMenuItemPlugin> pluginMenuItems,
@Nonnull Map<Class<? extends PopUpMenuItemPlugin>, CustomJob> customProcessors
) {
list.clear();
for (final PopUpMenuItemPlugin p : pluginMenuItems) {
if (fullScreenModeActive && !p.isCompatibleWithFullScreenMode()) {
continue;
}
if (p.getSection() == section) {
if (!(p.needsTopicUnderMouse() || p.needsSelectedTopics())
|| (p.needsTopicUnderMouse() && topicUnderMouse != null)
|| (p.needsSelectedTopics() && selectedTopics.length > 0)) {
final JMenuItem item = p.makeMenuItem(panel, dialogProvider, topicUnderMouse, selectedTopics, customProcessors.get(p.getClass()));
if (item != null) {
item.setEnabled(p.isEnabled(panel, topicUnderMouse, selectedTopics));
list.add(item);
}
}
}
}
return list;
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2018-1000542
- Severity: MEDIUM
- CVSS Score: 6.8
Description: #45 activated FEATURE_SECURE_PROCESSING for XML parsing
Function: findPopupMenuItems
File: mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java
Repository: raydac/netbeans-mmd-plugin
Fixed Code:
@Nonnull
@MustNotContainNull
private static List<JMenuItem> findPopupMenuItems(
@Nonnull final MindMapPanel panel,
@Nonnull final PopUpSection section,
final boolean fullScreenModeActive,
@Nonnull @MayContainNull final List<JMenuItem> list,
@Nonnull DialogProvider dialogProvider,
@Nullable final Topic topicUnderMouse,
@Nonnull @MustNotContainNull final Topic[] selectedTopics,
@Nonnull @MustNotContainNull final List<PopUpMenuItemPlugin> pluginMenuItems,
@Nonnull Map<Class<? extends PopUpMenuItemPlugin>, CustomJob> customProcessors
) {
list.clear();
for (final PopUpMenuItemPlugin p : pluginMenuItems) {
if (fullScreenModeActive && !p.isCompatibleWithFullScreenMode()) {
continue;
}
if (p.getSection() == section) {
if (!(p.needsTopicUnderMouse() || p.needsSelectedTopics())
|| (p.needsTopicUnderMouse() && topicUnderMouse != null)
|| (p.needsSelectedTopics() && selectedTopics.length > 0)) {
final JMenuItem item = p.makeMenuItem(panel, dialogProvider, topicUnderMouse, selectedTopics, customProcessors.get(p.getClass()));
if (item != null) {
item.setEnabled(p.isEnabled(panel, topicUnderMouse, selectedTopics));
list.add(item);
}
}
}
}
return list;
}
|
[
"CWE-611"
] |
CVE-2018-1000542
|
MEDIUM
| 6.8
|
raydac/netbeans-mmd-plugin
|
findPopupMenuItems
|
mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java
|
9fba652bf06e649186b8f9e612d60e9cc15097e9
| 1
|
Analyze the following code function for security vulnerabilities
|
protected ResourceRenderer getRendererByExtension(String ext) {
return renderers
.get(ext);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRendererByExtension
File: framework/impl/src/main/java/org/ajax4jsf/resource/ResourceBuilderImpl.java
Repository: nuxeo/richfaces-3.3
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2013-4521
|
HIGH
| 7.5
|
nuxeo/richfaces-3.3
|
getRendererByExtension
|
framework/impl/src/main/java/org/ajax4jsf/resource/ResourceBuilderImpl.java
|
6cbad2a6dcb70d3e33a6ce5879b1a3ad79eb1aec
| 0
|
Analyze the following code function for security vulnerabilities
|
private void parseMetadata(List<Element> metadata, XmlSerializer serializer) throws IOException
{
final String targetLanguage = getTargetLanguage(metadata, "metadata");
for (Element e : metadata)
{
if (targetLanguage == null || XmlUtils.ensureAttribute(e, "lang", targetLanguage))
{
for (Element p : XmlUtils.getElements(e))
{
if (p.getTagName().equals("title"))
{
serializer.attribute(FormulaList.XML_NS,
DocumentProperties.XML_PROP_TITLE, p.getTextContent());
}
if (p.getTagName().equals("author"))
{
serializer.attribute(FormulaList.XML_NS,
DocumentProperties.XML_PROP_AUTHOR, p.getTextContent());
}
if (p.getTagName().equals("description"))
{
serializer.attribute(FormulaList.XML_NS,
DocumentProperties.XML_PROP_DESCRIPTION, p.getTextContent());
}
}
break;
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseMetadata
File: app/src/main/java/com/mkulesh/micromath/io/ImportFromSMathStudio.java
Repository: mkulesh/microMathematics
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000821
|
HIGH
| 7.5
|
mkulesh/microMathematics
|
parseMetadata
|
app/src/main/java/com/mkulesh/micromath/io/ImportFromSMathStudio.java
|
5c05ac8de16c569ff0a1816f20be235090d3dd9d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void disposeBackingStore() {
super.disposeBackingStore();
if (dynamicDataSource) {
datasource = null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: disposeBackingStore
File: modules/library/referencing/src/main/java/org/geotools/referencing/factory/epsg/ThreadedEpsgFactory.java
Repository: geotools
The code follows secure coding practices.
|
[
"CWE-917"
] |
CVE-2022-24818
|
HIGH
| 7.5
|
geotools
|
disposeBackingStore
|
modules/library/referencing/src/main/java/org/geotools/referencing/factory/epsg/ThreadedEpsgFactory.java
|
4f70fa3234391dd0cda883a20ab0ec75688cba49
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("unused")
@CalledByNative
private boolean filterTapOrPressEvent(int type, int x, int y) {
if (type == GestureEventType.LONG_PRESS && offerLongPressToEmbedder()) {
return true;
}
updateForTapOrPress(type, x, y);
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: filterTapOrPressEvent
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
filterTapOrPressEvent
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean shouldTokenBeReset(XWikiDocument userDocument)
{
Integer tokenLifeTime = this.configurationSource.getProperty(TOKEN_LIFETIME, 0);
boolean result = true;
if (tokenLifeTime != 0) {
Instant saveInstant = userDocument.getDate().toInstant();
Instant now = Instant.now();
return (saveInstant.plus(tokenLifeTime, ChronoUnit.MINUTES).isBefore(now));
}
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: shouldTokenBeReset
File: xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-default/src/main/java/org/xwiki/security/authentication/internal/DefaultResetPasswordManager.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-522"
] |
CVE-2022-41933
|
MEDIUM
| 6.5
|
xwiki/xwiki-platform
|
shouldTokenBeReset
|
xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-default/src/main/java/org/xwiki/security/authentication/internal/DefaultResetPasswordManager.java
|
443e8398b75a1295067d74afb5898370782d863a
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequiresFeature(PackageManager.FEATURE_SECURE_LOCK_SCREEN)
public void reportSuccessfulBiometricAttempt(int userHandle) {
if (mService != null) {
try {
mService.reportSuccessfulBiometricAttempt(userHandle);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: reportSuccessfulBiometricAttempt
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
|
reportSuccessfulBiometricAttempt
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getUserLanguage() {
if (userLanguage == null) {
userLanguage = (getMainSessionController() == null) ? "" : getMainSessionController()
.getFavoriteLanguage();
}
return userLanguage;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserLanguage
File: core-web/src/main/java/org/silverpeas/core/web/util/viewgenerator/html/browsebars/BrowseBarComplete.java
Repository: Silverpeas/Silverpeas-Core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-47324
|
MEDIUM
| 5.4
|
Silverpeas/Silverpeas-Core
|
getUserLanguage
|
core-web/src/main/java/org/silverpeas/core/web/util/viewgenerator/html/browsebars/BrowseBarComplete.java
|
9a55728729a3b431847045c674b3e883507d1e1a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Set<Class<?>> list() {
final ImmutableSet.Builder<Class<?>> classes = ImmutableSet.builder();
try (DBCursor<ClusterConfig> clusterConfigs = dbCollection.find()) {
for (ClusterConfig clusterConfig : clusterConfigs) {
final String type = clusterConfig.type();
try {
final Class<?> cls = chainingClassLoader.loadClass(type);
classes.add(cls);
} catch (ClassNotFoundException e) {
LOG.debug("Couldn't find configuration class \"{}\"", type, e);
}
}
}
return classes.build();
}
|
Vulnerability Classification:
- CWE: CWE-863
- CVE: CVE-2024-24824
- Severity: HIGH
- CVSS Score: 8.8
Description: Restrict classes allowed for cluster config and event types (#18165) (#18179)
* Restrict classes allowed for cluster config and event types (#18165)
Add a new safe_classes configuration option to restrict the classes allowed to be used
as cluster config and event types.
The configuration option allows to specify a comma-separated set of prefixes matched
against the fully qualified class name.
For now, the default value for the configuration is org.graylog.,org.graylog2., which will
allow all classes that Graylog maintains.
This should work out of the box for almost all setups. Changing the default value might
only be necessary if external plugins require cluster config or event types outside the
"org.graylog." or "org.graylog2." namespaces. If that is the case, the configuration setting
can be adjusted to cover this use case, e.b. by setting it to
safe_classes = org.graylog.,org.graylog2.,custom.plugin.namespace.
if said classes are located within the custom.plugin.namespace package.
Refs: https://github.com/Graylog2/graylog2-server/security/advisories/GHSA-p6gg-5hf4-4rgj
(cherry picked from commit 813203263b06dda18e2aed68ae92b34277f904b4)
* Use javax.inject.Inject instead of jakarta.inject.Inject
* Use javax.ws.rs instead of jakarta.ws.rs
---------
Co-authored-by: Othello Maurer <othello@graylog.com>
Function: list
File: graylog2-server/src/main/java/org/graylog2/cluster/ClusterConfigServiceImpl.java
Repository: Graylog2/graylog2-server
Fixed Code:
@Override
public Set<Class<?>> list() {
final ImmutableSet.Builder<Class<?>> classes = ImmutableSet.builder();
try (DBCursor<ClusterConfig> clusterConfigs = dbCollection.find()) {
for (ClusterConfig clusterConfig : clusterConfigs) {
final String type = clusterConfig.type();
try {
final Class<?> cls = chainingClassLoader.loadClassSafely(type);
classes.add(cls);
} catch (ClassNotFoundException e) {
LOG.debug("Couldn't find configuration class \"{}\"", type, e);
} catch (UnsafeClassLoadingAttemptException e) {
LOG.warn("Couldn't load class <{}>.", type, e);
}
}
}
return classes.build();
}
|
[
"CWE-863"
] |
CVE-2024-24824
|
HIGH
| 8.8
|
Graylog2/graylog2-server
|
list
|
graylog2-server/src/main/java/org/graylog2/cluster/ClusterConfigServiceImpl.java
|
75ef2b8d60e7d67f859b79fe712c8ae7b2e861d8
| 1
|
Analyze the following code function for security vulnerabilities
|
public String getModules() {
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getModules
File: src/main/java/hudson/scm/SubversionSCM.java
Repository: jenkinsci/subversion-plugin
The code follows secure coding practices.
|
[
"CWE-255"
] |
CVE-2013-6372
|
LOW
| 2.1
|
jenkinsci/subversion-plugin
|
getModules
|
src/main/java/hudson/scm/SubversionSCM.java
|
7d4562d6f7e40de04bbe29577b51c79f07d05ba6
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void setUseClientMode(boolean mode) {
client_mode = mode;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUseClientMode
File: src/main/java/org/conscrypt/SSLParametersImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3840
|
HIGH
| 10
|
android
|
setUseClientMode
|
src/main/java/org/conscrypt/SSLParametersImpl.java
|
5af5e93463f4333187e7e35f3bd2b846654aa214
| 0
|
Analyze the following code function for security vulnerabilities
|
public void hideNotifyPublic() {
super.hideNotify();
saveTextEditingState();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hideNotifyPublic
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
|
hideNotifyPublic
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
private final BigInteger _bigNegative(long l) {
// 03-Dec-2017, tatu: [dataformats-binary#124] Careful with overflow
BigInteger unsignedBase = _bigPositive(l);
return unsignedBase.negate().subtract(BigInteger.ONE);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _bigNegative
File: cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
Repository: FasterXML/jackson-dataformats-binary
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2020-28491
|
MEDIUM
| 5
|
FasterXML/jackson-dataformats-binary
|
_bigNegative
|
cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
|
de072d314af8f5f269c8abec6930652af67bc8e6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<PreferentialNetworkServiceConfig> getPreferentialNetworkServiceConfigs() {
if (!mHasFeature) {
return List.of(PreferentialNetworkServiceConfig.DEFAULT);
}
final CallerIdentity caller = getCallerIdentity();
Preconditions.checkCallAuthorization((isProfileOwner(caller)
&& isManagedProfile(caller.getUserId()))
|| isDefaultDeviceOwner(caller),
"Caller is not managed profile owner or device owner;"
+ " only managed profile owner or device owner may retrieve the "
+ "preferential network service configurations");
synchronized (getLockObject()) {
final ActiveAdmin requiredAdmin = getDeviceOrProfileOwnerAdminLocked(
caller.getUserId());
return requiredAdmin.mPreferentialNetworkServiceConfigs;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPreferentialNetworkServiceConfigs
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
|
getPreferentialNetworkServiceConfigs
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public void clearBackupData(String transportName, String packageName) {
if (DEBUG) Slog.v(TAG, "clearBackupData() of " + packageName + " on " + transportName);
PackageInfo info;
try {
info = mPackageManager.getPackageInfo(packageName, PackageManager.GET_SIGNATURES);
} catch (NameNotFoundException e) {
Slog.d(TAG, "No such package '" + packageName + "' - not clearing backup data");
return;
}
// If the caller does not hold the BACKUP permission, it can only request a
// wipe of its own backed-up data.
HashSet<String> apps;
if ((mContext.checkPermission(android.Manifest.permission.BACKUP, Binder.getCallingPid(),
Binder.getCallingUid())) == PackageManager.PERMISSION_DENIED) {
apps = mBackupParticipants.get(Binder.getCallingUid());
} else {
// a caller with full permission can ask to back up any participating app
// !!! TODO: allow data-clear of ANY app?
if (MORE_DEBUG) Slog.v(TAG, "Privileged caller, allowing clear of other apps");
apps = new HashSet<String>();
int N = mBackupParticipants.size();
for (int i = 0; i < N; i++) {
HashSet<String> s = mBackupParticipants.valueAt(i);
if (s != null) {
apps.addAll(s);
}
}
}
// Is the given app an available participant?
if (apps.contains(packageName)) {
// found it; fire off the clear request
if (MORE_DEBUG) Slog.v(TAG, "Found the app - running clear process");
mBackupHandler.removeMessages(MSG_RETRY_CLEAR);
synchronized (mQueueLock) {
final IBackupTransport transport = getTransport(transportName);
if (transport == null) {
// transport is currently unavailable -- make sure to retry
Message msg = mBackupHandler.obtainMessage(MSG_RETRY_CLEAR,
new ClearRetryParams(transportName, packageName));
mBackupHandler.sendMessageDelayed(msg, TRANSPORT_RETRY_INTERVAL);
return;
}
long oldId = Binder.clearCallingIdentity();
mWakelock.acquire();
Message msg = mBackupHandler.obtainMessage(MSG_RUN_CLEAR,
new ClearParams(transport, info));
mBackupHandler.sendMessage(msg);
Binder.restoreCallingIdentity(oldId);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearBackupData
File: services/backup/java/com/android/server/backup/BackupManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3759
|
MEDIUM
| 5
|
android
|
clearBackupData
|
services/backup/java/com/android/server/backup/BackupManagerService.java
|
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
@After
public void tearDown() throws Exception {
super.tearDown();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: tearDown
File: tests/src/com/android/server/telecom/tests/VideoCallTests.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
tearDown
|
tests/src/com/android/server/telecom/tests/VideoCallTests.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void deleteAdminInfo(int id) {
String sql = "delete from admin_table where id=?";
try {
ps = DbUtil.getConnection().prepareStatement(sql);
ps.setInt(1, id);
ps.executeUpdate();
} catch (ClassNotFoundException | SQLException e) {
e.printStackTrace();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deleteAdminInfo
File: src/com/bijay/onlinevotingsystem/dao/AdminDaoImpl.java
Repository: bijaythapaa/OnlineVotingSystem
The code follows secure coding practices.
|
[
"CWE-916"
] |
CVE-2021-21253
|
MEDIUM
| 5
|
bijaythapaa/OnlineVotingSystem
|
deleteAdminInfo
|
src/com/bijay/onlinevotingsystem/dao/AdminDaoImpl.java
|
0181cb0272857696c8eb3e44fcf6cb014ff90f09
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getId() {
return clazz.getName();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getId
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
|
getId
|
core/src/main/java/hudson/model/Descriptor.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Collection create(Context context, Community community) throws SQLException, AuthorizeException {
return create(context, community, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: create
File: dspace-api/src/main/java/org/dspace/content/CollectionServiceImpl.java
Repository: DSpace
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-41189
|
HIGH
| 9
|
DSpace
|
create
|
dspace-api/src/main/java/org/dspace/content/CollectionServiceImpl.java
|
277b499a5cd3a4f5eb2370513a1b7e4ec2a6e041
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<HasElement> getActiveRouterTargetsChain() {
return Collections.unmodifiableList(routerTargetChain);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getActiveRouterTargetsChain
File: flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2023-25499
|
MEDIUM
| 6.5
|
vaadin/flow
|
getActiveRouterTargetsChain
|
flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
|
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isSpdyEnabled() {
return spdyEnabled;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isSpdyEnabled
File: api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java
Repository: AsyncHttpClient/async-http-client
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2013-7397
|
MEDIUM
| 4.3
|
AsyncHttpClient/async-http-client
|
isSpdyEnabled
|
api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java
|
df6ed70e86c8fc340ed75563e016c8baa94d7e72
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getNodeName() {
return doc.getNodeName();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNodeName
File: HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java
Repository: LoboEvolution
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000540
|
MEDIUM
| 6.8
|
LoboEvolution
|
getNodeName
|
HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java
|
9b75694cedfa4825d4a2330abf2719d470c654cd
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getServletPath()
{
return this.xwiki.getServletPath(this.context.getWikiId(), this.context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getServletPath
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
|
getServletPath
|
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
|
public static boolean checkPermission(String permission) {
final int perm = FileDownloadHelper.getAppContext()
.checkCallingOrSelfPermission(permission);
return perm == PackageManager.PERMISSION_GRANTED;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkPermission
File: library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java
Repository: lingochamp/FileDownloader
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-11248
|
HIGH
| 7.5
|
lingochamp/FileDownloader
|
checkPermission
|
library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java
|
b023cc081bbecdd2a9f3549a3ae5c12a9647ed7f
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getVoiceMailAlphaTagForSubscriber(int subId) {
PhoneSubInfoProxy phoneSubInfoProxy = getPhoneSubInfoProxy(subId);
if (phoneSubInfoProxy != null) {
return phoneSubInfoProxy.getVoiceMailAlphaTag();
} else {
Rlog.e(TAG,"getVoiceMailAlphaTag phoneSubInfoProxy is" +
" null for Subscription:" + subId);
return null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getVoiceMailAlphaTagForSubscriber
File: src/java/com/android/internal/telephony/PhoneSubInfoController.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-0831
|
MEDIUM
| 4.3
|
android
|
getVoiceMailAlphaTagForSubscriber
|
src/java/com/android/internal/telephony/PhoneSubInfoController.java
|
79eecef63f3ea99688333c19e22813f54d4a31b1
| 0
|
Analyze the following code function for security vulnerabilities
|
public static NativeArray jsFunction_getApplicationsWithPagination(Context cx, Scriptable thisObj, Object[] args, Function funObj)
throws ScriptException, APIManagementException {
NativeArray myn = new NativeArray(0);
if (args != null) {
String username = args[0].toString();
APIConsumer apiConsumer = getAPIConsumer(thisObj);
Application[] applications;
String groupId="";
int start = 0;
int offset = 10;
String search = null;
String sortColumn = null;
String sortOrder = null;
if(args.length >1 && args[1] != null){
groupId = args[1].toString();
start = Integer.parseInt(args[2].toString());
offset = Integer.parseInt(args[3].toString());
search = args[4].toString();
sortColumn = args[5].toString();
sortOrder = args[6].toString();
}
applications = apiConsumer.getApplicationsWithPagination(new Subscriber(username), groupId, start ,offset
,search,sortColumn,sortOrder);
ApiMgtDAO apiMgtDAO = ApiMgtDAO.getInstance();
int applicationCount = apiMgtDAO.getAllApplicationCount(new Subscriber(username), groupId,search);
Subscriber subscriber = new Subscriber(username);
if (applications != null) {
int i = 0;
for (Application application : applications) {
int subscriptionCount = apiConsumer.getSubscriptionCount(subscriber,application.getName(),groupId);
NativeObject row = new NativeObject();
row.put("name", row, application.getName());
row.put("tier", row, application.getTier());
row.put("id", row, application.getId());
row.put("status", row, application.getStatus());
row.put("description", row, application.getDescription());
row.put("apiCount", row, subscriptionCount);
row.put("groupId", row, application.getGroupId());
row.put("isBlacklisted", row, application.getIsBlackListed());
row.put("totalCount", row, applicationCount);
row.put("owner", row, application.getOwner());
row.put("tokenType", row, application.getTokenType());
myn.put(i++, myn, row);
}
}
}
return myn;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: jsFunction_getApplicationsWithPagination
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_getApplicationsWithPagination
|
components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
|
490f2860822f89d745b7c04fa9570bd86bef4236
| 0
|
Analyze the following code function for security vulnerabilities
|
private int getActionTombstoneLayoutResource() {
return R.layout.notification_material_action_tombstone;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getActionTombstoneLayoutResource
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
getActionTombstoneLayoutResource
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public IBinder onBind(Intent intent) {
debugLog("onBind()");
return mBinder;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onBind
File: src/com/android/bluetooth/btservice/AdapterService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-362",
"CWE-20"
] |
CVE-2016-3760
|
MEDIUM
| 5.4
|
android
|
onBind
|
src/com/android/bluetooth/btservice/AdapterService.java
|
122feb9a0b04290f55183ff2f0384c6c53756bd8
| 0
|
Analyze the following code function for security vulnerabilities
|
private void populateStreamsForFiles() {
// We convert files into streams so that we can use the same method for interchangeably
// copying streams and files.
if (inputStreamGetter == null) {
inputStreamGetter = fis(inputFile);
}
if (outputStreamGetter == null) {
outputStreamGetter = fos(outputFile);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: populateStreamsForFiles
File: APDE/src/main/java/com/calsignlabs/apde/build/dag/CopyBuildTask.java
Repository: Calsign/APDE
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-36628
|
CRITICAL
| 9.8
|
Calsign/APDE
|
populateStreamsForFiles
|
APDE/src/main/java/com/calsignlabs/apde/build/dag/CopyBuildTask.java
|
c6d64cbe465348c1bfd211122d89e3117afadecf
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void disableCertificateValidation(ClientBuilder clientBuilder) throws KeyManagementException, NoSuchAlgorithmException {
TrustManager[] trustAllCerts = new X509TrustManager[] {
new X509TrustManager() {
@Override
public X509Certificate[] getAcceptedIssuers() {
return null;
}
@Override
public void checkClientTrusted(X509Certificate[] certs, String authType) {
}
@Override
public void checkServerTrusted(X509Certificate[] certs, String authType) {
}
}
};
SSLContext sslContext = SSLContext.getInstance("TLS");
sslContext.init(null, trustAllCerts, new SecureRandom());
clientBuilder.sslContext(sslContext);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: disableCertificateValidation
File: samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
disableCertificateValidation
|
samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
private List<GHPoint> getPointsFromRequest(HttpServletRequest httpServletRequest, String profile) {
String url = httpServletRequest.getRequestURI();
url = url.replaceFirst("/navigate/directions/v5/gh/" + profile + "/", "");
url = url.replaceAll("\\?[*]", "");
String[] pointStrings = url.split(";");
List<GHPoint> points = new ArrayList<>(pointStrings.length);
for (int i = 0; i < pointStrings.length; i++) {
points.add(GHPoint.fromStringLonLat(pointStrings[i]));
}
return points;
}
|
Vulnerability Classification:
- CWE: CWE-400
- CVE: CVE-2021-29506
- Severity: MEDIUM
- CVSS Score: 4.0
Description: avoid regex in navigate module (#2304)
* replace two regexs with one indexOf
* make check stricter
* use @easbar's suggestion
Function: getPointsFromRequest
File: navigation/src/main/java/com/graphhopper/navigation/NavigateResource.java
Repository: graphhopper
Fixed Code:
private List<GHPoint> getPointsFromRequest(HttpServletRequest httpServletRequest, String profile) {
String url = httpServletRequest.getRequestURI();
String urlStart = "/navigate/directions/v5/gh/" + profile + "/";
if (!url.startsWith(urlStart)) throw new IllegalArgumentException("Incorrect URL " + url);
url = url.substring(urlStart.length());
String[] pointStrings = url.split(";");
List<GHPoint> points = new ArrayList<>(pointStrings.length);
for (int i = 0; i < pointStrings.length; i++) {
points.add(GHPoint.fromStringLonLat(pointStrings[i]));
}
return points;
}
|
[
"CWE-400"
] |
CVE-2021-29506
|
MEDIUM
| 4
|
graphhopper
|
getPointsFromRequest
|
navigation/src/main/java/com/graphhopper/navigation/NavigateResource.java
|
eb189be1fa7443ebf4ae881e737a18f818c95f41
| 1
|
Analyze the following code function for security vulnerabilities
|
static EncodingType get(final int ordinal)
{
EncodingType[] values = EncodingType.values;
if (values == null) {
values = EncodingType.values();
EncodingType.values = values;
}
if (ordinal >= 0 && ordinal < values.length) {
return values[ordinal];
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: get
File: ext/java/nokogiri/Html4SaxParserContext.java
Repository: sparklemotion/nokogiri
The code follows secure coding practices.
|
[
"CWE-241"
] |
CVE-2022-29181
|
MEDIUM
| 6.4
|
sparklemotion/nokogiri
|
get
|
ext/java/nokogiri/Html4SaxParserContext.java
|
db05ba9a1bd4b90aa6c76742cf6102a7c7297267
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected ObjectStreamClass readClassDescriptor()
throws IOException, ClassNotFoundException {
int type = read();
if (type < 0) {
throw new EOFException();
}
switch (type) {
case ThrowableObjectOutputStream.TYPE_EXCEPTION:
return ObjectStreamClass.lookup(Exception.class);
case ThrowableObjectOutputStream.TYPE_STACKTRACEELEMENT:
return ObjectStreamClass.lookup(StackTraceElement.class);
case ThrowableObjectOutputStream.TYPE_FAT_DESCRIPTOR:
return super.readClassDescriptor();
case ThrowableObjectOutputStream.TYPE_THIN_DESCRIPTOR:
String className = readUTF();
Class<?> clazz = loadClass(className);
return ObjectStreamClass.lookup(clazz);
default:
throw new StreamCorruptedException(
"Unexpected class descriptor type: " + type);
}
}
|
Vulnerability Classification:
- CWE: CWE-74
- CVE: CVE-2015-5377
- Severity: HIGH
- CVSS Score: 7.5
Description: Restrict Exception deserialization to Core and JDK classes
when 3rd party exceptions are deserialized they might carry
classes not present on the deserializing node. This causes hard
exceptions and looses the exception entirely. This commit restricts
the classes we support for deserialization for core and selected JDK
classes to guarantee they are present on both source and target nodes
Function: readClassDescriptor
File: src/main/java/org/elasticsearch/common/io/ThrowableObjectInputStream.java
Repository: elastic/elasticsearch
Fixed Code:
@Override
protected ObjectStreamClass readClassDescriptor()
throws IOException, ClassNotFoundException {
int type = read();
if (type < 0) {
throw new EOFException();
}
switch (type) {
case ThrowableObjectOutputStream.TYPE_EXCEPTION:
return ObjectStreamClass.lookup(Exception.class);
case ThrowableObjectOutputStream.TYPE_STACKTRACEELEMENT:
return ObjectStreamClass.lookup(StackTraceElement.class);
case ThrowableObjectOutputStream.TYPE_FAT_DESCRIPTOR:
return verify(super.readClassDescriptor());
case ThrowableObjectOutputStream.TYPE_THIN_DESCRIPTOR:
String className = readUTF();
Class<?> clazz = loadClass(className);
return verify(ObjectStreamClass.lookup(clazz));
default:
throw new StreamCorruptedException(
"Unexpected class descriptor type: " + type);
}
}
|
[
"CWE-74"
] |
CVE-2015-5377
|
HIGH
| 7.5
|
elastic/elasticsearch
|
readClassDescriptor
|
src/main/java/org/elasticsearch/common/io/ThrowableObjectInputStream.java
|
bf3052d14c874aead7da8855c5fcadf5428a43f2
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public void captureVideo(VideoCaptureConstraints cnst, ActionListener response) {
if (getActivity() == null) {
throw new RuntimeException("Cannot capture video in background mode");
}
if(!checkForPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE, "This is required to take a video")){
return;
}
if (getRequestedPermissions().contains(Manifest.permission.CAMERA)) {
// Normally we don't need to request the CAMERA permission since we use
// the ACTION_VIDEO_CAPTURE intent, which handles permissions itself.
// BUT: If the camera permission is included in the Manifest file, the
// intent will defer to the app's permissions, and on Android 6,
// the permission is denied unless we do the runtime check for permission.
// See https://github.com/codenameone/CodenameOne/issues/2409#issuecomment-391696058
if(!checkForPermission(Manifest.permission.CAMERA, "This is required to take a video")){
return;
}
}
callback = new EventDispatcher();
callback.addListener(response);
Intent intent = new Intent(android.provider.MediaStore.ACTION_VIDEO_CAPTURE);
if (cnst != null) {
switch (cnst.getQuality()) {
case VideoCaptureConstraints.QUALITY_LOW:
intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 0);
break;
case VideoCaptureConstraints.QUALITY_HIGH:
intent.putExtra(MediaStore.EXTRA_VIDEO_QUALITY, 1);
break;
}
if (cnst.getMaxFileSize() > 0) {
intent.putExtra(MediaStore.EXTRA_SIZE_LIMIT, cnst.getMaxFileSize());
}
if (cnst.getMaxLength() > 0) {
intent.putExtra(MediaStore.EXTRA_DURATION_LIMIT, cnst.getMaxLength());
}
}
File newFile = getOutputMediaFile(true);
newFile.getParentFile().mkdirs();
newFile.getParentFile().setWritable(true, false);
Uri videoUri = FileProvider.getUriForFile(getContext(), getContext().getPackageName()+".provider", newFile);
Storage.getInstance().writeObject("videoUri", newFile.getAbsolutePath());
intent.putExtra(android.provider.MediaStore.EXTRA_OUTPUT, videoUri);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
if (Build.VERSION.SDK_INT < 21) {
List<ResolveInfo> resInfoList = getContext().getPackageManager().queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY);
for (ResolveInfo resolveInfo : resInfoList) {
String packageName = resolveInfo.activityInfo.packageName;
getContext().grantUriPermission(packageName, videoUri, Intent.FLAG_GRANT_WRITE_URI_PERMISSION | Intent.FLAG_GRANT_READ_URI_PERMISSION);
}
}
this.getActivity().startActivityForResult(intent, CAPTURE_VIDEO);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: captureVideo
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
|
captureVideo
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String _coercedTypeDesc() {
boolean structured;
String typeDesc;
JavaType t = getValueType();
if ((t != null) && !t.isPrimitive()) {
structured = (t.isContainerType() || t.isReferenceType());
typeDesc = ClassUtil.getTypeDescription(t);
} else {
Class<?> cls = handledType();
structured = cls.isArray() || Collection.class.isAssignableFrom(cls)
|| Map.class.isAssignableFrom(cls);
typeDesc = ClassUtil.getClassDescription(cls);
}
if (structured) {
return "element of "+typeDesc;
}
return typeDesc+" value";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _coercedTypeDesc
File: src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2022-42003
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
_coercedTypeDesc
|
src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java
|
d78d00ee7b5245b93103fef3187f70543d67ca33
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String getArchiveDirPath() {
String value = Context.getAdministrationService().getGlobalProperty("htmlformentry.archiveDir");
if(value != null && org.springframework.util.StringUtils.hasLength(value)) {
//Replace %Y and %M if any
Date today = new Date();
GregorianCalendar gCal = new GregorianCalendar();
value = value.replace("%Y", String.valueOf(gCal.get(Calendar.YEAR)));
value = value.replace("%y",String.valueOf(gCal.get(Calendar.YEAR)));
int month = gCal.get(Calendar.MONTH);
month++;
if(month<10) {
value = value.replace("%M","0"+month);
value = value.replace("%m","0"+month);
}
else {
value = value.replace("%M",String.valueOf(month));
value = value.replace("%m",String.valueOf(month));
}
//Check if not absolute concatenate with application directory
File path = new File(value);
if(!path.isAbsolute()) {
return OpenmrsUtil.getApplicationDataDirectory() + File.separator + value;
}
return value;
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getArchiveDirPath
File: api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java
Repository: openmrs/openmrs-module-htmlformentry
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-16521
|
HIGH
| 7.5
|
openmrs/openmrs-module-htmlformentry
|
getArchiveDirPath
|
api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java
|
9dcd304688e65c31cac5532fe501b9816ed975ae
| 0
|
Analyze the following code function for security vulnerabilities
|
public Stream<QuerySortOrder> getSortOrder(SortDirection direction) {
return sortOrderProvider.apply(direction);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSortOrder
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
|
getSortOrder
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
void dumpPermissions(FileDescriptor fd, PrintWriter pw, String[] args,
int opti, boolean dumpAll, String dumpPackage) {
pw.println("ACTIVITY MANAGER URI PERMISSIONS (dumpsys activity permissions)");
mUgmInternal.dump(pw, dumpAll, dumpPackage);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpPermissions
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21292
|
MEDIUM
| 5.5
|
android
|
dumpPermissions
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable
List<ShortcutInfo> findAll(@NonNull final Collection<String> ids) {
synchronized (mLock) {
return ids.stream().map(mShortcuts::get)
.filter(Objects::nonNull).collect(Collectors.toList());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findAll
File: services/core/java/com/android/server/pm/ShortcutPackage.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40075
|
MEDIUM
| 5.5
|
android
|
findAll
|
services/core/java/com/android/server/pm/ShortcutPackage.java
|
ae768fbb9975fdab267f525831cb52f485ab0ecc
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setPrimaryView(View v) {
this.primaryView = v.getViewName();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setPrimaryView
File: core/src/main/java/jenkins/model/Jenkins.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-2065
|
MEDIUM
| 4.3
|
jenkinsci/jenkins
|
setPrimaryView
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public ServiceProvider getApplicationExcludingFileBasedSPs(String applicationName, String tenantDomain)
throws IdentityApplicationManagementException {
ServiceProvider serviceProvider;
// invoking the listeners
Collection<ApplicationMgtListener> listeners = getApplicationMgtListeners();
for (ApplicationMgtListener listener : listeners) {
if (listener.isEnable() && !listener.doPreGetApplicationExcludingFileBasedSPs(applicationName,
tenantDomain)) {
return null;
}
}
try {
startTenantFlow(tenantDomain);
ApplicationDAO appDAO = ApplicationMgtSystemConfig.getInstance().getApplicationDAO();
serviceProvider = appDAO.getApplication(applicationName, tenantDomain);
} finally {
endTenantFlow();
}
// invoking the listeners
for (ApplicationMgtListener listener : listeners) {
if (listener.isEnable() && !listener.doPostGetApplicationExcludingFileBasedSPs(serviceProvider,
applicationName, tenantDomain)) {
return null;
}
}
return serviceProvider;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getApplicationExcludingFileBasedSPs
File: components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
Repository: wso2/carbon-identity-framework
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-42646
|
MEDIUM
| 6.4
|
wso2/carbon-identity-framework
|
getApplicationExcludingFileBasedSPs
|
components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
|
e9119883ee02a884f3c76c7bbc4022a4f4c58fc0
| 0
|
Analyze the following code function for security vulnerabilities
|
void setAllowlistDurationLocked(IBinder allowlistToken, long duration, int type,
@ReasonCode int reasonCode, @Nullable String reason) {
if (duration > 0) {
if (mAllowlistDuration == null) {
mAllowlistDuration = new ArrayMap<>();
}
mAllowlistDuration.put(allowlistToken,
new TempAllowListDuration(duration, type, reasonCode, reason));
} else if (mAllowlistDuration != null) {
mAllowlistDuration.remove(allowlistToken);
if (mAllowlistDuration.size() <= 0) {
mAllowlistDuration = null;
}
}
this.stringName = null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAllowlistDurationLocked
File: services/core/java/com/android/server/am/PendingIntentRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-20918
|
CRITICAL
| 9.8
|
android
|
setAllowlistDurationLocked
|
services/core/java/com/android/server/am/PendingIntentRecord.java
|
8418e3a017428683d173c0c82b0eb02d5b923a4e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setActions(@Nullable String actions) {
this.actions = actions;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setActions
File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/OpsGenieNotifier.java
Repository: codecentric/spring-boot-admin
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2022-46166
|
CRITICAL
| 9.8
|
codecentric/spring-boot-admin
|
setActions
|
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/OpsGenieNotifier.java
|
c14c3ec12533f71f84de9ce3ce5ceb7991975f75
| 0
|
Analyze the following code function for security vulnerabilities
|
void cleanupRecentTasksLocked(int userId) {
if (mRecentTasks == null) {
// Happens when called from the packagemanager broadcast before boot.
return;
}
final HashMap<ComponentName, ActivityInfo> availActCache = new HashMap<>();
final HashMap<String, ApplicationInfo> availAppCache = new HashMap<>();
final IPackageManager pm = AppGlobals.getPackageManager();
final ActivityInfo dummyAct = new ActivityInfo();
final ApplicationInfo dummyApp = new ApplicationInfo();
int N = mRecentTasks.size();
int[] users = userId == UserHandle.USER_ALL
? getUsersLocked() : new int[] { userId };
for (int user : users) {
for (int i = 0; i < N; i++) {
TaskRecord task = mRecentTasks.get(i);
if (task.userId != user) {
// Only look at tasks for the user ID of interest.
continue;
}
if (task.autoRemoveRecents && task.getTopActivity() == null) {
// This situation is broken, and we should just get rid of it now.
mRecentTasks.remove(i);
task.removedFromRecents();
i--;
N--;
Slog.w(TAG, "Removing auto-remove without activity: " + task);
continue;
}
// Check whether this activity is currently available.
if (task.realActivity != null) {
ActivityInfo ai = availActCache.get(task.realActivity);
if (ai == null) {
try {
ai = pm.getActivityInfo(task.realActivity,
PackageManager.GET_UNINSTALLED_PACKAGES
| PackageManager.GET_DISABLED_COMPONENTS, user);
} catch (RemoteException e) {
// Will never happen.
continue;
}
if (ai == null) {
ai = dummyAct;
}
availActCache.put(task.realActivity, ai);
}
if (ai == dummyAct) {
// This could be either because the activity no longer exists, or the
// app is temporarily gone. For the former we want to remove the recents
// entry; for the latter we want to mark it as unavailable.
ApplicationInfo app = availAppCache.get(task.realActivity.getPackageName());
if (app == null) {
try {
app = pm.getApplicationInfo(task.realActivity.getPackageName(),
PackageManager.GET_UNINSTALLED_PACKAGES
| PackageManager.GET_DISABLED_COMPONENTS, user);
} catch (RemoteException e) {
// Will never happen.
continue;
}
if (app == null) {
app = dummyApp;
}
availAppCache.put(task.realActivity.getPackageName(), app);
}
if (app == dummyApp || (app.flags&ApplicationInfo.FLAG_INSTALLED) == 0) {
// Doesn't exist any more! Good-bye.
mRecentTasks.remove(i);
task.removedFromRecents();
i--;
N--;
Slog.w(TAG, "Removing no longer valid recent: " + task);
continue;
} else {
// Otherwise just not available for now.
if (task.isAvailable) {
if (DEBUG_RECENTS) Slog.d(TAG, "Making recent unavailable: "
+ task);
}
task.isAvailable = false;
}
} else {
if (!ai.enabled || !ai.applicationInfo.enabled
|| (ai.applicationInfo.flags&ApplicationInfo.FLAG_INSTALLED) == 0) {
if (task.isAvailable) {
if (DEBUG_RECENTS) Slog.d(TAG, "Making recent unavailable: "
+ task + " (enabled=" + ai.enabled + "/"
+ ai.applicationInfo.enabled + " flags="
+ Integer.toHexString(ai.applicationInfo.flags) + ")");
}
task.isAvailable = false;
} else {
if (!task.isAvailable) {
if (DEBUG_RECENTS) Slog.d(TAG, "Making recent available: "
+ task);
}
task.isAvailable = true;
}
}
}
}
}
// Verify the affiliate chain for each task.
for (int i = 0; i < N; i = processNextAffiliateChainLocked(i)) {
}
mTmpRecents.clear();
// mRecentTasks is now in sorted, affiliated order.
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cleanupRecentTasksLocked
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
|
cleanupRecentTasksLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setMtomEnabled(boolean mtomEnabled) {
this.mtomEnabled = mtomEnabled;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setMtomEnabled
File: spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java
Repository: spring-projects/spring-framework
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-4152
|
MEDIUM
| 6.8
|
spring-projects/spring-framework
|
setMtomEnabled
|
spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java
|
2843b7d2ee12e3f9c458f6f816befd21b402e3b9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public final boolean hasRawClass(Class<?> clz) { return _class == clz; }
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasRawClass
File: src/main/java/com/fasterxml/jackson/databind/JavaType.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2019-16942
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
hasRawClass
|
src/main/java/com/fasterxml/jackson/databind/JavaType.java
|
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
| 0
|
Analyze the following code function for security vulnerabilities
|
Integer getInteger(int index) {
return (Integer) mData[index];
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInteger
File: src/com/android/settings/network/apn/ApnEditor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40125
|
HIGH
| 7.8
|
android
|
getInteger
|
src/com/android/settings/network/apn/ApnEditor.java
|
63d464c3fa5c7b9900448fef3844790756e557eb
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getInternalId() {
return getState(false).internalId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInternalId
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
|
getInternalId
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
private JsonError newError(io.micronaut.http.HttpRequest<?> request, String message) {
URI uri = request.getUri();
return new JsonError(message)
.link(Link.SELF, Link.of(uri));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: newError
File: http-server-netty/src/main/java/io/micronaut/http/server/netty/RoutingInBoundHandler.java
Repository: micronaut-projects/micronaut-core
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-21700
|
MEDIUM
| 5
|
micronaut-projects/micronaut-core
|
newError
|
http-server-netty/src/main/java/io/micronaut/http/server/netty/RoutingInBoundHandler.java
|
b8ec32c311689667c69ae7d9f9c3b3a8abc96fe3
| 0
|
Analyze the following code function for security vulnerabilities
|
private int readVarint32() throws TException {
int result = 0;
int shift = 0;
if (trans_.getBytesRemainingInBuffer() >= 5) {
byte[] buf = trans_.getBuffer();
int pos = trans_.getBufferPosition();
int off = 0;
while (true) {
byte b = buf[pos + off];
result |= (int) (b & 0x7f) << shift;
if ((b & 0x80) != 0x80) {
break;
}
shift += 7;
off++;
}
trans_.consumeBuffer(off + 1);
} else {
while (true) {
byte b = readByte();
result |= (int) (b & 0x7f) << shift;
if ((b & 0x80) != 0x80) {
break;
}
shift += 7;
}
}
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readVarint32
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
|
readVarint32
|
thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java
|
08c2d412adb214c40bb03be7587057b25d053030
| 0
|
Analyze the following code function for security vulnerabilities
|
public Map<String, Authentication> getAuthentications() {
return authentications;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAuthentications
File: samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
getAuthentications
|
samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void removeAll() {
for (KBTemplate kbTemplate : findAll()) {
remove(kbTemplate);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeAll
File: modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java
Repository: brianchandotcom/liferay-portal
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2017-12647
|
MEDIUM
| 4.3
|
brianchandotcom/liferay-portal
|
removeAll
|
modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java
|
ef93d984be9d4d478a5c4b1ca9a86f4e80174774
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setTestDefaultCallScreeningApp(String packageName) {
try {
Log.startSession("TSI.sTDCSA");
enforceModifyPermission();
if (!Build.IS_USERDEBUG) {
throw new SecurityException("Test-only API.");
}
synchronized (mLock) {
long token = Binder.clearCallingIdentity();
try {
mCallsManager.getRoleManagerAdapter().setTestDefaultCallScreeningApp(
packageName);
} finally {
Binder.restoreCallingIdentity(token);
}
}
} finally {
Log.endSession();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setTestDefaultCallScreeningApp
File: src/com/android/server/telecom/TelecomServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21394
|
MEDIUM
| 5.5
|
android
|
setTestDefaultCallScreeningApp
|
src/com/android/server/telecom/TelecomServiceImpl.java
|
68dca62035c49e14ad26a54f614199cb29a3393f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getShortcutIconUri(int launcherUserId, @NonNull String launcherPackage,
@NonNull String packageName, @NonNull String shortcutId, int userId) {
Objects.requireNonNull(launcherPackage, "launcherPackage");
Objects.requireNonNull(packageName, "packageName");
Objects.requireNonNull(shortcutId, "shortcutId");
synchronized (mLock) {
throwIfUserLockedL(userId);
throwIfUserLockedL(launcherUserId);
getLauncherShortcutsLocked(launcherPackage, userId, launcherUserId)
.attemptToRestoreIfNeededAndSave();
final ShortcutPackage p = getUserShortcutsLocked(userId)
.getPackageShortcutsIfExists(packageName);
if (p == null) {
return null;
}
final ShortcutInfo shortcutInfo = p.findShortcutById(shortcutId);
if (shortcutInfo == null) {
return null;
}
return getShortcutIconUriInternal(launcherUserId, launcherPackage,
packageName, shortcutInfo, userId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getShortcutIconUri
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
|
getShortcutIconUri
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String makeBetterErrorString(String msg,
SAXParseException ex) {
StringBuilder sb = new StringBuilder(msg);
sb.append(": ");
String str = ex.getMessage();
if (str.lastIndexOf('.') == str.length() - 1) {
str = str.substring(0, str.length() - 1);
}
sb.append(str);
sb.append(" at document line ").append(ex.getLineNumber());
sb.append(", column ").append(ex.getColumnNumber());
if (ex.getSystemId() != null) {
sb.append(" in entity from systemID ").append(ex.getSystemId());
} else if (ex.getPublicId() != null) {
sb.append(" in entity from publicID ").append(ex.getPublicId());
}
sb.append('.');
return sb.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: makeBetterErrorString
File: src/edu/stanford/nlp/util/XMLUtils.java
Repository: stanfordnlp/CoreNLP
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-0239
|
HIGH
| 7.5
|
stanfordnlp/CoreNLP
|
makeBetterErrorString
|
src/edu/stanford/nlp/util/XMLUtils.java
|
1940ffb938dc4f3f5bc5f2a2fd8b35aabbbae3dd
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean isDataOrObbRelativePath(@Nullable String path) {
if (path == null) return false;
final Matcher m = PATTERN_DATA_OR_OBB_RELATIVE_PATH.matcher(path);
return m.matches();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isDataOrObbRelativePath
File: src/com/android/providers/media/util/FileUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2023-35670
|
HIGH
| 7.8
|
android
|
isDataOrObbRelativePath
|
src/com/android/providers/media/util/FileUtils.java
|
db3c69afcb0a45c8aa2f333fcde36217889899fe
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean canBeForceHidden(WindowState win, WindowManager.LayoutParams attrs) {
switch (attrs.type) {
case TYPE_STATUS_BAR:
case TYPE_NAVIGATION_BAR:
case TYPE_WALLPAPER:
case TYPE_DREAM:
case TYPE_UNIVERSE_BACKGROUND:
case TYPE_KEYGUARD_SCRIM:
return false;
default:
return true;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: canBeForceHidden
File: policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-0812
|
MEDIUM
| 6.6
|
android
|
canBeForceHidden
|
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
|
84669ca8de55d38073a0dcb01074233b0a417541
| 0
|
Analyze the following code function for security vulnerabilities
|
@TestOnly
private List<String> submoduleFolders(List<String> submoduleLines) {
ArrayList<String> submoduleFolders = new ArrayList<>();
for (String submoduleLine : submoduleLines) {
Matcher m = GIT_SUBMODULE_STATUS_PATTERN.matcher(submoduleLine);
if (!m.find()) {
bomb("Unable to parse git-submodule output line: " + submoduleLine + "\n"
+ "From output:\n"
+ StringUtils.join(submoduleLines, "\n"));
}
submoduleFolders.add(m.group(1));
}
return submoduleFolders;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: submoduleFolders
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
|
submoduleFolders
|
domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
|
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void toggleContactBlock() {
final int position = contact_context_id;
BlockContactDialog.show(this, (Contact) contacts.get(position));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toggleContactBlock
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
|
toggleContactBlock
|
src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable
private Token getToken(final String tokenId, final HttpSession session, final boolean pop) {
Token token = (Token) session.getAttribute(tokenId);
if (token != null && pop) {
session.removeAttribute(tokenId);
}
return token;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getToken
File: core-rs/src/main/java/org/silverpeas/core/web/token/SynchronizerTokenService.java
Repository: Silverpeas/Silverpeas-Core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-47324
|
MEDIUM
| 5.4
|
Silverpeas/Silverpeas-Core
|
getToken
|
core-rs/src/main/java/org/silverpeas/core/web/token/SynchronizerTokenService.java
|
9a55728729a3b431847045c674b3e883507d1e1a
| 0
|
Analyze the following code function for security vulnerabilities
|
private void adjustDisplaySizeRanges(DisplayInfo displayInfo, int rotation, int dw, int dh) {
// TODO: Multidisplay: for now only use with default display.
final int width = mPolicy.getConfigDisplayWidth(dw, dh, rotation);
if (width < displayInfo.smallestNominalAppWidth) {
displayInfo.smallestNominalAppWidth = width;
}
if (width > displayInfo.largestNominalAppWidth) {
displayInfo.largestNominalAppWidth = width;
}
final int height = mPolicy.getConfigDisplayHeight(dw, dh, rotation);
if (height < displayInfo.smallestNominalAppHeight) {
displayInfo.smallestNominalAppHeight = height;
}
if (height > displayInfo.largestNominalAppHeight) {
displayInfo.largestNominalAppHeight = height;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: adjustDisplaySizeRanges
File: services/core/java/com/android/server/wm/WindowManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3875
|
HIGH
| 7.2
|
android
|
adjustDisplaySizeRanges
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
void createContentViewAndroidDelegate() {
mViewAndroidDelegate = new ContentViewAndroidDelegate();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createContentViewAndroidDelegate
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
|
createContentViewAndroidDelegate
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
9d343ad2ea6ec395c377a4efa266057155bfa9c1
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String getOperatingSystem() {
String name = System.getProperty("os.name").toLowerCase().trim();
if( name.startsWith("linux") ) {
return "linux";
}
if( name.startsWith("mac os x") ) {
return "osx";
}
if( name.startsWith("win") ) {
return "windows";
}
return name.replaceAll("\\W+", "_");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getOperatingSystem
File: hawtjni-runtime/src/main/java/org/fusesource/hawtjni/runtime/Library.java
Repository: fusesource/hawtjni
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2013-2035
|
MEDIUM
| 4.4
|
fusesource/hawtjni
|
getOperatingSystem
|
hawtjni-runtime/src/main/java/org/fusesource/hawtjni/runtime/Library.java
|
92c266170ce98edc200c656bd034a237098b8aa5
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void skip(TProtocol prot, byte type)
throws TException {
skip(prot, type, maxSkipDepth);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: skip
File: thrift/lib/java/thrift/src/main/java/com/facebook/thrift/protocol/TProtocolUtil.java
Repository: facebook/fbthrift
The code follows secure coding practices.
|
[
"CWE-755"
] |
CVE-2019-3559
|
MEDIUM
| 5
|
facebook/fbthrift
|
skip
|
thrift/lib/java/thrift/src/main/java/com/facebook/thrift/protocol/TProtocolUtil.java
|
a56346ceacad28bf470017a6bda1d5518d0bd943
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getPackageName()
{
return this.packageName;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPackageName
File: xwiki-platform-core/xwiki-platform-xar/xwiki-platform-xar-model/src/main/java/org/xwiki/xar/XarPackage.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2023-27480
|
HIGH
| 7.7
|
xwiki/xwiki-platform
|
getPackageName
|
xwiki-platform-core/xwiki-platform-xar/xwiki-platform-xar-model/src/main/java/org/xwiki/xar/XarPackage.java
|
e3527b98fdd8dc8179c24dc55e662b2c55199434
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void roundToMagnitude(int magnitude, MathContext mathContext) {
roundToMagnitude(magnitude, mathContext, false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: roundToMagnitude
File: icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_AbstractBCD.java
Repository: unicode-org/icu
The code follows secure coding practices.
|
[
"CWE-190"
] |
CVE-2018-18928
|
HIGH
| 7.5
|
unicode-org/icu
|
roundToMagnitude
|
icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_AbstractBCD.java
|
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
| 0
|
Analyze the following code function for security vulnerabilities
|
private UserList listUsersSelective(boolean includePermissions, boolean includeSessions) {
final List<User> users = userManagementService.loadAll();
final Optional<AllUserSessions> optSessions = includeSessions ? Optional.of(AllUserSessions.create(sessionService)) : Optional.empty();
final List<UserSummary> resultUsers = Lists.newArrayListWithCapacity(users.size() + 1);
userManagementService.getRootUser().ifPresent(adminUser ->
resultUsers.add(toUserResponse(adminUser, includePermissions, optSessions))
);
for (User user : users) {
resultUsers.add(toUserResponse(user, includePermissions, optSessions));
}
return UserList.create(resultUsers);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: listUsersSelective
File: graylog2-server/src/main/java/org/graylog2/rest/resources/users/UsersResource.java
Repository: Graylog2/graylog2-server
The code follows secure coding practices.
|
[
"CWE-613"
] |
CVE-2023-41041
|
LOW
| 3.1
|
Graylog2/graylog2-server
|
listUsersSelective
|
graylog2-server/src/main/java/org/graylog2/rest/resources/users/UsersResource.java
|
bb88f3d0b2b0351669ab32c60b595ab7242a3fe3
| 0
|
Analyze the following code function for security vulnerabilities
|
private GenericServlet getServlet(String pathInfo) {
pathInfo = pathInfo.substring(1).toLowerCase();
GenericServlet servlet = servlets.get(pathInfo);
if (servlet == null) {
for (String key : servlets.keySet()) {
int index = key.indexOf("/*");
String searchkey = key;
if (index != -1) {
searchkey = key.substring(0, index);
}
if (searchkey.startsWith(pathInfo) || pathInfo.startsWith(searchkey)) {
servlet = servlets.get(key);
break;
}
}
}
return servlet;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getServlet
File: xmppserver/src/main/java/org/jivesoftware/openfire/container/PluginServlet.java
Repository: igniterealtime/Openfire
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2019-18393
|
MEDIUM
| 5
|
igniterealtime/Openfire
|
getServlet
|
xmppserver/src/main/java/org/jivesoftware/openfire/container/PluginServlet.java
|
5af6e03c25b121d01e752927c401124a4da569f7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean releaseActivityInstance(IBinder token) {
synchronized(this) {
final long origId = Binder.clearCallingIdentity();
try {
ActivityRecord r = ActivityRecord.isInStackLocked(token);
if (r.task == null || r.task.stack == null) {
return false;
}
return r.task.stack.safelyDestroyActivityLocked(r, "app-req");
} finally {
Binder.restoreCallingIdentity(origId);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: releaseActivityInstance
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
|
releaseActivityInstance
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.