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
|
private boolean isHomeApp(int uid, @Nullable String packageName) {
if (mService.mHomeProcess != null) {
// Fast check
return uid == mService.mHomeProcess.mUid;
}
if (packageName == null) {
return false;
}
ComponentName activity =
mService.getPackageManagerInternalLocked().getDefaultHomeActivity(
UserHandle.getUserId(uid));
return activity != null && packageName.equals(activity.getPackageName());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isHomeApp
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
|
isHomeApp
|
services/core/java/com/android/server/wm/ActivityStarter.java
|
70ec64dc5a2a816d6aa324190a726a85fd749b30
| 0
|
Analyze the following code function for security vulnerabilities
|
public default void presenceAdded(Event event) {
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: presenceAdded
File: cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Seti.java
Repository: cometd
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-24721
|
MEDIUM
| 5.5
|
cometd
|
presenceAdded
|
cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Seti.java
|
bb445a143fbf320f17c62e340455cd74acfb5929
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean save(XWikiContext context) throws XWikiException
{
XWiki xwiki = context.getWiki();
XWikiRequest request = context.getRequest();
XWikiDocument doc = context.getDoc();
EditForm form = (EditForm) context.getForm();
// Check save session
int sectionNumber = 0;
if (request.getParameter("section") != null && xwiki.hasSectionEdit(context)) {
sectionNumber = Integer.parseInt(request.getParameter("section"));
}
if (doc.isNew() && !this.isEntityReferenceNameValid(doc.getDocumentReference())) {
context.put("message", "entitynamevalidation.create.invalidname");
context.put("messageParameters",
new Object[] { getLocalSerializer().serialize(doc.getDocumentReference())});
return true;
}
XWikiDocument originalDoc = doc;
// We need to clone this document first, since a cached storage would return the same object for the
// following requests, so concurrent request might get a partially modified object, or worse, if an error
// occurs during the save, the cached object will not reflect the actual document at all.
doc = doc.clone();
String language = form.getLanguage();
// FIXME Which one should be used: doc.getDefaultLanguage or
// form.getDefaultLanguage()?
// String defaultLanguage = ((EditForm) form).getDefaultLanguage();
XWikiDocument tdoc;
if (doc.isNew() || (language == null) || (language.equals("")) || (language.equals("default"))
|| (language.equals(doc.getDefaultLanguage()))) {
// Saving the default document translation.
// Need to save parent and defaultLanguage if they have changed
tdoc = doc;
} else {
tdoc = doc.getTranslatedDocument(language, context);
if ((tdoc == doc) && xwiki.isMultiLingual(context)) {
// Saving a new document translation.
tdoc = new XWikiDocument(doc.getDocumentReference());
tdoc.setLanguage(language);
tdoc.setStore(doc.getStore());
// In that specific case, we want the original doc to be the translation document so that we
// never raised a conflict.
originalDoc = tdoc;
} else if (tdoc != doc) {
// Saving an existing document translation (but not the default one).
// Same as above, clone the object retrieved from the store cache.
originalDoc = tdoc;
tdoc = tdoc.clone();
}
}
if (doc.isNew()) {
doc.setLocale(Locale.ROOT);
if (doc.getDefaultLocale() == Locale.ROOT) {
doc.setDefaultLocale(xwiki.getLocalePreference(context));
}
}
try {
tdoc.readFromTemplate(form.getTemplate(), context);
} catch (XWikiException e) {
if (e.getCode() == XWikiException.ERROR_XWIKI_APP_DOCUMENT_NOT_EMPTY) {
context.put("exception", e);
return true;
}
}
// Convert the content and the meta data of the edited document and its translations if the syntax has changed
// and the request is asking for a syntax conversion. We do this after applying the template because the
// template may have content in the previous syntax that needs to be converted. We do this before applying the
// changes from the submitted form because it may contain content that was already converted.
if (form.isConvertSyntax() && !tdoc.getSyntax().toIdString().equals(form.getSyntaxId())) {
convertSyntax(tdoc, form.getSyntaxId(), context);
}
if (sectionNumber != 0) {
XWikiDocument sectionDoc = tdoc.clone();
sectionDoc.readFromForm(form, context);
String sectionContent = sectionDoc.getContent() + "\n";
String content = tdoc.updateDocumentSection(sectionNumber, sectionContent);
tdoc.setContent(content);
tdoc.setComment(sectionDoc.getComment());
tdoc.setMinorEdit(sectionDoc.isMinorEdit());
} else {
tdoc.readFromForm(form, context);
}
// TODO: handle Author
String username = context.getUser();
tdoc.setAuthor(username);
if (tdoc.isNew()) {
tdoc.setCreator(username);
}
// Make sure we have at least the meta data dirty status
tdoc.setMetaDataDirty(true);
// Validate the document if we have xvalidate=1 in the request
if ("1".equals(request.getParameter("xvalidate"))) {
boolean validationResult = tdoc.validate(context);
// If the validation fails we should show the "Inline form" edit mode
if (validationResult == false) {
// Set display context to 'edit'
context.put("display", "edit");
// Set the action used by the "Inline form" edit mode as the context action. See #render(XWikiContext).
context.setAction(tdoc.getDefaultEditMode(context));
// Set the document in the context
context.put("doc", doc);
context.put("cdoc", tdoc);
context.put("tdoc", tdoc);
// Force the "Inline form" edit mode.
getCurrentScriptContext().setAttribute("editor", "inline", ScriptContext.ENGINE_SCOPE);
return true;
}
}
// Remove the redirect object if the save request doesn't update it. This allows users to easily overwrite
// redirect place-holders that are created when we move pages around.
if (tdoc.getXObject(RedirectClassDocumentInitializer.REFERENCE) != null
&& request.getParameter("XWiki.RedirectClass_0_location") == null) {
tdoc.removeXObjects(RedirectClassDocumentInitializer.REFERENCE);
}
// We only proceed on the check between versions in case of AJAX request, so we currently stay in the edit form
// This can be improved later by displaying a nice UI with some merge options in a sync request.
// For now we don't want our user to loose their changes.
if (isConflictCheckEnabled() && Utils.isAjaxRequest(context)
&& request.getParameter("previousVersion") != null) {
if (isConflictingWithVersion(context, originalDoc, tdoc)) {
return true;
}
}
// Make sure the user is allowed to make this modification
xwiki.checkSavingDocument(context.getUserReference(), tdoc, tdoc.getComment(), tdoc.isMinorEdit(), context);
// We get the comment to be used from the document
// It was read using readFromForm
xwiki.saveDocument(tdoc, tdoc.getComment(), tdoc.isMinorEdit(), context);
context.put(SAVED_OBJECT_VERSION_KEY, tdoc.getRCSVersion());
Job createJob = startCreateJob(tdoc.getDocumentReference(), form);
if (createJob != null) {
if (isAsync(request)) {
if (Utils.isAjaxRequest(context)) {
// Redirect to the job status URL of the job we have just launched.
sendRedirect(context.getResponse(), String.format("%s/rest/jobstatus/%s?media=json",
context.getRequest().getContextPath(), serializeJobId(createJob.getRequest().getId())));
}
// else redirect normally and the operation will eventually finish in the background.
// Note: It is preferred that async mode is called in an AJAX request that can display the progress.
} else {
// Sync mode, default, wait for the work to finish.
try {
createJob.join();
} catch (InterruptedException e) {
throw new XWikiException(String.format(
"Interrupted while waiting for template [%s] to be processed when creating the document [%s]",
form.getTemplate(), tdoc.getDocumentReference()), e);
}
}
} else {
// Nothing more to do, just unlock the document.
XWikiLock lock = tdoc.getLock(context);
if (lock != null) {
tdoc.removeLock(context);
}
}
return false;
}
|
Vulnerability Classification:
- CWE: CWE-862
- CVE: CVE-2022-23617
- Severity: MEDIUM
- CVSS Score: 4.0
Description: XWIKI-18430: Page content is revealed to users that don't have rights if used as a template for the creation of another page
Function: save
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/SaveAction.java
Repository: xwiki/xwiki-platform
Fixed Code:
public boolean save(XWikiContext context) throws XWikiException
{
XWiki xwiki = context.getWiki();
XWikiRequest request = context.getRequest();
XWikiDocument doc = context.getDoc();
EditForm form = (EditForm) context.getForm();
// Check save session
int sectionNumber = 0;
if (request.getParameter("section") != null && xwiki.hasSectionEdit(context)) {
sectionNumber = Integer.parseInt(request.getParameter("section"));
}
if (doc.isNew() && !this.isEntityReferenceNameValid(doc.getDocumentReference())) {
context.put("message", "entitynamevalidation.create.invalidname");
context.put("messageParameters",
new Object[] { getLocalSerializer().serialize(doc.getDocumentReference())});
return true;
}
XWikiDocument originalDoc = doc;
// We need to clone this document first, since a cached storage would return the same object for the
// following requests, so concurrent request might get a partially modified object, or worse, if an error
// occurs during the save, the cached object will not reflect the actual document at all.
doc = doc.clone();
String language = form.getLanguage();
// FIXME Which one should be used: doc.getDefaultLanguage or
// form.getDefaultLanguage()?
// String defaultLanguage = ((EditForm) form).getDefaultLanguage();
XWikiDocument tdoc;
if (doc.isNew() || (language == null) || (language.equals("")) || (language.equals("default"))
|| (language.equals(doc.getDefaultLanguage()))) {
// Saving the default document translation.
// Need to save parent and defaultLanguage if they have changed
tdoc = doc;
} else {
tdoc = doc.getTranslatedDocument(language, context);
if ((tdoc == doc) && xwiki.isMultiLingual(context)) {
// Saving a new document translation.
tdoc = new XWikiDocument(doc.getDocumentReference());
tdoc.setLanguage(language);
tdoc.setStore(doc.getStore());
// In that specific case, we want the original doc to be the translation document so that we
// never raised a conflict.
originalDoc = tdoc;
} else if (tdoc != doc) {
// Saving an existing document translation (but not the default one).
// Same as above, clone the object retrieved from the store cache.
originalDoc = tdoc;
tdoc = tdoc.clone();
}
}
if (doc.isNew()) {
doc.setLocale(Locale.ROOT);
if (doc.getDefaultLocale() == Locale.ROOT) {
doc.setDefaultLocale(xwiki.getLocalePreference(context));
}
}
try {
readFromTemplate(tdoc, form.getTemplate(), context);
} catch (XWikiException e) {
if (e.getCode() == XWikiException.ERROR_XWIKI_APP_DOCUMENT_NOT_EMPTY) {
context.put("exception", e);
return true;
}
}
// Convert the content and the meta data of the edited document and its translations if the syntax has changed
// and the request is asking for a syntax conversion. We do this after applying the template because the
// template may have content in the previous syntax that needs to be converted. We do this before applying the
// changes from the submitted form because it may contain content that was already converted.
if (form.isConvertSyntax() && !tdoc.getSyntax().toIdString().equals(form.getSyntaxId())) {
convertSyntax(tdoc, form.getSyntaxId(), context);
}
if (sectionNumber != 0) {
XWikiDocument sectionDoc = tdoc.clone();
sectionDoc.readFromForm(form, context);
String sectionContent = sectionDoc.getContent() + "\n";
String content = tdoc.updateDocumentSection(sectionNumber, sectionContent);
tdoc.setContent(content);
tdoc.setComment(sectionDoc.getComment());
tdoc.setMinorEdit(sectionDoc.isMinorEdit());
} else {
tdoc.readFromForm(form, context);
}
// TODO: handle Author
String username = context.getUser();
tdoc.setAuthor(username);
if (tdoc.isNew()) {
tdoc.setCreator(username);
}
// Make sure we have at least the meta data dirty status
tdoc.setMetaDataDirty(true);
// Validate the document if we have xvalidate=1 in the request
if ("1".equals(request.getParameter("xvalidate"))) {
boolean validationResult = tdoc.validate(context);
// If the validation fails we should show the "Inline form" edit mode
if (validationResult == false) {
// Set display context to 'edit'
context.put("display", "edit");
// Set the action used by the "Inline form" edit mode as the context action. See #render(XWikiContext).
context.setAction(tdoc.getDefaultEditMode(context));
// Set the document in the context
context.put("doc", doc);
context.put("cdoc", tdoc);
context.put("tdoc", tdoc);
// Force the "Inline form" edit mode.
getCurrentScriptContext().setAttribute("editor", "inline", ScriptContext.ENGINE_SCOPE);
return true;
}
}
// Remove the redirect object if the save request doesn't update it. This allows users to easily overwrite
// redirect place-holders that are created when we move pages around.
if (tdoc.getXObject(RedirectClassDocumentInitializer.REFERENCE) != null
&& request.getParameter("XWiki.RedirectClass_0_location") == null) {
tdoc.removeXObjects(RedirectClassDocumentInitializer.REFERENCE);
}
// We only proceed on the check between versions in case of AJAX request, so we currently stay in the edit form
// This can be improved later by displaying a nice UI with some merge options in a sync request.
// For now we don't want our user to loose their changes.
if (isConflictCheckEnabled() && Utils.isAjaxRequest(context)
&& request.getParameter("previousVersion") != null) {
if (isConflictingWithVersion(context, originalDoc, tdoc)) {
return true;
}
}
// Make sure the user is allowed to make this modification
xwiki.checkSavingDocument(context.getUserReference(), tdoc, tdoc.getComment(), tdoc.isMinorEdit(), context);
// We get the comment to be used from the document
// It was read using readFromForm
xwiki.saveDocument(tdoc, tdoc.getComment(), tdoc.isMinorEdit(), context);
context.put(SAVED_OBJECT_VERSION_KEY, tdoc.getRCSVersion());
Job createJob = startCreateJob(tdoc.getDocumentReference(), form);
if (createJob != null) {
if (isAsync(request)) {
if (Utils.isAjaxRequest(context)) {
// Redirect to the job status URL of the job we have just launched.
sendRedirect(context.getResponse(), String.format("%s/rest/jobstatus/%s?media=json",
context.getRequest().getContextPath(), serializeJobId(createJob.getRequest().getId())));
}
// else redirect normally and the operation will eventually finish in the background.
// Note: It is preferred that async mode is called in an AJAX request that can display the progress.
} else {
// Sync mode, default, wait for the work to finish.
try {
createJob.join();
} catch (InterruptedException e) {
throw new XWikiException(String.format(
"Interrupted while waiting for template [%s] to be processed when creating the document [%s]",
form.getTemplate(), tdoc.getDocumentReference()), e);
}
}
} else {
// Nothing more to do, just unlock the document.
XWikiLock lock = tdoc.getLock(context);
if (lock != null) {
tdoc.removeLock(context);
}
}
return false;
}
|
[
"CWE-862"
] |
CVE-2022-23617
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
save
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/SaveAction.java
|
30c52b01559b8ef5ed1035dac7c34aaf805764d5
| 1
|
Analyze the following code function for security vulnerabilities
|
private void flushPendingEncryptedWrites(ChannelHandlerContext ctx) {
while (!pendingEncryptedWrites.isEmpty()) {
// Avoid possible dead lock and data integrity issue
// which is caused by cross communication between more than one channel
// in the same VM.
if (!pendingEncryptedWritesLock.tryLock()) {
return;
}
try {
MessageEvent e;
while ((e = pendingEncryptedWrites.poll()) != null) {
ctx.sendDownstream(e);
}
} finally {
pendingEncryptedWritesLock.unlock();
}
// Other thread might have added more elements at this point, so we loop again if the queue got unempty.
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: flushPendingEncryptedWrites
File: src/main/java/org/jboss/netty/handler/ssl/SslHandler.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2014-3488
|
MEDIUM
| 5
|
netty
|
flushPendingEncryptedWrites
|
src/main/java/org/jboss/netty/handler/ssl/SslHandler.java
|
2fa9400a59d0563a66908aba55c41e7285a04994
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean onCreate()
{
databaseManager = DatabaseManagerImpl.getInstance(getContext());
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onCreate
File: alfresco-mobile-android/src/main/java/org/alfresco/mobile/android/application/providers/search/HistorySearchProvider.java
Repository: Alfresco/alfresco-android-app
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15566
|
HIGH
| 7.5
|
Alfresco/alfresco-android-app
|
onCreate
|
alfresco-mobile-android/src/main/java/org/alfresco/mobile/android/application/providers/search/HistorySearchProvider.java
|
32faa4355f82783326d16b0252e81e1231e12c9c
| 0
|
Analyze the following code function for security vulnerabilities
|
void initRecipientsFromRefMessage(Message refMessage, int action) {
// Don't populate the address if this is a forward.
if (action == ComposeActivity.FORWARD) {
return;
}
initReplyRecipients(refMessage, action);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initRecipientsFromRefMessage
File: src/com/android/mail/compose/ComposeActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2425
|
MEDIUM
| 4.3
|
android
|
initRecipientsFromRefMessage
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public SysUserCacheInfo getCacheUser(String username) {
SysUserCacheInfo info = new SysUserCacheInfo();
info.setOneDepart(true);
if(oConvertUtils.isEmpty(username)) {
return null;
}
//查询用户信息
SysUser sysUser = userMapper.getUserByName(username);
if(sysUser!=null) {
info.setSysUserCode(sysUser.getUsername());
info.setSysUserName(sysUser.getRealname());
info.setSysOrgCode(sysUser.getOrgCode());
}
//多部门支持in查询
List<SysDepart> list = sysDepartMapper.queryUserDeparts(sysUser.getId());
List<String> sysMultiOrgCode = new ArrayList<String>();
if(list==null || list.size()==0) {
//当前用户无部门
//sysMultiOrgCode.add("0");
}else if(list.size()==1) {
sysMultiOrgCode.add(list.get(0).getOrgCode());
}else {
info.setOneDepart(false);
for (SysDepart dpt : list) {
sysMultiOrgCode.add(dpt.getOrgCode());
}
}
info.setSysMultiOrgCode(sysMultiOrgCode);
return info;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCacheUser
File: jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java
Repository: jeecgboot/jeecg-boot
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-45208
|
MEDIUM
| 4.3
|
jeecgboot/jeecg-boot
|
getCacheUser
|
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java
|
51e2227bfe54f5d67b09411ee9a336750164e73d
| 0
|
Analyze the following code function for security vulnerabilities
|
public void sendSmAcknowledgement() throws StreamManagementNotEnabledException, NotConnectedException, InterruptedException {
if (!isSmEnabled()) {
throw new StreamManagementException.StreamManagementNotEnabledException();
}
sendSmAcknowledgementInternal();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendSmAcknowledgement
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
|
sendSmAcknowledgement
|
smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
|
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
| 0
|
Analyze the following code function for security vulnerabilities
|
void doAddInternal(int pid, ProcessRecord app) {
mPidMap.put(pid, app);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doAddInternal
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21292
|
MEDIUM
| 5.5
|
android
|
doAddInternal
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public long getSpacePreferenceAsLong(String preference, long defaultValue, XWikiContext context)
{
return NumberUtils.toLong(getSpacePreference(preference, context), defaultValue);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSpacePreferenceAsLong
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
|
getSpacePreferenceAsLong
|
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 void setProcessLimit(int max) throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setProcessLimit
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
setProcessLimit
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
private static XmlGenerator addClusterLoginElements(XmlGenerator gen, AbstractClusterLoginConfig<?> c) {
gen.nodeIfContents("skip-identity", c.getSkipIdentity());
gen.nodeIfContents("skip-endpoint", c.getSkipEndpoint());
gen.nodeIfContents("skip-role", c.getSkipRole());
return gen;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addClusterLoginElements
File: hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-522"
] |
CVE-2023-33264
|
MEDIUM
| 4.3
|
hazelcast
|
addClusterLoginElements
|
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
|
80a502d53cc48bf895711ab55f95e3a51e344ac1
| 0
|
Analyze the following code function for security vulnerabilities
|
void keyValueAgentErrorCleanup() {
// If the agent fails restore, it might have put the app's data
// into an incoherent state. For consistency we wipe its data
// again in this case before continuing with normal teardown
clearApplicationDataSynchronous(mCurrentPackage.packageName);
keyValueAgentCleanup();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: keyValueAgentErrorCleanup
File: services/backup/java/com/android/server/backup/BackupManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3759
|
MEDIUM
| 5
|
android
|
keyValueAgentErrorCleanup
|
services/backup/java/com/android/server/backup/BackupManagerService.java
|
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
| 0
|
Analyze the following code function for security vulnerabilities
|
public void allowTypesByWildcard(String[] patterns) {
addPermission(new WildcardTypePermission(patterns));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: allowTypesByWildcard
File: xstream/src/java/com/thoughtworks/xstream/XStream.java
Repository: x-stream/xstream
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-43859
|
MEDIUM
| 5
|
x-stream/xstream
|
allowTypesByWildcard
|
xstream/src/java/com/thoughtworks/xstream/XStream.java
|
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
| 0
|
Analyze the following code function for security vulnerabilities
|
public Unsafe getUnsafe() {
checkTrusted();
return Unsafe.getUnsafe0();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUnsafe
File: api/src/main/java/io/github/karlatemp/unsafeaccessor/UnsafeAccess.java
Repository: Karlatemp/UnsafeAccessor
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-31139
|
MEDIUM
| 4.3
|
Karlatemp/UnsafeAccessor
|
getUnsafe
|
api/src/main/java/io/github/karlatemp/unsafeaccessor/UnsafeAccess.java
|
4ef83000184e8f13239a1ea2847ee401d81585fd
| 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/resteasy/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/resteasy/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public MapSession findById(String sessionId) {
return getSession(sessionId, true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findById
File: spring/spring5/spring5-common/src/main/java/org/infinispan/spring/common/session/AbstractInfinispanSessionRepository.java
Repository: infinispan
The code follows secure coding practices.
|
[
"CWE-384"
] |
CVE-2019-10158
|
HIGH
| 7.5
|
infinispan
|
findById
|
spring/spring5/spring5-common/src/main/java/org/infinispan/spring/common/session/AbstractInfinispanSessionRepository.java
|
f3efef8de7fec4108dd5ab725cea6ae09f14815d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + (file == null ? 0 : file.hashCode());
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hashCode
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
|
hashCode
|
umlet-swing/src/main/java/com/baselet/diagram/io/DiagramFileHandler.java
|
e1c4cc6ae692cc8d1c367460dbf79343e996f9bd
| 0
|
Analyze the following code function for security vulnerabilities
|
public abstract JavaType[] findTypeParameters(Class<?> expType);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findTypeParameters
File: src/main/java/com/fasterxml/jackson/databind/JavaType.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2019-16942
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
findTypeParameters
|
src/main/java/com/fasterxml/jackson/databind/JavaType.java
|
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isOortHandshake(Message handshake) {
if (!Channel.META_HANDSHAKE.equals(handshake.getChannel())) {
return false;
}
Map<String, Object> ext = handshake.getExt();
if (ext == null) {
return false;
}
Object oortExtObject = ext.get(EXT_OORT_FIELD);
if (!(oortExtObject instanceof Map)) {
return false;
}
@SuppressWarnings("unchecked")
Map<String, Object> oortExt = (Map<String, Object>)oortExtObject;
String cometURL = (String)oortExt.get(EXT_COMET_URL_FIELD);
if (!getURL().equals(cometURL)) {
return false;
}
String b64RemoteSecret = (String)oortExt.get(EXT_OORT_SECRET_FIELD);
String b64LocalSecret = encodeSecret(getSecret());
return b64LocalSecret.equals(b64RemoteSecret);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isOortHandshake
File: cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Oort.java
Repository: cometd
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-24721
|
MEDIUM
| 5.5
|
cometd
|
isOortHandshake
|
cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Oort.java
|
bb445a143fbf320f17c62e340455cd74acfb5929
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected PermissionCollection getPermissions(CodeSource cs) {
try {
Permissions result = new Permissions();
// should check for extensions or boot, automatically give all
// access w/o security dialog once we actually check certificates.
// copy security permissions from SecurityDesc element
if (security != null) {
// Security desc. is used only to track security settings for the
// application. However, an application may comprise of multiple
// jars, and as such, security must be evaluated on a per jar basis.
// set default perms
PermissionCollection permissions = security.getSandBoxPermissions();
// If more than default is needed:
// 1. Code must be signed
// 2. ALL or J2EE permissions must be requested (note: plugin requests ALL automatically)
if (cs == null) {
throw new NullPointerException("Code source was null");
}
if (cs.getCodeSigners() != null) {
if (cs.getLocation() == null) {
throw new NullPointerException("Code source location was null");
}
if (getCodeSourceSecurity(cs.getLocation()) == null) {
throw new NullPointerException("Code source security was null");
}
if (getCodeSourceSecurity(cs.getLocation()).getSecurityType() == null) {
LOG.error(IcedTeaWebConstants.DEFAULT_ERROR_MESSAGE, new NullPointerException("Warning! Code source security type was null"));
}
Object securityType = getCodeSourceSecurity(cs.getLocation()).getSecurityType();
if (SecurityDesc.ALL_PERMISSIONS.equals(securityType)
|| SecurityDesc.J2EE_PERMISSIONS.equals(securityType)) {
permissions = getCodeSourceSecurity(cs.getLocation()).getPermissions(cs);
}
}
for (Permission perm : Collections.list(permissions.elements())) {
result.add(perm);
}
}
// add in permission to read the cached JAR files
for (Permission perm : resourcePermissions) {
result.add(perm);
}
// add in the permissions that the user granted.
for (Permission perm : runtimePermissions) {
result.add(perm);
}
// Class from host X should be allowed to connect to host X
if (cs.getLocation() != null && cs.getLocation().getHost().length() > 0) {
result.add(new SocketPermission(UrlUtils.getHostAndPort(cs.getLocation()),
"connect, accept"));
}
return result;
} catch (RuntimeException ex) {
LOG.error(IcedTeaWebConstants.DEFAULT_ERROR_MESSAGE, ex);
throw ex;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPermissions
File: core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
Repository: AdoptOpenJDK/IcedTea-Web
The code follows secure coding practices.
|
[
"CWE-345",
"CWE-94",
"CWE-22"
] |
CVE-2019-10182
|
MEDIUM
| 5.8
|
AdoptOpenJDK/IcedTea-Web
|
getPermissions
|
core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
|
e0818f521a0711aeec4b913b49b5fc6a52815662
| 0
|
Analyze the following code function for security vulnerabilities
|
public static int getMinProgressStep() {
return minProgressStep;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMinProgressStep
File: library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java
Repository: lingochamp/FileDownloader
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-11248
|
HIGH
| 7.5
|
lingochamp/FileDownloader
|
getMinProgressStep
|
library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java
|
b023cc081bbecdd2a9f3549a3ae5c12a9647ed7f
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String getRelativePath(VFSContainer rootContainer, VFSLeaf file) {
String sb = "/" + file.getName();
VFSContainer parent = file.getParentContainer();
while (parent != null && !rootContainer.isSame(parent)) {
sb = "/" + parent.getName() + sb;
parent = parent.getParentContainer();
}
return sb;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRelativePath
File: src/main/java/org/olat/core/util/mail/ui/SendDocumentsByEMailController.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-41152
|
MEDIUM
| 4
|
OpenOLAT
|
getRelativePath
|
src/main/java/org/olat/core/util/mail/ui/SendDocumentsByEMailController.java
|
418bb509ffcb0e25ab4390563c6c47f0458583eb
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void dump(PrintWriter pw, String[] args) {
pw.print(" mSystemReady: "); pw.println(mSystemReady);
pw.print(" mBootCompleted: "); pw.println(mBootCompleted);
pw.print(" mBootSendUserPresent: "); pw.println(mBootSendUserPresent);
pw.print(" mExternallyEnabled: "); pw.println(mExternallyEnabled);
pw.print(" mShuttingDown: "); pw.println(mShuttingDown);
pw.print(" mNeedToReshowWhenReenabled: "); pw.println(mNeedToReshowWhenReenabled);
pw.print(" mShowing: "); pw.println(mShowing);
pw.print(" mInputRestricted: "); pw.println(mInputRestricted);
pw.print(" mOccluded: "); pw.println(mOccluded);
pw.print(" mDelayedShowingSequence: "); pw.println(mDelayedShowingSequence);
pw.print(" mExitSecureCallback: "); pw.println(mExitSecureCallback);
pw.print(" mDeviceInteractive: "); pw.println(mDeviceInteractive);
pw.print(" mGoingToSleep: "); pw.println(mGoingToSleep);
pw.print(" mHiding: "); pw.println(mHiding);
pw.print(" mDozing: "); pw.println(mDozing);
pw.print(" mAodShowing: "); pw.println(mAodShowing);
pw.print(" mWaitingUntilKeyguardVisible: "); pw.println(mWaitingUntilKeyguardVisible);
pw.print(" mKeyguardDonePending: "); pw.println(mKeyguardDonePending);
pw.print(" mHideAnimationRun: "); pw.println(mHideAnimationRun);
pw.print(" mPendingReset: "); pw.println(mPendingReset);
pw.print(" mPendingLock: "); pw.println(mPendingLock);
pw.print(" wakeAndUnlocking: "); pw.println(mWakeAndUnlocking);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dump
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
|
dump
|
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
|
d18d8b350756b0e89e051736c1f28744ed31e93a
| 0
|
Analyze the following code function for security vulnerabilities
|
public UIComponent createComponent(ValueBinding componentBinding, FacesContext context, String componentType) throws FacesException {
notNull("componentBinding", componentBinding);
notNull(CONTEXT, context);
notNull(COMPONENT_TYPE, componentType);
Object result;
boolean createOne = false;
try {
result = componentBinding.getValue(context);
if (result != null) {
createOne = !(result instanceof UIComponent);
}
if (result == null || createOne) {
result = createComponentApplyAnnotations(context, componentType, null, false);
componentBinding.setValue(context, result);
}
} catch (Exception ex) {
throw new FacesException(ex);
}
return (UIComponent) result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createComponent
File: impl/src/main/java/com/sun/faces/application/applicationimpl/InstanceFactory.java
Repository: eclipse-ee4j/mojarra
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-14371
|
MEDIUM
| 5
|
eclipse-ee4j/mojarra
|
createComponent
|
impl/src/main/java/com/sun/faces/application/applicationimpl/InstanceFactory.java
|
1b434748d9239f42eae8aa7d37d7a0930c061e24
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean authorized(HttpServletRequest request, HttpServletResponse response, RemoteInvocation invocation) throws IOException {
final String uuid = request.getHeader("X-Agent-GUID"); // should never be null since we passed the auth filter
final MethodSignature current = new MethodSignature(invocation);
LOG.debug(format("Checking authorization for agent [%s] on invocation: %s", uuid, invocation));
if (SKIP_AUTH.contains(current)) {
LOG.debug(format("ALLOWING REQUEST: Agent [%s] does not need authorization for: %s", uuid, invocation));
return true;
}
if (KNOWN_METHODS_NEEDING_UUID_VALIDATION.containsKey(current)) {
final String askingFor = KNOWN_METHODS_NEEDING_UUID_VALIDATION.get(current).apply(invocation.getArguments());
if (!uuid.equals(askingFor)) {
LOG.error(format("DENYING REQUEST: Agent [%s] is attempting a request on behalf of [%s]: %s", uuid, askingFor, invocation));
reject(response, SC_FORBIDDEN, "Not allowing request on behalf of another agent");
return false;
}
} else {
LOG.error(format("DENYING REQUEST: Agent [%s] is requesting an unknown method invocation: %s", uuid, invocation));
reject(response, SC_BAD_REQUEST, format("Unknown invocation: %s", invocation));
return false;
}
LOG.debug(format("ALLOWING REQUEST: Agent [%s] is authorized to invoke: %s", uuid, invocation));
return true;
}
|
Vulnerability Classification:
- CWE: CWE-284
- CVE: CVE-2022-39310
- Severity: MEDIUM
- CVSS Score: 6.5
Description: Refactor & fix tests after RMI interface is simplified to always include `AgentRuntimeInfo`
Function: authorized
File: server/src/main/java/com/thoughtworks/go/remote/AgentRemoteInvokerServiceExporter.java
Repository: gocd
Fixed Code:
private boolean authorized(HttpServletRequest request, HttpServletResponse response, RemoteInvocation invocation) throws IOException {
final String uuid = request.getHeader("X-Agent-GUID"); // should never be null since we passed the auth filter
final MethodSignature current = new MethodSignature(invocation);
LOG.debug(format("Checking authorization for agent [%s] on invocation: %s", uuid, invocation));
if (KNOWN_METHODS_NEEDING_UUID_VALIDATION.contains(current)) {
final String askingFor = AgentUUID.fromRuntimeInfo0(invocation.getArguments());
if (!uuid.equals(askingFor)) {
LOG.error(format("DENYING REQUEST: Agent [%s] is attempting a request on behalf of [%s]: %s", uuid, askingFor, invocation));
reject(response, SC_FORBIDDEN, "Not allowing request on behalf of another agent");
return false;
}
} else {
LOG.error(format("DENYING REQUEST: Agent [%s] is requesting an unknown method invocation: %s", uuid, invocation));
reject(response, SC_BAD_REQUEST, format("Unknown invocation: %s", invocation));
return false;
}
LOG.debug(format("ALLOWING REQUEST: Agent [%s] is authorized to invoke: %s", uuid, invocation));
return true;
}
|
[
"CWE-284"
] |
CVE-2022-39310
|
MEDIUM
| 6.5
|
gocd
|
authorized
|
server/src/main/java/com/thoughtworks/go/remote/AgentRemoteInvokerServiceExporter.java
|
a644a7e5ed75d7b9e46f164fb83445f778077cf9
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public JsonLocation getLocation() {
return tokenizer.getLocation();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLocation
File: impl/src/main/java/org/eclipse/parsson/JsonParserImpl.java
Repository: eclipse-ee4j/parsson
The code follows secure coding practices.
|
[
"CWE-834"
] |
CVE-2023-4043
|
HIGH
| 7.5
|
eclipse-ee4j/parsson
|
getLocation
|
impl/src/main/java/org/eclipse/parsson/JsonParserImpl.java
|
ab239fee273cb262910890f1a6fe666ae92cd623
| 0
|
Analyze the following code function for security vulnerabilities
|
public Secret convert(Class type, Object value) {
return Secret.fromString(value.toString());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: convert
File: core/src/main/java/hudson/util/Secret.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-326"
] |
CVE-2017-2598
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
convert
|
core/src/main/java/hudson/util/Secret.java
|
e6aa166246d1734f4798a9e31f78842f4c85c28b
| 0
|
Analyze the following code function for security vulnerabilities
|
private String buildRemoteName(String accountName, String remotePath) {
return accountName + remotePath;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: buildRemoteName
File: src/main/java/com/owncloud/android/files/services/FileUploader.java
Repository: nextcloud/android
The code follows secure coding practices.
|
[
"CWE-732"
] |
CVE-2022-24886
|
LOW
| 2.1
|
nextcloud/android
|
buildRemoteName
|
src/main/java/com/owncloud/android/files/services/FileUploader.java
|
c01fa0b17050cdcf77a468cc22f4071eae29d464
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void checkCurrentStack(Supplier<String> exceptionMessage) {
INSTANCE.checkForNonWhitelistedStackFrames(exceptionMessage);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkCurrentStack
File: src/main/java/de/tum/in/test/api/security/ArtemisSecurityManager.java
Repository: ls1intum/Ares
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2024-23683
|
HIGH
| 8.2
|
ls1intum/Ares
|
checkCurrentStack
|
src/main/java/de/tum/in/test/api/security/ArtemisSecurityManager.java
|
af4f28a56e2fe600d8750b3b415352a0a3217392
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getLastSelectedNetworkConfigKey() {
if (mLastSelectedNetworkId == WifiConfiguration.INVALID_NETWORK_ID) {
return "";
}
WifiConfiguration config = getInternalConfiguredNetwork(mLastSelectedNetworkId);
if (config == null) {
return "";
}
return config.getProfileKey();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLastSelectedNetworkConfigKey
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
|
getLastSelectedNetworkConfigKey
|
service/java/com/android/server/wifi/WifiConfigManager.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onCancel(DialogInterface dialog) {
Rlog.d(TAG, "dialog dismissed: don't send SMS");
sendMessage(obtainMessage(EVENT_STOP_SENDING, mTracker));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onCancel
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
|
onCancel
|
src/java/com/android/internal/telephony/SMSDispatcher.java
|
df31d37d285dde9911b699837c351aed2320b586
| 0
|
Analyze the following code function for security vulnerabilities
|
private static ProcessStartResult startViaZygote(final String processClass,
final String niceName,
final int uid, final int gid,
final int[] gids,
int debugFlags, int mountExternal,
int targetSdkVersion,
String seInfo,
String abi,
String instructionSet,
String appDataDir,
String[] extraArgs)
throws ZygoteStartFailedEx {
synchronized(Process.class) {
ArrayList<String> argsForZygote = new ArrayList<String>();
// --runtime-args, --setuid=, --setgid=,
// and --setgroups= must go first
argsForZygote.add("--runtime-args");
argsForZygote.add("--setuid=" + uid);
argsForZygote.add("--setgid=" + gid);
if ((debugFlags & Zygote.DEBUG_ENABLE_JNI_LOGGING) != 0) {
argsForZygote.add("--enable-jni-logging");
}
if ((debugFlags & Zygote.DEBUG_ENABLE_SAFEMODE) != 0) {
argsForZygote.add("--enable-safemode");
}
if ((debugFlags & Zygote.DEBUG_ENABLE_DEBUGGER) != 0) {
argsForZygote.add("--enable-debugger");
}
if ((debugFlags & Zygote.DEBUG_ENABLE_CHECKJNI) != 0) {
argsForZygote.add("--enable-checkjni");
}
if ((debugFlags & Zygote.DEBUG_GENERATE_DEBUG_INFO) != 0) {
argsForZygote.add("--generate-debug-info");
}
if ((debugFlags & Zygote.DEBUG_ALWAYS_JIT) != 0) {
argsForZygote.add("--always-jit");
}
if ((debugFlags & Zygote.DEBUG_NATIVE_DEBUGGABLE) != 0) {
argsForZygote.add("--native-debuggable");
}
if ((debugFlags & Zygote.DEBUG_ENABLE_ASSERT) != 0) {
argsForZygote.add("--enable-assert");
}
if (mountExternal == Zygote.MOUNT_EXTERNAL_DEFAULT) {
argsForZygote.add("--mount-external-default");
} else if (mountExternal == Zygote.MOUNT_EXTERNAL_READ) {
argsForZygote.add("--mount-external-read");
} else if (mountExternal == Zygote.MOUNT_EXTERNAL_WRITE) {
argsForZygote.add("--mount-external-write");
}
argsForZygote.add("--target-sdk-version=" + targetSdkVersion);
//TODO optionally enable debuger
//argsForZygote.add("--enable-debugger");
// --setgroups is a comma-separated list
if (gids != null && gids.length > 0) {
StringBuilder sb = new StringBuilder();
sb.append("--setgroups=");
int sz = gids.length;
for (int i = 0; i < sz; i++) {
if (i != 0) {
sb.append(',');
}
sb.append(gids[i]);
}
argsForZygote.add(sb.toString());
}
if (niceName != null) {
argsForZygote.add("--nice-name=" + niceName);
}
if (seInfo != null) {
argsForZygote.add("--seinfo=" + seInfo);
}
if (instructionSet != null) {
argsForZygote.add("--instruction-set=" + instructionSet);
}
if (appDataDir != null) {
argsForZygote.add("--app-data-dir=" + appDataDir);
}
argsForZygote.add(processClass);
if (extraArgs != null) {
for (String arg : extraArgs) {
argsForZygote.add(arg);
}
}
return zygoteSendArgsAndGetResult(openZygoteSocketIfNeeded(abi), argsForZygote);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startViaZygote
File: core/java/android/os/Process.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3911
|
HIGH
| 9.3
|
android
|
startViaZygote
|
core/java/android/os/Process.java
|
2c7008421cb67f5d89f16911bdbe36f6c35311ad
| 0
|
Analyze the following code function for security vulnerabilities
|
private static native void nativeApplyStyle(long ptr, long themePtr, @AttrRes int defStyleAttr,
@StyleRes int defStyleRes, long xmlParserPtr, @NonNull int[] inAttrs,
long outValuesAddress, long outIndicesAddress);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nativeApplyStyle
File: core/java/android/content/res/AssetManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-415"
] |
CVE-2023-40103
|
HIGH
| 7.8
|
android
|
nativeApplyStyle
|
core/java/android/content/res/AssetManager.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
public int backupOnePackage(PackageInfo pkg) throws RemoteException {
int result = BackupTransport.TRANSPORT_OK;
Slog.d(TAG, "Binding to full backup agent : " + pkg.packageName);
IBackupAgent agent = bindToAgentSynchronous(pkg.applicationInfo,
IApplicationThread.BACKUP_MODE_FULL);
if (agent != null) {
ParcelFileDescriptor[] pipes = null;
try {
// Call the preflight hook, if any
if (mPreflightHook != null) {
result = mPreflightHook.preflightFullBackup(pkg, agent);
if (MORE_DEBUG) {
Slog.v(TAG, "preflight returned " + result);
}
}
// If we're still good to go after preflighting, start moving data
if (result == BackupTransport.TRANSPORT_OK) {
pipes = ParcelFileDescriptor.createPipe();
ApplicationInfo app = pkg.applicationInfo;
final boolean isSharedStorage = pkg.packageName.equals(SHARED_BACKUP_AGENT_PACKAGE);
final boolean sendApk = mIncludeApks
&& !isSharedStorage
&& ((app.privateFlags & ApplicationInfo.PRIVATE_FLAG_FORWARD_LOCK) == 0)
&& ((app.flags & ApplicationInfo.FLAG_SYSTEM) == 0 ||
(app.flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0);
byte[] widgetBlob = AppWidgetBackupBridge.getWidgetState(pkg.packageName,
UserHandle.USER_OWNER);
final int token = generateToken();
FullBackupRunner runner = new FullBackupRunner(pkg, agent, pipes[1],
token, sendApk, !isSharedStorage, widgetBlob);
pipes[1].close(); // the runner has dup'd it
pipes[1] = null;
Thread t = new Thread(runner, "app-data-runner");
t.start();
// Now pull data from the app and stuff it into the output
try {
routeSocketDataToOutput(pipes[0], mOutput);
} catch (IOException e) {
Slog.i(TAG, "Caught exception reading from agent", e);
result = BackupTransport.AGENT_ERROR;
}
if (!waitUntilOperationComplete(token)) {
Slog.e(TAG, "Full backup failed on package " + pkg.packageName);
result = BackupTransport.AGENT_ERROR;
} else {
if (MORE_DEBUG) {
Slog.d(TAG, "Full package backup success: " + pkg.packageName);
}
}
}
} catch (IOException e) {
Slog.e(TAG, "Error backing up " + pkg.packageName, e);
result = BackupTransport.AGENT_ERROR;
} finally {
try {
// flush after every package
mOutput.flush();
if (pipes != null) {
if (pipes[0] != null) pipes[0].close();
if (pipes[1] != null) pipes[1].close();
}
} catch (IOException e) {
Slog.w(TAG, "Error bringing down backup stack");
result = BackupTransport.TRANSPORT_ERROR;
}
}
} else {
Slog.w(TAG, "Unable to bind to full agent for " + pkg.packageName);
result = BackupTransport.AGENT_ERROR;
}
tearDown(pkg);
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: backupOnePackage
File: services/backup/java/com/android/server/backup/BackupManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3759
|
MEDIUM
| 5
|
android
|
backupOnePackage
|
services/backup/java/com/android/server/backup/BackupManagerService.java
|
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
| 0
|
Analyze the following code function for security vulnerabilities
|
public UiStatus getStatus() {
return mStatus;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStatus
File: services/credentials/java/com/android/server/credentials/CredentialManagerUi.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40076
|
MEDIUM
| 5.5
|
android
|
getStatus
|
services/credentials/java/com/android/server/credentials/CredentialManagerUi.java
|
9b68987df85b681f9362a3cadca6496796d23bbc
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String arrayAsString(final String[] arg, String separator) {
StringBuffer result = new StringBuffer();
for (int i = 0; i < arg.length; i++) {
result.append(arg[i]);
if ((i + 1) < arg.length) {
result.append(separator);
}
}
return result.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: arrayAsString
File: src/org/opencms/util/CmsStringUtil.java
Repository: alkacon/opencms-core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2013-4600
|
MEDIUM
| 4.3
|
alkacon/opencms-core
|
arrayAsString
|
src/org/opencms/util/CmsStringUtil.java
|
72a05e3ea1cf692e2efce002687272e63f98c14a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void resizeStack(int stackId, Rect bounds) throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resizeStack
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
resizeStack
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void showInCallScreen(boolean showDialpad, String callingPackage) {
if (!canReadPhoneState(callingPackage, "showInCallScreen")) {
return;
}
synchronized (mLock) {
long token = Binder.clearCallingIdentity();
try {
mCallsManager.getInCallController().bringToForeground(showDialpad);
} finally {
Binder.restoreCallingIdentity(token);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: showInCallScreen
File: src/com/android/server/telecom/TelecomServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-0847
|
HIGH
| 7.2
|
android
|
showInCallScreen
|
src/com/android/server/telecom/TelecomServiceImpl.java
|
2750faaa1ec819eed9acffea7bd3daf867fda444
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void channelDisconnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception {
// Make sure the handshake future is notified when a connection has
// been closed during handshake.
synchronized (handshakeLock) {
if (handshaking) {
cancelHandshakeTimeout();
handshakeFuture.setFailure(new ClosedChannelException());
}
}
try {
super.channelDisconnected(ctx, e);
} finally {
unwrapNonAppData(ctx, e.getChannel());
closeEngine();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: channelDisconnected
File: src/main/java/org/jboss/netty/handler/ssl/SslHandler.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2014-3488
|
MEDIUM
| 5
|
netty
|
channelDisconnected
|
src/main/java/org/jboss/netty/handler/ssl/SslHandler.java
|
2fa9400a59d0563a66908aba55c41e7285a04994
| 0
|
Analyze the following code function for security vulnerabilities
|
private static boolean bitmaskHasTech(int bearerBitmask, int radioTech) {
if (bearerBitmask == 0) {
return true;
} else if (radioTech >= 1) {
return ((bearerBitmask & (1 << (radioTech - 1))) != 0);
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: bitmaskHasTech
File: src/com/android/settings/network/apn/ApnEditor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40125
|
HIGH
| 7.8
|
android
|
bitmaskHasTech
|
src/com/android/settings/network/apn/ApnEditor.java
|
63d464c3fa5c7b9900448fef3844790756e557eb
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setChildrenInvisible(TOCElement element)
throws PresentationException, IndexUnreachableException, DAOException, ViewerConfigurationException {
if (getToc() != null) {
synchronized (getToc()) {
getToc().setChildInvisible(element.getID());
getToc().getActiveElement();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setChildrenInvisible
File: goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java
Repository: intranda/goobi-viewer-core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-29014
|
MEDIUM
| 6.1
|
intranda/goobi-viewer-core
|
setChildrenInvisible
|
goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java
|
c29efe60e745a94d03debc17681c4950f3917455
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean addClientSessionToAuthenticatedClientSessionsIfPresent(PersistentUserSessionAdapter userSession, PersistentClientSessionEntity clientSessionEntity) {
PersistentAuthenticatedClientSessionAdapter clientSessAdapter = toAdapter(userSession.getRealm(), userSession, clientSessionEntity);
if (clientSessAdapter.getClient() == null) {
return false;
}
String clientId = clientSessionEntity.getClientId();
if (isExternalClient(clientSessionEntity)) {
clientId = getExternalClientId(clientSessionEntity);
}
userSession.getAuthenticatedClientSessions().put(clientId, clientSessAdapter);
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addClientSessionToAuthenticatedClientSessionsIfPresent
File: model/jpa/src/main/java/org/keycloak/models/jpa/session/JpaUserSessionPersisterProvider.java
Repository: keycloak
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2023-6563
|
HIGH
| 7.7
|
keycloak
|
addClientSessionToAuthenticatedClientSessionsIfPresent
|
model/jpa/src/main/java/org/keycloak/models/jpa/session/JpaUserSessionPersisterProvider.java
|
11eb952e1df7cbb95b1e2c101dfd4839a2375695
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean appOpIsChangedFromDefault(String op, String packageName) {
try {
final int uid = mContext.getPackageManager().getPackageUid(
packageName, /* flags= */ 0);
return mInjector.getAppOpsManager().unsafeCheckOpNoThrow(
op, uid, packageName)
!= AppOpsManager.MODE_DEFAULT;
} catch (NameNotFoundException e) {
return false;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: appOpIsChangedFromDefault
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
|
appOpIsChangedFromDefault
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
private static native boolean nativeRetrieveAttributes(long ptr, long xmlParserPtr,
@NonNull int[] inAttrs, @NonNull int[] outValues, @NonNull int[] outIndices);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nativeRetrieveAttributes
File: core/java/android/content/res/AssetManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-415"
] |
CVE-2023-40103
|
HIGH
| 7.8
|
android
|
nativeRetrieveAttributes
|
core/java/android/content/res/AssetManager.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
public static List<Descriptor<ComputerLauncher>> getComputerLauncherDescriptors() {
return Jenkins.getInstance().<ComputerLauncher,Descriptor<ComputerLauncher>>getDescriptorList(ComputerLauncher.class);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getComputerLauncherDescriptors
File: core/src/main/java/hudson/Functions.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-310"
] |
CVE-2014-2061
|
MEDIUM
| 5
|
jenkinsci/jenkins
|
getComputerLauncherDescriptors
|
core/src/main/java/hudson/Functions.java
|
bf539198564a1108b7b71a973bf7de963a6213ef
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequiresPermissions("topic:delete_all_index")
@GetMapping("/delete_all_index")
@ResponseBody
public Result delete_all_index() {
indexedService.batchDeleteIndex();
return success();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: delete_all_index
File: src/main/java/co/yiiu/pybbs/controller/admin/TopicAdminController.java
Repository: atjiu/pybbs
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-23391
|
MEDIUM
| 4.3
|
atjiu/pybbs
|
delete_all_index
|
src/main/java/co/yiiu/pybbs/controller/admin/TopicAdminController.java
|
7d83b97d19f5fed9f29f72e654ef3c2818021b4d
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient addDefaultHeader(String key, String value) {
defaultHeaderMap.put(key, value);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addDefaultHeader
File: samples/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
|
addDefaultHeader
|
samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void markTimedOut() {
mTimedOut = true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: markTimedOut
File: services/backup/java/com/android/server/backup/BackupManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3759
|
MEDIUM
| 5
|
android
|
markTimedOut
|
services/backup/java/com/android/server/backup/BackupManagerService.java
|
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
| 0
|
Analyze the following code function for security vulnerabilities
|
public void dropPermissions()
{
// Set the droppedPermissions key to the context so if the context is cloned and
// pushed, it will return false until it is popped again.
final ExecutionContext context = Utils.getComponent(Execution.class).getContext();
context.setProperty(XWikiConstant.DROPPED_PERMISSIONS, System.identityHashCode(context));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dropPermissions
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
|
dropPermissions
|
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
|
@Override
public boolean isRetry(Exception exception) {
if (exception instanceof FileDownloadHttpException) {
final FileDownloadHttpException httpException = (FileDownloadHttpException) exception;
final int code = httpException.getCode();
if (isSingleConnection && code == HTTP_REQUESTED_RANGE_NOT_SATISFIABLE) {
if (!isTriedFixRangeNotSatisfiable) {
FileDownloadUtils
.deleteTaskFiles(model.getTargetFilePath(), model.getTempFilePath());
isTriedFixRangeNotSatisfiable = true;
return true;
}
}
}
return validRetryTimes > 0 && !(exception instanceof FileDownloadGiveUpRetryException);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isRetry
File: library/src/main/java/com/liulishuo/filedownloader/download/DownloadLaunchRunnable.java
Repository: lingochamp/FileDownloader
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-11248
|
HIGH
| 7.5
|
lingochamp/FileDownloader
|
isRetry
|
library/src/main/java/com/liulishuo/filedownloader/download/DownloadLaunchRunnable.java
|
b023cc081bbecdd2a9f3549a3ae5c12a9647ed7f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public InputStream export(FF4jConfiguration ff4jConfig) {
Util.assertNotNull(ff4jConfig);
StringBuilder output = new StringBuilder();
addProperty(output, FF4J_TAG + "." + GLOBAL_AUDIT_TAG, ff4jConfig.isAudit());
addProperty(output, FF4J_TAG + "." + GLOBAL_AUTOCREATE, ff4jConfig.isAutoCreate());
// Features
if (null != ff4jConfig.getFeatures()) {
int idxFeature = 0;
for (Feature f : ff4jConfig.getFeatures().values()) {
// ff4j.features.x.
String prefixKey = FF4J_TAG + "." + FEATURES_TAG + "." + idxFeature + ".";
addProperty(output, prefixKey + FEATURE_ATT_UID, f.getUid());
addProperty(output, prefixKey + FEATURE_ATT_ENABLE, f.isEnable());
if (null != f.getDescription()) {
addProperty(output, prefixKey + FEATURE_ATT_DESC, f.getDescription());
}
if (null != f.getGroup()) {
addProperty(output, prefixKey + FEATURE_ATT_GROUP, f.getGroup());
}
if (!f.getPermissions().isEmpty()) {
addProperty(output, prefixKey + FEATURE_ATT_PERMISSIONS, String.join(",", f.getPermissions()));
}
if (null != f.getFlippingStrategy()) {
String flipKey = prefixKey + TOGGLE_STRATEGY_TAG + ".";
addProperty(output, flipKey + TOGGLE_STRATEGY_ATTCLASS,
String.join(",", f.getFlippingStrategy().getClass().getName()));
int idxParam = 0;
for (Map.Entry<String, String> entry : f.getFlippingStrategy().getInitParams().entrySet()) {
addProperty(output, flipKey + TOGGLE_STRATEGY_PARAMTAG + "." + idxParam + "." + TOGGLE_STRATEGY_PARAMNAME, entry.getKey());
addProperty(output, flipKey + TOGGLE_STRATEGY_PARAMTAG + "." + idxParam + "." + TOGGLE_STRATEGY_PARAMVALUE, entry.getValue());
idxParam++;
}
}
if (!f.getCustomProperties().isEmpty()) {
int idxProps = 0;
for (Property<?> p : f.getCustomProperties().values()) {
String propKey = prefixKey + FEATURE_ATT_PROPERTIES + "." + idxProps + ".";
exportProperty(output, propKey, p);
idxProps++;
}
}
idxFeature++;
}
}
// Properties
if (null != ff4jConfig.getProperties() && !ff4jConfig.getProperties().isEmpty()) {
int idxProps = 0;
for (Property<?> p : ff4jConfig.getProperties().values()) {
String propKey = FF4J_TAG + "." + PROPERTIES_TAG + "." + idxProps + ".";
exportProperty(output, propKey, p);
idxProps++;
}
}
System.out.println(output.toString());
return new ByteArrayInputStream(output.toString().getBytes(StandardCharsets.UTF_8));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: export
File: ff4j-config-properties/src/main/java/org/ff4j/parser/properties/PropertiesParser.java
Repository: ff4j
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2022-44262
|
CRITICAL
| 9.8
|
ff4j
|
export
|
ff4j-config-properties/src/main/java/org/ff4j/parser/properties/PropertiesParser.java
|
991df72725f78adbc413d9b0fbb676201f1882e0
| 0
|
Analyze the following code function for security vulnerabilities
|
private void updateClearAll() {
boolean showDismissView =
mState != StatusBarState.KEYGUARD &&
hasActiveClearableNotifications();
mStackScroller.updateDismissView(showDismissView);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateClearAll
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
|
updateClearAll
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void doBuildWithParameters(StaplerRequest req, StaplerResponse rsp, @QueryParameter TimeDuration delay) throws IOException, ServletException {
BuildAuthorizationToken.checkPermission(this, authToken, req, rsp);
ParametersDefinitionProperty pp = getProperty(ParametersDefinitionProperty.class);
if (pp != null) {
pp.buildWithParameters(req,rsp,delay);
} else {
throw new IllegalStateException("This build is not parameterized!");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doBuildWithParameters
File: core/src/main/java/hudson/model/AbstractProject.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
doBuildWithParameters
|
core/src/main/java/hudson/model/AbstractProject.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
private static native long getConstructorId(Class<?> c);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getConstructorId
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
|
getConstructorId
|
luni/src/main/java/java/io/ObjectStreamClass.java
|
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setDocumentArchive(String sarch) throws XWikiException
{
XWikiDocumentArchive xda = new XWikiDocumentArchive(getDocumentReference().getWikiReference(), getId());
xda.setArchive(sarch);
setDocumentArchive(xda);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDocumentArchive
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
|
setDocumentArchive
|
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
|
protected void writeToHttpSession(WrappedSession wrappedSession,
VaadinSession session) {
wrappedSession.setAttribute(getSessionAttributeName(), session);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeToHttpSession
File: server/src/main/java/com/vaadin/server/VaadinService.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-203"
] |
CVE-2021-31403
|
LOW
| 1.9
|
vaadin/framework
|
writeToHttpSession
|
server/src/main/java/com/vaadin/server/VaadinService.java
|
d852126ab6f0c43f937239305bd0e9594834fe34
| 0
|
Analyze the following code function for security vulnerabilities
|
public void markAsEnded(String meetingId) {
String done = recordStatusDir + "/../ended/" + meetingId + ".done";
File doneFile = new File(done);
if (!doneFile.exists()) {
try {
doneFile.createNewFile();
if (!doneFile.exists())
log.error("Failed to create " + done + " file.");
} catch (IOException e) {
log.error("Exception occured when trying to create {} file.", done);
}
} else {
log.error(done + " file already exists.");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: markAsEnded
File: bbb-common-web/src/main/java/org/bigbluebutton/api/RecordingService.java
Repository: bigbluebutton
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-12443
|
HIGH
| 7.5
|
bigbluebutton
|
markAsEnded
|
bbb-common-web/src/main/java/org/bigbluebutton/api/RecordingService.java
|
b21ca8355a57286a1e6df96984b3a4c57679a463
| 0
|
Analyze the following code function for security vulnerabilities
|
public void doQuit() {
quitNow();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doQuit
File: src/com/android/bluetooth/btservice/AdapterState.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-362",
"CWE-20"
] |
CVE-2016-3760
|
MEDIUM
| 5.4
|
android
|
doQuit
|
src/com/android/bluetooth/btservice/AdapterState.java
|
122feb9a0b04290f55183ff2f0384c6c53756bd8
| 0
|
Analyze the following code function for security vulnerabilities
|
public void sendMessage(byte[] msg) throws IOException
{
if (Thread.currentThread() == receiveThread)
throw new IOException("Assertion error: sendMessage may never be invoked by the receiver thread!");
synchronized (connectionSemaphore)
{
while (true)
{
if (connectionClosed)
{
throw new IOException("Sorry, this connection is closed.", reasonClosedCause);
}
if (!flagKexOngoing)
break;
try
{
connectionSemaphore.wait();
}
catch (InterruptedException e)
{
}
}
try
{
tc.sendMessage(msg);
}
catch (IOException e)
{
close(e, false);
throw e;
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendMessage
File: src/main/java/com/trilead/ssh2/transport/TransportManager.java
Repository: connectbot/sshlib
The code follows secure coding practices.
|
[
"CWE-354"
] |
CVE-2023-48795
|
MEDIUM
| 5.9
|
connectbot/sshlib
|
sendMessage
|
src/main/java/com/trilead/ssh2/transport/TransportManager.java
|
5c8b534f6e97db7ac0e0e579331213aa25c173ab
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean setIntValueAndCheckIfDiff(
ContentValues cv, String key, int value, boolean assumeDiff, int index) {
final Integer valueFromLocalCache = mApnData.getInteger(index);
if (VDBG) {
Log.d(TAG, "setIntValueAndCheckIfDiff: assumeDiff: " + assumeDiff
+ " key: " + key
+ " value: '" + value
+ "' valueFromDb: '" + valueFromLocalCache + "'");
}
final boolean isDiff = assumeDiff || value != valueFromLocalCache;
if (isDiff) {
cv.put(key, value);
}
return isDiff;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setIntValueAndCheckIfDiff
File: src/com/android/settings/network/apn/ApnEditor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40125
|
HIGH
| 7.8
|
android
|
setIntValueAndCheckIfDiff
|
src/com/android/settings/network/apn/ApnEditor.java
|
63d464c3fa5c7b9900448fef3844790756e557eb
| 0
|
Analyze the following code function for security vulnerabilities
|
public void do_testDeadlockOnOutgoingCall() throws Exception {
final IdPair ids = startOutgoingPhoneCall("650-555-1212",
mPhoneAccountA0.getAccountHandle(), mConnectionServiceFixtureA,
Process.myUserHandle());
rapidFire(
new Runnable() {
@Override
public void run() {
while (mCallerInfoAsyncQueryFactoryFixture.mRequests.size() > 0) {
mCallerInfoAsyncQueryFactoryFixture.mRequests.remove(0).reply();
}
}
},
new Runnable() {
@Override
public void run() {
try {
mConnectionServiceFixtureA.sendSetActive(ids.mConnectionId);
} catch (Exception e) {
Log.e(this, e, "");
}
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: do_testDeadlockOnOutgoingCall
File: tests/src/com/android/server/telecom/tests/BasicCallTests.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
do_testDeadlockOnOutgoingCall
|
tests/src/com/android/server/telecom/tests/BasicCallTests.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
public void loadMainPkg() throws AndrolibException {
mResTable.loadMainPkg(mApkInfo.getApkFile());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: loadMainPkg
File: brut.apktool/apktool-lib/src/main/java/brut/androlib/res/ResourcesDecoder.java
Repository: iBotPeaches/Apktool
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2024-21633
|
HIGH
| 7.8
|
iBotPeaches/Apktool
|
loadMainPkg
|
brut.apktool/apktool-lib/src/main/java/brut/androlib/res/ResourcesDecoder.java
|
d348c43b24a9de350ff6e5bd610545a10c1fc712
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isAccountVisibleToCaller(String accountType, int callingUid, int userId,
String opPackageName) {
if (accountType == null) {
return false;
} else {
return getTypesVisibleToCaller(callingUid, userId,
opPackageName).contains(accountType);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isAccountVisibleToCaller
File: services/core/java/com/android/server/accounts/AccountManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-502"
] |
CVE-2023-45777
|
HIGH
| 7.8
|
android
|
isAccountVisibleToCaller
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void wipeDataWithReason(int flags, String wipeReasonForUser,
boolean calledOnParentInstance) {
if (!mHasFeature && !hasCallingOrSelfPermission(permission.MASTER_CLEAR)) {
return;
}
final CallerIdentity caller = getCallerIdentity();
boolean calledByProfileOwnerOnOrgOwnedDevice =
isProfileOwnerOfOrganizationOwnedDevice(caller.getUserId());
if (calledOnParentInstance) {
Preconditions.checkCallAuthorization(calledByProfileOwnerOnOrgOwnedDevice,
"Wiping the entire device can only be done by a profile owner on "
+ "organization-owned device.");
}
if ((flags & WIPE_RESET_PROTECTION_DATA) != 0) {
Preconditions.checkCallAuthorization(isDefaultDeviceOwner(caller)
|| calledByProfileOwnerOnOrgOwnedDevice
|| isFinancedDeviceOwner(caller),
"Only device owners or profile owners of organization-owned device can set "
+ "WIPE_RESET_PROTECTION_DATA");
}
final ActiveAdmin admin;
synchronized (getLockObject()) {
admin = getActiveAdminWithPolicyForUidLocked(/* who= */ null,
DeviceAdminInfo.USES_POLICY_WIPE_DATA, caller.getUid());
}
Preconditions.checkCallAuthorization(
(admin != null) || hasCallingOrSelfPermission(permission.MASTER_CLEAR),
"No active admin for user %d and caller %d does not hold MASTER_CLEAR permission",
caller.getUserId(), caller.getUid());
checkCanExecuteOrThrowUnsafe(DevicePolicyManager.OPERATION_WIPE_DATA);
if (TextUtils.isEmpty(wipeReasonForUser)) {
wipeReasonForUser = getGenericWipeReason(
calledByProfileOwnerOnOrgOwnedDevice, calledOnParentInstance);
}
int userId = admin != null ? admin.getUserHandle().getIdentifier()
: caller.getUserId();
Slogf.i(LOG_TAG, "wipeDataWithReason(%s): admin=%s, user=%d", wipeReasonForUser, admin,
userId);
if (calledByProfileOwnerOnOrgOwnedDevice) {
// When wipeData is called on the parent instance, it implies wiping the entire device.
if (calledOnParentInstance) {
userId = UserHandle.USER_SYSTEM;
} else {
// when wipeData is _not_ called on the parent instance, it implies relinquishing
// control over the device, wiping only the work profile. So the user restriction
// on profile removal needs to be removed first.
final UserHandle parentUser = UserHandle.of(getProfileParentId(userId));
mInjector.binderWithCleanCallingIdentity(
() -> clearOrgOwnedProfileOwnerUserRestrictions(parentUser));
}
}
DevicePolicyEventLogger event = DevicePolicyEventLogger
.createEvent(DevicePolicyEnums.WIPE_DATA_WITH_REASON)
.setInt(flags)
.setStrings(calledOnParentInstance ? CALLED_FROM_PARENT : NOT_CALLED_FROM_PARENT);
final String adminName;
final ComponentName adminComp;
if (admin != null) {
adminComp = admin.info.getComponent();
adminName = adminComp.flattenToShortString();
event.setAdmin(adminComp);
} else {
adminComp = null;
adminName = mInjector.getPackageManager().getPackagesForUid(caller.getUid())[0];
Slogf.i(LOG_TAG, "Logging wipeData() event admin as " + adminName);
event.setAdmin(adminName);
if (mInjector.userManagerIsHeadlessSystemUserMode()) {
// On headless system user mode, the call is meant to factory reset the whole
// device, otherwise the caller could simply remove the current user.
userId = UserHandle.USER_SYSTEM;
}
}
event.write();
String internalReason = String.format(
"DevicePolicyManager.wipeDataWithReason() from %s, organization-owned? %s",
adminName, calledByProfileOwnerOnOrgOwnedDevice);
wipeDataNoLock(adminComp, flags, internalReason, wipeReasonForUser, userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: wipeDataWithReason
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
|
wipeDataWithReason
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean validateForR2() {
// Required: PerProviderSubscription/UpdateIdentifier
if (mUpdateIdentifier == Integer.MIN_VALUE) {
return false;
}
// Required: PerProviderSubscription/<X+>/SubscriptionUpdate
if (mSubscriptionUpdate == null || !mSubscriptionUpdate.validate()) {
return false;
}
return validateForCommonR1andR2();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: validateForR2
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
|
validateForR2
|
framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java
|
5b49b8711efaadadf5052ba85288860c2d7ca7a6
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String jsFunction_getAPIPublisherURL(Context cx, Scriptable thisObj,
Object[] args, Function funObj) {
APIManagerConfiguration config = HostObjectComponent.getAPIManagerConfiguration();
if (config != null) {
return config.getFirstProperty(APIConstants.API_PUBLISHER_URL);
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: jsFunction_getAPIPublisherURL
File: components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
Repository: wso2/carbon-apimgt
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2018-20736
|
LOW
| 3.5
|
wso2/carbon-apimgt
|
jsFunction_getAPIPublisherURL
|
components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
|
490f2860822f89d745b7c04fa9570bd86bef4236
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getLastProcessedClientToServerId() {
return lastProcessedClientToServerId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLastProcessedClientToServerId
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
|
getLastProcessedClientToServerId
|
flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
|
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public ErrorHandler getErrorHandler() {
return saxErrorHandler;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getErrorHandler
File: core/src/java/org/jdom2/input/SAXBuilder.java
Repository: hunterhacker/jdom
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-33813
|
MEDIUM
| 5
|
hunterhacker/jdom
|
getErrorHandler
|
core/src/java/org/jdom2/input/SAXBuilder.java
|
bd3ab78370098491911d7fe9d7a43b97144a234e
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String buildToStringRows(final Collection< ? > col)
{
if (col == null) {
return "[]";
}
final JsonBuilder builder = new JsonBuilder();
return builder.append(col).getAsString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: buildToStringRows
File: src/main/java/org/projectforge/web/core/JsonBuilder.java
Repository: micromata/projectforge-webapp
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2013-7250
|
LOW
| 3.5
|
micromata/projectforge-webapp
|
buildToStringRows
|
src/main/java/org/projectforge/web/core/JsonBuilder.java
|
5a6a25366491443b76e528a04a9e4ba26f08a83c
| 0
|
Analyze the following code function for security vulnerabilities
|
public abstract String resolveResource(String url);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resolveResource
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
|
resolveResource
|
flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
|
621ef1b322737d963bee624b2d2e38cd739903d9
| 0
|
Analyze the following code function for security vulnerabilities
|
public void set(Object propertyId) {
this.propertyId = propertyId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: set
File: server/src/main/java/com/vaadin/ui/Grid.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-25028
|
MEDIUM
| 4.3
|
vaadin/framework
|
set
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setupRoutes() {
path(controllerBasePath(), () -> {
before("", mimeType, this::setContentType);
// change the line below to enable appropriate security
before("", mimeType, this.apiAuthenticationHelper::checkAdminUserAnd403);
get("", mimeType, this::show);
post("", mimeType, this::createOrUpdate);
put("", mimeType, this::createOrUpdate);
delete("", mimeType, this::deleteBackupConfig);
});
}
|
Vulnerability Classification:
- CWE: CWE-352
- CVE: CVE-2021-25924
- Severity: HIGH
- CVSS Score: 9.3
Description: #000 - Add missing Content-Type check
Function: setupRoutes
File: api/api-backup-config-v1/src/main/java/com/thoughtworks/go/apiv1/backupconfig/BackupConfigControllerV1.java
Repository: gocd
Fixed Code:
@Override
public void setupRoutes() {
path(controllerBasePath(), () -> {
before("", mimeType, this::setContentType);
before("/*", mimeType, this::setContentType);
before("", mimeType, this::verifyContentType);
before("/*", mimeType, this::verifyContentType);
// change the line below to enable appropriate security
before("", mimeType, this.apiAuthenticationHelper::checkAdminUserAnd403);
get("", mimeType, this::show);
post("", mimeType, this::createOrUpdate);
put("", mimeType, this::createOrUpdate);
delete("", mimeType, this::deleteBackupConfig);
});
}
|
[
"CWE-352"
] |
CVE-2021-25924
|
HIGH
| 9.3
|
gocd
|
setupRoutes
|
api/api-backup-config-v1/src/main/java/com/thoughtworks/go/apiv1/backupconfig/BackupConfigControllerV1.java
|
7d0baab0d361c377af84994f95ba76c280048548
| 1
|
Analyze the following code function for security vulnerabilities
|
public Provider getProvider() {
return provider;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProvider
File: api/src/main/java/org/openmrs/module/appointmentscheduling/AppointmentRequest.java
Repository: openmrs/openmrs-module-appointmentscheduling
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-4727
|
MEDIUM
| 6.1
|
openmrs/openmrs-module-appointmentscheduling
|
getProvider
|
api/src/main/java/org/openmrs/module/appointmentscheduling/AppointmentRequest.java
|
2ccbe39c020809765de41eeb8ee4c70b5ec49cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("rawtypes")
private CRFDAO cdao() {
return new CRFDAO(dataSource);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cdao
File: web/src/main/java/org/akaza/openclinica/controller/BatchCRFMigrationController.java
Repository: OpenClinica
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-24830
|
HIGH
| 7.5
|
OpenClinica
|
cdao
|
web/src/main/java/org/akaza/openclinica/controller/BatchCRFMigrationController.java
|
6f864e86543f903bd20d6f9fc7056115106441f3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Collection<Class<? extends IFloodlightService>>
getModuleDependencies() {
Collection<Class<? extends IFloodlightService>> l =
new ArrayList<Class<? extends IFloodlightService>>();
l.add(IFloodlightProviderService.class);
l.add(IRestApiService.class);
l.add(IOFSwitchService.class);
l.add(IDeviceService.class);
l.add(IDebugCounterService.class);
l.add(ITopologyService.class);
l.add(IRoutingService.class);
l.add(IStaticFlowEntryPusherService.class);
return l;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getModuleDependencies
File: src/main/java/net/floodlightcontroller/loadbalancer/LoadBalancer.java
Repository: floodlight
The code follows secure coding practices.
|
[
"CWE-362",
"CWE-476"
] |
CVE-2015-6569
|
MEDIUM
| 4.3
|
floodlight
|
getModuleDependencies
|
src/main/java/net/floodlightcontroller/loadbalancer/LoadBalancer.java
|
7f5bedb625eec3ff4d29987c31cef2553a962b36
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setMetadata(MediaMetadata metadata, long duration, String metadataDescription)
throws RemoteException {
synchronized (mLock) {
MediaMetadata temp = metadata == null ? null : new MediaMetadata.Builder(metadata)
.build();
// This is to guarantee that the underlying bundle is unparceled
// before we set it to prevent concurrent reads from throwing an
// exception
if (temp != null) {
temp.size();
}
mMetadata = temp;
mDuration = duration;
mMetadataDescription = metadataDescription;
}
mHandler.post(MessageHandler.MSG_UPDATE_METADATA);
}
|
Vulnerability Classification:
- CWE: CWE-Other
- CVE: CVE-2023-21285
- Severity: MEDIUM
- CVSS Score: 5.5
Description: DO NOT MERGE
Verify URI permissions in MediaMetadata
Add a check for URI permission to make sure that user can access the URI
set in MediaMetadata. If permission is denied, clear the URI string set
in metadata.
Bug: 271851153
Test: atest MediaSessionTest
Test: Verified by POC app attached in bug, image of second user is not
the UMO background of the first user.
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:277e7e05866a3da3c5871c071231b2b7c911d81e)
Merged-In: I932d5d5143998db89d7132ced84faffa4a0bd5aa
Change-Id: I932d5d5143998db89d7132ced84faffa4a0bd5aa
Function: setMetadata
File: services/core/java/com/android/server/media/MediaSessionRecord.java
Repository: android
Fixed Code:
@Override
public void setMetadata(MediaMetadata metadata, long duration, String metadataDescription)
throws RemoteException {
synchronized (mLock) {
mDuration = duration;
mMetadataDescription = metadataDescription;
mMetadata = sanitizeMediaMetadata(metadata);
}
mHandler.post(MessageHandler.MSG_UPDATE_METADATA);
}
|
[
"CWE-Other"
] |
CVE-2023-21285
|
MEDIUM
| 5.5
|
android
|
setMetadata
|
services/core/java/com/android/server/media/MediaSessionRecord.java
|
0c3b7ec3377e7fb645ec366be3be96bb1a252ca1
| 1
|
Analyze the following code function for security vulnerabilities
|
public static String findEtag(final int id, FileDownloadConnection connection) {
if (connection == null) {
throw new RuntimeException("connection is null when findEtag");
}
final String newEtag = connection.getResponseHeaderField("Etag");
if (FileDownloadLog.NEED_LOG) {
FileDownloadLog.d(FileDownloadUtils.class, "etag find %s for task(%d)", newEtag, id);
}
return newEtag;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findEtag
File: library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java
Repository: lingochamp/FileDownloader
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-11248
|
HIGH
| 7.5
|
lingochamp/FileDownloader
|
findEtag
|
library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java
|
b023cc081bbecdd2a9f3549a3ae5c12a9647ed7f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean getMasterSyncAutomatically() {
return getMasterSyncAutomaticallyAsUser(UserHandle.getCallingUserId());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMasterSyncAutomatically
File: services/core/java/com/android/server/content/ContentService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2426
|
MEDIUM
| 4.3
|
android
|
getMasterSyncAutomatically
|
services/core/java/com/android/server/content/ContentService.java
|
63363af721650e426db5b0bdfb8b2d4fe36abdb0
| 0
|
Analyze the following code function for security vulnerabilities
|
private Integer getNum(StringBuilder sql, List<Object> condition) throws IOException {
try (Connection connection = h2Client.getConnection()) {
try (ResultSet resultSet = h2Client.executeQuery(
connection, sql.toString(), condition.toArray(new Object[0]))) {
if (resultSet.next()) {
return resultSet.getInt("num");
}
}
} catch (SQLException e) {
throw new IOException(e);
}
return 0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNum
File: oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/h2/dao/H2MetadataQueryDAO.java
Repository: apache/skywalking
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2020-13921
|
HIGH
| 7.5
|
apache/skywalking
|
getNum
|
oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/h2/dao/H2MetadataQueryDAO.java
|
ddb6d9a5019a9c1fe31c364485a4e4b5066fefc3
| 0
|
Analyze the following code function for security vulnerabilities
|
private void assertKeyNotEmpty(Map<String, String> mapConfigProperties , String keyName) {
String strValue = mapConfigProperties.get(keyName);
if (null == strValue || "".equals(strValue)) {
throw new IllegalArgumentException("Key [" + keyName + "] is required and value cannot be empty");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: assertKeyNotEmpty
File: ff4j-config-properties/src/main/java/org/ff4j/parser/properties/PropertiesParser.java
Repository: ff4j
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2022-44262
|
CRITICAL
| 9.8
|
ff4j
|
assertKeyNotEmpty
|
ff4j-config-properties/src/main/java/org/ff4j/parser/properties/PropertiesParser.java
|
991df72725f78adbc413d9b0fbb676201f1882e0
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public ServerBuilder annotatedService(Object service,
Function<? super HttpService, ? extends HttpService> decorator,
Object... exceptionHandlersAndConverters) {
virtualHostTemplate.annotatedService(service, decorator, exceptionHandlersAndConverters);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: annotatedService
File: core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-44487
|
HIGH
| 7.5
|
line/armeria
|
annotatedService
|
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
|
df7f85824a62e997b910b5d6194a3335841065fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public void addObserverLocked(Uri uri, IContentObserver observer,
boolean notifyForDescendants, Object observersLock,
int uid, int pid, int userHandle) {
addObserverLocked(uri, 0, observer, notifyForDescendants, observersLock,
uid, pid, userHandle);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addObserverLocked
File: services/core/java/com/android/server/content/ContentService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2426
|
MEDIUM
| 4.3
|
android
|
addObserverLocked
|
services/core/java/com/android/server/content/ContentService.java
|
63363af721650e426db5b0bdfb8b2d4fe36abdb0
| 0
|
Analyze the following code function for security vulnerabilities
|
private CommandLine git() {
CommandLine git = CommandLine.createCommandLine("git").withEncoding("UTF-8");
return git.withNonArgSecrets(secrets);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: git
File: domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-77"
] |
CVE-2021-43286
|
MEDIUM
| 6.5
|
gocd
|
git
|
domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
|
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
| 0
|
Analyze the following code function for security vulnerabilities
|
public Connection getConnection(DatabaseConfiguration databaseConfiguration, boolean forceNewConnection)
throws DatabaseServiceException {
try {
if (connection != null && !forceNewConnection) {
// logger.info("connection closed::{}", connection.isClosed());
if (!connection.isClosed()) {
if (logger.isDebugEnabled()) {
logger.debug("Returning existing connection::{}", connection);
}
return connection;
}
}
String dbURL = getDatabaseUrl(databaseConfiguration);
Class.forName(type.getClassPath());
// logger.info("*** type.getClassPath() ::{}, {}**** ", type.getClassPath());
DriverManager.setLoginTimeout(10);
connection = DriverManager.getConnection(dbURL, databaseConfiguration.getDatabaseUser(),
databaseConfiguration.getDatabasePassword());
if (logger.isDebugEnabled()) {
logger.debug("*** Acquired New connection for ::{} **** ", dbURL);
}
return connection;
} catch (ClassNotFoundException e) {
logger.error("Jdbc Driver not found", e);
throw new DatabaseServiceException(e.getMessage());
} catch (SQLException e) {
logger.error("SQLException::Couldn't get a Connection!", e);
throw new DatabaseServiceException(true, e.getSQLState(), e.getErrorCode(), e.getMessage());
}
}
|
Vulnerability Classification:
- CWE: CWE-89
- CVE: CVE-2023-41887
- Severity: CRITICAL
- CVSS Score: 9.8
Description: Properly escape JDBC URL components in database extension
Function: getConnection
File: extensions/database/src/com/google/refine/extension/database/mysql/MySQLConnectionManager.java
Repository: OpenRefine
Fixed Code:
public Connection getConnection(DatabaseConfiguration databaseConfiguration, boolean forceNewConnection)
throws DatabaseServiceException {
try {
if (connection != null && !forceNewConnection) {
// logger.info("connection closed::{}", connection.isClosed());
if (!connection.isClosed()) {
if (logger.isDebugEnabled()) {
logger.debug("Returning existing connection::{}", connection);
}
return connection;
}
}
String dbURL = databaseConfiguration.toURI().toString();
Class.forName(type.getClassPath());
// logger.info("*** type.getClassPath() ::{}, {}**** ", type.getClassPath());
DriverManager.setLoginTimeout(10);
connection = DriverManager.getConnection(dbURL, databaseConfiguration.getDatabaseUser(),
databaseConfiguration.getDatabasePassword());
if (logger.isDebugEnabled()) {
logger.debug("*** Acquired New connection for ::{} **** ", dbURL);
}
return connection;
} catch (ClassNotFoundException e) {
logger.error("Jdbc Driver not found", e);
throw new DatabaseServiceException(e.getMessage());
} catch (SQLException e) {
logger.error("SQLException::Couldn't get a Connection!", e);
throw new DatabaseServiceException(true, e.getSQLState(), e.getErrorCode(), e.getMessage());
}
}
|
[
"CWE-89"
] |
CVE-2023-41887
|
CRITICAL
| 9.8
|
OpenRefine
|
getConnection
|
extensions/database/src/com/google/refine/extension/database/mysql/MySQLConnectionManager.java
|
693fde606d4b5b78b16391c29d110389eb605511
| 1
|
Analyze the following code function for security vulnerabilities
|
public String generateConnectorId(VaadinSession session,
ClientConnector connector) {
assert session.getService() == this;
String connectorId = connectorIdGenerator.generateConnectorId(
new ConnectorIdGenerationEvent(session, connector));
assert connectorId != null;
return connectorId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: generateConnectorId
File: server/src/main/java/com/vaadin/server/VaadinService.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-203"
] |
CVE-2021-31403
|
LOW
| 1.9
|
vaadin/framework
|
generateConnectorId
|
server/src/main/java/com/vaadin/server/VaadinService.java
|
d852126ab6f0c43f937239305bd0e9594834fe34
| 0
|
Analyze the following code function for security vulnerabilities
|
private void removeCall(Call call) {
Trace.beginSection("removeCall");
Log.v(this, "removeCall(%s)", call);
call.setParentCall(null); // need to clean up parent relationship before destroying.
call.removeListener(this);
call.clearConnectionService();
boolean shouldNotify = false;
if (mCalls.contains(call)) {
mCalls.remove(call);
shouldNotify = true;
}
// Only broadcast changes for calls that are being tracked.
if (shouldNotify) {
for (CallsManagerListener listener : mListeners) {
if (Log.SYSTRACE_DEBUG) {
Trace.beginSection(listener.getClass().toString() + " onCallRemoved");
}
listener.onCallRemoved(call);
if (Log.SYSTRACE_DEBUG) {
Trace.endSection();
}
}
updateCallsManagerState();
}
Trace.endSection();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeCall
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
|
removeCall
|
src/com/android/server/telecom/CallsManager.java
|
a06c9a4aef69ae27b951523cf72bf72412bf48fa
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getLocalPort() {
return _socket.getLocalPort();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLocalPort
File: src/main/java/com/rabbitmq/client/impl/SocketFrameHandler.java
Repository: rabbitmq/rabbitmq-java-client
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-46120
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-java-client
|
getLocalPort
|
src/main/java/com/rabbitmq/client/impl/SocketFrameHandler.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
public void bathEdit(ApiScenarioBatchRequest request) {
ServiceUtils.getSelectAllIds(request, request.getCondition(),
(query) -> extApiScenarioMapper.selectIdsByQuery(query));
if (StringUtils.isNotBlank(request.getEnvironmentId())) {
bathEditEnv(request);
return;
}
ApiScenarioExample apiScenarioExample = new ApiScenarioExample();
apiScenarioExample.createCriteria().andIdIn(request.getIds());
ApiScenarioWithBLOBs apiScenarioWithBLOBs = new ApiScenarioWithBLOBs();
BeanUtils.copyBean(apiScenarioWithBLOBs, request);
apiScenarioWithBLOBs.setUpdateTime(System.currentTimeMillis());
if (apiScenarioWithBLOBs.getScenarioDefinition() != null) {
List<ApiMethodUrlDTO> useUrl = this.parseUrl(apiScenarioWithBLOBs);
apiScenarioWithBLOBs.setUseUrl(JSONArray.toJSONString(useUrl));
}
apiScenarioMapper.updateByExampleSelective(
apiScenarioWithBLOBs,
apiScenarioExample);
// apiScenarioReferenceIdService.saveByApiScenario(apiScenarioWithBLOBs);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: bathEdit
File: backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2021-45789
|
MEDIUM
| 6.5
|
metersphere
|
bathEdit
|
backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java
|
d74e02cdff47cdf7524d305d098db6ffb7f61b47
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void uncacheShortcuts(int launcherUserId,
@NonNull String callingPackage, @NonNull String packageName,
@NonNull List<String> shortcutIds, int userId, int cacheFlags) {
updateCachedShortcutsInternal(launcherUserId, callingPackage, packageName, shortcutIds,
userId, cacheFlags, /* doCache= */ false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: uncacheShortcuts
File: services/core/java/com/android/server/pm/ShortcutService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40079
|
HIGH
| 7.8
|
android
|
uncacheShortcuts
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
public void enterSafeMode() throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: enterSafeMode
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
enterSafeMode
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void copy(InputStream i, OutputStream o, int bufferSize) throws IOException {
try {
byte[] buffer = new byte[bufferSize];
int size = i.read(buffer);
while(size > -1) {
o.write(buffer, 0, size);
size = i.read(buffer);
}
} finally {
sCleanup(o);
sCleanup(i);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: copy
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
|
copy
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public byte[] loadFileAsBytes(FileOperationRequest fileOperationRequest) {
File file = new File(FileUtils.BODY_FILE_DIR + "/" + fileOperationRequest.getId() + "_" + fileOperationRequest.getName());
try (FileInputStream fis = new FileInputStream(file);
ByteArrayOutputStream bos = new ByteArrayOutputStream(1000);) {
byte[] b = new byte[1000];
int n;
while ((n = fis.read(b)) != -1) {
bos.write(b, 0, n);
}
return bos.toByteArray();
} catch (Exception ex) {
LogUtil.error(ex);
}
return null;
}
|
Vulnerability Classification:
- CWE: CWE-Other
- CVE: CVE-2021-45789
- Severity: MEDIUM
- CVSS Score: 6.5
Description: fix: csv下载接口可以访问到系统目录
close #8652
Function: loadFileAsBytes
File: backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java
Repository: metersphere
Fixed Code:
public byte[] loadFileAsBytes(FileOperationRequest fileOperationRequest) {
if (fileOperationRequest.getId().contains("/") || fileOperationRequest.getName().contains("/"))
MSException.throwException(Translator.get("invalid_parameter"));
File file = new File(FileUtils.BODY_FILE_DIR + "/" + fileOperationRequest.getId() + "_" + fileOperationRequest.getName());
try (FileInputStream fis = new FileInputStream(file);
ByteArrayOutputStream bos = new ByteArrayOutputStream(1000);) {
byte[] b = new byte[1000];
int n;
while ((n = fis.read(b)) != -1) {
bos.write(b, 0, n);
}
return bos.toByteArray();
} catch (Exception ex) {
LogUtil.error(ex);
}
return null;
}
|
[
"CWE-Other"
] |
CVE-2021-45789
|
MEDIUM
| 6.5
|
metersphere
|
loadFileAsBytes
|
backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java
|
d74e02cdff47cdf7524d305d098db6ffb7f61b47
| 1
|
Analyze the following code function for security vulnerabilities
|
public <C extends HasValue<V> & Component> Column<T, V> setEditorComponent(
C editorComponent, Setter<T, V> setter) {
Objects.requireNonNull(editorComponent,
"Editor component cannot be null");
Objects.requireNonNull(setter, "Setter cannot be null");
Binding<T, V> binding = getGrid().getEditor().getBinder()
.bind(editorComponent, valueProvider::apply, setter);
return setEditorBinding(binding);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setEditorComponent
File: server/src/main/java/com/vaadin/ui/Grid.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-25028
|
MEDIUM
| 4.3
|
vaadin/framework
|
setEditorComponent
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void onSkipOrClearButtonClick(View view) {
mPasswordEntry.setText("");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onSkipOrClearButtonClick
File: src/com/android/settings/password/ChooseLockPassword.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40117
|
HIGH
| 7.8
|
android
|
onSkipOrClearButtonClick
|
src/com/android/settings/password/ChooseLockPassword.java
|
11815817de2f2d70fe842b108356a1bc75d44ffb
| 0
|
Analyze the following code function for security vulnerabilities
|
public static Server createWebServer(String... args) throws SQLException {
return createWebServer(args, null, false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createWebServer
File: h2/src/main/org/h2/tools/Server.java
Repository: h2database
The code follows secure coding practices.
|
[
"CWE-312"
] |
CVE-2022-45868
|
HIGH
| 7.8
|
h2database
|
createWebServer
|
h2/src/main/org/h2/tools/Server.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 0
|
Analyze the following code function for security vulnerabilities
|
@SystemApi
@RequiresPermission(anyOf = {
android.Manifest.permission.MANAGE_USERS,
android.Manifest.permission.MANAGE_PROFILE_AND_DEVICE_OWNERS
})
public String getDeviceOwnerNameOnAnyUser() {
throwIfParentInstance("getDeviceOwnerNameOnAnyUser");
if (mService != null) {
try {
return mService.getDeviceOwnerName();
} catch (RemoteException re) {
throw re.rethrowFromSystemServer();
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDeviceOwnerNameOnAnyUser
File: core/java/android/app/admin/DevicePolicyManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
getDeviceOwnerNameOnAnyUser
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("PMD.UseTryWithResources") // stream may be null
private static Properties loadProperites(String resource) {
Properties props = new Properties();
InputStream stream = GeoTools.class.getResourceAsStream(resource);
if (stream != null) {
try {
props.load(stream);
} catch (IOException ignore) {
} finally {
try {
stream.close();
} catch (IOException ignore) {
}
}
}
return props;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: loadProperites
File: modules/library/metadata/src/main/java/org/geotools/util/factory/GeoTools.java
Repository: geotools
The code follows secure coding practices.
|
[
"CWE-917"
] |
CVE-2022-24818
|
HIGH
| 7.5
|
geotools
|
loadProperites
|
modules/library/metadata/src/main/java/org/geotools/util/factory/GeoTools.java
|
4f70fa3234391dd0cda883a20ab0ec75688cba49
| 0
|
Analyze the following code function for security vulnerabilities
|
public static ClassLoader getClassLoader() {
// try current thread
ClassLoader cl = Thread.currentThread().getContextClassLoader();
if (cl == null) {
// try the current class
cl = Utils.class.getClassLoader();
if (cl == null) {
// fall back to a well known object that should alwways exist
cl = Object.class.getClassLoader();
}
}
return cl;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getClassLoader
File: vertx-web/src/main/java/io/vertx/ext/web/impl/Utils.java
Repository: vert-x3/vertx-web
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2023-24815
|
MEDIUM
| 5.3
|
vert-x3/vertx-web
|
getClassLoader
|
vertx-web/src/main/java/io/vertx/ext/web/impl/Utils.java
|
9e3a783b1d1a731055e9049078b1b1494ece9c15
| 0
|
Analyze the following code function for security vulnerabilities
|
private void clearPackagePersistentPreferredActivitiesFromPolicyEngine(
EnforcingAdmin admin, String packageName, int userId) {
Set<PolicyKey> keys = mDevicePolicyEngine.getLocalPolicyKeysSetByAdmin(
PolicyDefinition.GENERIC_PERSISTENT_PREFERRED_ACTIVITY,
admin,
userId);
for (PolicyKey key : keys) {
if (!(key instanceof IntentFilterPolicyKey)) {
throw new IllegalStateException("PolicyKey for PERSISTENT_PREFERRED_ACTIVITY is not"
+ "of type IntentFilterPolicyKey");
}
IntentFilterPolicyKey parsedKey =
(IntentFilterPolicyKey) key;
IntentFilter filter = Objects.requireNonNull(parsedKey.getIntentFilter());
ComponentName preferredActivity = mDevicePolicyEngine.getLocalPolicySetByAdmin(
PolicyDefinition.PERSISTENT_PREFERRED_ACTIVITY(filter),
admin,
userId);
if (preferredActivity != null
&& preferredActivity.getPackageName().equals(packageName)) {
mDevicePolicyEngine.removeLocalPolicy(
PolicyDefinition.PERSISTENT_PREFERRED_ACTIVITY(filter),
admin,
userId);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearPackagePersistentPreferredActivitiesFromPolicyEngine
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
|
clearPackagePersistentPreferredActivitiesFromPolicyEngine
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.