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
|
@Override
public void setFactoryResetProtectionPolicy(ComponentName who, String callerPackageName,
@Nullable FactoryResetProtectionPolicy policy) {
if (!mHasFeature) {
return;
}
if (!isPermissionCheckFlagEnabled()) {
Preconditions.checkNotNull(who, "ComponentName is null");
}
CallerIdentity caller = getCallerIdentity(who, callerPackageName);
if (!isPermissionCheckFlagEnabled()) {
Preconditions.checkCallAuthorization(
isDefaultDeviceOwner(caller)
|| isProfileOwnerOfOrganizationOwnedDevice(caller));
}
checkCanExecuteOrThrowUnsafe(DevicePolicyManager
.OPERATION_SET_FACTORY_RESET_PROTECTION_POLICY);
final int frpManagementAgentUid = getFrpManagementAgentUidOrThrow();
synchronized (getLockObject()) {
ActiveAdmin admin;
if (isPermissionCheckFlagEnabled()) {
admin = enforcePermissionAndGetEnforcingAdmin(
who, MANAGE_DEVICE_POLICY_FACTORY_RESET, caller.getPackageName(),
UserHandle.USER_ALL)
.getActiveAdmin();
} else {
admin = getProfileOwnerOrDeviceOwnerLocked(caller.getUserId());
}
admin.mFactoryResetProtectionPolicy = policy;
saveSettingsLocked(caller.getUserId());
}
mInjector.binderWithCleanCallingIdentity(
() -> notifyResetProtectionPolicyChanged(frpManagementAgentUid));
DevicePolicyEventLogger
.createEvent(DevicePolicyEnums.SET_FACTORY_RESET_PROTECTION)
.setAdmin(caller.getPackageName())
.write();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setFactoryResetProtectionPolicy
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
|
setFactoryResetProtectionPolicy
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
private void maybeStartSecurityLogMonitorOnActivityManagerReady() {
synchronized (getLockObject()) {
if (mInjector.securityLogIsLoggingEnabled()) {
mSecurityLogMonitor.start(getSecurityLoggingEnabledUser());
mInjector.runCryptoSelfTest();
maybePauseDeviceWideLoggingLocked();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: maybeStartSecurityLogMonitorOnActivityManagerReady
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
|
maybeStartSecurityLogMonitorOnActivityManagerReady
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void verifyNoOtherSessionLocked(VaadinSession session) {
if (isOtherSessionLocked(session)) {
throw new IllegalStateException(
"Can't access session while another session is locked by the same thread. This restriction is intended to help avoid deadlocks.");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: verifyNoOtherSessionLocked
File: flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-203"
] |
CVE-2021-31404
|
LOW
| 1.9
|
vaadin/flow
|
verifyNoOtherSessionLocked
|
flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
|
621ef1b322737d963bee624b2d2e38cd739903d9
| 0
|
Analyze the following code function for security vulnerabilities
|
void dumpTokensLocked(PrintWriter pw, boolean dumpAll) {
pw.println("WINDOW MANAGER TOKENS (dumpsys window tokens)");
if (!mTokenMap.isEmpty()) {
pw.println(" All tokens:");
Iterator<WindowToken> it = mTokenMap.values().iterator();
while (it.hasNext()) {
WindowToken token = it.next();
pw.print(" "); pw.print(token);
if (dumpAll) {
pw.println(':');
token.dump(pw, " ");
} else {
pw.println();
}
}
}
if (!mWallpaperTokens.isEmpty()) {
pw.println();
pw.println(" Wallpaper tokens:");
for (int i=mWallpaperTokens.size()-1; i>=0; i--) {
WindowToken token = mWallpaperTokens.get(i);
pw.print(" Wallpaper #"); pw.print(i);
pw.print(' '); pw.print(token);
if (dumpAll) {
pw.println(':');
token.dump(pw, " ");
} else {
pw.println();
}
}
}
if (!mFinishedStarting.isEmpty()) {
pw.println();
pw.println(" Finishing start of application tokens:");
for (int i=mFinishedStarting.size()-1; i>=0; i--) {
WindowToken token = mFinishedStarting.get(i);
pw.print(" Finished Starting #"); pw.print(i);
pw.print(' '); pw.print(token);
if (dumpAll) {
pw.println(':');
token.dump(pw, " ");
} else {
pw.println();
}
}
}
if (!mOpeningApps.isEmpty() || !mClosingApps.isEmpty()) {
pw.println();
if (mOpeningApps.size() > 0) {
pw.print(" mOpeningApps="); pw.println(mOpeningApps);
}
if (mClosingApps.size() > 0) {
pw.print(" mClosingApps="); pw.println(mClosingApps);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpTokensLocked
File: services/core/java/com/android/server/wm/WindowManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3875
|
HIGH
| 7.2
|
android
|
dumpTokensLocked
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isConcrete() {
int mod = _class.getModifiers();
if ((mod & (Modifier.INTERFACE | Modifier.ABSTRACT)) == 0) {
return true;
}
/* 19-Feb-2010, tatus: Holy mackarel; primitive types
* have 'abstract' flag set...
*/
return _class.isPrimitive();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isConcrete
File: src/main/java/com/fasterxml/jackson/databind/JavaType.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2019-16942
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
isConcrete
|
src/main/java/com/fasterxml/jackson/databind/JavaType.java
|
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean syncFinishedHandler() {
NewsReaderListFragment newsReaderListFragment = getSlidingListFragment();
newsReaderListFragment.reloadAdapter();
UpdateItemList();
updatePodcastView();
if(mApi.getNewsAPI() != null) {
getSlidingListFragment().startAsyncTaskGetUserInfo();
}
int newItemsCount = mPrefs.getInt(Constants.LAST_UPDATE_NEW_ITEMS_COUNT_STRING, 0);
if (newItemsCount > 0) {
int firstVisiblePosition = getNewsReaderDetailFragment().getFirstVisibleScrollPosition();
// Only show the update snackbar if scrollposition is not top.
// 0 if scrolled all the way up
// 1 if no items are visible right now (e.g. first sync)
if (firstVisiblePosition == 0 || firstVisiblePosition == -1) {
updateCurrentRssView();
} else {
showSnackbar(newItemsCount);
}
return true;
} else {
// update rss view even if no new items are available
// If the user just finished reading some articles (e.g. all unread items) - he most
// likely wants the read articles to be removed when the sync is finished
updateCurrentRssView();
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: syncFinishedHandler
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
|
syncFinishedHandler
|
News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java
|
05449cb666059af7de2302df9d5c02997a23df85
| 0
|
Analyze the following code function for security vulnerabilities
|
public JSONException syntaxError(String message) {
return new JSONException(message + toString(), 0, myIndex);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: syntaxError
File: src/main/java/org/codehaus/jettison/json/JSONTokener.java
Repository: jettison-json/jettison
The code follows secure coding practices.
|
[
"CWE-674",
"CWE-787"
] |
CVE-2022-45693
|
HIGH
| 7.5
|
jettison-json/jettison
|
syntaxError
|
src/main/java/org/codehaus/jettison/json/JSONTokener.java
|
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean isPendingBroadcastProcessLocked(int pid) {
return mFgBroadcastQueue.isPendingBroadcastProcessLocked(pid)
|| mBgBroadcastQueue.isPendingBroadcastProcessLocked(pid);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isPendingBroadcastProcessLocked
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
|
isPendingBroadcastProcessLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setFromCache(boolean fromCache)
{
this.fromCache = fromCache;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setFromCache
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-26470
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
setFromCache
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public T set(K name, Iterable<? extends V> values) {
validateName(nameValidator, false, name);
checkNotNull(values, "values");
int h = hashingStrategy.hashCode(name);
int i = index(h);
remove0(h, i, name);
for (V v: values) {
if (v == null) {
break;
}
validateValue(valueValidator, name, v);
add0(h, i, name, v);
}
return thisT();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: set
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
|
set
|
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
|
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setUseStreamManagementResumption(boolean useSmResumption) {
if (useSmResumption) {
// Also enable SM is resumption is enabled
setUseStreamManagement(useSmResumption);
}
this.useSmResumption = useSmResumption;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUseStreamManagementResumption
File: smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
Repository: igniterealtime/Smack
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2016-10027
|
MEDIUM
| 4.3
|
igniterealtime/Smack
|
setUseStreamManagementResumption
|
smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
|
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void startElement(final String namespaceURI, final String localName, final String qName,
final Attributes attributes) throws SAXException {
if ("attributes".equals(localName)) {
this.foundAttributes = true;
} else if (this.foundAttributes) {
this.value = new StringBuilder();
this.currentAttribute = localName;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startElement
File: cas-client-core/src/main/java/org/jasig/cas/client/validation/Cas20ServiceTicketValidator.java
Repository: apereo/java-cas-client
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2014-4172
|
HIGH
| 7.5
|
apereo/java-cas-client
|
startElement
|
cas-client-core/src/main/java/org/jasig/cas/client/validation/Cas20ServiceTicketValidator.java
|
ae37092100c8eaec610dab6d83e5e05a8ee58814
| 0
|
Analyze the following code function for security vulnerabilities
|
public void registerAnrController(AnrController controller) {
synchronized (mGlobalLock) {
mAnrController.add(controller);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: registerAnrController
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
|
registerAnrController
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getURLMasterPattern() throws DotCacheException {
return (String)cache.get(primaryGroup + MASTER_STRUCTURE,primaryGroup);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getURLMasterPattern
File: src/com/dotmarketing/cache/ContentTypeCacheImpl.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-2355
|
HIGH
| 7.5
|
dotCMS/core
|
getURLMasterPattern
|
src/com/dotmarketing/cache/ContentTypeCacheImpl.java
|
897f3632d7e471b7a73aabed5b19f6f53d4e5562
| 0
|
Analyze the following code function for security vulnerabilities
|
final StandardTemplateParams summaryText(CharSequence text) {
this.summaryText = text;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: summaryText
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
summaryText
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void addDCValue(Context c, Item i, String schema, Node n) throws TransformerException, SQLException, AuthorizeException
{
String value = getStringValue(n); //n.getNodeValue();
// compensate for empty value getting read as "null", which won't display
if (value == null)
{
value = "";
}
else
{
value = value.trim();
}
// //getElementData(n, "element");
String element = getAttributeValue(n, "element");
String qualifier = getAttributeValue(n, "qualifier"); //NodeValue();
// //getElementData(n,
// "qualifier");
String language = null;
//DS-4493 protection against initialising as an empty string
if (StringUtils.isNotBlank(getAttributeValue(n, "language"))){
language = getAttributeValue(n, "language").trim();
}
if (!isQuiet)
{
System.out.println("\tSchema: " + schema + " Element: " + element + " Qualifier: " + qualifier
+ " Value: " + value);
}
if ("none".equals(qualifier) || "".equals(qualifier))
{
qualifier = null;
}
// only add metadata if it is no test and there is a real value
if (!isTest && !value.equals(""))
{
itemService.addMetadata(c, i, schema, element, qualifier, language, value);
}
else
{
// If we're just test the import, let's check that the actual metadata field exists.
MetadataSchema foundSchema = metadataSchemaService.find(c,schema);
if (foundSchema == null)
{
System.out.println("ERROR: schema '"+schema+"' was not found in the registry.");
return;
}
MetadataField foundField = metadataFieldService.findByElement(c, foundSchema, element, qualifier);
if (foundField == null)
{
System.out.println("ERROR: Metadata field: '"+schema+"."+element+"."+qualifier+"' was not found in the registry.");
return;
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addDCValue
File: dspace-api/src/main/java/org/dspace/app/itemimport/ItemImportServiceImpl.java
Repository: DSpace
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-31195
|
HIGH
| 7.2
|
DSpace
|
addDCValue
|
dspace-api/src/main/java/org/dspace/app/itemimport/ItemImportServiceImpl.java
|
7af52a0883a9dbc475cf3001f04ed11b24c8a4c0
| 0
|
Analyze the following code function for security vulnerabilities
|
public String[] getPlatformOverrides() {
if (isTablet()) {
return new String[]{"tablet", "android", "android-tab"};
} else {
return new String[]{"phone", "android", "android-phone"};
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPlatformOverrides
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
|
getPlatformOverrides
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public ServerBuilder idleTimeoutMillis(long idleTimeoutMillis) {
return idleTimeout(Duration.ofMillis(idleTimeoutMillis));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: idleTimeoutMillis
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
|
idleTimeoutMillis
|
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
|
df7f85824a62e997b910b5d6194a3335841065fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
@Deprecated(since = "14.8RC1")
public List<DocumentReference> loadBacklinks(AttachmentReference attachmentReference, boolean bTransaction,
XWikiContext inputxcontext) throws XWikiException
{
return innerLoadBacklinks(inputxcontext, (Session session) -> {
// the select clause is compulsory to reach the fullName i.e. the page pointed
Query<String> query = session.createQuery(
"select distinct backlink.fullName from XWikiLink as backlink " + "where backlink.id.link = :backlink "
+ "and backlink.id.type = :type " + "and backlink.attachmentName = :attachmentName",
String.class);
// if we are in the same wiki context, we should only get the local reference
// but if we are not, then we have to check the full reference, containing the wiki part since
// it's how the link are recorded.
// This should be changed once the refactoring to support backlinks properly has been done.
// See: XWIKI-16192
query.setParameter("backlink",
this.compactWikiEntityReferenceSerializer.serialize(attachmentReference.getDocumentReference()));
query.setParameter("type", attachmentReference.getType().getLowerCase());
query.setParameter("attachmentName", attachmentReference.getName());
return query;
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: loadBacklinks
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
|
loadBacklinks
|
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 static void insertUser(String name, String password,
String creditCardNumber) {
String insert = String
.format("INSERT INTO user (name, password, creditCardNumber) VALUES ('%s', '%s', '%s')",
name, password, creditCardNumber);
Database.execute(insert);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: insertUser
File: injectIt/src/main/java/com/dextra/injectit/database/MockDatabase.java
Repository: bmattoso/desafio_buzz_woody
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2015-10048
|
MEDIUM
| 5.2
|
bmattoso/desafio_buzz_woody
|
insertUser
|
injectIt/src/main/java/com/dextra/injectit/database/MockDatabase.java
|
cb8220cbae06082c969b1776fcb2fdafb3a1006b
| 0
|
Analyze the following code function for security vulnerabilities
|
private OnGoingLogicalCondition getOnGoingLogicalCondition(Condition condition) {
this.condition = condition;
return logicalCondition;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getOnGoingLogicalCondition
File: src/main/java/org/torpedoquery/jpa/internal/conditions/ConditionBuilder.java
Repository: xjodoin/torpedoquery
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2019-11343
|
HIGH
| 7.5
|
xjodoin/torpedoquery
|
getOnGoingLogicalCondition
|
src/main/java/org/torpedoquery/jpa/internal/conditions/ConditionBuilder.java
|
3c20b874fba9cc2a78b9ace10208de1602b56c3f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public StandardPlural getStandardPlural(PluralRules rules) {
if (rules == null) {
// Fail gracefully if the user didn't provide a PluralRules
return StandardPlural.OTHER;
} else {
@SuppressWarnings("deprecation")
String ruleString = rules.select(this);
return StandardPlural.orOtherFromString(ruleString);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStandardPlural
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
|
getStandardPlural
|
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 Uri insert(Uri uri, ContentValues values)
{
int uriType = URI_MATCHER.match(uri);
SQLiteDatabase db = databaseManager.getWriteDb();
long id = 0;
switch (uriType)
{
case SEARCHES:
id = db.insert(HistorySearchSchema.TABLENAME, null, values);
break;
default:
throw new IllegalArgumentException("Unknown URI: " + uri);
}
if (id == -1)
{
Log.e(TAG, uri + " " + values);
}
getContext().getContentResolver().notifyChange(uri, null);
return Uri.parse(CONTENT_URI + "/" + id);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: insert
File: alfresco-mobile-android/src/main/java/org/alfresco/mobile/android/application/providers/search/HistorySearchProvider.java
Repository: Alfresco/alfresco-android-app
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15566
|
HIGH
| 7.5
|
Alfresco/alfresco-android-app
|
insert
|
alfresco-mobile-android/src/main/java/org/alfresco/mobile/android/application/providers/search/HistorySearchProvider.java
|
32faa4355f82783326d16b0252e81e1231e12c9c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int decryptWithAd(byte[] ad, byte[] ciphertext,
int ciphertextOffset, byte[] plaintext, int plaintextOffset,
int length) throws ShortBufferException, BadPaddingException {
int space;
if (ciphertextOffset > ciphertext.length)
space = 0;
else
space = ciphertext.length - ciphertextOffset;
if (length > space)
throw new ShortBufferException();
if (plaintextOffset > plaintext.length)
space = 0;
else
space = plaintext.length - plaintextOffset;
if (!haskey) {
// The key is not set yet - return the ciphertext as-is.
if (length > space)
throw new ShortBufferException();
if (plaintext != ciphertext || plaintextOffset != ciphertextOffset)
System.arraycopy(ciphertext, ciphertextOffset, plaintext, plaintextOffset, length);
return length;
}
if (length < 16)
Noise.throwBadTagException();
int dataLen = length - 16;
if (dataLen > space)
throw new ShortBufferException();
setup(ad);
ghash.update(ciphertext, ciphertextOffset, dataLen);
ghash.pad(ad != null ? ad.length : 0, dataLen);
ghash.finish(enciv, 0, 16);
int temp = 0;
for (int index = 0; index < 16; ++index)
temp |= (hashKey[index] ^ enciv[index] ^ ciphertext[ciphertextOffset + dataLen + index]);
if ((temp & 0xFF) != 0)
Noise.throwBadTagException();
encryptCTR(ciphertext, ciphertextOffset, plaintext, plaintextOffset, dataLen);
return dataLen;
}
|
Vulnerability Classification:
- CWE: CWE-125, CWE-787
- CVE: CVE-2020-25021
- Severity: HIGH
- CVSS Score: 7.5
Description: Improve array bounds checks in CipherState implementations
Thanks to Pietro Oliva for identifying these issues.
Function: decryptWithAd
File: src/main/java/com/southernstorm/noise/protocol/AESGCMFallbackCipherState.java
Repository: rweather/noise-java
Fixed Code:
@Override
public int decryptWithAd(byte[] ad, byte[] ciphertext,
int ciphertextOffset, byte[] plaintext, int plaintextOffset,
int length) throws ShortBufferException, BadPaddingException {
int space;
if (ciphertextOffset < 0 || ciphertextOffset > ciphertext.length)
throw new IllegalArgumentException();
else
space = ciphertext.length - ciphertextOffset;
if (length > space)
throw new ShortBufferException();
if (length < 0 || plaintextOffset < 0 || plaintextOffset > plaintext.length)
throw new IllegalArgumentException();
space = plaintext.length - plaintextOffset;
if (!haskey) {
// The key is not set yet - return the ciphertext as-is.
if (length > space)
throw new ShortBufferException();
if (plaintext != ciphertext || plaintextOffset != ciphertextOffset)
System.arraycopy(ciphertext, ciphertextOffset, plaintext, plaintextOffset, length);
return length;
}
if (length < 16)
Noise.throwBadTagException();
int dataLen = length - 16;
if (dataLen > space)
throw new ShortBufferException();
setup(ad);
ghash.update(ciphertext, ciphertextOffset, dataLen);
ghash.pad(ad != null ? ad.length : 0, dataLen);
ghash.finish(enciv, 0, 16);
int temp = 0;
for (int index = 0; index < 16; ++index)
temp |= (hashKey[index] ^ enciv[index] ^ ciphertext[ciphertextOffset + dataLen + index]);
if ((temp & 0xFF) != 0)
Noise.throwBadTagException();
encryptCTR(ciphertext, ciphertextOffset, plaintext, plaintextOffset, dataLen);
return dataLen;
}
|
[
"CWE-125",
"CWE-787"
] |
CVE-2020-25021
|
HIGH
| 7.5
|
rweather/noise-java
|
decryptWithAd
|
src/main/java/com/southernstorm/noise/protocol/AESGCMFallbackCipherState.java
|
18e86b6f8bea7326934109aa9ffa705ebf4bde90
| 1
|
Analyze the following code function for security vulnerabilities
|
public XMSSMTParameters getParameters()
{
return params;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getParameters
File: core/src/main/java/org/bouncycastle/pqc/crypto/xmss/XMSSMTPrivateKeyParameters.java
Repository: bcgit/bc-java
The code follows secure coding practices.
|
[
"CWE-470"
] |
CVE-2018-1000613
|
HIGH
| 7.5
|
bcgit/bc-java
|
getParameters
|
core/src/main/java/org/bouncycastle/pqc/crypto/xmss/XMSSMTPrivateKeyParameters.java
|
4092ede58da51af9a21e4825fbad0d9a3ef5a223
| 0
|
Analyze the following code function for security vulnerabilities
|
public Uri getDataUri() {
return mDataUri;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDataUri
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
getDataUri
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
private void stopAll() {
Server s = web;
if (s != null && s.isRunning(false)) {
s.stop();
web = null;
}
s = tcp;
if (s != null && s.isRunning(false)) {
s.stop();
tcp = null;
}
s = pg;
if (s != null && s.isRunning(false)) {
s.stop();
pg = null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: stopAll
File: h2/src/main/org/h2/tools/Server.java
Repository: h2database
The code follows secure coding practices.
|
[
"CWE-312"
] |
CVE-2022-45868
|
HIGH
| 7.8
|
h2database
|
stopAll
|
h2/src/main/org/h2/tools/Server.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 0
|
Analyze the following code function for security vulnerabilities
|
private com.codename1.util.EasyThread jsDispatchThread() {
if (jsDispatchThread == null) {
jsDispatchThread = com.codename1.util.EasyThread.start("JS Dispatch Thread");
}
return jsDispatchThread;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: jsDispatchThread
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
|
jsDispatchThread
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
private Collection<String> getStoppedContainers(Collection<JsonNode> containerStatusNodes) {
Collection<String> stoppedContainers = new ArrayList<>();
for (JsonNode containerStatusNode: containerStatusNodes) {
JsonNode stateNode = containerStatusNode.get("state");
if (stateNode.get("terminated") != null)
stoppedContainers.add(containerStatusNode.get("name").asText());
}
return stoppedContainers;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStoppedContainers
File: server-plugin/server-plugin-executor-kubernetes/src/main/java/io/onedev/server/plugin/executor/kubernetes/KubernetesExecutor.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-610"
] |
CVE-2022-39206
|
CRITICAL
| 9.9
|
theonedev/onedev
|
getStoppedContainers
|
server-plugin/server-plugin-executor-kubernetes/src/main/java/io/onedev/server/plugin/executor/kubernetes/KubernetesExecutor.java
|
0052047a5b5095ac6a6b4a73a522d0272fec3a22
| 0
|
Analyze the following code function for security vulnerabilities
|
void onCredentialCreated(Credential credential, TokenResponse tokenResponse) throws IOException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onCredentialCreated
File: google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/AuthorizationCodeFlow.java
Repository: googleapis/google-oauth-java-client
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2020-7692
|
MEDIUM
| 6.4
|
googleapis/google-oauth-java-client
|
onCredentialCreated
|
google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/AuthorizationCodeFlow.java
|
13433cd7dd06267fc261f0b1d4764f8e3432c824
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean dumpHeap(String process, int userId, boolean managed, boolean mallocInfo,
boolean runGc, String path, ParcelFileDescriptor fd) throws RemoteException {
try {
synchronized (this) {
// note: hijacking SET_ACTIVITY_WATCHER, but should be changed to
// its own permission (same as profileControl).
if (checkCallingPermission(android.Manifest.permission.SET_ACTIVITY_WATCHER)
!= PackageManager.PERMISSION_GRANTED) {
throw new SecurityException("Requires permission "
+ android.Manifest.permission.SET_ACTIVITY_WATCHER);
}
if (fd == null) {
throw new IllegalArgumentException("null fd");
}
ProcessRecord proc = findProcessLocked(process, userId, "dumpHeap");
if (proc == null || proc.thread == null) {
throw new IllegalArgumentException("Unknown process: " + process);
}
boolean isDebuggable = "1".equals(SystemProperties.get(SYSTEM_DEBUGGABLE, "0"));
if (!isDebuggable) {
if ((proc.info.flags&ApplicationInfo.FLAG_DEBUGGABLE) == 0) {
throw new SecurityException("Process not debuggable: " + proc);
}
}
proc.thread.dumpHeap(managed, mallocInfo, runGc, path, fd);
fd = null;
return true;
}
} catch (RemoteException e) {
throw new IllegalStateException("Process disappeared");
} finally {
if (fd != null) {
try {
fd.close();
} catch (IOException e) {
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpHeap
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
|
dumpHeap
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
private Collection<Long> getMatchingIds(String pathPattern) {
Collection<Long> ids = new HashSet<>();
for (Long id: cache.keySet()) {
String path = getPath(id);
if (path != null && WildcardUtils.matchPath(pathPattern, path))
ids.add(id);
}
return ids;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMatchingIds
File: server-core/src/main/java/io/onedev/server/entitymanager/impl/DefaultProjectManager.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2022-39205
|
CRITICAL
| 9.8
|
theonedev/onedev
|
getMatchingIds
|
server-core/src/main/java/io/onedev/server/entitymanager/impl/DefaultProjectManager.java
|
f1e97688e4e19d6de1dfa1d00e04655209d39f8e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public void setLegacyLockPatternEnabled(int userId) {
setBoolean(Settings.Secure.LOCK_PATTERN_ENABLED, true, userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setLegacyLockPatternEnabled
File: core/java/com/android/internal/widget/LockPatternUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3908
|
MEDIUM
| 4.3
|
android
|
setLegacyLockPatternEnabled
|
core/java/com/android/internal/widget/LockPatternUtils.java
|
96daf7d4893f614714761af2d53dfb93214a32e4
| 0
|
Analyze the following code function for security vulnerabilities
|
@POST
@Produces(MediaType.TEXT_XML)
@Path("addPartialTrack")
@RestQuery(name = "addPartialTrackURL", description = "Add a partial media track to a given media package using an URL", restParameters = {
@RestParameter(description = "The location of the media", isRequired = true, name = "url", type = RestParameter.Type.STRING),
@RestParameter(description = "The kind of media", isRequired = true, name = "flavor", type = RestParameter.Type.STRING),
@RestParameter(description = "The start time in milliseconds", isRequired = true, name = "startTime", type = RestParameter.Type.INTEGER),
@RestParameter(description = "The media package as XML", isRequired = true, name = "mediaPackage", type = RestParameter.Type.TEXT) }, reponses = {
@RestResponse(description = "Returns augmented media package", responseCode = HttpServletResponse.SC_OK),
@RestResponse(description = "Media package not valid", responseCode = HttpServletResponse.SC_BAD_REQUEST),
@RestResponse(description = "", responseCode = HttpServletResponse.SC_INTERNAL_SERVER_ERROR) }, returnDescription = "")
public Response addMediaPackagePartialTrack(@FormParam("url") String url, @FormParam("flavor") String flavor,
@FormParam("startTime") Long startTime, @FormParam("mediaPackage") String mpx) {
logger.trace("add partial track with url: {} flavor: {} startTime: {} mediaPackage: {}",
url, flavor, startTime, mpx);
try {
MediaPackage mp = factory.newMediaPackageBuilder().loadFromXml(mpx);
if (MediaPackageSupport.sanityCheck(mp).isSome())
return Response.serverError().status(Status.BAD_REQUEST).build();
mp = ingestService.addPartialTrack(new URI(url), MediaPackageElementFlavor.parseFlavor(flavor), startTime, mp);
return Response.ok(mp).build();
} catch (Exception e) {
logger.warn(e.getMessage(), e);
return Response.serverError().status(Status.INTERNAL_SERVER_ERROR).build();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addMediaPackagePartialTrack
File: modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/endpoint/IngestRestService.java
Repository: opencast
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2020-5230
|
MEDIUM
| 5
|
opencast
|
addMediaPackagePartialTrack
|
modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/endpoint/IngestRestService.java
|
bbb473f34ab95497d6c432c81285efb0c739f317
| 0
|
Analyze the following code function for security vulnerabilities
|
private void enforceCallingOrSelfPermission(
@NonNull String permission, @Nullable String message) {
if (isCallerSystem()) {
return;
}
injectEnforceCallingPermission(permission, message);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: enforceCallingOrSelfPermission
File: services/core/java/com/android/server/pm/ShortcutService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40079
|
HIGH
| 7.8
|
android
|
enforceCallingOrSelfPermission
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getDialectClass() {
return dialectClass;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDialectClass
File: src/main/java/com/github/pagehelper/Page.java
Repository: pagehelper/Mybatis-PageHelper
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-28111
|
HIGH
| 7.5
|
pagehelper/Mybatis-PageHelper
|
getDialectClass
|
src/main/java/com/github/pagehelper/Page.java
|
554a524af2d2b30d09505516adc412468a84d8fa
| 0
|
Analyze the following code function for security vulnerabilities
|
@POST
@Path("addZippedMediaPackage")
@Produces(MediaType.TEXT_XML)
@RestQuery(name = "addZippedMediaPackage", description = "Create media package from a compressed file containing a manifest.xml document and all media tracks, metadata catalogs and attachments", restParameters = {
@RestParameter(description = "The workflow definition ID to run on this mediapackage. "
+ "This parameter has to be set in the request prior to the zipped mediapackage "
+ "(This parameter is deprecated. Please use /addZippedMediaPackage/{workflowDefinitionId} instead)", isRequired = false, name = WORKFLOW_DEFINITION_ID_PARAM, type = RestParameter.Type.STRING),
@RestParameter(description = "The workflow instance ID to associate with this zipped mediapackage. "
+ "This parameter has to be set in the request prior to the zipped mediapackage "
+ "(This parameter is deprecated. Please use /addZippedMediaPackage/{workflowDefinitionId} with a path parameter instead)", isRequired = false, name = WORKFLOW_INSTANCE_ID_PARAM, type = RestParameter.Type.STRING) }, bodyParameter = @RestParameter(description = "The compressed (application/zip) media package file", isRequired = true, name = "BODY", type = RestParameter.Type.FILE), reponses = {
@RestResponse(description = "", responseCode = HttpServletResponse.SC_OK),
@RestResponse(description = "", responseCode = HttpServletResponse.SC_BAD_REQUEST),
@RestResponse(description = "", responseCode = HttpServletResponse.SC_NOT_FOUND),
@RestResponse(description = "", responseCode = HttpServletResponse.SC_SERVICE_UNAVAILABLE) }, returnDescription = "")
public Response addZippedMediaPackage(@Context HttpServletRequest request) {
logger.trace("add zipped media package");
if (!isIngestLimitEnabled() || getIngestLimit() > 0) {
return ingestZippedMediaPackage(request, null, null);
} else {
logger.warn("Delaying ingest because we have exceeded the maximum number of ingests this server is setup to do concurrently.");
return Response.status(Status.SERVICE_UNAVAILABLE).build();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addZippedMediaPackage
File: modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/endpoint/IngestRestService.java
Repository: opencast
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2020-5230
|
MEDIUM
| 5
|
opencast
|
addZippedMediaPackage
|
modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/endpoint/IngestRestService.java
|
bbb473f34ab95497d6c432c81285efb0c739f317
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String getHexCollationKey(String name) {
byte[] arr = getCollationKeyInBytes(name);
char[] keys = encodeHex(arr);
return new String(keys, 0, getKeyLen(arr) * 2);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getHexCollationKey
File: core/java/android/database/DatabaseUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2023-40121
|
MEDIUM
| 5.5
|
android
|
getHexCollationKey
|
core/java/android/database/DatabaseUtils.java
|
3287ac2d2565dc96bf6177967f8e3aed33954253
| 0
|
Analyze the following code function for security vulnerabilities
|
private void migrate54(File dataDir, Stack<Integer> versions) {
for (File file: dataDir.listFiles()) {
if (file.getName().startsWith("Groups.xml")) {
VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file);
for (Element element: dom.getRootElement().elements())
element.element("createProjects").detach();
dom.writeToFile(file, false);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: migrate54
File: server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-338"
] |
CVE-2023-24828
|
HIGH
| 8.8
|
theonedev/onedev
|
migrate54
|
server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
|
d67dd9686897fe5e4ab881d749464aa7c06a68e5
| 0
|
Analyze the following code function for security vulnerabilities
|
public void addCustomFunction(String name, int numArgs, CustomFunction function) {
// Create wrapper (also validates arguments).
SQLiteCustomFunction wrapper = new SQLiteCustomFunction(name, numArgs, function);
synchronized (mLock) {
throwIfNotOpenLocked();
mConfigurationLocked.customFunctions.add(wrapper);
try {
mConnectionPoolLocked.reconfigure(mConfigurationLocked);
} catch (RuntimeException ex) {
mConfigurationLocked.customFunctions.remove(wrapper);
throw ex;
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addCustomFunction
File: core/java/android/database/sqlite/SQLiteDatabase.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2018-9493
|
LOW
| 2.1
|
android
|
addCustomFunction
|
core/java/android/database/sqlite/SQLiteDatabase.java
|
ebc250d16c747f4161167b5ff58b3aea88b37acf
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int hashCode() {
int result = cacheName != null ? cacheName.hashCode() : 0;
result = 31 * result + (forceReturnValue ? 1 : 0);
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hashCode
File: client/hotrod-client/src/main/java/org/infinispan/client/hotrod/RemoteCacheManager.java
Repository: infinispan
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2017-15089
|
MEDIUM
| 6.5
|
infinispan
|
hashCode
|
client/hotrod-client/src/main/java/org/infinispan/client/hotrod/RemoteCacheManager.java
|
efc44b7b0a5dd4f44773808840dd9785cabcf21c
| 0
|
Analyze the following code function for security vulnerabilities
|
public synchronized void updateString(@Positive int columnIndex, @Nullable String x) throws SQLException {
updateValue(columnIndex, x);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateString
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
|
updateString
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
static void assertNotInserted(long instanceId) {
Assert.assertThat("Already thinks it's inserted", instanceId, is(NOT_PERSISTED));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: assertNotInserted
File: server/src/test-shared/java/com/thoughtworks/go/server/dao/DatabaseAccessHelper.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-697"
] |
CVE-2022-39308
|
MEDIUM
| 5.9
|
gocd
|
assertNotInserted
|
server/src/test-shared/java/com/thoughtworks/go/server/dao/DatabaseAccessHelper.java
|
236d4baf92e6607f2841c151c855adcc477238b8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Binds
NotifLiveDataStore bindNotifLiveDataStore(NotifLiveDataStoreImpl notifLiveDataStoreImpl);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: bindNotifLiveDataStore
File: packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40098
|
MEDIUM
| 5.5
|
android
|
bindNotifLiveDataStore
|
packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java
|
d21ffbe8a2eeb2a5e6da7efbb1a0430ba6b022e0
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void deleteWiki(String wikiName, XWikiContext inputxcontext) throws XWikiException
{
XWikiContext context = getExecutionXContext(inputxcontext, false);
String database = context.getWikiId();
AtomicReference<Statement> stmt = new AtomicReference<>(null);
boolean bTransaction = beginTransaction(context);
try {
Session session = getSession(context);
session.doWork(connection -> {
stmt.set(connection.createStatement());
String schema = getSchemaFromWikiName(wikiName, context);
String escapedSchema = escapeSchema(schema, context);
executeDeleteWikiStatement(stmt.get(), getDatabaseProductName(), escapedSchema);
});
if (bTransaction) {
endTransaction(context, true);
}
} catch (Exception e) {
Object[] args = {wikiName};
throw new XWikiException(XWikiException.MODULE_XWIKI_STORE,
XWikiException.ERROR_XWIKI_STORE_HIBERNATE_DELETE_DATABASE, "Exception while delete wiki database {0}",
e, args);
} finally {
context.setWikiId(database);
try {
Statement statement = stmt.get();
if (statement != null) {
statement.close();
}
} catch (Exception e) {
}
try {
if (bTransaction) {
endTransaction(context, false);
}
} catch (Exception e) {
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deleteWiki
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
|
deleteWiki
|
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 UsernamePasswordCredentials getDefaultCredentials()
{
return (UsernamePasswordCredentials) this.httpClient.getState().getCredentials(AuthScope.ANY);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDefaultCredentials
File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2023-35166
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
getDefaultCredentials
|
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
|
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean hasChildNodes() {
return doc.hasChildNodes();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasChildNodes
File: HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java
Repository: LoboEvolution
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000540
|
MEDIUM
| 6.8
|
LoboEvolution
|
hasChildNodes
|
HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java
|
9b75694cedfa4825d4a2330abf2719d470c654cd
| 0
|
Analyze the following code function for security vulnerabilities
|
private KeyDeserializer _createEnumKeyDeserializer(DeserializationContext ctxt,
JavaType type)
throws JsonMappingException
{
final DeserializationConfig config = ctxt.getConfig();
Class<?> enumClass = type.getRawClass();
BeanDescription beanDesc = config.introspect(type);
// 24-Sep-2015, bim: a key deserializer is the preferred thing.
KeyDeserializer des = findKeyDeserializerFromAnnotation(ctxt, beanDesc.getClassInfo());
if (des != null) {
return des;
} else {
// 24-Sep-2015, bim: if no key deser, look for enum deserializer first, then a plain deser.
JsonDeserializer<?> custom = _findCustomEnumDeserializer(enumClass, config, beanDesc);
if (custom != null) {
return StdKeyDeserializers.constructDelegatingKeyDeserializer(config, type, custom);
}
JsonDeserializer<?> valueDesForKey = findDeserializerFromAnnotation(ctxt, beanDesc.getClassInfo());
if (valueDesForKey != null) {
return StdKeyDeserializers.constructDelegatingKeyDeserializer(config, type, valueDesForKey);
}
}
EnumResolver enumRes = constructEnumResolver(enumClass, config, beanDesc.findJsonValueAccessor());
// May have @JsonCreator for static factory method:
for (AnnotatedMethod factory : beanDesc.getFactoryMethods()) {
if (_hasCreatorAnnotation(ctxt, factory)) {
int argCount = factory.getParameterCount();
if (argCount == 1) {
Class<?> returnType = factory.getRawReturnType();
// usually should be class, but may be just plain Enum<?> (for Enum.valueOf()?)
if (returnType.isAssignableFrom(enumClass)) {
// note: mostly copied from 'EnumDeserializer.deserializerForCreator(...)'
if (factory.getRawParameterType(0) != String.class) {
throw new IllegalArgumentException("Parameter #0 type for factory method ("+factory+") not suitable, must be java.lang.String");
}
if (config.canOverrideAccessModifiers()) {
ClassUtil.checkAndFixAccess(factory.getMember(),
ctxt.isEnabled(MapperFeature.OVERRIDE_PUBLIC_ACCESS_MODIFIERS));
}
return StdKeyDeserializers.constructEnumKeyDeserializer(enumRes, factory);
}
}
throw new IllegalArgumentException("Unsuitable method ("+factory+") decorated with @JsonCreator (for Enum type "
+enumClass.getName()+")");
}
}
// Also, need to consider @JsonValue, if one found
return StdKeyDeserializers.constructEnumKeyDeserializer(enumRes);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _createEnumKeyDeserializer
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
|
_createEnumKeyDeserializer
|
src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java
|
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
| 0
|
Analyze the following code function for security vulnerabilities
|
private String xssCheck(String uri, String queryString) throws ServletException {
String rewrite = null;
if (Xss.URIHasXSS(uri)) {
Logger.warn(this, "XSS Found in request URI: " + uri);
try {
rewrite = Xss.encodeForURL(uri);
} catch (Exception e) {
Logger.error(this, "Encoding failure. Unable to encode URI " + uri);
throw new ServletException(e.getMessage(), e);
}
} else if (queryString != null && !UtilMethods.decodeURL(queryString).equals(null)) {
if (Xss.ParamsHaveXSS(queryString)) {
Logger.warn(this, "XSS Found in Query String: " + queryString);
rewrite = uri;
}
}
return rewrite;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: xssCheck
File: dotCMS/src/main/java/com/dotmarketing/filters/CMSFilter.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-434"
] |
CVE-2017-11466
|
HIGH
| 9
|
dotCMS/core
|
xssCheck
|
dotCMS/src/main/java/com/dotmarketing/filters/CMSFilter.java
|
ab2bb2e00b841d131b8734227f9106e3ac31bb99
| 0
|
Analyze the following code function for security vulnerabilities
|
@ApiOperation(value = "Save the Composite Solution")
@RequestMapping(value = "/saveCompositeSolution", method = RequestMethod.POST)
@ResponseBody
public Object saveCompositeSolution(HttpServletRequest request,
@RequestParam(value = "userId", required = true) String userId,
@RequestParam(value = "solutionName", required = true) String solutionName,
@RequestParam(value = "version", required = true) String version,
@RequestParam(value = "solutionId", required = false) String solutionId,
@RequestParam(value = "description", required = true) String description,
@RequestParam(value = "cid", required = false) String cid,
@RequestParam(value = "ignoreLesserVersionConflictFlag", required = true, defaultValue = "false") boolean ignoreLesserVersionConflictFlag)
throws AcumosException {
String result = "";
String error = "{\"errorCode\" : \"%s\", \"errorDescription\" : \"%s\"}";
logger.debug(EELFLoggerDelegator.debugLogger, " saveCompositeSolution() Begin ");
DSCompositeSolution dscs = new DSCompositeSolution();
try {
dscs.setAuthor(userId);
dscs.setSolutionName(solutionName);
dscs.setSolutionId(solutionId);
dscs.setVersion(version);
dscs.setOnBoarder(userId);
dscs.setDescription(description);
dscs.setProvider(props.getProvider());
dscs.setToolKit(props.getToolKit());
dscs.setVisibilityLevel(props.getVisibilityLevel());
dscs.setcId(cid);
dscs.setIgnoreLesserVersionConflictFlag(ignoreLesserVersionConflictFlag);
// 1. JSON Validation
if (DSUtil.isValidJSON(dscs.toJsonString())) {
logger.debug(EELFLoggerDelegator.debugLogger, " SuccessFully validated inputJson ");
// 2. Mandatory Value validation
String isValidmsg = checkMandatoryFieldsforSave(dscs);
if (null != isValidmsg) {
result = String.format(error, "603", isValidmsg);
} else {
logger.debug(EELFLoggerDelegator.debugLogger,
" SuccessFully validated mandatory fields ");
result = compositeServiceImpl.saveCompositeSolution(dscs);
}
} else {
result = String.format(error, "200", "Incorrectly formatted input – Invalid JSON");
}
} catch (AcumosException e) {
logger.error(EELFLoggerDelegator.errorLogger, " Exception in getSolutions() ", e);
result = String.format(error, e.getErrorCode(), e.getErrorDesc());
} catch (Exception e) {
logger.error(EELFLoggerDelegator.errorLogger, " Exception in getSolutions() ", e);
result = String.format(error, props.getCompositionSolutionErrorCode(),
props.getCompositionSolutionErrorDesc());
}
logger.debug(EELFLoggerDelegator.debugLogger, " saveCompositeSolution() End ");
return result;
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2018-25097
- Severity: MEDIUM
- CVSS Score: 4.0
Description: Senitization for CSS Vulnerability
Issue-Id : ACUMOS-1650
Description : Senitization for CSS Vulnerability - Design Studio
Change-Id: If8fd4b9b06f884219d93881f7922421870de8e3d
Signed-off-by: Ramanaiah Pirla <RP00490596@techmahindra.com>
Function: saveCompositeSolution
File: ds-compositionengine/src/main/java/org/acumos/designstudio/ce/controller/SolutionController.java
Repository: acumos/design-studio
Fixed Code:
@ApiOperation(value = "Save the Composite Solution")
@RequestMapping(value = "/saveCompositeSolution", method = RequestMethod.POST)
@ResponseBody
public Object saveCompositeSolution(HttpServletRequest request,
@RequestParam(value = "userId", required = true) String userId,
@RequestParam(value = "solutionName", required = true) String solutionName,
@RequestParam(value = "version", required = true) String version,
@RequestParam(value = "solutionId", required = false) String solutionId,
@RequestParam(value = "description", required = true) String description,
@RequestParam(value = "cid", required = false) String cid,
@RequestParam(value = "ignoreLesserVersionConflictFlag", required = true, defaultValue = "false") boolean ignoreLesserVersionConflictFlag)
throws AcumosException {
String result = "";
String error = "{\"errorCode\" : \"%s\", \"errorDescription\" : \"%s\"}";
logger.debug(EELFLoggerDelegator.debugLogger, " saveCompositeSolution() Begin ");
DSCompositeSolution dscs = new DSCompositeSolution();
try {
dscs.setAuthor(userId);
dscs.setSolutionName(solutionName);
dscs.setSolutionId(SanitizeUtils.sanitize(solutionId));
dscs.setVersion(version);
dscs.setOnBoarder(userId);
dscs.setDescription(description);
dscs.setProvider(props.getProvider());
dscs.setToolKit(props.getToolKit());
dscs.setVisibilityLevel(props.getVisibilityLevel());
dscs.setcId(cid);
dscs.setIgnoreLesserVersionConflictFlag(ignoreLesserVersionConflictFlag);
// 1. JSON Validation
if (DSUtil.isValidJSON(dscs.toJsonString())) {
logger.debug(EELFLoggerDelegator.debugLogger, " SuccessFully validated inputJson ");
// 2. Mandatory Value validation
String isValidmsg = checkMandatoryFieldsforSave(dscs);
if (null != isValidmsg) {
result = String.format(error, "603", isValidmsg);
} else {
logger.debug(EELFLoggerDelegator.debugLogger,
" SuccessFully validated mandatory fields ");
result = compositeServiceImpl.saveCompositeSolution(dscs);
}
} else {
result = String.format(error, "200", "Incorrectly formatted input – Invalid JSON");
}
} catch (AcumosException e) {
logger.error(EELFLoggerDelegator.errorLogger, " Exception in getSolutions() ", e);
result = String.format(error, e.getErrorCode(), e.getErrorDesc());
} catch (Exception e) {
logger.error(EELFLoggerDelegator.errorLogger, " Exception in getSolutions() ", e);
result = String.format(error, props.getCompositionSolutionErrorCode(),
props.getCompositionSolutionErrorDesc());
}
logger.debug(EELFLoggerDelegator.debugLogger, " saveCompositeSolution() End ");
return result;
}
|
[
"CWE-79"
] |
CVE-2018-25097
|
MEDIUM
| 4
|
acumos/design-studio
|
saveCompositeSolution
|
ds-compositionengine/src/main/java/org/acumos/designstudio/ce/controller/SolutionController.java
|
0df8a5e8722188744973168648e4c74c69ce67fd
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public Cookie[] getCookies() {
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCookies
File: h2/src/test/org/h2/test/server/TestWeb.java
Repository: h2database
The code follows secure coding practices.
|
[
"CWE-312"
] |
CVE-2022-45868
|
HIGH
| 7.8
|
h2database
|
getCookies
|
h2/src/test/org/h2/test/server/TestWeb.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 0
|
Analyze the following code function for security vulnerabilities
|
private Feature parseFeatureTag(Element featXmlTag) {
NamedNodeMap nnm = featXmlTag.getAttributes();
// Identifier
String uid;
if (nnm.getNamedItem(FEATURE_ATT_UID) == null) {
throw new IllegalArgumentException(ERROR_SYNTAX_IN_CONFIGURATION_FILE + "'uid' is required for each feature");
}
uid = nnm.getNamedItem(FEATURE_ATT_UID).getNodeValue();
// Enable
if (nnm.getNamedItem(FEATURE_ATT_ENABLE) == null) {
throw new IllegalArgumentException(ERROR_SYNTAX_IN_CONFIGURATION_FILE
+ "'enable' is required for each feature (check " + uid + ")");
}
boolean enable = Boolean.parseBoolean(nnm.getNamedItem(FEATURE_ATT_ENABLE).getNodeValue());
// Create Feature with description
Feature f = new Feature(uid, enable, parseDescription(nnm));
// Strategy
NodeList flipStrategies = featXmlTag.getElementsByTagName(FLIPSTRATEGY_TAG);
if (flipStrategies.getLength() > 0) {
f.setFlippingStrategy(parseFlipStrategy((Element) flipStrategies.item(0), f.getUid()));
}
// Security
NodeList securities = featXmlTag.getElementsByTagName(SECURITY_TAG);
if (securities.getLength() > 0) {
f.setPermissions(parseListAuthorizations((Element) securities.item(0)));
}
// Properties
NodeList properties = featXmlTag.getElementsByTagName(PROPERTIES_CUSTOM_TAG);
if (properties.getLength() > 0) {
f.setCustomProperties(parsePropertiesTag((Element) properties.item(0)));
}
return f;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseFeatureTag
File: ff4j-core/src/main/java/org/ff4j/conf/XmlParser.java
Repository: ff4j
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2022-44262
|
CRITICAL
| 9.8
|
ff4j
|
parseFeatureTag
|
ff4j-core/src/main/java/org/ff4j/conf/XmlParser.java
|
991df72725f78adbc413d9b0fbb676201f1882e0
| 0
|
Analyze the following code function for security vulnerabilities
|
public void sort(Column<T, ?> column, SortDirection direction) {
setSortOrder(Collections
.singletonList(new GridSortOrder<>(column, direction)));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sort
File: server/src/main/java/com/vaadin/ui/Grid.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-25028
|
MEDIUM
| 4.3
|
vaadin/framework
|
sort
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean getCameraDisabled(ComponentName who, int userHandle, boolean parent) {
if (!mHasFeature) {
return false;
}
final CallerIdentity caller = getCallerIdentity(who);
Preconditions.checkCallAuthorization(hasFullCrossUsersPermission(caller, userHandle));
if (parent) {
Preconditions.checkCallAuthorization(
isProfileOwnerOfOrganizationOwnedDevice(caller.getUserId()));
}
synchronized (getLockObject()) {
if (who != null) {
ActiveAdmin admin = getActiveAdminUncheckedLocked(who, userHandle, parent);
return (admin != null) && admin.disableCamera;
}
// First, see if DO has set it. If so, it's device-wide.
final ActiveAdmin deviceOwner = getDeviceOwnerAdminLocked();
if (deviceOwner != null && deviceOwner.disableCamera) {
return true;
}
final int affectedUserId = parent ? getProfileParentId(userHandle) : userHandle;
// Return the strictest policy across all participating admins.
List<ActiveAdmin> admins = getActiveAdminsForAffectedUserLocked(affectedUserId);
// Determine whether or not the device camera is disabled for any active admins.
for (ActiveAdmin admin : admins) {
if (admin.disableCamera) {
return true;
}
}
return false;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCameraDisabled
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
|
getCameraDisabled
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public static PdfObject killIndirect(PdfObject obj) {
if (obj == null || obj.isNull())
return null;
PdfObject ret = getPdfObjectRelease(obj);
if (obj.isIndirect()) {
PRIndirectReference ref = (PRIndirectReference)obj;
PdfReader reader = ref.getReader();
int n = ref.getNumber();
reader.xrefObj.set(n, null);
if (reader.partial)
reader.xref[n * 2] = -1;
}
return ret;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: killIndirect
File: java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
Repository: pdftk-java/pdftk
The code follows secure coding practices.
|
[
"CWE-835"
] |
CVE-2021-37819
|
HIGH
| 7.5
|
pdftk-java/pdftk
|
killIndirect
|
java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
|
9b0cbb76c8434a8505f02ada02a94263dcae9247
| 0
|
Analyze the following code function for security vulnerabilities
|
public Cursor rawQueryWithFactory(
CursorFactory cursorFactory, String sql, String[] selectionArgs,
String editTable) {
return rawQueryWithFactory(cursorFactory, sql, selectionArgs, editTable, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: rawQueryWithFactory
File: core/java/android/database/sqlite/SQLiteDatabase.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2018-9493
|
LOW
| 2.1
|
android
|
rawQueryWithFactory
|
core/java/android/database/sqlite/SQLiteDatabase.java
|
ebc250d16c747f4161167b5ff58b3aea88b37acf
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isEnforceReferentialIntegrityOnDelete() {
return myEnforceReferentialIntegrityOnDelete;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isEnforceReferentialIntegrityOnDelete
File: hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
Repository: hapifhir/hapi-fhir
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-32053
|
MEDIUM
| 5
|
hapifhir/hapi-fhir
|
isEnforceReferentialIntegrityOnDelete
|
hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
|
f2934b229c491235ab0e7782dea86b324521082a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Document clean(Reader originalHtmlContent)
{
return clean(originalHtmlContent, getDefaultConfiguration());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clean
File: xwiki-commons-core/xwiki-commons-xml/src/main/java/org/xwiki/xml/internal/html/DefaultHTMLCleaner.java
Repository: xwiki/xwiki-commons
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-29201
|
CRITICAL
| 9
|
xwiki/xwiki-commons
|
clean
|
xwiki-commons-core/xwiki-commons-xml/src/main/java/org/xwiki/xml/internal/html/DefaultHTMLCleaner.java
|
b11eae9d82cb53f32962056b5faa73f3720c6182
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void test(TestData testData, TaskLogger jobLogger) {
OneDev.getInstance(ResourceManager.class).run(new Runnable() {
@Override
public void run() {
login(jobLogger);
File workspaceDir = null;
File cacheDir = null;
Commandline docker = newDocker();
try {
workspaceDir = FileUtils.createTempDir("workspace");
cacheDir = new File(getCacheHome(), UUID.randomUUID().toString());
FileUtils.createDir(cacheDir);
jobLogger.log("Testing specified docker image...");
docker.clearArgs();
docker.addArgs("run", "--rm");
if (getRunOptions() != null)
docker.addArgs(StringUtils.parseQuoteTokens(getRunOptions()));
String containerWorkspacePath;
String containerCachePath;
if (SystemUtils.IS_OS_WINDOWS) {
containerWorkspacePath = "C:\\onedev-build\\workspace";
containerCachePath = "C:\\onedev-build\\cache";
} else {
containerWorkspacePath = "/onedev-build/workspace";
containerCachePath = "/onedev-build/cache";
}
docker.addArgs("-v", getHostPath(workspaceDir.getAbsolutePath()) + ":" + containerWorkspacePath);
docker.addArgs("-v", getHostPath(cacheDir.getAbsolutePath()) + ":" + containerCachePath);
docker.addArgs("-w", containerWorkspacePath);
docker.addArgs(testData.getDockerImage());
if (SystemUtils.IS_OS_WINDOWS)
docker.addArgs("cmd", "/c", "echo hello from container");
else
docker.addArgs("sh", "-c", "echo hello from container");
docker.execute(new LineConsumer() {
@Override
public void consume(String line) {
jobLogger.log(line);
}
}, new LineConsumer() {
@Override
public void consume(String line) {
jobLogger.log(line);
}
}).checkReturnCode();
} finally {
if (workspaceDir != null)
FileUtils.deleteDir(workspaceDir);
if (cacheDir != null)
FileUtils.deleteDir(cacheDir);
}
if (!SystemUtils.IS_OS_WINDOWS) {
jobLogger.log("Checking busybox availability...");
docker = newDocker();
docker.addArgs("run", "--rm", "busybox", "sh", "-c", "echo hello from busybox");
docker.execute(new LineConsumer() {
@Override
public void consume(String line) {
jobLogger.log(line);
}
}, new LineConsumer() {
@Override
public void consume(String line) {
jobLogger.log(line);
}
}).checkReturnCode();
}
Commandline git = new Commandline(AppLoader.getInstance(GitConfig.class).getExecutable());
KubernetesHelper.testGitLfsAvailability(git, jobLogger);
}
}, new HashMap<>(), jobLogger);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: test
File: server-plugin/server-plugin-executor-serverdocker/src/main/java/io/onedev/server/plugin/executor/serverdocker/ServerDockerExecutor.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-610"
] |
CVE-2022-39206
|
CRITICAL
| 9.9
|
theonedev/onedev
|
test
|
server-plugin/server-plugin-executor-serverdocker/src/main/java/io/onedev/server/plugin/executor/serverdocker/ServerDockerExecutor.java
|
0052047a5b5095ac6a6b4a73a522d0272fec3a22
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getStringValue(String fieldName)
{
BaseObject object = getFirstObject(fieldName, null);
if (object == null) {
return "";
}
String result = object.getStringValue(fieldName);
if (result.equals(" ")) {
return "";
} else {
return result;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStringValue
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-26470
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
getStringValue
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setUseNonce(final boolean useNonce) {
this.useNonce = useNonce;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUseNonce
File: pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java
Repository: pac4j
The code follows secure coding practices.
|
[
"CWE-347"
] |
CVE-2021-44878
|
MEDIUM
| 5
|
pac4j
|
setUseNonce
|
pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java
|
22b82ffd702a132d9f09da60362fc6264fc281ae
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void clearCache(List<KBTemplate> kbTemplates) {
finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITH_PAGINATION);
finderCache.clearCache(FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION);
for (KBTemplate kbTemplate : kbTemplates) {
entityCache.removeResult(KBTemplateModelImpl.ENTITY_CACHE_ENABLED,
KBTemplateImpl.class, kbTemplate.getPrimaryKey());
clearUniqueFindersCache((KBTemplateModelImpl)kbTemplate, true);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearCache
File: modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java
Repository: brianchandotcom/liferay-portal
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2017-12647
|
MEDIUM
| 4.3
|
brianchandotcom/liferay-portal
|
clearCache
|
modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java
|
ef93d984be9d4d478a5c4b1ca9a86f4e80174774
| 0
|
Analyze the following code function for security vulnerabilities
|
public void handleEvent(final StreamSourceChannel channel) {
if(connection.getOriginalSinkConduit().isWriteShutdown() || connection.getOriginalSourceConduit().isReadShutdown()) {
safeClose(connection);
channel.suspendReads();
return;
}
PooledByteBuffer existing = connection.getExtraBytes();
final PooledByteBuffer pooled = existing == null ? connection.getByteBufferPool().allocate() : existing;
final ByteBuffer buffer = pooled.getBuffer();
boolean free = true;
boolean bytesRead = false;
try {
int res;
do {
if (existing == null) {
buffer.clear();
res = channel.read(buffer);
} else {
res = buffer.remaining();
}
if (res == 0) {
if(bytesRead && parseTimeoutUpdater != null) {
parseTimeoutUpdater.failedParse();
}
if (!channel.isReadResumed()) {
channel.getReadSetter().set(this);
channel.resumeReads();
}
return;
}
if (res == -1) {
channel.shutdownReads();
final StreamSinkChannel responseChannel = connection.getChannel().getSinkChannel();
responseChannel.shutdownWrites();
safeClose(connection);
return;
}
bytesRead = true;
//TODO: we need to handle parse errors
if (existing != null) {
existing = null;
connection.setExtraBytes(null);
} else {
buffer.flip();
}
int begin = buffer.remaining();
if(httpServerExchange == null) {
httpServerExchange = new HttpServerExchange(connection, maxEntitySize);
}
parser.parse(buffer, state, httpServerExchange);
read += begin - buffer.remaining();
if (buffer.hasRemaining()) {
free = false;
connection.setExtraBytes(pooled);
}
if (read > maxRequestSize) {
UndertowLogger.REQUEST_LOGGER.requestHeaderWasTooLarge(connection.getPeerAddress(), maxRequestSize);
safeClose(connection);
return;
}
} while (!state.isComplete());
if(parseTimeoutUpdater != null) {
parseTimeoutUpdater.requestStarted();
}
if (state.prefix != AjpRequestParser.FORWARD_REQUEST) {
if (state.prefix == AjpRequestParser.CPING) {
UndertowLogger.REQUEST_LOGGER.debug("Received CPING, sending CPONG");
handleCPing();
} else if (state.prefix == AjpRequestParser.CPONG) {
UndertowLogger.REQUEST_LOGGER.debug("Received CPONG, starting next request");
state = new AjpRequestParseState();
channel.getReadSetter().set(this);
channel.resumeReads();
} else {
UndertowLogger.REQUEST_LOGGER.ignoringAjpRequestWithPrefixCode(state.prefix);
safeClose(connection);
}
return;
}
// we remove ourselves as the read listener from the channel;
// if the http handler doesn't set any then reads will suspend, which is the right thing to do
channel.getReadSetter().set(null);
channel.suspendReads();
final HttpServerExchange httpServerExchange = this.httpServerExchange;
final AjpServerResponseConduit responseConduit = new AjpServerResponseConduit(connection.getChannel().getSinkChannel().getConduit(), connection.getByteBufferPool(), httpServerExchange, new ConduitListener<AjpServerResponseConduit>() {
@Override
public void handleEvent(AjpServerResponseConduit channel) {
Connectors.terminateResponse(httpServerExchange);
}
}, httpServerExchange.getRequestMethod().equals(Methods.HEAD));
connection.getChannel().getSinkChannel().setConduit(responseConduit);
connection.getChannel().getSourceChannel().setConduit(createSourceConduit(connection.getChannel().getSourceChannel().getConduit(), responseConduit, httpServerExchange));
//we need to set the write ready handler. This allows the response conduit to wrap it
responseConduit.setWriteReadyHandler(writeReadyHandler);
connection.setSSLSessionInfo(state.createSslSessionInfo());
httpServerExchange.setSourceAddress(state.createPeerAddress());
httpServerExchange.setDestinationAddress(state.createDestinationAddress());
if(scheme != null) {
httpServerExchange.setRequestScheme(scheme);
}
if(state.attributes != null) {
httpServerExchange.putAttachment(HttpServerExchange.REQUEST_ATTRIBUTES, state.attributes);
}
AjpRequestParseState oldState = state;
state = null;
this.httpServerExchange = null;
httpServerExchange.setPersistent(true);
if(recordRequestStartTime) {
Connectors.setRequestStartTime(httpServerExchange);
}
connection.setCurrentExchange(httpServerExchange);
if(connectorStatistics != null) {
connectorStatistics.setup(httpServerExchange);
}
if(!Connectors.areRequestHeadersValid(httpServerExchange.getRequestHeaders())) {
oldState.badRequest = true;
UndertowLogger.REQUEST_IO_LOGGER.debugf("Invalid AJP request from %s, request contained invalid headers", connection.getPeerAddress());
}
if(oldState.badRequest) {
httpServerExchange.setStatusCode(StatusCodes.BAD_REQUEST);
httpServerExchange.endExchange();
handleBadRequest();
safeClose(connection);
} else {
Connectors.executeRootHandler(connection.getRootHandler(), httpServerExchange);
}
} catch (BadRequestException e) {
UndertowLogger.REQUEST_IO_LOGGER.failedToParseRequest(e);
handleBadRequest();
safeClose(connection);
} catch (IOException e) {
UndertowLogger.REQUEST_IO_LOGGER.ioException(e);
handleInternalServerError();
safeClose(connection);
} catch (Throwable t) {
UndertowLogger.REQUEST_LOGGER.exceptionProcessingRequest(t);
handleInternalServerError();
safeClose(connection);
} finally {
if (free) pooled.close();
}
}
|
Vulnerability Classification:
- CWE: CWE-252
- CVE: CVE-2022-1319
- Severity: HIGH
- CVSS Score: 7.5
Description: [UNDERTOW-2060] fix double AJP response
Function: handleEvent
File: core/src/main/java/io/undertow/server/protocol/ajp/AjpReadListener.java
Repository: undertow-io/undertow
Fixed Code:
public void handleEvent(final StreamSourceChannel channel) {
if(connection.getOriginalSinkConduit().isWriteShutdown() || connection.getOriginalSourceConduit().isReadShutdown()) {
safeClose(connection);
channel.suspendReads();
return;
}
PooledByteBuffer existing = connection.getExtraBytes();
final PooledByteBuffer pooled = existing == null ? connection.getByteBufferPool().allocate() : existing;
final ByteBuffer buffer = pooled.getBuffer();
boolean free = true;
boolean bytesRead = false;
try {
int res;
do {
if (existing == null) {
buffer.clear();
res = channel.read(buffer);
} else {
res = buffer.remaining();
}
if (res == 0) {
if(bytesRead && parseTimeoutUpdater != null) {
parseTimeoutUpdater.failedParse();
}
if (!channel.isReadResumed()) {
channel.getReadSetter().set(this);
channel.resumeReads();
}
return;
}
if (res == -1) {
channel.shutdownReads();
final StreamSinkChannel responseChannel = connection.getChannel().getSinkChannel();
responseChannel.shutdownWrites();
safeClose(connection);
return;
}
bytesRead = true;
//TODO: we need to handle parse errors
if (existing != null) {
existing = null;
connection.setExtraBytes(null);
} else {
buffer.flip();
}
int begin = buffer.remaining();
if(httpServerExchange == null) {
httpServerExchange = new HttpServerExchange(connection, maxEntitySize);
}
parser.parse(buffer, state, httpServerExchange);
read += begin - buffer.remaining();
if (buffer.hasRemaining()) {
free = false;
connection.setExtraBytes(pooled);
}
if (read > maxRequestSize) {
UndertowLogger.REQUEST_LOGGER.requestHeaderWasTooLarge(connection.getPeerAddress(), maxRequestSize);
safeClose(connection);
return;
}
} while (!state.isComplete());
if(parseTimeoutUpdater != null) {
parseTimeoutUpdater.requestStarted();
}
if (state.prefix != AjpRequestParser.FORWARD_REQUEST) {
if (state.prefix == AjpRequestParser.CPING) {
UndertowLogger.REQUEST_LOGGER.debug("Received CPING, sending CPONG");
handleCPing();
} else if (state.prefix == AjpRequestParser.CPONG) {
UndertowLogger.REQUEST_LOGGER.debug("Received CPONG, starting next request");
state = new AjpRequestParseState();
channel.getReadSetter().set(this);
channel.resumeReads();
} else {
UndertowLogger.REQUEST_LOGGER.ignoringAjpRequestWithPrefixCode(state.prefix);
safeClose(connection);
}
return;
}
// we remove ourselves as the read listener from the channel;
// if the http handler doesn't set any then reads will suspend, which is the right thing to do
channel.getReadSetter().set(null);
channel.suspendReads();
final HttpServerExchange httpServerExchange = this.httpServerExchange;
final AjpServerResponseConduit responseConduit = new AjpServerResponseConduit(connection.getChannel().getSinkChannel().getConduit(), connection.getByteBufferPool(), httpServerExchange, new ConduitListener<AjpServerResponseConduit>() {
@Override
public void handleEvent(AjpServerResponseConduit channel) {
Connectors.terminateResponse(httpServerExchange);
}
}, httpServerExchange.getRequestMethod().equals(Methods.HEAD));
connection.getChannel().getSinkChannel().setConduit(responseConduit);
connection.getChannel().getSourceChannel().setConduit(createSourceConduit(connection.getChannel().getSourceChannel().getConduit(), responseConduit, httpServerExchange));
//we need to set the write ready handler. This allows the response conduit to wrap it
responseConduit.setWriteReadyHandler(writeReadyHandler);
connection.setSSLSessionInfo(state.createSslSessionInfo());
httpServerExchange.setSourceAddress(state.createPeerAddress());
httpServerExchange.setDestinationAddress(state.createDestinationAddress());
if(scheme != null) {
httpServerExchange.setRequestScheme(scheme);
}
if(state.attributes != null) {
httpServerExchange.putAttachment(HttpServerExchange.REQUEST_ATTRIBUTES, state.attributes);
}
AjpRequestParseState oldState = state;
state = null;
this.httpServerExchange = null;
httpServerExchange.setPersistent(true);
if(recordRequestStartTime) {
Connectors.setRequestStartTime(httpServerExchange);
}
connection.setCurrentExchange(httpServerExchange);
if(connectorStatistics != null) {
connectorStatistics.setup(httpServerExchange);
}
if(!Connectors.areRequestHeadersValid(httpServerExchange.getRequestHeaders())) {
oldState.badRequest = true;
UndertowLogger.REQUEST_IO_LOGGER.debugf("Invalid AJP request from %s, request contained invalid headers", connection.getPeerAddress());
}
if(oldState.badRequest) {
httpServerExchange.setStatusCode(StatusCodes.BAD_REQUEST);
httpServerExchange.endExchange();
safeClose(connection);
} else {
Connectors.executeRootHandler(connection.getRootHandler(), httpServerExchange);
}
} catch (BadRequestException e) {
UndertowLogger.REQUEST_IO_LOGGER.failedToParseRequest(e);
handleBadRequest();
safeClose(connection);
} catch (IOException e) {
UndertowLogger.REQUEST_IO_LOGGER.ioException(e);
handleInternalServerError();
safeClose(connection);
} catch (Throwable t) {
UndertowLogger.REQUEST_LOGGER.exceptionProcessingRequest(t);
handleInternalServerError();
safeClose(connection);
} finally {
if (free) pooled.close();
}
}
|
[
"CWE-252"
] |
CVE-2022-1319
|
HIGH
| 7.5
|
undertow-io/undertow
|
handleEvent
|
core/src/main/java/io/undertow/server/protocol/ajp/AjpReadListener.java
|
1443a1a2bbb8e32e56788109d8285db250d55c8b
| 1
|
Analyze the following code function for security vulnerabilities
|
public int getProcessLimit() throws RemoteException
{
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
mRemote.transact(GET_PROCESS_LIMIT_TRANSACTION, data, reply, 0);
reply.readException();
int res = reply.readInt();
data.recycle();
reply.recycle();
return res;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProcessLimit
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
getProcessLimit
|
core/java/android/app/ActivityManagerNative.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getOrganizationColor(@NonNull ComponentName who) {
if (!mHasFeature) {
return ActiveAdmin.DEF_ORGANIZATION_COLOR;
}
Objects.requireNonNull(who, "ComponentName is null");
final CallerIdentity caller = getCallerIdentity(who);
Preconditions.checkCallingUser(isManagedProfile(caller.getUserId()));
synchronized (getLockObject()) {
ActiveAdmin admin = getProfileOwnerOrDeviceOwnerLocked(caller);
return admin.organizationColor;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getOrganizationColor
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
|
getOrganizationColor
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
private static List<String> filterDbObjects(
List<String> dbObjects,
List<String> includeDbObjects,
List<String> excludeDbObjects
) throws ServiceException {
List<String> filteredDbObjects = new ArrayList<String>();
for(String dbObject: dbObjects) {
if(dbObject != null) {
dbObject = dbObject.trim();
if(!dbObject.isEmpty()) {
for(String includeDbObject: includeDbObjects) {
if(dbObject.matches(includeDbObject)) {
filteredDbObjects.add(dbObject);
}
}
}
}
}
for(String dbObject: dbObjects) {
if(dbObject != null) {
dbObject = dbObject.trim();
for(String excludeDbObject: excludeDbObjects) {
if(dbObject.matches(excludeDbObject)) {
filteredDbObjects.remove(dbObject);
}
}
}
}
return filteredDbObjects;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: filterDbObjects
File: core/src/main/java/org/opencrx/kernel/tools/CopyDb.java
Repository: opencrx
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2021-25959
|
MEDIUM
| 4.3
|
opencrx
|
filterDbObjects
|
core/src/main/java/org/opencrx/kernel/tools/CopyDb.java
|
14e75f95e5f56fbe7ee897bdf5d858788072e818
| 0
|
Analyze the following code function for security vulnerabilities
|
private void ensureDeviceOwnerUserStarted() {
final int userId;
synchronized (getLockObject()) {
if (!mOwners.hasDeviceOwner()) {
return;
}
userId = mOwners.getDeviceOwnerUserId();
}
if (VERBOSE_LOG) {
Slogf.v(LOG_TAG, "Starting non-system DO user: " + userId);
}
if (userId != UserHandle.USER_SYSTEM) {
try {
mInjector.getIActivityManager().startUserInBackground(userId);
// STOPSHIP Prevent the DO user from being killed.
} catch (RemoteException e) {
Slogf.w(LOG_TAG, "Exception starting user", e);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: ensureDeviceOwnerUserStarted
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
|
ensureDeviceOwnerUserStarted
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Group getWorkflowGroup(Context context, Collection collection, int step) {
String roleId;
switch (step) {
case 1:
roleId = CollectionRoleService.LEGACY_WORKFLOW_STEP1_NAME;
break;
case 2:
roleId = CollectionRoleService.LEGACY_WORKFLOW_STEP2_NAME;
break;
case 3:
roleId = CollectionRoleService.LEGACY_WORKFLOW_STEP3_NAME;
break;
default:
throw new IllegalArgumentException("Illegal step count: " + step);
}
CollectionRole colRole;
try {
colRole = collectionRoleService.find(context, collection, roleId);
if (colRole != null) {
return colRole.getGroup();
}
return null;
} catch (SQLException e) {
throw new RuntimeException(e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getWorkflowGroup
File: dspace-api/src/main/java/org/dspace/content/CollectionServiceImpl.java
Repository: DSpace
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-41189
|
HIGH
| 9
|
DSpace
|
getWorkflowGroup
|
dspace-api/src/main/java/org/dspace/content/CollectionServiceImpl.java
|
277b499a5cd3a4f5eb2370513a1b7e4ec2a6e041
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getColumnTypeSQL(Column column) {
switch (column.getType()) {
case NUMBER: {
return "NUMERIC(28,2)";
}
case DATE: {
return "TIMESTAMP";
}
default: {
return "VARCHAR(" + column.getLength() + ")";
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getColumnTypeSQL
File: dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java
Repository: dashbuilder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-4999
|
HIGH
| 7.5
|
dashbuilder
|
getColumnTypeSQL
|
dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java
|
8574899e3b6455547b534f570b2330ff772e524b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void doRun() {
LOG.debug("Opening MongoDB cursor on \"{}\"", COLLECTION_NAME);
try (DBCursor<ClusterEvent> cursor = eventCursor(nodeId)) {
if (LOG.isTraceEnabled()) {
LOG.trace("MongoDB query plan: {}", cursor.explain());
}
while (cursor.hasNext()) {
ClusterEvent clusterEvent = cursor.next();
LOG.trace("Processing cluster event: {}", clusterEvent);
Object payload = extractPayload(clusterEvent.payload(), clusterEvent.eventClass());
if (payload != null) {
serverEventBus.post(payload);
} else {
LOG.warn("Couldn't extract payload of cluster event with ID <{}>", clusterEvent.id());
LOG.debug("Invalid payload in cluster event: {}", clusterEvent);
}
updateConsumers(clusterEvent.id(), nodeId);
}
} catch (Exception e) {
LOG.warn("Error while reading cluster events from MongoDB, retrying.", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doRun
File: graylog2-server/src/main/java/org/graylog2/events/ClusterEventPeriodical.java
Repository: Graylog2/graylog2-server
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2024-24824
|
HIGH
| 8.8
|
Graylog2/graylog2-server
|
doRun
|
graylog2-server/src/main/java/org/graylog2/events/ClusterEventPeriodical.java
|
75ef2b8d60e7d67f859b79fe712c8ae7b2e861d8
| 0
|
Analyze the following code function for security vulnerabilities
|
public Object opt(String key) {
return key == null ? null : this.myHashMap.get(key);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: opt
File: src/main/java/org/codehaus/jettison/json/JSONObject.java
Repository: jettison-json/jettison
The code follows secure coding practices.
|
[
"CWE-674",
"CWE-787"
] |
CVE-2022-45693
|
HIGH
| 7.5
|
jettison-json/jettison
|
opt
|
src/main/java/org/codehaus/jettison/json/JSONObject.java
|
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String toString()
{
return this.doc.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toString
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-23615
|
MEDIUM
| 5.5
|
xwiki/xwiki-platform
|
toString
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
|
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
| 0
|
Analyze the following code function for security vulnerabilities
|
private void pruneHostLocked(Host host) {
if (host.widgets.size() == 0 && host.callbacks == null) {
if (DEBUG) {
Slog.i(TAG, "Pruning host " + host.id);
}
mHosts.remove(host);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: pruneHostLocked
File: services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-1541
|
MEDIUM
| 4.3
|
android
|
pruneHostLocked
|
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
|
0b98d304c467184602b4c6bce76fda0b0274bc07
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public IntValues getLinearIntValues(String tableName, DownSampling downsampling, List<String> ids,
String valueCName) throws IOException {
StringBuilder idValues = new StringBuilder();
for (int valueIdx = 0; valueIdx < ids.size(); valueIdx++) {
if (valueIdx != 0) {
idValues.append(",");
}
idValues.append("'").append(ids.get(valueIdx)).append("'");
}
IntValues intValues = new IntValues();
try (Connection connection = h2Client.getConnection()) {
try (ResultSet resultSet = h2Client.executeQuery(
connection, "select id, " + valueCName + " from " + tableName + " where id in (" + idValues
.toString() + ")")) {
while (resultSet.next()) {
KVInt kv = new KVInt();
kv.setId(resultSet.getString("id"));
kv.setValue(resultSet.getLong(valueCName));
intValues.addKVInt(kv);
}
}
} catch (SQLException e) {
throw new IOException(e);
}
return orderWithDefault0(intValues, ids);
}
|
Vulnerability Classification:
- CWE: CWE-89
- CVE: CVE-2020-9483
- Severity: MEDIUM
- CVSS Score: 5.0
Description: Fix security issue of the metrics query
Function: getLinearIntValues
File: oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/h2/dao/H2MetricsQueryDAO.java
Repository: apache/skywalking
Fixed Code:
@Override
public IntValues getLinearIntValues(String tableName, DownSampling downsampling, List<String> ids,
String valueCName) throws IOException {
StringBuilder sql = new StringBuilder("select id, " + valueCName + " from " + tableName + " where id in (");
List<Object> parameters = new ArrayList();
for (int i = 0; i < ids.size(); i++) {
if (i == 0) {
sql.append("?");
} else {
sql.append(",?");
}
parameters.add(ids.get(i));
}
sql.append(")");
IntValues intValues = new IntValues();
try (Connection connection = h2Client.getConnection()) {
try (ResultSet resultSet = h2Client.executeQuery(
connection, sql.toString(), parameters.toArray(new Object[0]))) {
while (resultSet.next()) {
KVInt kv = new KVInt();
kv.setId(resultSet.getString("id"));
kv.setValue(resultSet.getLong(valueCName));
intValues.addKVInt(kv);
}
}
} catch (SQLException e) {
throw new IOException(e);
}
return orderWithDefault0(intValues, ids);
}
|
[
"CWE-89"
] |
CVE-2020-9483
|
MEDIUM
| 5
|
apache/skywalking
|
getLinearIntValues
|
oap-server/server-storage-plugin/storage-jdbc-hikaricp-plugin/src/main/java/org/apache/skywalking/oap/server/storage/plugin/jdbc/h2/dao/H2MetricsQueryDAO.java
|
2b6aae3b733f9dbeae1d6eff4f1975c723e1e7d1
| 1
|
Analyze the following code function for security vulnerabilities
|
public boolean canGoForward() {
return mContentViewCore != null && mContentViewCore.canGoForward();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: canGoForward
File: chrome/android/java/src/org/chromium/chrome/browser/Tab.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
canGoForward
|
chrome/android/java/src/org/chromium/chrome/browser/Tab.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setAgentApp(@NonNull String packageName, @Nullable String agent) {
// note: hijacking SET_ACTIVITY_WATCHER, but should be changed to
// its own permission.
if (checkCallingPermission(android.Manifest.permission.SET_ACTIVITY_WATCHER)
!= PackageManager.PERMISSION_GRANTED) {
throw new SecurityException(
"Requires permission " + android.Manifest.permission.SET_ACTIVITY_WATCHER);
}
synchronized (mAppProfiler.mProfilerLock) {
mAppProfiler.setAgentAppLPf(packageName, agent);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAgentApp
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
|
setAgentApp
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("deprecation")
public static ProgramWorkflowState getState(String identifier) {
ProgramWorkflowState state = null;
if (identifier != null) {
try {
identifier = identifier.trim();
Integer id = Integer.valueOf(identifier);
state = getState(id);
if (state != null) {
return state;
}
}
catch (NumberFormatException e) {}
//get ProgramWorkflowState by mapping
state = getMetadataByMapping(ProgramWorkflowState.class, identifier);
if (state != null) {
return state;
}
if (isValidUuidFormat(identifier)) {
state = Context.getProgramWorkflowService().getStateByUuid(identifier);
if (state != null) {
return state;
}
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getState
File: api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java
Repository: openmrs/openmrs-module-htmlformentry
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-16521
|
HIGH
| 7.5
|
openmrs/openmrs-module-htmlformentry
|
getState
|
api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java
|
9dcd304688e65c31cac5532fe501b9816ed975ae
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
boolean shouldAnimate() {
return task == null || task.shouldAnimate();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: shouldAnimate
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
|
shouldAnimate
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
public @Nullable PackagePolicy getManagedProfileContactsAccessPolicy() {
throwIfParentInstance("getManagedProfileContactsAccessPolicy");
if (mService == null) {
return null;
}
try {
return mService.getManagedProfileContactsAccessPolicy();
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getManagedProfileContactsAccessPolicy
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
|
getManagedProfileContactsAccessPolicy
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean hasTextCharacters()
{
if (_currToken == JsonToken.VALUE_STRING) {
// yes; is or can be made available efficiently as char[]
return _textBuffer.hasTextAsCharacters();
}
if (_currToken == JsonToken.FIELD_NAME) {
// not necessarily; possible but:
return _nameCopied;
}
// other types, no benefit from accessing as char[]
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasTextCharacters
File: cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
Repository: FasterXML/jackson-dataformats-binary
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2020-28491
|
MEDIUM
| 5
|
FasterXML/jackson-dataformats-binary
|
hasTextCharacters
|
cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
|
de072d314af8f5f269c8abec6930652af67bc8e6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void virtualInit(XWikiContext context)
{
super.virtualInit(context);
getExtensionClass(context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: virtualInit
File: xwiki-platform-core/xwiki-platform-skin/xwiki-platform-skin-skinx/src/main/java/com/xpn/xwiki/plugin/skinx/AbstractDocumentSkinExtensionPlugin.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-29206
|
MEDIUM
| 5.4
|
xwiki/xwiki-platform
|
virtualInit
|
xwiki-platform-core/xwiki-platform-skin/xwiki-platform-skin-skinx/src/main/java/com/xpn/xwiki/plugin/skinx/AbstractDocumentSkinExtensionPlugin.java
|
fe65bc35d5672dd2505b7ac4ec42aec57d500fbb
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onSuccessfulUnknownCall(Call call, int callState) {
setCallState(call, callState);
Log.i(this, "onSuccessfulUnknownCall for call %s", call);
addCall(call);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onSuccessfulUnknownCall
File: src/com/android/server/telecom/CallsManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2423
|
MEDIUM
| 6.6
|
android
|
onSuccessfulUnknownCall
|
src/com/android/server/telecom/CallsManager.java
|
a06c9a4aef69ae27b951523cf72bf72412bf48fa
| 0
|
Analyze the following code function for security vulnerabilities
|
private void init(DocumentReference reference)
{
// if the passed reference is null consider it points to the default reference
if (reference == null) {
setDocumentReference(
Utils.<Provider<DocumentReference>>getComponent(DocumentReference.TYPE_PROVIDER).get());
} else {
setDocumentReference(reference);
}
this.updateDate = new Date();
this.updateDate.setTime((this.updateDate.getTime() / 1000) * 1000);
this.contentUpdateDate = new Date();
this.contentUpdateDate.setTime((this.contentUpdateDate.getTime() / 1000) * 1000);
this.creationDate = new Date();
this.creationDate.setTime((this.creationDate.getTime() / 1000) * 1000);
this.content = "";
this.format = "";
this.locale = Locale.ROOT;
this.defaultLocale = Locale.ROOT;
this.customClass = "";
this.comment = "";
// Note: As there's no notion of an Empty document we don't set the original document
// field. Thus getOriginalDocument() may return null.
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: init
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-26470
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
init
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void cursorFillWindow(final Cursor cursor,
int position, final CursorWindow window) {
if (position < 0 || position >= cursor.getCount()) {
return;
}
final int oldPos = cursor.getPosition();
final int numColumns = cursor.getColumnCount();
window.clear();
window.setStartPosition(position);
window.setNumColumns(numColumns);
if (cursor.moveToPosition(position)) {
rowloop: do {
if (!window.allocRow()) {
break;
}
for (int i = 0; i < numColumns; i++) {
final int type = cursor.getType(i);
final boolean success;
switch (type) {
case Cursor.FIELD_TYPE_NULL:
success = window.putNull(position, i);
break;
case Cursor.FIELD_TYPE_INTEGER:
success = window.putLong(cursor.getLong(i), position, i);
break;
case Cursor.FIELD_TYPE_FLOAT:
success = window.putDouble(cursor.getDouble(i), position, i);
break;
case Cursor.FIELD_TYPE_BLOB: {
final byte[] value = cursor.getBlob(i);
success = value != null ? window.putBlob(value, position, i)
: window.putNull(position, i);
break;
}
default: // assume value is convertible to String
case Cursor.FIELD_TYPE_STRING: {
final String value = cursor.getString(i);
success = value != null ? window.putString(value, position, i)
: window.putNull(position, i);
break;
}
}
if (!success) {
window.freeLastRow();
break rowloop;
}
}
position += 1;
} while (cursor.moveToNext());
}
cursor.moveToPosition(oldPos);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cursorFillWindow
File: core/java/android/database/DatabaseUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2023-40121
|
MEDIUM
| 5.5
|
android
|
cursorFillWindow
|
core/java/android/database/DatabaseUtils.java
|
3287ac2d2565dc96bf6177967f8e3aed33954253
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean match(Object object, ComponentName comp) {
if (all) {
return true;
}
if (components != null) {
for (int i=0; i<components.size(); i++) {
if (components.get(i).equals(comp)) {
return true;
}
}
}
if (objects != null) {
for (int i=0; i<objects.size(); i++) {
if (System.identityHashCode(object) == objects.get(i)) {
return true;
}
}
}
if (strings != null) {
String flat = comp.flattenToString();
for (int i=0; i<strings.size(); i++) {
if (flat.contains(strings.get(i))) {
return true;
}
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: match
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
|
match
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
FilePath _getModuleRoot(FilePath workspace, String localDir, EnvVars env) {
return workspace.child(
env.expand(localDir));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _getModuleRoot
File: src/main/java/hudson/scm/SubversionSCM.java
Repository: jenkinsci/subversion-plugin
The code follows secure coding practices.
|
[
"CWE-255"
] |
CVE-2013-6372
|
LOW
| 2.1
|
jenkinsci/subversion-plugin
|
_getModuleRoot
|
src/main/java/hudson/scm/SubversionSCM.java
|
7d4562d6f7e40de04bbe29577b51c79f07d05ba6
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isProgrammaticContent()
{
String[] matches = { "<%", "\\$xwiki.xWiki", "$xcontext.context", "$doc.document", "$xwiki.getXWiki()",
"$xcontext.getContext()", "$doc.getDocument()", "WithProgrammingRights(", "/* Programmatic content */",
"## Programmatic content", "$xwiki.search(", "$xwiki.createUser", "$xwiki.createNewWiki",
"$xwiki.addToAllGroup", "$xwiki.sendMessage", "$xwiki.copyDocument", "$xwiki.copyWikiWeb",
"$xwiki.copySpaceBetweenWikis", "$xwiki.parseGroovyFromString", "$doc.toXML()", "$doc.toXMLDocument()", };
String content2 = getContent().toLowerCase();
for (String match : matches) {
if (content2.indexOf(match.toLowerCase()) != -1) {
return true;
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isProgrammaticContent
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-26470
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
isProgrammaticContent
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean getAutoUpdate() {
return autoUpdate;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAutoUpdate
File: config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-77"
] |
CVE-2021-43286
|
MEDIUM
| 6.5
|
gocd
|
getAutoUpdate
|
config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
|
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public final int hashCode() { return _hash; }
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hashCode
File: src/main/java/com/fasterxml/jackson/databind/JavaType.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2019-16942
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
hashCode
|
src/main/java/com/fasterxml/jackson/databind/JavaType.java
|
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override public ConnectionFactory clone(){
try {
ConnectionFactory clone = (ConnectionFactory)super.clone();
return clone;
} catch (CloneNotSupportedException e) {
throw new RuntimeException(e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clone
File: src/main/java/com/rabbitmq/client/ConnectionFactory.java
Repository: rabbitmq/rabbitmq-java-client
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-46120
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-java-client
|
clone
|
src/main/java/com/rabbitmq/client/ConnectionFactory.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setSubjectInUse(boolean subjectInUse) {
this.subjectInUse = subjectInUse;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSubjectInUse
File: base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
setSubjectInUse
|
base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
native boolean
setDevicePropertyNative(byte[] address, int type, byte[] val);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDevicePropertyNative
File: src/com/android/bluetooth/btservice/AdapterService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-362",
"CWE-20"
] |
CVE-2016-3760
|
MEDIUM
| 5.4
|
android
|
setDevicePropertyNative
|
src/com/android/bluetooth/btservice/AdapterService.java
|
122feb9a0b04290f55183ff2f0384c6c53756bd8
| 0
|
Analyze the following code function for security vulnerabilities
|
public static Integer getSqlVersion(String basePath) {
List<File> sqlFileList = getSqlFileList(basePath);
if (!sqlFileList.isEmpty()) {
return Integer.valueOf(sqlFileList.get(sqlFileList.size() - 1).getName().replace(".sql", ""));
}
return -1;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSqlVersion
File: common/src/main/java/com/zrlog/util/ZrLogUtil.java
Repository: 94fzb/zrlog
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-16643
|
LOW
| 3.5
|
94fzb/zrlog
|
getSqlVersion
|
common/src/main/java/com/zrlog/util/ZrLogUtil.java
|
4a91c83af669e31a22297c14f089d8911d353fa1
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onFailedOutgoingCall(Call call, DisconnectCause disconnectCause) {
Log.v(this, "onFailedOutgoingCall, call: %s", call);
markCallAsRemoved(call);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onFailedOutgoingCall
File: src/com/android/server/telecom/CallsManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2423
|
MEDIUM
| 6.6
|
android
|
onFailedOutgoingCall
|
src/com/android/server/telecom/CallsManager.java
|
a06c9a4aef69ae27b951523cf72bf72412bf48fa
| 0
|
Analyze the following code function for security vulnerabilities
|
protected boolean neverCompressPictures() {
return getPreferences().getString("picture_compression", getResources().getString(R.string.picture_compression)).equals("never");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: neverCompressPictures
File: src/main/java/eu/siacs/conversations/ui/XmppActivity.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
neverCompressPictures
|
src/main/java/eu/siacs/conversations/ui/XmppActivity.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getColumnSQL(Column column) {
if (column instanceof FunctionColumn) {
return getFunctionColumnSQL((FunctionColumn) column);
}
else if (column instanceof SortColumn) {
return getSortColumnSQL((SortColumn) column);
}
else if (column instanceof DynamicDateColumn) {
return getDynamicDateColumnSQL((DynamicDateColumn) column);
}
else if (column instanceof FixedDateColumn) {
return getFixedDateColumnSQL((FixedDateColumn) column);
}
else if (column instanceof SimpleColumn) {
return getSimpleColumnSQL((SimpleColumn) column);
}
else {
return getColumnNameSQL(column.getName());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getColumnSQL
File: dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java
Repository: dashbuilder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-4999
|
HIGH
| 7.5
|
dashbuilder
|
getColumnSQL
|
dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java
|
8574899e3b6455547b534f570b2330ff772e524b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void doDispose() {
// autodisposed by basic controller
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doDispose
File: src/main/java/org/olat/core/commons/modules/bc/commands/CmdDelete.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-41152
|
MEDIUM
| 4
|
OpenOLAT
|
doDispose
|
src/main/java/org/olat/core/commons/modules/bc/commands/CmdDelete.java
|
418bb509ffcb0e25ab4390563c6c47f0458583eb
| 0
|
Analyze the following code function for security vulnerabilities
|
protected JsonDeserializer<?> _findCustomEnumDeserializer(Class<?> type,
DeserializationConfig config, BeanDescription beanDesc)
throws JsonMappingException
{
for (Deserializers d : _factoryConfig.deserializers()) {
JsonDeserializer<?> deser = d.findEnumDeserializer(type, config, beanDesc);
if (deser != null) {
return deser;
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _findCustomEnumDeserializer
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
|
_findCustomEnumDeserializer
|
src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java
|
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
| 0
|
Analyze the following code function for security vulnerabilities
|
public BroadcastRecord getMatchingOrderedReceiver(IBinder receiver) {
if (mOrderedBroadcasts.size() > 0) {
final BroadcastRecord r = mOrderedBroadcasts.get(0);
if (r != null && r.receiver == receiver) {
return r;
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMatchingOrderedReceiver
File: services/core/java/com/android/server/am/BroadcastQueue.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3912
|
HIGH
| 9.3
|
android
|
getMatchingOrderedReceiver
|
services/core/java/com/android/server/am/BroadcastQueue.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
public Class getClass(EntityReference docReference) throws XWikiException
{
return new Class(this.xwiki.getDocument(docReference, this.context).getXClass(), this.context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getClass
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
|
getClass
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
|
f471f2a392aeeb9e51d59fdfe1d76fccf532523f
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.