instruction
string | input
string | output
string | cwe_ids
list | cve_id
string | severity
string | cvss_score
float64 | repo_name
string | func_name
string | file_path
string | commit_hash
string | is_vulnerable
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Analyze the following code function for security vulnerabilities
|
public void hidePermanentlyLw() {
if (!mPermanentlyHidden) {
mPermanentlyHidden = true;
hide(true /* doAnimation */, true /* requestAnim */);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hidePermanentlyLw
File: services/core/java/com/android/server/wm/WindowState.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35674
|
HIGH
| 7.8
|
android
|
hidePermanentlyLw
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
int getAppCompatState() {
return getAppCompatState(/* ignoreVisibility= */ false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAppCompatState
File: services/core/java/com/android/server/wm/ActivityRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21145
|
HIGH
| 7.8
|
android
|
getAppCompatState
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
private IdProviders getSortedIdProviders()
{
IdProviders idProviders = securityService.get().getIdProviders();
return IdProviders.from( idProviders.stream().
sorted( Comparator.comparing( u -> u.getKey().toString() ) ).
collect( Collectors.toList() ) );
}
|
Vulnerability Classification:
- CWE: CWE-384
- CVE: CVE-2024-23679
- Severity: CRITICAL
- CVSS Score: 9.8
Description: Invalidate old session after login #9253
(cherry picked from commit 0189975691e9e6407a9fee87006f730e84f734ff)
Function: getSortedIdProviders
File: modules/lib/lib-auth/src/main/java/com/enonic/xp/lib/auth/LoginHandler.java
Repository: enonic/xp
Fixed Code:
private IdProviders getSortedIdProviders()
{
IdProviders idProviders = securityService.get().getIdProviders();
return IdProviders.from(
idProviders.stream().sorted( Comparator.comparing( u -> u.getKey().toString() ) ).collect( Collectors.toList() ) );
}
|
[
"CWE-384"
] |
CVE-2024-23679
|
CRITICAL
| 9.8
|
enonic/xp
|
getSortedIdProviders
|
modules/lib/lib-auth/src/main/java/com/enonic/xp/lib/auth/LoginHandler.java
|
1f44674eb9ab3fbab7103e8d08067846e88bace4
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
@Deprecated(since = "4.3M1")
public String getRealLanguage()
{
String lang = getLanguage();
if (lang.equals("")) {
return getDefaultLanguage();
} else {
return lang;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRealLanguage
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2023-29523
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
getRealLanguage
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
0d547181389f7941e53291af940966413823f61c
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setDefaultAttachmentArchiveStore(AttachmentVersioningStore attachmentArchiveStore)
{
this.defaultAttachmentArchiveStore = attachmentArchiveStore;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDefaultAttachmentArchiveStore
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
|
setDefaultAttachmentArchiveStore
|
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 <T> T post(Env env, String path, Object request, Class<T> responseType, Object... uriVariables)
throws RestClientException {
return execute(HttpMethod.POST, env, path, request, responseType, uriVariables);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: post
File: apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/component/RetryableRestTemplate.java
Repository: apolloconfig/apollo
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2020-15170
|
MEDIUM
| 6.8
|
apolloconfig/apollo
|
post
|
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/component/RetryableRestTemplate.java
|
ae9ba6cfd32ed80469f162e5e3583e2477862ddf
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String getContentAsText(XWikiAttachment attachment)
{
try {
Metadata metadata = new Metadata();
metadata.set(TikaCoreProperties.RESOURCE_NAME_KEY, attachment.getFilename());
InputStream in = attachment.getContentInputStream(this.xcontextProvider.get());
try {
return TikaUtils.parseToString(in, metadata);
} finally {
in.close();
}
} catch (Exception e) {
this.logger.error("Failed to retrieve the content of attachment [{}]", attachment.getReference(), e);
return null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getContentAsText
File: xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/internal/metadata/AbstractSolrMetadataExtractor.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-312",
"CWE-200"
] |
CVE-2023-50719
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
getContentAsText
|
xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/internal/metadata/AbstractSolrMetadataExtractor.java
|
3e5272f2ef0dff06a8f4db10afd1949b2f9e6eea
| 0
|
Analyze the following code function for security vulnerabilities
|
private SSLEngineResult.HandshakeStatus mayFinishHandshake(SSLEngineResult.HandshakeStatus status)
throws SSLException {
if (status == NOT_HANDSHAKING && handshakeState != HandshakeState.FINISHED) {
// If the status was NOT_HANDSHAKING and we not finished the handshake we need to call
// SSL_do_handshake() again
return handshake();
}
return status;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: mayFinishHandshake
File: handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-835"
] |
CVE-2016-4970
|
HIGH
| 7.8
|
netty
|
mayFinishHandshake
|
handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java
|
bc8291c80912a39fbd2303e18476d15751af0bf1
| 0
|
Analyze the following code function for security vulnerabilities
|
public String method() {
return method;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: method
File: src/main/java/jodd/http/HttpRequest.java
Repository: oblac/jodd-http
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2022-29631
|
MEDIUM
| 5
|
oblac/jodd-http
|
method
|
src/main/java/jodd/http/HttpRequest.java
|
e50f573c8f6a39212ade68c6eb1256b2889fa8a6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void removeFolderReferences(Folder folder) throws DotDataException, DotStateException, ElasticsearchException, DotSecurityException {
//Folder parentFolder = null;
Identifier folderId = null;
try{
//parentFolder = APILocator.getFolderAPI().findParentFolder(folder, APILocator.getUserAPI().getSystemUser(), false);
folderId = APILocator.getIdentifierAPI().find(folder.getIdentifier());
}catch(Exception e){
Logger.debug(this, "Unable to get parent folder for folder = " + folder.getInode(), e);
}
//String parentFolderId = parentFolder!=null?parentFolder.getInode():FolderAPI.SYSTEM_FOLDER;
DotConnect dc = new DotConnect();
dc.setSQL("select identifier,inode from identifier,contentlet where identifier.id = contentlet.identifier and parent_path = ? and host_inode=?");
dc.addParam(folderId.getPath());
dc.addParam(folder.getHostId());
List<HashMap<String, String>> contentInodes = dc.loadResults();
dc.setSQL("update identifier set parent_path = ? where asset_type='contentlet' and parent_path = ? and host_inode=?");
dc.addParam("/");
dc.addParam(folderId.getPath());
dc.addParam(folder.getHostId());
dc.loadResult();
for(HashMap<String, String> ident:contentInodes){
String inode = ident.get("inode");
cc.remove(inode);
Contentlet content = find(inode);
new ESContentletIndexAPI().addContentToIndex(content);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeFolderReferences
File: src/com/dotcms/content/elasticsearch/business/ESContentFactoryImpl.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-2355
|
HIGH
| 7.5
|
dotCMS/core
|
removeFolderReferences
|
src/com/dotcms/content/elasticsearch/business/ESContentFactoryImpl.java
|
897f3632d7e471b7a73aabed5b19f6f53d4e5562
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getFieldSize()
{
return (key.getParameters().getP().bitLength() + 7) / 8;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFieldSize
File: core/src/main/java/org/bouncycastle/crypto/agreement/DHBasicAgreement.java
Repository: bcgit/bc-java
The code follows secure coding practices.
|
[
"CWE-320"
] |
CVE-2016-1000346
|
MEDIUM
| 4.3
|
bcgit/bc-java
|
getFieldSize
|
core/src/main/java/org/bouncycastle/crypto/agreement/DHBasicAgreement.java
|
1127131c89021612c6eefa26dbe5714c194e7495
| 0
|
Analyze the following code function for security vulnerabilities
|
public float getLineMax(int line) {
float margin = getParagraphLeadingMargin(line);
float signedExtent = getLineExtent(line, false);
return margin + (signedExtent >= 0 ? signedExtent : -signedExtent);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLineMax
File: core/java/android/text/Layout.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-9452
|
MEDIUM
| 4.3
|
android
|
getLineMax
|
core/java/android/text/Layout.java
|
3b6f84b77c30ec0bab5147b0cffc192c86ba2634
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getClassName() {
return hostObjectName;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getClassName
File: components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
Repository: wso2/carbon-apimgt
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2018-20736
|
LOW
| 3.5
|
wso2/carbon-apimgt
|
getClassName
|
components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
|
490f2860822f89d745b7c04fa9570bd86bef4236
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<DeletedDocument> getDeletedDocuments(String batchId) throws XWikiException
{
XWikiDeletedDocument[] deletedDocuments = this.xwiki.getDeletedDocuments(batchId, this.context);
List<DeletedDocument> result = wrapDeletedDocuments(deletedDocuments);
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDeletedDocuments
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2023-37911
|
MEDIUM
| 6.5
|
xwiki/xwiki-platform
|
getDeletedDocuments
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
|
f471f2a392aeeb9e51d59fdfe1d76fccf532523f
| 0
|
Analyze the following code function for security vulnerabilities
|
private final int jjStartNfa_1(int pos, long active0)
{
return jjMoveNfa_1(jjStopStringLiteralDfa_1(pos, active0), pos + 1);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: jjStartNfa_1
File: impl/src/main/java/com/sun/el/parser/ELParserTokenManager.java
Repository: jakartaee/expression-language
The code follows secure coding practices.
|
[
"CWE-917"
] |
CVE-2021-28170
|
MEDIUM
| 5
|
jakartaee/expression-language
|
jjStartNfa_1
|
impl/src/main/java/com/sun/el/parser/ELParserTokenManager.java
|
b6a3943ac5fba71cbc6719f092e319caa747855b
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean handleAppCrashLocked(ProcessRecord app, String shortMsg, String longMsg,
String stackTrace) {
long now = SystemClock.uptimeMillis();
Long crashTime;
if (!app.isolated) {
crashTime = mProcessCrashTimes.get(app.info.processName, app.uid);
} else {
crashTime = null;
}
if (crashTime != null && now < crashTime+ProcessList.MIN_CRASH_INTERVAL) {
// This process loses!
Slog.w(TAG, "Process " + app.info.processName
+ " has crashed too many times: killing!");
EventLog.writeEvent(EventLogTags.AM_PROCESS_CRASHED_TOO_MUCH,
app.userId, app.info.processName, app.uid);
mStackSupervisor.handleAppCrashLocked(app);
if (!app.persistent) {
// We don't want to start this process again until the user
// explicitly does so... but for persistent process, we really
// need to keep it running. If a persistent process is actually
// repeatedly crashing, then badness for everyone.
EventLog.writeEvent(EventLogTags.AM_PROC_BAD, app.userId, app.uid,
app.info.processName);
if (!app.isolated) {
// XXX We don't have a way to mark isolated processes
// as bad, since they don't have a peristent identity.
mBadProcesses.put(app.info.processName, app.uid,
new BadProcessInfo(now, shortMsg, longMsg, stackTrace));
mProcessCrashTimes.remove(app.info.processName, app.uid);
}
app.bad = true;
app.removed = true;
// Don't let services in this process be restarted and potentially
// annoy the user repeatedly. Unless it is persistent, since those
// processes run critical code.
removeProcessLocked(app, false, false, "crash");
mStackSupervisor.resumeTopActivitiesLocked();
return false;
}
mStackSupervisor.resumeTopActivitiesLocked();
} else {
mStackSupervisor.finishTopRunningActivityLocked(app);
}
// Bump up the crash count of any services currently running in the proc.
for (int i=app.services.size()-1; i>=0; i--) {
// Any services running in the application need to be placed
// back in the pending list.
ServiceRecord sr = app.services.valueAt(i);
sr.crashCount++;
}
// If the crashing process is what we consider to be the "home process" and it has been
// replaced by a third-party app, clear the package preferred activities from packages
// with a home activity running in the process to prevent a repeatedly crashing app
// from blocking the user to manually clear the list.
final ArrayList<ActivityRecord> activities = app.activities;
if (app == mHomeProcess && activities.size() > 0
&& (mHomeProcess.info.flags & ApplicationInfo.FLAG_SYSTEM) == 0) {
for (int activityNdx = activities.size() - 1; activityNdx >= 0; --activityNdx) {
final ActivityRecord r = activities.get(activityNdx);
if (r.isHomeActivity()) {
Log.i(TAG, "Clearing package preferred activities from " + r.packageName);
try {
ActivityThread.getPackageManager()
.clearPackagePreferredActivities(r.packageName);
} catch (RemoteException c) {
// pm is in same process, this will never happen.
}
}
}
}
if (!app.isolated) {
// XXX Can't keep track of crash times for isolated processes,
// because they don't have a perisistent identity.
mProcessCrashTimes.put(app.info.processName, app.uid, now);
}
if (app.crashHandler != null) mHandler.post(app.crashHandler);
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleAppCrashLocked
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3833
|
MEDIUM
| 4.3
|
android
|
handleAppCrashLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void executeParamSyntaxError(TestContext context) {
postgresClient().execute("'", new JsonArray(), context.asyncAssertFailure());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: executeParamSyntaxError
File: domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
executeParamSyntaxError
|
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String getModelAttribute() {
return this.modelAttribute;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getModelAttribute
File: spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/FormTag.java
Repository: spring-projects/spring-framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-1904
|
MEDIUM
| 4.3
|
spring-projects/spring-framework
|
getModelAttribute
|
spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/FormTag.java
|
741b4b229ae032bd17175b46f98673ce0bd2d485
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable
private static Double toDouble(@Nullable String v) {
try {
return v != null ? Double.parseDouble(v) : null;
} catch (NumberFormatException ignore) {
return null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toDouble
File: core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2019-16771
|
MEDIUM
| 5
|
line/armeria
|
toDouble
|
core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
|
b597f7a865a527a84ee3d6937075cfbb4470ed20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated(since = "9.9RC1")
public XWikiAttachmentStoreInterface getAttachmentStore(XWikiContext context)
{
return context.getWiki().getAttachmentStore();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAttachmentStore
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2023-29523
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
getAttachmentStore
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
0d547181389f7941e53291af940966413823f61c
| 0
|
Analyze the following code function for security vulnerabilities
|
public void hideSelectActionBar() {
if (mActionMode != null) {
mActionMode.finish();
mActionMode = null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hideSelectActionBar
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
hideSelectActionBar
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
private void invokeCallback(IPackageMoveObserver callback, int what, SomeArgs args)
throws RemoteException {
switch (what) {
case MSG_CREATED: {
callback.onCreated(args.argi1, (Bundle) args.arg2);
break;
}
case MSG_STATUS_CHANGED: {
callback.onStatusChanged(args.argi1, args.argi2, (long) args.arg3);
break;
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: invokeCallback
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
|
invokeCallback
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void writeUnknownObject(Object v, String name, TypedXmlSerializer out)
throws XmlPullParserException, IOException {
if (v instanceof PersistableBundle) {
out.startTag(null, TAG_PERSISTABLEMAP);
out.attribute(null, "name", name);
((PersistableBundle) v).saveToXml(out);
out.endTag(null, TAG_PERSISTABLEMAP);
} else {
throw new XmlPullParserException("Unknown Object o=" + v);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeUnknownObject
File: core/java/android/os/PersistableBundle.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40074
|
MEDIUM
| 5.5
|
android
|
writeUnknownObject
|
core/java/android/os/PersistableBundle.java
|
40e4ea759743737958dde018f3606d778f7a53f3
| 0
|
Analyze the following code function for security vulnerabilities
|
static DataSource lookupDataSource(Hints hints) throws FactoryException {
Object hint = hints.get(Hints.EPSG_DATA_SOURCE);
if (hint instanceof DataSource) {
return (DataSource) hint;
} else if (hint instanceof String) {
String name = (String) hint;
InitialContext context;
try {
context = GeoTools.getInitialContext();
// name = GeoTools.fixName( context, name );
return (DataSource) context.lookup(name);
} catch (Exception e) {
throw new FactoryException("EPSG_DATA_SOURCE '" + name + "' not found:" + e, e);
}
}
throw new FactoryException("EPSG_DATA_SOURCE must be provided");
}
|
Vulnerability Classification:
- CWE: CWE-917
- CVE: CVE-2022-24818
- Severity: HIGH
- CVSS Score: 7.5
Description: [GEOT-7115] Streamline JNDI lookups
Function: lookupDataSource
File: modules/library/referencing/src/main/java/org/geotools/referencing/factory/AbstractEpsgMediator.java
Repository: geotools
Fixed Code:
static DataSource lookupDataSource(Hints hints) throws FactoryException {
Object hint = hints.get(Hints.EPSG_DATA_SOURCE);
if (hint instanceof DataSource) {
return (DataSource) hint;
} else if (hint instanceof String) {
String name = (String) hint;
try {
return (DataSource) GeoTools.jndiLookup(name);
} catch (Exception e) {
throw new FactoryException("EPSG_DATA_SOURCE '" + name + "' not found:" + e, e);
}
}
throw new FactoryException("EPSG_DATA_SOURCE must be provided");
}
|
[
"CWE-917"
] |
CVE-2022-24818
|
HIGH
| 7.5
|
geotools
|
lookupDataSource
|
modules/library/referencing/src/main/java/org/geotools/referencing/factory/AbstractEpsgMediator.java
|
4f70fa3234391dd0cda883a20ab0ec75688cba49
| 1
|
Analyze the following code function for security vulnerabilities
|
private native void nativeScrollEnd(long nativeContentViewCoreImpl, long timeMs);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nativeScrollEnd
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
nativeScrollEnd
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Route.Collection put(final String path1, final String path2,
final String path3, final Route.OneArgHandler handler) {
return new Route.Collection(
new Route.Definition[]{put(path1, handler), put(path2, handler), put(path3, handler)});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: put
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
|
put
|
jooby/src/main/java/org/jooby/Jooby.java
|
34f526028e6cd0652125baa33936ffb6a8a4a009
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void handleMessage(Message msg) {
CatLog.d(this, "handleMessage[" + msg.what + "]");
switch (msg.what) {
case MSG_ID_SESSION_END:
case MSG_ID_PROACTIVE_COMMAND:
case MSG_ID_EVENT_NOTIFY:
case MSG_ID_REFRESH:
CatLog.d(this, "ril message arrived,slotid:" + mSlotId);
String data = null;
if (msg.obj != null) {
AsyncResult ar = (AsyncResult) msg.obj;
if (ar != null && ar.result != null) {
try {
data = (String) ar.result;
} catch (ClassCastException e) {
break;
}
}
}
mMsgDecoder.sendStartDecodingMessageParams(new RilMessage(msg.what, data));
break;
case MSG_ID_CALL_SETUP:
mMsgDecoder.sendStartDecodingMessageParams(new RilMessage(msg.what, null));
break;
case MSG_ID_ICC_RECORDS_LOADED:
break;
case MSG_ID_RIL_MSG_DECODED:
handleRilMsg((RilMessage) msg.obj);
break;
case MSG_ID_RESPONSE:
handleCmdResponse((CatResponseMessage) msg.obj);
break;
case MSG_ID_ICC_CHANGED:
CatLog.d(this, "MSG_ID_ICC_CHANGED");
updateIccAvailability();
break;
case MSG_ID_ICC_REFRESH:
if (msg.obj != null) {
AsyncResult ar = (AsyncResult) msg.obj;
if (ar != null && ar.result != null) {
broadcastCardStateAndIccRefreshResp(CardState.CARDSTATE_PRESENT,
(IccRefreshResponse) ar.result);
} else {
CatLog.d(this,"Icc REFRESH with exception: " + ar.exception);
}
} else {
CatLog.d(this, "IccRefresh Message is null");
}
break;
case MSG_ID_ALPHA_NOTIFY:
CatLog.d(this, "Received CAT CC Alpha message from card");
if (msg.obj != null) {
AsyncResult ar = (AsyncResult) msg.obj;
if (ar != null && ar.result != null) {
broadcastAlphaMessage((String)ar.result);
} else {
CatLog.d(this, "CAT Alpha message: ar.result is null");
}
} else {
CatLog.d(this, "CAT Alpha message: msg.obj is null");
}
break;
default:
throw new AssertionError("Unrecognized CAT command: " + msg.what);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleMessage
File: src/java/com/android/internal/telephony/cat/CatService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2015-3843
|
HIGH
| 9.3
|
android
|
handleMessage
|
src/java/com/android/internal/telephony/cat/CatService.java
|
b48581401259439dc5ef6dcf8b0f303e4cbefbe9
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean removeSharedAccountAsUser(Account account, int userId) {
return removeSharedAccountAsUser(account, userId, getCallingUid());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeSharedAccountAsUser
File: services/core/java/com/android/server/accounts/AccountManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-502"
] |
CVE-2023-45777
|
HIGH
| 7.8
|
android
|
removeSharedAccountAsUser
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Editable(order=390, name="Agent Selector", placeholder="Any agent",
description="Specify agents applicable for this executor")
@io.onedev.server.web.editable.annotation.AgentQuery(forExecutor=true)
public String getAgentQuery() {
return agentQuery;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAgentQuery
File: server-plugin/server-plugin-executor-remotedocker/src/main/java/io/onedev/server/plugin/executor/remotedocker/RemoteDockerExecutor.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-610"
] |
CVE-2022-39206
|
CRITICAL
| 9.9
|
theonedev/onedev
|
getAgentQuery
|
server-plugin/server-plugin-executor-remotedocker/src/main/java/io/onedev/server/plugin/executor/remotedocker/RemoteDockerExecutor.java
|
0052047a5b5095ac6a6b4a73a522d0272fec3a22
| 0
|
Analyze the following code function for security vulnerabilities
|
synchronized int getUserId() {
return mUserId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserId
File: src/com/android/nfc/NfcService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3761
|
LOW
| 2.1
|
android
|
getUserId
|
src/com/android/nfc/NfcService.java
|
9ea802b5456a36f1115549b645b65c791eff3c2c
| 0
|
Analyze the following code function for security vulnerabilities
|
public void uninstallPackageWithActiveAdmins(String packageName) {
try {
mService.uninstallPackageWithActiveAdmins(packageName);
} catch (RemoteException re) {
throw re.rethrowFromSystemServer();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: uninstallPackageWithActiveAdmins
File: core/java/android/app/admin/DevicePolicyManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
uninstallPackageWithActiveAdmins
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public String displayPrettyName(String fieldname, boolean showMandatory)
{
if (this.currentObj == null) {
return this.doc.displayPrettyName(fieldname, showMandatory, getXWikiContext());
} else {
return this.doc.displayPrettyName(fieldname, showMandatory, this.currentObj.getBaseObject(),
getXWikiContext());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: displayPrettyName
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-23615
|
MEDIUM
| 5.5
|
xwiki/xwiki-platform
|
displayPrettyName
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
|
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isEscapeForwardSlashAlways() {
return escapeForwardSlashAlways;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isEscapeForwardSlashAlways
File: src/main/java/org/codehaus/jettison/json/JSONObject.java
Repository: jettison-json/jettison
The code follows secure coding practices.
|
[
"CWE-674",
"CWE-787"
] |
CVE-2022-45693
|
HIGH
| 7.5
|
jettison-json/jettison
|
isEscapeForwardSlashAlways
|
src/main/java/org/codehaus/jettison/json/JSONObject.java
|
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void parseQuery2MType() throws Exception {
HttpQuery query = NettyMocks.getQuery(tsdb,
"/api/query?start=1h-ago&m=sum:sys.cpu.0&m=avg:sys.cpu.1");
TSQuery tsq = (TSQuery) parseQuery.invoke(rpc, tsdb, query, expressions);
assertNotNull(tsq.getQueries());
assertEquals(2, tsq.getQueries().size());
TSSubQuery sub1 = tsq.getQueries().get(0);
assertNotNull(sub1);
assertEquals("sum", sub1.getAggregator());
assertEquals("sys.cpu.0", sub1.getMetric());
TSSubQuery sub2 = tsq.getQueries().get(1);
assertNotNull(sub2);
assertEquals("avg", sub2.getAggregator());
assertEquals("sys.cpu.1", sub2.getMetric());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseQuery2MType
File: test/tsd/TestQueryRpc.java
Repository: OpenTSDB/opentsdb
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-25827
|
MEDIUM
| 6.1
|
OpenTSDB/opentsdb
|
parseQuery2MType
|
test/tsd/TestQueryRpc.java
|
ff02c1e95e60528275f69b31bcbf7b2ac625cea8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public double getDoubleProperty(String name) throws JMSException {
Object o = this.getObjectProperty(name);
if (o == null)
throw new NumberFormatException("Null is not a valid double");
else if (o instanceof String) {
return Double.parseDouble((String) o);
} else if (o instanceof Float) {
return (Float) o;
} else if (o instanceof Double) {
return (Double) o;
} else
throw new MessageFormatException(String.format("Unable to convert from class [%s]", o.getClass().getName()));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDoubleProperty
File: src/main/java/com/rabbitmq/jms/client/RMQMessage.java
Repository: rabbitmq/rabbitmq-jms-client
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2020-36282
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-jms-client
|
getDoubleProperty
|
src/main/java/com/rabbitmq/jms/client/RMQMessage.java
|
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
| 0
|
Analyze the following code function for security vulnerabilities
|
public void removeTrigger(TriggerDescriptor trigger) throws IOException {
removeFromList(trigger,triggers());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeTrigger
File: core/src/main/java/hudson/model/AbstractProject.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
removeTrigger
|
core/src/main/java/hudson/model/AbstractProject.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public OnGoingLogicalCondition lt(T value) {
Condition conditionLocal = new LtCondition<T>(selector, selector.generateParameter(value));
return getOnGoingLogicalCondition(conditionLocal);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: lt
File: src/main/java/org/torpedoquery/jpa/internal/conditions/ConditionBuilder.java
Repository: xjodoin/torpedoquery
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2019-11343
|
HIGH
| 7.5
|
xjodoin/torpedoquery
|
lt
|
src/main/java/org/torpedoquery/jpa/internal/conditions/ConditionBuilder.java
|
3c20b874fba9cc2a78b9ace10208de1602b56c3f
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setOutputStream(WinstoneOutputStream outData) {
this.outputStream = outData;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setOutputStream
File: src/java/winstone/WinstoneResponse.java
Repository: jenkinsci/winstone
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2011-4344
|
LOW
| 2.6
|
jenkinsci/winstone
|
setOutputStream
|
src/java/winstone/WinstoneResponse.java
|
410ed3001d51c689cf59085b7417466caa2ded7b
| 0
|
Analyze the following code function for security vulnerabilities
|
private Set<String> getAllRecordingIds(List<File> recs) {
Set<String> ids = new HashSet<>();
Iterator<File> iterator = recs.iterator();
while (iterator.hasNext()) {
ids.add(iterator.next().getName());
}
return ids;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAllRecordingIds
File: bbb-common-web/src/main/java/org/bigbluebutton/api/RecordingService.java
Repository: bigbluebutton
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-12443
|
HIGH
| 7.5
|
bigbluebutton
|
getAllRecordingIds
|
bbb-common-web/src/main/java/org/bigbluebutton/api/RecordingService.java
|
b21ca8355a57286a1e6df96984b3a4c57679a463
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean hasNext() {
return next != null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasNext
File: codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-436",
"CWE-113"
] |
CVE-2022-41915
|
MEDIUM
| 6.5
|
netty
|
hasNext
|
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
|
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void dismissKeyguardThenExecute(OnDismissAction action, boolean afterKeyguardGone) {
dismissKeyguardThenExecute(action, null /* cancelRunnable */, afterKeyguardGone);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dismissKeyguardThenExecute
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
|
dismissKeyguardThenExecute
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void wakeUpIfDozing(long time, View where) {
if (mDozing) {
PowerManager pm = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
pm.wakeUp(time, "com.android.systemui:NODOZE");
mWakeUpComingFromTouch = true;
where.getLocationInWindow(mTmpInt2);
mWakeUpTouchLocation = new PointF(mTmpInt2[0] + where.getWidth() / 2,
mTmpInt2[1] + where.getHeight() / 2);
mStatusBarKeyguardViewManager.notifyDeviceWakeUpRequested();
mFalsingManager.onScreenOnFromTouch();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: wakeUpIfDozing
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
|
wakeUpIfDozing
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("UnusedParameters")
public static String[] getComponentId(HttpServletRequest request,
MainSessionController mainSessionCtrl) {
SilverpeasWebUtil webUtil = ServiceProvider.getSingleton(SilverpeasWebUtil.class);
return webUtil.getComponentId(request);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getComponentId
File: core-web/src/main/java/org/silverpeas/core/web/mvc/route/ComponentRequestRouter.java
Repository: Silverpeas/Silverpeas-Core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-47324
|
MEDIUM
| 5.4
|
Silverpeas/Silverpeas-Core
|
getComponentId
|
core-web/src/main/java/org/silverpeas/core/web/mvc/route/ComponentRequestRouter.java
|
9a55728729a3b431847045c674b3e883507d1e1a
| 0
|
Analyze the following code function for security vulnerabilities
|
private void bindGuts(final ExpandableNotificationRow row, MenuItem item) {
row.inflateGuts();
row.setGutsView(item);
final StatusBarNotification sbn = row.getStatusBarNotification();
row.setTag(sbn.getPackageName());
final NotificationGuts guts = row.getGuts();
guts.setClosedListener((NotificationGuts g) -> {
if (!g.willBeRemoved() && !row.isRemoved()) {
mStackScroller.onHeightChanged(row, !isPanelFullyCollapsed() /* needsAnimation */);
}
if (mNotificationGutsExposed == g) {
mNotificationGutsExposed = null;
mGutsMenuItem = null;
}
});
View gutsView = item.getGutsView();
if (gutsView instanceof NotificationSnooze) {
NotificationSnooze snoozeGuts = (NotificationSnooze) gutsView;
snoozeGuts.setSnoozeListener(mStackScroller.getSwipeActionHelper());
snoozeGuts.setStatusBarNotification(sbn);
snoozeGuts.setSnoozeOptions(row.getEntry().snoozeCriteria);
guts.setHeightChangedListener((NotificationGuts g) -> {
mStackScroller.onHeightChanged(row, row.isShown() /* needsAnimation */);
});
}
if (gutsView instanceof NotificationInfo) {
final UserHandle userHandle = sbn.getUser();
PackageManager pmUser = getPackageManagerForUser(mContext,
userHandle.getIdentifier());
final INotificationManager iNotificationManager = INotificationManager.Stub.asInterface(
ServiceManager.getService(Context.NOTIFICATION_SERVICE));
final String pkg = sbn.getPackageName();
NotificationInfo info = (NotificationInfo) gutsView;
// Settings link is only valid for notifications that specify a user, unless this is the
// system user.
NotificationInfo.OnSettingsClickListener onSettingsClick = null;
if (!userHandle.equals(UserHandle.ALL) || mCurrentUserId == UserHandle.USER_SYSTEM) {
onSettingsClick = (View v, NotificationChannel channel, int appUid) -> {
mMetricsLogger.action(MetricsEvent.ACTION_NOTE_INFO);
guts.resetFalsingCheck();
startAppNotificationSettingsActivity(pkg, appUid, channel);
};
}
final NotificationInfo.OnAppSettingsClickListener onAppSettingsClick = (View v,
Intent intent) -> {
mMetricsLogger.action(MetricsEvent.ACTION_APP_NOTE_SETTINGS);
guts.resetFalsingCheck();
startNotificationGutsIntent(intent, sbn.getUid());
};
final View.OnClickListener onDoneClick = (View v) -> {
saveAndCloseNotificationMenu(info, row, guts, v);
};
final NotificationInfo.CheckSaveListener checkSaveListener =
(Runnable saveImportance) -> {
// If the user has security enabled, show challenge if the setting is changed.
if (isLockscreenPublicMode(userHandle.getIdentifier())
&& (mState == StatusBarState.KEYGUARD
|| mState == StatusBarState.SHADE_LOCKED)) {
onLockedNotificationImportanceChange(() -> {
saveImportance.run();
return true;
});
} else {
saveImportance.run();
}
};
ArraySet<NotificationChannel> channels = new ArraySet<NotificationChannel>();
channels.add(row.getEntry().channel);
if (row.isSummaryWithChildren()) {
// If this is a summary, then add in the children notification channels for the
// same user and pkg.
final List<ExpandableNotificationRow> childrenRows = row.getNotificationChildren();
final int numChildren = childrenRows.size();
for (int i = 0; i < numChildren; i++) {
final ExpandableNotificationRow childRow = childrenRows.get(i);
final NotificationChannel childChannel = childRow.getEntry().channel;
final StatusBarNotification childSbn = childRow.getStatusBarNotification();
if (childSbn.getUser().equals(userHandle) &&
childSbn.getPackageName().equals(pkg)) {
channels.add(childChannel);
}
}
}
try {
info.bindNotification(pmUser, iNotificationManager, pkg, new ArrayList(channels),
row.getEntry().channel.getImportance(), sbn, onSettingsClick,
onAppSettingsClick, onDoneClick, checkSaveListener,
mNonBlockablePkgs);
} catch (RemoteException e) {
Log.e(TAG, e.toString());
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: bindGuts
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
|
bindGuts
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected Contentlet save(Contentlet contentlet, String existingInode) throws DotDataException, DotStateException, DotSecurityException {
com.dotmarketing.portlets.contentlet.business.Contentlet fatty = new com.dotmarketing.portlets.contentlet.business.Contentlet();
if(InodeUtils.isSet(contentlet.getInode())){
fatty = (com.dotmarketing.portlets.contentlet.business.Contentlet)HibernateUtil.load(com.dotmarketing.portlets.contentlet.business.Contentlet.class, contentlet.getInode());
}
fatty = convertContentletToFatContentlet(contentlet, fatty);
if(UtilMethods.isSet(existingInode))
HibernateUtil.saveWithPrimaryKey(fatty, existingInode);
else
HibernateUtil.saveOrUpdate(fatty);
final Contentlet content = convertFatContentletToContentlet(fatty);
if (InodeUtils.isSet(contentlet.getHost())) {
content.setHost(contentlet.getHost());
}
if (InodeUtils.isSet(contentlet.getFolder())) {
content.setFolder(contentlet.getFolder());
}
cc.remove(content.getInode());
cc.add(content.getInode(), content);
HibernateUtil.evict(content);
return content;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: save
File: src/com/dotcms/content/elasticsearch/business/ESContentFactoryImpl.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-2355
|
HIGH
| 7.5
|
dotCMS/core
|
save
|
src/com/dotcms/content/elasticsearch/business/ESContentFactoryImpl.java
|
897f3632d7e471b7a73aabed5b19f6f53d4e5562
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isThirdPartTemplateSupport(String platform) {
if (StringUtils.isBlank(platform)) {
return false;
}
PluginMetaInfo pluginMetaInfo = pluginManager.getPluginMetaInfoByKey(platform);
if (PlatformPluginService.isPluginPlatform(platform) && pluginMetaInfo == null) {
MSException.throwException(Translator.get("platform_plugin_not_exit") + PlatformPluginService.PLUGIN_DOWNLOAD_URL);
}
return pluginMetaInfo == null ? false : pluginMetaInfo.isThirdPartTemplateSupport();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isThirdPartTemplateSupport
File: test-track/backend/src/main/java/io/metersphere/service/PlatformPluginService.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2022-23544
|
MEDIUM
| 6.1
|
metersphere
|
isThirdPartTemplateSupport
|
test-track/backend/src/main/java/io/metersphere/service/PlatformPluginService.java
|
d0f95b50737c941b29d507a4cc3545f2dc6ab121
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getPendingAppTransition() {
return mAppTransition.getAppTransition();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPendingAppTransition
File: services/core/java/com/android/server/wm/WindowManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3875
|
HIGH
| 7.2
|
android
|
getPendingAppTransition
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void registerNetworkPolicyUidObserver(@NonNull IUidObserver observer,
int which, int cutpoint, @NonNull String callingPackage) {
mNetworkPolicyUidObserver = observer;
mUidObserverController.register(observer, which, cutpoint, callingPackage,
Binder.getCallingUid());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: registerNetworkPolicyUidObserver
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
|
registerNetworkPolicyUidObserver
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
Map<String, Object> toHeaders() throws IOException, JMSException {
Map<String, Object> hdrs = new HashMap<String, Object>();
// set non-null user properties
for (Map.Entry<String, Serializable> e : this.userJmsProperties.entrySet()) {
putIfNotNull(hdrs, e.getKey(), e.getValue());
}
// set (overwrite?) selectable JMS properties
hdrs.put("JMSDeliveryMode", (this.getJMSDeliveryMode()==DeliveryMode.PERSISTENT ? "PERSISTENT": "NON_PERSISTENT"));
putIfNotNull(hdrs, "JMSMessageID", this.getJMSMessageID());
hdrs.put("JMSTimestamp", this.getJMSTimestamp());
hdrs.put("JMSPriority", this.getJMSPriority());
putIfNotNull(hdrs, "JMSCorrelationID", this.getJMSCorrelationID());
putIfNotNull(hdrs, "JMSType", this.getJMSType());
return hdrs;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toHeaders
File: src/main/java/com/rabbitmq/jms/client/RMQMessage.java
Repository: rabbitmq/rabbitmq-jms-client
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2020-36282
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-jms-client
|
toHeaders
|
src/main/java/com/rabbitmq/jms/client/RMQMessage.java
|
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
| 0
|
Analyze the following code function for security vulnerabilities
|
public void toXML(Object obj, Writer out) {
HierarchicalStreamWriter writer = hierarchicalStreamDriver.createWriter(out);
try {
marshal(obj, writer);
} finally {
writer.flush();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toXML
File: xstream/src/java/com/thoughtworks/xstream/XStream.java
Repository: x-stream/xstream
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-43859
|
MEDIUM
| 5
|
x-stream/xstream
|
toXML
|
xstream/src/java/com/thoughtworks/xstream/XStream.java
|
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void appNotRespondingViaProvider(IBinder connection) {
mCpHelper.appNotRespondingViaProvider(connection);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: appNotRespondingViaProvider
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
|
appNotRespondingViaProvider
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean requestAssistContextExtras(int requestType, IResultReceiver receiver,
IBinder activityToken) throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: requestAssistContextExtras
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
requestAssistContextExtras
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean enableSwitch(Context context, ApplicationInfo app) {
try {
PackageInfo info = context.getPackageManager().getPackageInfo(
app.packageName, PackageManager.GET_PERMISSIONS);
final AppRow row = new AppRow();
recordCanBeBlocked(info, row);
boolean systemBlockable = !row.systemApp || (row.systemApp && row.banned);
return systemBlockable && !row.lockedImportance;
} catch (PackageManager.NameNotFoundException e) {
e.printStackTrace();
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: enableSwitch
File: src/com/android/settings/notification/NotificationBackend.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35667
|
HIGH
| 7.8
|
android
|
enableSwitch
|
src/com/android/settings/notification/NotificationBackend.java
|
d8355ac47e068ad20c6a7b1602e72f0585ec0085
| 0
|
Analyze the following code function for security vulnerabilities
|
protected T _fromDecimal(DeserializationContext context, BigDecimal value)
{
long seconds = value.longValue();
int nanoseconds = DecimalUtils.extractNanosecondDecimal(value, seconds);
return fromNanoseconds.apply(new FromDecimalArguments(
seconds, nanoseconds, getZone(context)));
}
|
Vulnerability Classification:
- CWE: CWE-20
- CVE: CVE-2018-1000873
- Severity: MEDIUM
- CVSS Score: 4.3
Description: Avoid latency problems converting decimal to time.
Fixes https://github.com/FasterXML/jackson-databind/issues/2141
Function: _fromDecimal
File: datetime/src/main/java/com/fasterxml/jackson/datatype/jsr310/deser/InstantDeserializer.java
Repository: FasterXML/jackson-modules-java8
Fixed Code:
protected T _fromDecimal(DeserializationContext context, BigDecimal value)
{
FromDecimalArguments args =
DecimalUtils.extractSecondsAndNanos(value, (s, ns) -> new FromDecimalArguments(s, ns, getZone(context)));
return fromNanoseconds.apply(args);
}
|
[
"CWE-20"
] |
CVE-2018-1000873
|
MEDIUM
| 4.3
|
FasterXML/jackson-modules-java8
|
_fromDecimal
|
datetime/src/main/java/com/fasterxml/jackson/datatype/jsr310/deser/InstantDeserializer.java
|
ba27ce5909dfb49bcaf753ad3e04ecb980010b0b
| 1
|
Analyze the following code function for security vulnerabilities
|
public Jooby use(final Jooby.Module module) {
requireNonNull(module, "A module is required.");
bag.add(module);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: use
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
|
use
|
jooby/src/main/java/org/jooby/Jooby.java
|
34f526028e6cd0652125baa33936ffb6a8a4a009
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void updateApplication(ServiceProvider serviceProvider, String tenantDomain, String username)
throws IdentityApplicationManagementException {
validateApplicationConfigurations(serviceProvider, tenantDomain, username);
// invoking the listeners
Collection<ApplicationMgtListener> listeners = getApplicationMgtListeners();
for (ApplicationMgtListener listener : listeners) {
if (listener.isEnable() && !listener.doPreUpdateApplication(serviceProvider, tenantDomain, username)) {
throw buildServerException("Pre Update application failed");
}
}
String applicationName = serviceProvider.getApplicationName();
try {
// check whether user is authorized to update the application.
startTenantFlow(tenantDomain, username);
ApplicationDAO appDAO = ApplicationMgtSystemConfig.getInstance().getApplicationDAO();
String storedAppName = appDAO.getApplicationName(serviceProvider.getApplicationID());
if (StringUtils.isBlank(storedAppName)) {
// This means the application is not a valid one.
String msg = "Cannot find application with id: " + serviceProvider.getApplicationID() + " in " +
"tenantDomain: " + tenantDomain;
throw buildClientException(APPLICATION_NOT_FOUND, msg);
}
doPreUpdateChecks(storedAppName, serviceProvider, tenantDomain, username);
appDAO.updateApplication(serviceProvider, tenantDomain);
if (isOwnerUpdatedInRequest(serviceProvider)) {
//It is not required to validate the user here, as the user is validating inside the updateApplication
// method above. Hence assign application role to the app owner.
assignApplicationRole(serviceProvider.getApplicationName(),
MultitenantUtils.getTenantAwareUsername(serviceProvider.getOwner().toFullQualifiedUsername()));
}
updateApplicationPermissions(serviceProvider, applicationName, storedAppName);
} catch (Exception e) {
String error = "Error occurred while updating the application: " + applicationName + ". " + e.getMessage();
throw new IdentityApplicationManagementException(error, e);
} finally {
endTenantFlow();
}
for (ApplicationMgtListener listener : listeners) {
if (listener.isEnable() && !listener.doPostUpdateApplication(serviceProvider, tenantDomain, username)) {
return;
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateApplication
File: components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
Repository: wso2/carbon-identity-framework
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-42646
|
MEDIUM
| 6.4
|
wso2/carbon-identity-framework
|
updateApplication
|
components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
|
e9119883ee02a884f3c76c7bbc4022a4f4c58fc0
| 0
|
Analyze the following code function for security vulnerabilities
|
final void addBroadcastStatLocked(String action, String srcPackage, int receiveCount,
int skipCount, long dispatchTime) {
final long now = SystemClock.elapsedRealtime();
if (mCurBroadcastStats == null ||
(mCurBroadcastStats.mStartRealtime +(24*60*60*1000) < now)) {
mLastBroadcastStats = mCurBroadcastStats;
if (mLastBroadcastStats != null) {
mLastBroadcastStats.mEndRealtime = SystemClock.elapsedRealtime();
mLastBroadcastStats.mEndUptime = SystemClock.uptimeMillis();
}
mCurBroadcastStats = new BroadcastStats();
}
mCurBroadcastStats.addBroadcast(action, srcPackage, receiveCount, skipCount, dispatchTime);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addBroadcastStatLocked
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
|
addBroadcastStatLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
private void migrate74(File dataDir, Stack<Integer> versions) {
for (File file: dataDir.listFiles()) {
if (file.getName().startsWith("Builds.xml")) {
VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file);
for (Element element: dom.getRootElement().elements())
element.addElement("triggerChain").setText(UUID.randomUUID().toString());
dom.writeToFile(file, false);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: migrate74
File: server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-338"
] |
CVE-2023-24828
|
HIGH
| 8.8
|
theonedev/onedev
|
migrate74
|
server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
|
d67dd9686897fe5e4ab881d749464aa7c06a68e5
| 0
|
Analyze the following code function for security vulnerabilities
|
int binderGetCallingPid() {
return Binder.getCallingPid();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: binderGetCallingPid
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
|
binderGetCallingPid
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public float getAttributeFloatValue(int idx, float defaultValue) {
final int t = nativeGetAttributeDataType(mParseState, idx);
if (t == ERROR_NULL_DOCUMENT) {
throw new NullPointerException("Null document");
}
// Note: don't attempt to convert any other types, because
// we want to count on aapt doing the conversion for us.
if (t == TypedValue.TYPE_FLOAT) {
final int v = nativeGetAttributeData(mParseState, idx);
if (v == ERROR_NULL_DOCUMENT) {
throw new NullPointerException("Null document");
}
return Float.intBitsToFloat(v);
}
throw new RuntimeException("not a float!");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAttributeFloatValue
File: core/java/android/content/res/XmlBlock.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-415"
] |
CVE-2023-40103
|
HIGH
| 7.8
|
android
|
getAttributeFloatValue
|
core/java/android/content/res/XmlBlock.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getPlainText(String messageId) {
return getPlainText(messageId, (Object[])null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPlainText
File: java/code/src/com/redhat/rhn/common/localization/LocalizationService.java
Repository: spacewalkproject/spacewalk
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2016-3079
|
MEDIUM
| 4.3
|
spacewalkproject/spacewalk
|
getPlainText
|
java/code/src/com/redhat/rhn/common/localization/LocalizationService.java
|
7b9ff9ad
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean fail(String message) {
throw new InvalidPathException(message);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fail
File: json-path/src/main/java/com/jayway/jsonpath/internal/path/PathCompiler.java
Repository: json-path/JsonPath
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-51074
|
MEDIUM
| 5.3
|
json-path/JsonPath
|
fail
|
json-path/src/main/java/com/jayway/jsonpath/internal/path/PathCompiler.java
|
f49ff25e3bad8c8a0c853058181f2c00b5beb305
| 0
|
Analyze the following code function for security vulnerabilities
|
private void clearOverrideApnUnchecked() {
if (!mHasTelephonyFeature) {
return;
}
// Disable Override APNs and remove them from database.
setOverrideApnsEnabledUnchecked(false);
final List<ApnSetting> apns = getOverrideApnsUnchecked();
for (int i = 0; i < apns.size(); i ++) {
removeOverrideApnUnchecked(apns.get(i).getId());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearOverrideApnUnchecked
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
|
clearOverrideApnUnchecked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void createsCountQueryCorrectly() throws Exception {
assertCountQuery(QUERY, COUNT_QUERY);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createsCountQueryCorrectly
File: src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsUnitTests.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
|
createsCountQueryCorrectly
|
src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsUnitTests.java
|
b8e7fe
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onAuthenticationSucceeded(AuthenticationResult result) {
handleFingerprintAuthenticated();
}
|
Vulnerability Classification:
- CWE: CWE-264
- CVE: CVE-2016-3917
- Severity: HIGH
- CVSS Score: 7.2
Description: Bind fingerprint when we start authentication
This fixes a bug where it was possible to authenticate the wrong user.
We now bind the userId when we start authentication and confirm it when
authentication completes.
Fixes bug 30744668
(Cherry pick from Change-Id: I346d92c301414ed81e11fa9c171584c7ae4341c2)
Change-Id: I3584790c39eb2e8c435ad1b2d887bf9b8ebd36fe
(cherry picked from commit 837d052ed4b5b75dfd4af44f5ad268e683bf2e13)
Function: onAuthenticationSucceeded
File: packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
Repository: android
Fixed Code:
@Override
public void onAuthenticationSucceeded(AuthenticationResult result) {
handleFingerprintAuthenticated(result.getUserId());
}
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
onAuthenticationSucceeded
|
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 1
|
Analyze the following code function for security vulnerabilities
|
@Test
public void getByIdsConnectionFailure(TestContext context) {
postgresClientNonexistingTenant().getByIdAsString(FOO, randomUuidArray(), context.asyncAssertFailure());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getByIdsConnectionFailure
File: domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
getByIdsConnectionFailure
|
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<Action> getViewActions() {
return getActions();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getViewActions
File: core/src/main/java/jenkins/model/Jenkins.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-2065
|
MEDIUM
| 4.3
|
jenkinsci/jenkins
|
getViewActions
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public ServerBuilder tls(File keyCertChainFile, File keyFile) {
return (ServerBuilder) TlsSetters.super.tls(keyCertChainFile, keyFile);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: tls
File: core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-44487
|
HIGH
| 7.5
|
line/armeria
|
tls
|
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
|
df7f85824a62e997b910b5d6194a3335841065fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isPortrait() {
int orientation = getContext().getResources().getConfiguration().orientation;
if (orientation == Configuration.ORIENTATION_UNDEFINED
|| orientation == Configuration.ORIENTATION_SQUARE) {
return super.isPortrait();
}
return orientation == Configuration.ORIENTATION_PORTRAIT;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isPortrait
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
|
isPortrait
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setPasswordExpirationTimeout(ComponentName who, long timeout, boolean parent) {
if (!mHasFeature || !mLockPatternUtils.hasSecureLockScreen()) {
return;
}
Objects.requireNonNull(who, "ComponentName is null");
Preconditions.checkArgumentNonnegative(timeout, "Timeout must be >= 0 ms");
final int userHandle = mInjector.userHandleGetCallingUserId();
synchronized (getLockObject()) {
ActiveAdmin ap = getActiveAdminForCallerLocked(
who, DeviceAdminInfo.USES_POLICY_EXPIRE_PASSWORD, parent);
// Calling this API automatically bumps the expiration date
final long expiration = timeout > 0L ? (timeout + System.currentTimeMillis()) : 0L;
ap.passwordExpirationDate = expiration;
ap.passwordExpirationTimeout = timeout;
if (timeout > 0L) {
Slogf.w(LOG_TAG, "setPasswordExpiration(): password will expire on "
+ DateFormat.getDateTimeInstance(DateFormat.DEFAULT, DateFormat.DEFAULT)
.format(new Date(expiration)));
}
saveSettingsLocked(userHandle);
// in case this is the first one, set the alarm on the appropriate user.
setExpirationAlarmCheckLocked(mContext, userHandle, parent);
}
if (SecurityLog.isLoggingEnabled()) {
final int affectedUserId = parent ? getProfileParentId(userHandle) : userHandle;
SecurityLog.writeEvent(SecurityLog.TAG_PASSWORD_EXPIRATION_SET, who.getPackageName(),
userHandle, affectedUserId, timeout);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setPasswordExpirationTimeout
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
|
setPasswordExpirationTimeout
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public void processInstallRequests(boolean success, List<InstallRequest> installRequests) {
List<InstallRequest> apexInstallRequests = new ArrayList<>();
List<InstallRequest> apkInstallRequests = new ArrayList<>();
for (InstallRequest request : installRequests) {
if ((request.mArgs.mInstallFlags & PackageManager.INSTALL_APEX) != 0) {
apexInstallRequests.add(request);
} else {
apkInstallRequests.add(request);
}
}
// Note: supporting multi package install of both APEXes and APKs might requir some
// thinking to ensure atomicity of the install.
if (!apexInstallRequests.isEmpty() && !apkInstallRequests.isEmpty()) {
// This should've been caught at the validation step, but for some reason wasn't.
throw new IllegalStateException(
"Attempted to do a multi package install of both APEXes and APKs");
}
if (!apexInstallRequests.isEmpty()) {
if (success) {
// Since installApexPackages requires talking to external service (apexd), we
// schedule to run it async. Once it finishes, it will resume the install.
Thread t = new Thread(() -> installApexPackagesTraced(apexInstallRequests),
"installApexPackages");
t.start();
} else {
// Non-staged APEX installation failed somewhere before
// processInstallRequestAsync. In that case just notify the observer about the
// failure.
InstallRequest request = apexInstallRequests.get(0);
mPm.notifyInstallObserver(request.mInstallResult,
request.mArgs.mObserver);
}
return;
}
if (success) {
for (InstallRequest request : apkInstallRequests) {
request.mArgs.doPreInstall(request.mInstallResult.mReturnCode);
}
synchronized (mPm.mInstallLock) {
installPackagesTracedLI(apkInstallRequests);
}
for (InstallRequest request : apkInstallRequests) {
request.mArgs.doPostInstall(
request.mInstallResult.mReturnCode, request.mInstallResult.mUid);
}
}
for (InstallRequest request : apkInstallRequests) {
restoreAndPostInstall(request.mArgs.mUser.getIdentifier(),
request.mInstallResult,
new PostInstallData(request.mArgs,
request.mInstallResult, null));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: processInstallRequests
File: services/core/java/com/android/server/pm/InstallPackageHelper.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21257
|
HIGH
| 7.8
|
android
|
processInstallRequests
|
services/core/java/com/android/server/pm/InstallPackageHelper.java
|
1aec7feaf07e6d4568ca75d18158445dbeac10f6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean addAccountExplicitlyWithVisibility(Account account, String password,
Bundle extras, Map packageToVisibility, String opPackageName) {
Bundle.setDefusable(extras, true);
int callingUid = Binder.getCallingUid();
int userId = UserHandle.getCallingUserId();
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.v(TAG, "addAccountExplicitly: " + account + ", caller's uid " + callingUid
+ ", pid " + Binder.getCallingPid());
}
Objects.requireNonNull(account, "account cannot be null");
if (!isAccountManagedByCaller(account.type, callingUid, userId)) {
String msg = String.format("uid %s cannot explicitly add accounts of type: %s",
callingUid, account.type);
throw new SecurityException(msg);
}
/*
* Child users are not allowed to add accounts. Only the accounts that are shared by the
* parent profile can be added to child profile.
*
* TODO: Only allow accounts that were shared to be added by a limited user.
*/
// fails if the account already exists
final long identityToken = clearCallingIdentity();
try {
UserAccounts accounts = getUserAccounts(userId);
return addAccountInternal(accounts, account, password, extras, callingUid,
(Map<String, Integer>) packageToVisibility, opPackageName);
} finally {
restoreCallingIdentity(identityToken);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addAccountExplicitlyWithVisibility
File: services/core/java/com/android/server/accounts/AccountManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-502"
] |
CVE-2023-45777
|
HIGH
| 7.8
|
android
|
addAccountExplicitlyWithVisibility
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
public static int getIntValueRounded(String value, int defaultValue, String key) {
int result;
try {
result = Math.round(Float.parseFloat(value));
} catch (Exception e) {
if (LOG.isDebugEnabled()) {
LOG.debug(Messages.get().getBundle().key(Messages.ERR_UNABLE_TO_PARSE_INT_2, value, key));
}
result = defaultValue;
}
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getIntValueRounded
File: src/org/opencms/util/CmsStringUtil.java
Repository: alkacon/opencms-core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2013-4600
|
MEDIUM
| 4.3
|
alkacon/opencms-core
|
getIntValueRounded
|
src/org/opencms/util/CmsStringUtil.java
|
72a05e3ea1cf692e2efce002687272e63f98c14a
| 0
|
Analyze the following code function for security vulnerabilities
|
Call getFirstCallWithState(Call callToSkip, int... states) {
for (int currentState : states) {
// check the foreground first
if (mForegroundCall != null && mForegroundCall.getState() == currentState) {
return mForegroundCall;
}
for (Call call : mCalls) {
if (Objects.equals(callToSkip, call)) {
continue;
}
// Only operate on top-level calls
if (call.getParentCall() != null) {
continue;
}
if (currentState == call.getState()) {
return call;
}
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFirstCallWithState
File: src/com/android/server/telecom/CallsManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2423
|
MEDIUM
| 6.6
|
android
|
getFirstCallWithState
|
src/com/android/server/telecom/CallsManager.java
|
a06c9a4aef69ae27b951523cf72bf72412bf48fa
| 0
|
Analyze the following code function for security vulnerabilities
|
static BigInteger objectToBigInteger(Object val, BigInteger defaultValue) {
if (NULL.equals(val)) {
return defaultValue;
}
if (val instanceof BigInteger){
return (BigInteger) val;
}
if (val instanceof BigDecimal){
return ((BigDecimal) val).toBigInteger();
}
if (val instanceof Double || val instanceof Float){
if (!numberIsFinite((Number)val)) {
return defaultValue;
}
return new BigDecimal(((Number) val).doubleValue()).toBigInteger();
}
if (val instanceof Long || val instanceof Integer
|| val instanceof Short || val instanceof Byte){
return BigInteger.valueOf(((Number) val).longValue());
}
// don't check if it's a string in case of unchecked Number subclasses
try {
// the other opt functions handle implicit conversions, i.e.
// jo.put("double",1.1d);
// jo.optInt("double"); -- will return 1, not an error
// this conversion to BigDecimal then to BigInteger is to maintain
// that type cast support that may truncate the decimal.
final String valStr = val.toString();
if(isDecimalNotation(valStr)) {
return new BigDecimal(valStr).toBigInteger();
}
return new BigInteger(valStr);
} catch (Exception e) {
return defaultValue;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: objectToBigInteger
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
|
objectToBigInteger
|
src/main/java/org/json/JSONObject.java
|
661114c50dcfd53bb041aab66f14bb91e0a87c8a
| 0
|
Analyze the following code function for security vulnerabilities
|
private CleanerProperties getDefaultCleanerProperties(HTMLCleanerConfiguration configuration)
{
CleanerProperties defaultProperties = new CleanerProperties();
defaultProperties.setOmitUnknownTags(true);
// HTML Cleaner uses the compact notation by default but we don't want that since:
// - it's more work and not required since not compact notation is valid XHTML
// - expanded elements can also be rendered fine in browsers that only support HTML.
defaultProperties.setUseEmptyElementTags(false);
// Wrap script and style content in CDATA blocks
defaultProperties.setUseCdataForScriptAndStyle(true);
// We need this for example to ignore CDATA sections not inside script or style elements.
defaultProperties.setIgnoreQuestAndExclam(true);
// Remove CDATA outside of script and style since according to the spec it has no effect there.
defaultProperties.setOmitCdataOutsideScriptAndStyle(true);
// If the caller has defined NAMESPACE_AWARE configuration property then use it, otherwise use our default.
String param = configuration.getParameters().get(HTMLCleanerConfiguration.NAMESPACES_AWARE);
boolean namespacesAware = (param == null) || Boolean.parseBoolean(param);
defaultProperties.setNamespacesAware(namespacesAware);
// Set Cleaner transformations
defaultProperties.setCleanerTransformations(getDefaultCleanerTransformations(configuration));
// Don't convert special HTML entities (i.e. ô, ‰, ×) with unicode characters they represent.
defaultProperties.setTranslateSpecialEntities(false);
// Use character references rather than entity references if needed (for instance if you need to parse the
// output as XML)
param = configuration.getParameters().get(HTMLCleanerConfiguration.USE_CHARACTER_REFERENCES);
boolean useCharacterReferences = (param != null) && Boolean.parseBoolean(param);
defaultProperties.setTransResCharsToNCR(useCharacterReferences);
// Sets the HTML version from the configuration (by default 4).
defaultProperties.setHtmlVersion(getHTMLVersion(configuration));
// We trim values by default for all attributes but the input value attribute.
// The only way to currently do that is to switch off this flag, and to create a dedicated TagTransformation.
// See TrimAttributeCleanerTransformation for more information.
defaultProperties.setTrimAttributeValues(false);
// This flag should be set to true once https://sourceforge.net/p/htmlcleaner/bugs/221/ is fixed.
defaultProperties.setRecognizeUnicodeChars(false);
param = configuration.getParameters().get(HTMLCleanerConfiguration.TRANSLATE_SPECIAL_ENTITIES);
boolean translateSpecialEntities = (param != null) && Boolean.parseBoolean(param);
defaultProperties.setTranslateSpecialEntities(translateSpecialEntities);
defaultProperties.setDeserializeEntities(true);
return defaultProperties;
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2023-29528
- Severity: CRITICAL
- CVSS Score: 9.0
Description: XCOMMONS-2568: Improve comment handling in HTMLCleaner (#306)
Function: getDefaultCleanerProperties
File: xwiki-commons-core/xwiki-commons-xml/src/main/java/org/xwiki/xml/internal/html/DefaultHTMLCleaner.java
Repository: xwiki/xwiki-commons
Fixed Code:
private CleanerProperties getDefaultCleanerProperties(HTMLCleanerConfiguration configuration)
{
CleanerProperties defaultProperties = new CleanerProperties();
defaultProperties.setOmitUnknownTags(true);
// HTML Cleaner uses the compact notation by default but we don't want that since:
// - it's more work and not required since not compact notation is valid XHTML
// - expanded elements can also be rendered fine in browsers that only support HTML.
defaultProperties.setUseEmptyElementTags(false);
// Wrap script and style content in CDATA blocks
defaultProperties.setUseCdataForScriptAndStyle(true);
// We need this for example to ignore CDATA sections not inside script or style elements.
defaultProperties.setIgnoreQuestAndExclam(true);
// Remove CDATA outside of script and style since according to the spec it has no effect there.
defaultProperties.setOmitCdataOutsideScriptAndStyle(true);
// If the caller has defined NAMESPACE_AWARE configuration property then use it, otherwise use our default.
String param = configuration.getParameters().get(HTMLCleanerConfiguration.NAMESPACES_AWARE);
boolean namespacesAware = (param == null) || Boolean.parseBoolean(param);
defaultProperties.setNamespacesAware(namespacesAware);
// Set Cleaner transformations
defaultProperties.setCleanerTransformations(getDefaultCleanerTransformations(configuration));
// Don't convert special HTML entities (i.e. ô, ‰, ×) with unicode characters they represent.
defaultProperties.setTranslateSpecialEntities(false);
// Use character references rather than entity references if needed (for instance if you need to parse the
// output as XML)
param = configuration.getParameters().get(HTMLCleanerConfiguration.USE_CHARACTER_REFERENCES);
boolean useCharacterReferences = (param != null) && Boolean.parseBoolean(param);
defaultProperties.setTransResCharsToNCR(useCharacterReferences);
// Sets the HTML version from the configuration (by default 4).
defaultProperties.setHtmlVersion(getHTMLVersion(configuration));
// We trim values by default for all attributes but the input value attribute.
// The only way to currently do that is to switch off this flag, and to create a dedicated TagTransformation.
// See TrimAttributeCleanerTransformation for more information.
defaultProperties.setTrimAttributeValues(false);
// This flag should be set to true once https://sourceforge.net/p/htmlcleaner/bugs/221/ is fixed.
defaultProperties.setRecognizeUnicodeChars(false);
param = configuration.getParameters().get(HTMLCleanerConfiguration.TRANSLATE_SPECIAL_ENTITIES);
boolean translateSpecialEntities = (param != null) && Boolean.parseBoolean(param);
defaultProperties.setTranslateSpecialEntities(translateSpecialEntities);
defaultProperties.setDeserializeEntities(true);
// Omit comments in restricted mode to avoid any potential parser confusion.
// Any part of the filtered HTML that contains unfiltered input is potentially dangerous/a candidate for
// parser confusion. Comments, style and script elements seem to be frequently found ingredients in successful
// attacks against good sanitizers. We're already removing style and script elements, so removing comments
// seems like a good defense against future attacks.
defaultProperties.setOmitComments(isRestricted(configuration));
return defaultProperties;
}
|
[
"CWE-79"
] |
CVE-2023-29528
|
CRITICAL
| 9
|
xwiki/xwiki-commons
|
getDefaultCleanerProperties
|
xwiki-commons-core/xwiki-commons-xml/src/main/java/org/xwiki/xml/internal/html/DefaultHTMLCleaner.java
|
8ff1a9d7e5d7b45b690134a537d53dc05cae04ab
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
boolean check(ReliableTopicConfig c1, ReliableTopicConfig c2) {
return c1 == c2 || !(c1 == null || c2 == null)
&& nullSafeEqual(c1.getReadBatchSize(), c2.getReadBatchSize())
&& nullSafeEqual(c1.getName(), c2.getName())
&& nullSafeEqual(c1.isStatisticsEnabled(), c2.isStatisticsEnabled())
&& nullSafeEqual(c1.getMessageListenerConfigs(), c2.getMessageListenerConfigs())
&& nullSafeEqual(c1.getTopicOverloadPolicy(), c2.getTopicOverloadPolicy());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: check
File: hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
check
|
hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void testDeserializationAsInt01() throws Exception
{
Duration value = READER.with(DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS)
.readValue("60");
assertNotNull("The value should not be null.", value);
assertEquals("The value is not correct.", Duration.ofSeconds(60L, 0), value);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: testDeserializationAsInt01
File: datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestDurationDeserialization.java
Repository: FasterXML/jackson-modules-java8
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-1000873
|
MEDIUM
| 4.3
|
FasterXML/jackson-modules-java8
|
testDeserializationAsInt01
|
datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestDurationDeserialization.java
|
ba27ce5909dfb49bcaf753ad3e04ecb980010b0b
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean rowUpdated() throws SQLException {
checkClosed();
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: rowUpdated
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
|
rowUpdated
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
private void getUniqueLinkedEntityReferences(XDOM dom, Map<EntityType, Set<ResourceType>> entityTypes,
Set<EntityReference> references)
{
Set<EntityReference> uniqueLinkedEntityReferences =
getLinkParser().getUniqueLinkedEntityReferences(dom, entityTypes, getDocumentReference());
references.addAll(uniqueLinkedEntityReferences);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUniqueLinkedEntityReferences
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2023-29523
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
getUniqueLinkedEntityReferences
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
0d547181389f7941e53291af940966413823f61c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void dumpHeapFinished(String path) {
mAppProfiler.dumpHeapFinished(path, Binder.getCallingPid());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpHeapFinished
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
|
dumpHeapFinished
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
private synchronized void clearRowBuffer(boolean copyCurrentRow) throws SQLException {
// inserts want an empty array while updates want a copy of the current row
if (copyCurrentRow) {
rowBuffer = castNonNull(thisRow, "thisRow").updateableCopy();
} else {
rowBuffer = new Tuple(fields.length);
}
// clear the updateValues hash map for the next set of updates
HashMap<String, Object> updateValues = this.updateValues;
if (updateValues != null) {
updateValues.clear();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearRowBuffer
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
|
clearRowBuffer
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
private static native long nativeCreate(byte[] data,
int offset,
int size);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nativeCreate
File: core/java/android/content/res/StringBlock.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-415"
] |
CVE-2023-40103
|
HIGH
| 7.8
|
android
|
nativeCreate
|
core/java/android/content/res/StringBlock.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
void conference(final Call call, Call otherCall) {
final String callId = mCallIdMapper.getCallId(call);
final String otherCallId = mCallIdMapper.getCallId(otherCall);
if (callId != null && otherCallId != null && isServiceValid("conference")) {
try {
logOutgoing("conference %s %s", callId, otherCallId);
mServiceInterface.conference(callId, otherCallId,
Log.getExternalSession(TELECOM_ABBREVIATION));
} catch (RemoteException ignored) {
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: conference
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
|
conference
|
src/com/android/server/telecom/ConnectionServiceWrapper.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<RootTaskInfo> getAllRootTaskInfos() {
return mActivityTaskManager.getAllRootTaskInfos();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAllRootTaskInfos
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
|
getAllRootTaskInfos
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public void addArguments( String[] line )
{
for ( int i = 0; i < line.length; i++ )
{
createArgument().setValue( line[i] );
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addArguments
File: src/main/java/org/codehaus/plexus/util/cli/Commandline.java
Repository: codehaus-plexus/plexus-utils
The code follows secure coding practices.
|
[
"CWE-78"
] |
CVE-2017-1000487
|
HIGH
| 7.5
|
codehaus-plexus/plexus-utils
|
addArguments
|
src/main/java/org/codehaus/plexus/util/cli/Commandline.java
|
b38a1b3a4352303e4312b2bb601a0d7ec6e28f41
| 0
|
Analyze the following code function for security vulnerabilities
|
private void notifyAffiliatedProfileTransferOwnershipComplete(int callingUserId) {
final Bundle extras = new Bundle();
extras.putParcelable(Intent.EXTRA_USER, UserHandle.of(callingUserId));
sendDeviceOwnerCommand(
DeviceAdminReceiver.ACTION_AFFILIATED_PROFILE_TRANSFER_OWNERSHIP_COMPLETE, extras);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: notifyAffiliatedProfileTransferOwnershipComplete
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
|
notifyAffiliatedProfileTransferOwnershipComplete
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void removeChannelListener(ChannelListener listener) {
if (listener == null) {
return;
}
ChannelListener.validateListener(listener);
if (this.channelListeners.remove(listener)) {
if (log.isTraceEnabled()) {
log.trace("removeChannelListener({})[{}] removed", this, listener);
}
} else {
if (log.isTraceEnabled()) {
log.trace("removeChannelListener({})[{}] not registered", this, listener);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeChannelListener
File: sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
Repository: apache/mina-sshd
The code follows secure coding practices.
|
[
"CWE-354"
] |
CVE-2023-48795
|
MEDIUM
| 5.9
|
apache/mina-sshd
|
removeChannelListener
|
sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
|
6b0fd46f64bcb75eeeee31d65f10242660aad7c1
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<ValidationError> errors() {
return Collections.unmodifiableList(errors);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: errors
File: web/play-java-forms/src/main/java/play/data/Form.java
Repository: playframework
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-31018
|
MEDIUM
| 5
|
playframework
|
errors
|
web/play-java-forms/src/main/java/play/data/Form.java
|
15393b736df939e35e275af2347155f296c684f2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void moveToFront() {
checkCaller();
// Will bring task to front if it already has a root activity.
final long origId = Binder.clearCallingIdentity();
try {
synchronized (this) {
mStackSupervisor.startActivityFromRecentsInner(mTaskId, null);
}
} finally {
Binder.restoreCallingIdentity(origId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: moveToFront
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
|
moveToFront
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
public final boolean dispatchGesture(@NonNull GestureDescription gesture,
@Nullable GestureResultCallback callback,
@Nullable Handler handler) {
final IAccessibilityServiceConnection connection =
AccessibilityInteractionClient.getInstance().getConnection(
mConnectionId);
if (connection == null) {
return false;
}
List<MotionEvent> events = MotionEventGenerator.getMotionEventsFromGestureDescription(
gesture, 100);
try {
synchronized (mLock) {
mGestureStatusCallbackSequence++;
if (callback != null) {
if (mGestureStatusCallbackInfos == null) {
mGestureStatusCallbackInfos = new SparseArray<>();
}
GestureResultCallbackInfo callbackInfo = new GestureResultCallbackInfo(gesture,
callback, handler);
mGestureStatusCallbackInfos.put(mGestureStatusCallbackSequence, callbackInfo);
}
connection.sendMotionEvents(mGestureStatusCallbackSequence,
new ParceledListSlice<>(events));
}
} catch (RemoteException re) {
throw new RuntimeException(re);
}
return true;
}
|
Vulnerability Classification:
- CWE: CWE-284
- CVE: CVE-2016-3923
- Severity: MEDIUM
- CVSS Score: 4.3
Description: Limit capabilities of a11y gesture dispatch.
Changing the service side to accept descriptions of
motion events, not motion events themselves, so we can
control their creation.
Bug: 30647115
Change-Id: Ia6772a1fc05df91818e3f88959d1e2b4a35fe0cc
(cherry picked from commit a8918f23c712e97fa1dc4911f64827d64fc906e5)
(cherry picked from commit 157f416a3549420bd109dbc4931b437089e22d04)
Function: dispatchGesture
File: core/java/android/accessibilityservice/AccessibilityService.java
Repository: android
Fixed Code:
public final boolean dispatchGesture(@NonNull GestureDescription gesture,
@Nullable GestureResultCallback callback,
@Nullable Handler handler) {
final IAccessibilityServiceConnection connection =
AccessibilityInteractionClient.getInstance().getConnection(
mConnectionId);
if (connection == null) {
return false;
}
List<GestureDescription.GestureStep> steps =
MotionEventGenerator.getGestureStepsFromGestureDescription(gesture, 100);
try {
synchronized (mLock) {
mGestureStatusCallbackSequence++;
if (callback != null) {
if (mGestureStatusCallbackInfos == null) {
mGestureStatusCallbackInfos = new SparseArray<>();
}
GestureResultCallbackInfo callbackInfo = new GestureResultCallbackInfo(gesture,
callback, handler);
mGestureStatusCallbackInfos.put(mGestureStatusCallbackSequence, callbackInfo);
}
connection.sendGesture(mGestureStatusCallbackSequence,
new ParceledListSlice<>(steps));
}
} catch (RemoteException re) {
throw new RuntimeException(re);
}
return true;
}
|
[
"CWE-284"
] |
CVE-2016-3923
|
MEDIUM
| 4.3
|
android
|
dispatchGesture
|
core/java/android/accessibilityservice/AccessibilityService.java
|
5f256310187b4ff2f13a7abb9afed9126facd7bc
| 1
|
Analyze the following code function for security vulnerabilities
|
@PostMapping("/fileUpload")
public String fileUpload(@RequestParam("file") MultipartFile file) throws JsonProcessingException {
if (ConfigConstants.getFileUploadDisable()) {
return new ObjectMapper().writeValueAsString(ReturnResponse.failure("文件传接口已禁用"));
}
// 获取文件名
String fileName = file.getOriginalFilename();
//判断是否为IE浏览器的文件名,IE浏览器下文件名会带有盘符信息
// escaping dangerous characters to prevent XSS
assert fileName != null;
fileName = HtmlUtils.htmlEscape(fileName, StandardCharsets.UTF_8.name());
// Check for Unix-style path
int unixSep = fileName.lastIndexOf('/');
// Check for Windows-style path
int winSep = fileName.lastIndexOf('\\');
// Cut off at latest possible point
int pos = (Math.max(winSep, unixSep));
if (pos != -1) {
fileName = fileName.substring(pos + 1);
}
// 判断是否存在同名文件
if (existsFile(fileName)) {
return new ObjectMapper().writeValueAsString(ReturnResponse.failure("存在同名文件,请先删除原有文件再次上传"));
}
File outFile = new File(fileDir + demoPath);
if (!outFile.exists() && !outFile.mkdirs()) {
logger.error("创建文件夹【{}】失败,请检查目录权限!", fileDir + demoPath);
}
logger.info("上传文件:{}", fileDir + demoPath + fileName);
try (InputStream in = file.getInputStream(); OutputStream out = new FileOutputStream(fileDir + demoPath + fileName)) {
StreamUtils.copy(in, out);
return new ObjectMapper().writeValueAsString(ReturnResponse.success(null));
} catch (IOException e) {
logger.error("文件上传失败", e);
return new ObjectMapper().writeValueAsString(ReturnResponse.failure());
}
}
|
Vulnerability Classification:
- CWE: CWE-22
- CVE: CVE-2022-36593
- Severity: MEDIUM
- CVSS Score: 6.5
Description: Fix #370
Function: fileUpload
File: server/src/main/java/cn/keking/web/controller/FileController.java
Repository: kekingcn/kkFileView
Fixed Code:
@PostMapping("/fileUpload")
public ReturnResponse<Object> fileUpload(@RequestParam("file") MultipartFile file) throws JsonProcessingException {
if (ConfigConstants.getFileUploadDisable()) {
return ReturnResponse.failure("文件传接口已禁用");
}
// 获取文件名
String fileName = file.getOriginalFilename();
//判断是否为IE浏览器的文件名,IE浏览器下文件名会带有盘符信息
// escaping dangerous characters to prevent XSS
assert fileName != null;
fileName = HtmlUtils.htmlEscape(fileName, StandardCharsets.UTF_8.name());
// Check for Unix-style path
int unixSep = fileName.lastIndexOf('/');
// Check for Windows-style path
int winSep = fileName.lastIndexOf('\\');
// Cut off at latest possible point
int pos = (Math.max(winSep, unixSep));
if (pos != -1) {
fileName = fileName.substring(pos + 1);
}
// 判断是否存在同名文件
if (existsFile(fileName)) {
return ReturnResponse.failure("存在同名文件,请先删除原有文件再次上传");
}
File outFile = new File(fileDir + demoPath);
if (!outFile.exists() && !outFile.mkdirs()) {
logger.error("创建文件夹【{}】失败,请检查目录权限!", fileDir + demoPath);
}
logger.info("上传文件:{}", fileDir + demoPath + fileName);
try (InputStream in = file.getInputStream(); OutputStream out = new FileOutputStream(fileDir + demoPath + fileName)) {
StreamUtils.copy(in, out);
return ReturnResponse.success(null);
} catch (IOException e) {
logger.error("文件上传失败", e);
return ReturnResponse.failure();
}
}
|
[
"CWE-22"
] |
CVE-2022-36593
|
MEDIUM
| 6.5
|
kekingcn/kkFileView
|
fileUpload
|
server/src/main/java/cn/keking/web/controller/FileController.java
|
86960e38135f551e8343d44caf4bac0a66234657
| 1
|
Analyze the following code function for security vulnerabilities
|
private boolean isValidEmail( final String value )
{
return value != null && value.chars().filter( ch -> ch == '@' ).count() == 1;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isValidEmail
File: modules/lib/lib-auth/src/main/java/com/enonic/xp/lib/auth/LoginHandler.java
Repository: enonic/xp
The code follows secure coding practices.
|
[
"CWE-384"
] |
CVE-2024-23679
|
CRITICAL
| 9.8
|
enonic/xp
|
isValidEmail
|
modules/lib/lib-auth/src/main/java/com/enonic/xp/lib/auth/LoginHandler.java
|
0189975691e9e6407a9fee87006f730e84f734ff
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String getHashType() {
String hashType = UtilProperties.getPropertyValue("security", "password.encrypt.hash.type");
if (UtilValidate.isEmpty(hashType)) {
Debug.logWarning("Password encrypt hash type is not specified in security.properties, use SHA", module);
hashType = "SHA";
}
return hashType;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getHashType
File: framework/common/src/main/java/org/apache/ofbiz/common/login/LoginServices.java
Repository: apache/ofbiz-framework
The code follows secure coding practices.
|
[
"CWE-209"
] |
CVE-2021-25958
|
MEDIUM
| 5
|
apache/ofbiz-framework
|
getHashType
|
framework/common/src/main/java/org/apache/ofbiz/common/login/LoginServices.java
|
2f5b8d33e32c4d9a48243cf9e503236acd5aec5c
| 0
|
Analyze the following code function for security vulnerabilities
|
static void copyClasspathResourceToFile(String classpath, File dir) {
InputStream in = null;
FileOutputStream fos = null;
try {
in = SearchServiceImpl.class.getResourceAsStream(classpath);
File file = new File(dir, FilenameUtils.getName(classpath));
logger.debug("copying " + classpath + " to " + file);
fos = new FileOutputStream(file);
IOUtils.copy(in, fos);
} catch (IOException e) {
throw new RuntimeException("Error copying solr classpath resource to the filesystem", e);
} finally {
IOUtils.closeQuietly(in);
IOUtils.closeQuietly(fos);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: copyClasspathResourceToFile
File: modules/search-service-impl/src/main/java/org/opencastproject/search/impl/SearchServiceImpl.java
Repository: opencast
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-21318
|
MEDIUM
| 5.5
|
opencast
|
copyClasspathResourceToFile
|
modules/search-service-impl/src/main/java/org/opencastproject/search/impl/SearchServiceImpl.java
|
b18c6a7f81f08ed14884592a6c14c9ab611ad450
| 0
|
Analyze the following code function for security vulnerabilities
|
private static Getter<InputStream> fis(Getter<File> file) {
return context -> {
try {
return new FileInputStream(file.get(context));
} catch (FileNotFoundException e) {
return null;
}
};
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fis
File: APDE/src/main/java/com/calsignlabs/apde/build/dag/CopyBuildTask.java
Repository: Calsign/APDE
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-36628
|
CRITICAL
| 9.8
|
Calsign/APDE
|
fis
|
APDE/src/main/java/com/calsignlabs/apde/build/dag/CopyBuildTask.java
|
c6d64cbe465348c1bfd211122d89e3117afadecf
| 0
|
Analyze the following code function for security vulnerabilities
|
@WebMethod(name="heapdump.hprof")
public void doHeapDump(StaplerRequest req, StaplerResponse rsp) throws IOException, InterruptedException {
owner.checkPermission(Jenkins.ADMINISTER);
rsp.setContentType("application/octet-stream");
FilePath dump = obtain();
try {
dump.copyTo(rsp.getCompressedOutputStream(req));
} finally {
dump.delete();
}
}
|
Vulnerability Classification:
- CWE: CWE-264
- CVE: CVE-2014-2068
- Severity: LOW
- CVSS Score: 3.5
Description: [FIXED SECURITY-73] Require RUN_SCRIPTS for /heapDump.
Function: doHeapDump
File: core/src/main/java/hudson/util/RemotingDiagnostics.java
Repository: jenkinsci/jenkins
Fixed Code:
@WebMethod(name="heapdump.hprof")
public void doHeapDump(StaplerRequest req, StaplerResponse rsp) throws IOException, InterruptedException {
owner.checkPermission(Jenkins.RUN_SCRIPTS);
rsp.setContentType("application/octet-stream");
FilePath dump = obtain();
try {
dump.copyTo(rsp.getCompressedOutputStream(req));
} finally {
dump.delete();
}
}
|
[
"CWE-264"
] |
CVE-2014-2068
|
LOW
| 3.5
|
jenkinsci/jenkins
|
doHeapDump
|
core/src/main/java/hudson/util/RemotingDiagnostics.java
|
0530a6645aac10fec005614211660e98db44b5eb
| 1
|
Analyze the following code function for security vulnerabilities
|
protected Connection getConnection() throws SQLException {
try {
return datasource.getConnection();
} catch (SQLException e) {
LOGGER.log(Level.SEVERE, "Connection failed", e);
throw e;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getConnection
File: modules/library/referencing/src/main/java/org/geotools/referencing/factory/AbstractEpsgMediator.java
Repository: geotools
The code follows secure coding practices.
|
[
"CWE-917"
] |
CVE-2022-24818
|
HIGH
| 7.5
|
geotools
|
getConnection
|
modules/library/referencing/src/main/java/org/geotools/referencing/factory/AbstractEpsgMediator.java
|
4f70fa3234391dd0cda883a20ab0ec75688cba49
| 0
|
Analyze the following code function for security vulnerabilities
|
private void dumpJson(PrintWriter pw, DumpFilter filter) {
JSONObject dump = new JSONObject();
try {
dump.put("service", "Notification Manager");
dump.put("bans", mRankingHelper.dumpBansJson(filter));
dump.put("ranking", mRankingHelper.dumpJson(filter));
dump.put("stats", mUsageStats.dumpJson(filter));
} catch (JSONException e) {
e.printStackTrace();
}
pw.println(dump);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpJson
File: services/core/java/com/android/server/notification/NotificationManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3884
|
MEDIUM
| 4.3
|
android
|
dumpJson
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
@GuardedBy("getLockObject()")
private void updateProfileOffDeadlineNotificationLocked(
int profileUserId, ActiveAdmin profileOwner, int notificationState) {
if (notificationState == PROFILE_OFF_NOTIFICATION_NONE) {
mInjector.getNotificationManager().cancel(SystemMessage.NOTE_PERSONAL_APPS_SUSPENDED);
return;
}
final Intent intent = new Intent(ACTION_TURN_PROFILE_ON_NOTIFICATION);
intent.setPackage(mContext.getPackageName());
intent.putExtra(Intent.EXTRA_USER_HANDLE, profileUserId);
// Simple notification action button clicks are immutable
final PendingIntent pendingIntent = mInjector.pendingIntentGetBroadcast(mContext,
0 /* requestCode */, intent,
PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE);
final Notification.Action turnProfileOnButton = new Notification.Action.Builder(
/* icon= */ null, getPersonalAppSuspensionButtonText(), pendingIntent).build();
final String text;
final boolean ongoing;
if (notificationState == PROFILE_OFF_NOTIFICATION_WARNING) {
// Round to the closest integer number of days.
final int maxDays = (int)
((profileOwner.mProfileMaximumTimeOffMillis + MS_PER_DAY / 2) / MS_PER_DAY);
final String date = DateUtils.formatDateTime(
mContext, profileOwner.mProfileOffDeadline, DateUtils.FORMAT_SHOW_DATE);
final String time = DateUtils.formatDateTime(
mContext, profileOwner.mProfileOffDeadline, DateUtils.FORMAT_SHOW_TIME);
text = getPersonalAppSuspensionSoonText(date, time, maxDays);
ongoing = false;
} else {
text = getPersonalAppSuspensionText();
ongoing = true;
}
final int color = mContext.getColor(R.color.personal_apps_suspension_notification_color);
final Bundle extras = new Bundle();
// TODO: Create a separate string for this.
extras.putString(
Notification.EXTRA_SUBSTITUTE_APP_NAME, getWorkProfileContentDescription());
final Notification notification =
new Notification.Builder(mContext, SystemNotificationChannels.DEVICE_ADMIN)
.setSmallIcon(R.drawable.ic_corp_badge_no_background)
.setOngoing(ongoing)
.setAutoCancel(false)
.setContentTitle(getPersonalAppSuspensionTitle())
.setContentText(text)
.setStyle(new Notification.BigTextStyle().bigText(text))
.setColor(color)
.addAction(turnProfileOnButton)
.addExtras(extras)
.build();
mHandler.post(() -> mInjector.getNotificationManager().notifyAsUser(
null, SystemMessage.NOTE_PERSONAL_APPS_SUSPENDED, notification,
UserHandle.of(getProfileParentId(profileUserId))));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateProfileOffDeadlineNotificationLocked
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
updateProfileOffDeadlineNotificationLocked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.