instruction
string | input
string | output
string | cwe_ids
list | cve_id
string | severity
string | cvss_score
float64 | repo_name
string | func_name
string | file_path
string | commit_hash
string | is_vulnerable
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Analyze the following code function for security vulnerabilities
|
@Override
public void onShellCommand(FileDescriptor in, FileDescriptor out,
FileDescriptor err, String[] args, ResultReceiver resultReceiver) {
(new ActivityManagerShellCommand(this, false)).exec(
this, in, out, err, args, resultReceiver);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onShellCommand
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3912
|
HIGH
| 9.3
|
android
|
onShellCommand
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
private void actionModeInvalidateWAR() {
assert mActionMode != null;
try {
mActionMode.invalidate();
} catch (NullPointerException e) {
Log.w(TAG, "Ignoring NPE from ActionMode.invalidate() as workaround for L", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: actionModeInvalidateWAR
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-1021"
] |
CVE-2015-1241
|
MEDIUM
| 4.3
|
chromium
|
actionModeInvalidateWAR
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
9d343ad2ea6ec395c377a4efa266057155bfa9c1
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<IssuesDao> getExportIssues(IssueExportRequest exportRequest, Boolean isThirdTemplate, List<CustomFieldDao> customFields) {
// 根据列表条件获取符合缺陷集合
IssuesRequest request = new IssuesRequest();
request.setProjectId(exportRequest.getProjectId());
request.setWorkspaceId(exportRequest.getWorkspaceId());
request.setSelectAll(exportRequest.getIsSelectAll());
request.setExportIds(exportRequest.getExportIds());
// 列表排序
request.setOrders(exportRequest.getOrders());
request.setOrders(ServiceUtils.getDefaultOrderByField(request.getOrders(), "create_time"));
request.getOrders().forEach(order -> {
if (StringUtils.isNotEmpty(order.getName()) && order.getName().startsWith("custom")) {
request.setIsCustomSorted(true);
request.setCustomFieldId(order.getName().replace("custom_", StringUtils.EMPTY));
order.setPrefix("cfi");
order.setName("value");
}
});
ServiceUtils.setBaseQueryRequestCustomMultipleFields(request);
List<IssuesDao> issues = extIssuesMapper.getIssues(request);
Map<String, Set<String>> caseSetMap = getCaseSetMap(issues);
Map<String, User> userMap = getUserMap(issues);
Map<String, String> planMap = getPlanMap(issues);
Map<String, List<IssueCommentDTO>> commentMap = getCommentMap(issues);
// 设置creator, caseCount, commnet
issues.forEach(item -> {
User createUser = userMap.get(item.getCreator());
if (createUser != null) {
item.setCreatorName(createUser.getName());
}
String resourceName = planMap.get(item.getResourceId());
if (StringUtils.isNotBlank(resourceName)) {
item.setResourceName(resourceName);
}
Set<String> caseIdSet = caseSetMap.get(item.getId());
if (caseIdSet == null) {
caseIdSet = new HashSet<>();
}
item.setCaseIds(new ArrayList<>(caseIdSet));
item.setCaseCount(caseIdSet.size());
List<IssueCommentDTO> commentDTOList = commentMap.get(item.getId());
if (CollectionUtils.isNotEmpty(commentDTOList) && commentDTOList.size() > 0) {
List<String> comments = commentDTOList.stream().map(IssueCommentDTO::getDescription).collect(Collectors.toList());
item.setComment(StringUtils.join(comments, ";"));
}
});
// 解析自定义字段
buildCustomField(issues, isThirdTemplate, customFields);
return issues;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getExportIssues
File: test-track/backend/src/main/java/io/metersphere/service/IssuesService.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2022-23544
|
MEDIUM
| 6.1
|
metersphere
|
getExportIssues
|
test-track/backend/src/main/java/io/metersphere/service/IssuesService.java
|
d0f95b50737c941b29d507a4cc3545f2dc6ab121
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setBasePath(String basePath) {
this.basePath = basePath;
setOauthBasePath(basePath);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setBasePath
File: samples/client/petstore/java/jersey2-java8-localdatetime/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
|
setBasePath
|
samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
public static ArtemisSecurityConfigurationBuilder create() {
return new ArtemisSecurityConfigurationBuilder();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: create
File: src/main/java/de/tum/in/test/api/security/ArtemisSecurityConfigurationBuilder.java
Repository: ls1intum/Ares
The code follows secure coding practices.
|
[
"CWE-501",
"CWE-653"
] |
CVE-2024-23682
|
HIGH
| 8.2
|
ls1intum/Ares
|
create
|
src/main/java/de/tum/in/test/api/security/ArtemisSecurityConfigurationBuilder.java
|
4c146ff85a0fa6022087fb0cffa6b8021d51101f
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getName() {
return name;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getName
File: jeecg-boot-base-core/src/main/java/org/jeecg/common/util/security/AbstractQueryBlackListHandler.java
Repository: jeecgboot/jeecg-boot
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2023-34602
|
HIGH
| 7.5
|
jeecgboot/jeecg-boot
|
getName
|
jeecg-boot-base-core/src/main/java/org/jeecg/common/util/security/AbstractQueryBlackListHandler.java
|
dd7bf104e7ed59142909567ecd004335c3442ec5
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean getAutoTimeRequired() {
if (!mHasFeature) {
return false;
}
if (isPolicyEngineForFinanceFlagEnabled()) {
Boolean required = mDevicePolicyEngine.getResolvedPolicy(
PolicyDefinition.getPolicyDefinitionForUserRestriction(
UserManager.DISALLOW_CONFIG_DATE_TIME),
mInjector.binderGetCallingUserHandle().getIdentifier());
return required != null && required;
} else {
synchronized (getLockObject()) {
ActiveAdmin deviceOwner = getDeviceOwnerAdminLocked();
if (deviceOwner != null && deviceOwner.requireAutoTime) {
// If the device owner enforces auto time, we don't need to check the PO's
return true;
}
// Now check to see if any profile owner on any user enforces auto time
for (Integer userId : mOwners.getProfileOwnerKeys()) {
ActiveAdmin profileOwner = getProfileOwnerAdminLocked(userId);
if (profileOwner != null && profileOwner.requireAutoTime) {
return true;
}
}
return false;
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAutoTimeRequired
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
|
getAutoTimeRequired
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setProfile(IDiagramProfile profile) {
this.profile = profile;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setProfile
File: jbpm-designer-backend/src/main/java/org/jbpm/designer/web/server/TransformerServlet.java
Repository: kiegroup/jbpm-designer
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2017-7545
|
MEDIUM
| 4
|
kiegroup/jbpm-designer
|
setProfile
|
jbpm-designer-backend/src/main/java/org/jbpm/designer/web/server/TransformerServlet.java
|
a143f3b92a6a5a527d929d68c02a0c5d914ab81d
| 0
|
Analyze the following code function for security vulnerabilities
|
public Path getManifestPath() {
return manifestPath;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getManifestPath
File: src/main/java/org/olat/fileresource/types/ImsCPFileResource.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-39180
|
HIGH
| 9
|
OpenOLAT
|
getManifestPath
|
src/main/java/org/olat/fileresource/types/ImsCPFileResource.java
|
699490be8e931af0ef1f135c55384db1f4232637
| 0
|
Analyze the following code function for security vulnerabilities
|
protected BufferedInputStream getBufferedInputStream() throws IOException {
if (bufferedInputStream == null) {
//workaround Tomcat issue with form POSTs
//see http://stackoverflow.com/questions/18489399/read-httpservletrequests-post-body-and-then-call-getparameter-in-tomcat
final ServletRequest request = getRequest();
request.getParameterMap();
//buffer the payload so we can inspect it
bufferedInputStream = new BufferedInputStream(request.getInputStream());
// and mark to allow the stream to be reset
bufferedInputStream.mark(Integer.MAX_VALUE);
}
return bufferedInputStream;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getBufferedInputStream
File: javamelody-core/src/main/java/net/bull/javamelody/PayloadNameRequestWrapper.java
Repository: javamelody
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-15531
|
HIGH
| 7.5
|
javamelody
|
getBufferedInputStream
|
javamelody-core/src/main/java/net/bull/javamelody/PayloadNameRequestWrapper.java
|
ef111822562d0b9365bd3e671a75b65bd0613353
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isMinorEdit()
{
return this.doc.isMinorEdit();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isMinorEdit
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
|
isMinorEdit
|
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
|
UsbManager getUsbManager() {
return mContext.getSystemService(UsbManager.class);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUsbManager
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
|
getUsbManager
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
static public void noteAlarmFinish(PendingIntent ps, int sourceUid, String tag) {
try {
getDefault().noteAlarmFinish(ps.getTarget(), sourceUid, tag);
} catch (RemoteException ex) {
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: noteAlarmFinish
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
noteAlarmFinish
|
core/java/android/app/ActivityManagerNative.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void broadcastCloseSystemDialogs(String reason) {
synchronized (ActivityManagerService.this) {
final Intent intent = new Intent(Intent.ACTION_CLOSE_SYSTEM_DIALOGS);
intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY
| Intent.FLAG_RECEIVER_FOREGROUND);
if (reason != null) {
intent.putExtra("reason", reason);
}
broadcastIntentLocked(null, null, null, intent, null, null, 0, null, null, null,
null, null, OP_NONE, null, false, false, -1, SYSTEM_UID,
Binder.getCallingUid(), Binder.getCallingPid(), UserHandle.USER_ALL);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: broadcastCloseSystemDialogs
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
|
broadcastCloseSystemDialogs
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void announcePgp(final Account account, final Conversation conversation, Intent intent, final Runnable onSuccess) {
if (account.getPgpId() == 0) {
choosePgpSignId(account);
} else {
String status = null;
if (manuallyChangePresence()) {
status = account.getPresenceStatusMessage();
}
if (status == null) {
status = "";
}
xmppConnectionService.getPgpEngine().generateSignature(intent, account, status, new UiCallback<String>() {
@Override
public void userInputRequried(PendingIntent pi, String signature) {
try {
startIntentSenderForResult(pi.getIntentSender(), REQUEST_ANNOUNCE_PGP, null, 0, 0, 0);
} catch (final SendIntentException ignored) {
}
}
@Override
public void success(String signature) {
account.setPgpSignature(signature);
xmppConnectionService.databaseBackend.updateAccount(account);
xmppConnectionService.sendPresence(account);
if (conversation != null) {
conversation.setNextEncryption(Message.ENCRYPTION_PGP);
xmppConnectionService.updateConversation(conversation);
refreshUi();
}
if (onSuccess != null) {
runOnUiThread(onSuccess);
}
}
@Override
public void error(int error, String signature) {
if (error == 0) {
account.setPgpSignId(0);
account.unsetPgpSignature();
xmppConnectionService.databaseBackend.updateAccount(account);
choosePgpSignId(account);
} else {
displayErrorDialog(error);
}
}
});
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: announcePgp
File: src/main/java/eu/siacs/conversations/ui/XmppActivity.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
announcePgp
|
src/main/java/eu/siacs/conversations/ui/XmppActivity.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Collection<Class<? extends IFloodlightService>>
getModuleServices() {
Collection<Class<? extends IFloodlightService>> l =
new ArrayList<Class<? extends IFloodlightService>>();
l.add(ILoadBalancerService.class);
return l;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getModuleServices
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
|
getModuleServices
|
src/main/java/net/floodlightcontroller/loadbalancer/LoadBalancer.java
|
7f5bedb625eec3ff4d29987c31cef2553a962b36
| 0
|
Analyze the following code function for security vulnerabilities
|
@JsonIgnore
public String getTransWrappedSessionKey() {
return attributes.get(TRANS_WRAPPED_SESSION_KEY);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTransWrappedSessionKey
File: base/common/src/main/java/com/netscape/certsrv/key/KeyArchivalRequest.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
getTransWrappedSessionKey
|
base/common/src/main/java/com/netscape/certsrv/key/KeyArchivalRequest.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setStatus(int sc, String sm) {
setStatus(sc);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setStatus
File: src/java/winstone/WinstoneResponse.java
Repository: jenkinsci/winstone
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2011-4344
|
LOW
| 2.6
|
jenkinsci/winstone
|
setStatus
|
src/java/winstone/WinstoneResponse.java
|
410ed3001d51c689cf59085b7417466caa2ded7b
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean isMultiline(String s) {
if(s==null) return false;
return s.indexOf('\r')>=0 || s.indexOf('\n')>=0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isMultiline
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
|
isMultiline
|
core/src/main/java/hudson/Functions.java
|
bf539198564a1108b7b71a973bf7de963a6213ef
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void updateCapabilities() {
updateCapabilities(getConnectedWifiConfigurationInternal());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateCapabilities
File: service/java/com/android/server/wifi/ClientModeImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
updateCapabilities
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
public FormValidation doCheckJobName(@QueryParameter String value) {
// this method can be used to check if a file exists anywhere in the file system,
// so it should be protected.
checkPermission(Item.CREATE);
if(fixEmpty(value)==null)
return FormValidation.ok();
try {
checkJobName(value);
return FormValidation.ok();
} catch (Failure e) {
return FormValidation.error(e.getMessage());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doCheckJobName
File: core/src/main/java/jenkins/model/Jenkins.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-2065
|
MEDIUM
| 4.3
|
jenkinsci/jenkins
|
doCheckJobName
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
private void updateQueryInsideAdaptiveFetchCache(boolean newAdaptiveFetch) {
if (Objects.nonNull(cursor)) {
ResultCursor resultCursor = cursor;
if (!this.adaptiveFetch && newAdaptiveFetch) {
// If we are here, that means we want to be added to adaptive fetch.
connection.getQueryExecutor().addQueryToAdaptiveFetchCache(true, resultCursor);
}
if (this.adaptiveFetch && !newAdaptiveFetch && Objects.nonNull(cursor)) {
// If we are here, that means we want to be removed from adaptive fetch.
connection.getQueryExecutor().removeQueryFromAdaptiveFetchCache(true, resultCursor);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateQueryInsideAdaptiveFetchCache
File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
Repository: pgjdbc
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-31197
|
HIGH
| 8
|
pgjdbc
|
updateQueryInsideAdaptiveFetchCache
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public SaReactorFilter setExcludeList(List<String> pathList) {
excludeList = pathList;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setExcludeList
File: sa-token-starter/sa-token-reactor-spring-boot-starter/src/main/java/cn/dev33/satoken/reactor/filter/SaReactorFilter.java
Repository: dromara/Sa-Token
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-44794
|
CRITICAL
| 9.8
|
dromara/Sa-Token
|
setExcludeList
|
sa-token-starter/sa-token-reactor-spring-boot-starter/src/main/java/cn/dev33/satoken/reactor/filter/SaReactorFilter.java
|
954efeb73277f924f836da2a25322ea35ee1bfa3
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean isLaidOut() {
return mLayoutSeq != -1;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isLaidOut
File: services/core/java/com/android/server/wm/WindowState.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35674
|
HIGH
| 7.8
|
android
|
isLaidOut
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean prepareHelpMenuItem(Activity activity, Menu menu, int helpUriResource,
String backupContext) {
MenuItem helpItem = menu.add(0, MENU_HELP, 0, R.string.help_feedback_label);
return prepareHelpMenuItem(activity, helpItem, activity.getString(helpUriResource),
backupContext);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: prepareHelpMenuItem
File: packages/SettingsLib/src/com/android/settingslib/HelpUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3889
|
HIGH
| 7.2
|
android
|
prepareHelpMenuItem
|
packages/SettingsLib/src/com/android/settingslib/HelpUtils.java
|
e206f02d46ae5e38c74d138b51f6e1637e261abe
| 0
|
Analyze the following code function for security vulnerabilities
|
private void save() throws UnsupportedEncodingException, FileNotFoundException {
save(file, false); // If save is called without a parameter it uses the class variable "file"
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: save
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
|
save
|
umlet-swing/src/main/java/com/baselet/diagram/io/DiagramFileHandler.java
|
e1c4cc6ae692cc8d1c367460dbf79343e996f9bd
| 0
|
Analyze the following code function for security vulnerabilities
|
private List<Project> getProjectListByWsAndUserId(String userId, String workspaceId) {
ProjectExample projectExample = new ProjectExample();
projectExample.createCriteria().andWorkspaceIdEqualTo(workspaceId);
List<Project> projects = projectMapper.selectByExample(projectExample);
UserGroupExample userGroupExample = new UserGroupExample();
userGroupExample.createCriteria().andUserIdEqualTo(userId);
List<UserGroup> userGroups = userGroupMapper.selectByExample(userGroupExample);
List<Project> projectList = new ArrayList<>();
userGroups.forEach(userGroup -> projects.forEach(project -> {
if (StringUtils.equals(userGroup.getSourceId(), project.getId())) {
if (!projectList.contains(project)) {
projectList.add(project);
}
}
}));
return projectList;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProjectListByWsAndUserId
File: framework/gateway/src/main/java/io/metersphere/gateway/service/UserLoginService.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2023-32699
|
MEDIUM
| 6.5
|
metersphere
|
getProjectListByWsAndUserId
|
framework/gateway/src/main/java/io/metersphere/gateway/service/UserLoginService.java
|
c59e381d368990214813085a1a4877c5ef865411
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isJsonMime(String mime) {
String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$";
return mime != null && (mime.matches(jsonMime) || mime.equals("*/*"));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isJsonMime
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
|
isJsonMime
|
samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
public static List<String> getAllVelocityVariablesNames()
{
String orderBy = "name";
int limit = -1;
List<Structure> temp = getStructures(orderBy,limit);
List<String> results = new ArrayList<String>();
for(Structure st : temp){
results.add(st.getVelocityVarName());
}
return results;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAllVelocityVariablesNames
File: src/com/dotmarketing/portlets/structure/factories/StructureFactory.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-2355
|
HIGH
| 7.5
|
dotCMS/core
|
getAllVelocityVariablesNames
|
src/com/dotmarketing/portlets/structure/factories/StructureFactory.java
|
897f3632d7e471b7a73aabed5b19f6f53d4e5562
| 0
|
Analyze the following code function for security vulnerabilities
|
private void buildResources() throws BrutException {
// create res folder, manifest file and resources.arsc
if (!buildResourcesRaw() && !buildResourcesFull() && !buildManifest()) {
LOGGER.warning("Could not find resources");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: buildResources
File: brut.apktool/apktool-lib/src/main/java/brut/androlib/ApkBuilder.java
Repository: iBotPeaches/Apktool
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2024-21633
|
HIGH
| 7.8
|
iBotPeaches/Apktool
|
buildResources
|
brut.apktool/apktool-lib/src/main/java/brut/androlib/ApkBuilder.java
|
d348c43b24a9de350ff6e5bd610545a10c1fc712
| 0
|
Analyze the following code function for security vulnerabilities
|
@CalledByNative
private boolean hasFocus() {
// If the container view is not focusable, we consider it always focused from
// Chromium's point of view.
if (!mContainerView.isFocusable()) return true;
return mContainerView.hasFocus();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasFocus
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-1021"
] |
CVE-2015-1241
|
MEDIUM
| 4.3
|
chromium
|
hasFocus
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
9d343ad2ea6ec395c377a4efa266057155bfa9c1
| 0
|
Analyze the following code function for security vulnerabilities
|
public Config build() {
return autoBuild();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: build
File: graylog2-server/src/main/java/org/graylog2/lookup/adapters/DnsLookupDataAdapter.java
Repository: Graylog2/graylog2-server
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2023-41045
|
MEDIUM
| 5.3
|
Graylog2/graylog2-server
|
build
|
graylog2-server/src/main/java/org/graylog2/lookup/adapters/DnsLookupDataAdapter.java
|
466af814523cffae9fbc7e77bab7472988f03c3e
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean startUserInForeground(final int userId, Dialog dlg) {
boolean result = startUser(userId, /* foreground */ true);
dlg.dismiss();
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startUserInForeground
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3833
|
MEDIUM
| 4.3
|
android
|
startUserInForeground
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
protected JsonBuilder append(final Object obj)
{
if (obj instanceof Object[]) {
return append((Object[]) obj);
}
sb.append(" ["); // begin row
// " must be quoted as \":
sb.append(escapeString(formatValue(obj)));
sb.append("]"); // end row
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: append
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
|
append
|
src/main/java/org/projectforge/web/core/JsonBuilder.java
|
5a6a25366491443b76e528a04a9e4ba26f08a83c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getLockTaskModeState() {
return mActivityTaskManager.getLockTaskModeState();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLockTaskModeState
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
|
getLockTaskModeState
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
private void primeDomainVerificationsLPw(int userId) {
if (DEBUG_DOMAIN_VERIFICATION) {
Slog.d(TAG, "Priming domain verifications in user " + userId);
}
SystemConfig systemConfig = SystemConfig.getInstance();
ArraySet<String> packages = systemConfig.getLinkedApps();
ArraySet<String> domains = new ArraySet<String>();
for (String packageName : packages) {
PackageParser.Package pkg = mPackages.get(packageName);
if (pkg != null) {
if (!pkg.isSystemApp()) {
Slog.w(TAG, "Non-system app '" + packageName + "' in sysconfig <app-link>");
continue;
}
domains.clear();
for (PackageParser.Activity a : pkg.activities) {
for (ActivityIntentInfo filter : a.intents) {
if (hasValidDomains(filter)) {
domains.addAll(filter.getHostsList());
}
}
}
if (domains.size() > 0) {
if (DEBUG_DOMAIN_VERIFICATION) {
Slog.v(TAG, " + " + packageName);
}
// 'Undefined' in the global IntentFilterVerificationInfo, i.e. the usual
// state w.r.t. the formal app-linkage "no verification attempted" state;
// and then 'always' in the per-user state actually used for intent resolution.
final IntentFilterVerificationInfo ivi;
ivi = mSettings.createIntentFilterVerificationIfNeededLPw(packageName,
new ArrayList<String>(domains));
ivi.setStatus(INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_UNDEFINED);
mSettings.updateIntentFilterVerificationStatusLPw(packageName,
INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_ALWAYS, userId);
} else {
Slog.w(TAG, "Sysconfig <app-link> package '" + packageName
+ "' does not handle web links");
}
} else {
Slog.w(TAG, "Unknown package '" + packageName + "' in sysconfig <app-link>");
}
}
scheduleWritePackageRestrictionsLocked(userId);
scheduleWriteSettingsLocked();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: primeDomainVerificationsLPw
File: services/core/java/com/android/server/pm/PackageManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2016-2497
|
HIGH
| 7.5
|
android
|
primeDomainVerificationsLPw
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
@POST
@RequiresPermissions(RestPermissions.USERS_CREATE)
@ApiOperation("Create a new user account.")
@ApiResponses({
@ApiResponse(code = 400, message = "Missing or invalid user details.")
})
@AuditEvent(type = AuditEventTypes.USER_CREATE)
public Response create(@ApiParam(name = "JSON body", value = "Must contain username, full_name, email, password and a list of permissions.", required = true)
@Valid @NotNull CreateUserRequest cr) throws ValidationException {
if (userManagementService.load(cr.username()) != null) {
final String msg = "Cannot create user " + cr.username() + ". Username is already taken.";
LOG.error(msg);
throw new BadRequestException(msg);
}
if (rolesContainAdmin(cr.roles()) && cr.isServiceAccount()) {
throw new BadRequestException("Cannot assign Admin role to service account");
}
// Create user.
User user = userManagementService.create();
user.setName(cr.username());
user.setPassword(cr.password());
user.setFirstLastFullNames(cr.firstName(), cr.lastName());
user.setEmail(cr.email());
user.setPermissions(cr.permissions());
setUserRoles(cr.roles(), user);
user.setServiceAccount(cr.isServiceAccount());
if (cr.timezone() != null) {
user.setTimeZone(cr.timezone());
}
final Long sessionTimeoutMs = cr.sessionTimeoutMs();
if (sessionTimeoutMs != null) {
user.setSessionTimeoutMs(sessionTimeoutMs);
}
final Startpage startpage = cr.startpage();
if (startpage != null) {
user.setStartpage(startpage.type(), startpage.id());
}
final String id = userManagementService.create(user);
LOG.debug("Saved user {} with id {}", user.getName(), id);
final URI userUri = getUriBuilderToSelf().path(UsersResource.class)
.path("{username}")
.build(user.getName());
return Response.created(userUri).build();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: create
File: graylog2-server/src/main/java/org/graylog2/rest/resources/users/UsersResource.java
Repository: Graylog2/graylog2-server
The code follows secure coding practices.
|
[
"CWE-613"
] |
CVE-2023-41041
|
LOW
| 3.1
|
Graylog2/graylog2-server
|
create
|
graylog2-server/src/main/java/org/graylog2/rest/resources/users/UsersResource.java
|
bb88f3d0b2b0351669ab32c60b595ab7242a3fe3
| 0
|
Analyze the following code function for security vulnerabilities
|
private void updateChannel() {
mBgHandler.post(
new UpdateChannelRunnable(mINotificationManager, mPackageName,
mAppUid, mSelectedAction, mNotificationChannel));
mEntry.markForUserTriggeredMovement(true);
mMainHandler.postDelayed(
() -> mOnUserInteractionCallback.onImportanceChanged(mEntry),
StackStateAnimator.ANIMATION_DURATION_STANDARD);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateChannel
File: packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfo.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40098
|
MEDIUM
| 5.5
|
android
|
updateChannel
|
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfo.java
|
d21ffbe8a2eeb2a5e6da7efbb1a0430ba6b022e0
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void clearPendingBackup() {
if (DEBUG_BACKUP) Slog.v(TAG_BACKUP, "clearPendingBackup");
enforceCallingPermission("android.permission.BACKUP", "clearPendingBackup");
synchronized (this) {
mBackupTarget = null;
mBackupAppName = null;
}
JobSchedulerInternal js = LocalServices.getService(JobSchedulerInternal.class);
js.clearAllBackingUpUids();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearPendingBackup
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2018-9492
|
HIGH
| 7.2
|
android
|
clearPendingBackup
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
private int stopUserUnchecked(@UserIdInt int userId) {
Slogf.i(LOG_TAG, "Stopping user %d", userId);
final long id = mInjector.binderClearCallingIdentity();
try {
switch (mInjector.getIActivityManager().stopUser(userId, true /*force*/, null)) {
case ActivityManager.USER_OP_SUCCESS:
return UserManager.USER_OPERATION_SUCCESS;
case ActivityManager.USER_OP_IS_CURRENT:
return UserManager.USER_OPERATION_ERROR_CURRENT_USER;
default:
return UserManager.USER_OPERATION_ERROR_UNKNOWN;
}
} catch (RemoteException e) {
// Same process, should not happen.
return UserManager.USER_OPERATION_ERROR_UNKNOWN;
} finally {
mInjector.binderRestoreCallingIdentity(id);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: stopUserUnchecked
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
|
stopUserUnchecked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public PendingIntent createPendingIntent(
RequestInfo requestInfo, ArrayList<ProviderData> providerDataList) {
List<CredentialProviderInfo> allProviders =
CredentialProviderInfoFactory.getCredentialProviderServices(
mContext,
mUserId,
CredentialManager.PROVIDER_FILTER_USER_PROVIDERS_ONLY,
mEnabledProviders,
// Don't need primary providers here.
new HashSet<String>());
List<DisabledProviderData> disabledProviderDataList = allProviders.stream()
.filter(provider -> !provider.isEnabled())
.map(disabledProvider -> new DisabledProviderData(
disabledProvider.getComponentName().flattenToString())).toList();
Intent intent = IntentFactory.createCredentialSelectorIntent(requestInfo, providerDataList,
new ArrayList<>(disabledProviderDataList), mResultReceiver)
.setAction(UUID.randomUUID().toString());
//TODO: Create unique pending intent using request code and cancel any pre-existing pending
// intents
return PendingIntent.getActivity(
mContext, /*requestCode=*/0, intent, PendingIntent.FLAG_IMMUTABLE);
}
|
Vulnerability Classification:
- CWE: CWE-Other
- CVE: CVE-2023-40076
- Severity: MEDIUM
- CVSS Score: 5.5
Description: Create pending intent for specific user
Test: Built locally & deployed to device
Bug: 303835719
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:a75c8e7b68f9d3ff0eac572190fe2894a768345c)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:b9c5b0f408250faa2d8dadd7d2ba8beeb88ea463)
Merged-In: If03e146a069b9162d41eee26b7070ea52827fddf
Change-Id: If03e146a069b9162d41eee26b7070ea52827fddf
Function: createPendingIntent
File: services/credentials/java/com/android/server/credentials/CredentialManagerUi.java
Repository: android
Fixed Code:
public PendingIntent createPendingIntent(
RequestInfo requestInfo, ArrayList<ProviderData> providerDataList) {
List<CredentialProviderInfo> allProviders =
CredentialProviderInfoFactory.getCredentialProviderServices(
mContext,
mUserId,
CredentialManager.PROVIDER_FILTER_USER_PROVIDERS_ONLY,
mEnabledProviders,
// Don't need primary providers here.
new HashSet<String>());
List<DisabledProviderData> disabledProviderDataList = allProviders.stream()
.filter(provider -> !provider.isEnabled())
.map(disabledProvider -> new DisabledProviderData(
disabledProvider.getComponentName().flattenToString())).toList();
Intent intent = IntentFactory.createCredentialSelectorIntent(requestInfo, providerDataList,
new ArrayList<>(disabledProviderDataList), mResultReceiver)
.setAction(UUID.randomUUID().toString());
//TODO: Create unique pending intent using request code and cancel any pre-existing pending
// intents
return PendingIntent.getActivityAsUser(
mContext, /*requestCode=*/0, intent,
PendingIntent.FLAG_IMMUTABLE, /*options=*/null,
UserHandle.of(mUserId));
}
|
[
"CWE-Other"
] |
CVE-2023-40076
|
MEDIUM
| 5.5
|
android
|
createPendingIntent
|
services/credentials/java/com/android/server/credentials/CredentialManagerUi.java
|
9b68987df85b681f9362a3cadca6496796d23bbc
| 1
|
Analyze the following code function for security vulnerabilities
|
public void disconnect() {
try {
if(socketInstance != null) {
if(is != null) {
try {
is.close();
} catch(IOException err) {}
}
if(os != null) {
try {
os.close();
} catch(IOException err) {}
}
socketInstance.close();
socketInstance = null;
}
} catch(IOException err) {
errorMessage = err.toString();
err.printStackTrace();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: disconnect
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
|
disconnect
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean checkAccess(String right)
{
try {
return getXWikiContext().getWiki().checkAccess(right, this.doc, getXWikiContext());
} catch (XWikiException e) {
return false;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkAccess
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
|
checkAccess
|
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
|
static String bytesToString(byte[] bytes, int offset, int length) {
final char[] hexChars = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
char[] chars = new char[length * 2];
int byteValue;
for (int j = 0; j < length; j++) {
byteValue = bytes[offset + j] & 0xFF;
chars[j * 2] = hexChars[byteValue >>> 4];
chars[j * 2 + 1] = hexChars[byteValue & 0x0F];
}
return new String(chars);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: bytesToString
File: src/com/android/nfc/cardemulation/HostEmulationManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35671
|
MEDIUM
| 5.5
|
android
|
bytesToString
|
src/com/android/nfc/cardemulation/HostEmulationManager.java
|
745632835f3d97513a9c2a96e56e1dc06c4e4176
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setBlursDisabledForAppLaunch(boolean disabled) {
mNotificationShadeDepthController.get().setBlursDisabledForAppLaunch(disabled);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setBlursDisabledForAppLaunch
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
|
setBlursDisabledForAppLaunch
|
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
|
d18d8b350756b0e89e051736c1f28744ed31e93a
| 0
|
Analyze the following code function for security vulnerabilities
|
static boolean isOpenJ9vm() {
if (ROOT.lookupClass() == MethodHandle.class) {
int modes = ROOT.lookupModes();
return modes == 0x40 // AdoptOpenJDK - jdk 11.0.9.11 openj9
|| modes == 0x80 // Eclipse OpenJ9 VM - 11.0.12.7-openj9
;
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isOpenJ9vm
File: api/src/main/java/io/github/karlatemp/unsafeaccessor/Root.java
Repository: Karlatemp/UnsafeAccessor
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-31139
|
MEDIUM
| 4.3
|
Karlatemp/UnsafeAccessor
|
isOpenJ9vm
|
api/src/main/java/io/github/karlatemp/unsafeaccessor/Root.java
|
4ef83000184e8f13239a1ea2847ee401d81585fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getAttributeUnsignedIntValue(String namespace, String attribute,
int defaultValue)
{
int idx = nativeGetAttributeIndex(mParseState, namespace, attribute);
if (idx >= 0) {
return getAttributeUnsignedIntValue(idx, defaultValue);
}
return defaultValue;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAttributeUnsignedIntValue
File: core/java/android/content/res/XmlBlock.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-415"
] |
CVE-2023-40103
|
HIGH
| 7.8
|
android
|
getAttributeUnsignedIntValue
|
core/java/android/content/res/XmlBlock.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
private void applyFactoryDefaultBrowserLPw(int userId) {
// The default browser app's package name is stored in a string resource,
// with a product-specific overlay used for vendor customization.
String browserPkg = mContext.getResources().getString(
com.android.internal.R.string.default_browser);
if (!TextUtils.isEmpty(browserPkg)) {
// non-empty string => required to be a known package
PackageSetting ps = mSettings.mPackages.get(browserPkg);
if (ps == null) {
Slog.e(TAG, "Product default browser app does not exist: " + browserPkg);
browserPkg = null;
} else {
mSettings.setDefaultBrowserPackageNameLPw(browserPkg, userId);
}
}
// Nothing valid explicitly set? Make the factory-installed browser the explicit
// default. If there's more than one, just leave everything alone.
if (browserPkg == null) {
calculateDefaultBrowserLPw(userId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: applyFactoryDefaultBrowserLPw
File: services/core/java/com/android/server/pm/PackageManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2016-2497
|
HIGH
| 7.5
|
android
|
applyFactoryDefaultBrowserLPw
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean isUid(int uid) {
return info.applicationInfo.uid == uid;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isUid
File: services/core/java/com/android/server/wm/ActivityRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21145
|
HIGH
| 7.8
|
android
|
isUid
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
public Integer getId() {
return id;
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2023-7171
- Severity: LOW
- CVSS Score: 3.3
Description: fix(novel-admin): 友情链接URL格式校验
Function: getId
File: novel-admin/src/main/java/com/java2nb/novel/domain/FriendLinkDO.java
Repository: 201206030/novel-plus
Fixed Code:
public Integer getId() {
return id;
}
|
[
"CWE-79"
] |
CVE-2023-7171
|
LOW
| 3.3
|
201206030/novel-plus
|
getId
|
novel-admin/src/main/java/com/java2nb/novel/domain/FriendLinkDO.java
|
d6093d8182362422370d7eaf6c53afde9ee45215
| 1
|
Analyze the following code function for security vulnerabilities
|
void setAudioRoute(int route) {
mCallAudioManager.setAudioRoute(route);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAudioRoute
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
|
setAudioRoute
|
src/com/android/server/telecom/CallsManager.java
|
a06c9a4aef69ae27b951523cf72bf72412bf48fa
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setContextRoot(String contextRootRelativePath) {
this.contextRootRelativePath = contextRootRelativePath;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setContextRoot
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
|
setContextRoot
|
flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
|
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void setContentViewCore(ContentViewCore cvc) {
NativePage previousNativePage = mNativePage;
mNativePage = null;
destroyNativePageInternal(previousNativePage);
mContentViewCore = cvc;
mWebContentsDelegate = createWebContentsDelegate();
mWebContentsObserver = new TabWebContentsObserverAndroid(mContentViewCore);
mVoiceSearchTabHelper = new VoiceSearchTabHelper(mContentViewCore);
if (mContentViewClient != null) mContentViewCore.setContentViewClient(mContentViewClient);
assert mNativeTabAndroid != 0;
nativeInitWebContents(
mNativeTabAndroid, mIncognito, mContentViewCore, mWebContentsDelegate,
new TabContextMenuPopulator(createContextMenuPopulator()));
// In the case where restoring a Tab or showing a prerendered one we already have a
// valid infobar container, no need to recreate one.
if (mInfoBarContainer == null) {
// The InfoBarContainer needs to be created after the ContentView has been natively
// initialized.
WebContents webContents = mContentViewCore.getWebContents();
mInfoBarContainer = new InfoBarContainer(
(Activity) mContext, createAutoLoginProcessor(), getId(),
mContentViewCore.getContainerView(), webContents);
} else {
mInfoBarContainer.onParentViewChanged(getId(), mContentViewCore.getContainerView());
}
if (AppBannerManager.isEnabled() && mAppBannerManager == null) {
mAppBannerManager = new AppBannerManager(this);
}
if (DomDistillerFeedbackReporter.isEnabled() && mDomDistillerFeedbackReporter == null) {
mDomDistillerFeedbackReporter = new DomDistillerFeedbackReporter(this);
}
for (TabObserver observer : mObservers) observer.onContentChanged(this);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setContentViewCore
File: chrome/android/java/src/org/chromium/chrome/browser/Tab.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
setContentViewCore
|
chrome/android/java/src/org/chromium/chrome/browser/Tab.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
private void getActivityEnergyInfoFromController() {
enforceCallingOrSelfPermission(BLUETOOTH_PRIVILEGED, "Need BLUETOOTH permission");
if (isActivityAndEnergyReportingSupported()) {
readEnergyInfo();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getActivityEnergyInfoFromController
File: src/com/android/bluetooth/btservice/AdapterService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-362",
"CWE-20"
] |
CVE-2016-3760
|
MEDIUM
| 5.4
|
android
|
getActivityEnergyInfoFromController
|
src/com/android/bluetooth/btservice/AdapterService.java
|
122feb9a0b04290f55183ff2f0384c6c53756bd8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public XMLBuilder xpathFind(String xpath, NamespaceContext nsContext)
throws XPathExpressionException
{
Node foundNode = super.xpathFindImpl(xpath, nsContext);
return new XMLBuilder(foundNode, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: xpathFind
File: src/main/java/com/jamesmurty/utils/XMLBuilder.java
Repository: jmurty/java-xmlbuilder
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2014-125087
|
MEDIUM
| 5.2
|
jmurty/java-xmlbuilder
|
xpathFind
|
src/main/java/com/jamesmurty/utils/XMLBuilder.java
|
e6fddca201790abab4f2c274341c0bb8835c3e73
| 0
|
Analyze the following code function for security vulnerabilities
|
public Descriptor<SecurityRealm> getSecurityRealms(String shortClassName) {
return findDescriptor(shortClassName,SecurityRealm.all());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSecurityRealms
File: core/src/main/java/jenkins/model/Jenkins.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-2065
|
MEDIUM
| 4.3
|
jenkinsci/jenkins
|
getSecurityRealms
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void attributeImpl(String name, String value) {
if (! (this.xmlNode instanceof Element)) {
throw new RuntimeException(
"Cannot add an attribute to non-Element underlying node: "
+ this.xmlNode);
}
((Element) xmlNode).setAttribute(name, value);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: attributeImpl
File: src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
Repository: jmurty/java-xmlbuilder
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2014-125087
|
MEDIUM
| 5.2
|
jmurty/java-xmlbuilder
|
attributeImpl
|
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
|
e6fddca201790abab4f2c274341c0bb8835c3e73
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String findLibraryExt(String lib) {
for (JNLPClassLoader loader : loaders) {
String result = null;
if (loader != this) {
result = loader.findLibrary(lib);
}
if (result != null) {
return result;
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findLibraryExt
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
|
findLibraryExt
|
core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
|
e0818f521a0711aeec4b913b49b5fc6a52815662
| 0
|
Analyze the following code function for security vulnerabilities
|
public static byte[] FlateDecode(byte in[], boolean strict) {
ByteArrayInputStream stream = new ByteArrayInputStream(in);
InflaterInputStream zip = new InflaterInputStream(stream);
ByteArrayOutputStream out = new ByteArrayOutputStream();
byte b[] = new byte[strict ? 4092 : 1];
try {
int n;
while ((n = zip.read(b)) >= 0) {
out.write(b, 0, n);
}
zip.close();
out.close();
return out.toByteArray();
}
catch (Exception e) {
if (strict)
return null;
return out.toByteArray();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: FlateDecode
File: java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
Repository: pdftk-java/pdftk
The code follows secure coding practices.
|
[
"CWE-835"
] |
CVE-2021-37819
|
HIGH
| 7.5
|
pdftk-java/pdftk
|
FlateDecode
|
java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
|
9b0cbb76c8434a8505f02ada02a94263dcae9247
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void deleteApplicationByResourceId(String resourceId,
String tenantDomain,
String username) throws IdentityApplicationManagementException {
// Invoking listeners.
Collection<ApplicationResourceManagementListener> listeners =
ApplicationMgtListenerServiceComponent.getApplicationResourceMgtListeners();
for (ApplicationResourceManagementListener listener : listeners) {
if (listener.isEnabled() &&
!listener.doPreDeleteApplicationByResourceId(resourceId, tenantDomain, username)) {
throw buildServerException("Pre Delete application operation of listener: " + getName(listener) +
" failed for application with resourceId: " + resourceId);
}
}
ServiceProvider application;
try {
startTenantFlow(tenantDomain);
ApplicationDAO appDAO = ApplicationMgtSystemConfig.getInstance().getApplicationDAO();
application = appDAO.getApplicationByResourceId(resourceId, tenantDomain);
if (application != null) {
String applicationName = application.getApplicationName();
doPreDeleteChecks(applicationName, tenantDomain, username);
ApplicationMgtUtil.deleteAppRole(applicationName);
ApplicationMgtUtil.deletePermissions(applicationName);
// Delete the app information from SP_APP table.
appDAO.deleteApplicationByResourceId(resourceId, tenantDomain);
} else {
if (log.isDebugEnabled()) {
log.debug("Application cannot be found for resourceId: " + resourceId +
" in tenantDomain: " + tenantDomain);
}
return;
}
} finally {
endTenantFlow();
}
for (ApplicationResourceManagementListener listener : listeners) {
if (listener.isEnabled() &&
!listener.doPostDeleteApplicationByResourceId(application, resourceId, tenantDomain, username)) {
log.error("Post Delete application operation of listener: " + getName(listener) + " failed for " +
"application with resourceId: " + resourceId);
return;
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deleteApplicationByResourceId
File: components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
Repository: wso2/carbon-identity-framework
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-42646
|
MEDIUM
| 6.4
|
wso2/carbon-identity-framework
|
deleteApplicationByResourceId
|
components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
|
e9119883ee02a884f3c76c7bbc4022a4f4c58fc0
| 0
|
Analyze the following code function for security vulnerabilities
|
private void migrate15(File dataDir, Stack<Integer> versions) {
for (File file: dataDir.listFiles()) {
try {
String content = FileUtils.readFileToString(file, StandardCharsets.UTF_8);
content = StringUtils.replace(content, "com.turbodev", "io.onedev");
content = StringUtils.replace(content, "com/turbodev", "io/onedev");
content = StringUtils.replace(content, "turbodev.com", "onedev.io");
content = StringUtils.replace(content, "turbodev", "onedev");
content = StringUtils.replace(content, "TurboDev", "OneDev");
FileUtils.writeFile(file, content, StandardCharsets.UTF_8.name());
} catch (IOException e) {
throw new RuntimeException(e);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: migrate15
File: server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-338"
] |
CVE-2023-24828
|
HIGH
| 8.8
|
theonedev/onedev
|
migrate15
|
server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
|
d67dd9686897fe5e4ab881d749464aa7c06a68e5
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getUrl(Run n) {
if(n ==null)
return null;
else {
return head+n.getNumber()+rest;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUrl
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
|
getUrl
|
core/src/main/java/hudson/Functions.java
|
bf539198564a1108b7b71a973bf7de963a6213ef
| 0
|
Analyze the following code function for security vulnerabilities
|
public static CertRetrievalRequest fromXML(String xml) throws Exception {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.parse(new InputSource(new StringReader(xml)));
Element requestElement = document.getDocumentElement();
return fromDOM(requestElement);
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2022-2414
- Severity: HIGH
- CVSS Score: 7.5
Description: Disable access to external entities when parsing XML
This reduces the vulnerability of XML parsers to XXE (XML external
entity) injection.
The best way to prevent XXE is to stop using XML altogether, which we do
plan to do. Until that happens I consider it worthwhile to tighten the
security here though.
Function: fromXML
File: base/common/src/main/java/com/netscape/certsrv/cert/CertRetrievalRequest.java
Repository: dogtagpki/pki
Fixed Code:
public static CertRetrievalRequest fromXML(String xml) throws Exception {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.parse(new InputSource(new StringReader(xml)));
Element requestElement = document.getDocumentElement();
return fromDOM(requestElement);
}
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
fromXML
|
base/common/src/main/java/com/netscape/certsrv/cert/CertRetrievalRequest.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 1
|
Analyze the following code function for security vulnerabilities
|
@JsonProperty("NotBefore")
public String getNotBefore() {
return notBefore;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNotBefore
File: base/common/src/main/java/com/netscape/certsrv/cert/CertData.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
getNotBefore
|
base/common/src/main/java/com/netscape/certsrv/cert/CertData.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getCustomInPlaceResId() {
return mCustomInPlaceResId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCustomInPlaceResId
File: core/java/android/app/ActivityOptions.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-20918
|
CRITICAL
| 9.8
|
android
|
getCustomInPlaceResId
|
core/java/android/app/ActivityOptions.java
|
51051de4eb40bb502db448084a83fd6cbfb7d3cf
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void getByIdsAsString(TestContext context) {
Async async = context.async();
String id1 = randomUuid();
String id2 = randomUuid();
JsonArray ids = new JsonArray().add(id1).add(id2);
insertXAndSingleQuotePojo(context, ids).getByIdAsString(FOO, ids, get -> {
assertSuccess(context, get);
context.assertEquals(2, get.result().size());
context.assertTrue(get.result().get(id1).contains("\"x\""));
context.assertTrue(get.result().get(id2).contains("\"'\""));
async.complete();
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getByIdsAsString
File: domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
getByIdsAsString
|
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected synchronized void dump(FileDescriptor fd, PrintWriter pw, String[] args) {
mContext.enforceCallingOrSelfPermission(Manifest.permission.DUMP,
"caller doesn't have the DUMP permission");
// This makes it so that future permission checks will be in the context of this
// process rather than the caller's process. We will restore this before returning.
long identityToken = clearCallingIdentity();
try {
if (mSyncManager == null) {
pw.println("No SyncManager created! (Disk full?)");
} else {
mSyncManager.dump(fd, pw);
}
pw.println();
pw.println("Observer tree:");
synchronized (mRootNode) {
int[] counts = new int[2];
final SparseIntArray pidCounts = new SparseIntArray();
mRootNode.dumpLocked(fd, pw, args, "", " ", counts, pidCounts);
pw.println();
ArrayList<Integer> sorted = new ArrayList<Integer>();
for (int i=0; i<pidCounts.size(); i++) {
sorted.add(pidCounts.keyAt(i));
}
Collections.sort(sorted, new Comparator<Integer>() {
@Override
public int compare(Integer lhs, Integer rhs) {
int lc = pidCounts.get(lhs);
int rc = pidCounts.get(rhs);
if (lc < rc) {
return 1;
} else if (lc > rc) {
return -1;
}
return 0;
}
});
for (int i=0; i<sorted.size(); i++) {
int pid = sorted.get(i);
pw.print(" pid "); pw.print(pid); pw.print(": ");
pw.print(pidCounts.get(pid)); pw.println(" observers");
}
pw.println();
pw.print(" Total number of nodes: "); pw.println(counts[0]);
pw.print(" Total number of observers: "); pw.println(counts[1]);
}
} finally {
restoreCallingIdentity(identityToken);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dump
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
|
dump
|
services/core/java/com/android/server/content/ContentService.java
|
63363af721650e426db5b0bdfb8b2d4fe36abdb0
| 0
|
Analyze the following code function for security vulnerabilities
|
private static native int[] nativeGetStyle(long obj, int idx);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nativeGetStyle
File: core/java/android/content/res/StringBlock.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-415"
] |
CVE-2023-40103
|
HIGH
| 7.8
|
android
|
nativeGetStyle
|
core/java/android/content/res/StringBlock.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int adjustSystemUiVisibilityLw(int visibility) {
mStatusBarController.adjustSystemUiVisibilityLw(mLastSystemUiFlags, visibility);
mNavigationBarController.adjustSystemUiVisibilityLw(mLastSystemUiFlags, visibility);
mRecentsVisible = (visibility & View.RECENT_APPS_VISIBLE) > 0;
// Reset any bits in mForceClearingStatusBarVisibility that
// are now clear.
mResettingSystemUiFlags &= visibility;
// Clear any bits in the new visibility that are currently being
// force cleared, before reporting it.
return visibility & ~mResettingSystemUiFlags
& ~mForceClearedSystemUiFlags;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: adjustSystemUiVisibilityLw
File: policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-0812
|
MEDIUM
| 6.6
|
android
|
adjustSystemUiVisibilityLw
|
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
|
84669ca8de55d38073a0dcb01074233b0a417541
| 0
|
Analyze the following code function for security vulnerabilities
|
private void cleanup(final RequestImpl req, final ResponseImpl rsp, final boolean close,
final Throwable x, final boolean done) {
if (x != null) {
handleErr(req, rsp, x);
}
if (done) {
done(req, rsp, x, close);
}
requestScope.exit();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cleanup
File: jooby/src/main/java/org/jooby/internal/HttpHandlerImpl.java
Repository: jooby-project/jooby
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-15477
|
MEDIUM
| 4.3
|
jooby-project/jooby
|
cleanup
|
jooby/src/main/java/org/jooby/internal/HttpHandlerImpl.java
|
34856a738829d8fedca4ed27bd6ff413af87186f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void killBackgroundProcesses(final String packageName, int userId) {
if (checkCallingPermission(android.Manifest.permission.KILL_BACKGROUND_PROCESSES)
!= PackageManager.PERMISSION_GRANTED &&
checkCallingPermission(android.Manifest.permission.RESTART_PACKAGES)
!= PackageManager.PERMISSION_GRANTED) {
String msg = "Permission Denial: killBackgroundProcesses() from pid="
+ Binder.getCallingPid()
+ ", uid=" + Binder.getCallingUid()
+ " requires " + android.Manifest.permission.KILL_BACKGROUND_PROCESSES;
Slog.w(TAG, msg);
throw new SecurityException(msg);
}
userId = mUserController.handleIncomingUser(Binder.getCallingPid(), Binder.getCallingUid(),
userId, true, ALLOW_FULL_ONLY, "killBackgroundProcesses", null);
final int[] userIds = mUserController.expandUserId(userId);
final long callingId = Binder.clearCallingIdentity();
try {
IPackageManager pm = AppGlobals.getPackageManager();
for (int targetUserId : userIds) {
int appId = -1;
try {
appId = UserHandle.getAppId(
pm.getPackageUid(packageName, MATCH_DEBUG_TRIAGED_MISSING,
targetUserId));
} catch (RemoteException e) {
}
if (appId == -1) {
Slog.w(TAG, "Invalid packageName: " + packageName);
return;
}
synchronized (this) {
synchronized (mProcLock) {
mProcessList.killPackageProcessesLSP(packageName, appId, targetUserId,
ProcessList.SERVICE_ADJ, ApplicationExitInfo.REASON_USER_REQUESTED,
ApplicationExitInfo.SUBREASON_KILL_BACKGROUND, "kill background");
}
}
}
} finally {
Binder.restoreCallingIdentity(callingId);
}
}
|
Vulnerability Classification:
- CWE: CWE-Other
- CVE: CVE-2023-21266
- Severity: HIGH
- CVSS Score: 7.8
Description: DO NOT MERGE: ActivityManager#killBackgroundProcesses can kill caller's own app only
unless it's a system app.
Bug: 239423414
Bug: 223376078
Test: atest CtsAppTestCases:ActivityManagerTest
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:fa94ce5c7738e449cb6bd68c77af4858018e49e0)
Merged-In: Iac6baa889965b8ffecd9a43179a4c96632ad1d02
Change-Id: Iac6baa889965b8ffecd9a43179a4c96632ad1d02
Function: killBackgroundProcesses
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
Fixed Code:
@Override
public void killBackgroundProcesses(final String packageName, int userId) {
if (checkCallingPermission(android.Manifest.permission.KILL_BACKGROUND_PROCESSES)
!= PackageManager.PERMISSION_GRANTED &&
checkCallingPermission(android.Manifest.permission.RESTART_PACKAGES)
!= PackageManager.PERMISSION_GRANTED) {
String msg = "Permission Denial: killBackgroundProcesses() from pid="
+ Binder.getCallingPid()
+ ", uid=" + Binder.getCallingUid()
+ " requires " + android.Manifest.permission.KILL_BACKGROUND_PROCESSES;
Slog.w(TAG, msg);
throw new SecurityException(msg);
}
final int callingUid = Binder.getCallingUid();
final int callingPid = Binder.getCallingPid();
final int callingAppId = UserHandle.getAppId(callingUid);
ProcessRecord proc;
synchronized (mPidsSelfLocked) {
proc = mPidsSelfLocked.get(callingPid);
}
final boolean hasKillAllPermission = PERMISSION_GRANTED == checkPermission(
android.Manifest.permission.FORCE_STOP_PACKAGES, callingPid, callingUid)
|| UserHandle.isCore(callingUid)
|| (proc != null && proc.info.isSystemApp());
userId = mUserController.handleIncomingUser(callingPid, callingUid,
userId, true, ALLOW_FULL_ONLY, "killBackgroundProcesses", null);
final int[] userIds = mUserController.expandUserId(userId);
final long callingId = Binder.clearCallingIdentity();
try {
IPackageManager pm = AppGlobals.getPackageManager();
for (int targetUserId : userIds) {
int appId = -1;
try {
appId = UserHandle.getAppId(
pm.getPackageUid(packageName, MATCH_DEBUG_TRIAGED_MISSING,
targetUserId));
} catch (RemoteException e) {
}
if (appId == -1 || (!hasKillAllPermission && appId != callingAppId)) {
Slog.w(TAG, "Invalid packageName: " + packageName);
return;
}
synchronized (this) {
synchronized (mProcLock) {
mProcessList.killPackageProcessesLSP(packageName, appId, targetUserId,
ProcessList.SERVICE_ADJ, ApplicationExitInfo.REASON_USER_REQUESTED,
ApplicationExitInfo.SUBREASON_KILL_BACKGROUND, "kill background");
}
}
}
} finally {
Binder.restoreCallingIdentity(callingId);
}
}
|
[
"CWE-Other"
] |
CVE-2023-21266
|
HIGH
| 7.8
|
android
|
killBackgroundProcesses
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
5b7edbf2ba076b04000eb5d27101927eeb609c26
| 1
|
Analyze the following code function for security vulnerabilities
|
private void cleanUpAppIdCreation(@NonNull ScanResult result) {
// iff we've acquired an app ID for a new package setting, remove it so that it can be
// acquired by another request.
if (result.mPkgSetting.getAppId() > 0) {
mPm.mSettings.removeAppIdLPw(result.mPkgSetting.getAppId());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cleanUpAppIdCreation
File: services/core/java/com/android/server/pm/InstallPackageHelper.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21257
|
HIGH
| 7.8
|
android
|
cleanUpAppIdCreation
|
services/core/java/com/android/server/pm/InstallPackageHelper.java
|
1aec7feaf07e6d4568ca75d18158445dbeac10f6
| 0
|
Analyze the following code function for security vulnerabilities
|
static HttpService decorate(
HttpServiceWithRoutes serviceWithRoutes,
Iterable<? extends Function<? super HttpService, ? extends HttpService>> decorators) {
HttpService decorated = serviceWithRoutes;
for (Function<? super HttpService, ? extends HttpService> d : decorators) {
checkNotNull(d, "decorators contains null: %s", decorators);
decorated = d.apply(decorated);
checkNotNull(decorated, "A decorator returned null: %s", d);
}
return decorated;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: decorate
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
|
decorate
|
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
|
df7f85824a62e997b910b5d6194a3335841065fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean getBoolean(String key) throws JSONException {
Object object = this.get(key);
if (object.equals(Boolean.FALSE)
|| (object instanceof String && ((String) object)
.equalsIgnoreCase("false"))) {
return false;
} else if (object.equals(Boolean.TRUE)
|| (object instanceof String && ((String) object)
.equalsIgnoreCase("true"))) {
return true;
}
throw wrongValueFormatException(key, "Boolean", object, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getBoolean
File: src/main/java/org/json/JSONObject.java
Repository: stleary/JSON-java
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2023-5072
|
HIGH
| 7.5
|
stleary/JSON-java
|
getBoolean
|
src/main/java/org/json/JSONObject.java
|
661114c50dcfd53bb041aab66f14bb91e0a87c8a
| 0
|
Analyze the following code function for security vulnerabilities
|
@GuardedBy("this")
void enqueueOomAdjTargetLocked(ProcessRecord app) {
mOomAdjuster.enqueueOomAdjTargetLocked(app);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: enqueueOomAdjTargetLocked
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
|
enqueueOomAdjTargetLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public final int getLineAscent(int line) {
// getLineTop(line+1) - getLineDescent(line) == getLineBaseLine(line)
return getLineTop(line) - (getLineTop(line+1) - getLineDescent(line));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLineAscent
File: core/java/android/text/Layout.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-9452
|
MEDIUM
| 4.3
|
android
|
getLineAscent
|
core/java/android/text/Layout.java
|
3b6f84b77c30ec0bab5147b0cffc192c86ba2634
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void unregisterMoveCallback(IPackageMoveObserver callback) {
mContext.enforceCallingOrSelfPermission(
android.Manifest.permission.MOUNT_UNMOUNT_FILESYSTEMS, null);
mMoveCallbacks.unregister(callback);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unregisterMoveCallback
File: services/core/java/com/android/server/pm/PackageManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2016-2497
|
HIGH
| 7.5
|
android
|
unregisterMoveCallback
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setToBigDecimal(BigDecimal n) {
setBcdToZero();
flags = 0;
if (n.signum() == -1) {
flags |= NEGATIVE_FLAG;
n = n.negate();
}
if (n.signum() != 0) {
_setToBigDecimal(n);
compact();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setToBigDecimal
File: icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_AbstractBCD.java
Repository: unicode-org/icu
The code follows secure coding practices.
|
[
"CWE-190"
] |
CVE-2018-18928
|
HIGH
| 7.5
|
unicode-org/icu
|
setToBigDecimal
|
icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_AbstractBCD.java
|
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
| 0
|
Analyze the following code function for security vulnerabilities
|
private ResourceReferenceManager getResourceReferenceManager()
{
if (this.resourceReferenceManager == null) {
this.resourceReferenceManager = Utils.getComponent(ResourceReferenceManager.class);
}
return this.resourceReferenceManager;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getResourceReferenceManager
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
|
getResourceReferenceManager
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getPackageUidEtc(String packageName, int flags, int userId) {
if (!sUserManager.exists(userId)) return -1;
enforceCrossUserPermission(Binder.getCallingUid(), userId, false, false, "get package uid");
// reader
synchronized (mPackages) {
final PackageParser.Package p = mPackages.get(packageName);
if (p != null) {
return UserHandle.getUid(userId, p.applicationInfo.uid);
}
if ((flags & PackageManager.GET_UNINSTALLED_PACKAGES) != 0) {
final PackageSetting ps = mSettings.mPackages.get(packageName);
if (ps != null) {
return UserHandle.getUid(userId, ps.appId);
}
}
}
return -1;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPackageUidEtc
File: services/core/java/com/android/server/pm/PackageManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2016-2497
|
HIGH
| 7.5
|
android
|
getPackageUidEtc
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
protected NamespaceContextImpl buildDocumentNamespaceContext() {
return new NamespaceContextImpl(xmlDocument.getDocumentElement());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: buildDocumentNamespaceContext
File: src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
Repository: jmurty/java-xmlbuilder
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2014-125087
|
MEDIUM
| 5.2
|
jmurty/java-xmlbuilder
|
buildDocumentNamespaceContext
|
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
|
e6fddca201790abab4f2c274341c0bb8835c3e73
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Queue.Item getQueueItem() {
return Jenkins.getInstance().getQueue().getItem(this);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getQueueItem
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
|
getQueueItem
|
core/src/main/java/hudson/model/AbstractProject.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean isMethodCorrect(ResolvedMethod m) {
if (m.getReturnType()!=null) {
log.error("The method {} is annotated with @SelfValidation but does not return void. It is ignored", m.getRawMember());
return false;
} else if (m.getArgumentCount() != 1 || !m.getArgumentType(0).getErasedType().equals(ViolationCollector.class)) {
log.error("The method {} is annotated with @SelfValidation but does not have a single parameter of type {}",
m.getRawMember(), ViolationCollector.class);
return false;
} else if (!m.isPublic()) {
log.error("The method {} is annotated with @SelfValidation but is not public", m.getRawMember());
return false;
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isMethodCorrect
File: dropwizard-validation/src/main/java/io/dropwizard/validation/selfvalidating/SelfValidatingValidator.java
Repository: dropwizard
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2020-11002
|
HIGH
| 9
|
dropwizard
|
isMethodCorrect
|
dropwizard-validation/src/main/java/io/dropwizard/validation/selfvalidating/SelfValidatingValidator.java
|
d5a512f7abf965275f2a6b913ac4fe778e424242
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void toNettyHttp1(
int streamId, HttpHeaders inputHeaders, io.netty.handler.codec.http.HttpHeaders outputHeaders,
HttpVersion httpVersion, boolean isTrailer, boolean isRequest) throws Http2Exception {
final CharSequenceMap translations = isRequest ? REQUEST_HEADER_TRANSLATIONS
: RESPONSE_HEADER_TRANSLATIONS;
StringJoiner cookieJoiner = null;
try {
for (Entry<AsciiString, String> entry : inputHeaders) {
final AsciiString name = entry.getKey();
final String value = entry.getValue();
final AsciiString translatedName = translations.get(name);
if (translatedName != null && !inputHeaders.contains(translatedName)) {
outputHeaders.add(translatedName, value);
continue;
}
if (name.isEmpty() || HTTP2_TO_HTTP_HEADER_BLACKLIST.contains(name)) {
continue;
}
if (isTrailer && isTrailerBlacklisted(name)) {
continue;
}
if (HttpHeaderNames.COOKIE.equals(name)) {
// combine the cookie values into 1 header entry.
// https://tools.ietf.org/html/rfc7540#section-8.1.2.5
if (cookieJoiner == null) {
cookieJoiner = new StringJoiner(COOKIE_SEPARATOR);
}
COOKIE_SPLITTER.split(value).forEach(cookieJoiner::add);
} else {
outputHeaders.add(name, value);
}
}
if (cookieJoiner != null && cookieJoiner.length() != 0) {
outputHeaders.add(HttpHeaderNames.COOKIE, cookieJoiner.toString());
}
} catch (Throwable t) {
throw streamError(streamId, PROTOCOL_ERROR, t, "HTTP/2 to HTTP/1.x headers conversion error");
}
if (!isTrailer) {
HttpUtil.setKeepAlive(outputHeaders, httpVersion, true);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toNettyHttp1
File: core/src/main/java/com/linecorp/armeria/internal/ArmeriaHttpUtil.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2019-16771
|
MEDIUM
| 5
|
line/armeria
|
toNettyHttp1
|
core/src/main/java/com/linecorp/armeria/internal/ArmeriaHttpUtil.java
|
b597f7a865a527a84ee3d6937075cfbb4470ed20
| 0
|
Analyze the following code function for security vulnerabilities
|
public ViewPage createPage(EntityReference reference, String content, String title, String syntaxId,
String parentFullPageName)
{
Map<String, String> queryMap = new HashMap<>();
if (content != null) {
queryMap.put("content", content);
}
if (title != null) {
queryMap.put("title", title);
}
if (syntaxId != null) {
queryMap.put("syntaxId", syntaxId);
}
if (parentFullPageName != null) {
queryMap.put("parent", parentFullPageName);
}
gotoPage(reference, "save", queryMap);
return new ViewPage();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createPage
File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2023-35166
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
createPage
|
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
|
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable
public static Message getMessageFromBundle(@NonNull Bundle bundle) {
try {
if (!bundle.containsKey(KEY_TEXT) || !bundle.containsKey(KEY_TIMESTAMP)) {
return null;
} else {
Person senderPerson = bundle.getParcelable(KEY_SENDER_PERSON, Person.class);
if (senderPerson == null) {
// Legacy apps that use compat don't actually provide the sender objects
// We need to fix the compat version to provide people / use
// the native api instead
CharSequence senderName = bundle.getCharSequence(KEY_SENDER);
if (senderName != null) {
senderPerson = new Person.Builder().setName(senderName).build();
}
}
Message message = new Message(bundle.getCharSequence(KEY_TEXT),
bundle.getLong(KEY_TIMESTAMP),
senderPerson,
bundle.getBoolean(KEY_REMOTE_INPUT_HISTORY, false));
if (bundle.containsKey(KEY_DATA_MIME_TYPE) &&
bundle.containsKey(KEY_DATA_URI)) {
message.setData(bundle.getString(KEY_DATA_MIME_TYPE),
bundle.getParcelable(KEY_DATA_URI, Uri.class));
}
if (bundle.containsKey(KEY_EXTRAS_BUNDLE)) {
message.getExtras().putAll(bundle.getBundle(KEY_EXTRAS_BUNDLE));
}
return message;
}
} catch (ClassCastException e) {
return null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMessageFromBundle
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
getMessageFromBundle
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
@GuardedBy("mLock")
private int getSyncDisabledModeConfigLocked() {
// Check the values used for both SYNC_DISABLED_MODE_PERSISTENT and
// SYNC_DISABLED_MODE_UNTIL_REBOOT.
// The SYNC_DISABLED_MODE_UNTIL_REBOOT value is cheap to check first.
if (mSyncConfigDisabledUntilReboot) {
return SYNC_DISABLED_MODE_UNTIL_REBOOT;
}
// Now check the global setting used to implement SYNC_DISABLED_MODE_PERSISTENT.
CallingIdentity callingIdentity = clearCallingIdentity();
try {
Setting settingLocked = mSettingsRegistry.getSettingLocked(
SETTINGS_TYPE_GLOBAL, UserHandle.USER_SYSTEM,
Global.DEVICE_CONFIG_SYNC_DISABLED);
if (settingLocked == null) {
return SYNC_DISABLED_MODE_NONE;
}
String settingValue = settingLocked.getValue();
boolean isSyncDisabledPersistent = settingValue != null && !"0".equals(settingValue);
return isSyncDisabledPersistent
? SYNC_DISABLED_MODE_PERSISTENT : SYNC_DISABLED_MODE_NONE;
} finally {
restoreCallingIdentity(callingIdentity);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSyncDisabledModeConfigLocked
File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40117
|
HIGH
| 7.8
|
android
|
getSyncDisabledModeConfigLocked
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
ff86ff28cf82124f8e65833a2dd8c319aea08945
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
boolean fillsParent() {
return mAttrs.type == TYPE_APPLICATION_STARTING;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fillsParent
File: services/core/java/com/android/server/wm/WindowState.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35674
|
HIGH
| 7.8
|
android
|
fillsParent
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
private void updateWifiConfigFromMatchingScanResult(WifiConfiguration config,
ScanResult scanResult) {
updateAllowedKeyManagementSchemesFromScanResult(config, scanResult);
if (config.isFilsSha256Enabled() || config.isFilsSha384Enabled()) {
config.enterpriseConfig.setFieldValue(WifiEnterpriseConfig.EAP_ERP, "1");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateWifiConfigFromMatchingScanResult
File: service/java/com/android/server/wifi/ClientModeImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
updateWifiConfigFromMatchingScanResult
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String processFile(File file) throws IOException
{
System.out.println("Processing " + file.getCanonicalPath() + "...");
Deflater deflater = new Deflater(Deflater.DEFAULT_COMPRESSION, true);
byte[] inBytes = encodeURIComponent(
readInputStream(new FileInputStream(file)),
CHARSET_FOR_URL_ENCODING).getBytes("UTF-8");
deflater.setInput(inBytes);
ByteArrayOutputStream outputStream = new ByteArrayOutputStream(
inBytes.length);
deflater.finish();
byte[] buffer = new byte[IO_BUFFER_SIZE];
while (!deflater.finished())
{
int count = deflater.deflate(buffer); // returns the generated code... index
outputStream.write(buffer, 0, count);
}
outputStream.close();
return encodeToString(outputStream.toByteArray(), false);
}
|
Vulnerability Classification:
- CWE: CWE-284, CWE-79
- CVE: CVE-2022-3065
- Severity: HIGH
- CVSS Score: 7.5
Description: 20.2.8 release
Function: processFile
File: etc/build/Xml2Js.java
Repository: jgraph/drawio
Fixed Code:
public static String processFile(File file) throws IOException
{
Deflater deflater = new Deflater(Deflater.BEST_COMPRESSION, true);
byte[] inBytes = readInputStream(new FileInputStream(file)).getBytes("UTF-8");
deflater.setInput(inBytes);
ByteArrayOutputStream outputStream = new ByteArrayOutputStream(
inBytes.length);
deflater.finish();
byte[] buffer = new byte[IO_BUFFER_SIZE];
while (!deflater.finished())
{
int count = deflater.deflate(buffer); // returns the generated code... index
outputStream.write(buffer, 0, count);
}
outputStream.close();
return Base64.getEncoder().encodeToString(outputStream.toByteArray());
}
|
[
"CWE-284",
"CWE-79"
] |
CVE-2022-3065
|
HIGH
| 7.5
|
jgraph/drawio
|
processFile
|
etc/build/Xml2Js.java
|
59887e45b36f06c8dd4919a32bacd994d9f084da
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public XnioWorker getWorker() {
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getWorker
File: servlet/src/main/java/io/undertow/servlet/handlers/ServletInitialHandler.java
Repository: undertow-io/undertow
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2019-10184
|
MEDIUM
| 5
|
undertow-io/undertow
|
getWorker
|
servlet/src/main/java/io/undertow/servlet/handlers/ServletInitialHandler.java
|
d2715e3afa13f50deaa19643676816ce391551e9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
@Before
public void setUp() throws Exception {
super.setUp();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUp
File: tests/src/com/android/server/telecom/tests/VideoCallTests.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
setUp
|
tests/src/com/android/server/telecom/tests/VideoCallTests.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void initialize(NotBlankConstraint constraintAnnotation) {
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initialize
File: browserup-proxy-rest/src/main/java/com/browserup/bup/rest/validation/NotBlankConstraint.java
Repository: browserup/browserup-proxy
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2020-26282
|
HIGH
| 7.5
|
browserup/browserup-proxy
|
initialize
|
browserup-proxy-rest/src/main/java/com/browserup/bup/rest/validation/NotBlankConstraint.java
|
4b38e7a3e20917e5c3329d0d4e9590bed9d578ab
| 0
|
Analyze the following code function for security vulnerabilities
|
public static File dumpStackTraces(boolean clearTraces, ArrayList<Integer> firstPids,
ProcessCpuTracker processCpuTracker, SparseArray<Boolean> lastPids, String[] nativeProcs) {
String tracesPath = SystemProperties.get("dalvik.vm.stack-trace-file", null);
if (tracesPath == null || tracesPath.length() == 0) {
return null;
}
File tracesFile = new File(tracesPath);
try {
File tracesDir = tracesFile.getParentFile();
if (!tracesDir.exists()) {
tracesDir.mkdirs();
if (!SELinux.restorecon(tracesDir)) {
return null;
}
}
FileUtils.setPermissions(tracesDir.getPath(), 0775, -1, -1); // drwxrwxr-x
if (clearTraces && tracesFile.exists()) tracesFile.delete();
tracesFile.createNewFile();
FileUtils.setPermissions(tracesFile.getPath(), 0666, -1, -1); // -rw-rw-rw-
} catch (IOException e) {
Slog.w(TAG, "Unable to prepare ANR traces file: " + tracesPath, e);
return null;
}
dumpStackTraces(tracesPath, firstPids, processCpuTracker, lastPids, nativeProcs);
return tracesFile;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpStackTraces
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3833
|
MEDIUM
| 4.3
|
android
|
dumpStackTraces
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String toString() {
return print();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toString
File: jooby/src/main/java/org/jooby/internal/RouteImpl.java
Repository: jooby-project/jooby
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-15477
|
MEDIUM
| 4.3
|
jooby-project/jooby
|
toString
|
jooby/src/main/java/org/jooby/internal/RouteImpl.java
|
34856a738829d8fedca4ed27bd6ff413af87186f
| 0
|
Analyze the following code function for security vulnerabilities
|
BroadcastQueue broadcastQueueForIntent(Intent intent) {
final boolean isFg = (intent.getFlags() & Intent.FLAG_RECEIVER_FOREGROUND) != 0;
if (DEBUG_BACKGROUND_BROADCAST) {
Slog.i(TAG, "Broadcast intent " + intent + " on "
+ (isFg ? "foreground" : "background")
+ " queue");
}
return (isFg) ? mFgBroadcastQueue : mBgBroadcastQueue;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: broadcastQueueForIntent
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3833
|
MEDIUM
| 4.3
|
android
|
broadcastQueueForIntent
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
public static final native int getGidForName(String name);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getGidForName
File: core/java/android/os/Process.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3911
|
HIGH
| 9.3
|
android
|
getGidForName
|
core/java/android/os/Process.java
|
2c7008421cb67f5d89f16911bdbe36f6c35311ad
| 0
|
Analyze the following code function for security vulnerabilities
|
private static String replaceDateWithFormat(String query, String regExp) {
List<RegExMatch> matches = RegEX.find(query, regExp);
String originalDate;
String luceneDate;
StringBuilder newQuery;
int begin;
if ((matches != null) && (0 < matches.size())) {
newQuery = new StringBuilder(query.length() * 2);
begin = 0;
for (RegExMatch regExMatch : matches) {
originalDate = regExMatch.getMatch();
luceneDate = toLuceneDate(originalDate);
luceneDate = luceneDate.substring(0, 8) + "*";
newQuery.append(query.substring(begin, regExMatch.getBegin()) + luceneDate);
begin = regExMatch.getEnd();
}
return newQuery.append(query.substring(begin)).toString();
}
return query;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: replaceDateWithFormat
File: src/com/dotcms/content/elasticsearch/business/ESContentFactoryImpl.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-2355
|
HIGH
| 7.5
|
dotCMS/core
|
replaceDateWithFormat
|
src/com/dotcms/content/elasticsearch/business/ESContentFactoryImpl.java
|
897f3632d7e471b7a73aabed5b19f6f53d4e5562
| 0
|
Analyze the following code function for security vulnerabilities
|
Class<? extends Fragment> getFragmentClass() {
return ChooseLockPatternFragment.class;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFragmentClass
File: src/com/android/settings/password/ChooseLockPattern.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40117
|
HIGH
| 7.8
|
android
|
getFragmentClass
|
src/com/android/settings/password/ChooseLockPattern.java
|
11815817de2f2d70fe842b108356a1bc75d44ffb
| 0
|
Analyze the following code function for security vulnerabilities
|
private void sendAdminCommandForLockscreenPoliciesLocked(
String action, int reqPolicy, int userHandle) {
final Bundle extras = new Bundle();
extras.putParcelable(Intent.EXTRA_USER, UserHandle.of(userHandle));
if (isSeparateProfileChallengeEnabled(userHandle)) {
sendAdminCommandLocked(action, reqPolicy, userHandle, extras);
} else {
sendAdminCommandToSelfAndProfilesLocked(action, reqPolicy, userHandle, extras);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendAdminCommandForLockscreenPoliciesLocked
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
|
sendAdminCommandForLockscreenPoliciesLocked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.