instruction
string | input
string | output
string | cwe_ids
list | cve_id
string | severity
string | cvss_score
float64 | repo_name
string | func_name
string | file_path
string | commit_hash
string | is_vulnerable
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Analyze the following code function for security vulnerabilities
|
public static ResourceSet createResourceSet() {
ResourceSet resourceSet = new ResourceSetImpl();
/*
* Register the * extension on the ResourceSet to over-ride the ECore global one
* This is needed to create an ArchimateModel object from any file (thus pattern "*") without relying on its extension.
* Without this code it is impossible to load a model from file without extension (error "Class 'model' is not found or is abstract").
*/
resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put("*", new ArchimateResourceFactory()); //$NON-NLS-1$
return resourceSet;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createResourceSet
File: com.archimatetool.model/src/com/archimatetool/model/util/ArchimateResourceFactory.java
Repository: archimatetool/archi
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40235
|
MEDIUM
| 6.5
|
archimatetool/archi
|
createResourceSet
|
com.archimatetool.model/src/com/archimatetool/model/util/ArchimateResourceFactory.java
|
bcab676beddfbeddffecacf755b6692f0b0151f1
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isNonCarrierMergedNetworkTemporarilyDisabled(
@NonNull WifiConfiguration config) {
return mNonCarrierMergedNetworksStatusTracker.isNetworkDisabled(config);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isNonCarrierMergedNetworkTemporarilyDisabled
File: service/java/com/android/server/wifi/WifiConfigManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
isNonCarrierMergedNetworkTemporarilyDisabled
|
service/java/com/android/server/wifi/WifiConfigManager.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
int getPhonebookAccessPermission(BluetoothDevice device) {
enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission");
SharedPreferences pref = getSharedPreferences(PHONEBOOK_ACCESS_PERMISSION_PREFERENCE_FILE,
Context.MODE_PRIVATE);
if (!pref.contains(device.getAddress())) {
return BluetoothDevice.ACCESS_UNKNOWN;
}
return pref.getBoolean(device.getAddress(), false)
? BluetoothDevice.ACCESS_ALLOWED : BluetoothDevice.ACCESS_REJECTED;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPhonebookAccessPermission
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
|
getPhonebookAccessPermission
|
src/com/android/bluetooth/btservice/AdapterService.java
|
122feb9a0b04290f55183ff2f0384c6c53756bd8
| 0
|
Analyze the following code function for security vulnerabilities
|
private int getParagraphLeadingMargin(int line) {
if (!mSpannedText) {
return 0;
}
Spanned spanned = (Spanned) mText;
int lineStart = getLineStart(line);
int lineEnd = getLineEnd(line);
int spanEnd = spanned.nextSpanTransition(lineStart, lineEnd,
LeadingMarginSpan.class);
LeadingMarginSpan[] spans = getParagraphSpans(spanned, lineStart, spanEnd,
LeadingMarginSpan.class);
if (spans.length == 0) {
return 0; // no leading margin span;
}
int margin = 0;
boolean isFirstParaLine = lineStart == 0 ||
spanned.charAt(lineStart - 1) == '\n';
boolean useFirstLineMargin = isFirstParaLine;
for (int i = 0; i < spans.length; i++) {
if (spans[i] instanceof LeadingMarginSpan2) {
int spStart = spanned.getSpanStart(spans[i]);
int spanLine = getLineForOffset(spStart);
int count = ((LeadingMarginSpan2) spans[i]).getLeadingMarginLineCount();
// if there is more than one LeadingMarginSpan2, use the count that is greatest
useFirstLineMargin |= line < spanLine + count;
}
}
for (int i = 0; i < spans.length; i++) {
LeadingMarginSpan span = spans[i];
margin += span.getLeadingMargin(useFirstLineMargin);
}
return margin;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getParagraphLeadingMargin
File: core/java/android/text/Layout.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-9452
|
MEDIUM
| 4.3
|
android
|
getParagraphLeadingMargin
|
core/java/android/text/Layout.java
|
3b6f84b77c30ec0bab5147b0cffc192c86ba2634
| 0
|
Analyze the following code function for security vulnerabilities
|
public void updateSentMessageStatus(Context context, int status) {
if (mMessageUri != null) {
// If we wrote this message in writeSentMessage, update it now
ContentValues values = new ContentValues(1);
values.put(Sms.STATUS, status);
SqliteWrapper.update(context, context.getContentResolver(),
mMessageUri, values, null, null);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateSentMessageStatus
File: src/java/com/android/internal/telephony/SMSDispatcher.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2015-3858
|
HIGH
| 9.3
|
android
|
updateSentMessageStatus
|
src/java/com/android/internal/telephony/SMSDispatcher.java
|
df31d37d285dde9911b699837c351aed2320b586
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setExpungeEnabled(boolean theExpungeEnabled) {
myExpungeEnabled = theExpungeEnabled;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setExpungeEnabled
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
|
setExpungeEnabled
|
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
|
@Override
public String[] getPackagesForUid(int uid) {
uid = UserHandle.getAppId(uid);
// reader
synchronized (mPackages) {
Object obj = mSettings.getUserIdLPr(uid);
if (obj instanceof SharedUserSetting) {
final SharedUserSetting sus = (SharedUserSetting) obj;
final int N = sus.packages.size();
final String[] res = new String[N];
final Iterator<PackageSetting> it = sus.packages.iterator();
int i = 0;
while (it.hasNext()) {
res[i++] = it.next().name;
}
return res;
} else if (obj instanceof PackageSetting) {
final PackageSetting ps = (PackageSetting) obj;
return new String[] { ps.name };
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPackagesForUid
File: services/core/java/com/android/server/pm/PackageManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2016-2497
|
HIGH
| 7.5
|
android
|
getPackagesForUid
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
public abstract boolean isCheckExternals();
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isCheckExternals
File: domain/src/main/java/com/thoughtworks/go/config/materials/ScmMaterial.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-39309
|
MEDIUM
| 6.5
|
gocd
|
isCheckExternals
|
domain/src/main/java/com/thoughtworks/go/config/materials/ScmMaterial.java
|
691b479f1310034992da141760e9c5d1f5b60e8a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void sendSetActive(String id) throws Exception {
mConnectionById.get(id).state = Connection.STATE_ACTIVE;
for (IConnectionServiceAdapter a : mConnectionServiceAdapters) {
a.setActive(id, null /*Session.Info*/);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendSetActive
File: tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
sendSetActive
|
tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
public String index() {
if (getPara(0) != null) {
if ("all".equals(getPara(0))) {
return all();
} else if (getPara(0) != null) {
return detail();
} else {
return all();
}
} else {
return all();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: index
File: web/src/main/java/com/zrlog/web/controller/blog/ArticleController.java
Repository: 94fzb/zrlog
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-21316
|
MEDIUM
| 4.3
|
94fzb/zrlog
|
index
|
web/src/main/java/com/zrlog/web/controller/blog/ArticleController.java
|
b921c1ae03b8290f438657803eee05226755c941
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated(since = "2.2M1")
@Override
public String getFullName()
{
return LOCAL_REFERENCE_SERIALIZER.serialize(getDocumentReference());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFullName
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2023-29523
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
getFullName
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
0d547181389f7941e53291af940966413823f61c
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void writeLastDonePreBootReceivers(ArrayList<ComponentName> list) {
File file = getCalledPreBootReceiversFile();
FileOutputStream fos = null;
DataOutputStream dos = null;
try {
fos = new FileOutputStream(file);
dos = new DataOutputStream(new BufferedOutputStream(fos, 2048));
dos.writeInt(LAST_PREBOOT_DELIVERED_FILE_VERSION);
dos.writeUTF(android.os.Build.VERSION.RELEASE);
dos.writeUTF(android.os.Build.VERSION.CODENAME);
dos.writeUTF(android.os.Build.VERSION.INCREMENTAL);
dos.writeInt(list.size());
for (int i=0; i<list.size(); i++) {
dos.writeUTF(list.get(i).getPackageName());
dos.writeUTF(list.get(i).getClassName());
}
} catch (IOException e) {
Slog.w(TAG, "Failure writing last done pre-boot receivers", e);
file.delete();
} finally {
FileUtils.sync(fos);
if (dos != null) {
try {
dos.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeLastDonePreBootReceivers
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
|
writeLastDonePreBootReceivers
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
public <T> void join(JoinBy from, JoinBy to, String operation, String joinType, String cr, Class<T> returnedClass,
Handler<AsyncResult<Results<T>>> replyHandler){
join(from, to, operation, joinType, cr, returnedClass, true, replyHandler);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: join
File: domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
join
|
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
public void allowAssistantAdjustment(String capability, boolean allowed) {
try {
if (allowed) {
sINM.allowAssistantAdjustment(capability);
} else {
sINM.disallowAssistantAdjustment(capability);
}
} catch (Exception e) {
Log.w(TAG, "Error calling NoMan", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: allowAssistantAdjustment
File: src/com/android/settings/notification/NotificationBackend.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35667
|
HIGH
| 7.8
|
android
|
allowAssistantAdjustment
|
src/com/android/settings/notification/NotificationBackend.java
|
d8355ac47e068ad20c6a7b1602e72f0585ec0085
| 0
|
Analyze the following code function for security vulnerabilities
|
@Contract(pure = true)
public static ModuleAccess getModuleAccess() {
getUnsafe();
return Secret.MACCESS;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getModuleAccess
File: api/src/main/java/io/github/karlatemp/unsafeaccessor/Root.java
Repository: Karlatemp/UnsafeAccessor
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-31139
|
MEDIUM
| 4.3
|
Karlatemp/UnsafeAccessor
|
getModuleAccess
|
api/src/main/java/io/github/karlatemp/unsafeaccessor/Root.java
|
4ef83000184e8f13239a1ea2847ee401d81585fd
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setSuspendOptimizations(int reason, boolean enabled) {
if (mVerboseLoggingEnabled) log("setSuspendOptimizations: " + reason + " " + enabled);
if (enabled) {
mSuspendOptNeedsDisabled &= ~reason;
} else {
mSuspendOptNeedsDisabled |= reason;
}
if (mVerboseLoggingEnabled) log("mSuspendOptNeedsDisabled " + mSuspendOptNeedsDisabled);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSuspendOptimizations
File: service/java/com/android/server/wifi/ClientModeImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
setSuspendOptimizations
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
public Map<String, Object> findByDate(int page, int pageSize, String date) {
Map<String, Object> data = new HashMap<>();
String sql = "select l.*,t.typeName,t.alias as typeAlias,(select count(commentId) from " + Comment.TABLE_NAME + " where logId=l.logId ) commentSize,u.userName from " + TABLE_NAME + " l inner join user u,type t where rubbish=? and privacy=? and u.userId=l.userId and t.typeId=l.typeId and DATE_FORMAT(releaseTime,'%Y_%m')=? order by l.logId desc limit ?,?";
data.put("rows", find(sql, rubbish, privacy, date, ParseUtil.getFirstRecord(page, pageSize), pageSize));
ModelUtil.fillPageData(this, page, pageSize,
"from " + TABLE_NAME + " l inner join user u,type t where rubbish=? and privacy=? and u.userId=l.userId and t.typeId=l.typeId and DATE_FORMAT(releaseTime,'%Y_%m')=?",
data, new Object[]{rubbish, privacy, date});
return data;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findByDate
File: data/src/main/java/com/zrlog/model/Log.java
Repository: 94fzb/zrlog
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2018-17420
|
MEDIUM
| 6.5
|
94fzb/zrlog
|
findByDate
|
data/src/main/java/com/zrlog/model/Log.java
|
157b8fbbb64eb22ddb52e7c5754e88180b7c3d4f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Map<String, String> getServiceProviderToLocalIdPClaimMapping(String serviceProviderName,
String tenantDomain)
throws IdentityApplicationManagementException {
ApplicationDAO appDAO = ApplicationMgtSystemConfig.getInstance().getApplicationDAO();
Map<String, String> claimMap = appDAO.getServiceProviderToLocalIdPClaimMapping(
serviceProviderName, tenantDomain);
if (claimMap == null
|| claimMap.isEmpty()
&& ApplicationManagementServiceComponent.getFileBasedSPs().containsKey(
serviceProviderName)) {
return new FileBasedApplicationDAO().getServiceProviderToLocalIdPClaimMapping(
serviceProviderName, tenantDomain);
}
return claimMap;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getServiceProviderToLocalIdPClaimMapping
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
|
getServiceProviderToLocalIdPClaimMapping
|
components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
|
e9119883ee02a884f3c76c7bbc4022a4f4c58fc0
| 0
|
Analyze the following code function for security vulnerabilities
|
public File getWorkingDirectory()
{
File workDir = shell.getWorkingDirectory();
if ( workDir == null )
{
workDir = workingDir;
}
return workDir;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getWorkingDirectory
File: src/main/java/org/codehaus/plexus/util/cli/Commandline.java
Repository: codehaus-plexus/plexus-utils
The code follows secure coding practices.
|
[
"CWE-78"
] |
CVE-2017-1000487
|
HIGH
| 7.5
|
codehaus-plexus/plexus-utils
|
getWorkingDirectory
|
src/main/java/org/codehaus/plexus/util/cli/Commandline.java
|
b38a1b3a4352303e4312b2bb601a0d7ec6e28f41
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public String getDefaultLanguage()
{
return this.doc.getDefaultLanguage();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDefaultLanguage
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-23615
|
MEDIUM
| 5.5
|
xwiki/xwiki-platform
|
getDefaultLanguage
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
|
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
| 0
|
Analyze the following code function for security vulnerabilities
|
public @Nullable String[] getAaaServerTrustedNames() {
return mAaaServerTrustedNames;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAaaServerTrustedNames
File: framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-120"
] |
CVE-2023-21243
|
MEDIUM
| 5.5
|
android
|
getAaaServerTrustedNames
|
framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java
|
5b49b8711efaadadf5052ba85288860c2d7ca7a6
| 0
|
Analyze the following code function for security vulnerabilities
|
static String value(String value, String defaultValue) {
return ClickHouseChecker.isNullOrEmpty(value) ? defaultValue : value;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: value
File: clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNode.java
Repository: ClickHouse/clickhouse-java
The code follows secure coding practices.
|
[
"CWE-209"
] |
CVE-2024-23689
|
HIGH
| 8.8
|
ClickHouse/clickhouse-java
|
value
|
clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNode.java
|
4f8d9303eb991b39ec7e7e34825241efa082238a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isAlwaysOnVpnLockdownEnabled(ComponentName admin) throws SecurityException {
final CallerIdentity caller;
if (hasCallingPermission(PERMISSION_MAINLINE_NETWORK_STACK)) {
// TODO: CaptivePortalLoginActivity erroneously calls this method with a non-admin
// ComponentName, so we have to use a separate code path for it:
// getCallerIdentity(admin) will throw if the admin is not in the known admin list.
caller = getCallerIdentity();
} else {
caller = getCallerIdentity(admin);
Preconditions.checkCallAuthorization(
isDefaultDeviceOwner(caller) || isProfileOwner(caller));
}
return mInjector.binderWithCleanCallingIdentity(
() -> mInjector.getVpnManager().isVpnLockdownEnabled(caller.getUserId()));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isAlwaysOnVpnLockdownEnabled
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
|
isAlwaysOnVpnLockdownEnabled
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
private int jjMoveStringLiteralDfa7_2(long old0, long active0)
{
if (((active0 &= old0)) == 0L)
return jjStartNfa_2(5, old0);
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) {
jjStopStringLiteralDfa_2(6, active0);
return 7;
}
switch(curChar)
{
case 101:
return jjMoveStringLiteralDfa8_2(active0, 0x400000000000L);
default :
break;
}
return jjStartNfa_2(6, active0);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: jjMoveStringLiteralDfa7_2
File: impl/src/main/java/com/sun/el/parser/ELParserTokenManager.java
Repository: jakartaee/expression-language
The code follows secure coding practices.
|
[
"CWE-917"
] |
CVE-2021-28170
|
MEDIUM
| 5
|
jakartaee/expression-language
|
jjMoveStringLiteralDfa7_2
|
impl/src/main/java/com/sun/el/parser/ELParserTokenManager.java
|
b6a3943ac5fba71cbc6719f092e319caa747855b
| 0
|
Analyze the following code function for security vulnerabilities
|
public Collection engineGetCertificates(CertSelector selector)
throws CertStoreException
{
if (!(selector instanceof X509CertSelector))
{
throw new CertStoreException("selector is not a X509CertSelector");
}
X509CertSelector xselector = (X509CertSelector)selector;
Set certSet = new HashSet();
Set set = getEndCertificates(xselector);
set.addAll(getCACertificates(xselector));
set.addAll(getCrossCertificates(xselector));
Iterator it = set.iterator();
try
{
CertificateFactory cf = CertificateFactory.getInstance("X.509",
BouncyCastleProvider.PROVIDER_NAME);
while (it.hasNext())
{
byte[] bytes = (byte[])it.next();
if (bytes == null || bytes.length == 0)
{
continue;
}
List bytesList = new ArrayList();
bytesList.add(bytes);
try
{
CertificatePair pair = CertificatePair
.getInstance(new ASN1InputStream(bytes)
.readObject());
bytesList.clear();
if (pair.getForward() != null)
{
bytesList.add(pair.getForward().getEncoded());
}
if (pair.getReverse() != null)
{
bytesList.add(pair.getReverse().getEncoded());
}
}
catch (IOException e)
{
}
catch (IllegalArgumentException e)
{
}
for (Iterator it2 = bytesList.iterator(); it2.hasNext();)
{
ByteArrayInputStream bIn = new ByteArrayInputStream(
(byte[])it2.next());
try
{
Certificate cert = cf.generateCertificate(bIn);
// System.out.println(((X509Certificate)
// cert).getSubjectX500Principal());
if (xselector.match(cert))
{
certSet.add(cert);
}
}
catch (Exception e)
{
}
}
}
}
catch (Exception e)
{
throw new CertStoreException(
"certificate cannot be constructed from LDAP result: " + e);
}
return certSet;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: engineGetCertificates
File: prov/src/main/java/org/bouncycastle/jce/provider/X509LDAPCertStoreSpi.java
Repository: bcgit/bc-java
The code follows secure coding practices.
|
[
"CWE-295"
] |
CVE-2023-33201
|
MEDIUM
| 5.3
|
bcgit/bc-java
|
engineGetCertificates
|
prov/src/main/java/org/bouncycastle/jce/provider/X509LDAPCertStoreSpi.java
|
e8c409a8389c815ea3fda5e8b94c92fdfe583bcc
| 0
|
Analyze the following code function for security vulnerabilities
|
public static final native void setArgV0(String text);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setArgV0
File: core/java/android/os/Process.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3911
|
HIGH
| 9.3
|
android
|
setArgV0
|
core/java/android/os/Process.java
|
2c7008421cb67f5d89f16911bdbe36f6c35311ad
| 0
|
Analyze the following code function for security vulnerabilities
|
public void prepareForReplace() {
mPreparedStatement = getStatement(true);
mPreparedStatement.clearBindings();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: prepareForReplace
File: core/java/android/database/DatabaseUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2023-40121
|
MEDIUM
| 5.5
|
android
|
prepareForReplace
|
core/java/android/database/DatabaseUtils.java
|
3287ac2d2565dc96bf6177967f8e3aed33954253
| 0
|
Analyze the following code function for security vulnerabilities
|
private void onMandatoryDocumentInitializerAdded(ComponentDescriptorAddedEvent event,
ComponentManager componentManager)
{
String namespace;
if (componentManager instanceof NamespacedComponentManager) {
namespace = ((NamespacedComponentManager) componentManager).getNamespace();
} else {
namespace = null;
}
MandatoryDocumentInitializer initializer;
try {
initializer = componentManager.getInstance(MandatoryDocumentInitializer.class, event.getRoleHint());
XWikiContext context = getXWikiContext();
if (namespace == null) {
// Initialize in main wiki
initializeMandatoryDocument(context.getMainXWiki(), initializer, context);
// Initialize in already initialized sub wikis (will be initialized in others when they are initialized)
for (String wiki : this.initializedWikis.keySet()) {
initializeMandatoryDocument(wiki, initializer, context);
}
} else if (namespace.startsWith("wiki:")) {
// Initialize in the wiki where the extension is installed
initializeMandatoryDocument(namespace.substring("wiki:".length()), initializer, context);
}
} catch (ComponentLookupException e) {
LOGGER.error("Failed to lookup mandatory document initializer", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onMandatoryDocumentInitializerAdded
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-32620
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
onMandatoryDocumentInitializerAdded
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setPassword(String password) {
for (Authentication auth : authentications.values()) {
if (auth instanceof HttpBasicAuth) {
((HttpBasicAuth) auth).setPassword(password);
return this;
}
}
throw new RuntimeException("No HTTP basic authentication configured!");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setPassword
File: samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
setPassword
|
samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
static native String getMethodSignature(Method m);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMethodSignature
File: luni/src/main/java/java/io/ObjectStreamClass.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-7911
|
HIGH
| 7.2
|
android
|
getMethodSignature
|
luni/src/main/java/java/io/ObjectStreamClass.java
|
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setAlpha(int alpha) {
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAlpha
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
setAlpha
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
private void internalUnloadNonPartitionedTopic(AsyncResponse asyncResponse, boolean authoritative) {
try {
validateTopicOperation(topicName, TopicOperation.UNLOAD);
} catch (Exception e) {
log.error("[{}] Failed to unload topic {},{}", clientAppId(), topicName, e.getMessage());
resumeAsyncResponseExceptionally(asyncResponse, e);
return;
}
validateTopicOwnershipAsync(topicName, authoritative)
.thenCompose(__ -> getTopicReferenceAsync(topicName))
.thenCompose(topic -> topic.close(false))
.thenRun(() -> {
log.info("[{}] Successfully unloaded topic {}", clientAppId(), topicName);
asyncResponse.resume(Response.noContent().build());
})
.exceptionally(ex -> {
log.error("[{}] Failed to unload topic {}, {}", clientAppId(), topicName, ex.getMessage());
asyncResponse.resume(ex.getCause());
return null;
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: internalUnloadNonPartitionedTopic
File: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
Repository: apache/pulsar
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-41571
|
MEDIUM
| 4
|
apache/pulsar
|
internalUnloadNonPartitionedTopic
|
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
|
5b35bb81c31f1bc2ad98c9fde5b39ec68110ca52
| 0
|
Analyze the following code function for security vulnerabilities
|
private void maybeValidateXml(File file) {
if (!file.getName().endsWith(".xml")) {
return;
}
final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setValidating(false);
factory.setNamespaceAware(true);
final CapturingErrorHandler errorHandler = new CapturingErrorHandler();
try {
final DocumentBuilder builder = factory.newDocumentBuilder();
builder.setErrorHandler(errorHandler);
builder.parse(file);
} catch (ParserConfigurationException | SAXException | IOException e) {
throw new BadRequestException(Response.status(Response.Status.BAD_REQUEST)
.entity("Validation failed: " + e.getMessage()).build());
}
}
|
Vulnerability Classification:
- CWE: CWE-91
- CVE: CVE-2023-40612
- Severity: HIGH
- CVSS Score: 8.0
Description: NMS-15704: Securing Xml parser factory
Function: maybeValidateXml
File: opennms-webapp-rest/src/main/java/org/opennms/web/rest/v1/FilesystemRestService.java
Repository: OpenNMS/opennms
Fixed Code:
private void maybeValidateXml(File file) {
if (!file.getName().endsWith(".xml")) {
return;
}
final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setValidating(false);
factory.setNamespaceAware(true);
try {
factory.setFeature("http://xml.org/sax/features/external-general-entities", false);
factory.setFeature("http://xml.org/sax/features/external-parameter-entities", false);
factory.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
} catch (ParserConfigurationException e) {
throw new BadRequestException(Response.status(Response.Status.BAD_REQUEST)
.entity("Error configuring parser factory: " + e.getMessage()).build());
}
final CapturingErrorHandler errorHandler = new CapturingErrorHandler();
try {
final DocumentBuilder builder = factory.newDocumentBuilder();
builder.setErrorHandler(errorHandler);
builder.parse(file);
} catch (ParserConfigurationException | SAXException | IOException e) {
throw new BadRequestException(Response.status(Response.Status.BAD_REQUEST)
.entity("Validation failed: " + e.getMessage()).build());
}
}
|
[
"CWE-91"
] |
CVE-2023-40612
|
HIGH
| 8
|
OpenNMS/opennms
|
maybeValidateXml
|
opennms-webapp-rest/src/main/java/org/opennms/web/rest/v1/FilesystemRestService.java
|
69db8566de1ee90d7c5ed660d417a5e9fdc51ab5
| 1
|
Analyze the following code function for security vulnerabilities
|
public String serializeToString(Object obj, Map<String, Object> formParams, String contentType, boolean isBodyNullable) throws ApiException {
try {
if (contentType.startsWith("multipart/form-data")) {
throw new ApiException("multipart/form-data not yet supported for serializeToString (http signature authentication)");
} else if (contentType.startsWith("application/x-www-form-urlencoded")) {
String formString = "";
for (Entry<String, Object> param : formParams.entrySet()) {
formString = param.getKey() + "=" + URLEncoder.encode(parameterToString(param.getValue()), "UTF-8") + "&";
}
if (formString.length() == 0) { // empty string
return formString;
} else {
return formString.substring(0, formString.length() - 1);
}
} else {
if (isBodyNullable) {
return obj == null ? "null" : json.getMapper().writeValueAsString(obj);
} else {
return obj == null ? "" : json.getMapper().writeValueAsString(obj);
}
}
} catch (Exception ex) {
throw new ApiException("Failed to perform serializeToString: " + ex.toString());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: serializeToString
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
|
serializeToString
|
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 void bindMediaActionButton(RemoteViews container, @IdRes int buttonId,
Action action, StandardTemplateParams p) {
final boolean tombstone = (action.actionIntent == null);
container.setViewVisibility(buttonId, View.VISIBLE);
container.setImageViewIcon(buttonId, action.getIcon());
// If the action buttons should not be tinted, then just use the default
// notification color. Otherwise, just use the passed-in color.
int tintColor = mBuilder.getStandardActionColor(p);
container.setDrawableTint(buttonId, false, tintColor,
PorterDuff.Mode.SRC_ATOP);
int rippleAlpha = mBuilder.getColors(p).getRippleAlpha();
int rippleColor = Color.argb(rippleAlpha, Color.red(tintColor), Color.green(tintColor),
Color.blue(tintColor));
container.setRippleDrawableColor(buttonId, ColorStateList.valueOf(rippleColor));
if (!tombstone) {
container.setOnClickPendingIntent(buttonId, action.actionIntent);
}
container.setContentDescription(buttonId, action.title);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: bindMediaActionButton
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
bindMediaActionButton
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void initService() {
// If we are reloading, lets log it.
if (keyToBundleMap != null) {
// We want to note in the log that we are doing this
log.warn("Reloading XML StringResource files.");
XmlMessages.getInstance().resetBundleCache();
}
keyToBundleMap = new HashMap<String, String>();
// Get the list of configured classnames from the config file.
String[] packages = Config.get().getStringArray(
ConfigDefaults.WEB_L10N_RESOURCEBUNDLES);
for (int i = 0; i < packages.length; i++) {
addKeysToMap(packages[i]);
}
if (supportedLocales.size() > 0) {
supportedLocales.clear();
}
loadSupportedLocales();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initService
File: java/code/src/com/redhat/rhn/common/localization/LocalizationService.java
Repository: spacewalkproject/spacewalk
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2016-3079
|
MEDIUM
| 4.3
|
spacewalkproject/spacewalk
|
initService
|
java/code/src/com/redhat/rhn/common/localization/LocalizationService.java
|
7b9ff9ad
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isLocaleSupported(Locale locale) {
return this.supportedLocales.get(locale.toString()) != null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isLocaleSupported
File: java/code/src/com/redhat/rhn/common/localization/LocalizationService.java
Repository: spacewalkproject/spacewalk
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2016-3079
|
MEDIUM
| 4.3
|
spacewalkproject/spacewalk
|
isLocaleSupported
|
java/code/src/com/redhat/rhn/common/localization/LocalizationService.java
|
7b9ff9ad
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<ActivityManager.RunningTaskInfo> getTasks(int maxNum, int flags)
throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeInt(maxNum);
data.writeInt(flags);
mRemote.transact(GET_TASKS_TRANSACTION, data, reply, 0);
reply.readException();
ArrayList<ActivityManager.RunningTaskInfo> list = null;
int N = reply.readInt();
if (N >= 0) {
list = new ArrayList<>();
while (N > 0) {
ActivityManager.RunningTaskInfo info =
ActivityManager.RunningTaskInfo.CREATOR
.createFromParcel(reply);
list.add(info);
N--;
}
}
data.recycle();
reply.recycle();
return list;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTasks
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
getTasks
|
core/java/android/app/ActivityManagerNative.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public final void finishHeavyWeightApp() {
if (checkCallingPermission(android.Manifest.permission.FORCE_STOP_PACKAGES)
!= PackageManager.PERMISSION_GRANTED) {
String msg = "Permission Denial: finishHeavyWeightApp() from pid="
+ Binder.getCallingPid()
+ ", uid=" + Binder.getCallingUid()
+ " requires " + android.Manifest.permission.FORCE_STOP_PACKAGES;
Slog.w(TAG, msg);
throw new SecurityException(msg);
}
synchronized(this) {
if (mHeavyWeightProcess == null) {
return;
}
ArrayList<ActivityRecord> activities = new ArrayList<>(mHeavyWeightProcess.activities);
for (int i = 0; i < activities.size(); i++) {
ActivityRecord r = activities.get(i);
if (!r.finishing && r.isInStackLocked()) {
r.task.stack.finishActivityLocked(r, Activity.RESULT_CANCELED,
null, "finish-heavy", true);
}
}
mHandler.sendMessage(mHandler.obtainMessage(CANCEL_HEAVY_NOTIFICATION_MSG,
mHeavyWeightProcess.userId, 0));
mHeavyWeightProcess = null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: finishHeavyWeightApp
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2500
|
MEDIUM
| 4.3
|
android
|
finishHeavyWeightApp
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
9878bb99b77c3681f0fda116e2964bac26f349c3
| 0
|
Analyze the following code function for security vulnerabilities
|
public Connection newConnection(Address[] addrs, String clientProvidedName) throws IOException, TimeoutException {
return newConnection(this.sharedExecutor, Arrays.asList(addrs), clientProvidedName);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: newConnection
File: src/main/java/com/rabbitmq/client/ConnectionFactory.java
Repository: rabbitmq/rabbitmq-java-client
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-46120
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-java-client
|
newConnection
|
src/main/java/com/rabbitmq/client/ConnectionFactory.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public BaseObject addObjectFromRequest(String className, int num, XWikiContext context) throws XWikiException
{
return addObjectFromRequest(className, "", num, context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addObjectFromRequest
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-26470
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
addObjectFromRequest
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
public void initEncodeUtil() {
encodeUtilButton.addActionListener(e -> {
String t;
if (LANG == CHINESE) {
t = "编码工具";
} else {
t = "Decoder";
}
JFrame frame = new JFrame(t);
frame.setContentPane(new EncodeUtilForm().encodeUtilPanel);
frame.setResizable(false);
frame.pack();
frame.setVisible(true);
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initEncodeUtil
File: src/main/java/com/chaitin/xray/form/MainForm.java
Repository: 4ra1n/super-xray
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2022-41958
|
HIGH
| 7.8
|
4ra1n/super-xray
|
initEncodeUtil
|
src/main/java/com/chaitin/xray/form/MainForm.java
|
4d0d59663596db03f39d7edd2be251d48b52dcfc
| 0
|
Analyze the following code function for security vulnerabilities
|
protected byte[] getLengthTag(byte[] p2)
{
byte[] L2 = new byte[8];
if (p2 != null)
{
Pack.longToBigEndian(p2.length * 8L, L2, 0);
}
return L2;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLengthTag
File: core/src/main/java/org/bouncycastle/crypto/engines/IESEngine.java
Repository: bcgit/bc-java
The code follows secure coding practices.
|
[
"CWE-361"
] |
CVE-2016-1000345
|
MEDIUM
| 4.3
|
bcgit/bc-java
|
getLengthTag
|
core/src/main/java/org/bouncycastle/crypto/engines/IESEngine.java
|
21dcb3d9744c83dcf2ff8fcee06dbca7bfa4ef35
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<PlatformStatusDTO> getPlatformTransitions(PlatformIssueTypeRequest request) {
List<PlatformStatusDTO> platformStatusDTOS = new ArrayList<>();
if (!StringUtils.isBlank(request.getPlatformKey())) {
Project project = baseProjectService.getProjectById(request.getProjectId());
String platform = project.getPlatform();
if (PlatformPluginService.isPluginPlatform(platform)) {
return platformPluginService.getPlatform(platform)
.getStatusList(request.getPlatformKey())
.stream().map(item -> {
PlatformStatusDTO platformStatusDTO = new PlatformStatusDTO();
platformStatusDTO.setLabel(item.getLabel());
platformStatusDTO.setValue(item.getValue());
return platformStatusDTO;
})
.collect(Collectors.toList());
} else {
List<String> platforms = getPlatforms(project);
if (CollectionUtils.isEmpty(platforms)) {
return platformStatusDTOS;
}
IssuesRequest issuesRequest = getDefaultIssueRequest(request.getProjectId(), request.getWorkspaceId());
return IssueFactory.createPlatform(platform, issuesRequest).getTransitions(request.getPlatformKey());
}
}
return platformStatusDTOS;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPlatformTransitions
File: test-track/backend/src/main/java/io/metersphere/service/IssuesService.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2022-23544
|
MEDIUM
| 6.1
|
metersphere
|
getPlatformTransitions
|
test-track/backend/src/main/java/io/metersphere/service/IssuesService.java
|
d0f95b50737c941b29d507a4cc3545f2dc6ab121
| 0
|
Analyze the following code function for security vulnerabilities
|
private void sendApplicationHiddenForUser(String packageName, PackageSetting pkgSetting,
int userId) {
final PackageRemovedInfo info = new PackageRemovedInfo();
info.removedPackage = packageName;
info.removedUsers = new int[] {userId};
info.uid = UserHandle.getUid(userId, pkgSetting.appId);
info.sendBroadcast(false, false, false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendApplicationHiddenForUser
File: services/core/java/com/android/server/pm/PackageManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2016-2497
|
HIGH
| 7.5
|
android
|
sendApplicationHiddenForUser
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isAllowedValue(String lowercaseElementName, String lowercaseAttributeName, String attributeValue)
{
// Break into several statements to avoid too long boolean expression.
boolean result = StringUtils.isBlank(attributeValue);
if (!result) {
String valueNoWhitespace = ATTR_WHITESPACE.matcher(attributeValue).replaceAll("");
result = this.uriSafeAttributes.contains(lowercaseAttributeName);
result = result || IS_NO_URI.matcher(valueNoWhitespace).find();
result = result || this.allowedUriPattern.matcher(valueNoWhitespace).find();
result = result || isAllowedDataValue(lowercaseElementName, lowercaseAttributeName, attributeValue);
result = result || (this.allowUnknownProtocols && !isScriptOrData(attributeValue));
}
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isAllowedValue
File: xwiki-commons-core/xwiki-commons-xml/src/main/java/org/xwiki/xml/internal/html/SecureHTMLElementSanitizer.java
Repository: xwiki/xwiki-commons
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-31126
|
CRITICAL
| 9.6
|
xwiki/xwiki-commons
|
isAllowedValue
|
xwiki-commons-core/xwiki-commons-xml/src/main/java/org/xwiki/xml/internal/html/SecureHTMLElementSanitizer.java
|
0b8e9c45b7e7457043938f35265b2aa5adc76a68
| 0
|
Analyze the following code function for security vulnerabilities
|
int getMaxHeaders() {
return maxHeaders;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMaxHeaders
File: core/src/main/java/io/undertow/protocols/http2/Http2Channel.java
Repository: undertow-io/undertow
The code follows secure coding practices.
|
[
"CWE-214"
] |
CVE-2021-3859
|
HIGH
| 7.5
|
undertow-io/undertow
|
getMaxHeaders
|
core/src/main/java/io/undertow/protocols/http2/Http2Channel.java
|
e43f0ada3f4da6e8579e0020cec3cb1a81e487c2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public static void setUseStreamManagementResumptiodDefault(boolean useSmResumptionDefault) {
setUseStreamManagementResumptionDefault(useSmResumptionDefault);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUseStreamManagementResumptiodDefault
File: smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
Repository: igniterealtime/Smack
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2016-10027
|
MEDIUM
| 4.3
|
igniterealtime/Smack
|
setUseStreamManagementResumptiodDefault
|
smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
|
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
| 0
|
Analyze the following code function for security vulnerabilities
|
public int computeMaxKeyguardNotifications(int maximum) {
float minPadding = mClockPositionAlgorithm.getMinStackScrollerPadding(getHeight(),
mKeyguardStatusView.getHeight());
int notificationPadding = Math.max(1, getResources().getDimensionPixelSize(
R.dimen.notification_divider_height));
float shelfSize = mNotificationStackScroller.getNotificationShelf().getIntrinsicHeight()
+ notificationPadding;
float availableSpace = mNotificationStackScroller.getHeight() - minPadding - shelfSize
- mIndicationBottomPadding;
int count = 0;
for (int i = 0; i < mNotificationStackScroller.getChildCount(); i++) {
ExpandableView child = (ExpandableView) mNotificationStackScroller.getChildAt(i);
if (!(child instanceof ExpandableNotificationRow)) {
continue;
}
ExpandableNotificationRow row = (ExpandableNotificationRow) child;
boolean suppressedSummary = mGroupManager.isSummaryOfSuppressedGroup(
row.getStatusBarNotification());
if (suppressedSummary) {
continue;
}
if (!mStatusBar.shouldShowOnKeyguard(row.getStatusBarNotification())) {
continue;
}
if (row.isRemoved()) {
continue;
}
availableSpace -= child.getMinHeight() + notificationPadding;
if (availableSpace >= 0 && count < maximum) {
count++;
} else if (availableSpace > -shelfSize) {
// if we are exactly the last view, then we can show us still!
for (int j = i + 1; j < mNotificationStackScroller.getChildCount(); j++) {
if (mNotificationStackScroller.getChildAt(j)
instanceof ExpandableNotificationRow) {
return count;
}
}
count++;
return count;
} else {
return count;
}
}
return count;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: computeMaxKeyguardNotifications
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
computeMaxKeyguardNotifications
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public long getLongProperty(String name) throws JMSException {
return convertToLong(this.getObjectProperty(name));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLongProperty
File: src/main/java/com/rabbitmq/jms/client/RMQMessage.java
Repository: rabbitmq/rabbitmq-jms-client
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2020-36282
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-jms-client
|
getLongProperty
|
src/main/java/com/rabbitmq/jms/client/RMQMessage.java
|
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
| 0
|
Analyze the following code function for security vulnerabilities
|
void set(ActivityStarter starter) {
mStartActivity = starter.mStartActivity;
mIntent = starter.mIntent;
mCallingUid = starter.mCallingUid;
mOptions = starter.mOptions;
mRestrictedBgActivity = starter.mRestrictedBgActivity;
mLaunchTaskBehind = starter.mLaunchTaskBehind;
mLaunchFlags = starter.mLaunchFlags;
mLaunchMode = starter.mLaunchMode;
mLaunchParams.set(starter.mLaunchParams);
mNotTop = starter.mNotTop;
mDoResume = starter.mDoResume;
mStartFlags = starter.mStartFlags;
mSourceRecord = starter.mSourceRecord;
mPreferredTaskDisplayArea = starter.mPreferredTaskDisplayArea;
mPreferredWindowingMode = starter.mPreferredWindowingMode;
mInTask = starter.mInTask;
mInTaskFragment = starter.mInTaskFragment;
mAddingToTask = starter.mAddingToTask;
mNewTaskInfo = starter.mNewTaskInfo;
mNewTaskIntent = starter.mNewTaskIntent;
mSourceRootTask = starter.mSourceRootTask;
mTargetTask = starter.mTargetTask;
mTargetRootTask = starter.mTargetRootTask;
mIsTaskCleared = starter.mIsTaskCleared;
mMovedToFront = starter.mMovedToFront;
mNoAnimation = starter.mNoAnimation;
mAvoidMoveToFront = starter.mAvoidMoveToFront;
mFrozeTaskList = starter.mFrozeTaskList;
mVoiceSession = starter.mVoiceSession;
mVoiceInteractor = starter.mVoiceInteractor;
mIntentDelivered = starter.mIntentDelivered;
mLastStartActivityResult = starter.mLastStartActivityResult;
mLastStartActivityTimeMs = starter.mLastStartActivityTimeMs;
mLastStartReason = starter.mLastStartReason;
mRequest.set(starter.mRequest);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: set
File: services/core/java/com/android/server/wm/ActivityStarter.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-269"
] |
CVE-2023-21269
|
HIGH
| 7.8
|
android
|
set
|
services/core/java/com/android/server/wm/ActivityStarter.java
|
70ec64dc5a2a816d6aa324190a726a85fd749b30
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public SystemUpdateInfo getPendingSystemUpdate(ComponentName admin) {
Objects.requireNonNull(admin, "ComponentName is null");
final CallerIdentity caller = getCallerIdentity(admin);
Preconditions.checkCallAuthorization(
isDefaultDeviceOwner(caller) || isProfileOwner(caller));
return mOwners.getSystemUpdateInfo();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPendingSystemUpdate
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
|
getPendingSystemUpdate
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<IAppTask> getAppTasks(String callingPackage) throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAppTasks
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
getAppTasks
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onProcessUnMapped(int pid) {
synchronized (mGlobalLock) {
mProcessMap.remove(pid);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onProcessUnMapped
File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40094
|
HIGH
| 7.8
|
android
|
onProcessUnMapped
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getSubjectMatch() {
return getFieldValue(SUBJECT_MATCH_KEY, "");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSubjectMatch
File: wifi/java/android/net/wifi/WifiEnterpriseConfig.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3897
|
MEDIUM
| 4.3
|
android
|
getSubjectMatch
|
wifi/java/android/net/wifi/WifiEnterpriseConfig.java
|
81be4e3aac55305cbb5c9d523cf5c96c66604b39
| 0
|
Analyze the following code function for security vulnerabilities
|
private void dumpActivity(String prefix, FileDescriptor fd, PrintWriter pw,
final ActivityRecord r, String[] args, boolean dumpAll) {
String innerPrefix = prefix + " ";
synchronized (this) {
pw.print(prefix); pw.print("ACTIVITY "); pw.print(r.shortComponentName);
pw.print(" "); pw.print(Integer.toHexString(System.identityHashCode(r)));
pw.print(" pid=");
if (r.app != null) pw.println(r.app.pid);
else pw.println("(not running)");
if (dumpAll) {
r.dump(pw, innerPrefix);
}
}
if (r.app != null && r.app.thread != null) {
// flush anything that is already in the PrintWriter since the thread is going
// to write to the file descriptor directly
pw.flush();
try {
TransferPipe tp = new TransferPipe();
try {
r.app.thread.dumpActivity(tp.getWriteFd().getFileDescriptor(),
r.appToken, innerPrefix, args);
tp.go(fd);
} finally {
tp.kill();
}
} catch (IOException e) {
pw.println(innerPrefix + "Failure while dumping the activity: " + e);
} catch (RemoteException e) {
pw.println(innerPrefix + "Got a RemoteException while dumping the activity");
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpActivity
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
|
dumpActivity
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
@FrameIteratorSkip
private final double invokeExact_thunkArchetype_D(Object receiver, int argPlaceholder) {
return ComputedCalls.dispatchVirtual_D(jittedMethodAddress(receiver), vtableIndexArgument(receiver), receiver, argPlaceholder);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: invokeExact_thunkArchetype_D
File: jcl/src/java.base/share/classes/java/lang/invoke/InterfaceHandle.java
Repository: eclipse-openj9/openj9
The code follows secure coding practices.
|
[
"CWE-440",
"CWE-250"
] |
CVE-2021-41035
|
HIGH
| 7.5
|
eclipse-openj9/openj9
|
invokeExact_thunkArchetype_D
|
jcl/src/java.base/share/classes/java/lang/invoke/InterfaceHandle.java
|
c6e0d9296ff9a3084965d83e207403de373c0bad
| 0
|
Analyze the following code function for security vulnerabilities
|
public static KeyArchivalRequest fromXML(String xml) throws Exception {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.parse(new InputSource(new StringReader(xml)));
Element element = document.getDocumentElement();
return fromDOM(element);
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2022-2414
- Severity: HIGH
- CVSS Score: 7.5
Description: Disable access to external entities when parsing XML
This reduces the vulnerability of XML parsers to XXE (XML external
entity) injection.
The best way to prevent XXE is to stop using XML altogether, which we do
plan to do. Until that happens I consider it worthwhile to tighten the
security here though.
Function: fromXML
File: base/common/src/main/java/com/netscape/certsrv/key/KeyArchivalRequest.java
Repository: dogtagpki/pki
Fixed Code:
public static KeyArchivalRequest fromXML(String xml) throws Exception {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.parse(new InputSource(new StringReader(xml)));
Element element = document.getDocumentElement();
return fromDOM(element);
}
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
fromXML
|
base/common/src/main/java/com/netscape/certsrv/key/KeyArchivalRequest.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 1
|
Analyze the following code function for security vulnerabilities
|
private boolean renderFileFromFilesystem(String path, XWikiContext context) throws XWikiException
{
LOGGER.debug("Rendering filesystem file from path [{}]", path);
XWikiResponse response = context.getResponse();
try {
byte[] data;
data = context.getWiki().getResourceContentAsBytes(path);
if (data != null && data.length > 0) {
String filename = path.substring(path.lastIndexOf("/") + 1, path.length());
Date modified = null;
// Evaluate the file only if it's of a supported type.
String mimetype = context.getEngineContext().getMimeType(filename.toLowerCase());
if (isCssMimeType(mimetype) || isJavascriptMimeType(mimetype) || isLessCssFile(filename)) {
// Always force UTF-8, as this is the assumed encoding for text files.
String rawContent = new String(data, ENCODING);
// Evaluate the content with the rights of the superadmin user, since this is a filesystem file.
DocumentReference superadminUserReference = new DocumentReference(context.getMainXWiki(),
XWiki.SYSTEM_SPACE, XWikiRightService.SUPERADMIN_USER);
String evaluatedContent =
evaluateVelocity(rawContent, path, superadminUserReference, null, context);
byte[] newdata = evaluatedContent.getBytes(ENCODING);
// If the content contained velocity code, then it should not be cached
if (Arrays.equals(newdata, data)) {
modified = context.getWiki().getResourceLastModificationDate(path);
} else {
modified = new Date();
data = newdata;
}
response.setCharacterEncoding(ENCODING);
} else {
modified = context.getWiki().getResourceLastModificationDate(path);
}
// Write the content to the response's output stream.
setupHeaders(response, mimetype, modified, data.length);
try {
response.getOutputStream().write(data);
} catch (IOException e) {
throw new XWikiException(XWikiException.MODULE_XWIKI_APP,
XWikiException.ERROR_XWIKI_APP_SEND_RESPONSE_EXCEPTION, "Exception while sending response", e);
}
return true;
}
} catch (IOException ex) {
LOGGER.info("Skin file [{}] does not exist or cannot be accessed", path);
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: renderFileFromFilesystem
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/SkinAction.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2022-36092
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
renderFileFromFilesystem
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/SkinAction.java
|
71a6d0bb6f8ab718fcfaae0e9b8c16c2d69cd4bb
| 0
|
Analyze the following code function for security vulnerabilities
|
private void notifyStartedGoingToSleep() {
if (DEBUG) Log.d(TAG, "notifyStartedGoingToSleep");
mHandler.sendEmptyMessage(NOTIFY_STARTED_GOING_TO_SLEEP);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: notifyStartedGoingToSleep
File: packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21267
|
MEDIUM
| 5.5
|
android
|
notifyStartedGoingToSleep
|
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
|
d18d8b350756b0e89e051736c1f28744ed31e93a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void save(String comment, boolean minorEdit) throws XWikiException
{
if (hasAccessLevel("edit")) {
// If the current author does not have PR don't let it set current user as author of the saved document
// since it can lead to right escalation
if (hasProgrammingRights()) {
saveDocument(comment, minorEdit);
} else {
saveAsAuthor(comment, minorEdit);
}
} else {
java.lang.Object[] args = {getDefaultEntityReferenceSerializer().serialize(getDocumentReference())};
throw new XWikiException(XWikiException.MODULE_XWIKI_ACCESS, XWikiException.ERROR_XWIKI_ACCESS_DENIED,
"Access denied in edit mode on document {0}", null, args);
}
}
|
Vulnerability Classification:
- CWE: CWE-863
- CVE: CVE-2022-23615
- Severity: MEDIUM
- CVSS Score: 5.5
Description: XWIKI-5024: Document potentially saved with the wrong author
* add an configuration off switch
Function: save
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
Repository: xwiki/xwiki-platform
Fixed Code:
public void save(String comment, boolean minorEdit) throws XWikiException
{
if (hasAccessLevel("edit")) {
// If the current author does not have PR don't let it set current user as author of the saved document
// since it can lead to right escalation
if (hasProgrammingRights() || !getConfiguration().getProperty("security.script.save.checkAuthor", true)) {
saveDocument(comment, minorEdit);
} else {
saveAsAuthor(comment, minorEdit);
}
} else {
java.lang.Object[] args = {getDefaultEntityReferenceSerializer().serialize(getDocumentReference())};
throw new XWikiException(XWikiException.MODULE_XWIKI_ACCESS, XWikiException.ERROR_XWIKI_ACCESS_DENIED,
"Access denied in edit mode on document {0}", null, args);
}
}
|
[
"CWE-863"
] |
CVE-2022-23615
|
MEDIUM
| 5.5
|
xwiki/xwiki-platform
|
save
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
|
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
| 1
|
Analyze the following code function for security vulnerabilities
|
protected void handleAuthenticated(long deviceId, int fingerId, int groupId) {
ClientMonitor client = mCurrentClient;
if (client != null && client.onAuthenticated(fingerId, groupId)) {
removeClient(client);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleAuthenticated
File: services/core/java/com/android/server/fingerprint/FingerprintService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
handleAuthenticated
|
services/core/java/com/android/server/fingerprint/FingerprintService.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
static void sendCloseSystemWindows(Context context, String reason) {
if (ActivityManagerNative.isSystemReady()) {
try {
ActivityManagerNative.getDefault().closeSystemDialogs(reason);
} catch (RemoteException e) {
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendCloseSystemWindows
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
|
sendCloseSystemWindows
|
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
|
84669ca8de55d38073a0dcb01074233b0a417541
| 0
|
Analyze the following code function for security vulnerabilities
|
private IBaseResource loadAndAddConf(HttpServletRequest theServletRequest, final HomeRequest theRequest, final ModelMap theModel) {
switch (theRequest.getFhirVersion(myConfig)) {
case DSTU2:
return loadAndAddConfDstu2(theServletRequest, theRequest, theModel);
case DSTU3:
return loadAndAddConfDstu3(theServletRequest, theRequest, theModel);
case R4:
return loadAndAddConfR4(theServletRequest, theRequest, theModel);
case R5:
return loadAndAddConfR5(theServletRequest, theRequest, theModel);
case DSTU2_1:
case DSTU2_HL7ORG:
break;
}
throw new IllegalStateException("Unknown version: " + theRequest.getFhirVersion(myConfig));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: loadAndAddConf
File: hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/BaseController.java
Repository: hapifhir/hapi-fhir
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-24301
|
MEDIUM
| 4.3
|
hapifhir/hapi-fhir
|
loadAndAddConf
|
hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/BaseController.java
|
adb3734fcbbf9a9165445e9ee5eef168dbcaedaf
| 0
|
Analyze the following code function for security vulnerabilities
|
private static <T extends OpenmrsMetadata> T getMetadataByMapping(Class<T> type, String identifier){
MetadataMappingResolver metadataMappingResolver = getMetadaMappingResolver();
if (metadataMappingResolver != null) {
return metadataMappingResolver.getMetadataItem(type, identifier);
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMetadataByMapping
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
|
getMetadataByMapping
|
api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java
|
9dcd304688e65c31cac5532fe501b9816ed975ae
| 0
|
Analyze the following code function for security vulnerabilities
|
public void handleRequest(VaadinRequest request, VaadinResponse response)
throws ServiceException {
requestStart(request, response);
VaadinSession vaadinSession = null;
try {
// Find out the service session this request is related to
vaadinSession = findVaadinSession(request);
if (vaadinSession == null) {
return;
}
for (RequestHandler handler : getRequestHandlers()) {
if (handler.handleRequest(vaadinSession, request, response)) {
return;
}
}
// Request not handled by any RequestHandler
response.sendError(HttpServletResponse.SC_NOT_FOUND,
"Request was not handled by any registered handler.");
} catch (final SessionExpiredException e) {
handleSessionExpired(request, response);
} catch (final Exception e) {
handleExceptionDuringRequest(request, response, vaadinSession, e);
} finally {
requestEnd(request, response, vaadinSession);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleRequest
File: flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-203"
] |
CVE-2021-31404
|
LOW
| 1.9
|
vaadin/flow
|
handleRequest
|
flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
|
621ef1b322737d963bee624b2d2e38cd739903d9
| 0
|
Analyze the following code function for security vulnerabilities
|
private void updateActiveGroup(int userId, String clientPackage) {
IFingerprintDaemon daemon = getFingerprintDaemon();
if (daemon != null) {
try {
userId = getUserOrWorkProfileId(clientPackage, userId);
if (userId != mCurrentUserId) {
final File systemDir = Environment.getUserSystemDirectory(userId);
final File fpDir = new File(systemDir, FP_DATA_DIR);
if (!fpDir.exists()) {
if (!fpDir.mkdir()) {
Slog.v(TAG, "Cannot make directory: " + fpDir.getAbsolutePath());
return;
}
// Calling mkdir() from this process will create a directory with our
// permissions (inherited from the containing dir). This command fixes
// the label.
if (!SELinux.restorecon(fpDir)) {
Slog.w(TAG, "Restorecons failed. Directory will have wrong label.");
return;
}
}
daemon.setActiveGroup(userId, fpDir.getAbsolutePath().getBytes());
mCurrentUserId = userId;
}
mCurrentAuthenticatorId = daemon.getAuthenticatorId();
} catch (RemoteException e) {
Slog.e(TAG, "Failed to setActiveGroup():", e);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateActiveGroup
File: services/core/java/com/android/server/fingerprint/FingerprintService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
updateActiveGroup
|
services/core/java/com/android/server/fingerprint/FingerprintService.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
public org.neo4j.graphdb.Node getPreviousChild() {
return previousChild;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPreviousChild
File: src/main/java/apoc/load/Xml.java
Repository: neo4j-contrib/neo4j-apoc-procedures
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000820
|
HIGH
| 7.5
|
neo4j-contrib/neo4j-apoc-procedures
|
getPreviousChild
|
src/main/java/apoc/load/Xml.java
|
45bc09c8bd7f17283e2a7e85ce3f02cb4be4fd1a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Boolean isDarkMode() {
try {
int nightModeFlags = getActivity().getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK;
switch (nightModeFlags) {
case Configuration.UI_MODE_NIGHT_YES:
return true;
case Configuration.UI_MODE_NIGHT_NO:
return false;
default:
return null;
}
} catch(Throwable t) {
return null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isDarkMode
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
|
isDarkMode
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequiresPermission(CONTROL_REMOTE_APP_TRANSITION_ANIMATIONS)
public static ActivityOptions makeRemoteAnimation(RemoteAnimationAdapter remoteAnimationAdapter,
RemoteTransition remoteTransition) {
final ActivityOptions opts = new ActivityOptions();
opts.mRemoteAnimationAdapter = remoteAnimationAdapter;
opts.mAnimationType = ANIM_REMOTE_ANIMATION;
opts.mRemoteTransition = remoteTransition;
return opts;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: makeRemoteAnimation
File: core/java/android/app/ActivityOptions.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-20918
|
CRITICAL
| 9.8
|
android
|
makeRemoteAnimation
|
core/java/android/app/ActivityOptions.java
|
51051de4eb40bb502db448084a83fd6cbfb7d3cf
| 0
|
Analyze the following code function for security vulnerabilities
|
private void startDialogFragment(long idFeed, Boolean isFolder) {
DatabaseConnectionOrm dbConn = new DatabaseConnectionOrm(getApplicationContext());
if (!isFolder) {
String titel = dbConn.getFeedById(idFeed).getFeedTitle();
String iconurl = dbConn.getFeedById(idFeed).getFaviconUrl();
String feedurl = dbConn.getFeedById(idFeed).getLink();
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
Fragment prev = getSupportFragmentManager().findFragmentByTag("news_reader_list_dialog");
if (prev != null) {
ft.remove(prev);
}
ft.addToBackStack(null);
NewsReaderListDialogFragment fragment = NewsReaderListDialogFragment.newInstance(idFeed, titel, iconurl, feedurl);
fragment.setActivity(this);
fragment.show(ft, "news_reader_list_dialog");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startDialogFragment
File: News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java
Repository: nextcloud/news-android
The code follows secure coding practices.
|
[
"CWE-829"
] |
CVE-2021-41256
|
MEDIUM
| 5.8
|
nextcloud/news-android
|
startDialogFragment
|
News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java
|
05449cb666059af7de2302df9d5c02997a23df85
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
public static URI toURI(String fileUri) {
if (fileUri.startsWith("/")) {
// using Paths.get().toUri instead of new URI(...) as it also encodes umlauts and other special characters
return Paths.get(fileUri).toUri();
} else {
URI uri = URI.create(fileUri);
if (uri.getScheme() == null) {
throw new IllegalArgumentException("relative fileURIs are not allowed");
}
if (uri.getScheme().equals("file") && !uri.getSchemeSpecificPart().startsWith("///")) {
throw new IllegalArgumentException("Invalid fileURI");
}
return uri;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toURI
File: server/src/main/java/io/crate/execution/engine/collect/files/FileReadingIterator.java
Repository: crate
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2024-24565
|
MEDIUM
| 6.5
|
crate
|
toURI
|
server/src/main/java/io/crate/execution/engine/collect/files/FileReadingIterator.java
|
4e857d675683095945dd524d6ba03e692c70ecd6
| 0
|
Analyze the following code function for security vulnerabilities
|
private static String getSessionDetails(VaadinSession session) {
if (session == null) {
return null;
} else {
return session + " for " + session.getService().getServiceName();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSessionDetails
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
|
getSessionDetails
|
flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
|
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void applyAdjustmentsFromRankerService(INotificationListener token,
List<Adjustment> adjustments) throws RemoteException {
final long identity = Binder.clearCallingIdentity();
try {
synchronized (mNotificationList) {
mRankerServices.checkServiceTokenLocked(token);
for (Adjustment adjustment : adjustments) {
applyAdjustmentLocked(adjustment);
}
}
for (Adjustment adjustment : adjustments) {
maybeAddAutobundleSummary(adjustment);
}
mRankingHandler.requestSort();
} finally {
Binder.restoreCallingIdentity(identity);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: applyAdjustmentsFromRankerService
File: services/core/java/com/android/server/notification/NotificationManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3884
|
MEDIUM
| 4.3
|
android
|
applyAdjustmentsFromRankerService
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void writeString(String value) throws JMSException {
writePrimitive(value);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeString
File: src/main/java/com/rabbitmq/jms/client/message/RMQStreamMessage.java
Repository: rabbitmq/rabbitmq-jms-client
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2020-36282
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-jms-client
|
writeString
|
src/main/java/com/rabbitmq/jms/client/message/RMQStreamMessage.java
|
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String idFromValue(Object value) {
return _idFrom(value, value.getClass(), _typeFactory);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: idFromValue
File: src/main/java/com/fasterxml/jackson/databind/jsontype/impl/ClassNameIdResolver.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2019-16942
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
idFromValue
|
src/main/java/com/fasterxml/jackson/databind/jsontype/impl/ClassNameIdResolver.java
|
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
| 0
|
Analyze the following code function for security vulnerabilities
|
protected XWikiDocument getDoc()
{
if (this.initialDoc == this.doc) {
this.doc = this.initialDoc.clone();
}
return this.doc;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDoc
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-23615
|
MEDIUM
| 5.5
|
xwiki/xwiki-platform
|
getDoc
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
|
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient addDefaultCookie(String key, String value) {
defaultCookieMap.put(key, value);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addDefaultCookie
File: samples/openapi3/client/petstore/java/jersey2-java8-special-characters/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
|
addDefaultCookie
|
samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isInUrlAllowList() {
final String full = cleanPath(internal.toString());
// Thanks to Agasthya Kasturi
if (full.contains("@"))
return false;
for (String allow : getUrlAllowList())
if (full.startsWith(cleanPath(allow)))
return true;
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isInUrlAllowList
File: src/net/sourceforge/plantuml/security/SURL.java
Repository: plantuml
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2023-3431
|
MEDIUM
| 5.3
|
plantuml
|
isInUrlAllowList
|
src/net/sourceforge/plantuml/security/SURL.java
|
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
| 0
|
Analyze the following code function for security vulnerabilities
|
private void addNotificationChildrenAndSort() {
// Let's now add all notification children which are missing
boolean orderChanged = false;
for (int i = 0; i < mStackScroller.getChildCount(); i++) {
View view = mStackScroller.getChildAt(i);
if (!(view instanceof ExpandableNotificationRow)) {
// We don't care about non-notification views.
continue;
}
ExpandableNotificationRow parent = (ExpandableNotificationRow) view;
List<ExpandableNotificationRow> children = parent.getNotificationChildren();
List<ExpandableNotificationRow> orderedChildren = mTmpChildOrderMap.get(parent);
for (int childIndex = 0; orderedChildren != null && childIndex < orderedChildren.size();
childIndex++) {
ExpandableNotificationRow childView = orderedChildren.get(childIndex);
if (children == null || !children.contains(childView)) {
if (childView.getParent() != null) {
Log.wtf(TAG, "trying to add a notification child that already has " +
"a parent. class:" + childView.getParent().getClass() +
"\n child: " + childView);
// This shouldn't happen. We can recover by removing it though.
((ViewGroup) childView.getParent()).removeView(childView);
}
mVisualStabilityManager.notifyViewAddition(childView);
parent.addChildNotification(childView, childIndex);
mStackScroller.notifyGroupChildAdded(childView);
}
}
// Finally after removing and adding has been beformed we can apply the order.
orderChanged |= parent.applyChildOrder(orderedChildren, mVisualStabilityManager, this);
}
if (orderChanged) {
mStackScroller.generateChildOrderChangedEvent();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addNotificationChildrenAndSort
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
addNotificationChildrenAndSort
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setProperty(EntityReference classReference, String fieldName, BaseProperty value)
{
BaseObject bobject = prepareXObject(classReference);
bobject.safeput(fieldName, value);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setProperty
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-26470
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
setProperty
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
private void createXMLOutputDoc(Document doc, Collection<GridElement> elements, Element current) {
for (GridElement e : elements) {
appendRecursively(doc, current, e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createXMLOutputDoc
File: umlet-swing/src/main/java/com/baselet/diagram/io/DiagramFileHandler.java
Repository: umlet
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000548
|
MEDIUM
| 6.8
|
umlet
|
createXMLOutputDoc
|
umlet-swing/src/main/java/com/baselet/diagram/io/DiagramFileHandler.java
|
e1c4cc6ae692cc8d1c367460dbf79343e996f9bd
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setFileSize(long fileSize) {
this.fileSize = fileSize;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setFileSize
File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/log/LogUpload.java
Repository: sanluan/PublicCMS
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-21333
|
LOW
| 3.5
|
sanluan/PublicCMS
|
setFileSize
|
publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/log/LogUpload.java
|
b4d5956e65b14347b162424abb197a180229b3db
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isSmAvailable() {
return hasFeature(StreamManagementFeature.ELEMENT, StreamManagement.NAMESPACE);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isSmAvailable
File: smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
Repository: igniterealtime/Smack
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2016-10027
|
MEDIUM
| 4.3
|
igniterealtime/Smack
|
isSmAvailable
|
smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
|
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean isEnrolledInProgramOnDate(Patient patient, Program program, Date date) {
if (patient == null)
throw new IllegalArgumentException("patient should not be null");
if (program == null)
throw new IllegalArgumentException("program should not be null");
if (date == null)
throw new IllegalArgumentException("date should not be null");
if (patient.getPatientId() == null)
return false;
List<PatientProgram> patientPrograms = Context.getProgramWorkflowService().getPatientPrograms(patient, program,
null, date, date, null, false);
return (patientPrograms.size() > 0);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isEnrolledInProgramOnDate
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
|
isEnrolledInProgramOnDate
|
api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java
|
9dcd304688e65c31cac5532fe501b9816ed975ae
| 0
|
Analyze the following code function for security vulnerabilities
|
private static boolean isLimitPasswordAllowed(ActiveAdmin admin, int minPasswordQuality) {
if (admin.mPasswordPolicy.quality < minPasswordQuality) {
return false;
}
return admin.isPermissionBased || admin.info.usesPolicy(DeviceAdminInfo.USES_POLICY_LIMIT_PASSWORD);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isLimitPasswordAllowed
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
|
isLimitPasswordAllowed
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean getSeparateProfileChallengeEnabled(int userId) throws RemoteException {
checkReadPermission(SEPARATE_PROFILE_CHALLENGE_KEY, userId);
synchronized (mSeparateChallengeLock) {
return getBoolean(SEPARATE_PROFILE_CHALLENGE_KEY, false, userId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSeparateProfileChallengeEnabled
File: services/core/java/com/android/server/LockSettingsService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3908
|
MEDIUM
| 4.3
|
android
|
getSeparateProfileChallengeEnabled
|
services/core/java/com/android/server/LockSettingsService.java
|
96daf7d4893f614714761af2d53dfb93214a32e4
| 0
|
Analyze the following code function for security vulnerabilities
|
public Locale getDefaultLocale()
{
return this.defaultLocale != null ? this.defaultLocale : Locale.ROOT;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDefaultLocale
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-26470
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
getDefaultLocale
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getRenderPage() {
if ("true".equals(getRequestParameterString("isPreview"))) {
setProperty("isPreview", "true");
} else {
if ("submit".equals(getRequestParameterString("action"))) {
// only allow POST
HttpServletRequest request = WorkflowUtil.getHttpServletRequest();
if (request != null && !"POST".equalsIgnoreCase(request.getMethod())) {
PluginManager pluginManager = (PluginManager)AppUtil.getApplicationContext().getBean("pluginManager");
String content = pluginManager.getPluginFreeMarkerTemplate(new HashMap(), getClass().getName(), "/templates/unauthorized.ftl", null);
return content;
}
submitForm();
} else {
viewForm(null);
}
}
Map model = new HashMap();
model.put("request", getRequestParameters());
model.put("element", this);
PluginManager pluginManager = (PluginManager)AppUtil.getApplicationContext().getBean("pluginManager");
String content = pluginManager.getPluginFreeMarkerTemplate(model, getClass().getName(), "/templates/userProfile.ftl", null);
return content;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRenderPage
File: wflow-core/src/main/java/org/joget/plugin/enterprise/UserProfileMenu.java
Repository: jogetworkflow/jw-community
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-4859
|
MEDIUM
| 4
|
jogetworkflow/jw-community
|
getRenderPage
|
wflow-core/src/main/java/org/joget/plugin/enterprise/UserProfileMenu.java
|
9a77f508a2bf8cf661d588f37a4cc29ecaea4fc8
| 0
|
Analyze the following code function for security vulnerabilities
|
private void processMenus(MenusType xmlMenusType, PackageType xmlPackage, PluginPackages pluginPackageEntity) {
if (xmlMenusType == null) {
return;
}
List<MenuType> xmlMenuList = xmlMenusType.getMenu();
if (xmlMenuList == null || xmlMenuList.isEmpty()) {
return;
}
for (MenuType xmlMenu : xmlMenuList) {
PluginPackageMenus packageMenuEntity = new PluginPackageMenus();
packageMenuEntity.setId(LocalIdGenerator.generateId());
packageMenuEntity.setActive(false);
packageMenuEntity.setCategory(xmlMenu.getCat());
packageMenuEntity.setCode(xmlMenu.getCode());
packageMenuEntity.setDisplayName(xmlMenu.getDisplayName());
packageMenuEntity
.setLocalDisplayName(StringUtils.isBlank(xmlMenu.getLocalDisplayName()) ? xmlMenu.getDisplayName()
: xmlMenu.getLocalDisplayName());
// packageMenuEntity.setMenuOrder(menuOrder);
packageMenuEntity.setPath(xmlMenu.getValue());
packageMenuEntity.setPluginPackageId(pluginPackageEntity.getId());
packageMenuEntity.setSource(pluginPackageEntity.getId());
pluginPackageMenusMapper.insert(packageMenuEntity);
pluginPackageEntity.getPluginPackageMenus().add(packageMenuEntity);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: processMenus
File: platform-core/src/main/java/com/webank/wecube/platform/core/service/plugin/PluginArtifactsMgmtService.java
Repository: WeBankPartners/wecube-platform
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-45746
|
MEDIUM
| 5
|
WeBankPartners/wecube-platform
|
processMenus
|
platform-core/src/main/java/com/webank/wecube/platform/core/service/plugin/PluginArtifactsMgmtService.java
|
1164dae43c505f8a0233cc049b2689d6ca6d0c37
| 0
|
Analyze the following code function for security vulnerabilities
|
static private Bundle unflattenBundle(byte[] flatData) {
Bundle bundle;
Parcel parcel = Parcel.obtain();
try {
parcel.unmarshall(flatData, 0, flatData.length);
parcel.setDataPosition(0);
bundle = parcel.readBundle();
} catch (RuntimeException e) {
// A RuntimeException is thrown if we were unable to parse the parcel.
// Create an empty parcel in this case.
bundle = new Bundle();
} finally {
parcel.recycle();
}
return bundle;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unflattenBundle
File: services/core/java/com/android/server/content/SyncStorageEngine.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2016-2424
|
HIGH
| 7.1
|
android
|
unflattenBundle
|
services/core/java/com/android/server/content/SyncStorageEngine.java
|
d3383d5bfab296ba3adbc121ff8a7b542bde4afb
| 0
|
Analyze the following code function for security vulnerabilities
|
private void sendDisabledIntentLocked(Provider provider) {
Intent intent = new Intent(AppWidgetManager.ACTION_APPWIDGET_DISABLED);
intent.setComponent(provider.info.provider);
sendBroadcastAsUser(intent, provider.info.getProfile());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendDisabledIntentLocked
File: services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-1541
|
MEDIUM
| 4.3
|
android
|
sendDisabledIntentLocked
|
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
|
0b98d304c467184602b4c6bce76fda0b0274bc07
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void setSignalStrengthDefaultValues() {
mSignalStrength = new SignalStrength( false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSignalStrengthDefaultValues
File: src/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2016-3831
|
MEDIUM
| 5
|
android
|
setSignalStrengthDefaultValues
|
src/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
|
f47bc301ccbc5e6d8110afab5a1e9bac1d4ef058
| 0
|
Analyze the following code function for security vulnerabilities
|
private AtomicFile getFile() {
File dataDir = Environment.getDataDirectory();
File systemDir = new File(dataDir, "system");
File fname = new File(systemDir, "package-usage.list");
return new AtomicFile(fname);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFile
File: services/core/java/com/android/server/pm/PackageManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2016-2497
|
HIGH
| 7.5
|
android
|
getFile
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
private ObservationManager getObservationManager()
{
if (this.observationManager == null) {
this.observationManager = Utils.getComponent(ObservationManager.class);
}
return this.observationManager;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getObservationManager
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-32620
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
getObservationManager
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated // since 2.9
protected final String _customTypeId(Object bean)
{
final Object typeId = _typeId.getValue(bean);
if (typeId == null) {
return "";
}
return (typeId instanceof String) ? (String) typeId : typeId.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _customTypeId
File: src/main/java/com/fasterxml/jackson/databind/ser/std/BeanSerializerBase.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2019-16942
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
_customTypeId
|
src/main/java/com/fasterxml/jackson/databind/ser/std/BeanSerializerBase.java
|
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
| 0
|
Analyze the following code function for security vulnerabilities
|
void unholdCall(Call call) {
if (!mCalls.contains(call)) {
Log.w(this, "Unknown call (%s) asked to be removed from hold", call);
} else {
Log.d(this, "unholding call: (%s)", call);
for (Call c : mCalls) {
// Only attempt to hold parent calls and not the individual children.
if (c != null && c.isAlive() && c != call && c.getParentCall() == null) {
c.hold();
}
}
call.unhold();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unholdCall
File: src/com/android/server/telecom/CallsManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2423
|
MEDIUM
| 6.6
|
android
|
unholdCall
|
src/com/android/server/telecom/CallsManager.java
|
a06c9a4aef69ae27b951523cf72bf72412bf48fa
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String buildQueryString(
boolean distinct, String tables, String[] columns, String where,
String groupBy, String having, String orderBy, String limit) {
if (TextUtils.isEmpty(groupBy) && !TextUtils.isEmpty(having)) {
throw new IllegalArgumentException(
"HAVING clauses are only permitted when using a groupBy clause");
}
if (!TextUtils.isEmpty(limit) && !sLimitPattern.matcher(limit).matches()) {
throw new IllegalArgumentException("invalid LIMIT clauses:" + limit);
}
StringBuilder query = new StringBuilder(120);
query.append("SELECT ");
if (distinct) {
query.append("DISTINCT ");
}
if (columns != null && columns.length != 0) {
appendColumns(query, columns);
} else {
query.append("* ");
}
query.append("FROM ");
query.append(tables);
appendClause(query, " WHERE ", where);
appendClause(query, " GROUP BY ", groupBy);
appendClause(query, " HAVING ", having);
appendClause(query, " ORDER BY ", orderBy);
appendClause(query, " LIMIT ", limit);
return query.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: buildQueryString
File: core/java/android/database/sqlite/SQLiteQueryBuilder.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2018-9493
|
LOW
| 2.1
|
android
|
buildQueryString
|
core/java/android/database/sqlite/SQLiteQueryBuilder.java
|
ebc250d16c747f4161167b5ff58b3aea88b37acf
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean storageFileExists(String name) {
String[] fileList = getContext().fileList();
for (int iter = 0; iter < fileList.length; iter++) {
if (fileList[iter].equals(name)) {
return true;
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: storageFileExists
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
|
storageFileExists
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public CertId getSerialNum() {
return serialNum;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSerialNum
File: base/common/src/main/java/com/netscape/certsrv/cert/CertEnrollmentRequest.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
getSerialNum
|
base/common/src/main/java/com/netscape/certsrv/cert/CertEnrollmentRequest.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.