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 final int jjStartNfa_2(int pos, long active0)
{
return jjMoveNfa_2(jjStopStringLiteralDfa_2(pos, active0), pos + 1);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: jjStartNfa_2
File: impl/src/main/java/com/sun/el/parser/ELParserTokenManager.java
Repository: jakartaee/expression-language
The code follows secure coding practices.
|
[
"CWE-917"
] |
CVE-2021-28170
|
MEDIUM
| 5
|
jakartaee/expression-language
|
jjStartNfa_2
|
impl/src/main/java/com/sun/el/parser/ELParserTokenManager.java
|
b6a3943ac5fba71cbc6719f092e319caa747855b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public IConnectionService getTestDouble() {
return mConnectionServiceSpy;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTestDouble
File: tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
getTestDouble
|
tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public StaticHandler setCachingEnabled(boolean enabled) {
this.cachingEnabled = enabled;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setCachingEnabled
File: vertx-web/src/main/java/io/vertx/ext/web/handler/impl/StaticHandlerImpl.java
Repository: vert-x3/vertx-web
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-12542
|
HIGH
| 7.5
|
vert-x3/vertx-web
|
setCachingEnabled
|
vertx-web/src/main/java/io/vertx/ext/web/handler/impl/StaticHandlerImpl.java
|
57a65dce6f4c5aa5e3ce7288685e7f3447eb8f3b
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void printTableHeader(int dateColWidth, int versionColWidth, int nameColWidth, int descColWidth,
int minDescColWidth, int authorsColWidth) {
printHeadingRow(dateColWidth, versionColWidth, nameColWidth, descColWidth, minDescColWidth, authorsColWidth);
printDashRow(dateColWidth, versionColWidth, nameColWidth, descColWidth, minDescColWidth, authorsColWidth);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: printTableHeader
File: cli/ballerina-cli-module/src/main/java/org/ballerinalang/cli/module/Search.java
Repository: ballerina-platform/ballerina-lang
The code follows secure coding practices.
|
[
"CWE-306"
] |
CVE-2021-32700
|
MEDIUM
| 5.8
|
ballerina-platform/ballerina-lang
|
printTableHeader
|
cli/ballerina-cli-module/src/main/java/org/ballerinalang/cli/module/Search.java
|
4609ffee1744ecd16aac09303b1783bf0a525816
| 0
|
Analyze the following code function for security vulnerabilities
|
public static long parseContentRangeFoInstanceLength(String contentRange) {
if (contentRange == null) return -1;
final String[] session = contentRange.split("/");
if (session.length >= 2) {
try {
return Long.parseLong(session[1]);
} catch (NumberFormatException e) {
FileDownloadLog.w(FileDownloadUtils.class, "parse instance length failed with %s",
contentRange);
}
}
return -1;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseContentRangeFoInstanceLength
File: library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java
Repository: lingochamp/FileDownloader
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-11248
|
HIGH
| 7.5
|
lingochamp/FileDownloader
|
parseContentRangeFoInstanceLength
|
library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java
|
b023cc081bbecdd2a9f3549a3ae5c12a9647ed7f
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getName() {
return name;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getName
File: server-core/src/main/java/io/onedev/server/model/support/inputspec/InputSpec.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2021-21248
|
MEDIUM
| 6.5
|
theonedev/onedev
|
getName
|
server-core/src/main/java/io/onedev/server/model/support/inputspec/InputSpec.java
|
39d95ab8122c5d9ed18e69dc024870cae08d2d60
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void checkedSetSuperClassDesc(ObjectStreamClass desc,
ObjectStreamClass superDesc) throws StreamCorruptedException {
if (desc.equals(superDesc)) {
throw new StreamCorruptedException();
}
desc.setSuperclass(superDesc);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkedSetSuperClassDesc
File: luni/src/main/java/java/io/ObjectInputStream.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-7911
|
HIGH
| 7.2
|
android
|
checkedSetSuperClassDesc
|
luni/src/main/java/java/io/ObjectInputStream.java
|
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
| 0
|
Analyze the following code function for security vulnerabilities
|
protected GraphqlAntlrToLanguage getAntlrToLanguage(CommonTokenStream tokens, MultiSourceReader multiSourceReader, ParserEnvironment environment) {
return new GraphqlAntlrToLanguage(tokens, multiSourceReader, environment.getParserOptions(), environment.getI18N(), null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAntlrToLanguage
File: src/main/java/graphql/parser/Parser.java
Repository: graphql-java
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2023-28867
|
HIGH
| 7.5
|
graphql-java
|
getAntlrToLanguage
|
src/main/java/graphql/parser/Parser.java
|
8a1c884c81c0b656db201cfd95881feb0f430a55
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void edtIdle(boolean enter) {
super.edtIdle(enter);
if(enter) {
// check if we have peers waiting for resize...
if(myView instanceof AndroidAsyncView) {
((AndroidAsyncView)myView).resizeViews();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: edtIdle
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
|
edtIdle
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
private void enforceSystemOrShell() {
if (!(isCallerSystem() || isCallerShell())) {
throw new SecurityException("Caller must be system or shell");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: enforceSystemOrShell
File: services/core/java/com/android/server/pm/ShortcutService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40079
|
HIGH
| 7.8
|
android
|
enforceSystemOrShell
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Response processMessageDispatchNotification(MessageDispatchNotification notification) throws Exception {
broker.processDispatchNotification(notification);
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: processMessageDispatchNotification
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
|
processMessageDispatchNotification
|
activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
|
00921f2
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String encode(final String string) {
try {
return URLEncoder.encode(string, StandardCharsets.UTF_8.name());
} catch (final UnsupportedEncodingException e) {
// UTF-8 should *never* throw this
throw new UndeclaredThrowableException(e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: encode
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
|
encode
|
opennms-web-api/src/main/java/org/opennms/web/api/Util.java
|
66b4ba96a18b9952f25a350bbccc2a7e206238d1
| 0
|
Analyze the following code function for security vulnerabilities
|
static RMQMessage fromMessage(byte[] b, List<String> trustedPackages) throws RMQJMSException {
/* If we don't recognise the message format this throws an exception */
try {
ByteArrayInputStream bin = new ByteArrayInputStream(b);
WhiteListObjectInputStream in = new WhiteListObjectInputStream(bin, trustedPackages);
// read the class name from the stream
String clazz = in.readUTF();
// instantiate the message object
RMQMessage msg = instantiateRmqMessage(clazz, trustedPackages);
// read the message id
msg.internalMessageID = in.readUTF();
// read JMS properties
int propsize = in.readInt();
for (int i = 0; i < propsize; i++) {
String name = in.readUTF();
Object value = readPrimitive(in);
msg.rmqProperties.put(name, (Serializable) value);
}
//read custom properties
propsize = in.readInt();
for (int i = 0; i < propsize; i++) {
String name = in.readUTF();
Object value = readPrimitive(in);
msg.userJmsProperties.put(name, (Serializable) value);
}
// read the body of the message
msg.readBody(in, bin);
return msg;
} catch (IOException x) {
throw new RMQJMSException(x);
} catch (ClassNotFoundException x) {
throw new RMQJMSException(x);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fromMessage
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
|
fromMessage
|
src/main/java/com/rabbitmq/jms/client/RMQMessage.java
|
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
| 0
|
Analyze the following code function for security vulnerabilities
|
protected boolean deleteDirectory(File path)
{
if (path.exists())
{
File[] files = path.listFiles();
for (int i = 0; i < files.length; i++)
{
if (files[i].isDirectory())
{
deleteDirectory(files[i]);
}
else
{
if (!files[i].delete())
{
log.error("Unable to delete file: " + files[i].getName());
}
}
}
}
boolean pathDeleted = path.delete();
return (pathDeleted);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deleteDirectory
File: dspace-api/src/main/java/org/dspace/app/itemimport/ItemImportServiceImpl.java
Repository: DSpace
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-31195
|
HIGH
| 7.2
|
DSpace
|
deleteDirectory
|
dspace-api/src/main/java/org/dspace/app/itemimport/ItemImportServiceImpl.java
|
7af52a0883a9dbc475cf3001f04ed11b24c8a4c0
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<DocumentHighlight> findDocumentHighlights(DOMDocument xmlDocument, Position position,
CancelChecker cancelChecker) {
return highlighting.findDocumentHighlights(xmlDocument, position, cancelChecker);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findDocumentHighlights
File: org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/services/XMLLanguageService.java
Repository: eclipse/lemminx
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2019-18212
|
MEDIUM
| 4
|
eclipse/lemminx
|
findDocumentHighlights
|
org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/services/XMLLanguageService.java
|
e37c399aa266be1b7a43061d4afc43dc230410d2
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String getCleanPath(
String path
) {
if (path.endsWith("/") && path.length() > 1)
path = path.substring(0, path.length() - 1);
return path;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCleanPath
File: core/src/main/java/org/opencrx/application/uses/net/sf/webdav/methods/WebDavMethod.java
Repository: opencrx
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2023-46502
|
CRITICAL
| 9.8
|
opencrx
|
getCleanPath
|
core/src/main/java/org/opencrx/application/uses/net/sf/webdav/methods/WebDavMethod.java
|
ce7a71db0bb34ecbcb0e822d40598e410a48b399
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isResourceAvailable(String url) {
return getResource(url) != null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isResourceAvailable
File: flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-203"
] |
CVE-2021-31404
|
LOW
| 1.9
|
vaadin/flow
|
isResourceAvailable
|
flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
|
621ef1b322737d963bee624b2d2e38cd739903d9
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<ItemDataFlag> findAllByEventCrfPath(int tag_id , String eventCrfPath ) {
String query = " from " + getDomainClassName() + " where "
+ " tag_id= " + tag_id + " and path LIKE '" + eventCrfPath +".%'" ;
org.hibernate.Query q = getCurrentSession().createQuery(query);
return (List<ItemDataFlag>) q.list();
}
|
Vulnerability Classification:
- CWE: CWE-89
- CVE: CVE-2022-24831
- Severity: HIGH
- CVSS Score: 7.5
Description: OC-17141: fix reported SQL injection issues
Function: findAllByEventCrfPath
File: core/src/main/java/org/akaza/openclinica/dao/hibernate/ItemDataFlagDao.java
Repository: OpenClinica
Fixed Code:
public List<ItemDataFlag> findAllByEventCrfPath(int tag_id , String eventCrfPath ) {
String query = " from " + getDomainClassName() + " where "
+ " tag_id = :tag_id and path LIKE :eventCrfPath";
org.hibernate.Query q = getCurrentSession().createQuery(query);
q.setInteger("tag_id", tag_id);
q.setString("eventCrfPath", eventCrfPath + ".%");
return (List<ItemDataFlag>) q.list();
}
|
[
"CWE-89"
] |
CVE-2022-24831
|
HIGH
| 7.5
|
OpenClinica
|
findAllByEventCrfPath
|
core/src/main/java/org/akaza/openclinica/dao/hibernate/ItemDataFlagDao.java
|
b152cc63019230c9973965a98e4386ea5322c18f
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setDeviceIdleAllowlist(int[] allAppids, int[] exceptIdleAppids) {
synchronized (ActivityManagerService.this) {
synchronized (mProcLock) {
mDeviceIdleAllowlist = allAppids;
mDeviceIdleExceptIdleAllowlist = exceptIdleAppids;
mAppRestrictionController.setDeviceIdleAllowlist(allAppids, exceptIdleAppids);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDeviceIdleAllowlist
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
|
setDeviceIdleAllowlist
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public <E extends Enum<E>> E getEnum(Class<E> clazz, String key) throws JSONException {
E val = optEnum(clazz, key);
if(val==null) {
// JSONException should really take a throwable argument.
// If it did, I would re-implement this with the Enum.valueOf
// method and place any thrown exception in the JSONException
throw wrongValueFormatException(key, "enum of type " + quote(clazz.getSimpleName()), opt(key), null);
}
return val;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getEnum
File: src/main/java/org/json/JSONObject.java
Repository: stleary/JSON-java
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2023-5072
|
HIGH
| 7.5
|
stleary/JSON-java
|
getEnum
|
src/main/java/org/json/JSONObject.java
|
661114c50dcfd53bb041aab66f14bb91e0a87c8a
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void writeData(Element body, DesignContext designContext) {
getDataProvider().fetch(new Query<>())
.forEach(item -> writeRow(body, item, designContext));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeData
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
|
writeData
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
void finishRemoveUser(final int userHandle) {
if (DBG) Slog.i(LOG_TAG, "finishRemoveUser " + userHandle);
// Let other services shutdown any activity and clean up their state before completely
// wiping the user's system directory and removing from the user list
long ident = Binder.clearCallingIdentity();
try {
Intent addedIntent = new Intent(Intent.ACTION_USER_REMOVED);
addedIntent.putExtra(Intent.EXTRA_USER_HANDLE, userHandle);
mContext.sendOrderedBroadcastAsUser(addedIntent, UserHandle.ALL,
android.Manifest.permission.MANAGE_USERS,
new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
if (DBG) {
Slog.i(LOG_TAG,
"USER_REMOVED broadcast sent, cleaning up user data "
+ userHandle);
}
new Thread() {
public void run() {
synchronized (mInstallLock) {
synchronized (mPackagesLock) {
removeUserStateLocked(userHandle);
}
}
}
}.start();
}
},
null, Activity.RESULT_OK, null, null);
} finally {
Binder.restoreCallingIdentity(ident);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: finishRemoveUser
File: services/core/java/com/android/server/pm/UserManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2457
|
LOW
| 2.1
|
android
|
finishRemoveUser
|
services/core/java/com/android/server/pm/UserManagerService.java
|
12332e05f632794e18ea8c4ac52c98e82532e5db
| 0
|
Analyze the following code function for security vulnerabilities
|
void rejectWithReason(Call call, @android.telecom.Call.RejectReason int rejectReason) {
final String callId = mCallIdMapper.getCallId(call);
if (callId != null && isServiceValid("rejectReason")) {
try {
logOutgoing("rejectReason %s, %d", callId, rejectReason);
mServiceInterface.rejectWithReason(callId, rejectReason,
Log.getExternalSession(TELECOM_ABBREVIATION));
} catch (RemoteException e) {
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: rejectWithReason
File: src/com/android/server/telecom/ConnectionServiceWrapper.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
rejectWithReason
|
src/com/android/server/telecom/ConnectionServiceWrapper.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
private Map.Entry<XMLEvent, String> peekRecursively(XMLEventReader reader, String data) {
try {
final XMLEvent peek = peek(reader);
// in case of char, we concat the result to the current value and redo the peek
// in order to obtain e.g. from a string "ab<invalid_char>cd<invalid_char>ef" --> "abcdef"
if (peek.isCharacters()) {
data = StringUtils.join(data,
reader.nextEvent().asCharacters().getData());
return peekRecursively(reader, data);
}
// in case the event is not a char we continue setting labels/properties
return new AbstractMap.SimpleEntry<>(peek, data);
} catch (Exception e) {
// in case of unicode invalid chars we continue until we get a valid event
return peekRecursively(reader, data);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: peekRecursively
File: core/src/main/java/apoc/export/graphml/XmlGraphMLReader.java
Repository: neo4j/apoc
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2023-23926
|
HIGH
| 8.1
|
neo4j/apoc
|
peekRecursively
|
core/src/main/java/apoc/export/graphml/XmlGraphMLReader.java
|
3202b421b21973b2f57a43b33c88f3f6901cfd2a
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String formatValue(final Object obj)
{
return ObjectUtils.toString(obj);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: formatValue
File: src/main/java/org/projectforge/web/core/JsonBuilder.java
Repository: micromata/projectforge-webapp
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2013-7250
|
LOW
| 3.5
|
micromata/projectforge-webapp
|
formatValue
|
src/main/java/org/projectforge/web/core/JsonBuilder.java
|
5a6a25366491443b76e528a04a9e4ba26f08a83c
| 0
|
Analyze the following code function for security vulnerabilities
|
private void checkConditions(JsonNode statusNode, TaskLogger jobLogger) {
JsonNode conditionsNode = statusNode.get("conditions");
if (conditionsNode != null) {
for (JsonNode conditionNode: conditionsNode) {
if (conditionNode.get("type").asText().equals("PodScheduled")
&& conditionNode.get("status").asText().equals("False")
&& conditionNode.get("reason").asText().equals("Unschedulable")) {
jobLogger.warning("Kubernetes: " + conditionNode.get("message").asText());
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkConditions
File: server-plugin/server-plugin-executor-kubernetes/src/main/java/io/onedev/server/plugin/executor/kubernetes/KubernetesExecutor.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-610"
] |
CVE-2022-39206
|
CRITICAL
| 9.9
|
theonedev/onedev
|
checkConditions
|
server-plugin/server-plugin-executor-kubernetes/src/main/java/io/onedev/server/plugin/executor/kubernetes/KubernetesExecutor.java
|
0052047a5b5095ac6a6b4a73a522d0272fec3a22
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void acknowledgeDeviceCompliant() {
final CallerIdentity caller = getCallerIdentity();
Preconditions.checkCallAuthorization(isProfileOwnerOfOrganizationOwnedDevice(caller));
enforceUserUnlocked(caller.getUserId());
synchronized (getLockObject()) {
final ActiveAdmin admin = getProfileOwnerLocked(caller.getUserId());
if (admin.mProfileOffDeadline > 0) {
admin.mProfileOffDeadline = 0;
saveSettingsLocked(caller.getUserId());
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: acknowledgeDeviceCompliant
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
|
acknowledgeDeviceCompliant
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
void sendDeviceOwnerCommand(String action, Bundle extras) {
final int deviceOwnerUserId;
final ComponentName receiverComponent;
synchronized (getLockObject()) {
deviceOwnerUserId = mOwners.getDeviceOwnerUserId();
receiverComponent = mOwners.getDeviceOwnerComponent();
}
sendActiveAdminCommand(action, extras, deviceOwnerUserId, receiverComponent,
/* inForeground */ false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendDeviceOwnerCommand
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
|
sendDeviceOwnerCommand
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void postInit(KeycloakSessionFactory factory) {
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: postInit
File: services/src/main/java/org/keycloak/theme/ClasspathThemeResourceProviderFactory.java
Repository: keycloak
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-3856
|
MEDIUM
| 4.3
|
keycloak
|
postInit
|
services/src/main/java/org/keycloak/theme/ClasspathThemeResourceProviderFactory.java
|
73f0474008e1bebd0733e62a22aceda9e5de6743
| 0
|
Analyze the following code function for security vulnerabilities
|
private List<String> getEffectiveUserPermissions(final User user, final List<String> permissions) {
final List<String> effectivePermissions = Lists.newArrayList(permissions);
effectivePermissions.removeAll(userManagementService.getUserPermissionsFromRoles(user));
return effectivePermissions;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getEffectiveUserPermissions
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
|
getEffectiveUserPermissions
|
graylog2-server/src/main/java/org/graylog2/rest/resources/users/UsersResource.java
|
bb88f3d0b2b0351669ab32c60b595ab7242a3fe3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isAlwaysOnTop() {
return mTaskOverlay || super.isAlwaysOnTop();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isAlwaysOnTop
File: services/core/java/com/android/server/wm/ActivityRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21145
|
HIGH
| 7.8
|
android
|
isAlwaysOnTop
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
@PermissionCheckerManager.PermissionResult
public int checkPermission(@NonNull String permission,
@NonNull AttributionSourceState attributionSourceState, @Nullable String message,
boolean forDataDelivery, boolean startDataDelivery, boolean fromDatasource,
int attributedOp) {
Objects.requireNonNull(permission);
Objects.requireNonNull(attributionSourceState);
final AttributionSource attributionSource = new AttributionSource(
attributionSourceState);
final int result = checkPermission(mContext, mPermissionManagerServiceInternal,
permission, attributionSource, message, forDataDelivery, startDataDelivery,
fromDatasource, attributedOp);
// Finish any started op if some step in the attribution chain failed.
if (startDataDelivery && result != PermissionChecker.PERMISSION_GRANTED
&& result != PermissionChecker.PERMISSION_SOFT_DENIED) {
if (attributedOp == AppOpsManager.OP_NONE) {
finishDataDelivery(AppOpsManager.permissionToOpCode(permission),
attributionSource.asState(), fromDatasource);
} else {
finishDataDelivery(attributedOp, attributionSource.asState(), fromDatasource);
}
}
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkPermission
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
|
checkPermission
|
services/core/java/com/android/server/pm/permission/PermissionManagerService.java
|
c00b7e7dbc1fa30339adef693d02a51254755d7f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isShuttingDown() {
synchronized (mGlobalLock) {
return mShuttingDown;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isShuttingDown
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
|
isShuttingDown
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressLint("ClickableViewAccessibility")
@Override
public boolean onTouch(View view, MotionEvent event) {
long duration = event.getEventTime() - event.getDownTime();
if (event.getActionMasked() == MotionEvent.ACTION_MOVE) {
float newY = event.getRawY() - binding.selfVideoViewWrapper.getHeight() / (float) 2;
float newX = event.getRawX() - binding.selfVideoViewWrapper.getWidth() / (float) 2;
binding.selfVideoViewWrapper.setY(newY);
binding.selfVideoViewWrapper.setX(newX);
} else if (event.getActionMasked() == MotionEvent.ACTION_UP && duration < 100) {
switchCamera();
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onTouch
File: app/src/main/java/com/nextcloud/talk/activities/CallActivity.java
Repository: nextcloud/talk-android
The code follows secure coding practices.
|
[
"CWE-732",
"CWE-200"
] |
CVE-2022-41926
|
MEDIUM
| 5.5
|
nextcloud/talk-android
|
onTouch
|
app/src/main/java/com/nextcloud/talk/activities/CallActivity.java
|
bb7e82fbcbd8c10d0d0128d736c41cec0f79e7d0
| 0
|
Analyze the following code function for security vulnerabilities
|
private void tryToRemoveRosterEntry(String user) throws YaximXMPPException {
try {
RosterEntry rosterEntry = mRoster.getEntry(user);
if (rosterEntry != null) {
// first, unsubscribe the user
Presence unsub = new Presence(Presence.Type.unsubscribed);
unsub.setTo(rosterEntry.getUser());
mXMPPConnection.sendPacket(unsub);
// then, remove from roster
mRoster.removeEntry(rosterEntry);
}
} catch (XMPPException e) {
throw new YaximXMPPException("tryToRemoveRosterEntry", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: tryToRemoveRosterEntry
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
|
tryToRemoveRosterEntry
|
src/org/yaxim/androidclient/service/SmackableImp.java
|
65a38dc77545d9568732189e86089390f0ceaf9f
| 0
|
Analyze the following code function for security vulnerabilities
|
public ByteOrder getByteOrder() {
return byteOrder;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getByteOrder
File: hazelcast/src/main/java/com/hazelcast/config/SerializationConfig.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
getByteOrder
|
hazelcast/src/main/java/com/hazelcast/config/SerializationConfig.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
private long getLowRamTimeSinceIdle(long now) {
return mLowRamTimeSinceLastIdle + (mLowRamStartTime > 0 ? (now-mLowRamStartTime) : 0);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLowRamTimeSinceIdle
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
|
getLowRamTimeSinceIdle
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getGroupBySQL(Select select) {
StringBuilder sql = new StringBuilder();
List<Column> groupBys = select.getGroupBys();
boolean first = true;
for (Column column : groupBys) {
if (first) {
sql.append(getGroupByStatement(select)).append(" ");
} else {
sql.append(", ");
}
Column aliasColumn = allowAliasInStatements() ? getAliasStatement(select, column) : null;
sql.append(aliasColumn != null ? getAliasForStatementSQL(aliasColumn.getAlias()) : getColumnSQL(column));
first = false;
}
return sql.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getGroupBySQL
File: dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java
Repository: dashbuilder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-4999
|
HIGH
| 7.5
|
dashbuilder
|
getGroupBySQL
|
dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java
|
8574899e3b6455547b534f570b2330ff772e524b
| 0
|
Analyze the following code function for security vulnerabilities
|
public DateFormat getDateFormat() {
return dateFormat;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDateFormat
File: samples/client/petstore/java/okhttp-gson/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
|
getDateFormat
|
samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isOwnerInfoEnabled(int userId) {
return getBoolean(LOCK_SCREEN_OWNER_INFO_ENABLED, false, userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isOwnerInfoEnabled
File: core/java/com/android/internal/widget/LockPatternUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3908
|
MEDIUM
| 4.3
|
android
|
isOwnerInfoEnabled
|
core/java/com/android/internal/widget/LockPatternUtils.java
|
96daf7d4893f614714761af2d53dfb93214a32e4
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean maybePrunePersistedUriGrantsLocked(int uid) {
final ArrayMap<GrantUri, UriPermission> perms = mGrantedUriPermissions.get(uid);
if (perms == null) return false;
if (perms.size() < MAX_PERSISTED_URI_GRANTS) return false;
final ArrayList<UriPermission> persisted = Lists.newArrayList();
for (UriPermission perm : perms.values()) {
if (perm.persistedModeFlags != 0) {
persisted.add(perm);
}
}
final int trimCount = persisted.size() - MAX_PERSISTED_URI_GRANTS;
if (trimCount <= 0) return false;
Collections.sort(persisted, new UriPermission.PersistedTimeComparator());
for (int i = 0; i < trimCount; i++) {
final UriPermission perm = persisted.get(i);
if (DEBUG_URI_PERMISSION) Slog.v(TAG_URI_PERMISSION,
"Trimming grant created at " + perm.persistedCreateTime);
perm.releasePersistableModes(~0);
removeUriPermissionIfNeededLocked(perm);
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: maybePrunePersistedUriGrantsLocked
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
|
maybePrunePersistedUriGrantsLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
9878bb99b77c3681f0fda116e2964bac26f349c3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean switchUser(final int userId) {
enforceShellRestriction(UserManager.DISALLOW_DEBUGGING_FEATURES, userId);
String userName;
synchronized (this) {
UserInfo userInfo = getUserManagerLocked().getUserInfo(userId);
if (userInfo == null) {
Slog.w(TAG, "No user info for user #" + userId);
return false;
}
if (userInfo.isManagedProfile()) {
Slog.w(TAG, "Cannot switch to User #" + userId + ": not a full user");
return false;
}
userName = userInfo.name;
mTargetUserId = userId;
}
mHandler.removeMessages(START_USER_SWITCH_MSG);
mHandler.sendMessage(mHandler.obtainMessage(START_USER_SWITCH_MSG, userId, 0, userName));
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: switchUser
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
|
switchUser
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected String getWhatToString(int what) {
switch (what) {
case CMD_ACCEPT_UNVALIDATED:
return "CMD_ACCEPT_UNVALIDATED";
case CMD_ADD_KEEPALIVE_PACKET_FILTER_TO_APF:
return "CMD_ADD_KEEPALIVE_PACKET_FILTER_TO_APF";
case CMD_BLUETOOTH_CONNECTION_STATE_CHANGE:
return "CMD_BLUETOOTH_CONNECTION_STATE_CHANGE";
case CMD_CONFIG_ND_OFFLOAD:
return "CMD_CONFIG_ND_OFFLOAD";
case CMD_CONNECTING_WATCHDOG_TIMER:
return "CMD_CONNECTING_WATCHDOG_TIMER";
case CMD_CONNECT_NETWORK:
return "CMD_CONNECT_NETWORK";
case CMD_DIAGS_CONNECT_TIMEOUT:
return "CMD_DIAGS_CONNECT_TIMEOUT";
case CMD_DISCONNECT:
return "CMD_DISCONNECT";
case CMD_ENABLE_RSSI_POLL:
return "CMD_ENABLE_RSSI_POLL";
case CMD_INSTALL_PACKET_FILTER:
return "CMD_INSTALL_PACKET_FILTER";
case CMD_IP_CONFIGURATION_LOST:
return "CMD_IP_CONFIGURATION_LOST";
case CMD_IP_CONFIGURATION_SUCCESSFUL:
return "CMD_IP_CONFIGURATION_SUCCESSFUL";
case CMD_IP_REACHABILITY_LOST:
return "CMD_IP_REACHABILITY_LOST";
case CMD_IP_REACHABILITY_FAILURE:
return "CMD_IP_REACHABILITY_FAILURE";
case CMD_IPV4_PROVISIONING_FAILURE:
return "CMD_IPV4_PROVISIONING_FAILURE";
case CMD_IPV4_PROVISIONING_SUCCESS:
return "CMD_IPV4_PROVISIONING_SUCCESS";
case CMD_NETWORK_STATUS:
return "CMD_NETWORK_STATUS";
case CMD_ONESHOT_RSSI_POLL:
return "CMD_ONESHOT_RSSI_POLL";
case CMD_POST_DHCP_ACTION:
return "CMD_POST_DHCP_ACTION";
case CMD_PRE_DHCP_ACTION:
return "CMD_PRE_DHCP_ACTION";
case CMD_PRE_DHCP_ACTION_COMPLETE:
return "CMD_PRE_DHCP_ACTION_COMPLETE";
case CMD_READ_PACKET_FILTER:
return "CMD_READ_PACKET_FILTER";
case CMD_REASSOCIATE:
return "CMD_REASSOCIATE";
case CMD_RECONNECT:
return "CMD_RECONNECT";
case CMD_REMOVE_KEEPALIVE_PACKET_FILTER_FROM_APF:
return "CMD_REMOVE_KEEPALIVE_PACKET_FILTER_FROM_APF";
case CMD_RESET_SIM_NETWORKS:
return "CMD_RESET_SIM_NETWORKS";
case CMD_ROAM_WATCHDOG_TIMER:
return "CMD_ROAM_WATCHDOG_TIMER";
case CMD_RSSI_POLL:
return "CMD_RSSI_POLL";
case CMD_RSSI_THRESHOLD_BREACHED:
return "CMD_RSSI_THRESHOLD_BREACHED";
case CMD_SAVE_NETWORK:
return "CMD_SAVE_NETWORK";
case CMD_SCREEN_STATE_CHANGED:
return "CMD_SCREEN_STATE_CHANGED";
case CMD_SET_FALLBACK_PACKET_FILTERING:
return "CMD_SET_FALLBACK_PACKET_FILTERING";
case CMD_SET_SUSPEND_OPT_ENABLED:
return "CMD_SET_SUSPEND_OPT_ENABLED";
case CMD_START_CONNECT:
return "CMD_START_CONNECT";
case CMD_START_FILS_CONNECTION:
return "CMD_START_FILS_CONNECTION";
case CMD_START_IP_PACKET_OFFLOAD:
return "CMD_START_IP_PACKET_OFFLOAD";
case CMD_START_ROAM:
return "CMD_START_ROAM";
case CMD_START_RSSI_MONITORING_OFFLOAD:
return "CMD_START_RSSI_MONITORING_OFFLOAD";
case CMD_STOP_IP_PACKET_OFFLOAD:
return "CMD_STOP_IP_PACKET_OFFLOAD";
case CMD_STOP_RSSI_MONITORING_OFFLOAD:
return "CMD_STOP_RSSI_MONITORING_OFFLOAD";
case CMD_UNWANTED_NETWORK:
return "CMD_UNWANTED_NETWORK";
case CMD_UPDATE_LINKPROPERTIES:
return "CMD_UPDATE_LINKPROPERTIES";
case CMD_ACCEPT_EAP_SERVER_CERTIFICATE:
return "CMD_ACCEPT_EAP_SERVER_CERTIFICATE";
case CMD_REJECT_EAP_INSECURE_CONNECTION:
return "CMD_REJECT_EAP_SERVER_CERTIFICATE";
case WifiMonitor.SUPPLICANT_STATE_CHANGE_EVENT:
return "SUPPLICANT_STATE_CHANGE_EVENT";
case WifiMonitor.AUTHENTICATION_FAILURE_EVENT:
return "AUTHENTICATION_FAILURE_EVENT";
case WifiMonitor.SUP_REQUEST_IDENTITY:
return "SUP_REQUEST_IDENTITY";
case WifiMonitor.NETWORK_CONNECTION_EVENT:
return "NETWORK_CONNECTION_EVENT";
case WifiMonitor.NETWORK_DISCONNECTION_EVENT:
return "NETWORK_DISCONNECTION_EVENT";
case WifiMonitor.ASSOCIATION_REJECTION_EVENT:
return "ASSOCIATION_REJECTION_EVENT";
case WifiMonitor.ANQP_DONE_EVENT:
return "ANQP_DONE_EVENT";
case WifiMonitor.RX_HS20_ANQP_ICON_EVENT:
return "RX_HS20_ANQP_ICON_EVENT";
case WifiMonitor.GAS_QUERY_DONE_EVENT:
return "GAS_QUERY_DONE_EVENT";
case WifiMonitor.HS20_REMEDIATION_EVENT:
return "HS20_REMEDIATION_EVENT";
case WifiMonitor.HS20_DEAUTH_IMMINENT_EVENT:
return "HS20_DEAUTH_IMMINENT_EVENT";
case WifiMonitor.HS20_TERMS_AND_CONDITIONS_ACCEPTANCE_REQUIRED_EVENT:
return "HS20_TERMS_AND_CONDITIONS_ACCEPTANCE_REQUIRED_EVENT";
case WifiMonitor.GAS_QUERY_START_EVENT:
return "GAS_QUERY_START_EVENT";
case WifiMonitor.MBO_OCE_BSS_TM_HANDLING_DONE:
return "MBO_OCE_BSS_TM_HANDLING_DONE";
case WifiMonitor.TRANSITION_DISABLE_INDICATION:
return "TRANSITION_DISABLE_INDICATION";
case WifiP2pServiceImpl.GROUP_CREATING_TIMED_OUT:
return "GROUP_CREATING_TIMED_OUT";
case WifiP2pServiceImpl.P2P_CONNECTION_CHANGED:
return "P2P_CONNECTION_CHANGED";
case WifiP2pServiceImpl.DISCONNECT_WIFI_REQUEST:
return "DISCONNECT_WIFI_REQUEST";
case WifiP2pServiceImpl.DISCONNECT_WIFI_RESPONSE:
return "DISCONNECT_WIFI_RESPONSE";
case WifiP2pServiceImpl.SET_MIRACAST_MODE:
return "SET_MIRACAST_MODE";
case WifiP2pServiceImpl.BLOCK_DISCOVERY:
return "BLOCK_DISCOVERY";
case WifiMonitor.NETWORK_NOT_FOUND_EVENT:
return "NETWORK_NOT_FOUND_EVENT";
case WifiMonitor.TOFU_ROOT_CA_CERTIFICATE:
return "TOFU_ROOT_CA_CERTIFICATE";
default:
return "what:" + what;
}
}
|
Vulnerability Classification:
- CWE: CWE-Other
- CVE: CVE-2023-21242
- Severity: CRITICAL
- CVSS Score: 9.8
Description: [TOFU] Validate full cert chains before displaying dialog
When a full chain including a Root CA is provided by the server,
perform a full validation of the chain before displaying the
TOFU dialog.
If validation passes: Display a TOFU dialog and ask the user if
they trust this network. Saying yes means that the Root can be
installed safely for that network. They might say no - this is
possible if an attacker creates a full chain they control which
results in a different SHA-256 (everything else looks correct).
If they say no, we stop the connection.
If validation fails: Display an error message saying that the
validation failed, we stop the connection and won't display the
TOFU dialog.
Use server certificate pinning for servers that send only a leaf
or a partial chain with no Root CA.
Additionally: clean up the debug logs to reduce the noise and
focus only on the important details.
Bug: 277824547
Test: atest InsecureEapNetworkHandler
Test: Connect to various Enterprise networks
Negative test: Confirm verification fails for invalid chains
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:b0ee00ddf38bb677876a6cffb876e6f511e2c139)
Merged-In: I224c80e2787497634d3e68760122dac5f177585a
Change-Id: I224c80e2787497634d3e68760122dac5f177585a
Function: getWhatToString
File: service/java/com/android/server/wifi/ClientModeImpl.java
Repository: android
Fixed Code:
@Override
protected String getWhatToString(int what) {
switch (what) {
case CMD_ACCEPT_UNVALIDATED:
return "CMD_ACCEPT_UNVALIDATED";
case CMD_ADD_KEEPALIVE_PACKET_FILTER_TO_APF:
return "CMD_ADD_KEEPALIVE_PACKET_FILTER_TO_APF";
case CMD_BLUETOOTH_CONNECTION_STATE_CHANGE:
return "CMD_BLUETOOTH_CONNECTION_STATE_CHANGE";
case CMD_CONFIG_ND_OFFLOAD:
return "CMD_CONFIG_ND_OFFLOAD";
case CMD_CONNECTING_WATCHDOG_TIMER:
return "CMD_CONNECTING_WATCHDOG_TIMER";
case CMD_CONNECT_NETWORK:
return "CMD_CONNECT_NETWORK";
case CMD_DIAGS_CONNECT_TIMEOUT:
return "CMD_DIAGS_CONNECT_TIMEOUT";
case CMD_DISCONNECT:
return "CMD_DISCONNECT";
case CMD_ENABLE_RSSI_POLL:
return "CMD_ENABLE_RSSI_POLL";
case CMD_INSTALL_PACKET_FILTER:
return "CMD_INSTALL_PACKET_FILTER";
case CMD_IP_CONFIGURATION_LOST:
return "CMD_IP_CONFIGURATION_LOST";
case CMD_IP_CONFIGURATION_SUCCESSFUL:
return "CMD_IP_CONFIGURATION_SUCCESSFUL";
case CMD_IP_REACHABILITY_LOST:
return "CMD_IP_REACHABILITY_LOST";
case CMD_IP_REACHABILITY_FAILURE:
return "CMD_IP_REACHABILITY_FAILURE";
case CMD_IPV4_PROVISIONING_FAILURE:
return "CMD_IPV4_PROVISIONING_FAILURE";
case CMD_IPV4_PROVISIONING_SUCCESS:
return "CMD_IPV4_PROVISIONING_SUCCESS";
case CMD_NETWORK_STATUS:
return "CMD_NETWORK_STATUS";
case CMD_ONESHOT_RSSI_POLL:
return "CMD_ONESHOT_RSSI_POLL";
case CMD_POST_DHCP_ACTION:
return "CMD_POST_DHCP_ACTION";
case CMD_PRE_DHCP_ACTION:
return "CMD_PRE_DHCP_ACTION";
case CMD_PRE_DHCP_ACTION_COMPLETE:
return "CMD_PRE_DHCP_ACTION_COMPLETE";
case CMD_READ_PACKET_FILTER:
return "CMD_READ_PACKET_FILTER";
case CMD_REASSOCIATE:
return "CMD_REASSOCIATE";
case CMD_RECONNECT:
return "CMD_RECONNECT";
case CMD_REMOVE_KEEPALIVE_PACKET_FILTER_FROM_APF:
return "CMD_REMOVE_KEEPALIVE_PACKET_FILTER_FROM_APF";
case CMD_RESET_SIM_NETWORKS:
return "CMD_RESET_SIM_NETWORKS";
case CMD_ROAM_WATCHDOG_TIMER:
return "CMD_ROAM_WATCHDOG_TIMER";
case CMD_RSSI_POLL:
return "CMD_RSSI_POLL";
case CMD_RSSI_THRESHOLD_BREACHED:
return "CMD_RSSI_THRESHOLD_BREACHED";
case CMD_SAVE_NETWORK:
return "CMD_SAVE_NETWORK";
case CMD_SCREEN_STATE_CHANGED:
return "CMD_SCREEN_STATE_CHANGED";
case CMD_SET_FALLBACK_PACKET_FILTERING:
return "CMD_SET_FALLBACK_PACKET_FILTERING";
case CMD_SET_SUSPEND_OPT_ENABLED:
return "CMD_SET_SUSPEND_OPT_ENABLED";
case CMD_START_CONNECT:
return "CMD_START_CONNECT";
case CMD_START_FILS_CONNECTION:
return "CMD_START_FILS_CONNECTION";
case CMD_START_IP_PACKET_OFFLOAD:
return "CMD_START_IP_PACKET_OFFLOAD";
case CMD_START_ROAM:
return "CMD_START_ROAM";
case CMD_START_RSSI_MONITORING_OFFLOAD:
return "CMD_START_RSSI_MONITORING_OFFLOAD";
case CMD_STOP_IP_PACKET_OFFLOAD:
return "CMD_STOP_IP_PACKET_OFFLOAD";
case CMD_STOP_RSSI_MONITORING_OFFLOAD:
return "CMD_STOP_RSSI_MONITORING_OFFLOAD";
case CMD_UNWANTED_NETWORK:
return "CMD_UNWANTED_NETWORK";
case CMD_UPDATE_LINKPROPERTIES:
return "CMD_UPDATE_LINKPROPERTIES";
case CMD_ACCEPT_EAP_SERVER_CERTIFICATE:
return "CMD_ACCEPT_EAP_SERVER_CERTIFICATE";
case CMD_REJECT_EAP_INSECURE_CONNECTION:
return "CMD_REJECT_EAP_SERVER_CERTIFICATE";
case WifiMonitor.SUPPLICANT_STATE_CHANGE_EVENT:
return "SUPPLICANT_STATE_CHANGE_EVENT";
case WifiMonitor.AUTHENTICATION_FAILURE_EVENT:
return "AUTHENTICATION_FAILURE_EVENT";
case WifiMonitor.SUP_REQUEST_IDENTITY:
return "SUP_REQUEST_IDENTITY";
case WifiMonitor.NETWORK_CONNECTION_EVENT:
return "NETWORK_CONNECTION_EVENT";
case WifiMonitor.NETWORK_DISCONNECTION_EVENT:
return "NETWORK_DISCONNECTION_EVENT";
case WifiMonitor.ASSOCIATION_REJECTION_EVENT:
return "ASSOCIATION_REJECTION_EVENT";
case WifiMonitor.ANQP_DONE_EVENT:
return "ANQP_DONE_EVENT";
case WifiMonitor.RX_HS20_ANQP_ICON_EVENT:
return "RX_HS20_ANQP_ICON_EVENT";
case WifiMonitor.GAS_QUERY_DONE_EVENT:
return "GAS_QUERY_DONE_EVENT";
case WifiMonitor.HS20_REMEDIATION_EVENT:
return "HS20_REMEDIATION_EVENT";
case WifiMonitor.HS20_DEAUTH_IMMINENT_EVENT:
return "HS20_DEAUTH_IMMINENT_EVENT";
case WifiMonitor.HS20_TERMS_AND_CONDITIONS_ACCEPTANCE_REQUIRED_EVENT:
return "HS20_TERMS_AND_CONDITIONS_ACCEPTANCE_REQUIRED_EVENT";
case WifiMonitor.GAS_QUERY_START_EVENT:
return "GAS_QUERY_START_EVENT";
case WifiMonitor.MBO_OCE_BSS_TM_HANDLING_DONE:
return "MBO_OCE_BSS_TM_HANDLING_DONE";
case WifiMonitor.TRANSITION_DISABLE_INDICATION:
return "TRANSITION_DISABLE_INDICATION";
case WifiP2pServiceImpl.GROUP_CREATING_TIMED_OUT:
return "GROUP_CREATING_TIMED_OUT";
case WifiP2pServiceImpl.P2P_CONNECTION_CHANGED:
return "P2P_CONNECTION_CHANGED";
case WifiP2pServiceImpl.DISCONNECT_WIFI_REQUEST:
return "DISCONNECT_WIFI_REQUEST";
case WifiP2pServiceImpl.DISCONNECT_WIFI_RESPONSE:
return "DISCONNECT_WIFI_RESPONSE";
case WifiP2pServiceImpl.SET_MIRACAST_MODE:
return "SET_MIRACAST_MODE";
case WifiP2pServiceImpl.BLOCK_DISCOVERY:
return "BLOCK_DISCOVERY";
case WifiMonitor.NETWORK_NOT_FOUND_EVENT:
return "NETWORK_NOT_FOUND_EVENT";
case WifiMonitor.TOFU_CERTIFICATE_EVENT:
return "TOFU_CERTIFICATE_EVENT";
default:
return "what:" + what;
}
}
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
getWhatToString
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 1
|
Analyze the following code function for security vulnerabilities
|
protected String getSubjectEventFormSql(String studyIds, String sedIds, String itemIds, String dateConstraint, int datasetItemStatusId) {
return "select ss.oc_oid as study_subject_oid, sed.ordinal as definition_order, sed.oc_oid as definition_oid,"
+ " sed.repeating as definition_repeating, se.sample_ordinal as sample_ordinal, edc.ordinal as crf_order, "
+ " cv.oc_oid as crf_version_oid, ec.event_crf_id from (select study_event_id, study_event_definition_id, study_subject_id,"
+ " sample_ordinal from study_event where study_event_definition_id in " + sedIds
+ " and study_subject_id in (select ss.study_subject_id from study_subject ss where ss.study_id in (" + studyIds + ") " + dateConstraint
+ ")) se, (select ss.oc_oid, ss.study_subject_id from study_subject ss where ss.study_id in (" + studyIds + ") " + dateConstraint + ") ss,"
+ " study_event_definition sed, event_definition_crf edc,"
+ " (select event_crf_id, crf_version_id, study_event_id from event_crf where event_crf_id in ("
+ getEventCrfIdsByItemDataSql(studyIds, sedIds, itemIds, dateConstraint, datasetItemStatusId) + ")) ec, crf_version cv"
+ " where sed.study_event_definition_id in " + sedIds
+ " and sed.study_event_definition_id = se.study_event_definition_id and se.study_subject_id = ss.study_subject_id"
+ " and sed.study_event_definition_id = edc.study_event_definition_id and se.study_event_id = ec.study_event_id"
+ " and edc.crf_id = cv.crf_id and ec.crf_version_id = cv.crf_version_id order by ss.oc_oid, sed.ordinal, se.sample_ordinal, edc.ordinal";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSubjectEventFormSql
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
|
getSubjectEventFormSql
|
core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
|
b152cc63019230c9973965a98e4386ea5322c18f
| 0
|
Analyze the following code function for security vulnerabilities
|
private PostgresClient createInvalidJson(TestContext context) {
String schema = PostgresClient.convertToPsqlStandard(TENANT);
postgresClient = createTable(context, TENANT, INVALID_JSON,
"id UUID PRIMARY KEY, jsonb VARCHAR(99) NOT NULL");
execute(context, "INSERT INTO " + schema + "." + INVALID_JSON + " VALUES "
+"('" + INVALID_JSON_UUID + "', '}');");
return postgresClient;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createInvalidJson
File: domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
createInvalidJson
|
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequestMapping("/shop/category/{friendlyUrl}.html/ref={ref}")
public String displayCategoryWithReference(@PathVariable final String friendlyUrl, @PathVariable final String ref, Model model, HttpServletRequest request, HttpServletResponse response, Locale locale) throws Exception {
return this.displayCategory(friendlyUrl,ref,model,request,response,locale);
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2021-33561
- Severity: LOW
- CVSS Score: 3.5
Description: xss robustness
Function: displayCategoryWithReference
File: sm-shop/src/main/java/com/salesmanager/shop/store/controller/category/ShoppingCategoryController.java
Repository: shopizer-ecommerce/shopizer
Fixed Code:
@RequestMapping("/shop/category/{friendlyUrl}.html/ref={ref}")
public String displayCategoryWithReference(@PathVariable final String friendlyUrl, @PathVariable final String ref, Model model, HttpServletRequest request, HttpServletResponse response, Locale locale) throws Exception {
return this.displayCategory(friendlyUrl,ref,model,request,response,locale);
}
|
[
"CWE-79"
] |
CVE-2021-33561
|
LOW
| 3.5
|
shopizer-ecommerce/shopizer
|
displayCategoryWithReference
|
sm-shop/src/main/java/com/salesmanager/shop/store/controller/category/ShoppingCategoryController.java
|
197f8c78c8f673b957e41ca2c823afc654c19271
| 1
|
Analyze the following code function for security vulnerabilities
|
private boolean updateProfilePictureAndName(Profile authUser, User u) {
boolean update = false;
if (!StringUtils.equals(u.getPicture(), authUser.getPicture())
&& !gravatarAvatarGenerator.isLink(authUser.getPicture())
&& !CONF.avatarEditsEnabled()) {
authUser.setPicture(u.getPicture());
update = true;
}
if (!CONF.nameEditsEnabled() && !StringUtils.equals(u.getName(), authUser.getName())) {
authUser.setName(u.getName());
update = true;
}
if (!StringUtils.equals(u.getName(), authUser.getOriginalName())) {
authUser.setOriginalName(u.getName());
update = true;
}
return update;
}
|
Vulnerability Classification:
- CWE: CWE-130
- CVE: CVE-2022-1543
- Severity: MEDIUM
- CVSS Score: 6.5
Description: fixed profile name not limited in length
Function: updateProfilePictureAndName
File: src/main/java/com/erudika/scoold/utils/ScooldUtils.java
Repository: Erudika/scoold
Fixed Code:
private boolean updateProfilePictureAndName(Profile authUser, User u) {
boolean update = false;
if (!StringUtils.equals(u.getPicture(), authUser.getPicture())
&& !gravatarAvatarGenerator.isLink(authUser.getPicture())
&& !CONF.avatarEditsEnabled()) {
authUser.setPicture(u.getPicture());
update = true;
}
if (!CONF.nameEditsEnabled() && !StringUtils.equals(u.getName(), authUser.getName())) {
authUser.setName(StringUtils.abbreviate(u.getName(), 256));
update = true;
}
if (!StringUtils.equals(u.getName(), authUser.getOriginalName())) {
authUser.setOriginalName(u.getName());
update = true;
}
return update;
}
|
[
"CWE-130"
] |
CVE-2022-1543
|
MEDIUM
| 6.5
|
Erudika/scoold
|
updateProfilePictureAndName
|
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 1
|
Analyze the following code function for security vulnerabilities
|
public float getLineWidth(int line) {
float margin = getParagraphLeadingMargin(line);
float signedExtent = getLineExtent(line, true);
return margin + (signedExtent >= 0 ? signedExtent : -signedExtent);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLineWidth
File: core/java/android/text/Layout.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-9452
|
MEDIUM
| 4.3
|
android
|
getLineWidth
|
core/java/android/text/Layout.java
|
3b6f84b77c30ec0bab5147b0cffc192c86ba2634
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String getAttributeValue(Node node, String name) {
Node attr = getAttribute(node, name);
return (attr != null)? attr.getNodeValue():null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAttributeValue
File: src/edu/stanford/nlp/util/XMLUtils.java
Repository: stanfordnlp/CoreNLP
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-3869
|
MEDIUM
| 5
|
stanfordnlp/CoreNLP
|
getAttributeValue
|
src/edu/stanford/nlp/util/XMLUtils.java
|
5d83f1e8482ca304db8be726cad89554c88f136a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Rect getBounds() {
// The window bounds are used for layout in screen coordinates. If the token has bounds for
// size compatibility mode, its configuration bounds are app based coordinates which should
// not be used for layout.
return mToken.hasSizeCompatBounds() ? mToken.getBounds() : super.getBounds();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getBounds
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
|
getBounds
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isForbiddenPath(String path) {
return path.equalsIgnoreCase("/meta-inf/")
|| path.regionMatches(true, 0, "/web-inf/", 0, "/web-inf/".length());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isForbiddenPath
File: servlet/src/main/java/io/undertow/servlet/handlers/ServletInitialHandler.java
Repository: undertow-io/undertow
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2019-10184
|
MEDIUM
| 5
|
undertow-io/undertow
|
isForbiddenPath
|
servlet/src/main/java/io/undertow/servlet/handlers/ServletInitialHandler.java
|
d2715e3afa13f50deaa19643676816ce391551e9
| 0
|
Analyze the following code function for security vulnerabilities
|
private SingleButtonPanel addNewAjaxActionButton(final AjaxCallback ajaxCallback, final String label, final String... classnames)
{
final AjaxButton button = new AjaxButton("button", form) {
private static final long serialVersionUID = -5306532706450731336L;
@Override
protected void onSubmit(final AjaxRequestTarget target, final Form< ? > form)
{
ajaxCallback.callback(target);
}
@Override
protected void onError(final AjaxRequestTarget target, final Form< ? > form)
{
if (ajaxCallback instanceof AjaxFormSubmitCallback) {
((AjaxFormSubmitCallback) ajaxCallback).onError(target, form);
}
}
};
final SingleButtonPanel buttonPanel = new SingleButtonPanel(this.actionButtons.newChildId(), button, label, classnames);
buttonPanel.add(button);
return buttonPanel;
}
|
Vulnerability Classification:
- CWE: CWE-352
- CVE: CVE-2013-7251
- Severity: MEDIUM
- CVSS Score: 6.8
Description: CSRF protection.
Function: addNewAjaxActionButton
File: src/main/java/org/projectforge/web/dialog/ModalDialog.java
Repository: micromata/projectforge-webapp
Fixed Code:
private SingleButtonPanel addNewAjaxActionButton(final AjaxCallback ajaxCallback, final String label, final String... classnames)
{
final AjaxButton button = new AjaxButton("button", form) {
private static final long serialVersionUID = -5306532706450731336L;
@Override
protected void onSubmit(final AjaxRequestTarget target, final Form< ? > form)
{
csrfTokenHandler.onSubmit();
ajaxCallback.callback(target);
}
@Override
protected void onError(final AjaxRequestTarget target, final Form< ? > form)
{
if (ajaxCallback instanceof AjaxFormSubmitCallback) {
((AjaxFormSubmitCallback) ajaxCallback).onError(target, form);
}
}
};
final SingleButtonPanel buttonPanel = new SingleButtonPanel(this.actionButtons.newChildId(), button, label, classnames);
buttonPanel.add(button);
return buttonPanel;
}
|
[
"CWE-352"
] |
CVE-2013-7251
|
MEDIUM
| 6.8
|
micromata/projectforge-webapp
|
addNewAjaxActionButton
|
src/main/java/org/projectforge/web/dialog/ModalDialog.java
|
422de35e3c3141e418a73bfb39b430d5fd74077e
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public void addPackageDependency(String packageName) {
synchronized (this) {
int callingPid = Binder.getCallingPid();
if (callingPid == myPid()) {
// Yeah, um, no.
return;
}
ProcessRecord proc;
synchronized (mPidsSelfLocked) {
proc = mPidsSelfLocked.get(Binder.getCallingPid());
}
if (proc != null) {
if (proc.pkgDeps == null) {
proc.pkgDeps = new ArraySet<String>(1);
}
proc.pkgDeps.add(packageName);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addPackageDependency
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
|
addPackageDependency
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
private void cancel(String accountName, String remotePath, @Nullable ResultCode resultCode) {
Pair<UploadFileOperation, String> removeResult = mPendingUploads.remove(accountName, remotePath);
UploadFileOperation upload = removeResult.first;
if (upload == null && mCurrentUpload != null && mCurrentAccount != null &&
mCurrentUpload.getRemotePath().startsWith(remotePath) && accountName.equals(mCurrentAccount.name)) {
upload = mCurrentUpload;
}
if (upload != null) {
upload.cancel(resultCode);
// need to update now table in mUploadsStorageManager,
// since the operation will not get to be run by FileUploader#uploadFile
if (resultCode != null) {
mUploadsStorageManager.updateDatabaseUploadResult(new RemoteOperationResult(resultCode), upload);
notifyUploadResult(upload, new RemoteOperationResult(resultCode));
} else {
mUploadsStorageManager.removeUpload(accountName, remotePath);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cancel
File: app/src/main/java/com/owncloud/android/files/services/FileUploader.java
Repository: nextcloud/android
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-39210
|
MEDIUM
| 5.5
|
nextcloud/android
|
cancel
|
app/src/main/java/com/owncloud/android/files/services/FileUploader.java
|
cd3bd0845a97e1d43daa0607a122b66b0068c751
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<Map.Entry<Collection, Long>> getCollectionsWithBitstreamSizesTotal(Context context)
throws SQLException {
return collectionDAO.getCollectionsWithBitstreamSizesTotal(context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCollectionsWithBitstreamSizesTotal
File: dspace-api/src/main/java/org/dspace/content/CollectionServiceImpl.java
Repository: DSpace
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-41189
|
HIGH
| 9
|
DSpace
|
getCollectionsWithBitstreamSizesTotal
|
dspace-api/src/main/java/org/dspace/content/CollectionServiceImpl.java
|
277b499a5cd3a4f5eb2370513a1b7e4ec2a6e041
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void processRefs(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
File gitDir;
boolean upload;
sessionManager.openSession();
try {
String pathInfo = request.getRequestURI().substring(request.getContextPath().length());
pathInfo = StringUtils.stripStart(pathInfo, "/");
String projectInfo = pathInfo.substring(0, pathInfo.length() - INFO_REFS.length());
Project project = getProject(request, response, projectInfo);
String service = request.getParameter("service");
gitDir = storageManager.getProjectGitDir(project.getId());
if (service.contains("upload")) {
checkPullPermission(request, project);
writeInitial(response, service);
upload = true;
} else {
if (!SecurityUtils.canWriteCode(project))
throw new UnauthorizedException("You do not have permission to push to this project.");
writeInitial(response, service);
upload = false;
}
} finally {
sessionManager.closeSession();
}
OutputStream os = new OutputStreamWrapper(response.getOutputStream()) {
@Override
public void close() throws IOException {
}
};
String protocolVersion = request.getHeader("Git-Protocol");
if (upload)
new AdvertiseUploadRefsCommand(gitDir).protocol(protocolVersion).output(os).call();
else
new AdvertiseReceiveRefsCommand(gitDir).protocol(protocolVersion).output(os).call();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: processRefs
File: server-core/src/main/java/io/onedev/server/git/GitFilter.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2022-39205
|
CRITICAL
| 9.8
|
theonedev/onedev
|
processRefs
|
server-core/src/main/java/io/onedev/server/git/GitFilter.java
|
f1e97688e4e19d6de1dfa1d00e04655209d39f8e
| 0
|
Analyze the following code function for security vulnerabilities
|
protected Map<KexProposalOption, String> negotiate() throws Exception {
Map<KexProposalOption, String> c2sOptions = getClientKexProposals();
Map<KexProposalOption, String> s2cOptions = getServerKexProposals();
signalNegotiationStart(c2sOptions, s2cOptions);
Map<KexProposalOption, String> guess = new EnumMap<>(KexProposalOption.class);
Map<KexProposalOption, String> negotiatedGuess = Collections.unmodifiableMap(guess);
try {
boolean debugEnabled = log.isDebugEnabled();
boolean traceEnabled = log.isTraceEnabled();
SessionDisconnectHandler discHandler = getSessionDisconnectHandler();
KexExtensionHandler extHandler = getKexExtensionHandler();
for (KexProposalOption paramType : KexProposalOption.VALUES) {
String clientParamValue = c2sOptions.get(paramType);
String serverParamValue = s2cOptions.get(paramType);
String[] c = GenericUtils.split(clientParamValue, ',');
String[] s = GenericUtils.split(serverParamValue, ',');
/*
* According to https://tools.ietf.org/html/rfc8308#section-2.2:
*
* Implementations MAY disconnect if the counterpart sends an incorrect (KEX extension) indicator
*
* TODO - for now we do not enforce this
*/
for (String ci : c) {
for (String si : s) {
if (ci.equals(si)) {
guess.put(paramType, ci);
break;
}
}
String value = guess.get(paramType);
if (value != null) {
break;
}
}
// check if reached an agreement
String value = guess.get(paramType);
if (extHandler != null) {
extHandler.handleKexExtensionNegotiation(
this, paramType, value, c2sOptions, clientParamValue, s2cOptions, serverParamValue);
}
if (value != null) {
if (traceEnabled) {
log.trace("negotiate({})[{}] guess={} (client={} / server={})",
this, paramType.getDescription(), value, clientParamValue, serverParamValue);
}
continue;
}
try {
if ((discHandler != null)
&& discHandler.handleKexDisconnectReason(
this, c2sOptions, s2cOptions, negotiatedGuess, paramType)) {
if (debugEnabled) {
log.debug("negotiate({}) ignore missing value for KEX option={}", this, paramType);
}
continue;
}
} catch (IOException | RuntimeException e) {
// If disconnect handler throws an exception continue with the disconnect
debug("negotiate({}) failed ({}) to invoke disconnect handler due to mismatched KEX option={}: {}",
this, e.getClass().getSimpleName(), paramType, e.getMessage(), e);
}
String message = "Unable to negotiate key exchange for " + paramType.getDescription()
+ " (client: " + clientParamValue + " / server: " + serverParamValue + ")";
// OK if could not negotiate languages
if (KexProposalOption.S2CLANG.equals(paramType) || KexProposalOption.C2SLANG.equals(paramType)) {
if (traceEnabled) {
log.trace("negotiate({}) {}", this, message);
}
} else {
throw new SshException(SshConstants.SSH2_DISCONNECT_KEY_EXCHANGE_FAILED, message);
}
}
/*
* According to https://tools.ietf.org/html/rfc8308#section-2.2:
*
* If "ext-info-c" or "ext-info-s" ends up being negotiated as a key exchange method, the parties MUST
* disconnect.
*/
String kexOption = guess.get(KexProposalOption.ALGORITHMS);
if (KexExtensions.IS_KEX_EXTENSION_SIGNAL.test(kexOption)) {
if ((discHandler != null)
&& discHandler.handleKexDisconnectReason(
this, c2sOptions, s2cOptions, negotiatedGuess, KexProposalOption.ALGORITHMS)) {
if (debugEnabled) {
log.debug("negotiate({}) ignore violating {} KEX option={}", this, KexProposalOption.ALGORITHMS,
kexOption);
}
} else {
throw new SshException(SshConstants.SSH2_DISCONNECT_KEY_EXCHANGE_FAILED,
"Illegal KEX option negotiated: " + kexOption);
}
}
} catch (IOException | RuntimeException | Error e) {
signalNegotiationEnd(c2sOptions, s2cOptions, negotiatedGuess, e);
throw e;
}
signalNegotiationEnd(c2sOptions, s2cOptions, negotiatedGuess, null);
return setNegotiationResult(guess);
}
|
Vulnerability Classification:
- CWE: CWE-354
- CVE: CVE-2023-48795
- Severity: MEDIUM
- CVSS Score: 5.9
Description: GH-445: OpenSSH "strict KEX" protocol extension
Implements the OpenSSH "strict KEX" protocol extension.[1] If both
parties in a an SSH connection announce support for strict KEX in the
initial KEX_INIT message, strict KEX is active; otherwise it isn't.
With strict KEX active, there must be only KEX-related messages during
the initial key exchange (no IGNORE or DEBUG messages are allowed), and
the KEX_INIT message must be the first one to have been received after
the initial version exchange. If these conditions are violated, the
connection is terminated.
Strict KEX also resets message sequence numbers to zero after each
NEW_KEYS message sent or received.
[1] https://github.com/openssh/openssh-portable/blob/master/PROTOCOL
Function: negotiate
File: sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
Repository: apache/mina-sshd
Fixed Code:
protected Map<KexProposalOption, String> negotiate() throws Exception {
Map<KexProposalOption, String> c2sOptions = getClientKexProposals();
Map<KexProposalOption, String> s2cOptions = getServerKexProposals();
signalNegotiationStart(c2sOptions, s2cOptions);
// Make modifiable. Strict KEX flags are to be heeded only in initial KEX, and to be ignored afterwards.
c2sOptions = new EnumMap<>(c2sOptions);
s2cOptions = new EnumMap<>(s2cOptions);
boolean strictKexClient = removeValue(c2sOptions, KexProposalOption.ALGORITHMS,
KexExtensions.STRICT_KEX_CLIENT_EXTENSION);
boolean strictKexServer = removeValue(s2cOptions, KexProposalOption.ALGORITHMS,
KexExtensions.STRICT_KEX_SERVER_EXTENSION);
if (removeValue(c2sOptions, KexProposalOption.ALGORITHMS, KexExtensions.STRICT_KEX_SERVER_EXTENSION)
&& !initialKexDone) {
log.warn("negotiate({}) client proposal contains server flag {}; will be ignored", this,
KexExtensions.STRICT_KEX_SERVER_EXTENSION);
}
if (removeValue(s2cOptions, KexProposalOption.ALGORITHMS, KexExtensions.STRICT_KEX_CLIENT_EXTENSION)
&& !initialKexDone) {
log.warn("negotiate({}) server proposal contains client flag {}; will be ignored", this,
KexExtensions.STRICT_KEX_CLIENT_EXTENSION);
}
// Make unmodifiable again
c2sOptions = Collections.unmodifiableMap(c2sOptions);
s2cOptions = Collections.unmodifiableMap(s2cOptions);
Map<KexProposalOption, String> guess = new EnumMap<>(KexProposalOption.class);
Map<KexProposalOption, String> negotiatedGuess = Collections.unmodifiableMap(guess);
try {
boolean debugEnabled = log.isDebugEnabled();
boolean traceEnabled = log.isTraceEnabled();
if (!initialKexDone) {
strictKex = strictKexClient && strictKexServer;
if (debugEnabled) {
log.debug("negotiate({}) strict KEX={} client={} server={}", this, strictKex, strictKexClient,
strictKexServer);
}
if (strictKex && initialKexInitSequenceNumber != 1) {
throw new SshException(SshConstants.SSH2_DISCONNECT_KEY_EXCHANGE_FAILED,
"Strict KEX negotiated but sequence number of first KEX_INIT received is not 1: "
+ initialKexInitSequenceNumber);
}
}
SessionDisconnectHandler discHandler = getSessionDisconnectHandler();
KexExtensionHandler extHandler = getKexExtensionHandler();
for (KexProposalOption paramType : KexProposalOption.VALUES) {
String clientParamValue = c2sOptions.get(paramType);
String serverParamValue = s2cOptions.get(paramType);
String[] c = GenericUtils.split(clientParamValue, ',');
String[] s = GenericUtils.split(serverParamValue, ',');
/*
* According to https://tools.ietf.org/html/rfc8308#section-2.2:
*
* Implementations MAY disconnect if the counterpart sends an incorrect (KEX extension) indicator
*
* TODO - for now we do not enforce this
*/
for (String ci : c) {
for (String si : s) {
if (ci.equals(si)) {
guess.put(paramType, ci);
break;
}
}
String value = guess.get(paramType);
if (value != null) {
break;
}
}
// check if reached an agreement
String value = guess.get(paramType);
if (extHandler != null) {
extHandler.handleKexExtensionNegotiation(
this, paramType, value, c2sOptions, clientParamValue, s2cOptions, serverParamValue);
}
if (value != null) {
if (traceEnabled) {
log.trace("negotiate({})[{}] guess={} (client={} / server={})",
this, paramType.getDescription(), value, clientParamValue, serverParamValue);
}
continue;
}
try {
if ((discHandler != null)
&& discHandler.handleKexDisconnectReason(
this, c2sOptions, s2cOptions, negotiatedGuess, paramType)) {
if (debugEnabled) {
log.debug("negotiate({}) ignore missing value for KEX option={}", this, paramType);
}
continue;
}
} catch (IOException | RuntimeException e) {
// If disconnect handler throws an exception continue with the disconnect
debug("negotiate({}) failed ({}) to invoke disconnect handler due to mismatched KEX option={}: {}",
this, e.getClass().getSimpleName(), paramType, e.getMessage(), e);
}
String message = "Unable to negotiate key exchange for " + paramType.getDescription()
+ " (client: " + clientParamValue + " / server: " + serverParamValue + ")";
// OK if could not negotiate languages
if (KexProposalOption.S2CLANG.equals(paramType) || KexProposalOption.C2SLANG.equals(paramType)) {
if (traceEnabled) {
log.trace("negotiate({}) {}", this, message);
}
} else {
throw new SshException(SshConstants.SSH2_DISCONNECT_KEY_EXCHANGE_FAILED, message);
}
}
/*
* According to https://tools.ietf.org/html/rfc8308#section-2.2:
*
* If "ext-info-c" or "ext-info-s" ends up being negotiated as a key exchange method, the parties MUST
* disconnect.
*/
String kexOption = guess.get(KexProposalOption.ALGORITHMS);
if (KexExtensions.IS_KEX_EXTENSION_SIGNAL.test(kexOption)) {
if ((discHandler != null)
&& discHandler.handleKexDisconnectReason(
this, c2sOptions, s2cOptions, negotiatedGuess, KexProposalOption.ALGORITHMS)) {
if (debugEnabled) {
log.debug("negotiate({}) ignore violating {} KEX option={}", this, KexProposalOption.ALGORITHMS,
kexOption);
}
} else {
throw new SshException(SshConstants.SSH2_DISCONNECT_KEY_EXCHANGE_FAILED,
"Illegal KEX option negotiated: " + kexOption);
}
}
} catch (IOException | RuntimeException | Error e) {
signalNegotiationEnd(c2sOptions, s2cOptions, negotiatedGuess, e);
throw e;
}
signalNegotiationEnd(c2sOptions, s2cOptions, negotiatedGuess, null);
return setNegotiationResult(guess);
}
|
[
"CWE-354"
] |
CVE-2023-48795
|
MEDIUM
| 5.9
|
apache/mina-sshd
|
negotiate
|
sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
|
6b0fd46f64bcb75eeeee31d65f10242660aad7c1
| 1
|
Analyze the following code function for security vulnerabilities
|
public static void init(Context context) {
if (sSyncStorageEngine != null) {
return;
}
// This call will return the correct directory whether Encrypted File Systems is
// enabled or not.
File dataDir = Environment.getSecureDataDirectory();
sSyncStorageEngine = new SyncStorageEngine(context, dataDir);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: init
File: services/core/java/com/android/server/content/SyncStorageEngine.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2016-2424
|
HIGH
| 7.1
|
android
|
init
|
services/core/java/com/android/server/content/SyncStorageEngine.java
|
d3383d5bfab296ba3adbc121ff8a7b542bde4afb
| 0
|
Analyze the following code function for security vulnerabilities
|
public ArtemisSecurityConfiguration build() {
validate();
return new ArtemisSecurityConfiguration(testClass, testMethod, executionPath, whitelistedClassNames,
Optional.ofNullable(whitelistedPaths), blacklistedPaths, allowedLocalPorts, allowLocalPortsAbove,
excludedLocalPorts, allowedThreadCount, blacklistedPackages, whitelistedPackages, trustedPackages,
threadTrustScope);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: build
File: src/main/java/de/tum/in/test/api/security/ArtemisSecurityConfigurationBuilder.java
Repository: ls1intum/Ares
The code follows secure coding practices.
|
[
"CWE-501",
"CWE-653"
] |
CVE-2024-23682
|
HIGH
| 8.2
|
ls1intum/Ares
|
build
|
src/main/java/de/tum/in/test/api/security/ArtemisSecurityConfigurationBuilder.java
|
4c146ff85a0fa6022087fb0cffa6b8021d51101f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void initialize(Subject subject, CallbackHandler handler, Map sharedState, Map options)
{
addValidOptions(ALL_VALID_OPTIONS);
super.initialize(subject, handler, sharedState, options);
trace = log.isTraceEnabled();
// Search Context Settings
bindAuthentication = (String) options.get(BIND_AUTHENTICATION);
bindDn = (String) options.get(BIND_DN);
bindCredential = (String) options.get(BIND_CREDENTIAL);
try
{
//Check if the credential is vaultified
if(bindCredential != null && SecurityVaultUtil.isVaultFormat(bindCredential))
{
bindCredential = SecurityVaultUtil.getValueAsString(bindCredential);
}
}
catch (SecurityVaultException e)
{
log.warn("Unable to obtain bindCredentials from Vault: ", e);
}
jaasSecurityDomain = (String) options.get(SECURITY_DOMAIN);
// User Search Settings
baseCtxDN = (String) options.get(BASE_CTX_DN);
baseFilter = (String) options.get(BASE_FILTER);
String temp = (String) options.get(SEARCH_TIME_LIMIT);
if (temp != null)
{
try
{
searchTimeLimit = Integer.parseInt(temp);
}
catch (NumberFormatException e)
{
log.warn("Failed to parse: " + temp + ", using searchTimeLimit=" + searchTimeLimit);
}
}
userSearchControls = new SearchControls();
userSearchControls.setSearchScope(SearchControls.SUBTREE_SCOPE);
userSearchControls.setReturningAttributes(new String[0]);
userSearchControls.setTimeLimit(searchTimeLimit);
rolesCtxDN = (String) options.get(ROLES_CTS_DN);
roleFilter = (String) options.get(ROLE_FILTER);
referralUserAttributeIDToCheck = (String) options.get(REFERRAL_USER_ATTRIBUTE_ID_TO_CHECK);
temp = (String) options.get(RECURSE_ROLES);
recurseRoles = Boolean.parseBoolean(temp);
int searchScope = SearchControls.SUBTREE_SCOPE;
temp = (String) options.get(ROLE_SEARCH_SCOPE);
if (OBJECT_SCOPE.equalsIgnoreCase(temp))
{
searchScope = SearchControls.OBJECT_SCOPE;
}
else if (ONELEVEL_SCOPE.equalsIgnoreCase(temp))
{
searchScope = SearchControls.ONELEVEL_SCOPE;
}
if (SUBTREE_SCOPE.equalsIgnoreCase(temp))
{
searchScope = SearchControls.SUBTREE_SCOPE;
}
roleSearchControls = new SearchControls();
roleSearchControls.setSearchScope(searchScope);
roleSearchControls.setTimeLimit(searchTimeLimit);
roleAttributeID = (String) options.get(ROLE_ATTRIBUTE_ID);
temp = (String) options.get(ROLE_ATTRIBUTE_IS_DN);
roleAttributeIsDN = Boolean.parseBoolean(temp);
roleNameAttributeID = (String) options.get(ROLE_NAME_ATTRIBUTE_ID);
ArrayList<String> roleSearchAttributeList = new ArrayList<String>(3);
if (roleAttributeID != null)
{
roleSearchAttributeList.add(roleAttributeID);
}
if (roleNameAttributeID != null)
{
roleSearchAttributeList.add(roleNameAttributeID);
}
if (referralUserAttributeIDToCheck != null)
{
roleSearchAttributeList.add(referralUserAttributeIDToCheck);
}
roleSearchControls.setReturningAttributes(roleSearchAttributeList.toArray(new String[0]));
temp = (String) options.get(ALLOW_EMPTY_PASSWORD);
allowEmptyPassword = Boolean.parseBoolean(temp);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initialize
File: jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/AdvancedLdapLoginModule.java
Repository: wildfly-security/jboss-negotiation
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2015-1849
|
MEDIUM
| 4.3
|
wildfly-security/jboss-negotiation
|
initialize
|
jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/AdvancedLdapLoginModule.java
|
0dc9d191b6eb1d13b8f0189c5b02ba6576f4722e
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean verifySignature(
byte[] message,
BigInteger r,
BigInteger s)
{
DSAParameters params = key.getParameters();
BigInteger q = params.getQ();
BigInteger m = calculateE(q, message);
BigInteger zero = BigInteger.valueOf(0);
if (zero.compareTo(r) >= 0 || q.compareTo(r) <= 0)
{
return false;
}
if (zero.compareTo(s) >= 0 || q.compareTo(s) <= 0)
{
return false;
}
BigInteger w = s.modInverse(q);
BigInteger u1 = m.multiply(w).mod(q);
BigInteger u2 = r.multiply(w).mod(q);
BigInteger p = params.getP();
u1 = params.getG().modPow(u1, p);
u2 = ((DSAPublicKeyParameters)key).getY().modPow(u2, p);
BigInteger v = u1.multiply(u2).mod(p).mod(q);
return v.equals(r);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: verifySignature
File: core/src/main/java/org/bouncycastle/crypto/signers/DSASigner.java
Repository: bcgit/bc-java
The code follows secure coding practices.
|
[
"CWE-361"
] |
CVE-2016-1000341
|
MEDIUM
| 4.3
|
bcgit/bc-java
|
verifySignature
|
core/src/main/java/org/bouncycastle/crypto/signers/DSASigner.java
|
acaac81f96fec91ab45bd0412beaf9c3acd8defa
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setName(String name) {
this.name = name;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setName
File: base/common/src/main/java/com/netscape/certsrv/profile/ProfileParameter.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
setName
|
base/common/src/main/java/com/netscape/certsrv/profile/ProfileParameter.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String encodeRedirectURL(String arg0) {
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: encodeRedirectURL
File: h2/src/test/org/h2/test/server/TestWeb.java
Repository: h2database
The code follows secure coding practices.
|
[
"CWE-312"
] |
CVE-2022-45868
|
HIGH
| 7.8
|
h2database
|
encodeRedirectURL
|
h2/src/test/org/h2/test/server/TestWeb.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 0
|
Analyze the following code function for security vulnerabilities
|
public short readI16() throws TException {
byte[] buf = buffer;
int off = 0;
if (trans_.getBytesRemainingInBuffer() >= 2) {
buf = trans_.getBuffer();
off = trans_.getBufferPosition();
trans_.consumeBuffer(2);
} else {
readAll(buffer, 0, 2);
}
return (short) (((buf[off] & 0xff) << 8) | ((buf[off + 1] & 0xff)));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readI16
File: thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TBinaryProtocol.java
Repository: facebook/fbthrift
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2019-11938
|
MEDIUM
| 5
|
facebook/fbthrift
|
readI16
|
thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TBinaryProtocol.java
|
08c2d412adb214c40bb03be7587057b25d053030
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isOverrideApnEnabled(@NonNull ComponentName who) {
if (!mHasFeature || !mHasTelephonyFeature) {
return false;
}
Objects.requireNonNull(who, "ComponentName is null");
final CallerIdentity caller = getCallerIdentity(who);
Preconditions.checkCallAuthorization(isDefaultDeviceOwner(caller));
Cursor enforceCursor = mInjector.binderWithCleanCallingIdentity(
() -> mContext.getContentResolver().query(
ENFORCE_MANAGED_URI, null, null, null, null));
if (enforceCursor == null) {
return false;
}
try {
if (enforceCursor.moveToFirst()) {
return enforceCursor.getInt(enforceCursor.getColumnIndex(ENFORCE_KEY)) == 1;
}
} catch (IllegalArgumentException e) {
Slogf.e(LOG_TAG, "Cursor returned from ENFORCE_MANAGED_URI doesn't contain "
+ "correct info.", e);
} finally {
enforceCursor.close();
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isOverrideApnEnabled
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
|
isOverrideApnEnabled
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public static Hints getDefaultHints() {
return Hints.getDefaults(false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDefaultHints
File: modules/library/metadata/src/main/java/org/geotools/util/factory/GeoTools.java
Repository: geotools
The code follows secure coding practices.
|
[
"CWE-917"
] |
CVE-2022-24818
|
HIGH
| 7.5
|
geotools
|
getDefaultHints
|
modules/library/metadata/src/main/java/org/geotools/util/factory/GeoTools.java
|
4f70fa3234391dd0cda883a20ab0ec75688cba49
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String getAttribute(Element element, String name) {
Attr attr = element.getAttributeNode(name);
return (attr != null)? attr.getValue(): null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAttribute
File: src/edu/stanford/nlp/util/XMLUtils.java
Repository: stanfordnlp/CoreNLP
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-3869
|
MEDIUM
| 5
|
stanfordnlp/CoreNLP
|
getAttribute
|
src/edu/stanford/nlp/util/XMLUtils.java
|
5d83f1e8482ca304db8be726cad89554c88f136a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setPersonalAppsSuspended(ComponentName who, boolean suspended) {
Objects.requireNonNull(who, "ComponentName is null");
final CallerIdentity caller = getCallerIdentity(who);
Preconditions.checkCallAuthorization(isProfileOwnerOfOrganizationOwnedDevice(caller));
Preconditions.checkState(canHandleCheckPolicyComplianceIntent(caller));
final int callingUserId = caller.getUserId();
synchronized (getLockObject()) {
final ActiveAdmin admin = getProfileOwnerLocked(callingUserId);
boolean shouldSaveSettings = false;
if (admin.mSuspendPersonalApps != suspended) {
admin.mSuspendPersonalApps = suspended;
shouldSaveSettings = true;
}
if (admin.mProfileOffDeadline != 0) {
admin.mProfileOffDeadline = 0;
shouldSaveSettings = true;
}
if (shouldSaveSettings) {
saveSettingsLocked(callingUserId);
}
}
mInjector.binderWithCleanCallingIdentity(() -> updatePersonalAppsSuspension(
callingUserId));
DevicePolicyEventLogger
.createEvent(DevicePolicyEnums.SET_PERSONAL_APPS_SUSPENDED)
.setAdmin(caller.getComponentName())
.setBoolean(suspended)
.write();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setPersonalAppsSuspended
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
|
setPersonalAppsSuspended
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setReindexThreadCount(int theReindexThreadCount) {
myReindexThreadCount = theReindexThreadCount;
myReindexThreadCount = Math.max(myReindexThreadCount, 1); // Minimum of 1
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setReindexThreadCount
File: hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
Repository: hapifhir/hapi-fhir
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-32053
|
MEDIUM
| 5
|
hapifhir/hapi-fhir
|
setReindexThreadCount
|
hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
|
f2934b229c491235ab0e7782dea86b324521082a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void findAndUpdateMediaNotifications() {
boolean metaDataChanged = false;
synchronized (mNotificationData) {
ArrayList<Entry> activeNotifications = mNotificationData.getActiveNotifications();
final int N = activeNotifications.size();
// Promote the media notification with a controller in 'playing' state, if any.
Entry mediaNotification = null;
MediaController controller = null;
for (int i = 0; i < N; i++) {
final Entry entry = activeNotifications.get(i);
if (isMediaNotification(entry)) {
final MediaSession.Token token =
entry.notification.getNotification().extras
.getParcelable(Notification.EXTRA_MEDIA_SESSION);
if (token != null) {
MediaController aController = new MediaController(mContext, token);
if (PlaybackState.STATE_PLAYING ==
getMediaControllerPlaybackState(aController)) {
if (DEBUG_MEDIA) {
Log.v(TAG, "DEBUG_MEDIA: found mediastyle controller matching "
+ entry.notification.getKey());
}
mediaNotification = entry;
controller = aController;
break;
}
}
}
}
if (mediaNotification == null) {
// Still nothing? OK, let's just look for live media sessions and see if they match
// one of our notifications. This will catch apps that aren't (yet!) using media
// notifications.
if (mMediaSessionManager != null) {
final List<MediaController> sessions
= mMediaSessionManager.getActiveSessionsForUser(
null,
UserHandle.USER_ALL);
for (MediaController aController : sessions) {
if (PlaybackState.STATE_PLAYING ==
getMediaControllerPlaybackState(aController)) {
// now to see if we have one like this
final String pkg = aController.getPackageName();
for (int i = 0; i < N; i++) {
final Entry entry = activeNotifications.get(i);
if (entry.notification.getPackageName().equals(pkg)) {
if (DEBUG_MEDIA) {
Log.v(TAG, "DEBUG_MEDIA: found controller matching "
+ entry.notification.getKey());
}
controller = aController;
mediaNotification = entry;
break;
}
}
}
}
}
}
if (controller != null && !sameSessions(mMediaController, controller)) {
// We have a new media session
clearCurrentMediaNotification();
mMediaController = controller;
mMediaController.registerCallback(mMediaListener);
mMediaMetadata = mMediaController.getMetadata();
if (DEBUG_MEDIA) {
Log.v(TAG, "DEBUG_MEDIA: insert listener, receive metadata: "
+ mMediaMetadata);
}
if (mediaNotification != null) {
mMediaNotificationKey = mediaNotification.notification.getKey();
if (DEBUG_MEDIA) {
Log.v(TAG, "DEBUG_MEDIA: Found new media notification: key="
+ mMediaNotificationKey + " controller=" + mMediaController);
}
}
metaDataChanged = true;
}
}
if (metaDataChanged) {
updateNotifications();
}
updateMediaMetaData(metaDataChanged, true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findAndUpdateMediaNotifications
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
|
findAndUpdateMediaNotifications
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isDeviceInVrMode() {
return mVrMode;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isDeviceInVrMode
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
|
isDeviceInVrMode
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getName() {
return "User Profile Menu";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getName
File: wflow-core/src/main/java/org/joget/plugin/enterprise/UserProfileMenu.java
Repository: jogetworkflow/jw-community
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-4859
|
MEDIUM
| 4
|
jogetworkflow/jw-community
|
getName
|
wflow-core/src/main/java/org/joget/plugin/enterprise/UserProfileMenu.java
|
9a77f508a2bf8cf661d588f37a4cc29ecaea4fc8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setSystemUpdatePolicy(ComponentName who, SystemUpdatePolicy policy) {
if (policy != null) {
// throws exception if policy type is invalid
policy.validateType();
// throws exception if freeze period is invalid
policy.validateFreezePeriods();
Pair<LocalDate, LocalDate> record = mOwners.getSystemUpdateFreezePeriodRecord();
// throws exception if freeze period is incompatible with previous freeze period record
policy.validateAgainstPreviousFreezePeriod(record.first, record.second,
LocalDate.now());
}
final CallerIdentity caller = getCallerIdentity(who);
synchronized (getLockObject()) {
Preconditions.checkCallAuthorization(isProfileOwnerOfOrganizationOwnedDevice(caller)
|| isDefaultDeviceOwner(caller));
checkCanExecuteOrThrowUnsafe(DevicePolicyManager.OPERATION_SET_SYSTEM_UPDATE_POLICY);
if (policy == null) {
mOwners.clearSystemUpdatePolicy();
} else {
mOwners.setSystemUpdatePolicy(policy);
updateSystemUpdateFreezePeriodsRecord(/* saveIfChanged */ false);
}
mOwners.writeDeviceOwner();
}
mInjector.binderWithCleanCallingIdentity(() -> mContext.sendBroadcastAsUser(
new Intent(ACTION_SYSTEM_UPDATE_POLICY_CHANGED), UserHandle.SYSTEM));
DevicePolicyEventLogger
.createEvent(DevicePolicyEnums.SET_SYSTEM_UPDATE_POLICY)
.setAdmin(who)
.setInt(policy != null ? policy.getPolicyType() : 0)
.write();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSystemUpdatePolicy
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
|
setSystemUpdatePolicy
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Form.Field field(String key, Lang lang) {
// #1310: We specify inner class as Form.Field rather than Field because otherwise,
// javadoc cannot find the static inner class.
Field field = super.field(asDynamicKey(key), lang);
return new Field(
this,
key,
field.constraints(),
field.format(),
field.errors(),
field.value().orElse((String) value(key).filter(v -> v instanceof String).orElse(null)),
fieldFile(key, field));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: field
File: web/play-java-forms/src/main/java/play/data/DynamicForm.java
Repository: playframework
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-31018
|
MEDIUM
| 5
|
playframework
|
field
|
web/play-java-forms/src/main/java/play/data/DynamicForm.java
|
15393b736df939e35e275af2347155f296c684f2
| 0
|
Analyze the following code function for security vulnerabilities
|
public WearableExtender setAvailableOffline(boolean availableOffline) {
setFlag(FLAG_AVAILABLE_OFFLINE, availableOffline);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAvailableOffline
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
setAvailableOffline
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
protected BeanDefinition getPreloaderConfig(Node node) {
Node enabled = node.getAttributes().getNamedItem("enabled");
Node directory = node.getAttributes().getNamedItem("directory");
Node storeInitialDelaySeconds = node.getAttributes().getNamedItem("store-initial-delay-seconds");
Node storeIntervalSeconds = node.getAttributes().getNamedItem("store-interval-seconds");
BeanDefinitionBuilder nearCachePreloaderConfigBuilder = createBeanBuilder(NearCachePreloaderConfig.class);
Boolean enabledValue = Boolean.FALSE;
String directoryValue = "";
Integer storeInitialDelaySecondsValue = NearCachePreloaderConfig.DEFAULT_STORE_INITIAL_DELAY_SECONDS;
Integer storeIntervalSecondsValue = NearCachePreloaderConfig.DEFAULT_STORE_INTERVAL_SECONDS;
if (enabled != null) {
enabledValue = Boolean.parseBoolean(getTextContent(enabled));
}
if (directory != null) {
directoryValue = getTextContent(directory);
}
if (storeInitialDelaySeconds != null) {
storeInitialDelaySecondsValue = parseInt(getTextContent(storeInitialDelaySeconds));
}
if (storeIntervalSeconds != null) {
storeIntervalSecondsValue = parseInt(getTextContent(storeIntervalSeconds));
}
nearCachePreloaderConfigBuilder.addPropertyValue("enabled", enabledValue);
nearCachePreloaderConfigBuilder.addPropertyValue("directory", directoryValue);
nearCachePreloaderConfigBuilder.addPropertyValue("storeInitialDelaySeconds", storeInitialDelaySecondsValue);
nearCachePreloaderConfigBuilder.addPropertyValue("storeIntervalSeconds", storeIntervalSecondsValue);
return nearCachePreloaderConfigBuilder.getBeanDefinition();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPreloaderConfig
File: hazelcast-spring/src/main/java/com/hazelcast/spring/AbstractHazelcastBeanDefinitionParser.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
getPreloaderConfig
|
hazelcast-spring/src/main/java/com/hazelcast/spring/AbstractHazelcastBeanDefinitionParser.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
public String addTooltipJS(XWikiContext context)
{
StringBuilder buffer = new StringBuilder();
buffer.append("<script src=\"");
buffer.append(getSkinFile("ajax/wzToolTip.js", context));
buffer.append("\"></script>");
// buffer.append("<div id=\"dhtmltooltip\"></div>");
return buffer.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addTooltipJS
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-32620
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
addTooltipJS
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getType(Uri uri) {
int match = sURLMatcher.match(uri);
switch (match) {
case MMS_ALL:
case MMS_INBOX:
case MMS_SENT:
case MMS_DRAFTS:
case MMS_OUTBOX:
return VND_ANDROID_DIR_MMS;
case MMS_ALL_ID:
case MMS_INBOX_ID:
case MMS_SENT_ID:
case MMS_DRAFTS_ID:
case MMS_OUTBOX_ID:
return VND_ANDROID_MMS;
case MMS_PART_ID: {
Cursor cursor = mOpenHelper.getReadableDatabase().query(
TABLE_PART, new String[] { Part.CONTENT_TYPE },
Part._ID + " = ?", new String[] { uri.getLastPathSegment() },
null, null, null);
if (cursor != null) {
try {
if ((cursor.getCount() == 1) && cursor.moveToFirst()) {
return cursor.getString(0);
} else {
Log.e(TAG, "cursor.count() != 1: " + uri);
}
} finally {
cursor.close();
}
} else {
Log.e(TAG, "cursor == null: " + uri);
}
return "*/*";
}
case MMS_ALL_PART:
case MMS_MSG_PART:
case MMS_MSG_ADDR:
default:
return "*/*";
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getType
File: src/com/android/providers/telephony/MmsProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-362",
"CWE-22"
] |
CVE-2023-21268
|
MEDIUM
| 5.5
|
android
|
getType
|
src/com/android/providers/telephony/MmsProvider.java
|
ca4c9a19635119d95900793e7a41b820cd1d94d9
| 0
|
Analyze the following code function for security vulnerabilities
|
private int indexOfWinInWindowList(WindowState targetWin, WindowList windows) {
for (int i = windows.size() - 1; i >= 0; i--) {
final WindowState w = windows.get(i);
if (w == targetWin) {
return i;
}
if (!w.mChildWindows.isEmpty()) {
if (indexOfWinInWindowList(targetWin, w.mChildWindows) >= 0) {
return i;
}
}
}
return -1;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: indexOfWinInWindowList
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
|
indexOfWinInWindowList
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
protected byte[] encrypt(byte[] src) {
try {
Deflater compressor = new Deflater(Deflater.BEST_SPEED);
byte[] compressed = new byte[src.length + 100];
compressor.setInput(src);
compressor.finish();
int totalOut = compressor.deflate(compressed);
byte[] zipsrc = new byte[totalOut];
System.arraycopy(compressed, 0, zipsrc, 0, totalOut);
compressor.end();
return codec.encode(zipsrc);
} catch (Exception e) {
throw new FacesException("Error encode resource data", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: encrypt
File: framework/impl/src/main/java/org/ajax4jsf/resource/ResourceBuilderImpl.java
Repository: nuxeo/richfaces-3.3
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2013-4521
|
HIGH
| 7.5
|
nuxeo/richfaces-3.3
|
encrypt
|
framework/impl/src/main/java/org/ajax4jsf/resource/ResourceBuilderImpl.java
|
6cbad2a6dcb70d3e33a6ce5879b1a3ad79eb1aec
| 0
|
Analyze the following code function for security vulnerabilities
|
private Object readNewString(boolean unshared) throws IOException {
Object result = input.readUTF();
if (enableResolve) {
result = resolveObject(result);
}
registerObjectRead(result, nextHandle(), unshared);
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readNewString
File: luni/src/main/java/java/io/ObjectInputStream.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-7911
|
HIGH
| 7.2
|
android
|
readNewString
|
luni/src/main/java/java/io/ObjectInputStream.java
|
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isCallerSystem() {
final int callingUid = injectBinderCallingUid();
return UserHandle.isSameApp(callingUid, Process.SYSTEM_UID);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isCallerSystem
File: services/core/java/com/android/server/pm/ShortcutService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40079
|
HIGH
| 7.8
|
android
|
isCallerSystem
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getString(String key) throws JSONException {
return get(key).toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getString
File: src/main/java/org/codehaus/jettison/json/JSONObject.java
Repository: jettison-json/jettison
The code follows secure coding practices.
|
[
"CWE-674",
"CWE-787"
] |
CVE-2022-45693
|
HIGH
| 7.5
|
jettison-json/jettison
|
getString
|
src/main/java/org/codehaus/jettison/json/JSONObject.java
|
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setEventGroupItemDataWithUnitTypesExpected() {
this.unsetTypeExpected();
this.setTypeExpected(1, TypeNames.INT);// event_crf_id;
this.setTypeExpected(2, TypeNames.INT);// item_group_id;
this.setTypeExpected(3, TypeNames.STRING);// item_group_oid
this.setTypeExpected(4, TypeNames.STRING);// item_group_name
this.setTypeExpected(5, TypeNames.INT);// item_id
this.setTypeExpected(6, TypeNames.STRING);// item_oid
this.setTypeExpected(7, TypeNames.INT);// item_data_ordinal
this.setTypeExpected(8, TypeNames.STRING);// value
this.setTypeExpected(9, TypeNames.INT);// item_data_type_id
this.setTypeExpected(10, TypeNames.INT);// item_data_id
this.setTypeExpected(11, TypeNames.STRING);// mu_oid
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setEventGroupItemDataWithUnitTypesExpected
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
|
setEventGroupItemDataWithUnitTypesExpected
|
core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
|
b152cc63019230c9973965a98e4386ea5322c18f
| 0
|
Analyze the following code function for security vulnerabilities
|
protected CompletableFuture<Integer> internalGetMaxConsumers(boolean applied) {
return getTopicPoliciesAsyncWithRetry(topicName)
.thenApply(op -> op.map(TopicPolicies::getMaxConsumerPerTopic)
.orElseGet(() -> {
if (applied) {
Integer maxConsumer = getNamespacePolicies(namespaceName).max_consumers_per_topic;
return maxConsumer == null ? config().getMaxConsumersPerTopic() : maxConsumer;
}
return null;
}));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: internalGetMaxConsumers
File: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
Repository: apache/pulsar
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-41571
|
MEDIUM
| 4
|
apache/pulsar
|
internalGetMaxConsumers
|
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
|
5b35bb81c31f1bc2ad98c9fde5b39ec68110ca52
| 0
|
Analyze the following code function for security vulnerabilities
|
private void enforceSystemOrSystemUI(String message) {
if (isCallerSystem()) return;
getContext().enforceCallingPermission(android.Manifest.permission.STATUS_BAR_SERVICE,
message);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: enforceSystemOrSystemUI
File: services/core/java/com/android/server/notification/NotificationManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3884
|
MEDIUM
| 4.3
|
android
|
enforceSystemOrSystemUI
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
public static List<IssueWithParams> getIssuesFromVerificationIssues(
List<? extends ApkVerificationIssue> verificationIssues) {
List<IssueWithParams> result = new ArrayList<>(verificationIssues.size());
for (ApkVerificationIssue issue : verificationIssues) {
if (issue instanceof IssueWithParams) {
result.add((IssueWithParams) issue);
} else {
result.add(
new IssueWithParams(sVerificationIssueIdToIssue.get(issue.getIssueId()),
issue.getParams()));
}
}
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getIssuesFromVerificationIssues
File: src/main/java/com/android/apksig/ApkVerifier.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21253
|
MEDIUM
| 5.5
|
android
|
getIssuesFromVerificationIssues
|
src/main/java/com/android/apksig/ApkVerifier.java
|
039f815895f62c9f8af23df66622b66246f3f61e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public XMLBuilder attribute(String name, String value) {
super.attributeImpl(name, value);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: attribute
File: src/main/java/com/jamesmurty/utils/XMLBuilder.java
Repository: jmurty/java-xmlbuilder
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2014-125087
|
MEDIUM
| 5.2
|
jmurty/java-xmlbuilder
|
attribute
|
src/main/java/com/jamesmurty/utils/XMLBuilder.java
|
e6fddca201790abab4f2c274341c0bb8835c3e73
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setPublishingMode(ServiceRequest service) {
SetPublishingModeRequest request = (SetPublishingModeRequest) service.getRequest();
List<UInteger> subscriptionIds = l(request.getSubscriptionIds());
StatusCode[] results = new StatusCode[subscriptionIds.size()];
for (int i = 0; i < subscriptionIds.size(); i++) {
Subscription subscription = subscriptions.get(subscriptionIds.get(i));
if (subscription == null) {
results[i] = new StatusCode(StatusCodes.Bad_SubscriptionIdInvalid);
} else {
subscription.setPublishingMode(request);
results[i] = StatusCode.GOOD;
}
}
ResponseHeader header = service.createResponseHeader();
SetPublishingModeResponse response = new SetPublishingModeResponse(
header,
results,
new DiagnosticInfo[0]
);
service.setResponse(response);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setPublishingMode
File: opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/subscriptions/SubscriptionManager.java
Repository: eclipse/milo
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2022-25897
|
HIGH
| 7.5
|
eclipse/milo
|
setPublishingMode
|
opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/subscriptions/SubscriptionManager.java
|
4534381760d7d9f0bf00cbf6a8449bb0d13c6ce5
| 0
|
Analyze the following code function for security vulnerabilities
|
private static List<Proxy> parseResponse(String response) {
String[] split = response.split(";");
List<Proxy> ret = Lists.newArrayList();
for (String s : split) {
String trimmed = s.trim();
if (trimmed.equals("DIRECT")) {
ret.add(java.net.Proxy.NO_PROXY);
} else if (trimmed.startsWith(PROXY)) {
Proxy proxy = proxyFromHostPort(Type.HTTP, trimmed.substring(PROXY.length()));
if (proxy != null) {
ret.add(proxy);
}
} else if (trimmed.startsWith(SOCKS)) {
Proxy proxy = proxyFromHostPort(Type.SOCKS, trimmed.substring(SOCKS.length()));
if (proxy != null) {
ret.add(proxy);
}
}
}
if (ret.size() == 0) {
ret.add(java.net.Proxy.NO_PROXY);
}
return ret;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseResponse
File: core/java/android/net/PacProxySelector.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2016-3763
|
MEDIUM
| 5
|
android
|
parseResponse
|
core/java/android/net/PacProxySelector.java
|
ec2fc50d202d975447211012997fe425496c849c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getIsNullConditionSQL(String column) {
return column + " IS NULL";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getIsNullConditionSQL
File: dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java
Repository: dashbuilder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-4999
|
HIGH
| 7.5
|
dashbuilder
|
getIsNullConditionSQL
|
dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java
|
8574899e3b6455547b534f570b2330ff772e524b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void process(
final CiphertextHeader header,
final boolean mode,
final InputStream input,
final OutputStream output)
{
final BlockCipherAdapter cipher = newCipher(header, mode);
final int outSize = cipher.getOutputSize(StreamUtil.CHUNK_SIZE);
final byte[] outBuf = new byte[outSize > StreamUtil.CHUNK_SIZE ? outSize : StreamUtil.CHUNK_SIZE];
StreamUtil.pipeAll(
input,
output,
(in, inOff, len, out) -> {
final int n = cipher.processBytes(in, inOff, len, outBuf, 0);
out.write(outBuf, 0, n);
});
final int n = cipher.doFinal(outBuf, 0);
try {
output.write(outBuf, 0, n);
} catch (IOException e) {
throw new StreamException(e);
}
}
|
Vulnerability Classification:
- CWE: CWE-770
- CVE: CVE-2020-7226
- Severity: MEDIUM
- CVSS Score: 5.0
Description: Define new ciphertext header format.
New format does not allocate any memory until HMAC check passes, which
guards against untrusted input. All encryption components have been
updated to use the new header, while preserving backward compatibility
to decrypt messages encrypted with the old format. The decoding process
for the old header has been hardened to impose reasonable limits on header
fields: nonce sizes up to 255 bytes, key names up to 500 bytes.
Fixes #52.
Function: process
File: src/main/java/org/cryptacular/bean/AbstractBlockCipherBean.java
Repository: vt-middleware/cryptacular
Fixed Code:
@Override
protected void process(
final CiphertextHeader header,
final boolean mode,
final InputStream input,
final OutputStream output)
{
final BlockCipherAdapter cipher = newCipher(header, mode);
final int outSize = cipher.getOutputSize(StreamUtil.CHUNK_SIZE);
final byte[] outBuf = new byte[Math.max(outSize, StreamUtil.CHUNK_SIZE)];
StreamUtil.pipeAll(
input,
output,
(in, inOff, len, out) -> {
final int n = cipher.processBytes(in, inOff, len, outBuf, 0);
out.write(outBuf, 0, n);
});
final int n = cipher.doFinal(outBuf, 0);
try {
output.write(outBuf, 0, n);
} catch (IOException e) {
throw new StreamException(e);
}
}
|
[
"CWE-770"
] |
CVE-2020-7226
|
MEDIUM
| 5
|
vt-middleware/cryptacular
|
process
|
src/main/java/org/cryptacular/bean/AbstractBlockCipherBean.java
|
8c6c7528f1e24c6b71f3e36db0cb8a697256ce25
| 1
|
Analyze the following code function for security vulnerabilities
|
@RequiresPermission(value = MANAGE_DEVICE_POLICY_PROFILE_INTERACTION, conditional = true)
public void addCrossProfileIntentFilter(@Nullable ComponentName admin, IntentFilter filter,
int flags) {
throwIfParentInstance("addCrossProfileIntentFilter");
if (mService != null) {
try {
mService.addCrossProfileIntentFilter(admin, mContext.getPackageName(), filter,
flags);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addCrossProfileIntentFilter
File: core/java/android/app/admin/DevicePolicyManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
addCrossProfileIntentFilter
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@SystemApi
@SuppressLint("RequiresPermission")
public boolean isDeviceManaged() {
return mHasDeviceOwnerCache.query(null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isDeviceManaged
File: core/java/android/app/admin/DevicePolicyManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
isDeviceManaged
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isWrapperFor(Class<?> iface) throws SQLException {
return iface.isAssignableFrom(getClass());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isWrapperFor
File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
Repository: pgjdbc
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-31197
|
HIGH
| 8
|
pgjdbc
|
isWrapperFor
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
@Provides
SessionIdGenerator sessionIdGenerator() {
return new DefaultSessionIdGenerator();
}
|
Vulnerability Classification:
- CWE: CWE-338
- CVE: CVE-2019-11808
- Severity: MEDIUM
- CVSS Score: 4.3
Description: Use UUID directly for generating session IDs
Function: sessionIdGenerator
File: ratpack-session/src/main/java/ratpack/session/SessionModule.java
Repository: ratpack
Fixed Code:
@Provides
@Singleton
SessionIdGenerator sessionIdGenerator() {
return new DefaultSessionIdGenerator();
}
|
[
"CWE-338"
] |
CVE-2019-11808
|
MEDIUM
| 4.3
|
ratpack
|
sessionIdGenerator
|
ratpack-session/src/main/java/ratpack/session/SessionModule.java
|
f2b63eb82dd71194319fd3945f5edf29b8f3a42d
| 1
|
Analyze the following code function for security vulnerabilities
|
public void setURL(final String url, final Map<String, String> headers) {
act.runOnUiThread(new Runnable() {
public void run() {
if(headers != null) {
web.loadUrl(url, headers);
} else {
web.loadUrl(url);
}
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setURL
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
|
setURL
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
void markCallAsRinging(Call call) {
setCallState(call, CallState.RINGING);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: markCallAsRinging
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
|
markCallAsRinging
|
src/com/android/server/telecom/CallsManager.java
|
a06c9a4aef69ae27b951523cf72bf72412bf48fa
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public float getCurrentAnimatorScale() {
synchronized(mWindowMap) {
return mAnimationsDisabled ? 0 : mAnimatorDurationScaleSetting;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCurrentAnimatorScale
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
|
getCurrentAnimatorScale
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void stopDtmfTone(String callId, Session.Info info) throws RemoteException { }
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: stopDtmfTone
File: tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
stopDtmfTone
|
tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.