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
|
@Nullable
private String getRoleHolderPackageNameOnUser(Context context, String role, UserHandle user) {
RoleManager roleManager = context.getSystemService(RoleManager.class);
// Calling identity needs to be cleared as this method is used in the permissions checks.
return mInjector.binderWithCleanCallingIdentity(() -> {
List<String> roleHolders = roleManager.getRoleHoldersAsUser(role, user);
if (roleHolders.isEmpty()) {
return null;
}
return roleHolders.get(0);
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRoleHolderPackageNameOnUser
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
getRoleHolderPackageNameOnUser
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setMboCellularDataStatus(boolean available) {
mWifiNative.setMboCellularDataStatus(mInterfaceName, available);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setMboCellularDataStatus
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
|
setMboCellularDataStatus
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated(since = "2.2M1")
public boolean removeObject(BaseObject object)
{
return removeXObject(object);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeObject
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2023-29523
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
removeObject
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
0d547181389f7941e53291af940966413823f61c
| 0
|
Analyze the following code function for security vulnerabilities
|
private static native void nativeThemeRebase(long ptr, long themePtr, @NonNull int[] styleIds,
@NonNull boolean[] force, int styleSize);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nativeThemeRebase
File: core/java/android/content/res/AssetManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-415"
] |
CVE-2023-40103
|
HIGH
| 7.8
|
android
|
nativeThemeRebase
|
core/java/android/content/res/AssetManager.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
protected Map<String, IssuesWithBLOBs> getUuIdMap(List<IssuesWithBLOBs> issues) {
HashMap<String, IssuesWithBLOBs> issueMap = new HashMap<>();
if (org.apache.commons.collections.CollectionUtils.isNotEmpty(issues)) {
issues.forEach(item -> issueMap.put(item.getPlatformId(), item));
}
return issueMap;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUuIdMap
File: test-track/backend/src/main/java/io/metersphere/service/issue/platform/AbstractIssuePlatform.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2022-23544
|
MEDIUM
| 6.1
|
metersphere
|
getUuIdMap
|
test-track/backend/src/main/java/io/metersphere/service/issue/platform/AbstractIssuePlatform.java
|
d0f95b50737c941b29d507a4cc3545f2dc6ab121
| 0
|
Analyze the following code function for security vulnerabilities
|
private void replaceStatus(List<IssuesDao> planIssues, String planId) {
TestPlanWithBLOBs testPlan = testPlanService.get(planId);
CustomField customField = baseCustomFieldService.getCustomFieldByName(testPlan.getProjectId(), SystemCustomField.ISSUE_STATUS);
planIssues.forEach(issue -> {
List<CustomFieldDao> fields = issue.getFields();
if (CollectionUtils.isNotEmpty(fields)) {
for (CustomFieldDao field : fields) {
if (field.getId().equals(customField.getId())) {
List<CustomFieldOptionDTO> options = JSON.parseArray(customField.getOptions(), CustomFieldOptionDTO.class);
for (CustomFieldOptionDTO option : options) {
String value = field.getValue();
if (StringUtils.isNotBlank(value)) {
value = (String) JSON.parseObject(value);
}
if (StringUtils.equals(option.getValue(), value)) {
if (option.getSystem()) {
issue.setStatus(option.getValue());
} else {
issue.setStatus(option.getText());
}
}
}
break;
}
}
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: replaceStatus
File: test-track/backend/src/main/java/io/metersphere/service/IssuesService.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2022-23544
|
MEDIUM
| 6.1
|
metersphere
|
replaceStatus
|
test-track/backend/src/main/java/io/metersphere/service/IssuesService.java
|
d0f95b50737c941b29d507a4cc3545f2dc6ab121
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getCaption() {
return getState(false).caption;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCaption
File: server/src/main/java/com/vaadin/ui/Grid.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-25028
|
MEDIUM
| 4.3
|
vaadin/framework
|
getCaption
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
public Collection<SFile> listFiles() {
final File[] tmp = internal.listFiles();
if (tmp == null)
return Collections.emptyList();
final List<SFile> result = new ArrayList<>(tmp.length);
for (File f : tmp)
result.add(new SFile(f));
return Collections.unmodifiableCollection(result);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: listFiles
File: src/net/sourceforge/plantuml/security/SFile.java
Repository: plantuml
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2023-3431
|
MEDIUM
| 5.3
|
plantuml
|
listFiles
|
src/net/sourceforge/plantuml/security/SFile.java
|
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Column(name = "original_name")
public String getOriginalName() {
return this.originalName;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getOriginalName
File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/log/LogUpload.java
Repository: sanluan/PublicCMS
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-21333
|
LOW
| 3.5
|
sanluan/PublicCMS
|
getOriginalName
|
publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/log/LogUpload.java
|
b4d5956e65b14347b162424abb197a180229b3db
| 0
|
Analyze the following code function for security vulnerabilities
|
String getOrganizationId(String mediaPackageId) throws NotFoundException, SearchServiceDatabaseException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getOrganizationId
File: modules/search-service-impl/src/main/java/org/opencastproject/search/impl/persistence/SearchServiceDatabase.java
Repository: opencast
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-21318
|
MEDIUM
| 5.5
|
opencast
|
getOrganizationId
|
modules/search-service-impl/src/main/java/org/opencastproject/search/impl/persistence/SearchServiceDatabase.java
|
b18c6a7f81f08ed14884592a6c14c9ab611ad450
| 0
|
Analyze the following code function for security vulnerabilities
|
public CharSequence getHeadsUpStatusBarText(boolean publicMode) {
if (mStyle != null && !publicMode) {
CharSequence text = mStyle.getHeadsUpStatusBarText();
if (!TextUtils.isEmpty(text)) {
return text;
}
}
return loadHeaderAppName();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getHeadsUpStatusBarText
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
getHeadsUpStatusBarText
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setupClientMode() {
Log.d(getTag(), "setupClientMode() ifacename = " + mInterfaceName);
setMulticastFilter(true);
registerForWifiMonitorEvents();
if (isPrimary()) {
mWifiLastResortWatchdog.clearAllFailureCounts();
}
// Initialize data structures
mTargetBssid = SUPPLICANT_BSSID_ANY;
mTargetNetworkId = WifiConfiguration.INVALID_NETWORK_ID;
mLastBssid = null;
mLastNetworkId = WifiConfiguration.INVALID_NETWORK_ID;
mLastSubId = SubscriptionManager.INVALID_SUBSCRIPTION_ID;
mLastSimBasedConnectionCarrierName = null;
mLastSignalLevel = -1;
if (mWifiGlobals.isConnectedMacRandomizationEnabled()) {
mFailedToResetMacAddress = !mWifiNative.setStaMacAddress(
mInterfaceName, MacAddressUtils.createRandomUnicastAddress());
if (mFailedToResetMacAddress) {
Log.e(getTag(), "Failed to set random MAC address on ClientMode creation");
}
}
mWifiInfo.setMacAddress(mWifiNative.getMacAddress(mInterfaceName));
// TODO: b/79504296 This broadcast has been deprecated and should be removed
sendSupplicantConnectionChangedBroadcast(true);
mWifiNative.setExternalSim(mInterfaceName, true);
mWifiDiagnostics.startPktFateMonitoring(mInterfaceName);
mWifiDiagnostics.startLogging(mInterfaceName);
mMboOceController.enable();
// Enable bluetooth coexistence scan mode when bluetooth connection is active.
// When this mode is on, some of the low-level scan parameters used by the
// driver are changed to reduce interference with bluetooth
mWifiNative.setBluetoothCoexistenceScanMode(
mInterfaceName, mWifiGlobals.isBluetoothConnected());
sendNetworkChangeBroadcast(DetailedState.DISCONNECTED);
// Disable legacy multicast filtering, which on some chipsets defaults to enabled.
// Legacy IPv6 multicast filtering blocks ICMPv6 router advertisements which breaks IPv6
// provisioning. Legacy IPv4 multicast filtering may be re-enabled later via
// IpClient.Callback.setFallbackMulticastFilter()
mWifiNative.stopFilteringMulticastV4Packets(mInterfaceName);
mWifiNative.stopFilteringMulticastV6Packets(mInterfaceName);
// Set the right suspend mode settings
mWifiNative.setSuspendOptimizations(mInterfaceName, mSuspendOptNeedsDisabled == 0
&& mContext.getResources().getBoolean(
R.bool.config_wifiSuspendOptimizationsEnabled));
enablePowerSave();
// Disable wpa_supplicant from auto reconnecting.
mWifiNative.enableStaAutoReconnect(mInterfaceName, false);
// STA has higher priority over P2P
mWifiNative.setConcurrencyPriority(true);
// Retrieve and store the factory MAC address (on first bootup).
retrieveFactoryMacAddressAndStoreIfNecessary();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setupClientMode
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
|
setupClientMode
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String action() {
return this.action;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: action
File: src/main/java/org/elasticsearch/transport/netty/NettyTransportChannel.java
Repository: elastic/elasticsearch
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2015-5377
|
HIGH
| 7.5
|
elastic/elasticsearch
|
action
|
src/main/java/org/elasticsearch/transport/netty/NettyTransportChannel.java
|
bf3052d14c874aead7da8855c5fcadf5428a43f2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Text createTextNode(String data) {
return doc.createTextNode(data);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createTextNode
File: HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java
Repository: LoboEvolution
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000540
|
MEDIUM
| 6.8
|
LoboEvolution
|
createTextNode
|
HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java
|
9b75694cedfa4825d4a2330abf2719d470c654cd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void channelInactive(ChannelHandlerContext ctx) throws Exception {
super.channelInactive(ctx);
if (ctx.channel().isWritable()) {
ctx.flush();
}
NettyHttpRequest request = NettyHttpRequest.remove(ctx);
if (request != null) {
try {
request.release();
} finally {
if (beanLocator instanceof ApplicationEventPublisher) {
ctx.executor().execute(() -> {
try {
((ApplicationEventPublisher) beanLocator).publishEvent(
new HttpRequestTerminatedEvent(
request
)
);
} catch (Exception e) {
if (LOG.isErrorEnabled()) {
LOG.error("Error publishing request terminated event: " + e.getMessage(), e);
}
}
});
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: channelInactive
File: http-server-netty/src/main/java/io/micronaut/http/server/netty/RoutingInBoundHandler.java
Repository: micronaut-projects/micronaut-core
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-21700
|
MEDIUM
| 5
|
micronaut-projects/micronaut-core
|
channelInactive
|
http-server-netty/src/main/java/io/micronaut/http/server/netty/RoutingInBoundHandler.java
|
b8ec32c311689667c69ae7d9f9c3b3a8abc96fe3
| 0
|
Analyze the following code function for security vulnerabilities
|
public Bitmap getFavicon() {
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFavicon
File: chrome/android/java/src/org/chromium/chrome/browser/Tab.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
getFavicon
|
chrome/android/java/src/org/chromium/chrome/browser/Tab.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getUserAgent(){
return userAgent;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserAgent
File: samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
getUserAgent
|
samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getParseMode() {
return parseMode;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getParseMode
File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/TelegramNotifier.java
Repository: codecentric/spring-boot-admin
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2022-46166
|
CRITICAL
| 9.8
|
codecentric/spring-boot-admin
|
getParseMode
|
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/TelegramNotifier.java
|
c14c3ec12533f71f84de9ce3ce5ceb7991975f75
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean exractAndLoad(ArrayList<String> errors, String version, String customPath, String resourcePath) {
URL resource = classLoader.getResource(resourcePath);
if( resource !=null ) {
String libName = name + "-" + getBitModel();
if( version !=null) {
libName += "-" + version;
}
if( customPath!=null ) {
// Try to extract it to the custom path...
File target = file(customPath, map(libName));
if( extract(errors, resource, target) ) {
if( load(errors, target) ) {
return true;
}
}
}
// Fall back to extracting to the tmp dir
customPath = System.getProperty("java.io.tmpdir");
File target = file(customPath, map(libName));
if( extract(errors, resource, target) ) {
if( load(errors, target) ) {
return true;
}
}
}
return false;
}
|
Vulnerability Classification:
- CWE: CWE-94
- CVE: CVE-2013-2035
- Severity: MEDIUM
- CVSS Score: 4.4
Description: Simplify shared lib extraction.
Function: exractAndLoad
File: hawtjni-runtime/src/main/java/org/fusesource/hawtjni/runtime/Library.java
Repository: fusesource/hawtjni
Fixed Code:
private boolean exractAndLoad(ArrayList<String> errors, String version, String customPath, String resourcePath) {
URL resource = classLoader.getResource(resourcePath);
if( resource !=null ) {
String libName = name + "-" + getBitModel();
if( version !=null) {
libName += "-" + version;
}
String []libNameParts = map(libName).split("\\.");
String prefix = libNameParts[0]+"-";
String suffix = "."+libNameParts[1];
if( customPath!=null ) {
// Try to extract it to the custom path...
File target = extract(errors, resource, prefix, suffix, file(customPath));
if( target!=null ) {
if( load(errors, target) ) {
return true;
}
}
}
// Fall back to extracting to the tmp dir
customPath = System.getProperty("java.io.tmpdir");
File target = extract(errors, resource, prefix, suffix, file(customPath));
if( target!=null ) {
if( load(errors, target) ) {
return true;
}
}
}
return false;
}
|
[
"CWE-94"
] |
CVE-2013-2035
|
MEDIUM
| 4.4
|
fusesource/hawtjni
|
exractAndLoad
|
hawtjni-runtime/src/main/java/org/fusesource/hawtjni/runtime/Library.java
|
92c266170ce98edc200c656bd034a237098b8aa5
| 1
|
Analyze the following code function for security vulnerabilities
|
public CreateCommentResponse save(CreateCommentRequest createCommentRequest) {
CreateCommentResponse createCommentResponse = new CreateCommentResponse();
if (createCommentRequest.getLogId() != null && createCommentRequest.getComment() != null) {
if (isAllowComment(Integer.valueOf(createCommentRequest.getLogId()))) {
String comment = Jsoup.clean(createCommentRequest.getComment(), Whitelist.basic());
if (comment.length() > 0 && !ParseUtil.isGarbageComment(comment)) {
new Comment().set("userHome", createCommentRequest.getUserHome())
.set("userMail", createCommentRequest.getComment())
.set("userIp", createCommentRequest.getIp())
.set("userName", createCommentRequest.getUserName())
.set("logId", createCommentRequest.getLogId())
.set("userComment", comment)
.set("user_agent", createCommentRequest.getUserAgent())
.set("reply_id", createCommentRequest.getReplyId())
.set("commTime", new Date()).set("hide", 1).save();
} else {
createCommentResponse.setError(1);
createCommentResponse.setMessage("");
}
} else {
createCommentResponse.setError(1);
createCommentResponse.setMessage("");
}
} else {
createCommentResponse.setError(1);
createCommentResponse.setMessage("");
}
Log log = new Log().findByIdOrAlias(createCommentRequest.getLogId());
if (log != null) {
createCommentResponse.setAlias(log.getStr("alias"));
}
return createCommentResponse;
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2020-21316
- Severity: MEDIUM
- CVSS Score: 4.3
Description: Fix #55,#56 xxs inject
Function: save
File: service/src/main/java/com/zrlog/service/CommentService.java
Repository: 94fzb/zrlog
Fixed Code:
public CreateCommentResponse save(CreateCommentRequest createCommentRequest) {
CreateCommentResponse createCommentResponse = new CreateCommentResponse();
if (createCommentRequest.getLogId() != null && createCommentRequest.getComment() != null) {
if (isAllowComment(Integer.parseInt(createCommentRequest.getLogId()))) {
String comment = Jsoup.clean(createCommentRequest.getComment(), Whitelist.basic());
String email = createCommentRequest.getMail();
if (StringUtils.isNotEmpty(email) || !isValidEmailAddress(email)) {
throw new IllegalArgumentException(email + "not email address");
}
String nickname = Jsoup.clean(createCommentRequest.getUserName(), Whitelist.basic());
String userHome = Jsoup.clean(createCommentRequest.getUserHome(), Whitelist.basic());
if (comment.length() > 0 && !ParseUtil.isGarbageComment(comment)) {
new Comment().set("userHome", userHome)
.set("userMail", email)
.set("userIp", createCommentRequest.getIp())
.set("userName", nickname)
.set("logId", createCommentRequest.getLogId())
.set("userComment", comment)
.set("user_agent", createCommentRequest.getUserAgent())
.set("reply_id", createCommentRequest.getReplyId())
.set("commTime", new Date()).set("hide", 1).save();
} else {
createCommentResponse.setError(1);
createCommentResponse.setMessage("");
}
} else {
createCommentResponse.setError(1);
createCommentResponse.setMessage("");
}
} else {
createCommentResponse.setError(1);
createCommentResponse.setMessage("");
}
Log log = new Log().findByIdOrAlias(createCommentRequest.getLogId());
if (log != null) {
createCommentResponse.setAlias(log.getStr("alias"));
}
return createCommentResponse;
}
|
[
"CWE-79"
] |
CVE-2020-21316
|
MEDIUM
| 4.3
|
94fzb/zrlog
|
save
|
service/src/main/java/com/zrlog/service/CommentService.java
|
b921c1ae03b8290f438657803eee05226755c941
| 1
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
void systemReady(int phase) {
if (!mHasFeature) {
return;
}
switch (phase) {
case SystemService.PHASE_LOCK_SETTINGS_READY:
onLockSettingsReady();
loadAdminDataAsync();
mOwners.systemReady();
applyManagedSubscriptionsPolicyIfRequired();
break;
case SystemService.PHASE_ACTIVITY_MANAGER_READY:
synchronized (getLockObject()) {
migrateToProfileOnOrganizationOwnedDeviceIfCompLocked();
applyProfileRestrictionsIfDeviceOwnerLocked();
// TODO: Is this the right place to trigger the migration?
if (shouldMigrateToDevicePolicyEngine()) {
migratePoliciesToDevicePolicyEngine();
}
}
maybeStartSecurityLogMonitorOnActivityManagerReady();
break;
case SystemService.PHASE_BOOT_COMPLETED:
// Ideally it should be done earlier, but currently it relies on RecoverySystem,
// which would hang on earlier phases
factoryResetIfDelayedEarlier();
ensureDeviceOwnerUserStarted(); // TODO Consider better place to do this.
break;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: systemReady
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
systemReady
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setErrorCount(int val) {
errorCount = val;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setErrorCount
File: src/main/java/emissary/pickup/WorkBundle.java
Repository: NationalSecurityAgency/emissary
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2021-32634
|
MEDIUM
| 6.5
|
NationalSecurityAgency/emissary
|
setErrorCount
|
src/main/java/emissary/pickup/WorkBundle.java
|
40260b1ec1f76cc92361702cc14fa1e4388e19d7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getParam(String name) {
return request.getParameter(name);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getParam
File: sa-token-starter/sa-token-jakarta-servlet/src/main/java/cn/dev33/satoken/servlet/model/SaRequestForServlet.java
Repository: dromara/Sa-Token
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-44794
|
CRITICAL
| 9.8
|
dromara/Sa-Token
|
getParam
|
sa-token-starter/sa-token-jakarta-servlet/src/main/java/cn/dev33/satoken/servlet/model/SaRequestForServlet.java
|
954efeb73277f924f836da2a25322ea35ee1bfa3
| 0
|
Analyze the following code function for security vulnerabilities
|
private void deleteDocument(XWikiDocument doc, boolean totrash, boolean notify, XWikiContext context)
throws XWikiException
{
String currentWiki = null;
currentWiki = context.getWikiId();
try {
context.setWikiId(doc.getDocumentReference().getWikiReference().getName());
XWikiDocument blankDoc = null;
// Inform notification mechanisms that a document is about to be deleted
// Note that for the moment the event being send is a bridge event, as we are still passing around
// an XWikiDocument as source and an XWikiContext as data.
if (notify) {
blankDoc = beforeDelete(doc, context);
}
if (hasRecycleBin(context) && totrash) {
// Extract any existing batchId from the context.
String batchId = Utils.getComponent(BatchOperationExecutor.class).getCurrentBatchId();
// Save to recycle bin together with any determined batch ID.
getRecycleBinStore().saveToRecycleBin(doc, context.getUser(), new Date(), batchId, context, true);
}
getStore().deleteXWikiDoc(doc, context);
try {
// Inform notification mechanisms that a document has been deleted
// Note that for the moment the event being send is a bridge event, as we are still passing around
// an XWikiDocument as source and an XWikiContext as data.
if (notify) {
afterDelete(blankDoc, context);
}
} catch (Exception ex) {
LOGGER.error("Failed to send document delete notifications for document [{}]",
doc.getDocumentReference(), ex);
}
} finally {
context.setWikiId(currentWiki);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deleteDocument
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
|
deleteDocument
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isValidNumber(String number) {
return (number.length() <= mFdnNumberLimitLength) && (number.length() > 0);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isValidNumber
File: src/com/android/phone/settings/fdn/EditFdnContactScreen.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-862"
] |
CVE-2023-35665
|
HIGH
| 7.8
|
android
|
isValidNumber
|
src/com/android/phone/settings/fdn/EditFdnContactScreen.java
|
674039e70e1c5bf29b808899ac80c709acc82290
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setHttpClient(Client httpClient) {
this.httpClient = httpClient;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setHttpClient
File: samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
setHttpClient
|
samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
ActiveAdmin getDeviceOwnerOrProfileOwnerOfOrganizationOwnedDeviceOrSystemPermissionBasedAdminLocked() {
ensureLocked();
ActiveAdmin doOrPo = getDeviceOwnerOrProfileOwnerOfOrganizationOwnedDeviceLocked();
if (isPermissionCheckFlagEnabled() && doOrPo == null) {
return getUserData(0).mPermissionBasedAdmin;
}
return doOrPo;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDeviceOwnerOrProfileOwnerOfOrganizationOwnedDeviceOrSystemPermissionBasedAdminLocked
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
getDeviceOwnerOrProfileOwnerOfOrganizationOwnedDeviceOrSystemPermissionBasedAdminLocked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
private List< ? extends Block> generateBoxTitle(String cssClass, SyndFeed feed)
{
List<Block> titleBlocks;
if (feed.getLink() == null) {
titleBlocks = parsePlainText(feed.getTitle());
} else {
// Title link.
ResourceReference titleResourceReference = new ResourceReference(feed.getLink(), ResourceType.URL);
// Title text link.
Block titleTextLinkBlock = new LinkBlock(parsePlainText(feed.getTitle()), titleResourceReference, true);
// Rss icon.
String imagePath = this.skinAccessBridge.getSkinFile(FEED_ICON_RESOURCE_PATH);
ImageBlock imageBlock = new ImageBlock(new ResourceReference(imagePath, ResourceType.URL), false);
// Title rss icon link.
Block titleImageLinkBlock = new LinkBlock(Arrays.<Block> asList(imageBlock), titleResourceReference, true);
titleBlocks = Arrays.<Block> asList(titleTextLinkBlock, titleImageLinkBlock);
}
ParagraphBlock titleBlock = new ParagraphBlock(titleBlocks);
titleBlock.setParameter(CLASS_ATTRIBUTE, cssClass);
return Collections.singletonList(titleBlock);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: generateBoxTitle
File: xwiki-platform-core/xwiki-platform-rendering/xwiki-platform-rendering-macros/xwiki-platform-rendering-macro-rss/src/main/java/org/xwiki/rendering/internal/macro/rss/RssMacro.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-29202
|
CRITICAL
| 9
|
xwiki/xwiki-platform
|
generateBoxTitle
|
xwiki-platform-core/xwiki-platform-rendering/xwiki-platform-rendering-macros/xwiki-platform-rendering-macro-rss/src/main/java/org/xwiki/rendering/internal/macro/rss/RssMacro.java
|
5c7ebe47c2897e92d8f04fe2e15027e84dc3ec03
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getCss(Map<String, Object> data) {
String css = getPropertyString("css");
if ("true".equals(getPropertyString("removeAssignmentTitle"))) {
css += "\nbody .viewForm-body-header, body .runProcess-body-header {display:none;}";
}
return css;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCss
File: wflow-core/src/main/java/org/joget/plugin/enterprise/UniversalTheme.java
Repository: jogetworkflow/jw-community
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-4560
|
MEDIUM
| 6.1
|
jogetworkflow/jw-community
|
getCss
|
wflow-core/src/main/java/org/joget/plugin/enterprise/UniversalTheme.java
|
ecf8be8f6f0cb725c18536ddc726d42a11bdaa1b
| 0
|
Analyze the following code function for security vulnerabilities
|
@MediumTest
@Test
public void testSendCallEventNonNull() throws Exception {
IdPair ids = startAndMakeActiveIncomingCall("650-555-1212",
mPhoneAccountA0.getAccountHandle(), mConnectionServiceFixtureA);
assertEquals(Call.STATE_ACTIVE, mInCallServiceFixtureX.getCall(ids.mCallId).getState());
Bundle testBundle = new Bundle();
testBundle.putString(TEST_BUNDLE_KEY, "TEST");
ArgumentCaptor<Bundle> bundleArgumentCaptor = ArgumentCaptor.forClass(Bundle.class);
mInCallServiceFixtureX.mInCallAdapter.sendCallEvent(ids.mCallId, TEST_EVENT, 26,
testBundle);
verify(mConnectionServiceFixtureA.getTestDouble(), timeout(TEST_TIMEOUT))
.sendCallEvent(eq(ids.mConnectionId), eq(TEST_EVENT),
bundleArgumentCaptor.capture(), any());
assert (bundleArgumentCaptor.getValue().containsKey(TEST_BUNDLE_KEY));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: testSendCallEventNonNull
File: tests/src/com/android/server/telecom/tests/BasicCallTests.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
testSendCallEventNonNull
|
tests/src/com/android/server/telecom/tests/BasicCallTests.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void doStop() throws Exception {
super.doStop();
_oortSession.disconnect();
_oortSession.removeExtension(_binaryExtension);
ServerChannel channel = _bayeux.getChannel(OORT_CLOUD_CHANNEL);
if (channel != null) {
channel.removeListener(_cloudListener);
channel.removeAuthorizer(GrantAuthorizer.GRANT_ALL);
}
Extension binaryExtension = _serverBinaryExtension;
_serverBinaryExtension = null;
if (binaryExtension != null) {
_bayeux.removeExtension(binaryExtension);
}
Extension ackExtension = _ackExtension;
_ackExtension = null;
if (ackExtension != null) {
_bayeux.removeExtension(ackExtension);
}
_channels.clear();
_scheduler.shutdown();
for (ClientTransport.Factory factory : _transportFactories) {
removeBean(factory);
}
}
|
Vulnerability Classification:
- CWE: CWE-863
- CVE: CVE-2022-24721
- Severity: MEDIUM
- CVSS Score: 5.5
Description: Fixes #1146 - Review Oort/Seti channel usage
Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Function: doStop
File: cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Oort.java
Repository: cometd
Fixed Code:
@Override
protected void doStop() throws Exception {
super.doStop();
unprotectOortChannels(_bayeux);
_oortSession.disconnect();
_oortSession.removeExtension(_binaryExtension);
ServerChannel channel = _bayeux.getChannel(OORT_CLOUD_CHANNEL);
if (channel != null) {
channel.removeListener(_cloudListener);
}
_bayeux.removeListener(_allChannelsFilter);
Extension binaryExtension = _serverBinaryExtension;
_serverBinaryExtension = null;
if (binaryExtension != null) {
_bayeux.removeExtension(binaryExtension);
}
Extension ackExtension = _ackExtension;
_ackExtension = null;
if (ackExtension != null) {
_bayeux.removeExtension(ackExtension);
}
_channels.clear();
_scheduler.shutdown();
for (ClientTransport.Factory factory : _transportFactories) {
removeBean(factory);
}
}
|
[
"CWE-863"
] |
CVE-2022-24721
|
MEDIUM
| 5.5
|
cometd
|
doStop
|
cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Oort.java
|
bb445a143fbf320f17c62e340455cd74acfb5929
| 1
|
Analyze the following code function for security vulnerabilities
|
public void initOpenOutput() {
autoDelCheckBox.setSelected(false);
Runtime.getRuntime().addShutdownHook(new Thread(() -> {
if (autoDelCheckBox.isSelected()) {
for (String s : existOutputList) {
try {
Files.delete(Paths.get(s));
} catch (Exception ignored) {
}
}
}
}));
openResultButton.addActionListener(e -> {
if (outputFilePath == null) {
return;
}
if (StringUtil.notEmpty(outputFilePath.trim())) {
if (Files.exists(Paths.get(outputFilePath))) {
String tempOutput = outputFilePath.replace(".html",
"copy.html");
try {
// copy
Files.write(Paths.get(tempOutput),
Files.readAllBytes(Paths.get(outputFilePath)));
} catch (Exception ignored) {
}
existOutputList.add(tempOutput);
new Thread(() -> ExecUtil.execOpen(tempOutput)).start();
} else {
logger.info("output file not exist");
}
} else {
logger.warn("output file is none");
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initOpenOutput
File: src/main/java/com/chaitin/xray/form/MainForm.java
Repository: 4ra1n/super-xray
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2022-41958
|
HIGH
| 7.8
|
4ra1n/super-xray
|
initOpenOutput
|
src/main/java/com/chaitin/xray/form/MainForm.java
|
4d0d59663596db03f39d7edd2be251d48b52dcfc
| 0
|
Analyze the following code function for security vulnerabilities
|
public CopyBuildTask compress() {
zipMethod = COMPRESS;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: compress
File: APDE/src/main/java/com/calsignlabs/apde/build/dag/CopyBuildTask.java
Repository: Calsign/APDE
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-36628
|
CRITICAL
| 9.8
|
Calsign/APDE
|
compress
|
APDE/src/main/java/com/calsignlabs/apde/build/dag/CopyBuildTask.java
|
c6d64cbe465348c1bfd211122d89e3117afadecf
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getTimeDelta(long time)
{
Date ctime = new Date();
return (int) (ctime.getTime() - time);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTimeDelta
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
|
getTimeDelta
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
private void checkCustomNumExist(SaveApiScenarioRequest request) {
ApiScenarioExample example = new ApiScenarioExample();
example.createCriteria()
.andCustomNumEqualTo(request.getCustomNum())
.andProjectIdEqualTo(request.getProjectId())
.andIdNotEqualTo(request.getId());
List<ApiScenario> list = apiScenarioMapper.selectByExample(example);
if (CollectionUtils.isNotEmpty(list)) {
MSException.throwException("自定义ID " + request.getCustomNum() + " 已存在!");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkCustomNumExist
File: backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2021-45789
|
MEDIUM
| 6.5
|
metersphere
|
checkCustomNumExist
|
backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java
|
d74e02cdff47cdf7524d305d098db6ffb7f61b47
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void getProviderMimeTypeAsync(Uri uri, int userId, RemoteCallback resultCallback) {
mCpHelper.getProviderMimeTypeAsync(uri, userId, resultCallback);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProviderMimeTypeAsync
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21292
|
MEDIUM
| 5.5
|
android
|
getProviderMimeTypeAsync
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getSignatureBlockFileName() {
return mSignatureBlockFileName;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSignatureBlockFileName
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
|
getSignatureBlockFileName
|
src/main/java/com/android/apksig/ApkVerifier.java
|
039f815895f62c9f8af23df66622b66246f3f61e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean hasPageExtensions(XWikiContext context)
{
XWikiDocument doc = context.getDoc();
if (doc != null) {
List<BaseObject> objects = doc.getObjects(getExtensionClassName());
if (objects != null) {
for (BaseObject obj : objects) {
if (obj == null) {
continue;
}
if (obj.getStringValue(USE_FIELDNAME).equals("currentPage")) {
return true;
}
}
}
}
return false;
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2023-29206
- Severity: MEDIUM
- CVSS Score: 5.4
Description: XWIKI-9119: Refactoring of SkinExtensionPlugin
* Provide some tests
Function: hasPageExtensions
File: xwiki-platform-core/xwiki-platform-skin/xwiki-platform-skin-skinx/src/main/java/com/xpn/xwiki/plugin/skinx/AbstractDocumentSkinExtensionPlugin.java
Repository: xwiki/xwiki-platform
Fixed Code:
@Override
public boolean hasPageExtensions(XWikiContext context)
{
XWikiDocument doc = context.getDoc();
boolean result = false;
if (doc != null && this.hasCurrentPageExtensionObjects(doc)) {
if (getAuthorizationManager().hasAccess(Right.SCRIPT, doc.getAuthorReference(),
doc.getDocumentReference())) {
result = true;
} else {
displayScriptRightLog(doc.getDocumentReference());
}
}
return result;
}
|
[
"CWE-79"
] |
CVE-2023-29206
|
MEDIUM
| 5.4
|
xwiki/xwiki-platform
|
hasPageExtensions
|
xwiki-platform-core/xwiki-platform-skin/xwiki-platform-skin-skinx/src/main/java/com/xpn/xwiki/plugin/skinx/AbstractDocumentSkinExtensionPlugin.java
|
fe65bc35d5672dd2505b7ac4ec42aec57d500fbb
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public XWikiDocument getRevision(DocumentReference reference, String revision) throws XWikiException
{
XWikiContext xcontext = this.xcontextProvider.get();
XWikiDeletedDocument deletedDocument = xcontext.getWiki().getDeletedDocument(Long.valueOf(revision), xcontext);
// Only local the document if it matches the asked document reference
if (deletedDocument != null
&& (reference == null || deletedDocument.getDocumentReference().equals(reference))) {
return deletedDocument.restoreDocument(xcontext);
}
return null;
}
|
Vulnerability Classification:
- CWE: CWE-668
- CVE: CVE-2023-29208
- Severity: HIGH
- CVSS Score: 7.5
Description: XWIKI-16285: Error when accessing deleted document
Function: getRevision
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/doc/DeletedDocumentRevisionProvider.java
Repository: xwiki/xwiki-platform
Fixed Code:
@Override
public XWikiDocument getRevision(DocumentReference reference, String revision) throws XWikiException
{
XWikiContext xcontext = this.xcontextProvider.get();
XWikiDeletedDocument deletedDocument = xcontext.getWiki().getDeletedDocument(Long.valueOf(revision), xcontext);
// Only local the document if it matches the asked document reference
if (deletedDocument != null
&& (reference == null || deletedDocument.getDocumentReference().equals(reference))) {
return deletedDocument.restoreDocument(xcontext);
}
return null;
}
|
[
"CWE-668"
] |
CVE-2023-29208
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
getRevision
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/doc/DeletedDocumentRevisionProvider.java
|
d9e947559077e947315bf700c5703dfc7dd8a8d7
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public Element toDOM(Document document) {
Element element = document.createElement("PKIException");
toDOM(document, element);
Element codeElement = document.createElement("Code");
codeElement.appendChild(document.createTextNode(Integer.toString(code)));
element.appendChild(codeElement);
if (message != null) {
Element messageElement = document.createElement("Message");
messageElement.appendChild(document.createTextNode(message));
element.appendChild(messageElement);
}
return element;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toDOM
File: base/common/src/main/java/com/netscape/certsrv/base/PKIException.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
toDOM
|
base/common/src/main/java/com/netscape/certsrv/base/PKIException.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public Cursor rawQueryWithFactory(
CursorFactory cursorFactory, String sql, String[] selectionArgs,
String editTable, CancellationSignal cancellationSignal) {
acquireReference();
try {
SQLiteCursorDriver driver = new SQLiteDirectCursorDriver(this, sql, editTable,
cancellationSignal);
return driver.query(cursorFactory != null ? cursorFactory : mCursorFactory,
selectionArgs);
} finally {
releaseReference();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: rawQueryWithFactory
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
|
rawQueryWithFactory
|
core/java/android/database/sqlite/SQLiteDatabase.java
|
ebc250d16c747f4161167b5ff58b3aea88b37acf
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean hasAccessLevel(String level, String user)
{
try {
return getXWikiContext().getWiki().getRightService().hasAccessLevel(level, user, this.getPrefixedFullName(),
getXWikiContext());
} catch (Exception e) {
return false;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasAccessLevel
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
|
hasAccessLevel
|
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 void setTopologyRecoveryRetryHandler(RetryHandler topologyRecoveryRetryHandler) {
this.topologyRecoveryRetryHandler = topologyRecoveryRetryHandler;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setTopologyRecoveryRetryHandler
File: src/main/java/com/rabbitmq/client/ConnectionFactory.java
Repository: rabbitmq/rabbitmq-java-client
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-46120
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-java-client
|
setTopologyRecoveryRetryHandler
|
src/main/java/com/rabbitmq/client/ConnectionFactory.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void loadDimens() {
super.loadDimens();
mFlingAnimationUtils = new FlingAnimationUtils(getContext(), 0.4f);
mStatusBarMinHeight = getResources().getDimensionPixelSize(
com.android.internal.R.dimen.status_bar_height);
mQsPeekHeight = getResources().getDimensionPixelSize(R.dimen.qs_peek_height);
mNotificationsHeaderCollideDistance =
getResources().getDimensionPixelSize(R.dimen.header_notifications_collide_distance);
mUnlockMoveDistance = getResources().getDimensionPixelOffset(R.dimen.unlock_move_distance);
mClockPositionAlgorithm.loadDimens(getResources());
mNotificationScrimWaitDistance =
getResources().getDimensionPixelSize(R.dimen.notification_scrim_wait_distance);
mQsFalsingThreshold = getResources().getDimensionPixelSize(
R.dimen.qs_falsing_threshold);
mPositionMinSideMargin = getResources().getDimensionPixelSize(
R.dimen.notification_panel_min_side_margin);
mMaxFadeoutHeight = getResources().getDimensionPixelSize(
R.dimen.max_notification_fadeout_height);
mIndicationBottomPadding = getResources().getDimensionPixelSize(
R.dimen.keyguard_indication_bottom_padding);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: loadDimens
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
loadDimens
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
private void jjCheckNAddTwoStates(int state1, int state2)
{
jjCheckNAdd(state1);
jjCheckNAdd(state2);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: jjCheckNAddTwoStates
File: impl/src/main/java/com/sun/el/parser/ELParserTokenManager.java
Repository: jakartaee/expression-language
The code follows secure coding practices.
|
[
"CWE-917"
] |
CVE-2021-28170
|
MEDIUM
| 5
|
jakartaee/expression-language
|
jjCheckNAddTwoStates
|
impl/src/main/java/com/sun/el/parser/ELParserTokenManager.java
|
b6a3943ac5fba71cbc6719f092e319caa747855b
| 0
|
Analyze the following code function for security vulnerabilities
|
private XMPDirectory parseDirectories(final Node pParentNode, NodeList pNodes, String toolkit) {
Map<String, List<Entry>> subdirs = new LinkedHashMap<String, List<Entry>>();
for (Node desc : asIterable(pNodes)) {
if (desc.getParentNode() != pParentNode) {
continue;
}
// Support attribute short-hand syntax
parseAttributesForKnownElements(subdirs, desc);
for (Node node : asIterable(desc.getChildNodes())) {
if (node.getNodeType() != Node.ELEMENT_NODE) {
continue;
}
// Lookup
List<Entry> dir = subdirs.get(node.getNamespaceURI());
if (dir == null) {
dir = new ArrayList<Entry>();
subdirs.put(node.getNamespaceURI(), dir);
}
Object value;
if (isResourceType(node)) {
value = parseAsResource(node);
}
else {
// TODO: This method contains loads of duplication an should be cleaned up...
// Support attribute short-hand syntax
Map<String, List<Entry>> subsubdirs = new LinkedHashMap<String, List<Entry>>();
parseAttributesForKnownElements(subsubdirs, node);
if (!subsubdirs.isEmpty()) {
List<Entry> entries = new ArrayList<>(subsubdirs.size());
for (Map.Entry<String, List<Entry>> entry : subsubdirs.entrySet()) {
entries.addAll(entry.getValue());
}
value = new RDFDescription(entries);
}
else {
value = getChildTextValue(node);
}
}
dir.add(new XMPEntry(node.getNamespaceURI() + node.getLocalName(), node.getLocalName(), value));
}
}
List<Directory> entries = new ArrayList<Directory>(subdirs.size());
// TODO: Should we still allow asking for a subdirectory by item id?
for (Map.Entry<String, List<Entry>> entry : subdirs.entrySet()) {
entries.add(new RDFDescription(entry.getKey(), entry.getValue()));
}
return new XMPDirectory(entries, toolkit);
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2021-23792
- Severity: HIGH
- CVSS Score: 7.5
Description: Avoid fetching external resources in XMPReader.
Function: parseDirectories
File: imageio/imageio-metadata/src/main/java/com/twelvemonkeys/imageio/metadata/xmp/XMPReader.java
Repository: haraldk/TwelveMonkeys
Fixed Code:
private XMPDirectory parseDirectories(final Node pParentNode, NodeList pNodes, String toolkit) {
Map<String, List<Entry>> subdirs = new LinkedHashMap<>();
for (Node desc : asIterable(pNodes)) {
if (desc.getParentNode() != pParentNode) {
continue;
}
// Support attribute short-hand syntax
parseAttributesForKnownElements(subdirs, desc);
for (Node node : asIterable(desc.getChildNodes())) {
if (node.getNodeType() != Node.ELEMENT_NODE) {
continue;
}
// Lookup
List<Entry> dir = subdirs.get(node.getNamespaceURI());
if (dir == null) {
dir = new ArrayList<>();
subdirs.put(node.getNamespaceURI(), dir);
}
Object value;
if (isResourceType(node)) {
value = parseAsResource(node);
}
else {
// TODO: This method contains loads of duplication an should be cleaned up...
// Support attribute short-hand syntax
Map<String, List<Entry>> subsubdirs = new LinkedHashMap<>();
parseAttributesForKnownElements(subsubdirs, node);
if (!subsubdirs.isEmpty()) {
List<Entry> entries = new ArrayList<>(subsubdirs.size());
for (Map.Entry<String, List<Entry>> entry : subsubdirs.entrySet()) {
entries.addAll(entry.getValue());
}
value = new RDFDescription(entries);
}
else {
value = getChildTextValue(node);
}
}
dir.add(new XMPEntry(node.getNamespaceURI() + node.getLocalName(), node.getLocalName(), value));
}
}
List<Directory> entries = new ArrayList<>(subdirs.size());
// TODO: Should we still allow asking for a subdirectory by item id?
for (Map.Entry<String, List<Entry>> entry : subdirs.entrySet()) {
entries.add(new RDFDescription(entry.getKey(), entry.getValue()));
}
return new XMPDirectory(entries, toolkit);
}
|
[
"CWE-611"
] |
CVE-2021-23792
|
HIGH
| 7.5
|
haraldk/TwelveMonkeys
|
parseDirectories
|
imageio/imageio-metadata/src/main/java/com/twelvemonkeys/imageio/metadata/xmp/XMPReader.java
|
da4efe98bf09e1cce91b7633cb251958a200fc80
| 1
|
Analyze the following code function for security vulnerabilities
|
private void deleteXWikiDoc(XWikiDocument doc, XWikiContext inputxcontext, boolean bTransaction)
throws XWikiException
{
XWikiContext context = getExecutionXContext(inputxcontext, true);
try {
MonitorPlugin monitor = Util.getMonitorPlugin(context);
try {
// Start monitoring timer
if (monitor != null) {
monitor.startTimer(HINT);
}
checkHibernate(context);
SessionFactory sfactory = injectCustomMappingsInSessionFactory(doc, context);
if (bTransaction) {
bTransaction = beginTransaction(sfactory, context);
}
try {
Session session = getSession(context);
session.setHibernateFlushMode(FlushMode.COMMIT);
if (doc.getStore() == null) {
Object[] args = {doc.getDocumentReference()};
throw new XWikiException(XWikiException.MODULE_XWIKI_STORE,
XWikiException.ERROR_XWIKI_STORE_HIBERNATE_CANNOT_DELETE_UNLOADED_DOC,
"Impossible to delete document {0} if it is not loaded", null, args);
}
// Let's delete any attachment this document might have
for (XWikiAttachment attachment : doc.getAttachmentList()) {
XWikiAttachmentStoreInterface store = getXWikiAttachmentStoreInterface(attachment);
store.deleteXWikiAttachment(attachment, false, context, false);
}
// deleting XWikiLinks
if (context.getWiki().hasBacklinks(context)) {
deleteLinks(doc.getId(), context, true);
}
// Find the list of classes for which we have an object
// Remove properties planned for removal
if (!doc.getXObjectsToRemove().isEmpty()) {
for (BaseObject bobj : doc.getXObjectsToRemove()) {
if (bobj != null) {
deleteXWikiCollection(bobj, context, false, false);
}
}
doc.setXObjectsToRemove(new ArrayList<BaseObject>());
}
for (List<BaseObject> objects : doc.getXObjects().values()) {
for (BaseObject obj : objects) {
if (obj != null) {
deleteXWikiCollection(obj, context, false, false);
}
}
}
context.getWiki().getVersioningStore().deleteArchive(doc, false, context);
session.delete(doc);
// We need to ensure that the deleted document becomes the original document
doc.setOriginalDocument(doc.clone());
// Update space table if needed
maybeDeleteXWikiSpace(doc, session);
if (bTransaction) {
endTransaction(context, true);
}
} finally {
if (bTransaction) {
try {
endTransaction(context, false);
} catch (Exception e) {
}
}
}
} catch (Exception e) {
Object[] args = {doc.getDocumentReference()};
throw new XWikiException(XWikiException.MODULE_XWIKI_STORE,
XWikiException.ERROR_XWIKI_STORE_HIBERNATE_DELETING_DOC, "Exception while deleting document {0}", e,
args);
} finally {
// End monitoring timer
if (monitor != null) {
monitor.endTimer(HINT);
}
}
} finally {
restoreExecutionXContext();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deleteXWikiDoc
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-459"
] |
CVE-2023-36468
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
deleteXWikiDoc
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
|
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
| 0
|
Analyze the following code function for security vulnerabilities
|
private void onWikiDeletedEvent(WikiDeletedEvent event)
{
this.initializedWikis.remove(event.getWikiId());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onWikiDeletedEvent
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
|
onWikiDeletedEvent
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setFaweExceptionArray(final boolean[] faweExceptionReasonsUsed) {
this.faweExceptionReasonsUsed = faweExceptionReasonsUsed;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setFaweExceptionArray
File: worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/SingleThreadQueueExtent.java
Repository: IntellectualSites/FastAsyncWorldEdit
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-35925
|
MEDIUM
| 5.5
|
IntellectualSites/FastAsyncWorldEdit
|
setFaweExceptionArray
|
worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/SingleThreadQueueExtent.java
|
3a8dfb4f7b858a439c35f7af1d56d21f796f61f5
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void saveLock(XWikiLock lock, XWikiContext inputxcontext, boolean bTransaction) throws XWikiException
{
executeWrite(inputxcontext, session -> {
try {
Query<Long> query = session
.createQuery("select lock.docId from XWikiLock as lock where lock.docId = :docId", Long.class);
query.setParameter("docId", lock.getDocId());
if (query.uniqueResult() == null) {
session.save(lock);
} else {
session.update(lock);
}
} catch (Exception e) {
throw new XWikiException(XWikiException.MODULE_XWIKI_STORE,
XWikiException.ERROR_XWIKI_STORE_HIBERNATE_SAVING_LOCK,
String.format("Exception while locking document for lock [%s]", lock.toString()), e);
}
return null;
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: saveLock
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-459"
] |
CVE-2023-36468
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
saveLock
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
|
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
| 0
|
Analyze the following code function for security vulnerabilities
|
public static PersistableBundle forPair(String key, String value) {
PersistableBundle b = new PersistableBundle(1);
b.putString(key, value);
return b;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: forPair
File: core/java/android/os/PersistableBundle.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40074
|
MEDIUM
| 5.5
|
android
|
forPair
|
core/java/android/os/PersistableBundle.java
|
40e4ea759743737958dde018f3606d778f7a53f3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getRealAssetPath(String inode, String fileName) {
String extension = UtilMethods.getFileExtension(fileName);
String fileNameWOExtenstion = UtilMethods.getFileName(fileName);
return getRealAssetPath(inode, fileNameWOExtenstion, extension);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRealAssetPath
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
|
getRealAssetPath
|
dotCMS/src/main/java/com/dotmarketing/portlets/fileassets/business/FileAssetAPIImpl.java
|
ab2bb2e00b841d131b8734227f9106e3ac31bb99
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean updateSecureSetting(String name, String value, int requestingUserId,
boolean forceNotify) {
if (DEBUG) {
Slog.v(LOG_TAG, "updateSecureSetting(" + name + ", " + value + ", "
+ requestingUserId + ")");
}
return mutateSecureSetting(name, value, requestingUserId, MUTATION_OPERATION_UPDATE,
forceNotify);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateSecureSetting
File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3876
|
HIGH
| 7.2
|
android
|
updateSecureSetting
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
91fc934bb2e5ea59929bb2f574de6db9b5100745
| 0
|
Analyze the following code function for security vulnerabilities
|
public void updateObject(String columnLabel, @Nullable Object x, java.sql.SQLType targetSqlType)
throws SQLException {
throw org.postgresql.Driver.notImplemented(this.getClass(), "updateObject");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateObject
File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
Repository: pgjdbc
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-31197
|
HIGH
| 8
|
pgjdbc
|
updateObject
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
@GetMapping("{journalId:\\d+}/comments/list_view")
@ApiOperation("Lists comment with list view")
public Page<BaseCommentWithParentVO> listComments(@PathVariable("journalId") Integer journalId,
@RequestParam(name = "page", required = false, defaultValue = "0") int page,
@SortDefault(sort = "createTime", direction = DESC) Sort sort) {
Page<BaseCommentWithParentVO> result = journalCommentService.pageWithParentVoBy(journalId, PageRequest.of(page, optionService.getCommentPageSize(), sort));
return journalCommentService.filterIpAddress(result);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: listComments
File: src/main/java/run/halo/app/controller/content/api/JournalController.java
Repository: halo-dev/halo
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-19007
|
LOW
| 3.5
|
halo-dev/halo
|
listComments
|
src/main/java/run/halo/app/controller/content/api/JournalController.java
|
d6b3d6cb5d681c7d8d64fd48de6c7c99b696bb8b
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setForcedDisplayDensityLocked(DisplayContent displayContent, int density) {
Slog.i(TAG, "Using new display density: " + density);
synchronized(displayContent.mDisplaySizeLock) {
displayContent.mBaseDisplayDensity = density;
}
reconfigureDisplayLocked(displayContent);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setForcedDisplayDensityLocked
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
|
setForcedDisplayDensityLocked
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
private BufferedReader getResource(final String name) {
return new BufferedReader(
new InputStreamReader(this.getClass().getResourceAsStream(name))
);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getResource
File: src/test/java/org/bedework/webdav/servlet/common/TestPostRequestPars.java
Repository: Bedework/bw-webdav
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-20000
|
MEDIUM
| 5
|
Bedework/bw-webdav
|
getResource
|
src/test/java/org/bedework/webdav/servlet/common/TestPostRequestPars.java
|
67283fb8b9609acdb1a8d2e7fefe195b4a261062
| 0
|
Analyze the following code function for security vulnerabilities
|
int getRootTaskId() {
return task != null ? task.getRootTaskId() : INVALID_TASK_ID;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRootTaskId
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
|
getRootTaskId
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
public void engineSetMode(String mode)
throws NoSuchAlgorithmException
{
String modeName = Strings.toUpperCase(mode);
if (modeName.equals("NONE"))
{
dhaesMode = false;
}
else if (modeName.equals("DHAES"))
{
dhaesMode = true;
}
else
{
throw new IllegalArgumentException("can't support mode " + mode);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: engineSetMode
File: prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/ec/IESCipher.java
Repository: bcgit/bc-java
The code follows secure coding practices.
|
[
"CWE-361"
] |
CVE-2016-1000345
|
MEDIUM
| 4.3
|
bcgit/bc-java
|
engineSetMode
|
prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/ec/IESCipher.java
|
21dcb3d9744c83dcf2ff8fcee06dbca7bfa4ef35
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public ServerBuilder decoratorUnder(String prefix,
Function<? super HttpService, ? extends HttpService> decorator) {
virtualHostTemplate.decoratorUnder(prefix, decorator);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: decoratorUnder
File: core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-44487
|
HIGH
| 7.5
|
line/armeria
|
decoratorUnder
|
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
|
df7f85824a62e997b910b5d6194a3335841065fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public void triggerPopup(final AwContents parentAwContents,
TestAwContentsClient parentAwContentsClient, TestWebServer testWebServer,
String mainHtml, String popupHtml, String popupPath, String triggerScript)
throws Exception {
enableJavaScriptOnUiThread(parentAwContents);
getInstrumentation().runOnMainSync(new Runnable() {
@Override
public void run() {
parentAwContents.getSettings().setSupportMultipleWindows(true);
parentAwContents.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
}
});
final String parentUrl = testWebServer.setResponse("/popupParent.html", mainHtml, null);
if (popupHtml != null) {
testWebServer.setResponse(popupPath, popupHtml, null);
} else {
testWebServer.setResponseWithNoContentStatus(popupPath);
}
parentAwContentsClient.getOnCreateWindowHelper().setReturnValue(true);
loadUrlSync(parentAwContents, parentAwContentsClient.getOnPageFinishedHelper(), parentUrl);
TestAwContentsClient.OnCreateWindowHelper onCreateWindowHelper =
parentAwContentsClient.getOnCreateWindowHelper();
int currentCallCount = onCreateWindowHelper.getCallCount();
parentAwContents.evaluateJavaScriptForTests(triggerScript, null);
onCreateWindowHelper.waitForCallback(
currentCallCount, 1, WAIT_TIMEOUT_MS, TimeUnit.MILLISECONDS);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: triggerPopup
File: android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-254"
] |
CVE-2016-5155
|
MEDIUM
| 4.3
|
chromium
|
triggerPopup
|
android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java
|
b8dcfeb065bbfd777cdc5f5433da9a87f25e6ec6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public T setInt(K name, int value) {
return set(name, fromInt(name, value));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setInt
File: codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-436",
"CWE-113"
] |
CVE-2022-41915
|
MEDIUM
| 6.5
|
netty
|
setInt
|
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
|
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean isInformational(@Nullable String statusText) {
return statusText != null && !statusText.isEmpty() && statusText.charAt(0) == '1';
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isInformational
File: core/src/main/java/com/linecorp/armeria/internal/ArmeriaHttpUtil.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2019-16771
|
MEDIUM
| 5
|
line/armeria
|
isInformational
|
core/src/main/java/com/linecorp/armeria/internal/ArmeriaHttpUtil.java
|
b597f7a865a527a84ee3d6937075cfbb4470ed20
| 0
|
Analyze the following code function for security vulnerabilities
|
@TestApi
@NonNull
@RequiresPermission(Manifest.permission.GET_APP_OPS_STATS)
public List<PermissionGroupUsage> getIndicatorAppOpUsageData() {
return getIndicatorAppOpUsageData(new AudioManager().isMicrophoneMute());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getIndicatorAppOpUsageData
File: core/java/android/permission/PermissionManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-281"
] |
CVE-2023-21249
|
MEDIUM
| 5.5
|
android
|
getIndicatorAppOpUsageData
|
core/java/android/permission/PermissionManager.java
|
c00b7e7dbc1fa30339adef693d02a51254755d7f
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void zipFoldersPreserveStream(final File folder, final ZipOutputStream zipOutputStream, final File assets, final Collection<String> doNotCompress)
throws BrutException, IOException {
mDoNotCompress = doNotCompress;
zipFolders(folder, zipOutputStream);
// We manually set the assets because we need to retain the folder structure
if (assets != null) {
processFolder(assets, zipOutputStream, assets.getPath().length() - 6);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: zipFoldersPreserveStream
File: brut.j.dir/src/main/java/brut/directory/ZipUtils.java
Repository: iBotPeaches/Apktool
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2024-21633
|
HIGH
| 7.8
|
iBotPeaches/Apktool
|
zipFoldersPreserveStream
|
brut.j.dir/src/main/java/brut/directory/ZipUtils.java
|
d348c43b24a9de350ff6e5bd610545a10c1fc712
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setLockScreenDisabled(boolean disable, int userId) {
setBoolean(DISABLE_LOCKSCREEN_KEY, disable, userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setLockScreenDisabled
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
|
setLockScreenDisabled
|
core/java/com/android/internal/widget/LockPatternUtils.java
|
96daf7d4893f614714761af2d53dfb93214a32e4
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean waitUntilOperationComplete(int token) {
if (MORE_DEBUG) Slog.i(TAG, "Blocking until operation complete for "
+ Integer.toHexString(token));
int finalState = OP_PENDING;
Operation op = null;
synchronized (mCurrentOpLock) {
while (true) {
op = mCurrentOperations.get(token);
if (op == null) {
// mysterious disappearance: treat as success with no callback
break;
} else {
if (op.state == OP_PENDING) {
try {
mCurrentOpLock.wait();
} catch (InterruptedException e) {}
// When the wait is notified we loop around and recheck the current state
} else {
// No longer pending; we're done
finalState = op.state;
break;
}
}
}
}
mBackupHandler.removeMessages(MSG_TIMEOUT);
if (MORE_DEBUG) Slog.v(TAG, "operation " + Integer.toHexString(token)
+ " complete: finalState=" + finalState);
return finalState == OP_ACKNOWLEDGED;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: waitUntilOperationComplete
File: services/backup/java/com/android/server/backup/BackupManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3759
|
MEDIUM
| 5
|
android
|
waitUntilOperationComplete
|
services/backup/java/com/android/server/backup/BackupManagerService.java
|
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean getIssuedOnInUse() {
return issuedOnInUse;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getIssuedOnInUse
File: base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
getIssuedOnInUse
|
base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getNotEqualsToConditionSQL(String column, Object param) {
if (param == null) {
return getNotNullConditionSQL(column);
} else {
String paramStr = getParameterSQL(param);
return column + " <> " + paramStr;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNotEqualsToConditionSQL
File: dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java
Repository: dashbuilder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-4999
|
HIGH
| 7.5
|
dashbuilder
|
getNotEqualsToConditionSQL
|
dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java
|
8574899e3b6455547b534f570b2330ff772e524b
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean isBae() {
String value = System.getenv("SERVER_SOFTWARE");
return value != null && value.startsWith("bae");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isBae
File: common/src/main/java/com/zrlog/util/ZrLogUtil.java
Repository: 94fzb/zrlog
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-16643
|
LOW
| 3.5
|
94fzb/zrlog
|
isBae
|
common/src/main/java/com/zrlog/util/ZrLogUtil.java
|
4a91c83af669e31a22297c14f089d8911d353fa1
| 0
|
Analyze the following code function for security vulnerabilities
|
private String formatDate(Date date, int paddingType) {
String s = CalendarUtils.getUTCDateFormat().format(date);
if (paddingType == 1) s += ParseHelper.FULL_TIME;
else if (paddingType == 2) s += ParseHelper.ZERO_TIME;
return s;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: formatDate
File: src/main/java/com/rebuild/core/service/query/AdvFilterParser.java
Repository: getrebuild/rebuild
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2023-1495
|
MEDIUM
| 6.5
|
getrebuild/rebuild
|
formatDate
|
src/main/java/com/rebuild/core/service/query/AdvFilterParser.java
|
c9474f84e5f376dd2ade2078e3039961a9425da7
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void removeUser(String username, APIManagerConfiguration config, String serverURL)
throws RemoteException,
UserAdminUserAdminException {
UserAdminStub userAdminStub = new UserAdminStub(null, serverURL + "UserAdmin");
String adminUsername = config.getFirstProperty(APIConstants.AUTH_MANAGER_USERNAME);
String adminPassword = config.getFirstProperty(APIConstants.AUTH_MANAGER_PASSWORD);
CarbonUtils.setBasicAccessSecurityHeaders(adminUsername, adminPassword, userAdminStub._getServiceClient());
userAdminStub.deleteUser(username);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeUser
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
|
removeUser
|
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
|
protected String getStringValue(Node node)
{
String value = node.getNodeValue();
if (node.hasChildNodes())
{
Node first = node.getFirstChild();
if (first.getNodeType() == Node.TEXT_NODE)
{
return first.getNodeValue();
}
}
return value;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStringValue
File: dspace-api/src/main/java/org/dspace/app/itemimport/ItemImportServiceImpl.java
Repository: DSpace
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-31195
|
HIGH
| 7.2
|
DSpace
|
getStringValue
|
dspace-api/src/main/java/org/dspace/app/itemimport/ItemImportServiceImpl.java
|
7af52a0883a9dbc475cf3001f04ed11b24c8a4c0
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean isZipOrJarFile(Path path) {
return isZipFile(path) || isJarFile(path);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isZipOrJarFile
File: pf4j/src/main/java/org/pf4j/util/FileUtils.java
Repository: pf4j
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2023-40827
|
HIGH
| 7.5
|
pf4j
|
isZipOrJarFile
|
pf4j/src/main/java/org/pf4j/util/FileUtils.java
|
ed9392069fe14c6c30d9f876710e5ad40f7ea8c1
| 0
|
Analyze the following code function for security vulnerabilities
|
private static boolean isJson(String contents) {
return contents.toString().trim().startsWith("{");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isJson
File: modules/swagger-parser/src/main/java/io/swagger/parser/util/DeserializationUtils.java
Repository: swagger-api/swagger-parser
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2017-1000207
|
MEDIUM
| 6.8
|
swagger-api/swagger-parser
|
isJson
|
modules/swagger-parser/src/main/java/io/swagger/parser/util/DeserializationUtils.java
|
4c6584306b40de9b2dfa9065c3a438cd918534af
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getLaunchActivityType() {
return mLaunchActivityType;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLaunchActivityType
File: core/java/android/app/ActivityOptions.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-20918
|
CRITICAL
| 9.8
|
android
|
getLaunchActivityType
|
core/java/android/app/ActivityOptions.java
|
51051de4eb40bb502db448084a83fd6cbfb7d3cf
| 0
|
Analyze the following code function for security vulnerabilities
|
private String[] getJabberID(String from) {
if(from.contains("/")) {
String[] res = from.split("/", 2);
return new String[] { res[0], res[1] };
} else {
return new String[] {from, ""};
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getJabberID
File: src/org/yaxim/androidclient/service/SmackableImp.java
Repository: ge0rg/yaxim
The code follows secure coding practices.
|
[
"CWE-20",
"CWE-346"
] |
CVE-2017-5589
|
MEDIUM
| 4.3
|
ge0rg/yaxim
|
getJabberID
|
src/org/yaxim/androidclient/service/SmackableImp.java
|
65a38dc77545d9568732189e86089390f0ceaf9f
| 0
|
Analyze the following code function for security vulnerabilities
|
private List<Object> resultSearch(String sqlWhere, Entity entity, int maxResults) {
Field nameField = entity.getNameField();
String sql = MessageFormat.format("select {0},{1} from {2} where {3}",
entity.getPrimaryField().getName(), nameField.getName(), entity.getName(), sqlWhere);
if (!sqlWhere.contains(" order by ")) {
DisplayType dt = EasyMetaFactory.getDisplayType(nameField);
if (dt != DisplayType.ID) {
sql += " order by " + nameField.getName();
} else if (entity.containsField(EntityHelper.ModifiedOn)) {
sql += " order by modifiedOn desc";
}
}
Object[][] array = QueryHelper.createQuery(sql, entity).setLimit(maxResults).array();
List<Object> result = new ArrayList<>();
for (Object[] o : array) {
ID recordId = (ID) o[0];
if (MetadataHelper.isBizzEntity(entity)
&& (!UserHelper.isActive(recordId) || recordId.equals(UserService.SYSTEM_USER))) {
continue;
}
String label = (String) FieldValueHelper.wrapFieldValue(o[1], nameField, true);
if (StringUtils.isBlank(label)) {
label = FieldValueHelper.NO_LABEL_PREFIX + recordId.toLiteral().toUpperCase();
}
result.add(FieldValueHelper.wrapMixValue(recordId, label));
}
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resultSearch
File: src/main/java/com/rebuild/web/general/ReferenceSearchController.java
Repository: getrebuild/rebuild
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2023-1495
|
MEDIUM
| 6.5
|
getrebuild/rebuild
|
resultSearch
|
src/main/java/com/rebuild/web/general/ReferenceSearchController.java
|
c9474f84e5f376dd2ade2078e3039961a9425da7
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void putIfNotNullAndAmqpType(Map<String, Object> hdrs, String key, Object val) {
if (val!=null)
if ( val instanceof String
|| val instanceof Integer
|| val instanceof Float
|| val instanceof Double
|| val instanceof Long
|| val instanceof Short
|| val instanceof Byte
)
hdrs.put(key, val);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: putIfNotNullAndAmqpType
File: src/main/java/com/rabbitmq/jms/client/RMQMessage.java
Repository: rabbitmq/rabbitmq-jms-client
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2020-36282
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-jms-client
|
putIfNotNullAndAmqpType
|
src/main/java/com/rabbitmq/jms/client/RMQMessage.java
|
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String getNullRepresentation() {
return nullRepresentation;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNullRepresentation
File: server/src/main/java/com/vaadin/ui/Grid.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-25028
|
MEDIUM
| 4.3
|
vaadin/framework
|
getNullRepresentation
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getFilename() {
return StringUtils.getFilename(this.path);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFilename
File: src/main/java/spark/resource/ClassPathResource.java
Repository: perwendel/spark
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-9159
|
MEDIUM
| 5
|
perwendel/spark
|
getFilename
|
src/main/java/spark/resource/ClassPathResource.java
|
a221a864db28eb736d36041df2fa6eb8839fc5cd
| 0
|
Analyze the following code function for security vulnerabilities
|
private @Nullable InstanceId getSessionId() {
return mSessionTracker.getSessionId(SESSION_KEYGUARD);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSessionId
File: packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21245
|
HIGH
| 7.8
|
android
|
getSessionId
|
packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java
|
a33159e8cb297b9eee6fa5c63c0e343d05fad622
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void copyLocalResource(String resourceName, File dest) {
try {
copy(CreateResources.class.getResourceAsStream(resourceName), dest);
} catch (Exception e) {
logger.error("Exception while copying " + resourceName + " - " + e.getMessage());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: copyLocalResource
File: src/main/java/widoco/WidocoUtils.java
Repository: dgarijo/Widoco
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-4772
|
HIGH
| 7.8
|
dgarijo/Widoco
|
copyLocalResource
|
src/main/java/widoco/WidocoUtils.java
|
f2279b76827f32190adfa9bd5229b7d5a147fa92
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getEditor()
{
String editor = getStringValue("editor").toLowerCase();
if (EditorType.getByValue(editor) == null) {
EditorType compatibleEditor = getEditorType(getContentType(), null);
if (compatibleEditor != null) {
return compatibleEditor.value.toLowerCase();
}
}
return editor;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getEditor
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/objects/classes/TextAreaClass.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-41046
|
MEDIUM
| 6.3
|
xwiki/xwiki-platform
|
getEditor
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/objects/classes/TextAreaClass.java
|
edc52579eeaab1b4514785c134044671a1ecd839
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
@Override
public void requestBugReport(int bugreportType) {
String extraOptions = null;
switch (bugreportType) {
case ActivityManager.BUGREPORT_OPTION_FULL:
// Default options.
break;
case ActivityManager.BUGREPORT_OPTION_INTERACTIVE:
extraOptions = "bugreportplus";
break;
case ActivityManager.BUGREPORT_OPTION_REMOTE:
extraOptions = "bugreportremote";
break;
case ActivityManager.BUGREPORT_OPTION_WEAR:
extraOptions = "bugreportwear";
break;
case ActivityManager.BUGREPORT_OPTION_TELEPHONY:
extraOptions = "bugreporttelephony";
break;
case ActivityManager.BUGREPORT_OPTION_WIFI:
extraOptions = "bugreportwifi";
break;
default:
throw new IllegalArgumentException("Provided bugreport type is not correct, value: "
+ bugreportType);
}
// Always log caller, even if it does not have permission to dump.
String type = extraOptions == null ? "bugreport" : extraOptions;
Slog.i(TAG, type + " requested by UID " + Binder.getCallingUid());
enforceCallingPermission(android.Manifest.permission.DUMP, "requestBugReport");
if (extraOptions != null) {
SystemProperties.set("dumpstate.options", extraOptions);
}
SystemProperties.set("ctl.start", "bugreport");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: requestBugReport
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
|
requestBugReport
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
private void correctContentTypeHeaderEncoding(String encoding) {
String contentType = getContentType();
if (contentType != null) {
StringBuffer remainderHeader = new StringBuffer();
getCharsetFromContentTypeHeader(contentType, remainderHeader);
if (remainderHeader.length() != 0) {
forceHeader(CONTENT_TYPE_HEADER, remainderHeader + ";charset=" + encoding);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: correctContentTypeHeaderEncoding
File: src/java/winstone/WinstoneResponse.java
Repository: jenkinsci/winstone
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2011-4344
|
LOW
| 2.6
|
jenkinsci/winstone
|
correctContentTypeHeaderEncoding
|
src/java/winstone/WinstoneResponse.java
|
410ed3001d51c689cf59085b7417466caa2ded7b
| 0
|
Analyze the following code function for security vulnerabilities
|
@CallSuper
@Override
public void dumpDebug(ProtoOutputStream proto, long fieldId,
@WindowTraceLogLevel int logLevel) {
boolean isVisible = isVisible();
if (logLevel == WindowTraceLogLevel.CRITICAL && !isVisible) {
return;
}
final long token = proto.start(fieldId);
super.dumpDebug(proto, WINDOW_CONTAINER, logLevel);
proto.write(DISPLAY_ID, getDisplayId());
proto.write(STACK_ID, getRootTaskId());
mAttrs.dumpDebug(proto, ATTRIBUTES);
mGivenContentInsets.dumpDebug(proto, GIVEN_CONTENT_INSETS);
mWindowFrames.dumpDebug(proto, WINDOW_FRAMES);
mAttrs.surfaceInsets.dumpDebug(proto, SURFACE_INSETS);
dumpPointProto(mSurfacePosition, proto, SURFACE_POSITION);
mWinAnimator.dumpDebug(proto, ANIMATOR);
proto.write(ANIMATING_EXIT, mAnimatingExit);
proto.write(REQUESTED_WIDTH, mRequestedWidth);
proto.write(REQUESTED_HEIGHT, mRequestedHeight);
proto.write(VIEW_VISIBILITY, mViewVisibility);
proto.write(HAS_SURFACE, mHasSurface);
proto.write(IS_READY_FOR_DISPLAY, isReadyForDisplay());
proto.write(REMOVE_ON_EXIT, mRemoveOnExit);
proto.write(DESTROYING, mDestroying);
proto.write(REMOVED, mRemoved);
proto.write(IS_ON_SCREEN, isOnScreen());
proto.write(IS_VISIBLE, isVisible);
proto.write(PENDING_SEAMLESS_ROTATION, mPendingSeamlessRotate != null);
proto.write(FORCE_SEAMLESS_ROTATION, mForceSeamlesslyRotate);
proto.write(HAS_COMPAT_SCALE, hasCompatScale());
proto.write(GLOBAL_SCALE, mGlobalScale);
for (Rect r : mKeepClearAreas) {
r.dumpDebug(proto, KEEP_CLEAR_AREAS);
}
for (Rect r : mUnrestrictedKeepClearAreas) {
r.dumpDebug(proto, UNRESTRICTED_KEEP_CLEAR_AREAS);
}
proto.end(token);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpDebug
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
|
dumpDebug
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
private MonitoringFilter validateEventItemFilter(
Object filterObject,
AttributeGroup attributeGroup
) throws UaException {
if (filterObject instanceof MonitoringFilter) {
if (!(filterObject instanceof EventFilter)) {
throw new UaException(StatusCodes.Bad_FilterNotAllowed);
}
return (EventFilter) filterObject;
} else {
throw new UaException(StatusCodes.Bad_MonitoredItemFilterInvalid);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: validateEventItemFilter
File: opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/subscriptions/SubscriptionManager.java
Repository: eclipse/milo
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2022-25897
|
HIGH
| 7.5
|
eclipse/milo
|
validateEventItemFilter
|
opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/subscriptions/SubscriptionManager.java
|
4534381760d7d9f0bf00cbf6a8449bb0d13c6ce5
| 0
|
Analyze the following code function for security vulnerabilities
|
private long addEscrowToken(byte[] token, long currentPasswordTokenHandle, int userId) {
resetEscrowToken(currentPasswordTokenHandle, userId);
return mInjector.binderWithCleanCallingIdentity(() -> mLockPatternUtils.addEscrowToken(
token, userId, /* EscrowTokenStateChangeCallback= */ null));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addEscrowToken
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
addEscrowToken
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
protected abstract void execute() throws ArchiverException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: execute
File: src/main/java/org/codehaus/plexus/archiver/AbstractUnArchiver.java
Repository: codehaus-plexus/plexus-archiver
The code follows secure coding practices.
|
[
"CWE-22",
"CWE-61"
] |
CVE-2023-37460
|
CRITICAL
| 9.8
|
codehaus-plexus/plexus-archiver
|
execute
|
src/main/java/org/codehaus/plexus/archiver/AbstractUnArchiver.java
|
54759839fbdf85caf8442076f001d5fd64e0dcb2
| 0
|
Analyze the following code function for security vulnerabilities
|
protected TestDependencyFactory createTestDependencyFactory() {
return new TestDependencyFactory();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createTestDependencyFactory
File: android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-254"
] |
CVE-2016-5155
|
MEDIUM
| 4.3
|
chromium
|
createTestDependencyFactory
|
android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java
|
b8dcfeb065bbfd777cdc5f5433da9a87f25e6ec6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public void setDefaultLanguage(String defaultLanguage)
{
setDefaultLocale(LocaleUtils.toLocale(defaultLanguage, Locale.ROOT));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDefaultLanguage
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
|
setDefaultLanguage
|
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
|
@Override
public void shutdown() {
if (shutdownHandler != null) {
shutdownHandler.shutdown();
} else {
stopAll();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: shutdown
File: h2/src/main/org/h2/tools/Server.java
Repository: h2database
The code follows secure coding practices.
|
[
"CWE-312"
] |
CVE-2022-45868
|
HIGH
| 7.8
|
h2database
|
shutdown
|
h2/src/main/org/h2/tools/Server.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 0
|
Analyze the following code function for security vulnerabilities
|
protected static Node getChildByAttribute(Node node, String attributeName, String attributeValue) {
NodeList children = node.getChildNodes();
NamedNodeMap attribs = node.getAttributes();
Node attribute = null;
// this node matches
if (attribs != null && (attribute = attribs.getNamedItem(attributeName)) != null
&& attribute.getNodeValue().equals(attributeValue))
return node;
// search children
for (int i = 0; i < children.getLength(); i++) {
Node found = getChildByAttribute(children.item(i), attributeName, attributeValue);
if (found != null)
return found;
}
// failed
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getChildByAttribute
File: src/edu/stanford/nlp/ie/machinereading/common/DomReader.java
Repository: stanfordnlp/CoreNLP
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-3878
|
HIGH
| 7.5
|
stanfordnlp/CoreNLP
|
getChildByAttribute
|
src/edu/stanford/nlp/ie/machinereading/common/DomReader.java
|
e5bbe135a02a74b952396751ed3015e8b8252e99
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated(since = "2.2M2")
public void setDBStringListValue(String className, String fieldName, List value)
{
setDBStringListValue(
getXClassEntityReferenceResolver().resolve(className, EntityType.DOCUMENT, getDocumentReference()),
fieldName, value);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDBStringListValue
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2023-29523
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
setDBStringListValue
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
0d547181389f7941e53291af940966413823f61c
| 0
|
Analyze the following code function for security vulnerabilities
|
private List<Notification.Action> buildSmartActions(
List<Notification.Action> actions, Context context) {
List<Notification.Action> broadcastActions = new ArrayList<>();
for (Notification.Action action : actions) {
// Proxy smart actions through {@link SmartActionsReceiver} for logging smart actions.
Bundle extras = action.getExtras();
String actionType = extras.getString(
ScreenshotNotificationSmartActionsProvider.ACTION_TYPE,
ScreenshotNotificationSmartActionsProvider.DEFAULT_ACTION_TYPE);
Intent intent = new Intent(context, SmartActionsReceiver.class)
.putExtra(ScreenshotController.EXTRA_ACTION_INTENT, action.actionIntent)
.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
addIntentExtras(mScreenshotId, intent, actionType, mSmartActionsEnabled);
PendingIntent broadcastIntent = PendingIntent.getBroadcast(context,
mRandom.nextInt(),
intent,
PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_IMMUTABLE);
broadcastActions.add(new Notification.Action.Builder(action.getIcon(), action.title,
broadcastIntent).setContextual(true).addExtras(extras).build());
}
return broadcastActions;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: buildSmartActions
File: packages/SystemUI/src/com/android/systemui/screenshot/SaveImageInBackgroundTask.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35676
|
HIGH
| 7.8
|
android
|
buildSmartActions
|
packages/SystemUI/src/com/android/systemui/screenshot/SaveImageInBackgroundTask.java
|
109e58b62dc9fedcee93983678ef9d4931e72afa
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getMacAlgorithm() {
return macAlgorithm;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMacAlgorithm
File: ratpack-session/src/main/java/ratpack/session/clientside/ClientSideSessionConfig.java
Repository: ratpack
The code follows secure coding practices.
|
[
"CWE-312"
] |
CVE-2021-29481
|
MEDIUM
| 5
|
ratpack
|
getMacAlgorithm
|
ratpack-session/src/main/java/ratpack/session/clientside/ClientSideSessionConfig.java
|
60302fae7ef26897b9a0ec0def6281a9425344cf
| 0
|
Analyze the following code function for security vulnerabilities
|
private void removeClient(ClientMonitor client) {
if (client != null) {
client.destroy();
if (client != mCurrentClient && mCurrentClient != null) {
Slog.w(TAG, "Unexpected client: " + client.getOwnerString() + "expected: "
+ mCurrentClient != null ? mCurrentClient.getOwnerString() : "null");
}
}
if (mCurrentClient != null) {
if (DEBUG) Slog.v(TAG, "Done with client: " + client.getOwnerString());
mCurrentClient = null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeClient
File: services/core/java/com/android/server/fingerprint/FingerprintService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
removeClient
|
services/core/java/com/android/server/fingerprint/FingerprintService.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
protected ViewGroup getBouncerContainer() {
return mStatusBarWindow;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getBouncerContainer
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
|
getBouncerContainer
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void deleteConference() {
int position = conference_context_id;
final Bookmark bookmark = (Bookmark) conferences.get(position);
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setNegativeButton(R.string.cancel, null);
builder.setTitle(R.string.delete_bookmark);
builder.setMessage(JidDialog.style(this, R.string.remove_bookmark_text, bookmark.getJid().toEscapedString()));
builder.setPositiveButton(R.string.delete, (dialog, which) -> {
bookmark.setConversation(null);
Account account = bookmark.getAccount();
account.getBookmarks().remove(bookmark);
xmppConnectionService.pushBookmarks(account);
filter(mSearchEditText.getText().toString());
});
builder.create().show();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deleteConference
File: src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
deleteConference
|
src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.