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
|
public void probeLink(LinkProbeCallback callback, int mcs) {
String bssid = mWifiInfo.getBSSID();
if (bssid == null) {
Log.w(getTag(), "Attempted to send link probe when not connected!");
callback.onFailure(LinkProbeCallback.LINK_PROBE_ERROR_NOT_CONNECTED);
return;
}
mWifiNative.probeLink(mInterfaceName, MacAddress.fromString(bssid), callback, mcs);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: probeLink
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
|
probeLink
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void removeCell(Object propertyId) {
CELLTYPE cell = cells.remove(propertyId);
if (cell != null) {
Set<CELLTYPE> cellGroupForCell = getCellGroupForCell(cell);
if (cellGroupForCell != null) {
removeCellFromGroup(cell, cellGroupForCell);
} else {
cell.detach();
}
rowState.cells.remove(cell.getCellState());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeCell
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
|
removeCell
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
private void migrate97(File dataDir, Stack<Integer> versions) {
Map<String, String> emailOwners = new HashMap<>();
for (File file: dataDir.listFiles()) {
if (file.getName().startsWith("EmailAddresss.xml")) {
VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file);
for (Element element: dom.getRootElement().elements())
emailOwners.put(element.elementTextTrim("id"), element.elementTextTrim("owner"));
}
}
for (File file: dataDir.listFiles()) {
if (file.getName().startsWith("GpgKeys.xml")) {
VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file);
for (Element element: dom.getRootElement().elements()) {
Element emailAddressElement = element.element("emailAddress");
element.addElement("owner").setText(emailOwners.get(emailAddressElement.getTextTrim()));
emailAddressElement.detach();
}
dom.writeToFile(file, false);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: migrate97
File: server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-338"
] |
CVE-2023-24828
|
HIGH
| 8.8
|
theonedev/onedev
|
migrate97
|
server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
|
d67dd9686897fe5e4ab881d749464aa7c06a68e5
| 0
|
Analyze the following code function for security vulnerabilities
|
public static Materials gitMaterials(String url, String branch) {
return gitMaterials(url, null, branch);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: gitMaterials
File: domain/src/test/java/com/thoughtworks/go/helper/MaterialsMother.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-39309
|
MEDIUM
| 6.5
|
gocd
|
gitMaterials
|
domain/src/test/java/com/thoughtworks/go/helper/MaterialsMother.java
|
691b479f1310034992da141760e9c5d1f5b60e8a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void unbindBackupAgent(ApplicationInfo appInfo) {
if (DEBUG_BACKUP) Slog.v(TAG, "unbindBackupAgent: " + appInfo);
if (appInfo == null) {
Slog.w(TAG, "unbind backup agent for null app");
return;
}
synchronized(this) {
try {
if (mBackupAppName == null) {
Slog.w(TAG, "Unbinding backup agent with no active backup");
return;
}
if (!mBackupAppName.equals(appInfo.packageName)) {
Slog.e(TAG, "Unbind of " + appInfo + " but is not the current backup target");
return;
}
// Not backing this app up any more; reset its OOM adjustment
final ProcessRecord proc = mBackupTarget.app;
updateOomAdjLocked(proc);
// If the app crashed during backup, 'thread' will be null here
if (proc.thread != null) {
try {
proc.thread.scheduleDestroyBackupAgent(appInfo,
compatibilityInfoForPackageLocked(appInfo));
} catch (Exception e) {
Slog.e(TAG, "Exception when unbinding backup agent:");
e.printStackTrace();
}
}
} finally {
mBackupTarget = null;
mBackupAppName = null;
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unbindBackupAgent
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3833
|
MEDIUM
| 4.3
|
android
|
unbindBackupAgent
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
private List<String> makeCommands(DeploymentConfiguration config,
File webpack, File webpackConfig, String nodeExec) {
List<String> command = new ArrayList<>();
command.add(nodeExec);
command.add(webpack.getAbsolutePath());
command.add("--config");
command.add(webpackConfig.getAbsolutePath());
command.add("--port");
command.add(String.valueOf(port));
command.add("--watchDogPort=" + watchDog.get().getWatchDogPort());
command.addAll(Arrays.asList(config
.getStringProperty(SERVLET_PARAMETER_DEVMODE_WEBPACK_OPTIONS,
"-d --inline=false")
.split(" +")));
return command;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: makeCommands
File: flow-server/src/main/java/com/vaadin/flow/server/DevModeHandler.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-36321
|
MEDIUM
| 5
|
vaadin/flow
|
makeCommands
|
flow-server/src/main/java/com/vaadin/flow/server/DevModeHandler.java
|
6ae6460ca4f3a9b50bd46fbf49c807fe67718307
| 0
|
Analyze the following code function for security vulnerabilities
|
public UploadFileResponse getCloudUrl(String contextPath, String uri, String finalFilePath, HttpServletRequest request, AdminTokenVO adminTokenVO) {
UploadFileResponse uploadFileResponse = new UploadFileResponse();
// try push to cloud
Map<String, String[]> map = new HashMap<>();
map.put("fileInfo", new String[]{finalFilePath + "," + uri});
map.put("name", new String[]{"uploadService"});
String url;
try {
List<Map> urls = HttpUtil.getInstance().sendGetRequest(Constants.pluginServer + "/service", map
, new HttpJsonArrayHandle<Map>(), PluginHelper.genHeaderMapByRequest(request, adminTokenVO)).getT();
if (urls != null && !urls.isEmpty()) {
url = (String) urls.get(0).get("url");
if (!url.startsWith("https://") && !url.startsWith("http://")) {
String tUrl = url;
if (!url.startsWith("/")) {
tUrl = "/" + url;
}
url = contextPath + tUrl;
}
} else {
url = contextPath + uri;
}
} catch (Exception e) {
url = contextPath + uri;
LOGGER.error(e);
}
uploadFileResponse.setUrl(url);
return uploadFileResponse;
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2019-16643
- Severity: LOW
- CVSS Score: 3.5
Description: Upgrade jar version & fix #54
Signed-off-by: xiaochun <xchun90@163.com>
Function: getCloudUrl
File: service/src/main/java/com/zrlog/service/UploadService.java
Repository: 94fzb/zrlog
Fixed Code:
public UploadFileResponse getCloudUrl(String contextPath, String uri, String finalFilePath, HttpServletRequest request, AdminTokenVO adminTokenVO) {
UploadFileResponse uploadFileResponse = new UploadFileResponse();
// try push to cloud
Map<String, String[]> map = new HashMap<>();
map.put("fileInfo", new String[]{finalFilePath + "," + uri});
map.put("name", new String[]{"uploadService"});
String url;
try {
List<Map> urls = HttpUtil.getInstance().sendGetRequest(Constants.pluginServer + "/service", map
, new HttpJsonArrayHandle<Map>(), PluginHelper.genHeaderMapByRequest(request, adminTokenVO)).getT();
if (urls != null && !urls.isEmpty()) {
url = (String) urls.get(0).get("url");
if (!url.startsWith("https://") && !url.startsWith("http://")) {
String tUrl = url;
if (!url.startsWith("/")) {
tUrl = "/" + url;
}
url = contextPath + tUrl;
}
} else {
url = contextPath + uri;
}
} catch (Exception e) {
url = contextPath + uri;
LOGGER.error("",e);
}
uploadFileResponse.setUrl(url);
return uploadFileResponse;
}
|
[
"CWE-79"
] |
CVE-2019-16643
|
LOW
| 3.5
|
94fzb/zrlog
|
getCloudUrl
|
service/src/main/java/com/zrlog/service/UploadService.java
|
4a91c83af669e31a22297c14f089d8911d353fa1
| 1
|
Analyze the following code function for security vulnerabilities
|
public void skipPendingBroadcastLocked(int pid) {
final BroadcastRecord br = mPendingBroadcast;
if (br != null && br.curApp.pid == pid) {
br.state = BroadcastRecord.IDLE;
br.nextReceiver = mPendingBroadcastRecvIndex;
mPendingBroadcast = null;
scheduleBroadcastsLocked();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: skipPendingBroadcastLocked
File: services/core/java/com/android/server/am/BroadcastQueue.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3912
|
HIGH
| 9.3
|
android
|
skipPendingBroadcastLocked
|
services/core/java/com/android/server/am/BroadcastQueue.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
public void startIngestAndProcessing(String meetingId) {
String done = recordStatusDir + File.separatorChar + meetingId + ".done";
File doneFile = new File(done);
if (!doneFile.exists()) {
try {
doneFile.createNewFile();
if (!doneFile.exists())
log.error("Failed to create {} file.", done);
} catch (IOException e) {
log.error("Exception occured when trying to create {} file.", done);
}
} else {
log.error("{} file already exists.", done);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startIngestAndProcessing
File: bbb-common-web/src/main/java/org/bigbluebutton/api/RecordingService.java
Repository: bigbluebutton
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-12443
|
HIGH
| 7.5
|
bigbluebutton
|
startIngestAndProcessing
|
bbb-common-web/src/main/java/org/bigbluebutton/api/RecordingService.java
|
b21ca8355a57286a1e6df96984b3a4c57679a463
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void handleSetListening(boolean listening) {
super.handleSetListening(listening);
if (listening) {
mController.setupWalletChangeObservers(mCardRetriever, DEFAULT_PAYMENT_APP_CHANGE);
if (!mController.getWalletClient().isWalletServiceAvailable()
|| !mController.getWalletClient().isWalletFeatureAvailable()) {
Log.i(TAG, "QAW service is unavailable, recreating the wallet client.");
mController.reCreateWalletClient();
}
mController.queryWalletCards(mCardRetriever);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleSetListening
File: packages/SystemUI/src/com/android/systemui/qs/tiles/QuickAccessWalletTile.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21289
|
MEDIUM
| 5.5
|
android
|
handleSetListening
|
packages/SystemUI/src/com/android/systemui/qs/tiles/QuickAccessWalletTile.java
|
7a5e51c918b7097be3c7e669e1825a4d159c4185
| 0
|
Analyze the following code function for security vulnerabilities
|
private String generateKey(String originalFilename) {
int index = originalFilename.lastIndexOf('.');
String suffix = originalFilename.substring(index);
String key = null;
LitemallStorage storageInfo = null;
do {
key = CharUtil.getRandomString(20) + suffix;
storageInfo = litemallStorageService.findByKey(key);
}
while (storageInfo != null);
return key;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: generateKey
File: litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxStorageController.java
Repository: linlinjava/litemall
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-18434
|
MEDIUM
| 5
|
linlinjava/litemall
|
generateKey
|
litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxStorageController.java
|
49ab94d0052672d4fb642505d44b94a18abea332
| 0
|
Analyze the following code function for security vulnerabilities
|
public void browserStop(PeerComponent browserPeer) {
((AndroidImplementation.AndroidBrowserComponent) browserPeer).stop();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: browserStop
File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
browserStop
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@POST
@Path("test/{nodeId}")
@Operation(summary = "Update a Test Element onto a given course", description = "This updates a Test Element onto a given course")
@ApiResponse(responseCode = "200", description = "The test node metadatas", content = {
@Content(mediaType = "application/json", schema = @Schema(implementation = CourseNodeVO.class)),
@Content(mediaType = "application/xml", schema = @Schema(implementation = CourseNodeVO.class)) })
@ApiResponse(responseCode = "401", description = "The roles of the authenticated user are not sufficient")
@ApiResponse(responseCode = "404", description = "The course or parentNode not found")
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
public Response updateTest(@PathParam("courseId") Long courseId, @PathParam("nodeId") String nodeId,
@FormParam("shortTitle") @DefaultValue("undefined") String shortTitle,
@FormParam("longTitle") @DefaultValue("undefined") String longTitle, @FormParam("objectives") @DefaultValue("undefined") String objectives,
@FormParam("visibilityExpertRules") String visibilityExpertRules, @FormParam("accessExpertRules") String accessExpertRules,
@FormParam("testResourceableId") Long testResourceableId, @Context HttpServletRequest request) {
RepositoryManager rm = RepositoryManager.getInstance();
RepositoryEntry testRepoEntry = rm.lookupRepositoryEntry(testResourceableId);
if(testRepoEntry == null) {
return Response.serverError().status(Status.NOT_FOUND).build();
}
CustomConfigDelegate config = CustomConfigFactory.getTestCustomConfig(testRepoEntry);
return update(courseId, nodeId, shortTitle, longTitle, objectives, visibilityExpertRules, accessExpertRules, config, request);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateTest
File: src/main/java/org/olat/restapi/repository/course/CourseElementWebService.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-41242
|
HIGH
| 7.9
|
OpenOLAT
|
updateTest
|
src/main/java/org/olat/restapi/repository/course/CourseElementWebService.java
|
c450df7d7ffe6afde39ebca6da9136f1caa16ec4
| 0
|
Analyze the following code function for security vulnerabilities
|
public void saveWikiPage(OLATResourceable ores, WikiPage page, boolean incrementVersion, Wiki wiki, boolean cache) {
//cluster_OK by guido
VFSContainer versionsContainer = getWikiContainer(ores, VERSION_FOLDER_NAME);
VFSContainer wikiContentContainer = getWikiContainer(ores, WIKI_RESOURCE_FOLDER_NAME);
// rename existing content file to version x and copy it to the version
// container
VFSItem item = wikiContentContainer.resolve(page.getPageId() + "." + WIKI_FILE_SUFFIX);
if (item != null && incrementVersion) {
if (page.getVersion() > 0) {
versionsContainer.copyFrom(item);
VFSItem copiedItem = versionsContainer.resolve(page.getPageId() + "." + WIKI_FILE_SUFFIX);
String fileName = page.getPageId() + "." + WIKI_FILE_SUFFIX + "-" + page.getVersion();
copiedItem.rename(fileName);
}
item.delete();
}
// rename existing meta file to version x and copy it to the version
// container
item = wikiContentContainer.resolve(page.getPageId() + "." + WIKI_PROPERTIES_SUFFIX);
if (item != null && incrementVersion) {
if (page.getVersion() > 0) {
versionsContainer.copyFrom(item);
VFSItem copiedItem = versionsContainer.resolve(page.getPageId() + "." + WIKI_PROPERTIES_SUFFIX);
String fileName = page.getPageId() + "." + WIKI_PROPERTIES_SUFFIX + "-" + page.getVersion();
copiedItem.rename(fileName);
}
item.delete();
}
// store recent content file
VFSLeaf leaf = wikiContentContainer.createChildLeaf(page.getPageId() + "." + WIKI_FILE_SUFFIX);
if(leaf == null) throw new AssertException("Tried to save wiki page with id ("+page.getPageId()+") and Olatresource: "+ores.getResourceableId()+" but page already existed!");
FileUtils.save(leaf.getOutputStream(false), page.getContent(), "utf-8");
// store recent properties file
leaf = wikiContentContainer.createChildLeaf(page.getPageId() + "." + WIKI_PROPERTIES_SUFFIX);
if (leaf == null) throw new AssertException("could not create file for wiki page "+page.getPageId()+", ores: "+ores.getResourceableTypeName()+":"+ores.getResourceableId()+", wikicontainer:"+wikiContentContainer);
if (incrementVersion) page.incrementVersion();
// update modification time
if (!page.getContent().equals("")) page.setModificationTime(System.currentTimeMillis());
Properties p = getPageProperties(page);
try(OutputStream os = leaf.getOutputStream(false)) {
p.store(os, "wiki page meta properties");
} catch (IOException e) {
throw new OLATRuntimeException(WikiManager.class, "failed to save wiki page properties for page with id: " + page.getPageId() + " and olatresource: " + ores.getResourceableId(), e);
}
page.setViewCount(0); //reset view count of the page
//update cache to inform all nodes about the change
if (cache && wikiCache != null) {
wikiCache.update(OresHelper.createStringRepresenting(ores), wiki);
}
if(ThreadLocalUserActivityLogger.getLoggedIdentity() != null) {
// do logging only for real user
ThreadLocalUserActivityLogger.log(LearningResourceLoggingAction.LEARNING_RESOURCE_UPDATE, getClass());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: saveWikiPage
File: src/main/java/org/olat/modules/wiki/WikiManager.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-39180
|
HIGH
| 9
|
OpenOLAT
|
saveWikiPage
|
src/main/java/org/olat/modules/wiki/WikiManager.java
|
699490be8e931af0ef1f135c55384db1f4232637
| 0
|
Analyze the following code function for security vulnerabilities
|
private SqlSelection getWhereClause(final Uri uri, final String where, final String[] whereArgs,
int uriMatch) {
SqlSelection selection = new SqlSelection();
selection.appendClause(where, whereArgs);
if (uriMatch == MY_DOWNLOADS_ID || uriMatch == ALL_DOWNLOADS_ID ||
uriMatch == PUBLIC_DOWNLOAD_ID) {
selection.appendClause(Downloads.Impl._ID + " = ?", getDownloadIdFromUri(uri));
}
if ((uriMatch == MY_DOWNLOADS || uriMatch == MY_DOWNLOADS_ID)
&& getContext().checkCallingOrSelfPermission(Downloads.Impl.PERMISSION_ACCESS_ALL)
!= PackageManager.PERMISSION_GRANTED) {
selection.appendClause(
Constants.UID + "= ? OR " + Downloads.Impl.COLUMN_OTHER_UID + "= ?",
Binder.getCallingUid(), Binder.getCallingUid());
}
return selection;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getWhereClause
File: src/com/android/providers/downloads/DownloadProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2016-0848
|
HIGH
| 7.2
|
android
|
getWhereClause
|
src/com/android/providers/downloads/DownloadProvider.java
|
bdc831357e7a116bc561d51bf2ddc85ff11c01a9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean canProfileOwnerResetPasswordWhenLocked(int userId) {
Preconditions.checkCallAuthorization(isSystemUid(getCallerIdentity()),
String.format(NOT_SYSTEM_CALLER_MSG,
"call canProfileOwnerResetPasswordWhenLocked"));
synchronized (getLockObject()) {
final ActiveAdmin poAdmin = getProfileOwnerAdminLocked(userId);
DevicePolicyData policy = getUserData(userId);
if (poAdmin == null
|| getEncryptionStatus() != ENCRYPTION_STATUS_ACTIVE_PER_USER
|| !isResetPasswordTokenActiveForUserLocked(
policy.mPasswordTokenHandle, userId)) {
return false;
}
final ApplicationInfo poAppInfo;
try {
poAppInfo = mIPackageManager.getApplicationInfo(
poAdmin.info.getPackageName(), 0 /* flags */, userId);
} catch (RemoteException e) {
Slogf.e(LOG_TAG, "Failed to query PO app info", e);
return false;
}
if (poAppInfo == null) {
Slogf.wtf(LOG_TAG, "Cannot find AppInfo for profile owner");
return false;
}
if (!poAppInfo.isEncryptionAware()) {
return false;
}
Slogf.d(LOG_TAG, "PO should be able to reset password from direct boot");
return true;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: canProfileOwnerResetPasswordWhenLocked
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
|
canProfileOwnerResetPasswordWhenLocked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public JSONArray put(int index, boolean value) throws JSONException {
put(index, value ? Boolean.TRUE : Boolean.FALSE);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: put
File: src/main/java/org/codehaus/jettison/json/JSONArray.java
Repository: jettison-json/jettison
The code follows secure coding practices.
|
[
"CWE-674",
"CWE-787"
] |
CVE-2022-45693
|
HIGH
| 7.5
|
jettison-json/jettison
|
put
|
src/main/java/org/codehaus/jettison/json/JSONArray.java
|
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<Column<T, ?>> getColumns() {
return Collections.unmodifiableList(getState(false).columnOrder.stream()
.map(columnKeys::get).collect(Collectors.toList()));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getColumns
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
|
getColumns
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean handleAppCrashLocked(ProcessRecord app, String reason,
String shortMsg, String longMsg, String stackTrace) {
long now = SystemClock.uptimeMillis();
Long crashTime;
if (!app.isolated) {
crashTime = mProcessCrashTimes.get(app.info.processName, app.uid);
} else {
crashTime = null;
}
if (crashTime != null && now < crashTime+ProcessList.MIN_CRASH_INTERVAL) {
// This process loses!
Slog.w(TAG, "Process " + app.info.processName
+ " has crashed too many times: killing!");
EventLog.writeEvent(EventLogTags.AM_PROCESS_CRASHED_TOO_MUCH,
app.userId, app.info.processName, app.uid);
mStackSupervisor.handleAppCrashLocked(app);
if (!app.persistent) {
// We don't want to start this process again until the user
// explicitly does so... but for persistent process, we really
// need to keep it running. If a persistent process is actually
// repeatedly crashing, then badness for everyone.
EventLog.writeEvent(EventLogTags.AM_PROC_BAD, app.userId, app.uid,
app.info.processName);
if (!app.isolated) {
// XXX We don't have a way to mark isolated processes
// as bad, since they don't have a peristent identity.
mBadProcesses.put(app.info.processName, app.uid,
new BadProcessInfo(now, shortMsg, longMsg, stackTrace));
mProcessCrashTimes.remove(app.info.processName, app.uid);
}
app.bad = true;
app.removed = true;
// Don't let services in this process be restarted and potentially
// annoy the user repeatedly. Unless it is persistent, since those
// processes run critical code.
removeProcessLocked(app, false, false, "crash");
mStackSupervisor.resumeTopActivitiesLocked();
return false;
}
mStackSupervisor.resumeTopActivitiesLocked();
} else {
mStackSupervisor.finishTopRunningActivityLocked(app, reason);
}
// Bump up the crash count of any services currently running in the proc.
for (int i=app.services.size()-1; i>=0; i--) {
// Any services running in the application need to be placed
// back in the pending list.
ServiceRecord sr = app.services.valueAt(i);
sr.crashCount++;
}
// If the crashing process is what we consider to be the "home process" and it has been
// replaced by a third-party app, clear the package preferred activities from packages
// with a home activity running in the process to prevent a repeatedly crashing app
// from blocking the user to manually clear the list.
final ArrayList<ActivityRecord> activities = app.activities;
if (app == mHomeProcess && activities.size() > 0
&& (mHomeProcess.info.flags & ApplicationInfo.FLAG_SYSTEM) == 0) {
for (int activityNdx = activities.size() - 1; activityNdx >= 0; --activityNdx) {
final ActivityRecord r = activities.get(activityNdx);
if (r.isHomeActivity()) {
Log.i(TAG, "Clearing package preferred activities from " + r.packageName);
try {
ActivityThread.getPackageManager()
.clearPackagePreferredActivities(r.packageName);
} catch (RemoteException c) {
// pm is in same process, this will never happen.
}
}
}
}
if (!app.isolated) {
// XXX Can't keep track of crash times for isolated processes,
// because they don't have a perisistent identity.
mProcessCrashTimes.put(app.info.processName, app.uid, now);
}
if (app.crashHandler != null) mHandler.post(app.crashHandler);
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleAppCrashLocked
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2500
|
MEDIUM
| 4.3
|
android
|
handleAppCrashLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
9878bb99b77c3681f0fda116e2964bac26f349c3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated(since = "2.2M1")
public String getSpace()
{
return LOCAL_REFERENCE_SERIALIZER.serialize(getDocumentReference().getLastSpaceReference());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSpace
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
|
getSpace
|
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
|
public void ReInit(SimpleCharStream stream, int lexState)
{
ReInit(stream);
SwitchTo(lexState);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: ReInit
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
|
ReInit
|
impl/src/main/java/com/sun/el/parser/ELParserTokenManager.java
|
b6a3943ac5fba71cbc6719f092e319caa747855b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getUnfilteredCount() {
return super.getUnfilteredCount() + getServiceTargetCount() + getCallerTargetCount();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUnfilteredCount
File: core/java/com/android/internal/app/ChooserActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-254",
"CWE-19"
] |
CVE-2016-3752
|
HIGH
| 7.5
|
android
|
getUnfilteredCount
|
core/java/com/android/internal/app/ChooserActivity.java
|
ddbf2db5b946be8fdc45c7b0327bf560b2a06988
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<String> getPlatformSuspendedPackages(int userId) {
PackageManagerInternal pmi = mInjector.getPackageManagerInternal();
return mInjector.getPackageManager(userId)
.getInstalledPackages(PackageManager.PackageInfoFlags.of(
MATCH_DIRECT_BOOT_AWARE | MATCH_DIRECT_BOOT_UNAWARE))
.stream()
.map(packageInfo -> packageInfo.packageName)
.filter(pkg ->
PLATFORM_PACKAGE_NAME.equals(pmi.getSuspendingPackage(pkg, userId))
)
.collect(Collectors.toList());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPlatformSuspendedPackages
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
|
getPlatformSuspendedPackages
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getStatus() {
StringBuilder buff = new StringBuilder();
if (!started) {
buff.append("Not started");
} else if (isRunning(false)) {
buff.append(service.getType()).
append(" server running at ").
append(service.getURL()).
append(" (");
if (service.getAllowOthers()) {
buff.append("others can connect");
} else {
buff.append("only local connections");
}
buff.append(')');
} else {
buff.append("The ").
append(service.getType()).
append(" server could not be started. " +
"Possible cause: another server is already running at ").
append(service.getURL());
}
return buff.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStatus
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
|
getStatus
|
h2/src/main/org/h2/tools/Server.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 0
|
Analyze the following code function for security vulnerabilities
|
protected Commandline buildCommandline(File upgradeDir, String command, String...commandArgs) {
String version;
File versionFile = new File(upgradeDir, "version.txt");
if (versionFile.exists()) {
try {
version = FileUtils.readFileToString(versionFile, Charset.defaultCharset()).trim();
} catch (IOException e) {
throw new RuntimeException(e);
}
} else {
version = "1.0-EAP-build26";
}
String bootstrapClass;
if (version.startsWith("1.0-EAP")) {
int build = Integer.parseInt(StringUtils.substringAfterLast(version, "build"));
if (build <= 26)
bootstrapClass = "com.gitplex.commons.bootstrap.Bootstrap";
else
bootstrapClass = "com.gitplex.launcher.bootstrap.Bootstrap";
} else if (version.startsWith("1.0.0")) {
bootstrapClass = "com.gitplex.launcher.bootstrap.Bootstrap";
} else if (version.startsWith("1.0.1")) {
bootstrapClass = "com.turbodev.launcher.bootstrap.Bootstrap";
} else if (version.startsWith("2.0.")) {
bootstrapClass = "io.onedev.launcher.bootstrap.Bootstrap";
} else if (version.startsWith("3.") || version.startsWith("4.0.") || version.startsWith("4.1.")
|| version.startsWith("4.2.") || version.startsWith("4.3.") || version.startsWith("4.4.")
|| version.startsWith("4.5.") || version.startsWith("4.6.") || version.startsWith("4.7.")
|| version.startsWith("4.8.") || version.startsWith("4.9.")) {
bootstrapClass = "io.onedev.commons.launcher.bootstrap.Bootstrap";
} else {
bootstrapClass = "io.onedev.commons.bootstrap.Bootstrap";
}
if (version.startsWith("1.") || version.startsWith("2.")) {
switch (command) {
case "check-data-version":
command = "check_data_version";
break;
case "backup-db":
command = "backup";
break;
case "clean-db":
command = "clean";
break;
}
}
Commandline cmdline= new Commandline(System.getProperty("java.home") + "/bin/java");
cmdline.addArgs(
"-Xmx" + Runtime.getRuntime().maxMemory()/1024/1024 + "m",
"-XX:+IgnoreUnrecognizedVMOptions",
"--add-opens=java.base/java.lang=ALL-UNNAMED",
"--add-opens=java.base/java.util=ALL-UNNAMED",
"--add-opens=java.base/java.text=ALL-UNNAMED",
"--add-opens=java.desktop/java.awt.font=ALL-UNNAMED",
"--add-opens=java.xml/com.sun.org.apache.xerces.internal.parsers=ALL-UNNAMED",
"--add-opens=jdk.management/com.sun.management.internal=ALL-UNNAMED",
"-classpath", "*", bootstrapClass,
command);
cmdline.addArgs(commandArgs);
cmdline.workingDir(new File(upgradeDir, "boot"));
return cmdline;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: buildCommandline
File: server-core/src/main/java/io/onedev/server/maintenance/Upgrade.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-552"
] |
CVE-2022-39208
|
HIGH
| 7.5
|
theonedev/onedev
|
buildCommandline
|
server-core/src/main/java/io/onedev/server/maintenance/Upgrade.java
|
8aa94e0daf8447cdf76d4f27bfda0a85a7ea5822
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public final boolean finishActivity(IBinder token, int resultCode, Intent resultData,
int finishTask) {
// Refuse possible leaked file descriptors
if (resultData != null && resultData.hasFileDescriptors() == true) {
throw new IllegalArgumentException("File descriptors passed in Intent");
}
synchronized(this) {
ActivityRecord r = ActivityRecord.isInStackLocked(token);
if (r == null) {
return true;
}
// Keep track of the root activity of the task before we finish it
TaskRecord tr = r.task;
ActivityRecord rootR = tr.getRootActivity();
if (rootR == null) {
Slog.w(TAG, "Finishing task with all activities already finished");
}
// Do not allow task to finish if last task in lockTask mode. Launchable priv-apps can
// finish.
if (tr.mLockTaskAuth != LOCK_TASK_AUTH_LAUNCHABLE_PRIV && rootR == r &&
mStackSupervisor.isLastLockedTask(tr)) {
Slog.i(TAG, "Not finishing task in lock task mode");
mStackSupervisor.showLockTaskToast();
return false;
}
if (mController != null) {
// Find the first activity that is not finishing.
ActivityRecord next = r.task.stack.topRunningActivityLocked(token, 0);
if (next != null) {
// ask watcher if this is allowed
boolean resumeOK = true;
try {
resumeOK = mController.activityResuming(next.packageName);
} catch (RemoteException e) {
mController = null;
Watchdog.getInstance().setActivityController(null);
}
if (!resumeOK) {
Slog.i(TAG, "Not finishing activity because controller resumed");
return false;
}
}
}
final long origId = Binder.clearCallingIdentity();
try {
boolean res;
final boolean finishWithRootActivity =
finishTask == Activity.FINISH_TASK_WITH_ROOT_ACTIVITY;
if (finishTask == Activity.FINISH_TASK_WITH_ACTIVITY
|| (finishWithRootActivity && r == rootR)) {
// If requested, remove the task that is associated to this activity only if it
// was the root activity in the task. The result code and data is ignored
// because we don't support returning them across task boundaries. Also, to
// keep backwards compatibility we remove the task from recents when finishing
// task with root activity.
res = removeTaskByIdLocked(tr.taskId, false, finishWithRootActivity);
if (!res) {
Slog.i(TAG, "Removing task failed to finish activity");
}
} else {
res = tr.stack.requestFinishActivityLocked(token, resultCode,
resultData, "app-request", true);
if (!res) {
Slog.i(TAG, "Failed to finish by app-request");
}
}
return res;
} finally {
Binder.restoreCallingIdentity(origId);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: finishActivity
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3912
|
HIGH
| 9.3
|
android
|
finishActivity
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
protected Map<String, String> submoduleUrls() {
String[] args = new String[]{"config", "--get-regexp", "^submodule\\..+\\.url"};
CommandLine gitCmd = gitWd().withArgs(args);
ConsoleResult result = runOrBomb(gitCmd, false);
List<String> submoduleList = result.output();
HashMap<String, String> submoduleUrls = new HashMap<>();
for (String submoduleLine : submoduleList) {
Matcher m = GIT_SUBMODULE_URL_PATTERN.matcher(submoduleLine);
if (!m.find()) {
bomb("Unable to parse git-config output line: " + result.replaceSecretInfo(submoduleLine) + "\n"
+ "From output:\n"
+ result.replaceSecretInfo(StringUtils.join(submoduleList, "\n")));
}
submoduleUrls.put(m.group(1), m.group(2));
}
return submoduleUrls;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: submoduleUrls
File: domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-77"
] |
CVE-2021-43286
|
MEDIUM
| 6.5
|
gocd
|
submoduleUrls
|
domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
|
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
| 0
|
Analyze the following code function for security vulnerabilities
|
public void cleanupDanglingBitmapFiles(@NonNull File path) {
synchronized (mLock) {
mShortcutBitmapSaver.waitForAllSavesLocked();
final ArraySet<String> usedFiles = getUsedBitmapFilesLocked();
for (File child : path.listFiles()) {
if (!child.isFile()) {
continue;
}
final String name = child.getName();
if (!usedFiles.contains(name)) {
if (ShortcutService.DEBUG) {
Slog.d(TAG, "Removing dangling bitmap file: " + child.getAbsolutePath());
}
child.delete();
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cleanupDanglingBitmapFiles
File: services/core/java/com/android/server/pm/ShortcutPackage.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40075
|
MEDIUM
| 5.5
|
android
|
cleanupDanglingBitmapFiles
|
services/core/java/com/android/server/pm/ShortcutPackage.java
|
ae768fbb9975fdab267f525831cb52f485ab0ecc
| 0
|
Analyze the following code function for security vulnerabilities
|
default void onNetworkAdded(@NonNull WifiConfiguration config) { }
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onNetworkAdded
File: service/java/com/android/server/wifi/WifiConfigManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
onNetworkAdded
|
service/java/com/android/server/wifi/WifiConfigManager.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
private PersistentAuthenticatedClientSessionAdapter toAdapter(RealmModel realm, PersistentUserSessionAdapter userSession, PersistentClientSessionEntity entity) {
String clientId = entity.getClientId();
if (isExternalClient(entity)) {
clientId = getExternalClientId(entity);
}
ClientModel client = realm.getClientById(clientId);
PersistentClientSessionModel model = new PersistentClientSessionModel();
model.setClientId(clientId);
model.setUserSessionId(userSession.getId());
model.setUserId(userSession.getUserId());
model.setTimestamp(entity.getTimestamp());
model.setData(entity.getData());
return new PersistentAuthenticatedClientSessionAdapter(session, model, realm, client, userSession);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toAdapter
File: model/jpa/src/main/java/org/keycloak/models/jpa/session/JpaUserSessionPersisterProvider.java
Repository: keycloak
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2023-6563
|
HIGH
| 7.7
|
keycloak
|
toAdapter
|
model/jpa/src/main/java/org/keycloak/models/jpa/session/JpaUserSessionPersisterProvider.java
|
11eb952e1df7cbb95b1e2c101dfd4839a2375695
| 0
|
Analyze the following code function for security vulnerabilities
|
public void enableVerboseLogging(boolean verbose) {
mVerboseLoggingEnabled = verbose;
mWifiConfigStore.enableVerboseLogging(mVerboseLoggingEnabled);
mWifiKeyStore.enableVerboseLogging(mVerboseLoggingEnabled);
mWifiBlocklistMonitor.enableVerboseLogging(mVerboseLoggingEnabled);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: enableVerboseLogging
File: service/java/com/android/server/wifi/WifiConfigManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
enableVerboseLogging
|
service/java/com/android/server/wifi/WifiConfigManager.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
public static Path getNormalizedPath(String parentDirectory, String givenPath) {
if (givenPath == null) {
return null;
}
int lastIndexOfSlash = givenPath.lastIndexOf(SLASH);
// in case the given path is incomplete, trim the end
String givenPathCleaned;
if(lastIndexOfSlash == 0) { // Looks like `/someFileOrFolder`
return Paths.get(SLASH);
}
else {
givenPathCleaned = lastIndexOfSlash > -1 ? givenPath.substring(0, lastIndexOfSlash) : null;
}
Path p;
// The following 2 are for when the given path is already valid
p = getPathIfExists(givenPath);
if (p != null) {
// givenPath is absolute
return p;
}
p = getPathIfExists(givenPathCleaned);
if (p != null) {
// givenPath is absolute
return p;
}
if (parentDirectory == null) {
return null;
}
if (parentDirectory.endsWith(SLASH)) {
parentDirectory = parentDirectory.substring(0, parentDirectory.length() - 1);
}
String combinedPath = parentDirectory + SLASH + givenPath;
p = getPathIfExists(combinedPath);
if (p != null) {
return p;
}
combinedPath = parentDirectory + SLASH + givenPathCleaned;
p = getPathIfExists(combinedPath);
if (p != null) {
return p;
}
return null;
}
|
Vulnerability Classification:
- CWE: CWE-22
- CVE: CVE-2019-18212
- Severity: MEDIUM
- CVSS Score: 4.0
Description: Reject download of resource which are not in the cache folder (url which
uses several ../../).
Signed-off-by: azerr <azerr@redhat.com>
Function: getNormalizedPath
File: org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/utils/FilesUtils.java
Repository: eclipse/lemminx
Fixed Code:
public static Path getNormalizedPath(String parentDirectory, String givenPath) {
if (givenPath == null) {
return null;
}
int lastIndexOfSlash = givenPath.lastIndexOf(SLASH);
// in case the given path is incomplete, trim the end
String givenPathCleaned;
if (lastIndexOfSlash == 0) { // Looks like `/someFileOrFolder`
return Paths.get(SLASH);
} else {
givenPathCleaned = lastIndexOfSlash > -1 ? givenPath.substring(0, lastIndexOfSlash) : null;
}
Path p;
// The following 2 are for when the given path is already valid
p = getPathIfExists(givenPath);
if (p != null) {
// givenPath is absolute
return p;
}
p = getPathIfExists(givenPathCleaned);
if (p != null) {
// givenPath is absolute
return p;
}
if (parentDirectory == null) {
return null;
}
if (parentDirectory.endsWith(SLASH)) {
parentDirectory = parentDirectory.substring(0, parentDirectory.length() - 1);
}
String combinedPath = parentDirectory + SLASH + givenPath;
p = getPathIfExists(combinedPath);
if (p != null) {
return p;
}
combinedPath = parentDirectory + SLASH + givenPathCleaned;
p = getPathIfExists(combinedPath);
if (p != null) {
return p;
}
return null;
}
|
[
"CWE-22"
] |
CVE-2019-18212
|
MEDIUM
| 4
|
eclipse/lemminx
|
getNormalizedPath
|
org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/utils/FilesUtils.java
|
e37c399aa266be1b7a43061d4afc43dc230410d2
| 1
|
Analyze the following code function for security vulnerabilities
|
private URLSecurityManager getURLSecurityManager()
{
return Utils.getComponent(URLSecurityManager.class);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getURLSecurityManager
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiServletResponse.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-601"
] |
CVE-2023-29204
|
MEDIUM
| 6.1
|
xwiki/xwiki-platform
|
getURLSecurityManager
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiServletResponse.java
|
e4f7f68e93cb08c25632c126356d218abf192d1e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public ResolveInfo resolveIntent(Intent intent, String resolvedType,
int flags, int userId) {
if (!sUserManager.exists(userId)) return null;
enforceCrossUserPermission(Binder.getCallingUid(), userId, false, false, "resolve intent");
List<ResolveInfo> query = queryIntentActivities(intent, resolvedType, flags, userId);
return chooseBestActivity(intent, resolvedType, flags, query, userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resolveIntent
File: services/core/java/com/android/server/pm/PackageManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2016-2497
|
HIGH
| 7.5
|
android
|
resolveIntent
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Publisher newInstance(StaplerRequest req, JSONObject formData) throws FormException {
String childProjectsString = formData.getString("childProjects").trim();
if (childProjectsString.endsWith(",")) {
childProjectsString = childProjectsString.substring(0, childProjectsString.length() - 1).trim();
}
return new BuildTrigger(
childProjectsString,
formData.optString("threshold", Result.SUCCESS.toString()));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: newInstance
File: core/src/main/java/hudson/tasks/BuildTrigger.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
newInstance
|
core/src/main/java/hudson/tasks/BuildTrigger.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean hasAccountFeatures(AccountManager am, Account account, String[] features) {
try {
return am.hasFeatures(account, features, null, null).getResult();
} catch (Exception e) {
Slogf.w(LOG_TAG, "Failed to get account feature", e);
return false;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasAccountFeatures
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2023-21284
|
MEDIUM
| 5.5
|
android
|
hasAccountFeatures
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@DatabaseOpenFlags
public int getOpenFlags() {
return mOpenFlags;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getOpenFlags
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
|
getOpenFlags
|
core/java/android/database/sqlite/SQLiteDatabase.java
|
ebc250d16c747f4161167b5ff58b3aea88b37acf
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
boolean shouldResumeActivity(ActivityRecord activeActivity) {
return shouldBeResumed(activeActivity) && !isState(RESUMED);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: shouldResumeActivity
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
|
shouldResumeActivity
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
public void processAnnotations(final Class[] types) {
if (annotationConfiguration == null) {
throw new com.thoughtworks.xstream.InitializationException("No " + ANNOTATION_MAPPER_TYPE + " available");
}
annotationConfiguration.processAnnotations(types);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: processAnnotations
File: xstream/src/java/com/thoughtworks/xstream/XStream.java
Repository: x-stream/xstream
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-43859
|
MEDIUM
| 5
|
x-stream/xstream
|
processAnnotations
|
xstream/src/java/com/thoughtworks/xstream/XStream.java
|
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
| 0
|
Analyze the following code function for security vulnerabilities
|
public int[] getVi()
{
return this.vi;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getVi
File: core/src/main/java/org/bouncycastle/pqc/crypto/rainbow/RainbowParameters.java
Repository: bcgit/bc-java
The code follows secure coding practices.
|
[
"CWE-470"
] |
CVE-2018-1000613
|
HIGH
| 7.5
|
bcgit/bc-java
|
getVi
|
core/src/main/java/org/bouncycastle/pqc/crypto/rainbow/RainbowParameters.java
|
4092ede58da51af9a21e4825fbad0d9a3ef5a223
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setDisableHashBasedSearches(boolean theDisableHashBasedSearches) {
myDisableHashBasedSearches = theDisableHashBasedSearches;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDisableHashBasedSearches
File: hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
Repository: hapifhir/hapi-fhir
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-32053
|
MEDIUM
| 5
|
hapifhir/hapi-fhir
|
setDisableHashBasedSearches
|
hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
|
f2934b229c491235ab0e7782dea86b324521082a
| 0
|
Analyze the following code function for security vulnerabilities
|
protected CoercionAction _findCoercionFromEmptyArray(DeserializationContext ctxt) {
return ctxt.findCoercionAction(logicalType(), handledType(),
CoercionInputShape.EmptyArray);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _findCoercionFromEmptyArray
File: src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2022-42003
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
_findCoercionFromEmptyArray
|
src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java
|
d78d00ee7b5245b93103fef3187f70543d67ca33
| 0
|
Analyze the following code function for security vulnerabilities
|
public JSONObject delete() {
JSONObject array = null;
File file = new File(getRealFilePath());
if (file.isDirectory()) {
array = new JSONObject();
this.unlinkRecursive(getRealFilePath(), true);
try {
array.put("Error", "");
array.put("Code", 0);
array.put("Path", this.get.get("path"));
} catch (Exception e) {
this.error("JSONObject error");
}
} else if (file.exists()) {
array = new JSONObject();
try {
// before bakup
bakupFile(file);
if (file.delete()) {
try {
array.put("Error", "");
array.put("Code", 0);
array.put("Path", this.get.get("path"));
} catch (JSONException e) {
this.error("JSONObject error");
}
} else {
this.error(sprintf(lang("ERROR_DELETING FILE"), this.get.get("path")));
}
} catch (IOException e) {
logger.error(sprintf(lang("ERROR_DELETING FILE"), this.get.get("path")), e);
this.error(sprintf(lang("ERROR_DELETING FILE"), this.get.get("path")));
}
return array;
} else {
this.error(lang("INVALID_DIRECTORY_OR_FILE"));
}
return array;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: delete
File: src/main/java/com/jflyfox/modules/filemanager/FileManager.java
Repository: jflyfox/jfinal_cms
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2021-37262
|
MEDIUM
| 5
|
jflyfox/jfinal_cms
|
delete
|
src/main/java/com/jflyfox/modules/filemanager/FileManager.java
|
e7fd0fe9362464c4d2bd308318eecc89a847b116
| 0
|
Analyze the following code function for security vulnerabilities
|
public void startDetailsActivityForInfo(ItemInfo info, Rect sourceBounds, Bundle opts) {
if (info instanceof ItemInfoWithIcon
&& (((ItemInfoWithIcon) info).runtimeStatusFlags
& ItemInfoWithIcon.FLAG_INSTALL_SESSION_ACTIVE) != 0) {
ItemInfoWithIcon appInfo = (ItemInfoWithIcon) info;
mContext.startActivity(new PackageManagerHelper(mContext)
.getMarketIntent(appInfo.getTargetComponent().getPackageName()));
return;
}
ComponentName componentName = null;
if (info instanceof AppInfo) {
componentName = ((AppInfo) info).componentName;
} else if (info instanceof WorkspaceItemInfo) {
componentName = info.getTargetComponent();
} else if (info instanceof PendingAddItemInfo) {
componentName = ((PendingAddItemInfo) info).componentName;
} else if (info instanceof LauncherAppWidgetInfo) {
componentName = ((LauncherAppWidgetInfo) info).providerName;
}
if (componentName != null) {
try {
mLauncherApps.startAppDetailsActivity(componentName, info.user, sourceBounds, opts);
} catch (SecurityException | ActivityNotFoundException e) {
Toast.makeText(mContext, R.string.activity_not_found, Toast.LENGTH_SHORT).show();
Log.e(TAG, "Unable to launch settings", e);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startDetailsActivityForInfo
File: src/com/android/launcher3/util/PackageManagerHelper.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2023-40097
|
HIGH
| 7.8
|
android
|
startDetailsActivityForInfo
|
src/com/android/launcher3/util/PackageManagerHelper.java
|
6c9a41117d5a9365cf34e770bbb00138f6bf997e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setLeftAssistIcon(Drawable drawable) {
mLeftAssistIcon = drawable;
updateLeftAffordanceIcon();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setLeftAssistIcon
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
setLeftAssistIcon
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public HttpRequest port(final int port) {
this.port = port;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: port
File: src/main/java/jodd/http/HttpRequest.java
Repository: oblac/jodd-http
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2022-29631
|
MEDIUM
| 5
|
oblac/jodd-http
|
port
|
src/main/java/jodd/http/HttpRequest.java
|
e50f573c8f6a39212ade68c6eb1256b2889fa8a6
| 0
|
Analyze the following code function for security vulnerabilities
|
public @NonNull AssetFileDescriptor openFd(@NonNull String fileName) throws IOException {
Objects.requireNonNull(fileName, "fileName");
synchronized (this) {
ensureOpenLocked();
final ParcelFileDescriptor pfd = nativeOpenAssetFd(mObject, fileName, mOffsets);
if (pfd == null) {
throw new FileNotFoundException("Asset file: " + fileName);
}
return new AssetFileDescriptor(pfd, mOffsets[0], mOffsets[1]);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: openFd
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
|
openFd
|
core/java/android/content/res/AssetManager.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("unchecked")
public void unsubscribeFromNotifications(String email, String channelId) {
if (!StringUtils.isBlank(email) && !StringUtils.isBlank(channelId)) {
Sysprop s = pc.read(channelId);
if (s == null || !s.hasProperty("emails")) {
s = new Sysprop(channelId);
s.addProperty("emails", new LinkedList<>());
}
Set<String> emails = new HashSet<>((List<String>) s.getProperty("emails"));
if (emails.remove(email)) {
s.addProperty("emails", emails);
pc.create(s);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unsubscribeFromNotifications
File: src/main/java/com/erudika/scoold/utils/ScooldUtils.java
Repository: Erudika/scoold
The code follows secure coding practices.
|
[
"CWE-130"
] |
CVE-2022-1543
|
MEDIUM
| 6.5
|
Erudika/scoold
|
unsubscribeFromNotifications
|
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
private void writeValueString(ByteBuffer target, String val) {
target.put((byte) 0); //to use encodeInteger we need to place the first byte in the buffer.
encodeInteger(target, val.length(), 7);
for (int j = 0; j < val.length(); ++j) {
target.put((byte) val.charAt(j));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeValueString
File: core/src/main/java/io/undertow/protocols/http2/HpackEncoder.java
Repository: undertow-io/undertow
The code follows secure coding practices.
|
[
"CWE-214"
] |
CVE-2021-3859
|
HIGH
| 7.5
|
undertow-io/undertow
|
writeValueString
|
core/src/main/java/io/undertow/protocols/http2/HpackEncoder.java
|
e43f0ada3f4da6e8579e0020cec3cb1a81e487c2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean addMessageToConsole(int level, String message, int lineNumber,
String sourceId) {
ConsoleMessage.MessageLevel messageLevel = ConsoleMessage.MessageLevel.DEBUG;
switch(level) {
case LOG_LEVEL_TIP:
messageLevel = ConsoleMessage.MessageLevel.TIP;
break;
case LOG_LEVEL_LOG:
messageLevel = ConsoleMessage.MessageLevel.LOG;
break;
case LOG_LEVEL_WARNING:
messageLevel = ConsoleMessage.MessageLevel.WARNING;
break;
case LOG_LEVEL_ERROR:
messageLevel = ConsoleMessage.MessageLevel.ERROR;
break;
default:
Log.w(TAG, "Unknown message level, defaulting to DEBUG");
break;
}
return mContentsClient.onConsoleMessage(
new ConsoleMessage(message, sourceId, lineNumber, messageLevel));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addMessageToConsole
File: android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
addMessageToConsole
|
android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getSharingConditions( String access )
{
CurrentUserGroupInfo currentUserGroupInfo = currentUserService.getCurrentUserGroupsInfo();
return String.join( " or ",
getOwnerCondition( currentUserGroupInfo ),
getPublicSharingCondition( access ),
getUserGroupAccessCondition( currentUserGroupInfo, access ),
getUserAccessCondition( currentUserGroupInfo, access ) );
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSharingConditions
File: dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/association/ProgramOrganisationUnitAssociationsQueryBuilder.java
Repository: dhis2/dhis2-core
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-24848
|
MEDIUM
| 6.5
|
dhis2/dhis2-core
|
getSharingConditions
|
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/association/ProgramOrganisationUnitAssociationsQueryBuilder.java
|
3b245d04a58b78f0dc9bae8559f36ee4ca36dfac
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void waitForNetworkStateUpdate(long procStateSeq) {
final int callingUid = Binder.getCallingUid();
if (DEBUG_NETWORK) {
Slog.d(TAG_NETWORK, "Called from " + callingUid + " to wait for seq: " + procStateSeq);
}
UidRecord record;
synchronized (mProcLock) {
record = mProcessList.getUidRecordLOSP(callingUid);
if (record == null) {
return;
}
}
synchronized (record.networkStateLock) {
if (record.lastNetworkUpdatedProcStateSeq >= procStateSeq) {
if (DEBUG_NETWORK) {
Slog.d(TAG_NETWORK, "Network rules have been already updated for seq no. "
+ procStateSeq + ", so no need to wait. Uid: "
+ callingUid + ", lastProcStateSeqWithUpdatedNetworkState: "
+ record.lastNetworkUpdatedProcStateSeq);
}
return;
}
try {
if (DEBUG_NETWORK) {
Slog.d(TAG_NETWORK, "Starting to wait for the network rules update."
+ " Uid: " + callingUid + " procStateSeq: " + procStateSeq);
}
final long startTime = SystemClock.uptimeMillis();
record.procStateSeqWaitingForNetwork = procStateSeq;
record.networkStateLock.wait(mConstants.mNetworkAccessTimeoutMs);
record.procStateSeqWaitingForNetwork = 0;
final long totalTime = SystemClock.uptimeMillis() - startTime;
if (totalTime >= mConstants.mNetworkAccessTimeoutMs || DEBUG_NETWORK) {
Slog.w(TAG_NETWORK, "Total time waited for network rules to get updated: "
+ totalTime + ". Uid: " + callingUid + " procStateSeq: "
+ procStateSeq + " UidRec: " + record
+ " validateUidRec: "
+ mUidObserverController.getValidateUidRecord(callingUid));
}
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: waitForNetworkStateUpdate
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
|
waitForNetworkStateUpdate
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void silence(String callId, Session.Info info) throws RemoteException { }
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: silence
File: tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
silence
|
tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public XMLBuilder namespace(String namespaceURI) {
this.namespace(null, namespaceURI);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: namespace
File: src/main/java/com/jamesmurty/utils/XMLBuilder.java
Repository: jmurty/java-xmlbuilder
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2014-125087
|
MEDIUM
| 5.2
|
jmurty/java-xmlbuilder
|
namespace
|
src/main/java/com/jamesmurty/utils/XMLBuilder.java
|
e6fddca201790abab4f2c274341c0bb8835c3e73
| 0
|
Analyze the following code function for security vulnerabilities
|
protected final Long _parseLong(JsonParser p, DeserializationContext ctxt,
Class<?> targetType)
throws IOException
{
String text;
switch (p.currentTokenId()) {
case JsonTokenId.ID_STRING:
text = p.getText();
break;
case JsonTokenId.ID_NUMBER_FLOAT:
final CoercionAction act = _checkFloatToIntCoercion(p, ctxt, targetType);
if (act == CoercionAction.AsNull) {
return (Long) getNullValue(ctxt);
}
if (act == CoercionAction.AsEmpty) {
return (Long) getEmptyValue(ctxt);
}
return p.getValueAsLong();
case JsonTokenId.ID_NULL: // null fine for non-primitive
return (Long) getNullValue(ctxt);
case JsonTokenId.ID_NUMBER_INT:
return p.getLongValue();
// 29-Jun-2020, tatu: New! "Scalar from Object" (mostly for XML)
case JsonTokenId.ID_START_OBJECT:
text = ctxt.extractScalarFromObject(p, this, targetType);
break;
case JsonTokenId.ID_START_ARRAY:
return (Long) _deserializeFromArray(p, ctxt);
default:
return (Long) ctxt.handleUnexpectedToken(getValueType(ctxt), p);
}
final CoercionAction act = _checkFromStringCoercion(ctxt, text);
if (act == CoercionAction.AsNull) {
return (Long) getNullValue(ctxt);
}
if (act == CoercionAction.AsEmpty) {
return (Long) getEmptyValue(ctxt);
}
text = text.trim();
if (_checkTextualNull(ctxt, text)) {
return (Long) getNullValue(ctxt);
}
// let's allow Strings to be converted too
return _parseLong(ctxt, text);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _parseLong
File: src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2022-42003
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
_parseLong
|
src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java
|
d78d00ee7b5245b93103fef3187f70543d67ca33
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setSecurePort(String securePort) {
this.securePort = securePort;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSecurePort
File: base/server/src/main/java/com/netscape/cmscore/apps/ServerXml.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
setSecurePort
|
base/server/src/main/java/com/netscape/cmscore/apps/ServerXml.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void setErrorHandler(ErrorHandler errorHandler) {
validator.setErrorHandler(errorHandler);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setErrorHandler
File: ext/java/nokogiri/XmlSchema.java
Repository: sparklemotion/nokogiri
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2020-26247
|
MEDIUM
| 4
|
sparklemotion/nokogiri
|
setErrorHandler
|
ext/java/nokogiri/XmlSchema.java
|
9c87439d9afa14a365ff13e73adc809cb2c3d97b
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isMySQL()
{
if (getHibernateStore() == null) {
return false;
}
Object dialect = getHibernateStore().getConfiguration().getProperties().get("dialect");
return "org.hibernate.dialect.MySQLDialect".equals(dialect)
|| "net.sf.hibernate.dialect.MySQLDialect".equals(dialect);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isMySQL
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
|
isMySQL
|
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 Descriptor getDescriptor(Class<? extends Describable> type) {
for( Descriptor d : getExtensionList(Descriptor.class) )
if(d.clazz==type)
return d;
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDescriptor
File: core/src/main/java/jenkins/model/Jenkins.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-2065
|
MEDIUM
| 4.3
|
jenkinsci/jenkins
|
getDescriptor
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean checkNode() {
// Drop the STREAM-START event.
if (parser.checkEvent(Event.ID.StreamStart)) {
parser.getEvent();
}
// If there are more documents available?
return !parser.checkEvent(Event.ID.StreamEnd);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkNode
File: src/main/java/org/yaml/snakeyaml/composer/Composer.java
Repository: snakeyaml
The code follows secure coding practices.
|
[
"CWE-776"
] |
CVE-2022-25857
|
HIGH
| 7.5
|
snakeyaml
|
checkNode
|
src/main/java/org/yaml/snakeyaml/composer/Composer.java
|
fc300780da21f4bb92c148bc90257201220cf174
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setStartUserSessionMessage(
@NonNull ComponentName admin, @Nullable CharSequence startUserSessionMessage) {
throwIfParentInstance("setStartUserSessionMessage");
try {
mService.setStartUserSessionMessage(admin, startUserSessionMessage);
} catch (RemoteException re) {
throw re.rethrowFromSystemServer();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setStartUserSessionMessage
File: core/java/android/app/admin/DevicePolicyManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
setStartUserSessionMessage
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("AndroidFrameworkCompatChange")
private boolean bigContentViewRequired() {
if (mContext.getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.S) {
return true;
}
// Notifications with contentView and without a bigContentView, style, or actions would
// not have an expanded state before S, so showing the standard template expanded state
// usually looks wrong, so we keep it simple and don't show the expanded state.
boolean exempt = mN.contentView != null && mN.bigContentView == null
&& mStyle == null && mActions.size() == 0;
return !exempt;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: bigContentViewRequired
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
bigContentViewRequired
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
public CompatibilityCacheFactory<K, V> setup() throws Exception {
createEmbeddedCache();
createHotRodCache();
createRestMemcachedCaches();
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setup
File: integrationtests/compatibility-mode-it/src/test/java/org/infinispan/it/compatibility/CompatibilityCacheFactory.java
Repository: infinispan
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2017-15089
|
MEDIUM
| 6.5
|
infinispan
|
setup
|
integrationtests/compatibility-mode-it/src/test/java/org/infinispan/it/compatibility/CompatibilityCacheFactory.java
|
69be66141eee7abb1c47d46f0a6b74b079709f4b
| 0
|
Analyze the following code function for security vulnerabilities
|
public void addParameter(ProfileParameter param) {
params.add(param);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addParameter
File: base/common/src/main/java/com/netscape/certsrv/profile/PolicyDefault.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
addParameter
|
base/common/src/main/java/com/netscape/certsrv/profile/PolicyDefault.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
private void crashApplication(ProcessRecord r, ApplicationErrorReport.CrashInfo crashInfo) {
long timeMillis = System.currentTimeMillis();
String shortMsg = crashInfo.exceptionClassName;
String longMsg = crashInfo.exceptionMessage;
String stackTrace = crashInfo.stackTrace;
if (shortMsg != null && longMsg != null) {
longMsg = shortMsg + ": " + longMsg;
} else if (shortMsg != null) {
longMsg = shortMsg;
}
AppErrorResult result = new AppErrorResult();
synchronized (this) {
if (mController != null) {
try {
String name = r != null ? r.processName : null;
int pid = r != null ? r.pid : Binder.getCallingPid();
int uid = r != null ? r.info.uid : Binder.getCallingUid();
if (!mController.appCrashed(name, pid,
shortMsg, longMsg, timeMillis, crashInfo.stackTrace)) {
if ("1".equals(SystemProperties.get(SYSTEM_DEBUGGABLE, "0"))
&& "Native crash".equals(crashInfo.exceptionClassName)) {
Slog.w(TAG, "Skip killing native crashed app " + name
+ "(" + pid + ") during testing");
} else {
Slog.w(TAG, "Force-killing crashed app " + name
+ " at watcher's request");
if (r != null) {
r.kill("crash", true);
} else {
// Huh.
Process.killProcess(pid);
Process.killProcessGroup(uid, pid);
}
}
return;
}
} catch (RemoteException e) {
mController = null;
Watchdog.getInstance().setActivityController(null);
}
}
final long origId = Binder.clearCallingIdentity();
// If this process is running instrumentation, finish it.
if (r != null && r.instrumentationClass != null) {
Slog.w(TAG, "Error in app " + r.processName
+ " running instrumentation " + r.instrumentationClass + ":");
if (shortMsg != null) Slog.w(TAG, " " + shortMsg);
if (longMsg != null) Slog.w(TAG, " " + longMsg);
Bundle info = new Bundle();
info.putString("shortMsg", shortMsg);
info.putString("longMsg", longMsg);
finishInstrumentationLocked(r, Activity.RESULT_CANCELED, info);
Binder.restoreCallingIdentity(origId);
return;
}
// Log crash in battery stats.
if (r != null) {
mBatteryStatsService.noteProcessCrash(r.processName, r.uid);
}
// If we can't identify the process or it's already exceeded its crash quota,
// quit right away without showing a crash dialog.
if (r == null || !makeAppCrashingLocked(r, shortMsg, longMsg, stackTrace)) {
Binder.restoreCallingIdentity(origId);
return;
}
Message msg = Message.obtain();
msg.what = SHOW_ERROR_MSG;
HashMap data = new HashMap();
data.put("result", result);
data.put("app", r);
msg.obj = data;
mHandler.sendMessage(msg);
Binder.restoreCallingIdentity(origId);
}
int res = result.get();
Intent appErrorIntent = null;
synchronized (this) {
if (r != null && !r.isolated) {
// XXX Can't keep track of crash time for isolated processes,
// since they don't have a persistent identity.
mProcessCrashTimes.put(r.info.processName, r.uid,
SystemClock.uptimeMillis());
}
if (res == AppErrorDialog.FORCE_QUIT_AND_REPORT) {
appErrorIntent = createAppErrorIntentLocked(r, timeMillis, crashInfo);
}
}
if (appErrorIntent != null) {
try {
mContext.startActivityAsUser(appErrorIntent, new UserHandle(r.userId));
} catch (ActivityNotFoundException e) {
Slog.w(TAG, "bug report receiver dissappeared", e);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: crashApplication
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3833
|
MEDIUM
| 4.3
|
android
|
crashApplication
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getTypeForDisplay() {
return "Perforce";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTypeForDisplay
File: config/config-api/src/main/java/com/thoughtworks/go/config/materials/perforce/P4MaterialConfig.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-77"
] |
CVE-2021-43286
|
MEDIUM
| 6.5
|
gocd
|
getTypeForDisplay
|
config/config-api/src/main/java/com/thoughtworks/go/config/materials/perforce/P4MaterialConfig.java
|
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void initModuleDataSources(ModuleConfig config) throws ServletException {
// :FIXME: Document UnavailableException?
if (log.isDebugEnabled()) {
log.debug("Initializing module path '" + config.getPrefix() +
"' data sources");
}
ServletContextWriter scw =
new ServletContextWriter(getServletContext());
DataSourceConfig dscs[] = config.findDataSourceConfigs();
if (dscs == null) {
dscs = new DataSourceConfig[0];
}
dataSources.setFast(false);
for (int i = 0; i < dscs.length; i++) {
if (log.isDebugEnabled()) {
log.debug("Initializing module path '" + config.getPrefix() +
"' data source '" + dscs[i].getKey() + "'");
}
DataSource ds = null;
try {
ds = (DataSource)
RequestUtils.applicationInstance(dscs[i].getType());
BeanUtils.populate(ds, dscs[i].getProperties());
ds.setLogWriter(scw);
} catch (Exception e) {
log.error(internal.getMessage("dataSource.init", dscs[i].getKey()), e);
throw new UnavailableException
(internal.getMessage("dataSource.init", dscs[i].getKey()));
}
getServletContext().setAttribute
(dscs[i].getKey() + config.getPrefix(), ds);
dataSources.put(dscs[i].getKey(), ds);
}
dataSources.setFast(true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initModuleDataSources
File: src/share/org/apache/struts/action/ActionServlet.java
Repository: kawasima/struts1-forever
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-20"
] |
CVE-2016-1181
|
MEDIUM
| 6.8
|
kawasima/struts1-forever
|
initModuleDataSources
|
src/share/org/apache/struts/action/ActionServlet.java
|
eda3a79907ed8fcb0387a0496d0cb14332f250e8
| 0
|
Analyze the following code function for security vulnerabilities
|
int getEffectiveUserId(int userId) {
UserManager um = UserManager.get(mContext);
if (um != null) {
final long callingIdentity = Binder.clearCallingIdentity();
userId = um.getCredentialOwnerProfile(userId);
Binder.restoreCallingIdentity(callingIdentity);
} else {
Slog.e(TAG, "Unable to acquire UserManager");
}
return userId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getEffectiveUserId
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
|
getEffectiveUserId
|
services/core/java/com/android/server/fingerprint/FingerprintService.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
private void postClearPatternRunnable() {
mLockPatternView.removeCallbacks(mClearPatternRunnable);
mLockPatternView.postDelayed(mClearPatternRunnable, WRONG_PATTERN_CLEAR_TIMEOUT_MS);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: postClearPatternRunnable
File: src/com/android/settings/password/ChooseLockPattern.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40117
|
HIGH
| 7.8
|
android
|
postClearPatternRunnable
|
src/com/android/settings/password/ChooseLockPattern.java
|
11815817de2f2d70fe842b108356a1bc75d44ffb
| 0
|
Analyze the following code function for security vulnerabilities
|
public void doSave() throws IOException {
if (file == null || !file.exists()) {
doSaveAs(Program.getInstance().getExtension());
}
else {
save();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doSave
File: umlet-swing/src/main/java/com/baselet/diagram/io/DiagramFileHandler.java
Repository: umlet
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000548
|
MEDIUM
| 6.8
|
umlet
|
doSave
|
umlet-swing/src/main/java/com/baselet/diagram/io/DiagramFileHandler.java
|
e1c4cc6ae692cc8d1c367460dbf79343e996f9bd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void onPostExecute(Map<Integer, Boolean> results) {
mHasIncompatibleAccounts = Collections.unmodifiableMap(results);
Slogf.i(LOG_TAG, "Finished calculating hasIncompatibleAccountsTask");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onPostExecute
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
|
onPostExecute
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public @Nullable ComponentName getProfileOwnerOrDeviceOwnerSupervisionComponent(
@NonNull UserHandle userHandle) {
return DevicePolicyManagerService.this.getProfileOwnerOrDeviceOwnerSupervisionComponent(
userHandle);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProfileOwnerOrDeviceOwnerSupervisionComponent
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2023-21284
|
MEDIUM
| 5.5
|
android
|
getProfileOwnerOrDeviceOwnerSupervisionComponent
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getInputEncoding() {
return doc.getInputEncoding();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInputEncoding
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
|
getInputEncoding
|
HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java
|
9b75694cedfa4825d4a2330abf2719d470c654cd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public final EntityFullJid getUser() {
return user;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUser
File: smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
Repository: igniterealtime/Smack
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2016-10027
|
MEDIUM
| 4.3
|
igniterealtime/Smack
|
getUser
|
smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
|
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void initLibraries(HashMap<String, String[]> libraries)
{
libraries.put("mockup",
new String[] { SHAPES_PATH + "/mockup/mxMockupButtons.js" });
libraries.put("arrows2", new String[] { SHAPES_PATH + "/mxArrows.js" });
libraries.put("bpmn",
new String[] { SHAPES_PATH + "/bpmn/mxBpmnShape2.js",
STENCIL_PATH + "/bpmn.xml" });
libraries.put("er", new String[] { SHAPES_PATH + "/er/mxER.js" });
libraries.put("ios",
new String[] { SHAPES_PATH + "/mockup/mxMockupiOS.js" });
libraries.put("rackGeneral",
new String[] { SHAPES_PATH + "/rack/mxRack.js",
STENCIL_PATH + "/rack/general.xml" });
libraries.put("rackF5", new String[] { STENCIL_PATH + "/rack/f5.xml" });
libraries.put("lean_mapping",
new String[] { SHAPES_PATH + "/mxLeanMap.js",
STENCIL_PATH + "/lean_mapping.xml" });
libraries.put("basic", new String[] { SHAPES_PATH + "/mxBasic.js",
STENCIL_PATH + "/basic.xml" });
libraries.put("ios7icons",
new String[] { STENCIL_PATH + "/ios7/icons.xml" });
libraries.put("ios7ui",
new String[] { SHAPES_PATH + "/ios7/mxIOS7Ui.js",
STENCIL_PATH + "/ios7/misc.xml" });
libraries.put("android", new String[] { SHAPES_PATH + "/mxAndroid.js",
STENCIL_PATH + "electrical/transmission" });
libraries.put("electrical/transmission",
new String[] { SHAPES_PATH + "/mxElectrical.js",
STENCIL_PATH + "/electrical/transmission.xml" });
libraries.put("mockup/buttons",
new String[] { SHAPES_PATH + "/mockup/mxMockupButtons.js" });
libraries.put("mockup/containers",
new String[] { SHAPES_PATH + "/mockup/mxMockupContainers.js" });
libraries.put("mockup/forms",
new String[] { SHAPES_PATH + "/mockup/mxMockupForms.js" });
libraries.put("mockup/graphics",
new String[] { SHAPES_PATH + "/mockup/mxMockupGraphics.js",
STENCIL_PATH + "/mockup/misc.xml" });
libraries.put("mockup/markup",
new String[] { SHAPES_PATH + "/mockup/mxMockupMarkup.js" });
libraries.put("mockup/misc",
new String[] { SHAPES_PATH + "/mockup/mxMockupMisc.js",
STENCIL_PATH + "/mockup/misc.xml" });
libraries.put("mockup/navigation",
new String[] { SHAPES_PATH + "/mockup/mxMockupNavigation.js",
STENCIL_PATH + "/mockup/misc.xml" });
libraries.put("mockup/text",
new String[] { SHAPES_PATH + "/mockup/mxMockupText.js" });
libraries.put("floorplan",
new String[] { SHAPES_PATH + "/mxFloorplan.js",
STENCIL_PATH + "/floorplan.xml" });
libraries.put("bootstrap",
new String[] { SHAPES_PATH + "/mxBootstrap.js",
STENCIL_PATH + "/bootstrap.xml" });
libraries.put("gmdl", new String[] { SHAPES_PATH + "/mxGmdl.js",
STENCIL_PATH + "/gmdl.xml" });
libraries.put("cabinets", new String[] { SHAPES_PATH + "/mxCabinets.js",
STENCIL_PATH + "/cabinets.xml" });
libraries.put("archimate",
new String[] { SHAPES_PATH + "/mxArchiMate.js" });
libraries.put("archimate3",
new String[] { SHAPES_PATH + "/mxArchiMate3.js" });
libraries.put("sysml", new String[] { SHAPES_PATH + "/mxSysML.js" });
libraries.put("eip", new String[] { SHAPES_PATH + "/mxEip.js",
STENCIL_PATH + "/eip.xml" });
libraries.put("networks", new String[] { SHAPES_PATH + "/mxNetworks.js",
STENCIL_PATH + "/networks.xml" });
libraries.put("aws3d", new String[] { SHAPES_PATH + "/mxAWS3D.js",
STENCIL_PATH + "/aws3d.xml" });
libraries.put("pid2inst",
new String[] { SHAPES_PATH + "/pid2/mxPidInstruments.js" });
libraries.put("pid2misc",
new String[] { SHAPES_PATH + "/pid2/mxPidMisc.js",
STENCIL_PATH + "/pid/misc.xml" });
libraries.put("pid2valves",
new String[] { SHAPES_PATH + "/pid2/mxPidValves.js" });
libraries.put("pidFlowSensors",
new String[] { STENCIL_PATH + "/pid/flow_sensors.xml" });
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initLibraries
File: src/main/java/com/mxgraph/online/EmbedServlet2.java
Repository: jgraph/drawio
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2022-1723
|
MEDIUM
| 5
|
jgraph/drawio
|
initLibraries
|
src/main/java/com/mxgraph/online/EmbedServlet2.java
|
7a68ebe22a64fe722704e9c4527791209fee2034
| 0
|
Analyze the following code function for security vulnerabilities
|
static public void previewParse(ImportingJob job, String format, ObjectNode optionObj, List<Exception> exceptions) {
Format record = ImportingManager.formatToRecord.get(format);
if (record == null || record.parser == null) {
// TODO: what to do?
return;
}
job.prepareNewProject();
record.parser.parse(
job.project,
job.metadata,
job,
job.getSelectedFileRecords(),
format,
100,
optionObj,
exceptions
);
job.project.update(); // update all internal models, indexes, caches, etc.
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: previewParse
File: main/src/com/google/refine/importing/ImportingUtilities.java
Repository: OpenRefine
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-19859
|
MEDIUM
| 4
|
OpenRefine
|
previewParse
|
main/src/com/google/refine/importing/ImportingUtilities.java
|
e243e73e4064de87a913946bd320fbbe246da656
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void asyncProcessMucInvitation(final String room, final String inviter,
final String reason, final String password) {
new Thread() {
public void run() {
processMucInvitation(room, inviter, reason, password);
}
}.start();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: asyncProcessMucInvitation
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
|
asyncProcessMucInvitation
|
src/org/yaxim/androidclient/service/SmackableImp.java
|
65a38dc77545d9568732189e86089390f0ceaf9f
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String inflate(byte[] binary) throws IOException
{
StringBuffer result = new StringBuffer();
InputStream in = new InflaterInputStream(
new ByteArrayInputStream(binary), new Inflater(true));
while (in.available() != 0)
{
byte[] buffer = new byte[IO_BUFFER_SIZE];
int len = in.read(buffer, 0, IO_BUFFER_SIZE);
if (len <= 0)
{
break;
}
result.append(new String(buffer, 0, len));
}
in.close();
return result.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: inflate
File: src/main/java/com/mxgraph/online/Utils.java
Repository: jgraph/drawio
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-3398
|
HIGH
| 7.5
|
jgraph/drawio
|
inflate
|
src/main/java/com/mxgraph/online/Utils.java
|
064729fec4262f9373d9fdcafda0be47cd18dd50
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String getXMLResource(String path) throws ContentError {
String sp = null;
if (path.endsWith(".xml") || path.indexOf(".") < 0) {
E.warning("getXMLReousrce should have a dot path, not " + path);
sp = path;
} else {
// E.info("replacing dots in " + path + " with " + fileSep);
sp = path.replaceAll("\\.", fileSep) + ".xml";
}
return getResource(sp);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getXMLResource
File: src/main/java/org/lemsml/jlems/io/util/JUtil.java
Repository: LEMS/jLEMS
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-4583
|
HIGH
| 8.8
|
LEMS/jLEMS
|
getXMLResource
|
src/main/java/org/lemsml/jlems/io/util/JUtil.java
|
8c224637d7d561076364a9e3c2c375daeaf463dc
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void main(String[] args) {
// Will serve all static file are under "/public" in classpath if the route isn't consumed by others routes.
staticFileLocation("/public");
get("/hello", (request, response) -> {
return "Hello World!";
});
}
|
Vulnerability Classification:
- CWE: CWE-22
- CVE: CVE-2018-9159
- Severity: MEDIUM
- CVSS Score: 5.0
Description: Fix for #981, patch 2
Function: main
File: src/test/java/spark/examples/staticresources/StaticResources.java
Repository: perwendel/spark
Fixed Code:
public static void main(String[] args) {
// Will serve all static file are under "/public" in classpath if the route isn't consumed by others routes.
staticFiles.location("/public");
get("/hello", (request, response) -> {
return "Hello World!";
});
}
|
[
"CWE-22"
] |
CVE-2018-9159
|
MEDIUM
| 5
|
perwendel/spark
|
main
|
src/test/java/spark/examples/staticresources/StaticResources.java
|
a221a864db28eb736d36041df2fa6eb8839fc5cd
| 1
|
Analyze the following code function for security vulnerabilities
|
public static List<ModuleLocation> parse(String[] remoteLocations, String[] localLocations, String[] depthOptions, boolean[] isIgnoreExternals) {
List<ModuleLocation> modules = new ArrayList<ModuleLocation>();
if (remoteLocations != null && localLocations != null) {
int entries = Math.min(remoteLocations.length, localLocations.length);
for (int i = 0; i < entries; i++) {
// the remote (repository) location
String remoteLoc = Util.nullify(remoteLocations[i]);
if (remoteLoc != null) {// null if skipped
remoteLoc = Util.removeTrailingSlash(remoteLoc.trim());
modules.add(new ModuleLocation(remoteLoc, Util.nullify(localLocations[i]),
depthOptions != null ? depthOptions[i] : null,
isIgnoreExternals != null && isIgnoreExternals[i]));
}
}
}
return modules;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parse
File: src/main/java/hudson/scm/SubversionSCM.java
Repository: jenkinsci/subversion-plugin
The code follows secure coding practices.
|
[
"CWE-255"
] |
CVE-2013-6372
|
LOW
| 2.1
|
jenkinsci/subversion-plugin
|
parse
|
src/main/java/hudson/scm/SubversionSCM.java
|
7d4562d6f7e40de04bbe29577b51c79f07d05ba6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void updateDemandIssueLink(EditTestCaseRequest testCase, Project project) {
// 添加方法体逻辑可重写改方法
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateDemandIssueLink
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
|
updateDemandIssueLink
|
test-track/backend/src/main/java/io/metersphere/service/issue/platform/AbstractIssuePlatform.java
|
d0f95b50737c941b29d507a4cc3545f2dc6ab121
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void setDefaultSaveRootPath(final String path) {
defaultSaveRootPath = path;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDefaultSaveRootPath
File: library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java
Repository: lingochamp/FileDownloader
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-11248
|
HIGH
| 7.5
|
lingochamp/FileDownloader
|
setDefaultSaveRootPath
|
library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java
|
b023cc081bbecdd2a9f3549a3ae5c12a9647ed7f
| 0
|
Analyze the following code function for security vulnerabilities
|
public void
setIOInputSource(ThreadContext context, IRubyObject data, IRubyObject url)
{
source = new InputSource();
ParserContext.setUrl(context, source, url);
source.setByteStream(new IOInputStream(data));
if (java_encoding != null) {
source.setEncoding(java_encoding);
}
}
|
Vulnerability Classification:
- CWE: CWE-241
- CVE: CVE-2022-29181
- Severity: MEDIUM
- CVSS Score: 6.4
Description: fix: {HTML4,XML}::SAX::{Parser,ParserContext} check arg types
Previously, arguments of the wrong type might cause segfault on CRuby.
Function: setIOInputSource
File: ext/java/nokogiri/internals/ParserContext.java
Repository: sparklemotion/nokogiri
Fixed Code:
public void
setIOInputSource(ThreadContext context, IRubyObject data, IRubyObject url)
{
source = new InputSource();
ParserContext.setUrl(context, source, url);
Ruby ruby = context.getRuntime();
if (!(data.respondsTo("read"))) {
throw ruby.newTypeError("must respond to :read");
}
source.setByteStream(new IOInputStream(data));
if (java_encoding != null) {
source.setEncoding(java_encoding);
}
}
|
[
"CWE-241"
] |
CVE-2022-29181
|
MEDIUM
| 6.4
|
sparklemotion/nokogiri
|
setIOInputSource
|
ext/java/nokogiri/internals/ParserContext.java
|
db05ba9a1bd4b90aa6c76742cf6102a7c7297267
| 1
|
Analyze the following code function for security vulnerabilities
|
public void apply(XmlPullParser parser, int userId) throws IOException, XmlPullParserException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: apply
File: services/core/java/com/android/server/pm/PackageManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2016-2497
|
HIGH
| 7.5
|
android
|
apply
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setPhotoId(Preference pref, UserInfo user) {
Bitmap bitmap = mUserIcons.get(user.id);
if (bitmap != null) {
pref.setIcon(encircle(bitmap));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setPhotoId
File: src/com/android/settings/users/UserSettings.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3889
|
HIGH
| 7.2
|
android
|
setPhotoId
|
src/com/android/settings/users/UserSettings.java
|
bd5d5176c74021e8cf4970f93f273ba3023c3d72
| 0
|
Analyze the following code function for security vulnerabilities
|
public void uninstallAllUserCaCerts(@Nullable ComponentName admin) {
throwIfParentInstance("uninstallAllUserCaCerts");
if (mService != null) {
try {
mService.uninstallCaCerts(admin, mContext.getPackageName(),
new TrustedCertificateStore().userAliases() .toArray(new String[0]));
} catch (RemoteException re) {
throw re.rethrowFromSystemServer();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: uninstallAllUserCaCerts
File: core/java/android/app/admin/DevicePolicyManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
uninstallAllUserCaCerts
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public Builder setModel(FileDownloadModel model) {
this.model = model;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setModel
File: library/src/main/java/com/liulishuo/filedownloader/download/DownloadLaunchRunnable.java
Repository: lingochamp/FileDownloader
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-11248
|
HIGH
| 7.5
|
lingochamp/FileDownloader
|
setModel
|
library/src/main/java/com/liulishuo/filedownloader/download/DownloadLaunchRunnable.java
|
b023cc081bbecdd2a9f3549a3ae5c12a9647ed7f
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String documentToString(Document document) {
StringOutputStream s = new StringOutputStream();
printNode(s, document, true, true);
return s.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: documentToString
File: src/edu/stanford/nlp/time/XMLUtils.java
Repository: stanfordnlp/CoreNLP
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-3869
|
MEDIUM
| 5
|
stanfordnlp/CoreNLP
|
documentToString
|
src/edu/stanford/nlp/time/XMLUtils.java
|
5d83f1e8482ca304db8be726cad89554c88f136a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable
@VisibleForTesting
PackageInfo injectPackageInfoWithUninstalled(String packageName, @UserIdInt int userId,
boolean getSignatures) {
final long start = getStatStartTime();
final long token = injectClearCallingIdentity();
try {
return mIPackageManager.getPackageInfo(packageName, PACKAGE_MATCH_FLAGS
| (getSignatures ? PackageManager.GET_SIGNING_CERTIFICATES : 0), userId);
} catch (RemoteException e) {
// Shouldn't happen.
Slog.wtf(TAG, "RemoteException", e);
return null;
} finally {
injectRestoreCallingIdentity(token);
logDurationStat(
(getSignatures ? Stats.GET_PACKAGE_INFO_WITH_SIG : Stats.GET_PACKAGE_INFO),
start);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: injectPackageInfoWithUninstalled
File: services/core/java/com/android/server/pm/ShortcutService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40079
|
HIGH
| 7.8
|
android
|
injectPackageInfoWithUninstalled
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setCurrentUser(int newUserId) {
KeyguardUpdateMonitor.setCurrentUser(newUserId);
synchronized (this) {
notifyTrustedChangedLocked(mUpdateMonitor.getUserHasTrust(newUserId));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setCurrentUser
File: packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21267
|
MEDIUM
| 5.5
|
android
|
setCurrentUser
|
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
|
d18d8b350756b0e89e051736c1f28744ed31e93a
| 0
|
Analyze the following code function for security vulnerabilities
|
private Object getChildTextValue(final Node node) {
for (Node child : asIterable(node.getChildNodes())) {
if (XMP.NS_RDF.equals(child.getNamespaceURI()) && "Alt".equals(child.getLocalName())) {
// Support for <rdf:Alt><rdf:li> -> return a Map<String, Object> keyed on xml:lang
Map<String, Object> alternatives = new LinkedHashMap<String, Object>();
for (Node alternative : asIterable(child.getChildNodes())) {
if (XMP.NS_RDF.equals(alternative.getNamespaceURI()) && "li".equals(alternative.getLocalName())) {
NamedNodeMap attributes = alternative.getAttributes();
Node key = attributes.getNamedItem("xml:lang");
alternatives.put(key == null ? null : key.getTextContent(), getChildTextValue(alternative));
}
}
return alternatives;
}
else if (XMP.NS_RDF.equals(child.getNamespaceURI()) && ("Seq".equals(child.getLocalName()) || "Bag".equals(child.getLocalName()))) {
// Support for <rdf:Seq><rdf:li> -> return array
// Support for <rdf:Bag><rdf:li> -> return array/unordered collection (how can a serialized collection not have order?)
List<Object> seq = new ArrayList<Object>();
for (Node sequence : asIterable(child.getChildNodes())) {
if (XMP.NS_RDF.equals(sequence.getNamespaceURI()) && "li".equals(sequence.getLocalName())) {
Object value = getChildTextValue(sequence);
seq.add(value);
}
}
// TODO: Strictly a bag should not be a list, but there's no Bag type (or similar) in Java.
// Consider something like Google collections Multiset or Apache commons Bag (the former seems more well-defined)
// Note: Collection does not have defined equals() semantics, and so using
// Collections.unmodifiableCollection() doesn't work for comparing values (uses Object.equals())
return Collections.unmodifiableList(seq);
}
}
// Need to support rdf:parseType="Resource" here as well...
if (isResourceType(node)) {
return parseAsResource(node);
}
Node child = node.getFirstChild();
String strVal = child != null ? child.getNodeValue() : null;
return strVal != null ? strVal.trim() : "";
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2021-23792
- Severity: HIGH
- CVSS Score: 7.5
Description: Avoid fetching external resources in XMPReader.
Function: getChildTextValue
File: imageio/imageio-metadata/src/main/java/com/twelvemonkeys/imageio/metadata/xmp/XMPReader.java
Repository: haraldk/TwelveMonkeys
Fixed Code:
private Object getChildTextValue(final Node node) {
for (Node child : asIterable(node.getChildNodes())) {
if (XMP.NS_RDF.equals(child.getNamespaceURI()) && "Alt".equals(child.getLocalName())) {
// Support for <rdf:Alt><rdf:li> -> return a Map<String, Object> keyed on xml:lang
Map<String, Object> alternatives = new LinkedHashMap<>();
for (Node alternative : asIterable(child.getChildNodes())) {
if (XMP.NS_RDF.equals(alternative.getNamespaceURI()) && "li".equals(alternative.getLocalName())) {
NamedNodeMap attributes = alternative.getAttributes();
Node key = attributes.getNamedItem("xml:lang");
alternatives.put(key == null ? null : key.getTextContent(), getChildTextValue(alternative));
}
}
return alternatives;
}
else if (XMP.NS_RDF.equals(child.getNamespaceURI()) && ("Seq".equals(child.getLocalName()) || "Bag".equals(child.getLocalName()))) {
// Support for <rdf:Seq><rdf:li> -> return array
// Support for <rdf:Bag><rdf:li> -> return array/unordered collection (how can a serialized collection not have order?)
List<Object> seq = new ArrayList<>();
for (Node sequence : asIterable(child.getChildNodes())) {
if (XMP.NS_RDF.equals(sequence.getNamespaceURI()) && "li".equals(sequence.getLocalName())) {
Object value = getChildTextValue(sequence);
seq.add(value);
}
}
// TODO: Strictly a bag should not be a list, but there's no Bag type (or similar) in Java.
// Consider something like Google collections Multiset or Apache commons Bag (the former seems more well-defined)
// Note: Collection does not have defined equals() semantics, and so using
// Collections.unmodifiableCollection() doesn't work for comparing values (uses Object.equals())
return Collections.unmodifiableList(seq);
}
}
// Need to support rdf:parseType="Resource" here as well...
if (isResourceType(node)) {
return parseAsResource(node);
}
Node child = node.getFirstChild();
String strVal = child != null ? child.getNodeValue() : null;
return strVal != null ? strVal.trim() : "";
}
|
[
"CWE-611"
] |
CVE-2021-23792
|
HIGH
| 7.5
|
haraldk/TwelveMonkeys
|
getChildTextValue
|
imageio/imageio-metadata/src/main/java/com/twelvemonkeys/imageio/metadata/xmp/XMPReader.java
|
da4efe98bf09e1cce91b7633cb251958a200fc80
| 1
|
Analyze the following code function for security vulnerabilities
|
public void write(int c) throws IOException {
write(fd, c);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: write
File: classpath/java/io/FileOutputStream.java
Repository: ReadyTalk/avian
The code follows secure coding practices.
|
[
"CWE-190",
"CWE-787"
] |
CVE-2020-28371
|
HIGH
| 7.5
|
ReadyTalk/avian
|
write
|
classpath/java/io/FileOutputStream.java
|
0871979b298add320ca63f65060acb7532c8a0dd
| 0
|
Analyze the following code function for security vulnerabilities
|
private void stopClientMode() {
handleNetworkDisconnect(false,
WifiStatsLog.WIFI_DISCONNECT_REPORTED__FAILURE_CODE__WIFI_DISABLED);
// exiting supplicant started state is now only applicable to client mode
mWifiDiagnostics.stopLogging(mInterfaceName);
mMboOceController.disable();
if (mIpClient != null && mIpClient.shutdown()) {
// Block to make sure IpClient has really shut down, lest cleanup
// race with, say, bringup code over in tethering.
mIpClientCallbacks.awaitShutdown();
mIpClientCallbacks = null;
mIpClient = null;
}
deregisterForWifiMonitorEvents(); // uses mInterfaceName, must call before nulling out
// TODO: b/79504296 This broadcast has been deprecated and should be removed
sendSupplicantConnectionChangedBroadcast(false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: stopClientMode
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
|
stopClientMode
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
void reportUidInfoMessageLocked(String tag, String msg, int uid) {
Slog.i(TAG, msg);
if (mCurOomAdjObserver != null && uid == mCurOomAdjUid) {
mUiHandler.obtainMessage(DISPATCH_OOM_ADJ_OBSERVER_MSG, msg).sendToTarget();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: reportUidInfoMessageLocked
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
|
reportUidInfoMessageLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@GET
@Path("version")
@Operation(summary = "The version of the Course Elements Web Service", description = "The version of the Course Elements Web Service")
@ApiResponse(responseCode = "200", description = "The version of this specific Web Service")
@Produces(MediaType.TEXT_PLAIN)
public Response getVersion() {
return Response.ok(VERSION).build();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getVersion
File: src/main/java/org/olat/restapi/repository/course/CourseElementWebService.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-41242
|
HIGH
| 7.9
|
OpenOLAT
|
getVersion
|
src/main/java/org/olat/restapi/repository/course/CourseElementWebService.java
|
c450df7d7ffe6afde39ebca6da9136f1caa16ec4
| 0
|
Analyze the following code function for security vulnerabilities
|
private void bindLargeIcon(RemoteViews contentView, @NonNull StandardTemplateParams p,
@NonNull TemplateBindResult result) {
if (mN.mLargeIcon == null && mN.largeIcon != null) {
mN.mLargeIcon = Icon.createWithBitmap(mN.largeIcon);
}
// Determine the left and right icons
Icon leftIcon = p.mHideLeftIcon ? null : mN.mLargeIcon;
Icon rightIcon = p.mHideRightIcon ? null
: (p.mPromotedPicture != null ? p.mPromotedPicture : mN.mLargeIcon);
// Apply the left icon (without duplicating the bitmap)
if (leftIcon != rightIcon || leftIcon == null) {
// If the leftIcon is explicitly hidden or different from the rightIcon, then set it
// explicitly and make sure it won't take the right_icon drawable.
contentView.setImageViewIcon(R.id.left_icon, leftIcon);
contentView.setIntTag(R.id.left_icon, R.id.tag_uses_right_icon_drawable, 0);
} else {
// If the leftIcon equals the rightIcon, just set the flag to use the right_icon
// drawable. This avoids the view having two copies of the same bitmap.
contentView.setIntTag(R.id.left_icon, R.id.tag_uses_right_icon_drawable, 1);
}
// Always calculate dimens to populate `result` for the GONE case
boolean isPromotedPicture = p.mPromotedPicture != null;
calculateRightIconDimens(rightIcon, isPromotedPicture, result);
// Bind the right icon
if (rightIcon != null) {
contentView.setViewLayoutWidth(R.id.right_icon,
result.mRightIconWidthDp, TypedValue.COMPLEX_UNIT_DIP);
contentView.setViewLayoutHeight(R.id.right_icon,
result.mRightIconHeightDp, TypedValue.COMPLEX_UNIT_DIP);
contentView.setViewVisibility(R.id.right_icon, View.VISIBLE);
contentView.setImageViewIcon(R.id.right_icon, rightIcon);
contentView.setIntTag(R.id.right_icon, R.id.tag_keep_when_showing_left_icon,
isPromotedPicture ? 1 : 0);
processLargeLegacyIcon(rightIcon, contentView, p);
} else {
// The "reset" doesn't clear the drawable, so we do it here. This clear is
// important because the presence of a drawable in this view (regardless of the
// visibility) is used by NotificationGroupingUtil to set the visibility.
contentView.setImageViewIcon(R.id.right_icon, null);
contentView.setIntTag(R.id.right_icon, R.id.tag_keep_when_showing_left_icon, 0);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: bindLargeIcon
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
bindLargeIcon
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
private PowerManagerInternal getPowerManagerInternal() {
return mInjector.getPowerManagerInternal();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPowerManagerInternal
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2023-21284
|
MEDIUM
| 5.5
|
android
|
getPowerManagerInternal
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean addPackage(String x_app_id, String content_type,
String package_name, String class_name,
int app_type, boolean need_signature, boolean further_processing) {
WapPushManDBHelper dbh = getDatabase(mContext);
SQLiteDatabase db = dbh.getWritableDatabase();
WapPushManDBHelper.queryData lastapp = dbh.queryLastApp(db, x_app_id, content_type);
boolean ret = false;
boolean insert = false;
int sq = 0;
if (!appTypeCheck(app_type)) {
Log.w(LOG_TAG, "invalid app_type " + app_type + ". app_type must be "
+ WapPushManagerParams.APP_TYPE_ACTIVITY + " or "
+ WapPushManagerParams.APP_TYPE_SERVICE);
return false;
}
if (lastapp == null) {
insert = true;
sq = 0;
} else if (!lastapp.packageName.equals(package_name) ||
!lastapp.className.equals(class_name)) {
insert = true;
sq = lastapp.installOrder + 1;
}
if (insert) {
ContentValues values = new ContentValues();
values.put("x_wap_application", x_app_id);
values.put("content_type", content_type);
values.put("package_name", package_name);
values.put("class_name", class_name);
values.put("app_type", app_type);
values.put("need_signature", need_signature ? 1 : 0);
values.put("further_processing", further_processing ? 1 : 0);
values.put("install_order", sq);
db.insert(APPID_TABLE_NAME, null, values);
if (LOCAL_LOGV) Log.v(LOG_TAG, "add:" + x_app_id + ":" + content_type
+ " " + package_name + "." + class_name
+ ", newsq:" + sq);
ret = true;
}
db.close();
return ret;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addPackage
File: packages/WAPPushManager/src/com/android/smspush/WapPushManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2014-8507
|
HIGH
| 7.5
|
android
|
addPackage
|
packages/WAPPushManager/src/com/android/smspush/WapPushManager.java
|
48ed835468c6235905459e6ef7df032baf3e4df6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void cancelTaskWindowTransition(int taskId) {
mActivityTaskManager.cancelTaskWindowTransition(taskId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cancelTaskWindowTransition
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
|
cancelTaskWindowTransition
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.