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 List<Locale> getTranslationLocales() throws XWikiException
{
return this.doc.getTranslationLocales(getXWikiContext());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTranslationLocales
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-648"
] |
CVE-2023-29507
|
HIGH
| 7.2
|
xwiki/xwiki-platform
|
getTranslationLocales
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
|
905cdd7c421dbf8c565557cdc773ab1aa9028f83
| 0
|
Analyze the following code function for security vulnerabilities
|
private SpTemplate getSpTemplateFromDB(String templateName, String tenantDomain,
ServiceProviderTemplateCacheKey templateCacheKey)
throws IdentityApplicationManagementException {
ApplicationTemplateDAO applicationTemplateDAO = ApplicationMgtSystemConfig.getInstance()
.getApplicationTemplateDAO();
SpTemplate spTemplate = applicationTemplateDAO.getApplicationTemplate(templateName, tenantDomain);
if (spTemplate != null) {
if (log.isDebugEnabled()) {
log.debug(String.format("Template with name: %s is taken from database for tenant: %s ",
templateName, tenantDomain));
}
ServiceProviderTemplateCache.getInstance().addToCache(templateCacheKey, spTemplate);
return spTemplate;
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSpTemplateFromDB
File: components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
Repository: wso2/carbon-identity-framework
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-42646
|
MEDIUM
| 6.4
|
wso2/carbon-identity-framework
|
getSpTemplateFromDB
|
components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
|
e9119883ee02a884f3c76c7bbc4022a4f4c58fc0
| 0
|
Analyze the following code function for security vulnerabilities
|
protected final ScheduledFuture<?> schedule(Runnable runnable, long delay, TimeUnit unit) {
return removeCallbacksService.schedule(runnable, delay, unit);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: schedule
File: smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
Repository: igniterealtime/Smack
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2016-10027
|
MEDIUM
| 4.3
|
igniterealtime/Smack
|
schedule
|
smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
|
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
| 0
|
Analyze the following code function for security vulnerabilities
|
public static Element getCanonicalElement(Node node) {
try {
Canonicalizer c14n = Canonicalizer.getInstance(
"http://www.w3.org/TR/2001/REC-xml-c14n-20010315");
byte outputBytes[] = c14n.canonicalizeSubtree(node);
DocumentBuilder documentBuilder =
XMLUtils.getSafeDocumentBuilder(false);
Document doc = documentBuilder.parse(
new ByteArrayInputStream(outputBytes));
Element result = doc.getDocumentElement();
return result;
} catch (Exception e) {
SAMLUtils.debug.error("Response:getCanonicalElement: " +
"Error while performing canonicalization on " +
"the input Node.");
return null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCanonicalElement
File: openam-federation/openam-federation-library/src/main/java/com/sun/identity/saml/common/SAMLUtils.java
Repository: OpenIdentityPlatform/OpenAM
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2023-37471
|
CRITICAL
| 9.8
|
OpenIdentityPlatform/OpenAM
|
getCanonicalElement
|
openam-federation/openam-federation-library/src/main/java/com/sun/identity/saml/common/SAMLUtils.java
|
7c18543d126e8a567b83bb4535631825aaa9d742
| 0
|
Analyze the following code function for security vulnerabilities
|
public void showScreenPinningRequest(int taskId, boolean allowCancel) {
mScreenPinningRequest.showPrompt(taskId, allowCancel);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: showScreenPinningRequest
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
|
showScreenPinningRequest
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void showBootMessage(final CharSequence msg, final boolean always) {
mHandler.post(new Runnable() {
@Override public void run() {
if (mBootMsgDialog == null) {
int theme;
if (mContext.getPackageManager().hasSystemFeature(
PackageManager.FEATURE_WATCH)) {
theme = com.android.internal.R.style.Theme_Micro_Dialog_Alert;
} else if (mContext.getPackageManager().hasSystemFeature(
PackageManager.FEATURE_TELEVISION)) {
theme = com.android.internal.R.style.Theme_Leanback_Dialog_Alert;
} else {
theme = 0;
}
mBootMsgDialog = new ProgressDialog(mContext, theme) {
// This dialog will consume all events coming in to
// it, to avoid it trying to do things too early in boot.
@Override public boolean dispatchKeyEvent(KeyEvent event) {
return true;
}
@Override public boolean dispatchKeyShortcutEvent(KeyEvent event) {
return true;
}
@Override public boolean dispatchTouchEvent(MotionEvent ev) {
return true;
}
@Override public boolean dispatchTrackballEvent(MotionEvent ev) {
return true;
}
@Override public boolean dispatchGenericMotionEvent(MotionEvent ev) {
return true;
}
@Override public boolean dispatchPopulateAccessibilityEvent(
AccessibilityEvent event) {
return true;
}
};
if (mContext.getPackageManager().isUpgrade()) {
mBootMsgDialog.setTitle(R.string.android_upgrading_title);
} else {
mBootMsgDialog.setTitle(R.string.android_start_title);
}
mBootMsgDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
mBootMsgDialog.setIndeterminate(true);
mBootMsgDialog.getWindow().setType(
WindowManager.LayoutParams.TYPE_BOOT_PROGRESS);
mBootMsgDialog.getWindow().addFlags(
WindowManager.LayoutParams.FLAG_DIM_BEHIND
| WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN);
mBootMsgDialog.getWindow().setDimAmount(1);
WindowManager.LayoutParams lp = mBootMsgDialog.getWindow().getAttributes();
lp.screenOrientation = ActivityInfo.SCREEN_ORIENTATION_NOSENSOR;
mBootMsgDialog.getWindow().setAttributes(lp);
mBootMsgDialog.setCancelable(false);
mBootMsgDialog.show();
}
mBootMsgDialog.setMessage(msg);
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: showBootMessage
File: policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-0812
|
MEDIUM
| 6.6
|
android
|
showBootMessage
|
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
|
84669ca8de55d38073a0dcb01074233b0a417541
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setMagnificationCallbacks(MagnificationCallbacks callbacks) {
synchronized (mWindowMap) {
if (mAccessibilityController == null) {
mAccessibilityController = new AccessibilityController(
WindowManagerService.this);
}
mAccessibilityController.setMagnificationCallbacksLocked(callbacks);
if (!mAccessibilityController.hasCallbacksLocked()) {
mAccessibilityController = null;
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setMagnificationCallbacks
File: services/core/java/com/android/server/wm/WindowManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3875
|
HIGH
| 7.2
|
android
|
setMagnificationCallbacks
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getAutosaveKey() {
if (state.mode == Mode.ADD) {
return String.format("autosave:addBlob:%d:%s:%s",
getProject().getId(), state.blobIdent.revision, getNewPath());
} else if (state.mode == Mode.EDIT) {
return String.format("autosave:editBlob:%d:%s:%s:%s",
getProject().getId(), state.blobIdent.revision,
state.blobIdent.path, getProject().getBlob(state.blobIdent, true).getBlobId());
} else {
throw new IllegalStateException();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAutosaveKey
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
|
getAutosaveKey
|
server-core/src/main/java/io/onedev/server/web/page/project/blob/ProjectBlobPage.java
|
0c060153fb97c0288a1917efdb17cc426934dacb
| 0
|
Analyze the following code function for security vulnerabilities
|
protected Object convert(final Object value, final Class targetType) {
Class valueClass = value.getClass();
if (valueClass == targetType) {
return value;
}
if (value instanceof Map) {
if (targetType == Map.class) {
return value;
}
return map2bean((Map) value, targetType);
}
try {
return TypeConverterManager.get().convertType(value, targetType);
}
catch (Exception ex) {
throw new JsonException("Type conversion failed", ex);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: convert
File: jodd-json/src/main/java/jodd/json/MapToBean.java
Repository: oblac/jodd
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2018-21234
|
HIGH
| 7.5
|
oblac/jodd
|
convert
|
jodd-json/src/main/java/jodd/json/MapToBean.java
|
9bffc3913aeb8472c11bb543243004b4b4376f16
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Node getParentNode() {
return doc.getParentNode();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getParentNode
File: HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java
Repository: LoboEvolution
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000540
|
MEDIUM
| 6.8
|
LoboEvolution
|
getParentNode
|
HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java
|
9b75694cedfa4825d4a2330abf2719d470c654cd
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void shareBookmarkUri(int position) {
Bookmark bookmark = (Bookmark) conferences.get(position);
Intent shareIntent = new Intent();
shareIntent.setAction(Intent.ACTION_SEND);
shareIntent.putExtra(Intent.EXTRA_TEXT, "xmpp:" + bookmark.getJid().asBareJid().toEscapedString() + "?join");
shareIntent.setType("text/plain");
try {
startActivity(Intent.createChooser(shareIntent, getText(R.string.share_uri_with)));
} catch (ActivityNotFoundException e) {
Toast.makeText(this, R.string.no_application_to_share_uri, Toast.LENGTH_SHORT).show();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: shareBookmarkUri
File: src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
shareBookmarkUri
|
src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
@Exported
public Collection<View> getViews() {
return viewGroupMixIn.getViews();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getViews
File: core/src/main/java/jenkins/model/Jenkins.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-2065
|
MEDIUM
| 4.3
|
jenkinsci/jenkins
|
getViews
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean transferStartingWindow(@NonNull ActivityRecord fromActivity) {
final WindowState tStartingWindow = fromActivity.mStartingWindow;
if (tStartingWindow != null && fromActivity.mStartingSurface != null) {
if (tStartingWindow.getParent() == null) {
// The window has been detached from the parent, so the window cannot be transfer
// to another activity because it may be in the remove process.
// Don't need to remove the starting window at this point because that will happen
// at #postWindowRemoveCleanupLocked
return false;
}
// In this case, the starting icon has already been displayed, so start
// letting windows get shown immediately without any more transitions.
if (fromActivity.mVisible) {
mDisplayContent.mSkipAppTransitionAnimation = true;
}
ProtoLog.v(WM_DEBUG_STARTING_WINDOW, "Moving existing starting %s"
+ " from %s to %s", tStartingWindow, fromActivity, this);
final long origId = Binder.clearCallingIdentity();
try {
// Link the fixed rotation transform to this activity since we are transferring the
// starting window.
if (fromActivity.hasFixedRotationTransform()) {
mDisplayContent.handleTopActivityLaunchingInDifferentOrientation(this,
false /* checkOpening */);
}
// Transfer the starting window over to the new token.
mStartingData = fromActivity.mStartingData;
mSharedStartingData = fromActivity.mSharedStartingData;
mStartingSurface = fromActivity.mStartingSurface;
startingDisplayed = fromActivity.startingDisplayed;
fromActivity.startingDisplayed = false;
mStartingWindow = tStartingWindow;
reportedVisible = fromActivity.reportedVisible;
fromActivity.mStartingData = null;
fromActivity.mStartingSurface = null;
fromActivity.mStartingWindow = null;
fromActivity.startingMoved = true;
tStartingWindow.mToken = this;
tStartingWindow.mActivityRecord = this;
ProtoLog.v(WM_DEBUG_ADD_REMOVE,
"Removing starting %s from %s", tStartingWindow, fromActivity);
mTransitionController.collect(tStartingWindow);
tStartingWindow.reparent(this, POSITION_TOP);
// Clear the frozen insets state when transferring the existing starting window to
// the next target activity. In case the frozen state from a trampoline activity
// affecting the starting window frame computation to see the window being
// clipped if the rotation change during the transition animation.
tStartingWindow.clearFrozenInsetsState();
// Propagate other interesting state between the tokens. If the old token is
// displayed, we should immediately force the new one to be displayed. If it is
// animating, we need to move that animation to the new one.
if (fromActivity.allDrawn) {
allDrawn = true;
}
if (fromActivity.firstWindowDrawn) {
firstWindowDrawn = true;
}
if (fromActivity.isVisible()) {
setVisible(true);
setVisibleRequested(true);
mVisibleSetFromTransferredStartingWindow = true;
}
setClientVisible(fromActivity.isClientVisible());
if (fromActivity.isAnimating()) {
transferAnimation(fromActivity);
// When transferring an animation, we no longer need to apply an animation to
// the token we transfer the animation over. Thus, set this flag to indicate
// we've transferred the animation.
mUseTransferredAnimation = true;
} else if (mTransitionController.getTransitionPlayer() != null) {
// In the new transit system, just set this every time we transfer the window
mUseTransferredAnimation = true;
}
// Post cleanup after the visibility and animation are transferred.
fromActivity.postWindowRemoveStartingWindowCleanup(tStartingWindow);
fromActivity.mVisibleSetFromTransferredStartingWindow = false;
mWmService.updateFocusedWindowLocked(
UPDATE_FOCUS_WILL_PLACE_SURFACES, true /*updateInputWindows*/);
getDisplayContent().setLayoutNeeded();
mWmService.mWindowPlacerLocked.performSurfacePlacement();
} finally {
Binder.restoreCallingIdentity(origId);
}
return true;
} else if (fromActivity.mStartingData != null) {
// The previous app was getting ready to show a
// starting window, but hasn't yet done so. Steal it!
ProtoLog.v(WM_DEBUG_STARTING_WINDOW,
"Moving pending starting from %s to %s", fromActivity, this);
mStartingData = fromActivity.mStartingData;
mSharedStartingData = fromActivity.mSharedStartingData;
fromActivity.mStartingData = null;
fromActivity.startingMoved = true;
scheduleAddStartingWindow();
return true;
}
// TODO: Transfer thumbnail
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: transferStartingWindow
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
|
transferStartingWindow
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
public XWikiAttachment getAttachment()
{
return this.attachment;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAttachment
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
|
getAttachment
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<IAppTask> getAppTasks(String callingPackage) {
int callingUid = Binder.getCallingUid();
long ident = Binder.clearCallingIdentity();
synchronized(this) {
ArrayList<IAppTask> list = new ArrayList<IAppTask>();
try {
if (localLOGV) Slog.v(TAG, "getAppTasks");
final int N = mRecentTasks.size();
for (int i = 0; i < N; i++) {
TaskRecord tr = mRecentTasks.get(i);
// Skip tasks that do not match the caller. We don't need to verify
// callingPackage, because we are also limiting to callingUid and know
// that will limit to the correct security sandbox.
if (tr.effectiveUid != callingUid) {
continue;
}
Intent intent = tr.getBaseIntent();
if (intent == null ||
!callingPackage.equals(intent.getComponent().getPackageName())) {
continue;
}
ActivityManager.RecentTaskInfo taskInfo =
createRecentTaskInfoFromTaskRecord(tr);
AppTaskImpl taskImpl = new AppTaskImpl(taskInfo.persistentId, callingUid);
list.add(taskImpl);
}
} finally {
Binder.restoreCallingIdentity(ident);
}
return list;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAppTasks
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3833
|
MEDIUM
| 4.3
|
android
|
getAppTasks
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onVideoStateChanged(Call call) {
for (CallsManagerListener listener : mListeners) {
listener.onVideoStateChanged(call);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onVideoStateChanged
File: src/com/android/server/telecom/CallsManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2423
|
MEDIUM
| 6.6
|
android
|
onVideoStateChanged
|
src/com/android/server/telecom/CallsManager.java
|
a06c9a4aef69ae27b951523cf72bf72412bf48fa
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean exists(PageReference reference) throws XWikiException
{
return this.xwiki.exists(reference, getXWikiContext());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: exists
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
|
exists
|
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 int getInboxLayoutResource() {
return R.layout.notification_template_material_inbox;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInboxLayoutResource
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
getInboxLayoutResource
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setErrorStatusCode(int statusCode) {
this.errorStatusCode = new Integer(statusCode);
this.statusCode = statusCode;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setErrorStatusCode
File: src/java/winstone/WinstoneResponse.java
Repository: jenkinsci/winstone
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2011-4344
|
LOW
| 2.6
|
jenkinsci/winstone
|
setErrorStatusCode
|
src/java/winstone/WinstoneResponse.java
|
410ed3001d51c689cf59085b7417466caa2ded7b
| 0
|
Analyze the following code function for security vulnerabilities
|
public ObjectEditPage editObjects(String space, String page)
{
gotoPage(space, page, "edit", "editor=object");
return new ObjectEditPage();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: editObjects
File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2023-35166
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
editObjects
|
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
|
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setContentViewClient(ContentViewClient client) {
if (client == null) {
throw new IllegalArgumentException("The client can't be null.");
}
mContentViewClient = client;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setContentViewClient
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
setContentViewClient
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
public <T> void saveBatch(String table, List<T> entities,
Handler<AsyncResult<ResultSet>> replyHandler) {
client.getConnection(conn -> saveBatch(conn, table, entities, closeAndHandleResult(conn, replyHandler)));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: saveBatch
File: domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
saveBatch
|
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getLength()
{
return this.length;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLength
File: src/main/java/org/cryptacular/CiphertextHeader.java
Repository: vt-middleware/cryptacular
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2020-7226
|
MEDIUM
| 5
|
vt-middleware/cryptacular
|
getLength
|
src/main/java/org/cryptacular/CiphertextHeader.java
|
8c6c7528f1e24c6b71f3e36db0cb8a697256ce25
| 0
|
Analyze the following code function for security vulnerabilities
|
void binderRestoreCallingIdentity(long token) {
Binder.restoreCallingIdentity(token);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: binderRestoreCallingIdentity
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
|
binderRestoreCallingIdentity
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean isPluginPlatform(String platform) {
if (StringUtils.equalsAnyIgnoreCase(platform,
IssuesManagePlatform.Tapd.name(), IssuesManagePlatform.AzureDevops.name(),
IssuesManagePlatform.Zentao.name(), IssuesManagePlatform.Local.name())) {
return false;
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isPluginPlatform
File: test-track/backend/src/main/java/io/metersphere/service/PlatformPluginService.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2022-23544
|
MEDIUM
| 6.1
|
metersphere
|
isPluginPlatform
|
test-track/backend/src/main/java/io/metersphere/service/PlatformPluginService.java
|
d0f95b50737c941b29d507a4cc3545f2dc6ab121
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void startDocument() throws SAXException {
tagQueue = new LinkedList<>();
labelList = new ArrayList<>();
labelType = null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startDocument
File: src/main/java/org/codelibs/fess/util/GsaConfigParser.java
Repository: codelibs/fess
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000822
|
HIGH
| 7.5
|
codelibs/fess
|
startDocument
|
src/main/java/org/codelibs/fess/util/GsaConfigParser.java
|
faa265b8d8f1c71e1bf3229fba5f8cc58a5611b7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public HttpHeaders set(HttpHeaders headers) {
if (headers instanceof DefaultHttpHeaders) {
this.headers.set(((DefaultHttpHeaders) headers).headers);
return this;
} else {
return super.set(headers);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: set
File: codec-http/src/main/java/io/netty/handler/codec/http/DefaultHttpHeaders.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-444"
] |
CVE-2021-43797
|
MEDIUM
| 4.3
|
netty
|
set
|
codec-http/src/main/java/io/netty/handler/codec/http/DefaultHttpHeaders.java
|
07aa6b5938a8b6ed7a6586e066400e2643897323
| 0
|
Analyze the following code function for security vulnerabilities
|
private void executeCallback(AndroidFuture<Boolean> future,
@CallbackExecutor @NonNull Executor executor,
Consumer<Boolean> callback) {
future.whenComplete((result, error) -> executor.execute(() -> {
final long token = Binder.clearCallingIdentity();
try {
if (error != null) {
callback.accept(false);
} else {
callback.accept(result);
}
} finally {
Binder.restoreCallingIdentity(token);
}
}));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: executeCallback
File: core/java/android/app/admin/DevicePolicyManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
executeCallback
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public PropertyType getGlobalPropertyType(String field) {
if(globalPropertyTypes==null)
globalPropertyTypes = buildPropertyTypes(getClass());
return globalPropertyTypes.get(field);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getGlobalPropertyType
File: core/src/main/java/hudson/model/Descriptor.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
getGlobalPropertyType
|
core/src/main/java/hudson/model/Descriptor.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
public void resolvePalette(Context ctx, int rawColor,
boolean isColorized, boolean nightMode) {
if (mPaletteIsForRawColor == rawColor
&& mPaletteIsForColorized == isColorized
&& mPaletteIsForNightMode == nightMode) {
return;
}
mPaletteIsForRawColor = rawColor;
mPaletteIsForColorized = isColorized;
mPaletteIsForNightMode = nightMode;
if (isColorized) {
if (rawColor == COLOR_DEFAULT) {
int[] attrs = {R.attr.colorAccentSecondary};
try (TypedArray ta = obtainDayNightAttributes(ctx, attrs)) {
mBackgroundColor = getColor(ta, 0, Color.WHITE);
}
} else {
mBackgroundColor = rawColor;
}
mProtectionColor = COLOR_INVALID; // filled in at the end
mPrimaryTextColor = ContrastColorUtil.findAlphaToMeetContrast(
ContrastColorUtil.resolvePrimaryColor(ctx, mBackgroundColor, nightMode),
mBackgroundColor, 4.5);
mSecondaryTextColor = ContrastColorUtil.findAlphaToMeetContrast(
ContrastColorUtil.resolveSecondaryColor(ctx, mBackgroundColor, nightMode),
mBackgroundColor, 4.5);
mContrastColor = mPrimaryTextColor;
mPrimaryAccentColor = mPrimaryTextColor;
mSecondaryAccentColor = mSecondaryTextColor;
mTertiaryAccentColor = flattenAlpha(mPrimaryTextColor, mBackgroundColor);
mOnAccentTextColor = mBackgroundColor;
mErrorColor = mPrimaryTextColor;
mRippleAlpha = 0x33;
} else {
int[] attrs = {
R.attr.colorSurface,
R.attr.colorBackgroundFloating,
R.attr.textColorPrimary,
R.attr.textColorSecondary,
R.attr.colorAccent,
R.attr.colorAccentSecondary,
R.attr.colorAccentTertiary,
R.attr.textColorOnAccent,
R.attr.colorError,
R.attr.colorControlHighlight
};
try (TypedArray ta = obtainDayNightAttributes(ctx, attrs)) {
mBackgroundColor = getColor(ta, 0, nightMode ? Color.BLACK : Color.WHITE);
mProtectionColor = getColor(ta, 1, COLOR_INVALID);
mPrimaryTextColor = getColor(ta, 2, COLOR_INVALID);
mSecondaryTextColor = getColor(ta, 3, COLOR_INVALID);
mPrimaryAccentColor = getColor(ta, 4, COLOR_INVALID);
mSecondaryAccentColor = getColor(ta, 5, COLOR_INVALID);
mTertiaryAccentColor = getColor(ta, 6, COLOR_INVALID);
mOnAccentTextColor = getColor(ta, 7, COLOR_INVALID);
mErrorColor = getColor(ta, 8, COLOR_INVALID);
mRippleAlpha = Color.alpha(getColor(ta, 9, 0x33ffffff));
}
mContrastColor = calculateContrastColor(ctx, rawColor, mPrimaryAccentColor,
mBackgroundColor, nightMode);
// make sure every color has a valid value
if (mPrimaryTextColor == COLOR_INVALID) {
mPrimaryTextColor = ContrastColorUtil.resolvePrimaryColor(
ctx, mBackgroundColor, nightMode);
}
if (mSecondaryTextColor == COLOR_INVALID) {
mSecondaryTextColor = ContrastColorUtil.resolveSecondaryColor(
ctx, mBackgroundColor, nightMode);
}
if (mPrimaryAccentColor == COLOR_INVALID) {
mPrimaryAccentColor = mContrastColor;
}
if (mSecondaryAccentColor == COLOR_INVALID) {
mSecondaryAccentColor = mContrastColor;
}
if (mTertiaryAccentColor == COLOR_INVALID) {
mTertiaryAccentColor = mContrastColor;
}
if (mOnAccentTextColor == COLOR_INVALID) {
mOnAccentTextColor = ColorUtils.setAlphaComponent(
ContrastColorUtil.resolvePrimaryColor(
ctx, mTertiaryAccentColor, nightMode), 0xFF);
}
if (mErrorColor == COLOR_INVALID) {
mErrorColor = mPrimaryTextColor;
}
}
// make sure every color has a valid value
if (mProtectionColor == COLOR_INVALID) {
mProtectionColor = ColorUtils.blendARGB(mPrimaryTextColor, mBackgroundColor, 0.8f);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resolvePalette
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
resolvePalette
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
private void makeAppNotRespondingLocked(ProcessRecord app,
String activity, String shortMsg, String longMsg) {
app.notResponding = true;
app.notRespondingReport = generateProcessError(app,
ActivityManager.ProcessErrorStateInfo.NOT_RESPONDING,
activity, shortMsg, longMsg, null);
startAppProblemLocked(app);
app.stopFreezingAllLocked();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: makeAppNotRespondingLocked
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3833
|
MEDIUM
| 4.3
|
android
|
makeAppNotRespondingLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
public static SocketFactory getSocketFactory(Properties info) throws PSQLException {
// Socket factory
String socketFactoryClassName = PGProperty.SOCKET_FACTORY.get(info);
if (socketFactoryClassName == null) {
return SocketFactory.getDefault();
}
try {
return (SocketFactory) ObjectFactory.instantiate(socketFactoryClassName, info, true,
PGProperty.SOCKET_FACTORY_ARG.get(info));
} catch (Exception e) {
throw new PSQLException(
GT.tr("The SocketFactory class provided {0} could not be instantiated.",
socketFactoryClassName),
PSQLState.CONNECTION_FAILURE, e);
}
}
|
Vulnerability Classification:
- CWE: CWE-665
- CVE: CVE-2022-21724
- Severity: HIGH
- CVSS Score: 7.5
Description: Merge pull request from GHSA-v7wg-cpwc-24m4
This ensures arbitrary classes can't be passed instead of
AuthenticationPlugin, SocketFactory, SSLSocketFactory, CallbackHandler, HostnameVerifier
Function: getSocketFactory
File: pgjdbc/src/main/java/org/postgresql/core/SocketFactoryFactory.java
Repository: pgjdbc
Fixed Code:
public static SocketFactory getSocketFactory(Properties info) throws PSQLException {
// Socket factory
String socketFactoryClassName = PGProperty.SOCKET_FACTORY.get(info);
if (socketFactoryClassName == null) {
return SocketFactory.getDefault();
}
try {
return ObjectFactory.instantiate(SocketFactory.class, socketFactoryClassName, info, true,
PGProperty.SOCKET_FACTORY_ARG.get(info));
} catch (Exception e) {
throw new PSQLException(
GT.tr("The SocketFactory class provided {0} could not be instantiated.",
socketFactoryClassName),
PSQLState.CONNECTION_FAILURE, e);
}
}
|
[
"CWE-665"
] |
CVE-2022-21724
|
HIGH
| 7.5
|
pgjdbc
|
getSocketFactory
|
pgjdbc/src/main/java/org/postgresql/core/SocketFactoryFactory.java
|
f4d0ed69c0b3aae8531d83d6af4c57f22312c813
| 1
|
Analyze the following code function for security vulnerabilities
|
public ServerBuilder withRoute(Consumer<? super ServiceBindingBuilder> customizer) {
final ServiceBindingBuilder serviceBindingBuilder = new ServiceBindingBuilder(this);
customizer.accept(serviceBindingBuilder);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: withRoute
File: core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-44487
|
HIGH
| 7.5
|
line/armeria
|
withRoute
|
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
|
df7f85824a62e997b910b5d6194a3335841065fd
| 0
|
Analyze the following code function for security vulnerabilities
|
private native void nativeSelectPopupMenuItems(long nativeContentViewCoreImpl,
long nativeSelectPopupSourceFrame, int[] indices);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nativeSelectPopupMenuItems
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-1021"
] |
CVE-2015-1241
|
MEDIUM
| 4.3
|
chromium
|
nativeSelectPopupMenuItems
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
9d343ad2ea6ec395c377a4efa266057155bfa9c1
| 0
|
Analyze the following code function for security vulnerabilities
|
public PendingIntent getDeleteIntent() {
return mDeleteIntent;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDeleteIntent
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
getDeleteIntent
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
void layoutLetterbox(WindowState winHint) {
mLetterboxUiController.layoutLetterbox(winHint);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: layoutLetterbox
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
|
layoutLetterbox
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
private void saveVoiceMailAndForwardingNumberStage2() {
mForwardingChangeResults = null;
mVoicemailChangeResult = null;
resetForwardingChangeState();
for (int i = 0; i < mNewFwdSettings.length; i++) {
CallForwardInfo fi = mNewFwdSettings[i];
CallForwardInfo fiForReason =
CallForwardInfoUtil.infoForReason(mForwardingReadResults, fi.reason);
final boolean doUpdate = CallForwardInfoUtil.isUpdateRequired(fiForReason, fi);
if (doUpdate) {
if (DBG) log("Setting fwd #: " + i + ": " + fi.toString());
mExpectedChangeResultReasons.add(i);
CallForwardInfoUtil.setCallForwardingOption(mPhone, fi,
mSetOptionComplete.obtainMessage(
EVENT_FORWARDING_CHANGED, fi.reason, 0));
}
}
showDialogIfForeground(VoicemailDialogUtil.VM_FWD_SAVING_DIALOG);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: saveVoiceMailAndForwardingNumberStage2
File: src/com/android/phone/settings/VoicemailSettingsActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-862"
] |
CVE-2023-35665
|
HIGH
| 7.8
|
android
|
saveVoiceMailAndForwardingNumberStage2
|
src/com/android/phone/settings/VoicemailSettingsActivity.java
|
674039e70e1c5bf29b808899ac80c709acc82290
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void _releaseBuffers() throws IOException
{
if (_bufferRecyclable) {
byte[] buf = _inputBuffer;
if (buf != null) {
_inputBuffer = null;
_ioContext.releaseReadIOBuffer(buf);
}
}
_textBuffer.releaseBuffers();
char[] buf = _nameCopyBuffer;
if (buf != null) {
_nameCopyBuffer = null;
_ioContext.releaseNameCopyBuffer(buf);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _releaseBuffers
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
|
_releaseBuffers
|
cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
|
de072d314af8f5f269c8abec6930652af67bc8e6
| 0
|
Analyze the following code function for security vulnerabilities
|
private LengthSolrInputDocument getSolrDocument(EntityReference reference)
throws SolrIndexerException, IllegalArgumentException, ExecutionContextException
{
SolrMetadataExtractor metadataExtractor = getMetadataExtractor(reference.getType());
// If the entity type is supported, use the extractor to get the SolrInputDocuent.
if (metadataExtractor != null) {
return metadataExtractor.getSolrDocument(reference);
}
return null;
}
|
Vulnerability Classification:
- CWE: CWE-312, CWE-200
- CVE: CVE-2023-50719
- Severity: HIGH
- CVSS Score: 7.5
Description: XWIKI-20371: Consider mail obfuscation settings in the Solr indexer
* Introduce a new event GeneralMailConfigurationUpdatedEvent to notify
the indexer when the mail configuration changed.
* Don't index emails when obfuscation is enabled.
* Add a test for the object property metadata extractor.
* Add a migration to clear the index.
* Make sure that indexing is executed with the indexed document in
context.
Function: getSolrDocument
File: xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/internal/DefaultSolrIndexer.java
Repository: xwiki/xwiki-platform
Fixed Code:
private LengthSolrInputDocument getSolrDocument(EntityReference reference)
throws SolrIndexerException, IllegalArgumentException, ExecutionContextException
{
SolrMetadataExtractor metadataExtractor = getMetadataExtractor(reference.getType());
// If the entity type is supported, use the extractor to get the SolrInputDocuent.
if (metadataExtractor != null) {
// Set the document that belongs to the entity reference as context document to ensure that the correct
// settings are loaded for the current document/wiki.
XWikiContext context = this.xWikiContextProvider.get();
try {
XWikiDocument document = context.getWiki().getDocument(reference, context);
return this.documentContextExecutor.call(() -> metadataExtractor.getSolrDocument(reference), document);
} catch (SolrIndexerException | IllegalArgumentException e) {
// Re-throw to avoid wrapping exceptions that are declared in the method signature.
throw e;
} catch (Exception e) {
throw new SolrIndexerException("Error executing the indexer in the context of the document to index",
e);
}
}
return null;
}
|
[
"CWE-312",
"CWE-200"
] |
CVE-2023-50719
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
getSolrDocument
|
xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/internal/DefaultSolrIndexer.java
|
3e5272f2ef0dff06a8f4db10afd1949b2f9e6eea
| 1
|
Analyze the following code function for security vulnerabilities
|
public List<Subscription> getSubscriptions() {
return new ArrayList<>(subscriptions.values());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSubscriptions
File: opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/subscriptions/SubscriptionManager.java
Repository: eclipse/milo
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2022-25897
|
HIGH
| 7.5
|
eclipse/milo
|
getSubscriptions
|
opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/subscriptions/SubscriptionManager.java
|
4534381760d7d9f0bf00cbf6a8449bb0d13c6ce5
| 0
|
Analyze the following code function for security vulnerabilities
|
private void doPreAddApplicationChecks(ServiceProvider serviceProvider, String tenantDomain,
String username) throws IdentityApplicationManagementException {
String appName = serviceProvider.getApplicationName();
if (StringUtils.isBlank(appName)) {
// check for required attributes.
throw buildClientException(INVALID_REQUEST, "Application name cannot be empty.");
}
ApplicationDAO appDAO = ApplicationMgtSystemConfig.getInstance().getApplicationDAO();
if (appDAO.isApplicationExists(appName, tenantDomain)) {
String msg = "An application with name: '" + appName + "' already exists in tenantDomain: " + tenantDomain;
throw new IdentityApplicationRegistrationFailureException(APPLICATION_ALREADY_EXISTS.getCode(), msg);
}
if (ApplicationManagementServiceComponent.getFileBasedSPs().containsKey(appName)) {
String msg = "Application with name: '" + appName + "' already loaded from the file system.";
throw buildClientException(APPLICATION_ALREADY_EXISTS, msg);
}
if (!isRegexValidated(appName)) {
String message = "The Application name: '" + appName + "' is not valid! It is not adhering to the regex: "
+ ApplicationMgtUtil.getSPValidatorRegex();
throw buildClientException(INVALID_REQUEST, message);
}
validateApplicationConfigurations(serviceProvider, tenantDomain, username);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doPreAddApplicationChecks
File: components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
Repository: wso2/carbon-identity-framework
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-42646
|
MEDIUM
| 6.4
|
wso2/carbon-identity-framework
|
doPreAddApplicationChecks
|
components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
|
e9119883ee02a884f3c76c7bbc4022a4f4c58fc0
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void awakenDreams() {
IDreamManager dreamManager = getDreamManager();
if (dreamManager != null) {
try {
dreamManager.awaken();
} catch (RemoteException e) {
// fine, stay asleep then
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: awakenDreams
File: policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-0812
|
MEDIUM
| 6.6
|
android
|
awakenDreams
|
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
|
84669ca8de55d38073a0dcb01074233b0a417541
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void validateAdminAndClientPermission() {
try {
validateAdminAccessForTenant(topicName.getTenant());
} catch (Exception ve) {
try {
checkAuthorization(pulsar(), topicName, clientAppId(), clientAuthData());
} catch (RestException re) {
throw re;
} catch (Exception e) {
// unknown error marked as internal server error
log.warn("Unexpected error while authorizing request. topic={}, role={}. Error: {}",
topicName, clientAppId(), e.getMessage(), e);
throw new RestException(e);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: validateAdminAndClientPermission
File: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
Repository: apache/pulsar
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-41571
|
MEDIUM
| 4
|
apache/pulsar
|
validateAdminAndClientPermission
|
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
|
5b35bb81c31f1bc2ad98c9fde5b39ec68110ca52
| 0
|
Analyze the following code function for security vulnerabilities
|
private void onLaunchTransitionTimeout() {
Log.w(TAG, "Launch transition: Timeout!");
mNotificationPanel.onAffordanceLaunchEnded();
releaseGestureWakeLock();
mNotificationPanel.resetViews();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onLaunchTransitionTimeout
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
|
onLaunchTransitionTimeout
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void visit(ThreadGroup group, int level) {
// Get threads in `group'
int numThreads = group.activeCount();
Thread[] threads = new Thread[numThreads*2];
numThreads = group.enumerate(threads, false);
// Enumerate each thread in `group'
for (int i=0; i<numThreads; i++) {
// Get thread
Thread thread = threads[i];
E.info("Thread: " + thread.isDaemon() + " " + thread);
}
// Get thread subgroups of `group'
int numGroups = group.activeGroupCount();
ThreadGroup[] groups = new ThreadGroup[numGroups*2];
numGroups = group.enumerate(groups, false);
// Recursively visit each subgroup
for (int i=0; i<numGroups; i++) {
visit(groups[i], level+1);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: visit
File: src/main/java/org/lemsml/jlems/io/util/JUtil.java
Repository: LEMS/jLEMS
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-4583
|
HIGH
| 8.8
|
LEMS/jLEMS
|
visit
|
src/main/java/org/lemsml/jlems/io/util/JUtil.java
|
8c224637d7d561076364a9e3c2c375daeaf463dc
| 0
|
Analyze the following code function for security vulnerabilities
|
protected X509KeyManager getX509KeyManager() {
return x509KeyManager;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getX509KeyManager
File: src/main/java/org/conscrypt/SSLParametersImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3840
|
HIGH
| 10
|
android
|
getX509KeyManager
|
src/main/java/org/conscrypt/SSLParametersImpl.java
|
5af5e93463f4333187e7e35f3bd2b846654aa214
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequiresPermission(value = MANAGE_DEVICE_POLICY_CERTIFICATES, conditional = true)
public boolean installKeyPair(@Nullable ComponentName admin, @NonNull PrivateKey privKey,
@NonNull Certificate cert, @NonNull String alias) {
return installKeyPair(admin, privKey, new Certificate[] {cert}, alias, false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: installKeyPair
File: core/java/android/app/admin/DevicePolicyManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
installKeyPair
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getRuleInstanceCount(ComponentName owner) throws RemoteException {
Preconditions.checkNotNull(owner, "Owner is null");
enforceSystemOrSystemUI("getRuleInstanceCount");
return mZenModeHelper.getCurrentInstanceCount(owner);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRuleInstanceCount
File: services/core/java/com/android/server/notification/NotificationManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3884
|
MEDIUM
| 4.3
|
android
|
getRuleInstanceCount
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
private <T> T wrapInTCCLSwitch(Callable<T> callable) {
try {
if (classLoader == null) {
return callable.call();
} else {
final ClassLoader original = Thread.currentThread().getContextClassLoader();
try {
Thread.currentThread().setContextClassLoader(classLoader);
return callable.call();
} finally {
Thread.currentThread().setContextClassLoader(original);
}
}
} catch (Exception e) {
throw new RuntimeException(e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: wrapInTCCLSwitch
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
|
wrapInTCCLSwitch
|
vertx-web/src/main/java/io/vertx/ext/web/handler/impl/StaticHandlerImpl.java
|
57a65dce6f4c5aa5e3ce7288685e7f3447eb8f3b
| 0
|
Analyze the following code function for security vulnerabilities
|
private void visitorPermission(String target, HttpServletRequest request, HttpServletResponse response) throws IOException, InstantiationException {
if (!accessPlugin(target.replace("/plugin", "").replace("/p", ""), request, response)) {
response.sendError(403);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: visitorPermission
File: web/src/main/java/com/zrlog/web/handler/PluginHandler.java
Repository: 94fzb/zrlog
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2020-19005
|
LOW
| 3.5
|
94fzb/zrlog
|
visitorPermission
|
web/src/main/java/com/zrlog/web/handler/PluginHandler.java
|
b2b4415e2e59b6f18b0a62b633e71c96d63c43ba
| 0
|
Analyze the following code function for security vulnerabilities
|
ProcessRecord handleApplicationWtfInner(int callingUid, int callingPid, IBinder app, String tag,
final ApplicationErrorReport.CrashInfo crashInfo) {
final ProcessRecord r = findAppProcess(app, "WTF");
final String processName = app == null ? "system_server"
: (r == null ? "unknown" : r.processName);
EventLog.writeEvent(EventLogTags.AM_WTF, UserHandle.getUserId(callingUid), callingPid,
processName, r == null ? -1 : r.info.flags, tag, crashInfo.exceptionMessage);
StatsLog.write(StatsLog.WTF_OCCURRED, callingUid, tag, processName,
callingPid);
addErrorToDropBox("wtf", r, processName, null, null, tag, null, null, crashInfo);
return r;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleApplicationWtfInner
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
|
handleApplicationWtfInner
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
protected final String _parseString(JsonParser p, DeserializationContext ctxt) throws IOException
{
if (p.hasToken(JsonToken.VALUE_STRING)) {
return p.getText();
}
// 07-Nov-2019, tatu: [databind#2535] Need to support byte[]->Base64 same as `StringDeserializer`
if (p.hasToken(JsonToken.VALUE_EMBEDDED_OBJECT)) {
Object ob = p.getEmbeddedObject();
if (ob instanceof byte[]) {
return ctxt.getBase64Variant().encode((byte[]) ob, false);
}
if (ob == null) {
return null;
}
// otherwise, try conversion using toString()...
return ob.toString();
}
// 29-Jun-2020, tatu: New! "Scalar from Object" (mostly for XML)
if (p.hasToken(JsonToken.START_OBJECT)) {
return ctxt.extractScalarFromObject(p, this, _valueClass);
}
String value = p.getValueAsString();
if (value != null) {
return value;
}
return (String) ctxt.handleUnexpectedToken(String.class, p);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _parseString
File: src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2022-42003
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
_parseString
|
src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java
|
d78d00ee7b5245b93103fef3187f70543d67ca33
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Route.Collection patch(final String path1, final String path2,
final Route.Filter filter) {
return new Route.Collection(
new Route.Definition[]{patch(path1, filter), patch(path2, filter)});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: patch
File: jooby/src/main/java/org/jooby/Jooby.java
Repository: jooby-project/jooby
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-7647
|
MEDIUM
| 5
|
jooby-project/jooby
|
patch
|
jooby/src/main/java/org/jooby/Jooby.java
|
34f526028e6cd0652125baa33936ffb6a8a4a009
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isTopActivityImmersive() throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isTopActivityImmersive
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
isTopActivityImmersive
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
private DependResult calculateConditionResult() {
DependResult conditionResult = DependResult.SUCCESS;
List<SwitchResultVo> switchResultVos = taskParameters.getDependTaskList();
SwitchResultVo switchResultVo = new SwitchResultVo();
switchResultVo.setNextNode(taskParameters.getNextNode());
switchResultVos.add(switchResultVo);
// todo: refactor these calculate code
int finalConditionLocation = switchResultVos.size() - 1;
int i = 0;
for (SwitchResultVo info : switchResultVos) {
log.info("Begin to execute {} condition: {} ", (i + 1), info.getCondition());
if (StringUtils.isEmpty(info.getCondition())) {
finalConditionLocation = i;
break;
}
String content = setTaskParams(info.getCondition().replaceAll("'", "\""), rgex);
log.info("Format condition sentence::{} successfully", content);
Boolean result;
try {
result = SwitchTaskUtils.evaluate(content);
log.info("Execute condition sentence: {} successfully: {}", content, result);
} catch (Exception e) {
log.info("Execute condition sentence: {} failed", content, e);
conditionResult = DependResult.FAILED;
break;
}
if (result) {
finalConditionLocation = i;
break;
}
i++;
}
taskParameters.setDependTaskList(switchResultVos);
taskParameters.setResultConditionLocation(finalConditionLocation);
taskInstance.setSwitchDependency(taskParameters);
if (!isValidSwitchResult(switchResultVos.get(finalConditionLocation))) {
conditionResult = DependResult.FAILED;
log.error("The switch task depend result is invalid, result:{}, switch branch:{}", conditionResult,
finalConditionLocation);
}
log.info("The switch task depend result:{}, switch branch:{}", conditionResult, finalConditionLocation);
return conditionResult;
}
|
Vulnerability Classification:
- CWE: CWE-20
- CVE: CVE-2023-49299
- Severity: HIGH
- CVSS Score: 8.8
Description: fix switch condition
Function: calculateConditionResult
File: dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/task/switchtask/SwitchLogicTask.java
Repository: apache/dolphinscheduler
Fixed Code:
private DependResult calculateConditionResult() {
DependResult conditionResult = DependResult.SUCCESS;
List<SwitchResultVo> switchResultVos = taskParameters.getDependTaskList();
SwitchResultVo switchResultVo = new SwitchResultVo();
switchResultVo.setNextNode(taskParameters.getNextNode());
switchResultVos.add(switchResultVo);
// todo: refactor these calculate code
int finalConditionLocation = switchResultVos.size() - 1;
int i = 0;
Map<String, Property> globalParams = JSONUtils
.toList(processInstance.getGlobalParams(), Property.class)
.stream()
.collect(Collectors.toMap(Property::getProp, Property -> Property));
Map<String, Property> varParams = JSONUtils
.toList(taskInstance.getVarPool(), Property.class)
.stream()
.collect(Collectors.toMap(Property::getProp, Property -> Property));
for (SwitchResultVo info : switchResultVos) {
log.info("Begin to execute {} condition: {} ", (i + 1), info.getCondition());
if (StringUtils.isEmpty(info.getCondition())) {
finalConditionLocation = i;
break;
}
String content =
SwitchTaskUtils.generateContentWithTaskParams(info.getCondition(), globalParams, varParams);
log.info("Format condition sentence::{} successfully", content);
Boolean result;
try {
result = SwitchTaskUtils.evaluate(content);
log.info("Execute condition sentence: {} successfully: {}", content, result);
} catch (Exception e) {
log.info("Execute condition sentence: {} failed", content, e);
conditionResult = DependResult.FAILED;
break;
}
if (result) {
finalConditionLocation = i;
break;
}
i++;
}
taskParameters.setDependTaskList(switchResultVos);
taskParameters.setResultConditionLocation(finalConditionLocation);
taskInstance.setSwitchDependency(taskParameters);
if (!isValidSwitchResult(switchResultVos.get(finalConditionLocation))) {
conditionResult = DependResult.FAILED;
log.error("The switch task depend result is invalid, result:{}, switch branch:{}", conditionResult,
finalConditionLocation);
}
log.info("The switch task depend result:{}, switch branch:{}", conditionResult, finalConditionLocation);
return conditionResult;
}
|
[
"CWE-20"
] |
CVE-2023-49299
|
HIGH
| 8.8
|
apache/dolphinscheduler
|
calculateConditionResult
|
dolphinscheduler-master/src/main/java/org/apache/dolphinscheduler/server/master/runner/task/switchtask/SwitchLogicTask.java
|
d1ef54f6a851e64525f1078887520394e553b6e8
| 1
|
Analyze the following code function for security vulnerabilities
|
private void addCall(Call call) {
Trace.beginSection("addCall");
Log.v(this, "addCall(%s)", call);
call.addListener(this);
mCalls.add(call);
// TODO: Update mForegroundCall prior to invoking
// onCallAdded for calls which immediately take the foreground (like the first call).
for (CallsManagerListener listener : mListeners) {
if (Log.SYSTRACE_DEBUG) {
Trace.beginSection(listener.getClass().toString() + " addCall");
}
listener.onCallAdded(call);
if (Log.SYSTRACE_DEBUG) {
Trace.endSection();
}
}
updateCallsManagerState();
Trace.endSection();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addCall
File: src/com/android/server/telecom/CallsManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2423
|
MEDIUM
| 6.6
|
android
|
addCall
|
src/com/android/server/telecom/CallsManager.java
|
a06c9a4aef69ae27b951523cf72bf72412bf48fa
| 0
|
Analyze the following code function for security vulnerabilities
|
private CompletableFuture<Topic> topicNotFoundReasonAsync(TopicName topicName) {
if (!topicName.isPartitioned()) {
return FutureUtil.failedFuture(new RestException(Status.NOT_FOUND, "Topic not found"));
}
return getPartitionedTopicMetadataAsync(
TopicName.get(topicName.getPartitionedTopicName()), false, false)
.thenApply(partitionedTopicMetadata -> {
if (partitionedTopicMetadata == null || partitionedTopicMetadata.partitions == 0) {
final String topicErrorType = partitionedTopicMetadata
== null ? "has no metadata" : "has zero partitions";
throw new RestException(Status.NOT_FOUND, String.format(
"Partitioned Topic not found: %s %s", topicName.toString(), topicErrorType));
} else if (!internalGetList().contains(topicName.toString())) {
throw new RestException(Status.NOT_FOUND, "Topic partitions were not yet created");
}
throw new RestException(Status.NOT_FOUND, "Partitioned Topic not found");
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: topicNotFoundReasonAsync
File: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
Repository: apache/pulsar
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-41571
|
MEDIUM
| 4
|
apache/pulsar
|
topicNotFoundReasonAsync
|
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
|
5b35bb81c31f1bc2ad98c9fde5b39ec68110ca52
| 0
|
Analyze the following code function for security vulnerabilities
|
private Widget lookupWidgetLocked(int appWidgetId, int uid, String packageName) {
final int N = mWidgets.size();
for (int i = 0; i < N; i++) {
Widget widget = mWidgets.get(i);
if (widget.appWidgetId == appWidgetId
&& mSecurityPolicy.canAccessAppWidget(widget, uid, packageName)) {
return widget;
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: lookupWidgetLocked
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
|
lookupWidgetLocked
|
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
|
0b98d304c467184602b4c6bce76fda0b0274bc07
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override // CommandQueue
public void setSystemUiVisibility(int vis, int fullscreenStackVis, int dockedStackVis,
int mask, Rect fullscreenStackBounds, Rect dockedStackBounds) {
final int oldVal = mSystemUiVisibility;
final int newVal = (oldVal&~mask) | (vis&mask);
final int diff = newVal ^ oldVal;
if (DEBUG) Log.d(TAG, String.format(
"setSystemUiVisibility vis=%s mask=%s oldVal=%s newVal=%s diff=%s",
Integer.toHexString(vis), Integer.toHexString(mask),
Integer.toHexString(oldVal), Integer.toHexString(newVal),
Integer.toHexString(diff)));
boolean sbModeChanged = false;
if (diff != 0) {
mSystemUiVisibility = newVal;
// update low profile
if ((diff & View.SYSTEM_UI_FLAG_LOW_PROFILE) != 0) {
setAreThereNotifications();
}
// ready to unhide
if ((vis & View.STATUS_BAR_UNHIDE) != 0) {
mSystemUiVisibility &= ~View.STATUS_BAR_UNHIDE;
mNoAnimationOnNextBarModeChange = true;
}
// update status bar mode
final int sbMode = computeStatusBarMode(oldVal, newVal);
sbModeChanged = sbMode != -1;
if (sbModeChanged && sbMode != mStatusBarMode) {
if (sbMode != mStatusBarMode) {
mStatusBarMode = sbMode;
checkBarModes();
}
touchAutoHide();
}
if ((vis & View.NAVIGATION_BAR_UNHIDE) != 0) {
mSystemUiVisibility &= ~View.NAVIGATION_BAR_UNHIDE;
}
// send updated sysui visibility to window manager
notifyUiVisibilityChanged(mSystemUiVisibility);
}
mLightBarController.onSystemUiVisibilityChanged(fullscreenStackVis, dockedStackVis,
mask, fullscreenStackBounds, dockedStackBounds, sbModeChanged, mStatusBarMode);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSystemUiVisibility
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
|
setSystemUiVisibility
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getIsEqualsToConditionSQL(String column, Object param) {
if (param == null) {
return getIsNullConditionSQL(column);
} else {
String paramStr = getParameterSQL(param);
return column + " = " + paramStr;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getIsEqualsToConditionSQL
File: dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java
Repository: dashbuilder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-4999
|
HIGH
| 7.5
|
dashbuilder
|
getIsEqualsToConditionSQL
|
dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java
|
8574899e3b6455547b534f570b2330ff772e524b
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setAttributes(List<ProfileAttribute> attributes) {
this.attributes = attributes;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAttributes
File: base/common/src/main/java/com/netscape/certsrv/profile/PolicyDefault.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
setAttributes
|
base/common/src/main/java/com/netscape/certsrv/profile/PolicyDefault.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public void initializeUsageHelper() {
if (mUsageHelper == null) {
mUsageHelper = new PermissionUsageHelper(mContext);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initializeUsageHelper
File: core/java/android/permission/PermissionManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-281"
] |
CVE-2023-21249
|
MEDIUM
| 5.5
|
android
|
initializeUsageHelper
|
core/java/android/permission/PermissionManager.java
|
c00b7e7dbc1fa30339adef693d02a51254755d7f
| 0
|
Analyze the following code function for security vulnerabilities
|
private void cleanUp() {
if (DEBUG_SD_INSTALL) Slog.i(TAG, "cleanUp");
// Destroy secure container
PackageHelper.destroySdDir(cid);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cleanUp
File: services/core/java/com/android/server/pm/PackageManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2016-2497
|
HIGH
| 7.5
|
android
|
cleanUp
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
public InputStream getInputStream(String path, Map<String, ?> queryParams) throws Exception
{
return getInputStream(getBaseURL(), path, queryParams);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInputStream
File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2023-35166
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
getInputStream
|
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
|
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setVersion(String version)
{
if (!StringUtils.isEmpty(version)) {
this.version = new Version(version);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setVersion
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
|
setVersion
|
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
|
private X509Certificate[] cleanupCertChainAndFindTrustAnchors(X509Certificate[] chain,
Set<TrustAnchor> trustAnchors) {
X509Certificate[] original = chain;
// 1. Clean the received certificates chain.
int currIndex;
// Start with the first certificate in the chain, assuming it
// is the leaf certificate (server or client cert).
for (currIndex = 0; currIndex < chain.length; currIndex++) {
// Walk the chain to find a "subject" matching
// the "issuer" of the current certificate. In a properly
// ordered chain this should be the next cert and be fast.
// If not, we reorder things to be as the validator will
// expect.
boolean foundNext = false;
for (int nextIndex = currIndex + 1; nextIndex < chain.length; nextIndex++) {
if (chain[currIndex].getIssuerDN().equals(chain[nextIndex].getSubjectDN())) {
foundNext = true;
// Exchange certificates so that 0 through currIndex + 1 are in proper order
if (nextIndex != currIndex + 1) {
// don't mutuate original chain, which may be directly from an SSLSession
if (chain == original) {
chain = original.clone();
}
X509Certificate tempCertificate = chain[nextIndex];
chain[nextIndex] = chain[currIndex + 1];
chain[currIndex + 1] = tempCertificate;
}
break;
}
}
// If we can't find the next in the chain, just give up
// and use what we found so far. This drops unrelated
// certificates that have nothing to do with the cert
// chain.
if (!foundNext) {
break;
}
}
// 2. Find the trust anchor in the chain, if any
int anchorIndex;
for (anchorIndex = 0; anchorIndex <= currIndex; anchorIndex++) {
// If the current cert is a TrustAnchor, we can ignore the rest of the chain.
// This avoids including "bridge" CA certs that added for legacy compatibility.
TrustAnchor trustAnchor = findTrustAnchorBySubjectAndPublicKey(chain[anchorIndex]);
if (trustAnchor != null) {
trustAnchors.add(trustAnchor);
break;
}
}
// 3. If the chain is now shorter, copy to an appropriately sized array.
int chainLength = anchorIndex;
X509Certificate[] newChain = ((chainLength == chain.length)
? chain
: Arrays.copyOf(chain, chainLength));
// 4. If we didn't find a trust anchor earlier, look for one now
if (trustAnchors.isEmpty()) {
TrustAnchor trustAnchor = findTrustAnchorByIssuerAndSignature(newChain[anchorIndex-1]);
if (trustAnchor != null) {
trustAnchors.add(trustAnchor);
}
}
return newChain;
}
|
Vulnerability Classification:
- CWE: CWE-254, CWE-345
- CVE: CVE-2016-0818
- Severity: MEDIUM
- CVSS Score: 4.3
Description: Cache intermediate CA separately
Intermediate CAs are cached in order to support servers that fail to
sent a complete chain to a root. These certificates should be cached to
support these servers but these certificates must not be trusted as
trust anchors. Store them separately to prevent confusion between
trusted roots and cached intermediates.
(cherry-picked from commit 198aca1fb638a2a98e89fb9f284108ad576d0c3b)
Bug: 26232830
Change-Id: I520f50729b55fc7412c7d133335bc9e3c190bbf6
Function: cleanupCertChainAndFindTrustAnchors
File: src/platform/java/org/conscrypt/TrustManagerImpl.java
Repository: android
Fixed Code:
private X509Certificate[] cleanupCertChainAndFindTrustAnchors(X509Certificate[] chain,
Set<TrustAnchor> trustAnchors) {
X509Certificate[] original = chain;
// 1. Clean the received certificates chain.
int currIndex;
// Start with the first certificate in the chain, assuming it
// is the leaf certificate (server or client cert).
for (currIndex = 0; currIndex < chain.length; currIndex++) {
// Walk the chain to find a "subject" matching
// the "issuer" of the current certificate. In a properly
// ordered chain this should be the next cert and be fast.
// If not, we reorder things to be as the validator will
// expect.
boolean foundNext = false;
for (int nextIndex = currIndex + 1; nextIndex < chain.length; nextIndex++) {
if (chain[currIndex].getIssuerDN().equals(chain[nextIndex].getSubjectDN())) {
foundNext = true;
// Exchange certificates so that 0 through currIndex + 1 are in proper order
if (nextIndex != currIndex + 1) {
// don't mutuate original chain, which may be directly from an SSLSession
if (chain == original) {
chain = original.clone();
}
X509Certificate tempCertificate = chain[nextIndex];
chain[nextIndex] = chain[currIndex + 1];
chain[currIndex + 1] = tempCertificate;
}
break;
}
}
// If we can't find the next in the chain, just give up
// and use what we found so far. This drops unrelated
// certificates that have nothing to do with the cert
// chain.
if (!foundNext) {
break;
}
}
// 2. Add any missing intermediates to the chain
while (true) {
TrustAnchor nextIntermediate =
intermediateIndex.findByIssuerAndSignature(chain[currIndex]);
if (nextIntermediate == null) {
break;
}
// Append intermediate
X509Certificate cert = nextIntermediate.getTrustedCert();
// don't mutate original chain, which may be directly from an SSLSession
if (chain == original) {
chain = original.clone();
}
// Grow the chain if needed
if (currIndex == chain.length - 1) {
chain = Arrays.copyOf(chain, chain.length * 2);
}
chain[currIndex + 1] = cert;
currIndex++;
}
// 3. Find the trust anchor in the chain, if any
int anchorIndex;
for (anchorIndex = 0; anchorIndex <= currIndex; anchorIndex++) {
// If the current cert is a TrustAnchor, we can ignore the rest of the chain.
// This avoids including "bridge" CA certs that added for legacy compatibility.
TrustAnchor trustAnchor = findTrustAnchorBySubjectAndPublicKey(chain[anchorIndex]);
if (trustAnchor != null) {
trustAnchors.add(trustAnchor);
break;
}
}
// 4. If the chain is now shorter, copy to an appropriately sized array.
int chainLength = anchorIndex;
X509Certificate[] newChain = ((chainLength == chain.length)
? chain
: Arrays.copyOf(chain, chainLength));
// 5. If we didn't find a trust anchor earlier, look for one now
if (trustAnchors.isEmpty()) {
TrustAnchor trustAnchor = findTrustAnchorByIssuerAndSignature(newChain[anchorIndex-1]);
if (trustAnchor != null) {
trustAnchors.add(trustAnchor);
}
}
return newChain;
}
|
[
"CWE-254",
"CWE-345"
] |
CVE-2016-0818
|
MEDIUM
| 4.3
|
android
|
cleanupCertChainAndFindTrustAnchors
|
src/platform/java/org/conscrypt/TrustManagerImpl.java
|
c4ab1b959280413fb11bf4fd7f6b4c2ba38bd779
| 1
|
Analyze the following code function for security vulnerabilities
|
private static native @Nullable String nativeGetResourcePackageName(long ptr,
@AnyRes int resid);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nativeGetResourcePackageName
File: core/java/android/content/res/AssetManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-415"
] |
CVE-2023-40103
|
HIGH
| 7.8
|
android
|
nativeGetResourcePackageName
|
core/java/android/content/res/AssetManager.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
private Set<Integer> intArrayToSet(int[] array) {
Set<Integer> set = new ArraySet<>();
for (int item : array) {
set.add(item);
}
return set;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: intArrayToSet
File: core/java/android/app/admin/DevicePolicyManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
intArrayToSet
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
void silence(Call call) {
final String callId = mCallIdMapper.getCallId(call);
if (callId != null && isServiceValid("silence")) {
try {
logOutgoing("silence %s", callId);
mServiceInterface.silence(callId, Log.getExternalSession(TELECOM_ABBREVIATION));
} catch (RemoteException e) {
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: silence
File: src/com/android/server/telecom/ConnectionServiceWrapper.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
silence
|
src/com/android/server/telecom/ConnectionServiceWrapper.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
public void toggleTruncation() {
mIsShowingTruncatedText = !mIsShowingTruncatedText;
updateMaxLines();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toggleTruncation
File: chrome/android/java/src/org/chromium/chrome/browser/WebsiteSettingsPopup.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2015-1261
|
MEDIUM
| 5
|
chromium
|
toggleTruncation
|
chrome/android/java/src/org/chromium/chrome/browser/WebsiteSettingsPopup.java
|
5bf8a2dccf4777c5f065d918d1d9a2bbaa013f9f
| 0
|
Analyze the following code function for security vulnerabilities
|
private String[] populateNonExemptAndExemptFromPolicyApps(String[] packageNames,
Set<String> outputExemptApps) {
Preconditions.checkArgument(outputExemptApps.isEmpty(), "outputExemptApps is not empty");
List<String> exemptAppsList = listPolicyExemptAppsUnchecked();
if (exemptAppsList.isEmpty()) {
return packageNames;
}
// Using a set so contains() is O(1)
Set<String> exemptApps = new HashSet<>(exemptAppsList);
List<String> nonExemptApps = new ArrayList<>(packageNames.length);
for (int i = 0; i < packageNames.length; i++) {
String app = packageNames[i];
if (exemptApps.contains(app)) {
outputExemptApps.add(app);
} else {
nonExemptApps.add(app);
}
}
String[] result = new String[nonExemptApps.size()];
nonExemptApps.toArray(result);
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: populateNonExemptAndExemptFromPolicyApps
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
|
populateNonExemptAndExemptFromPolicyApps
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Path("/job-context")
@Produces(MediaType.APPLICATION_OCTET_STREAM)
@GET
public byte[] getJobContext() {
JobContext context = jobManager.getJobContext(getJobToken(), true);
Map<String, Object> contextMap = new HashMap<>();
contextMap.put("commands", context.getCommands());
contextMap.put("retrieveSource", context.isRetrieveSource());
contextMap.put("cloneDepth", context.getCloneDepth());
contextMap.put("projectName", context.getProjectName());
contextMap.put("cloneInfo", context.getCloneInfo());
contextMap.put("commitHash", context.getCommitId().name());
contextMap.put("collectFiles.includes", context.getCollectFiles().getIncludes());
contextMap.put("collectFiles.excludes", context.getCollectFiles().getExcludes());
return SerializationUtils.serialize((Serializable) contextMap);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getJobContext
File: server-plugin/server-plugin-executor-kubernetes/src/main/java/io/onedev/server/plugin/executor/kubernetes/KubernetesResource.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2021-21243
|
HIGH
| 7.5
|
theonedev/onedev
|
getJobContext
|
server-plugin/server-plugin-executor-kubernetes/src/main/java/io/onedev/server/plugin/executor/kubernetes/KubernetesResource.java
|
9637fc8fa461c5777282a0021c3deb1e7a48f137
| 0
|
Analyze the following code function for security vulnerabilities
|
private BeanReferring handleUnresolvedReference(DeserializationContext ctxt,
SettableBeanProperty prop, PropertyValueBuffer buffer,
UnresolvedForwardReference reference)
throws JsonMappingException
{
BeanReferring referring = new BeanReferring(ctxt, reference,
prop.getType(), buffer, prop);
reference.getRoid().appendReferring(referring);
return referring;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleUnresolvedReference
File: src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializer.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2022-42004
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
handleUnresolvedReference
|
src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializer.java
|
063183589218fec19a9293ed2f17ec53ea80ba88
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setAccessToken(String accessToken) {
for (Authentication auth : authentications.values()) {
if (auth instanceof OAuth) {
((OAuth) auth).setAccessToken(accessToken);
return this;
}
}
throw new RuntimeException("No OAuth2 authentication configured!");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAccessToken
File: samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
setAccessToken
|
samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getUserAgent(){
return userAgent;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserAgent
File: samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
getUserAgent
|
samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean setTime(ComponentName who, long millis) {
Objects.requireNonNull(who, "ComponentName is null");
final CallerIdentity caller = getCallerIdentity(who);
Preconditions.checkCallAuthorization(
isDefaultDeviceOwner(caller) || isProfileOwnerOfOrganizationOwnedDevice(caller));
// Don't allow set time when auto time is on.
if (mInjector.settingsGlobalGetInt(Global.AUTO_TIME, 0) == 1) {
return false;
}
DevicePolicyEventLogger
.createEvent(DevicePolicyEnums.SET_TIME)
.setAdmin(caller.getComponentName())
.write();
mInjector.binderWithCleanCallingIdentity(() -> mInjector.getAlarmManager().setTime(millis));
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setTime
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
|
setTime
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@GuardedBy("this")
final boolean canGcNowLocked() {
for (BroadcastQueue q : mBroadcastQueues) {
if (!q.mParallelBroadcasts.isEmpty() || !q.mDispatcher.isIdle()) {
return false;
}
}
return mAtmInternal.canGcNow();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: canGcNowLocked
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21292
|
MEDIUM
| 5.5
|
android
|
canGcNowLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
private void showAuthStatus() {
if (mAuthStatusView != null) {
if (mAuthStatusIcon == NO_ICON && EMPTY_STRING.equals(mAuthStatusText)) {
mAuthStatusView.setVisibility(View.INVISIBLE);
} else {
mAuthStatusView.setText(mAuthStatusText);
mAuthStatusView.setCompoundDrawablesWithIntrinsicBounds(mAuthStatusIcon, 0, 0, 0);
mAuthStatusView.setVisibility(View.VISIBLE);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: showAuthStatus
File: src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java
Repository: nextcloud/android
The code follows secure coding practices.
|
[
"CWE-248"
] |
CVE-2021-32694
|
MEDIUM
| 4.3
|
nextcloud/android
|
showAuthStatus
|
src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java
|
9343bdd85d70625a90e0c952897957a102c2421b
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String sanitizeString(String raw, boolean allowHTML)
{
if (raw==null || raw.length()==0) {
return raw;
}
Matcher scriptMatcher = scriptPattern.matcher(raw);
String next = scriptMatcher.replaceAll("script");
Matcher imgOnErrorMatcher = imgOnErrorPattern.matcher(next);
next = imgOnErrorMatcher.replaceAll("$1o$2");
if (!allowHTML) {
next = next.replaceAll("<", "<").replaceAll(">", ">").replaceAll("\"", """);
}
return next;
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2016-6555
- Severity: MEDIUM
- CVSS Score: 4.3
Description: Change WebSecurityUtils to use OWASP Java Encoder
Function: sanitizeString
File: core/lib/src/main/java/org/opennms/core/utils/WebSecurityUtils.java
Repository: OpenNMS/opennms
Fixed Code:
public static String sanitizeString(String raw, boolean allowHTML)
{
if (raw==null || raw.length()==0) {
return raw;
}
String next;
if (allowHTML) {
Matcher scriptMatcher = scriptPattern.matcher(raw);
next = scriptMatcher.replaceAll("script");
Matcher imgOnErrorMatcher = imgOnErrorPattern.matcher(next);
next = imgOnErrorMatcher.replaceAll("$1o$2");
} else {
next = Encode.forHtmlContent(raw);
}
return next;
}
|
[
"CWE-79"
] |
CVE-2016-6555
|
MEDIUM
| 4.3
|
OpenNMS/opennms
|
sanitizeString
|
core/lib/src/main/java/org/opennms/core/utils/WebSecurityUtils.java
|
7caadc77be5d0c6a4d0dc78a4ab9ab84a7e1d75b
| 1
|
Analyze the following code function for security vulnerabilities
|
private void disallowAddUser() {
if (!isHeadlessFlagEnabled() || mIsAutomotive) {
// Auto still enables adding users due to the communal nature of those devices
if (mInjector.userManagerIsHeadlessSystemUserMode()) {
Slogf.i(LOG_TAG, "Not setting DISALLOW_ADD_USER on headless system user mode.");
return;
}
}
for (UserInfo userInfo : mUserManager.getUsers()) {
UserHandle userHandle = userInfo.getUserHandle();
if (!mUserManager.hasUserRestriction(UserManager.DISALLOW_ADD_USER, userHandle)) {
mUserManager.setUserRestriction(
UserManager.DISALLOW_ADD_USER, /* value= */ true, userHandle);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: disallowAddUser
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
|
disallowAddUser
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
private int getFalsingThreshold() {
float factor = mStatusBar.isWakeUpComingFromTouch() ? 1.5f : 1.0f;
return (int) (mQsFalsingThreshold * factor);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFalsingThreshold
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
getFalsingThreshold
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setReturnTo(String returnTo) {
try {
this.returnToUrlEncode = Utils.urlEncode(returnTo);
}
catch(UnsupportedEncodingException e) {
throw new OpenIdException(e);
}
this.returnTo = returnTo;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setReturnTo
File: JOpenId/src/org/expressme/openid/OpenIdManager.java
Repository: michaelliao/jopenid
The code follows secure coding practices.
|
[
"CWE-208"
] |
CVE-2010-10006
|
LOW
| 1.4
|
michaelliao/jopenid
|
setReturnTo
|
JOpenId/src/org/expressme/openid/OpenIdManager.java
|
c9baaa976b684637f0d5a50268e91846a7a719ab
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean hasParticipant(User user) {
for( R build = getLastBuild(); build!=null; build=build.getPreviousBuild())
if(build.hasParticipant(user))
return true;
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasParticipant
File: core/src/main/java/hudson/model/AbstractProject.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
hasParticipant
|
core/src/main/java/hudson/model/AbstractProject.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
private void moveAttachment(EntityReference source, AttachmentReference destination, boolean autoRedirect,
XWiki wiki)
{
try {
XWikiDocument sourceDocument = wiki.getDocument(source.getParent(), this.xcontextProvider.get());
XWikiDocument targetDocument = wiki.getDocument(destination.getParent(), this.xcontextProvider.get());
XWikiAttachment sourceAttachment = sourceDocument.getExactAttachment(source.getName());
// Update the author of the source and target documents.
UserReference authorUserReference =
this.documentReferenceUserReferenceResolver.resolve(this.request.getUserReference());
sourceDocument.getAuthors().setEffectiveMetadataAuthor(authorUserReference);
sourceDocument.getAuthors().setOriginalMetadataAuthor(authorUserReference);
targetDocument.getAuthors().setEffectiveMetadataAuthor(authorUserReference);
targetDocument.getAuthors().setOriginalMetadataAuthor(authorUserReference);
// Remove the original attachment and create a new one with the same name.
sourceDocument.removeAttachment(sourceAttachment);
addAttachment(targetDocument, sourceAttachment, destination.getName());
this.attachmentsManager.removeExistingRedirection(destination.getName(), targetDocument);
if (autoRedirect) {
initializeAutoRedirection(source, destination, sourceDocument);
}
if (Objects.equals(source.getParent(), destination.getParent())) {
wiki.saveDocument(sourceDocument,
this.contextualLocalizationManager.getTranslationPlain("attachment.job.saveDocument.inPlace",
source.getName(), destination.getName()),
this.xcontextProvider.get());
} else {
transactionalMove(wiki, sourceDocument, targetDocument, sourceAttachment.getFilename(),
destination.getName());
}
} catch (XWikiException | IOException e) {
this.logger.warn("Failed to move attachment [{}] to [{}]. Cause: [{}]", source, destination,
getRootCauseMessage(e));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: moveAttachment
File: xwiki-platform-core/xwiki-platform-attachment/xwiki-platform-attachment-api/src/main/java/org/xwiki/attachment/internal/refactoring/job/MoveAttachmentJob.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-37910
|
HIGH
| 8.1
|
xwiki/xwiki-platform
|
moveAttachment
|
xwiki-platform-core/xwiki-platform-attachment/xwiki-platform-attachment-api/src/main/java/org/xwiki/attachment/internal/refactoring/job/MoveAttachmentJob.java
|
d7720219d60d7201c696c3196c9d4a86d0881325
| 0
|
Analyze the following code function for security vulnerabilities
|
public void sendValidationEmail(String xwikiname, String password, String email, String addfieldname,
String addfieldvalue, String contentfield, XWikiContext context) throws XWikiException
{
MailSenderConfiguration configuration = Utils.getComponent(MailSenderConfiguration.class);
String sender;
String content;
try {
sender = configuration.getFromAddress();
if (StringUtils.isBlank(sender)) {
String server = context.getRequest().getServerName();
if (server.matches("\\[.*\\]|(\\d{1,3}+\\.){3}+\\d{1,3}+")) {
sender = "noreply@domain.net";
} else {
sender = "noreply@" + server;
}
}
content = getXWikiPreference(contentfield, context);
} catch (Exception e) {
throw new XWikiException(XWikiException.MODULE_XWIKI_EMAIL,
XWikiException.ERROR_XWIKI_EMAIL_CANNOT_GET_VALIDATION_CONFIG,
"Exception while reading the validation email config", e, null);
}
try {
VelocityContext vcontext = (VelocityContext) context.get("vcontext");
vcontext.put(addfieldname, addfieldvalue);
vcontext.put("email", email);
vcontext.put("password", password);
vcontext.put("sender", sender);
vcontext.put("xwikiname", xwikiname);
content = parseContent(content, context);
} catch (Exception e) {
throw new XWikiException(XWikiException.MODULE_XWIKI_EMAIL,
XWikiException.ERROR_XWIKI_EMAIL_CANNOT_PREPARE_VALIDATION_EMAIL,
"Exception while preparing the validation email", e, null);
}
// Let's now send the message
try {
Session session =
Session.getInstance(configuration.getAllProperties(), new XWikiAuthenticator(configuration));
InputStream is = new ByteArrayInputStream(content.getBytes());
MimeMessage message = new MimeMessage(session, is);
message.setFrom(new InternetAddress(sender));
message.setRecipients(Message.RecipientType.TO, email);
message.setHeader("X-MailType", "Account Validation");
MailSender mailSender = Utils.getComponent(MailSender.class);
MailListener mailListener = Utils.getComponent(MailListener.class, "database");
mailSender.sendAsynchronously(Arrays.asList(message), session, mailListener);
mailListener.getMailStatusResult().waitTillProcessed(Long.MAX_VALUE);
String errorMessage = MailStatusResultSerializer.serializeErrors(mailListener.getMailStatusResult());
if (errorMessage != null) {
throw new XWikiException(XWikiException.MODULE_XWIKI_EMAIL,
XWikiException.ERROR_XWIKI_EMAIL_ERROR_SENDING_EMAIL,
String.format("Error while sending the validation email. %s", errorMessage));
}
} catch (Exception e) {
throw new XWikiException(XWikiException.MODULE_XWIKI_EMAIL,
XWikiException.ERROR_XWIKI_EMAIL_ERROR_SENDING_EMAIL, "Error while sending the validation email", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendValidationEmail
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
|
sendValidationEmail
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getAttachmentURL(AttachmentReference attachmentReference, String action, String queryString,
XWikiContext context)
{
DocumentReference documentReference = attachmentReference.getDocumentReference();
SpaceReference spaceReference = documentReference.getLastSpaceReference();
WikiReference wikiReference = spaceReference.getWikiReference();
// We need to serialize the space reference because the old URLFactory has no method to create an Attachment URL
// from an AttachmentReference...
String serializedSpace = getLocalStringEntityReferenceSerializer().serialize(spaceReference);
URL url = context.getURLFactory().createAttachmentURL(attachmentReference.getName(), serializedSpace,
documentReference.getName(), action, queryString, wikiReference.getName(), context);
return context.getURLFactory().getURL(url, context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAttachmentURL
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
|
getAttachmentURL
|
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 parseUnitPlacement(final List<Element> elements) throws GameParseException {
for (final Element current : elements) {
final Territory territory = getTerritory(current, "territory", true);
final UnitType type = getUnitType(current, "unitType", true);
final String ownerString = current.getAttribute("owner");
final String hitsTakenString = current.getAttribute("hitsTaken");
final String unitDamageString = current.getAttribute("unitDamage");
final PlayerId owner;
if (ownerString == null || ownerString.trim().length() == 0) {
owner = PlayerId.NULL_PLAYERID;
} else {
owner = getPlayerId(current, "owner", false);
}
final int hits;
if (hitsTakenString != null && hitsTakenString.trim().length() > 0) {
hits = Integer.parseInt(hitsTakenString);
if (hits < 0 || hits > UnitAttachment.get(type).getHitPoints() - 1) {
throw newGameParseException(
"hitsTaken cannot be less than zero or greater than one less than total hitpPoints");
}
} else {
hits = 0;
}
final int unitDamage;
if (unitDamageString != null && unitDamageString.trim().length() > 0) {
unitDamage = Integer.parseInt(unitDamageString);
if (unitDamage < 0) {
throw newGameParseException("unitDamage cannot be less than zero");
}
} else {
unitDamage = 0;
}
final int quantity = Integer.parseInt(current.getAttribute("quantity"));
territory.getUnits().addAll(type.create(quantity, owner, false, hits, unitDamage));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseUnitPlacement
File: game-core/src/main/java/games/strategy/engine/data/GameParser.java
Repository: triplea-game/triplea
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000546
|
MEDIUM
| 6.8
|
triplea-game/triplea
|
parseUnitPlacement
|
game-core/src/main/java/games/strategy/engine/data/GameParser.java
|
0f23875a4c6e166218859a63c884995f15c53895
| 0
|
Analyze the following code function for security vulnerabilities
|
private static byte[] hmac(final byte[] input, final int offset, final int length)
{
final HMac hmac = new HMac(new SHA256Digest());
final byte[] output = new byte[HMAC_SIZE];
hmac.update(input, offset, length);
hmac.doFinal(output, 0);
return output;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hmac
File: src/main/java/org/cryptacular/CiphertextHeaderV2.java
Repository: vt-middleware/cryptacular
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2020-7226
|
MEDIUM
| 5
|
vt-middleware/cryptacular
|
hmac
|
src/main/java/org/cryptacular/CiphertextHeaderV2.java
|
00395c232cdc62d4292ce27999c026fc1f076b1d
| 0
|
Analyze the following code function for security vulnerabilities
|
int getUid() {
return info.applicationInfo.uid;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUid
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
|
getUid
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequiresPermission(MANAGE_FINGERPRINT)
public long preEnroll() {
long result = 0;
if (mService != null) try {
result = mService.preEnroll(mToken);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: preEnroll
File: core/java/android/hardware/fingerprint/FingerprintManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
preEnroll
|
core/java/android/hardware/fingerprint/FingerprintManager.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
public Connection connect() {
try {
Class.forName("org.postgresql.Driver");
} catch (ClassNotFoundException e) {
System.out.println("Driver not found");
System.exit(0);
}
System.out.println("PostgreSQL driver registered.");
Connection dbConn = null;
try {
dbConn = DriverManager.getConnection(DBNAME, USERNAME, PASSWORD);
} catch (SQLException e) {
e.printStackTrace();
}
if (dbConn != null) {
System.out.println("Connected to database successfully.");
} else {
System.out.println("Database connection failed.");
}
return dbConn;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: connect
File: src/Model.java
Repository: ChrisMcMStone/gmail-servlet
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2014-125075
|
MEDIUM
| 5.2
|
ChrisMcMStone/gmail-servlet
|
connect
|
src/Model.java
|
5d72753c2e95bb373aa86824939397dc25f679ea
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void draw(Canvas canvas) {
canvas.drawColor(mColor, PorterDuff.Mode.SRC);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: draw
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
|
draw
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
private RuntimeException getCause(Throwable exception) {
if (exception instanceof CompletionException) {
return getCause(exception.getCause());
} else if (exception instanceof RuntimeException) {
return (RuntimeException) exception;
} else {
return new IllegalStateException(exception);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCause
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
|
getCause
|
flow-server/src/main/java/com/vaadin/flow/server/DevModeHandler.java
|
6ae6460ca4f3a9b50bd46fbf49c807fe67718307
| 0
|
Analyze the following code function for security vulnerabilities
|
public void stopFreezingAllLocked() {
int i = activities.size();
while (i > 0) {
i--;
activities.get(i).stopFreezingScreenLocked(true);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: stopFreezingAllLocked
File: services/core/java/com/android/server/am/ProcessRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2500
|
MEDIUM
| 4.3
|
android
|
stopFreezingAllLocked
|
services/core/java/com/android/server/am/ProcessRecord.java
|
9878bb99b77c3681f0fda116e2964bac26f349c3
| 0
|
Analyze the following code function for security vulnerabilities
|
private Schema loadSchema(Resource[] resources, String schemaLanguage) throws IOException, SAXException {
if (logger.isDebugEnabled()) {
logger.debug("Setting validation schema to " +
StringUtils.arrayToCommaDelimitedString(this.schemaResources));
}
Assert.notEmpty(resources, "No resources given");
Assert.hasLength(schemaLanguage, "No schema language provided");
Source[] schemaSources = new Source[resources.length];
XMLReader xmlReader = XMLReaderFactory.createXMLReader();
xmlReader.setFeature("http://xml.org/sax/features/namespace-prefixes", true);
for (int i = 0; i < resources.length; i++) {
Assert.notNull(resources[i], "Resource is null");
Assert.isTrue(resources[i].exists(), "Resource " + resources[i] + " does not exist");
InputSource inputSource = SaxResourceUtils.createInputSource(resources[i]);
schemaSources[i] = new SAXSource(xmlReader, inputSource);
}
SchemaFactory schemaFactory = SchemaFactory.newInstance(schemaLanguage);
if (this.schemaResourceResolver != null) {
schemaFactory.setResourceResolver(this.schemaResourceResolver);
}
return schemaFactory.newSchema(schemaSources);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: loadSchema
File: spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java
Repository: spring-projects/spring-framework
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-4152
|
MEDIUM
| 6.8
|
spring-projects/spring-framework
|
loadSchema
|
spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java
|
2843b7d2ee12e3f9c458f6f816befd21b402e3b9
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String getRefreshTokenCookie(String refreshToken, String tokenCookieVal, String accessToken)
{
return refreshToken;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRefreshTokenCookie
File: src/main/java/com/mxgraph/online/AbsAuthServlet.java
Repository: jgraph/drawio
The code follows secure coding practices.
|
[
"CWE-601",
"CWE-918"
] |
CVE-2022-1767
|
MEDIUM
| 5
|
jgraph/drawio
|
getRefreshTokenCookie
|
src/main/java/com/mxgraph/online/AbsAuthServlet.java
|
c63f3a04450f30798df47f9badbc74eb8a69fbdf
| 0
|
Analyze the following code function for security vulnerabilities
|
@DeviceOwnerType
private int getDeviceOwnerTypeLocked(String packageName) {
return mOwners.getDeviceOwnerType(packageName);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDeviceOwnerTypeLocked
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
|
getDeviceOwnerTypeLocked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isProvisioningAllowed(String action, String packageName) {
Objects.requireNonNull(packageName);
final CallerIdentity caller = getCallerIdentity();
final long ident = mInjector.binderClearCallingIdentity();
try {
final List<String> callerUidPackageNames = Arrays.asList(
mInjector.getPackageManager().getPackagesForUid(caller.getUid()));
Preconditions.checkArgument(callerUidPackageNames.contains(packageName),
"Caller uid doesn't match the one for the provided package.");
} finally {
mInjector.binderRestoreCallingIdentity(ident);
}
return checkProvisioningPreconditionSkipPermission(action, packageName) == STATUS_OK;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isProvisioningAllowed
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
|
isProvisioningAllowed
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isAsyncStarted() {
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isAsyncStarted
File: h2/src/test/org/h2/test/server/TestWeb.java
Repository: h2database
The code follows secure coding practices.
|
[
"CWE-312"
] |
CVE-2022-45868
|
HIGH
| 7.8
|
h2database
|
isAsyncStarted
|
h2/src/test/org/h2/test/server/TestWeb.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setNonce(long nonce) {
n = nonce;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setNonce
File: src/main/java/com/southernstorm/noise/protocol/ChaChaPolyCipherState.java
Repository: rweather/noise-java
The code follows secure coding practices.
|
[
"CWE-125",
"CWE-787"
] |
CVE-2020-25021
|
HIGH
| 7.5
|
rweather/noise-java
|
setNonce
|
src/main/java/com/southernstorm/noise/protocol/ChaChaPolyCipherState.java
|
18e86b6f8bea7326934109aa9ffa705ebf4bde90
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.