instruction
string | input
string | output
string | cwe_ids
list | cve_id
string | severity
string | cvss_score
float64 | repo_name
string | func_name
string | file_path
string | commit_hash
string | is_vulnerable
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Analyze the following code function for security vulnerabilities
|
public void closeAndSaveGuts(boolean removeLeavebehinds, boolean force, boolean removeControls,
int x, int y, boolean resetMenu) {
if (mNotificationGutsExposed != null) {
mNotificationGutsExposed.closeControls(removeLeavebehinds, removeControls, x, y, force);
}
if (resetMenu) {
mStackScroller.resetExposedMenuView(false /* animate */, true /* force */);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: closeAndSaveGuts
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
closeAndSaveGuts
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public String getName()
{
return getDocumentReference().getName();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getName
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
|
getName
|
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 ArrayMap<String, PermissionEntry> getPermissions() {
return mPermissions;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPermissions
File: services/core/java/com/android/server/SystemConfig.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3759
|
MEDIUM
| 5
|
android
|
getPermissions
|
services/core/java/com/android/server/SystemConfig.java
|
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getSHA(String password) {
try {
// Static getInstance method is called with hashing SHA
MessageDigest md = MessageDigest.getInstance("SHA-256");
// digest() method called
// to calculate message digest of an input
// and return array of byte
byte[] messageDigest = md.digest(password.getBytes());
// Convert byte array into signum representation
BigInteger no = new BigInteger(1, messageDigest);
// Convert message digest into hex value
String hashPass = no.toString(16);
while (hashPass.length() < 32) {
hashPass = "0" + hashPass;
}
return hashPass;
// For specifying wrong message digest algorithms
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
return null;
}
}
|
Vulnerability Classification:
- CWE: CWE-916
- CVE: CVE-2021-21253
- Severity: MEDIUM
- CVSS Score: 5.0
Description: Add a salt to SHA-256 hash
Function: getSHA
File: src/com/bijay/onlinevotingsystem/controller/SHA256.java
Repository: bijaythapaa/OnlineVotingSystem
Fixed Code:
public String getSHA(String password) {
try {
byte[] salt = getSalt();
String cipher = getCipher(password, salt);
return cipher;
// For specifying wrong message digest algorithms
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
return null;
}
}
|
[
"CWE-916"
] |
CVE-2021-21253
|
MEDIUM
| 5
|
bijaythapaa/OnlineVotingSystem
|
getSHA
|
src/com/bijay/onlinevotingsystem/controller/SHA256.java
|
0181cb0272857696c8eb3e44fcf6cb014ff90f09
| 1
|
Analyze the following code function for security vulnerabilities
|
abstract Object parse(String value);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parse
File: core/src/main/java/apoc/export/graphml/XmlGraphMLReader.java
Repository: neo4j/apoc
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2023-23926
|
HIGH
| 8.1
|
neo4j/apoc
|
parse
|
core/src/main/java/apoc/export/graphml/XmlGraphMLReader.java
|
3202b421b21973b2f57a43b33c88f3f6901cfd2a
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String sendJson(String jsonContent) {
return MANUAL_JSON_RESPONSE_PREFIX + jsonContent;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendJson
File: core-web/src/main/java/org/silverpeas/core/web/mvc/route/ComponentRequestRouter.java
Repository: Silverpeas/Silverpeas-Core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-47324
|
MEDIUM
| 5.4
|
Silverpeas/Silverpeas-Core
|
sendJson
|
core-web/src/main/java/org/silverpeas/core/web/mvc/route/ComponentRequestRouter.java
|
9a55728729a3b431847045c674b3e883507d1e1a
| 0
|
Analyze the following code function for security vulnerabilities
|
private void removeShortcutAsync(@NonNull final Collection<String> ids) {
if (!isAppSearchEnabled()) {
return;
}
runAsSystem(() -> fromAppSearch().thenAccept(session ->
session.remove(
new RemoveByDocumentIdRequest.Builder(getPackageName()).addIds(ids).build(),
mShortcutUser.mExecutor,
new BatchResultCallback<String, Void>() {
@Override
public void onResult(
@NonNull AppSearchBatchResult<String, Void> result) {
if (!result.isSuccess()) {
final Map<String, AppSearchResult<Void>> failures =
result.getFailures();
for (String key : failures.keySet()) {
Slog.e(TAG, "Failed deleting " + key + ", error message:"
+ failures.get(key).getErrorMessage());
}
}
}
@Override
public void onSystemError(@Nullable Throwable throwable) {
Slog.e(TAG, "Error removing shortcuts", throwable);
}
})));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeShortcutAsync
File: services/core/java/com/android/server/pm/ShortcutPackage.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40075
|
MEDIUM
| 5.5
|
android
|
removeShortcutAsync
|
services/core/java/com/android/server/pm/ShortcutPackage.java
|
ae768fbb9975fdab267f525831cb52f485ab0ecc
| 0
|
Analyze the following code function for security vulnerabilities
|
private RelativeLayout.LayoutParams createMyLayoutParams(int x, int y, int width, int height) {
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(
RelativeLayout.LayoutParams.WRAP_CONTENT,
RelativeLayout.LayoutParams.WRAP_CONTENT);
layoutParams.addRule(RelativeLayout.ALIGN_PARENT_LEFT);
layoutParams.addRule(RelativeLayout.ALIGN_PARENT_TOP);
layoutParams.width = width;
layoutParams.height = height;
layoutParams.leftMargin = x;
layoutParams.topMargin = y;
return layoutParams;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createMyLayoutParams
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
|
createMyLayoutParams
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void checkAccess(Right right, EntityReference entity) throws AccessDeniedException
{
DocumentReference user = getCurrentUser(right, entity);
checkAccess(right, user, entity);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkAccess
File: xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authorization/xwiki-platform-security-authorization-bridge/src/main/java/org/xwiki/security/authorization/internal/DefaultContextualAuthorizationManager.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-459"
] |
CVE-2023-36468
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
checkAccess
|
xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authorization/xwiki-platform-security-authorization-bridge/src/main/java/org/xwiki/security/authorization/internal/DefaultContextualAuthorizationManager.java
|
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setAnswer(SuggestionAnswer answer) {
float density = getResources().getDisplayMetrics().density;
SuggestionAnswer.ImageLine firstLine = answer.getFirstLine();
mContentsView.mTextLine1.setTextSize(AnswerTextBuilder.getMaxTextHeightSp(firstLine));
Spannable firstLineText = AnswerTextBuilder.buildSpannable(
firstLine, mContentsView.mTextLine1.getPaint().getFontMetrics(), density);
mContentsView.mTextLine1.setText(firstLineText, BufferType.SPANNABLE);
SuggestionAnswer.ImageLine secondLine = answer.getSecondLine();
mContentsView.mTextLine2.setTextSize(AnswerTextBuilder.getMaxTextHeightSp(secondLine));
Spannable secondLineText = AnswerTextBuilder.buildSpannable(
secondLine, mContentsView.mTextLine2.getPaint().getFontMetrics(), density);
mContentsView.mTextLine2.setText(secondLineText, BufferType.SPANNABLE);
if (secondLine.hasImage()) {
mContentsView.mAnswerImage.setVisibility(VISIBLE);
float textSize = mContentsView.mTextLine2.getTextSize();
int imageSize = (int) (textSize * ANSWER_IMAGE_SCALING_FACTOR);
mContentsView.mAnswerImage.getLayoutParams().height = imageSize;
mContentsView.mAnswerImage.getLayoutParams().width = imageSize;
mContentsView.mAnswerImageMaxSize = imageSize;
String url = "https:" + secondLine.getImage().replace("\\/", "/");
AnswersImage.requestAnswersImage(
mLocationBar.getCurrentTab().getProfile(),
url,
new AnswersImage.AnswersImageObserver() {
@Override
public void onAnswersImageChanged(Bitmap bitmap) {
mContentsView.mAnswerImage.setImageBitmap(bitmap);
}
});
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAnswer
File: chrome/android/java/src/org/chromium/chrome/browser/omnibox/SuggestionView.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-254"
] |
CVE-2016-5163
|
MEDIUM
| 4.3
|
chromium
|
setAnswer
|
chrome/android/java/src/org/chromium/chrome/browser/omnibox/SuggestionView.java
|
3bd33fee094e863e5496ac24714c558bd58d28ef
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean canShowWhenLocked() {
final boolean showBecauseOfActivity =
mActivityRecord != null && mActivityRecord.canShowWhenLocked();
final boolean showBecauseOfWindow = (getAttrs().flags & FLAG_SHOW_WHEN_LOCKED) != 0;
return showBecauseOfActivity || showBecauseOfWindow;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: canShowWhenLocked
File: services/core/java/com/android/server/wm/WindowState.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35674
|
HIGH
| 7.8
|
android
|
canShowWhenLocked
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void handleException(String msg) throws APIManagementException {
log.error(msg);
throw new APIManagementException(msg);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleException
File: components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
Repository: wso2/carbon-apimgt
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2018-20736
|
LOW
| 3.5
|
wso2/carbon-apimgt
|
handleException
|
components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
|
490f2860822f89d745b7c04fa9570bd86bef4236
| 0
|
Analyze the following code function for security vulnerabilities
|
void removeStartingWindow() {
boolean prevEligibleForLetterboxEducation = isEligibleForLetterboxEducation();
if (transferSplashScreenIfNeeded()) {
return;
}
removeStartingWindowAnimation(true /* prepareAnimation */);
final Task task = getTask();
if (prevEligibleForLetterboxEducation != isEligibleForLetterboxEducation()
&& task != null) {
// Trigger TaskInfoChanged to update the letterbox education.
task.dispatchTaskInfoChangedIfNeeded(true /* force */);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeStartingWindow
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
|
removeStartingWindow
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Transactional
public void delete(String panel_group_id, Integer type) {
PanelShareExample example = new PanelShareExample();
PanelShareExample.Criteria criteria = example.createCriteria();
criteria.andPanelGroupIdEqualTo(panel_group_id);
if (type != null) {
criteria.andTypeEqualTo(type);
}
mapper.deleteByExample(example);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: delete
File: backend/src/main/java/io/dataease/service/panel/ShareService.java
Repository: dataease
The code follows secure coding practices.
|
[
"CWE-639"
] |
CVE-2023-32310
|
HIGH
| 8.1
|
dataease
|
delete
|
backend/src/main/java/io/dataease/service/panel/ShareService.java
|
72f428e87b5395c03d2f94ef6185fc247ddbc8dc
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getGroup(Collection<RosterGroup> groups) {
for (RosterGroup group : groups) {
return group.getName();
}
return "";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getGroup
File: src/org/yaxim/androidclient/service/SmackableImp.java
Repository: ge0rg/yaxim
The code follows secure coding practices.
|
[
"CWE-20",
"CWE-346"
] |
CVE-2017-5589
|
MEDIUM
| 4.3
|
ge0rg/yaxim
|
getGroup
|
src/org/yaxim/androidclient/service/SmackableImp.java
|
65a38dc77545d9568732189e86089390f0ceaf9f
| 0
|
Analyze the following code function for security vulnerabilities
|
protected abstract String getUrlSuffix();
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUrlSuffix
File: cas-client-core/src/main/java/org/jasig/cas/client/validation/AbstractUrlBasedTicketValidator.java
Repository: apereo/java-cas-client
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2014-4172
|
HIGH
| 7.5
|
apereo/java-cas-client
|
getUrlSuffix
|
cas-client-core/src/main/java/org/jasig/cas/client/validation/AbstractUrlBasedTicketValidator.java
|
ae37092100c8eaec610dab6d83e5e05a8ee58814
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
boolean handleCompleteDeferredRemoval() {
if (mRemoveOnExit && !isSelfAnimating(0 /* flags */, ANIMATION_TYPE_WINDOW_ANIMATION)) {
mRemoveOnExit = false;
removeImmediately();
}
return super.handleCompleteDeferredRemoval();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleCompleteDeferredRemoval
File: services/core/java/com/android/server/wm/WindowState.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35674
|
HIGH
| 7.8
|
android
|
handleCompleteDeferredRemoval
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getRenderedTitle(String syntaxId) throws XWikiException
{
try {
return this.doc.getRenderedTitle(Syntax.valueOf(syntaxId), getXWikiContext());
} catch (ParseException e) {
LOGGER.error("Failed to parse provided syntax identifier [" + syntaxId + "]", e);
throw new XWikiException(XWikiException.MODULE_XWIKI_RENDERING, XWikiException.ERROR_XWIKI_UNKNOWN,
"Failed to parse syntax identifier [" + syntaxId + "]", e);
} catch (Exception e) {
LOGGER.error("Failed to render document [" + getPrefixedFullName() + "] title content", e);
throw new XWikiException(XWikiException.MODULE_XWIKI_RENDERING, XWikiException.ERROR_XWIKI_UNKNOWN,
"Failed to render document [" + getPrefixedFullName() + "] content title", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRenderedTitle
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
|
getRenderedTitle
|
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 Object readNewLongString(boolean unshared) throws IOException {
long length = input.readLong();
Object result = input.decodeUTF((int) length);
if (enableResolve) {
result = resolveObject(result);
}
registerObjectRead(result, nextHandle(), unshared);
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readNewLongString
File: luni/src/main/java/java/io/ObjectInputStream.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-7911
|
HIGH
| 7.2
|
android
|
readNewLongString
|
luni/src/main/java/java/io/ObjectInputStream.java
|
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
| 0
|
Analyze the following code function for security vulnerabilities
|
private void keyguardDone() {
Trace.beginSection("KeyguardViewMediator#keyguardDone");
if (DEBUG) Log.d(TAG, "keyguardDone()");
userActivity();
EventLog.writeEvent(70000, 2);
Message msg = mHandler.obtainMessage(KEYGUARD_DONE);
mHandler.sendMessage(msg);
Trace.endSection();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: keyguardDone
File: packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21267
|
MEDIUM
| 5.5
|
android
|
keyguardDone
|
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
|
d18d8b350756b0e89e051736c1f28744ed31e93a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int restartUserInBackground(final int userId) {
return mUserController.restartUser(userId, /* foreground */ false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: restartUserInBackground
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
|
restartUserInBackground
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public static Predicate<File> isFile() {
return FilePredicate.IS_FILE;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isFile
File: android/guava/src/com/google/common/io/Files.java
Repository: google/guava
The code follows secure coding practices.
|
[
"CWE-552"
] |
CVE-2023-2976
|
HIGH
| 7.1
|
google/guava
|
isFile
|
android/guava/src/com/google/common/io/Files.java
|
feb83a1c8fd2e7670b244d5afd23cba5aca43284
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setReadOnly(boolean ro)
{
if (hasAdminRights()) {
this.xwiki.setReadOnly(ro);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setReadOnly
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
|
setReadOnly
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
|
f471f2a392aeeb9e51d59fdfe1d76fccf532523f
| 0
|
Analyze the following code function for security vulnerabilities
|
private void reportStatus(int status, int win32ExitCode, int waitHint) {
SERVICE_STATUS serviceStatus = new SERVICE_STATUS();
serviceStatus.dwServiceType = WinNT.SERVICE_WIN32_OWN_PROCESS;
serviceStatus.dwControlsAccepted = Winsvc.SERVICE_ACCEPT_STOP | Winsvc.SERVICE_ACCEPT_SHUTDOWN;
serviceStatus.dwWin32ExitCode = win32ExitCode;
serviceStatus.dwWaitHint = waitHint;
serviceStatus.dwCurrentState = status;
ADVAPI_32.SetServiceStatus(serviceStatusHandle, serviceStatus);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: reportStatus
File: src/main/java/org/traccar/WindowsService.java
Repository: traccar
The code follows secure coding practices.
|
[
"CWE-428"
] |
CVE-2021-21292
|
LOW
| 1.9
|
traccar
|
reportStatus
|
src/main/java/org/traccar/WindowsService.java
|
cc69a9907ac9878db3750aa14ffedb28626455da
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getLaunchDisplayId() {
return mLaunchDisplayId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLaunchDisplayId
File: core/java/android/app/ActivityOptions.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-20918
|
CRITICAL
| 9.8
|
android
|
getLaunchDisplayId
|
core/java/android/app/ActivityOptions.java
|
51051de4eb40bb502db448084a83fd6cbfb7d3cf
| 0
|
Analyze the following code function for security vulnerabilities
|
private V remove0(int h, int i, K name) {
HeaderEntry<K, V> e = entries[i];
if (e == null) {
return null;
}
V value = null;
HeaderEntry<K, V> next = e.next;
while (next != null) {
if (next.hash == h && hashingStrategy.equals(name, next.key)) {
value = next.value;
e.next = next.next;
next.remove();
--size;
} else {
e = next;
}
next = e.next;
}
e = entries[i];
if (e.hash == h && hashingStrategy.equals(name, e.key)) {
if (value == null) {
value = e.value;
}
entries[i] = e.next;
e.remove();
--size;
}
return value;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: remove0
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
|
remove0
|
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
|
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public synchronized void flush() {
if (!chunks.isEmpty()) {
if (MemUtil.isMemoryLimited()) {
for (IQueueChunk chunk : chunks.values()) {
final Future future = submitUnchecked(chunk);
if (future != null && !future.isDone()) {
pollSubmissions(Settings.settings().QUEUE.PARALLEL_THREADS, true);
submissions.add(future);
}
}
} else {
for (IQueueChunk chunk : chunks.values()) {
final Future future = submitUnchecked(chunk);
if (future != null && !future.isDone()) {
submissions.add(future);
}
}
}
getChunkLock.lock();
chunks.clear();
getChunkLock.unlock();
}
pollSubmissions(0, true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: flush
File: worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/SingleThreadQueueExtent.java
Repository: IntellectualSites/FastAsyncWorldEdit
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-35925
|
MEDIUM
| 5.5
|
IntellectualSites/FastAsyncWorldEdit
|
flush
|
worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/SingleThreadQueueExtent.java
|
3a8dfb4f7b858a439c35f7af1d56d21f796f61f5
| 0
|
Analyze the following code function for security vulnerabilities
|
private void demoteSystemServerRenderThread(int tid) {
setThreadPriority(tid, Process.THREAD_PRIORITY_BACKGROUND);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: demoteSystemServerRenderThread
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
|
demoteSystemServerRenderThread
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public static Account fromXML(String xml) throws Exception {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.parse(new InputSource(new StringReader(xml)));
Element accountElement = document.getDocumentElement();
return fromDOM(accountElement);
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2022-2414
- Severity: HIGH
- CVSS Score: 7.5
Description: Disable access to external entities when parsing XML
This reduces the vulnerability of XML parsers to XXE (XML external
entity) injection.
The best way to prevent XXE is to stop using XML altogether, which we do
plan to do. Until that happens I consider it worthwhile to tighten the
security here though.
Function: fromXML
File: base/common/src/main/java/com/netscape/certsrv/account/Account.java
Repository: dogtagpki/pki
Fixed Code:
public static Account fromXML(String xml) throws Exception {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.parse(new InputSource(new StringReader(xml)));
Element accountElement = document.getDocumentElement();
return fromDOM(accountElement);
}
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
fromXML
|
base/common/src/main/java/com/netscape/certsrv/account/Account.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 1
|
Analyze the following code function for security vulnerabilities
|
private boolean isPathBlacklisted(Path pa, PathActionLevel pathActionLevel) {
var pathBlacklist = configuration.blacklistedPaths();
return pathBlacklist.stream().anyMatch(pm -> pm.matchesWithLevel(pa, pathActionLevel));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isPathBlacklisted
File: src/main/java/de/tum/in/test/api/security/ArtemisSecurityManager.java
Repository: ls1intum/Ares
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2024-23683
|
HIGH
| 8.2
|
ls1intum/Ares
|
isPathBlacklisted
|
src/main/java/de/tum/in/test/api/security/ArtemisSecurityManager.java
|
af4f28a56e2fe600d8750b3b415352a0a3217392
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void testDeserializationWithTypeInfo04() throws Exception
{
Instant date = Instant.now();
ObjectMapper m = newMapper()
.addMixIn(Temporal.class, MockObjectConfiguration.class);
Temporal value = m.readValue(
"[\"" + Instant.class.getName() + "\",\"" + FORMATTER.format(date) + "\"]", Temporal.class
);
assertTrue("The value should be an Instant.", value instanceof Instant);
assertEquals("The value is not correct.", date, value);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: testDeserializationWithTypeInfo04
File: datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestInstantSerialization.java
Repository: FasterXML/jackson-modules-java8
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-1000873
|
MEDIUM
| 4.3
|
FasterXML/jackson-modules-java8
|
testDeserializationWithTypeInfo04
|
datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestInstantSerialization.java
|
ba27ce5909dfb49bcaf753ad3e04ecb980010b0b
| 0
|
Analyze the following code function for security vulnerabilities
|
public MaterialRevisions latestModification(File baseDir, final SubprocessExecutionContext execCtx) {
MaterialRevisions revisions = new MaterialRevisions();
for (Material material : this) {
List<Modification> modifications = new ArrayList<>();
if (material instanceof SvnMaterial) {
modifications = ((SvnMaterial) material).latestModification(baseDir, execCtx);
}
if (material instanceof HgMaterial) {
modifications = ((HgMaterial) material).latestModification(baseDir, execCtx);
}
if (material instanceof GitMaterial) {
modifications = ((GitMaterial) material).latestModification(baseDir, execCtx);
}
if (material instanceof P4Material) {
modifications = ((P4Material) material).latestModification(baseDir, execCtx);
}
if (material instanceof TfsMaterial) {
modifications = ((TfsMaterial) material).latestModification(baseDir, execCtx);
}
if (material instanceof DependencyMaterial) {
modifications = ((DependencyMaterial) material).latestModification(baseDir, execCtx);
}
revisions.addRevision(material, modifications);
}
return revisions;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: latestModification
File: domain/src/main/java/com/thoughtworks/go/config/materials/Materials.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-39309
|
MEDIUM
| 6.5
|
gocd
|
latestModification
|
domain/src/main/java/com/thoughtworks/go/config/materials/Materials.java
|
691b479f1310034992da141760e9c5d1f5b60e8a
| 0
|
Analyze the following code function for security vulnerabilities
|
protected ScriptContext getCurrentScriptContext()
{
if (this.scriptContextManager == null) {
this.scriptContextManager = Utils.getComponent(ScriptContextManager.class);
}
return this.scriptContextManager.getCurrentScriptContext();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCurrentScriptContext
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiAction.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2022-23617
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
getCurrentScriptContext
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiAction.java
|
b35ef0edd4f2ff2c974cbeef6b80fcf9b5a44554
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void onInitialize() {
super.onInitialize();
newRevisionPicker(null);
newCommitStatus(null);
newBlobNavigator(null);
newBlobOperations(null);
add(revisionIndexing = new WebMarkupContainer("revisionIndexing") {
@Override
protected void onConfigure() {
super.onConfigure();
if (resolvedRevision != null) {
RevCommit commit = getProject().getRevCommit(resolvedRevision, true);
IndexManager indexManager = OneDev.getInstance(IndexManager.class);
if (!indexManager.isIndexed(getProject(), commit)) {
OneDev.getInstance(IndexManager.class).indexAsync(getProject(), commit);
setVisible(true);
} else {
setVisible(false);
}
} else {
setVisible(false);
}
}
}.setOutputMarkupPlaceholderTag(true));
revisionIndexing.add(new WebSocketObserver() {
@Override
public void onObservableChanged(IPartialPageRequestHandler handler) {
handler.add(revisionIndexing);
resizeWindow(handler);
}
@Override
public Collection<String> getObservables() {
Set<String> observables = new HashSet<>();
if (resolvedRevision != null)
observables.add(CommitIndexed.getWebSocketObservable(getProject().getRevCommit(resolvedRevision, true).name()));
return observables;
}
});
newBuildSupportNote(null);
newBlobContent(null);
add(searchResult = new WebMarkupContainer("searchResult"));
List<QueryHit> queryHits;
if (state.query != null) {
BlobQuery query = new TextQuery.Builder()
.term(state.query)
.wholeWord(true)
.caseSensitive(true)
.count(SearchResultPanel.MAX_QUERY_ENTRIES)
.build();
try {
SearchManager searchManager = OneDev.getInstance(SearchManager.class);
queryHits = searchManager.search(projectModel.getObject(), getProject().getRevCommit(resolvedRevision, true),
query);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
} else {
queryHits = null;
}
newSearchResult(null, queryHits);
add(ajaxBehavior = new AbstractPostAjaxBehavior() {
@Override
protected void respond(AjaxRequestTarget target) {
IRequestParameters params = RequestCycle.get().getRequest().getPostParameters();
String action = params.getParameterValue("action").toString("");
switch (action) {
case "quickSearch":
new ModalPanel(target) {
@Override
protected Component newContent(String id) {
return newQuickSearchPanel(id, this);
}
};
break;
case "advancedSearch":
new ModalPanel(target) {
@Override
protected Component newContent(String id) {
return newAdvancedSearchPanel(id, this);
}
};
break;
case "permalink":
if (isOnBranch()) {
BlobIdent newBlobIdent = new BlobIdent(state.blobIdent);
newBlobIdent.revision = resolvedRevision.name();
ProjectBlobPage.this.onSelect(target, newBlobIdent, null);
}
break;
default:
throw new IllegalStateException("Unexpected action: " + action);
}
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onInitialize
File: server-core/src/main/java/io/onedev/server/web/page/project/blob/ProjectBlobPage.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-434"
] |
CVE-2021-21245
|
HIGH
| 7.5
|
theonedev/onedev
|
onInitialize
|
server-core/src/main/java/io/onedev/server/web/page/project/blob/ProjectBlobPage.java
|
0c060153fb97c0288a1917efdb17cc426934dacb
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int hashCode() {
int result = uid;
result = 31 * result + hostId;
result = 31 * result + ((packageName != null)
? packageName.hashCode() : 0);
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hashCode
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
|
hashCode
|
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
|
0b98d304c467184602b4c6bce76fda0b0274bc07
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<BaseObject> getXObjects(DocumentReference classReference)
{
List<BaseObject> xobjects = null;
if (classReference != null) {
xobjects = getXObjects().get(classReference);
}
return xobjects != null ? xobjects : Collections.emptyList();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getXObjects
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
|
getXObjects
|
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 reportSuccessfulStrongAuthUnlockAttempt() {
mStrongAuthNotTimedOut.add(sCurrentUser);
scheduleStrongAuthTimeout();
if (mFpm != null) {
byte[] token = null; /* TODO: pass real auth token once fp HAL supports it */
mFpm.resetTimeout(token);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: reportSuccessfulStrongAuthUnlockAttempt
File: packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
reportSuccessfulStrongAuthUnlockAttempt
|
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public StaticHandler setHttp2PushMapping(List<Http2PushMapping> http2PushMap) {
if(http2PushMap != null) this.http2PushMappings = new ArrayList<>(http2PushMap);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setHttp2PushMapping
File: vertx-web/src/main/java/io/vertx/ext/web/handler/impl/StaticHandlerImpl.java
Repository: vert-x3/vertx-web
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-12542
|
HIGH
| 7.5
|
vert-x3/vertx-web
|
setHttp2PushMapping
|
vertx-web/src/main/java/io/vertx/ext/web/handler/impl/StaticHandlerImpl.java
|
57a65dce6f4c5aa5e3ce7288685e7f3447eb8f3b
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void initModuleConfigFactory(){
String configFactory = getServletConfig().getInitParameter("configFactory");
if (configFactory != null) {
ModuleConfigFactory.setFactoryClass(configFactory);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initModuleConfigFactory
File: src/share/org/apache/struts/action/ActionServlet.java
Repository: kawasima/struts1-forever
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-20"
] |
CVE-2016-1181
|
MEDIUM
| 6.8
|
kawasima/struts1-forever
|
initModuleConfigFactory
|
src/share/org/apache/struts/action/ActionServlet.java
|
eda3a79907ed8fcb0387a0496d0cb14332f250e8
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void deleteTempFile(String tempFilePath) {
if (tempFilePath != null) {
final File tempFile = new File(tempFilePath);
if (tempFile.exists()) {
//noinspection ResultOfMethodCallIgnored
tempFile.delete();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deleteTempFile
File: library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java
Repository: lingochamp/FileDownloader
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-11248
|
HIGH
| 7.5
|
lingochamp/FileDownloader
|
deleteTempFile
|
library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java
|
b023cc081bbecdd2a9f3549a3ae5c12a9647ed7f
| 0
|
Analyze the following code function for security vulnerabilities
|
static URL manifestLocation(String classLocation) {
URL url;
if (classLocation.startsWith("jar:")) {
try {
url =
new URL(
classLocation.substring(0, classLocation.lastIndexOf("!") + 1)
+ "/META-INF/MANIFEST.MF");
return url;
} catch (MalformedURLException e) {
return null;
}
}
// handle custom protocols such as jboss "vfs:" or OSGi "resource"
if (classLocation.contains(".jar/")) {
String location = classLocation.substring(0, classLocation.indexOf(".jar/") + 4);
try {
url = new URL(location + "/META-INF/MANIFEST.MF");
return url;
} catch (MalformedURLException e) {
return null;
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: manifestLocation
File: modules/library/metadata/src/main/java/org/geotools/util/factory/GeoTools.java
Repository: geotools
The code follows secure coding practices.
|
[
"CWE-917"
] |
CVE-2022-24818
|
HIGH
| 7.5
|
geotools
|
manifestLocation
|
modules/library/metadata/src/main/java/org/geotools/util/factory/GeoTools.java
|
4f70fa3234391dd0cda883a20ab0ec75688cba49
| 0
|
Analyze the following code function for security vulnerabilities
|
private String evaluateVelocity(String content, EntityReference reference, DocumentReference author,
final DocumentReference sourceDocument, XWikiContext context)
{
EntityReferenceSerializer<String> serializer = Utils.getComponent(EntityReferenceSerializer.TYPE_STRING);
String namespace = serializer.serialize(reference);
return evaluateVelocity(content, namespace, author, sourceDocument, context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: evaluateVelocity
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/SkinAction.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2022-36092
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
evaluateVelocity
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/SkinAction.java
|
71a6d0bb6f8ab718fcfaae0e9b8c16c2d69cd4bb
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void replaceCircuitNodes(Element root, String attrType,
Map<String, String> validLabels) throws IllegalArgumentException {
assert (root != null);
assert (attrType != null);
assert (validLabels != null);
if (validLabels.isEmpty()) {
// Particular case, all the labels were good!
return;
}
// Circuits are top-level in the XML file
switch (attrType) {
case "name":
// We have not only to replace the circuit names in each circuit,
// but in the corresponding comps too!
for (Element circElt : XmlIterator
.forChildElements(root, "circuit")) {
// Circuit's name is directly available as an attribute
String name = circElt.getAttribute("name");
if (validLabels.containsKey(name)) {
circElt.setAttribute("name", validLabels.get(name));
// Also, it is present as value for the "circuit" attribute
for (Element attrElt : XmlIterator.forChildElements(
circElt, "a")) {
if (attrElt.hasAttribute("name")) {
String aName = attrElt.getAttribute("name");
if (aName.equals("circuit")) {
attrElt.setAttribute("val",
validLabels.get(name));
}
}
}
}
// Now do the comp part
for (Element compElt : XmlIterator.forChildElements(circElt,
"comp")) {
// Circuits are components without lib
if (!compElt.hasAttribute("lib")) {
if (compElt.hasAttribute("name")) {
String cName = compElt.getAttribute("name");
if (validLabels.containsKey(cName)) {
compElt.setAttribute("name",
validLabels.get(cName));
}
}
}
}
}
break;
case "label":
for (Element circElt : XmlIterator
.forChildElements(root, "circuit")) {
// label is available through its a child node
for (Element attrElt : XmlIterator.forChildElements(circElt,
"a")) {
if (attrElt.hasAttribute("name")) {
String aName = attrElt.getAttribute("name");
if (aName.equals("label")) {
String label = attrElt.getAttribute("val");
if (validLabels.containsKey(label)) {
attrElt.setAttribute("val",
validLabels.get(label));
}
}
}
}
}
break;
default:
throw new IllegalArgumentException(
"Invalid attribute type requested: " + attrType
+ " for node type: circuit");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: replaceCircuitNodes
File: src/com/cburch/logisim/file/XmlReader.java
Repository: logisim-evolution
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000889
|
MEDIUM
| 6.8
|
logisim-evolution
|
replaceCircuitNodes
|
src/com/cburch/logisim/file/XmlReader.java
|
90aee8f8ceef463884cc400af4f6d1f109fb0972
| 0
|
Analyze the following code function for security vulnerabilities
|
public void removeFooterRow(int rowIndex) {
footer.removeRow(rowIndex);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeFooterRow
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
|
removeFooterRow
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public int checkActive(XWikiContext context) throws XWikiException
{
return checkActive(context.getUser(), context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkActive
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-32620
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
checkActive
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
private void logExclusionRestrictions(int side) {
if (!logsGestureExclusionRestrictions(this)
|| SystemClock.uptimeMillis() < mLastExclusionLogUptimeMillis[side]
+ mWmService.mConstants.mSystemGestureExclusionLogDebounceTimeoutMillis) {
// Drop the log if we have just logged; this is okay, because what we would have logged
// was true only for a short duration.
return;
}
final long now = SystemClock.uptimeMillis();
final long duration = now - mLastExclusionLogUptimeMillis[side];
mLastExclusionLogUptimeMillis[side] = now;
final int requested = mLastRequestedExclusionHeight[side];
final int granted = mLastGrantedExclusionHeight[side];
FrameworkStatsLog.write(FrameworkStatsLog.EXCLUSION_RECT_STATE_CHANGED,
mAttrs.packageName, requested, requested - granted /* rejected */,
side + 1 /* Sides are 1-indexed in atoms.proto */,
(getConfiguration().orientation == ORIENTATION_LANDSCAPE),
false /* (deprecated param) inSplitscreen */, (int) duration);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: logExclusionRestrictions
File: services/core/java/com/android/server/wm/WindowState.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35674
|
HIGH
| 7.8
|
android
|
logExclusionRestrictions
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean sendMediaButton(String packageName, int pid, int uid,
boolean asSystemService, KeyEvent keyEvent) {
try {
if (KeyEvent.isMediaSessionKey(keyEvent.getKeyCode())) {
final String reason = "action=" + KeyEvent.actionToString(keyEvent.getAction())
+ ";code=" + KeyEvent.keyCodeToString(keyEvent.getKeyCode());
mService.tempAllowlistTargetPkgIfPossible(getUid(), getPackageName(),
pid, uid, packageName, reason);
}
if (asSystemService) {
mCb.onMediaButton(mContext.getPackageName(), Process.myPid(),
Process.SYSTEM_UID, createMediaButtonIntent(keyEvent), 0, null);
} else {
mCb.onMediaButtonFromController(packageName, pid, uid,
createMediaButtonIntent(keyEvent));
}
return true;
} catch (RemoteException e) {
Log.e(TAG, "Remote failure in sendMediaRequest.", e);
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendMediaButton
File: services/core/java/com/android/server/media/MediaSessionRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21280
|
MEDIUM
| 5.5
|
android
|
sendMediaButton
|
services/core/java/com/android/server/media/MediaSessionRecord.java
|
06e772e05514af4aa427641784c5eec39a892ed3
| 0
|
Analyze the following code function for security vulnerabilities
|
private Animation loadThumbnailAnimation(HardwareBuffer thumbnailHeader) {
final DisplayInfo displayInfo = mDisplayContent.getDisplayInfo();
// If this is a multi-window scenario, we use the windows frame as
// destination of the thumbnail header animation. If this is a full screen
// window scenario, we use the whole display as the target.
WindowState win = findMainWindow();
Rect insets;
Rect appRect;
if (win != null) {
insets = win.getInsetsStateWithVisibilityOverride().calculateInsets(
win.getFrame(), Type.systemBars(), false /* ignoreVisibility */).toRect();
appRect = new Rect(win.getFrame());
appRect.inset(insets);
} else {
insets = null;
appRect = new Rect(0, 0, displayInfo.appWidth, displayInfo.appHeight);
}
final Configuration displayConfig = mDisplayContent.getConfiguration();
return getDisplayContent().mAppTransition.createThumbnailAspectScaleAnimationLocked(
appRect, insets, thumbnailHeader, task, displayConfig.orientation);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: loadThumbnailAnimation
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
|
loadThumbnailAnimation
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public SerializationServiceBuilder setNotActiveExceptionSupplier(Supplier<RuntimeException> notActiveExceptionSupplier) {
this.notActiveExceptionSupplier = notActiveExceptionSupplier;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setNotActiveExceptionSupplier
File: hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/DefaultSerializationServiceBuilder.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
setNotActiveExceptionSupplier
|
hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/DefaultSerializationServiceBuilder.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean destroyImmediately(String reason) {
if (DEBUG_SWITCH || DEBUG_CLEANUP) {
Slog.v(TAG_SWITCH, "Removing activity from " + reason + ": token=" + this
+ ", app=" + (hasProcess() ? app.mName : "(null)"));
}
if (isState(DESTROYING, DESTROYED)) {
ProtoLog.v(WM_DEBUG_STATES, "activity %s already destroying, skipping "
+ "request with reason:%s", this, reason);
return false;
}
EventLogTags.writeWmDestroyActivity(mUserId, System.identityHashCode(this),
task.mTaskId, shortComponentName, reason);
boolean removedFromHistory = false;
cleanUp(false /* cleanServices */, false /* setState */);
if (hasProcess()) {
app.removeActivity(this, true /* keepAssociation */);
if (!app.hasActivities()) {
mAtmService.clearHeavyWeightProcessIfEquals(app);
}
boolean skipDestroy = false;
try {
if (DEBUG_SWITCH) Slog.i(TAG_SWITCH, "Destroying: " + this);
mAtmService.getLifecycleManager().scheduleTransaction(app.getThread(), token,
DestroyActivityItem.obtain(finishing, configChangeFlags));
} catch (Exception e) {
// We can just ignore exceptions here... if the process has crashed, our death
// notification will clean things up.
if (finishing) {
removeFromHistory(reason + " exceptionInScheduleDestroy");
removedFromHistory = true;
skipDestroy = true;
}
}
nowVisible = false;
// If the activity is finishing, we need to wait on removing it from the list to give it
// a chance to do its cleanup. During that time it may make calls back with its token
// so we need to be able to find it on the list and so we don't want to remove it from
// the list yet. Otherwise, we can just immediately put it in the destroyed state since
// we are not removing it from the list.
if (finishing && !skipDestroy) {
ProtoLog.v(WM_DEBUG_STATES, "Moving to DESTROYING: %s (destroy requested)", this);
setState(DESTROYING,
"destroyActivityLocked. finishing and not skipping destroy");
mAtmService.mH.postDelayed(mDestroyTimeoutRunnable, DESTROY_TIMEOUT);
} else {
ProtoLog.v(WM_DEBUG_STATES, "Moving to DESTROYED: %s "
+ "(destroy skipped)", this);
setState(DESTROYED,
"destroyActivityLocked. not finishing or skipping destroy");
if (DEBUG_APP) Slog.v(TAG_APP, "Clearing app during destroy for activity " + this);
detachFromProcess();
}
} else {
// Remove this record from the history.
if (finishing) {
removeFromHistory(reason + " hadNoApp");
removedFromHistory = true;
} else {
ProtoLog.v(WM_DEBUG_STATES, "Moving to DESTROYED: %s (no app)", this);
setState(DESTROYED, "destroyActivityLocked. not finishing and had no app");
}
}
configChangeFlags = 0;
return removedFromHistory;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: destroyImmediately
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
|
destroyImmediately
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isCommentUseAudioCaptcha() {
return commentUseAudioCaptcha;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isCommentUseAudioCaptcha
File: src/com/dotmarketing/cms/comment/struts/CommentsForm.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-254",
"CWE-264"
] |
CVE-2016-8600
|
MEDIUM
| 5
|
dotCMS/core
|
isCommentUseAudioCaptcha
|
src/com/dotmarketing/cms/comment/struts/CommentsForm.java
|
cb84b130065c9eed1d1df9e4770ffa5d4bd30569
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void doReadDesign(Element design, DesignContext context) {
Attributes attrs = design.attributes();
if (design.hasAttr(DECLARATIVE_DATA_ITEM_TYPE)) {
String itemType = design.attr(DECLARATIVE_DATA_ITEM_TYPE);
setBeanType(itemType);
}
if (attrs.hasKey("selection-mode")) {
setSelectionMode(DesignAttributeHandler.readAttribute(
"selection-mode", attrs, SelectionMode.class));
}
Attributes attr = design.attributes();
if (attr.hasKey("selection-allowed")) {
setReadOnly(DesignAttributeHandler
.readAttribute("selection-allowed", attr, Boolean.class));
}
if (attrs.hasKey("rows")) {
setHeightByRows(DesignAttributeHandler.readAttribute("rows", attrs,
double.class));
}
readStructure(design, context);
// Read frozen columns after columns are read.
if (attrs.hasKey("frozen-columns")) {
setFrozenColumnCount(DesignAttributeHandler
.readAttribute("frozen-columns", attrs, int.class));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doReadDesign
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
|
doReadDesign
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void cancelPreloadRecentApps() {
int msg = MSG_CANCEL_PRELOAD_RECENT_APPS;
mHandler.removeMessages(msg);
mHandler.sendEmptyMessage(msg);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cancelPreloadRecentApps
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
cancelPreloadRecentApps
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean _checkIfCreatorPropertyBased(AnnotationIntrospector intr,
AnnotatedWithParams creator, BeanPropertyDefinition propDef)
{
// If explicit name, or inject id, property-based
if (((propDef != null) && propDef.isExplicitlyNamed())
|| (intr.findInjectableValue(creator.getParameter(0)) != null)) {
return true;
}
if (propDef != null) {
// One more thing: if implicit name matches property with a getter
// or field, we'll consider it property-based as well
String implName = propDef.getName();
if (implName != null && !implName.isEmpty()) {
if (propDef.couldSerialize()) {
return true;
}
}
}
// in absence of everything else, default to delegating
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _checkIfCreatorPropertyBased
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
|
_checkIfCreatorPropertyBased
|
src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java
|
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
| 0
|
Analyze the following code function for security vulnerabilities
|
public Element toDOM(Document document) {
Element infosElement = document.createElement("KeyRequestInfoCollection");
Element totalElement = document.createElement("total");
totalElement.appendChild(document.createTextNode(Integer.toString(total)));
infosElement.appendChild(totalElement);
for (KeyRequestInfo keyRequestInfo : getEntries()) {
Element infoElement = keyRequestInfo.toDOM(document);
infosElement.appendChild(infoElement);
}
return infosElement;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toDOM
File: base/common/src/main/java/com/netscape/certsrv/key/KeyRequestInfoCollection.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
toDOM
|
base/common/src/main/java/com/netscape/certsrv/key/KeyRequestInfoCollection.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isRootVoiceInteraction(IBinder token) throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isRootVoiceInteraction
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
isRootVoiceInteraction
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void close()
throws IOException
{
compressed = null;
uncompressed = null;
if (in != null) {
in.close();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: close
File: src/main/java/org/xerial/snappy/SnappyInputStream.java
Repository: xerial/snappy-java
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2023-34455
|
HIGH
| 7.5
|
xerial/snappy-java
|
close
|
src/main/java/org/xerial/snappy/SnappyInputStream.java
|
3bf67857fcf70d9eea56eed4af7c925671e8eaea
| 0
|
Analyze the following code function for security vulnerabilities
|
public static final native long getFreeMemory();
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFreeMemory
File: core/java/android/os/Process.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3911
|
HIGH
| 9.3
|
android
|
getFreeMemory
|
core/java/android/os/Process.java
|
2c7008421cb67f5d89f16911bdbe36f6c35311ad
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onKeyguardVisibilityChanged(boolean showing) {
mLockIcon.update();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onKeyguardVisibilityChanged
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
onKeyguardVisibilityChanged
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void waitForNetworkStateUpdate(long procStateSeq) {
final int callingUid = Binder.getCallingUid();
if (DEBUG_NETWORK) {
Slog.d(TAG_NETWORK, "Called from " + callingUid + " to wait for seq: " + procStateSeq);
}
UidRecord record;
synchronized (this) {
record = mActiveUids.get(callingUid);
if (record == null) {
return;
}
}
synchronized (record.networkStateLock) {
if (record.lastDispatchedProcStateSeq < procStateSeq) {
if (DEBUG_NETWORK) {
Slog.d(TAG_NETWORK, "Uid state change for seq no. " + procStateSeq + " is not "
+ "dispatched to NPMS yet, so don't wait. Uid: " + callingUid
+ " lastProcStateSeqDispatchedToObservers: "
+ record.lastDispatchedProcStateSeq);
}
return;
}
if (record.curProcStateSeq > procStateSeq) {
if (DEBUG_NETWORK) {
Slog.d(TAG_NETWORK, "Ignore the wait requests for older seq numbers. Uid: "
+ callingUid + ", curProcStateSeq: " + record.curProcStateSeq
+ ", procStateSeq: " + procStateSeq);
}
return;
}
if (record.lastNetworkUpdatedProcStateSeq >= procStateSeq) {
if (DEBUG_NETWORK) {
Slog.d(TAG_NETWORK, "Network rules have been already updated for seq no. "
+ procStateSeq + ", so no need to wait. Uid: "
+ callingUid + ", lastProcStateSeqWithUpdatedNetworkState: "
+ record.lastNetworkUpdatedProcStateSeq);
}
return;
}
try {
if (DEBUG_NETWORK) {
Slog.d(TAG_NETWORK, "Starting to wait for the network rules update."
+ " Uid: " + callingUid + " procStateSeq: " + procStateSeq);
}
final long startTime = SystemClock.uptimeMillis();
record.waitingForNetwork = true;
record.networkStateLock.wait(mWaitForNetworkTimeoutMs);
record.waitingForNetwork = false;
final long totalTime = SystemClock.uptimeMillis() - startTime;
if (totalTime >= mWaitForNetworkTimeoutMs || DEBUG_NETWORK) {
Slog.w(TAG_NETWORK, "Total time waited for network rules to get updated: "
+ totalTime + ". Uid: " + callingUid + " procStateSeq: "
+ procStateSeq + " UidRec: " + record
+ " validateUidRec: " + mValidateUids.get(callingUid));
}
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: waitForNetworkStateUpdate
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
|
waitForNetworkStateUpdate
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
void finishRelaunching() {
mTaskSupervisor.getActivityMetricsLogger().notifyActivityRelaunched(this);
if (mPendingRelaunchCount > 0) {
mPendingRelaunchCount--;
if (mPendingRelaunchCount == 0 && !isClientVisible()) {
// Don't count if the client won't report drawn.
mRelaunchStartTime = 0;
}
} else {
// Update keyguard flags upon finishing relaunch.
checkKeyguardFlagsChanged();
}
final Task rootTask = getRootTask();
if (rootTask != null && rootTask.shouldSleepOrShutDownActivities()) {
// Activity is always relaunched to either resumed or paused state. If it was
// relaunched while hidden (by keyguard or smth else), it should be stopped.
rootTask.ensureActivitiesVisible(null /* starting */, 0 /* configChanges */,
false /* preserveWindows */);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: finishRelaunching
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
|
finishRelaunching
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
@PostMapping("{postId:\\d+}/likes")
@ApiOperation("Likes a post")
public void like(@PathVariable("postId") Integer postId) {
postService.increaseLike(postId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: like
File: src/main/java/run/halo/app/controller/content/api/PostController.java
Repository: halo-dev/halo
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-19007
|
LOW
| 3.5
|
halo-dev/halo
|
like
|
src/main/java/run/halo/app/controller/content/api/PostController.java
|
d6b3d6cb5d681c7d8d64fd48de6c7c99b696bb8b
| 0
|
Analyze the following code function for security vulnerabilities
|
void join() {
devServerStartFuture.join();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: join
File: flow-server/src/main/java/com/vaadin/flow/server/DevModeHandler.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-36321
|
MEDIUM
| 5
|
vaadin/flow
|
join
|
flow-server/src/main/java/com/vaadin/flow/server/DevModeHandler.java
|
6ae6460ca4f3a9b50bd46fbf49c807fe67718307
| 0
|
Analyze the following code function for security vulnerabilities
|
private XWikiAttachmentStoreInterface resolveXWikiAttachmentStoreInterface(String storeType, XWikiContext xcontext)
{
XWikiAttachmentStoreInterface store = getXWikiAttachmentStoreInterface(storeType);
if (store != null) {
return store;
}
return xcontext.getWiki().getDefaultAttachmentContentStore();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resolveXWikiAttachmentStoreInterface
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
|
resolveXWikiAttachmentStoreInterface
|
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 Object getObject(Object object, long fieldOffset) {
return PlatformDependent0.getObject(object, fieldOffset);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getObject
File: common/src/main/java/io/netty/util/internal/PlatformDependent.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-668",
"CWE-378",
"CWE-379"
] |
CVE-2022-24823
|
LOW
| 1.9
|
netty
|
getObject
|
common/src/main/java/io/netty/util/internal/PlatformDependent.java
|
185f8b2756a36aaa4f973f1a2a025e7d981823f1
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected SecurityService getSecurityService() {
return securityService;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSecurityService
File: modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/impl/IngestServiceImpl.java
Repository: opencast
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2022-29237
|
MEDIUM
| 5.5
|
opencast
|
getSecurityService
|
modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/impl/IngestServiceImpl.java
|
8d5ec1614eed109b812bc27b0c6d3214e456d4e7
| 0
|
Analyze the following code function for security vulnerabilities
|
void setCurrentLaunchCanTurnScreenOn(boolean currentLaunchCanTurnScreenOn) {
mCurrentLaunchCanTurnScreenOn = currentLaunchCanTurnScreenOn;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setCurrentLaunchCanTurnScreenOn
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
|
setCurrentLaunchCanTurnScreenOn
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void delete(Context context, Collection collection) throws SQLException, AuthorizeException, IOException {
log.info(LogHelper.getHeader(context, "delete_collection",
"collection_id=" + collection.getID()));
// remove harvested collections.
HarvestedCollection hc = harvestedCollectionService.find(context, collection);
if (hc != null) {
harvestedCollectionService.delete(context, hc);
}
context.addEvent(new Event(Event.DELETE, Constants.COLLECTION,
collection.getID(), collection.getHandle(), getIdentifiers(context, collection)));
// remove subscriptions - hmm, should this be in Subscription.java?
subscribeService.deleteByCollection(context, collection);
// Remove Template Item
removeTemplateItem(context, collection);
// Remove items
// Remove items
Iterator<Item> items = itemService.findAllByCollection(context, collection);
while (items.hasNext()) {
Item item = items.next();
// items.remove();
if (itemService.isOwningCollection(item, collection)) {
// the collection to be deleted is the owning collection, thus remove
// the item from all collections it belongs to
itemService.delete(context, item);
} else {
// the item was only mapped to this collection, so just remove it
removeItem(context, collection, item);
}
}
// Delete bitstream logo
setLogo(context, collection, null);
Iterator<WorkspaceItem> workspaceItems = workspaceItemService.findByCollection(context, collection).iterator();
while (workspaceItems.hasNext()) {
WorkspaceItem workspaceItem = workspaceItems.next();
workspaceItems.remove();
workspaceItemService.deleteAll(context, workspaceItem);
}
WorkflowServiceFactory.getInstance().getWorkflowService().deleteCollection(context, collection);
WorkflowServiceFactory.getInstance().getWorkflowItemService().deleteByCollection(context, collection);
// get rid of the content count cache if it exists
// Remove any Handle
handleService.unbindHandle(context, collection);
// Remove any workflow roles
collectionRoleService.deleteByCollection(context, collection);
collection.getResourcePolicies().clear();
// Remove default administrators group
Group g = collection.getAdministrators();
if (g != null) {
collection.setAdmins(null);
groupService.delete(context, g);
}
// Remove default submitters group
g = collection.getSubmitters();
if (g != null) {
collection.setSubmitters(null);
groupService.delete(context, g);
}
Iterator<Community> owningCommunities = collection.getCommunities().iterator();
while (owningCommunities.hasNext()) {
Community owningCommunity = owningCommunities.next();
collection.removeCommunity(owningCommunity);
owningCommunity.removeCollection(collection);
}
collectionDAO.delete(context, collection);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: delete
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
|
delete
|
dspace-api/src/main/java/org/dspace/content/CollectionServiceImpl.java
|
277b499a5cd3a4f5eb2370513a1b7e4ec2a6e041
| 0
|
Analyze the following code function for security vulnerabilities
|
private void doPreviousStep(Context context, HttpServletRequest request,
HttpServletResponse response, SubmissionInfo subInfo, SubmissionStepConfig currentStepConfig)
throws ServletException, IOException, SQLException,
AuthorizeException
{
int result = doSaveCurrentState(context, request, response, subInfo, currentStepConfig);
// find current Step number
int currentStepNum;
if (currentStepConfig == null)
{
currentStepNum = -1;
}
else
{
currentStepNum = currentStepConfig.getStepNumber();
}
int currPage=AbstractProcessingStep.getCurrentPage(request);
double currStepAndPage = Double.parseDouble(currentStepNum+"."+currPage);
// default value if we are in workflow
double stepAndPageReached = -1;
if (!subInfo.isInWorkflow())
{
stepAndPageReached = Double.parseDouble(getStepReached(subInfo)+"."+JSPStepManager.getPageReached(subInfo));
}
if (result != AbstractProcessingStep.STATUS_COMPLETE && currStepAndPage != stepAndPageReached)
{
doStep(context, request, response, subInfo, currentStepNum);
}
//Check to see if we are actually just going to a
//previous PAGE within the same step.
int currentPageNum = AbstractProcessingStep.getCurrentPage(request);
boolean foundPrevious = false;
//since there are pages before this one in this current step
//just go backwards one page.
if(currentPageNum > 1)
{
//decrease current page number
AbstractProcessingStep.setCurrentPage(request, currentPageNum-1);
foundPrevious = true;
//send user back to the beginning of same step!
//NOTE: the step should handle going back one page
// in its doPreProcessing() method
setBeginningOfStep(request, true);
doStep(context, request, response, subInfo, currentStepNum);
}
// Since we cannot go back one page,
// check if there is a step before this step.
// If so, go backwards one step
else if (currentStepNum > FIRST_STEP)
{
currentStepConfig = getPreviousVisibleStep(request, subInfo);
if(currentStepConfig != null)
{
currentStepNum = currentStepConfig.getStepNumber();
foundPrevious = true;
}
if(foundPrevious)
{
//flag to JSPStepManager that we are going backwards
//an entire step
request.setAttribute("step.backwards", Boolean.TRUE);
// flag that we are going back to the start of this step (for JSPStepManager class)
setBeginningOfStep(request, true);
doStep(context, request, response, subInfo, currentStepNum);
}
}
//if there is no previous, visible step, throw an error!
if(!foundPrevious)
{
log.error(LogManager
.getHeader(context, "no_previous_visible_step",
"Attempting to go to previous step for step="
+ currentStepNum + "." +
"NO PREVIOUS VISIBLE STEP OR PAGE FOUND!"));
JSPManager.showIntegrityError(request, response);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doPreviousStep
File: dspace-jspui/src/main/java/org/dspace/app/webui/servlet/SubmissionController.java
Repository: DSpace
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-31194
|
HIGH
| 7.2
|
DSpace
|
doPreviousStep
|
dspace-jspui/src/main/java/org/dspace/app/webui/servlet/SubmissionController.java
|
d1dd7d23329ef055069759df15cfa200c8e3
| 0
|
Analyze the following code function for security vulnerabilities
|
public DomNodeList<DomNode> querySelectorAll(final String selectors) {
try {
final BrowserVersion browserVersion = getPage().getWebClient().getBrowserVersion();
final SelectorList selectorList = getSelectorList(selectors, browserVersion);
final List<DomNode> elements = new ArrayList<>();
if (selectorList != null) {
for (final DomElement child : getDomElementDescendants()) {
for (final Selector selector : selectorList) {
if (CssStyleSheet.selects(browserVersion, selector, child, null, true, true)) {
elements.add(child);
break;
}
}
}
}
return new StaticDomNodeList(elements);
}
catch (final IOException e) {
throw new CSSException("Error parsing CSS selectors from '" + selectors + "': " + e.getMessage());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: querySelectorAll
File: src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
Repository: HtmlUnit/htmlunit
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-2798
|
HIGH
| 7.5
|
HtmlUnit/htmlunit
|
querySelectorAll
|
src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
|
940dc7fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public final ContentProviderHolder getContentProvider(
IApplicationThread caller, String name, int userId, boolean stable) {
enforceNotIsolatedCaller("getContentProvider");
if (caller == null) {
String msg = "null IApplicationThread when getting content provider "
+ name;
Slog.w(TAG, msg);
throw new SecurityException(msg);
}
// The incoming user check is now handled in checkContentProviderPermissionLocked() to deal
// with cross-user grant.
return getContentProviderImpl(caller, name, null, stable, userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getContentProvider
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
|
getContentProvider
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
private static String getContentRangeHeader(FileDownloadConnection connection) {
return connection.getResponseHeaderField("Content-Range");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getContentRangeHeader
File: library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java
Repository: lingochamp/FileDownloader
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-11248
|
HIGH
| 7.5
|
lingochamp/FileDownloader
|
getContentRangeHeader
|
library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java
|
b023cc081bbecdd2a9f3549a3ae5c12a9647ed7f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onBiometricAuthenticated(int userId, BiometricSourceType biometricSourceType,
boolean isStrongBiometric) {
if (mLockPatternUtils.isSecure(userId)) {
mLockPatternUtils.getDevicePolicyManager().reportSuccessfulBiometricAttempt(
userId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onBiometricAuthenticated
File: packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21267
|
MEDIUM
| 5.5
|
android
|
onBiometricAuthenticated
|
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
|
d18d8b350756b0e89e051736c1f28744ed31e93a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void doGet(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException {
final String cacheName = ParamUtils.getStringParameter(request, "cacheName", "").trim();
final Optional<Cache<?, ?>> optionalCache = Arrays.stream(CacheFactory.getAllCaches())
.filter(cache -> cacheName.equals(cache.getName()))
.findAny()
.map(cache -> (Cache<?, ?>) cache);
if (!optionalCache.isPresent()) {
request.setAttribute("warningMessage", LocaleUtils.getLocalizedString("system.cache-details.cache_not_found", Collections.singletonList(cacheName)));
}
final boolean secretKey = optionalCache.map(Cache::isKeySecret).orElse(Boolean.FALSE);
final boolean secretValue = optionalCache.map(Cache::isValueSecret).orElse(Boolean.FALSE);
final List<Map.Entry<String, String>> cacheEntries = optionalCache.map(Cache::entrySet)
.map(Collection::stream)
.orElseGet(Stream::empty)
.map(entry -> new AbstractMap.SimpleEntry<>(secretKey ? "************" : entry.getKey().toString(), secretValue ? "************" : entry.getValue().toString()))
.sorted(Comparator.comparing(Map.Entry::getKey))
.collect(Collectors.toList());
// Find what we're searching for
final Search search = new Search(request);
Predicate<Map.Entry<String, String>> predicate = entry -> true;
if (!search.key.isEmpty() && !secretKey) {
predicate = predicate.and(entry -> StringUtils.containsIgnoringCase(entry.getKey(), search.key));
}
if (!search.value.isEmpty() && !secretValue) {
predicate = predicate.and(entry -> StringUtils.containsIgnoringCase(entry.getValue(), search.value));
}
final ListPager<Map.Entry<String, String>> listPager = new ListPager<>(request, response, cacheEntries, predicate, SEARCH_FIELDS);
final String csrf = StringUtils.randomString(16);
CookieUtils.setCookie(request, response, "csrf", csrf, -1);
addSessionFlashes(request, "errorMessage", "warningMessage", "successMessage");
request.setAttribute("csrf", csrf);
request.setAttribute("cacheName", cacheName);
request.setAttribute("listPager", listPager);
request.setAttribute("search", search);
request.getRequestDispatcher("system-cache-details.jsp").forward(request, response);
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2019-20363
- Severity: MEDIUM
- CVSS Score: 4.3
Description: Fix issues identified by CSW
Function: doGet
File: xmppserver/src/main/java/org/jivesoftware/admin/servlet/SystemCacheDetailsServlet.java
Repository: igniterealtime/Openfire
Fixed Code:
@Override
protected void doGet(final HttpServletRequest request, final HttpServletResponse response) throws ServletException, IOException {
final String cacheName = ParamUtils.getStringParameter(request, "cacheName", "").trim();
final Optional<Cache<?, ?>> optionalCache = Arrays.stream(CacheFactory.getAllCaches())
.filter(cache -> cacheName.equals(cache.getName()))
.findAny()
.map(cache -> (Cache<?, ?>) cache);
if (!optionalCache.isPresent()) {
request.setAttribute("warningMessage", LocaleUtils.getLocalizedString("system.cache-details.cache_not_found", Collections.singletonList(StringUtils.escapeHTMLTags(cacheName))));
}
final boolean secretKey = optionalCache.map(Cache::isKeySecret).orElse(Boolean.FALSE);
final boolean secretValue = optionalCache.map(Cache::isValueSecret).orElse(Boolean.FALSE);
final List<Map.Entry<String, String>> cacheEntries = optionalCache.map(Cache::entrySet)
.map(Collection::stream)
.orElseGet(Stream::empty)
.map(entry -> new AbstractMap.SimpleEntry<>(secretKey ? "************" : entry.getKey().toString(), secretValue ? "************" : entry.getValue().toString()))
.sorted(Comparator.comparing(Map.Entry::getKey))
.collect(Collectors.toList());
// Find what we're searching for
final Search search = new Search(request);
Predicate<Map.Entry<String, String>> predicate = entry -> true;
if (!search.key.isEmpty() && !secretKey) {
predicate = predicate.and(entry -> StringUtils.containsIgnoringCase(entry.getKey(), search.key));
}
if (!search.value.isEmpty() && !secretValue) {
predicate = predicate.and(entry -> StringUtils.containsIgnoringCase(entry.getValue(), search.value));
}
final ListPager<Map.Entry<String, String>> listPager = new ListPager<>(request, response, cacheEntries, predicate, SEARCH_FIELDS);
final String csrf = StringUtils.randomString(16);
CookieUtils.setCookie(request, response, "csrf", csrf, -1);
addSessionFlashes(request, "errorMessage", "warningMessage", "successMessage");
request.setAttribute("csrf", csrf);
request.setAttribute("cacheName", cacheName);
request.setAttribute("listPager", listPager);
request.setAttribute("search", search);
request.getRequestDispatcher("system-cache-details.jsp").forward(request, response);
}
|
[
"CWE-79"
] |
CVE-2019-20363
|
MEDIUM
| 4.3
|
igniterealtime/Openfire
|
doGet
|
xmppserver/src/main/java/org/jivesoftware/admin/servlet/SystemCacheDetailsServlet.java
|
b6f758241f3fdd57b48c527a695512f33e26eb74
| 1
|
Analyze the following code function for security vulnerabilities
|
public void updateBlob(@Positive int columnIndex, @Nullable Blob x) throws SQLException {
throw org.postgresql.Driver.notImplemented(this.getClass(), "updateBlob(int,Blob)");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateBlob
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
|
updateBlob
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
public void fireSessionDestroy(VaadinSession vaadinSession) {
final VaadinSession session = vaadinSession;
session.access(() -> {
if (session.getState() == State.CLOSED) {
return;
}
if (session.getState() == State.OPEN) {
closeSession(session);
}
List<UI> uis = new ArrayList<>(session.getUIs());
for (final UI ui : uis) {
ui.accessSynchronously(() -> {
/*
* close() called here for consistency so that it is always
* called before a UI is removed. UI.isClosing() is thus
* always true in UI.detach() and associated detach
* listeners.
*/
if (!ui.isClosing()) {
ui.close();
}
session.removeUI(ui);
});
}
SessionDestroyEvent event = new SessionDestroyEvent(
VaadinService.this, session);
for (SessionDestroyListener listener : sessionDestroyListeners) {
try {
listener.sessionDestroy(event);
} catch (Exception e) {
/*
* for now, use the session error handler; in the future,
* could have an API for using some other handler for
* session init and destroy listeners
*/
session.getErrorHandler().error(new ErrorEvent(e));
}
}
session.setState(State.CLOSED);
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fireSessionDestroy
File: server/src/main/java/com/vaadin/server/VaadinService.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-203"
] |
CVE-2021-31403
|
LOW
| 1.9
|
vaadin/framework
|
fireSessionDestroy
|
server/src/main/java/com/vaadin/server/VaadinService.java
|
d852126ab6f0c43f937239305bd0e9594834fe34
| 0
|
Analyze the following code function for security vulnerabilities
|
@Contract(pure = false)
public static <T> T throw0(Throwable throwable) {
if (throwable == null) throw new NullPointerException();
getUnsafe().throwException(throwable);
throw new RuntimeException();
}
|
Vulnerability Classification:
- CWE: CWE-863
- CVE: CVE-2022-31139
- Severity: MEDIUM
- CVSS Score: 4.3
Description: Fix UnsafeAccess perm checking
Function: throw0
File: api/src/main/java/io/github/karlatemp/unsafeaccessor/Root.java
Repository: Karlatemp/UnsafeAccessor
Fixed Code:
@Contract(pure = false)
public static <T> T throw0(Throwable throwable) {
if (throwable == null) throw new NullPointerException();
Unsafe.getUnsafe0().throwException(throwable);
throw new RuntimeException(throwable);
}
|
[
"CWE-863"
] |
CVE-2022-31139
|
MEDIUM
| 4.3
|
Karlatemp/UnsafeAccessor
|
throw0
|
api/src/main/java/io/github/karlatemp/unsafeaccessor/Root.java
|
4ef83000184e8f13239a1ea2847ee401d81585fd
| 1
|
Analyze the following code function for security vulnerabilities
|
void settingsSecurePutInt(String name, int value) {
Settings.Secure.putInt(mContext.getContentResolver(), name, value);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: settingsSecurePutInt
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
|
settingsSecurePutInt
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@TestApi
@RequiresPermission(Manifest.permission.REVOKE_POST_NOTIFICATIONS_WITHOUT_KILL)
public void revokePostNotificationPermissionWithoutKillForTest(@NonNull String packageName,
int userId) {
try {
mPermissionManager.revokePostNotificationPermissionWithoutKillForTest(packageName,
userId);
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: revokePostNotificationPermissionWithoutKillForTest
File: core/java/android/permission/PermissionManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-281"
] |
CVE-2023-21249
|
MEDIUM
| 5.5
|
android
|
revokePostNotificationPermissionWithoutKillForTest
|
core/java/android/permission/PermissionManager.java
|
c00b7e7dbc1fa30339adef693d02a51254755d7f
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void editDraft(Context launcher, Account account, Message message) {
launch(launcher, account, message, EDIT_DRAFT, null, null, null, null,
null /* extraValues */);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: editDraft
File: src/com/android/mail/compose/ComposeActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2425
|
MEDIUM
| 4.3
|
android
|
editDraft
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
public static BufferedImage getTime15() {
return getImage("time15.png");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTime15
File: src/net/sourceforge/plantuml/version/PSystemVersion.java
Repository: plantuml
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2023-3431
|
MEDIUM
| 5.3
|
plantuml
|
getTime15
|
src/net/sourceforge/plantuml/version/PSystemVersion.java
|
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public long getRequiredStrongAuthTimeout(ComponentName who, int userId, boolean parent) {
if (!mHasFeature) {
return DevicePolicyManager.DEFAULT_STRONG_AUTH_TIMEOUT_MS;
}
Preconditions.checkArgumentNonnegative(userId, "Invalid userId");
final CallerIdentity caller = getCallerIdentity(who);
Preconditions.checkCallAuthorization(hasFullCrossUsersPermission(caller, userId));
if (!mLockPatternUtils.hasSecureLockScreen()) {
// No strong auth timeout on devices not supporting the
// {@link PackageManager#FEATURE_SECURE_LOCK_SCREEN} feature
return 0;
}
synchronized (getLockObject()) {
if (who != null) {
ActiveAdmin admin = getActiveAdminUncheckedLocked(who, userId, parent);
return admin != null ? admin.strongAuthUnlockTimeout : 0;
}
// Return the strictest policy across all participating admins.
List<ActiveAdmin> admins = getActiveAdminsForLockscreenPoliciesLocked(
getProfileParentUserIfRequested(userId, parent));
long strongAuthUnlockTimeout = DevicePolicyManager.DEFAULT_STRONG_AUTH_TIMEOUT_MS;
for (int i = 0; i < admins.size(); i++) {
final long timeout = admins.get(i).strongAuthUnlockTimeout;
if (timeout != 0) { // take only participating admins into account
strongAuthUnlockTimeout = Math.min(timeout, strongAuthUnlockTimeout);
}
}
return Math.max(strongAuthUnlockTimeout, getMinimumStrongAuthTimeoutMs());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRequiredStrongAuthTimeout
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
|
getRequiredStrongAuthTimeout
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
private void onWindowsDrawn(long timestampNs) {
final TransitionInfoSnapshot info = mTaskSupervisor
.getActivityMetricsLogger().notifyWindowsDrawn(this, timestampNs);
final boolean validInfo = info != null;
final int windowsDrawnDelayMs = validInfo ? info.windowsDrawnDelayMs : INVALID_DELAY;
final @WaitResult.LaunchState int launchState =
validInfo ? info.getLaunchState() : WaitResult.LAUNCH_STATE_UNKNOWN;
// The activity may have been requested to be invisible (another activity has been launched)
// so there is no valid info. But if it is the current top activity (e.g. sleeping), the
// invalid state is still reported to make sure the waiting result is notified.
if (validInfo || this == getDisplayArea().topRunningActivity()) {
mTaskSupervisor.reportActivityLaunched(false /* timeout */, this,
windowsDrawnDelayMs, launchState);
}
finishLaunchTickingLocked();
if (task != null) {
task.setHasBeenVisible(true);
}
// Clear indicated launch root task because there's no trampoline activity to expect after
// the windows are drawn.
mLaunchRootTask = null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onWindowsDrawn
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
|
onWindowsDrawn
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
public void use(String resource, XWikiContext context)
{
useResource(resource, context);
// In case a previous call added some parameters, remove them, since the last call for a resource always
// discards previous ones.
getParametersMap(context).remove(resource);
// Register the use of the resource in case the current execution is an asynchronous renderer
getSkinExtensionAsync().use(getName(), resource, null);
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2023-29206
- Severity: MEDIUM
- CVSS Score: 5.4
Description: XWIKI-9119: Refactoring of SkinExtensionPlugin
* Provide some tests
Function: use
File: xwiki-platform-core/xwiki-platform-skin/xwiki-platform-skin-skinx/src/main/java/com/xpn/xwiki/plugin/skinx/AbstractSkinExtensionPlugin.java
Repository: xwiki/xwiki-platform
Fixed Code:
public void use(String resource, XWikiContext context)
{
use(resource, null, context);
}
|
[
"CWE-79"
] |
CVE-2023-29206
|
MEDIUM
| 5.4
|
xwiki/xwiki-platform
|
use
|
xwiki-platform-core/xwiki-platform-skin/xwiki-platform-skin-skinx/src/main/java/com/xpn/xwiki/plugin/skinx/AbstractSkinExtensionPlugin.java
|
fe65bc35d5672dd2505b7ac4ec42aec57d500fbb
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void runTeardown() {
Assert.assertTrue("Error during initialization", messagedInitialization);
Assert.assertTrue("HTTP connection is not allowed", messagedAccessDenied);
}
|
Vulnerability Classification:
- CWE: CWE-862
- CVE: CVE-2019-10648
- Severity: HIGH
- CVSS Score: 7.5
Description: Bug-406: DNS interaction is not blocked by Robocode's security manager + test(s) to verify the fix
Function: runTeardown
File: robocode.tests/src/test/java/net/sf/robocode/test/robots/TestConstructorHttpAttack.java
Repository: robo-code/robocode
Fixed Code:
@Override
protected void runTeardown() {
Assert.assertTrue("Error during initialization", messagedInitialization);
Assert.assertTrue("Socket connection is not allowed", securityExceptionOccurred);
}
|
[
"CWE-862"
] |
CVE-2019-10648
|
HIGH
| 7.5
|
robo-code/robocode
|
runTeardown
|
robocode.tests/src/test/java/net/sf/robocode/test/robots/TestConstructorHttpAttack.java
|
836c84635e982e74f2f2771b2c8640c3a34221bd
| 1
|
Analyze the following code function for security vulnerabilities
|
protected int _countPeriods(String str)
{
int commas = 0;
for (int i = 0, end = str.length(); i < end; ++i) {
int ch = str.charAt(i);
if (ch < '0' || ch > '9') {
if (ch == '.') {
++commas;
} else {
return -1;
}
}
}
return commas;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _countPeriods
File: datetime/src/main/java/com/fasterxml/jackson/datatype/jsr310/deser/InstantDeserializer.java
Repository: FasterXML/jackson-modules-java8
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-1000873
|
MEDIUM
| 4.3
|
FasterXML/jackson-modules-java8
|
_countPeriods
|
datetime/src/main/java/com/fasterxml/jackson/datatype/jsr310/deser/InstantDeserializer.java
|
ba27ce5909dfb49bcaf753ad3e04ecb980010b0b
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
public void setUseInjectedPKIX(boolean value) {
mUseInjectedPKIX = value;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUseInjectedPKIX
File: service/java/com/android/server/wifi/hotspot2/PasspointManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-120"
] |
CVE-2023-21243
|
MEDIUM
| 5.5
|
android
|
setUseInjectedPKIX
|
service/java/com/android/server/wifi/hotspot2/PasspointManager.java
|
5b49b8711efaadadf5052ba85288860c2d7ca7a6
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void setExtras(DocumentReference documentReference, SolrInputDocument solrDocument, Locale locale)
throws XWikiException
{
// We need to support the following types of queries:
// * search for documents matching specific values in multiple XObject properties
// * search for documents matching specific values in attachment meta data
// In order to avoid using joins we have to index the XObjects and the attachments both separately and on the
// document rows in the Solr index. This means we'll have duplicated information but we believe the increase in
// the index size pays off if you take into account the simplified query syntax and the search speed.
// Use the original document to get the objects and the attachments because the translated document is just a
// lightweight document containing just the translated content and title.
XWikiDocument originalDocument = getDocument(documentReference);
// NOTE: To be able to still find translated documents, we need to redundantly index the same objects (including
// comments) and attachments for each translation. If we don`t do this then only the original document will be
// found. That's why we pass the locale of the translated document to the following method calls.
setObjects(solrDocument, locale, originalDocument);
setAttachments(solrDocument, locale, originalDocument);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setExtras
File: xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/internal/metadata/DocumentSolrMetadataExtractor.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-312",
"CWE-200"
] |
CVE-2023-50719
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
setExtras
|
xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/internal/metadata/DocumentSolrMetadataExtractor.java
|
3e5272f2ef0dff06a8f4db10afd1949b2f9e6eea
| 0
|
Analyze the following code function for security vulnerabilities
|
private final int _nextChunkedByte2() throws IOException
{
// two possibilities: either end of buffer (in which case, just load more),
// or end of chunk
if (_inputPtr >= _inputEnd) { // end of buffer, but not necessarily chunk
loadMoreGuaranteed();
if (_chunkLeft > 0) {
int end = _inputPtr + _chunkLeft;
if (end <= _inputEnd) { // all within buffer
_chunkLeft = 0;
_chunkEnd = end;
} else { // stretches beyond
_chunkLeft = (end - _inputEnd);
_chunkEnd = _inputEnd;
}
// either way, got it now
return _inputBuffer[_inputPtr++];
}
}
int len = _decodeChunkLength(CBORConstants.MAJOR_TYPE_TEXT);
// not actually acceptable if we got a split character
if (len < 0) {
_reportInvalidEOF(": chunked Text ends with partial UTF-8 character",
JsonToken.VALUE_STRING);
}
int end = _inputPtr + len;
if (end <= _inputEnd) { // all within buffer
_chunkLeft = 0;
_chunkEnd = end;
} else { // stretches beyond
_chunkLeft = (end - _inputEnd);
_chunkEnd = _inputEnd;
}
// either way, got it now
return _inputBuffer[_inputPtr++];
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _nextChunkedByte2
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
|
_nextChunkedByte2
|
cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
|
de072d314af8f5f269c8abec6930652af67bc8e6
| 0
|
Analyze the following code function for security vulnerabilities
|
private void tryDoUpgrade(String basePath, String jdbcUrl, String user, String password, String driverClass) {
String currentVersion = ZrLogUtil.getCurrentSqlVersion(jdbcUrl, user, password, driverClass);
List<Map.Entry<Integer, List<String>>> sqlList = ZrLogUtil.getExecSqlList(currentVersion, basePath);
if (!sqlList.isEmpty()) {
try {
for (Map.Entry<Integer, List<String>> entry : sqlList) {
Connection connection = ZrLogUtil.getConnection(jdbcUrl, user, password, driverClass);
if (connection != null) {
//执行需要更新的sql脚本
Statement statement = connection.createStatement();
try {
for (String sql : entry.getValue()) {
statement.execute(sql);
}
} catch (Exception e) {
LOGGER.error("execution sql ", e);
//有异常终止升级
return;
} finally {
if (statement != null) {
try {
statement.close();
} catch (SQLException e) {
LOGGER.error(e);
}
}
}
//执行需要转换的数据
try {
UpgradeVersionHandler upgradeVersionHandler = (UpgradeVersionHandler) Class.forName("com.zrlog.web.version.V" + entry.getKey() + "UpgradeVersionHandler").getDeclaredConstructor().newInstance();
try {
upgradeVersionHandler.doUpgrade(connection);
} catch (Exception e) {
LOGGER.error("", e);
return;
}
} catch (ClassNotFoundException | IllegalAccessException | InstantiationException e) {
LOGGER.warn("Try exec upgrade method error, " + e.getMessage());
} finally {
connection.close();
}
}
}
} catch (Exception e) {
LOGGER.error("", e);
}
haveSqlUpdated = true;
}
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2019-16643
- Severity: LOW
- CVSS Score: 3.5
Description: Upgrade jar version & fix #54
Signed-off-by: xiaochun <xchun90@163.com>
Function: tryDoUpgrade
File: web/src/main/java/com/zrlog/web/config/ZrLogConfig.java
Repository: 94fzb/zrlog
Fixed Code:
private void tryDoUpgrade(String basePath, String jdbcUrl, String user, String password, String driverClass) {
String currentVersion = ZrLogUtil.getCurrentSqlVersion(jdbcUrl, user, password, driverClass);
List<Map.Entry<Integer, List<String>>> sqlList = ZrLogUtil.getExecSqlList(currentVersion, basePath);
if (!sqlList.isEmpty()) {
try {
for (Map.Entry<Integer, List<String>> entry : sqlList) {
Connection connection = ZrLogUtil.getConnection(jdbcUrl, user, password, driverClass);
if (connection != null) {
//执行需要更新的sql脚本
Statement statement = connection.createStatement();
try {
for (String sql : entry.getValue()) {
statement.execute(sql);
}
} catch (Exception e) {
LOGGER.error("execution sql ", e);
//有异常终止升级
return;
} finally {
if (statement != null) {
try {
statement.close();
} catch (SQLException e) {
LOGGER.error("",e);
}
}
}
//执行需要转换的数据
try {
UpgradeVersionHandler upgradeVersionHandler = (UpgradeVersionHandler) Class.forName("com.zrlog.web.version.V" + entry.getKey() + "UpgradeVersionHandler").getDeclaredConstructor().newInstance();
try {
upgradeVersionHandler.doUpgrade(connection);
} catch (Exception e) {
LOGGER.error("", e);
return;
}
} catch (ClassNotFoundException | IllegalAccessException | InstantiationException e) {
LOGGER.warn("Try exec upgrade method error, " + e.getMessage());
} finally {
connection.close();
}
}
}
} catch (Exception e) {
LOGGER.error("", e);
}
haveSqlUpdated = true;
}
}
|
[
"CWE-79"
] |
CVE-2019-16643
|
LOW
| 3.5
|
94fzb/zrlog
|
tryDoUpgrade
|
web/src/main/java/com/zrlog/web/config/ZrLogConfig.java
|
4a91c83af669e31a22297c14f089d8911d353fa1
| 1
|
Analyze the following code function for security vulnerabilities
|
public void setBackEndSorting(List<QuerySortOrder> sortOrder) {
setBackEndSorting(sortOrder, true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setBackEndSorting
File: server/src/main/java/com/vaadin/data/provider/DataCommunicator.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2021-33609
|
MEDIUM
| 4
|
vaadin/framework
|
setBackEndSorting
|
server/src/main/java/com/vaadin/data/provider/DataCommunicator.java
|
9a93593d9f3802d2881fc8ad22dbc210d0d1d295
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean getUseTickets() {
return this.useTickets;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUseTickets
File: config/config-api/src/main/java/com/thoughtworks/go/config/materials/perforce/P4MaterialConfig.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-77"
] |
CVE-2021-43286
|
MEDIUM
| 6.5
|
gocd
|
getUseTickets
|
config/config-api/src/main/java/com/thoughtworks/go/config/materials/perforce/P4MaterialConfig.java
|
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
| 0
|
Analyze the following code function for security vulnerabilities
|
private void requestSync(Account account, int userId, int reason, String authority,
Bundle extras) {
// If this is happening in the system process, then call the syncrequest listener
// to make a request back to the SyncManager directly.
// If this is probably a test instance, then call back through the ContentResolver
// which will know which userId to apply based on the Binder id.
if (android.os.Process.myUid() == android.os.Process.SYSTEM_UID
&& mSyncRequestListener != null) {
mSyncRequestListener.onSyncRequest(
new EndPoint(account, authority, userId),
reason,
extras);
} else {
ContentResolver.requestSync(account, authority, extras);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: requestSync
File: services/core/java/com/android/server/content/SyncStorageEngine.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2016-2424
|
HIGH
| 7.1
|
android
|
requestSync
|
services/core/java/com/android/server/content/SyncStorageEngine.java
|
d3383d5bfab296ba3adbc121ff8a7b542bde4afb
| 0
|
Analyze the following code function for security vulnerabilities
|
static short getShort(byte[] b, int off) {
return (short) ((b[off + 1] & 0xFF) + (b[off] << 8));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getShort
File: client/hotrod-client/src/main/java/org/infinispan/client/hotrod/marshall/MarshallerUtil.java
Repository: infinispan
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2017-15089
|
MEDIUM
| 6.5
|
infinispan
|
getShort
|
client/hotrod-client/src/main/java/org/infinispan/client/hotrod/marshall/MarshallerUtil.java
|
efc44b7b0a5dd4f44773808840dd9785cabcf21c
| 0
|
Analyze the following code function for security vulnerabilities
|
public void kexFinished() {
synchronized (connectionSemaphore)
{
flagKexOngoing = false;
connectionSemaphore.notifyAll();
}
}
|
Vulnerability Classification:
- CWE: CWE-354
- CVE: CVE-2023-48795
- Severity: MEDIUM
- CVSS Score: 5.9
Description: Implement kex-strict from OpenSSH
Implement's OpenSSH's mitigation for the Terrapin attack.
Function: kexFinished
File: src/main/java/com/trilead/ssh2/transport/TransportManager.java
Repository: connectbot/sshlib
Fixed Code:
public void kexFinished() {
firstKexFinished = true;
synchronized (connectionSemaphore)
{
flagKexOngoing = false;
connectionSemaphore.notifyAll();
}
}
|
[
"CWE-354"
] |
CVE-2023-48795
|
MEDIUM
| 5.9
|
connectbot/sshlib
|
kexFinished
|
src/main/java/com/trilead/ssh2/transport/TransportManager.java
|
5c8b534f6e97db7ac0e0e579331213aa25c173ab
| 1
|
Analyze the following code function for security vulnerabilities
|
@GetMapping("/resetPwd")
public String resetPwd(ModelMap mmap)
{
SysUser user = getSysUser();
mmap.put("user", userService.selectUserById(user.getUserId()));
return prefix + "/resetPwd";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resetPwd
File: ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java
Repository: yangzongzhuan/RuoYi
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-32065
|
LOW
| 3.5
|
yangzongzhuan/RuoYi
|
resetPwd
|
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java
|
d8b2a9a905fb750fa60e2400238cf4750a77c5e6
| 0
|
Analyze the following code function for security vulnerabilities
|
Builder setRootVoiceInteraction(boolean rootVoiceInteraction) {
mRootVoiceInteraction = rootVoiceInteraction;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setRootVoiceInteraction
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
|
setRootVoiceInteraction
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
private RemoteViews makeStandardTemplateWithCustomContent(RemoteViews customContent) {
if (customContent == null) {
return null; // no custom view; use the default behavior
}
TemplateBindResult result = new TemplateBindResult();
StandardTemplateParams p = mBuilder.mParams.reset()
.viewType(StandardTemplateParams.VIEW_TYPE_NORMAL)
.decorationType(StandardTemplateParams.DECORATION_PARTIAL)
.fillTextsFrom(mBuilder);
RemoteViews remoteViews = mBuilder.applyStandardTemplate(
mBuilder.getBaseLayoutResource(), p, result);
buildCustomContentIntoTemplate(mBuilder.mContext, remoteViews, customContent,
p, result);
return remoteViews;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: makeStandardTemplateWithCustomContent
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
makeStandardTemplateWithCustomContent
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isHeadlessFlagEnabled() {
return DeviceConfig.getBoolean(
NAMESPACE_DEVICE_POLICY_MANAGER,
HEADLESS_FLAG,
DEFAULT_HEADLESS_FLAG);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isHeadlessFlagEnabled
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
|
isHeadlessFlagEnabled
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public JSONArray optJSONArray(String key) {
Object o = opt(key);
return o instanceof JSONArray ? (JSONArray)o : null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: optJSONArray
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
|
optJSONArray
|
src/main/java/org/codehaus/jettison/json/JSONObject.java
|
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.