instruction
string
input
string
output
string
cwe_ids
list
cve_id
string
severity
string
cvss_score
float64
repo_name
string
func_name
string
file_path
string
commit_hash
string
is_vulnerable
int64
Analyze the following code function for security vulnerabilities
@Override public List<com.sk89q.worldedit.entity.Entity> getEntities(Region region) { World world = getWorld(); List<Entity> ents = TaskManager.taskManager().sync(world::getEntities); List<com.sk89q.worldedit.entity.Entity> entities = new ArrayList<>(); for (Entity ent : ents) { if (region.contains(BukkitAdapter.asBlockVector(ent.getLocation()))) { entities.add(BukkitAdapter.adapt(ent)); } } return entities; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getEntities File: worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java Repository: IntellectualSites/FastAsyncWorldEdit The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-35925
MEDIUM
5.5
IntellectualSites/FastAsyncWorldEdit
getEntities
worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java
3a8dfb4f7b858a439c35f7af1d56d21f796f61f5
0
Analyze the following code function for security vulnerabilities
@Override public boolean isPulsingBlocked() { return mFingerprintUnlockController.getMode() == FingerprintUnlockController.MODE_WAKE_AND_UNLOCK; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isPulsingBlocked File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2017-0822
HIGH
7.5
android
isPulsingBlocked
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
public void reset() { mView.reset(); mSecurityViewFlipperController.reset(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: reset File: packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21245
HIGH
7.8
android
reset
packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java
a33159e8cb297b9eee6fa5c63c0e343d05fad622
0
Analyze the following code function for security vulnerabilities
protected static Map<String, Object> getResultMap(boolean success) { Map<String, Object> map = new HashMap<>(); if (success) { map.put("state", "SUCCESS"); } else { map.put("state", "error"); } return map; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getResultMap File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/controller/admin/sys/UeditorAdminController.java Repository: sanluan/PublicCMS The code follows secure coding practices.
[ "CWE-918" ]
CVE-2021-27693
CRITICAL
9.8
sanluan/PublicCMS
getResultMap
publiccms-parent/publiccms-core/src/main/java/com/publiccms/controller/admin/sys/UeditorAdminController.java
0f4c4872914b6a71305e121a7d9a19c07cde0338
0
Analyze the following code function for security vulnerabilities
protected void deleteDocument() throws XWikiException { getXWikiContext().getWiki().deleteDocument(this.doc, getXWikiContext()); this.initialDoc = this.doc; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: deleteDocument File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2022-23615
MEDIUM
5.5
xwiki/xwiki-platform
deleteDocument
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
0
Analyze the following code function for security vulnerabilities
private IdentityApplicationManagementServerException buildServerException(String message) { return new IdentityApplicationManagementServerException(UNEXPECTED_SERVER_ERROR.getCode(), message); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: buildServerException File: components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java Repository: wso2/carbon-identity-framework The code follows secure coding practices.
[ "CWE-611" ]
CVE-2021-42646
MEDIUM
6.4
wso2/carbon-identity-framework
buildServerException
components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
e9119883ee02a884f3c76c7bbc4022a4f4c58fc0
0
Analyze the following code function for security vulnerabilities
@Override public String unzip(File zipfile, String destDir) throws IOException { // 2 // does the zip file exist and can we write to the temp directory if (!zipfile.canRead()) { log.error("Zip file '" + zipfile.getAbsolutePath() + "' does not exist, or is not readable."); } String destinationDir = destDir; if (destinationDir == null){ destinationDir = tempWorkDir; } File tempdir = new File(destinationDir); if (!tempdir.isDirectory()) { log.error("'" + ConfigurationManager.getProperty("org.dspace.app.itemexport.work.dir") + "' as defined by the key 'org.dspace.app.itemexport.work.dir' in dspace.cfg " + "is not a valid directory"); } if (!tempdir.exists() && !tempdir.mkdirs()) { log.error("Unable to create temporary directory: " + tempdir.getAbsolutePath()); } String sourcedir = destinationDir + System.getProperty("file.separator") + zipfile.getName(); String zipDir = destinationDir + System.getProperty("file.separator") + zipfile.getName() + System.getProperty("file.separator"); // 3 String sourceDirForZip = sourcedir; ZipFile zf = new ZipFile(zipfile); ZipEntry entry; Enumeration<? extends ZipEntry> entries = zf.entries(); while (entries.hasMoreElements()) { entry = entries.nextElement(); if (entry.isDirectory()) { if (!new File(zipDir + entry.getName()).mkdir()) { log.error("Unable to create contents directory: " + zipDir + entry.getName()); } } else { System.out.println("Extracting file: " + entry.getName()); log.info("Extracting file: " + entry.getName()); int index = entry.getName().lastIndexOf('/'); if (index == -1) { // Was it created on Windows instead? index = entry.getName().lastIndexOf('\\'); } if (index > 0) { File dir = new File(zipDir + entry.getName().substring(0, index)); if (!dir.exists() && !dir.mkdirs()) { log.error("Unable to create directory: " + dir.getAbsolutePath()); } //Entries could have too many directories, and we need to adjust the sourcedir // file1.zip (SimpleArchiveFormat / item1 / contents|dublin_core|... // SimpleArchiveFormat / item2 / contents|dublin_core|... // or // file2.zip (item1 / contents|dublin_core|... // item2 / contents|dublin_core|... //regex supports either windows or *nix file paths String[] entryChunks = entry.getName().split("/|\\\\"); if(entryChunks.length > 2) { if(StringUtils.equals(sourceDirForZip, sourcedir)) { sourceDirForZip = sourcedir + "/" + entryChunks[0]; } } } byte[] buffer = new byte[1024]; int len; InputStream in = zf.getInputStream(entry); BufferedOutputStream out = new BufferedOutputStream( new FileOutputStream(zipDir + entry.getName())); while((len = in.read(buffer)) >= 0) { out.write(buffer, 0, len); } in.close(); out.close(); } } //Close zip file zf.close(); if(!StringUtils.equals(sourceDirForZip, sourcedir)) { sourcedir = sourceDirForZip; System.out.println("Set sourceDir using path inside of Zip: " + sourcedir); log.info("Set sourceDir using path inside of Zip: " + sourcedir); } return sourcedir; }
Vulnerability Classification: - CWE: CWE-22 - CVE: CVE-2022-31195 - Severity: HIGH - CVSS Score: 7.2 Description: [DS-4131] Fix zip import handling to avoid path traversal exploit Function: unzip File: dspace-api/src/main/java/org/dspace/app/itemimport/ItemImportServiceImpl.java Repository: DSpace Fixed Code: @Override public String unzip(File zipfile, String destDir) throws IOException { // 2 // does the zip file exist and can we write to the temp directory if (!zipfile.canRead()) { log.error("Zip file '" + zipfile.getAbsolutePath() + "' does not exist, or is not readable."); } log.debug("Extracting zip at " + zipfile.getAbsolutePath()); String destinationDir = destDir; if (destinationDir == null){ destinationDir = tempWorkDir; } log.debug("Using directory " + destinationDir + " for zip extraction. (destDir arg is " + destDir + ", tempWorkDir is " + tempWorkDir + ")"); File tempdir = new File(destinationDir); if (!tempdir.isDirectory()) { log.error("'" + ConfigurationManager.getProperty("org.dspace.app.batchitemexport.work.dir") + "' as defined by the key 'org.dspace.app.batchitemexport.work.dir' in dspace.cfg " + "is not a valid directory"); } if (!tempdir.exists() && !tempdir.mkdirs()) { log.error("Unable to create temporary directory: " + tempdir.getAbsolutePath()); } if(!destinationDir.endsWith(System.getProperty("file.separator"))) { destinationDir += System.getProperty("file.separator"); } String sourcedir = destinationDir + zipfile.getName(); String zipDir = destinationDir + zipfile.getName() + System.getProperty("file.separator"); log.debug("zip directory to use is " + zipDir); // 3 String sourceDirForZip = sourcedir; ZipFile zf = new ZipFile(zipfile); ZipEntry entry; Enumeration<? extends ZipEntry> entries = zf.entries(); while (entries.hasMoreElements()) { entry = entries.nextElement(); // Check that the true path to extract files is never outside allowed temp directories // without creating any actual files on disk log.debug("Inspecting entry name: " + entry.getName() + " for path traversal security"); File potentialExtract = new File(zipDir + entry.getName()); String canonicalPath = potentialExtract.getCanonicalPath(); log.debug("Canonical path to potential File is " + canonicalPath); if(!canonicalPath.startsWith(zipDir)) { log.error("Rejecting zip file: " + zipfile.getName() + " as it contains an entry that would be extracted " + "outside the temporary unzip directory: " + canonicalPath); throw new IOException("Error extracting " + zipfile + ": Canonical path of zip entry: " + entry.getName() + " (" + canonicalPath + ") does not start with permissible temp unzip directory (" + destinationDir + ")"); } if (entry.isDirectory()) { // Log error and throw IOException if a directory entry could not be created File newDir = new File(zipDir + entry.getName()); if (!newDir.mkdirs()) { log.error("Unable to create contents directory: " + zipDir + entry.getName()); throw new IOException("Unable to create contents directory: " + zipDir + entry.getName()); } } else { System.out.println("Extracting file: " + entry.getName()); log.info("Extracting file: " + entry.getName()); int index = entry.getName().lastIndexOf('/'); log.debug("Index of " + entry.getName() + " is " + index); if (index == -1) { // Was it created on Windows instead? index = entry.getName().lastIndexOf('\\'); } if (index > 0) { File dir = new File(zipDir + entry.getName().substring(0, index)); if (!dir.exists() && !dir.mkdirs()) { log.error("Unable to create directory: " + dir.getAbsolutePath()); } //Entries could have too many directories, and we need to adjust the sourcedir // file1.zip (SimpleArchiveFormat / item1 / contents|dublin_core|... // SimpleArchiveFormat / item2 / contents|dublin_core|... // or // file2.zip (item1 / contents|dublin_core|... // item2 / contents|dublin_core|... //regex supports either windows or *nix file paths String[] entryChunks = entry.getName().split("/|\\\\"); if(entryChunks.length > 2) { if(StringUtils.equals(sourceDirForZip, sourcedir)) { sourceDirForZip = sourcedir + "/" + entryChunks[0]; } } } byte[] buffer = new byte[1024]; int len; InputStream in = zf.getInputStream(entry); log.debug("Reading " + zipDir + entry.getName() + " into InputStream"); BufferedOutputStream out = new BufferedOutputStream( new FileOutputStream(zipDir + entry.getName())); while((len = in.read(buffer)) >= 0) { out.write(buffer, 0, len); } in.close(); out.close(); } } //Close zip file zf.close(); if(!StringUtils.equals(sourceDirForZip, sourcedir)) { sourcedir = sourceDirForZip; System.out.println("Set sourceDir using path inside of Zip: " + sourcedir); log.info("Set sourceDir using path inside of Zip: " + sourcedir); } return sourcedir; }
[ "CWE-22" ]
CVE-2022-31195
HIGH
7.2
DSpace
unzip
dspace-api/src/main/java/org/dspace/app/itemimport/ItemImportServiceImpl.java
7af52a0883a9dbc475cf3001f04ed11b24c8a4c0
1
Analyze the following code function for security vulnerabilities
@Override public List<KBTemplate> filterFindByGroupId(long groupId, int start, int end) { return filterFindByGroupId(groupId, start, end, null); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: filterFindByGroupId File: modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java Repository: brianchandotcom/liferay-portal The code follows secure coding practices.
[ "CWE-79" ]
CVE-2017-12647
MEDIUM
4.3
brianchandotcom/liferay-portal
filterFindByGroupId
modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java
ef93d984be9d4d478a5c4b1ca9a86f4e80174774
0
Analyze the following code function for security vulnerabilities
@Override public Iterator<CharSequence> valueCharSequenceIterator(CharSequence name) { return headers.valueIterator(name); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: valueCharSequenceIterator File: codec-http/src/main/java/io/netty/handler/codec/http/DefaultHttpHeaders.java Repository: netty The code follows secure coding practices.
[ "CWE-444" ]
CVE-2021-43797
MEDIUM
4.3
netty
valueCharSequenceIterator
codec-http/src/main/java/io/netty/handler/codec/http/DefaultHttpHeaders.java
07aa6b5938a8b6ed7a6586e066400e2643897323
0
Analyze the following code function for security vulnerabilities
public void collectChanges(Consumer<NodeChange> collector) { boolean isAttached = isAttached(); if (isAttached != wasAttached) { if (isAttached) { collector.accept(new NodeAttachChange(this)); // Make all changes show up as if the node was recently attached clearChanges(); forEachFeature(NodeFeature::generateChangesFromEmpty); } else { collector.accept(new NodeDetachChange(this)); } wasAttached = isAttached; } if (!isAttached()) { return; } if (isInactive()) { if (isInitialChanges) { // send only required (reported) features updates Stream<NodeFeature> initialFeatures = Stream .concat(featureSet.mappings.keySet().stream() .filter(this::isReportedFeature) .map(this::getFeature), getDisallowFeatures()); doCollectChanges(collector, initialFeatures); } else { doCollectChanges(collector, getDisallowFeatures()); } } else { doCollectChanges(collector, getInitializedFeatures()); } }
Vulnerability Classification: - CWE: CWE-200 - CVE: CVE-2023-25499 - Severity: MEDIUM - CVSS Score: 6.5 Description: Disable sending updates to client for effectively non-visible nodes Function: collectChanges File: flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java Repository: vaadin/flow Fixed Code: public void collectChanges(Consumer<NodeChange> collector) { boolean isAttached = isAttached(); if (isAttached != wasAttached) { if (isAttached) { collector.accept(new NodeAttachChange(this)); // Make all changes show up as if the node was recently attached clearChanges(); forEachFeature(NodeFeature::generateChangesFromEmpty); } else { collector.accept(new NodeDetachChange(this)); } wasAttached = isAttached; } if (!isAttached()) { return; } if (!isVisible()) { doCollectChanges(collector, getDisallowFeatures()); return; } if (isInactive()) { if (isInitialChanges) { // send only required (reported) features updates Stream<NodeFeature> initialFeatures = Stream .concat(featureSet.mappings.keySet().stream() .filter(this::isReportedFeature) .map(this::getFeature), getDisallowFeatures()); doCollectChanges(collector, initialFeatures); } else { doCollectChanges(collector, getDisallowFeatures()); } } else { doCollectChanges(collector, getInitializedFeatures()); } }
[ "CWE-200" ]
CVE-2023-25499
MEDIUM
6.5
vaadin/flow
collectChanges
flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java
1b195225bef5b7600d741e89fef80dd200c73e89
1
Analyze the following code function for security vulnerabilities
public void userPresent(int userId) { try { getLockSettings().userPresent(userId); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: userPresent File: core/java/com/android/internal/widget/LockPatternUtils.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3908
MEDIUM
4.3
android
userPresent
core/java/com/android/internal/widget/LockPatternUtils.java
96daf7d4893f614714761af2d53dfb93214a32e4
0
Analyze the following code function for security vulnerabilities
public boolean existAnyRecording(List<String> idList) { List<String> publishList = getAllRecordingIds(publishedDir); List<String> unpublishList = getAllRecordingIds(unpublishedDir); for (String id : idList) { if (publishList.contains(id) || unpublishList.contains(id)) { return true; } } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: existAnyRecording 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
existAnyRecording
bbb-common-web/src/main/java/org/bigbluebutton/api/RecordingService.java
b21ca8355a57286a1e6df96984b3a4c57679a463
0
Analyze the following code function for security vulnerabilities
@Override public List<XWikiDocument> searchDocuments(String wheresql, boolean distinctbylanguage, boolean customMapping, boolean checkRight, int nb, int start, List<?> parameterValues, XWikiContext inputxcontext) throws XWikiException { XWikiContext context = getExecutionXContext(inputxcontext, true); // Search documents List documentDatas = new ArrayList<>(); boolean bTransaction = true; MonitorPlugin monitor = Util.getMonitorPlugin(context); try { String sql; if (distinctbylanguage) { sql = createSQLQuery("select distinct doc.fullName, doc.language", wheresql); } else { sql = createSQLQuery("select distinct doc.fullName", wheresql); } // Start monitoring timer if (monitor != null) { monitor.startTimer(HINT, sql); } checkHibernate(context); if (bTransaction) { // Inject everything until we know what's needed SessionFactory sfactory = customMapping ? injectCustomMappingsInSessionFactory(context) : getSessionFactory(); bTransaction = beginTransaction(sfactory, context); } try { Session session = getSession(context); Query query = createQuery(session, filterSQL(sql), parameterValues); if (start > 0) { query.setFirstResult(start); } if (nb > 0) { query.setMaxResults(nb); } documentDatas.addAll(query.list()); if (bTransaction) { endTransaction(context, false); } } finally { if (bTransaction) { try { endTransaction(context, false); } catch (Exception e) { } } } } catch (Exception e) { throw new XWikiException(XWikiException.MODULE_XWIKI_STORE, XWikiException.ERROR_XWIKI_STORE_HIBERNATE_SEARCH, "Exception while searching documents with SQL [{0}]", e, new Object[] {wheresql}); } finally { restoreExecutionXContext(); // End monitoring timer if (monitor != null) { monitor.endTimer(HINT); } } // Resolve documents. We use two separated sessions because rights service could need to switch database to // check rights List<XWikiDocument> documents = new ArrayList<>(); WikiReference currentWikiReference = new WikiReference(context.getWikiId()); for (Object result : documentDatas) { String fullName; String locale = null; if (result instanceof String) { fullName = (String) result; } else { fullName = (String) ((Object[]) result)[0]; if (distinctbylanguage) { locale = (String) ((Object[]) result)[1]; } } XWikiDocument doc = new XWikiDocument(this.defaultDocumentReferenceResolver.resolve(fullName, currentWikiReference)); if (checkRight) { if (!context.getWiki().getRightService().hasAccessLevel("view", context.getUser(), doc.getFullName(), context)) { continue; } } DocumentReference documentReference = doc.getDocumentReference(); if (distinctbylanguage) { XWikiDocument document = context.getWiki().getDocument(documentReference, context); if (StringUtils.isEmpty(locale)) { documents.add(document); } else { documents.add(document.getTranslatedDocument(locale, context)); } } else { documents.add(context.getWiki().getDocument(documentReference, context)); } } return documents; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: searchDocuments File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-459" ]
CVE-2023-36468
HIGH
8.8
xwiki/xwiki-platform
searchDocuments
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
0
Analyze the following code function for security vulnerabilities
public static List<BatchUpload> getImportsAvailable(EPerson eperson) throws Exception { File uploadDir = new File(getImportUploadableDirectory(eperson.getID())); if (!uploadDir.exists() || !uploadDir.isDirectory()) { return null; } Map<String, BatchUpload> fileNames = new TreeMap<String, BatchUpload>(); for (String fileName : uploadDir.list()) { File file = new File(uploadDir + File.separator + fileName); if (file.isDirectory()){ BatchUpload upload = new BatchUpload(file); fileNames.put(upload.getDir().getName(), upload); } } if (fileNames.size() > 0) { return new ArrayList<BatchUpload>(fileNames.values()); } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getImportsAvailable File: dspace-api/src/main/java/org/dspace/app/itemimport/ItemImport.java Repository: DSpace The code follows secure coding practices.
[ "CWE-22" ]
CVE-2022-31195
HIGH
7.2
DSpace
getImportsAvailable
dspace-api/src/main/java/org/dspace/app/itemimport/ItemImport.java
56e76049185bbd87c994128a9d77735ad7af0199
0
Analyze the following code function for security vulnerabilities
private String fixAttachmentPath(String attachment) { com.codename1.io.File cn1File = new com.codename1.io.File(attachment); File mediaStorageDir = new File(new File(getContext().getCacheDir(), "intent_files"), "Attachment"); // Create the storage directory if it does not exist if (!mediaStorageDir.exists()) { if (!mediaStorageDir.mkdirs()) { Log.d(Display.getInstance().getProperty("AppName", "CodenameOne"), "failed to create directory"); return null; } } File newFile = new File(mediaStorageDir.getPath() + File.separator + cn1File.getName()); if(newFile.exists()) { // Create a media file name String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date()); newFile = new File(mediaStorageDir.getPath() + File.separator + "IMG_" + timeStamp + "_" + cn1File.getName()); } //Uri fileUri = Uri.fromFile(newFile); newFile.getParentFile().mkdirs(); //Uri imageUri = Uri.fromFile(newFile); Uri fileUri = FileProvider.getUriForFile(getContext(), getContext().getPackageName()+".provider", newFile); try { InputStream is = FileSystemStorage.getInstance().openInputStream(attachment); OutputStream os = new FileOutputStream(newFile); byte [] buf = new byte[1024]; int len; while((len = is.read(buf)) > -1){ os.write(buf, 0, len); } is.close(); os.close(); } catch (IOException ex) { Logger.getLogger(AndroidImplementation.class.getName()).log(Level.SEVERE, null, ex); } return fileUri.toString(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: fixAttachmentPath 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
fixAttachmentPath
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
protected Bundle getActivityOptions() { // Anything launched from the notification shade should always go into the // fullscreen stack. ActivityOptions options = ActivityOptions.makeBasic(); options.setLaunchStackId(StackId.FULLSCREEN_WORKSPACE_STACK_ID); return options.toBundle(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getActivityOptions File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2017-0822
HIGH
7.5
android
getActivityOptions
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
@SystemApi public void setSecondaryLockscreenEnabled(@NonNull ComponentName admin, boolean enabled) { throwIfParentInstance("setSecondaryLockscreenEnabled"); if (mService != null) { try { mService.setSecondaryLockscreenEnabled(admin, enabled); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setSecondaryLockscreenEnabled 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
setSecondaryLockscreenEnabled
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
@GET @Path("posts/{threadKey}") @Operation(summary = "Get posts", description = "Retrieves the messages in the thread.") @ApiResponse(responseCode = "200", description = "Ok.", content = { @Content(mediaType = "application/json", array = @ArraySchema(schema = @Schema(implementation = MessageVO.class))), @Content(mediaType = "application/xml", array = @ArraySchema(schema = @Schema(implementation = MessageVO.class))) }) @ApiResponse(responseCode = "401", description = "The roles of the authenticated user are not sufficient.") @ApiResponse(responseCode = "404", description = "The author, forum or message not found.") public Response getMessages( @PathParam("threadKey") Long threadKey, @QueryParam("start") @Parameter(description = "Set the date for the earliest thread") @DefaultValue("0") Integer start, @QueryParam("limit")@Parameter(description = "Limit the amount of threads to be returned.") @DefaultValue("25") Integer limit, @QueryParam("orderBy")@Parameter(description = "orderBy (value name,creationDate)") @DefaultValue("creationDate") String orderBy, @QueryParam("asc") @Parameter(description = "Determine the type of order.") @DefaultValue("true") Boolean asc, @Context HttpServletRequest httpRequest, @Context UriInfo uriInfo, @Context Request request) { if(forum == null) { return Response.serverError().status(Status.NOT_FOUND).build(); } if(MediaTypeVariants.isPaged(httpRequest, request)) { int totalCount = fom.countThread(threadKey); Message.OrderBy order = toEnum(orderBy); List<Message> threads = fom.getThread(threadKey, start, limit, order, asc); MessageVO[] vos = toArrayOfVO(threads, uriInfo); MessageVOes voes = new MessageVOes(); voes.setMessages(vos); voes.setTotalCount(totalCount); return Response.ok(voes).build(); } else { List<Message> messages = fom.getThread(threadKey); MessageVO[] messageArr = toArrayOfVO(messages, uriInfo); return Response.ok(messageArr).build(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getMessages File: src/main/java/org/olat/modules/fo/restapi/ForumWebService.java Repository: OpenOLAT The code follows secure coding practices.
[ "CWE-22" ]
CVE-2021-41242
HIGH
7.9
OpenOLAT
getMessages
src/main/java/org/olat/modules/fo/restapi/ForumWebService.java
c450df7d7ffe6afde39ebca6da9136f1caa16ec4
0
Analyze the following code function for security vulnerabilities
public void setRevokedOnInUse(boolean revokedOnInUse) { this.revokedOnInUse = revokedOnInUse; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setRevokedOnInUse File: base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
setRevokedOnInUse
base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
private static String filterCorrelationIdCharacters(String correlationId) { if (StringUtils.isNotEmpty(correlationId)) { correlationId = INVALID_CORRELATION_ID_CHARACTERS_RE.matcher(correlationId).replaceAll(""); if (StringUtils.isNotEmpty(correlationId)) { return correlationId.substring(0, Math.min(correlationId.length(), 36)); } } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: filterCorrelationIdCharacters File: frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/server/gwt/GenericApiGWTServiceImpl.java Repository: oVirt/ovirt-engine The code follows secure coding practices.
[ "CWE-287" ]
CVE-2024-0822
HIGH
7.5
oVirt/ovirt-engine
filterCorrelationIdCharacters
frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/server/gwt/GenericApiGWTServiceImpl.java
036f617316f6d7077cd213eb613eb4816e33d1fc
0
Analyze the following code function for security vulnerabilities
private void getPliResponse(ByteArrayOutputStream buf) { // Locale Language Setting String lang = SystemProperties.get("persist.sys.language"); if (lang != null) { // tag int tag = ComprehensionTlvTag.LANGUAGE.value(); buf.write(tag); ResponseData.writeLength(buf, lang.length()); buf.write(lang.getBytes(), 0, lang.length()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPliResponse File: src/java/com/android/internal/telephony/cat/CatService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2015-3843
HIGH
9.3
android
getPliResponse
src/java/com/android/internal/telephony/cat/CatService.java
b48581401259439dc5ef6dcf8b0f303e4cbefbe9
0
Analyze the following code function for security vulnerabilities
private void sendBroadcastUploadStarted(UploadFileOperation upload) { Intent start = new Intent(getUploadStartMessage()); start.putExtra(EXTRA_REMOTE_PATH, upload.getRemotePath()); // real remote start.putExtra(EXTRA_OLD_FILE_PATH, upload.getOriginalStoragePath()); start.putExtra(ACCOUNT_NAME, upload.getAccount().name); start.setPackage(getPackageName()); localBroadcastManager.sendBroadcast(start); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sendBroadcastUploadStarted File: src/main/java/com/owncloud/android/files/services/FileUploader.java Repository: nextcloud/android The code follows secure coding practices.
[ "CWE-732" ]
CVE-2022-24886
LOW
2.1
nextcloud/android
sendBroadcastUploadStarted
src/main/java/com/owncloud/android/files/services/FileUploader.java
c01fa0b17050cdcf77a468cc22f4071eae29d464
0
Analyze the following code function for security vulnerabilities
public Object getTarget() { try { checkPermission(READ); } catch (AccessDeniedException e) { String rest = Stapler.getCurrentRequest().getRestOfPath(); if(rest.startsWith("/login") || rest.startsWith("/logout") || rest.startsWith("/accessDenied") || rest.startsWith("/adjuncts/") || rest.startsWith("/signup") || rest.startsWith("/tcpSlaveAgentListener") // XXX SlaveComputer.doSlaveAgentJnlp; there should be an annotation to request unprotected access || rest.matches("/computer/[^/]+/slave-agent[.]jnlp") && "true".equals(Stapler.getCurrentRequest().getParameter("encrypt")) || rest.startsWith("/cli") || rest.startsWith("/federatedLoginService/") || rest.startsWith("/securityRealm")) return this; // URLs that are always visible without READ permission for (String name : getUnprotectedRootActions()) { if (rest.startsWith("/" + name + "/") || rest.equals("/" + name)) { return this; } } throw e; } return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTarget 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
getTarget
core/src/main/java/jenkins/model/Jenkins.java
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
0
Analyze the following code function for security vulnerabilities
static void invokeMethod(Component instance, Class<?> clazz, String methodName, JsonArray args, int promiseId, boolean inert) { assert instance != null; Optional<Method> method = findMethod(instance, clazz, methodName); if (method.isPresent()) { invokeMethod(instance, method.get(), args, promiseId, inert); } else if (instance instanceof Composite) { Component compositeContent = ((Composite<?>) instance).getContent(); invokeMethod(compositeContent, compositeContent.getClass(), methodName, args, promiseId, inert); } else { getLogger().error(String.format( "Faulty method invocation. Neither class '%s' " + "nor its super classes declare event handler method '%s'", instance.getClass().getName(), methodName)); throw new IllegalStateException("Faulty method invocation"); } }
Vulnerability Classification: - CWE: CWE-200 - CVE: CVE-2023-25500 - Severity: MEDIUM - CVSS Score: 4.3 Description: Update messages to point to logs. Start both error and log with same string. Function: invokeMethod File: flow-server/src/main/java/com/vaadin/flow/server/communication/rpc/PublishedServerEventHandlerRpcHandler.java Repository: vaadin/flow Fixed Code: static void invokeMethod(Component instance, Class<?> clazz, String methodName, JsonArray args, int promiseId, boolean inert) { assert instance != null; Optional<Method> method = findMethod(instance, clazz, methodName); if (method.isPresent()) { invokeMethod(instance, method.get(), args, promiseId, inert); } else if (instance instanceof Composite) { Component compositeContent = ((Composite<?>) instance).getContent(); invokeMethod(compositeContent, compositeContent.getClass(), methodName, args, promiseId, inert); } else { getLogger().error(String.format( "Faulty method invocation. Neither class '%s' " + "nor its super classes declare event handler method '%s'", instance.getClass().getName(), methodName)); throw new IllegalStateException( "Faulty method invocation. See server log for more details."); } }
[ "CWE-200" ]
CVE-2023-25500
MEDIUM
4.3
vaadin/flow
invokeMethod
flow-server/src/main/java/com/vaadin/flow/server/communication/rpc/PublishedServerEventHandlerRpcHandler.java
e13da1c685fa1b5fdd74774813a028748bc4b62b
1
Analyze the following code function for security vulnerabilities
public void removeBadge(Badge b) { String badge = b.toString(); if (StringUtils.isBlank(badges)) { return; } badge = ",".concat(badge).concat(","); if (badges.contains(badge)) { badges = badges.replaceFirst(badge, ","); removeRep(b.getReward()); } if (StringUtils.isBlank(badges.replaceAll(",", ""))) { badges = ""; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeBadge File: src/main/java/com/erudika/scoold/core/Profile.java Repository: Erudika/scoold The code follows secure coding practices.
[ "CWE-130" ]
CVE-2022-1543
MEDIUM
6.5
Erudika/scoold
removeBadge
src/main/java/com/erudika/scoold/core/Profile.java
62a0e92e1486ddc17676a7ead2c07ff653d167ce
0
Analyze the following code function for security vulnerabilities
boolean isDeviceOwner(int uid) { return uid >= 0 && mDeviceOwnerUid == uid; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isDeviceOwner File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40094
HIGH
7.8
android
isDeviceOwner
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
1120bc7e511710b1b774adf29ba47106292365e7
0
Analyze the following code function for security vulnerabilities
private static void rejectInvalidWatchTimeout(String operationName, AsyncMethodCallback resultHandler) { final CentralDogmaException cde = new CentralDogmaException(ErrorCode.BAD_REQUEST); CentralDogmaExceptions.log(operationName, cde); resultHandler.onError(cde); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: rejectInvalidWatchTimeout File: server/src/main/java/com/linecorp/centraldogma/server/internal/thrift/CentralDogmaServiceImpl.java Repository: line/centraldogma The code follows secure coding practices.
[ "CWE-862" ]
CVE-2021-38388
MEDIUM
6.5
line/centraldogma
rejectInvalidWatchTimeout
server/src/main/java/com/linecorp/centraldogma/server/internal/thrift/CentralDogmaServiceImpl.java
e83b558ef9eaa44f71b7d9236bdec9f68c85b8bd
0
Analyze the following code function for security vulnerabilities
@Override public String cropperPicture(List<MultipartFile> multipartFileList) { HttpServletRequest request = RequestHolder.getRequest(); // 获取系统配置文件 SystemConfig systemConfig = feignUtil.getSystemConfig(); String qiNiuPictureBaseUrl = systemConfig.getQiNiuPictureBaseUrl(); String localPictureBaseUrl = systemConfig.getLocalPictureBaseUrl(); String minioPictureBaseUrl = systemConfig.getMinioPictureBaseUrl(); String result = fileService.batchUploadFile(request, multipartFileList, systemConfig); List<Map<String, Object>> listMap = new ArrayList<>(); Map<String, Object> picMap = (Map<String, Object>) JsonUtils.jsonToObject(result, Map.class); if (SysConf.SUCCESS.equals(picMap.get(SysConf.CODE))) { List<Map<String, Object>> picData = (List<Map<String, Object>>) picMap.get(SysConf.DATA); if (picData.size() > 0) { for (int i = 0; i < picData.size(); i++) { Map<String, Object> item = new HashMap<>(); item.put(SysConf.UID, picData.get(i).get(SysConf.UID)); if (EFilePriority.QI_NIU.equals(systemConfig.getPicturePriority())) { item.put(SysConf.URL, qiNiuPictureBaseUrl + picData.get(i).get(SysConf.QI_NIU_URL)); } else if (EFilePriority.MINIO.equals(systemConfig.getPicturePriority())) { item.put(SysConf.URL, minioPictureBaseUrl + picData.get(i).get(SysConf.MINIO_URL)); } else { item.put(SysConf.URL, localPictureBaseUrl + picData.get(i).get(SysConf.PIC_URL)); } listMap.add(item); } } } return ResultUtil.result(SysConf.SUCCESS, listMap); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: cropperPicture File: mogu_picture/src/main/java/com/moxi/mogublog/picture/service/impl/FileServiceImpl.java Repository: moxi624/mogu_blog_v2 The code follows secure coding practices.
[ "CWE-434" ]
CVE-2022-27047
HIGH
7.5
moxi624/mogu_blog_v2
cropperPicture
mogu_picture/src/main/java/com/moxi/mogublog/picture/service/impl/FileServiceImpl.java
2d9eb941cda8fd168f9447cd6b4262f31f074d92
0
Analyze the following code function for security vulnerabilities
private void saveMessageDraftStopAudioPlayer() { final Conversation previousConversation = this.conversation; if (this.activity == null || this.binding == null || previousConversation == null) { return; } Log.d(Config.LOGTAG, "ConversationFragment.saveMessageDraftStopAudioPlayer()"); final String msg = this.binding.textinput.getText().toString(); storeNextMessage(msg); updateChatState(this.conversation, msg); messageListAdapter.stopAudioPlayer(); mediaPreviewAdapter.clearPreviews(); toggleInputMethod(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: saveMessageDraftStopAudioPlayer File: src/main/java/eu/siacs/conversations/ui/ConversationFragment.java Repository: iNPUTmice/Conversations The code follows secure coding practices.
[ "CWE-200" ]
CVE-2018-18467
MEDIUM
5
iNPUTmice/Conversations
saveMessageDraftStopAudioPlayer
src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
7177c523a1b31988666b9337249a4f1d0c36f479
0
Analyze the following code function for security vulnerabilities
public File getWorkingDirectory() { return workingDir == null ? null : new File( workingDir ); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getWorkingDirectory File: src/main/java/org/codehaus/plexus/util/cli/shell/Shell.java Repository: codehaus-plexus/plexus-utils The code follows secure coding practices.
[ "CWE-78" ]
CVE-2017-1000487
HIGH
7.5
codehaus-plexus/plexus-utils
getWorkingDirectory
src/main/java/org/codehaus/plexus/util/cli/shell/Shell.java
b38a1b3a4352303e4312b2bb601a0d7ec6e28f41
0
Analyze the following code function for security vulnerabilities
@Deprecated(since = "2.2M1") public String getPrefixedFullName() { return getDefaultEntityReferenceSerializer().serialize(getDocumentReference()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPrefixedFullName 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
getPrefixedFullName
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
@SuppressWarnings("resource") public String toString(int indentFactor) throws JSONException { StringWriter w = new StringWriter(); synchronized (w.getBuffer()) { return this.write(w, indentFactor, 0).toString(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toString File: src/main/java/org/json/JSONObject.java Repository: stleary/JSON-java The code follows secure coding practices.
[ "CWE-770" ]
CVE-2023-5072
HIGH
7.5
stleary/JSON-java
toString
src/main/java/org/json/JSONObject.java
661114c50dcfd53bb041aab66f14bb91e0a87c8a
0
Analyze the following code function for security vulnerabilities
protected String getWiki() throws Exception { GetMethod getMethod = executeGet(getFullUri(WikisResource.class)); Assert.assertEquals(getHttpMethodInfo(getMethod), HttpStatus.SC_OK, getMethod.getStatusCode()); Wikis wikis = (Wikis) unmarshaller.unmarshal(getMethod.getResponseBodyAsStream()); Assert.assertTrue(wikis.getWikis().size() > 0); return wikis.getWikis().get(0).getName(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getWiki File: xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-test/xwiki-platform-rest-test-tests/src/test/it/org/xwiki/rest/test/framework/AbstractHttpIT.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-352" ]
CVE-2023-37277
CRITICAL
9.6
xwiki/xwiki-platform
getWiki
xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-test/xwiki-platform-rest-test-tests/src/test/it/org/xwiki/rest/test/framework/AbstractHttpIT.java
4c175405faa0e62437df397811c7526dfc0fbae7
0
Analyze the following code function for security vulnerabilities
public File getSrcOutDir() { return srcOutDir; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSrcOutDir File: jadx-core/src/main/java/jadx/core/export/ExportGradleProject.java Repository: skylot/jadx The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-0219
MEDIUM
4.3
skylot/jadx
getSrcOutDir
jadx-core/src/main/java/jadx/core/export/ExportGradleProject.java
d22db30166e7cb369d72be41382bb63ac8b81c52
0
Analyze the following code function for security vulnerabilities
public void setAnchor(boolean anchor) { this.anchor = anchor; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setAnchor File: goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java Repository: intranda/goobi-viewer-core The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-29014
MEDIUM
6.1
intranda/goobi-viewer-core
setAnchor
goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java
c29efe60e745a94d03debc17681c4950f3917455
0
Analyze the following code function for security vulnerabilities
protected void doCancelEditor() { editedItemId = null; editorActive = false; editorFieldGroup.discard(); editorFieldGroup.setItemDataSource(null); if (datasource instanceof ItemSetChangeNotifier) { ((ItemSetChangeNotifier) datasource) .removeItemSetChangeListener(editorClosingItemSetListener); } // Mark Grid as dirty so the client side gets to know that the editors // are no longer attached markAsDirty(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: doCancelEditor 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
doCancelEditor
server/src/main/java/com/vaadin/ui/Grid.java
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
0
Analyze the following code function for security vulnerabilities
public void setId(Long id) { this.id = id; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setId File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/trade/TradeOrder.java Repository: sanluan/PublicCMS The code follows secure coding practices.
[ "CWE-79" ]
CVE-2020-21333
LOW
3.5
sanluan/PublicCMS
setId
publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/trade/TradeOrder.java
b4d5956e65b14347b162424abb197a180229b3db
0
Analyze the following code function for security vulnerabilities
public void setOrgUnit(String orgUnit) { this.orgUnit = orgUnit; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setOrgUnit File: base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
setOrgUnit
base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
public String getSkinFilePath(String filename, String skin) throws IOException { String path = URI.create(DELIMITER + SKINS_DIRECTORY + DELIMITER + skin + DELIMITER + filename).normalize().toString(); // Test to prevent someone from using "../" in the filename! if (!path.startsWith(DELIMITER + SKINS_DIRECTORY)) { LOGGER.warn("Illegal access, tried to use file [{}] as a skin. Possible break-in attempt!", path); throw new IOException("Invalid filename: '" + filename + "' for skin '" + skin + "'"); } return path; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSkinFilePath File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/SkinAction.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-287" ]
CVE-2022-36092
HIGH
7.5
xwiki/xwiki-platform
getSkinFilePath
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/SkinAction.java
71a6d0bb6f8ab718fcfaae0e9b8c16c2d69cd4bb
0
Analyze the following code function for security vulnerabilities
public void setViewportSizeOffset(int offsetXPix, int offsetYPix) { setTopControlsHeight(mTopControlsHeightPix, offsetYPix != 0); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setViewportSizeOffset File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java Repository: chromium The code follows secure coding practices.
[ "CWE-1021" ]
CVE-2015-1241
MEDIUM
4.3
chromium
setViewportSizeOffset
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
9d343ad2ea6ec395c377a4efa266057155bfa9c1
0
Analyze the following code function for security vulnerabilities
@Test public void getByIdsFailure(TestContext context) { createFoo(context).getByIdAsString( "nonexistingTable", randomUuidArray(), context.asyncAssertFailure()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getByIdsFailure File: domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java Repository: folio-org/raml-module-builder The code follows secure coding practices.
[ "CWE-89" ]
CVE-2019-15534
HIGH
7.5
folio-org/raml-module-builder
getByIdsFailure
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
protected void internalDeleteSubscription(AsyncResponse asyncResponse, String subName, boolean authoritative, boolean force) { if (force) { internalDeleteSubscriptionForcefully(asyncResponse, subName, authoritative); } else { internalDeleteSubscription(asyncResponse, subName, authoritative); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: internalDeleteSubscription File: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java Repository: apache/pulsar The code follows secure coding practices.
[ "CWE-863" ]
CVE-2021-41571
MEDIUM
4
apache/pulsar
internalDeleteSubscription
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
5b35bb81c31f1bc2ad98c9fde5b39ec68110ca52
0
Analyze the following code function for security vulnerabilities
public void setSecretKey(String secretKey) { this.secretKey = secretKey; }
Vulnerability Classification: - CWE: CWE-312 - CVE: CVE-2021-29481 - Severity: MEDIUM - CVSS Score: 5.0 Description: Encrypt client side session cookies by default Function: setSecretKey File: ratpack-session/src/main/java/ratpack/session/clientside/ClientSideSessionConfig.java Repository: ratpack Fixed Code: @Nullable public void setSecretKey(String secretKey) { this.secretKey = secretKey; }
[ "CWE-312" ]
CVE-2021-29481
MEDIUM
5
ratpack
setSecretKey
ratpack-session/src/main/java/ratpack/session/clientside/ClientSideSessionConfig.java
d7d240c06536a8b89a917e4ac842c337f7ea31f0
1
Analyze the following code function for security vulnerabilities
public String reload(String pi) throws PresentationException, RecordNotFoundException, RecordDeletedException, IndexUnreachableException, DAOException, ViewerConfigurationException, RecordLimitExceededException { logger.trace("reload({})", pi); reloads++; reset(); if (reloads > 3) { throw new RecordNotFoundException(pi); } setPersistentIdentifier(pi); // setImageToShow(1); return open(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: reload File: goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java Repository: intranda/goobi-viewer-core The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-29014
MEDIUM
6.1
intranda/goobi-viewer-core
reload
goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java
c29efe60e745a94d03debc17681c4950f3917455
0
Analyze the following code function for security vulnerabilities
private PostgresClient postgresClientGetConnectionFails() { AsyncSQLClient client = new AsyncSQLClient() { @Override public SQLClient getConnection(Handler<AsyncResult<SQLConnection>> handler) { handler.handle(Future.failedFuture("postgresClientGetConnectionFails")); return this; } @Override public void close(Handler<AsyncResult<Void>> handler) { handler.handle(Future.succeededFuture()); } @Override public void close() { // nothing to do } }; try { setRootLevel(Level.FATAL); PostgresClient postgresClient = new PostgresClient(vertx, TENANT); postgresClient.setClient(client); return postgresClient; } catch (Exception e) { throw new RuntimeException(e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: postgresClientGetConnectionFails File: domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java Repository: folio-org/raml-module-builder The code follows secure coding practices.
[ "CWE-89" ]
CVE-2019-15534
HIGH
7.5
folio-org/raml-module-builder
postgresClientGetConnectionFails
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
public static String joinPaths(String... paths) { return joinPaths(Arrays.asList(paths)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: joinPaths File: src/org/opencms/util/CmsStringUtil.java Repository: alkacon/opencms-core The code follows secure coding practices.
[ "CWE-79" ]
CVE-2013-4600
MEDIUM
4.3
alkacon/opencms-core
joinPaths
src/org/opencms/util/CmsStringUtil.java
72a05e3ea1cf692e2efce002687272e63f98c14a
0
Analyze the following code function for security vulnerabilities
@RequiresPermission(android.Manifest.permission.GRANT_RUNTIME_PERMISSIONS) //@SystemApi public void grantRuntimePermission(@NonNull String packageName, @NonNull String permissionName, @NonNull UserHandle user) { if (DEBUG_TRACE_GRANTS && shouldTraceGrant(packageName, permissionName, user.getIdentifier())) { Log.i(LOG_TAG_TRACE_GRANTS, "App " + mContext.getPackageName() + " is granting " + packageName + " " + permissionName + " for user " + user.getIdentifier(), new RuntimeException()); } try { mPermissionManager.grantRuntimePermission(packageName, permissionName, user.getIdentifier()); } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: grantRuntimePermission File: core/java/android/permission/PermissionManager.java Repository: android The code follows secure coding practices.
[ "CWE-281" ]
CVE-2023-21249
MEDIUM
5.5
android
grantRuntimePermission
core/java/android/permission/PermissionManager.java
c00b7e7dbc1fa30339adef693d02a51254755d7f
0
Analyze the following code function for security vulnerabilities
private static String toJpaDirection(Order order) { return order.getDirection().name().toLowerCase(Locale.US); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toJpaDirection File: src/main/java/org/springframework/data/jpa/repository/query/QueryUtils.java Repository: spring-projects/spring-data-jpa The code follows secure coding practices.
[ "CWE-89" ]
CVE-2016-6652
MEDIUM
6.8
spring-projects/spring-data-jpa
toJpaDirection
src/main/java/org/springframework/data/jpa/repository/query/QueryUtils.java
b8e7fe
0
Analyze the following code function for security vulnerabilities
native boolean getRemoteMasInstancesNative(byte[] address);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRemoteMasInstancesNative File: src/com/android/bluetooth/btservice/AdapterService.java Repository: android The code follows secure coding practices.
[ "CWE-362", "CWE-20" ]
CVE-2016-3760
MEDIUM
5.4
android
getRemoteMasInstancesNative
src/com/android/bluetooth/btservice/AdapterService.java
122feb9a0b04290f55183ff2f0384c6c53756bd8
0
Analyze the following code function for security vulnerabilities
public void setFileType(String fileType) { this.fileType = fileType; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setFileType File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/log/LogUpload.java Repository: sanluan/PublicCMS The code follows secure coding practices.
[ "CWE-79" ]
CVE-2020-21333
LOW
3.5
sanluan/PublicCMS
setFileType
publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/log/LogUpload.java
b4d5956e65b14347b162424abb197a180229b3db
0
Analyze the following code function for security vulnerabilities
private String ms2ZentaoDescription(String msDescription) { String imgUrlRegex = "!\\[.*?]\\(/resource/md/get(.*?\\..*?)\\)"; String zentaoSteps = msDescription.replaceAll(imgUrlRegex, zentaoClient.requestUrl.getReplaceImgUrl()); Matcher matcher = zentaoClient.requestUrl.getImgPattern().matcher(zentaoSteps); while (matcher.find()) { // get file name String originSubUrl = matcher.group(1); if (originSubUrl.contains("/url?url=")) { String path = URLDecoder.decode(originSubUrl, StandardCharsets.UTF_8); String fileName; if (path.indexOf("fileID") > 0) { fileName = path.substring(path.indexOf("fileID") + 7); } else { fileName = path.substring(path.indexOf("file-read-") + 10); } zentaoSteps = zentaoSteps.replaceAll(Pattern.quote(originSubUrl), fileName); } else { String fileName = originSubUrl.substring(10); // get file ResponseEntity<FileSystemResource> mdImage = resourceService.getMdImage(fileName); // upload zentao String id = uploadFile(mdImage.getBody()); // todo delete local file int index = fileName.lastIndexOf("."); String suffix = ""; if (index != -1) { suffix = fileName.substring(index); } // replace id zentaoSteps = zentaoSteps.replaceAll(Pattern.quote(originSubUrl), id + suffix); } } // image link String netImgRegex = "!\\[(.*?)]\\((http.*?)\\)"; return zentaoSteps.replaceAll(netImgRegex, "<img src=\"$2\" alt=\"$1\"/>"); }
Vulnerability Classification: - CWE: CWE-918 - CVE: CVE-2022-23544 - Severity: MEDIUM - CVSS Score: 6.1 Description: fix(测试跟踪): 缺陷平台请求转发添加白名单 Function: ms2ZentaoDescription File: test-track/backend/src/main/java/io/metersphere/service/issue/platform/ZentaoPlatform.java Repository: metersphere Fixed Code: private String ms2ZentaoDescription(String msDescription) { String imgUrlRegex = "!\\[.*?]\\(/resource/md/get(.*?\\..*?)\\)"; String zentaoSteps = msDescription.replaceAll(imgUrlRegex, zentaoClient.requestUrl.getReplaceImgUrl()); Matcher matcher = zentaoClient.requestUrl.getImgPattern().matcher(zentaoSteps); while (matcher.find()) { // get file name String originSubUrl = matcher.group(1); if (originSubUrl.contains("/url?url=") || originSubUrl.contains("/path?")) { String path = URLDecoder.decode(originSubUrl, StandardCharsets.UTF_8); String fileName; if (path.indexOf("fileID") > 0) { fileName = path.substring(path.indexOf("fileID") + 7); } else { fileName = path.substring(path.indexOf("file-read-") + 10); } zentaoSteps = zentaoSteps.replaceAll(Pattern.quote(originSubUrl), fileName); } else { String fileName = originSubUrl.substring(10); // get file ResponseEntity<FileSystemResource> mdImage = resourceService.getMdImage(fileName); // upload zentao String id = uploadFile(mdImage.getBody()); // todo delete local file int index = fileName.lastIndexOf("."); String suffix = ""; if (index != -1) { suffix = fileName.substring(index); } // replace id zentaoSteps = zentaoSteps.replaceAll(Pattern.quote(originSubUrl), id + suffix); } } // image link String netImgRegex = "!\\[(.*?)]\\((http.*?)\\)"; return zentaoSteps.replaceAll(netImgRegex, "<img src=\"$2\" alt=\"$1\"/>"); }
[ "CWE-918" ]
CVE-2022-23544
MEDIUM
6.1
metersphere
ms2ZentaoDescription
test-track/backend/src/main/java/io/metersphere/service/issue/platform/ZentaoPlatform.java
d0f95b50737c941b29d507a4cc3545f2dc6ab121
1
Analyze the following code function for security vulnerabilities
@Override public void onSaveAcceptUnvalidated(boolean accept) { if (!isThisCallbackActive()) return; ClientModeImpl.this.sendMessage(CMD_ACCEPT_UNVALIDATED, accept ? 1 : 0); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onSaveAcceptUnvalidated 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
onSaveAcceptUnvalidated
service/java/com/android/server/wifi/ClientModeImpl.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
private boolean readArrayToken(PathTokenAppender appender) { if (!path.currentCharIs(OPEN_SQUARE_BRACKET)) { return false; } char nextSignificantChar = path.nextSignificantChar(); if (!isDigit(nextSignificantChar) && nextSignificantChar != MINUS && nextSignificantChar != SPLIT) { return false; } int expressionBeginIndex = path.position() + 1; int expressionEndIndex = path.nextIndexOf(expressionBeginIndex, CLOSE_SQUARE_BRACKET); if (expressionEndIndex == -1) { return false; } String expression = path.subSequence(expressionBeginIndex, expressionEndIndex).toString().trim(); if ("*".equals(expression)) { return false; } //check valid chars for (int i = 0; i < expression.length(); i++) { char c = expression.charAt(i); if (!isDigit(c) && c != COMMA && c != MINUS && c != SPLIT && c != SPACE) { return false; } } boolean isSliceOperation = expression.contains(":"); if (isSliceOperation) { ArraySliceOperation arraySliceOperation = ArraySliceOperation.parse(expression); appender.appendPathToken(PathTokenFactory.createSliceArrayPathToken(arraySliceOperation)); } else { ArrayIndexOperation arrayIndexOperation = ArrayIndexOperation.parse(expression); appender.appendPathToken(PathTokenFactory.createIndexArrayPathToken(arrayIndexOperation)); } path.setPosition(expressionEndIndex + 1); return path.currentIsTail() || readNextToken(appender); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: readArrayToken File: json-path/src/main/java/com/jayway/jsonpath/internal/path/PathCompiler.java Repository: json-path/JsonPath The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-51074
MEDIUM
5.3
json-path/JsonPath
readArrayToken
json-path/src/main/java/com/jayway/jsonpath/internal/path/PathCompiler.java
f49ff25e3bad8c8a0c853058181f2c00b5beb305
0
Analyze the following code function for security vulnerabilities
public OutputStream createStorageOutputStream(String name) throws IOException { return getContext().openFileOutput(name, 0); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createStorageOutputStream 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
createStorageOutputStream
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
static void validateQualityConstant(int quality) { switch (quality) { case PASSWORD_QUALITY_UNSPECIFIED: case PASSWORD_QUALITY_BIOMETRIC_WEAK: case PASSWORD_QUALITY_SOMETHING: case PASSWORD_QUALITY_NUMERIC: case PASSWORD_QUALITY_NUMERIC_COMPLEX: case PASSWORD_QUALITY_ALPHABETIC: case PASSWORD_QUALITY_ALPHANUMERIC: case PASSWORD_QUALITY_COMPLEX: case PASSWORD_QUALITY_MANAGED: return; } throw new IllegalArgumentException("Invalid quality constant: 0x" + Integer.toHexString(quality)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: validateQualityConstant 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
validateQualityConstant
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
@Override public boolean canUsbDataSignalingBeDisabled() { return mInjector.binderWithCleanCallingIdentity(() -> mInjector.getUsbManager() != null && mInjector.getUsbManager().getUsbHalVersion() >= UsbManager.USB_HAL_V1_3 ); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: canUsbDataSignalingBeDisabled 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
canUsbDataSignalingBeDisabled
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
private void writeResponse(HttpServletResponse response, String ok) throws IOException { response.setContentType("text/html"); response.getWriter().write(ok); }
Vulnerability Classification: - CWE: CWE-264 - CVE: CVE-2014-8114 - Severity: MEDIUM - CVSS Score: 6.8 Description: BZ(1169544,1169556, 1169557,1169559,1169560): improvements on security related to file access Function: writeResponse File: uberfire-server/src/main/java/org/uberfire/server/FileUploadServlet.java Repository: AppFormer/uberfire Fixed Code: private void writeResponse( HttpServletResponse response, String ok ) throws IOException { response.setContentType( "text/html" ); response.getWriter().write( ok ); }
[ "CWE-264" ]
CVE-2014-8114
MEDIUM
6.8
AppFormer/uberfire
writeResponse
uberfire-server/src/main/java/org/uberfire/server/FileUploadServlet.java
21ec50eb15
1
Analyze the following code function for security vulnerabilities
@Override public boolean moveActivityTaskToBack(IBinder token, boolean nonRoot) { return ActivityClient.getInstance().moveActivityTaskToBack(token, nonRoot); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: moveActivityTaskToBack 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
moveActivityTaskToBack
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
void notifyMessageIdAllocated(SendOrSaveMessage sendOrSaveMessage, Message message);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: notifyMessageIdAllocated File: src/com/android/mail/compose/ComposeActivity.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-2425
MEDIUM
4.3
android
notifyMessageIdAllocated
src/com/android/mail/compose/ComposeActivity.java
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
0
Analyze the following code function for security vulnerabilities
private static String toPrintableName(String name) { StringBuilder printableName = new StringBuilder(); for( int i=0; i<name.length(); i++ ) { char ch = name.charAt(i); if(Character.isISOControl(ch)) printableName.append("\\u").append((int)ch).append(';'); else printableName.append(ch); } return printableName.toString(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toPrintableName 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
toPrintableName
core/src/main/java/jenkins/model/Jenkins.java
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
0
Analyze the following code function for security vulnerabilities
public boolean getRevokedOnInUse() { return revokedOnInUse; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRevokedOnInUse File: base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
getRevokedOnInUse
base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
public int nextTag() throws XmlPullParserException,IOException { int eventType = next(); if(eventType == TEXT && isWhitespace()) { // skip whitespace eventType = next(); } if (eventType != START_TAG && eventType != END_TAG) { throw new XmlPullParserException( getPositionDescription() + ": expected start or end tag", this, null); } return eventType; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: nextTag File: core/java/android/content/res/XmlBlock.java Repository: android The code follows secure coding practices.
[ "CWE-415" ]
CVE-2023-40103
HIGH
7.8
android
nextTag
core/java/android/content/res/XmlBlock.java
c3bc12c484ef3bbca4cec19234437c45af5e584d
0
Analyze the following code function for security vulnerabilities
private void acceptRingingCallInternal(int videoState, String packageName) { Call call = mCallsManager.getFirstCallWithState(CallState.RINGING, CallState.SIMULATED_RINGING); if (call != null) { if (call.isSelfManaged()) { Log.addEvent(call, LogUtils.Events.REQUEST_ACCEPT, "self-mgd accept ignored from " + packageName); return; } if (videoState == DEFAULT_VIDEO_STATE || !isValidAcceptVideoState(videoState)) { videoState = call.getVideoState(); } mCallsManager.answerCall(call, videoState); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: acceptRingingCallInternal File: src/com/android/server/telecom/TelecomServiceImpl.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21394
MEDIUM
5.5
android
acceptRingingCallInternal
src/com/android/server/telecom/TelecomServiceImpl.java
68dca62035c49e14ad26a54f614199cb29a3393f
0
Analyze the following code function for security vulnerabilities
public Pipeline saveTestPipeline(String pipelineName, String stageName, String... jobConfigNames) throws SQLException { PipelineConfig pipelineConfig = configurePipeline(pipelineName, stageName, jobConfigNames); Pipeline pipeline = scheduleWithFileChanges(pipelineConfig); pipeline = savePipelineWithStagesAndMaterials(pipeline); return pipeline; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: saveTestPipeline File: server/src/test-shared/java/com/thoughtworks/go/server/dao/DatabaseAccessHelper.java Repository: gocd The code follows secure coding practices.
[ "CWE-697" ]
CVE-2022-39308
MEDIUM
5.9
gocd
saveTestPipeline
server/src/test-shared/java/com/thoughtworks/go/server/dao/DatabaseAccessHelper.java
236d4baf92e6607f2841c151c855adcc477238b8
0
Analyze the following code function for security vulnerabilities
void prepareWindowToDisplayDuringRelayout(boolean wasVisible) { // We need to turn on screen regardless of visibility. final boolean hasTurnScreenOnFlag = (mAttrs.flags & FLAG_TURN_SCREEN_ON) != 0 || (mActivityRecord != null && mActivityRecord.canTurnScreenOn()); // The screen will turn on if the following conditions are met // 1. The window has the flag FLAG_TURN_SCREEN_ON or ActivityRecord#canTurnScreenOn. // 2. The WMS allows theater mode. // 3. No AWT or the AWT allows the screen to be turned on. This should only be true once // per resume to prevent the screen getting getting turned on for each relayout. Set // currentLaunchCanTurnScreenOn will be set to false so the window doesn't turn the screen // on again during this resume. // 4. When the screen is not interactive. This is because when the screen is already // interactive, the value may persist until the next animation, which could potentially // be occurring while turning off the screen. This would lead to the screen incorrectly // turning back on. if (hasTurnScreenOnFlag) { boolean allowTheaterMode = mWmService.mAllowTheaterModeWakeFromLayout || Settings.Global.getInt(mWmService.mContext.getContentResolver(), Settings.Global.THEATER_MODE_ON, 0) == 0; boolean canTurnScreenOn = mActivityRecord == null || mActivityRecord.currentLaunchCanTurnScreenOn(); if (allowTheaterMode && canTurnScreenOn && (mWmService.mAtmService.isDreaming() || !mPowerManagerWrapper.isInteractive())) { if (DEBUG_VISIBILITY || DEBUG_POWER) { Slog.v(TAG, "Relayout window turning screen on: " + this); } mPowerManagerWrapper.wakeUp(SystemClock.uptimeMillis(), PowerManager.WAKE_REASON_APPLICATION, "android.server.wm:SCREEN_ON_FLAG"); } if (mActivityRecord != null) { mActivityRecord.setCurrentLaunchCanTurnScreenOn(false); } } // If we were already visible, skip rest of preparation. if (wasVisible) { if (DEBUG_VISIBILITY) Slog.v(TAG, "Already visible and does not turn on screen, skip preparing: " + this); return; } if ((mAttrs.softInputMode & SOFT_INPUT_MASK_ADJUST) == SOFT_INPUT_ADJUST_RESIZE) { mLayoutNeeded = true; } if (isDrawn() && mToken.okToAnimate()) { mWinAnimator.applyEnterAnimationLocked(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: prepareWindowToDisplayDuringRelayout File: services/core/java/com/android/server/wm/WindowState.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-35674
HIGH
7.8
android
prepareWindowToDisplayDuringRelayout
services/core/java/com/android/server/wm/WindowState.java
7428962d3b064ce1122809d87af65099d1129c9e
0
Analyze the following code function for security vulnerabilities
public static CertEnrollmentRequest fromDOM(Element element) { CertEnrollmentRequest certEnrollmentRequest = new CertEnrollmentRequest(); fromDOM(element, certEnrollmentRequest); return certEnrollmentRequest; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: fromDOM File: base/common/src/main/java/com/netscape/certsrv/cert/CertEnrollmentRequest.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
fromDOM
base/common/src/main/java/com/netscape/certsrv/cert/CertEnrollmentRequest.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
public void notifyErrors(Errors errors) { style.addErrors(errors); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: notifyErrors File: org/w3c/css/css/StyleSheetParser.java Repository: w3c/css-validator The code follows secure coding practices.
[ "CWE-79" ]
CVE-2020-4070
LOW
3.5
w3c/css-validator
notifyErrors
org/w3c/css/css/StyleSheetParser.java
e5c09a9119167d3064db786d5f00d730b584a53b
0
Analyze the following code function for security vulnerabilities
@Override public List<String> getRole(String username) { return sysUserRoleMapper.getRoleByUserName(username); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRole File: jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java Repository: jeecgboot/jeecg-boot The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-45208
MEDIUM
4.3
jeecgboot/jeecg-boot
getRole
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java
51e2227bfe54f5d67b09411ee9a336750164e73d
0
Analyze the following code function for security vulnerabilities
protected void setShowLockscreenNotifications(boolean show) { mShowLockscreenNotifications = show; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setShowLockscreenNotifications File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2017-0822
HIGH
7.5
android
setShowLockscreenNotifications
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
@Override public KBTemplate removeByUUID_G(String uuid, long groupId) throws NoSuchTemplateException { KBTemplate kbTemplate = findByUUID_G(uuid, groupId); return remove(kbTemplate); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeByUUID_G File: modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java Repository: brianchandotcom/liferay-portal The code follows secure coding practices.
[ "CWE-79" ]
CVE-2017-12647
MEDIUM
4.3
brianchandotcom/liferay-portal
removeByUUID_G
modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java
ef93d984be9d4d478a5c4b1ca9a86f4e80174774
0
Analyze the following code function for security vulnerabilities
public XmlResourceParser newParser(@AnyRes int resId) { synchronized (this) { if (mNative != 0) { return new Parser(nativeCreateParseState(mNative, resId), this); } return null; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: newParser File: core/java/android/content/res/XmlBlock.java Repository: android The code follows secure coding practices.
[ "CWE-415" ]
CVE-2023-40103
HIGH
7.8
android
newParser
core/java/android/content/res/XmlBlock.java
c3bc12c484ef3bbca4cec19234437c45af5e584d
0
Analyze the following code function for security vulnerabilities
@Override public void onAsyncInflationFinished(Entry entry) { mPendingNotifications.remove(entry.key); // If there was an async task started after the removal, we don't want to add it back to // the list, otherwise we might get leaks. boolean isNew = mNotificationData.get(entry.key) == null; if (isNew && !entry.row.isRemoved()) { addEntry(entry); } else if (!isNew && entry.row.hasLowPriorityStateUpdated()) { mVisualStabilityManager.onLowPriorityUpdated(entry); updateNotificationShade(); } entry.row.setLowPriorityStateUpdated(false); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onAsyncInflationFinished File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2017-0822
HIGH
7.5
android
onAsyncInflationFinished
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
protected void checkReadLength(int length) throws TException { if (length < 0) { throw new TException("Negative length: " + length); } if (checkReadLength_) { readLength_ -= length; if (readLength_ < 0) { throw new TException("Message length exceeded: " + length); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkReadLength File: thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TBinaryProtocol.java Repository: facebook/fbthrift The code follows secure coding practices.
[ "CWE-770" ]
CVE-2019-11938
MEDIUM
5
facebook/fbthrift
checkReadLength
thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TBinaryProtocol.java
08c2d412adb214c40bb03be7587057b25d053030
0
Analyze the following code function for security vulnerabilities
protected final Augmentations synthesizedAugs() { HTMLAugmentations augs = null; if (fAugmentations) { augs = fInfosetAugs; augs.removeAllItems(); augs.putItem(AUGMENTATIONS, SYNTHESIZED_ITEM); } return augs; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: synthesizedAugs File: src/org/cyberneko/html/HTMLScanner.java Repository: sparklemotion/nekohtml The code follows secure coding practices.
[ "CWE-400" ]
CVE-2022-24839
MEDIUM
5
sparklemotion/nekohtml
synthesizedAugs
src/org/cyberneko/html/HTMLScanner.java
a800fce3b079def130ed42a408ff1d09f89e773d
0
Analyze the following code function for security vulnerabilities
public List<String> getIncludedMacros(String defaultSpace, String content, XWikiContext context) { List<String> list; try { String pattern = "#includeMacros[ ]*\\([ ]*([\"'])(.*?)\\1[ ]*\\)"; list = context.getUtil().getUniqueMatches(content, pattern, 2); for (int i = 0; i < list.size(); i++) { String name = list.get(i); if (name.indexOf('.') == -1) { list.set(i, defaultSpace + "." + name); } } } catch (Exception e) { // This should never happen LOGGER.error("Failed to extract #includeMacros targets from provided content [" + content + "]", e); list = Collections.emptyList(); } return list; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getIncludedMacros 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
getIncludedMacros
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
f9a677408ffb06f309be46ef9d8df1915d9099a4
0
Analyze the following code function for security vulnerabilities
public void setCommentEmailsEnabled(Boolean commentEmailsEnabled) { this.commentEmailsEnabled = commentEmailsEnabled; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setCommentEmailsEnabled File: src/main/java/com/erudika/scoold/core/Profile.java Repository: Erudika/scoold The code follows secure coding practices.
[ "CWE-130" ]
CVE-2022-1543
MEDIUM
6.5
Erudika/scoold
setCommentEmailsEnabled
src/main/java/com/erudika/scoold/core/Profile.java
62a0e92e1486ddc17676a7ead2c07ff653d167ce
0
Analyze the following code function for security vulnerabilities
public static String sanitizePath(String path) { return sanitizePath(path, SANITIZED_CHAR); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sanitizePath File: core/src/main/java/net/sourceforge/jnlp/util/FileUtils.java Repository: AdoptOpenJDK/IcedTea-Web The code follows secure coding practices.
[ "CWE-345", "CWE-94", "CWE-22" ]
CVE-2019-10182
MEDIUM
5.8
AdoptOpenJDK/IcedTea-Web
sanitizePath
core/src/main/java/net/sourceforge/jnlp/util/FileUtils.java
2ab070cdac087bd208f64fa8138bb709f8d7680c
0
Analyze the following code function for security vulnerabilities
public void setEmptyDragAmount(float amount) { float factor = 0.8f; if (mNotificationStackScroller.getNotGoneChildCount() > 0) { factor = 0.4f; } else if (!mStatusBar.hasActiveNotifications()) { factor = 0.4f; } mEmptyDragAmount = amount * factor; positionClockAndNotifications(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setEmptyDragAmount File: packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2017-0822
HIGH
7.5
android
setEmptyDragAmount
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
private void loadPolicyFile() { if (DBG) Slog.d(TAG, "loadPolicyFile"); synchronized(mPolicyFile) { FileInputStream infile = null; try { infile = mPolicyFile.openRead(); readPolicyXml(infile, false /*forRestore*/); } catch (FileNotFoundException e) { // No data yet } catch (IOException e) { Log.wtf(TAG, "Unable to read notification policy", e); } catch (NumberFormatException e) { Log.wtf(TAG, "Unable to parse notification policy", e); } catch (XmlPullParserException e) { Log.wtf(TAG, "Unable to parse notification policy", e); } finally { IoUtils.closeQuietly(infile); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: loadPolicyFile File: services/core/java/com/android/server/notification/NotificationManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2016-3884
MEDIUM
4.3
android
loadPolicyFile
services/core/java/com/android/server/notification/NotificationManagerService.java
61e9103b5725965568e46657f4781dd8f2e5b623
0
Analyze the following code function for security vulnerabilities
public void setBearerOnly(Boolean bearerOnly) { this.bearerOnly = bearerOnly; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setBearerOnly File: services/src/main/java/org/keycloak/services/managers/ClientManager.java Repository: keycloak The code follows secure coding practices.
[ "CWE-798" ]
CVE-2019-14837
MEDIUM
6.4
keycloak
setBearerOnly
services/src/main/java/org/keycloak/services/managers/ClientManager.java
9a7c1a91a59ab85e7f8889a505be04a71580777f
0
Analyze the following code function for security vulnerabilities
public List<RefererStats> getCurrentMonthRefStats() { Scope scope = ScopeFactory.createPageScope(this.getFullName()); Range range = RangeFactory.ALL; Period period = PeriodFactory.getCurrentMonth(); XWikiStatsService statisticsService = getXWikiContext().getWiki().getStatsService(getXWikiContext()); List<RefererStats> stats = statisticsService.getRefererStatistics("", scope, period, range, this.context); return stats; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCurrentMonthRefStats File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2022-23615
MEDIUM
5.5
xwiki/xwiki-platform
getCurrentMonthRefStats
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
0
Analyze the following code function for security vulnerabilities
@Override public DefaultJpaInstanceConfiguration useLongIntDao() { bind(JpaDao_LongInt.class, DefaultJpaDao_LongInt.class); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: useLongIntDao File: src/main/java/uk/q3c/krail/jpa/persist/DefaultJpaInstanceConfiguration.java Repository: KrailOrg/krail-jpa The code follows secure coding practices.
[ "CWE-89" ]
CVE-2016-15018
MEDIUM
5.2
KrailOrg/krail-jpa
useLongIntDao
src/main/java/uk/q3c/krail/jpa/persist/DefaultJpaInstanceConfiguration.java
c1e848665492e21ef6cc9be443205e36b9a1f6be
0
Analyze the following code function for security vulnerabilities
public void setFavtagsEmailsEnabled(Boolean favtagsEmailsEnabled) { this.favtagsEmailsEnabled = favtagsEmailsEnabled; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setFavtagsEmailsEnabled File: src/main/java/com/erudika/scoold/core/Profile.java Repository: Erudika/scoold The code follows secure coding practices.
[ "CWE-130" ]
CVE-2022-1543
MEDIUM
6.5
Erudika/scoold
setFavtagsEmailsEnabled
src/main/java/com/erudika/scoold/core/Profile.java
62a0e92e1486ddc17676a7ead2c07ff653d167ce
0
Analyze the following code function for security vulnerabilities
private String getDecryptedPasswordForTiedProfile(int userId) throws KeyStoreException, UnrecoverableKeyException, NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, InvalidAlgorithmParameterException, IllegalBlockSizeException, BadPaddingException, CertificateException, IOException { if (DEBUG) Slog.v(TAG, "Get child profile decrytped key"); byte[] storedData = mStorage.readChildProfileLock(userId); if (storedData == null) { throw new FileNotFoundException("Child profile lock file not found"); } byte[] iv = Arrays.copyOfRange(storedData, 0, PROFILE_KEY_IV_SIZE); byte[] encryptedPassword = Arrays.copyOfRange(storedData, PROFILE_KEY_IV_SIZE, storedData.length); byte[] decryptionResult; java.security.KeyStore keyStore = java.security.KeyStore.getInstance("AndroidKeyStore"); keyStore.load(null); SecretKey decryptionKey = (SecretKey) keyStore.getKey( LockPatternUtils.PROFILE_KEY_NAME_DECRYPT + userId, null); Cipher cipher = Cipher.getInstance(KeyProperties.KEY_ALGORITHM_AES + "/" + KeyProperties.BLOCK_MODE_GCM + "/" + KeyProperties.ENCRYPTION_PADDING_NONE); cipher.init(Cipher.DECRYPT_MODE, decryptionKey, new GCMParameterSpec(128, iv)); decryptionResult = cipher.doFinal(encryptedPassword); return new String(decryptionResult, StandardCharsets.UTF_8); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDecryptedPasswordForTiedProfile File: services/core/java/com/android/server/LockSettingsService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3908
MEDIUM
4.3
android
getDecryptedPasswordForTiedProfile
services/core/java/com/android/server/LockSettingsService.java
96daf7d4893f614714761af2d53dfb93214a32e4
0
Analyze the following code function for security vulnerabilities
@Override public boolean endCall(String callingPackage) { try { Log.startSession("TSI.eC", Log.getPackageAbbreviation(callingPackage)); synchronized (mLock) { if (!enforceAnswerCallPermission(callingPackage, Binder.getCallingUid())) { throw new SecurityException("requires ANSWER_PHONE_CALLS permission"); } long token = Binder.clearCallingIdentity(); try { return endCallInternal(callingPackage); } finally { Binder.restoreCallingIdentity(token); } } } finally { Log.endSession(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: endCall File: src/com/android/server/telecom/TelecomServiceImpl.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21394
MEDIUM
5.5
android
endCall
src/com/android/server/telecom/TelecomServiceImpl.java
68dca62035c49e14ad26a54f614199cb29a3393f
0
Analyze the following code function for security vulnerabilities
public static String id(String id) { return find().replaceAll(":profile_id", id); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: id File: spark/spark-base/src/main/java/com/thoughtworks/go/spark/Routes.java Repository: gocd The code follows secure coding practices.
[ "CWE-697" ]
CVE-2022-39308
MEDIUM
5.9
gocd
id
spark/spark-base/src/main/java/com/thoughtworks/go/spark/Routes.java
236d4baf92e6607f2841c151c855adcc477238b8
0
Analyze the following code function for security vulnerabilities
public synchronized void reset() throws IOException { try { close(); } finally { if (memory == null) { memory = new MemoryOutput(); } else { memory.reset(); } out = memory; if (file != null) { File deleteMe = file; file = null; if (!deleteMe.delete()) { throw new IOException("Could not delete: " + deleteMe); } } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: reset File: guava/src/com/google/common/io/FileBackedOutputStream.java Repository: google/guava The code follows secure coding practices.
[ "CWE-552" ]
CVE-2023-2976
HIGH
7.1
google/guava
reset
guava/src/com/google/common/io/FileBackedOutputStream.java
feb83a1c8fd2e7670b244d5afd23cba5aca43284
0
Analyze the following code function for security vulnerabilities
@Override public void onAuthenticatorTaskCallback(RemoteOperationResult result) { mWaitingForOpId = Long.MAX_VALUE; dismissWaitingDialog(); mAsyncTask = null; if (result.isSuccess()) { Log_OC.d(TAG, "Successful access - time to save the account"); boolean success = false; if (mAction == ACTION_CREATE) { success = createAccount(result); } else { try { updateAccountAuthentication(); success = true; } catch (AccountNotFoundException e) { Log_OC.e(TAG, "Account " + mAccount + " was removed!", e); DisplayUtils.showSnackMessage(findViewById(R.id.scroll), R.string.auth_account_does_not_exist); finish(); } } // Reset webView webViewPassword = null; webViewUser = null; deleteCookies(); if (success) { accountManager.setCurrentOwnCloudAccount(mAccount.name); if (onlyAdd) { finish(); } else { Intent i = new Intent(this, FileDisplayActivity.class); i.setAction(FileDisplayActivity.RESTART); i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(i); } } else { // init webView again if (mLoginWebView != null) { mLoginWebView.setVisibility(View.GONE); } setContentView(R.layout.account_setup); initOverallUi(); mAuthStatusView = findViewById(R.id.auth_status_text); mHostUrlInput.setText(mServerInfo.mBaseUrl); mServerStatusView.setVisibility(View.GONE); showAuthStatus(); } } else if (result.isServerFail() || result.isException()) { /// server errors or exceptions in authorization take to requiring a new check of the server mServerInfo = new GetServerInfoOperation.ServerInfo(); // update status icon and text updateServerStatusIconAndText(result); showServerStatus(); mAuthStatusIcon = 0; mAuthStatusText = EMPTY_STRING; // very special case (TODO: move to a common place for all the remote operations) if (result.getCode() == ResultCode.SSL_RECOVERABLE_PEER_UNVERIFIED) { showUntrustedCertDialog(result); } } else { // authorization fail due to client side - probably wrong credentials mLoginWebView = findViewById(R.id.login_webview); if (mLoginWebView != null) { initWebViewLogin(mServerInfo.mBaseUrl + WEB_LOGIN, false); DisplayUtils.showSnackMessage(this, mLoginWebView, R.string.auth_access_failed, result.getLogMessage()); } else { DisplayUtils.showSnackMessage(this, R.string.auth_access_failed, result.getLogMessage()); // init webView again mLoginWebView.setVisibility(View.GONE); updateAuthStatusIconAndText(result); } // reset webview webViewPassword = null; webViewUser = null; deleteCookies(); Log_OC.d(TAG, "Access failed: " + result.getLogMessage()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onAuthenticatorTaskCallback File: src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java Repository: nextcloud/android The code follows secure coding practices.
[ "CWE-248" ]
CVE-2021-32694
MEDIUM
4.3
nextcloud/android
onAuthenticatorTaskCallback
src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java
9343bdd85d70625a90e0c952897957a102c2421b
0
Analyze the following code function for security vulnerabilities
public void setDestination(File destination) { this.destination = destination; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setDestination File: pf4j/src/main/java/org/pf4j/util/Unzip.java Repository: pf4j The code follows secure coding practices.
[ "CWE-22" ]
CVE-2023-40827
HIGH
7.5
pf4j
setDestination
pf4j/src/main/java/org/pf4j/util/Unzip.java
ed9392069fe14c6c30d9f876710e5ad40f7ea8c1
0
Analyze the following code function for security vulnerabilities
public <T> T get(Object resourceURI, EntityReference reference, boolean failIfNotFound) throws Exception { GetMethod getMethod = assertStatusCodes(executeGet(resourceURI, reference), false, failIfNotFound ? STATUS_OK : STATUS_OK_NOT_FOUND); if (getMethod.getStatusCode() == Status.NOT_FOUND.getStatusCode()) { return null; } if (reference != null && reference.getType() == EntityType.ATTACHMENT) { return (T) getMethod.getResponseBodyAsStream(); } else { try { try (InputStream stream = getMethod.getResponseBodyAsStream()) { return toResource(stream); } } finally { getMethod.releaseConnection(); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: get File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2023-35166
HIGH
8.8
xwiki/xwiki-platform
get
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
0
Analyze the following code function for security vulnerabilities
@Test public void parseQueryTSUIDTypeWDS() throws Exception { HttpQuery query = NettyMocks.getQuery(tsdb, "/api/query?start=1h-ago&tsuid=sum:1m-sum:010101"); TSQuery tsq = (TSQuery) parseQuery.invoke(rpc, tsdb, query, expressions); assertNotNull(tsq); assertEquals("1h-ago", tsq.getStart()); assertNotNull(tsq.getQueries()); TSSubQuery sub = tsq.getQueries().get(0); assertNotNull(sub); assertEquals("sum", sub.getAggregator()); assertEquals(1, sub.getTsuids().size()); assertEquals("010101", sub.getTsuids().get(0)); assertEquals("1m-sum", sub.getDownsample()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: parseQueryTSUIDTypeWDS File: test/tsd/TestQueryRpc.java Repository: OpenTSDB/opentsdb The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-25827
MEDIUM
6.1
OpenTSDB/opentsdb
parseQueryTSUIDTypeWDS
test/tsd/TestQueryRpc.java
ff02c1e95e60528275f69b31bcbf7b2ac625cea8
0
Analyze the following code function for security vulnerabilities
@Override public void removePortForwardingEventListener(PortForwardingEventListener listener) { if (listener == null) { return; } PortForwardingEventListener.validateListener(listener); if (this.tunnelListeners.remove(listener)) { if (log.isTraceEnabled()) { log.trace("removePortForwardingEventListener({})[{}] removed", this, listener); } } else { if (log.isTraceEnabled()) { log.trace("removePortForwardingEventListener({})[{}] not registered", this, listener); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removePortForwardingEventListener File: sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java Repository: apache/mina-sshd The code follows secure coding practices.
[ "CWE-354" ]
CVE-2023-48795
MEDIUM
5.9
apache/mina-sshd
removePortForwardingEventListener
sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
6b0fd46f64bcb75eeeee31d65f10242660aad7c1
0
Analyze the following code function for security vulnerabilities
InsetsState getFrozenInsetsState() { return mFrozenInsetsState; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getFrozenInsetsState File: services/core/java/com/android/server/wm/WindowState.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-35674
HIGH
7.8
android
getFrozenInsetsState
services/core/java/com/android/server/wm/WindowState.java
7428962d3b064ce1122809d87af65099d1129c9e
0
Analyze the following code function for security vulnerabilities
private static String generate(String language, GeneratorInput opts, Type type) { LOGGER.debug(String.format(Locale.ROOT,"generate %s for %s", type.getTypeName(), language)); if (opts == null) { throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "No options were supplied"); } JsonNode node = opts.getSpec(); if (node != null && "{}".equals(node.toString())) { LOGGER.debug("ignoring empty spec"); node = null; } OpenAPI openapi; ParseOptions parseOptions = new ParseOptions(); parseOptions.setResolve(true); if (node == null) { if (opts.getOpenAPIUrl() != null) { if (opts.getAuthorizationValue() != null) { List<AuthorizationValue> authorizationValues = new ArrayList<>(); authorizationValues.add(opts.getAuthorizationValue()); openapi = new OpenAPIParser().readLocation(opts.getOpenAPIUrl(), authorizationValues, parseOptions).getOpenAPI(); } else { openapi = new OpenAPIParser().readLocation(opts.getOpenAPIUrl(), null, parseOptions).getOpenAPI(); } } else { throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "No OpenAPI specification was supplied"); } } else if (opts.getAuthorizationValue() != null) { List<AuthorizationValue> authorizationValues = new ArrayList<>(); authorizationValues.add(opts.getAuthorizationValue()); openapi = new OpenAPIParser().readContents(node.toString(), authorizationValues, parseOptions).getOpenAPI(); } else { openapi = new OpenAPIParser().readContents(node.toString(), null, parseOptions).getOpenAPI(); } if (openapi == null) { throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "The OpenAPI specification supplied was not valid"); } String destPath = null; if (opts.getOptions() != null) { destPath = opts.getOptions().get("outputFolder"); } if (destPath == null) { destPath = language + "-" + type.getTypeName(); } ClientOptInput clientOptInput = new ClientOptInput(); String outputFolder = getTmpFolder().getAbsolutePath() + File.separator + destPath; String outputFilename = outputFolder + "-bundle.zip"; clientOptInput.openAPI(openapi); CodegenConfig codegenConfig; try { codegenConfig = CodegenConfigLoader.forName(language); } catch (RuntimeException e) { throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Unsupported target " + language + " supplied"); } if (opts.getOptions() != null) { codegenConfig.additionalProperties().putAll(opts.getOptions()); codegenConfig.additionalProperties().put("openAPI", openapi); } codegenConfig.setOutputDir(outputFolder); clientOptInput.config(codegenConfig); try { List<File> files = new DefaultGenerator().opts(clientOptInput).generate(); if (files.size() > 0) { List<File> filesToAdd = new ArrayList<>(); LOGGER.debug("adding to " + outputFolder); filesToAdd.add(new File(outputFolder)); ZipUtil zip = new ZipUtil(); zip.compressFiles(filesToAdd, outputFilename); } else { throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "A target generation was attempted, but no files were created!"); } for (File file : files) { try { file.delete(); } catch (Exception e) { LOGGER.error("unable to delete file " + file.getAbsolutePath(), e); } } try { new File(outputFolder).delete(); } catch (Exception e) { LOGGER.error("unable to delete output folder " + outputFolder, e); } } catch (Exception e) { throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Unable to build target: " + e.getMessage(), e); } return outputFilename; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: generate File: modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/service/Generator.java Repository: OpenAPITools/openapi-generator The code follows secure coding practices.
[ "CWE-668" ]
CVE-2021-21428
MEDIUM
4.4
OpenAPITools/openapi-generator
generate
modules/openapi-generator-online/src/main/java/org/openapitools/codegen/online/service/Generator.java
be64b6f1b3d4d7b6cfdce12c0f3953be6a1ff195
0
Analyze the following code function for security vulnerabilities
public static ClassLoader getClassLoader(final Class<?> clazz) { return PlatformDependent0.getClassLoader(clazz); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getClassLoader File: common/src/main/java/io/netty/util/internal/PlatformDependent.java Repository: netty The code follows secure coding practices.
[ "CWE-668", "CWE-378", "CWE-379" ]
CVE-2022-24823
LOW
1.9
netty
getClassLoader
common/src/main/java/io/netty/util/internal/PlatformDependent.java
185f8b2756a36aaa4f973f1a2a025e7d981823f1
0
Analyze the following code function for security vulnerabilities
@Deprecated public Vector<BaseObject> getObjects(String className) { List<BaseObject> result = this.xObjects.get(resolveClassReference(className)); return result == null ? null : new Vector<BaseObject>(result); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getObjects File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-787" ]
CVE-2023-26470
HIGH
7.5
xwiki/xwiki-platform
getObjects
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
db3d1c62fc5fb59fefcda3b86065d2d362f55164
0
Analyze the following code function for security vulnerabilities
public String getLocalUserName(String user, String format, boolean link, XWikiContext context) { if (hasCentralizedAuthentication(context)) { return getUserName(user, format, link, context); } else { return getUserName(user.substring(user.indexOf(':') + 1), format, link, context); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLocalUserName 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
getLocalUserName
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
f9a677408ffb06f309be46ef9d8df1915d9099a4
0
Analyze the following code function for security vulnerabilities
@Override public boolean hasAttributes() { return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hasAttributes File: src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java Repository: HtmlUnit/htmlunit The code follows secure coding practices.
[ "CWE-787" ]
CVE-2023-2798
HIGH
7.5
HtmlUnit/htmlunit
hasAttributes
src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
940dc7fd
0
Analyze the following code function for security vulnerabilities
public static void setUseStreamManagementDefault(boolean useSmDefault) { XMPPTCPConnection.useSmDefault = useSmDefault; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setUseStreamManagementDefault File: smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java Repository: igniterealtime/Smack The code follows secure coding practices.
[ "CWE-362" ]
CVE-2016-10027
MEDIUM
4.3
igniterealtime/Smack
setUseStreamManagementDefault
smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
0
Analyze the following code function for security vulnerabilities
@Override public void setUserInfoController(UserInfoController userInfoController) { userInfoController.addListener(this); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setUserInfoController File: packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStatusBarHeader.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3886
HIGH
7.2
android
setUserInfoController
packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStatusBarHeader.java
6ca6cd5a50311d58a1b7bf8fbef3f9aa29eadcd5
0