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
|
@PostMapping({"/upload/files"})
@ResponseBody
public Result uploadV2(HttpServletRequest httpServletRequest) throws URISyntaxException {
List<MultipartFile> multipartFiles = new ArrayList<>(8);
if (standardServletMultipartResolver.isMultipart(httpServletRequest)) {
MultipartHttpServletRequest multiRequest = (MultipartHttpServletRequest) httpServletRequest;
Iterator<String> iter = multiRequest.getFileNames();
int total = 0;
while (iter.hasNext()) {
if (total > 5) {
return ResultGenerator.genFailResult("最多上传5张图片");
}
total += 1;
MultipartFile file = multiRequest.getFile(iter.next());
multipartFiles.add(file);
}
}
if (CollectionUtils.isEmpty(multipartFiles)) {
return ResultGenerator.genFailResult("参数异常");
}
if (multipartFiles != null && multipartFiles.size() > 5) {
return ResultGenerator.genFailResult("最多上传5张图片");
}
List<String> fileNames = new ArrayList(multipartFiles.size());
for (int i = 0; i < multipartFiles.size(); i++) {
String fileName = multipartFiles.get(i).getOriginalFilename();
String suffixName = fileName.substring(fileName.lastIndexOf("."));
//生成文件名称通用方法
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd_HHmmss");
Random r = new Random();
StringBuilder tempName = new StringBuilder();
tempName.append(sdf.format(new Date())).append(r.nextInt(100)).append(suffixName);
String newFileName = tempName.toString();
File fileDirectory = new File(Constants.FILE_UPLOAD_DIC);
//创建文件
File destFile = new File(Constants.FILE_UPLOAD_DIC + newFileName);
try {
if (!fileDirectory.exists()) {
if (!fileDirectory.mkdir()) {
throw new IOException("文件夹创建失败,路径为:" + fileDirectory);
}
}
multipartFiles.get(i).transferTo(destFile);
fileNames.add(NewBeeMallUtils.getHost(new URI(httpServletRequest.getRequestURL() + "")) + "/upload/" + newFileName);
} catch (IOException e) {
e.printStackTrace();
return ResultGenerator.genFailResult("文件上传失败");
}
}
Result resultSuccess = ResultGenerator.genSuccessResult();
resultSuccess.setData(fileNames);
return resultSuccess;
}
|
Vulnerability Classification:
- CWE: CWE-434
- CVE: CVE-2022-27477
- Severity: HIGH
- CVSS Score: 7.5
Description: :bug: Fixing a bug ##https://github.com/newbee-ltd/newbee-mall/issues/63
Function: uploadV2
File: src/main/java/ltd/newbee/mall/controller/common/UploadController.java
Repository: newbee-ltd/newbee-mall
Fixed Code:
@PostMapping({"/upload/files"})
@ResponseBody
public Result uploadV2(HttpServletRequest httpServletRequest) throws URISyntaxException, IOException {
List<MultipartFile> multipartFiles = new ArrayList<>(8);
if (standardServletMultipartResolver.isMultipart(httpServletRequest)) {
MultipartHttpServletRequest multiRequest = (MultipartHttpServletRequest) httpServletRequest;
Iterator<String> iter = multiRequest.getFileNames();
int total = 0;
while (iter.hasNext()) {
if (total > 5) {
return ResultGenerator.genFailResult("最多上传5张图片");
}
total += 1;
MultipartFile file = multiRequest.getFile(iter.next());
BufferedImage bufferedImage = ImageIO.read(file.getInputStream());
// 只处理图片类型的文件
if (bufferedImage != null) {
multipartFiles.add(file);
}
}
}
if (CollectionUtils.isEmpty(multipartFiles)) {
return ResultGenerator.genFailResult("请选择图片类型的文件上传");
}
if (multipartFiles != null && multipartFiles.size() > 5) {
return ResultGenerator.genFailResult("最多上传5张图片");
}
List<String> fileNames = new ArrayList(multipartFiles.size());
for (int i = 0; i < multipartFiles.size(); i++) {
String fileName = multipartFiles.get(i).getOriginalFilename();
String suffixName = fileName.substring(fileName.lastIndexOf("."));
//生成文件名称通用方法
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd_HHmmss");
Random r = new Random();
StringBuilder tempName = new StringBuilder();
tempName.append(sdf.format(new Date())).append(r.nextInt(100)).append(suffixName);
String newFileName = tempName.toString();
File fileDirectory = new File(Constants.FILE_UPLOAD_DIC);
//创建文件
File destFile = new File(Constants.FILE_UPLOAD_DIC + newFileName);
try {
if (!fileDirectory.exists()) {
if (!fileDirectory.mkdir()) {
throw new IOException("文件夹创建失败,路径为:" + fileDirectory);
}
}
multipartFiles.get(i).transferTo(destFile);
fileNames.add(NewBeeMallUtils.getHost(new URI(httpServletRequest.getRequestURL() + "")) + "/upload/" + newFileName);
} catch (IOException e) {
e.printStackTrace();
return ResultGenerator.genFailResult("文件上传失败");
}
}
Result resultSuccess = ResultGenerator.genSuccessResult();
resultSuccess.setData(fileNames);
return resultSuccess;
}
|
[
"CWE-434"
] |
CVE-2022-27477
|
HIGH
| 7.5
|
newbee-ltd/newbee-mall
|
uploadV2
|
src/main/java/ltd/newbee/mall/controller/common/UploadController.java
|
a3aff8b6223c348eb723beda78c918a27941b1b2
| 1
|
Analyze the following code function for security vulnerabilities
|
protected void checkChildHierarchy(final Node newChild) throws DOMException {
Node parentNode = this;
while (parentNode != null) {
if (parentNode == newChild) {
throw new DOMException(DOMException.HIERARCHY_REQUEST_ERR, "Child node is already a parent.");
}
parentNode = parentNode.getParentNode();
}
final Document thisDocument = getOwnerDocument();
final Document childDocument = newChild.getOwnerDocument();
if (childDocument != thisDocument && childDocument != null) {
throw new DOMException(DOMException.WRONG_DOCUMENT_ERR, "Child node " + newChild.getNodeName()
+ " is not in the same Document as this " + getNodeName() + ".");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkChildHierarchy
File: src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
Repository: HtmlUnit/htmlunit
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-2798
|
HIGH
| 7.5
|
HtmlUnit/htmlunit
|
checkChildHierarchy
|
src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
|
940dc7fd
| 0
|
Analyze the following code function for security vulnerabilities
|
private void saveToScanDetailCacheForNetwork(
WifiConfiguration config, ScanDetail scanDetail) {
ScanResult scanResult = scanDetail.getScanResult();
WifiScoreCard.PerNetwork network = mWifiScoreCard.lookupNetwork(config.SSID);
network.addFrequency(scanResult.frequency);
ScanDetailCache scanDetailCache = getOrCreateScanDetailCacheForNetwork(config);
if (scanDetailCache == null) {
Log.e(TAG, "Could not allocate scan cache for " + config.getPrintableSsid());
return;
}
// Adding a new BSSID
if (config.ephemeral) {
// For an ephemeral Wi-Fi config, the ScanResult should be considered
// untrusted.
scanResult.untrusted = true;
}
// Add the scan detail to this network's scan detail cache.
scanDetailCache.put(scanDetail);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: saveToScanDetailCacheForNetwork
File: service/java/com/android/server/wifi/WifiConfigManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
saveToScanDetailCacheForNetwork
|
service/java/com/android/server/wifi/WifiConfigManager.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isIncluding() {
return this.outputStream.isIncluding();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isIncluding
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
|
isIncluding
|
src/java/winstone/WinstoneResponse.java
|
410ed3001d51c689cf59085b7417466caa2ded7b
| 0
|
Analyze the following code function for security vulnerabilities
|
@GetMapping("{postId:\\d+}/comments/tree_view")
@ApiOperation("Lists comments with tree view")
public Page<BaseCommentVO> listCommentsTree(@PathVariable("postId") Integer postId,
@RequestParam(name = "page", required = false, defaultValue = "0") int page,
@SortDefault(sort = "createTime", direction = DESC) Sort sort) {
Page<BaseCommentVO> result = postCommentService.pageVosBy(postId, PageRequest.of(page, optionService.getCommentPageSize(), sort));
return postCommentService.filterIpAddress(result);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: listCommentsTree
File: src/main/java/run/halo/app/controller/content/api/PostController.java
Repository: halo-dev/halo
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-19007
|
LOW
| 3.5
|
halo-dev/halo
|
listCommentsTree
|
src/main/java/run/halo/app/controller/content/api/PostController.java
|
d6b3d6cb5d681c7d8d64fd48de6c7c99b696bb8b
| 0
|
Analyze the following code function for security vulnerabilities
|
private void bindDelegate() {
TextView delegateView = findViewById(R.id.delegate_name);
if (!TextUtils.equals(mPackageName, mDelegatePkg)) {
// this notification was posted by a delegate!
delegateView.setVisibility(View.VISIBLE);
} else {
delegateView.setVisibility(View.GONE);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: bindDelegate
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
|
bindDelegate
|
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationConversationInfo.java
|
d21ffbe8a2eeb2a5e6da7efbb1a0430ba6b022e0
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setPassword(String password) {
for (Authentication auth : authentications.values()) {
if (auth instanceof HttpBasicAuth) {
((HttpBasicAuth) auth).setPassword(password);
return this;
}
}
throw new RuntimeException("No HTTP basic authentication configured!");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setPassword
File: samples/client/petstore/java/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
|
setPassword
|
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
|
@Override
public String getApplicationRestrictionsManagingPackage(ComponentName admin) {
final List<String> delegatePackages = getDelegatePackages(admin,
DELEGATION_APP_RESTRICTIONS);
return delegatePackages.size() > 0 ? delegatePackages.get(0) : null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getApplicationRestrictionsManagingPackage
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
|
getApplicationRestrictionsManagingPackage
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getPasswordMinimumNonLetter(ComponentName who, int userHandle, boolean parent) {
return getStrictestPasswordRequirement(who, userHandle, parent,
admin -> admin.mPasswordPolicy.nonLetter, PASSWORD_QUALITY_COMPLEX);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPasswordMinimumNonLetter
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
|
getPasswordMinimumNonLetter
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
void setActions(Rect stackBounds, @Nullable List<RemoteAction> actions,
@Nullable RemoteAction closeAction) {
mActions.clear();
if (actions != null && !actions.isEmpty()) {
mActions.addAll(actions);
}
mCloseAction = closeAction;
if (mMenuState == MENU_STATE_FULL) {
updateActionViews(mMenuState, stackBounds);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setActions
File: libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuView.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40123
|
MEDIUM
| 5.5
|
android
|
setActions
|
libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuView.java
|
7212a4bec2d2f1a74fa54a12a04255d6a183baa9
| 0
|
Analyze the following code function for security vulnerabilities
|
public ActivityManagerService getService() {
return mService;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getService
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
|
getService
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public void startLockTaskModeOnCurrent() throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startLockTaskModeOnCurrent
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
startLockTaskModeOnCurrent
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
@InlineMe(
replacement = "Files.asByteSource(file).hash(hashFunction)",
imports = "com.google.common.io.Files")
public
static HashCode hash(File file, HashFunction hashFunction) throws IOException {
return asByteSource(file).hash(hashFunction);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hash
File: android/guava/src/com/google/common/io/Files.java
Repository: google/guava
The code follows secure coding practices.
|
[
"CWE-552"
] |
CVE-2023-2976
|
HIGH
| 7.1
|
google/guava
|
hash
|
android/guava/src/com/google/common/io/Files.java
|
feb83a1c8fd2e7670b244d5afd23cba5aca43284
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable private String getConnectedBssidInternal() {
return mLastBssid;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getConnectedBssidInternal
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
|
getConnectedBssidInternal
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
public BaseObject getXObject(DocumentReference classReference, String key, String value, boolean failover)
{
try {
if (value == null) {
if (failover) {
return getXObject(classReference);
} else {
return null;
}
}
List<BaseObject> objects = getXObjects().get(classReference);
if ((objects == null) || (objects.size() == 0)) {
return null;
}
for (BaseObject obj : objects) {
if (obj != null) {
if (value.equals(obj.getStringValue(key))) {
return obj;
}
}
}
if (failover) {
return getXObject(classReference);
} else {
return null;
}
} catch (Exception e) {
if (failover) {
return getXObject(classReference);
}
LOGGER.warn("Exception while accessing objects for document [{}]: {}", getDocumentReference(),
e.getMessage(), e);
return null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getXObject
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-26470
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
getXObject
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
private String checkNull(String value) {
return TextUtils.isEmpty(value) ? sNotSet : value;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkNull
File: src/com/android/settings/network/apn/ApnEditor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40125
|
HIGH
| 7.8
|
android
|
checkNull
|
src/com/android/settings/network/apn/ApnEditor.java
|
63d464c3fa5c7b9900448fef3844790756e557eb
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequiresFeature(PackageManager.FEATURE_SECURE_LOCK_SCREEN)
public int getMaximumFailedPasswordsForWipe(@Nullable ComponentName admin) {
return getMaximumFailedPasswordsForWipe(admin, myUserId());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMaximumFailedPasswordsForWipe
File: core/java/android/app/admin/DevicePolicyManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
getMaximumFailedPasswordsForWipe
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setServletRelativeAction(String servletRelativeaction) {
this.servletRelativeAction = (servletRelativeaction != null ? servletRelativeaction : "");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setServletRelativeAction
File: spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/FormTag.java
Repository: spring-projects/spring-framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-1904
|
MEDIUM
| 4.3
|
spring-projects/spring-framework
|
setServletRelativeAction
|
spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/FormTag.java
|
741b4b229ae032bd17175b46f98673ce0bd2d485
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void close() {
if (!closed) {
try {
tokenizer.close();
closed = true;
} catch (IOException e) {
throw new JsonException(JsonMessages.PARSER_TOKENIZER_CLOSE_IO(), e);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: close
File: impl/src/main/java/org/eclipse/parsson/JsonParserImpl.java
Repository: eclipse-ee4j/parsson
The code follows secure coding practices.
|
[
"CWE-834"
] |
CVE-2023-4043
|
HIGH
| 7.5
|
eclipse-ee4j/parsson
|
close
|
impl/src/main/java/org/eclipse/parsson/JsonParserImpl.java
|
ab239fee273cb262910890f1a6fe666ae92cd623
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onUserStopping(@NonNull TargetUser user) {
if (user.isPreCreated()) return;
mService.handleStopUser(user.getUserIdentifier());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onUserStopping
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
|
onUserStopping
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable
public BackgroundActivityStartCallback getBackgroundActivityStartCallback() {
return mBackgroundActivityStartCallback;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getBackgroundActivityStartCallback
File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40094
|
HIGH
| 7.8
|
android
|
getBackgroundActivityStartCallback
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isAlphaMutableImageSupported() {
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isAlphaMutableImageSupported
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
|
isAlphaMutableImageSupported
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setSuccessRedirectURI(URI uri)
{
setSessionAttribute(PROP_INITIAL_REQUEST, uri);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSuccessRedirectURI
File: oidc-authenticator/src/main/java/org/xwiki/contrib/oidc/auth/internal/OIDCClientConfiguration.java
Repository: xwiki-contrib/oidc
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2022-39387
|
HIGH
| 7.5
|
xwiki-contrib/oidc
|
setSuccessRedirectURI
|
oidc-authenticator/src/main/java/org/xwiki/contrib/oidc/auth/internal/OIDCClientConfiguration.java
|
0247af1417925b9734ab106ad7cd934ee870ac89
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean hasDocuments(SpaceReference spaceReference, Session session, String extraWhere,
Map<String, ?> parameters)
{
StringBuilder builder = new StringBuilder(
"select distinct xwikidoc.space from XWikiDocument as xwikidoc where (space = :space OR space LIKE :like)");
if (StringUtils.isNotEmpty(extraWhere)) {
builder.append(" AND ");
builder.append('(');
builder.append(extraWhere);
builder.append(')');
}
Query<String> query = session.createQuery(builder.toString(), String.class);
String localSpaceReference = this.localEntityReferenceSerializer.serialize(spaceReference);
String localSpaceReferencePrefix = localSpaceReference + '.';
query.setParameter("space", localSpaceReference);
query.setParameter("like", localSpaceReferencePrefix + "%");
if (parameters != null) {
parameters.forEach(query::setParameter);
}
// Leading and trailing white spaces are not taken into account in SQL comparisons so we have to make sure the
// matched spaces really are the expected ones
for (String result : query.getResultList()) {
if (result.equals(localSpaceReference) || result.startsWith(localSpaceReferencePrefix)) {
return true;
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasDocuments
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-459"
] |
CVE-2023-36468
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
hasDocuments
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
|
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setCommonCriteriaModeEnabled(ComponentName who, boolean enabled) {
Objects.requireNonNull(who, "Admin component name must be provided");
final CallerIdentity caller = getCallerIdentity(who);
Preconditions.checkCallAuthorization(
isDefaultDeviceOwner(caller) || isProfileOwnerOfOrganizationOwnedDevice(caller),
"Common Criteria mode can only be controlled by a device owner or "
+ "a profile owner on an organization-owned device.");
synchronized (getLockObject()) {
final ActiveAdmin admin = getProfileOwnerOrDeviceOwnerLocked(caller);
admin.mCommonCriteriaMode = enabled;
saveSettingsLocked(caller.getUserId());
}
DevicePolicyEventLogger
.createEvent(DevicePolicyEnums.SET_COMMON_CRITERIA_MODE)
.setAdmin(who)
.setBoolean(enabled)
.write();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setCommonCriteriaModeEnabled
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
|
setCommonCriteriaModeEnabled
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test(description = "Test push all packages in project to central", enabled = false)
public void testPushAllPackages() throws Exception {
// Test ballerina init
Path projectPath = tempProjectDirectory.resolve("pushAllPackageTest");
// Create project
balClient.runMain("new", new String[]{"pushAllPackageTest"}, envVariables, new String[]{}, new LogLeecher[]{},
projectPath.getParent().toString());
Assert.assertTrue(Files.exists(projectPath));
Assert.assertTrue(Files.isDirectory(projectPath));
String firstPackage = "firstTestPkg" + PackerinaTestUtils.randomModuleName(10);
String secondPackage = "secondTestPkg" + PackerinaTestUtils.randomModuleName(10);
// update org name
PackerinaTestUtils.updateManifestOrgName(projectPath, orgName);
// Create first module
balClient.runMain("add", new String[]{firstPackage}, envVariables, new String[]{}, new LogLeecher[]{},
projectPath.toString());
Assert.assertTrue(Files.exists(projectPath.resolve("src").resolve(firstPackage)));
Assert.assertTrue(Files.isDirectory(projectPath.resolve("src").resolve(firstPackage)));
// Create second module
balClient.runMain("add", new String[]{secondPackage}, envVariables, new String[]{}, new LogLeecher[]{},
projectPath.toString());
Assert.assertTrue(Files.exists(projectPath.resolve("src").resolve(secondPackage)));
Assert.assertTrue(Files.isDirectory(projectPath.resolve("src").resolve(secondPackage)));
// Build module
balClient.runMain("build", new String[]{"-c", "-a"}, envVariables, new String[]{},
new LogLeecher[]{}, projectPath.toString());
LogLeecher clientLeecherOne = new LogLeecher(orgName + "/" + firstPackage + ":0.1.0"
+ REPO_TO_CENTRAL_SUCCESS_MSG);
LogLeecher clientLeecherTwo = new LogLeecher(orgName + "/" + secondPackage + ":0.1.0"
+ REPO_TO_CENTRAL_SUCCESS_MSG);
balClient.runMain("push", new String[]{"-a"}, envVariables, new String[]{},
new LogLeecher[]{clientLeecherOne, clientLeecherTwo}, projectPath.toString());
clientLeecherOne.waitForText(60000);
clientLeecherTwo.waitForText(60000);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: testPushAllPackages
File: tests/jballerina-integration-test/src/test/java/org/ballerinalang/test/packaging/PackagingTestCase.java
Repository: ballerina-platform/ballerina-lang
The code follows secure coding practices.
|
[
"CWE-306"
] |
CVE-2021-32700
|
MEDIUM
| 5.8
|
ballerina-platform/ballerina-lang
|
testPushAllPackages
|
tests/jballerina-integration-test/src/test/java/org/ballerinalang/test/packaging/PackagingTestCase.java
|
4609ffee1744ecd16aac09303b1783bf0a525816
| 0
|
Analyze the following code function for security vulnerabilities
|
public ViewPage createPage(List<String> spaces, String page, String content, String title)
{
return createPage(spaces, page, content, title, null);
}
|
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
|
@Override
public void onNotificationClick(int callingUid, int callingPid, String key) {
synchronized (mNotificationList) {
NotificationRecord r = mNotificationsByKey.get(key);
if (r == null) {
Log.w(TAG, "No notification with key: " + key);
return;
}
final long now = System.currentTimeMillis();
EventLogTags.writeNotificationClicked(key,
r.getLifespanMs(now), r.getFreshnessMs(now), r.getExposureMs(now));
StatusBarNotification sbn = r.sbn;
cancelNotification(callingUid, callingPid, sbn.getPackageName(), sbn.getTag(),
sbn.getId(), Notification.FLAG_AUTO_CANCEL,
Notification.FLAG_FOREGROUND_SERVICE, false, r.getUserId(),
REASON_DELEGATE_CLICK, null);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onNotificationClick
File: services/core/java/com/android/server/notification/NotificationManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3884
|
MEDIUM
| 4.3
|
android
|
onNotificationClick
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
public void handleApplicationStrictModeViolation(
IBinder app,
int penaltyMask,
StrictMode.ViolationInfo info) {
// We're okay if the ProcessRecord is missing; it probably means that
// we're reporting a violation from the system process itself.
final ProcessRecord r = findAppProcess(app, "StrictMode");
if ((penaltyMask & StrictMode.PENALTY_DROPBOX) != 0) {
Integer stackFingerprint = info.hashCode();
boolean logIt = true;
synchronized (mAlreadyLoggedViolatedStacks) {
if (mAlreadyLoggedViolatedStacks.contains(stackFingerprint)) {
logIt = false;
// TODO: sub-sample into EventLog for these, with
// the info.durationMillis? Then we'd get
// the relative pain numbers, without logging all
// the stack traces repeatedly. We'd want to do
// likewise in the client code, which also does
// dup suppression, before the Binder call.
} else {
if (mAlreadyLoggedViolatedStacks.size() >= MAX_DUP_SUPPRESSED_STACKS) {
mAlreadyLoggedViolatedStacks.clear();
}
mAlreadyLoggedViolatedStacks.add(stackFingerprint);
}
}
if (logIt) {
logStrictModeViolationToDropBox(r, info);
}
}
if ((penaltyMask & StrictMode.PENALTY_DIALOG) != 0) {
AppErrorResult result = new AppErrorResult();
final long origId = Binder.clearCallingIdentity();
try {
Message msg = Message.obtain();
msg.what = SHOW_STRICT_MODE_VIOLATION_UI_MSG;
HashMap<String, Object> data = new HashMap<String, Object>();
data.put("result", result);
data.put("app", r);
data.put("info", info);
msg.obj = data;
mUiHandler.sendMessage(msg);
} finally {
Binder.restoreCallingIdentity(origId);
}
int res = result.get();
Slog.w(TAG, "handleApplicationStrictModeViolation; res=" + res);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleApplicationStrictModeViolation
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
|
handleApplicationStrictModeViolation
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public JSONArray getUserNav(ID user, HttpServletRequest request) {
ConfigBean config = null;
if (request != null) {
String useNav = ServletUtils.readCookie(request, "AppHome.Nav");
ID useNavId;
if ((useNavId = MetadataHelper.checkSpecEntityId(useNav, EntityHelper.LayoutConfig)) != null) {
Object[][] cached = getAllConfig(null, TYPE_NAV);
config = findConfigBean(cached, useNavId);
}
}
if (config == null) {
config = getLayoutOfNav(user);
}
if (config == null) {
JSONArray useDefault = replaceLang(NAVS_DEFAULT);
((JSONObject) useDefault.get(1)).put("sub", buildAvailableProjects(user));
return useDefault;
}
// 过滤
JSONArray navs = (JSONArray) config.getJSON("config");
for (Iterator<Object> iter = navs.iterator(); iter.hasNext(); ) {
JSONObject nav = (JSONObject) iter.next();
JSONArray subNavs = nav.getJSONArray("sub");
// 父级菜单
if (subNavs != null && !subNavs.isEmpty()) {
for (Iterator<Object> subIter = subNavs.iterator(); subIter.hasNext(); ) {
JSONObject subNav = (JSONObject) subIter.next();
if (isFilterNavItem(subNav, user)) {
subIter.remove();
}
}
// 无子级,移除主菜单
if (subNavs.isEmpty()) iter.remove();
} else if (isFilterNavItem(nav, user)) {
iter.remove();
} else if (NAV_PROJECT.equals(nav.getString("value"))) {
nav.put("sub", buildAvailableProjects(user));
}
}
PTOKEN_IFNEED.remove();
return navs;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserNav
File: src/main/java/com/rebuild/core/configuration/NavBuilder.java
Repository: getrebuild/rebuild
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2023-1495
|
MEDIUM
| 6.5
|
getrebuild/rebuild
|
getUserNav
|
src/main/java/com/rebuild/core/configuration/NavBuilder.java
|
c9474f84e5f376dd2ade2078e3039961a9425da7
| 0
|
Analyze the following code function for security vulnerabilities
|
private ConsoleResult diffTree(String node) {
CommandLine gitCmd = gitWd().withArgs("diff-tree", "--name-status", "--root", "-r", node);
return runOrBomb(gitCmd);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: diffTree
File: domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-77"
] |
CVE-2021-43286
|
MEDIUM
| 6.5
|
gocd
|
diffTree
|
domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
|
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean onGenericMotionEvent(MotionEvent event) {
if ((event.getSource() & InputDevice.SOURCE_CLASS_POINTER) != 0) {
switch (event.getAction()) {
case MotionEvent.ACTION_SCROLL:
if (mNativeContentViewCore == 0) return false;
nativeSendMouseWheelEvent(mNativeContentViewCore, event.getEventTime(),
event.getX(), event.getY(),
event.getAxisValue(MotionEvent.AXIS_VSCROLL));
mContainerView.removeCallbacks(mFakeMouseMoveRunnable);
// Send a delayed onMouseMove event so that we end
// up hovering over the right position after the scroll.
final MotionEvent eventFakeMouseMove = MotionEvent.obtain(event);
mFakeMouseMoveRunnable = new Runnable() {
@Override
public void run() {
onHoverEvent(eventFakeMouseMove);
eventFakeMouseMove.recycle();
}
};
mContainerView.postDelayed(mFakeMouseMoveRunnable, 250);
return true;
}
}
return mContainerViewInternals.super_onGenericMotionEvent(event);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onGenericMotionEvent
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
onGenericMotionEvent
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void parseQueryMTypeWWildcardFilterExplicit() throws Exception {
HttpQuery query = NettyMocks.getQuery(tsdb,
"/api/query?start=1h-ago&m=sum:sys.cpu.0{}{host=wildcard(*quirm)}");
TSQuery tsq = (TSQuery) parseQuery.invoke(rpc, tsdb, query, expressions);
TSSubQuery sub = tsq.getQueries().get(0);
sub.validateAndSetQuery();
assertEquals(1, sub.getFilters().size());
assertTrue(sub.getFilters().get(0) instanceof TagVWildcardFilter);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseQueryMTypeWWildcardFilterExplicit
File: test/tsd/TestQueryRpc.java
Repository: OpenTSDB/opentsdb
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-25827
|
MEDIUM
| 6.1
|
OpenTSDB/opentsdb
|
parseQueryMTypeWWildcardFilterExplicit
|
test/tsd/TestQueryRpc.java
|
ff02c1e95e60528275f69b31bcbf7b2ac625cea8
| 0
|
Analyze the following code function for security vulnerabilities
|
public ConnectionFactory load(String propertyFileLocation) throws IOException {
ConnectionFactoryConfigurator.load(this, propertyFileLocation);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: load
File: src/main/java/com/rabbitmq/client/ConnectionFactory.java
Repository: rabbitmq/rabbitmq-java-client
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-46120
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-java-client
|
load
|
src/main/java/com/rabbitmq/client/ConnectionFactory.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getResourceAsString(String providerName, String resourcePath) throws IOException {
File file = getResource(providerName, resourcePath);
if (file == null) {
return null;
}
return OpenmrsUtil.getFileAsString(file);
}
|
Vulnerability Classification:
- CWE: CWE-22
- CVE: CVE-2020-24621
- Severity: MEDIUM
- CVSS Score: 6.5
Description: UIFR-215: Do not allow loading arbitrary files
Function: getResourceAsString
File: api/src/main/java/org/openmrs/ui/framework/resource/ResourceFactory.java
Repository: openmrs/openmrs-module-uiframework
Fixed Code:
public String getResourceAsString(String providerName, String resourcePath) throws IOException {
File file = getResource(providerName, resourcePath);
if (file == null) {
return null;
}
return OpenmrsUtil.getFileAsString(file);
}
|
[
"CWE-22"
] |
CVE-2020-24621
|
MEDIUM
| 6.5
|
openmrs/openmrs-module-uiframework
|
getResourceAsString
|
api/src/main/java/org/openmrs/ui/framework/resource/ResourceFactory.java
|
0422fa52c7eba3d96cce2936cb92897dca4b680a
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onModeChange(AjaxRequestTarget target, Mode mode, @Nullable String newPath) {
onModeChange(target, mode, false, newPath);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onModeChange
File: server-core/src/main/java/io/onedev/server/web/page/project/blob/ProjectBlobPage.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-434"
] |
CVE-2021-21245
|
HIGH
| 7.5
|
theonedev/onedev
|
onModeChange
|
server-core/src/main/java/io/onedev/server/web/page/project/blob/ProjectBlobPage.java
|
0c060153fb97c0288a1917efdb17cc426934dacb
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Jooby use(final String path, final Jooby app) {
return use(prefixPath(path), app);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: use
File: jooby/src/main/java/org/jooby/Jooby.java
Repository: jooby-project/jooby
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-7647
|
MEDIUM
| 5
|
jooby-project/jooby
|
use
|
jooby/src/main/java/org/jooby/Jooby.java
|
34f526028e6cd0652125baa33936ffb6a8a4a009
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean sanitizeUrl(String url)
{
if (url != null)
{
try
{
URL parsedUrl = new URL(url);
String protocol = parsedUrl.getProtocol();
String host = parsedUrl.getHost();
InetAddress address = InetAddress.getByName(host);
String hostAddress = address.getHostAddress();
host = host.toLowerCase();
return (protocol.equals("http") || protocol.equals("https"))
&& !address.isAnyLocalAddress()
&& !address.isLoopbackAddress()
&& !address.isLinkLocalAddress()
&& !host.endsWith(".internal") // Redundant
&& !host.endsWith(".local") // Redundant
&& !host.contains("localhost") // Redundant
&& !hostAddress.startsWith("0.") // 0.0.0.0/8
&& !hostAddress.startsWith("10.") // 10.0.0.0/8
&& !hostAddress.startsWith("127.") // 127.0.0.0/8
&& !hostAddress.startsWith("169.254.") // 169.254.0.0/16
&& !hostAddress.startsWith("172.16.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.17.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.18.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.19.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.20.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.21.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.22.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.23.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.24.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.25.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.26.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.27.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.28.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.29.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.30.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.31.") // 172.16.0.0/12
&& !hostAddress.startsWith("192.0.0.") // 192.0.0.0/24
&& !hostAddress.startsWith("192.168.") // 192.168.0.0/16
&& !hostAddress.startsWith("198.18.") // 198.18.0.0/15
&& !hostAddress.startsWith("198.19.") // 198.18.0.0/15
&& !hostAddress.startsWith("fc00::") // fc00::/7 https://stackoverflow.com/questions/53764109/is-there-a-java-api-that-will-identify-the-ipv6-address-fd00-as-local-private
&& !hostAddress.startsWith("fd00::") // fd00::/8
&& !host.endsWith(".arpa"); // reverse domain (needed?)
}
catch (MalformedURLException e)
{
return false;
}
catch (UnknownHostException e)
{
return false;
}
}
else
{
return false;
}
}
|
Vulnerability Classification:
- CWE: CWE-284, CWE-79
- CVE: CVE-2022-3065
- Severity: HIGH
- CVSS Score: 7.5
Description: 20.2.8 release
Function: sanitizeUrl
File: src/main/java/com/mxgraph/online/Utils.java
Repository: jgraph/drawio
Fixed Code:
public static boolean sanitizeUrl(String url)
{
if (url != null)
{
try
{
URL parsedUrl = new URL(url);
String protocol = parsedUrl.getProtocol();
String host = parsedUrl.getHost();
InetAddress address = InetAddress.getByName(host);
String hostAddress = address.getHostAddress();
host = host.toLowerCase();
return (protocol.equals("http") || protocol.equals("https"))
&& !address.isAnyLocalAddress()
&& !address.isLoopbackAddress()
&& !address.isLinkLocalAddress()
&& allowedPorts.contains(parsedUrl.getPort())
&& !host.endsWith(".internal") // Redundant
&& !host.endsWith(".local") // Redundant
&& !host.contains("localhost") // Redundant
&& !hostAddress.startsWith("0.") // 0.0.0.0/8
&& !hostAddress.startsWith("10.") // 10.0.0.0/8
&& !hostAddress.startsWith("127.") // 127.0.0.0/8
&& !hostAddress.startsWith("169.254.") // 169.254.0.0/16
&& !hostAddress.startsWith("172.16.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.17.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.18.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.19.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.20.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.21.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.22.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.23.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.24.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.25.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.26.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.27.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.28.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.29.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.30.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.31.") // 172.16.0.0/12
&& !hostAddress.startsWith("192.0.0.") // 192.0.0.0/24
&& !hostAddress.startsWith("192.168.") // 192.168.0.0/16
&& !hostAddress.startsWith("198.18.") // 198.18.0.0/15
&& !hostAddress.startsWith("198.19.") // 198.18.0.0/15
&& !hostAddress.startsWith("fc00::") // fc00::/7 https://stackoverflow.com/questions/53764109/is-there-a-java-api-that-will-identify-the-ipv6-address-fd00-as-local-private
&& !hostAddress.startsWith("fd00::") // fd00::/8
&& !host.endsWith(".arpa"); // reverse domain (needed?)
}
catch (MalformedURLException e)
{
return false;
}
catch (UnknownHostException e)
{
return false;
}
}
else
{
return false;
}
}
|
[
"CWE-284",
"CWE-79"
] |
CVE-2022-3065
|
HIGH
| 7.5
|
jgraph/drawio
|
sanitizeUrl
|
src/main/java/com/mxgraph/online/Utils.java
|
59887e45b36f06c8dd4919a32bacd994d9f084da
| 1
|
Analyze the following code function for security vulnerabilities
|
public void setVersioningStore(XWikiVersioningStoreInterface versioningStore)
{
this.versioningStore = versioningStore;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setVersioningStore
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
|
setVersioningStore
|
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 void startAddAccountSession(
final IAccountManagerResponse response,
final String accountType,
final String authTokenType,
final String[] requiredFeatures,
final boolean expectActivityLaunch,
final Bundle optionsIn) {
Bundle.setDefusable(optionsIn, true);
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.v(TAG,
"startAddAccountSession: accountType " + accountType
+ ", response " + response
+ ", authTokenType " + authTokenType
+ ", requiredFeatures " + Arrays.toString(requiredFeatures)
+ ", expectActivityLaunch " + expectActivityLaunch
+ ", caller's uid " + Binder.getCallingUid()
+ ", pid " + Binder.getCallingPid());
}
Preconditions.checkArgument(response != null, "response cannot be null");
Preconditions.checkArgument(accountType != null, "accountType cannot be null");
final int uid = Binder.getCallingUid();
final int userId = UserHandle.getUserId(uid);
if (!canUserModifyAccounts(userId, uid)) {
try {
response.onError(AccountManager.ERROR_CODE_USER_RESTRICTED,
"User is not allowed to add an account!");
} catch (RemoteException re) {
}
showCantAddAccount(AccountManager.ERROR_CODE_USER_RESTRICTED, userId);
return;
}
if (!canUserModifyAccountsForType(userId, accountType, uid)) {
try {
response.onError(AccountManager.ERROR_CODE_MANAGEMENT_DISABLED_FOR_ACCOUNT_TYPE,
"User cannot modify accounts of this type (policy).");
} catch (RemoteException re) {
}
showCantAddAccount(AccountManager.ERROR_CODE_MANAGEMENT_DISABLED_FOR_ACCOUNT_TYPE,
userId);
return;
}
final int pid = Binder.getCallingPid();
final Bundle options = (optionsIn == null) ? new Bundle() : optionsIn;
options.putInt(AccountManager.KEY_CALLER_UID, uid);
options.putInt(AccountManager.KEY_CALLER_PID, pid);
// Check to see if the Password should be included to the caller.
String callerPkg = options.getString(AccountManager.KEY_ANDROID_PACKAGE_NAME);
boolean isPasswordForwardingAllowed = checkPermissionAndNote(
callerPkg, uid, Manifest.permission.GET_PASSWORD);
final long identityToken = clearCallingIdentity();
try {
UserAccounts accounts = getUserAccounts(userId);
logRecordWithUid(accounts, AccountsDb.DEBUG_ACTION_CALLED_START_ACCOUNT_ADD,
AccountsDb.TABLE_ACCOUNTS, uid);
new StartAccountSession(
accounts,
response,
accountType,
expectActivityLaunch,
null /* accountName */,
false /* authDetailsRequired */,
true /* updateLastAuthenticationTime */,
isPasswordForwardingAllowed) {
@Override
public void run() throws RemoteException {
mAuthenticator.startAddAccountSession(this, mAccountType, authTokenType,
requiredFeatures, options);
logAddAccountMetrics(callerPkg, accountType, requiredFeatures, authTokenType);
}
@Override
protected String toDebugString(long now) {
String requiredFeaturesStr = TextUtils.join(",", requiredFeatures);
return super.toDebugString(now) + ", startAddAccountSession" + ", accountType "
+ accountType + ", requiredFeatures "
+ (requiredFeatures != null ? requiredFeaturesStr : null);
}
}.bind();
} finally {
restoreCallingIdentity(identityToken);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startAddAccountSession
File: services/core/java/com/android/server/accounts/AccountManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-502"
] |
CVE-2023-45777
|
HIGH
| 7.8
|
android
|
startAddAccountSession
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequiresPermission(value = Manifest.permission.WHITELIST_AUTO_REVOKE_PERMISSIONS,
conditional = true)
public boolean isAutoRevokeExempted(@NonNull String packageName) {
try {
return mPermissionManager.isAutoRevokeExempted(packageName, mContext.getUserId());
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isAutoRevokeExempted
File: core/java/android/permission/PermissionManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-281"
] |
CVE-2023-21249
|
MEDIUM
| 5.5
|
android
|
isAutoRevokeExempted
|
core/java/android/permission/PermissionManager.java
|
c00b7e7dbc1fa30339adef693d02a51254755d7f
| 0
|
Analyze the following code function for security vulnerabilities
|
public void onScreenTurningOn() {
mScreenTurningOn = true;
mFalsingManager.onScreenTurningOn();
mNotificationPanel.onScreenTurningOn();
if (mLaunchCameraOnScreenTurningOn) {
mNotificationPanel.launchCamera(false, mLastCameraLaunchSource);
mLaunchCameraOnScreenTurningOn = false;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onScreenTurningOn
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
onScreenTurningOn
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public boolean getCrossProfileContactsSearchDisabled(@NonNull UserHandle userHandle) {
if (mService != null) {
try {
return mService
.getCrossProfileContactsSearchDisabledForUser(userHandle.getIdentifier());
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCrossProfileContactsSearchDisabled
File: core/java/android/app/admin/DevicePolicyManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
getCrossProfileContactsSearchDisabled
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public BigDecimal bigDecimalValue() {
return bigDecimal;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: bigDecimalValue
File: impl/src/main/java/org/eclipse/parsson/JsonNumberImpl.java
Repository: eclipse-ee4j/parsson
The code follows secure coding practices.
|
[
"CWE-834"
] |
CVE-2023-4043
|
HIGH
| 7.5
|
eclipse-ee4j/parsson
|
bigDecimalValue
|
impl/src/main/java/org/eclipse/parsson/JsonNumberImpl.java
|
84764ffbe3d0376da242b27a9a526138d0dfb8e6
| 0
|
Analyze the following code function for security vulnerabilities
|
private <T> Map<String, T> stripCallResult(Map<String, CallResult<T>> input) {
return input.entrySet().stream()
.filter(e -> e.getValue().response() != null && e.getValue().response().entity().isPresent())
.collect(Collectors.toMap(Map.Entry::getKey, v -> v.getValue().response().entity().get()));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: stripCallResult
File: graylog2-server/src/main/java/org/graylog2/rest/resources/system/debug/bundle/SupportBundleService.java
Repository: Graylog2/graylog2-server
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2023-41044
|
LOW
| 3.8
|
Graylog2/graylog2-server
|
stripCallResult
|
graylog2-server/src/main/java/org/graylog2/rest/resources/system/debug/bundle/SupportBundleService.java
|
02b8792e6f4b829f0c1d87fcbf2d58b73458b938
| 0
|
Analyze the following code function for security vulnerabilities
|
public Integer getModified() {
return modified;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getModified
File: src/main/java/cn/luischen/model/ContentDomain.java
Repository: WinterChenS/my-site
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-29638
|
MEDIUM
| 5.4
|
WinterChenS/my-site
|
getModified
|
src/main/java/cn/luischen/model/ContentDomain.java
|
d104f38aaae2f1b76c33fadfcf6b1ef1c6c340ed
| 0
|
Analyze the following code function for security vulnerabilities
|
public void clickAdd(Object idOrAlias) {
Log log = findByIdOrAlias(idOrAlias);
if (log != null) {
log.set("logId", log.getInt("logId")).set("click", log.getInt("click") + 1).update();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clickAdd
File: data/src/main/java/com/zrlog/model/Log.java
Repository: 94fzb/zrlog
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2018-17420
|
MEDIUM
| 6.5
|
94fzb/zrlog
|
clickAdd
|
data/src/main/java/com/zrlog/model/Log.java
|
157b8fbbb64eb22ddb52e7c5754e88180b7c3d4f
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<MsExecResponseDTO> run(RunScenarioRequest request) {
return apiScenarioExecuteService.run(request);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: run
File: backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2021-45789
|
MEDIUM
| 6.5
|
metersphere
|
run
|
backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java
|
d74e02cdff47cdf7524d305d098db6ffb7f61b47
| 0
|
Analyze the following code function for security vulnerabilities
|
void invokeNextAgent() {
mStatus = BackupTransport.TRANSPORT_OK;
addBackupTrace("invoke q=" + mQueue.size());
// Sanity check that we have work to do. If not, skip to the end where
// we reestablish the wakelock invariants etc.
if (mQueue.isEmpty()) {
if (MORE_DEBUG) Slog.i(TAG, "queue now empty");
executeNextState(BackupState.FINAL);
return;
}
// pop the entry we're going to process on this step
BackupRequest request = mQueue.get(0);
mQueue.remove(0);
Slog.d(TAG, "starting key/value backup of " + request);
addBackupTrace("launch agent for " + request.packageName);
// Verify that the requested app exists; it might be something that
// requested a backup but was then uninstalled. The request was
// journalled and rather than tamper with the journal it's safer
// to sanity-check here. This also gives us the classname of the
// package's backup agent.
try {
mCurrentPackage = mPackageManager.getPackageInfo(request.packageName,
PackageManager.GET_SIGNATURES);
if (!appIsEligibleForBackup(mCurrentPackage.applicationInfo)) {
// The manifest has changed but we had a stale backup request pending.
// This won't happen again because the app won't be requesting further
// backups.
Slog.i(TAG, "Package " + request.packageName
+ " no longer supports backup; skipping");
addBackupTrace("skipping - not eligible, completion is noop");
executeNextState(BackupState.RUNNING_QUEUE);
return;
}
if (appGetsFullBackup(mCurrentPackage)) {
// It's possible that this app *formerly* was enqueued for key/value backup,
// but has since been updated and now only supports the full-data path.
// Don't proceed with a key/value backup for it in this case.
Slog.i(TAG, "Package " + request.packageName
+ " requests full-data rather than key/value; skipping");
addBackupTrace("skipping - fullBackupOnly, completion is noop");
executeNextState(BackupState.RUNNING_QUEUE);
return;
}
if ((mCurrentPackage.applicationInfo.flags & ApplicationInfo.FLAG_STOPPED) != 0) {
// The app has been force-stopped or cleared or just installed,
// and not yet launched out of that state, so just as it won't
// receive broadcasts, we won't run it for backup.
addBackupTrace("skipping - stopped");
executeNextState(BackupState.RUNNING_QUEUE);
return;
}
IBackupAgent agent = null;
try {
mWakelock.setWorkSource(new WorkSource(mCurrentPackage.applicationInfo.uid));
agent = bindToAgentSynchronous(mCurrentPackage.applicationInfo,
IApplicationThread.BACKUP_MODE_INCREMENTAL);
addBackupTrace("agent bound; a? = " + (agent != null));
if (agent != null) {
mAgentBinder = agent;
mStatus = invokeAgentForBackup(request.packageName, agent, mTransport);
// at this point we'll either get a completion callback from the
// agent, or a timeout message on the main handler. either way, we're
// done here as long as we're successful so far.
} else {
// Timeout waiting for the agent
mStatus = BackupTransport.AGENT_ERROR;
}
} catch (SecurityException ex) {
// Try for the next one.
Slog.d(TAG, "error in bind/backup", ex);
mStatus = BackupTransport.AGENT_ERROR;
addBackupTrace("agent SE");
}
} catch (NameNotFoundException e) {
Slog.d(TAG, "Package does not exist; skipping");
addBackupTrace("no such package");
mStatus = BackupTransport.AGENT_UNKNOWN;
} finally {
mWakelock.setWorkSource(null);
// If there was an agent error, no timeout/completion handling will occur.
// That means we need to direct to the next state ourselves.
if (mStatus != BackupTransport.TRANSPORT_OK) {
BackupState nextState = BackupState.RUNNING_QUEUE;
mAgentBinder = null;
// An agent-level failure means we reenqueue this one agent for
// a later retry, but otherwise proceed normally.
if (mStatus == BackupTransport.AGENT_ERROR) {
if (MORE_DEBUG) Slog.i(TAG, "Agent failure for " + request.packageName
+ " - restaging");
dataChangedImpl(request.packageName);
mStatus = BackupTransport.TRANSPORT_OK;
if (mQueue.isEmpty()) nextState = BackupState.FINAL;
} else if (mStatus == BackupTransport.AGENT_UNKNOWN) {
// Failed lookup of the app, so we couldn't bring up an agent, but
// we're otherwise fine. Just drop it and go on to the next as usual.
mStatus = BackupTransport.TRANSPORT_OK;
} else {
// Transport-level failure means we reenqueue everything
revertAndEndBackup();
nextState = BackupState.FINAL;
}
executeNextState(nextState);
} else {
// success case
addBackupTrace("expecting completion/timeout callback");
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: invokeNextAgent
File: services/backup/java/com/android/server/backup/BackupManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3759
|
MEDIUM
| 5
|
android
|
invokeNextAgent
|
services/backup/java/com/android/server/backup/BackupManagerService.java
|
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("unchecked")
private <K, V> RemoteCache<K, V> createRemoteCache(String cacheName, Boolean forceReturnValueOverride) {
synchronized (cacheName2RemoteCache) {
RemoteCacheKey key = new RemoteCacheKey(cacheName, forceReturnValueOverride);
if (!cacheName2RemoteCache.containsKey(key)) {
RemoteCacheImpl<K, V> result = createRemoteCache(cacheName);
RemoteCacheHolder rcc = new RemoteCacheHolder(result, forceReturnValueOverride);
startRemoteCache(rcc);
PingResult pingResult = result.resolveCompatibility();
// If ping not successful assume that the cache does not exist
// Default cache is always started, so don't do for it
if (!cacheName.equals(RemoteCacheManager.DEFAULT_CACHE_NAME) &&
pingResult == PingResult.CACHE_DOES_NOT_EXIST) {
return null;
}
result.start();
// If ping on startup is disabled, or cache is defined in server
cacheName2RemoteCache.put(key, rcc);
return result;
} else {
return (RemoteCache<K, V>) cacheName2RemoteCache.get(key).remoteCache;
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createRemoteCache
File: client/hotrod-client/src/main/java/org/infinispan/client/hotrod/RemoteCacheManager.java
Repository: infinispan
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2017-15089
|
MEDIUM
| 6.5
|
infinispan
|
createRemoteCache
|
client/hotrod-client/src/main/java/org/infinispan/client/hotrod/RemoteCacheManager.java
|
efc44b7b0a5dd4f44773808840dd9785cabcf21c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<UserHandle> getPolicyManagedProfiles(@NonNull UserHandle user) {
Preconditions.checkCallAuthorization(hasCallingOrSelfPermission(
android.Manifest.permission.MANAGE_PROFILE_AND_DEVICE_OWNERS));
int userId = user.getIdentifier();
return mInjector.binderWithCleanCallingIdentity(() -> {
List<UserInfo> userProfiles = mUserManager.getProfiles(userId);
List<UserHandle> result = new ArrayList<>();
for (int i = 0; i < userProfiles.size(); i++) {
UserInfo userInfo = userProfiles.get(i);
if (userInfo.isManagedProfile() && hasProfileOwner(userInfo.id)) {
result.add(new UserHandle(userInfo.id));
}
}
return result;
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPolicyManagedProfiles
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
|
getPolicyManagedProfiles
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean isClosed() {
return mClosed;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isClosed
File: core/java/android/os/Process.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3911
|
HIGH
| 9.3
|
android
|
isClosed
|
core/java/android/os/Process.java
|
2c7008421cb67f5d89f16911bdbe36f6c35311ad
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String issueJwt(String subject, Long period,
List<String> roles, Map<String, Object> customClaimMap){
String id = UUID.randomUUID().toString();
String issuer = "sureness-token-server";
return issueJwt(id, subject, issuer, period,
roles, customClaimMap);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: issueJwt
File: core/src/main/java/com/usthe/sureness/util/JsonWebTokenUtil.java
Repository: dromara/sureness
The code follows secure coding practices.
|
[
"CWE-798"
] |
CVE-2023-31581
|
CRITICAL
| 9.8
|
dromara/sureness
|
issueJwt
|
core/src/main/java/com/usthe/sureness/util/JsonWebTokenUtil.java
|
4f5fefaf673168d74820020a191fab2904629742
| 0
|
Analyze the following code function for security vulnerabilities
|
public UserDTO getUserDTO(String userId) {
User user = userMapper.selectByPrimaryKey(userId);
if (user == null) {
return null;
}
if (StringUtils.equals(user.getStatus(), UserStatus.DISABLED)) {
throw new RuntimeException(Translator.get("user_has_been_disabled"));
}
UserDTO userDTO = new UserDTO();
BeanUtils.copyProperties(user, userDTO);
UserGroupPermissionDTO dto = getUserGroupPermission(userId);
userDTO.setUserGroups(dto.getUserGroups());
userDTO.setGroups(dto.getGroups());
userDTO.setGroupPermissions(dto.getList());
return userDTO;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserDTO
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
|
getUserDTO
|
framework/gateway/src/main/java/io/metersphere/gateway/service/UserLoginService.java
|
c59e381d368990214813085a1a4877c5ef865411
| 0
|
Analyze the following code function for security vulnerabilities
|
@CalledByNative
void onNativeContentViewCoreDestroyed(long nativeContentViewCore) {
assert nativeContentViewCore == mNativeContentViewCore;
mNativeContentViewCore = 0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onNativeContentViewCoreDestroyed
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
onNativeContentViewCoreDestroyed
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected boolean isPackageForFilter(String packageName,
PackageParser.ActivityIntentInfo info) {
return packageName.equals(info.activity.owner.packageName);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isPackageForFilter
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
|
isPackageForFilter
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
public Set<String> getTreatReferencesAsLogical() {
return myModelConfig.getTreatReferencesAsLogical();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTreatReferencesAsLogical
File: hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
Repository: hapifhir/hapi-fhir
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-32053
|
MEDIUM
| 5
|
hapifhir/hapi-fhir
|
getTreatReferencesAsLogical
|
hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
|
f2934b229c491235ab0e7782dea86b324521082a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setSiteId(short siteId) {
this.siteId = siteId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSiteId
File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/trade/TradeOrder.java
Repository: sanluan/PublicCMS
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-21333
|
LOW
| 3.5
|
sanluan/PublicCMS
|
setSiteId
|
publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/trade/TradeOrder.java
|
b4d5956e65b14347b162424abb197a180229b3db
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getNetworkLoggingText() {
return getUpdatableString(
NETWORK_LOGGING_MESSAGE, R.string.network_logging_notification_text);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNetworkLoggingText
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
|
getNetworkLoggingText
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
protected CacheKeyGenerator resolveKeyGenerator(Class<? extends CacheKeyGenerator> type) {
if (type == null) {
type = DefaultCacheKeyGenerator.class;
}
return keyGenerators.computeIfAbsent(type, aClass -> {
if (beanContext.containsBean(aClass)) {
return beanContext.getBean(aClass);
}
return InstantiationUtils.instantiate(aClass);
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resolveKeyGenerator
File: runtime/src/main/java/io/micronaut/cache/interceptor/CacheInterceptor.java
Repository: micronaut-projects/micronaut-core
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-21700
|
MEDIUM
| 5
|
micronaut-projects/micronaut-core
|
resolveKeyGenerator
|
runtime/src/main/java/io/micronaut/cache/interceptor/CacheInterceptor.java
|
b8ec32c311689667c69ae7d9f9c3b3a8abc96fe3
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean deleteGlobalSetting(String name, int requestingUserId, boolean forceNotify) {
if (DEBUG) {
Slog.v(LOG_TAG, "deleteGlobalSetting(" + name + ", " + requestingUserId
+ ", " + forceNotify + ")");
}
return mutateGlobalSetting(name, null, null, false, requestingUserId,
MUTATION_OPERATION_DELETE, forceNotify, 0);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deleteGlobalSetting
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
|
deleteGlobalSetting
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
ff86ff28cf82124f8e65833a2dd8c319aea08945
| 0
|
Analyze the following code function for security vulnerabilities
|
private void dismissWaitingDialog() {
Fragment frag = getSupportFragmentManager().findFragmentByTag(WAIT_DIALOG_TAG);
if (frag instanceof DialogFragment) {
DialogFragment dialog = (DialogFragment) frag;
try {
dialog.dismiss();
} catch (IllegalStateException e) {
Log_OC.e(TAG, e.getMessage());
dialog.dismissAllowingStateLoss();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dismissWaitingDialog
File: src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java
Repository: nextcloud/android
The code follows secure coding practices.
|
[
"CWE-248"
] |
CVE-2021-32694
|
MEDIUM
| 4.3
|
nextcloud/android
|
dismissWaitingDialog
|
src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java
|
9343bdd85d70625a90e0c952897957a102c2421b
| 0
|
Analyze the following code function for security vulnerabilities
|
private void migrate90(File dataDir, Stack<Integer> versions) {
for (File file: dataDir.listFiles()) {
if (file.getName().startsWith("PullRequests.xml")) {
VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file);
for (Element element: dom.getRootElement().elements()) {
Element closeInfoElement = element.element("closeInfo");
if (closeInfoElement != null)
closeInfoElement.detach();
}
dom.writeToFile(file, false);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: migrate90
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
|
migrate90
|
server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
|
d67dd9686897fe5e4ab881d749464aa7c06a68e5
| 0
|
Analyze the following code function for security vulnerabilities
|
private void handleRouteMatch(
RouteMatch<?> route,
NettyHttpRequest<?> request,
ChannelHandlerContext context) {
// Set the matched route on the request
request.setMatchedRoute(route);
// try to fulfill the argument requirements of the route
route = requestArgumentSatisfier.fulfillArgumentRequirements(route, request, false);
// If it is not executable and the body is not required send back 400 - BAD REQUEST
// decorate the execution of the route so that it runs an async executor
request.setMatchedRoute(route);
// The request body is required, so at this point we must have a StreamedHttpRequest
io.netty.handler.codec.http.HttpRequest nativeRequest = request.getNativeRequest();
if (!route.isExecutable() && io.micronaut.http.HttpMethod.permitsRequestBody(request.getMethod()) && nativeRequest instanceof StreamedHttpRequest) {
Optional<MediaType> contentType = request.getContentType();
HttpContentProcessor<?> processor = contentType
.flatMap(type ->
beanLocator.findBean(HttpContentSubscriberFactory.class,
new ConsumesMediaTypeQualifier<>(type))
).map(factory ->
factory.build(request)
).orElse(new DefaultHttpContentProcessor(request, serverConfiguration));
processor.subscribe(buildSubscriber(request, context, route));
} else {
context.read();
route = prepareRouteForExecution(route, request);
route.execute();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleRouteMatch
File: http-server-netty/src/main/java/io/micronaut/http/server/netty/RoutingInBoundHandler.java
Repository: micronaut-projects/micronaut-core
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-21700
|
MEDIUM
| 5
|
micronaut-projects/micronaut-core
|
handleRouteMatch
|
http-server-netty/src/main/java/io/micronaut/http/server/netty/RoutingInBoundHandler.java
|
b8ec32c311689667c69ae7d9f9c3b3a8abc96fe3
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean isCurrentProfileLocked(int userId) {
if (userId == mCurrentUser) return true;
for (int i = 0; i < mService.mCurrentProfileIds.length; i++) {
if (mService.mCurrentProfileIds[i] == userId) return true;
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isCurrentProfileLocked
File: services/core/java/com/android/server/am/ActivityStackSupervisor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3838
|
MEDIUM
| 4.3
|
android
|
isCurrentProfileLocked
|
services/core/java/com/android/server/am/ActivityStackSupervisor.java
|
468651c86a8adb7aa56c708d2348e99022088af3
| 0
|
Analyze the following code function for security vulnerabilities
|
private void retryUploads(Intent intent, User user, List<String> requestedUploads) {
boolean onWifiOnly;
boolean whileChargingOnly;
OCUpload upload = intent.getParcelableExtra(KEY_RETRY_UPLOAD);
onWifiOnly = upload.isUseWifiOnly();
whileChargingOnly = upload.isWhileChargingOnly();
UploadFileOperation newUpload = new UploadFileOperation(
mUploadsStorageManager,
connectivityService,
powerManagementService,
user,
null,
upload,
upload.getNameCollisionPolicy(),
upload.getLocalAction(),
this,
onWifiOnly,
whileChargingOnly,
true,
new FileDataStorageManager(user, getContentResolver())
);
newUpload.addDataTransferProgressListener(this);
newUpload.addDataTransferProgressListener((FileUploaderBinder) mBinder);
newUpload.addRenameUploadListener(this);
Pair<String, String> putResult = mPendingUploads.putIfAbsent(
user.getAccountName(),
upload.getRemotePath(),
newUpload
);
if (putResult != null) {
String uploadKey = putResult.first;
requestedUploads.add(uploadKey);
// Update upload in database
upload.setUploadStatus(UploadStatus.UPLOAD_IN_PROGRESS);
mUploadsStorageManager.updateUpload(upload);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: retryUploads
File: app/src/main/java/com/owncloud/android/files/services/FileUploader.java
Repository: nextcloud/android
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-39210
|
MEDIUM
| 5.5
|
nextcloud/android
|
retryUploads
|
app/src/main/java/com/owncloud/android/files/services/FileUploader.java
|
cd3bd0845a97e1d43daa0607a122b66b0068c751
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getAttributeListValue(String namespace, String attribute,
String[] options, int defaultValue) {
int idx = nativeGetAttributeIndex(mParseState, namespace, attribute);
if (idx >= 0) {
return getAttributeListValue(idx, options, defaultValue);
}
return defaultValue;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAttributeListValue
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
|
getAttributeListValue
|
core/java/android/content/res/XmlBlock.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setOnAnimationStartedListener(final Handler handler,
final OnAnimationStartedListener listener) {
if (listener != null) {
mAnimationStartedListener = new IRemoteCallback.Stub() {
@Override
public void sendResult(Bundle data) throws RemoteException {
final long elapsedRealtime = SystemClock.elapsedRealtime();
handler.post(new Runnable() {
@Override public void run() {
listener.onAnimationStarted(elapsedRealtime);
}
});
}
};
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setOnAnimationStartedListener
File: core/java/android/app/ActivityOptions.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-20918
|
CRITICAL
| 9.8
|
android
|
setOnAnimationStartedListener
|
core/java/android/app/ActivityOptions.java
|
51051de4eb40bb502db448084a83fd6cbfb7d3cf
| 0
|
Analyze the following code function for security vulnerabilities
|
public FrameHandler create(Socket sock) throws IOException
{
return new SocketFrameHandler(sock, this.shutdownExecutor);
}
|
Vulnerability Classification:
- CWE: CWE-400
- CVE: CVE-2023-46120
- Severity: HIGH
- CVSS Score: 7.5
Description: Add max inbound message size to ConnectionFactory
To avoid OOM with a very large message.
The default value is 64 MiB.
Fixes #1062
(cherry picked from commit 9ed45fde52224ec74fc523321efdf9a157d5cfca)
Function: create
File: src/main/java/com/rabbitmq/client/impl/SocketFrameHandlerFactory.java
Repository: rabbitmq/rabbitmq-java-client
Fixed Code:
public FrameHandler create(Socket sock) throws IOException
{
return new SocketFrameHandler(sock, this.shutdownExecutor, this.maxInboundMessageBodySize);
}
|
[
"CWE-400"
] |
CVE-2023-46120
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-java-client
|
create
|
src/main/java/com/rabbitmq/client/impl/SocketFrameHandlerFactory.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void handlePollStateResult(int what, AsyncResult ar) {
// Ignore stale requests from last poll.
if (ar.userObj != mPollingContext) return;
if (ar.exception != null) {
CommandException.Error err=null;
if (ar.exception instanceof CommandException) {
err = ((CommandException)(ar.exception)).getCommandError();
}
if (err == CommandException.Error.RADIO_NOT_AVAILABLE) {
// Radio has crashed or turned off.
cancelPollState();
return;
}
if (err != CommandException.Error.OP_NOT_ALLOWED_BEFORE_REG_NW) {
loge("handlePollStateResult: RIL returned an error where it must succeed"
+ ar.exception);
}
} else try {
handlePollStateResultMessage(what, ar);
} catch (RuntimeException ex) {
loge("handlePollStateResult: Exception while polling service state. "
+ "Probably malformed RIL response." + ex);
}
mPollingContext[0]--;
if (mPollingContext[0] == 0) {
boolean namMatch = false;
if (!isSidsAllZeros() && isHomeSid(mNewSS.getSystemId())) {
namMatch = true;
}
// Setting SS Roaming (general)
if (mIsSubscriptionFromRuim) {
mNewSS.setVoiceRoaming(isRoamingBetweenOperators(mNewSS.getVoiceRoaming(), mNewSS));
}
// For CDMA, voice and data should have the same roaming status
final boolean isVoiceInService =
(mNewSS.getVoiceRegState() == ServiceState.STATE_IN_SERVICE);
final int dataRegType = mNewSS.getRilDataRadioTechnology();
if (isVoiceInService && ServiceState.isCdma(dataRegType)) {
mNewSS.setDataRoaming(mNewSS.getVoiceRoaming());
}
// Setting SS CdmaRoamingIndicator and CdmaDefaultRoamingIndicator
mNewSS.setCdmaDefaultRoamingIndicator(mDefaultRoamingIndicator);
mNewSS.setCdmaRoamingIndicator(mRoamingIndicator);
boolean isPrlLoaded = true;
if (TextUtils.isEmpty(mPrlVersion)) {
isPrlLoaded = false;
}
if (!isPrlLoaded || (mNewSS.getRilVoiceRadioTechnology()
== ServiceState.RIL_RADIO_TECHNOLOGY_UNKNOWN)) {
log("Turn off roaming indicator if !isPrlLoaded or voice RAT is unknown");
mNewSS.setCdmaRoamingIndicator(EriInfo.ROAMING_INDICATOR_OFF);
} else if (!isSidsAllZeros()) {
if (!namMatch && !mIsInPrl) {
// Use default
mNewSS.setCdmaRoamingIndicator(mDefaultRoamingIndicator);
} else if (namMatch && !mIsInPrl) {
// TODO this will be removed when we handle roaming on LTE on CDMA+LTE phones
if (mNewSS.getRilVoiceRadioTechnology()
== ServiceState.RIL_RADIO_TECHNOLOGY_LTE) {
log("Turn off roaming indicator as voice is LTE");
mNewSS.setCdmaRoamingIndicator(EriInfo.ROAMING_INDICATOR_OFF);
} else {
mNewSS.setCdmaRoamingIndicator(EriInfo.ROAMING_INDICATOR_FLASH);
}
} else if (!namMatch && mIsInPrl) {
// Use the one from PRL/ERI
mNewSS.setCdmaRoamingIndicator(mRoamingIndicator);
} else {
// It means namMatch && mIsInPrl
if ((mRoamingIndicator <= 2)) {
mNewSS.setCdmaRoamingIndicator(EriInfo.ROAMING_INDICATOR_OFF);
} else {
// Use the one from PRL/ERI
mNewSS.setCdmaRoamingIndicator(mRoamingIndicator);
}
}
}
int roamingIndicator = mNewSS.getCdmaRoamingIndicator();
mNewSS.setCdmaEriIconIndex(mPhone.mEriManager.getCdmaEriIconIndex(roamingIndicator,
mDefaultRoamingIndicator));
mNewSS.setCdmaEriIconMode(mPhone.mEriManager.getCdmaEriIconMode(roamingIndicator,
mDefaultRoamingIndicator));
// NOTE: Some operator may require overriding mCdmaRoaming
// (set by the modem), depending on the mRoamingIndicator.
if (DBG) {
log("Set CDMA Roaming Indicator to: " + mNewSS.getCdmaRoamingIndicator()
+ ". voiceRoaming = " + mNewSS.getVoiceRoaming()
+ ". dataRoaming = " + mNewSS.getDataRoaming()
+ ", isPrlLoaded = " + isPrlLoaded
+ ". namMatch = " + namMatch + " , mIsInPrl = " + mIsInPrl
+ ", mRoamingIndicator = " + mRoamingIndicator
+ ", mDefaultRoamingIndicator= " + mDefaultRoamingIndicator);
}
pollStateDone();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handlePollStateResult
File: src/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2016-3831
|
MEDIUM
| 5
|
android
|
handlePollStateResult
|
src/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
|
f47bc301ccbc5e6d8110afab5a1e9bac1d4ef058
| 0
|
Analyze the following code function for security vulnerabilities
|
public void collectObserversLocked(Uri uri, int index, IContentObserver observer,
boolean observerWantsSelfNotifications, int targetUserHandle,
ArrayList<ObserverCall> calls) {
String segment = null;
int segmentCount = countUriSegments(uri);
if (index >= segmentCount) {
// This is the leaf node, notify all observers
collectMyObserversLocked(true, observer, observerWantsSelfNotifications,
targetUserHandle, calls);
} else if (index < segmentCount){
segment = getUriSegment(uri, index);
// Notify any observers at this level who are interested in descendants
collectMyObserversLocked(false, observer, observerWantsSelfNotifications,
targetUserHandle, calls);
}
int N = mChildren.size();
for (int i = 0; i < N; i++) {
ObserverNode node = mChildren.get(i);
if (segment == null || node.mName.equals(segment)) {
// We found the child,
node.collectObserversLocked(uri, index + 1,
observer, observerWantsSelfNotifications, targetUserHandle, calls);
if (segment != null) {
break;
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: collectObserversLocked
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
|
collectObserversLocked
|
services/core/java/com/android/server/content/ContentService.java
|
63363af721650e426db5b0bdfb8b2d4fe36abdb0
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isStarted() {
return started;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isStarted
File: client/hotrod-client/src/main/java/org/infinispan/client/hotrod/RemoteCacheManager.java
Repository: infinispan
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2017-15089
|
MEDIUM
| 6.5
|
infinispan
|
isStarted
|
client/hotrod-client/src/main/java/org/infinispan/client/hotrod/RemoteCacheManager.java
|
efc44b7b0a5dd4f44773808840dd9785cabcf21c
| 0
|
Analyze the following code function for security vulnerabilities
|
void setName(String name) {
mName = name;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setName
File: src/com/android/certinstaller/CredentialHelper.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2422
|
HIGH
| 9.3
|
android
|
setName
|
src/com/android/certinstaller/CredentialHelper.java
|
70dde9870e9450e10418a32206ac1bb30f036b2c
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean toBoolean(K name, V value) {
try {
return valueConverter.convertToBoolean(value);
} catch (IllegalArgumentException e) {
throw new IllegalArgumentException("Failed to convert header value to boolean for header '" + name + '\'');
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toBoolean
File: codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-436",
"CWE-113"
] |
CVE-2022-41915
|
MEDIUM
| 6.5
|
netty
|
toBoolean
|
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
|
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isVoiceMailNumber(PhoneAccountHandle accountHandle, String number,
String callingPackage, String callingFeatureId) {
try {
Log.startSession("TSI.iVMN");
synchronized (mLock) {
if (!canReadPhoneState(callingPackage, callingFeatureId, "isVoiceMailNumber")) {
return false;
}
final UserHandle callingUserHandle = Binder.getCallingUserHandle();
if (!isPhoneAccountHandleVisibleToCallingUser(accountHandle,
callingUserHandle)) {
Log.d(this, "%s is not visible for the calling user [iVMN]", accountHandle);
return false;
}
long token = Binder.clearCallingIdentity();
try {
return mPhoneAccountRegistrar.isVoiceMailNumber(accountHandle, number);
} catch (Exception e) {
Log.e(this, e, "getSubscriptionIdForPhoneAccount");
throw e;
} finally {
Binder.restoreCallingIdentity(token);
}
}
} finally {
Log.endSession();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isVoiceMailNumber
File: src/com/android/server/telecom/TelecomServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21394
|
MEDIUM
| 5.5
|
android
|
isVoiceMailNumber
|
src/com/android/server/telecom/TelecomServiceImpl.java
|
68dca62035c49e14ad26a54f614199cb29a3393f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean takeFocus(boolean reverse) {
int direction =
(reverse == (mContainerView.getLayoutDirection() == View.LAYOUT_DIRECTION_RTL)) ?
View.FOCUS_RIGHT : View.FOCUS_LEFT;
if (tryToMoveFocus(direction)) return true;
direction = reverse ? View.FOCUS_UP : View.FOCUS_DOWN;
return tryToMoveFocus(direction);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: takeFocus
File: android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
takeFocus
|
android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onClientRemoved(RealmModel realm, ClientModel client) {
onClientRemoved(client.getId());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onClientRemoved
File: model/jpa/src/main/java/org/keycloak/models/jpa/session/JpaUserSessionPersisterProvider.java
Repository: keycloak
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2023-6563
|
HIGH
| 7.7
|
keycloak
|
onClientRemoved
|
model/jpa/src/main/java/org/keycloak/models/jpa/session/JpaUserSessionPersisterProvider.java
|
11eb952e1df7cbb95b1e2c101dfd4839a2375695
| 0
|
Analyze the following code function for security vulnerabilities
|
public Set<String> getExcludedUsersNormalized() {
String s = fixEmptyAndTrim(excludedUsers);
if (s==null)
return Collections.emptySet();
Set<String> users = new HashSet<String>();
for (String user : s.split("[\\r\\n]+"))
users.add(user.trim());
return users;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getExcludedUsersNormalized
File: src/main/java/hudson/scm/SubversionSCM.java
Repository: jenkinsci/subversion-plugin
The code follows secure coding practices.
|
[
"CWE-255"
] |
CVE-2013-6372
|
LOW
| 2.1
|
jenkinsci/subversion-plugin
|
getExcludedUsersNormalized
|
src/main/java/hudson/scm/SubversionSCM.java
|
7d4562d6f7e40de04bbe29577b51c79f07d05ba6
| 0
|
Analyze the following code function for security vulnerabilities
|
private Response sendRequest(String method, Invocation.Builder invocationBuilder, Entity<?> entity) {
Response response;
if ("POST".equals(method)) {
response = invocationBuilder.post(entity);
} else if ("PUT".equals(method)) {
response = invocationBuilder.put(entity);
} else if ("DELETE".equals(method)) {
response = invocationBuilder.method("DELETE", entity);
} else if ("PATCH".equals(method)) {
response = invocationBuilder.method("PATCH", entity);
} else {
response = invocationBuilder.method(method);
}
return response;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendRequest
File: samples/client/petstore/java/okhttp-gson-parcelableModel/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
|
sendRequest
|
samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int countByUuid(String uuid) {
FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID;
Object[] finderArgs = new Object[] { uuid };
Long count = (Long)finderCache.getResult(finderPath, finderArgs, this);
if (count == null) {
StringBundler query = new StringBundler(2);
query.append(_SQL_COUNT_KBTEMPLATE_WHERE);
boolean bindUuid = false;
if (uuid == null) {
query.append(_FINDER_COLUMN_UUID_UUID_1);
}
else if (uuid.equals(StringPool.BLANK)) {
query.append(_FINDER_COLUMN_UUID_UUID_3);
}
else {
bindUuid = true;
query.append(_FINDER_COLUMN_UUID_UUID_2);
}
String sql = query.toString();
Session session = null;
try {
session = openSession();
Query q = session.createQuery(sql);
QueryPos qPos = QueryPos.getInstance(q);
if (bindUuid) {
qPos.add(uuid);
}
count = (Long)q.uniqueResult();
finderCache.putResult(finderPath, finderArgs, count);
}
catch (Exception e) {
finderCache.removeResult(finderPath, finderArgs);
throw processException(e);
}
finally {
closeSession(session);
}
}
return count.intValue();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: countByUuid
File: modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java
Repository: brianchandotcom/liferay-portal
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2017-12647
|
MEDIUM
| 4.3
|
brianchandotcom/liferay-portal
|
countByUuid
|
modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java
|
ef93d984be9d4d478a5c4b1ca9a86f4e80174774
| 0
|
Analyze the following code function for security vulnerabilities
|
public Path getDirectory() {
return directory;
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2022-41967
- Severity: HIGH
- CVSS Score: 7.5
Description: fix: CVE-2022-41967
Dragonfly v0.3.0-SNAPSHOT fails to properly configure the
DocumentBuilderFactory to prevent XML enternal entity (XXE) attacks when
parsing maven-metadata.xml files provided by external Maven repositories
during "SNAPSHOT" version resolution.
This patches CVE-2022-41967 by disabling features which may lead to XXE.
If you are currently using v0.3.0-SNAPSHOT it is STRONGLY advised to
update Dragonfly to v0.3.1-SNAPSHOT just to be safe.
Function: getDirectory
File: src/main/java/dev/hypera/dragonfly/Dragonfly.java
Repository: HyperaDev/Dragonfly
Fixed Code:
public @NotNull Path getDirectory() {
return directory;
}
|
[
"CWE-611"
] |
CVE-2022-41967
|
HIGH
| 7.5
|
HyperaDev/Dragonfly
|
getDirectory
|
src/main/java/dev/hypera/dragonfly/Dragonfly.java
|
9661375e1135127ca6cdb5712e978bec33cc06b3
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public void endWikiObject(String name, FilterEventParameters parameters) throws FilterException
{
super.endWikiObject(name, parameters);
BaseObject baseObject = getBaseObjectOutputFilterStream().getEntity();
if (baseObject.getNumber() < 0) {
this.entity.addXObject(baseObject);
} else {
this.entity.setXObject(baseObject.getNumber(), baseObject);
}
getBaseObjectOutputFilterStream().setEntity(null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: endWikiObject
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/filter/output/XWikiDocumentOutputFilterStream.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-459"
] |
CVE-2023-36468
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
endWikiObject
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/filter/output/XWikiDocumentOutputFilterStream.java
|
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
| 0
|
Analyze the following code function for security vulnerabilities
|
default Optional<String> getMessage(Object error) {
if (error == null) {
return Optional.empty();
}
if (error instanceof JsonError) {
return Optional.ofNullable(((JsonError) error).getMessage());
} else {
if (error instanceof Described) {
return Optional.ofNullable(((Described) error).getDescription());
} else {
return Optional.of(error.toString());
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMessage
File: http-client/src/main/java/io/micronaut/http/client/exceptions/HttpClientErrorDecoder.java
Repository: micronaut-projects/micronaut-core
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-21700
|
MEDIUM
| 5
|
micronaut-projects/micronaut-core
|
getMessage
|
http-client/src/main/java/io/micronaut/http/client/exceptions/HttpClientErrorDecoder.java
|
b8ec32c311689667c69ae7d9f9c3b3a8abc96fe3
| 0
|
Analyze the following code function for security vulnerabilities
|
int build(String[] args, int opti) {
for (; opti<args.length; opti++) {
String name = args[opti];
if ("--".equals(name)) {
return opti+1;
}
build(name);
}
return opti;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: build
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
|
build
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void finishSetup(int action, Intent intent, Bundle savedInstanceState) {
setFocus(action);
// Don't bother with the intent if we have procured a message from the
// intent already.
if (!hadSavedInstanceStateMessage(savedInstanceState)) {
initAttachmentsFromIntent(intent);
}
initActionBar();
initFromSpinner(savedInstanceState != null ? savedInstanceState : intent.getExtras(),
action);
// If this is a draft message, the draft account is whatever account was
// used to open the draft message in Compose.
if (mDraft != null) {
mDraftAccount = mReplyFromAccount;
}
initChangeListeners();
// These two should be identical since we check CC and BCC the same way
boolean showCc = !TextUtils.isEmpty(mCc.getText()) || (savedInstanceState != null &&
savedInstanceState.getBoolean(EXTRA_SHOW_CC));
boolean showBcc = !TextUtils.isEmpty(mBcc.getText()) || (savedInstanceState != null &&
savedInstanceState.getBoolean(EXTRA_SHOW_BCC));
mCcBccView.show(false /* animate */, showCc, showBcc);
updateHideOrShowCcBcc();
updateHideOrShowQuotedText(mShowQuotedText);
mRespondedInline = mInnerSavedState != null &&
mInnerSavedState.getBoolean(EXTRA_RESPONDED_INLINE);
if (mRespondedInline) {
mQuotedTextView.setVisibility(View.GONE);
}
mTextChanged = (savedInstanceState != null) ?
savedInstanceState.getBoolean(EXTRA_TEXT_CHANGED) : false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: finishSetup
File: src/com/android/mail/compose/ComposeActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2425
|
MEDIUM
| 4.3
|
android
|
finishSetup
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
public void dispatchToPath(final HttpServerExchange exchange, final ServletPathMatch pathInfo, final DispatcherType dispatcherType) throws Exception {
final ServletRequestContext servletRequestContext = exchange.getAttachment(ServletRequestContext.ATTACHMENT_KEY);
servletRequestContext.setServletPathMatch(pathInfo);
dispatchRequest(exchange, servletRequestContext, pathInfo.getServletChain(), dispatcherType);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dispatchToPath
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
|
dispatchToPath
|
servlet/src/main/java/io/undertow/servlet/handlers/ServletInitialHandler.java
|
d2715e3afa13f50deaa19643676816ce391551e9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setStrictModeVisualIndicatorPreference(String value) {
SystemProperties.set(StrictMode.VISUAL_PROPERTY, value);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setStrictModeVisualIndicatorPreference
File: services/core/java/com/android/server/wm/WindowManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3875
|
HIGH
| 7.2
|
android
|
setStrictModeVisualIndicatorPreference
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isDbLockedByCurrentThread() {
acquireReference();
try {
return getThreadSession().hasConnection();
} finally {
releaseReference();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isDbLockedByCurrentThread
File: core/java/android/database/sqlite/SQLiteDatabase.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2018-9493
|
LOW
| 2.1
|
android
|
isDbLockedByCurrentThread
|
core/java/android/database/sqlite/SQLiteDatabase.java
|
ebc250d16c747f4161167b5ff58b3aea88b37acf
| 0
|
Analyze the following code function for security vulnerabilities
|
public void receivedWnmFrame(WnmData data) {
mPasspointEventHandler.notifyWnmFrameReceived(data);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: receivedWnmFrame
File: service/java/com/android/server/wifi/hotspot2/PasspointManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-120"
] |
CVE-2023-21243
|
MEDIUM
| 5.5
|
android
|
receivedWnmFrame
|
service/java/com/android/server/wifi/hotspot2/PasspointManager.java
|
5b49b8711efaadadf5052ba85288860c2d7ca7a6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getSize(Paint paint, CharSequence text,
int start, int end, Paint.FontMetricsInt fm) {
return (int) paint.measureText(ELLIPSIS);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSize
File: chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-254"
] |
CVE-2016-5163
|
MEDIUM
| 4.3
|
chromium
|
getSize
|
chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java
|
3bd33fee094e863e5496ac24714c558bd58d28ef
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isSimPinVoiceSecure() {
// TODO: only count SIMs that handle voice
return isSimPinSecure();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isSimPinVoiceSecure
File: packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
isSimPinVoiceSecure
|
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
private Class<?> readNewClass(boolean unshared) throws ClassNotFoundException, IOException {
ObjectStreamClass classDesc = readClassDesc();
if (classDesc == null) {
throw missingClassDescriptor();
}
Class<?> localClass = classDesc.forClass();
if (localClass != null) {
registerObjectRead(localClass, nextHandle(), unshared);
}
return localClass;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readNewClass
File: luni/src/main/java/java/io/ObjectInputStream.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-7911
|
HIGH
| 7.2
|
android
|
readNewClass
|
luni/src/main/java/java/io/ObjectInputStream.java
|
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
| 0
|
Analyze the following code function for security vulnerabilities
|
private void handleSavePolicyFile() {
if (DBG) Slog.d(TAG, "handleSavePolicyFile");
synchronized (mPolicyFile) {
final FileOutputStream stream;
try {
stream = mPolicyFile.startWrite();
} catch (IOException e) {
Slog.w(TAG, "Failed to save policy file", e);
return;
}
try {
writePolicyXml(stream, false /*forBackup*/);
mPolicyFile.finishWrite(stream);
} catch (IOException e) {
Slog.w(TAG, "Failed to save policy file, restoring backup", e);
mPolicyFile.failWrite(stream);
}
}
BackupManager.dataChanged(getContext().getPackageName());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleSavePolicyFile
File: services/core/java/com/android/server/notification/NotificationManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3884
|
MEDIUM
| 4.3
|
android
|
handleSavePolicyFile
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean tryDelete() {
if (folder == null) {
return true;
}
return recursiveDelete(folder);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: tryDelete
File: src/main/java/org/junit/rules/TemporaryFolder.java
Repository: junit-team/junit4
The code follows secure coding practices.
|
[
"CWE-732"
] |
CVE-2020-15250
|
LOW
| 1.9
|
junit-team/junit4
|
tryDelete
|
src/main/java/org/junit/rules/TemporaryFolder.java
|
610155b8c22138329f0723eec22521627dbc52ae
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int startActivityIntentSender(IApplicationThread caller,
IntentSender intent, Intent fillInIntent, String resolvedType,
IBinder resultTo, String resultWho, int requestCode,
int flagsMask, int flagsValues, Bundle options) {
enforceNotIsolatedCaller("startActivityIntentSender");
// Refuse possible leaked file descriptors
if (fillInIntent != null && fillInIntent.hasFileDescriptors()) {
throw new IllegalArgumentException("File descriptors passed in Intent");
}
IIntentSender sender = intent.getTarget();
if (!(sender instanceof PendingIntentRecord)) {
throw new IllegalArgumentException("Bad PendingIntent object");
}
PendingIntentRecord pir = (PendingIntentRecord)sender;
synchronized (this) {
// If this is coming from the currently resumed activity, it is
// effectively saying that app switches are allowed at this point.
final ActivityStack stack = getFocusedStack();
if (stack.mResumedActivity != null &&
stack.mResumedActivity.info.applicationInfo.uid == Binder.getCallingUid()) {
mAppSwitchesAllowedTime = 0;
}
}
int ret = pir.sendInner(0, fillInIntent, resolvedType, null, null,
resultTo, resultWho, requestCode, flagsMask, flagsValues, options, null);
return ret;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startActivityIntentSender
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
|
startActivityIntentSender
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setChannelShouldCheckRpcResponseType(boolean channelShouldCheckRpcResponseType) {
this.channelShouldCheckRpcResponseType = channelShouldCheckRpcResponseType;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setChannelShouldCheckRpcResponseType
File: src/main/java/com/rabbitmq/client/ConnectionFactory.java
Repository: rabbitmq/rabbitmq-java-client
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-46120
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-java-client
|
setChannelShouldCheckRpcResponseType
|
src/main/java/com/rabbitmq/client/ConnectionFactory.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int available() throws IOException {
assertStreamOpen();
return entryEOFReached ? 0 : 1;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: available
File: src/main/java/net/lingala/zip4j/io/inputstream/ZipInputStream.java
Repository: srikanth-lingala/zip4j
The code follows secure coding practices.
|
[
"CWE-346"
] |
CVE-2023-22899
|
MEDIUM
| 5.9
|
srikanth-lingala/zip4j
|
available
|
src/main/java/net/lingala/zip4j/io/inputstream/ZipInputStream.java
|
ddd8fdc8ad0583eb4a6172dc86c72c881485c55b
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isSecureSettingsKey(int key) {
return getTypeFromKey(key) == SETTINGS_TYPE_SECURE;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isSecureSettingsKey
File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3876
|
HIGH
| 7.2
|
android
|
isSecureSettingsKey
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
91fc934bb2e5ea59929bb2f574de6db9b5100745
| 0
|
Analyze the following code function for security vulnerabilities
|
private void writePolicyXml(OutputStream stream, boolean forBackup) throws IOException {
final XmlSerializer out = new FastXmlSerializer();
out.setOutput(stream, StandardCharsets.UTF_8.name());
out.startDocument(null, true);
out.startTag(null, TAG_NOTIFICATION_POLICY);
out.attribute(null, ATTR_VERSION, Integer.toString(DB_VERSION));
mZenModeHelper.writeXml(out, forBackup);
mRankingHelper.writeXml(out, forBackup);
out.endTag(null, TAG_NOTIFICATION_POLICY);
out.endDocument();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writePolicyXml
File: services/core/java/com/android/server/notification/NotificationManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3884
|
MEDIUM
| 4.3
|
android
|
writePolicyXml
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onPackageAdded(String packageName, int uid) {
// Called on a handler, and running as the system
cancelAccountAccessRequestNotificationIfNeeded(uid, true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onPackageAdded
File: services/core/java/com/android/server/accounts/AccountManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-502"
] |
CVE-2023-45777
|
HIGH
| 7.8
|
android
|
onPackageAdded
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.