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 void dismissInvalidChargerNotification() {
if (mInvalidCharger) Slog.i(TAG, "dismissing invalid charger notification");
mInvalidCharger = false;
updateNotification();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dismissInvalidChargerNotification
File: packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3854
|
MEDIUM
| 5
|
android
|
dismissInvalidChargerNotification
|
packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java
|
05e0705177d2078fa9f940ce6df723312cfab976
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
public static boolean shouldDirBeHidden(@NonNull File file) {
if (isDirectoryHidden(file)) {
return true;
}
File parent = file.getParentFile();
while (parent != null) {
if (isDirectoryHidden(parent)) {
return true;
}
parent = parent.getParentFile();
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: shouldDirBeHidden
File: src/com/android/providers/media/util/FileUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2023-35670
|
HIGH
| 7.8
|
android
|
shouldDirBeHidden
|
src/com/android/providers/media/util/FileUtils.java
|
db3c69afcb0a45c8aa2f333fcde36217889899fe
| 0
|
Analyze the following code function for security vulnerabilities
|
public static File getRunningDestinationDirectory(Context context, int destination)
throws IOException {
return getDestinationDirectory(context, destination, true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRunningDestinationDirectory
File: src/com/android/providers/downloads/Helpers.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2016-0848
|
HIGH
| 7.2
|
android
|
getRunningDestinationDirectory
|
src/com/android/providers/downloads/Helpers.java
|
bdc831357e7a116bc561d51bf2ddc85ff11c01a9
| 0
|
Analyze the following code function for security vulnerabilities
|
private void saveInstanceState(Bundle outState) {
NewsReaderDetailFragment ndf = getNewsReaderDetailFragment();
if (ndf != null) {
outState.putLong(OPTIONAL_FOLDER_ID, ndf.getIdFolder());
outState.putBoolean(IS_FOLDER_BOOLEAN, ndf.getIdFeed() == null);
outState.putLong(ID_FEED_STRING, ndf.getIdFeed() != null ? ndf.getIdFeed() : ndf.getIdFolder());
NewsListRecyclerAdapter adapter = (NewsListRecyclerAdapter) ndf.getRecyclerView().getAdapter();
if (adapter != null) {
outState.putInt(LIST_ADAPTER_TOTAL_COUNT, adapter.getTotalItemCount());
outState.putInt(LIST_ADAPTER_PAGE_COUNT, adapter.getCachedPages());
}
}
if (mSearchView != null) {
mSearchString = mSearchView.getQuery().toString();
outState.putString(SEARCH_KEY, mSearchString);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: saveInstanceState
File: News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java
Repository: nextcloud/news-android
The code follows secure coding practices.
|
[
"CWE-829"
] |
CVE-2021-41256
|
MEDIUM
| 5.8
|
nextcloud/news-android
|
saveInstanceState
|
News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java
|
05449cb666059af7de2302df9d5c02997a23df85
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setToBigInteger(BigInteger n) {
setBcdToZero();
flags = 0;
if (n.signum() == -1) {
flags |= NEGATIVE_FLAG;
n = n.negate();
}
if (n.signum() != 0) {
_setToBigInteger(n);
compact();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setToBigInteger
File: icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_AbstractBCD.java
Repository: unicode-org/icu
The code follows secure coding practices.
|
[
"CWE-190"
] |
CVE-2018-18928
|
HIGH
| 7.5
|
unicode-org/icu
|
setToBigInteger
|
icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_AbstractBCD.java
|
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public QueryManager getQueryManager()
{
return this.queryManager;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getQueryManager
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-459"
] |
CVE-2023-36468
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
getQueryManager
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
|
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
| 0
|
Analyze the following code function for security vulnerabilities
|
private void renameLinks(XWikiDocument backlinkDocument, DocumentReference oldLink, DocumentReference newLink,
XWikiContext context) throws XWikiException
{
// FIXME: Duplicate code. See org.xwiki.refactoring.internal.DefaultLinkRefactoring#renameLinks in
// xwiki-platform-refactoring-default
getOldRendering().renameLinks(backlinkDocument, oldLink, newLink, context);
// Save if content changed
if (backlinkDocument.isContentDirty()) {
String saveMessage =
localizePlainOrKey("core.comment.renameLink", getCompactEntityReferenceSerializer().serialize(newLink));
backlinkDocument.setAuthorReference(context.getUserReference());
context.getWiki().saveDocument(backlinkDocument, saveMessage, true, context);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: renameLinks
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
|
renameLinks
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void
initialize(Ruby runtime)
{
try {
parser = createParser();
} catch (SAXException se) {
// Unexpected failure in XML subsystem
RaiseException ex = runtime.newRuntimeError(se.toString());
ex.initCause(se);
throw ex;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initialize
File: ext/java/nokogiri/XmlSaxParserContext.java
Repository: sparklemotion/nokogiri
The code follows secure coding practices.
|
[
"CWE-241"
] |
CVE-2022-29181
|
MEDIUM
| 6.4
|
sparklemotion/nokogiri
|
initialize
|
ext/java/nokogiri/XmlSaxParserContext.java
|
db05ba9a1bd4b90aa6c76742cf6102a7c7297267
| 0
|
Analyze the following code function for security vulnerabilities
|
@LargeTest
@Test
public void testIncomingCallBlockCheckTimesoutIsAllowed() throws Exception {
final CountDownLatch latch = new CountDownLatch(1);
String phoneNumber = "650-555-1212";
blockNumberWithAnswer(phoneNumber, new Answer<Bundle>() {
@Override
public Bundle answer(InvocationOnMock invocation) throws Throwable {
latch.await(TEST_TIMEOUT * 2, TimeUnit.MILLISECONDS);
Bundle bundle = new Bundle();
bundle.putBoolean(BlockedNumberContract.RES_NUMBER_IS_BLOCKED, true);
return bundle;
}
});
IdPair ids = startAndMakeActiveIncomingCall(
phoneNumber, mPhoneAccountA0.getAccountHandle(), mConnectionServiceFixtureA);
latch.countDown();
assertEquals(0, mConnectionServiceFixtureA.mConnectionService.rejectedCallIds.size());
assertEquals(0, mMissedCallNotifier.missedCallsNotified.size());
disconnectCall(ids.mCallId, ids.mConnectionId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: testIncomingCallBlockCheckTimesoutIsAllowed
File: tests/src/com/android/server/telecom/tests/BasicCallTests.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
testIncomingCallBlockCheckTimesoutIsAllowed
|
tests/src/com/android/server/telecom/tests/BasicCallTests.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public JsonDeserializer<?> createTreeDeserializer(DeserializationConfig config,
JavaType nodeType, BeanDescription beanDesc)
throws JsonMappingException
{
@SuppressWarnings("unchecked")
Class<? extends JsonNode> nodeClass = (Class<? extends JsonNode>) nodeType.getRawClass();
// 23-Nov-2010, tatu: Custom deserializer?
JsonDeserializer<?> custom = _findCustomTreeNodeDeserializer(nodeClass, config,
beanDesc);
if (custom != null) {
return custom;
}
return JsonNodeDeserializer.getDeserializer(nodeClass);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createTreeDeserializer
File: src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2019-16942
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
createTreeDeserializer
|
src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java
|
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
| 0
|
Analyze the following code function for security vulnerabilities
|
private StringBuilder buildSuperclassHierarchy(Class c, StringBuilder buf) {
Class sc = c.getSuperclass();
if (sc!=null) buildSuperclassHierarchy(sc,buf).append(':');
return buf.append(c.getName());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: buildSuperclassHierarchy
File: core/src/main/java/hudson/Functions.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-310"
] |
CVE-2014-2061
|
MEDIUM
| 5
|
jenkinsci/jenkins
|
buildSuperclassHierarchy
|
core/src/main/java/hudson/Functions.java
|
bf539198564a1108b7b71a973bf7de963a6213ef
| 0
|
Analyze the following code function for security vulnerabilities
|
public void unbindFinished(IBinder token, Intent intent, boolean doRebind)
throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeStrongBinder(token);
intent.writeToParcel(data, 0);
data.writeInt(doRebind ? 1 : 0);
mRemote.transact(UNBIND_FINISHED_TRANSACTION, data, reply, 0);
reply.readException();
data.recycle();
reply.recycle();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unbindFinished
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
unbindFinished
|
core/java/android/app/ActivityManagerNative.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
private void addAttachmentAndUpdateView(Intent data) {
if (data == null) {
return;
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
final ClipData clipData = data.getClipData();
if (clipData != null) {
for (int i = 0, size = clipData.getItemCount(); i < size; i++) {
addAttachmentAndUpdateView(clipData.getItemAt(i).getUri());
}
return;
}
}
addAttachmentAndUpdateView(data.getData());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addAttachmentAndUpdateView
File: src/com/android/mail/compose/ComposeActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2425
|
MEDIUM
| 4.3
|
android
|
addAttachmentAndUpdateView
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
private final void servlet31(HttpServletRequest request) {
try {
for(Part part:request.getParts()) {
if(part.getContentType() != null && (StringHelper.containsNonWhitespace(part.getSubmittedFileName()) || !part.getContentType().startsWith("text/plain"))) {
contentType = part.getContentType();
filename = part.getSubmittedFileName();
if(filename != null) {
filename = UUID.randomUUID().toString().replace("-", "") + "_" + filename;
} else {
filename = "upload-" + UUID.randomUUID().toString().replace("-", "");
}
file = new File(WebappHelper.getTmpDir(), filename);
part.write(file.getAbsolutePath());
file = new File(WebappHelper.getTmpDir(), filename);
} else {
String value = IOUtils.toString(part.getInputStream(), request.getCharacterEncoding());
fields.put(part.getName(), value);
}
try {
part.delete();
} catch (Exception e) {
//we try (tomcat doesn't send exception but undertow)
}
}
} catch (IOException | ServletException e) {
log.error("", e);
}
}
|
Vulnerability Classification:
- CWE: CWE-22
- CVE: CVE-2021-41242
- Severity: HIGH
- CVSS Score: 7.9
Description: OO-5819: container can only create file in its own path
Function: servlet31
File: src/main/java/org/olat/restapi/support/MultipartReader.java
Repository: OpenOLAT
Fixed Code:
private final void servlet31(HttpServletRequest request) {
try {
for(Part part:request.getParts()) {
if(part.getContentType() != null && (StringHelper.containsNonWhitespace(part.getSubmittedFileName()) || !part.getContentType().startsWith("text/plain"))) {
contentType = part.getContentType();
filename = part.getSubmittedFileName();
if(filename != null && !filename.contains("..")) {
filename = UUID.randomUUID().toString().replace("-", "") + "_" + filename;
} else {
filename = "upload-" + UUID.randomUUID().toString().replace("-", "");
}
file = new File(WebappHelper.getTmpDir(), filename);
part.write(file.getAbsolutePath());
file = new File(WebappHelper.getTmpDir(), filename);
} else {
String value = IOUtils.toString(part.getInputStream(), request.getCharacterEncoding());
fields.put(part.getName(), value);
}
try {
part.delete();
} catch (Exception e) {
//we try (tomcat doesn't send exception but undertow)
}
}
} catch (IOException | ServletException e) {
log.error("", e);
}
}
|
[
"CWE-22"
] |
CVE-2021-41242
|
HIGH
| 7.9
|
OpenOLAT
|
servlet31
|
src/main/java/org/olat/restapi/support/MultipartReader.java
|
c450df7d7ffe6afde39ebca6da9136f1caa16ec4
| 1
|
Analyze the following code function for security vulnerabilities
|
private int jjStartNfaWithStates_2(int pos, int kind, int state)
{
jjmatchedKind = kind;
jjmatchedPos = pos;
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) { return pos + 1; }
return jjMoveNfa_2(state, pos + 1);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: jjStartNfaWithStates_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
|
jjStartNfaWithStates_2
|
impl/src/main/java/com/sun/el/parser/ELParserTokenManager.java
|
b6a3943ac5fba71cbc6719f092e319caa747855b
| 0
|
Analyze the following code function for security vulnerabilities
|
public synchronized void updateTime(@Positive int columnIndex, @Nullable Time x) throws SQLException {
updateValue(columnIndex, x);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateTime
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
|
updateTime
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
private Class<?> loadClassExt(String name) throws ClassNotFoundException {
// make recursive
addAvailable();
// find it
try {
return findClass(name);
} catch (ClassNotFoundException ex) {
}
// add resources until found
while (true) {
JNLPClassLoader addedTo = null;
try {
addedTo = addNextResource();
} catch (LaunchException e) {
/*
* This method will never handle any search for the main class
* [It is handled in initializeResources()]. Therefore, this
* exception will never be thrown here and is escaped
*/
throw new IllegalStateException(e);
}
if (addedTo == null) {
throw new ClassNotFoundException(name);
}
try {
return addedTo.findClass(name);
} catch (ClassNotFoundException ex) {
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: loadClassExt
File: core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
Repository: AdoptOpenJDK/IcedTea-Web
The code follows secure coding practices.
|
[
"CWE-345",
"CWE-94",
"CWE-22"
] |
CVE-2019-10182
|
MEDIUM
| 5.8
|
AdoptOpenJDK/IcedTea-Web
|
loadClassExt
|
core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
|
e0818f521a0711aeec4b913b49b5fc6a52815662
| 0
|
Analyze the following code function for security vulnerabilities
|
protected Float _checkFloatSpecialValue(String text)
{
if (!text.isEmpty()) {
switch (text.charAt(0)) {
case 'I':
if (_isPosInf(text)) {
return Float.POSITIVE_INFINITY;
}
break;
case 'N':
if (_isNaN(text)) { return Float.NaN; }
break;
case '-':
if (_isNegInf(text)) {
return Float.NEGATIVE_INFINITY;
}
break;
default:
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _checkFloatSpecialValue
File: src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2022-42003
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
_checkFloatSpecialValue
|
src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java
|
d78d00ee7b5245b93103fef3187f70543d67ca33
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void copy(InputStream input, File output) throws IOException {
FileOutputStream fos = new FileOutputStream(output);
IOUtils.copy(input, fos);
fos.flush();
fos.close();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: copy
File: src/main/java/com/openkm/util/FileUtils.java
Repository: openkm/document-management-system
The code follows secure coding practices.
|
[
"CWE-377"
] |
CVE-2022-3969
|
MEDIUM
| 5.5
|
openkm/document-management-system
|
copy
|
src/main/java/com/openkm/util/FileUtils.java
|
c069e4d73ab8864345c25119d8459495f45453e1
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("unchecked")
default Map<String, V> subMap(String prefix, ArgumentConversionContext<V> valueType) {
// special handling for maps for resolving sub keys
String finalPrefix = prefix + '.';
return names().stream()
.filter(name -> name.startsWith(finalPrefix))
.collect(Collectors.toMap((name) -> name.substring(finalPrefix.length()), (name) -> get(name, valueType).orElse(null)));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: subMap
File: core/src/main/java/io/micronaut/core/convert/value/ConvertibleValues.java
Repository: micronaut-projects/micronaut-core
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-21700
|
MEDIUM
| 5
|
micronaut-projects/micronaut-core
|
subMap
|
core/src/main/java/io/micronaut/core/convert/value/ConvertibleValues.java
|
b8ec32c311689667c69ae7d9f9c3b3a8abc96fe3
| 0
|
Analyze the following code function for security vulnerabilities
|
void detachFromProcess() {
if (app != null) {
app.removeActivity(this, false /* keepAssociation */);
}
app = null;
mInputDispatchingTimeoutMillis = DEFAULT_DISPATCHING_TIMEOUT_MILLIS;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: detachFromProcess
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
|
detachFromProcess
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
public Builder setExecutorService(ExecutorService applicationThreadPool) {
this.applicationThreadPool = applicationThreadPool;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setExecutorService
File: api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java
Repository: AsyncHttpClient/async-http-client
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2013-7397
|
MEDIUM
| 4.3
|
AsyncHttpClient/async-http-client
|
setExecutorService
|
api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java
|
df6ed70e86c8fc340ed75563e016c8baa94d7e72
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean scrolledToBottom() {
return this.binding != null && scrolledToBottom(this.binding.messagesView);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: scrolledToBottom
File: src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
scrolledToBottom
|
src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void pushData(int firstIndex, List<T> data) {
JsonArray dataArray = Json.createArray();
int i = 0;
for (T item : data) {
dataArray.set(i++, getDataObject(item));
}
rpc.setData(firstIndex, dataArray);
handler.addActiveData(data.stream());
handler.cleanUp(data.stream());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: pushData
File: server/src/main/java/com/vaadin/data/provider/DataCommunicator.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2021-33609
|
MEDIUM
| 4
|
vaadin/framework
|
pushData
|
server/src/main/java/com/vaadin/data/provider/DataCommunicator.java
|
9a93593d9f3802d2881fc8ad22dbc210d0d1d295
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<String> searchDocumentsNames(String wheresql, int nb, int start, String selectColumns,
XWikiContext context) throws XWikiException
{
String sql = createSQLQuery("select distinct doc.fullName", wheresql);
return searchDocumentsNamesInternal(sql, nb, start, Collections.EMPTY_LIST, context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: searchDocumentsNames
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-459"
] |
CVE-2023-36468
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
searchDocumentsNames
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
|
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
| 0
|
Analyze the following code function for security vulnerabilities
|
public Message setData(String dataMimeType, Uri dataUri) {
mDataMimeType = dataMimeType;
mDataUri = dataUri;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setData
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
setData
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
@IgnoreJRERequirement
public static ThreadInfo[] getThreadInfos() {
ThreadMXBean mbean = ManagementFactory.getThreadMXBean();
return mbean.dumpAllThreads(mbean.isObjectMonitorUsageSupported(),mbean.isSynchronizerUsageSupported());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getThreadInfos
File: core/src/main/java/hudson/Functions.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-310"
] |
CVE-2014-2061
|
MEDIUM
| 5
|
jenkinsci/jenkins
|
getThreadInfos
|
core/src/main/java/hudson/Functions.java
|
bf539198564a1108b7b71a973bf7de963a6213ef
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void filterContent(String[] values) {
filterContent(values, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: filterContent
File: jeecg-boot-base-core/src/main/java/org/jeecg/common/util/SqlInjectionUtil.java
Repository: jeecgboot/jeecg-boot
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-47105
|
CRITICAL
| 9.8
|
jeecgboot/jeecg-boot
|
filterContent
|
jeecg-boot-base-core/src/main/java/org/jeecg/common/util/SqlInjectionUtil.java
|
0fc374de4745eac52620eeb8caf6a7b76127529a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public static boolean execute(AbstractBuild build, BuildListener listener, BuildTrigger trigger) {
return execute(build, listener);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: execute
File: core/src/main/java/hudson/tasks/BuildTrigger.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
execute
|
core/src/main/java/hudson/tasks/BuildTrigger.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
@GuardedBy("this")
final boolean updateOomAdjLocked(ProcessRecord app, String oomAdjReason) {
return mOomAdjuster.updateOomAdjLocked(app, oomAdjReason);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateOomAdjLocked
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21292
|
MEDIUM
| 5.5
|
android
|
updateOomAdjLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getContextRootRelativePath() {
return contextRootRelativePath;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getContextRootRelativePath
File: flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2023-25499
|
MEDIUM
| 6.5
|
vaadin/flow
|
getContextRootRelativePath
|
flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
|
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean isDragResizing() {
return mDragResizing;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isDragResizing
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
|
isDragResizing
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
void dumpPendingIntentsLocked(FileDescriptor fd, PrintWriter pw, String[] args,
int opti, boolean dumpAll, String dumpPackage) {
boolean printed = false;
pw.println("ACTIVITY MANAGER PENDING INTENTS (dumpsys activity intents)");
if (mIntentSenderRecords.size() > 0) {
// Organize these by package name, so they are easier to read.
final ArrayMap<String, ArrayList<PendingIntentRecord>> byPackage = new ArrayMap<>();
final ArrayList<WeakReference<PendingIntentRecord>> weakRefs = new ArrayList<>();
final Iterator<WeakReference<PendingIntentRecord>> it
= mIntentSenderRecords.values().iterator();
while (it.hasNext()) {
WeakReference<PendingIntentRecord> ref = it.next();
PendingIntentRecord rec = ref != null ? ref.get() : null;
if (rec == null) {
weakRefs.add(ref);
continue;
}
if (dumpPackage != null && !dumpPackage.equals(rec.key.packageName)) {
continue;
}
ArrayList<PendingIntentRecord> list = byPackage.get(rec.key.packageName);
if (list == null) {
list = new ArrayList<>();
byPackage.put(rec.key.packageName, list);
}
list.add(rec);
}
for (int i = 0; i < byPackage.size(); i++) {
ArrayList<PendingIntentRecord> intents = byPackage.valueAt(i);
printed = true;
pw.print(" * "); pw.print(byPackage.keyAt(i));
pw.print(": "); pw.print(intents.size()); pw.println(" items");
for (int j = 0; j < intents.size(); j++) {
pw.print(" #"); pw.print(j); pw.print(": "); pw.println(intents.get(j));
if (dumpAll) {
intents.get(j).dump(pw, " ");
}
}
}
if (weakRefs.size() > 0) {
printed = true;
pw.println(" * WEAK REFS:");
for (int i = 0; i < weakRefs.size(); i++) {
pw.print(" #"); pw.print(i); pw.print(": "); pw.println(weakRefs.get(i));
}
}
}
if (!printed) {
pw.println(" (nothing)");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpPendingIntentsLocked
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
|
dumpPendingIntentsLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public ServerBuilder http1MaxChunkSize(int http1MaxChunkSize) {
this.http1MaxChunkSize = validateNonNegative(http1MaxChunkSize, "http1MaxChunkSize");
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: http1MaxChunkSize
File: core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-44487
|
HIGH
| 7.5
|
line/armeria
|
http1MaxChunkSize
|
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
|
df7f85824a62e997b910b5d6194a3335841065fd
| 0
|
Analyze the following code function for security vulnerabilities
|
void registerUninstallListener() {
mContext.registerReceiver(mUninstallListener, new IntentFilter(Intent.ACTION_UID_REMOVED));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: registerUninstallListener
File: services/core/java/com/android/server/pm/permission/OneTimePermissionUserManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-281"
] |
CVE-2023-21249
|
MEDIUM
| 5.5
|
android
|
registerUninstallListener
|
services/core/java/com/android/server/pm/permission/OneTimePermissionUserManager.java
|
c00b7e7dbc1fa30339adef693d02a51254755d7f
| 0
|
Analyze the following code function for security vulnerabilities
|
String getSchemaName() {
return schemaName;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSchemaName
File: domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
getSchemaName
|
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
public void openNativeNavigationApp(double latitude, double longitude){
execute("google.navigation:ll=" + latitude+ "," + longitude);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: openNativeNavigationApp
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
|
openNativeNavigationApp
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setSlaveAgentPort(int port) throws IOException {
this.slaveAgentPort = port;
// relaunch the agent
if(tcpSlaveAgentListener==null) {
if(slaveAgentPort!=-1)
tcpSlaveAgentListener = new TcpSlaveAgentListener(slaveAgentPort);
} else {
if(tcpSlaveAgentListener.configuredPort!=slaveAgentPort) {
tcpSlaveAgentListener.shutdown();
tcpSlaveAgentListener = null;
if(slaveAgentPort!=-1)
tcpSlaveAgentListener = new TcpSlaveAgentListener(slaveAgentPort);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSlaveAgentPort
File: core/src/main/java/jenkins/model/Jenkins.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-2065
|
MEDIUM
| 4.3
|
jenkinsci/jenkins
|
setSlaveAgentPort
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
void doStopUidForIdleUidsLocked() {
final int size = mActiveUids.size();
for (int i = 0; i < size; i++) {
final int uid = mActiveUids.keyAt(i);
if (UserHandle.isCore(uid)) {
continue;
}
final UidRecord uidRec = mActiveUids.valueAt(i);
if (!uidRec.idle) {
continue;
}
doStopUidLocked(uidRec.uid, uidRec);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doStopUidForIdleUidsLocked
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
|
doStopUidForIdleUidsLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
private int[] getAllUserIds() {
return UserManagerService.getInstance().getUserIdsIncludingPreCreated();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAllUserIds
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
|
getAllUserIds
|
services/core/java/com/android/server/pm/permission/PermissionManagerService.java
|
c00b7e7dbc1fa30339adef693d02a51254755d7f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setManagedProfileMaximumTimeOff(ComponentName who, long timeoutMillis) {
Objects.requireNonNull(who, "ComponentName is null");
Preconditions.checkArgumentNonnegative(timeoutMillis, "Timeout must be non-negative.");
final CallerIdentity caller = getCallerIdentity(who);
// DO shouldn't be able to use this method.
Preconditions.checkCallAuthorization(isProfileOwnerOfOrganizationOwnedDevice(caller));
Preconditions.checkState(canHandleCheckPolicyComplianceIntent(caller));
final int userId = caller.getUserId();
synchronized (getLockObject()) {
final ActiveAdmin admin = getProfileOwnerLocked(userId);
// Ensure the timeout is long enough to avoid having bad user experience.
if (timeoutMillis > 0 && timeoutMillis < MANAGED_PROFILE_MAXIMUM_TIME_OFF_THRESHOLD
&& !isAdminTestOnlyLocked(who, userId)) {
timeoutMillis = MANAGED_PROFILE_MAXIMUM_TIME_OFF_THRESHOLD;
}
if (admin.mProfileMaximumTimeOffMillis == timeoutMillis) {
return;
}
admin.mProfileMaximumTimeOffMillis = timeoutMillis;
saveSettingsLocked(userId);
}
mInjector.binderWithCleanCallingIdentity(
() -> updatePersonalAppsSuspension(userId));
DevicePolicyEventLogger
.createEvent(DevicePolicyEnums.SET_MANAGED_PROFILE_MAXIMUM_TIME_OFF)
.setAdmin(caller.getComponentName())
.setTimePeriod(timeoutMillis)
.write();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setManagedProfileMaximumTimeOff
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
|
setManagedProfileMaximumTimeOff
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public Jooby throwBootstrapException() {
this.throwBootstrapException = true;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: throwBootstrapException
File: jooby/src/main/java/org/jooby/Jooby.java
Repository: jooby-project/jooby
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-7647
|
MEDIUM
| 5
|
jooby-project/jooby
|
throwBootstrapException
|
jooby/src/main/java/org/jooby/Jooby.java
|
34f526028e6cd0652125baa33936ffb6a8a4a009
| 0
|
Analyze the following code function for security vulnerabilities
|
private void doKeyguardForChildProfilesLocked() {
UserManager um = UserManager.get(mContext);
for (int profileId : um.getEnabledProfileIds(UserHandle.myUserId())) {
if (mLockPatternUtils.isSeparateProfileChallengeEnabled(profileId)) {
lockProfile(profileId);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doKeyguardForChildProfilesLocked
File: packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21267
|
MEDIUM
| 5.5
|
android
|
doKeyguardForChildProfilesLocked
|
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
|
d18d8b350756b0e89e051736c1f28744ed31e93a
| 0
|
Analyze the following code function for security vulnerabilities
|
public ArrayList<RecordingMetadata> filterRecordingsByMetadata(List<RecordingMetadata> recordings, Map<String, String> metadataFilters) {
ArrayList<RecordingMetadata> resultRecordings = new ArrayList<>();
for (RecordingMetadata entry : recordings) {
if (recordingMatchesMetadata(entry, metadataFilters))
resultRecordings.add(entry);
}
return resultRecordings;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: filterRecordingsByMetadata
File: bbb-common-web/src/main/java/org/bigbluebutton/api/RecordingService.java
Repository: bigbluebutton
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-12443
|
HIGH
| 7.5
|
bigbluebutton
|
filterRecordingsByMetadata
|
bbb-common-web/src/main/java/org/bigbluebutton/api/RecordingService.java
|
b21ca8355a57286a1e6df96984b3a4c57679a463
| 0
|
Analyze the following code function for security vulnerabilities
|
public void onSavedCertificate() {
checkOcServer();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onSavedCertificate
File: src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java
Repository: nextcloud/android
The code follows secure coding practices.
|
[
"CWE-248"
] |
CVE-2021-32694
|
MEDIUM
| 4.3
|
nextcloud/android
|
onSavedCertificate
|
src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java
|
9343bdd85d70625a90e0c952897957a102c2421b
| 0
|
Analyze the following code function for security vulnerabilities
|
private static String createPassword(String password) throws Exception {
String key = AES.getSecretKey();
if(key != null){
SecretKey sk = AES.getSecretKeyObject(key);
String newPassword = AES.encryptPasswordAsBase64(password, sk);
return newPassword;
}
/** no key , so nothing to encrypt, the password will be the tenant id */
return password;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createPassword
File: domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
createPassword
|
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
private void parseCustomHtmlTag(HtmlCleaner htmlCleaner, Map<String, String> plugin, TagNode tag, String tagName) throws IOException {
if ("plugin".equals(tagName) && tag.hasAttribute("name")) {
tag.setForeignMarkup(true);
Map<String, String> tmp = new LinkedHashMap<>(tag.getAttributes());
tmp.put("_tmp", System.currentTimeMillis() + "");
tag.setAttributes(tmp);
SimpleHtmlSerializer serializer = new SimpleHtmlSerializer(htmlCleaner.getProperties());
StringWriter stringWriter = new StringWriter();
tag.serialize(serializer, stringWriter);
String content = stringWriter.toString();
try {
String url = "/" + tag.getAttributeByName("name") + "/" + tag.getAttributeByName("view");
if (tag.hasAttribute("param")) {
url += "?" + tag.getAttributeByName("param");
}
CloseResponseHandle handle = PluginHelper.getContext(url, "GET", request, false, adminTokenVO);
byte[] bytes = IOUtil.getByteByInputStream(handle.getT().getEntity().getContent());
plugin.put(content, new String(bytes, StandardCharsets.UTF_8));
} catch (Exception e) {
LOGGER.error("", e);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseCustomHtmlTag
File: web/src/main/java/com/zrlog/web/handler/ResponseRenderPrintWriter.java
Repository: 94fzb/zrlog
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-16643
|
LOW
| 3.5
|
94fzb/zrlog
|
parseCustomHtmlTag
|
web/src/main/java/com/zrlog/web/handler/ResponseRenderPrintWriter.java
|
4a91c83af669e31a22297c14f089d8911d353fa1
| 0
|
Analyze the following code function for security vulnerabilities
|
private int updateLruProcessInternalLocked(ProcessRecord app, long now, int index,
String what, Object obj, ProcessRecord srcApp) {
app.lastActivityTime = now;
if (app.activities.size() > 0) {
// Don't want to touch dependent processes that are hosting activities.
return index;
}
int lrui = mLruProcesses.lastIndexOf(app);
if (lrui < 0) {
Slog.wtf(TAG, "Adding dependent process " + app + " not on LRU list: "
+ what + " " + obj + " from " + srcApp);
return index;
}
if (lrui >= index) {
// Don't want to cause this to move dependent processes *back* in the
// list as if they were less frequently used.
return index;
}
if (lrui >= mLruProcessActivityStart) {
// Don't want to touch dependent processes that are hosting activities.
return index;
}
mLruProcesses.remove(lrui);
if (index > 0) {
index--;
}
if (DEBUG_LRU) Slog.d(TAG, "Moving dep from " + lrui + " to " + index
+ " in LRU list: " + app);
mLruProcesses.add(index, app);
return index;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateLruProcessInternalLocked
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
|
updateLruProcessInternalLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
private PyTorchJobSpec parsePyTorchJobSpec(ExperimentSpec experimentSpec)
throws InvalidSpecException {
PyTorchJobSpec pyTorchJobSpec = new PyTorchJobSpec();
V1Container initContainer = this.getExperimentHandlerContainer(experimentSpec);
Map<PyTorchJobReplicaType, MLJobReplicaSpec> replicaSpecMap = new HashMap<>();
for (Map.Entry<String, ExperimentTaskSpec> entry : experimentSpec.getSpec().entrySet()) {
String replicaType = entry.getKey();
ExperimentTaskSpec taskSpec = entry.getValue();
if (PyTorchJobReplicaType.isSupportedReplicaType(replicaType)) {
MLJobReplicaSpec replicaSpec = new MLJobReplicaSpec();
replicaSpec.setReplicas(taskSpec.getReplicas());
V1PodTemplateSpec podTemplateSpec = ExperimentSpecParser.parseTemplateSpec(taskSpec, experimentSpec);
if (initContainer != null && replicaType.equals("Master")) {
podTemplateSpec.getSpec().addInitContainersItem(initContainer);
}
replicaSpec.setTemplate(podTemplateSpec);
replicaSpecMap.put(PyTorchJobReplicaType.valueOf(replicaType), replicaSpec);
} else {
throw new InvalidSpecException("Unrecognized replica type name: " +
entry.getKey() + ", it should be " +
String.join(",", PyTorchJobReplicaType.names()) +
" for PyTorch experiment.");
}
}
pyTorchJobSpec.setReplicaSpecs(replicaSpecMap);
return pyTorchJobSpec;
}
|
Vulnerability Classification:
- CWE: CWE-502
- CVE: CVE-2023-46302
- Severity: CRITICAL
- CVSS Score: 9.8
Description: Replace snakyaml to jackson yaml
Function: parsePyTorchJobSpec
File: submarine-server/server-submitter/submitter-k8s/src/main/java/org/apache/submarine/server/submitter/k8s/model/pytorchjob/PyTorchJob.java
Repository: apache/submarine
Fixed Code:
private PyTorchJobSpec parsePyTorchJobSpec(ExperimentSpec experimentSpec)
throws InvalidSpecException {
PyTorchJobSpec pyTorchJobSpec = new PyTorchJobSpec();
V1Container initContainer = this.getExperimentHandlerContainer(experimentSpec);
Map<PyTorchJobReplicaType, MLJobReplicaSpec> replicaSpecMap = new HashMap<>();
for (Map.Entry<String, ExperimentTaskSpec> entry : experimentSpec.getSpec().entrySet()) {
String replicaType = entry.getKey();
ExperimentTaskSpec taskSpec = entry.getValue();
if (PyTorchJobReplicaType.isSupportedReplicaType(replicaType)) {
MLJobReplicaSpec replicaSpec = new MLJobReplicaSpec();
replicaSpec.setReplicas(taskSpec.getReplicas());
V1PodTemplateSpec podTemplateSpec = ExperimentSpecParser.parseTemplateSpec(taskSpec, experimentSpec);
if (initContainer != null && replicaType.equals("Master")) {
podTemplateSpec.getSpec().addInitContainersItem(initContainer);
}
replicaSpec.setTemplate(podTemplateSpec);
replicaSpecMap.put(PyTorchJobReplicaType.valueOf(replicaType), replicaSpec);
} else {
throw new InvalidSpecException("Unrecognized replica type name: " +
entry.getKey() + ", it should be " +
String.join(",", PyTorchJobReplicaType.names()) +
" for PyTorch experiment.");
}
}
pyTorchJobSpec.setReplicaSpecs(replicaSpecMap);
return pyTorchJobSpec;
}
|
[
"CWE-502"
] |
CVE-2023-46302
|
CRITICAL
| 9.8
|
apache/submarine
|
parsePyTorchJobSpec
|
submarine-server/server-submitter/submitter-k8s/src/main/java/org/apache/submarine/server/submitter/k8s/model/pytorchjob/PyTorchJob.java
|
ed5ad3b824ba388259e0d1ea137d7fca5f0c288e
| 1
|
Analyze the following code function for security vulnerabilities
|
private boolean needToStartChooseAccountActivity(Account[] accounts, String callingPackage) {
if (accounts.length < 1) return false;
if (accounts.length > 1) return true;
Account account = accounts[0];
UserAccounts userAccounts = getUserAccounts(UserHandle.getCallingUserId());
int visibility = resolveAccountVisibility(account, callingPackage, userAccounts);
if (visibility == AccountManager.VISIBILITY_USER_MANAGED_NOT_VISIBLE) return true;
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: needToStartChooseAccountActivity
File: services/core/java/com/android/server/accounts/AccountManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-502"
] |
CVE-2023-45777
|
HIGH
| 7.8
|
android
|
needToStartChooseAccountActivity
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
void backgroundServicesFinishedLocked(int userId) {
for (BroadcastQueue queue : mBroadcastQueues) {
queue.backgroundServicesFinishedLocked(userId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: backgroundServicesFinishedLocked
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
|
backgroundServicesFinishedLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public XDOM parse(String content, Syntax syntax, EntityReference source) throws ParseException,
MissingParserException
{
XDOM xdom = parse(content, syntax);
if (source != null) {
xdom.getMetaData().addMetaData(MetaData.SOURCE, serializer.serialize(source));
}
return xdom;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parse
File: xwiki-platform-core/xwiki-platform-rendering/xwiki-platform-rendering-parser/src/main/java/org/xwiki/rendering/internal/parser/DefaultContentParser.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-755"
] |
CVE-2023-26479
|
MEDIUM
| 6.5
|
xwiki/xwiki-platform
|
parse
|
xwiki-platform-core/xwiki-platform-rendering/xwiki-platform-rendering-parser/src/main/java/org/xwiki/rendering/internal/parser/DefaultContentParser.java
|
e5b82cd98072464196a468b8f7fe6396dce142a7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void serviceExceptionAsync(final IOException e) {
if (asyncException.compareAndSet(false, true)) {
new Thread("Async Exception Handler") {
@Override
public void run() {
serviceException(e);
}
}.start();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: serviceExceptionAsync
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
|
serviceExceptionAsync
|
activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
|
00921f2
| 0
|
Analyze the following code function for security vulnerabilities
|
void dumpProvidersLocked(FileDescriptor fd, PrintWriter pw, String[] args,
int opti, boolean dumpAll, String dumpPackage) {
boolean needSep;
boolean printedAnything = false;
ItemMatcher matcher = new ItemMatcher();
matcher.build(args, opti);
pw.println("ACTIVITY MANAGER CONTENT PROVIDERS (dumpsys activity providers)");
needSep = mProviderMap.dumpProvidersLocked(pw, dumpAll, dumpPackage);
printedAnything |= needSep;
if (mLaunchingProviders.size() > 0) {
boolean printed = false;
for (int i=mLaunchingProviders.size()-1; i>=0; i--) {
ContentProviderRecord r = mLaunchingProviders.get(i);
if (dumpPackage != null && !dumpPackage.equals(r.name.getPackageName())) {
continue;
}
if (!printed) {
if (needSep) pw.println();
needSep = true;
pw.println(" Launching content providers:");
printed = true;
printedAnything = true;
}
pw.print(" Launching #"); pw.print(i); pw.print(": ");
pw.println(r);
}
}
if (!printedAnything) {
pw.println(" (nothing)");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpProvidersLocked
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
|
dumpProvidersLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public static int uncompress(ByteBuffer compressed, ByteBuffer uncompressed)
throws IOException
{
if (!compressed.isDirect()) {
throw new SnappyError(SnappyErrorCode.NOT_A_DIRECT_BUFFER, "input is not a direct buffer");
}
if (!uncompressed.isDirect()) {
throw new SnappyError(SnappyErrorCode.NOT_A_DIRECT_BUFFER, "destination is not a direct buffer");
}
int cPos = compressed.position();
int cLen = compressed.remaining();
int uPos = uncompressed.position();
// pos limit
// [ ......UUUUUU.........]
int decompressedSize = impl.rawUncompress(compressed, cPos, cLen, uncompressed,
uPos);
uncompressed.limit(uPos + decompressedSize);
return decompressedSize;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: uncompress
File: src/main/java/org/xerial/snappy/Snappy.java
Repository: xerial/snappy-java
The code follows secure coding practices.
|
[
"CWE-190"
] |
CVE-2023-34454
|
HIGH
| 7.5
|
xerial/snappy-java
|
uncompress
|
src/main/java/org/xerial/snappy/Snappy.java
|
d0042551e4a3509a725038eb9b2ad1f683674d94
| 0
|
Analyze the following code function for security vulnerabilities
|
private void updateNotification() {
if (DEBUG) Slog.d(TAG, "updateNotification mWarning=" + mWarning + " mPlaySound="
+ mPlaySound + " mSaver=" + mSaver + " mInvalidCharger=" + mInvalidCharger);
if (mInvalidCharger) {
showInvalidChargerNotification();
mShowing = SHOWING_INVALID_CHARGER;
} else if (mWarning) {
showWarningNotification();
mShowing = SHOWING_WARNING;
} else if (mSaver) {
showSaverNotification();
mShowing = SHOWING_SAVER;
} else {
mNoMan.cancelAsUser(TAG_NOTIFICATION, R.id.notification_power, UserHandle.ALL);
mShowing = SHOWING_NOTHING;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateNotification
File: packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3854
|
MEDIUM
| 5
|
android
|
updateNotification
|
packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java
|
05e0705177d2078fa9f940ce6df723312cfab976
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String escapeHtml(String source) {
if (source == null) {
return null;
}
source = CmsEncoder.escapeXml(source);
source = CmsStringUtil.substitute(source, "\r", "");
source = CmsStringUtil.substitute(source, "\n", "<br/>\n");
return source;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: escapeHtml
File: src/org/opencms/util/CmsStringUtil.java
Repository: alkacon/opencms-core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2013-4600
|
MEDIUM
| 4.3
|
alkacon/opencms-core
|
escapeHtml
|
src/org/opencms/util/CmsStringUtil.java
|
72a05e3ea1cf692e2efce002687272e63f98c14a
| 0
|
Analyze the following code function for security vulnerabilities
|
protected boolean validateIssuerAudienceAndAzp(@NonNull JwtClaims claims,
@NonNull String iss,
@NonNull List<String> audiences,
@NonNull String clientId,
@NonNull OpenIdClientConfiguration openIdClientConfiguration) {
if (openIdClientConfiguration.getIssuer().isPresent()) {
Optional<URL> issuerOptional = openIdClientConfiguration.getIssuer();
if (issuerOptional.isPresent()) {
String issuer = issuerOptional.get().toString();
return issuer.equalsIgnoreCase(iss) ||
audiences.contains(clientId) &&
validateAzp(claims, clientId, audiences);
}
}
return false;
}
|
Vulnerability Classification:
- CWE: CWE-284
- CVE: CVE-2023-36820
- Severity: MEDIUM
- CVSS Score: 6.5
Description: Merge pull request from GHSA-qw22-8w9r-864h
The `aud` claim should contain the Client ID.
https://openid.net/specs/openid-connect-core-1_0.html#IDTokenValidation
> Clients MUST validate the ID Token in the Token Response in the following manner:
...
> 1.2. The Issuer Identifier for the OpenID Provider (which is typically obtained during Discovery) MUST exactly match the value of the iss (issuer) Claim.
> 1.3. The Client MUST validate that the aud (audience) Claim contains its client_id value registered at the Issuer identified by the iss (issuer) Claim as an audience.
The audience claim is [validated correctly when obtained from authorisation server.](https://github.com/micronaut-projects/micronaut-security/blob/master/security-oauth2/src/main/java/io/micronaut/security/oauth2/endpoint/token/response/validation/DefaultOpenIdTokenResponseValidator.java#L122) with the [`AudienceClaimValidator`](https://github.com/micronaut-projects/micronaut-security/blob/master/security-oauth2/src/main/java/io/micronaut/security/oauth2/endpoint/token/response/validation/AudienceClaimValidator.java).
However, if the user set `micronaut.security.authentication` to `idtoken`, the token validation of a new request does not validate `aud` claim to match the Client ID if the `iss` claim matched an existing issuer in the application.
This change fixes this vulnerability.
Function: validateIssuerAudienceAndAzp
File: security-oauth2/src/main/java/io/micronaut/security/oauth2/client/IdTokenClaimsValidator.java
Repository: micronaut-projects/micronaut-security
Fixed Code:
protected boolean validateIssuerAudienceAndAzp(@NonNull JwtClaims claims,
@NonNull String iss,
@NonNull List<String> audiences,
@NonNull String clientId,
@NonNull OpenIdClientConfiguration openIdClientConfiguration) {
if (openIdClientConfiguration.getIssuer().isPresent()) {
Optional<URL> issuerOptional = openIdClientConfiguration.getIssuer();
if (issuerOptional.isPresent()) {
String issuer = issuerOptional.get().toString();
return issuer.equalsIgnoreCase(iss) &&
audiences.contains(clientId) &&
validateAzp(claims, clientId, audiences);
}
}
return false;
}
|
[
"CWE-284"
] |
CVE-2023-36820
|
MEDIUM
| 6.5
|
micronaut-projects/micronaut-security
|
validateIssuerAudienceAndAzp
|
security-oauth2/src/main/java/io/micronaut/security/oauth2/client/IdTokenClaimsValidator.java
|
9728b925221a0d87798ccf250657a3c214b7e980
| 1
|
Analyze the following code function for security vulnerabilities
|
void finishUserSwitch(UserStartedState uss) {
synchronized (this) {
finishUserBoot(uss);
startProfilesLocked();
int num = mUserLru.size();
int i = 0;
while (num > MAX_RUNNING_USERS && i < mUserLru.size()) {
Integer oldUserId = mUserLru.get(i);
UserStartedState oldUss = mStartedUsers.get(oldUserId);
if (oldUss == null) {
// Shouldn't happen, but be sane if it does.
mUserLru.remove(i);
num--;
continue;
}
if (oldUss.mState == UserStartedState.STATE_STOPPING
|| oldUss.mState == UserStartedState.STATE_SHUTDOWN) {
// This user is already stopping, doesn't count.
num--;
i++;
continue;
}
if (oldUserId == UserHandle.USER_OWNER || oldUserId == mCurrentUserId) {
// Owner and current can't be stopped, but count as running.
i++;
continue;
}
// This is a user to be stopped.
stopUserLocked(oldUserId, null);
num--;
i++;
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: finishUserSwitch
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
|
finishUserSwitch
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
public Optional<MongoDbSession> forUser(UserOverviewDTO user) {
return sessions.getOrDefault(user.id(), Optional.empty());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: forUser
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
|
forUser
|
graylog2-server/src/main/java/org/graylog2/rest/resources/users/UsersResource.java
|
bb88f3d0b2b0351669ab32c60b595ab7242a3fe3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onLaunchAnimationCancelled() {
setOccluded(true /* occluded */, false /* animate */);
Log.d(TAG, "Occlude launch animation cancelled. Occluded state is now: "
+ mOccluded);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onLaunchAnimationCancelled
File: packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21267
|
MEDIUM
| 5.5
|
android
|
onLaunchAnimationCancelled
|
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
|
d18d8b350756b0e89e051736c1f28744ed31e93a
| 0
|
Analyze the following code function for security vulnerabilities
|
public ModalDialog addButtonBar(final AjaxRequestTarget target)
{
target.add(buttonBarContainer);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addButtonBar
File: src/main/java/org/projectforge/web/dialog/ModalDialog.java
Repository: micromata/projectforge-webapp
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2013-7251
|
MEDIUM
| 6.8
|
micromata/projectforge-webapp
|
addButtonBar
|
src/main/java/org/projectforge/web/dialog/ModalDialog.java
|
422de35e3c3141e418a73bfb39b430d5fd74077e
| 0
|
Analyze the following code function for security vulnerabilities
|
protected Http2Connection connection() {
return connection;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: connection
File: codec-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2ConnectionHandlerBuilder.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-44487
|
HIGH
| 7.5
|
netty
|
connection
|
codec-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2ConnectionHandlerBuilder.java
|
58f75f665aa81a8cbcf6ffa74820042a285c5e61
| 0
|
Analyze the following code function for security vulnerabilities
|
public void stop() {
LOG.debug("Attempting to stop DNS client");
if (nettyEventLoop == null) {
LOG.error("DNS resolution event loop not initialized");
return;
}
// Make sure to close the resolver before shutting down the event loop
resolver.close();
// Shutdown event loop (required by Netty).
final Future<?> shutdownFuture = nettyEventLoop.shutdownGracefully();
shutdownFuture.addListener(future -> LOG.debug("DNS client shutdown successful"));
}
|
Vulnerability Classification:
- CWE: CWE-345
- CVE: CVE-2023-41045
- Severity: MEDIUM
- CVSS Score: 5.3
Description: Merge pull request from GHSA-g96c-x7rh-99r3
* Add support for randomizing DNS Lookup source port
* Clarify purpose of lease
* Skip initial refresh
Previously, the pool was being refreshed immediately upon initialization. Now, the refresh waits until the `poolRefreshSeconds` duration has elapsed.
* Ensure thread safety, skip unused poller refreshes
* Add change log
Function: stop
File: graylog2-server/src/main/java/org/graylog2/lookup/adapters/dnslookup/DnsClient.java
Repository: Graylog2/graylog2-server
Fixed Code:
public void stop() {
LOG.debug("Attempting to stop DNS client");
if (resolverPool == null) {
LOG.error("DNS resolution pool is not initialized.");
return;
}
resolverPool.stop();
}
|
[
"CWE-345"
] |
CVE-2023-41045
|
MEDIUM
| 5.3
|
Graylog2/graylog2-server
|
stop
|
graylog2-server/src/main/java/org/graylog2/lookup/adapters/dnslookup/DnsClient.java
|
466af814523cffae9fbc7e77bab7472988f03c3e
| 1
|
Analyze the following code function for security vulnerabilities
|
@CalledByNative
private void hideSelectPopup() {
if (mSelectPopup != null) mSelectPopup.hide();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hideSelectPopup
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
hideSelectPopup
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getAltSubjectMatch() {
return getFieldValue(ALTSUBJECT_MATCH_KEY, "");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAltSubjectMatch
File: wifi/java/android/net/wifi/WifiEnterpriseConfig.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3897
|
MEDIUM
| 4.3
|
android
|
getAltSubjectMatch
|
wifi/java/android/net/wifi/WifiEnterpriseConfig.java
|
81be4e3aac55305cbb5c9d523cf5c96c66604b39
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String toString() {
return tokType + "\t" + token + "\t" + expires;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toString
File: src/gribbit/auth/User.java
Repository: lukehutch/gribbit
The code follows secure coding practices.
|
[
"CWE-346"
] |
CVE-2014-125071
|
MEDIUM
| 5.2
|
lukehutch/gribbit
|
toString
|
src/gribbit/auth/User.java
|
620418df247aebda3dd4be1dda10fe229ea505dd
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
protected void setBrowseNamespaceTemplate(final Template browseNamespaceTemplate) {
this.browseNamespaceTemplate = browseNamespaceTemplate;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setBrowseNamespaceTemplate
File: varexport/src/main/java/com/indeed/util/varexport/servlet/ViewExportedVariablesServlet.java
Repository: indeedeng/util
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-36634
|
MEDIUM
| 5.4
|
indeedeng/util
|
setBrowseNamespaceTemplate
|
varexport/src/main/java/com/indeed/util/varexport/servlet/ViewExportedVariablesServlet.java
|
c0952a9db51a880e9544d9fac2a2218a6bfc9c63
| 0
|
Analyze the following code function for security vulnerabilities
|
private void preventBulkImport(ExportConfig config) {
if (config.isBulkImport()) {
throw new RuntimeException("You can use the `bulkImport` only with apoc.export.all and apoc.export.csv.graph");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: preventBulkImport
File: core/src/main/java/apoc/export/csv/ExportCSV.java
Repository: neo4j-contrib/neo4j-apoc-procedures
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-23532
|
MEDIUM
| 6.5
|
neo4j-contrib/neo4j-apoc-procedures
|
preventBulkImport
|
core/src/main/java/apoc/export/csv/ExportCSV.java
|
01e63ed2d187cd2a8aa1d78bf831ef0fdd69b522
| 0
|
Analyze the following code function for security vulnerabilities
|
private void logRecordWithUid(UserAccounts accounts, String action, String tableName, int uid) {
logRecord(action, tableName, -1, accounts, uid);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: logRecordWithUid
File: services/core/java/com/android/server/accounts/AccountManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-502"
] |
CVE-2023-45777
|
HIGH
| 7.8
|
android
|
logRecordWithUid
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
public void deleteTenant(String tenant) {
StopWatch stopWatch = StopWatch.createStarted();
log.info("START - SETUP:DeleteTenant: tenantKey: {}", tenant);
try {
databaseService.drop(tenant);
tenantListRepository.deleteTenant(tenant);
tenantConfigRepository.deleteConfig(tenant.toUpperCase(),
"/" + applicationProperties.getTenantPropertiesName());
tenantConfigRepository.deleteConfig(tenant.toUpperCase(),
"/" + applicationProperties.getTenantLoginPropertiesName());
tenantConfigRepository.deleteConfigFullPath(tenant.toUpperCase(),
API + permissionProperties.getRolesSpecPath());
tenantConfigRepository.deleteConfigFullPath(tenant.toUpperCase(),
API + permissionProperties.getPermissionsSpecPath());
log.info("STOP - SETUP:DeleteTenant: tenantKey: {}, result: OK, time = {} ms",
tenant, stopWatch.getTime());
} catch (Exception e) {
log.info("STOP - SETUP:DeleteTenant: tenantKey: {}, result: FAIL, error: {}, time = {} ms",
tenant, e.getMessage(), stopWatch.getTime());
throw e;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deleteTenant
File: src/main/java/com/icthh/xm/uaa/service/tenant/TenantService.java
Repository: xm-online/xm-uaa
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15557
|
HIGH
| 7.5
|
xm-online/xm-uaa
|
deleteTenant
|
src/main/java/com/icthh/xm/uaa/service/tenant/TenantService.java
|
bd235434f119c67090952e08fc28abe41aea2e2c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
@SuppressWarnings("unchecked")
public <T> T fromString(String content, Class<T> classOfT) {
try (StringReader reader = new StringReader(content)) {
JAXBContext jaxbContext = JAXBContext.newInstance(classOfT);
Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller();
return (T) jaxbUnmarshaller.unmarshal(reader);
} catch (JAXBException e) {
throw new PippoRuntimeException(e, "Failed to deserialize content to '{}'", classOfT.getName());
}
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2018-20059
- Severity: HIGH
- CVSS Score: 7.5
Description: Fix #486
Function: fromString
File: pippo-content-type-parent/pippo-jaxb/src/main/java/ro/pippo/jaxb/JaxbEngine.java
Repository: pippo-java/pippo
Fixed Code:
@Override
@SuppressWarnings("unchecked")
public <T> T fromString(String content, Class<T> classOfT) {
try (StringReader reader = new StringReader(content)) {
JAXBContext jaxbContext = JAXBContext.newInstance(classOfT);
XMLInputFactory xmlInputFactory = XMLInputFactory.newFactory();
xmlInputFactory.setProperty(XMLInputFactory.IS_SUPPORTING_EXTERNAL_ENTITIES, false);
xmlInputFactory.setProperty(XMLInputFactory.SUPPORT_DTD, true);
XMLStreamReader xmlStreamReader = xmlInputFactory.createXMLStreamReader(reader);
Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
return (T) unmarshaller.unmarshal(xmlStreamReader);
} catch (JAXBException | XMLStreamException e) {
throw new PippoRuntimeException(e, "Failed to deserialize content to '{}'", classOfT.getName());
}
}
|
[
"CWE-611"
] |
CVE-2018-20059
|
HIGH
| 7.5
|
pippo-java/pippo
|
fromString
|
pippo-content-type-parent/pippo-jaxb/src/main/java/ro/pippo/jaxb/JaxbEngine.java
|
9f36e5891c0b11f840e1e1561ae96d83ba9ce759
| 1
|
Analyze the following code function for security vulnerabilities
|
@Nullable
public String getName() {
int id = nativeGetName(mParseState);
return id >= 0 ? getSequenceString(mStrings.getSequence(id)) : null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getName
File: core/java/android/content/res/XmlBlock.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-415"
] |
CVE-2023-40103
|
HIGH
| 7.8
|
android
|
getName
|
core/java/android/content/res/XmlBlock.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
public static SetupEncryptionDialogFragment newInstance(User user, int position) {
SetupEncryptionDialogFragment fragment = new SetupEncryptionDialogFragment();
Bundle args = new Bundle();
args.putParcelable(ARG_USER, user);
args.putInt(ARG_POSITION, position);
fragment.setArguments(args);
return fragment;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: newInstance
File: src/main/java/com/owncloud/android/ui/dialog/SetupEncryptionDialogFragment.java
Repository: nextcloud/android
The code follows secure coding practices.
|
[
"CWE-212"
] |
CVE-2021-32658
|
LOW
| 2.1
|
nextcloud/android
|
newInstance
|
src/main/java/com/owncloud/android/ui/dialog/SetupEncryptionDialogFragment.java
|
355f3c745b464b741b20a3b96597303490c26333
| 0
|
Analyze the following code function for security vulnerabilities
|
public File prepareDownloadFile(Response response) throws IOException {
String filename = null;
String contentDisposition = (String) response.getHeaders().getFirst("Content-Disposition");
if (contentDisposition != null && !"".equals(contentDisposition)) {
// Get filename from the Content-Disposition header.
Pattern pattern = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?");
Matcher matcher = pattern.matcher(contentDisposition);
if (matcher.find())
filename = matcher.group(1);
}
String prefix;
String suffix = null;
if (filename == null) {
prefix = "download-";
suffix = "";
} else {
int pos = filename.lastIndexOf('.');
if (pos == -1) {
prefix = filename + "-";
} else {
prefix = filename.substring(0, pos) + "-";
suffix = filename.substring(pos);
}
// File.createTempFile requires the prefix to be at least three characters long
if (prefix.length() < 3)
prefix = "download-";
}
if (tempFolderPath == null)
return File.createTempFile(prefix, suffix);
else
return File.createTempFile(prefix, suffix, new File(tempFolderPath));
}
|
Vulnerability Classification:
- CWE: CWE-668
- CVE: CVE-2021-21430
- Severity: LOW
- CVSS Score: 2.1
Description: use Files.createTempFile
Function: prepareDownloadFile
File: samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
Fixed Code:
public File prepareDownloadFile(Response response) throws IOException {
String filename = null;
String contentDisposition = (String) response.getHeaders().getFirst("Content-Disposition");
if (contentDisposition != null && !"".equals(contentDisposition)) {
// Get filename from the Content-Disposition header.
Pattern pattern = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?");
Matcher matcher = pattern.matcher(contentDisposition);
if (matcher.find())
filename = matcher.group(1);
}
String prefix;
String suffix = null;
if (filename == null) {
prefix = "download-";
suffix = "";
} else {
int pos = filename.lastIndexOf('.');
if (pos == -1) {
prefix = filename + "-";
} else {
prefix = filename.substring(0, pos) + "-";
suffix = filename.substring(pos);
}
// Files.createTempFile requires the prefix to be at least three characters long
if (prefix.length() < 3)
prefix = "download-";
}
if (tempFolderPath == null)
return Files.createTempFile(prefix, suffix).toFile();
else
return Files.createTempFile(Paths.get(tempFolderPath), prefix, suffix).toFile();
}
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
prepareDownloadFile
|
samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 1
|
Analyze the following code function for security vulnerabilities
|
public static byte getByte(byte[] data, int index) {
return PlatformDependent0.getByte(data, index);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getByte
File: common/src/main/java/io/netty/util/internal/PlatformDependent.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-668",
"CWE-378",
"CWE-379"
] |
CVE-2022-24823
|
LOW
| 1.9
|
netty
|
getByte
|
common/src/main/java/io/netty/util/internal/PlatformDependent.java
|
185f8b2756a36aaa4f973f1a2a025e7d981823f1
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void run() {
if(com.codename1.ui.Toolbar.isGlobalToolbar()) {
return;
}
ActionBar ab = activity.getActionBar();
String title = f.getTitle();
boolean hasMenuBtn = false;
if(android.os.Build.VERSION.SDK_INT >= 14){
try {
ViewConfiguration vc = ViewConfiguration.get(activity);
Method m = vc.getClass().getMethod("hasPermanentMenuKey", (Class[])null);
hasMenuBtn = ((Boolean)m.invoke(vc, (Object[])null)).booleanValue();
} catch(Throwable t) {
t.printStackTrace();
}
}
if((title != null && title.length() > 0) || (f.getCommandCount() > 0 && !hasMenuBtn)){
activity.runOnUiThread(new NotifyActionBar(activity, true));
}else{
activity.runOnUiThread(new NotifyActionBar(activity, false));
return;
}
ab.setTitle(title);
ab.setDisplayHomeAsUpEnabled(f.getBackCommand() != null);
if(android.os.Build.VERSION.SDK_INT >= 14){
Image icon = f.getTitleComponent().getIcon();
try {
if(icon != null){
ab.getClass().getMethod("setIcon", Drawable.class).invoke(ab, new BitmapDrawable(activity.getResources(), (Bitmap)icon.getImage()));
}else{
if(activity.getApplicationInfo().icon != 0){
ab.getClass().getMethod("setIcon", Integer.TYPE).invoke(ab, activity.getApplicationInfo().icon);
}
}
activity.runOnUiThread(new InvalidateOptionsMenuImpl(activity));
} catch(Throwable t) {
t.printStackTrace();
}
}
return;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: run
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
|
run
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getNamespaceType() {
return getXmlType().name.equals("hazelcast") ? "config" : "client-config";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNamespaceType
File: hazelcast/src/main/java/com/hazelcast/config/AbstractXmlConfigHelper.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
getNamespaceType
|
hazelcast/src/main/java/com/hazelcast/config/AbstractXmlConfigHelper.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated(since = "2.2M1")
public void setTemplate(String template)
{
DocumentReference templateReference = null;
if (!StringUtils.isEmpty(template)) {
templateReference = getCurrentMixedDocumentReferenceResolver().resolve(template);
}
setTemplateDocumentReference(templateReference);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setTemplate
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2023-29523
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
setTemplate
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
0d547181389f7941e53291af940966413823f61c
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequestMapping({"/userview/(*:appId)/(*:userviewId)/(*:key)/serviceworker"})
public void serviceWorker(ModelMap map, HttpServletRequest request, HttpServletResponse response, @RequestParam("appId") String appId, @RequestParam("userviewId") String userviewId, @RequestParam("key") String userviewKey) throws IOException {
String serviceWorker = UserviewUtil.getServiceWorker(SecurityUtil.validateStringInput(appId), SecurityUtil.validateStringInput(userviewId), SecurityUtil.validateStringInput(userviewKey));
response.setContentType("application/javascript;charset=UTF-8");
response.setHeader("Service-Worker-Allowed", (request.getContextPath().isEmpty())?"/":request.getContextPath());
PrintWriter writer = response.getWriter();
writer.println(serviceWorker);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: serviceWorker
File: wflow-consoleweb/src/main/java/org/joget/apps/app/controller/UserviewWebController.java
Repository: jogetworkflow/jw-community
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-4560
|
MEDIUM
| 6.1
|
jogetworkflow/jw-community
|
serviceWorker
|
wflow-consoleweb/src/main/java/org/joget/apps/app/controller/UserviewWebController.java
|
ecf8be8f6f0cb725c18536ddc726d42a11bdaa1b
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getBase64EncodedPublicKey() {
String key = Display.getInstance().getProperty("android.licenseKey", "");
return key;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getBase64EncodedPublicKey
File: Ports/Android/src/com/codename1/impl/android/CodenameOneActivity.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
getBase64EncodedPublicKey
|
Ports/Android/src/com/codename1/impl/android/CodenameOneActivity.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
protected HashMap<Integer,String> getParentItemOIDs(String crfVersionIds) {
HashMap<Integer,String> oids = new HashMap<Integer,String>();
this.setParentItemOIDsTypesExpected();
ArrayList rows = this.select(this.getParentItemOIDsSql(crfVersionIds));
Iterator it = rows.iterator();
while(it.hasNext()) {
HashMap row = (HashMap) it.next();
Integer itId = (Integer) row.get("item_id");
String oid = (String) row.get("oc_oid");
oids.put(itId, oid);
}
return oids;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getParentItemOIDs
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
|
getParentItemOIDs
|
core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
|
b152cc63019230c9973965a98e4386ea5322c18f
| 0
|
Analyze the following code function for security vulnerabilities
|
private DocumentReferenceResolver<String> getDefaultDocumentReferenceResolver()
{
if (this.defaultDocumentReferenceResolver == null) {
this.defaultDocumentReferenceResolver = Utils.getComponent(DocumentReferenceResolver.TYPE_STRING);
}
return this.defaultDocumentReferenceResolver;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDefaultDocumentReferenceResolver
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2023-37911
|
MEDIUM
| 6.5
|
xwiki/xwiki-platform
|
getDefaultDocumentReferenceResolver
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
|
f471f2a392aeeb9e51d59fdfe1d76fccf532523f
| 0
|
Analyze the following code function for security vulnerabilities
|
protected final Object _deserializeOther(JsonParser p, DeserializationContext ctxt,
JsonToken t) throws IOException
{
// and then others, generally requiring use of @JsonCreator
if (t != null) {
switch (t) {
case VALUE_STRING:
return deserializeFromString(p, ctxt);
case VALUE_NUMBER_INT:
return deserializeFromNumber(p, ctxt);
case VALUE_NUMBER_FLOAT:
return deserializeFromDouble(p, ctxt);
case VALUE_EMBEDDED_OBJECT:
return deserializeFromEmbedded(p, ctxt);
case VALUE_TRUE:
case VALUE_FALSE:
return deserializeFromBoolean(p, ctxt);
case VALUE_NULL:
return deserializeFromNull(p, ctxt);
case START_ARRAY:
// these only work if there's a (delegating) creator, or UNWRAP_SINGLE_ARRAY
return _deserializeFromArray(p, ctxt);
case FIELD_NAME:
case END_OBJECT: // added to resolve [JACKSON-319], possible related issues
if (_vanillaProcessing) {
return vanillaDeserialize(p, ctxt, t);
}
if (_objectIdReader != null) {
return deserializeWithObjectId(p, ctxt);
}
return deserializeFromObject(p, ctxt);
default:
}
}
return ctxt.handleUnexpectedToken(getValueType(ctxt), p);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _deserializeOther
File: src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializer.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2022-42004
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
_deserializeOther
|
src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializer.java
|
063183589218fec19a9293ed2f17ec53ea80ba88
| 0
|
Analyze the following code function for security vulnerabilities
|
public @NonNull Set<String> getAffiliationIds(@NonNull ComponentName admin) {
throwIfParentInstance("getAffiliationIds");
try {
return new ArraySet<>(mService.getAffiliationIds(admin));
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAffiliationIds
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
|
getAffiliationIds
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void release(int displayId) {
synchronized (mGlobalLock) {
final RootWindowContainer.SleepToken token = mSleepTokens.get(displayId);
if (token != null) {
mRootWindowContainer.removeSleepToken(token);
mSleepTokens.remove(displayId);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: release
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
|
release
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public SyncNotedAppOp noteOperation(int code, int uid, @Nullable String packageName,
@Nullable String featureId, boolean shouldCollectAsyncNotedOp,
@Nullable String message, boolean shouldCollectMessage,
@NonNull HeptFunction<Integer, Integer, String, String, Boolean, String, Boolean,
SyncNotedAppOp> superImpl) {
if (uid == mTargetUid && isTargetOp(code)) {
final int shellUid = UserHandle.getUid(UserHandle.getUserId(uid),
Process.SHELL_UID);
final long identity = Binder.clearCallingIdentity();
try {
return superImpl.apply(code, shellUid, "com.android.shell", featureId,
shouldCollectAsyncNotedOp, message, shouldCollectMessage);
} finally {
Binder.restoreCallingIdentity(identity);
}
}
return superImpl.apply(code, uid, packageName, featureId, shouldCollectAsyncNotedOp,
message, shouldCollectMessage);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: noteOperation
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
|
noteOperation
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public abstract BaseXMLBuilder element(String name);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: element
File: src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
Repository: jmurty/java-xmlbuilder
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2014-125087
|
MEDIUM
| 5.2
|
jmurty/java-xmlbuilder
|
element
|
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
|
e6fddca201790abab4f2c274341c0bb8835c3e73
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setNearbyNotificationStreamingPolicy(int policy) {
if (!mHasFeature) {
return;
}
final CallerIdentity caller = getCallerIdentity();
Preconditions.checkCallAuthorization(
isDefaultDeviceOwner(caller) || isProfileOwner(caller));
synchronized (getLockObject()) {
final ActiveAdmin admin = getProfileOwnerOrDeviceOwnerLocked(caller);
if (admin.mNearbyNotificationStreamingPolicy != policy) {
admin.mNearbyNotificationStreamingPolicy = policy;
saveSettingsLocked(caller.getUserId());
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setNearbyNotificationStreamingPolicy
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
|
setNearbyNotificationStreamingPolicy
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
private void switchUserNow(int userId) {
try {
ActivityManagerNative.getDefault().switchUser(userId);
} catch (RemoteException re) {
// Nothing to do
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: switchUserNow
File: src/com/android/settings/users/UserSettings.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3889
|
HIGH
| 7.2
|
android
|
switchUserNow
|
src/com/android/settings/users/UserSettings.java
|
bd5d5176c74021e8cf4970f93f273ba3023c3d72
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setProfileId(String profileId) {
this.profileId = profileId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setProfileId
File: base/common/src/main/java/com/netscape/certsrv/cert/CertEnrollmentRequest.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
setProfileId
|
base/common/src/main/java/com/netscape/certsrv/cert/CertEnrollmentRequest.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public final String toString() {
return key.toString() + '=' + value.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toString
File: codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-436",
"CWE-113"
] |
CVE-2022-41915
|
MEDIUM
| 6.5
|
netty
|
toString
|
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
|
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
| 0
|
Analyze the following code function for security vulnerabilities
|
protected abstract List<QueryTable> getQueryTableInfo(String sql);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getQueryTableInfo
File: jeecg-boot-base-core/src/main/java/org/jeecg/common/util/security/AbstractQueryBlackListHandler.java
Repository: jeecgboot/jeecg-boot
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2023-34602
|
HIGH
| 7.5
|
jeecgboot/jeecg-boot
|
getQueryTableInfo
|
jeecg-boot-base-core/src/main/java/org/jeecg/common/util/security/AbstractQueryBlackListHandler.java
|
dd7bf104e7ed59142909567ecd004335c3442ec5
| 0
|
Analyze the following code function for security vulnerabilities
|
public synchronized static int getCurrentUser() {
return sCurrentUser;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCurrentUser
File: packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
getCurrentUser
|
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setHasOptionsMenu(true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onCreate
File: src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
onCreate
|
src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
protected HttpUriRequest makeRequest() throws IOException, MessageInvalidException {
final String requestUri = getRequestUri();
HttpUriRequest req;
if (mAttemptNumber == ATTEMPT_UNAUTHENTICATED_GET) {
req = mConnection.makeGet(requestUri);
} else {
req = mConnection.makePost(requestUri, getRequestEntity(),
getRequestContentType(), addPolicyKeyHeaderToRequest());
}
return req;
}
|
Vulnerability Classification:
- CWE: CWE-200
- CVE: CVE-2016-2415
- Severity: HIGH
- CVSS Score: 7.1
Description: Patch Exchange Autodiscover Code for Security Issue
The change removes the unauthenticated GET fallback attempt for the
Autodiscover process. Given that the Autodiscover code is functionally broken
and this fallback attempt wouldn't succeed unless an attacker faked a success
response, a good way to patch the security issue is to disable the attempt.
The change also updates the request content type, disables automatic
redirects, and allows for parsing namespaces to help the first two attempts
succeed. As this is not meant to be a functional patch but a security patch,
there are no further changes to the Autodiscover code.
BUG: 26488455
Change-Id: I0fc93c95e755c8fa60e94da5bec4b3b4c49cdfc1
Function: makeRequest
File: src/com/android/exchange/eas/EasAutoDiscover.java
Repository: android
Fixed Code:
protected HttpUriRequest makeRequest() throws IOException, MessageInvalidException {
final String requestUri = getRequestUri();
final HttpUriRequest req = mConnection.makePost(requestUri, getRequestEntity(),
getRequestContentType(), addPolicyKeyHeaderToRequest());
// Disable auto-redirecting for this request.
HttpClientParams.setRedirecting(req.getParams(), false);
return req;
}
|
[
"CWE-200"
] |
CVE-2016-2415
|
HIGH
| 7.1
|
android
|
makeRequest
|
src/com/android/exchange/eas/EasAutoDiscover.java
|
0d1a38b1755efe7ed4e8d7302a24186616bba9b2
| 1
|
Analyze the following code function for security vulnerabilities
|
public ModalDialog open(final AjaxRequestTarget target)
{
target.appendJavaScript("$('#" + getMainContainerMarkupId() + "').modal('show');");
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: open
File: src/main/java/org/projectforge/web/dialog/ModalDialog.java
Repository: micromata/projectforge-webapp
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2013-7251
|
MEDIUM
| 6.8
|
micromata/projectforge-webapp
|
open
|
src/main/java/org/projectforge/web/dialog/ModalDialog.java
|
422de35e3c3141e418a73bfb39b430d5fd74077e
| 0
|
Analyze the following code function for security vulnerabilities
|
private void processDefinedInterfaces(InterfaceType xmlIntf, PluginPackages pluginPackageEntity,
PluginConfigs pluginConfigEntity) {
if (log.isInfoEnabled()) {
log.info("process interfaces...");
}
if (xmlIntf == null) {
return;
}
PluginConfigInterfaces intfEntity = new PluginConfigInterfaces();
intfEntity.setId(LocalIdGenerator.generateId());
intfEntity.setAction(xmlIntf.getAction());
intfEntity.setDescription(xmlIntf.getDescription());
String filterRule = xmlIntf.getFilterRule();
if (StringUtils.isBlank(filterRule)) {
filterRule = DEFAULT_FILTER_RULE_FOR_INTERFACE;
}
intfEntity.setFilterRule(filterRule);
String httpMethod = xmlIntf.getHttpMethod();
if (StringUtils.isBlank(httpMethod)) {
httpMethod = "POST";
}
intfEntity.setHttpMethod(httpMethod);
String asyncProcessing = xmlIntf.getIsAsyncProcessing();
if (StringUtils.isBlank(asyncProcessing)) {
asyncProcessing = PluginConfigInterfaces.DEFAULT_IS_ASYNC_PROCESSING_VALUE;
}
intfEntity.setIsAsyncProcessing(asyncProcessing);
intfEntity.setPath(xmlIntf.getPath());
intfEntity.setPluginConfigId(pluginConfigEntity.getId());
String interfaceType = xmlIntf.getType();
if (StringUtils.isBlank(interfaceType)) {
interfaceType = PluginConfigInterfaces.DEFAULT_INTERFACE_TYPE;
}
intfEntity.setType(interfaceType);
//
String serviceName = intfEntity.generateServiceName(pluginPackageEntity, pluginConfigEntity);
intfEntity.setServiceName(serviceName);
intfEntity.setServiceDisplayName(serviceName);
pluginConfigInterfacesMapper.insert(intfEntity);
InputParametersType xmlInputParameters = xmlIntf.getInputParameters();
if (xmlInputParameters != null) {
processInputParameters(xmlInputParameters, pluginPackageEntity, pluginConfigEntity, intfEntity);
}
OutputParametersType xmlOutputParameters = xmlIntf.getOutputParameters();
if (xmlOutputParameters != null) {
processOutputParameters(xmlOutputParameters, pluginPackageEntity, pluginConfigEntity, intfEntity);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: processDefinedInterfaces
File: platform-core/src/main/java/com/webank/wecube/platform/core/service/plugin/PluginArtifactsMgmtService.java
Repository: WeBankPartners/wecube-platform
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-45746
|
MEDIUM
| 5
|
WeBankPartners/wecube-platform
|
processDefinedInterfaces
|
platform-core/src/main/java/com/webank/wecube/platform/core/service/plugin/PluginArtifactsMgmtService.java
|
1164dae43c505f8a0233cc049b2689d6ca6d0c37
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<Entry<P>> getPrimitive(final byte[] identifier) {
List<Entry<P>> found = primitives.get(new String(identifier, UTF_8));
return found != null ? found : Collections.<Entry<P>>emptyList();
}
|
Vulnerability Classification:
- CWE: CWE-176
- CVE: CVE-2020-8929
- Severity: MEDIUM
- CVSS Score: 5.0
Description: Fixing ciphertext malleability issue in Java caused by storing the ciphertext prefix in a hashmap keyed by UTF8 encoded strings, instead of byte arrays, leading to the ability to retrieve keys with IDs that happen to be invalid Unicode strings with a changed ID.
PiperOrigin-RevId: 336763863
Function: getPrimitive
File: java_src/src/main/java/com/google/crypto/tink/PrimitiveSet.java
Repository: tink-crypto/tink
Fixed Code:
public List<Entry<P>> getPrimitive(final byte[] identifier) {
List<Entry<P>> found = primitives.get(new Prefix(identifier));
return found != null ? found : Collections.<Entry<P>>emptyList();
}
|
[
"CWE-176"
] |
CVE-2020-8929
|
MEDIUM
| 5
|
tink-crypto/tink
|
getPrimitive
|
java_src/src/main/java/com/google/crypto/tink/PrimitiveSet.java
|
93d839a5865b9d950dffdc9d0bc99b71280a8899
| 1
|
Analyze the following code function for security vulnerabilities
|
public String getUserNameFromToken(String authToken) {
if (null == authToken) {
return null;
}
String[] parts = authToken.split(":");
return parts[0];
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserNameFromToken
File: app/templates/src/main/java/package/security/xauth/_TokenProvider.java
Repository: jhipster/generator-jhipster
The code follows secure coding practices.
|
[
"CWE-307"
] |
CVE-2015-20110
|
HIGH
| 7.5
|
jhipster/generator-jhipster
|
getUserNameFromToken
|
app/templates/src/main/java/package/security/xauth/_TokenProvider.java
|
79fe5626cb1bb80f9ac86cf46980748e65d2bdbc
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.