instruction
string | input
string | output
string | cwe_ids
list | cve_id
string | severity
string | cvss_score
float64 | repo_name
string | func_name
string | file_path
string | commit_hash
string | is_vulnerable
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Analyze the following code function for security vulnerabilities
|
private void notifyRankingUpdate(ManagedServiceInfo info,
NotificationRankingUpdate rankingUpdate) {
final INotificationListener listener = (INotificationListener) info.service;
try {
listener.onNotificationRankingUpdate(rankingUpdate);
} catch (RemoteException ex) {
Log.e(TAG, "unable to notify listener (ranking update): " + listener, ex);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: notifyRankingUpdate
File: services/core/java/com/android/server/notification/NotificationManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3884
|
MEDIUM
| 4.3
|
android
|
notifyRankingUpdate
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
public void cleanThumbnailsFromFileAsset(IFileAsset fileAsset) {
// Wiping out the thumbnails and resized versions
// http://jira.dotmarketing.net/browse/DOTCMS-5911
final String inode = fileAsset.getInode();
if (UtilMethods.isSet(inode)) {
final String realAssetPath = getRealAssetsRootPath();
java.io.File tumbnailDir = new java.io.File(realAssetPath + java.io.File.separator
+ "dotGenerated" + java.io.File.separator + inode.charAt(0)
+ java.io.File.separator + inode.charAt(1));
if (tumbnailDir != null) {
java.io.File[] files = tumbnailDir.listFiles();
if (files != null) {
for (java.io.File iofile : files) {
try {
if (iofile.getName().startsWith("dotGenerated_")) {
iofile.delete();
}
} catch (SecurityException e) {
Logger.error(
this,
"EditFileAction._saveWorkingFileData(): "
+ iofile.getName()
+ " cannot be erased. Please check the file permissions.");
} catch (Exception e) {
Logger.error(this,
"EditFileAction._saveWorkingFileData(): " + e.getMessage());
}
}
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cleanThumbnailsFromFileAsset
File: dotCMS/src/main/java/com/dotmarketing/portlets/fileassets/business/FileAssetAPIImpl.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-434"
] |
CVE-2017-11466
|
HIGH
| 9
|
dotCMS/core
|
cleanThumbnailsFromFileAsset
|
dotCMS/src/main/java/com/dotmarketing/portlets/fileassets/business/FileAssetAPIImpl.java
|
ab2bb2e00b841d131b8734227f9106e3ac31bb99
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean updateConfigurationLocked(Configuration values, ActivityRecord starting,
boolean initLocale, boolean deferResume) {
// pass UserHandle.USER_NULL as userId because we don't persist configuration for any user
return updateConfigurationLocked(values, starting, initLocale, false /* persistent */,
UserHandle.USER_NULL, deferResume);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateConfigurationLocked
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
|
updateConfigurationLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public Cursor queryWithFactory(CursorFactory cursorFactory,
boolean distinct, String table, String[] columns,
String selection, String[] selectionArgs, String groupBy,
String having, String orderBy, String limit) {
return queryWithFactory(cursorFactory, distinct, table, columns, selection,
selectionArgs, groupBy, having, orderBy, limit, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: queryWithFactory
File: core/java/android/database/sqlite/SQLiteDatabase.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2018-9493
|
LOW
| 2.1
|
android
|
queryWithFactory
|
core/java/android/database/sqlite/SQLiteDatabase.java
|
ebc250d16c747f4161167b5ff58b3aea88b37acf
| 0
|
Analyze the following code function for security vulnerabilities
|
public PRIndirectReference getPRIndirectReference( PdfObject obj ) {
//int xref= getFreeXref();
//this.xrefObj[ xref ]= obj;
xrefObj.add(obj);
PRIndirectReference retVal = new PRIndirectReference(this, xrefObj.size() - 1);
return retVal;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPRIndirectReference
File: java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
Repository: pdftk-java/pdftk
The code follows secure coding practices.
|
[
"CWE-835"
] |
CVE-2021-37819
|
HIGH
| 7.5
|
pdftk-java/pdftk
|
getPRIndirectReference
|
java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
|
9b0cbb76c8434a8505f02ada02a94263dcae9247
| 0
|
Analyze the following code function for security vulnerabilities
|
public static byte[] compress(int[] input)
throws IOException
{
return rawCompress(input, input.length * 4); // int uses 4 bytes
}
|
Vulnerability Classification:
- CWE: CWE-190
- CVE: CVE-2023-34454
- Severity: HIGH
- CVSS Score: 7.5
Description: Merge pull request from GHSA-fjpj-2g6w-x25r
* Fixed integer overflow by checking if bytesize is bigger than input length, then throwing exception
* Fixed integer overflow by checking if bytesize is bigger than input length, then throwing exception
* Fixed integer overflow by checking if bytesize is bigger than input length, then throwing exception
* improved error messages by adding new error enum INPUT_TOO_LARGE in SnappyErrorCode.java, and added happy and sad cases in SnappyTest.java
* fixed mispelling: validArrayInputLength --> isInvalidArrayInputLength
* switched SnappyError into ILLEGAL_ARGUMENT in SnappyErrorCode.java and Snappy.java and fixed a typo in error comment
* Fix buffer size boundary tests
* Remove negative array size tests
* updated comments for unit test
---------
Co-authored-by: Taro L. Saito <leo@xerial.org>
Function: compress
File: src/main/java/org/xerial/snappy/Snappy.java
Repository: xerial/snappy-java
Fixed Code:
public static byte[] compress(int[] input)
throws IOException
{
int byteSize = input.length * 4;
if (byteSize < input.length) {
throw new SnappyError(SnappyErrorCode.TOO_LARGE_INPUT, "input array size is too large: " + input.length);
}
return rawCompress(input, byteSize); // int uses 4 bytes
}
|
[
"CWE-190"
] |
CVE-2023-34454
|
HIGH
| 7.5
|
xerial/snappy-java
|
compress
|
src/main/java/org/xerial/snappy/Snappy.java
|
d0042551e4a3509a725038eb9b2ad1f683674d94
| 1
|
Analyze the following code function for security vulnerabilities
|
@CalledByNative
public void onUpdateUrl(String url) {
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onUpdateUrl
File: components/web_contents_delegate_android/android/java/src/org/chromium/components/web_contents_delegate_android/WebContentsDelegateAndroid.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
onUpdateUrl
|
components/web_contents_delegate_android/android/java/src/org/chromium/components/web_contents_delegate_android/WebContentsDelegateAndroid.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void sendRedirect(String redirect) throws IOException
{
if (StringUtils.isBlank(redirect)) {
// Nowhere to go to
return;
}
if (StringUtils.containsAny(redirect, '\r', '\n')) {
LOGGER.warn("Possible HTTP Response Splitting attack, attempting to redirect to [{}]", redirect);
return;
}
this.response.sendRedirect(redirect);
}
|
Vulnerability Classification:
- CWE: CWE-601
- CVE: CVE-2022-23618
- Severity: MEDIUM
- CVSS Score: 5.8
Description: XWIKI-10309: Check URL domains based on a whitelist (#1592)
Introduce a new property for listing the trusted domains and API to
check an URL against that list and the aliases used in subwikis.
* Add new property url.trustedDomains in xwiki.properties
* Add new API in URLConfiguration to retrieve this configuration value
* Create a new URLSecurityManager responsible to check if an URL can
be trusted based on this property and on the subwikis configurations
* Introduce a new listener to invalidate the cache of
URLSecurityManager whenever a XWikiServerClass xobject is
added/updated/deleted
* Move URL API implementations to URL default module
* Add a new property url.enableTrustedDomains as a global switch off the
checks on domains to avoid breaking behaviours on existing instances
* Add a constant property in URLSecurityManager to be set in
ExecutionContext to allow temporary switch off the check for
extensions
* Use both those switches in DefaultURLSecurityManager to prevent
performing the check when needed
Function: sendRedirect
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiServletResponse.java
Repository: xwiki/xwiki-platform
Fixed Code:
@Override
public void sendRedirect(String redirect) throws IOException
{
if (StringUtils.isBlank(redirect)) {
// Nowhere to go to
return;
}
if (StringUtils.containsAny(redirect, '\r', '\n')) {
LOGGER.warn("Possible HTTP Response Splitting attack, attempting to redirect to [{}]", redirect);
return;
}
// check for trusted domains, only if the given location is an absolute URL.
if (ABSOLUTE_URL_PATTERN.matcher(redirect).matches()) {
if (!getURLSecurityManager().isDomainTrusted(new URL(redirect))) {
LOGGER.warn(
"Possible phishing attack, attempting to redirect to [{}], this request has been blocked. "
+ "If the request was legitimate, add the domain related to this request in the list "
+ "of trusted domains in the configuration.", redirect);
return;
}
}
this.response.sendRedirect(redirect);
}
|
[
"CWE-601"
] |
CVE-2022-23618
|
MEDIUM
| 5.8
|
xwiki/xwiki-platform
|
sendRedirect
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiServletResponse.java
|
5251c02080466bf9fb55288f04a37671108f8096
| 1
|
Analyze the following code function for security vulnerabilities
|
private void addResults(HttpServletRequest request,
HttpServletResponse response) throws IOException {
String input = request.getParameter("input");
if (input == null) {
return;
}
input = input.trim();
if (input.isEmpty()) {
return;
}
PrintWriter out = response.getWriter();
if (input.length() > MAXIMUM_QUERY_LENGTH) {
out.print("This query is too long. If you want to run very long queries, please download and use our <a href=\"http://nlp.stanford.edu/software/CRF-NER.html\">publicly released distribution</a>.");
return;
}
String outputFormat = request.getParameter("outputFormat");
if (outputFormat == null || outputFormat.trim().isEmpty()) {
outputFormat = this.format;
}
boolean preserveSpacing;
String preserveSpacingStr = request.getParameter("preserveSpacing");
if (preserveSpacingStr == null || preserveSpacingStr.trim().isEmpty()) {
preserveSpacing = this.spacing;
} else {
preserveSpacingStr = preserveSpacingStr.trim();
preserveSpacing = Boolean.valueOf(preserveSpacingStr);
}
String classifier = request.getParameter("classifier");
if (classifier == null || classifier.trim().isEmpty()) {
classifier = this.defaultClassifier;
}
response.addHeader("classifier", classifier);
response.addHeader("outputFormat", outputFormat);
response.addHeader("preserveSpacing", String.valueOf(preserveSpacing));
if (outputFormat.equals("highlighted")) {
outputHighlighting(out, ners.get(classifier), input);
} else {
out.print(StringEscapeUtils.escapeHtml4(ners.get(classifier).classifyToString(input, outputFormat, preserveSpacing)));
}
}
|
Vulnerability Classification:
- CWE: CWE-74
- CVE: CVE-2021-44550
- Severity: HIGH
- CVSS Score: 7.5
Description: Address issue #1222: verify that classifier and outputFormat are valid values before returning them in headers. Should sanitize malicious output
Function: addResults
File: src/edu/stanford/nlp/ie/ner/webapp/NERServlet.java
Repository: stanfordnlp/CoreNLP
Fixed Code:
private void addResults(HttpServletRequest request,
HttpServletResponse response) throws IOException {
String input = request.getParameter("input");
if (input == null) {
return;
}
input = input.trim();
if (input.isEmpty()) {
return;
}
PrintWriter out = response.getWriter();
if (input.length() > MAXIMUM_QUERY_LENGTH) {
out.print("This query is too long. If you want to run very long queries, please download and use our <a href=\"http://nlp.stanford.edu/software/CRF-NER.html\">publicly released distribution</a>.");
return;
}
String outputFormat = request.getParameter("outputFormat");
if (outputFormat == null || outputFormat.trim().isEmpty()) {
outputFormat = this.format;
}
boolean preserveSpacing;
String preserveSpacingStr = request.getParameter("preserveSpacing");
if (preserveSpacingStr == null || preserveSpacingStr.trim().isEmpty()) {
preserveSpacing = this.spacing;
} else {
preserveSpacingStr = preserveSpacingStr.trim();
preserveSpacing = Boolean.valueOf(preserveSpacingStr);
}
String classifier = request.getParameter("classifier");
if (classifier == null || classifier.trim().isEmpty()) {
classifier = this.defaultClassifier;
}
CRFClassifier<CoreMap> nerModel = ners.get(classifier);
// check that we weren't asked for a classifier that doesn't exist
if (nerModel == null) {
out.print(StringEscapeUtils.escapeHtml4("Unknown model " + classifier));
return;
}
if (outputFormat.equals("highlighted")) {
outputHighlighting(out, nerModel, input);
} else {
out.print(StringEscapeUtils.escapeHtml4(nerModel.classifyToString(input, outputFormat, preserveSpacing)));
}
response.addHeader("classifier", classifier);
// a non-existent outputFormat would have just thrown an exception
response.addHeader("outputFormat", outputFormat);
response.addHeader("preserveSpacing", String.valueOf(preserveSpacing));
}
|
[
"CWE-74"
] |
CVE-2021-44550
|
HIGH
| 7.5
|
stanfordnlp/CoreNLP
|
addResults
|
src/edu/stanford/nlp/ie/ner/webapp/NERServlet.java
|
5ee097dbede547023e88f60ed3f430ff09398b87
| 1
|
Analyze the following code function for security vulnerabilities
|
void sendResult(int callingUid, String resultWho, int requestCode, int resultCode,
Intent data, NeededUriGrants dataGrants) {
if (callingUid > 0) {
mAtmService.mUgmInternal.grantUriPermissionUncheckedFromIntent(dataGrants,
getUriPermissionsLocked());
}
if (DEBUG_RESULTS) {
Slog.v(TAG, "Send activity result to " + this
+ " : who=" + resultWho + " req=" + requestCode
+ " res=" + resultCode + " data=" + data);
}
if (isState(RESUMED) && attachedToProcess()) {
try {
final ArrayList<ResultInfo> list = new ArrayList<ResultInfo>();
list.add(new ResultInfo(resultWho, requestCode, resultCode, data));
mAtmService.getLifecycleManager().scheduleTransaction(app.getThread(), token,
ActivityResultItem.obtain(list));
return;
} catch (Exception e) {
Slog.w(TAG, "Exception thrown sending result to " + this, e);
}
}
addResultLocked(null /* from */, resultWho, requestCode, resultCode, data);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendResult
File: services/core/java/com/android/server/wm/ActivityRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21145
|
HIGH
| 7.8
|
android
|
sendResult
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getDeviceOwnerName() {
if (!mHasFeature) {
return null;
}
Preconditions.checkCallAuthorization(canManageUsers(getCallerIdentity())
|| hasCallingOrSelfPermission(permission.MANAGE_PROFILE_AND_DEVICE_OWNERS));
synchronized (getLockObject()) {
if (!mOwners.hasDeviceOwner()) {
return null;
}
// TODO This totally ignores the name passed to setDeviceOwner (change for b/20679292)
// Should setDeviceOwner/ProfileOwner still take a name?
String deviceOwnerPackage = mOwners.getDeviceOwnerPackageName();
return getApplicationLabel(deviceOwnerPackage, UserHandle.USER_SYSTEM);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDeviceOwnerName
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
|
getDeviceOwnerName
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
private void createCertificateErrorNotification(boolean isUserSelected, String ssid) {
String title = mContext.getString(R.string.wifi_tofu_invalid_cert_chain_title, ssid);
String message = mContext.getString(R.string.wifi_tofu_invalid_cert_chain_message);
String okButtonText = mContext.getString(
R.string.wifi_tofu_invalid_cert_chain_ok_text);
if (TextUtils.isEmpty(title) || TextUtils.isEmpty(message)) return;
if (isUserSelected) {
mTofuAlertDialog = mWifiDialogManager.createSimpleDialog(
title,
message,
null /* positiveButtonText */,
null /* negativeButtonText */,
okButtonText,
new WifiDialogManager.SimpleDialogCallback() {
@Override
public void onPositiveButtonClicked() {
// Not used.
}
@Override
public void onNegativeButtonClicked() {
// Not used.
}
@Override
public void onNeutralButtonClicked() {
// Not used.
}
@Override
public void onCancelled() {
// Not used.
}
},
new WifiThreadRunner(mHandler));
mTofuAlertDialog.launchDialog();
} else {
Notification.Builder builder = mFacade.makeNotificationBuilder(mContext,
WifiService.NOTIFICATION_NETWORK_ALERTS)
.setSmallIcon(
Icon.createWithResource(mContext.getWifiOverlayApkPkgName(),
com.android.wifi.resources.R
.drawable.stat_notify_wifi_in_range))
.setContentTitle(title)
.setContentText(message)
.setStyle(new Notification.BigTextStyle().bigText(message))
.setColor(mContext.getResources().getColor(
android.R.color.system_notification_accent_color));
mNotificationManager.notify(SystemMessage.NOTE_SERVER_CA_CERTIFICATE,
builder.build());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createCertificateErrorNotification
File: service/java/com/android/server/wifi/InsecureEapNetworkHandler.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
createCertificateErrorNotification
|
service/java/com/android/server/wifi/InsecureEapNetworkHandler.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getCurrentDataConnectionState() {
return mSS.getDataRegState();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCurrentDataConnectionState
File: src/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2016-3831
|
MEDIUM
| 5
|
android
|
getCurrentDataConnectionState
|
src/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
|
f47bc301ccbc5e6d8110afab5a1e9bac1d4ef058
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void internalTriggerCompaction(AsyncResponse asyncResponse, boolean authoritative) {
log.info("[{}] Trigger compaction on topic {}", clientAppId(), topicName);
try {
if (topicName.isGlobal()) {
validateGlobalNamespaceOwnership(namespaceName);
}
} catch (Exception e) {
log.error("[{}] Failed to trigger compaction 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()) {
try {
internalTriggerCompactionNonPartitionedTopic(authoritative);
} catch (Exception e) {
log.error("[{}] Failed to trigger compaction on topic {}", clientAppId(), topicName, e);
resumeAsyncResponseExceptionally(asyncResponse, e);
return;
}
asyncResponse.resume(Response.noContent().build());
} else {
getPartitionedTopicMetadataAsync(topicName, authoritative, false).thenAccept(partitionMetadata -> {
final int numPartitions = partitionMetadata.partitions;
if (numPartitions > 0) {
final List<CompletableFuture<Void>> futures = Lists.newArrayList();
for (int i = 0; i < numPartitions; i++) {
TopicName topicNamePartition = topicName.getPartition(i);
try {
futures.add(pulsar()
.getAdminClient()
.topics()
.triggerCompactionAsync(topicNamePartition.toString()));
} catch (Exception e) {
log.error("[{}] Failed to trigger compaction on topic {}",
clientAppId(), topicNamePartition, e);
asyncResponse.resume(new RestException(e));
return;
}
}
FutureUtil.waitForAll(futures).handle((result, exception) -> {
if (exception != null) {
Throwable th = exception.getCause();
if (th instanceof NotFoundException) {
asyncResponse.resume(new RestException(Status.NOT_FOUND, th.getMessage()));
return null;
} else if (th instanceof WebApplicationException) {
asyncResponse.resume(th);
return null;
} else {
log.error("[{}] Failed to trigger compaction on topic {}",
clientAppId(), topicName, exception);
asyncResponse.resume(new RestException(exception));
return null;
}
}
asyncResponse.resume(Response.noContent().build());
return null;
});
} else {
try {
internalTriggerCompactionNonPartitionedTopic(authoritative);
} catch (Exception e) {
log.error("[{}] Failed to trigger compaction on topic {}", clientAppId(), topicName, e);
resumeAsyncResponseExceptionally(asyncResponse, e);
return;
}
asyncResponse.resume(Response.noContent().build());
}
}).exceptionally(ex -> {
log.error("[{}] Failed to trigger compaction on topic {}", clientAppId(), topicName, ex);
resumeAsyncResponseExceptionally(asyncResponse, ex);
return null;
});
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: internalTriggerCompaction
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
|
internalTriggerCompaction
|
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
|
5b35bb81c31f1bc2ad98c9fde5b39ec68110ca52
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Writer setCharacterStream() throws SQLException {
try {
debugCodeCall("setCharacterStream");
checkEditable();
state = State.SET_CALLED;
return setCharacterStreamImpl();
} catch (Exception e) {
throw logAndConvert(e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setCharacterStream
File: h2/src/main/org/h2/jdbc/JdbcSQLXML.java
Repository: h2database
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-23463
|
MEDIUM
| 6.4
|
h2database
|
setCharacterStream
|
h2/src/main/org/h2/jdbc/JdbcSQLXML.java
|
d83285fd2e48fb075780ee95badee6f5a15ea7f8
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean hasLastWorkspacePermission(UserDTO user) {
if (StringUtils.isNotBlank(user.getLastWorkspaceId())) {
List<UserGroup> workspaceUserGroups = user.getUserGroups().stream()
.filter(ug -> StringUtils.equals(user.getLastWorkspaceId(), ug.getSourceId()))
.collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(workspaceUserGroups)) {
ProjectExample example = new ProjectExample();
example.createCriteria().andWorkspaceIdEqualTo(user.getLastWorkspaceId());
List<Project> projects = projectMapper.selectByExample(example);
// 工作空间下没有项目
if (CollectionUtils.isEmpty(projects)) {
return true;
}
// 工作空间下有项目,选中有权限的项目
List<String> projectIds = projects.stream()
.map(Project::getId)
.collect(Collectors.toList());
List<UserGroup> userGroups = user.getUserGroups();
List<String> projectGroupIds = user.getGroups()
.stream().filter(ug -> StringUtils.equals(ug.getType(), UserGroupType.PROJECT))
.map(Group::getId)
.collect(Collectors.toList());
List<String> projectIdsWithPermission = userGroups.stream().filter(ug -> projectGroupIds.contains(ug.getGroupId()))
.filter(p -> StringUtils.isNotBlank(p.getSourceId()))
.map(UserGroup::getSourceId)
.filter(projectIds::contains)
.collect(Collectors.toList());
List<String> intersection = projectIds.stream().filter(projectIdsWithPermission::contains).collect(Collectors.toList());
// 当前工作空间下的所有项目都没有权限
if (CollectionUtils.isEmpty(intersection)) {
return true;
}
Project project = projects.stream().filter(p -> StringUtils.equals(intersection.get(0), p.getId())).findFirst().get();
String wsId = project.getWorkspaceId();
user.setId(user.getId());
user.setLastProjectId(project.getId());
user.setLastWorkspaceId(wsId);
updateUser(user);
return true;
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasLastWorkspacePermission
File: framework/gateway/src/main/java/io/metersphere/gateway/service/UserLoginService.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2023-32699
|
MEDIUM
| 6.5
|
metersphere
|
hasLastWorkspacePermission
|
framework/gateway/src/main/java/io/metersphere/gateway/service/UserLoginService.java
|
c59e381d368990214813085a1a4877c5ef865411
| 0
|
Analyze the following code function for security vulnerabilities
|
public Page page(EntityReference reference)
{
Page page = new Page();
// Add current wiki if the reference does not contains any
EntityReference wikiReference = reference.extractReference(EntityType.WIKI);
if (wikiReference == null) {
page.setWiki(this.testUtils.getCurrentWiki());
} else {
page.setWiki(wikiReference.getName());
}
// Add spaces
EntityReference spaceReference = reference.extractReference(EntityType.SPACE).removeParent(wikiReference);
page.setSpace(referenceSerializer.serialize(spaceReference));
// Add page
EntityReference documentReference = reference.extractReference(EntityType.DOCUMENT);
page.setName(documentReference.getName());
// Add locale
if (reference instanceof AbstractLocalizedEntityReference) {
Locale locale = getLocale(reference);
if (locale != null) {
page.setLanguage(locale.toString());
}
}
return page;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: page
File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2023-35166
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
page
|
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
|
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
@Transactional(rollbackFor = Exception.class)
public void addUserWithRole(SysUser user, String roles) {
this.save(user);
if(oConvertUtils.isNotEmpty(roles)) {
String[] arr = roles.split(",");
for (String roleId : arr) {
SysUserRole userRole = new SysUserRole(user.getId(), roleId);
sysUserRoleMapper.insert(userRole);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addUserWithRole
File: jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java
Repository: jeecgboot/jeecg-boot
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-45208
|
MEDIUM
| 4.3
|
jeecgboot/jeecg-boot
|
addUserWithRole
|
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java
|
51e2227bfe54f5d67b09411ee9a336750164e73d
| 0
|
Analyze the following code function for security vulnerabilities
|
private final ProcessRecord removeProcessNameLocked(final String name, final int uid) {
return removeProcessNameLocked(name, uid, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeProcessNameLocked
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
|
removeProcessNameLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public Map<String, String> getServerVariables() {
return serverVariables;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getServerVariables
File: samples/client/petstore/java/okhttp-gson-dynamicOperations/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
|
getServerVariables
|
samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
public String call() throws RuntimeException {
// if we run locally, cl!=null. Otherwise the delegating classloader will be available as context classloader.
if (cl==null) cl = Thread.currentThread().getContextClassLoader();
CompilerConfiguration cc = new CompilerConfiguration();
cc.addCompilationCustomizers(new ImportCustomizer().addStarImports(
"jenkins",
"jenkins.model",
"hudson",
"hudson.model"));
GroovyShell shell = new GroovyShell(cl,new Binding(),cc);
StringWriter out = new StringWriter();
PrintWriter pw = new PrintWriter(out);
shell.setVariable("out", pw);
try {
Object output = shell.evaluate(script);
if(output!=null)
pw.println("Result: "+output);
} catch (Throwable t) {
t.printStackTrace(pw);
}
return out.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: call
File: core/src/main/java/hudson/util/RemotingDiagnostics.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-2068
|
LOW
| 3.5
|
jenkinsci/jenkins
|
call
|
core/src/main/java/hudson/util/RemotingDiagnostics.java
|
0530a6645aac10fec005614211660e98db44b5eb
| 0
|
Analyze the following code function for security vulnerabilities
|
protected static TomlFactory newTomlFactory() {
return TomlFactory.builder()
//.enable(TomlReadFeature.VALIDATE_NESTING_DEPTH)
.build();
}
|
Vulnerability Classification:
- CWE: CWE-787
- CVE: CVE-2023-3894
- Severity: HIGH
- CVSS Score: 7.5
Description: reorder code
Function: newTomlFactory
File: toml/src/test/java/com/fasterxml/jackson/dataformat/toml/TomlMapperTestBase.java
Repository: FasterXML/jackson-dataformats-text
Fixed Code:
protected static TomlFactory newTomlFactory() {
return TomlFactory.builder()
.enable(TomlReadFeature.VALIDATE_NESTING_DEPTH)
.build();
}
|
[
"CWE-787"
] |
CVE-2023-3894
|
HIGH
| 7.5
|
FasterXML/jackson-dataformats-text
|
newTomlFactory
|
toml/src/test/java/com/fasterxml/jackson/dataformat/toml/TomlMapperTestBase.java
|
20a209387931dba31e1a027b74976911c3df39fe
| 1
|
Analyze the following code function for security vulnerabilities
|
public final Set<AbstractProject> getTransitiveUpstreamProjects() {
return Jenkins.getInstance().getDependencyGraph().getTransitiveUpstream(this);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTransitiveUpstreamProjects
File: core/src/main/java/hudson/model/AbstractProject.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
getTransitiveUpstreamProjects
|
core/src/main/java/hudson/model/AbstractProject.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public abstract boolean isUsingCompression();
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isUsingCompression
File: smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
Repository: igniterealtime/Smack
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2016-10027
|
MEDIUM
| 4.3
|
igniterealtime/Smack
|
isUsingCompression
|
smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
|
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void executeJob(JobExecutionContext jobContext) throws JobExecutionException
{
try {
JobDataMap data = jobContext.getJobDetail().getJobDataMap();
// Get the job XObject to be executed
BaseObject object = (BaseObject) data.get("xjob");
// Force context document
XWikiDocument jobDocument = getXWikiContext().getWiki().getDocument(object.getName(), getXWikiContext());
getXWikiContext().setDoc(jobDocument);
getXWikiContext().put("sdoc", jobDocument);
if (getXWikiContext().getWiki().getRightService().hasProgrammingRights(getXWikiContext())) {
// Make the Job execution data available to the Groovy script
Binding binding = new Binding(data.getWrappedMap());
// Set the right instance of XWikiContext
binding.setProperty("context", getXWikiContext());
binding.setProperty("xcontext", getXWikiContext());
data.put("xwiki", new com.xpn.xwiki.api.XWiki(getXWikiContext().getWiki(), getXWikiContext()));
// Execute the Groovy script
GroovyShell shell = new GroovyShell(Thread.currentThread().getContextClassLoader(), binding);
shell.evaluate(object.getLargeStringValue("script"));
} else {
throw new JobExecutionException("The user [" + getXWikiContext().getUser() + "] didn't have "
+ "programming rights when the job [" + jobContext.getJobDetail().getKey() + "] was scheduled.");
}
} catch (CompilationFailedException e) {
throw new JobExecutionException(
"Failed to execute script for job [" + jobContext.getJobDetail().getKey() + "]", e, true);
} catch (Exception e) {
e.printStackTrace();
}
}
|
Vulnerability Classification:
- CWE: CWE-284
- CVE: CVE-2023-40573
- Severity: HIGH
- CVSS Score: 8.8
Description: XWIKI-20852: Improve author checking in GroovyJob
* Make sure the metadata author is checked for programming rights.
* Remove the exception printing that prevented any exception from being
thrown.
* Add a unit test.
* Modernize GroovyJob to use less deprecated APIs.
Function: executeJob
File: xwiki-platform-core/xwiki-platform-scheduler/xwiki-platform-scheduler-api/src/main/java/com/xpn/xwiki/plugin/scheduler/GroovyJob.java
Repository: xwiki/xwiki-platform
Fixed Code:
@Override
protected void executeJob(JobExecutionContext jobContext) throws JobExecutionException
{
try {
JobDataMap data = jobContext.getJobDetail().getJobDataMap();
// Get the job XObject to be executed
BaseObject object = (BaseObject) data.get("xjob");
// Force context document
XWikiDocument jobDocument = object.getOwnerDocument();
if (jobDocument == null) {
jobDocument = getXWikiContext().getWiki().getDocument(object.getDocumentReference(), getXWikiContext());
}
getXWikiContext().setDoc(jobDocument);
XWikiDocument secureDocument;
// Make sure that the secure document has the correct content author.
if (!Objects.equals(jobDocument.getAuthors().getContentAuthor(),
jobDocument.getAuthors().getEffectiveMetadataAuthor()))
{
secureDocument = jobDocument.clone();
secureDocument.getAuthors().setContentAuthor(jobDocument.getAuthors().getEffectiveMetadataAuthor());
} else {
secureDocument = jobDocument;
}
getXWikiContext().put("sdoc", secureDocument);
ContextualAuthorizationManager contextualAuthorizationManager =
Utils.getComponent(ContextualAuthorizationManager.class);
contextualAuthorizationManager.checkAccess(Right.PROGRAM);
// Make the Job execution data available to the Groovy script
Binding binding = new Binding(data.getWrappedMap());
// Set the right instance of XWikiContext
binding.setProperty("context", getXWikiContext());
binding.setProperty("xcontext", getXWikiContext());
data.put("xwiki", new com.xpn.xwiki.api.XWiki(getXWikiContext().getWiki(), getXWikiContext()));
// Execute the Groovy script
GroovyShell shell = new GroovyShell(Thread.currentThread().getContextClassLoader(), binding);
shell.evaluate(object.getLargeStringValue("script"));
} catch (CompilationFailedException e) {
throw new JobExecutionException(
"Failed to execute script for job [" + jobContext.getJobDetail().getKey() + "]", e, true);
} catch (XWikiException e) {
throw new JobExecutionException("Failed to load the document containing the job ["
+ jobContext.getJobDetail().getKey() + "]", e, true);
} catch (AccessDeniedException e) {
throw new JobExecutionException("Executing the job [" + jobContext.getJobDetail().getKey() + "] failed "
+ "due to insufficient rights.", e, true);
}
}
|
[
"CWE-284"
] |
CVE-2023-40573
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
executeJob
|
xwiki-platform-core/xwiki-platform-scheduler/xwiki-platform-scheduler-api/src/main/java/com/xpn/xwiki/plugin/scheduler/GroovyJob.java
|
fcdcfed3fe2e8a3cad66ae0610795a2d58ab9662
| 1
|
Analyze the following code function for security vulnerabilities
|
void addMetaEntry(String name, byte[] buf) {
metaEntries.put(name.toUpperCase(Locale.US), buf);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addMetaEntry
File: core/java/android/util/jar/StrictJarVerifier.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21253
|
MEDIUM
| 5.5
|
android
|
addMetaEntry
|
core/java/android/util/jar/StrictJarVerifier.java
|
84df68840b6f2407146e722ebd95a7d8bc6e3529
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setStatus(int arg0) {
// ignore
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setStatus
File: h2/src/test/org/h2/test/server/TestWeb.java
Repository: h2database
The code follows secure coding practices.
|
[
"CWE-312"
] |
CVE-2022-45868
|
HIGH
| 7.8
|
h2database
|
setStatus
|
h2/src/test/org/h2/test/server/TestWeb.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 0
|
Analyze the following code function for security vulnerabilities
|
private String convertToQuotedString(String string) {
return "\"" + string + "\"";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: convertToQuotedString
File: wifi/java/android/net/wifi/WifiEnterpriseConfig.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3897
|
MEDIUM
| 4.3
|
android
|
convertToQuotedString
|
wifi/java/android/net/wifi/WifiEnterpriseConfig.java
|
81be4e3aac55305cbb5c9d523cf5c96c66604b39
| 0
|
Analyze the following code function for security vulnerabilities
|
private static boolean nullSafeEqual(Object a, Object b) {
return (a == b) || (a != null && a.equals(b));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nullSafeEqual
File: hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
nullSafeEqual
|
hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
private CommandLine gitWd() {
return git().withWorkingDir(workingDir);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: gitWd
File: domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-77"
] |
CVE-2021-43286
|
MEDIUM
| 6.5
|
gocd
|
gitWd
|
domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
|
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
| 0
|
Analyze the following code function for security vulnerabilities
|
void setExternalNames(String externalNames) {
this.externalNames = externalNames != null ? StringUtils.toLowerEnglish(externalNames) : null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setExternalNames
File: h2/src/main/org/h2/server/web/WebServer.java
Repository: h2database
The code follows secure coding practices.
|
[
"CWE-312"
] |
CVE-2022-45868
|
HIGH
| 7.8
|
h2database
|
setExternalNames
|
h2/src/main/org/h2/server/web/WebServer.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getCorsAllowedMethods() {
return prop.getProperty(TS_CORS_ALLOWED_METHODS);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCorsAllowedMethods
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
|
getCorsAllowedMethods
|
frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java
|
391bdec3348e30de173fbb7c7277970e0b53c8ad
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean retrieveConnectedNetworkDefaultGateway() {
WifiConfiguration currentConfig = getConnectedWifiConfiguration();
if (currentConfig == null) {
logi("can't fetch config of current network id " + mLastNetworkId);
return false;
}
// Find IPv4 default gateway.
if (mLinkProperties == null) {
logi("cannot retrieve default gateway from null link properties");
return false;
}
String gatewayIPv4 = null;
for (RouteInfo routeInfo : mLinkProperties.getRoutes()) {
if (routeInfo.isDefaultRoute()
&& routeInfo.getDestination().getAddress() instanceof Inet4Address
&& routeInfo.hasGateway()) {
gatewayIPv4 = routeInfo.getGateway().getHostAddress();
break;
}
}
if (TextUtils.isEmpty(gatewayIPv4)) {
logi("default gateway ipv4 is null");
return false;
}
String gatewayMac = macAddressFromRoute(gatewayIPv4);
if (TextUtils.isEmpty(gatewayMac)) {
logi("default gateway mac fetch failed for ipv4 addr = " + gatewayIPv4);
return false;
}
logi("Default Gateway MAC address of " + mLastBssid + " from routes is : " + gatewayMac);
if (!mWifiConfigManager.setNetworkDefaultGwMacAddress(mLastNetworkId, gatewayMac)) {
logi("default gateway mac set failed for " + currentConfig.getKey() + " network");
return false;
}
return mWifiConfigManager.saveToStore(true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: retrieveConnectedNetworkDefaultGateway
File: service/java/com/android/server/wifi/ClientModeImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
retrieveConnectedNetworkDefaultGateway
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void skip(TProtocol prot, byte type, int maxDepth)
throws TException {
if (maxDepth <= 0) {
throw new TException("Maximum skip depth exceeded");
}
switch (type) {
case TType.BOOL:
{
prot.readBool();
break;
}
case TType.BYTE:
{
prot.readByte();
break;
}
case TType.I16:
{
prot.readI16();
break;
}
case TType.I32:
{
prot.readI32();
break;
}
case TType.I64:
{
prot.readI64();
break;
}
case TType.DOUBLE:
{
prot.readDouble();
break;
}
case TType.FLOAT:
{
prot.readFloat();
break;
}
case TType.STRING:
{
prot.readBinary();
break;
}
case TType.STRUCT:
{
prot.readStructBegin(
Collections.<Integer, com.facebook.thrift.meta_data.FieldMetaData>emptyMap());
while (true) {
TField field = prot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
skip(prot, field.type, maxDepth - 1);
prot.readFieldEnd();
}
prot.readStructEnd();
break;
}
case TType.MAP:
{
TMap map = prot.readMapBegin();
for (int i = 0;
(map.size < 0) ? prot.peekMap() : (i < map.size);
i++) {
skip(prot, map.keyType, maxDepth - 1);
skip(prot, map.valueType, maxDepth - 1);
}
prot.readMapEnd();
break;
}
case TType.SET:
{
TSet set = prot.readSetBegin();
for (int i = 0;
(set.size < 0) ? prot.peekSet() : (i < set.size);
i++) {
skip(prot, set.elemType, maxDepth - 1);
}
prot.readSetEnd();
break;
}
case TType.LIST:
{
TList list = prot.readListBegin();
for (int i = 0;
(list.size < 0) ? prot.peekList() : (i < list.size);
i++) {
skip(prot, list.elemType, maxDepth - 1);
}
prot.readListEnd();
break;
}
default:
break;
}
}
|
Vulnerability Classification:
- CWE: CWE-755
- CVE: CVE-2019-3559
- Severity: MEDIUM
- CVSS Score: 5.0
Description: Throw on bad types during skipping data
Summary:
The current code silently returns on bad types. In case when we have an invalid data, we may get a container of a large size with a bad type, this would lead to us running long loop doing nothing (though we already can say that the data is invalid).
The new code would throw an exception as soon as we try to skip a value of invalid type.
Fixes CVE-2019-3552
Reviewed By: stevegury
Differential Revision: D13892370
fbshipit-source-id: 582c81f90cf40c105383083cb38815816140e3ad
Function: skip
File: thrift/lib/java/thrift/src/main/java/com/facebook/thrift/protocol/TProtocolUtil.java
Repository: facebook/fbthrift
Fixed Code:
public static void skip(TProtocol prot, byte type, int maxDepth)
throws TException {
if (maxDepth <= 0) {
throw new TException("Maximum skip depth exceeded");
}
switch (type) {
case TType.BOOL:
{
prot.readBool();
break;
}
case TType.BYTE:
{
prot.readByte();
break;
}
case TType.I16:
{
prot.readI16();
break;
}
case TType.I32:
{
prot.readI32();
break;
}
case TType.I64:
{
prot.readI64();
break;
}
case TType.DOUBLE:
{
prot.readDouble();
break;
}
case TType.FLOAT:
{
prot.readFloat();
break;
}
case TType.STRING:
{
prot.readBinary();
break;
}
case TType.STRUCT:
{
prot.readStructBegin(
Collections.<Integer, com.facebook.thrift.meta_data.FieldMetaData>emptyMap());
while (true) {
TField field = prot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
skip(prot, field.type, maxDepth - 1);
prot.readFieldEnd();
}
prot.readStructEnd();
break;
}
case TType.MAP:
{
TMap map = prot.readMapBegin();
for (int i = 0;
(map.size < 0) ? prot.peekMap() : (i < map.size);
i++) {
skip(prot, map.keyType, maxDepth - 1);
skip(prot, map.valueType, maxDepth - 1);
}
prot.readMapEnd();
break;
}
case TType.SET:
{
TSet set = prot.readSetBegin();
for (int i = 0;
(set.size < 0) ? prot.peekSet() : (i < set.size);
i++) {
skip(prot, set.elemType, maxDepth - 1);
}
prot.readSetEnd();
break;
}
case TType.LIST:
{
TList list = prot.readListBegin();
for (int i = 0;
(list.size < 0) ? prot.peekList() : (i < list.size);
i++) {
skip(prot, list.elemType, maxDepth - 1);
}
prot.readListEnd();
break;
}
default:
{
throw new TProtocolException(
TProtocolException.INVALID_DATA, "Invalid type encountered during skipping: " + type);
}
}
}
|
[
"CWE-755"
] |
CVE-2019-3559
|
MEDIUM
| 5
|
facebook/fbthrift
|
skip
|
thrift/lib/java/thrift/src/main/java/com/facebook/thrift/protocol/TProtocolUtil.java
|
a56346ceacad28bf470017a6bda1d5518d0bd943
| 1
|
Analyze the following code function for security vulnerabilities
|
public static JSONObject toJSONObject(Reader reader) throws JSONException {
return toJSONObject(reader, XMLParserConfiguration.ORIGINAL);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toJSONObject
File: src/main/java/org/json/XML.java
Repository: stleary/JSON-java
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2022-45688
|
HIGH
| 7.5
|
stleary/JSON-java
|
toJSONObject
|
src/main/java/org/json/XML.java
|
f566a1d9ee1f8139357017dc6c7def1da19cd8d4
| 0
|
Analyze the following code function for security vulnerabilities
|
public void addImplicitMap(Class ownerType, String fieldName, Class itemType, String keyFieldName) {
addImplicitMap(ownerType, fieldName, null, itemType, keyFieldName);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addImplicitMap
File: xstream/src/java/com/thoughtworks/xstream/XStream.java
Repository: x-stream/xstream
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-43859
|
MEDIUM
| 5
|
x-stream/xstream
|
addImplicitMap
|
xstream/src/java/com/thoughtworks/xstream/XStream.java
|
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
| 0
|
Analyze the following code function for security vulnerabilities
|
@SystemApi
@RequiresPermission(permission.INTERACT_ACROSS_USERS)
public boolean getBluetoothContactSharingDisabled(@NonNull UserHandle userHandle) {
if (mService != null) {
try {
return mService.getBluetoothContactSharingDisabledForUser(userHandle
.getIdentifier());
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getBluetoothContactSharingDisabled
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
|
getBluetoothContactSharingDisabled
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void partiallyUpdateAppWidgetIds(String callingPackage, int[] appWidgetIds,
RemoteViews views) {
if (DEBUG) {
Slog.i(TAG, "partiallyUpdateAppWidgetIds() " + UserHandle.getCallingUserId());
}
updateAppWidgetIds(callingPackage, appWidgetIds, views, true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: partiallyUpdateAppWidgetIds
File: services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-1541
|
MEDIUM
| 4.3
|
android
|
partiallyUpdateAppWidgetIds
|
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
|
0b98d304c467184602b4c6bce76fda0b0274bc07
| 0
|
Analyze the following code function for security vulnerabilities
|
public void onSubmit()
{
final String sessionCsrfToken = getCsrfSessionToken();
final String postedCsrfToken = this.csrfTokenField.getInput();
if (StringUtils.equals(sessionCsrfToken, postedCsrfToken) == false) {
log.error("Cross site request forgery alert. csrf token doesn't match! session csrf token="
+ sessionCsrfToken
+ ", posted csrf token="
+ postedCsrfToken);
throw new InternalErrorException("errorpage.csrfError");
}
}
|
Vulnerability Classification:
- CWE: CWE-352
- CVE: CVE-2013-7251
- Severity: MEDIUM
- CVSS Score: 6.8
Description: CSRF protection.
Function: onSubmit
File: src/main/java/org/projectforge/web/wicket/CsrfTokenHandler.java
Repository: micromata/projectforge-webapp
Fixed Code:
public void onSubmit()
{
final String sessionCsrfToken = getCsrfSessionToken();
if (StringUtils.equals(sessionCsrfToken, csrfToken) == false) {
log.error("Cross site request forgery alert. csrf token doesn't match! session csrf token="
+ sessionCsrfToken
+ ", posted csrf token="
+ csrfToken);
throw new InternalErrorException("errorpage.csrfError");
}
}
|
[
"CWE-352"
] |
CVE-2013-7251
|
MEDIUM
| 6.8
|
micromata/projectforge-webapp
|
onSubmit
|
src/main/java/org/projectforge/web/wicket/CsrfTokenHandler.java
|
422de35e3c3141e418a73bfb39b430d5fd74077e
| 1
|
Analyze the following code function for security vulnerabilities
|
private static boolean areRemoteViewsChanged(RemoteViews first, RemoteViews second) {
if (first == null && second == null) {
return false;
}
if (first == null && second != null || first != null && second == null) {
return true;
}
if (!Objects.equals(first.getLayoutId(), second.getLayoutId())) {
return true;
}
if (!Objects.equals(first.getSequenceNumber(), second.getSequenceNumber())) {
return true;
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: areRemoteViewsChanged
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
areRemoteViewsChanged
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequestMapping(value = "/recoverPassword", method = RequestMethod.GET)
public String recoverPassword(HttpServletRequest request)
{
// Get the session, creating it if necessary, to make sure that the session
// cookie gets set on the browser. If the user goes to the "recover" page
// and doesn't have a session cookie, CSRF validation will fail because the
// token that is posted in the recovery form cannot be correlated with the
// token in the session. Also, clean up the session if things were put into
// it by a failed recovery attempt.
HttpSession session = request.getSession(true);
session.removeAttribute("recoveryDN");
session.removeAttribute("useRecaptcha");
return "recover-password";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: recoverPassword
File: src/main/java/com/unboundid/webapp/ssam/SSAMController.java
Repository: pingidentity/ssam
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2018-25084
|
MEDIUM
| 4
|
pingidentity/ssam
|
recoverPassword
|
src/main/java/com/unboundid/webapp/ssam/SSAMController.java
|
f64b10d63bb19ca2228b0c2d561a1a6e5a3bf251
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean isFullyTransparent() {
return mAttrs.alpha == 0f;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isFullyTransparent
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
|
isFullyTransparent
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
public static Type forType(String type) {
if (type==null) return STRING;
return valueOf(type.trim().toUpperCase());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: forType
File: core/src/main/java/apoc/export/graphml/XmlGraphMLReader.java
Repository: neo4j/apoc
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2023-23926
|
HIGH
| 8.1
|
neo4j/apoc
|
forType
|
core/src/main/java/apoc/export/graphml/XmlGraphMLReader.java
|
3202b421b21973b2f57a43b33c88f3f6901cfd2a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Beta
public static String simplifyPath(String pathname) {
checkNotNull(pathname);
if (pathname.length() == 0) {
return ".";
}
// split the path apart
Iterable<String> components = Splitter.on('/').omitEmptyStrings().split(pathname);
List<String> path = new ArrayList<>();
// resolve ., .., and //
for (String component : components) {
switch (component) {
case ".":
continue;
case "..":
if (path.size() > 0 && !path.get(path.size() - 1).equals("..")) {
path.remove(path.size() - 1);
} else {
path.add("..");
}
break;
default:
path.add(component);
break;
}
}
// put it back together
String result = Joiner.on('/').join(path);
if (pathname.charAt(0) == '/') {
result = "/" + result;
}
while (result.startsWith("/../")) {
result = result.substring(3);
}
if (result.equals("/..")) {
result = "/";
} else if ("".equals(result)) {
result = ".";
}
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: simplifyPath
File: android/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
|
simplifyPath
|
android/guava/src/com/google/common/io/Files.java
|
fec0dbc4634006a6162cfd4d0d09c962073ddf40
| 0
|
Analyze the following code function for security vulnerabilities
|
protected InputStream createFileInputStream(File f) throws FileNotFoundException {
return new FileInputStream(f);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createFileInputStream
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
|
createFileInputStream
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isOldFormat() {
return markHead.isOldFormat();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isOldFormat
File: src/main/java/com/github/junrar/Archive.java
Repository: junrar
The code follows secure coding practices.
|
[
"CWE-835"
] |
CVE-2018-12418
|
MEDIUM
| 4.3
|
junrar
|
isOldFormat
|
src/main/java/com/github/junrar/Archive.java
|
ad8d0ba8e155630da8a1215cee3f253e0af45817
| 0
|
Analyze the following code function for security vulnerabilities
|
final void trimApplications() {
synchronized (this) {
int i;
// First remove any unused application processes whose package
// has been removed.
for (i=mRemovedProcesses.size()-1; i>=0; i--) {
final ProcessRecord app = mRemovedProcesses.get(i);
if (app.activities.size() == 0
&& app.curReceiver == null && app.services.size() == 0) {
Slog.i(
TAG, "Exiting empty application process "
+ app.toShortString() + " ("
+ (app.thread != null ? app.thread.asBinder() : null)
+ ")\n");
if (app.pid > 0 && app.pid != MY_PID) {
app.kill("empty", false);
} else {
try {
app.thread.scheduleExit();
} catch (Exception e) {
// Ignore exceptions.
}
}
cleanUpApplicationRecordLocked(app, false, true, -1);
mRemovedProcesses.remove(i);
if (app.persistent) {
addAppLocked(app.info, false, null /* ABI override */);
}
}
}
// Now update the oom adj for all processes.
updateOomAdjLocked();
}
}
|
Vulnerability Classification:
- CWE: CWE-264
- CVE: CVE-2016-3912
- Severity: HIGH
- CVSS Score: 9.3
Description: DO NOT MERGE: Clean up when recycling a pid with a pending launch
Fix for accidental launch of a broadcast receiver in an
incorrect app instance.
Bug: 30202481
Change-Id: I8ec8f19c633f3aec8da084dab5fd5b312443336f
(cherry picked from commit 55eacb944122ddc0a3bb693b36fe0f07b0fe18c9)
Function: trimApplications
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
Fixed Code:
final void trimApplications() {
synchronized (this) {
int i;
// First remove any unused application processes whose package
// has been removed.
for (i=mRemovedProcesses.size()-1; i>=0; i--) {
final ProcessRecord app = mRemovedProcesses.get(i);
if (app.activities.size() == 0
&& app.curReceiver == null && app.services.size() == 0) {
Slog.i(
TAG, "Exiting empty application process "
+ app.toShortString() + " ("
+ (app.thread != null ? app.thread.asBinder() : null)
+ ")\n");
if (app.pid > 0 && app.pid != MY_PID) {
app.kill("empty", false);
} else {
try {
app.thread.scheduleExit();
} catch (Exception e) {
// Ignore exceptions.
}
}
cleanUpApplicationRecordLocked(app, false, true, -1, false /*replacingPid*/);
mRemovedProcesses.remove(i);
if (app.persistent) {
addAppLocked(app.info, false, null /* ABI override */);
}
}
}
// Now update the oom adj for all processes.
updateOomAdjLocked();
}
}
|
[
"CWE-264"
] |
CVE-2016-3912
|
HIGH
| 9.3
|
android
|
trimApplications
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 1
|
Analyze the following code function for security vulnerabilities
|
private int getSufficientRssi(int networkId, String bssid) {
ScanDetailCache scanDetailCache =
mWifiConfigManager.getScanDetailCacheForNetwork(networkId);
if (scanDetailCache == null) {
return WifiInfo.INVALID_RSSI;
}
ScanResult scanResult = scanDetailCache.getScanResult(bssid);
if (scanResult == null) {
return WifiInfo.INVALID_RSSI;
}
return mScoringParams.getSufficientRssi(scanResult.frequency);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSufficientRssi
File: service/java/com/android/server/wifi/ClientModeImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
getSufficientRssi
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
private int endOfDigitRun(int start, int limit) {
for (int end = start; end < limit; ++end) {
char ch = jsonish.charAt(end);
if (!('0' <= ch && ch <= '9')) { return end; }
}
return limit;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: endOfDigitRun
File: src/main/java/com/google/json/JsonSanitizer.java
Repository: OWASP/json-sanitizer
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-13973
|
MEDIUM
| 4.3
|
OWASP/json-sanitizer
|
endOfDigitRun
|
src/main/java/com/google/json/JsonSanitizer.java
|
53ceaac3e0a10e86d512ce96a0056578f2d1978f
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setKeyAlgorithmOID(String keyAlgorithmOID) {
this.keyAlgorithmOID = keyAlgorithmOID;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setKeyAlgorithmOID
File: base/common/src/main/java/com/netscape/certsrv/cert/CertDataInfo.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
setKeyAlgorithmOID
|
base/common/src/main/java/com/netscape/certsrv/cert/CertDataInfo.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setLightsOn(boolean on) {
Log.v(TAG, "setLightsOn(" + on + ")");
if (on) {
setSystemUiVisibility(0, 0, 0, View.SYSTEM_UI_FLAG_LOW_PROFILE,
mLastFullscreenStackBounds, mLastDockedStackBounds);
} else {
setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE, 0, 0,
View.SYSTEM_UI_FLAG_LOW_PROFILE, mLastFullscreenStackBounds,
mLastDockedStackBounds);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setLightsOn
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
setLightsOn
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public BaseObject getObject(String className)
{
return getXObject(resolveClassReference(className));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getObject
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-26470
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
getObject
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
final void clearFocusedActivity(ActivityRecord r) {
if (mFocusedActivity == r) {
mFocusedActivity = null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearFocusedActivity
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3833
|
MEDIUM
| 4.3
|
android
|
clearFocusedActivity
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isActivePasswordSufficientForUserLocked(
boolean passwordValidAtLastCheckpoint, @Nullable PasswordMetrics metrics,
int userHandle) {
if (!mInjector.storageManagerIsFileBasedEncryptionEnabled() && (metrics == null)) {
// Before user enters their password for the first time after a reboot, return the
// value of this flag, which tells us whether the password was valid the last time
// settings were saved. If DPC changes password requirements on boot so that the
// current password no longer meets the requirements, this value will be stale until
// the next time the password is entered.
return passwordValidAtLastCheckpoint;
}
if (metrics == null) {
// Called on a FBE device when the user password exists but its metrics is unknown.
// This shouldn't happen since we enforce the user to be unlocked (which would result
// in the metrics known to the framework on a FBE device) at all call sites.
throw new IllegalStateException("isActivePasswordSufficient called on FBE-locked user");
}
return isPasswordSufficientForUserWithoutCheckpointLocked(metrics, userHandle);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isActivePasswordSufficientForUserLocked
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
|
isActivePasswordSufficientForUserLocked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public Collection engineGetCRLs(CRLSelector selector)
throws CertStoreException
{
String[] attrs = {params.getCertificateRevocationListAttribute()};
if (!(selector instanceof X509CRLSelector))
{
throw new CertStoreException("selector is not a X509CRLSelector");
}
X509CRLSelector xselector = (X509CRLSelector)selector;
Set crlSet = new HashSet();
String attrName = params.getLdapCertificateRevocationListAttributeName();
Set set = new HashSet();
if (xselector.getIssuerNames() != null)
{
for (Iterator it = xselector.getIssuerNames().iterator(); it
.hasNext();)
{
Object o = it.next();
String attrValue = null;
if (o instanceof String)
{
String issuerAttributeName = params
.getCertificateRevocationListIssuerAttributeName();
attrValue = parseDN((String)o, issuerAttributeName);
}
else
{
String issuerAttributeName = params
.getCertificateRevocationListIssuerAttributeName();
attrValue = parseDN(new X500Principal((byte[])o)
.getName("RFC1779"), issuerAttributeName);
}
set.addAll(search(attrName, "*" + attrValue + "*", attrs));
}
}
else
{
set.addAll(search(attrName, "*", attrs));
}
set.addAll(search(null, "*", attrs));
Iterator it = set.iterator();
try
{
CertificateFactory cf = CertificateFactory.getInstance("X.509",
BouncyCastleProvider.PROVIDER_NAME);
while (it.hasNext())
{
CRL crl = cf.generateCRL(new ByteArrayInputStream((byte[])it
.next()));
if (xselector.match(crl))
{
crlSet.add(crl);
}
}
}
catch (Exception e)
{
throw new CertStoreException(
"CRL cannot be constructed from LDAP result " + e);
}
return crlSet;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: engineGetCRLs
File: prov/src/main/java/org/bouncycastle/jce/provider/X509LDAPCertStoreSpi.java
Repository: bcgit/bc-java
The code follows secure coding practices.
|
[
"CWE-295"
] |
CVE-2023-33201
|
MEDIUM
| 5.3
|
bcgit/bc-java
|
engineGetCRLs
|
prov/src/main/java/org/bouncycastle/jce/provider/X509LDAPCertStoreSpi.java
|
e8c409a8389c815ea3fda5e8b94c92fdfe583bcc
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isFromCache()
{
return this.doc.isFromCache();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isFromCache
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
|
isFromCache
|
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 WindowList getDefaultWindowListLocked() {
return getDefaultDisplayContentLocked().getWindowList();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDefaultWindowListLocked
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
|
getDefaultWindowListLocked
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public RefUpdated uploadFiles(Collection<FileUpload> uploads, String directory, String commitMessage) {
Map<String, BlobContent> newBlobs = new HashMap<>();
String parentPath = getDirectory();
if (directory != null) {
if (parentPath != null)
parentPath += "/" + directory;
else
parentPath = directory;
}
User user = Preconditions.checkNotNull(SecurityUtils.getUser());
BlobIdent blobIdent = getBlobIdent();
for (FileUpload upload: uploads) {
String blobPath = upload.getClientFileName();
if (parentPath != null)
blobPath = parentPath + "/" + blobPath;
if (getProject().isReviewRequiredForModification(user, blobIdent.revision, blobPath))
throw new BlobEditException("Review required for this change. Please submit pull request instead");
else if (getProject().isBuildRequiredForModification(user, blobIdent.revision, blobPath))
throw new BlobEditException("Build required for this change. Please submit pull request instead");
BlobContent blobContent = new BlobContent.Immutable(upload.getBytes(), FileMode.REGULAR_FILE);
newBlobs.put(blobPath, blobContent);
}
BlobEdits blobEdits = new BlobEdits(Sets.newHashSet(), newBlobs);
String refName = blobIdent.revision!=null?GitUtils.branch2ref(blobIdent.revision):"refs/heads/master";
ObjectId prevCommitId;
if (blobIdent.revision != null)
prevCommitId = getProject().getRevCommit(blobIdent.revision, true).copy();
else
prevCommitId = ObjectId.zeroId();
while (true) {
try {
ObjectId newCommitId = blobEdits.commit(getProject().getRepository(), refName, prevCommitId,
prevCommitId, user.asPerson(), commitMessage);
return new RefUpdated(getProject(), refName, prevCommitId, newCommitId);
} catch (ObjectAlreadyExistsException|NotTreeException e) {
throw new BlobEditException(e.getMessage());
} catch (ObsoleteCommitException e) {
prevCommitId = e.getOldCommitId();
}
}
}
|
Vulnerability Classification:
- CWE: CWE-434
- CVE: CVE-2021-21245
- Severity: HIGH
- CVSS Score: 7.5
Description: Fix the issue that uploaded file can be stored anywhere OneDev has write
permissions over
Function: uploadFiles
File: server-core/src/main/java/io/onedev/server/web/page/project/blob/ProjectBlobPage.java
Repository: theonedev/onedev
Fixed Code:
@Override
public RefUpdated uploadFiles(Collection<FileUpload> uploads, String directory, String commitMessage) {
Map<String, BlobContent> newBlobs = new HashMap<>();
String parentPath = getDirectory();
if (directory != null) {
if (parentPath != null)
parentPath += "/" + directory;
else
parentPath = directory;
}
User user = Preconditions.checkNotNull(SecurityUtils.getUser());
BlobIdent blobIdent = getBlobIdent();
for (FileUpload upload: uploads) {
String blobPath = FilenameUtils.sanitizeFilename(upload.getClientFileName());
if (parentPath != null)
blobPath = parentPath + "/" + blobPath;
if (getProject().isReviewRequiredForModification(user, blobIdent.revision, blobPath))
throw new BlobEditException("Review required for this change. Please submit pull request instead");
else if (getProject().isBuildRequiredForModification(user, blobIdent.revision, blobPath))
throw new BlobEditException("Build required for this change. Please submit pull request instead");
BlobContent blobContent = new BlobContent.Immutable(upload.getBytes(), FileMode.REGULAR_FILE);
newBlobs.put(blobPath, blobContent);
}
BlobEdits blobEdits = new BlobEdits(Sets.newHashSet(), newBlobs);
String refName = blobIdent.revision!=null?GitUtils.branch2ref(blobIdent.revision):"refs/heads/master";
ObjectId prevCommitId;
if (blobIdent.revision != null)
prevCommitId = getProject().getRevCommit(blobIdent.revision, true).copy();
else
prevCommitId = ObjectId.zeroId();
while (true) {
try {
ObjectId newCommitId = blobEdits.commit(getProject().getRepository(), refName, prevCommitId,
prevCommitId, user.asPerson(), commitMessage);
return new RefUpdated(getProject(), refName, prevCommitId, newCommitId);
} catch (ObjectAlreadyExistsException|NotTreeException e) {
throw new BlobEditException(e.getMessage());
} catch (ObsoleteCommitException e) {
prevCommitId = e.getOldCommitId();
}
}
}
|
[
"CWE-434"
] |
CVE-2021-21245
|
HIGH
| 7.5
|
theonedev/onedev
|
uploadFiles
|
server-core/src/main/java/io/onedev/server/web/page/project/blob/ProjectBlobPage.java
|
0c060153fb97c0288a1917efdb17cc426934dacb
| 1
|
Analyze the following code function for security vulnerabilities
|
private void writeStatisticsLocked() {
if (Log.isLoggable(TAG_FILE, Log.VERBOSE)) {
Log.v(TAG, "Writing new " + mStatisticsFile.getBaseFile());
}
// The file is being written, so we don't need to have a scheduled
// write until the next change.
removeMessages(MSG_WRITE_STATISTICS);
FileOutputStream fos = null;
try {
fos = mStatisticsFile.startWrite();
Parcel out = Parcel.obtain();
final int N = mDayStats.length;
for (int i=0; i<N; i++) {
DayStats ds = mDayStats[i];
if (ds == null) {
break;
}
out.writeInt(STATISTICS_FILE_ITEM);
out.writeInt(ds.day);
out.writeInt(ds.successCount);
out.writeLong(ds.successTime);
out.writeInt(ds.failureCount);
out.writeLong(ds.failureTime);
}
out.writeInt(STATISTICS_FILE_END);
fos.write(out.marshall());
out.recycle();
mStatisticsFile.finishWrite(fos);
} catch (java.io.IOException e1) {
Log.w(TAG, "Error writing stats", e1);
if (fos != null) {
mStatisticsFile.failWrite(fos);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeStatisticsLocked
File: services/core/java/com/android/server/content/SyncStorageEngine.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2016-2424
|
HIGH
| 7.1
|
android
|
writeStatisticsLocked
|
services/core/java/com/android/server/content/SyncStorageEngine.java
|
d3383d5bfab296ba3adbc121ff8a7b542bde4afb
| 0
|
Analyze the following code function for security vulnerabilities
|
public InputConnection onCreateInputConnection(EditorInfo outAttrs) {
if (!mImeAdapter.hasTextInputType()) {
// Although onCheckIsTextEditor will return false in this case, the EditorInfo
// is still used by the InputMethodService. Need to make sure the IME doesn't
// enter fullscreen mode.
outAttrs.imeOptions = EditorInfo.IME_FLAG_NO_FULLSCREEN;
}
mInputConnection = mAdapterInputConnectionFactory.get(mContainerView, mImeAdapter,
mEditable, outAttrs);
return mInputConnection;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onCreateInputConnection
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
|
onCreateInputConnection
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
void verify() {
byte[] d = digest.digest();
if (!verifyMessageDigest(d, hash)) {
throw invalidDigest(JarFile.MANIFEST_NAME, name, name);
}
verifiedEntries.put(name, certChains);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: verify
File: core/java/android/util/jar/StrictJarVerifier.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21253
|
MEDIUM
| 5.5
|
android
|
verify
|
core/java/android/util/jar/StrictJarVerifier.java
|
84df68840b6f2407146e722ebd95a7d8bc6e3529
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isSeparateProfileChallengeAllowed(int userHandle) {
UserInfo info = getUserManager().getUserInfo(userHandle);
if (info == null || !info.isManagedProfile()) {
return false;
}
return getDevicePolicyManager().isSeparateProfileChallengeAllowed(userHandle);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isSeparateProfileChallengeAllowed
File: core/java/com/android/internal/widget/LockPatternUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3908
|
MEDIUM
| 4.3
|
android
|
isSeparateProfileChallengeAllowed
|
core/java/com/android/internal/widget/LockPatternUtils.java
|
96daf7d4893f614714761af2d53dfb93214a32e4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public CharSequence consumeCustomMessage() {
final CharSequence message = mCustomMessage;
mCustomMessage = null;
return message;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: consumeCustomMessage
File: packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21267
|
MEDIUM
| 5.5
|
android
|
consumeCustomMessage
|
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
|
d18d8b350756b0e89e051736c1f28744ed31e93a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setFilter(Filter filter) {
this.filter = filter;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setFilter
File: config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-77"
] |
CVE-2021-43286
|
MEDIUM
| 6.5
|
gocd
|
setFilter
|
config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
|
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
boolean openGutsInternal(
View view,
int x,
int y,
NotificationMenuRowPlugin.MenuItem menuItem) {
if (!(view instanceof ExpandableNotificationRow)) {
return false;
}
if (view.getWindowToken() == null) {
Log.e(TAG, "Trying to show notification guts, but not attached to window");
return false;
}
final ExpandableNotificationRow row = (ExpandableNotificationRow) view;
view.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS);
if (row.areGutsExposed()) {
closeAndSaveGuts(false /* removeLeavebehind */, false /* force */,
true /* removeControls */, -1 /* x */, -1 /* y */,
true /* resetMenu */);
return false;
}
row.ensureGutsInflated();
NotificationGuts guts = row.getGuts();
mNotificationGutsExposed = guts;
if (!bindGuts(row, menuItem)) {
// exception occurred trying to fill in all the data, bail.
return false;
}
// Assume we are a status_bar_notification_row
if (guts == null) {
// This view has no guts. Examples are the more card or the dismiss all view
return false;
}
// ensure that it's laid but not visible until actually laid out
guts.setVisibility(View.INVISIBLE);
// Post to ensure the the guts are properly laid out.
mOpenRunnable = new Runnable() {
@Override
public void run() {
if (row.getWindowToken() == null) {
Log.e(TAG, "Trying to show notification guts in post(), but not attached to "
+ "window");
return;
}
guts.setVisibility(View.VISIBLE);
final boolean needsFalsingProtection =
(mStatusBarStateController.getState() == StatusBarState.KEYGUARD &&
!mAccessibilityManager.isTouchExplorationEnabled());
guts.openControls(
!row.isBlockingHelperShowing(),
x,
y,
needsFalsingProtection,
row::onGutsOpened);
if (mGutsListener != null) {
mGutsListener.onGutsOpen(row.getEntry(), guts);
}
row.closeRemoteInput();
mListContainer.onHeightChanged(row, true /* needsAnimation */);
mGutsMenuItem = menuItem;
}
};
guts.post(mOpenRunnable);
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: openGutsInternal
File: packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationGutsManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40098
|
MEDIUM
| 5.5
|
android
|
openGutsInternal
|
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationGutsManager.java
|
d21ffbe8a2eeb2a5e6da7efbb1a0430ba6b022e0
| 0
|
Analyze the following code function for security vulnerabilities
|
VpnManager getVpnManager() {
return mContext.getSystemService(VpnManager.class);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getVpnManager
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
|
getVpnManager
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void main(String[] args) throws LifecycleException {
String webappDirLocation;
if (Constants.IN_JAR) {
webappDirLocation = "webapp";
} else {
webappDirLocation = "src/main/webapp/";
}
Tomcat tomcat = new Tomcat();
String webPort = System.getenv("PORT");
if (webPort == null || webPort.isEmpty()) {
webPort = "8080";
}
tomcat.setPort(Integer.valueOf(webPort));
tomcat.getConnector();
// Declare an alternative location for your "WEB-INF/classes" dir
// Servlet 3.0 annotation will work
File additionWebInfClasses;
if (Constants.IN_JAR) {
additionWebInfClasses = new File("");
} else {
additionWebInfClasses = new File("target/classes");
}
tomcat.setBaseDir(additionWebInfClasses.toString());
//idea的路径eclipse启动的路径有区别
if (!Constants.IN_JAR && !new File("").getAbsolutePath().endsWith(File.separator + "web")) {
webappDirLocation = "web/" + webappDirLocation;
}
tomcat.addWebapp("", new File(webappDirLocation).getAbsolutePath());
tomcat.start();
tomcat.getServer().await();
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2020-21316
- Severity: MEDIUM
- CVSS Score: 4.3
Description: Fix #55,#56 xxs inject
Function: main
File: web/src/main/java/com/zrlog/web/Application.java
Repository: 94fzb/zrlog
Fixed Code:
public static void main(String[] args) throws LifecycleException {
String webappDirLocation;
if (Constants.IN_JAR) {
webappDirLocation = "webapp";
} else {
webappDirLocation = "src/main/webapp/";
}
Tomcat tomcat = new Tomcat();
String webPort = System.getenv("PORT");
if (webPort == null || webPort.isEmpty()) {
webPort = "8080";
}
tomcat.setPort(Integer.parseInt(webPort));
tomcat.getConnector();
// Declare an alternative location for your "WEB-INF/classes" dir
// Servlet 3.0 annotation will work
File additionWebInfClasses;
if (Constants.IN_JAR) {
additionWebInfClasses = new File("");
} else {
additionWebInfClasses = new File("target/classes");
}
tomcat.setBaseDir(additionWebInfClasses.toString());
//idea的路径eclipse启动的路径有区别
if (!Constants.IN_JAR && !new File("").getAbsolutePath().endsWith(File.separator + "web")) {
webappDirLocation = "web/" + webappDirLocation;
}
tomcat.addWebapp("", new File(webappDirLocation).getAbsolutePath());
tomcat.start();
tomcat.getServer().await();
}
|
[
"CWE-79"
] |
CVE-2020-21316
|
MEDIUM
| 4.3
|
94fzb/zrlog
|
main
|
web/src/main/java/com/zrlog/web/Application.java
|
b921c1ae03b8290f438657803eee05226755c941
| 1
|
Analyze the following code function for security vulnerabilities
|
private void showUsingTemplate(
final VariableHost exporter,
final String uri,
final String namespace,
final boolean includeDoc,
final Template template,
final boolean withIndex,
final PrintWriter out,
final String... vars
) throws IOException {
final String name = (namespace == null ? "Global" : namespace);
final Map<String, Object> root = new HashMap<String, Object>();
final DateFormat df = SimpleDateFormat.getDateTimeInstance();
root.put("urlPath", uri);
root.put("name", name);
root.put("date", df.format(new Date()));
root.put("includeDoc", includeDoc);
final List<Variable> varList;
if (vars != null && vars.length == 1) {
final Variable v = exporter.getVariable(vars[0]);
if (v != null) {
varList = Lists.newArrayListWithExpectedSize(1);
addVariable(v, varList);
} else {
varList = ImmutableList.of();
}
} else {
varList = Lists.newArrayListWithExpectedSize(vars != null ? vars.length : 256);
if (vars == null || vars.length == 0) {
exporter.visitVariables(new VariableVisitor() {
public void visit(Variable var) {
addVariable(var, varList);
}
});
} else {
for (String var : vars) {
Variable v = exporter.getVariable(var);
if (v != null) {
addVariable(v, varList);
}
}
}
}
root.put("vars", varList);
if (withIndex) {
final String varsIndex = buildIndex(varList);
root.put("varsIndex", varsIndex);
}
try {
template.process(root, out);
} catch (Exception e) {
throw new IOException("template failure", e);
}
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2020-36634
- Severity: MEDIUM
- CVSS Score: 5.4
Description: COMMON-3969: Explicit alphanumeric n-gram indexes
Explicitly build alphanumeric n-gram indexes to avoid XSS due
to unescaped characters in the rendered n-gram indexes JSON
Function: showUsingTemplate
File: varexport/src/main/java/com/indeed/util/varexport/servlet/ViewExportedVariablesServlet.java
Repository: indeedeng/util
Fixed Code:
private void showUsingTemplate(
final VariableHost exporter,
final String uri,
final String namespace,
final boolean includeDoc,
final Template template,
final boolean withIndex,
final PrintWriter out,
final String... vars
) throws IOException {
final String name = (namespace == null ? "Global" : namespace);
final Map<String, Object> root = new HashMap<String, Object>();
final DateFormat df = SimpleDateFormat.getDateTimeInstance();
root.put("urlPath", uri);
root.put("name", name);
root.put("date", df.format(new Date()));
root.put("includeDoc", includeDoc);
final List<Variable> varList;
if (vars != null && vars.length == 1) {
final Variable v = exporter.getVariable(vars[0]);
if (v != null) {
varList = Lists.newArrayListWithExpectedSize(1);
addVariable(v, varList);
} else {
varList = ImmutableList.of();
}
} else {
varList = Lists.newArrayListWithExpectedSize(vars != null ? vars.length : 256);
if (vars == null || vars.length == 0) {
exporter.visitVariables(new VariableVisitor() {
public void visit(Variable var) {
addVariable(var, varList);
}
});
} else {
for (String var : vars) {
Variable v = exporter.getVariable(var);
if (v != null) {
addVariable(v, varList);
}
}
}
}
root.put("vars", varList);
if (withIndex) {
root.put("varsIndex", alphanumericNGramIndexesJSON(varList));
}
try {
template.process(root, out);
} catch (Exception e) {
throw new IOException("template failure", e);
}
}
|
[
"CWE-79"
] |
CVE-2020-36634
|
MEDIUM
| 5.4
|
indeedeng/util
|
showUsingTemplate
|
varexport/src/main/java/com/indeed/util/varexport/servlet/ViewExportedVariablesServlet.java
|
c0952a9db51a880e9544d9fac2a2218a6bfc9c63
| 1
|
Analyze the following code function for security vulnerabilities
|
public Result verifySourceStamp(String expectedCertDigest) {
Closeable in = null;
try {
DataSource apk;
if (mApkDataSource != null) {
apk = mApkDataSource;
} else if (mApkFile != null) {
RandomAccessFile f = new RandomAccessFile(mApkFile, "r");
in = f;
apk = DataSources.asDataSource(f, 0, f.length());
} else {
throw new IllegalStateException("APK not provided");
}
return verifySourceStamp(apk, expectedCertDigest);
} catch (IOException e) {
return createSourceStampResultWithError(
Result.SourceStampInfo.SourceStampVerificationStatus.VERIFICATION_ERROR,
Issue.UNEXPECTED_EXCEPTION, e);
} finally {
if (in != null) {
try {
in.close();
} catch (IOException ignored) {
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: verifySourceStamp
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
|
verifySourceStamp
|
src/main/java/com/android/apksig/ApkVerifier.java
|
039f815895f62c9f8af23df66622b66246f3f61e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setServerAndPort(String serverAndPort) {
this.serverAndPort = serverAndPort;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setServerAndPort
File: config/config-api/src/main/java/com/thoughtworks/go/config/materials/perforce/P4MaterialConfig.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-77"
] |
CVE-2021-43286
|
MEDIUM
| 6.5
|
gocd
|
setServerAndPort
|
config/config-api/src/main/java/com/thoughtworks/go/config/materials/perforce/P4MaterialConfig.java
|
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
| 0
|
Analyze the following code function for security vulnerabilities
|
@GetMapping()
public String profile(ModelMap mmap)
{
SysUser user = getSysUser();
mmap.put("user", user);
mmap.put("roleGroup", userService.selectUserRoleGroup(user.getUserId()));
mmap.put("postGroup", userService.selectUserPostGroup(user.getUserId()));
return prefix + "/profile";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: profile
File: ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java
Repository: yangzongzhuan/RuoYi
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-32065
|
LOW
| 3.5
|
yangzongzhuan/RuoYi
|
profile
|
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java
|
d8b2a9a905fb750fa60e2400238cf4750a77c5e6
| 0
|
Analyze the following code function for security vulnerabilities
|
public static ActivityOptions makeCustomInPlaceAnimation(Context context, int animId) {
if (animId == 0) {
throw new RuntimeException("You must specify a valid animation.");
}
ActivityOptions opts = new ActivityOptions();
opts.mPackageName = context.getPackageName();
opts.mAnimationType = ANIM_CUSTOM_IN_PLACE;
opts.mCustomInPlaceResId = animId;
return opts;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: makeCustomInPlaceAnimation
File: core/java/android/app/ActivityOptions.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-20918
|
CRITICAL
| 9.8
|
android
|
makeCustomInPlaceAnimation
|
core/java/android/app/ActivityOptions.java
|
51051de4eb40bb502db448084a83fd6cbfb7d3cf
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isWaitingForResult() {
return waitingForResult;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isWaitingForResult
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
|
isWaitingForResult
|
Ports/Android/src/com/codename1/impl/android/CodenameOneActivity.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void save(MapSession session) {
cache.put(session.getId(), session, session.getMaxInactiveInterval().getSeconds(), TimeUnit.SECONDS);
}
|
Vulnerability Classification:
- CWE: CWE-384
- CVE: CVE-2019-10158
- Severity: HIGH
- CVSS Score: 7.5
Description: ISPN-10224 Fix session fixation protection
Function: save
File: spring/spring5/spring5-common/src/main/java/org/infinispan/spring/common/session/AbstractInfinispanSessionRepository.java
Repository: infinispan
Fixed Code:
@Override
public void save(MapSession session) {
if (!session.getId().equals(session.getOriginalId())) {
deleteById(session.getOriginalId());
}
cache.put(session.getId(), session, session.getMaxInactiveInterval().getSeconds(), TimeUnit.SECONDS);
}
|
[
"CWE-384"
] |
CVE-2019-10158
|
HIGH
| 7.5
|
infinispan
|
save
|
spring/spring5/spring5-common/src/main/java/org/infinispan/spring/common/session/AbstractInfinispanSessionRepository.java
|
f3efef8de7fec4108dd5ab725cea6ae09f14815d
| 1
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public List<String> searchDocumentsNames(String wikiName, String parameterizedWhereClause, int maxResults,
int startOffset, List<?> parameterValues) throws XWikiException
{
String database = this.context.getWikiId();
try {
this.context.setWikiId(wikiName);
return searchDocuments(parameterizedWhereClause, maxResults, startOffset, parameterValues);
} finally {
this.context.setWikiId(database);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: searchDocumentsNames
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
|
searchDocumentsNames
|
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
|
@Override
public void setMasterSyncAutomatically(boolean flag) {
setMasterSyncAutomaticallyAsUser(flag, UserHandle.getCallingUserId());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setMasterSyncAutomatically
File: services/core/java/com/android/server/content/ContentService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2426
|
MEDIUM
| 4.3
|
android
|
setMasterSyncAutomatically
|
services/core/java/com/android/server/content/ContentService.java
|
63363af721650e426db5b0bdfb8b2d4fe36abdb0
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void setWriter(Writer writer) {
this.writer = writer;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setWriter
File: smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
Repository: igniterealtime/Smack
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2016-10027
|
MEDIUM
| 4.3
|
igniterealtime/Smack
|
setWriter
|
smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
|
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isEditCommentFieldHidden(XWikiContext context)
{
String bl = getXWikiPreference("editcomment_hidden", "", context);
if ("1".equals(bl)) {
return true;
}
if ("0".equals(bl)) {
return false;
}
return "1".equals(getConfiguration().getProperty("xwiki.editcomment.hidden", "0"));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isEditCommentFieldHidden
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
|
isEditCommentFieldHidden
|
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 Map<String, Http.MultipartFormData.FilePart<?>> files() {
return Collections.unmodifiableMap(files);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: files
File: web/play-java-forms/src/main/java/play/data/Form.java
Repository: playframework
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-31018
|
MEDIUM
| 5
|
playframework
|
files
|
web/play-java-forms/src/main/java/play/data/Form.java
|
15393b736df939e35e275af2347155f296c684f2
| 0
|
Analyze the following code function for security vulnerabilities
|
public ViewPage createPage(EntityReference reference, String content, String title)
{
return createPage(reference, content, title, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createPage
File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2023-35166
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
createPage
|
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
|
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
| 0
|
Analyze the following code function for security vulnerabilities
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.P, trackingBug = 115609023)
public int getPasswordMinimumLength(@Nullable ComponentName admin, int userHandle) {
if (mService != null) {
try {
return mService.getPasswordMinimumLength(admin, userHandle, mParentInstance);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
return 0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPasswordMinimumLength
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
|
getPasswordMinimumLength
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void handleRingerModeChange(int mode) {
if (DEBUG) Log.d(TAG, "handleRingerModeChange(" + mode + ")");
mRingMode = mode;
for (int i = 0; i < mCallbacks.size(); i++) {
KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get();
if (cb != null) {
cb.onRingerModeChanged(mode);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleRingerModeChange
File: packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
handleRingerModeChange
|
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getHeight(Object nativeFont) {
CodenameOneTextPaint font = (nativeFont == null ? this.defaultFont
: (CodenameOneTextPaint) ((NativeFont) nativeFont).font);
if(font.fontHeight < 0) {
Paint.FontMetrics fm = font.getFontMetrics();
font.fontHeight = (int)Math.ceil(fm.bottom - fm.top);
}
return font.fontHeight;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getHeight
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
|
getHeight
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
private void handleWebsocketFrame(ChannelHandlerContext ctx, WebSocketFrame frame) {
// Check for closing frame
if (frame instanceof CloseWebSocketFrame) {
handshaker.close(ctx.channel(), (CloseWebSocketFrame) frame.retain());
return;
}
if (frame instanceof PingWebSocketFrame) {
ctx.channel().write(new PongWebSocketFrame(frame.content().retain()));
return;
}
if (!(frame instanceof TextWebSocketFrame)) {
throw new UnsupportedOperationException(String.format("%s frame types not supported", frame.getClass()
.getName()));
}
// TODO: placeholder
String requestText = ((TextWebSocketFrame) frame).text();
String responseText =
requestText.toUpperCase() + " -- "
+ (wsAuthenticatedUser == null ? "not logged in" : wsAuthenticatedUser.id);
ctx.channel().writeAndFlush(new TextWebSocketFrame(responseText));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleWebsocketFrame
File: src/gribbit/request/HttpRequestHandler.java
Repository: lukehutch/gribbit
The code follows secure coding practices.
|
[
"CWE-346"
] |
CVE-2014-125071
|
MEDIUM
| 5.2
|
lukehutch/gribbit
|
handleWebsocketFrame
|
src/gribbit/request/HttpRequestHandler.java
|
620418df247aebda3dd4be1dda10fe229ea505dd
| 0
|
Analyze the following code function for security vulnerabilities
|
public String validateCsrfToken(String sessionId, String csrfToken) {
if (StringUtils.isBlank(csrfToken)) {
throw new RuntimeException("csrf token is empty");
}
csrfToken = CodingUtil.aesDecrypt(csrfToken, SessionUser.secret, SessionUser.iv);
String[] signatureArray = StringUtils.split(StringUtils.trimToNull(csrfToken), "|");
if (signatureArray.length != 4) {
throw new RuntimeException("invalid token");
}
if (!StringUtils.equals(sessionId, signatureArray[2])) {
throw new RuntimeException("Please check csrf token.");
}
return signatureArray[0];
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: validateCsrfToken
File: framework/gateway/src/main/java/io/metersphere/gateway/service/UserLoginService.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2023-32699
|
MEDIUM
| 6.5
|
metersphere
|
validateCsrfToken
|
framework/gateway/src/main/java/io/metersphere/gateway/service/UserLoginService.java
|
c59e381d368990214813085a1a4877c5ef865411
| 0
|
Analyze the following code function for security vulnerabilities
|
public static Scriptable jsConstructor(Context cx, Object[] args, Function Obj,
boolean inNewExpr)
throws ScriptException, APIManagementException {
if (args != null && args.length != 0) {
String username = (String) args[0];
return new APIStoreHostObject(username);
}
return new APIStoreHostObject(null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: jsConstructor
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
|
jsConstructor
|
components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
|
490f2860822f89d745b7c04fa9570bd86bef4236
| 0
|
Analyze the following code function for security vulnerabilities
|
public void updateObject(EntityReference entityReference, String className, int objectNumber,
Object... properties)
{
// TODO: would be even quicker using REST
Map<String, Object> queryParameters =
(Map<String, Object>) toQueryParameters(className, objectNumber, properties);
// Append the updateOrCreate objectPolicy since we always want this in our tests.
queryParameters.put("objectPolicy", "updateOrCreate");
gotoPage(entityReference, "save", queryParameters);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateObject
File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2023-35166
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
updateObject
|
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
|
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
| 0
|
Analyze the following code function for security vulnerabilities
|
public abstract BaseXMLBuilder stripWhitespaceOnlyTextNodes()
throws XPathExpressionException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: stripWhitespaceOnlyTextNodes
File: src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
Repository: jmurty/java-xmlbuilder
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2014-125087
|
MEDIUM
| 5.2
|
jmurty/java-xmlbuilder
|
stripWhitespaceOnlyTextNodes
|
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
|
e6fddca201790abab4f2c274341c0bb8835c3e73
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void removeExtras(String callId, List<String> keys, Session.Info sessionInfo) {
Log.startSession(sessionInfo, "CSW.rE", mPackageAbbreviation);
long token = Binder.clearCallingIdentity();
try {
synchronized (mLock) {
logIncoming("removeExtra %s %s", callId, keys);
Call call = mCallIdMapper.getCall(callId);
if (call != null) {
call.removeExtras(Call.SOURCE_CONNECTION_SERVICE, keys);
}
}
} catch (Throwable t) {
Log.e(ConnectionServiceWrapper.this, t, "");
throw t;
} finally {
Binder.restoreCallingIdentity(token);
Log.endSession();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeExtras
File: src/com/android/server/telecom/ConnectionServiceWrapper.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
removeExtras
|
src/com/android/server/telecom/ConnectionServiceWrapper.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int hashCode() {
return key.hashCode();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hashCode
File: jooby/src/main/java/org/jooby/internal/HttpHandlerImpl.java
Repository: jooby-project/jooby
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-15477
|
MEDIUM
| 4.3
|
jooby-project/jooby
|
hashCode
|
jooby/src/main/java/org/jooby/internal/HttpHandlerImpl.java
|
34856a738829d8fedca4ed27bd6ff413af87186f
| 0
|
Analyze the following code function for security vulnerabilities
|
public void reset()
{
name = "";
email = "";
website = "";
notify = false;
comment = "";
accept = false;
captcha = "";
commentsModeration="";
audioCaptcha = "";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: reset
File: src/com/dotmarketing/cms/comment/struts/CommentsForm.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-254",
"CWE-264"
] |
CVE-2016-8600
|
MEDIUM
| 5
|
dotCMS/core
|
reset
|
src/com/dotmarketing/cms/comment/struts/CommentsForm.java
|
cb84b130065c9eed1d1df9e4770ffa5d4bd30569
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("rawtypes")
private static Class[] getNonRepeatebleFeatures(StateNode node) {
if (node.featureSet.reportedFeatures.isEmpty()) {
Set<Class<? extends NodeFeature>> set = node.featureSet.mappings
.keySet();
return set.toArray(new Class[set.size()]);
}
return node.featureSet.mappings.keySet().stream().filter(
clazz -> !node.featureSet.reportedFeatures.contains(clazz))
.toArray(Class[]::new);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNonRepeatebleFeatures
File: flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2023-25499
|
MEDIUM
| 6.5
|
vaadin/flow
|
getNonRepeatebleFeatures
|
flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java
|
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Serializable getValue() {
// XML parser only does string types
return getFieldValue();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getValue
File: main/src/com/google/refine/importers/XmlImporter.java
Repository: OpenRefine
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-20157
|
MEDIUM
| 5
|
OpenRefine
|
getValue
|
main/src/com/google/refine/importers/XmlImporter.java
|
6a0d7d56e4ffb420316ce7849fde881344fbf881
| 0
|
Analyze the following code function for security vulnerabilities
|
private void loggingSocketConsumeAllBytes() {
try {
int available = s_istream.available();
byte[] data = new byte[available];
s_istream.read(data);
} catch (Exception e) {}
try {
int available = c_istream.available();
byte[] data = new byte[available];
c_istream.read(data);
} catch (Exception e) {}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: loggingSocketConsumeAllBytes
File: src/main/java/org/mozilla/jss/ssl/javax/JSSEngineReferenceImpl.java
Repository: dogtagpki/jss
The code follows secure coding practices.
|
[
"CWE-401"
] |
CVE-2021-4213
|
HIGH
| 7.5
|
dogtagpki/jss
|
loggingSocketConsumeAllBytes
|
src/main/java/org/mozilla/jss/ssl/javax/JSSEngineReferenceImpl.java
|
5922560a78d0dee61af8a33cc9cfbf4cfa291448
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean bindToAuthenticator(String authenticatorType) {
final AccountAuthenticatorCache.ServiceInfo<AuthenticatorDescription> authenticatorInfo;
authenticatorInfo = mAuthenticatorCache.getServiceInfo(
AuthenticatorDescription.newKey(authenticatorType), mAccounts.userId);
if (authenticatorInfo == null) {
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.v(TAG, "there is no authenticator for " + authenticatorType
+ ", bailing out");
}
return false;
}
if (!isLocalUnlockedUser(mAccounts.userId)
&& !authenticatorInfo.componentInfo.directBootAware) {
Slog.w(TAG, "Blocking binding to authenticator " + authenticatorInfo.componentName
+ " which isn't encryption aware");
return false;
}
Intent intent = new Intent();
intent.setAction(AccountManager.ACTION_AUTHENTICATOR_INTENT);
intent.setComponent(authenticatorInfo.componentName);
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.v(TAG, "performing bindService to " + authenticatorInfo.componentName);
}
int flags = Context.BIND_AUTO_CREATE;
if (mAuthenticatorCache.getBindInstantServiceAllowed(mAccounts.userId)) {
flags |= Context.BIND_ALLOW_INSTANT;
}
if (!mContext.bindServiceAsUser(intent, this, flags, UserHandle.of(mAccounts.userId))) {
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.v(TAG, "bindService to " + authenticatorInfo.componentName + " failed");
}
return false;
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: bindToAuthenticator
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
|
bindToAuthenticator
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
public String record() {
setAttr("tipsType", I18nUtil.getStringFromRes("archive"));
setAttr("tipsName", getPara(0));
setPageInfo(Constants.getArticleUri() + "record/" + getPara(0) + "-", new Log().findByDate(getParaToInt(1, 1), getDefaultRows(), getPara(0)), getParaToInt(1, 1));
return "page";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: record
File: web/src/main/java/com/zrlog/web/controller/blog/ArticleController.java
Repository: 94fzb/zrlog
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-21316
|
MEDIUM
| 4.3
|
94fzb/zrlog
|
record
|
web/src/main/java/com/zrlog/web/controller/blog/ArticleController.java
|
b921c1ae03b8290f438657803eee05226755c941
| 0
|
Analyze the following code function for security vulnerabilities
|
static boolean hasCompatScale(WindowManager.LayoutParams attrs, WindowToken token,
float overrideScale) {
if ((attrs.privateFlags & PRIVATE_FLAG_COMPATIBLE_WINDOW) != 0) {
return true;
}
if (attrs.type == TYPE_APPLICATION_STARTING) {
// Exclude starting window because it is not displayed by the application.
return false;
}
return token != null && token.hasSizeCompatBounds() || overrideScale != 1f;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasCompatScale
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
|
hasCompatScale
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
public Bootstrap getBootstrap(String url, boolean useSSl, boolean useProxy) {
return (url.startsWith(WEBSOCKET) && !useProxy) ? (useSSl ? secureWebSocketBootstrap : webSocketBootstrap)
: (useSSl ? secureBootstrap : plainBootstrap);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getBootstrap
File: providers/netty/src/main/java/org/asynchttpclient/providers/netty/channel/Channels.java
Repository: AsyncHttpClient/async-http-client
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2013-7397
|
MEDIUM
| 4.3
|
AsyncHttpClient/async-http-client
|
getBootstrap
|
providers/netty/src/main/java/org/asynchttpclient/providers/netty/channel/Channels.java
|
df6ed70e86c8fc340ed75563e016c8baa94d7e72
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getDescriptorUrl() {
return "descriptorByName/"+getId();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDescriptorUrl
File: core/src/main/java/hudson/model/Descriptor.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
getDescriptorUrl
|
core/src/main/java/hudson/model/Descriptor.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
private void addExternalDependencies(DependencyInfo dependency) {
Page page = ui.getPage();
dependency.getJavaScripts().stream()
.filter(js -> UrlUtil.isExternal(js.value()))
.forEach(js -> page.addJavaScript(js.value(), js.loadMode()));
dependency.getJsModules().stream()
.filter(js -> UrlUtil.isExternal(js.value()))
.forEach(js -> page.addJsModule(js.value()));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addExternalDependencies
File: flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2023-25499
|
MEDIUM
| 6.5
|
vaadin/flow
|
addExternalDependencies
|
flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
|
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.