instruction
string | input
string | output
string | cwe_ids
list | cve_id
string | severity
string | cvss_score
float64 | repo_name
string | func_name
string | file_path
string | commit_hash
string | is_vulnerable
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Analyze the following code function for security vulnerabilities
|
@Override
public void onSwipingStarted(boolean rightIcon) {
mFalsingManager.onAffordanceSwipingStarted(rightIcon);
boolean camera = getLayoutDirection() == LAYOUT_DIRECTION_RTL ? !rightIcon
: rightIcon;
if (camera) {
mKeyguardBottomArea.bindCameraPrewarmService();
}
requestDisallowInterceptTouchEvent(true);
mOnlyAffordanceInThisMotion = true;
mQsTracking = false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onSwipingStarted
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
onSwipingStarted
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setItemGroupAndItemMetaOC1_3TypesExpected() {
this.unsetTypeExpected();
int i=1; this.setTypeExpected(i, TypeNames.INT);// crf_id
++i; this.setTypeExpected(i, TypeNames.INT);// crf_version_id
++i; this.setTypeExpected(i, TypeNames.INT);// item_group_id
++i; this.setTypeExpected(i, TypeNames.INT);// item_id
++i; this.setTypeExpected(i, TypeNames.INT);// response_set_id
++i; this.setTypeExpected(i, TypeNames.STRING);// crf_version_oid
++i; this.setTypeExpected(i, TypeNames.STRING);// item_group_oid
++i; this.setTypeExpected(i, TypeNames.STRING);// item_oid
++i; this.setTypeExpected(i, TypeNames.STRING);// item_header
++i; this.setTypeExpected(i, TypeNames.STRING);// subheader
++i; this.setTypeExpected(i, TypeNames.INT);// section_id
++i; this.setTypeExpected(i, TypeNames.STRING);// left_item_text
++i; this.setTypeExpected(i, TypeNames.STRING);// right_item_text
++i; this.setTypeExpected(i, TypeNames.INT);// parent_id
++i; this.setTypeExpected(i, TypeNames.INT);// column_number
++i; this.setTypeExpected(i, TypeNames.STRING);// page_number_label
++i; this.setTypeExpected(i, TypeNames.STRING);// response_layout
++i; this.setTypeExpected(i, TypeNames.STRING);// default_value
++i; this.setTypeExpected(i, TypeNames.BOOL);// phi_status
++i; this.setTypeExpected(i, TypeNames.BOOL);// show_item
++i; this.setTypeExpected(i, TypeNames.INT);// response_type_id
++i; this.setTypeExpected(i, TypeNames.INT);// repeat_number
++i; this.setTypeExpected(i, TypeNames.INT);// repeat_max
++i; this.setTypeExpected(i, TypeNames.BOOL);// show_group
++i; this.setTypeExpected(i, TypeNames.INT);//item_order
++i; this.setTypeExpected(i, TypeNames.STRING);// crf_version_oid
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setItemGroupAndItemMetaOC1_3TypesExpected
File: core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
Repository: OpenClinica
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-24831
|
HIGH
| 7.5
|
OpenClinica
|
setItemGroupAndItemMetaOC1_3TypesExpected
|
core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
|
b152cc63019230c9973965a98e4386ea5322c18f
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getResponseBody() {
return body;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getResponseBody
File: web/src/main/java/com/zrlog/web/handler/ResponseRenderPrintWriter.java
Repository: 94fzb/zrlog
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-16643
|
LOW
| 3.5
|
94fzb/zrlog
|
getResponseBody
|
web/src/main/java/com/zrlog/web/handler/ResponseRenderPrintWriter.java
|
4a91c83af669e31a22297c14f089d8911d353fa1
| 0
|
Analyze the following code function for security vulnerabilities
|
public static Properties getBuildProperties() {
Properties props = new Properties();
props.putAll(PROPS);
return props;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getBuildProperties
File: modules/library/metadata/src/main/java/org/geotools/util/factory/GeoTools.java
Repository: geotools
The code follows secure coding practices.
|
[
"CWE-917"
] |
CVE-2022-24818
|
HIGH
| 7.5
|
geotools
|
getBuildProperties
|
modules/library/metadata/src/main/java/org/geotools/util/factory/GeoTools.java
|
4f70fa3234391dd0cda883a20ab0ec75688cba49
| 0
|
Analyze the following code function for security vulnerabilities
|
@Beta
public static byte[] toByteArray(File file) throws IOException {
return asByteSource(file).read();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toByteArray
File: guava/src/com/google/common/io/Files.java
Repository: google/guava
The code follows secure coding practices.
|
[
"CWE-732"
] |
CVE-2020-8908
|
LOW
| 2.1
|
google/guava
|
toByteArray
|
guava/src/com/google/common/io/Files.java
|
fec0dbc4634006a6162cfd4d0d09c962073ddf40
| 0
|
Analyze the following code function for security vulnerabilities
|
private void ensureAllowedAssociations() {
if (mAllowedAssociations == null) {
ArrayMap<String, ArraySet<String>> allowedAssociations =
SystemConfig.getInstance().getAllowedAssociations();
mAllowedAssociations = new ArrayMap<>(allowedAssociations.size());
PackageManagerInternal pm = getPackageManagerInternal();
for (int i = 0; i < allowedAssociations.size(); i++) {
final String pkg = allowedAssociations.keyAt(i);
final ArraySet<String> asc = allowedAssociations.valueAt(i);
// Query latest debuggable flag from package-manager.
boolean isDebuggable = false;
try {
ApplicationInfo ai = AppGlobals.getPackageManager()
.getApplicationInfo(pkg, MATCH_ALL, 0);
if (ai != null) {
isDebuggable = (ai.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0;
}
} catch (RemoteException e) {
/* ignore */
}
mAllowedAssociations.put(pkg, new PackageAssociationInfo(pkg, asc, isDebuggable));
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: ensureAllowedAssociations
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
|
ensureAllowedAssociations
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public static byte[][] cloneArray(byte[][] in)
{
if (hasNullPointer(in))
{
throw new NullPointerException("in has null pointers");
}
byte[][] out = new byte[in.length][];
for (int i = 0; i < in.length; i++)
{
out[i] = new byte[in[i].length];
for (int j = 0; j < in[i].length; j++)
{
out[i][j] = in[i][j];
}
}
return out;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cloneArray
File: core/src/main/java/org/bouncycastle/pqc/crypto/xmss/XMSSUtil.java
Repository: bcgit/bc-java
The code follows secure coding practices.
|
[
"CWE-470"
] |
CVE-2018-1000613
|
HIGH
| 7.5
|
bcgit/bc-java
|
cloneArray
|
core/src/main/java/org/bouncycastle/pqc/crypto/xmss/XMSSUtil.java
|
4092ede58da51af9a21e4825fbad0d9a3ef5a223
| 0
|
Analyze the following code function for security vulnerabilities
|
private static boolean hasWebURI(Intent intent) {
if (intent.getData() == null) {
return false;
}
final String scheme = intent.getScheme();
if (TextUtils.isEmpty(scheme)) {
return false;
}
return scheme.equals(IntentFilter.SCHEME_HTTP) || scheme.equals(IntentFilter.SCHEME_HTTPS);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasWebURI
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
|
hasWebURI
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getSwitchingFromUserMessage() {
return mUserController.getSwitchingFromSystemUserMessage();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSwitchingFromUserMessage
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
|
getSwitchingFromUserMessage
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public long countScenarioByProjectID(String projectId) {
return extApiScenarioMapper.countByProjectID(projectId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: countScenarioByProjectID
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
|
countScenarioByProjectID
|
backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java
|
d74e02cdff47cdf7524d305d098db6ffb7f61b47
| 0
|
Analyze the following code function for security vulnerabilities
|
int getScanMode() {
enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission");
return mAdapterProperties.getScanMode();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getScanMode
File: src/com/android/bluetooth/btservice/AdapterService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-362",
"CWE-20"
] |
CVE-2016-3760
|
MEDIUM
| 5.4
|
android
|
getScanMode
|
src/com/android/bluetooth/btservice/AdapterService.java
|
122feb9a0b04290f55183ff2f0384c6c53756bd8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
Class<EventCrfFlag> domainClass() {
// TODO Auto-generated method stub
return EventCrfFlag.class;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: domainClass
File: core/src/main/java/org/akaza/openclinica/dao/hibernate/EventCrfFlagDao.java
Repository: OpenClinica
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-24831
|
HIGH
| 7.5
|
OpenClinica
|
domainClass
|
core/src/main/java/org/akaza/openclinica/dao/hibernate/EventCrfFlagDao.java
|
b152cc63019230c9973965a98e4386ea5322c18f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Id
@GeneratedValue(generator = "cmsGenerator")
@GenericGenerator(name = "cmsGenerator", strategy = CmsUpgrader.IDENTIFIER_GENERATOR)
@Column(name = "id", unique = true, nullable = false)
public Long getId() {
return this.id;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getId
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
|
getId
|
publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/trade/TradeOrder.java
|
b4d5956e65b14347b162424abb197a180229b3db
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setId(Integer id) {
this.id = id;
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2023-7171
- Severity: LOW
- CVSS Score: 3.3
Description: fix(novel-admin): 友情链接URL格式校验
Function: setId
File: novel-admin/src/main/java/com/java2nb/novel/domain/FriendLinkDO.java
Repository: 201206030/novel-plus
Fixed Code:
public void setId(Integer id) {
this.id = id;
}
|
[
"CWE-79"
] |
CVE-2023-7171
|
LOW
| 3.3
|
201206030/novel-plus
|
setId
|
novel-admin/src/main/java/com/java2nb/novel/domain/FriendLinkDO.java
|
d6093d8182362422370d7eaf6c53afde9ee45215
| 1
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setApiKeyPrefix(String apiKeyPrefix) {
for (Authentication auth : authentications.values()) {
if (auth instanceof ApiKeyAuth) {
((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix);
return this;
}
}
throw new RuntimeException("No API key authentication configured!");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setApiKeyPrefix
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
|
setApiKeyPrefix
|
samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setStepId(String actionId) {
this.stepId = actionId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setStepId
File: src/com/dotmarketing/portlets/workflows/model/WorkflowSearcher.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-4040
|
MEDIUM
| 6.5
|
dotCMS/core
|
setStepId
|
src/com/dotmarketing/portlets/workflows/model/WorkflowSearcher.java
|
bc4db5d71dc67015572f8e4c6fdf87e29b854d02
| 0
|
Analyze the following code function for security vulnerabilities
|
public synchronized void setDataSource(final DataSource datasource) throws SQLException {
if (datasource != this.datasource) {
try {
dispose();
} catch (FactoryException exception) {
final Throwable cause = exception.getCause();
if (cause instanceof SQLException) {
throw (SQLException) cause;
}
if (cause instanceof RuntimeException) {
throw (RuntimeException) cause;
}
// Not really an SQL exception, but we should not reach this point anyway.
final SQLException e = new SQLException(exception.getLocalizedMessage());
e.initCause(exception); // TODO: inline when we will be allowed to target Java 6.
throw e;
}
this.datasource = datasource;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDataSource
File: modules/library/referencing/src/main/java/org/geotools/referencing/factory/epsg/ThreadedEpsgFactory.java
Repository: geotools
The code follows secure coding practices.
|
[
"CWE-917"
] |
CVE-2022-24818
|
HIGH
| 7.5
|
geotools
|
setDataSource
|
modules/library/referencing/src/main/java/org/geotools/referencing/factory/epsg/ThreadedEpsgFactory.java
|
4f70fa3234391dd0cda883a20ab0ec75688cba49
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequestMapping("doUploadIco")
@Csrf
public String uploadIco(@RequestAttribute SysSite site, @SessionAttribute SysUser admin, MultipartFile file, String filename,
String base64File, String originalFilename, int size, boolean overwrite, HttpServletRequest request, ModelMap model) {
if (null != file && !file.isEmpty() || CommonUtils.notEmpty(base64File)) {
String originalName;
String suffix;
if (null != file && !file.isEmpty()) {
originalName = file.getOriginalFilename();
} else {
originalName = originalFilename;
}
suffix = CmsFileUtils.getSuffix(originalName);
try {
String filepath = CommonUtils.joinString(Constants.SEPARATOR, filename);
String fuleFilePath = siteComponent.getWebFilePath(site.getId(), filepath);
if (overwrite || !CmsFileUtils.exists(fuleFilePath)) {
CmsFileUtils.mkdirsParent(fuleFilePath);
if (CommonUtils.notEmpty(base64File)) {
try (InputStream inputStream = new ByteArrayInputStream(VerificationUtils.base64Decode(base64File))) {
ImageUtils.image2Ico(inputStream, suffix, size, fuleFilePath);
}
} else {
try (InputStream inputStream = file.getInputStream()) {
ImageUtils.image2Ico(inputStream, suffix, size, fuleFilePath);
}
}
FileUploadResult uploadResult = CmsFileUtils.getFileSize(fuleFilePath, originalName, suffix);
logUploadService.save(new LogUpload(site.getId(), admin.getId(), LogLoginService.CHANNEL_WEB_MANAGER,
filename, false, CmsFileUtils.FILE_TYPE_IMAGE, uploadResult.getFileSize(), uploadResult.getWidth(),
uploadResult.getHeight(), RequestUtils.getIpAddress(request), CommonUtils.getDate(), filepath));
}
} catch (IOException e) {
model.addAttribute(CommonConstants.ERROR, e.getMessage());
log.error(e.getMessage(), e);
return CommonConstants.TEMPLATE_ERROR;
}
}
return CommonConstants.TEMPLATE_DONE;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: uploadIco
File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/controller/admin/cms/CmsWebFileAdminController.java
Repository: sanluan/PublicCMS
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-51252
|
MEDIUM
| 5.4
|
sanluan/PublicCMS
|
uploadIco
|
publiccms-parent/publiccms-core/src/main/java/com/publiccms/controller/admin/cms/CmsWebFileAdminController.java
|
2459a3f92c680ae011a369f32306c17df07caaa0
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void endTable(Map<String, String> parameters)
{
getXHTMLWikiPrinter().printXMLEndElement("table");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: endTable
File: xwiki-rendering-syntaxes/xwiki-rendering-syntax-xhtml/src/main/java/org/xwiki/rendering/internal/renderer/xhtml/XHTMLChainingRenderer.java
Repository: xwiki/xwiki-rendering
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-32070
|
MEDIUM
| 6.1
|
xwiki/xwiki-rendering
|
endTable
|
xwiki-rendering-syntaxes/xwiki-rendering-syntax-xhtml/src/main/java/org/xwiki/rendering/internal/renderer/xhtml/XHTMLChainingRenderer.java
|
c40e2f5f9482ec6c3e71dbf1fff5ba8a5e44cdc1
| 0
|
Analyze the following code function for security vulnerabilities
|
private static JSONObject getEnvironmentsOfAPI(API api) {
APIManagerConfiguration config = HostObjectComponent.getAPIManagerConfiguration();
Map<String, Environment> environments = config.getApiGatewayEnvironments();
JSONObject environmentObject = new JSONObject();
JSONObject productionEnvironmentObject = new JSONObject();
JSONObject sandboxEnvironmentObject = new JSONObject();
JSONObject hybridEnvironmentObject = new JSONObject();
Set<String> environmentsPublishedByAPI =
new HashSet<String>(api.getEnvironments());
environmentsPublishedByAPI.remove("none");
for (String environmentName : environmentsPublishedByAPI) {
Environment environment = environments.get(environmentName);
if (environment != null) {
JSONObject jsonObject = new JSONObject();
List<String> environmenturls = new ArrayList<String>();
environmenturls.addAll(Arrays.asList((environment.getApiGatewayEndpoint().split(","))));
environmenturls.add(environment.getWebsocketGatewayEndpoint());
List<String> transports = new ArrayList<String>();
if("WS".equals(api.getType())) {
transports.add("ws");
jsonObject.put("ws", filterUrlsByTransport(environmenturls, transports, "ws"));
} else {
transports.addAll(Arrays.asList((api.getTransports().split(","))));
jsonObject.put("http", filterUrlsByTransport(environmenturls, transports, "http"));
jsonObject.put("https", filterUrlsByTransport(environmenturls, transports, "https"));
}
jsonObject.put("showInConsole", environment.isShowInConsole());
if (APIConstants.GATEWAY_ENV_TYPE_PRODUCTION.equals(environment.getType())) {
productionEnvironmentObject.put(environment.getName(), jsonObject);
} else if (APIConstants.GATEWAY_ENV_TYPE_SANDBOX.equals(environment.getType())) {
sandboxEnvironmentObject.put(environment.getName(), jsonObject);
} else {
hybridEnvironmentObject.put(environment.getName(), jsonObject);
}
}
}
if (productionEnvironmentObject != null && !productionEnvironmentObject.isEmpty()){
environmentObject.put(APIConstants.GATEWAY_ENV_TYPE_PRODUCTION, productionEnvironmentObject);
}
if (sandboxEnvironmentObject != null && !sandboxEnvironmentObject.isEmpty()){
environmentObject.put(APIConstants.GATEWAY_ENV_TYPE_SANDBOX, sandboxEnvironmentObject);
}
if (hybridEnvironmentObject != null && !hybridEnvironmentObject.isEmpty()){
environmentObject.put(APIConstants.GATEWAY_ENV_TYPE_HYBRID, hybridEnvironmentObject);
}
return environmentObject;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getEnvironmentsOfAPI
File: components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
Repository: wso2/carbon-apimgt
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2018-20736
|
LOW
| 3.5
|
wso2/carbon-apimgt
|
getEnvironmentsOfAPI
|
components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
|
490f2860822f89d745b7c04fa9570bd86bef4236
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Action.Builder extend(Action.Builder builder) {
Bundle wearableBundle = new Bundle();
if (mFlags != DEFAULT_FLAGS) {
wearableBundle.putInt(KEY_FLAGS, mFlags);
}
if (mInProgressLabel != null) {
wearableBundle.putCharSequence(KEY_IN_PROGRESS_LABEL, mInProgressLabel);
}
if (mConfirmLabel != null) {
wearableBundle.putCharSequence(KEY_CONFIRM_LABEL, mConfirmLabel);
}
if (mCancelLabel != null) {
wearableBundle.putCharSequence(KEY_CANCEL_LABEL, mCancelLabel);
}
builder.getExtras().putBundle(EXTRA_WEARABLE_EXTENSIONS, wearableBundle);
return builder;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: extend
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
extend
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
public void prepareResources(XWikiContext context)
{
if (context.get("msg") == null) {
Locale locale = getLocalePreference(context);
context.setLocale(locale);
if (context.getResponse() != null) {
context.getResponse().setLocale(locale);
}
XWikiMessageTool msg = new XWikiMessageTool(Utils.getComponent(ContextualLocalizationManager.class));
context.put("msg", msg);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: prepareResources
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
|
prepareResources
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void internalExpireMessagesForAllSubscriptions(AsyncResponse asyncResponse, int expireTimeInSeconds,
boolean authoritative) {
if (topicName.isGlobal()) {
try {
validateGlobalNamespaceOwnership(namespaceName);
} catch (Exception e) {
log.error("[{}] Failed to expire messages for all subscription on topic {}",
clientAppId(), topicName, e);
resumeAsyncResponseExceptionally(asyncResponse, e);
return;
}
}
// If the topic name is a partition name, no need to get partition topic metadata again
if (topicName.isPartitioned()) {
internalExpireMessagesForAllSubscriptionsForNonPartitionedTopic(asyncResponse,
expireTimeInSeconds, authoritative);
} else {
getPartitionedTopicMetadataAsync(topicName,
authoritative, false).thenAccept(partitionMetadata -> {
if (partitionMetadata.partitions > 0) {
final List<CompletableFuture<Void>> futures = Lists.newArrayList();
// expire messages for each partition topic
for (int i = 0; i < partitionMetadata.partitions; i++) {
TopicName topicNamePartition = topicName.getPartition(i);
try {
futures.add(pulsar()
.getAdminClient()
.topics()
.expireMessagesForAllSubscriptionsAsync(
topicNamePartition.toString(), expireTimeInSeconds));
} catch (Exception e) {
log.error("[{}] Failed to expire messages up to {} on {}",
clientAppId(), expireTimeInSeconds,
topicNamePartition, e);
asyncResponse.resume(new RestException(e));
return;
}
}
FutureUtil.waitForAll(futures).handle((result, exception) -> {
if (exception != null) {
Throwable t = exception.getCause();
log.error("[{}] Failed to expire messages up to {} on {}",
clientAppId(), expireTimeInSeconds,
topicName, t);
asyncResponse.resume(new RestException(t));
return null;
}
asyncResponse.resume(Response.noContent().build());
return null;
});
} else {
internalExpireMessagesForAllSubscriptionsForNonPartitionedTopic(asyncResponse,
expireTimeInSeconds, authoritative);
}
}).exceptionally(ex -> {
log.error("[{}] Failed to expire messages for all subscription on topic {}",
clientAppId(), topicName, ex);
resumeAsyncResponseExceptionally(asyncResponse, ex);
return null;
});
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: internalExpireMessagesForAllSubscriptions
File: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
Repository: apache/pulsar
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-41571
|
MEDIUM
| 4
|
apache/pulsar
|
internalExpireMessagesForAllSubscriptions
|
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
|
5b35bb81c31f1bc2ad98c9fde5b39ec68110ca52
| 0
|
Analyze the following code function for security vulnerabilities
|
private void suspendPersonalAppsInPackageManager(int userId) {
mInjector.binderWithCleanCallingIdentity(() -> {
final String[] appsToSuspend = mInjector.getPersonalAppsForSuspension(userId);
final String[] failedApps = mInjector.getPackageManagerInternal()
.setPackagesSuspendedByAdmin(userId, appsToSuspend, true);
if (!ArrayUtils.isEmpty(failedApps)) {
Slogf.wtf(LOG_TAG, "Failed to suspend apps: " + String.join(",", failedApps));
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: suspendPersonalAppsInPackageManager
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
suspendPersonalAppsInPackageManager
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setDebugging(boolean debugging) {
this.debugging = debugging;
// Rebuild HTTP Client according to the new "debugging" value.
this.httpClient = buildHttpClient();
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDebugging
File: samples/client/petstore/java/retrofit2-play26/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
|
setDebugging
|
samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public final int startActivityFromRecents(int taskId, Bundle bOptions) {
mAmInternal.enforceCallingPermission(START_TASKS_FROM_RECENTS,
"startActivityFromRecents()");
final int callingPid = Binder.getCallingPid();
final int callingUid = Binder.getCallingUid();
final SafeActivityOptions safeOptions = SafeActivityOptions.fromBundle(bOptions);
final long origId = Binder.clearCallingIdentity();
try {
return mTaskSupervisor.startActivityFromRecents(callingPid, callingUid, taskId,
safeOptions);
} finally {
Binder.restoreCallingIdentity(origId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startActivityFromRecents
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
|
startActivityFromRecents
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getUri(InternetResource resource, FacesContext context,
Object storeData) {
StringBuffer uri = new StringBuffer();// ResourceServlet.DEFAULT_SERVLET_PATH).append("/");
uri.append(resource.getKey());
// append serialized data as Base-64 encoded request string.
if (storeData != null) {
try {
byte[] objectData;
if (storeData instanceof byte[]) {
objectData = (byte[]) storeData;
uri.append(DATA_BYTES_SEPARATOR);
} else {
ByteArrayOutputStream dataSteram = new ByteArrayOutputStream(
1024);
ObjectOutputStream objStream = new ObjectOutputStream(
dataSteram);
objStream.writeObject(storeData);
objStream.flush();
objStream.close();
dataSteram.close();
objectData = dataSteram.toByteArray();
uri.append(DATA_SEPARATOR);
}
byte[] dataArray = encrypt(objectData);
uri.append(new String(dataArray, "ISO-8859-1"));
// / byte[] objectData = dataSteram.toByteArray();
// / uri.append("?").append(new
// String(Base64.encodeBase64(objectData),
// / "ISO-8859-1"));
} catch (Exception e) {
// Ignore errors, log it
log.error(Messages
.getMessage(Messages.QUERY_STRING_BUILDING_ERROR), e);
}
}
boolean isGlobal = !resource.isSessionAware();
String resourceURL = getWebXml(context).getFacesResourceURL(context,
uri.toString(), isGlobal);// context.getApplication().getViewHandler().getResourceURL(context,uri.toString());
if (!isGlobal) {
resourceURL = context.getExternalContext().encodeResourceURL(
resourceURL);
}
if (log.isDebugEnabled()) {
log.debug(Messages.getMessage(Messages.BUILD_RESOURCE_URI_INFO,
resource.getKey(), resourceURL));
}
return resourceURL;// context.getExternalContext().encodeResourceURL(resourceURL);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUri
File: framework/impl/src/main/java/org/ajax4jsf/resource/ResourceBuilderImpl.java
Repository: nuxeo/richfaces-3.3
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2013-4521
|
HIGH
| 7.5
|
nuxeo/richfaces-3.3
|
getUri
|
framework/impl/src/main/java/org/ajax4jsf/resource/ResourceBuilderImpl.java
|
6cbad2a6dcb70d3e33a6ce5879b1a3ad79eb1aec
| 0
|
Analyze the following code function for security vulnerabilities
|
public static @NonNull Uri getContentUriForPath(@NonNull String path) {
Objects.requireNonNull(path);
return MediaStore.Files.getContentUri(extractVolumeName(path));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getContentUriForPath
File: src/com/android/providers/media/util/FileUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2023-35670
|
HIGH
| 7.8
|
android
|
getContentUriForPath
|
src/com/android/providers/media/util/FileUtils.java
|
db3c69afcb0a45c8aa2f333fcde36217889899fe
| 0
|
Analyze the following code function for security vulnerabilities
|
@Produces(MediaType.APPLICATION_JSON)
@RequestMapping(value = "/auth/api/v1/forms/migrate/preview", method = RequestMethod.POST)
public ResponseEntity<ReportLog> runAuthPreview(@RequestBody TransferObject transferObject, HttpServletRequest request) throws Exception {
ResponseEntity<HelperObject> res = runPreviewTest(transferObject, request);
HelperObject helperObject = res.getBody();
return new ResponseEntity<ReportLog>(helperObject.getReportLog(), org.springframework.http.HttpStatus.OK);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: runAuthPreview
File: web/src/main/java/org/akaza/openclinica/controller/BatchCRFMigrationController.java
Repository: OpenClinica
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-24830
|
HIGH
| 7.5
|
OpenClinica
|
runAuthPreview
|
web/src/main/java/org/akaza/openclinica/controller/BatchCRFMigrationController.java
|
6f864e86543f903bd20d6f9fc7056115106441f3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setAuthToken(Account account, String authTokenType, String authToken) {
final int callingUid = Binder.getCallingUid();
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.v(TAG, "setAuthToken: " + account
+ ", authTokenType " + authTokenType
+ ", caller's uid " + callingUid
+ ", pid " + Binder.getCallingPid());
}
Objects.requireNonNull(account, "account cannot be null");
Objects.requireNonNull(authTokenType, "authTokenType cannot be null");
int userId = UserHandle.getCallingUserId();
if (!isAccountManagedByCaller(account.type, callingUid, userId)) {
String msg = String.format(
"uid %s cannot set auth tokens associated with accounts of type: %s",
callingUid,
account.type);
throw new SecurityException(msg);
}
final long identityToken = clearCallingIdentity();
try {
UserAccounts accounts = getUserAccounts(userId);
saveAuthTokenToDatabase(accounts, account, authTokenType, authToken);
} finally {
restoreCallingIdentity(identityToken);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAuthToken
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
|
setAuthToken
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
public CharSequence getDeviceOwnerLockScreenInfo() {
throwIfParentInstance("getDeviceOwnerLockScreenInfo");
if (mService != null) {
try {
return mService.getDeviceOwnerLockScreenInfo();
} catch (RemoteException re) {
throw re.rethrowFromSystemServer();
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDeviceOwnerLockScreenInfo
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
|
getDeviceOwnerLockScreenInfo
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void monitor() {
ActivityManagerService.this.monitor();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: monitor
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
|
monitor
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public void broadcastTargetBssidEvent(String iface, String bssid) {
sendMessage(iface, TARGET_BSSID_EVENT, 0, 0, bssid);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: broadcastTargetBssidEvent
File: service/java/com/android/server/wifi/WifiMonitor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
broadcastTargetBssidEvent
|
service/java/com/android/server/wifi/WifiMonitor.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void validate(final OidcCredentials credentials, final WebContext context) {
final AuthorizationCode code = credentials.getCode();
// if we have a code
if (code != null) {
try {
final String computedCallbackUrl = client.computeFinalCallbackUrl(context);
// Token request
final TokenRequest request = createTokenRequest(new AuthorizationCodeGrant(code, new URI(computedCallbackUrl)));
HTTPRequest tokenHttpRequest = request.toHTTPRequest();
tokenHttpRequest.setConnectTimeout(configuration.getConnectTimeout());
tokenHttpRequest.setReadTimeout(configuration.getReadTimeout());
final HTTPResponse httpResponse = tokenHttpRequest.send();
logger.debug("Token response: status={}, content={}", httpResponse.getStatusCode(),
httpResponse.getContent());
final TokenResponse response = OIDCTokenResponseParser.parse(httpResponse);
if (response instanceof TokenErrorResponse) {
throw new TechnicalException("Bad token response, error=" + ((TokenErrorResponse) response).getErrorObject());
}
logger.debug("Token response successful");
final OIDCTokenResponse tokenSuccessResponse = (OIDCTokenResponse) response;
// save tokens in credentials
final OIDCTokens oidcTokens = tokenSuccessResponse.getOIDCTokens();
credentials.setAccessToken(oidcTokens.getAccessToken());
credentials.setRefreshToken(oidcTokens.getRefreshToken());
credentials.setIdToken(oidcTokens.getIDToken());
} catch (final URISyntaxException | IOException | ParseException e) {
throw new TechnicalException(e);
}
}
}
|
Vulnerability Classification:
- CWE: CWE-502
- CVE: CVE-2023-25558
- Severity: HIGH
- CVSS Score: 8.8
Description: fix(pac4j-oidc): add verifier parameter (#6835)
* fix(pac4j-oidc): add verifier parameter
Function: validate
File: datahub-frontend/app/auth/sso/oidc/custom/CustomOidcAuthenticator.java
Repository: datahub-project/datahub
Fixed Code:
@Override
public void validate(final OidcCredentials credentials, final WebContext context) {
final AuthorizationCode code = credentials.getCode();
// if we have a code
if (code != null) {
try {
final String computedCallbackUrl = client.computeFinalCallbackUrl(context);
CodeVerifier verifier = (CodeVerifier) configuration.getValueRetriever()
.retrieve(client.getCodeVerifierSessionAttributeName(), client, context).orElse(null);
// Token request
final TokenRequest request = createTokenRequest(new AuthorizationCodeGrant(code, new URI(computedCallbackUrl), verifier));
HTTPRequest tokenHttpRequest = request.toHTTPRequest();
tokenHttpRequest.setConnectTimeout(configuration.getConnectTimeout());
tokenHttpRequest.setReadTimeout(configuration.getReadTimeout());
final HTTPResponse httpResponse = tokenHttpRequest.send();
logger.debug("Token response: status={}, content={}", httpResponse.getStatusCode(),
httpResponse.getContent());
final TokenResponse response = OIDCTokenResponseParser.parse(httpResponse);
if (response instanceof TokenErrorResponse) {
throw new TechnicalException("Bad token response, error=" + ((TokenErrorResponse) response).getErrorObject());
}
logger.debug("Token response successful");
final OIDCTokenResponse tokenSuccessResponse = (OIDCTokenResponse) response;
// save tokens in credentials
final OIDCTokens oidcTokens = tokenSuccessResponse.getOIDCTokens();
credentials.setAccessToken(oidcTokens.getAccessToken());
credentials.setRefreshToken(oidcTokens.getRefreshToken());
credentials.setIdToken(oidcTokens.getIDToken());
} catch (final URISyntaxException | IOException | ParseException e) {
throw new TechnicalException(e);
}
}
}
|
[
"CWE-502"
] |
CVE-2023-25558
|
HIGH
| 8.8
|
datahub-project/datahub
|
validate
|
datahub-frontend/app/auth/sso/oidc/custom/CustomOidcAuthenticator.java
|
2a182f484677d056730d6b4e9f0143e67368359f
| 1
|
Analyze the following code function for security vulnerabilities
|
static Method findPrivateMethod(Class<?> cl, String methodName,
Class<?>[] param) {
try {
Method method = cl.getDeclaredMethod(methodName, param);
if (Modifier.isPrivate(method.getModifiers()) && method.getReturnType() == void.class) {
method.setAccessible(true);
return method;
}
} catch (NoSuchMethodException nsm) {
// Ignored
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findPrivateMethod
File: luni/src/main/java/java/io/ObjectStreamClass.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-7911
|
HIGH
| 7.2
|
android
|
findPrivateMethod
|
luni/src/main/java/java/io/ObjectStreamClass.java
|
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
| 0
|
Analyze the following code function for security vulnerabilities
|
public abstract int getParagraphDirection(int line);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getParagraphDirection
File: core/java/android/text/Layout.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-9452
|
MEDIUM
| 4.3
|
android
|
getParagraphDirection
|
core/java/android/text/Layout.java
|
3b6f84b77c30ec0bab5147b0cffc192c86ba2634
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean forAllWindowTopToBottom(ToBooleanFunction<WindowState> callback) {
// We want to consume the positive sublayer children first because they need to appear
// above the parent, then this window (the parent), and then the negative sublayer children
// because they need to appear above the parent.
int i = mChildren.size() - 1;
WindowState child = mChildren.get(i);
while (i >= 0 && child.mSubLayer >= 0) {
if (child.applyInOrderWithImeWindows(callback, true /* traverseTopToBottom */)) {
return true;
}
--i;
if (i < 0) {
break;
}
child = mChildren.get(i);
}
if (applyInOrderWithImeWindows(callback, true /* traverseTopToBottom */)) {
return true;
}
while (i >= 0) {
if (child.applyInOrderWithImeWindows(callback, true /* traverseTopToBottom */)) {
return true;
}
--i;
if (i < 0) {
break;
}
child = mChildren.get(i);
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: forAllWindowTopToBottom
File: services/core/java/com/android/server/wm/WindowState.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35674
|
HIGH
| 7.8
|
android
|
forAllWindowTopToBottom
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setAccountSerialNumber(String accountSerialNumber) {
this.accountSerialNumber = accountSerialNumber;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAccountSerialNumber
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
|
setAccountSerialNumber
|
publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/trade/TradeOrder.java
|
b4d5956e65b14347b162424abb197a180229b3db
| 0
|
Analyze the following code function for security vulnerabilities
|
@JsonProperty(FIELD_SERVER_IPS)
public abstract String serverIps();
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: serverIps
File: graylog2-server/src/main/java/org/graylog2/lookup/adapters/DnsLookupDataAdapter.java
Repository: Graylog2/graylog2-server
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2023-41045
|
MEDIUM
| 5.3
|
Graylog2/graylog2-server
|
serverIps
|
graylog2-server/src/main/java/org/graylog2/lookup/adapters/DnsLookupDataAdapter.java
|
466af814523cffae9fbc7e77bab7472988f03c3e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void
setInputSource(InputStream stream)
{
source = new InputSource(stream);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setInputSource
File: ext/java/nokogiri/internals/ParserContext.java
Repository: sparklemotion/nokogiri
The code follows secure coding practices.
|
[
"CWE-241"
] |
CVE-2022-29181
|
MEDIUM
| 6.4
|
sparklemotion/nokogiri
|
setInputSource
|
ext/java/nokogiri/internals/ParserContext.java
|
db05ba9a1bd4b90aa6c76742cf6102a7c7297267
| 0
|
Analyze the following code function for security vulnerabilities
|
@GetMapping({"", "/{id}/**"})
public String get(@PathVariable(required = false) String id, HttpServletRequest req, Model model) {
if (!utils.isAuthenticated(req) && StringUtils.isBlank(id)) {
return "redirect:" + SIGNINLINK + "?returnto=" + PROFILELINK;
}
Profile authUser = utils.getAuthUser(req);
Profile showUser;
boolean isMyProfile;
if (StringUtils.isBlank(id) || isMyid(authUser, Profile.id(id))) {
//requested userid !exists or = my userid => show my profile
showUser = authUser;
isMyProfile = true;
} else {
showUser = utils.getParaClient().read(Profile.id(id));
isMyProfile = isMyid(authUser, Profile.id(id));
}
if (showUser == null || !ParaObjectUtils.typesMatch(showUser)) {
return "redirect:" + PROFILELINK;
}
boolean protekted = !utils.isDefaultSpacePublic() && !utils.isAuthenticated(req);
boolean sameSpace = (utils.canAccessSpace(showUser, "default") && utils.canAccessSpace(authUser, "default")) ||
(authUser != null && showUser.getSpaces().stream().anyMatch(s -> utils.canAccessSpace(authUser, s)));
if (protekted || !sameSpace) {
return "redirect:" + PEOPLELINK;
}
Pager itemcount1 = utils.getPager("page1", req);
Pager itemcount2 = utils.getPager("page2", req);
List<? extends Post> questionslist = getQuestions(authUser, showUser, isMyProfile, itemcount1);
List<? extends Post> answerslist = getAnswers(authUser, showUser, isMyProfile, itemcount2);
model.addAttribute("path", "profile.vm");
model.addAttribute("title", showUser.getName());
model.addAttribute("description", getUserDescription(showUser, itemcount1.getCount(), itemcount2.getCount()));
model.addAttribute("ogimage", utils.getFullAvatarURL(showUser, AvatarFormat.Profile));
model.addAttribute("includeGMapsScripts", utils.isNearMeFeatureEnabled());
model.addAttribute("showUser", showUser);
model.addAttribute("isMyProfile", isMyProfile);
model.addAttribute("badgesCount", showUser.getBadgesMap().size());
model.addAttribute("canEdit", isMyProfile || canEditProfile(authUser, id));
model.addAttribute("canEditAvatar", CONF.avatarEditsEnabled());
model.addAttribute("gravatarPicture", gravatarAvatarGenerator.getLink(showUser, AvatarFormat.Profile));
model.addAttribute("isGravatarPicture", gravatarAvatarGenerator.isLink(showUser.getPicture()));
model.addAttribute("itemcount1", itemcount1);
model.addAttribute("itemcount2", itemcount2);
model.addAttribute("questionslist", questionslist);
model.addAttribute("answerslist", answerslist);
model.addAttribute("nameEditsAllowed", CONF.nameEditsEnabled());
return "base";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: get
File: src/main/java/com/erudika/scoold/controllers/ProfileController.java
Repository: Erudika/scoold
The code follows secure coding practices.
|
[
"CWE-130"
] |
CVE-2022-1543
|
MEDIUM
| 6.5
|
Erudika/scoold
|
get
|
src/main/java/com/erudika/scoold/controllers/ProfileController.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean hasSectionEdit()
{
return this.xwiki.hasSectionEdit(getXWikiContext());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasSectionEdit
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2023-37911
|
MEDIUM
| 6.5
|
xwiki/xwiki-platform
|
hasSectionEdit
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
|
f471f2a392aeeb9e51d59fdfe1d76fccf532523f
| 0
|
Analyze the following code function for security vulnerabilities
|
private Map<String, SearchEngineRule> getSearchEngineRules(XWikiContext context)
{
// We currently hardcode the rules
// We will put them in the preferences soon
Map<String, SearchEngineRule> map = new HashMap<String, SearchEngineRule>();
map.put("Google", new SearchEngineRule("google.", "s/(^|.*&)q=(.*?)(&.*|$)/$2/"));
map.put("MSN", new SearchEngineRule("search.msn.", "s/(^|.*&)q=(.*?)(&.*|$)/$2/"));
map.put("Yahoo", new SearchEngineRule("search.yahoo.", "s/(^|.*&)p=(.*?)(&.*|$)/$2/"));
map.put("Voila", new SearchEngineRule("voila.fr", "s/(^|.*&)kw=(.*?)(&.*|$)/$2/"));
return map;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSearchEngineRules
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
|
getSearchEngineRules
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
@TestApi
public void setLaunchedFromBubble(boolean fromBubble) {
mLaunchedFromBubble = fromBubble;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setLaunchedFromBubble
File: core/java/android/app/ActivityOptions.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-20918
|
CRITICAL
| 9.8
|
android
|
setLaunchedFromBubble
|
core/java/android/app/ActivityOptions.java
|
51051de4eb40bb502db448084a83fd6cbfb7d3cf
| 0
|
Analyze the following code function for security vulnerabilities
|
public KeyStatusType getStatus() {
return status;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStatus
File: java_src/src/main/java/com/google/crypto/tink/PrimitiveSet.java
Repository: tink-crypto/tink
The code follows secure coding practices.
|
[
"CWE-176"
] |
CVE-2020-8929
|
MEDIUM
| 5
|
tink-crypto/tink
|
getStatus
|
java_src/src/main/java/com/google/crypto/tink/PrimitiveSet.java
|
93d839a5865b9d950dffdc9d0bc99b71280a8899
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<Integer> getSearchPreFetchThresholds() {
return mySearchPreFetchThresholds;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSearchPreFetchThresholds
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
|
getSearchPreFetchThresholds
|
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
|
protected CompletableFuture<Void> internalSetDeduplicationSnapshotInterval(Integer interval) {
if (interval != null && interval < 0) {
throw new RestException(Status.PRECONDITION_FAILED, "interval must be 0 or more");
}
return getTopicPoliciesAsyncWithRetry(topicName)
.thenCompose(op -> {
TopicPolicies policies = op.orElseGet(TopicPolicies::new);
policies.setDeduplicationSnapshotIntervalSeconds(interval);
return pulsar().getTopicPoliciesService().updateTopicPoliciesAsync(topicName, policies);
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: internalSetDeduplicationSnapshotInterval
File: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
Repository: apache/pulsar
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-41571
|
MEDIUM
| 4
|
apache/pulsar
|
internalSetDeduplicationSnapshotInterval
|
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
|
5b35bb81c31f1bc2ad98c9fde5b39ec68110ca52
| 0
|
Analyze the following code function for security vulnerabilities
|
@GuardedBy("this")
private void trimApplicationsLocked(boolean forceFullOomAdj, String oomAdjReason) {
// First remove any unused application processes whose package
// has been removed.
boolean didSomething = false;
for (int i = mProcessList.mRemovedProcesses.size() - 1; i >= 0; i--) {
final ProcessRecord app = mProcessList.mRemovedProcesses.get(i);
if (!app.hasActivitiesOrRecentTasks()
&& app.mReceivers.numberOfCurReceivers() == 0
&& app.mServices.numberOfRunningServices() == 0) {
final IApplicationThread thread = app.getThread();
Slog.i(TAG, "Exiting empty application process "
+ app.toShortString() + " ("
+ (thread != null ? thread.asBinder() : null)
+ ")\n");
final int pid = app.getPid();
if (pid > 0 && pid != MY_PID) {
app.killLocked("empty",
ApplicationExitInfo.REASON_OTHER,
ApplicationExitInfo.SUBREASON_TRIM_EMPTY,
false);
} else if (thread != null) {
try {
thread.scheduleExit();
} catch (Exception e) {
// Ignore exceptions.
}
}
didSomething = true;
cleanUpApplicationRecordLocked(app, pid, false, true, -1, false /*replacingPid*/,
false /* fromBinderDied */);
mProcessList.mRemovedProcesses.remove(i);
if (app.isPersistent()) {
addAppLocked(app.info, null, false, null /* ABI override */,
ZYGOTE_POLICY_FLAG_BATCH_LAUNCH);
app.mProfile.addHostingComponentType(HOSTING_COMPONENT_TYPE_PERSISTENT);
}
}
}
// Now update the oom adj for all processes. Don't skip this, since other callers
// might be depending on it.
if (didSomething || forceFullOomAdj) {
updateOomAdjLocked(oomAdjReason);
} else {
// Process any pending oomAdj targets, it'll be a no-op if nothing is pending.
updateOomAdjPendingTargetsLocked(oomAdjReason);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: trimApplicationsLocked
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
|
trimApplicationsLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
private int checkProvisioningPreConditionSkipPermissionNoLog(String action,
String packageName, int userId) {
if (action != null) {
switch (action) {
case DevicePolicyManager.ACTION_PROVISION_MANAGED_PROFILE:
return checkManagedProfileProvisioningPreCondition(packageName, userId);
case DevicePolicyManager.ACTION_PROVISION_MANAGED_DEVICE:
case DevicePolicyManager.ACTION_PROVISION_FINANCED_DEVICE:
return checkDeviceOwnerProvisioningPreCondition(userId);
}
}
throw new IllegalArgumentException("Unknown provisioning action " + action);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkProvisioningPreConditionSkipPermissionNoLog
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
checkProvisioningPreConditionSkipPermissionNoLog
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
@Deprecated(since = "14.8RC1")
public List<DocumentReference> loadBacklinks(DocumentReference documentReference, boolean bTransaction,
XWikiContext inputxcontext) throws XWikiException
{
return innerLoadBacklinks(inputxcontext, (Session session) -> {
// the select clause is compulsory to reach the fullName i.e. the page pointed
Query<String> query = session.createQuery(
"select distinct backlink.fullName from XWikiLink as backlink where backlink.id.link = :backlink",
String.class);
// if we are in the same wiki context, we should only get the local reference
// but if we are not, then we have to check the full reference, containing the wiki part since
// it's how the link are recorded.
// This should be changed once the refactoring to support backlinks properly has been done.
// See: XWIKI-16192
query.setParameter("backlink", this.compactWikiEntityReferenceSerializer.serialize(documentReference));
return query;
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: loadBacklinks
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
|
loadBacklinks
|
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 Intent getIntentForIntentSender(IIntentSender pendingResult) {
enforceCallingPermission(Manifest.permission.GET_INTENT_SENDER_INTENT,
"getIntentForIntentSender()");
if (!(pendingResult instanceof PendingIntentRecord)) {
return null;
}
try {
PendingIntentRecord res = (PendingIntentRecord)pendingResult;
return res.key.requestIntent != null ? new Intent(res.key.requestIntent) : null;
} catch (ClassCastException e) {
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getIntentForIntentSender
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
|
getIntentForIntentSender
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void startActivity(Intent intent) {
Bundle extra = intent.getExtras();
if(extra != null && extra.containsKey("WaitForResult") && !extra.getBoolean("WaitForResult")){
waitingForResult = false;
}else{
waitingForResult = true;
}
if (InPlaceEditView.isEditing()) {
AndroidImplementation.stopEditing(true);
}
super.startActivity(intent);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startActivity
File: Ports/Android/src/com/codename1/impl/android/CodenameOneActivity.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
startActivity
|
Ports/Android/src/com/codename1/impl/android/CodenameOneActivity.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public Jooby numberFormat(final String numberFormat) {
this.numberFormat = requireNonNull(numberFormat, "NumberFormat required.");
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: numberFormat
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
|
numberFormat
|
jooby/src/main/java/org/jooby/Jooby.java
|
34f526028e6cd0652125baa33936ffb6a8a4a009
| 0
|
Analyze the following code function for security vulnerabilities
|
private void autoConnectA2dp(){
A2dpService a2dpSservice = A2dpService.getA2dpService();
BluetoothDevice bondedDevices[] = getBondedDevices();
if ((bondedDevices == null) ||(a2dpSservice == null)) {
return;
}
for (BluetoothDevice device : bondedDevices) {
if (a2dpSservice.getPriority(device) == BluetoothProfile.PRIORITY_AUTO_CONNECT ){
debugLog("autoConnectA2dp() - Connecting A2DP with " + device.toString());
a2dpSservice.connect(device);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: autoConnectA2dp
File: src/com/android/bluetooth/btservice/AdapterService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-362",
"CWE-20"
] |
CVE-2016-3760
|
MEDIUM
| 5.4
|
android
|
autoConnectA2dp
|
src/com/android/bluetooth/btservice/AdapterService.java
|
122feb9a0b04290f55183ff2f0384c6c53756bd8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Procedure
@Description("apoc.export.csv.all(file,config) - exports whole database as csv to the provided file")
public Stream<ProgressInfo> all(@Name("file") String fileName, @Name("config") Map<String, Object> config) throws Exception {
String source = String.format("database: nodes(%d), rels(%d)", Util.nodeCount(tx), Util.relCount(tx));
return exportCsv(fileName, source, new DatabaseSubGraph(tx), new ExportConfig(config));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: all
File: core/src/main/java/apoc/export/csv/ExportCSV.java
Repository: neo4j-contrib/neo4j-apoc-procedures
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-23532
|
MEDIUM
| 6.5
|
neo4j-contrib/neo4j-apoc-procedures
|
all
|
core/src/main/java/apoc/export/csv/ExportCSV.java
|
01e63ed2d187cd2a8aa1d78bf831ef0fdd69b522
| 0
|
Analyze the following code function for security vulnerabilities
|
@Column(name = "channel", nullable = false, length = 50)
public String getChannel() {
return this.channel;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getChannel
File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/log/LogUpload.java
Repository: sanluan/PublicCMS
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-21333
|
LOW
| 3.5
|
sanluan/PublicCMS
|
getChannel
|
publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/log/LogUpload.java
|
b4d5956e65b14347b162424abb197a180229b3db
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean changeState(String path, String recordingId, String state) {
boolean exists = false;
boolean succeeded = true;
String[] format = getPlaybackFormats(path);
for (String aFormat : format) {
List<File> recordings = getDirectories(path + File.separatorChar + aFormat);
for (File recording : recordings) {
if (recording.getName().equalsIgnoreCase(recordingId)) {
exists = true;
File dest;
if (state.equals(Recording.STATE_PUBLISHED)) {
dest = new File(publishedDir + File.separatorChar + aFormat);
succeeded &= publishRecording(dest, recordingId, recording, aFormat);
} else if (state.equals(Recording.STATE_UNPUBLISHED)) {
dest = new File(unpublishedDir + File.separatorChar + aFormat);
succeeded &= unpublishRecording(dest, recordingId, recording, aFormat);
} else if (state.equals(Recording.STATE_DELETED)) {
dest = new File(deletedDir + File.separatorChar + aFormat);
succeeded &= deleteRecording(dest, recordingId, recording, aFormat);
} else {
log.debug(String.format("State: %s, is not supported", state));
return false;
}
}
}
}
return exists && succeeded;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: changeState
File: bbb-common-web/src/main/java/org/bigbluebutton/api/RecordingService.java
Repository: bigbluebutton
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-12443
|
HIGH
| 7.5
|
bigbluebutton
|
changeState
|
bbb-common-web/src/main/java/org/bigbluebutton/api/RecordingService.java
|
b21ca8355a57286a1e6df96984b3a4c57679a463
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequiresPermission(value = MANAGE_DEVICE_POLICY_LOCK, conditional = true)
public void lockNow() {
lockNow(0);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: lockNow
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
|
lockNow
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getName() {
return name;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getName
File: src/main/java/com/gitblit/StoredUserConfig.java
Repository: gitblit-org/gitblit
The code follows secure coding practices.
|
[
"CWE-269"
] |
CVE-2022-31267
|
HIGH
| 7.5
|
gitblit-org/gitblit
|
getName
|
src/main/java/com/gitblit/StoredUserConfig.java
|
9b4afad6f4be212474809533ec2c280cce86501a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onHeadsUpUnPinned(ExpandableNotificationRow headsUp) {
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onHeadsUpUnPinned
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
onHeadsUpUnPinned
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean transferTouch() {
return mWmService.mInputManager.transferTouch(mInputChannelToken, getDisplayId());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: transferTouch
File: services/core/java/com/android/server/wm/WindowState.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35674
|
HIGH
| 7.8
|
android
|
transferTouch
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void showStrictModeViolation(boolean on) {
int pid = Binder.getCallingPid();
mH.sendMessage(mH.obtainMessage(H.SHOW_STRICT_MODE_VIOLATION, on ? 1 : 0, pid));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: showStrictModeViolation
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
|
showStrictModeViolation
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
protected final boolean _isPosInf(String text) {
return "Infinity".equals(text) || "INF".equals(text);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _isPosInf
File: src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2022-42003
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
_isPosInf
|
src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java
|
d78d00ee7b5245b93103fef3187f70543d67ca33
| 0
|
Analyze the following code function for security vulnerabilities
|
private final Object vanillaDeserialize(JsonParser p,
DeserializationContext ctxt, JsonToken t)
throws IOException
{
final Object bean = _valueInstantiator.createUsingDefault(ctxt);
// [databind#631]: Assign current value, to be accessible by custom serializers
p.setCurrentValue(bean);
if (p.hasTokenId(JsonTokenId.ID_FIELD_NAME)) {
String propName = p.currentName();
do {
p.nextToken();
SettableBeanProperty prop = _beanProperties.find(propName);
if (prop != null) { // normal case
try {
prop.deserializeAndSet(p, ctxt, bean);
} catch (Exception e) {
wrapAndThrow(e, bean, propName, ctxt);
}
continue;
}
handleUnknownVanilla(p, ctxt, bean, propName);
} while ((propName = p.nextFieldName()) != null);
}
return bean;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: vanillaDeserialize
File: src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializer.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2022-42004
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
vanillaDeserialize
|
src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializer.java
|
063183589218fec19a9293ed2f17ec53ea80ba88
| 0
|
Analyze the following code function for security vulnerabilities
|
public static WindowManagerService main(final Context context,
final InputManagerService im,
final boolean haveInputMethods, final boolean showBootMsgs,
final boolean onlyCore) {
final WindowManagerService[] holder = new WindowManagerService[1];
DisplayThread.getHandler().runWithScissors(new Runnable() {
@Override
public void run() {
holder[0] = new WindowManagerService(context, im,
haveInputMethods, showBootMsgs, onlyCore);
}
}, 0);
return holder[0];
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: main
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
|
main
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
private PersistentUserSessionAdapter toAdapter(RealmModel realm, PersistentUserSessionEntity entity) {
PersistentUserSessionModel model = new PersistentUserSessionModel();
model.setUserSessionId(entity.getUserSessionId());
model.setStarted(entity.getCreatedOn());
model.setLastSessionRefresh(entity.getLastSessionRefresh());
model.setData(entity.getData());
model.setOffline(offlineFromString(entity.getOffline()));
Map<String, AuthenticatedClientSessionModel> clientSessions = new HashMap<>();
return new PersistentUserSessionAdapter(session, model, realm, entity.getUserId(), clientSessions);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toAdapter
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
|
toAdapter
|
model/jpa/src/main/java/org/keycloak/models/jpa/session/JpaUserSessionPersisterProvider.java
|
11eb952e1df7cbb95b1e2c101dfd4839a2375695
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Double getDoubleAndRemove(K name) {
V v = getAndRemove(name);
try {
return v != null ? toDouble(name, v) : null;
} catch (RuntimeException ignore) {
return null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDoubleAndRemove
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
|
getDoubleAndRemove
|
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
|
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isValidationFailure() {
return cause.getCause() instanceof InvalidValueException;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isValidationFailure
File: server/src/main/java/com/vaadin/ui/Grid.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-25028
|
MEDIUM
| 4.3
|
vaadin/framework
|
isValidationFailure
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("javadoc")
public int computeVerticalScrollRange() {
return mRenderCoordinates.getContentHeightPixInt();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: computeVerticalScrollRange
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
|
computeVerticalScrollRange
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
void updateApplicationInfoLocked(@NonNull List<String> packagesToUpdate, int userId) {
final boolean updateFrameworkRes = packagesToUpdate.contains("android");
for (int i = mLruProcesses.size() - 1; i >= 0; i--) {
final ProcessRecord app = mLruProcesses.get(i);
if (app.thread == null) {
continue;
}
if (userId != UserHandle.USER_ALL && app.userId != userId) {
continue;
}
final int packageCount = app.pkgList.size();
for (int j = 0; j < packageCount; j++) {
final String packageName = app.pkgList.keyAt(j);
if (updateFrameworkRes || packagesToUpdate.contains(packageName)) {
try {
final ApplicationInfo ai = AppGlobals.getPackageManager()
.getApplicationInfo(packageName, STOCK_PM_FLAGS, app.userId);
if (ai != null) {
app.thread.scheduleApplicationInfoChanged(ai);
}
} catch (RemoteException e) {
Slog.w(TAG, String.format("Failed to update %s ApplicationInfo for %s",
packageName, app));
}
}
}
}
if (updateFrameworkRes) {
// Update system server components that need to know about changed overlays. Because the
// overlay is applied in ActivityThread, we need to serialize through its thread too.
final Executor executor = ActivityThread.currentActivityThread().getExecutor();
final DisplayManagerInternal display =
LocalServices.getService(DisplayManagerInternal.class);
if (display != null) {
executor.execute(display::onOverlayChanged);
}
if (mWindowManager != null) {
executor.execute(mWindowManager::onOverlayChanged);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateApplicationInfoLocked
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
|
updateApplicationInfoLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
private UserInfo createTrustedUser() {
UserInfo newUserInfo = mUserManager.createUser(mAddingUserName, 0);
if (newUserInfo != null) {
Utils.assignDefaultPhoto(getActivity(), newUserInfo.id);
}
return newUserInfo;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createTrustedUser
File: src/com/android/settings/users/UserSettings.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3889
|
HIGH
| 7.2
|
android
|
createTrustedUser
|
src/com/android/settings/users/UserSettings.java
|
bd5d5176c74021e8cf4970f93f273ba3023c3d72
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Stream<JsonValue> getValueStream() {
if (! (currentContext instanceof NoneContext)) {
throw new IllegalStateException(
JsonMessages.PARSER_GETVALUESTREAM_ERR());
}
Spliterator<JsonValue> spliterator =
new Spliterators.AbstractSpliterator<JsonValue>(Long.MAX_VALUE, Spliterator.ORDERED) {
@Override
public Spliterator<JsonValue> trySplit() {
return null;
}
@Override
public boolean tryAdvance(Consumer<? super JsonValue> action) {
if (action == null) {
throw new NullPointerException();
}
if (! hasNext()) {
return false;
}
next();
action.accept(getValue());
return true;
}
};
return StreamSupport.stream(spliterator, false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getValueStream
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
|
getValueStream
|
impl/src/main/java/org/eclipse/parsson/JsonParserImpl.java
|
ab239fee273cb262910890f1a6fe666ae92cd623
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isVisible() {
return visible;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isVisible
File: base/common/src/main/java/com/netscape/certsrv/profile/ProfileData.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
isVisible
|
base/common/src/main/java/com/netscape/certsrv/profile/ProfileData.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public void addProfileInput(ProfileInput input) {
inputs.add(input);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addProfileInput
File: base/common/src/main/java/com/netscape/certsrv/profile/ProfileData.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
addProfileInput
|
base/common/src/main/java/com/netscape/certsrv/profile/ProfileData.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
private Task getCurrentTaskInfo(ProcessInstance processInstance) {
Task currentTask = null;
try {
String activitiId = (String) PropertyUtils.getProperty(processInstance, "activityId");
logger.debug("current activity id: {}", activitiId);
currentTask = taskService.createTaskQuery().processInstanceId(processInstance.getId()).taskDefinitionKey(activitiId)
.singleResult();
logger.debug("current task for processInstance: {}", ToStringBuilder.reflectionToString(currentTask));
} catch (Exception e) {
logger.error("can not get property activityId from processInstance: {}", processInstance);
}
return currentTask;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCurrentTaskInfo
File: src/main/java/com/thinkgem/jeesite/modules/act/service/ActTaskService.java
Repository: thinkgem/jeesite
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2023-34601
|
CRITICAL
| 9.8
|
thinkgem/jeesite
|
getCurrentTaskInfo
|
src/main/java/com/thinkgem/jeesite/modules/act/service/ActTaskService.java
|
30750011b49f7c8d45d0f3ab13ed3a1a422655bb
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getComment()
{
return this.doc.getComment();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getComment
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-23615
|
MEDIUM
| 5.5
|
xwiki/xwiki-platform
|
getComment
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
|
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
| 0
|
Analyze the following code function for security vulnerabilities
|
public static final int getParentPid(int pid) {
String[] procStatusLabels = { "PPid:" };
long[] procStatusValues = new long[1];
procStatusValues[0] = -1;
Process.readProcLines("/proc/" + pid + "/status", procStatusLabels, procStatusValues);
return (int) procStatusValues[0];
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getParentPid
File: core/java/android/os/Process.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3911
|
HIGH
| 9.3
|
android
|
getParentPid
|
core/java/android/os/Process.java
|
2c7008421cb67f5d89f16911bdbe36f6c35311ad
| 0
|
Analyze the following code function for security vulnerabilities
|
public void enter() {
infoLog("Entering PendingCommandState");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: enter
File: src/com/android/bluetooth/btservice/AdapterState.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-362",
"CWE-20"
] |
CVE-2016-3760
|
MEDIUM
| 5.4
|
android
|
enter
|
src/com/android/bluetooth/btservice/AdapterState.java
|
122feb9a0b04290f55183ff2f0384c6c53756bd8
| 0
|
Analyze the following code function for security vulnerabilities
|
public StackInfo getStackInfo(int stackId) throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStackInfo
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
getStackInfo
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean updatePackage(String x_app_id, String content_type,
String package_name, String class_name,
int app_type, boolean need_signature, boolean further_processing) {
if (!appTypeCheck(app_type)) {
Log.w(LOG_TAG, "invalid app_type " + app_type + ". app_type must be "
+ WapPushManagerParams.APP_TYPE_ACTIVITY + " or "
+ WapPushManagerParams.APP_TYPE_SERVICE);
return false;
}
WapPushManDBHelper dbh = getDatabase(mContext);
SQLiteDatabase db = dbh.getWritableDatabase();
WapPushManDBHelper.queryData lastapp = dbh.queryLastApp(db, x_app_id, content_type);
if (lastapp == null) {
db.close();
return false;
}
ContentValues values = new ContentValues();
String where = "x_wap_application=\'" + x_app_id + "\'"
+ " and content_type=\'" + content_type + "\'"
+ " and install_order=" + lastapp.installOrder;
values.put("package_name", package_name);
values.put("class_name", class_name);
values.put("app_type", app_type);
values.put("need_signature", need_signature ? 1 : 0);
values.put("further_processing", further_processing ? 1 : 0);
int num = db.update(APPID_TABLE_NAME, values, where, null);
if (LOCAL_LOGV) Log.v(LOG_TAG, "update:" + x_app_id + ":" + content_type + " "
+ package_name + "." + class_name
+ ", sq:" + lastapp.installOrder);
db.close();
return num > 0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updatePackage
File: packages/WAPPushManager/src/com/android/smspush/WapPushManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2014-8507
|
HIGH
| 7.5
|
android
|
updatePackage
|
packages/WAPPushManager/src/com/android/smspush/WapPushManager.java
|
48ed835468c6235905459e6ef7df032baf3e4df6
| 0
|
Analyze the following code function for security vulnerabilities
|
private native boolean nativePrint(long nativeTabAndroid);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nativePrint
File: chrome/android/java/src/org/chromium/chrome/browser/Tab.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
nativePrint
|
chrome/android/java/src/org/chromium/chrome/browser/Tab.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
public Object[] getParams() {
return mParams.clone();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getParams
File: src/main/java/com/android/apksig/ApkVerifier.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21253
|
MEDIUM
| 5.5
|
android
|
getParams
|
src/main/java/com/android/apksig/ApkVerifier.java
|
039f815895f62c9f8af23df66622b66246f3f61e
| 0
|
Analyze the following code function for security vulnerabilities
|
private void printRequestAndResponse(Source sourceResponse, boolean buildResponseDocumentEnvelope,
boolean buildResponseDocumentBody,
Document responseDocumentEnvelope, Document responseDocumentBody) {
try {
getTransformer().transform(sourceResponse, new StreamResult(System.err));
if (buildResponseDocumentEnvelope) {
getTransformer().transform(new DOMSource(responseDocumentEnvelope), new StreamResult(System.err));
} else if (buildResponseDocumentBody) {
getTransformer().transform(new DOMSource(responseDocumentEnvelope), new StreamResult(System.err));
getTransformer().transform(new DOMSource(responseDocumentBody), new StreamResult(System.err));
}
} catch (final TransformerException e) {
e.printStackTrace();
}
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2020-36640
- Severity: MEDIUM
- CVSS Score: 4.9
Description: fix(vulnerabilities): fix XXE attacks vulnerabilities and other code smell (#17)
* Access to external entities and network access should always be
disable to avoid XXS attacks vulnerabilities.
* Log error properly
* refactor logger name to be compliant with java naming conventions
Function: printRequestAndResponse
File: src/main/java/org/bonitasoft/connectors/ws/SecureWSConnector.java
Repository: bonitasoft/bonita-connector-webservice
Fixed Code:
private void printRequestAndResponse(Source sourceResponse, boolean buildResponseDocumentEnvelope,
boolean buildResponseDocumentBody,
Document responseDocumentEnvelope, Document responseDocumentBody) {
try {
getTransformer().transform(sourceResponse, new StreamResult(System.err));
if (buildResponseDocumentEnvelope) {
getTransformer().transform(new DOMSource(responseDocumentEnvelope), new StreamResult(System.err));
} else if (buildResponseDocumentBody) {
getTransformer().transform(new DOMSource(responseDocumentEnvelope), new StreamResult(System.err));
getTransformer().transform(new DOMSource(responseDocumentBody), new StreamResult(System.err));
}
} catch (final TransformerException e) {
logger.severe(e.getMessage());
}
}
|
[
"CWE-611"
] |
CVE-2020-36640
|
MEDIUM
| 4.9
|
bonitasoft/bonita-connector-webservice
|
printRequestAndResponse
|
src/main/java/org/bonitasoft/connectors/ws/SecureWSConnector.java
|
a12ad691c05af19e9061d7949b6b828ce48815d5
| 1
|
Analyze the following code function for security vulnerabilities
|
public InboxStyle setSummaryText(CharSequence cs) {
internalSetSummaryText(safeCharSequence(cs));
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSummaryText
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
setSummaryText
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Experiment read(K8sClient api) {
try {
PyTorchJob pyTorchJob = api.getPyTorchJobClient()
.get(getMetadata().getNamespace(), getMetadata().getName())
.throwsApiException().getObject();
if (LOG.isDebugEnabled()) {
LOG.debug("Get PyTorchJob resource: \n{}", YamlUtils.toPrettyYaml(pyTorchJob));
}
return parseExperimentResponseObject(pyTorchJob, PyTorchJob.class);
} catch (ApiException e) {
throw new SubmarineRuntimeException(e.getCode(), e.getMessage());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: read
File: submarine-server/server-submitter/submitter-k8s/src/main/java/org/apache/submarine/server/submitter/k8s/model/pytorchjob/PyTorchJob.java
Repository: apache/submarine
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2023-46302
|
CRITICAL
| 9.8
|
apache/submarine
|
read
|
submarine-server/server-submitter/submitter-k8s/src/main/java/org/apache/submarine/server/submitter/k8s/model/pytorchjob/PyTorchJob.java
|
ed5ad3b824ba388259e0d1ea137d7fca5f0c288e
| 0
|
Analyze the following code function for security vulnerabilities
|
private void checkValidAccounts() {
final Account[] allAccounts = AccountUtils.getAccounts(this);
if (allAccounts == null || allAccounts.length == 0) {
final Intent noAccountIntent = MailAppProvider.getNoAccountIntent(this);
if (noAccountIntent != null) {
mAccounts = null;
startActivityForResult(noAccountIntent, RESULT_CREATE_ACCOUNT);
}
} else {
// If none of the accounts are syncing, setup a watcher.
boolean anySyncing = false;
for (Account a : allAccounts) {
if (a.isAccountReady()) {
anySyncing = true;
break;
}
}
if (!anySyncing) {
// There are accounts, but none are sync'd, which is just like having no accounts.
mAccounts = null;
getLoaderManager().initLoader(LOADER_ACCOUNT_CURSOR, null, this);
return;
}
mAccounts = AccountUtils.getSyncingAccounts(this);
finishCreate();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkValidAccounts
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
|
checkValidAccounts
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void stopContext(Context ctx) {
synchronized(activeContexts) {
activeContexts.remove(ctx);
if (activeContexts.isEmpty()) {
// If we are the last context, we should deinitialize
syncDeinitialize();
} else {
if (instance != null && getActivity() != null) {
// if this is an activity, then we should clean up
// our UI resources anyways because the last context
// to be cleaned up might not have access to the UI thread.
instance.deinitialize();
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: stopContext
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
|
stopContext
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean isDisabled() {
return mBlacklistDisabled;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isDisabled
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
|
isDisabled
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
@NonNull
public List<String> getDelegatedScopes(ComponentName who,
String delegatePackage) throws SecurityException {
Objects.requireNonNull(delegatePackage, "Delegate package is null");
final CallerIdentity caller = getCallerIdentity(who);
// Ensure the caller may call this method:
// * Either it's a profile owner / device owner, if componentName is provided
// * Or it's an app querying its own delegation scopes
if (caller.hasAdminComponent()) {
Preconditions.checkCallAuthorization(
isProfileOwner(caller) || isDefaultDeviceOwner(caller));
} else {
Preconditions.checkCallAuthorization(isPackage(caller, delegatePackage),
String.format("Caller with uid %d is not %s", caller.getUid(),
delegatePackage));
}
synchronized (getLockObject()) {
final DevicePolicyData policy = getUserData(caller.getUserId());
// Retrieve the scopes assigned to delegatePackage, or null if no scope was given.
final List<String> scopes = policy.mDelegationMap.get(delegatePackage);
return scopes == null ? Collections.EMPTY_LIST : scopes;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDelegatedScopes
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
|
getDelegatedScopes
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
void holdCall(Call call) {
if (!mCalls.contains(call)) {
Log.w(this, "Unknown call (%s) asked to be put on hold", call);
} else {
Log.d(this, "Putting call on hold: (%s)", call);
call.hold();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: holdCall
File: src/com/android/server/telecom/CallsManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2423
|
MEDIUM
| 6.6
|
android
|
holdCall
|
src/com/android/server/telecom/CallsManager.java
|
a06c9a4aef69ae27b951523cf72bf72412bf48fa
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Response processRemoveSession(SessionId id, long lastDeliveredSequenceId) throws Exception {
ConnectionId connectionId = id.getParentId();
TransportConnectionState cs = lookupConnectionState(connectionId);
if (cs == null) {
throw new IllegalStateException("Cannot remove session from connection that had not been registered: " + connectionId);
}
SessionState session = cs.getSessionState(id);
if (session == null) {
throw new IllegalStateException("Cannot remove session that had not been registered: " + id);
}
// Don't let new consumers or producers get added while we are closing
// this down.
session.shutdown();
// Cascade the connection stop to the consumers and producers.
for (ConsumerId consumerId : session.getConsumerIds()) {
try {
processRemoveConsumer(consumerId, lastDeliveredSequenceId);
} catch (Throwable e) {
LOG.warn("Failed to remove consumer: {}", consumerId, e);
}
}
for (ProducerId producerId : session.getProducerIds()) {
try {
processRemoveProducer(producerId);
} catch (Throwable e) {
LOG.warn("Failed to remove producer: {}", producerId, e);
}
}
cs.removeSession(id);
broker.removeSession(cs.getContext(), session.getInfo());
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: processRemoveSession
File: activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
Repository: apache/activemq
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-3576
|
MEDIUM
| 5
|
apache/activemq
|
processRemoveSession
|
activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
|
00921f2
| 0
|
Analyze the following code function for security vulnerabilities
|
private List<Service> buildServices(ResultSet resultSet) throws SQLException {
List<Service> services = new ArrayList<>();
while (resultSet.next()) {
Service service = new Service();
service.setId(resultSet.getString(H2TableInstaller.ID_COLUMN));
service.setName(resultSet.getString(ServiceTraffic.NAME));
services.add(service);
}
return services;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: buildServices
File: oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/h2/dao/H2MetadataQueryDAO.java
Repository: apache/skywalking
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2020-13921
|
HIGH
| 7.5
|
apache/skywalking
|
buildServices
|
oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/h2/dao/H2MetadataQueryDAO.java
|
ddb6d9a5019a9c1fe31c364485a4e4b5066fefc3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void engineInitInternal(byte[] encodedKey, AlgorithmParameterSpec params,
SecureRandom random) throws InvalidKeyException,
InvalidAlgorithmParameterException {
byte[] iv;
final int tagLenBits;
if (params == null) {
iv = null;
tagLenBits = 0;
} else {
Class<?> gcmSpecClass;
try {
gcmSpecClass = Class.forName("javax.crypto.spec.GCMParameterSpec");
} catch (ClassNotFoundException e) {
gcmSpecClass = null;
}
if (gcmSpecClass != null && gcmSpecClass.isAssignableFrom(params.getClass())) {
try {
Method getTLenMethod = gcmSpecClass.getMethod("getTLen");
Method getIVMethod = gcmSpecClass.getMethod("getIV");
tagLenBits = (int) getTLenMethod.invoke(params);
iv = (byte[]) getIVMethod.invoke(params);
} catch (NoSuchMethodException | IllegalAccessException e) {
throw new RuntimeException("GCMParameterSpec lacks expected methods", e);
} catch (InvocationTargetException e) {
throw new RuntimeException("Could not fetch GCM parameters",
e.getTargetException());
}
} else if (params instanceof IvParameterSpec) {
IvParameterSpec ivParams = (IvParameterSpec) params;
iv = ivParams.getIV();
tagLenBits = 0;
} else {
iv = null;
tagLenBits = 0;
}
}
if (tagLenBits % 8 != 0) {
throw new InvalidAlgorithmParameterException(
"Tag length must be a multiple of 8; was " + tagLen);
}
tagLen = tagLenBits / 8;
final boolean encrypting = isEncrypting();
evpAead = getEVP_AEAD(encodedKey.length);
final int expectedIvLength = NativeCrypto.EVP_AEAD_nonce_length(evpAead);
if (iv == null && expectedIvLength != 0) {
if (!encrypting) {
throw new InvalidAlgorithmParameterException("IV must be specified in " + mode
+ " mode");
}
iv = new byte[expectedIvLength];
if (random == null) {
random = new SecureRandom();
}
random.nextBytes(iv);
} else if (expectedIvLength == 0 && iv != null) {
throw new InvalidAlgorithmParameterException("IV not used in " + mode + " mode");
} else if (iv != null && iv.length != expectedIvLength) {
throw new InvalidAlgorithmParameterException("Expected IV length of "
+ expectedIvLength + " but was " + iv.length);
}
this.iv = iv;
reset();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: engineInitInternal
File: src/main/java/org/conscrypt/OpenSSLCipher.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2461
|
HIGH
| 7.6
|
android
|
engineInitInternal
|
src/main/java/org/conscrypt/OpenSSLCipher.java
|
1638945d4ed9403790962ec7abed1b7a232a9ff8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getCode() {
if (code == null) {
return name();
}
return code;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCode
File: org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/extensions/contentmodel/participants/XMLSyntaxErrorCode.java
Repository: eclipse/lemminx
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2019-18213
|
MEDIUM
| 6.5
|
eclipse/lemminx
|
getCode
|
org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/extensions/contentmodel/participants/XMLSyntaxErrorCode.java
|
c8bf3245a72cace50ee2aae5eee69538c58ce056
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Principal getPeerPrincipal() throws SSLPeerUnverifiedException {
Certificate[] peer = getPeerCertificates();
// No need for null or length > 0 is needed as this is done in getPeerCertificates()
// already.
return ((java.security.cert.X509Certificate) peer[0]).getSubjectX500Principal();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPeerPrincipal
File: handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-835"
] |
CVE-2016-4970
|
HIGH
| 7.8
|
netty
|
getPeerPrincipal
|
handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java
|
bc8291c80912a39fbd2303e18476d15751af0bf1
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean getInstallPyDepPerModel() {
return Boolean.parseBoolean(getProperty(TS_INSTALL_PY_DEP_PER_MODEL, "false"));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInstallPyDepPerModel
File: frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java
Repository: pytorch/serve
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2023-43654
|
CRITICAL
| 9.8
|
pytorch/serve
|
getInstallPyDepPerModel
|
frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java
|
391bdec3348e30de173fbb7c7277970e0b53c8ad
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setBasePath(String basePath) {
this.basePath = basePath;
setOauthBasePath(basePath);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setBasePath
File: samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
setBasePath
|
samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
private ConfigurationSource getWikiConfiguration()
{
if (this.wikiConfiguration == null) {
this.wikiConfiguration = Utils.getComponent(ConfigurationSource.class, "wiki");
}
return this.wikiConfiguration;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getWikiConfiguration
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
|
getWikiConfiguration
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
public Object getData() {
return this.data;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getData
File: drools-core/src/main/java/org/drools/core/xml/ExtensibleXmlParser.java
Repository: apache/incubator-kie-drools
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2014-8125
|
HIGH
| 7.5
|
apache/incubator-kie-drools
|
getData
|
drools-core/src/main/java/org/drools/core/xml/ExtensibleXmlParser.java
|
c48464c3b246e6ef0d4cd0dbf67e83ccd532c6d3
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isAsync(XWikiRequest request)
{
return "true".equals(request.get(ASYNC_PARAM));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isAsync
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/SaveAction.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2022-23617
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
isAsync
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/SaveAction.java
|
30c52b01559b8ef5ed1035dac7c34aaf805764d5
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.