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
protected JsonDeserializer<Object> _clearIfStdImpl(JsonDeserializer<Object> deser) { return ClassUtil.isJacksonStdImpl(deser) ? null : deser; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: _clearIfStdImpl File: src/main/java/com/fasterxml/jackson/databind/deser/std/UntypedObjectDeserializer.java Repository: FasterXML/jackson-databind The code follows secure coding practices.
[ "CWE-787" ]
CVE-2020-36518
MEDIUM
5
FasterXML/jackson-databind
_clearIfStdImpl
src/main/java/com/fasterxml/jackson/databind/deser/std/UntypedObjectDeserializer.java
8238ab41d0350fb915797c89d46777b4496b74fd
0
Analyze the following code function for security vulnerabilities
public com.xpn.xwiki.api.Document newDocument(XWikiContext context) { String customClass = getCustomClass(); return newDocument(customClass, context); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: newDocument 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
newDocument
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
@Reference public void setDublinCoreService(DublinCoreCatalogService dublinCoreService) { this.dublinCoreService = dublinCoreService; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setDublinCoreService File: modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/impl/IngestServiceImpl.java Repository: opencast The code follows secure coding practices.
[ "CWE-287" ]
CVE-2022-29237
MEDIUM
5.5
opencast
setDublinCoreService
modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/impl/IngestServiceImpl.java
8d5ec1614eed109b812bc27b0c6d3214e456d4e7
0
Analyze the following code function for security vulnerabilities
private XWikiAttachmentStoreInterface getXWikiAttachmentStoreInterface(XWikiAttachment attachment) throws ComponentLookupException { String storeHint = attachment.getContentStore(); if (storeHint != null && !storeHint.equals(HINT)) { return this.componentManager.getInstance(XWikiAttachmentStoreInterface.class, storeHint); } return this.attachmentContentStore; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getXWikiAttachmentStoreInterface 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
getXWikiAttachmentStoreInterface
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 void doDiagnostics(DOMDocument document, XMLEntityResolver entityResolver, List<Diagnostic> diagnostics, ContentModelSettings contentModelSettings, CancelChecker monitor) { try { // It should be better to cache XML Schema with XMLGrammarCachingConfiguration, // but we cannot use // XMLGrammarCachingConfiguration because cache is done with target namespaces. // There are conflicts when // 2 XML Schemas don't define target namespaces. LSPXMLParserConfiguration configuration = new LSPXMLParserConfiguration( isDisableOnlyDTDValidation(document)); if (entityResolver != null) { configuration.setProperty("http://apache.org/xml/properties/internal/entity-resolver", entityResolver); //$NON-NLS-1$ } final LSPErrorReporterForXML reporter = new LSPErrorReporterForXML(document, diagnostics); boolean externalDTDValid = checkExternalDTD(document, reporter, configuration); SAXParser parser = new SAXParser(configuration); // Add LSP error reporter to fill LSP diagnostics from Xerces errors parser.setProperty("http://apache.org/xml/properties/internal/error-reporter", reporter); parser.setFeature("http://apache.org/xml/features/continue-after-fatal-error", false); //$NON-NLS-1$ parser.setFeature("http://xml.org/sax/features/namespace-prefixes", true /* document.hasNamespaces() */); //$NON-NLS-1$ parser.setFeature("http://xml.org/sax/features/namespaces", true /* document.hasNamespaces() */); //$NON-NLS-1$ // Add LSP content handler to stop XML parsing if monitor is canceled. parser.setContentHandler(new LSPContentHandler(monitor)); boolean hasGrammar = document.hasGrammar(); // If diagnostics for Schema preference is enabled XMLValidationSettings validationSettings = contentModelSettings != null ? contentModelSettings.getValidation() : null; if ((validationSettings == null) || validationSettings.isSchema()) { checkExternalSchema(document.getExternalSchemaLocation(), parser); parser.setFeature("http://apache.org/xml/features/validation/schema", hasGrammar); //$NON-NLS-1$ // warn if XML document is not bound to a grammar according the settings warnNoGrammar(document, diagnostics, contentModelSettings); } else { hasGrammar = false; // validation for Schema was disabled } parser.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", externalDTDValid); parser.setFeature("http://xml.org/sax/features/validation", hasGrammar && externalDTDValid); //$NON-NLS-1$ // Parse XML String content = document.getText(); String uri = document.getDocumentURI(); InputSource inputSource = new InputSource(); inputSource.setByteStream(new ByteArrayInputStream(content.getBytes(StandardCharsets.UTF_8))); inputSource.setSystemId(uri); parser.parse(inputSource); } catch (IOException | SAXException | CancellationException exception) { // ignore error } catch (CacheResourceDownloadingException e) { throw e; } catch (Exception e) { LOGGER.log(Level.SEVERE, "Unexpected XMLValidator error", e); } }
Vulnerability Classification: - CWE: CWE-611 - CVE: CVE-2019-18213 - Severity: MEDIUM - CVSS Score: 6.5 Description: Add disallowDocTypeDecl & resolveExternalEntities validation settings. Signed-off-by: azerr <azerr@redhat.com> Function: doDiagnostics File: org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/extensions/contentmodel/participants/diagnostics/XMLValidator.java Repository: eclipse/lemminx Fixed Code: public static void doDiagnostics(DOMDocument document, XMLEntityResolver entityResolver, List<Diagnostic> diagnostics, ContentModelSettings contentModelSettings, CancelChecker monitor) { try { XMLValidationSettings validationSettings = contentModelSettings != null ? contentModelSettings.getValidation() : null; LSPXMLParserConfiguration configuration = new LSPXMLParserConfiguration( isDisableOnlyDTDValidation(document), validationSettings); if (entityResolver != null) { configuration.setProperty("http://apache.org/xml/properties/internal/entity-resolver", entityResolver); //$NON-NLS-1$ } final LSPErrorReporterForXML reporter = new LSPErrorReporterForXML(document, diagnostics); boolean externalDTDValid = checkExternalDTD(document, reporter, configuration); SAXParser parser = new SAXParser(configuration); // Add LSP error reporter to fill LSP diagnostics from Xerces errors parser.setProperty("http://apache.org/xml/properties/internal/error-reporter", reporter); parser.setFeature("http://apache.org/xml/features/continue-after-fatal-error", false); //$NON-NLS-1$ parser.setFeature("http://xml.org/sax/features/namespace-prefixes", true /* document.hasNamespaces() */); //$NON-NLS-1$ parser.setFeature("http://xml.org/sax/features/namespaces", true /* document.hasNamespaces() */); //$NON-NLS-1$ // Add LSP content handler to stop XML parsing if monitor is canceled. parser.setContentHandler(new LSPContentHandler(monitor)); boolean hasGrammar = document.hasGrammar(); // If diagnostics for Schema preference is enabled if ((validationSettings == null) || validationSettings.isSchema()) { checkExternalSchema(document.getExternalSchemaLocation(), parser); parser.setFeature("http://apache.org/xml/features/validation/schema", hasGrammar); //$NON-NLS-1$ // warn if XML document is not bound to a grammar according the settings warnNoGrammar(document, diagnostics, contentModelSettings); } else { hasGrammar = false; // validation for Schema was disabled } parser.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", externalDTDValid); parser.setFeature("http://xml.org/sax/features/validation", hasGrammar && externalDTDValid); //$NON-NLS-1$ // Parse XML String content = document.getText(); String uri = document.getDocumentURI(); InputSource inputSource = new InputSource(); inputSource.setByteStream(new ByteArrayInputStream(content.getBytes(StandardCharsets.UTF_8))); inputSource.setSystemId(uri); parser.parse(inputSource); } catch (IOException | SAXException | CancellationException exception) { // ignore error } catch (CacheResourceDownloadingException e) { throw e; } catch (Exception e) { LOGGER.log(Level.SEVERE, "Unexpected XMLValidator error", e); } }
[ "CWE-611" ]
CVE-2019-18213
MEDIUM
6.5
eclipse/lemminx
doDiagnostics
org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/extensions/contentmodel/participants/diagnostics/XMLValidator.java
c8bf3245a72cace50ee2aae5eee69538c58ce056
1
Analyze the following code function for security vulnerabilities
@Override public boolean setProcessMemoryTrimLevel(String process, int userId, int level) throws RemoteException { Parcel data = Parcel.obtain(); Parcel reply = Parcel.obtain(); data.writeInterfaceToken(IActivityManager.descriptor); data.writeString(process); data.writeInt(userId); data.writeInt(level); mRemote.transact(SET_PROCESS_MEMORY_TRIM_TRANSACTION, data, reply, 0); reply.readException(); int res = reply.readInt(); data.recycle(); reply.recycle(); return res != 0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setProcessMemoryTrimLevel File: core/java/android/app/ActivityManagerNative.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
setProcessMemoryTrimLevel
core/java/android/app/ActivityManagerNative.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
private <T> CompletionHandler<WriteResult> createWriteCompletionHandler(final GrizzlyResponseFuture<T> future) { return new CompletionHandler<WriteResult>() { public void cancelled() { future.cancel(true); } public void failed(Throwable throwable) { future.abort(throwable); } public void completed(WriteResult result) { } public void updated(WriteResult result) { // no-op } }; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createWriteCompletionHandler File: providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java Repository: AsyncHttpClient/async-http-client The code follows secure coding practices.
[ "CWE-345" ]
CVE-2013-7397
MEDIUM
4.3
AsyncHttpClient/async-http-client
createWriteCompletionHandler
providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java
df6ed70e86c8fc340ed75563e016c8baa94d7e72
0
Analyze the following code function for security vulnerabilities
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { if (System.currentTimeMillis() > (request.getSession().getLastAccessedTime() + 300000)) { request.setAttribute("error", "Login session timed out, please click retry to log back in"); request.setAttribute("previous", "index.html"); } PrintWriter out = response.getWriter(); //Gets the PrintWriter String back; String previous = (String) request.getAttribute("previous"); if (previous.equals("/LoginController") || previous.equals("index.html")) { back = "index.html"; } else if (previous.equals("searchcontact")) { back = "contact.jsp"; } else { back = "email.html"; } out.println( "<!DOCTYPE html>" + "<html>" + "<head lang=\"en\">" + "<meta charset=\"UTF-8\">" + "<title>Error Occured</title>" + "</head>" + "<body>" + "<center>" + "<h1>Error Occurred!</h1>" + "<div>" + "<br>" + "Error: " + request.getAttribute("error") + "<br>" + "<br>" + "<br>" +//Gets the error message "</div>" + "<div class='error-actions'>" + "<a href='" + back + "'>Retry</a>" + "</div>" + "</center>" + "</body>" + "</html>" ); }
Vulnerability Classification: - CWE: CWE-89 - CVE: CVE-2014-125075 - Severity: MEDIUM - CVSS Score: 5.2 Description: Added validation for contact adding and changed use of prepared statements to avoid SQL injection. Function: doPost File: src/Error.java Repository: ChrisMcMStone/gmail-servlet Fixed Code: protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter out = response.getWriter(); //Gets the PrintWriter String back = (String) request.getAttribute("previous"); out.println( "<!DOCTYPE html>" + "<html>" + "<head lang=\"en\">" + "<meta charset=\"UTF-8\">" + "<title>Error Occured</title>" + "</head>" + "<body>" + "<center>" + "<h1>Error Occurred!</h1>" + "<div>" + "<br>" + "Error: " + request.getAttribute("error") + "<br>" + "<br>" + "<br>" +//Gets the error message "</div>" + "<div class='error-actions'>" + "<a href='" + back + "'>Retry</a>" + "</div>" + "</center>" + "</body>" + "</html>" ); }
[ "CWE-89" ]
CVE-2014-125075
MEDIUM
5.2
ChrisMcMStone/gmail-servlet
doPost
src/Error.java
5d72753c2e95bb373aa86824939397dc25f679ea
1
Analyze the following code function for security vulnerabilities
@Override public XMLBuilder up(int steps) { Node currNode = super.upImpl(steps); if (currNode instanceof Document) { return new XMLBuilder((Document) currNode); } else { return new XMLBuilder(currNode, null); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: up File: src/main/java/com/jamesmurty/utils/XMLBuilder.java Repository: jmurty/java-xmlbuilder The code follows secure coding practices.
[ "CWE-611" ]
CVE-2014-125087
MEDIUM
5.2
jmurty/java-xmlbuilder
up
src/main/java/com/jamesmurty/utils/XMLBuilder.java
e6fddca201790abab4f2c274341c0bb8835c3e73
0
Analyze the following code function for security vulnerabilities
@Override public Deployment getDeployment() { return deployment; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDeployment File: servlet/src/main/java/io/undertow/servlet/core/DeploymentManagerImpl.java Repository: undertow-io/undertow The code follows secure coding practices.
[ "CWE-862" ]
CVE-2019-10184
MEDIUM
5
undertow-io/undertow
getDeployment
servlet/src/main/java/io/undertow/servlet/core/DeploymentManagerImpl.java
d2715e3afa13f50deaa19643676816ce391551e9
0
Analyze the following code function for security vulnerabilities
private static void findLibraryUses(ArrayList<Element> dest, String label, Iterable<Element> candidates) { for (Element elt : candidates) { String lib = elt.getAttribute("lib"); if (lib.equals(label)) { dest.add(elt); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: findLibraryUses File: src/com/cburch/logisim/file/XmlReader.java Repository: logisim-evolution The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-1000889
MEDIUM
6.8
logisim-evolution
findLibraryUses
src/com/cburch/logisim/file/XmlReader.java
90aee8f8ceef463884cc400af4f6d1f109fb0972
0
Analyze the following code function for security vulnerabilities
void saveIconAndFixUpShortcutLocked(ShortcutPackage p, ShortcutInfo shortcut) { if (shortcut.hasIconFile() || shortcut.hasIconResource() || shortcut.hasIconUri()) { return; } final long token = injectClearCallingIdentity(); try { // Clear icon info on the shortcut. p.removeIcon(shortcut); final Icon icon = shortcut.getIcon(); if (icon == null) { return; // has no icon } int maxIconDimension = mMaxIconDimension; Bitmap bitmap; try { switch (icon.getType()) { case Icon.TYPE_RESOURCE: { injectValidateIconResPackage(shortcut, icon); shortcut.setIconResourceId(icon.getResId()); shortcut.addFlags(ShortcutInfo.FLAG_HAS_ICON_RES); return; } case Icon.TYPE_URI: shortcut.setIconUri(icon.getUriString()); shortcut.addFlags(ShortcutInfo.FLAG_HAS_ICON_URI); return; case Icon.TYPE_URI_ADAPTIVE_BITMAP: shortcut.setIconUri(icon.getUriString()); shortcut.addFlags(ShortcutInfo.FLAG_HAS_ICON_URI | ShortcutInfo.FLAG_ADAPTIVE_BITMAP); return; case Icon.TYPE_BITMAP: bitmap = icon.getBitmap(); // Don't recycle in this case. break; case Icon.TYPE_ADAPTIVE_BITMAP: { bitmap = icon.getBitmap(); // Don't recycle in this case. maxIconDimension *= (1 + 2 * AdaptiveIconDrawable.getExtraInsetFraction()); break; } default: // This shouldn't happen because we've already validated the icon, but // just in case. throw ShortcutInfo.getInvalidIconException(); } p.saveBitmap(shortcut, maxIconDimension, mIconPersistFormat, mIconPersistQuality); } finally { // Once saved, we won't use the original icon information, so null it out. shortcut.clearIcon(); } } finally { injectRestoreCallingIdentity(token); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: saveIconAndFixUpShortcutLocked File: services/core/java/com/android/server/pm/ShortcutService.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40079
HIGH
7.8
android
saveIconAndFixUpShortcutLocked
services/core/java/com/android/server/pm/ShortcutService.java
96e0524c48c6e58af7d15a2caf35082186fc8de2
0
Analyze the following code function for security vulnerabilities
public void bind(int index, boolean value) { mPreparedStatement.bindLong(index, value ? 1 : 0); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: bind File: core/java/android/database/DatabaseUtils.java Repository: android The code follows secure coding practices.
[ "CWE-502" ]
CVE-2023-40121
MEDIUM
5.5
android
bind
core/java/android/database/DatabaseUtils.java
3287ac2d2565dc96bf6177967f8e3aed33954253
0
Analyze the following code function for security vulnerabilities
@Override public String getSortColumnSQL(SortColumn sortColumn) { Column column = sortColumn.getSource(); String columnSQL = getColumnSQL(column); // Always order by the alias (if any) if (!StringUtils.isBlank(column.getAlias())) { columnSQL = getAliasForStatementSQL(column.getAlias()); } return columnSQL + " " + getSortOrderSQL(sortColumn.getOrder()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSortColumnSQL File: dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java Repository: dashbuilder The code follows secure coding practices.
[ "CWE-89" ]
CVE-2016-4999
HIGH
7.5
dashbuilder
getSortColumnSQL
dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java
8574899e3b6455547b534f570b2330ff772e524b
0
Analyze the following code function for security vulnerabilities
private static boolean isValidMethodName(String name) { return !"getClass".equals(name) && !"getDeclaringClass".equals(name); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isValidMethodName 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
isValidMethodName
src/main/java/org/json/JSONObject.java
661114c50dcfd53bb041aab66f14bb91e0a87c8a
0
Analyze the following code function for security vulnerabilities
public void removeColumn(Column<T, ?> column) { if (columnSet.remove(column)) { String columnId = column.getInternalId(); int displayIndex = getState(false).columnOrder.indexOf(columnId); assert displayIndex != -1 : "Tried to remove a column which is not included in columnOrder. This should not be possible as all columns should be in columnOrder."; columnKeys.remove(columnId); columnIds.remove(column.getId()); column.remove(); removeDataGenerator(column.getDataGenerator()); getHeader().removeColumn(columnId); getFooter().removeColumn(columnId); getState(true).columnOrder.remove(columnId); // Remove column from sorted columns. List<GridSortOrder<T>> filteredSortOrder = sortOrder.stream() .filter(order -> !order.getSorted().equals(column)) .collect(Collectors.toList()); if (filteredSortOrder.size() < sortOrder.size()) { setSortOrder(filteredSortOrder); } if (displayIndex < getFrozenColumnCount()) { setFrozenColumnCount(getFrozenColumnCount() - 1); } } else { throw new IllegalArgumentException("Column with id " + column.getId() + " cannot be removed from the grid"); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeColumn 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
removeColumn
server/src/main/java/com/vaadin/ui/Grid.java
c40bed109c3723b38694ed160ea647fef5b28593
0
Analyze the following code function for security vulnerabilities
public String getModelStore() { return modelStore; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getModelStore File: frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java Repository: pytorch/serve The code follows secure coding practices.
[ "CWE-918" ]
CVE-2023-43654
CRITICAL
9.8
pytorch/serve
getModelStore
frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java
391bdec3348e30de173fbb7c7277970e0b53c8ad
0
Analyze the following code function for security vulnerabilities
JsonValue parse() throws IOException { // Braces for the root object are optional read(); skipWhiteSpace(); if (legacyRoot) { switch (current) { case '[': case '{': return checkTrailing(readValue()); default: try { // assume we have a root object without braces return checkTrailing(readObject(true)); } catch (Exception exception) { // test if we are dealing with a single JSON value instead (true/false/null/num/"") reset(); read(); skipWhiteSpace(); try { return checkTrailing(readValue()); } catch (Exception exception2) { } throw exception; // throw original error } } } else { return checkTrailing(readValue()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: parse File: src/main/org/hjson/HjsonParser.java Repository: hjson/hjson-java The code follows secure coding practices.
[ "CWE-787" ]
CVE-2023-34620
HIGH
7.5
hjson/hjson-java
parse
src/main/org/hjson/HjsonParser.java
00e3b1325cb6c2b80b347dbec9181fd17ce0a599
0
Analyze the following code function for security vulnerabilities
int getNestingDepth() { return lexer.getNestingDepth(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getNestingDepth File: toml/src/main/java/com/fasterxml/jackson/dataformat/toml/Parser.java Repository: FasterXML/jackson-dataformats-text The code follows secure coding practices.
[ "CWE-787" ]
CVE-2023-3894
HIGH
7.5
FasterXML/jackson-dataformats-text
getNestingDepth
toml/src/main/java/com/fasterxml/jackson/dataformat/toml/Parser.java
20a209387931dba31e1a027b74976911c3df39fe
0
Analyze the following code function for security vulnerabilities
protected void attachApp(WebAppServlet appServlet, String virtualHost) { server.addServlet(appServlet.contextPath + "/*", appServlet, virtualHost); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: attachApp File: 1.x/src/rogatkin/web/WarRoller.java Repository: drogatkin/TJWS2 The code follows secure coding practices.
[ "CWE-22" ]
CVE-2022-4594
CRITICAL
9.8
drogatkin/TJWS2
attachApp
1.x/src/rogatkin/web/WarRoller.java
1bac15c496ec54efe21ad7fab4e17633778582fc
0
Analyze the following code function for security vulnerabilities
@Override public void setStatusHints(String callId, StatusHints statusHints, Session.Info sessionInfo) { Log.startSession(sessionInfo, "CSW.sSH", mPackageAbbreviation); long token = Binder.clearCallingIdentity(); try { synchronized (mLock) { logIncoming("setStatusHints %s %s", callId, statusHints); Call call = mCallIdMapper.getCall(callId); if (call != null) { call.setStatusHints(statusHints); } } } catch (Throwable t) { Log.e(ConnectionServiceWrapper.this, t, ""); throw t; } finally { Binder.restoreCallingIdentity(token); Log.endSession(); } }
Vulnerability Classification: - CWE: CWE-Other - CVE: CVE-2023-21283 - Severity: MEDIUM - CVSS Score: 5.5 Description: [conflict] Resolve StatusHints image exploit across user. am: a853f6ba61 Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/services/Telecomm/+/23463634 Fixes: 285211549 Fixes: 280797684 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:41042bd0c8e1e47c19dfdb2a378c70d2090b1e15) Merged-In: I69b0c64413ce3b5e8f56c4fbc5e195a5f5adb6d7 Change-Id: I69b0c64413ce3b5e8f56c4fbc5e195a5f5adb6d7 Function: setStatusHints File: src/com/android/server/telecom/ConnectionServiceWrapper.java Repository: android Fixed Code: @Override public void setStatusHints(String callId, StatusHints statusHints, Session.Info sessionInfo) { Log.startSession(sessionInfo, "CSW.sSH", mPackageAbbreviation); UserHandle callingUserHandle = Binder.getCallingUserHandle(); long token = Binder.clearCallingIdentity(); try { synchronized (mLock) { logIncoming("setStatusHints %s %s", callId, statusHints); // Check status hints image for cross user access if (statusHints != null) { Icon icon = statusHints.getIcon(); statusHints.setIcon(StatusHints.validateAccountIconUserBoundary( icon, callingUserHandle)); } Call call = mCallIdMapper.getCall(callId); if (call != null) { call.setStatusHints(statusHints); } } } catch (Throwable t) { Log.e(ConnectionServiceWrapper.this, t, ""); throw t; } finally { Binder.restoreCallingIdentity(token); Log.endSession(); } }
[ "CWE-Other" ]
CVE-2023-21283
MEDIUM
5.5
android
setStatusHints
src/com/android/server/telecom/ConnectionServiceWrapper.java
9b41a963f352fdb3da1da8c633d45280badfcb24
1
Analyze the following code function for security vulnerabilities
public AsyncHttpClientConfigBean setMaxConnectionLifeTimeInMs(int maxConnectionLifeTimeInMs) { this.maxConnectionLifeTimeInMs = maxConnectionLifeTimeInMs; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setMaxConnectionLifeTimeInMs File: api/src/main/java/org/asynchttpclient/AsyncHttpClientConfigBean.java Repository: AsyncHttpClient/async-http-client The code follows secure coding practices.
[ "CWE-345" ]
CVE-2013-7397
MEDIUM
4.3
AsyncHttpClient/async-http-client
setMaxConnectionLifeTimeInMs
api/src/main/java/org/asynchttpclient/AsyncHttpClientConfigBean.java
df6ed70e86c8fc340ed75563e016c8baa94d7e72
0
Analyze the following code function for security vulnerabilities
private void restoreDeletedAttachment(XWikiAttachment rolledbackAttachment, XWikiContext context) throws XWikiException { // Restore deleted attachments from the trash if (getAttachmentRecycleBinStore() != null) { // There might be multiple versions of the attachment in the trash, search for the right one List<DeletedAttachment> deletedVariants = getAttachmentRecycleBinStore().getAllDeletedAttachments(rolledbackAttachment, context, true); DeletedAttachment correctVariant = null; for (DeletedAttachment variant : deletedVariants) { // Reverse chronological order if (variant.getDate().before(rolledbackAttachment.getDate())) { break; } correctVariant = variant; } if (correctVariant != null) { XWikiAttachment restoredAttachment = correctVariant.restoreAttachment(); boolean updateArchive = false; if (!restoredAttachment.getVersion().equals(rolledbackAttachment.getVersion())) { XWikiAttachment restoredAttachmentRevision = restoredAttachment.getAttachmentRevision(rolledbackAttachment.getVersion(), context); if (restoredAttachmentRevision != null) { // Update the archive since it won't be done by the store (it's a new attachment) // TODO: Remove from the archive the versions greater than the rollbacked one instead (they // would not be lost since they would still be in the recycle bin) ? rolledbackAttachment.setVersion(restoredAttachment.getVersion()); updateArchive = true; restoredAttachment = restoredAttachmentRevision; } } rolledbackAttachment.apply(restoredAttachment); // Restore the deleted archive rolledbackAttachment .setAttachment_archive((XWikiAttachmentArchive) restoredAttachment.getAttachment_archive().clone()); rolledbackAttachment.getAttachment_archive().setAttachment(rolledbackAttachment); if (updateArchive) { rolledbackAttachment.updateContentArchive(context); } } else { // Not found in the trash, set an empty content to avoid errors try { rolledbackAttachment.setContent(new ByteArrayInputStream(new byte[0])); } catch (IOException e) { // The content we pass cannot fail } } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: restoreDeletedAttachment 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
restoreDeletedAttachment
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
f9a677408ffb06f309be46ef9d8df1915d9099a4
0
Analyze the following code function for security vulnerabilities
private <T extends Material> T getExistingOrDefaultMaterial(T defaultMaterial) { for (Material material : this) { if (material.getClass().isAssignableFrom(defaultMaterial.getClass())) { return (T) material; } } return defaultMaterial; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getExistingOrDefaultMaterial File: domain/src/main/java/com/thoughtworks/go/config/materials/Materials.java Repository: gocd The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-39309
MEDIUM
6.5
gocd
getExistingOrDefaultMaterial
domain/src/main/java/com/thoughtworks/go/config/materials/Materials.java
691b479f1310034992da141760e9c5d1f5b60e8a
0
Analyze the following code function for security vulnerabilities
@GuardedBy("this") final void showLaunchWarningLocked(final ActivityRecord cur, final ActivityRecord next) { if (!mLaunchWarningShown) { mLaunchWarningShown = true; mUiHandler.post(new Runnable() { @Override public void run() { synchronized (ActivityManagerService.this) { final Dialog d = new LaunchWarningWindow(mContext, cur, next); d.show(); mUiHandler.postDelayed(new Runnable() { @Override public void run() { synchronized (ActivityManagerService.this) { d.dismiss(); mLaunchWarningShown = false; } } }, 4000); } } }); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: showLaunchWarningLocked File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-863" ]
CVE-2018-9492
HIGH
7.2
android
showLaunchWarningLocked
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
@Override public @PersonalAppsSuspensionReason int getPersonalAppsSuspendedReasons(ComponentName who) { Objects.requireNonNull(who, "ComponentName is null"); final CallerIdentity caller = getCallerIdentity(who); // DO shouldn't be able to use this method. Preconditions.checkCallAuthorization(isProfileOwnerOfOrganizationOwnedDevice(caller)); synchronized (getLockObject()) { final ActiveAdmin admin = getProfileOwnerLocked(caller); final long deadline = admin.mProfileOffDeadline; final int result = makeSuspensionReasons(admin.mSuspendPersonalApps, deadline != 0 && mInjector.systemCurrentTimeMillis() > deadline); Slogf.d(LOG_TAG, "getPersonalAppsSuspendedReasons user: %d; result: %d", mInjector.userHandleGetCallingUserId(), result); return result; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPersonalAppsSuspendedReasons 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
getPersonalAppsSuspendedReasons
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
@NonNull public Builder setColorized(boolean colorize) { mN.extras.putBoolean(EXTRA_COLORIZED, colorize); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setColorized File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
setColorized
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
@Override public int getCurrentTtyMode(String callingPackage, String callingFeatureId) { try { Log.startSession("TSI.gCTM", Log.getPackageAbbreviation(callingPackage)); if (!canReadPhoneState(callingPackage, callingFeatureId, "getCurrentTtyMode")) { return TelecomManager.TTY_MODE_OFF; } synchronized (mLock) { return mCallsManager.getCurrentTtyMode(); } } finally { Log.endSession(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCurrentTtyMode 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
getCurrentTtyMode
src/com/android/server/telecom/TelecomServiceImpl.java
68dca62035c49e14ad26a54f614199cb29a3393f
0
Analyze the following code function for security vulnerabilities
public static UserHandle myUserHandle() { return UserHandle.of(UserHandle.getUserId(myUid())); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: myUserHandle File: core/java/android/os/Process.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3911
HIGH
9.3
android
myUserHandle
core/java/android/os/Process.java
2c7008421cb67f5d89f16911bdbe36f6c35311ad
0
Analyze the following code function for security vulnerabilities
public static List<Node> getNodes(Node node, Pattern... nodePath) { List<Node> res = new ArrayList<>(); getMatchingNodes(node, nodePath, 0, res); return res; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getNodes File: src/edu/stanford/nlp/util/XMLUtils.java Repository: stanfordnlp/CoreNLP The code follows secure coding practices.
[ "CWE-611" ]
CVE-2021-3869
MEDIUM
5
stanfordnlp/CoreNLP
getNodes
src/edu/stanford/nlp/util/XMLUtils.java
5d83f1e8482ca304db8be726cad89554c88f136a
0
Analyze the following code function for security vulnerabilities
public void toDOM(Document document, Element poElement) { poElement.setAttribute("id", id); if (name != null) { Element nameElement = document.createElement("name"); nameElement.appendChild(document.createTextNode(name)); poElement.appendChild(nameElement); } if (text != null) { Element textElement = document.createElement("text"); textElement.appendChild(document.createTextNode(text)); poElement.appendChild(textElement); } if (classId != null) { Element classIdElement = document.createElement("classId"); classIdElement.appendChild(document.createTextNode(classId)); poElement.appendChild(classIdElement); } if (!attrs.isEmpty()) { for (ProfileAttribute attr : attrs) { Element attrElement = document.createElement("attributes"); attr.toDOM(document, attrElement); poElement.appendChild(attrElement); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toDOM File: base/common/src/main/java/com/netscape/certsrv/profile/ProfileOutput.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
toDOM
base/common/src/main/java/com/netscape/certsrv/profile/ProfileOutput.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
@VisibleForTesting void initializePartialConversationNotificationInfo( final ExpandableNotificationRow row, PartialConversationInfo notificationInfoView) throws Exception { NotificationGuts guts = row.getGuts(); StatusBarNotification sbn = row.getEntry().getSbn(); String packageName = sbn.getPackageName(); // Settings link is only valid for notifications that specify a non-system user NotificationInfo.OnSettingsClickListener onSettingsClick = null; UserHandle userHandle = sbn.getUser(); PackageManager pmUser = CentralSurfaces.getPackageManagerForUser( mContext, userHandle.getIdentifier()); if (!userHandle.equals(UserHandle.ALL) || mLockscreenUserManager.getCurrentUserId() == UserHandle.USER_SYSTEM) { onSettingsClick = (View v, NotificationChannel channel, int appUid) -> { mMetricsLogger.action(MetricsProto.MetricsEvent.ACTION_NOTE_INFO); guts.resetFalsingCheck(); mOnSettingsClickListener.onSettingsClick(sbn.getKey()); startAppNotificationSettingsActivity(packageName, appUid, channel, row); }; } notificationInfoView.bindNotification( pmUser, mNotificationManager, mChannelEditorDialogController, packageName, row.getEntry().getChannel(), row.getUniqueChannels(), row.getEntry(), onSettingsClick, mDeviceProvisionedController.isDeviceProvisioned(), row.getIsNonblockable()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: initializePartialConversationNotificationInfo File: packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationGutsManager.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40098
MEDIUM
5.5
android
initializePartialConversationNotificationInfo
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationGutsManager.java
d21ffbe8a2eeb2a5e6da7efbb1a0430ba6b022e0
0
Analyze the following code function for security vulnerabilities
@Override public void setAlwaysFinish(boolean enabled) { enforceCallingPermission(android.Manifest.permission.SET_ALWAYS_FINISH, "setAlwaysFinish()"); final long ident = Binder.clearCallingIdentity(); try { Settings.Global.putInt( mContext.getContentResolver(), Settings.Global.ALWAYS_FINISH_ACTIVITIES, enabled ? 1 : 0); synchronized (this) { mAlwaysFinishActivities = enabled; } } finally { Binder.restoreCallingIdentity(ident); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setAlwaysFinish 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
setAlwaysFinish
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
@Override public void setIsConferenced(String callId, String conferenceCallId, Session.Info sessionInfo) { Log.startSession(sessionInfo, LogUtils.Sessions.CSW_SET_IS_CONFERENCED, mPackageAbbreviation); long token = Binder.clearCallingIdentity(); try { synchronized (mLock) { logIncoming("setIsConferenced %s %s", callId, conferenceCallId); Call childCall = mCallIdMapper.getCall(callId); if (childCall != null) { if (conferenceCallId == null) { Log.d(this, "unsetting parent: %s", conferenceCallId); childCall.setParentAndChildCall(null); } else { Call conferenceCall = mCallIdMapper.getCall(conferenceCallId); childCall.setParentAndChildCall(conferenceCall); } } else { // Log.w(this, "setIsConferenced, unknown call id: %s", args.arg1); } } } catch (Throwable t) { Log.e(ConnectionServiceWrapper.this, t, ""); throw t; } finally { Binder.restoreCallingIdentity(token); Log.endSession(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setIsConferenced File: src/com/android/server/telecom/ConnectionServiceWrapper.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21283
MEDIUM
5.5
android
setIsConferenced
src/com/android/server/telecom/ConnectionServiceWrapper.java
9b41a963f352fdb3da1da8c633d45280badfcb24
0
Analyze the following code function for security vulnerabilities
public boolean prepareDocuments(XWikiRequest request, XWikiContext context, VelocityContext vcontext) throws XWikiException { XWikiDocument doc; context.getWiki().prepareResources(context); DocumentReference reference = getDocumentReference(request, context); if (context.getAction().equals("register")) { setPhonyDocument(reference, context, vcontext); doc = context.getDoc(); } else { try { doc = getDocument(reference, context); } catch (XWikiException e) { doc = context.getDoc(); if (context.getAction().equals("delete")) { if (doc == null) { setPhonyDocument(reference, context, vcontext); doc = context.getDoc(); } if (!checkAccess("admin", doc, context)) { throw e; } } else { throw e; } } } // the user is set after the access is checked. boolean hasAccess = checkAccess(context.getAction(), doc, context); XWikiUser user; if (context.getUserReference() != null) { user = new XWikiUser(context.getUserReference()); } else { user = new XWikiUser(context.getUser()); } // We need to check rights before we look for translations // Otherwise we don't have the user language if (!hasAccess) { Object[] args = { doc.getFullName(), user.getUser() }; setPhonyDocument(reference, context, vcontext); throw new XWikiException(XWikiException.MODULE_XWIKI_ACCESS, XWikiException.ERROR_XWIKI_ACCESS_DENIED, "Access to document {0} has been denied to user {1}", null, args); // User is disabled: the mail address is marked as checked } else if (user.isDisabled(context) && user.isEmailChecked(context)) { String action = context.getAction(); /* * Allow inactive users to see skins, ressources, SSX, JSX and downloads they could have seen as guest. The * rational behind this behaviour is that inactive users should be able to access the same UI that guests * are used to see, including custom icons, panels, and so on... */ if (!((action.equals("skin") && (doc.getSpace().equals("skins") || doc.getSpace().equals("resources"))) || ((action.equals("skin") || action.equals("download") || action.equals("ssx") || action.equals("jsx")) && getRightService().hasAccessLevel("view", XWikiRightService.GUEST_USER_FULLNAME, doc.getPrefixedFullName(), context)) || ((action.equals("view") && doc.getFullName().equals("XWiki.AccountValidation"))))) { Object[] args = { user.getUser() }; setPhonyDocument(reference, context, vcontext); throw new XWikiException(XWikiException.MODULE_XWIKI_USER, XWikiException.ERROR_XWIKI_USER_DISABLED, "User {0} account is disabled", null, args); } // User actually needs to activate his mail address. } else if (user.isDisabled(context) && !user.isEmailChecked(context)) { boolean allow = false; String action = context.getAction(); /* * Allow inactive users to see skins, ressources, SSX, JSX and downloads they could have seen as guest. The * rational behind this behaviour is that inactive users should be able to access the same UI that guests * are used to see, including custom icons, panels, and so on... */ if ((action.equals("skin") && (doc.getSpace().equals("skins") || doc.getSpace().equals("resources"))) || ((action.equals("skin") || action.equals("download") || action.equals("ssx") || action.equals("jsx")) && getRightService().hasAccessLevel("view", XWikiRightService.GUEST_USER_FULLNAME, doc.getPrefixedFullName(), context)) || ((action.equals("view") && doc.getFullName().equals("XWiki.AccountValidation")))) { allow = true; } else { String allowed = getConfiguration().getProperty("xwiki.inactiveuser.allowedpages", ""); if (context.getAction().equals("view") && !allowed.equals("")) { String[] allowedList = StringUtils.split(allowed, " ,"); for (String element : allowedList) { if (element.equals(doc.getFullName())) { allow = true; break; } } } } if (!allow) { Object[] args = { context.getUser() }; setPhonyDocument(reference, context, vcontext); throw new XWikiException(XWikiException.MODULE_XWIKI_USER, XWikiException.ERROR_XWIKI_USER_INACTIVE, "User {0} account is inactive", null, args); } } context.put("doc", doc); context.put("cdoc", doc); vcontext.put("doc", doc.newDocument(context)); vcontext.put("cdoc", vcontext.get("doc")); XWikiDocument tdoc; // If the parameter language exists and is empty, it means we want to force loading the regular document // not a translation. This should be handled later by doing a better separation between locale used in the UI // and for loading the documents. if ("".equals(context.getRequest().getParameter("language"))) { tdoc = doc; } else { tdoc = doc.getTranslatedDocument(context); } try { String rev = (String) context.get("rev"); if (StringUtils.isNotEmpty(rev)) { tdoc = getDocument(tdoc, rev, context); } } catch (Exception ex) { // Invalid version, just use the most recent one } context.put("tdoc", tdoc); vcontext.put("tdoc", tdoc.newDocument(context)); return true; }
Vulnerability Classification: - CWE: CWE-287 - CVE: CVE-2022-36092 - Severity: HIGH - CVSS Score: 7.5 Description: XWIKI-19549: Disallow template override for login, register and skin * Also do not put a document without view rights into the context. Function: prepareDocuments File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java Repository: xwiki/xwiki-platform Fixed Code: public boolean prepareDocuments(XWikiRequest request, XWikiContext context, VelocityContext vcontext) throws XWikiException { XWikiDocument doc; context.getWiki().prepareResources(context); DocumentReference reference = getDocumentReference(request, context); if (context.getAction().equals("register")) { setPhonyDocument(reference, context, vcontext); doc = context.getDoc(); } else { try { doc = getDocument(reference, context); } catch (XWikiException e) { doc = context.getDoc(); if (context.getAction().equals("delete")) { if (doc == null) { setPhonyDocument(reference, context, vcontext); doc = context.getDoc(); } if (!checkAccess("admin", doc, context)) { throw e; } } else { throw e; } } } // the user is set after the access is checked. boolean hasAccess = checkAccess(context.getAction(), doc, context); XWikiUser user; if (context.getUserReference() != null) { user = new XWikiUser(context.getUserReference()); } else { user = new XWikiUser(context.getUser()); } // We need to check rights before we look for translations // Otherwise we don't have the user language if (!hasAccess) { Object[] args = { doc.getFullName(), user.getUser() }; setPhonyDocument(reference, context, vcontext); throw new XWikiException(XWikiException.MODULE_XWIKI_ACCESS, XWikiException.ERROR_XWIKI_ACCESS_DENIED, "Access to document {0} has been denied to user {1}", null, args); // User is disabled: the mail address is marked as checked } else if (user.isDisabled(context) && user.isEmailChecked(context)) { String action = context.getAction(); /* * Allow inactive users to see skins, ressources, SSX, JSX and downloads they could have seen as guest. The * rational behind this behaviour is that inactive users should be able to access the same UI that guests * are used to see, including custom icons, panels, and so on... */ if (!((action.equals("skin") && (doc.getSpace().equals("skins") || doc.getSpace().equals("resources"))) || ((action.equals("skin") || action.equals("download") || action.equals("ssx") || action.equals("jsx")) && getRightService().hasAccessLevel("view", XWikiRightService.GUEST_USER_FULLNAME, doc.getPrefixedFullName(), context)) || ((action.equals("view") && doc.getFullName().equals("XWiki.AccountValidation"))))) { Object[] args = { user.getUser() }; setPhonyDocument(reference, context, vcontext); throw new XWikiException(XWikiException.MODULE_XWIKI_USER, XWikiException.ERROR_XWIKI_USER_DISABLED, "User {0} account is disabled", null, args); } // User actually needs to activate his mail address. } else if (user.isDisabled(context) && !user.isEmailChecked(context)) { boolean allow = false; String action = context.getAction(); /* * Allow inactive users to see skins, ressources, SSX, JSX and downloads they could have seen as guest. The * rational behind this behaviour is that inactive users should be able to access the same UI that guests * are used to see, including custom icons, panels, and so on... */ if ((action.equals("skin") && (doc.getSpace().equals("skins") || doc.getSpace().equals("resources"))) || ((action.equals("skin") || action.equals("download") || action.equals("ssx") || action.equals("jsx")) && getRightService().hasAccessLevel("view", XWikiRightService.GUEST_USER_FULLNAME, doc.getPrefixedFullName(), context)) || ((action.equals("view") && doc.getFullName().equals("XWiki.AccountValidation")))) { allow = true; } else { String allowed = getConfiguration().getProperty("xwiki.inactiveuser.allowedpages", ""); if (context.getAction().equals("view") && !allowed.equals("")) { String[] allowedList = StringUtils.split(allowed, " ,"); for (String element : allowedList) { if (element.equals(doc.getFullName())) { allow = true; break; } } } } if (!allow) { Object[] args = { context.getUser() }; setPhonyDocument(reference, context, vcontext); throw new XWikiException(XWikiException.MODULE_XWIKI_USER, XWikiException.ERROR_XWIKI_USER_INACTIVE, "User {0} account is inactive", null, args); } } if (!"skin".equals(context.getAction()) && !this.getRightService().hasAccessLevel("view", user.getFullName(), doc.getFullName(), context)) { // If for some reason (e.g., login action) the user has rights for the action but no view right on the // document, do not load the document into the context. setPhonyDocument(reference, context, vcontext); doc = context.getDoc(); context.put("tdoc", doc); context.put("cdoc", doc); } else { context.put("doc", doc); context.put("cdoc", doc); vcontext.put("doc", doc.newDocument(context)); vcontext.put("cdoc", vcontext.get("doc")); XWikiDocument tdoc; // If the parameter language exists and is empty, it means we want to force loading the regular document // not a translation. This should be handled later by doing a better separation between locale used in the UI // and for loading the documents. if ("".equals(context.getRequest().getParameter("language"))) { tdoc = doc; } else { tdoc = doc.getTranslatedDocument(context); } try { String rev = (String) context.get("rev"); if (StringUtils.isNotEmpty(rev)) { tdoc = getDocument(tdoc, rev, context); } } catch (Exception ex) { // Invalid version, just use the most recent one } context.put("tdoc", tdoc); vcontext.put("tdoc", tdoc.newDocument(context)); } return true; }
[ "CWE-287" ]
CVE-2022-36092
HIGH
7.5
xwiki/xwiki-platform
prepareDocuments
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
71a6d0bb6f8ab718fcfaae0e9b8c16c2d69cd4bb
1
Analyze the following code function for security vulnerabilities
public boolean clearApplicationUserData(final String packageName, final IPackageDataObserver observer, int userId) throws RemoteException;
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: clearApplicationUserData File: core/java/android/app/IActivityManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
clearApplicationUserData
core/java/android/app/IActivityManager.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
private void assignMinimumTTL(List<? extends DnsAnswer> dnsAnswers, LookupResult.Builder builder) { if (config.hasOverrideTTL()) { builder.cacheTTL(config.getCacheTTLOverrideMillis()); } else { // Deduce minimum TTL on all TXT records. A TTL will always be returned by DNS server. builder.cacheTTL(dnsAnswers.stream() .map(DnsAnswer::dnsTTL) .min(Comparator.comparing(Long::valueOf)).get() * 1000); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: assignMinimumTTL File: graylog2-server/src/main/java/org/graylog2/lookup/adapters/DnsLookupDataAdapter.java Repository: Graylog2/graylog2-server The code follows secure coding practices.
[ "CWE-345" ]
CVE-2023-41045
MEDIUM
5.3
Graylog2/graylog2-server
assignMinimumTTL
graylog2-server/src/main/java/org/graylog2/lookup/adapters/DnsLookupDataAdapter.java
466af814523cffae9fbc7e77bab7472988f03c3e
0
Analyze the following code function for security vulnerabilities
@Override public void endWikiDocumentRevision(String version, FilterEventParameters parameters) throws FilterException { end(parameters); // Reset this.currentVersion = null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: endWikiDocumentRevision File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/filter/output/XWikiDocumentOutputFilterStream.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-459" ]
CVE-2023-36468
HIGH
8.8
xwiki/xwiki-platform
endWikiDocumentRevision
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/filter/output/XWikiDocumentOutputFilterStream.java
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
0
Analyze the following code function for security vulnerabilities
public void stopLockTaskModeOnCurrent() throws RemoteException;
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: stopLockTaskModeOnCurrent File: core/java/android/app/IActivityManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
stopLockTaskModeOnCurrent
core/java/android/app/IActivityManager.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
@Override public void bootAnimationComplete() { final boolean callFinishBooting; synchronized (this) { callFinishBooting = mCallFinishBooting; mBootAnimationComplete = true; } if (callFinishBooting) { Trace.traceBegin(Trace.TRACE_TAG_ACTIVITY_MANAGER, "FinishBooting"); finishBooting(); Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: bootAnimationComplete File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-863" ]
CVE-2018-9492
HIGH
7.2
android
bootAnimationComplete
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
private XWikiContext getXWikiContext() { Provider<XWikiContext> xcontextProvider = Utils.getComponent(XWikiContext.TYPE_PROVIDER); if (xcontextProvider != null) { return xcontextProvider.get(); } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getXWikiContext 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
getXWikiContext
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
<T> boolean isAuditFlavored(Class<T> clazz) { boolean isAuditFlavored = false; try { clazz.getDeclaredField(DEFAULT_JSONB_FIELD_NAME); isAuditFlavored = true; } catch (NoSuchFieldException nse) { if (log.isDebugEnabled()) { log.debug("non audit table, no " + DEFAULT_JSONB_FIELD_NAME + " found in json"); } } return isAuditFlavored; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isAuditFlavored File: domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.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
isAuditFlavored
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
@GetMapping("changeLanguage") public String changeLanguage(String lang, HttpSession session, HttpServletRequest request) { String referer = request.getHeader("referer"); if ("zh".equals(lang)) { session.setAttribute(SessionLocaleResolver.LOCALE_SESSION_ATTRIBUTE_NAME, Locale.SIMPLIFIED_CHINESE); } else if ("en".equals(lang)) { session.setAttribute(SessionLocaleResolver.LOCALE_SESSION_ATTRIBUTE_NAME, Locale.US); } return StringUtils.isEmpty(referer) ? redirect("/") : redirect(referer); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: changeLanguage File: src/main/java/co/yiiu/pybbs/controller/front/IndexController.java Repository: atjiu/pybbs The code follows secure coding practices.
[ "CWE-79" ]
CVE-2022-23391
MEDIUM
4.3
atjiu/pybbs
changeLanguage
src/main/java/co/yiiu/pybbs/controller/front/IndexController.java
7d83b97d19f5fed9f29f72e654ef3c2818021b4d
0
Analyze the following code function for security vulnerabilities
public float getCenterY() { final IAccessibilityServiceConnection connection = AccessibilityInteractionClient.getInstance().getConnection( mService.mConnectionId); if (connection != null) { try { return connection.getMagnificationCenterY(); } catch (RemoteException re) { Log.w(LOG_TAG, "Failed to obtain center Y", re); re.rethrowFromSystemServer(); } } return 0.0f; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCenterY File: core/java/android/accessibilityservice/AccessibilityService.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2016-3923
MEDIUM
4.3
android
getCenterY
core/java/android/accessibilityservice/AccessibilityService.java
5f256310187b4ff2f13a7abb9afed9126facd7bc
0
Analyze the following code function for security vulnerabilities
static native String getConstructorSignature(Constructor<?> c);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getConstructorSignature File: luni/src/main/java/java/io/ObjectStreamClass.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2014-7911
HIGH
7.2
android
getConstructorSignature
luni/src/main/java/java/io/ObjectStreamClass.java
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
0
Analyze the following code function for security vulnerabilities
public @Nullable String getRefCursor() { // Can't check this because the PGRefCursorResultSet // interface doesn't allow throwing a SQLException // // checkClosed(); return refCursorName; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRefCursor File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java Repository: pgjdbc The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-31197
HIGH
8
pgjdbc
getRefCursor
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
739e599d52ad80f8dcd6efedc6157859b1a9d637
0
Analyze the following code function for security vulnerabilities
private SAXEngine getEngine() throws JDOMException { if (engine != null) { return engine; } engine = buildEngine(); return engine; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getEngine File: core/src/java/org/jdom2/input/SAXBuilder.java Repository: hunterhacker/jdom The code follows secure coding practices.
[ "CWE-611" ]
CVE-2021-33813
MEDIUM
5
hunterhacker/jdom
getEngine
core/src/java/org/jdom2/input/SAXBuilder.java
bd3ab78370098491911d7fe9d7a43b97144a234e
0
Analyze the following code function for security vulnerabilities
private void checkColumns(String[] projection) { if (projection != null) { HashSet<String> requestedColumns = new HashSet<String>(Arrays.asList(projection)); HashSet<String> availableColumns = new HashSet<String>(Arrays.asList(HistorySearchManager.COLUMN_ALL)); // Check if all columns which are requested are available if (!availableColumns.containsAll(requestedColumns)) { throw new IllegalArgumentException( "Unknown columns in projection"); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkColumns File: alfresco-mobile-android/src/main/java/org/alfresco/mobile/android/application/providers/search/HistorySearchProvider.java Repository: Alfresco/alfresco-android-app The code follows secure coding practices.
[ "CWE-89" ]
CVE-2019-15566
HIGH
7.5
Alfresco/alfresco-android-app
checkColumns
alfresco-mobile-android/src/main/java/org/alfresco/mobile/android/application/providers/search/HistorySearchProvider.java
32faa4355f82783326d16b0252e81e1231e12c9c
0
Analyze the following code function for security vulnerabilities
private void applyHosts() throws SSLException { debug("JSSEngine: applyHosts()"); // This is most useful for the client end of the connection; this // specifies what to match the server's certificate against. if (hostname != null) { if (SSL.SetURL(ssl_fd, hostname) == SSL.SECFailure) { throw new SSLException("Unable to configure server hostname: " + errorText(PR.GetError())); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: applyHosts File: src/main/java/org/mozilla/jss/ssl/javax/JSSEngineReferenceImpl.java Repository: dogtagpki/jss The code follows secure coding practices.
[ "CWE-401" ]
CVE-2021-4213
HIGH
7.5
dogtagpki/jss
applyHosts
src/main/java/org/mozilla/jss/ssl/javax/JSSEngineReferenceImpl.java
5922560a78d0dee61af8a33cc9cfbf4cfa291448
0
Analyze the following code function for security vulnerabilities
@Override public void detach() { super.detach(); detachDataProviderListener(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: detach File: server/src/main/java/com/vaadin/data/provider/DataCommunicator.java Repository: vaadin/framework The code follows secure coding practices.
[ "CWE-20" ]
CVE-2021-33609
MEDIUM
4
vaadin/framework
detach
server/src/main/java/com/vaadin/data/provider/DataCommunicator.java
9a93593d9f3802d2881fc8ad22dbc210d0d1d295
0
Analyze the following code function for security vulnerabilities
@Override protected boolean isValidFragment(String fragmentName) { if (ChooseLockPatternFragment.class.getName().equals(fragmentName)) return true; return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isValidFragment File: src/com/android/settings/password/ChooseLockPattern.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40117
HIGH
7.8
android
isValidFragment
src/com/android/settings/password/ChooseLockPattern.java
11815817de2f2d70fe842b108356a1bc75d44ffb
0
Analyze the following code function for security vulnerabilities
@Beta @Deprecated public static HashCode hash(File file, HashFunction hashFunction) throws IOException { return asByteSource(file).hash(hashFunction); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hash File: guava/src/com/google/common/io/Files.java Repository: google/guava The code follows secure coding practices.
[ "CWE-732" ]
CVE-2020-8908
LOW
2.1
google/guava
hash
guava/src/com/google/common/io/Files.java
fec0dbc4634006a6162cfd4d0d09c962073ddf40
0
Analyze the following code function for security vulnerabilities
public synchronized void initiateKEX(CryptoWishList cwl, DHGexParameters dhgex) throws IOException { nextKEXcryptoWishList = cwl.clone(); filterHostKeyTypes(nextKEXcryptoWishList); addExtraKexAlgorithms(nextKEXcryptoWishList); nextKEXdhgexParameters = dhgex; if (kxs == null) { kxs = new KexState(); kxs.dhgexParameters = nextKEXdhgexParameters; PacketKexInit kp = new PacketKexInit(nextKEXcryptoWishList); kxs.localKEX = kp; tm.sendKexMessage(kp.getPayload()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: initiateKEX File: src/main/java/com/trilead/ssh2/transport/KexManager.java Repository: connectbot/sshlib The code follows secure coding practices.
[ "CWE-354" ]
CVE-2023-48795
MEDIUM
5.9
connectbot/sshlib
initiateKEX
src/main/java/com/trilead/ssh2/transport/KexManager.java
5c8b534f6e97db7ac0e0e579331213aa25c173ab
0
Analyze the following code function for security vulnerabilities
@Override @CacheEvict(value = {CacheConstant.SYS_USERS_CACHE}, allEntries = true) public Result<?> changePassword(SysUser sysUser) { String salt = oConvertUtils.randomGen(8); sysUser.setSalt(salt); String password = sysUser.getPassword(); String passwordEncode = PasswordUtil.encrypt(sysUser.getUsername(), password, salt); sysUser.setPassword(passwordEncode); this.userMapper.updateById(sysUser); return Result.ok("密码修改成功!"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: changePassword 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
changePassword
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java
51e2227bfe54f5d67b09411ee9a336750164e73d
0
Analyze the following code function for security vulnerabilities
private void doStartDevModeServer(DeploymentConfiguration config) throws ExecutionFailedException { // If port is defined, means that webpack is already running if (port > 0) { if (!checkWebpackConnection()) { throw new IllegalStateException(format( "%s webpack-dev-server port '%d' is defined but it's not working properly", START_FAILURE, port)); } reuseExistingPort(port); return; } port = getRunningDevServerPort(npmFolder); if (port > 0) { if (checkWebpackConnection()) { reuseExistingPort(port); return; } else { getLogger().warn( "webpack-dev-server port '%d' is defined but it's not working properly. Using a new free port...", port); port = 0; } } // here the port == 0 Pair<File, File> webPackFiles = validateFiles(npmFolder); long start = System.nanoTime(); getLogger().info("Starting webpack-dev-server"); watchDog.set(new DevServerWatchDog()); // Look for a free port port = getFreePort(); // save the port immediately before start a webpack server, see #8981 saveRunningDevServerPort(); boolean success = false; try { success = doStartWebpack(config, webPackFiles, start); } finally { if (!success) { removeRunningDevServerPort(); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: doStartDevModeServer File: flow-server/src/main/java/com/vaadin/flow/server/DevModeHandler.java Repository: vaadin/flow The code follows secure coding practices.
[ "CWE-22" ]
CVE-2020-36321
MEDIUM
5
vaadin/flow
doStartDevModeServer
flow-server/src/main/java/com/vaadin/flow/server/DevModeHandler.java
6ae6460ca4f3a9b50bd46fbf49c807fe67718307
0
Analyze the following code function for security vulnerabilities
public static void registerPolling() { registerPollingFallback(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: registerPolling 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
registerPolling
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
public URL getResource(String s) throws MalformedURLException { return getEngineContext().getResource(s); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getResource 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
getResource
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 boolean isAll() { return all; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isAll File: jeecg-boot-base-core/src/main/java/org/jeecg/common/util/security/AbstractQueryBlackListHandler.java Repository: jeecgboot/jeecg-boot The code follows secure coding practices.
[ "CWE-89" ]
CVE-2023-34602
HIGH
7.5
jeecgboot/jeecg-boot
isAll
jeecg-boot-base-core/src/main/java/org/jeecg/common/util/security/AbstractQueryBlackListHandler.java
dd7bf104e7ed59142909567ecd004335c3442ec5
0
Analyze the following code function for security vulnerabilities
public String getCssClass() { return cssClass; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCssClass File: src/main/java/org/olat/core/util/mail/ui/SendDocumentsByEMailController.java Repository: OpenOLAT The code follows secure coding practices.
[ "CWE-22" ]
CVE-2021-41152
MEDIUM
4
OpenOLAT
getCssClass
src/main/java/org/olat/core/util/mail/ui/SendDocumentsByEMailController.java
418bb509ffcb0e25ab4390563c6c47f0458583eb
0
Analyze the following code function for security vulnerabilities
@Override public void sendResponse(TransportResponse response) throws IOException { sendResponse(response, TransportResponseOptions.EMPTY); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sendResponse File: src/main/java/org/elasticsearch/transport/local/LocalTransportChannel.java Repository: elastic/elasticsearch The code follows secure coding practices.
[ "CWE-74" ]
CVE-2015-5377
HIGH
7.5
elastic/elasticsearch
sendResponse
src/main/java/org/elasticsearch/transport/local/LocalTransportChannel.java
bf3052d14c874aead7da8855c5fcadf5428a43f2
0
Analyze the following code function for security vulnerabilities
private void updateActivityTitle() { final String msg; if (mForFingerprint) { msg = getString(R.string.lockpassword_choose_your_pattern_header_for_fingerprint); } else if (mForFace) { msg = getString(R.string.lockpassword_choose_your_pattern_header_for_face); } else if (mIsManagedProfile) { msg = getContext().getSystemService(DevicePolicyManager.class).getResources() .getString(SET_WORK_PROFILE_PATTERN_HEADER, () -> getString( R.string.lockpassword_choose_your_profile_pattern_header)); } else { msg = getString(R.string.lockpassword_choose_your_pattern_header); } getActivity().setTitle(msg); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateActivityTitle File: src/com/android/settings/password/ChooseLockPattern.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40117
HIGH
7.8
android
updateActivityTitle
src/com/android/settings/password/ChooseLockPattern.java
11815817de2f2d70fe842b108356a1bc75d44ffb
0
Analyze the following code function for security vulnerabilities
public ApiClient addDefaultHeader(String key, String value) { defaultHeaderMap.put(key, value); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addDefaultHeader File: samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiClient.java Repository: OpenAPITools/openapi-generator The code follows secure coding practices.
[ "CWE-668" ]
CVE-2021-21430
LOW
2.1
OpenAPITools/openapi-generator
addDefaultHeader
samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
private void unregisterCertificateNotificationReceiver() { if (!mIsCertNotificationReceiverRegistered) return; mContext.unregisterReceiver(mCertNotificationReceiver); mIsCertNotificationReceiverRegistered = false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: unregisterCertificateNotificationReceiver File: service/java/com/android/server/wifi/InsecureEapNetworkHandler.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21242
CRITICAL
9.8
android
unregisterCertificateNotificationReceiver
service/java/com/android/server/wifi/InsecureEapNetworkHandler.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
private void showUserSwitchDialog(int userId, String userName) { // The dialog will show and then initiate the user switch by calling startUserInForeground Dialog d = new UserSwitchingDialog(this, mContext, userId, userName, true /* above system */); d.show(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: showUserSwitchDialog File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2015-3833
MEDIUM
4.3
android
showUserSwitchDialog
services/core/java/com/android/server/am/ActivityManagerService.java
aaa0fee0d7a8da347a0c47cef5249c70efee209e
0
Analyze the following code function for security vulnerabilities
public void sendReply(final ChannelBuffer buf) { sendBuffer(HttpResponseStatus.OK, buf); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sendReply File: src/tsd/HttpQuery.java Repository: OpenTSDB/opentsdb The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-25827
MEDIUM
6.1
OpenTSDB/opentsdb
sendReply
src/tsd/HttpQuery.java
ff02c1e95e60528275f69b31bcbf7b2ac625cea8
0
Analyze the following code function for security vulnerabilities
public void setCurrentInstances(VaadinRequest request, VaadinResponse response) { setCurrent(this); CurrentInstance.set(VaadinRequest.class, request); CurrentInstance.set(VaadinResponse.class, response); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setCurrentInstances File: server/src/main/java/com/vaadin/server/VaadinService.java Repository: vaadin/framework The code follows secure coding practices.
[ "CWE-203" ]
CVE-2021-31403
LOW
1.9
vaadin/framework
setCurrentInstances
server/src/main/java/com/vaadin/server/VaadinService.java
d852126ab6f0c43f937239305bd0e9594834fe34
0
Analyze the following code function for security vulnerabilities
@Override protected void readBody(ObjectInput inputStream, ByteArrayInputStream bin) throws IOException, ClassNotFoundException { int len = inputStream.readInt(); buf = new byte[len]; inputStream.read(buf); this.reading = true; this.bin = new ByteArrayInputStream(buf); this.in = new ObjectInputStream(this.bin); }
Vulnerability Classification: - CWE: CWE-502 - CVE: CVE-2020-36282 - Severity: HIGH - CVSS Score: 7.5 Description: Use trusted packages in StreamMessage StreamMessage now uses the same "white list" mechanism as ObjectMessage to avoid some arbitrary code execution on deserialization. Even though StreamMessage is supposed to handle only primitive types, it is still to possible to send a message that contains an arbitrary serializable instance. The consuming application application may then execute code from this class on deserialization. The fix consists in using the list of trusted packages that can be set at the connection factory level. Fixes #135 Function: readBody File: src/main/java/com/rabbitmq/jms/client/message/RMQStreamMessage.java Repository: rabbitmq/rabbitmq-jms-client Fixed Code: @Override protected void readBody(ObjectInput inputStream, ByteArrayInputStream bin) throws IOException, ClassNotFoundException { int len = inputStream.readInt(); buf = new byte[len]; inputStream.read(buf); this.reading = true; this.bin = new ByteArrayInputStream(buf); this.in = new WhiteListObjectInputStream(this.bin, this.trustedPackages); }
[ "CWE-502" ]
CVE-2020-36282
HIGH
7.5
rabbitmq/rabbitmq-jms-client
readBody
src/main/java/com/rabbitmq/jms/client/message/RMQStreamMessage.java
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
1
Analyze the following code function for security vulnerabilities
@Override public void acquire(int displayId) { synchronized (mGlobalLock) { if (!mSleepTokens.contains(displayId)) { mSleepTokens.append(displayId, mRootWindowContainer.createSleepToken(mTag, displayId)); updateSleepIfNeededLocked(); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: acquire 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
acquire
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
1120bc7e511710b1b774adf29ba47106292365e7
0
Analyze the following code function for security vulnerabilities
@Override public Object forward(String path) { try { HttpServletResponse response = (HttpServletResponse)SaManager.getSaTokenContextOrSecond().getResponse().getSource(); request.getRequestDispatcher(path).forward(request, response); return null; } catch (ServletException | IOException e) { throw new SaTokenException(e).setCode(SaServletErrorCode.CODE_20001); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: forward File: sa-token-starter/sa-token-servlet/src/main/java/cn/dev33/satoken/servlet/model/SaRequestForServlet.java Repository: dromara/Sa-Token The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-44794
CRITICAL
9.8
dromara/Sa-Token
forward
sa-token-starter/sa-token-servlet/src/main/java/cn/dev33/satoken/servlet/model/SaRequestForServlet.java
954efeb73277f924f836da2a25322ea35ee1bfa3
0
Analyze the following code function for security vulnerabilities
private boolean notSupportedOnAutomotive(String method) { if (mIsAutomotive) { Slogf.i(LOG_TAG, "%s is not supported on automotive builds", method); return true; } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: notSupportedOnAutomotive 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
notSupportedOnAutomotive
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
@Override public String getName() { return "localization.wikiready"; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getName File: xwiki-platform-core/xwiki-platform-localization/xwiki-platform-localization-sources/xwiki-platform-localization-source-wiki/src/main/java/org/xwiki/localization/wiki/internal/DocumentTranslationBundleFactory.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-74" ]
CVE-2023-29510
HIGH
8.8
xwiki/xwiki-platform
getName
xwiki-platform-core/xwiki-platform-localization/xwiki-platform-localization-sources/xwiki-platform-localization-source-wiki/src/main/java/org/xwiki/localization/wiki/internal/DocumentTranslationBundleFactory.java
d06ff8a58480abc7f63eb1d4b8b366024d990643
0
Analyze the following code function for security vulnerabilities
@Override public long getLastNetworkLogRetrievalTime() { final CallerIdentity caller = getCallerIdentity(); Preconditions.checkCallAuthorization(isDefaultDeviceOwner(caller) || (isProfileOwner(caller) && isManagedProfile(caller.getUserId())) || canManageUsers(caller)); final int affectedUserId = getNetworkLoggingAffectedUser(); return affectedUserId >= 0 ? getUserData(affectedUserId).mLastNetworkLogsRetrievalTime : -1; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLastNetworkLogRetrievalTime 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
getLastNetworkLogRetrievalTime
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
protected Socket createSocket(String connectionName) throws IOException { // SocketFactory takes precedence if specified if (socketFactory != null) { return socketFactory.createSocket(); } else { if (ssl) { return sslContextFactory.create(connectionName).getSocketFactory().createSocket(); } else { return SocketFactory.getDefault().createSocket(); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createSocket File: src/main/java/com/rabbitmq/client/impl/SocketFrameHandlerFactory.java Repository: rabbitmq/rabbitmq-java-client The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-46120
HIGH
7.5
rabbitmq/rabbitmq-java-client
createSocket
src/main/java/com/rabbitmq/client/impl/SocketFrameHandlerFactory.java
714aae602dcae6cb4b53cadf009323ebac313cc8
0
Analyze the following code function for security vulnerabilities
@Override public int getMoveStatus(int moveId) { mContext.enforceCallingOrSelfPermission( android.Manifest.permission.MOUNT_UNMOUNT_FILESYSTEMS, null); return mMoveCallbacks.mLastStatus.get(moveId); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getMoveStatus File: services/core/java/com/android/server/pm/PackageManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-119" ]
CVE-2016-2497
HIGH
7.5
android
getMoveStatus
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
private void setDoNotAskCredentialsOnBoot() { synchronized (getLockObject()) { DevicePolicyData policyData = getUserData(UserHandle.USER_SYSTEM); if (!policyData.mDoNotAskCredentialsOnBoot) { policyData.mDoNotAskCredentialsOnBoot = true; saveSettingsLocked(UserHandle.USER_SYSTEM); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setDoNotAskCredentialsOnBoot 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
setDoNotAskCredentialsOnBoot
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
@CalledByNative public void openNewTab(String url, String extraHeaders, byte[] postData, int disposition) { }
Vulnerability Classification: - CWE: CWE-20 - CVE: CVE-2014-3159 - Severity: MEDIUM - CVSS Score: 6.4 Description: Use LoadURLWithParams in ChromeWebContentsDelegateAndroid Build a LoadURLParams object from the OpenURLParams and properly set all parameters on that object when calling into NavigationController. This makes sure we set the correct state for the load. BUG=352083 Review URL: https://codereview.chromium.org/267253007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273865 0039d316-1c4b-4281-b951-d872f2087c98 Function: openNewTab File: components/web_contents_delegate_android/android/java/src/org/chromium/components/web_contents_delegate_android/WebContentsDelegateAndroid.java Repository: chromium Fixed Code: @CalledByNative public void openNewTab(String url, String extraHeaders, byte[] postData, int disposition, boolean isRendererInitiated) { }
[ "CWE-20" ]
CVE-2014-3159
MEDIUM
6.4
chromium
openNewTab
components/web_contents_delegate_android/android/java/src/org/chromium/components/web_contents_delegate_android/WebContentsDelegateAndroid.java
98a50b76141f0b14f292f49ce376e6554142d5e2
1
Analyze the following code function for security vulnerabilities
public boolean onBackPressed() { if (mStatusBarKeyguardViewManager.onBackPressed()) { return true; } if (mNotificationPanel.isQsExpanded()) { if (mNotificationPanel.isQsDetailShowing()) { mNotificationPanel.closeQsDetail(); } else { mNotificationPanel.animateCloseQs(); } return true; } if (mState != StatusBarState.KEYGUARD && mState != StatusBarState.SHADE_LOCKED) { animateCollapsePanels(); return true; } if (mKeyguardUserSwitcher.hideIfNotSimple(true)) { return true; } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onBackPressed 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
onBackPressed
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
@ApiOperation(value = "add Node Operation") @RequestMapping(value = "/addNode", method = RequestMethod.POST) public String addNode(@RequestParam(value = "userId", required = true) String userId, @RequestParam(value = "solutionId", required = false) String solutionId, @RequestParam(value = "version", required = false) String version, @RequestParam(value = "cid", required = false) String cid, @RequestBody @Valid Nodes node) { String results = ""; logger.debug(EELFLoggerDelegator.debugLogger, " addNode() : Begin"); try { boolean validNode = validateNode(node); if (validNode) { if ((solutionId != null && version != null) || (null != cid)) { results = solutionService.addNode(userId, solutionId, version, cid, node); } else { results = "{\"error\": \"Either Cid or SolutionId and Version need to Pass\"}"; } } else { results = "{\"error\": \"JSON schema not valid, Please check the input JSON\"}"; } } catch (Exception e) { logger.error(EELFLoggerDelegator.errorLogger, "Exception in addNode() ", e); } logger.debug(EELFLoggerDelegator.debugLogger, " addNode() : End"); return results; }
Vulnerability Classification: - CWE: CWE-79 - CVE: CVE-2018-25097 - Severity: MEDIUM - CVSS Score: 4.0 Description: Senitization for CSS Vulnerability Issue-Id : ACUMOS-1650 Description : Senitization for CSS Vulnerability - Design Studio Change-Id: If8fd4b9b06f884219d93881f7922421870de8e3d Signed-off-by: Ramanaiah Pirla <RP00490596@techmahindra.com> Function: addNode File: ds-compositionengine/src/main/java/org/acumos/designstudio/ce/controller/SolutionController.java Repository: acumos/design-studio Fixed Code: @ApiOperation(value = "add Node Operation") @RequestMapping(value = "/addNode", method = RequestMethod.POST) public String addNode(@RequestParam(value = "userId", required = true) String userId, @RequestParam(value = "solutionId", required = false) String solutionId, @RequestParam(value = "version", required = false) String version, @RequestParam(value = "cid", required = false) String cid, @RequestBody @Valid Nodes node) { String results = ""; logger.debug(EELFLoggerDelegator.debugLogger, " addNode() : Begin"); try { boolean validNode = validateNode(node); if (validNode) { if ((solutionId != null && version != null) || (null != cid)) { results = solutionService.addNode(userId, SanitizeUtils.sanitize(solutionId), version, cid, node); } else { results = "{\"error\": \"Either Cid or SolutionId and Version need to Pass\"}"; } } else { results = "{\"error\": \"JSON schema not valid, Please check the input JSON\"}"; } } catch (Exception e) { logger.error(EELFLoggerDelegator.errorLogger, "Exception in addNode() ", e); } logger.debug(EELFLoggerDelegator.debugLogger, " addNode() : End"); return results; }
[ "CWE-79" ]
CVE-2018-25097
MEDIUM
4
acumos/design-studio
addNode
ds-compositionengine/src/main/java/org/acumos/designstudio/ce/controller/SolutionController.java
0df8a5e8722188744973168648e4c74c69ce67fd
1
Analyze the following code function for security vulnerabilities
public void removeContainerStructures(String containerIdentifier, String containerInode) { cache.remove(containerStructureGroup + containerIdentifier + containerInode, containerStructureGroup); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeContainerStructures File: src/com/dotmarketing/cache/ContentTypeCacheImpl.java Repository: dotCMS/core The code follows secure coding practices.
[ "CWE-89" ]
CVE-2016-2355
HIGH
7.5
dotCMS/core
removeContainerStructures
src/com/dotmarketing/cache/ContentTypeCacheImpl.java
897f3632d7e471b7a73aabed5b19f6f53d4e5562
0
Analyze the following code function for security vulnerabilities
final ProcessRecord newProcessRecordLocked(ApplicationInfo info, String customProcess, boolean isolated, int isolatedUid) { String proc = customProcess != null ? customProcess : info.processName; BatteryStatsImpl stats = mBatteryStatsService.getActiveStatistics(); final int userId = UserHandle.getUserId(info.uid); int uid = info.uid; if (isolated) { if (isolatedUid == 0) { int stepsLeft = Process.LAST_ISOLATED_UID - Process.FIRST_ISOLATED_UID + 1; while (true) { if (mNextIsolatedProcessUid < Process.FIRST_ISOLATED_UID || mNextIsolatedProcessUid > Process.LAST_ISOLATED_UID) { mNextIsolatedProcessUid = Process.FIRST_ISOLATED_UID; } uid = UserHandle.getUid(userId, mNextIsolatedProcessUid); mNextIsolatedProcessUid++; if (mIsolatedProcesses.indexOfKey(uid) < 0) { // No process for this uid, use it. break; } stepsLeft--; if (stepsLeft <= 0) { return null; } } } else { // Special case for startIsolatedProcess (internal only), where // the uid of the isolated process is specified by the caller. uid = isolatedUid; } } final ProcessRecord r = new ProcessRecord(stats, info, proc, uid); if (!mBooted && !mBooting && userId == UserHandle.USER_SYSTEM && (info.flags & PERSISTENT_MASK) == PERSISTENT_MASK) { r.persistent = true; } addProcessNameLocked(r); return r; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: newProcessRecordLocked File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3912
HIGH
9.3
android
newProcessRecordLocked
services/core/java/com/android/server/am/ActivityManagerService.java
6c049120c2d749f0c0289d822ec7d0aa692f55c5
0
Analyze the following code function for security vulnerabilities
public static List<javax.persistence.criteria.Order> toOrders(Sort sort, Root<?> root, CriteriaBuilder cb) { List<javax.persistence.criteria.Order> orders = new ArrayList<javax.persistence.criteria.Order>(); if (sort == null) { return orders; } Assert.notNull(root); Assert.notNull(cb); for (org.springframework.data.domain.Sort.Order order : sort) { orders.add(toJpaOrder(order, root, cb)); } return orders; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toOrders 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
toOrders
src/main/java/org/springframework/data/jpa/repository/query/QueryUtils.java
b8e7fe
0
Analyze the following code function for security vulnerabilities
public void onSystemKeyPressed(int keycode) { // do nothing }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onSystemKeyPressed File: packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21267
MEDIUM
5.5
android
onSystemKeyPressed
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
d18d8b350756b0e89e051736c1f28744ed31e93a
0
Analyze the following code function for security vulnerabilities
private static Path buildPath(final Path root, final Path child) { if (root == null) { return child; } else { return Paths.get(root.toString(), child.toString()); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: buildPath File: modules/common/app/utils/common/ZipUtil.java Repository: JATOS The code follows secure coding practices.
[ "CWE-22" ]
CVE-2022-4878
MEDIUM
5.2
JATOS
buildPath
modules/common/app/utils/common/ZipUtil.java
2b42519f309d8164e8811392770ce604cdabb5da
0
Analyze the following code function for security vulnerabilities
public Object clone() { throw new RuntimeException( "Do we ever clone this?" ); /* Shell shell = new Shell(); shell.setExecutable( getExecutable() ); shell.setWorkingDirectory( getWorkingDirectory() ); shell.setShellArgs( getShellArgs() ); return shell;*/ }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: clone File: src/main/java/org/apache/maven/shared/utils/cli/shell/Shell.java Repository: apache/maven-shared-utils The code follows secure coding practices.
[ "CWE-116" ]
CVE-2022-29599
HIGH
7.5
apache/maven-shared-utils
clone
src/main/java/org/apache/maven/shared/utils/cli/shell/Shell.java
2735facbbbc2e13546328cb02dbb401b3776eea3
0
Analyze the following code function for security vulnerabilities
public EnvPredicate on(final String env, final Runnable callback) { requireNonNull(env, "Env is required."); return on(envpredicate(env), callback); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: on File: jooby/src/main/java/org/jooby/Jooby.java Repository: jooby-project/jooby The code follows secure coding practices.
[ "CWE-22" ]
CVE-2020-7647
MEDIUM
5
jooby-project/jooby
on
jooby/src/main/java/org/jooby/Jooby.java
34f526028e6cd0652125baa33936ffb6a8a4a009
0
Analyze the following code function for security vulnerabilities
private void error(Output output, @Nullable String refName, List<String> messages) { output.markError(); output.writeLine(); output.writeLine("*******************************************************"); output.writeLine("*"); if (refName != null) output.writeLine("* ERROR PUSHING REF: " + refName); else output.writeLine("* ERROR PUSHING"); output.writeLine("-------------------------------------------------------"); for (String message: messages) output.writeLine("* " + message); output.writeLine("*"); output.writeLine("*******************************************************"); output.writeLine(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: error File: server-core/src/main/java/io/onedev/server/git/hookcallback/GitPreReceiveCallback.java Repository: theonedev/onedev The code follows secure coding practices.
[ "CWE-287" ]
CVE-2022-39205
CRITICAL
9.8
theonedev/onedev
error
server-core/src/main/java/io/onedev/server/git/hookcallback/GitPreReceiveCallback.java
f1e97688e4e19d6de1dfa1d00e04655209d39f8e
0
Analyze the following code function for security vulnerabilities
synchronized void saveProperties(Properties prop) { try { if (prop == null) { Properties old = loadProperties(); prop = new SortedProperties(); prop.setProperty("webPort", Integer.toString(SortedProperties.getIntProperty(old, "webPort", port))); prop.setProperty("webAllowOthers", Boolean.toString(SortedProperties.getBooleanProperty(old, "webAllowOthers", allowOthers))); if (externalNames != null) { prop.setProperty("webExternalNames", externalNames); } prop.setProperty("webSSL", Boolean.toString(SortedProperties.getBooleanProperty(old, "webSSL", ssl))); if (adminPassword != null) { prop.setProperty("webAdminPassword", StringUtils.convertBytesToHex(adminPassword)); } if (commandHistoryString != null) { prop.setProperty(COMMAND_HISTORY, commandHistoryString); } } ArrayList<ConnectionInfo> settings = getSettings(); int len = settings.size(); for (int i = 0; i < len; i++) { ConnectionInfo info = settings.get(i); if (info != null) { prop.setProperty(Integer.toString(len - i - 1), info.getString()); } } if (!"null".equals(serverPropertiesDir)) { OutputStream out = FileUtils.newOutputStream( serverPropertiesDir + "/" + Constants.SERVER_PROPERTIES_NAME, false); prop.store(out, "H2 Server Properties"); out.close(); } } catch (Exception e) { DbException.traceThrowable(e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: saveProperties File: h2/src/main/org/h2/server/web/WebServer.java Repository: h2database The code follows secure coding practices.
[ "CWE-312" ]
CVE-2022-45868
HIGH
7.8
h2database
saveProperties
h2/src/main/org/h2/server/web/WebServer.java
23ee3d0b973923c135fa01356c8eaed40b895393
0
Analyze the following code function for security vulnerabilities
public boolean startSubscriptionProvisioning(int callingUid, OsuProvider provider, IProvisioningCallback callback) { return mPasspointProvisioner.startSubscriptionProvisioning(callingUid, provider, callback); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: startSubscriptionProvisioning File: service/java/com/android/server/wifi/hotspot2/PasspointManager.java Repository: android The code follows secure coding practices.
[ "CWE-120" ]
CVE-2023-21243
MEDIUM
5.5
android
startSubscriptionProvisioning
service/java/com/android/server/wifi/hotspot2/PasspointManager.java
5b49b8711efaadadf5052ba85288860c2d7ca7a6
0
Analyze the following code function for security vulnerabilities
private ReplyFromAccount getReplyFromAccountForReply(Account account, Message refMessage) { if (refMessage.accountUri != null) { // This must be from combined inbox. List<ReplyFromAccount> replyFromAccounts = mFromSpinner.getReplyFromAccounts(); for (ReplyFromAccount from : replyFromAccounts) { if (from.account.uri.equals(refMessage.accountUri)) { return from; } } return null; } else { return getReplyFromAccount(account, refMessage); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getReplyFromAccountForReply 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
getReplyFromAccountForReply
src/com/android/mail/compose/ComposeActivity.java
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
0
Analyze the following code function for security vulnerabilities
final void compareWith(MethodHandle right, Comparator c) { if (right instanceof InterfaceHandle) { ((InterfaceHandle)right).compareWithInterface(this, c); } else { c.fail(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: compareWith File: jcl/src/java.base/share/classes/java/lang/invoke/InterfaceHandle.java Repository: eclipse-openj9/openj9 The code follows secure coding practices.
[ "CWE-440", "CWE-250" ]
CVE-2021-41035
HIGH
7.5
eclipse-openj9/openj9
compareWith
jcl/src/java.base/share/classes/java/lang/invoke/InterfaceHandle.java
c6e0d9296ff9a3084965d83e207403de373c0bad
0
Analyze the following code function for security vulnerabilities
public void setProjectionMap(Map<String, String> columnMap) { mProjectionMap = columnMap; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setProjectionMap File: core/java/android/database/sqlite/SQLiteQueryBuilder.java Repository: android The code follows secure coding practices.
[ "CWE-89" ]
CVE-2018-9493
LOW
2.1
android
setProjectionMap
core/java/android/database/sqlite/SQLiteQueryBuilder.java
ebc250d16c747f4161167b5ff58b3aea88b37acf
0
Analyze the following code function for security vulnerabilities
public boolean hasRecycleBin(XWikiContext context) { return getStoreConfiguration().isRecycleBinEnabled(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hasRecycleBin 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
hasRecycleBin
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 static void startServiceIfRequired(Class service, Context ctx) { if(!AndroidImplementation.hasAndroidMarket(ctx)) { SharedPreferences sh = ctx.getSharedPreferences("C2DMNeeded", Context.MODE_PRIVATE); if(sh.getBoolean("C2DMNeeded", false)) { Intent i = new Intent(); i.setAction(service.getClass().getName()); ctx.startService(i); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: startServiceIfRequired File: Ports/Android/src/com/codename1/impl/android/PushNotificationService.java Repository: codenameone/CodenameOne The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-4903
MEDIUM
5.1
codenameone/CodenameOne
startServiceIfRequired
Ports/Android/src/com/codename1/impl/android/PushNotificationService.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
void handlePeekToExpandTransistion() { try { // consider the transition from peek to expanded to be a panel open, // but not one that clears notification effects. int notificationLoad = mNotificationData.getActiveNotifications().size(); mBarService.onPanelRevealed(false, notificationLoad); } catch (RemoteException ex) { // Won't fail unless the world has ended. } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handlePeekToExpandTransistion 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
handlePeekToExpandTransistion
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
protected final ProxyGrantingTicketStorage getProxyGrantingTicketStorage() { return this.proxyGrantingTicketStorage; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getProxyGrantingTicketStorage File: cas-client-core/src/main/java/org/jasig/cas/client/validation/Cas20ServiceTicketValidator.java Repository: apereo/java-cas-client The code follows secure coding practices.
[ "CWE-74" ]
CVE-2014-4172
HIGH
7.5
apereo/java-cas-client
getProxyGrantingTicketStorage
cas-client-core/src/main/java/org/jasig/cas/client/validation/Cas20ServiceTicketValidator.java
ae37092100c8eaec610dab6d83e5e05a8ee58814
0
Analyze the following code function for security vulnerabilities
public void failStage(Stage stage) { failStage(stage, new Date()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: failStage 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
failStage
server/src/test-shared/java/com/thoughtworks/go/server/dao/DatabaseAccessHelper.java
236d4baf92e6607f2841c151c855adcc477238b8
0
Analyze the following code function for security vulnerabilities
@Override public PasspointConfiguration createFromParcel(Parcel in) { PasspointConfiguration config = new PasspointConfiguration(); config.setHomeSp(in.readParcelable(null)); config.setCredential(in.readParcelable(null)); config.setPolicy(in.readParcelable(null)); config.setSubscriptionUpdate(in.readParcelable(null)); config.setTrustRootCertList(readTrustRootCerts(in)); config.setUpdateIdentifier(in.readInt()); config.setCredentialPriority(in.readInt()); config.setSubscriptionCreationTimeInMillis(in.readLong()); config.setSubscriptionExpirationTimeInMillis(in.readLong()); config.setSubscriptionType(in.readString()); config.setUsageLimitUsageTimePeriodInMinutes(in.readLong()); config.setUsageLimitStartTimeInMillis(in.readLong()); config.setUsageLimitDataLimit(in.readLong()); config.setUsageLimitTimeLimitInMinutes(in.readLong()); config.setAaaServerTrustedNames(in.createStringArray()); Bundle bundle = in.readBundle(); Map<String, String> friendlyNamesMap = (HashMap) bundle.getSerializable( "serviceFriendlyNames"); config.setServiceFriendlyNames(friendlyNamesMap); config.mCarrierId = in.readInt(); config.mIsAutojoinEnabled = in.readBoolean(); config.mIsMacRandomizationEnabled = in.readBoolean(); config.mIsNonPersistentMacRandomizationEnabled = in.readBoolean(); config.mMeteredOverride = in.readInt(); config.mSubscriptionId = in.readInt(); config.mIsCarrierMerged = in.readBoolean(); config.mIsOemPaid = in.readBoolean(); config.mIsOemPrivate = in.readBoolean(); config.mDecoratedIdentityPrefix = in.readString(); config.mSubscriptionGroup = in.readParcelable(null); return config; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createFromParcel File: framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java Repository: android The code follows secure coding practices.
[ "CWE-120" ]
CVE-2023-21243
MEDIUM
5.5
android
createFromParcel
framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java
5b49b8711efaadadf5052ba85288860c2d7ca7a6
0
Analyze the following code function for security vulnerabilities
void setCertificateValidation(long sslNativePointer) throws IOException { // setup peer certificate verification if (!client_mode) { // needing client auth takes priority... boolean certRequested; if (getNeedClientAuth()) { NativeCrypto.SSL_set_verify(sslNativePointer, NativeCrypto.SSL_VERIFY_PEER | NativeCrypto.SSL_VERIFY_FAIL_IF_NO_PEER_CERT); certRequested = true; // ... over just wanting it... } else if (getWantClientAuth()) { NativeCrypto.SSL_set_verify(sslNativePointer, NativeCrypto.SSL_VERIFY_PEER); certRequested = true; // ... and we must disable verification if we don't want client auth. } else { NativeCrypto.SSL_set_verify(sslNativePointer, NativeCrypto.SSL_VERIFY_NONE); certRequested = false; } if (certRequested) { X509TrustManager trustManager = getX509TrustManager(); X509Certificate[] issuers = trustManager.getAcceptedIssuers(); if (issuers != null && issuers.length != 0) { byte[][] issuersBytes; try { issuersBytes = encodeIssuerX509Principals(issuers); } catch (CertificateEncodingException e) { throw new IOException("Problem encoding principals", e); } NativeCrypto.SSL_set_client_CA_list(sslNativePointer, issuersBytes); } } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setCertificateValidation File: src/main/java/org/conscrypt/SSLParametersImpl.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3840
HIGH
10
android
setCertificateValidation
src/main/java/org/conscrypt/SSLParametersImpl.java
5af5e93463f4333187e7e35f3bd2b846654aa214
0
Analyze the following code function for security vulnerabilities
public Collection<XarEntry> getPackageFiles() { return this.packageFiles.values(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPackageFiles File: xwiki-platform-core/xwiki-platform-xar/xwiki-platform-xar-model/src/main/java/org/xwiki/xar/XarPackage.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-611" ]
CVE-2023-27480
HIGH
7.7
xwiki/xwiki-platform
getPackageFiles
xwiki-platform-core/xwiki-platform-xar/xwiki-platform-xar-model/src/main/java/org/xwiki/xar/XarPackage.java
e3527b98fdd8dc8179c24dc55e662b2c55199434
0
Analyze the following code function for security vulnerabilities
public String getXWikiPreference(String prefname, String defaultValue, XWikiContext context) { return getXWikiPreference(prefname, "", defaultValue, context); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getXWikiPreference 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
getXWikiPreference
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
f9a677408ffb06f309be46ef9d8df1915d9099a4
0