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
|
private long countLinks(long docId, XWikiContext inputxcontext, boolean bTransaction) throws XWikiException
{
return executeRead(inputxcontext, session -> {
try {
Query<Long> query =
session.createQuery("select count(*) from XWikiLink as link where link.id.docId = :docId")
.setParameter("docId", docId);
return query.getSingleResult();
} catch (Exception e) {
throw new XWikiException(XWikiException.MODULE_XWIKI_STORE,
XWikiException.ERROR_XWIKI_STORE_HIBERNATE_LOADING_BACKLINKS, "Exception while count backlinks", e);
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: countLinks
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-459"
] |
CVE-2023-36468
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
countLinks
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
|
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onFailedIncomingCall(Call call) {
setCallState(call, CallState.DISCONNECTED);
call.removeListener(this);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onFailedIncomingCall
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
|
onFailedIncomingCall
|
src/com/android/server/telecom/CallsManager.java
|
a06c9a4aef69ae27b951523cf72bf72412bf48fa
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean tryToMoveFocus(int direction) {
View focus = mContainerView.focusSearch(direction);
return focus != null && focus != mContainerView && focus.requestFocus();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: tryToMoveFocus
File: android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
tryToMoveFocus
|
android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
@POST
@Path("structure/{nodeId}")
@Operation(summary = "Update structure element", description = "This updates a Structure Element onto a given course")
@ApiResponse(responseCode = "200", description = "The course node metadatas", content = {
@Content(mediaType = "application/json", schema = @Schema(implementation = CourseNodeVO.class)),
@Content(mediaType = "application/xml", schema = @Schema(implementation = CourseNodeVO.class)) })
@ApiResponse(responseCode = "401", description = "The roles of the authenticated user are not sufficient")
@ApiResponse(responseCode = "404", description = "The course or parentNode not found")
@Consumes({MediaType.APPLICATION_FORM_URLENCODED, MediaType.MULTIPART_FORM_DATA})
@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
public Response updateStructure(@PathParam("courseId") Long courseId, @PathParam("nodeId") String nodeId,
@Context HttpServletRequest request) {
InputStream in = null;
MultipartReader reader = null;
try {
reader = new MultipartReader(request);
String shortTitle = reader.getValue("shortTitle");
String longTitle = reader.getValue("longTitle");
String objectives = reader.getValue("objectives");
String visibilityExpertRules = reader.getValue("visibilityExpertRules");
String accessExpertRules = reader.getValue("accessExpertRules");
String displayType = reader.getValue("displayType", STCourseNodeEditController.CONFIG_VALUE_DISPLAY_TOC);
String filename = reader.getValue("filename", "attachment");
if(reader.getFile() != null) {
in = new FileInputStream(reader.getFile());
}
CustomConfigDelegate config = new StructureFullConfig(displayType, in, filename);
return update(courseId, nodeId, shortTitle, longTitle, objectives, visibilityExpertRules, accessExpertRules, config, request);
} catch (Exception e) {
log.error("", e);
return Response.serverError().status(Status.INTERNAL_SERVER_ERROR).build();
} finally {
MultipartReader.closeQuietly(reader);
IOUtils.closeQuietly(in);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateStructure
File: src/main/java/org/olat/restapi/repository/course/CourseElementWebService.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-41242
|
HIGH
| 7.9
|
OpenOLAT
|
updateStructure
|
src/main/java/org/olat/restapi/repository/course/CourseElementWebService.java
|
c450df7d7ffe6afde39ebca6da9136f1caa16ec4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean onTransact(int code, Parcel data, Parcel reply, int flags)
throws RemoteException {
try {
return super.onTransact(code, data, reply, flags);
} catch (RuntimeException e) {
// The content service only throws security exceptions, so let's
// log all others.
if (!(e instanceof SecurityException)) {
Slog.wtf(TAG, "Content Service Crash", e);
}
throw e;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onTransact
File: services/core/java/com/android/server/content/ContentService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2426
|
MEDIUM
| 4.3
|
android
|
onTransact
|
services/core/java/com/android/server/content/ContentService.java
|
63363af721650e426db5b0bdfb8b2d4fe36abdb0
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String render(XWikiContext context) throws XWikiException
{
try {
XWikiDocument editedDocument = prepareEditedDocument(context);
maybeLockDocument(editedDocument, context);
} catch (XWikiException e) {
if (e.getCode() == XWikiException.ERROR_XWIKI_APP_DOCUMENT_NOT_EMPTY) {
context.put("exception", e);
return "docalreadyexists";
} else {
throw e;
}
}
// Make sure object property fields are displayed in edit mode.
// See XWikiDocument#display(String, BaseObject, XWikiContext)
// TODO: Revisit the display mode after the inline action is removed. Is the display mode still needed when
// there is only one edit action?
context.put("display", "edit");
return "edit";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: render
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/EditAction.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2023-46242
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
render
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/EditAction.java
|
cf8eb861998ea423c3645d2e5e974420b0e882be
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean userExists(int userId) {
if (userId == 0) {
return true;
}
UserManagerService ums = getUserManagerLocked();
return ums != null ? (ums.getUserInfo(userId) != null) : false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: userExists
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
|
userExists
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
@GuardedBy("this")
final ProcessRecord newProcessRecordLocked(ApplicationInfo info, String customProcess,
boolean isolated, int isolatedUid) {
String proc = customProcess != null ? customProcess : info.processName;
BatteryStatsImpl stats = mBatteryStatsService.getActiveStatistics();
final int userId = UserHandle.getUserId(info.uid);
int uid = info.uid;
if (isolated) {
if (isolatedUid == 0) {
int stepsLeft = LAST_ISOLATED_UID - FIRST_ISOLATED_UID + 1;
while (true) {
if (mNextIsolatedProcessUid < FIRST_ISOLATED_UID
|| mNextIsolatedProcessUid > LAST_ISOLATED_UID) {
mNextIsolatedProcessUid = FIRST_ISOLATED_UID;
}
uid = UserHandle.getUid(userId, mNextIsolatedProcessUid);
mNextIsolatedProcessUid++;
if (mIsolatedProcesses.indexOfKey(uid) < 0) {
// No process for this uid, use it.
break;
}
stepsLeft--;
if (stepsLeft <= 0) {
return null;
}
}
} else {
// Special case for startIsolatedProcess (internal only), where
// the uid of the isolated process is specified by the caller.
uid = isolatedUid;
}
getPackageManagerInternalLocked().addIsolatedUid(uid, info.uid);
// Register the isolated UID with this application so BatteryStats knows to
// attribute resource usage to the application.
//
// NOTE: This is done here before addProcessNameLocked, which will tell BatteryStats
// about the process state of the isolated UID *before* it is registered with the
// owning application.
mBatteryStatsService.addIsolatedUid(uid, info.uid);
}
final ProcessRecord r = new ProcessRecord(this, stats, info, proc, uid);
if (!mBooted && !mBooting
&& userId == UserHandle.USER_SYSTEM
&& (info.flags & PERSISTENT_MASK) == PERSISTENT_MASK) {
// The system process is initialized to SCHED_GROUP_DEFAULT in init.rc.
r.curSchedGroup = ProcessList.SCHED_GROUP_DEFAULT;
r.setSchedGroup = ProcessList.SCHED_GROUP_DEFAULT;
r.persistent = true;
r.maxAdj = ProcessList.PERSISTENT_PROC_ADJ;
}
if (isolated && isolatedUid != 0) {
// Special case for startIsolatedProcess (internal only) - assume the process
// is required by the system server to prevent it being killed.
r.maxAdj = ProcessList.PERSISTENT_SERVICE_ADJ;
}
addProcessNameLocked(r);
return r;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: newProcessRecordLocked
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2018-9492
|
HIGH
| 7.2
|
android
|
newProcessRecordLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setXMLFilter(final XMLFilter xmlFilter) {
saxXMLFilter = xmlFilter;
engine = null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setXMLFilter
File: core/src/java/org/jdom2/input/SAXBuilder.java
Repository: hunterhacker/jdom
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-33813
|
MEDIUM
| 5
|
hunterhacker/jdom
|
setXMLFilter
|
core/src/java/org/jdom2/input/SAXBuilder.java
|
bd3ab78370098491911d7fe9d7a43b97144a234e
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void dataConnectionConfiguration(final XmlGenerator gen, final Config config) {
for (DataConnectionConfig dataConnectionConfig : config.getDataConnectionConfigs().values()) {
gen.open(
"data-connection",
"name",
dataConnectionConfig.getName()
)
.node("type", dataConnectionConfig.getType())
.node("shared", dataConnectionConfig.isShared())
.appendProperties(dataConnectionConfig.getProperties())
.close();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dataConnectionConfiguration
File: hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-522"
] |
CVE-2023-33264
|
MEDIUM
| 4.3
|
hazelcast
|
dataConnectionConfiguration
|
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
|
80a502d53cc48bf895711ab55f95e3a51e344ac1
| 0
|
Analyze the following code function for security vulnerabilities
|
public long getPid()
{
if ( pid == -1 )
{
pid = Long.parseLong( String.valueOf( System.currentTimeMillis() ) );
}
return pid;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPid
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
|
getPid
|
src/main/java/org/codehaus/plexus/util/cli/Commandline.java
|
b38a1b3a4352303e4312b2bb601a0d7ec6e28f41
| 0
|
Analyze the following code function for security vulnerabilities
|
private List<String> getTypesManagedByCaller(int callingUid, int userId) {
return getTypesForCaller(callingUid, userId, false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTypesManagedByCaller
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
|
getTypesManagedByCaller
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
public static User getLoggedInUser(Request req) {
// Get email address from cookie
Cookie emailCookie = req.getCookie(Cookie.EMAIL_COOKIE_NAME);
if (emailCookie != null && !emailCookie.hasExpired()) {
String email = emailCookie.getValue();
// Check user against login whitelist, if it exists (in case whitelist has changed)
if (GribbitServer.loginWhitelistChecker == null
|| GribbitServer.loginWhitelistChecker.allowUserToLogin(email)) {
// Get session cookie
Cookie sessionCookie = req.getCookie(Cookie.SESSION_COOKIE_NAME);
if (sessionCookie != null && !sessionCookie.hasExpired()) {
try {
// Look up email address in database, and check session cookie against session token stored in
// the database for that email address
User user = validateTok(email, sessionCookie.getValue(), TokenType.SESSION);
// If no exception thrown, user is logged in and auth token is valid
return user;
} catch (Exception e) {
}
}
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLoggedInUser
File: src/gribbit/auth/User.java
Repository: lukehutch/gribbit
The code follows secure coding practices.
|
[
"CWE-346"
] |
CVE-2014-125071
|
MEDIUM
| 5.2
|
lukehutch/gribbit
|
getLoggedInUser
|
src/gribbit/auth/User.java
|
620418df247aebda3dd4be1dda10fe229ea505dd
| 0
|
Analyze the following code function for security vulnerabilities
|
public JobInstanceDao getBuildInstanceDao() {
return jobInstanceDao;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getBuildInstanceDao
File: server/src/test-shared/java/com/thoughtworks/go/server/dao/DatabaseAccessHelper.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-697"
] |
CVE-2022-39308
|
MEDIUM
| 5.9
|
gocd
|
getBuildInstanceDao
|
server/src/test-shared/java/com/thoughtworks/go/server/dao/DatabaseAccessHelper.java
|
236d4baf92e6607f2841c151c855adcc477238b8
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void execute(String url, String proxyHost, int proxyPort, String proxyUsername, String proxyPassword,
String accessToken, String orgName, String moduleName, String version, Path baloPath) {
initializeSsl();
HttpURLConnection conn = createHttpUrlConnection(convertToUrl(url), proxyHost, proxyPort, proxyUsername,
proxyPassword);
conn.setInstanceFollowRedirects(false);
setRequestMethod(conn, Utils.RequestMethod.POST);
// Set headers
conn.setRequestProperty(HttpHeaders.AUTHORIZATION, "Bearer " + accessToken);
conn.setRequestProperty(PUSH_ORGANIZATION, orgName);
conn.setRequestProperty(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_OCTET_STREAM);
conn.setDoOutput(true);
conn.setChunkedStreamingMode(BUFFER_SIZE);
try (DataOutputStream outputStream = new DataOutputStream(conn.getOutputStream())) {
// Send balo content by 1 kb chunks
byte[] buffer = new byte[BUFFER_SIZE];
int count;
try (ProgressBar progressBar = new ProgressBar(
orgName + "/" + moduleName + ":" + version + " [project repo -> central]",
getTotalFileSizeInKB(baloPath), 1000, outStream, ProgressBarStyle.ASCII, " KB", 1);
FileInputStream fis = new FileInputStream(baloPath.toFile())) {
while ((count = fis.read(buffer)) > 0) {
outputStream.write(buffer, 0, count);
outputStream.flush();
progressBar.stepBy((long) NO_OF_BYTES);
}
}
} catch (IOException e) {
throw ErrorUtil.createCommandException("error occurred while uploading balo to central: " + e.getMessage());
}
handleResponse(conn, orgName, moduleName, version);
Authenticator.setDefault(null);
}
|
Vulnerability Classification:
- CWE: CWE-306
- CVE: CVE-2021-32700
- Severity: MEDIUM
- CVSS Score: 5.8
Description: Fix central connection
Function: execute
File: cli/ballerina-cli-module/src/main/java/org/ballerinalang/cli/module/Push.java
Repository: ballerina-platform/ballerina-lang
Fixed Code:
public static void execute(String url, String proxyHost, int proxyPort, String proxyUsername, String proxyPassword,
String accessToken, String orgName, String moduleName, String version, Path baloPath) {
HttpsURLConnection conn = createHttpsUrlConnection(convertToUrl(url), proxyHost, proxyPort, proxyUsername,
proxyPassword);
conn.setInstanceFollowRedirects(false);
setRequestMethod(conn, Utils.RequestMethod.POST);
// Set headers
conn.setRequestProperty(HttpHeaders.AUTHORIZATION, "Bearer " + accessToken);
conn.setRequestProperty(PUSH_ORGANIZATION, orgName);
conn.setRequestProperty(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_OCTET_STREAM);
conn.setDoOutput(true);
conn.setChunkedStreamingMode(BUFFER_SIZE);
try (DataOutputStream outputStream = new DataOutputStream(conn.getOutputStream())) {
// Send balo content by 1 kb chunks
byte[] buffer = new byte[BUFFER_SIZE];
int count;
try (ProgressBar progressBar = new ProgressBar(
orgName + "/" + moduleName + ":" + version + " [project repo -> central]",
getTotalFileSizeInKB(baloPath), 1000, outStream, ProgressBarStyle.ASCII, " KB", 1);
FileInputStream fis = new FileInputStream(baloPath.toFile())) {
while ((count = fis.read(buffer)) > 0) {
outputStream.write(buffer, 0, count);
outputStream.flush();
progressBar.stepBy((long) NO_OF_BYTES);
}
}
} catch (IOException e) {
throw ErrorUtil.createCommandException("error occurred while uploading balo to central: " + e.getMessage());
}
handleResponse(conn, orgName, moduleName, version);
Authenticator.setDefault(null);
}
|
[
"CWE-306"
] |
CVE-2021-32700
|
MEDIUM
| 5.8
|
ballerina-platform/ballerina-lang
|
execute
|
cli/ballerina-cli-module/src/main/java/org/ballerinalang/cli/module/Push.java
|
4609ffee1744ecd16aac09303b1783bf0a525816
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public String toString() {
return "PolicyAttribute [name=" + name + ", value=" + value + ", descriptor=" + descriptor + "]";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toString
File: base/common/src/main/java/com/netscape/certsrv/profile/ProfileAttribute.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
toString
|
base/common/src/main/java/com/netscape/certsrv/profile/ProfileAttribute.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void convert(PGStream stream, Properties info)
throws PSQLException, IOException {
LOGGER.log(Level.FINE, "converting regular socket connection to ssl");
SSLSocketFactory factory = SocketFactoryFactory.getSslSocketFactory(info);
SSLSocket newConnection;
try {
newConnection = (SSLSocket) factory.createSocket(stream.getSocket(),
stream.getHostSpec().getHost(), stream.getHostSpec().getPort(), true);
// We must invoke manually, otherwise the exceptions are hidden
newConnection.setUseClientMode(true);
newConnection.startHandshake();
} catch (IOException ex) {
throw new PSQLException(GT.tr("SSL error: {0}", ex.getMessage()),
PSQLState.CONNECTION_FAILURE, ex);
}
if (factory instanceof LibPQFactory) { // throw any KeyManager exception
((LibPQFactory) factory).throwKeyManagerException();
}
SslMode sslMode = SslMode.of(info);
if (sslMode.verifyPeerName()) {
verifyPeerName(stream, info, newConnection);
}
stream.changeSocket(newConnection);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: convert
File: pgjdbc/src/main/java/org/postgresql/ssl/MakeSSL.java
Repository: pgjdbc
The code follows secure coding practices.
|
[
"CWE-665"
] |
CVE-2022-21724
|
HIGH
| 7.5
|
pgjdbc
|
convert
|
pgjdbc/src/main/java/org/postgresql/ssl/MakeSSL.java
|
f4d0ed69c0b3aae8531d83d6af4c57f22312c813
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean _isUserScheduledForRole(final User user, final String roleid, final Date time) throws IOException {
if (roleid == null) throw new NullPointerException("roleid is null");
return m_groupManager.isUserScheduledForRole(user.getUserId(), roleid, time);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _isUserScheduledForRole
File: opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
Repository: OpenNMS/opennms
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2021-25931
|
MEDIUM
| 6.8
|
OpenNMS/opennms
|
_isUserScheduledForRole
|
opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
|
607151ea8f90212a3fb37c977fa57c7d58d26a84
| 0
|
Analyze the following code function for security vulnerabilities
|
private void processHandledCount(long handledCount) throws StreamManagementCounterError {
long ackedStanzasCount = SMUtils.calculateDelta(handledCount, serverHandledStanzasCount);
final List<Stanza> ackedStanzas = new ArrayList<Stanza>(
ackedStanzasCount <= Integer.MAX_VALUE ? (int) ackedStanzasCount
: Integer.MAX_VALUE);
for (long i = 0; i < ackedStanzasCount; i++) {
Stanza ackedStanza = unacknowledgedStanzas.poll();
// If the server ack'ed a stanza, then it must be in the
// unacknowledged stanza queue. There can be no exception.
if (ackedStanza == null) {
throw new StreamManagementCounterError(handledCount, serverHandledStanzasCount,
ackedStanzasCount, ackedStanzas);
}
ackedStanzas.add(ackedStanza);
}
boolean atLeastOneStanzaAcknowledgedListener = false;
if (!stanzaAcknowledgedListeners.isEmpty()) {
// If stanzaAcknowledgedListeners is not empty, the we have at least one
atLeastOneStanzaAcknowledgedListener = true;
}
else {
// Otherwise we look for a matching id in the stanza *id* acknowledged listeners
for (Stanza ackedStanza : ackedStanzas) {
String id = ackedStanza.getStanzaId();
if (id != null && stanzaIdAcknowledgedListeners.containsKey(id)) {
atLeastOneStanzaAcknowledgedListener = true;
break;
}
}
}
// Only spawn a new thread if there is a chance that some listener is invoked
if (atLeastOneStanzaAcknowledgedListener) {
asyncGo(new Runnable() {
@Override
public void run() {
for (Stanza ackedStanza : ackedStanzas) {
for (StanzaListener listener : stanzaAcknowledgedListeners) {
try {
listener.processPacket(ackedStanza);
}
catch (InterruptedException | NotConnectedException e) {
LOGGER.log(Level.FINER, "Received exception", e);
}
}
String id = ackedStanza.getStanzaId();
if (StringUtils.isNullOrEmpty(id)) {
continue;
}
StanzaListener listener = stanzaIdAcknowledgedListeners.remove(id);
if (listener != null) {
try {
listener.processPacket(ackedStanza);
}
catch (InterruptedException | NotConnectedException e) {
LOGGER.log(Level.FINER, "Received exception", e);
}
}
}
}
});
}
serverHandledStanzasCount = handledCount;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: processHandledCount
File: smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
Repository: igniterealtime/Smack
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2016-10027
|
MEDIUM
| 4.3
|
igniterealtime/Smack
|
processHandledCount
|
smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
|
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isCharged() {
return status == BATTERY_STATUS_FULL || level >= 100;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isCharged
File: packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
isCharged
|
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public SerializationServiceBuilder setPortableVersion(int portableVersion) {
if (portableVersion < 0) {
throw new IllegalArgumentException("Portable Version cannot be negative!");
}
this.portableVersion = portableVersion;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setPortableVersion
File: hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/DefaultSerializationServiceBuilder.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
setPortableVersion
|
hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/DefaultSerializationServiceBuilder.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setSpec(PyTorchJobSpec spec) {
this.spec = spec;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSpec
File: submarine-server/server-submitter/submitter-k8s/src/main/java/org/apache/submarine/server/submitter/k8s/model/pytorchjob/PyTorchJob.java
Repository: apache/submarine
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2023-46302
|
CRITICAL
| 9.8
|
apache/submarine
|
setSpec
|
submarine-server/server-submitter/submitter-k8s/src/main/java/org/apache/submarine/server/submitter/k8s/model/pytorchjob/PyTorchJob.java
|
ed5ad3b824ba388259e0d1ea137d7fca5f0c288e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int[] getRunningUserIds() {
if (checkCallingPermission(INTERACT_ACROSS_USERS)
!= PackageManager.PERMISSION_GRANTED) {
String msg = "Permission Denial: isUserRunning() from pid="
+ Binder.getCallingPid()
+ ", uid=" + Binder.getCallingUid()
+ " requires " + INTERACT_ACROSS_USERS;
Slog.w(TAG, msg);
throw new SecurityException(msg);
}
return mUserController.getStartedUserArray();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRunningUserIds
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2018-9492
|
HIGH
| 7.2
|
android
|
getRunningUserIds
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void shutdown(boolean confirm) {
ShutdownThread.shutdown(mContext, confirm);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: shutdown
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
|
shutdown
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void setDigesterName() {
digesterName = SQLFactory.getInstance().DAO_ODM_EXTRACT;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDigesterName
File: core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
Repository: OpenClinica
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-24831
|
HIGH
| 7.5
|
OpenClinica
|
setDigesterName
|
core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
|
b152cc63019230c9973965a98e4386ea5322c18f
| 0
|
Analyze the following code function for security vulnerabilities
|
@UnstableApi
public ServerBuilder requestAutoAbortDelayMillis(long delayMillis) {
virtualHostTemplate.requestAutoAbortDelayMillis(delayMillis);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: requestAutoAbortDelayMillis
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
|
requestAutoAbortDelayMillis
|
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
|
df7f85824a62e997b910b5d6194a3335841065fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public Map<String, String> getServerVariables() {
return serverVariables;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getServerVariables
File: samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
getServerVariables
|
samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
private native boolean cancelDiscoveryNative();
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cancelDiscoveryNative
File: src/com/android/bluetooth/btservice/AdapterService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-362",
"CWE-20"
] |
CVE-2016-3760
|
MEDIUM
| 5.4
|
android
|
cancelDiscoveryNative
|
src/com/android/bluetooth/btservice/AdapterService.java
|
122feb9a0b04290f55183ff2f0384c6c53756bd8
| 0
|
Analyze the following code function for security vulnerabilities
|
private int getMaxBytesPerPackageForType(int type) {
switch (type) {
case SETTINGS_TYPE_CONFIG:
case SETTINGS_TYPE_GLOBAL:
case SETTINGS_TYPE_SECURE:
case SETTINGS_TYPE_SSAID: {
return SettingsState.MAX_BYTES_PER_APP_PACKAGE_UNLIMITED;
}
default: {
return SettingsState.MAX_BYTES_PER_APP_PACKAGE_LIMITED;
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMaxBytesPerPackageForType
File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40117
|
HIGH
| 7.8
|
android
|
getMaxBytesPerPackageForType
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
ff86ff28cf82124f8e65833a2dd8c319aea08945
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void reportKeyguardDismissed(int userHandle) {
Preconditions.checkArgumentNonnegative(userHandle, "Invalid userId");
final CallerIdentity caller = getCallerIdentity();
Preconditions.checkCallAuthorization(hasFullCrossUsersPermission(caller, userHandle));
Preconditions.checkCallAuthorization(hasCallingOrSelfPermission(BIND_DEVICE_ADMIN));
if (mInjector.securityLogIsLoggingEnabled()) {
SecurityLog.writeEvent(SecurityLog.TAG_KEYGUARD_DISMISSED);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: reportKeyguardDismissed
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
|
reportKeyguardDismissed
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String makeQueryString(final HttpServletRequest request, final Map<String,Object> additions) {
return (makeQueryString(request, additions, EMPTY_STRING_ARRAY));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: makeQueryString
File: opennms-web-api/src/main/java/org/opennms/web/api/Util.java
Repository: OpenNMS/opennms
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-0869
|
MEDIUM
| 6.1
|
OpenNMS/opennms
|
makeQueryString
|
opennms-web-api/src/main/java/org/opennms/web/api/Util.java
|
66b4ba96a18b9952f25a350bbccc2a7e206238d1
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean triggerDevicePolicyEngineMigration(boolean forceMigration) {
Preconditions.checkCallAuthorization(
hasCallingOrSelfPermission(MANAGE_PROFILE_AND_DEVICE_OWNERS));
return mInjector.binderWithCleanCallingIdentity(() -> {
boolean canForceMigration = forceMigration && !hasNonTestOnlyActiveAdmins();
if (!canForceMigration && !shouldMigrateToDevicePolicyEngine()) {
return false;
}
return migratePoliciesToDevicePolicyEngine();
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: triggerDevicePolicyEngineMigration
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
|
triggerDevicePolicyEngineMigration
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@UnsupportedAppUsage
public @NonNull InputStream openNonAsset(int cookie, @NonNull String fileName, int accessMode)
throws IOException {
Objects.requireNonNull(fileName, "fileName");
synchronized (this) {
ensureOpenLocked();
final long asset = nativeOpenNonAsset(mObject, cookie, fileName, accessMode);
if (asset == 0) {
throw new FileNotFoundException("Asset absolute file: " + fileName);
}
final AssetInputStream assetInputStream = new AssetInputStream(asset);
incRefsLocked(assetInputStream.hashCode());
return assetInputStream;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: openNonAsset
File: core/java/android/content/res/AssetManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-415"
] |
CVE-2023-40103
|
HIGH
| 7.8
|
android
|
openNonAsset
|
core/java/android/content/res/AssetManager.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getServerVersion() {
return serverID == null ? null : serverID.substring(8);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getServerVersion
File: src/main/java/net/schmizz/sshj/transport/TransportImpl.java
Repository: hierynomus/sshj
The code follows secure coding practices.
|
[
"CWE-354"
] |
CVE-2023-48795
|
MEDIUM
| 5.9
|
hierynomus/sshj
|
getServerVersion
|
src/main/java/net/schmizz/sshj/transport/TransportImpl.java
|
94fcc960e0fb198ddec0f7efc53f95ac627fe083
| 0
|
Analyze the following code function for security vulnerabilities
|
private void addChatMessageToDB(int direction, String JID,
String message, int delivery_status, long ts, String packetID) {
String[] tJID = {JID, ""};
addChatMessageToDB(direction, tJID, message, delivery_status, ts, packetID, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addChatMessageToDB
File: src/org/yaxim/androidclient/service/SmackableImp.java
Repository: ge0rg/yaxim
The code follows secure coding practices.
|
[
"CWE-20",
"CWE-346"
] |
CVE-2017-5589
|
MEDIUM
| 4.3
|
ge0rg/yaxim
|
addChatMessageToDB
|
src/org/yaxim/androidclient/service/SmackableImp.java
|
65a38dc77545d9568732189e86089390f0ceaf9f
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setCurrentMotionEventOffsets(float dx, float dy) {
mCurrentTouchOffsetX = dx;
mCurrentTouchOffsetY = dy;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setCurrentMotionEventOffsets
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
|
setCurrentMotionEventOffsets
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected Grid<T> getGrid() {
return Grid.this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getGrid
File: server/src/main/java/com/vaadin/ui/Grid.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-25028
|
MEDIUM
| 4.3
|
vaadin/framework
|
getGrid
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getStepId() {
return stepId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStepId
File: src/com/dotmarketing/portlets/workflows/model/WorkflowSearcher.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-4040
|
MEDIUM
| 6.5
|
dotCMS/core
|
getStepId
|
src/com/dotmarketing/portlets/workflows/model/WorkflowSearcher.java
|
bc4db5d71dc67015572f8e4c6fdf87e29b854d02
| 0
|
Analyze the following code function for security vulnerabilities
|
private static Node migrateCache(Element cacheElement) {
List<NodeTuple> tuples = new ArrayList<>();
tuples.add(new NodeTuple(
new ScalarNode(Tag.STR, "key"),
new ScalarNode(Tag.STR, cacheElement.elementText("key").trim())));
tuples.add(new NodeTuple(
new ScalarNode(Tag.STR, "path"),
new ScalarNode(Tag.STR, cacheElement.elementText("path").trim())));
return new MappingNode(Tag.MAP, tuples, FlowStyle.BLOCK);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: migrateCache
File: server-core/src/main/java/io/onedev/server/migration/XmlBuildSpecMigrator.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-538"
] |
CVE-2021-21250
|
MEDIUM
| 4
|
theonedev/onedev
|
migrateCache
|
server-core/src/main/java/io/onedev/server/migration/XmlBuildSpecMigrator.java
|
9196fd795e87dab069b4260a3590a0ea886e770f
| 0
|
Analyze the following code function for security vulnerabilities
|
SurfaceControl getClientViewRootSurface() {
return mWinAnimator.getSurfaceControl();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getClientViewRootSurface
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
|
getClientViewRootSurface
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean setFocusedActivityLocked(ActivityRecord r, String reason) {
if (r == null || mFocusedActivity == r) {
return false;
}
if (!r.isFocusable()) {
if (DEBUG_FOCUS) Slog.d(TAG_FOCUS, "setFocusedActivityLocked: unfocusable r=" + r);
return false;
}
if (DEBUG_FOCUS) Slog.d(TAG_FOCUS, "setFocusedActivityLocked: r=" + r);
final boolean wasDoingSetFocusedActivity = mDoingSetFocusedActivity;
if (wasDoingSetFocusedActivity) Slog.w(TAG,
"setFocusedActivityLocked: called recursively, r=" + r + ", reason=" + reason);
mDoingSetFocusedActivity = true;
final ActivityRecord last = mFocusedActivity;
mFocusedActivity = r;
if (r.task.isApplicationTask()) {
if (mCurAppTimeTracker != r.appTimeTracker) {
// We are switching app tracking. Complete the current one.
if (mCurAppTimeTracker != null) {
mCurAppTimeTracker.stop();
mHandler.obtainMessage(
REPORT_TIME_TRACKER_MSG, mCurAppTimeTracker).sendToTarget();
mStackSupervisor.clearOtherAppTimeTrackers(r.appTimeTracker);
mCurAppTimeTracker = null;
}
if (r.appTimeTracker != null) {
mCurAppTimeTracker = r.appTimeTracker;
startTimeTrackingFocusedActivityLocked();
}
} else {
startTimeTrackingFocusedActivityLocked();
}
} else {
r.appTimeTracker = null;
}
// TODO: VI Maybe r.task.voiceInteractor || r.voiceInteractor != null
// TODO: Probably not, because we don't want to resume voice on switching
// back to this activity
if (r.task.voiceInteractor != null) {
startRunningVoiceLocked(r.task.voiceSession, r.info.applicationInfo.uid);
} else {
finishRunningVoiceLocked();
IVoiceInteractionSession session;
if (last != null && ((session = last.task.voiceSession) != null
|| (session = last.voiceSession) != null)) {
// We had been in a voice interaction session, but now focused has
// move to something different. Just finish the session, we can't
// return to it and retain the proper state and synchronization with
// the voice interaction service.
finishVoiceTask(session);
}
}
if (mStackSupervisor.moveActivityStackToFront(r, reason + " setFocusedActivity")) {
mWindowManager.setFocusedApp(r.appToken, true);
}
applyUpdateLockStateLocked(r);
applyUpdateVrModeLocked(r);
if (mFocusedActivity.userId != mLastFocusedUserId) {
mHandler.removeMessages(FOREGROUND_PROFILE_CHANGED_MSG);
mHandler.obtainMessage(
FOREGROUND_PROFILE_CHANGED_MSG, mFocusedActivity.userId, 0).sendToTarget();
mLastFocusedUserId = mFocusedActivity.userId;
}
// Log a warning if the focused app is changed during the process. This could
// indicate a problem of the focus setting logic!
if (mFocusedActivity != r) Slog.w(TAG,
"setFocusedActivityLocked: r=" + r + " but focused to " + mFocusedActivity);
mDoingSetFocusedActivity = wasDoingSetFocusedActivity;
EventLogTags.writeAmFocusedActivity(
mFocusedActivity == null ? -1 : mFocusedActivity.userId,
mFocusedActivity == null ? "NULL" : mFocusedActivity.shortComponentName,
reason);
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setFocusedActivityLocked
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
|
setFocusedActivityLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onPageSelected(int position) {
onTabChanged();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onPageSelected
File: src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
onPageSelected
|
src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean unlockUser(int userId, @Nullable byte[] token, @Nullable byte[] secret,
@Nullable IProgressListener listener) {
return mUserController.unlockUser(userId, secret, listener);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unlockUser
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
|
unlockUser
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<Node> getAncestors() {
final List<Node> list = new ArrayList<>();
list.add(this);
Node node = getParentNode();
while (node != null) {
list.add(0, node);
node = node.getParentNode();
}
return list;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAncestors
File: src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
Repository: HtmlUnit/htmlunit
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-2798
|
HIGH
| 7.5
|
HtmlUnit/htmlunit
|
getAncestors
|
src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
|
940dc7fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override // Binder call
public long preEnroll(IBinder token) {
checkPermission(MANAGE_FINGERPRINT);
return startPreEnroll(token);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: preEnroll
File: services/core/java/com/android/server/fingerprint/FingerprintService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
preEnroll
|
services/core/java/com/android/server/fingerprint/FingerprintService.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void onStop() {
AndroidImplementation.clearAppArg();
super.onStop();
background = true;
unlockScreen();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onStop
File: Ports/Android/src/com/codename1/impl/android/CodenameOneActivity.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
onStop
|
Ports/Android/src/com/codename1/impl/android/CodenameOneActivity.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void stopDelegateShellPermissionIdentity() {
if (UserHandle.getCallingAppId() != Process.SHELL_UID
&& UserHandle.getCallingAppId() != Process.ROOT_UID) {
throw new SecurityException("Only the shell can delegate its permissions");
}
synchronized (mProcLock) {
mAppOpsService.setAppOpsServiceDelegate(null);
getPermissionManagerInternal().stopShellPermissionIdentityDelegation();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: stopDelegateShellPermissionIdentity
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
|
stopDelegateShellPermissionIdentity
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void invalidate() {
if (getSuggestionTextLeftPosition() != mTextLeft
|| getSuggestionTextRightPosition() != mTextRight) {
// When the text position is changed, it typically is caused by the suggestions
// appearing while the URL bar on the phone is gaining focus (if you trigger an
// intent that will result in suggestions being shown before focusing the omnibox).
// Triggering a relayout will cause any animations to stutter, so we continually
// push the relayout to end of the UI queue until the animation is complete.
removeCallbacks(mRelayoutRunnable);
postDelayed(mRelayoutRunnable, RELAYOUT_DELAY_MS);
} else {
super.invalidate();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: invalidate
File: chrome/android/java/src/org/chromium/chrome/browser/omnibox/SuggestionView.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-254"
] |
CVE-2016-5163
|
MEDIUM
| 4.3
|
chromium
|
invalidate
|
chrome/android/java/src/org/chromium/chrome/browser/omnibox/SuggestionView.java
|
3bd33fee094e863e5496ac24714c558bd58d28ef
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isFocusable() {
// EDT
if (v != null) {
return v.isFocusableInTouchMode() || v.isFocusable();
} else {
return super.isFocusable();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isFocusable
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
|
isFocusable
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
void moveTaskToStackLocked(int taskId, int stackId, boolean toTop) {
final TaskRecord task = anyTaskForIdLocked(taskId);
if (task == null) {
Slog.w(TAG, "moveTaskToStack: no task for id=" + taskId);
return;
}
final ActivityStack stack = getStack(stackId);
if (stack == null) {
Slog.w(TAG, "moveTaskToStack: no stack for id=" + stackId);
return;
}
mWindowManager.moveTaskToStack(taskId, stackId, toTop);
if (task.stack != null) {
task.stack.removeTask(task, "moveTaskToStack", false /* notMoving */);
}
stack.addTask(task, toTop, true);
// The task might have already been running and its visibility needs to be synchronized with
// the visibility of the stack / windows.
stack.ensureActivitiesVisibleLocked(null, 0);
resumeTopActivitiesLocked();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: moveTaskToStackLocked
File: services/core/java/com/android/server/am/ActivityStackSupervisor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3838
|
MEDIUM
| 4.3
|
android
|
moveTaskToStackLocked
|
services/core/java/com/android/server/am/ActivityStackSupervisor.java
|
468651c86a8adb7aa56c708d2348e99022088af3
| 0
|
Analyze the following code function for security vulnerabilities
|
private void startShellPermissionIdentityDelegationInternal(int uid,
@NonNull String packageName, @Nullable List<String> permissionNames) {
synchronized (mLock) {
final CheckPermissionDelegate oldDelegate = mCheckPermissionDelegate;
if (oldDelegate != null && oldDelegate.getDelegatedUid() != uid) {
throw new SecurityException(
"Shell can delegate permissions only to one UID at a time");
}
final ShellDelegate delegate = new ShellDelegate(uid, packageName, permissionNames);
setCheckPermissionDelegateLocked(delegate);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startShellPermissionIdentityDelegationInternal
File: services/core/java/com/android/server/pm/permission/PermissionManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-281"
] |
CVE-2023-21249
|
MEDIUM
| 5.5
|
android
|
startShellPermissionIdentityDelegationInternal
|
services/core/java/com/android/server/pm/permission/PermissionManagerService.java
|
c00b7e7dbc1fa30339adef693d02a51254755d7f
| 0
|
Analyze the following code function for security vulnerabilities
|
public void updatePersistentConfiguration(Configuration values, @UserIdInt int userId) {
final long origId = Binder.clearCallingIdentity();
try {
synchronized (mGlobalLock) {
// Window configuration is unrelated to persistent configuration (e.g. font scale,
// locale). Unset it to avoid affecting the current display configuration.
values.windowConfiguration.setToDefaults();
updateConfigurationLocked(values, null, false, true, userId,
false /* deferResume */);
}
} finally {
Binder.restoreCallingIdentity(origId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updatePersistentConfiguration
File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40094
|
HIGH
| 7.8
|
android
|
updatePersistentConfiguration
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public final boolean contains(CharSequence name) {
requireNonNull(name, "name");
final int h = AsciiString.hashCode(name);
final int i = index(h);
HeaderEntry e = entries[i];
// loop until the first header was found
while (e != null) {
if (e.hash == h && keyEquals(e.key, name)) {
return true;
}
e = e.next;
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: contains
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
|
contains
|
core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
|
b597f7a865a527a84ee3d6937075cfbb4470ed20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setJMSMessageID(String id) throws JMSException {
this.setStringProperty(JMS_MESSAGE_ID, id);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setJMSMessageID
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
|
setJMSMessageID
|
src/main/java/com/rabbitmq/jms/client/RMQMessage.java
|
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Bundle getUserRestrictions(ComponentName who, String callerPackage, boolean parent) {
if (!mHasFeature) {
return null;
}
CallerIdentity caller;
if (isPolicyEngineForFinanceFlagEnabled()) {
caller = getCallerIdentity(who, callerPackage);
} else {
caller = getCallerIdentity(who);
}
if (isPolicyEngineForFinanceFlagEnabled()) {
int targetUserId = parent
? getProfileParentId(caller.getUserId()) : caller.getUserId();
EnforcingAdmin admin = getEnforcingAdminForCaller(who, callerPackage);
if (isDeviceOwner(caller) || isProfileOwner(caller)) {
Objects.requireNonNull(who, "ComponentName is null");
Preconditions.checkCallAuthorization(isDefaultDeviceOwner(caller)
|| isFinancedDeviceOwner(caller)
|| isProfileOwner(caller)
|| (parent && isProfileOwnerOfOrganizationOwnedDevice(caller)));
Bundle restrictions = getUserRestrictionsFromPolicyEngine(admin, targetUserId);
// Add global restrictions set by the admin as well.
restrictions.putAll(
getUserRestrictionsFromPolicyEngine(admin, UserHandle.USER_ALL));
return restrictions;
} else {
if (!mInjector.isChangeEnabled(
ENABLE_COEXISTENCE_CHANGE, callerPackage, caller.getUserId())) {
throw new IllegalStateException("Calling package is not targeting Android U.");
}
return getUserRestrictionsFromPolicyEngine(admin, targetUserId);
}
} else {
Objects.requireNonNull(who, "ComponentName is null");
Preconditions.checkCallAuthorization(isDefaultDeviceOwner(caller)
|| isFinancedDeviceOwner(caller)
|| isProfileOwner(caller)
|| (parent && isProfileOwnerOfOrganizationOwnedDevice(caller)));
synchronized (getLockObject()) {
final ActiveAdmin activeAdmin = getParentOfAdminIfRequired(
getProfileOwnerOrDeviceOwnerLocked(caller.getUserId()), parent);
return activeAdmin.userRestrictions;
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserRestrictions
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
|
getUserRestrictions
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getGRPCPort(ConnectorType connectorType) {
String port;
if (connectorType == ConnectorType.MANAGEMENT_CONNECTOR) {
port = prop.getProperty(TS_GRPC_MANAGEMENT_PORT, "7071");
} else {
port = prop.getProperty(TS_GRPC_INFERENCE_PORT, "7070");
}
return Integer.parseInt(port);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getGRPCPort
File: frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java
Repository: pytorch/serve
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2023-43654
|
CRITICAL
| 9.8
|
pytorch/serve
|
getGRPCPort
|
frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java
|
391bdec3348e30de173fbb7c7277970e0b53c8ad
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void cancelIntentSender(IIntentSender sender) {
if (!(sender instanceof PendingIntentRecord)) {
return;
}
synchronized(this) {
PendingIntentRecord rec = (PendingIntentRecord)sender;
try {
final int uid = AppGlobals.getPackageManager().getPackageUid(rec.key.packageName,
MATCH_DEBUG_TRIAGED_MISSING, UserHandle.getCallingUserId());
if (!UserHandle.isSameApp(uid, Binder.getCallingUid())) {
String msg = "Permission Denial: cancelIntentSender() from pid="
+ Binder.getCallingPid()
+ ", uid=" + Binder.getCallingUid()
+ " is not allowed to cancel packges "
+ rec.key.packageName;
Slog.w(TAG, msg);
throw new SecurityException(msg);
}
} catch (RemoteException e) {
throw new SecurityException(e);
}
cancelIntentSenderLocked(rec, true);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cancelIntentSender
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
|
cancelIntentSender
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
public @NonNull InputStream openNonAsset(int cookie, @NonNull String fileName)
throws IOException {
return openNonAsset(cookie, fileName, ACCESS_STREAMING);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: openNonAsset
File: core/java/android/content/res/AssetManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-415"
] |
CVE-2023-40103
|
HIGH
| 7.8
|
android
|
openNonAsset
|
core/java/android/content/res/AssetManager.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
public void cancelEditor() {
if (editorSaving) {
// If the editor is already saving the values, it's too late to
// cancel it. This prevents item set changes from propagating during
// save, causing discard to be run during commit.
return;
}
if (isEditorActive()) {
getEditorRpc()
.cancel(getContainerDataSource().indexOfId(editedItemId));
doCancelEditor();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cancelEditor
File: server/src/main/java/com/vaadin/ui/Grid.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-25028
|
MEDIUM
| 4.3
|
vaadin/framework
|
cancelEditor
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
public int invokeCertAuthHandler() {
return certAuthHandler.check(this);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: invokeCertAuthHandler
File: src/main/java/org/mozilla/jss/nss/SSLFDProxy.java
Repository: dogtagpki/jss
The code follows secure coding practices.
|
[
"CWE-401"
] |
CVE-2021-4213
|
HIGH
| 7.5
|
dogtagpki/jss
|
invokeCertAuthHandler
|
src/main/java/org/mozilla/jss/nss/SSLFDProxy.java
|
5922560a78d0dee61af8a33cc9cfbf4cfa291448
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public synchronized String toString() {
if (mParcelledData != null) {
if (isEmptyParcel()) {
return "PersistableBundle[EMPTY_PARCEL]";
} else {
return "PersistableBundle[mParcelledData.dataSize=" +
mParcelledData.dataSize() + "]";
}
}
return "PersistableBundle[" + mMap.toString() + "]";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toString
File: core/java/android/os/PersistableBundle.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40074
|
MEDIUM
| 5.5
|
android
|
toString
|
core/java/android/os/PersistableBundle.java
|
40e4ea759743737958dde018f3606d778f7a53f3
| 0
|
Analyze the following code function for security vulnerabilities
|
protected static void quote(String value, StringBuffer out) {
if (value.startsWith("\"") && value.endsWith("\"")) {
out.append(value);
} else {
boolean containsSpecial = false;
for (int n = 0; n < value.length(); n++) {
char thisChar = value.charAt(n);
if ((thisChar < 32) || (thisChar >= 127)
|| (specialCharacters.indexOf(thisChar) != -1)) {
containsSpecial = true;
break;
}
}
if (containsSpecial)
out.append('"').append(value).append('"');
else
out.append(value);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: quote
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
|
quote
|
src/java/winstone/WinstoneResponse.java
|
410ed3001d51c689cf59085b7417466caa2ded7b
| 0
|
Analyze the following code function for security vulnerabilities
|
private final boolean updateOomAdjLocked(ProcessRecord app, int cachedAdj,
ProcessRecord TOP_APP, boolean doingAll, long now) {
if (app.thread == null) {
return false;
}
computeOomAdjLocked(app, cachedAdj, TOP_APP, doingAll, now);
return applyOomAdjLocked(app, doingAll, now, SystemClock.elapsedRealtime());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateOomAdjLocked
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2018-9492
|
HIGH
| 7.2
|
android
|
updateOomAdjLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getParamAction() {
return m_paramAction;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getParamAction
File: src/org/opencms/workplace/CmsDialog.java
Repository: alkacon/opencms-core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2013-4600
|
MEDIUM
| 4.3
|
alkacon/opencms-core
|
getParamAction
|
src/org/opencms/workplace/CmsDialog.java
|
72a05e3ea1cf692e2efce002687272e63f98c14a
| 0
|
Analyze the following code function for security vulnerabilities
|
private static String replaceProperties(String orig, User user) {
if (user == null || orig == null) {
return orig;
}
orig = orig.replace("${user.name}", user.getName()).replace("${user_name}", user.getName());
orig = replaceRoles(orig, user);
orig = replaceSecurityRoles(orig, user);
for (Entry<String, String> entry : user.getCustomAttributesMap().entrySet()) {
if (entry == null || entry.getKey() == null || entry.getValue() == null) {
continue;
}
orig = orig.replace("${" + entry.getKey() + "}", entry.getValue());
orig = orig.replace("${" + entry.getKey().replace('.', '_') + "}", entry.getValue());
}
return orig;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: replaceProperties
File: src/main/java/org/opensearch/security/securityconf/ConfigModelV7.java
Repository: opensearch-project/security
The code follows secure coding practices.
|
[
"CWE-612",
"CWE-863"
] |
CVE-2022-41918
|
MEDIUM
| 6.3
|
opensearch-project/security
|
replaceProperties
|
src/main/java/org/opensearch/security/securityconf/ConfigModelV7.java
|
f7cc569c9d3fa5d5432c76c854eed280d45ce6f4
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean isCheckURIEncodingEnabled() {
return !"ISO-8859-1".equalsIgnoreCase(System.getProperty("file.encoding"));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isCheckURIEncodingEnabled
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
|
isCheckURIEncodingEnabled
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean canScreenshotIme() {
return !isSecureLocked();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: canScreenshotIme
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
|
canScreenshotIme
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean shouldAllowBypassingDevicePolicyManagementRoleQualificationInternal() {
if (mUserManager.getUserCount() > 1) {
return false;
}
AccountManager am = AccountManager.get(mContext);
Account[] accounts = am.getAccounts();
return accounts.length == 0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: shouldAllowBypassingDevicePolicyManagementRoleQualificationInternal
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
|
shouldAllowBypassingDevicePolicyManagementRoleQualificationInternal
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public static ProfileDataInfos fromDOM(Element infosElement) {
ProfileDataInfos infos = new ProfileDataInfos();
NodeList totalList = infosElement.getElementsByTagName("total");
if (totalList.getLength() > 0) {
String value = totalList.item(0).getTextContent();
infos.setTotal(Integer.parseInt(value));
}
NodeList infoList = infosElement.getElementsByTagName("ProfileDataInfo");
int infoCount = infoList.getLength();
for (int i=0; i<infoCount; i++) {
Element infoElement = (Element) infoList.item(i);
ProfileDataInfo info = ProfileDataInfo.fromDOM(infoElement);
infos.addEntry(info);
}
return infos;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fromDOM
File: base/common/src/main/java/com/netscape/certsrv/profile/ProfileDataInfos.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
fromDOM
|
base/common/src/main/java/com/netscape/certsrv/profile/ProfileDataInfos.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public String displayPrettyName(String fieldname, boolean showMandatory, BaseObject obj, XWikiContext context)
{
return displayPrettyName(fieldname, showMandatory, true, obj, context);
}
|
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/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-26470
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
displayPrettyName
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
public IAppOpsService getAppOpsService() {
return mAppOpsService;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAppOpsService
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2018-9492
|
HIGH
| 7.2
|
android
|
getAppOpsService
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("unchecked")
private ActivityImpl[] cloneAndMakeChain(ProcessDefinitionEntity procDef, String procInsId, String prototypeActivityId, String nextActivityId, Map<String, Object> variables, String... assignees) {
SimpleRuntimeActivityDefinitionEntity info = new SimpleRuntimeActivityDefinitionEntity();
info.setProcessDefinitionId(procDef.getId());
info.setProcessInstanceId(procInsId);
RuntimeActivityDefinitionEntityIntepreter radei = new RuntimeActivityDefinitionEntityIntepreter(info);
radei.setPrototypeActivityId(prototypeActivityId);
radei.setAssignees((List<String>)CollectionUtils.arrayToList(assignees));
radei.setNextActivityId(nextActivityId);
ActivityImpl[] activities = new ChainedActivitiesCreator().createActivities(processEngine, procDef, info);
jumpTask(procInsId, activities[0].getId(), variables);
// recordActivitiesCreation(info);
return activities;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cloneAndMakeChain
File: src/main/java/com/thinkgem/jeesite/modules/act/service/ActTaskService.java
Repository: thinkgem/jeesite
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2023-34601
|
CRITICAL
| 9.8
|
thinkgem/jeesite
|
cloneAndMakeChain
|
src/main/java/com/thinkgem/jeesite/modules/act/service/ActTaskService.java
|
30750011b49f7c8d45d0f3ab13ed3a1a422655bb
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String renderer() {
return route.renderer();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: renderer
File: jooby/src/main/java/org/jooby/internal/RouteImpl.java
Repository: jooby-project/jooby
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-15477
|
MEDIUM
| 4.3
|
jooby-project/jooby
|
renderer
|
jooby/src/main/java/org/jooby/internal/RouteImpl.java
|
34856a738829d8fedca4ed27bd6ff413af87186f
| 0
|
Analyze the following code function for security vulnerabilities
|
private List<IssueExcelData> parseIssueDataToExcelData(List<IssuesDao> exportIssues) {
List<IssueExcelData> excelDataList = new ArrayList<>();
for (int i = 0; i < exportIssues.size(); i++) {
IssuesDao issuesDao = exportIssues.get(i);
IssueExcelData excelData = new IssueExcelData();
BeanUtils.copyBean(excelData, issuesDao);
buildCustomData(issuesDao, excelData);
excelDataList.add(excelData);
}
return excelDataList;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseIssueDataToExcelData
File: test-track/backend/src/main/java/io/metersphere/service/IssuesService.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2022-23544
|
MEDIUM
| 6.1
|
metersphere
|
parseIssueDataToExcelData
|
test-track/backend/src/main/java/io/metersphere/service/IssuesService.java
|
d0f95b50737c941b29d507a4cc3545f2dc6ab121
| 0
|
Analyze the following code function for security vulnerabilities
|
private Route.AssetDefinition configureAssetHandler(final Route.AssetDefinition handler) {
onStart(r -> {
Config conf = r.require(Config.class);
handler
.cdn(conf.getString("assets.cdn"))
.lastModified(conf.getBoolean("assets.lastModified"))
.etag(conf.getBoolean("assets.etag"))
.maxAge(conf.getString("assets.cache.maxAge"));
});
return handler;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: configureAssetHandler
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
|
configureAssetHandler
|
jooby/src/main/java/org/jooby/Jooby.java
|
34f526028e6cd0652125baa33936ffb6a8a4a009
| 0
|
Analyze the following code function for security vulnerabilities
|
private UserSummary returnSummary(UserContext userContext, User user) {
final String requestingUser = userContext.getUser().getId();
final boolean isSelf = requestingUser.equals(user.getId());
final boolean canEditUserPermissions = isPermitted(USERS_PERMISSIONSEDIT, user.getName());
return toUserResponse(user, isSelf || canEditUserPermissions, Optional.of(AllUserSessions.create(sessionService)));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: returnSummary
File: graylog2-server/src/main/java/org/graylog2/rest/resources/users/UsersResource.java
Repository: Graylog2/graylog2-server
The code follows secure coding practices.
|
[
"CWE-613"
] |
CVE-2023-41041
|
LOW
| 3.1
|
Graylog2/graylog2-server
|
returnSummary
|
graylog2-server/src/main/java/org/graylog2/rest/resources/users/UsersResource.java
|
bb88f3d0b2b0351669ab32c60b595ab7242a3fe3
| 0
|
Analyze the following code function for security vulnerabilities
|
public <T> void get(String table, Class<T> clazz, String fieldName, String where,
boolean returnCount, boolean returnIdField, boolean setId, List<FacetField> facets, String distinctOn,
Handler<AsyncResult<Results<T>>> replyHandler) {
client.getConnection(conn
-> doGet(conn, table, clazz, fieldName, where, returnCount, returnIdField, setId, facets, distinctOn,
closeAndHandleResult(conn, replyHandler)));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: get
File: domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
get
|
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
private final boolean removeProcessLocked(ProcessRecord app,
boolean callerWillRestart, boolean allowRestart, String reason) {
final String name = app.processName;
final int uid = app.uid;
if (DEBUG_PROCESSES) Slog.d(TAG_PROCESSES,
"Force removing proc " + app.toShortString() + " (" + name + "/" + uid + ")");
removeProcessNameLocked(name, uid);
if (mHeavyWeightProcess == app) {
mHandler.sendMessage(mHandler.obtainMessage(CANCEL_HEAVY_NOTIFICATION_MSG,
mHeavyWeightProcess.userId, 0));
mHeavyWeightProcess = null;
}
boolean needRestart = false;
if (app.pid > 0 && app.pid != MY_PID) {
int pid = app.pid;
synchronized (mPidsSelfLocked) {
mPidsSelfLocked.remove(pid);
mHandler.removeMessages(PROC_START_TIMEOUT_MSG, app);
}
mBatteryStatsService.noteProcessFinish(app.processName, app.info.uid);
if (app.isolated) {
mBatteryStatsService.removeIsolatedUid(app.uid, app.info.uid);
}
boolean willRestart = false;
if (app.persistent && !app.isolated) {
if (!callerWillRestart) {
willRestart = true;
} else {
needRestart = true;
}
}
app.kill(reason, true);
handleAppDiedLocked(app, willRestart, allowRestart);
if (willRestart) {
removeLruProcessLocked(app);
addAppLocked(app.info, false, null /* ABI override */);
}
} else {
mRemovedProcesses.add(app);
}
return needRestart;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeProcessLocked
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2500
|
MEDIUM
| 4.3
|
android
|
removeProcessLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
9878bb99b77c3681f0fda116e2964bac26f349c3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getPasswordHistoryLength(ComponentName who, int userHandle, boolean parent) {
if (!mLockPatternUtils.hasSecureLockScreen()) {
return 0;
}
return getStrictestPasswordRequirement(who, userHandle, parent,
admin -> admin.passwordHistoryLength, PASSWORD_QUALITY_UNSPECIFIED);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPasswordHistoryLength
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
|
getPasswordHistoryLength
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
private EntityReference getCurrentEntity()
{
XWikiContext xcontext = this.xcontextProvider.get();
XWikiDocument doc = xcontext.getDoc();
if (doc != null) {
return doc.getDocumentReference();
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCurrentEntity
File: xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authorization/xwiki-platform-security-authorization-bridge/src/main/java/org/xwiki/security/authorization/internal/DefaultContextualAuthorizationManager.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-459"
] |
CVE-2023-36468
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
getCurrentEntity
|
xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authorization/xwiki-platform-security-authorization-bridge/src/main/java/org/xwiki/security/authorization/internal/DefaultContextualAuthorizationManager.java
|
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void unbindRemoteViewsService(String callingPackage, int appWidgetId, Intent intent) {
final int userId = UserHandle.getCallingUserId();
if (DEBUG) {
Slog.i(TAG, "unbindRemoteViewsService() " + userId);
}
// Make sure the package runs under the caller uid.
mSecurityPolicy.enforceCallFromPackage(callingPackage);
synchronized (mLock) {
ensureGroupStateLoadedLocked(userId);
// Unbind from the RemoteViewsService (which will trigger a callback to the bound
// RemoteViewsAdapter)
Pair<Integer, FilterComparison> key = Pair.create(appWidgetId,
new FilterComparison(intent));
if (mBoundRemoteViewsServices.containsKey(key)) {
// We don't need to use the appWidgetId until after we are sure there is something
// to unbind. Note that this may mask certain issues with apps calling unbind()
// more than necessary.
// NOTE: The lookup is enforcing security across users by making
// sure the caller can only access widgets it hosts or provides.
Widget widget = lookupWidgetLocked(appWidgetId,
Binder.getCallingUid(), callingPackage);
if (widget == null) {
throw new IllegalArgumentException("Bad widget id " + appWidgetId);
}
ServiceConnectionProxy connection = (ServiceConnectionProxy)
mBoundRemoteViewsServices.get(key);
connection.disconnect();
mContext.unbindService(connection);
mBoundRemoteViewsServices.remove(key);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unbindRemoteViewsService
File: services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-1541
|
MEDIUM
| 4.3
|
android
|
unbindRemoteViewsService
|
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
|
0b98d304c467184602b4c6bce76fda0b0274bc07
| 0
|
Analyze the following code function for security vulnerabilities
|
public String toXML() throws Exception {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.newDocument();
Element element = toDOM(document);
document.appendChild(element);
TransformerFactory transformerFactory = TransformerFactory.newInstance();
Transformer transformer = transformerFactory.newTransformer();
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
DOMSource domSource = new DOMSource(document);
StringWriter sw = new StringWriter();
StreamResult streamResult = new StreamResult(sw);
transformer.transform(domSource, streamResult);
return sw.toString();
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2022-2414
- Severity: HIGH
- CVSS Score: 7.5
Description: Disable access to external entities when parsing XML
This reduces the vulnerability of XML parsers to XXE (XML external
entity) injection.
The best way to prevent XXE is to stop using XML altogether, which we do
plan to do. Until that happens I consider it worthwhile to tighten the
security here though.
Function: toXML
File: base/common/src/main/java/com/netscape/certsrv/profile/ProfileDataInfos.java
Repository: dogtagpki/pki
Fixed Code:
public String toXML() throws Exception {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.newDocument();
Element element = toDOM(document);
document.appendChild(element);
TransformerFactory transformerFactory = TransformerFactory.newInstance();
transformerFactory.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, "");
transformerFactory.setAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET, "");
Transformer transformer = transformerFactory.newTransformer();
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
DOMSource domSource = new DOMSource(document);
StringWriter sw = new StringWriter();
StreamResult streamResult = new StreamResult(sw);
transformer.transform(domSource, streamResult);
return sw.toString();
}
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
toXML
|
base/common/src/main/java/com/netscape/certsrv/profile/ProfileDataInfos.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 1
|
Analyze the following code function for security vulnerabilities
|
public static String stripTags(Reader r, List<Integer> mapBack, boolean markLineBreaks) {
if (mapBack != null) {
mapBack.clear(); // just in case it has something in it!
}
StringBuilder result = new StringBuilder();
try {
int position = 0;
do {
String text = XMLUtils.readUntilTag(r);
if (text.length() > 0) {
// add offsets to the map back
for (int i = 0; i < text.length(); i++) {
result.append(text.charAt(i));
if (mapBack != null) {
mapBack.add(Integer.valueOf(position + i));
}
}
position += text.length();
}
// System.err.println(position + " got text: " + text);
String tag = XMLUtils.readTag(r);
if (tag == null) {
break;
}
if (markLineBreaks && XMLUtils.isBreaking(parseTag(tag))) {
result.append("\n");
if (mapBack != null) {
mapBack.add(Integer.valueOf(-position));
}
}
position += tag.length();
// System.err.println(position + " got tag: " + tag);
} while (true);
} catch (IOException e) {
log.warn("Error reading string");
log.warn(e);
}
return result.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: stripTags
File: src/edu/stanford/nlp/util/XMLUtils.java
Repository: stanfordnlp/CoreNLP
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-0239
|
HIGH
| 7.5
|
stanfordnlp/CoreNLP
|
stripTags
|
src/edu/stanford/nlp/util/XMLUtils.java
|
1940ffb938dc4f3f5bc5f2a2fd8b35aabbbae3dd
| 0
|
Analyze the following code function for security vulnerabilities
|
WindowInfo getWindowInfo() {
WindowInfo windowInfo = WindowInfo.obtain();
windowInfo.displayId = getDisplayId();
windowInfo.type = mAttrs.type;
windowInfo.layer = mLayer;
windowInfo.token = mClient.asBinder();
if (mActivityRecord != null) {
windowInfo.activityToken = mActivityRecord.token;
}
windowInfo.title = mAttrs.accessibilityTitle;
// Panel windows have no public way to set the a11y title directly. Use the
// regular title as a fallback.
final boolean isPanelWindow = (mAttrs.type >= WindowManager.LayoutParams.FIRST_SUB_WINDOW)
&& (mAttrs.type <= WindowManager.LayoutParams.LAST_SUB_WINDOW);
// Accessibility overlays should have titles that work for accessibility, and can't set
// the a11y title themselves.
final boolean isAccessibilityOverlay =
windowInfo.type == WindowManager.LayoutParams.TYPE_ACCESSIBILITY_OVERLAY;
if (TextUtils.isEmpty(windowInfo.title) && (isPanelWindow || isAccessibilityOverlay)) {
final CharSequence title = mAttrs.getTitle();
windowInfo.title = TextUtils.isEmpty(title) ? null : title;
}
windowInfo.accessibilityIdOfAnchor = mAttrs.accessibilityIdOfAnchor;
windowInfo.focused = isFocused();
Task task = getTask();
windowInfo.inPictureInPicture = (task != null) && task.inPinnedWindowingMode();
windowInfo.taskId = task == null ? ActivityTaskManager.INVALID_TASK_ID : task.mTaskId;
windowInfo.hasFlagWatchOutsideTouch =
(mAttrs.flags & WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH) != 0;
if (mIsChildWindow) {
windowInfo.parentToken = getParentWindow().mClient.asBinder();
}
final int childCount = mChildren.size();
if (childCount > 0) {
if (windowInfo.childTokens == null) {
windowInfo.childTokens = new ArrayList(childCount);
}
for (int j = 0; j < childCount; j++) {
final WindowState child = mChildren.get(j);
windowInfo.childTokens.add(child.mClient.asBinder());
}
}
return windowInfo;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getWindowInfo
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
|
getWindowInfo
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Map<String, String> getParamMap(){
// 获取所有参数
Map<String, String[]> parameterMap = request.getParameterMap();
Map<String, String> map = new LinkedHashMap<>(parameterMap.size());
for (String key : parameterMap.keySet()) {
String[] values = parameterMap.get(key);
map.put(key, values[0]);
}
return map;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getParamMap
File: sa-token-starter/sa-token-servlet/src/main/java/cn/dev33/satoken/servlet/model/SaRequestForServlet.java
Repository: dromara/Sa-Token
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-44794
|
CRITICAL
| 9.8
|
dromara/Sa-Token
|
getParamMap
|
sa-token-starter/sa-token-servlet/src/main/java/cn/dev33/satoken/servlet/model/SaRequestForServlet.java
|
954efeb73277f924f836da2a25322ea35ee1bfa3
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getText() {
return text;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getText
File: base/common/src/main/java/com/netscape/certsrv/profile/PolicyConstraint.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
getText
|
base/common/src/main/java/com/netscape/certsrv/profile/PolicyConstraint.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getLongDescription() {
return String.format("URL: %s, View: %s, Username: %s", serverAndPort, view.getValue(), userName);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLongDescription
File: config/config-api/src/main/java/com/thoughtworks/go/config/materials/perforce/P4MaterialConfig.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-77"
] |
CVE-2021-43286
|
MEDIUM
| 6.5
|
gocd
|
getLongDescription
|
config/config-api/src/main/java/com/thoughtworks/go/config/materials/perforce/P4MaterialConfig.java
|
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected HtmlRenderable htmlBody() {
return sequence(
HtmlElement.div(cssClass("dir-container")).content(
HtmlElement.span(cssClass("directory")).content(
HtmlElement.a(onclick("BuildDetail.tree_navigator(this)"))
.content(getFileName())
)
),
HtmlElement.div(cssClass("subdir-container"), style("display:none"))
.content(subDirectory)
);
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2021-43288
- Severity: LOW
- CVSS Score: 3.5
Description: #000 - Escape filenames in artifact tab
Function: htmlBody
File: common/src/main/java/com/thoughtworks/go/domain/FolderDirectoryEntry.java
Repository: gocd
Fixed Code:
@Override
protected HtmlRenderable htmlBody() {
return sequence(
HtmlElement.div(cssClass("dir-container")).content(
HtmlElement.span(cssClass("directory")).content(
HtmlElement.a(onclick("BuildDetail.tree_navigator(this)"))
.safecontent(getFileName())
)
),
HtmlElement.div(cssClass("subdir-container"), style("display:none"))
.content(subDirectory)
);
}
|
[
"CWE-79"
] |
CVE-2021-43288
|
LOW
| 3.5
|
gocd
|
htmlBody
|
common/src/main/java/com/thoughtworks/go/domain/FolderDirectoryEntry.java
|
f5c1d2aa9ab302a97898a6e4b16218e64fe8e9e4
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public void updateClient(ConnectionControl control) {
if (isActive() && isBlocked() == false && isFaultTolerantConnection() && this.wireFormatInfo != null
&& this.wireFormatInfo.getVersion() >= 6) {
dispatchAsync(control);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateClient
File: activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
Repository: apache/activemq
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-3576
|
MEDIUM
| 5
|
apache/activemq
|
updateClient
|
activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
|
00921f2
| 0
|
Analyze the following code function for security vulnerabilities
|
public XWikiDocumentArchive getDocumentArchive(XWikiContext context) throws XWikiException
{
loadArchive(context);
return getDocumentArchive();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDocumentArchive
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-26470
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
getDocumentArchive
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
public static final native void removeAllProcessGroups();
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeAllProcessGroups
File: core/java/android/os/Process.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3911
|
HIGH
| 9.3
|
android
|
removeAllProcessGroups
|
core/java/android/os/Process.java
|
2c7008421cb67f5d89f16911bdbe36f6c35311ad
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onAccountsUpdated(Account[] accounts) {
// Review current upload, and cancel it if its account doesn't exist
if (mCurrentUpload != null && !accountManager.exists(mCurrentUpload.getAccount())) {
mCurrentUpload.cancel(ResultCode.ACCOUNT_NOT_FOUND);
}
// The rest of uploads are cancelled when they try to start
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onAccountsUpdated
File: src/main/java/com/owncloud/android/files/services/FileUploader.java
Repository: nextcloud/android
The code follows secure coding practices.
|
[
"CWE-732"
] |
CVE-2022-24886
|
LOW
| 2.1
|
nextcloud/android
|
onAccountsUpdated
|
src/main/java/com/owncloud/android/files/services/FileUploader.java
|
c01fa0b17050cdcf77a468cc22f4071eae29d464
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void getInsetHintLw(WindowManager.LayoutParams attrs, Rect outContentInsets,
Rect outStableInsets) {
final int fl = PolicyControl.getWindowFlags(null, attrs);
final int sysuiVis = PolicyControl.getSystemUiVisibility(null, attrs);
final int systemUiVisibility = (sysuiVis | attrs.subtreeSystemUiVisibility);
if ((fl & (FLAG_LAYOUT_IN_SCREEN | FLAG_LAYOUT_INSET_DECOR))
== (FLAG_LAYOUT_IN_SCREEN | FLAG_LAYOUT_INSET_DECOR)) {
int availRight, availBottom;
if (canHideNavigationBar() &&
(systemUiVisibility & View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION) != 0) {
availRight = mUnrestrictedScreenLeft + mUnrestrictedScreenWidth;
availBottom = mUnrestrictedScreenTop + mUnrestrictedScreenHeight;
} else {
availRight = mRestrictedScreenLeft + mRestrictedScreenWidth;
availBottom = mRestrictedScreenTop + mRestrictedScreenHeight;
}
if ((systemUiVisibility & View.SYSTEM_UI_FLAG_LAYOUT_STABLE) != 0) {
if ((fl & FLAG_FULLSCREEN) != 0) {
outContentInsets.set(mStableFullscreenLeft, mStableFullscreenTop,
availRight - mStableFullscreenRight,
availBottom - mStableFullscreenBottom);
} else {
outContentInsets.set(mStableLeft, mStableTop,
availRight - mStableRight, availBottom - mStableBottom);
}
} else if ((fl & FLAG_FULLSCREEN) != 0 || (fl & FLAG_LAYOUT_IN_OVERSCAN) != 0) {
outContentInsets.setEmpty();
} else if ((systemUiVisibility & (View.SYSTEM_UI_FLAG_FULLSCREEN
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN)) == 0) {
outContentInsets.set(mCurLeft, mCurTop,
availRight - mCurRight, availBottom - mCurBottom);
} else {
outContentInsets.set(mCurLeft, mCurTop,
availRight - mCurRight, availBottom - mCurBottom);
}
outStableInsets.set(mStableLeft, mStableTop,
availRight - mStableRight, availBottom - mStableBottom);
return;
}
outContentInsets.setEmpty();
outStableInsets.setEmpty();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInsetHintLw
File: policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-0812
|
MEDIUM
| 6.6
|
android
|
getInsetHintLw
|
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
|
84669ca8de55d38073a0dcb01074233b0a417541
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean makeAppCrashingLocked(ProcessRecord app,
String shortMsg, String longMsg, String stackTrace) {
app.crashing = true;
app.crashingReport = generateProcessError(app,
ActivityManager.ProcessErrorStateInfo.CRASHED, null, shortMsg, longMsg, stackTrace);
startAppProblemLocked(app);
app.stopFreezingAllLocked();
return handleAppCrashLocked(app, "force-crash" /*reason*/, shortMsg, longMsg, stackTrace);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: makeAppCrashingLocked
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2500
|
MEDIUM
| 4.3
|
android
|
makeAppCrashingLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
9878bb99b77c3681f0fda116e2964bac26f349c3
| 0
|
Analyze the following code function for security vulnerabilities
|
public void run(CertInstaller host) {
host.onExtractionDone(mSuccess);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: run
File: src/com/android/certinstaller/CertInstaller.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2422
|
HIGH
| 9.3
|
android
|
run
|
src/com/android/certinstaller/CertInstaller.java
|
70dde9870e9450e10418a32206ac1bb30f036b2c
| 0
|
Analyze the following code function for security vulnerabilities
|
public void fireNotificationHeadsUp() {
for (Callback callback : mCallbacks) {
callback.onNotificationHeadsUp();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fireNotificationHeadsUp
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
|
fireNotificationHeadsUp
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
private void downloadFile(String downloadKey) {
mStartedDownload = true;
mCurrentDownload = mPendingDownloads.get(downloadKey);
if (mCurrentDownload != null) {
// Detect if the account exists
if (accountManager.exists(mCurrentDownload.getAccount())) {
Log_OC.d(TAG, "Account " + mCurrentDownload.getAccount().name + " exists");
notifyDownloadStart(mCurrentDownload);
RemoteOperationResult downloadResult = null;
try {
/// prepare client object to send the request to the ownCloud server
Account currentDownloadAccount = mCurrentDownload.getAccount();
Optional<User> currentDownloadUser = accountManager.getUser(currentDownloadAccount.name);
if (!currentUser.equals(currentDownloadUser)) {
currentUser = currentDownloadUser;
mStorageManager = new FileDataStorageManager(currentUser.get(), getContentResolver());
} // else, reuse storage manager from previous operation
// always get client from client manager, to get fresh credentials in case
// of update
OwnCloudAccount ocAccount = currentDownloadUser.get().toOwnCloudAccount();
mDownloadClient = OwnCloudClientManagerFactory.getDefaultSingleton().
getClientFor(ocAccount, this);
/// perform the download
downloadResult = mCurrentDownload.execute(mDownloadClient);
if (downloadResult.isSuccess()) {
saveDownloadedFile();
}
} catch (Exception e) {
Log_OC.e(TAG, "Error downloading", e);
downloadResult = new RemoteOperationResult(e);
} finally {
Pair<DownloadFileOperation, String> removeResult = mPendingDownloads.removePayload(
mCurrentDownload.getUser().getAccountName(), mCurrentDownload.getRemotePath());
if (downloadResult == null) {
downloadResult = new RemoteOperationResult(new RuntimeException("Error downloading…"));
}
/// notify result
notifyDownloadResult(mCurrentDownload, downloadResult);
sendBroadcastDownloadFinished(mCurrentDownload, downloadResult, removeResult.second);
}
} else {
// Cancel the transfer
Log_OC.d(TAG, "Account " + mCurrentDownload.getAccount().toString() +
" doesn't exist");
cancelDownloadsForAccount(mCurrentDownload.getAccount());
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: downloadFile
File: src/main/java/com/owncloud/android/files/services/FileDownloader.java
Repository: nextcloud/android
The code follows secure coding practices.
|
[
"CWE-732"
] |
CVE-2022-24886
|
LOW
| 2.1
|
nextcloud/android
|
downloadFile
|
src/main/java/com/owncloud/android/files/services/FileDownloader.java
|
27559efb79d45782e000b762860658d49e9c35e9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void registerActivityStartInterceptor(
@ActivityInterceptorCallback.OrderedId int id,
ActivityInterceptorCallback callback) {
synchronized (mGlobalLock) {
if (mActivityInterceptorCallbacks.contains(id)) {
throw new IllegalArgumentException("Duplicate id provided: " + id);
}
if (id > LAST_ORDERED_ID || id < FIRST_ORDERED_ID) {
throw new IllegalArgumentException(
"Provided id " + id + " is not in range of valid ids ["
+ FIRST_ORDERED_ID + "," + LAST_ORDERED_ID + "]");
}
mActivityInterceptorCallbacks.put(id, callback);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: registerActivityStartInterceptor
File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40094
|
HIGH
| 7.8
|
android
|
registerActivityStartInterceptor
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void sendLostModeLocationUpdate(AndroidFuture<Boolean> future) {
if (!mHasFeature) {
future.complete(false);
return;
}
Preconditions.checkCallAuthorization(
hasCallingOrSelfPermission(permission.TRIGGER_LOST_MODE));
synchronized (getLockObject()) {
// TODO(b/261999445): Remove
ActiveAdmin admin;
if (isHeadlessFlagEnabled()) {
admin = getDeviceOwnerOrProfileOwnerOfOrganizationOwnedDeviceLocked();
} else {
admin = getDeviceOwnerOrProfileOwnerOfOrganizationOwnedDeviceLocked(
UserHandle.USER_SYSTEM);
}
Preconditions.checkState(admin != null,
"Lost mode location updates can only be sent on an organization-owned device.");
mInjector.binderWithCleanCallingIdentity(() -> {
String[] providers = {LocationManager.FUSED_PROVIDER,
LocationManager.NETWORK_PROVIDER, LocationManager.GPS_PROVIDER};
tryRetrieveAndSendLocationUpdate(admin, future, providers, /* index= */ 0);
});
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendLostModeLocationUpdate
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
|
sendLostModeLocationUpdate
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<AbstractProject> getChildProjects() {
return getChildProjects(Jenkins.getInstance());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getChildProjects
File: core/src/main/java/hudson/tasks/BuildTrigger.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
getChildProjects
|
core/src/main/java/hudson/tasks/BuildTrigger.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.