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 int getLockTaskModeState() throws RemoteException;
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLockTaskModeState File: core/java/android/app/IActivityManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
getLockTaskModeState
core/java/android/app/IActivityManager.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
public boolean isGRPCSSLEnabled() { return Boolean.parseBoolean(getProperty(TS_ENABLE_GRPC_SSL, "false")); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isGRPCSSLEnabled File: frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java Repository: pytorch/serve The code follows secure coding practices.
[ "CWE-918" ]
CVE-2023-43654
CRITICAL
9.8
pytorch/serve
isGRPCSSLEnabled
frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java
391bdec3348e30de173fbb7c7277970e0b53c8ad
0
Analyze the following code function for security vulnerabilities
@Override public String getCipherSuite() { synchronized (OpenSslEngine.this) { if (cipher == null) { return INVALID_CIPHER; } return cipher; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCipherSuite File: handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java Repository: netty The code follows secure coding practices.
[ "CWE-835" ]
CVE-2016-4970
HIGH
7.8
netty
getCipherSuite
handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java
bc8291c80912a39fbd2303e18476d15751af0bf1
0
Analyze the following code function for security vulnerabilities
public final void showSafeModeOverlay() { View v = LayoutInflater.from(mContext).inflate( com.android.internal.R.layout.safe_mode, null); WindowManager.LayoutParams lp = new WindowManager.LayoutParams(); lp.type = WindowManager.LayoutParams.TYPE_SECURE_SYSTEM_OVERLAY; lp.width = WindowManager.LayoutParams.WRAP_CONTENT; lp.height = WindowManager.LayoutParams.WRAP_CONTENT; lp.gravity = Gravity.BOTTOM | Gravity.START; lp.format = v.getBackground().getOpacity(); lp.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE | WindowManager.LayoutParams.FLAG_NOT_TOUCHABLE; lp.privateFlags |= WindowManager.LayoutParams.SYSTEM_FLAG_SHOW_FOR_ALL_USERS; ((WindowManager)mContext.getSystemService( Context.WINDOW_SERVICE)).addView(v, lp); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: showSafeModeOverlay 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
showSafeModeOverlay
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
public static final native void sendSignal(int pid, int signal);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sendSignal File: core/java/android/os/Process.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3911
HIGH
9.3
android
sendSignal
core/java/android/os/Process.java
2c7008421cb67f5d89f16911bdbe36f6c35311ad
0
Analyze the following code function for security vulnerabilities
public Patient getPatient() { return patient; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPatient File: api/src/main/java/org/openmrs/module/appointmentscheduling/AppointmentRequest.java Repository: openmrs/openmrs-module-appointmentscheduling The code follows secure coding practices.
[ "CWE-79" ]
CVE-2022-4727
MEDIUM
6.1
openmrs/openmrs-module-appointmentscheduling
getPatient
api/src/main/java/org/openmrs/module/appointmentscheduling/AppointmentRequest.java
2ccbe39c020809765de41eeb8ee4c70b5ec49cc8
0
Analyze the following code function for security vulnerabilities
private void removeContentProviderExternalUnchecked(String name, IBinder token, int userId) { synchronized (this) { ContentProviderRecord cpr = mProviderMap.getProviderByName(name, userId); if(cpr == null) { //remove from mProvidersByClass if(localLOGV) Slog.v(TAG, name+" content provider not found in providers list"); return; } //update content provider record entry info ComponentName comp = new ComponentName(cpr.info.packageName, cpr.info.name); ContentProviderRecord localCpr = mProviderMap.getProviderByClass(comp, userId); if (localCpr.hasExternalProcessHandles()) { if (localCpr.removeExternalProcessHandleLocked(token)) { updateOomAdjLocked(); } else { Slog.e(TAG, "Attmpt to remove content provider " + localCpr + " with no external reference for token: " + token + "."); } } else { Slog.e(TAG, "Attmpt to remove content provider: " + localCpr + " with no external references."); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeContentProviderExternalUnchecked 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
removeContentProviderExternalUnchecked
services/core/java/com/android/server/am/ActivityManagerService.java
aaa0fee0d7a8da347a0c47cef5249c70efee209e
0
Analyze the following code function for security vulnerabilities
public String[] getMessages(String[] keys) { String[] retval = new String[keys.length]; for (int i = 0; i < keys.length; i++) { retval[i] = getMessage(keys[i]); } return retval; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getMessages File: java/code/src/com/redhat/rhn/common/localization/LocalizationService.java Repository: spacewalkproject/spacewalk The code follows secure coding practices.
[ "CWE-79" ]
CVE-2016-3079
MEDIUM
4.3
spacewalkproject/spacewalk
getMessages
java/code/src/com/redhat/rhn/common/localization/LocalizationService.java
7b9ff9ad
0
Analyze the following code function for security vulnerabilities
private ParseGroovyFromString getParseGroovyFromString() { if (this.parseGroovyFromString == null) { this.parseGroovyFromString = Utils.getComponent(ParseGroovyFromString.class); } return this.parseGroovyFromString; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getParseGroovyFromString 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
getParseGroovyFromString
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 void recalculateColumnWidths() { getRpcProxy(GridClientRpc.class).recalculateColumnWidths(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: recalculateColumnWidths File: server/src/main/java/com/vaadin/ui/Grid.java Repository: vaadin/framework The code follows secure coding practices.
[ "CWE-79" ]
CVE-2019-25028
MEDIUM
4.3
vaadin/framework
recalculateColumnWidths
server/src/main/java/com/vaadin/ui/Grid.java
c40bed109c3723b38694ed160ea647fef5b28593
0
Analyze the following code function for security vulnerabilities
public long[] getProcessPss(int[] pids) throws RemoteException;
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getProcessPss File: core/java/android/app/IActivityManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
getProcessPss
core/java/android/app/IActivityManager.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
private static Node migrateProjectDependency(Element projectDependencyElement) { List<NodeTuple> tuples = new ArrayList<>(); tuples.add(new NodeTuple( new ScalarNode(Tag.STR, "projectName"), new ScalarNode(Tag.STR, projectDependencyElement.elementText("projectName").trim()))); tuples.add(new NodeTuple( new ScalarNode(Tag.STR, "buildNumber"), new ScalarNode(Tag.STR, projectDependencyElement.elementText("buildNumber").trim()))); tuples.add(new NodeTuple( new ScalarNode(Tag.STR, "artifacts"), new ScalarNode(Tag.STR, projectDependencyElement.elementText("artifacts").trim()))); Element authenticationElement = projectDependencyElement.element("authentication"); if (authenticationElement != null) { List<NodeTuple> authenticationTuples = new ArrayList<>(); authenticationTuples.add(new NodeTuple( new ScalarNode(Tag.STR, "userName"), new ScalarNode(Tag.STR, authenticationElement.elementText("userName").trim()))); authenticationTuples.add(new NodeTuple( new ScalarNode(Tag.STR, "passwordSecret"), new ScalarNode(Tag.STR, authenticationElement.elementText("passwordSecret").trim()))); tuples.add(new NodeTuple( new ScalarNode(Tag.STR, "authentication"), new MappingNode(Tag.MAP, authenticationTuples, FlowStyle.BLOCK))); } return new MappingNode(Tag.MAP, tuples, FlowStyle.BLOCK); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: migrateProjectDependency File: server-core/src/main/java/io/onedev/server/migration/XmlBuildSpecMigrator.java Repository: theonedev/onedev The code follows secure coding practices.
[ "CWE-538" ]
CVE-2021-21250
MEDIUM
4
theonedev/onedev
migrateProjectDependency
server-core/src/main/java/io/onedev/server/migration/XmlBuildSpecMigrator.java
9196fd795e87dab069b4260a3590a0ea886e770f
0
Analyze the following code function for security vulnerabilities
public int getFace(Object nativeFont) { if (nativeFont == null) { return Font.FACE_SYSTEM; } return ((NativeFont) nativeFont).face; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getFace File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java Repository: codenameone/CodenameOne The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-4903
MEDIUM
5.1
codenameone/CodenameOne
getFace
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
private void handleOverrideConfig() throws CommandException { final String config = getNextArgRequired(); Slog.i(TAG, "cmd: handleOverrideConfig: " + config); synchronized (mLock) { if (!updateConfigurationLocked(config)) { throw new CommandException("override-config failed. See logcat for details."); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handleOverrideConfig File: services/core/java/com/android/server/pm/ShortcutService.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40079
HIGH
7.8
android
handleOverrideConfig
services/core/java/com/android/server/pm/ShortcutService.java
96e0524c48c6e58af7d15a2caf35082186fc8de2
0
Analyze the following code function for security vulnerabilities
@Override public ComponentName getActivityName(IBinder activityToken) { synchronized (mGlobalLock) { final ActivityRecord r = ActivityRecord.isInRootTaskLocked(activityToken); return r != null ? r.intent.getComponent() : null; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getActivityName File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40094
HIGH
7.8
android
getActivityName
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
1120bc7e511710b1b774adf29ba47106292365e7
0
Analyze the following code function for security vulnerabilities
public void ensureNoBitmapIconIfShortcutIsLongLived(@NonNull List<ShortcutInfo> shortcuts) { for (int i = shortcuts.size() - 1; i >= 0; i--) { final ShortcutInfo si = shortcuts.get(i); if (!si.isLongLived()) { continue; } final Icon icon = si.getIcon(); if (icon != null && icon.getType() != Icon.TYPE_BITMAP && icon.getType() != Icon.TYPE_ADAPTIVE_BITMAP) { continue; } if (icon == null && !si.hasIconFile()) { continue; } // TODO: Throw IllegalArgumentException instead. Slog.e(TAG, "Invalid icon type in shortcut " + si.getId() + ". Bitmaps are not allowed" + " in long-lived shortcuts. Use Resource icons, or Uri-based icons instead."); return; // Do not spam and return early. } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: ensureNoBitmapIconIfShortcutIsLongLived File: services/core/java/com/android/server/pm/ShortcutPackage.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40075
MEDIUM
5.5
android
ensureNoBitmapIconIfShortcutIsLongLived
services/core/java/com/android/server/pm/ShortcutPackage.java
ae768fbb9975fdab267f525831cb52f485ab0ecc
0
Analyze the following code function for security vulnerabilities
@Override public void setPreferredBackgroundFetchInterval(int seconds) { int oldInterval = getPreferredBackgroundFetchInterval(); super.setPreferredBackgroundFetchInterval(seconds); if (!backgroundFetchInitialized || oldInterval != seconds) { backgroundFetchInitialized = true; if (seconds > 0) { startBackgroundFetchService(); } else { stopBackgroundFetchService(); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setPreferredBackgroundFetchInterval File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java Repository: codenameone/CodenameOne The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-4903
MEDIUM
5.1
codenameone/CodenameOne
setPreferredBackgroundFetchInterval
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
public void setNoUsageStatistics(Boolean noUsageStatistics) throws IOException { this.noUsageStatistics = noUsageStatistics; save(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setNoUsageStatistics 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
setNoUsageStatistics
core/src/main/java/jenkins/model/Jenkins.java
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
0
Analyze the following code function for security vulnerabilities
@Deprecated(since = "2.2M1") public void setParent(String parent) { // If the passed parent is an empty string we also need to set the reference to null. The reason is that // in the database we store "" when the parent is empty and thus when Hibernate loads this class it'll call // setParent with "" if the parent had not been set when saved. if (StringUtils.isEmpty(parent)) { setParentReference((EntityReference) null); } else { setParentReference(getRelativeEntityReferenceResolver().resolve(parent, EntityType.DOCUMENT)); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setParent File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-74" ]
CVE-2023-29523
HIGH
8.8
xwiki/xwiki-platform
setParent
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
0d547181389f7941e53291af940966413823f61c
0
Analyze the following code function for security vulnerabilities
private int calculatePanelHeightQsExpanded() { float notificationHeight = mNotificationStackScroller.getHeight() - mNotificationStackScroller.getEmptyBottomMargin() - mNotificationStackScroller.getTopPadding(); // When only empty shade view is visible in QS collapsed state, simulate that we would have // it in expanded QS state as well so we don't run into troubles when fading the view in/out // and expanding/collapsing the whole panel from/to quick settings. if (mNotificationStackScroller.getNotGoneChildCount() == 0 && mShowEmptyShadeView) { notificationHeight = mNotificationStackScroller.getEmptyShadeViewHeight(); } int maxQsHeight = mQsMaxExpansionHeight; // If an animation is changing the size of the QS panel, take the animated value. if (mQsSizeChangeAnimator != null) { maxQsHeight = (int) mQsSizeChangeAnimator.getAnimatedValue(); } float totalHeight = Math.max( maxQsHeight, mStatusBarState == StatusBarState.KEYGUARD ? mClockPositionResult.stackScrollerPadding - mTopPaddingAdjustment : 0) + notificationHeight + mNotificationStackScroller.getTopPaddingOverflow(); if (totalHeight > mNotificationStackScroller.getHeight()) { float fullyCollapsedHeight = maxQsHeight + mNotificationStackScroller.getLayoutMinHeight(); totalHeight = Math.max(fullyCollapsedHeight, mNotificationStackScroller.getHeight()); } return (int) totalHeight; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: calculatePanelHeightQsExpanded 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
calculatePanelHeightQsExpanded
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
void postStartTracing() { mHandler.postDelayed(mStartTracing, 3000); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: postStartTracing 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
postStartTracing
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
private Log getLog(AdminTokenVO adminTokenVO, CreateArticleRequest createArticleRequest) { Log log = new Log(); log.set("content", createArticleRequest.getContent()); log.set("title", createArticleRequest.getTitle()); log.set("keywords", createArticleRequest.getKeywords()); log.set("markdown", createArticleRequest.getMarkdown()); log.set("content", createArticleRequest.getContent()); log.set("userId", adminTokenVO.getUserId()); log.set("typeId", createArticleRequest.getTypeId()); log.set("last_update_date", new Date()); log.set("canComment", createArticleRequest.isCanComment()); log.set("recommended", createArticleRequest.isRecommended()); log.set("privacy", createArticleRequest.isPrivacy()); log.set("rubbish", createArticleRequest.isRubbish()); if (StringUtils.isEmpty(createArticleRequest.getThumbnail())) { log.set("thumbnail", getFirstImgUrl(createArticleRequest.getContent(), adminTokenVO)); } else { log.set("thumbnail", createArticleRequest.getThumbnail()); } // 自动摘要 if (StringUtils.isEmpty(createArticleRequest.getDigest())) { log.set("digest", ParseUtil.autoDigest(log.get("content").toString(), Constants.getAutoDigestLength())); } else { log.set("digest", createArticleRequest.getDigest()); } log.set("plain_content", getPlainSearchText(log.get("content"))); log.set("editor_type", createArticleRequest.getEditorType()); int articleId; String alias; if (createArticleRequest instanceof UpdateArticleRequest) { articleId = ((UpdateArticleRequest) createArticleRequest).getId(); } else { articleId = new Log().findMaxId() + 1; log.set("releaseTime", new Date()); } if (createArticleRequest.getAlias() == null) { alias = Integer.toString(articleId); } else { alias = createArticleRequest.getAlias(); } log.set("logId", articleId); log.set("alias", alias.trim().replace(" ", "-").replace(".", "-")); return log; }
Vulnerability Classification: - CWE: CWE-79 - CVE: CVE-2019-16643 - Severity: LOW - CVSS Score: 3.5 Description: Upgrade jar version & fix #54 Signed-off-by: xiaochun <xchun90@163.com> Function: getLog File: service/src/main/java/com/zrlog/service/ArticleService.java Repository: 94fzb/zrlog Fixed Code: private Log getLog(AdminTokenVO adminTokenVO, CreateArticleRequest createArticleRequest) { Log log = new Log(); log.set("content", createArticleRequest.getContent()); log.set("title", Jsoup.clean(createArticleRequest.getTitle(),Whitelist.basic())); log.set("keywords", Jsoup.clean(createArticleRequest.getKeywords(),Whitelist.basic())); log.set("markdown", createArticleRequest.getMarkdown()); log.set("content", createArticleRequest.getContent()); log.set("userId", adminTokenVO.getUserId()); log.set("typeId", createArticleRequest.getTypeId()); log.set("last_update_date", new Date()); log.set("canComment", createArticleRequest.isCanComment()); log.set("recommended", createArticleRequest.isRecommended()); log.set("privacy", createArticleRequest.isPrivacy()); log.set("rubbish", createArticleRequest.isRubbish()); if (StringUtils.isEmpty(createArticleRequest.getThumbnail())) { log.set("thumbnail", Jsoup.clean(getFirstImgUrl(createArticleRequest.getContent(), adminTokenVO),Whitelist.basic())); } else { log.set("thumbnail", Jsoup.clean(createArticleRequest.getThumbnail(),Whitelist.basic())); } // 自动摘要 if (StringUtils.isEmpty(createArticleRequest.getDigest())) { log.set("digest", ParseUtil.autoDigest(log.get("content").toString(), Constants.getAutoDigestLength())); } else { log.set("digest", createArticleRequest.getDigest()); } log.set("plain_content", getPlainSearchText(log.get("content"))); log.set("editor_type", createArticleRequest.getEditorType()); int articleId; String alias; if (createArticleRequest instanceof UpdateArticleRequest) { articleId = ((UpdateArticleRequest) createArticleRequest).getId(); } else { articleId = new Log().findMaxId() + 1; log.set("releaseTime", new Date()); } if (createArticleRequest.getAlias() == null) { alias = Integer.toString(articleId); } else { alias = createArticleRequest.getAlias(); } log.set("logId", articleId); log.set("alias", Jsoup.clean(alias.trim().replace(" ", "-").replace(".", "-"),Whitelist.basic())); return log; }
[ "CWE-79" ]
CVE-2019-16643
LOW
3.5
94fzb/zrlog
getLog
service/src/main/java/com/zrlog/service/ArticleService.java
4a91c83af669e31a22297c14f089d8911d353fa1
1
Analyze the following code function for security vulnerabilities
private static native @Nullable String nativeGetResourceName(long ptr, @AnyRes int resid);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: nativeGetResourceName 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
nativeGetResourceName
core/java/android/content/res/AssetManager.java
c3bc12c484ef3bbca4cec19234437c45af5e584d
0
Analyze the following code function for security vulnerabilities
private void setBackwardsCompatibleAppRestrictions( CallerIdentity caller, String packageName, Bundle restrictions, UserHandle userHandle) { if ((caller.hasAdminComponent() && (isProfileOwner(caller) || isDefaultDeviceOwner(caller))) || (caller.hasPackage() && isCallerDelegate(caller, DELEGATION_APP_RESTRICTIONS))) { Bundle restrictionsToApply = restrictions == null || restrictions.isEmpty() ? getAppRestrictionsSetByAnyAdmin(packageName, userHandle) : restrictions; mInjector.binderWithCleanCallingIdentity(() -> { mUserManager.setApplicationRestrictions(packageName, restrictionsToApply, userHandle); }); } else { // Notify package of changes via an intent - only sent to explicitly registered // receivers. Sending here because For DPCs, this is being sent in UMS. final Intent changeIntent = new Intent(Intent.ACTION_APPLICATION_RESTRICTIONS_CHANGED); changeIntent.setPackage(packageName); changeIntent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY); mContext.sendBroadcastAsUser(changeIntent, userHandle); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setBackwardsCompatibleAppRestrictions 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
setBackwardsCompatibleAppRestrictions
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
private final int _slow32() throws IOException { if (_inputPtr >= _inputEnd) { loadMoreGuaranteed(); } int v = _inputBuffer[_inputPtr++]; // sign will disappear anyway if (_inputPtr >= _inputEnd) { loadMoreGuaranteed(); } v = (v << 8) + (_inputBuffer[_inputPtr++] & 0xFF); if (_inputPtr >= _inputEnd) { loadMoreGuaranteed(); } v = (v << 8) + (_inputBuffer[_inputPtr++] & 0xFF); if (_inputPtr >= _inputEnd) { loadMoreGuaranteed(); } return (v << 8) + (_inputBuffer[_inputPtr++] & 0xFF); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: _slow32 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
_slow32
cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
de072d314af8f5f269c8abec6930652af67bc8e6
0
Analyze the following code function for security vulnerabilities
public UrlArgument workingRepositoryUrl() { String[] args = new String[]{"config", "remote.origin.url"}; CommandLine gitConfig = gitWd().withArgs(args); return new UrlArgument(runOrBomb(gitConfig).outputForDisplay().get(0)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: workingRepositoryUrl File: domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java Repository: gocd The code follows secure coding practices.
[ "CWE-77" ]
CVE-2021-43286
MEDIUM
6.5
gocd
workingRepositoryUrl
domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
0
Analyze the following code function for security vulnerabilities
public HttpRequest basicAuthentication(final String username, final String password) { if (username != null && password != null) { final String data = username.concat(StringPool.COLON).concat(password); final String base64 = Base64.encodeToString(data); headerOverwrite(HEADER_AUTHORIZATION, "Basic " + base64); } return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: basicAuthentication File: src/main/java/jodd/http/HttpRequest.java Repository: oblac/jodd-http The code follows secure coding practices.
[ "CWE-74" ]
CVE-2022-29631
MEDIUM
5
oblac/jodd-http
basicAuthentication
src/main/java/jodd/http/HttpRequest.java
e50f573c8f6a39212ade68c6eb1256b2889fa8a6
0
Analyze the following code function for security vulnerabilities
public void releaseSomeActivities(IApplicationThread app) throws RemoteException;
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: releaseSomeActivities File: core/java/android/app/IActivityManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
releaseSomeActivities
core/java/android/app/IActivityManager.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
public void updateAddUserCapabilities(Context context) { mEnforcedAdmin = RestrictedLockUtils.checkIfRestrictionEnforced(context, UserManager.DISALLOW_ADD_USER, UserHandle.myUserId()); final boolean hasBaseUserRestriction = RestrictedLockUtils.hasBaseUserRestriction( context, UserManager.DISALLOW_ADD_USER, UserHandle.myUserId()); mDisallowAddUserSetByAdmin = mEnforcedAdmin != null && !hasBaseUserRestriction; mDisallowAddUser = (mEnforcedAdmin != null || hasBaseUserRestriction); mCanAddUser = true; if (!mIsAdmin || UserManager.getMaxSupportedUsers() < 2 || !UserManager.supportsMultipleUsers() || mDisallowAddUser) { mCanAddUser = false; } final boolean canAddUsersWhenLocked = mIsAdmin || Settings.Global.getInt( context.getContentResolver(), Settings.Global.ADD_USERS_WHEN_LOCKED, 0) == 1; mCanAddGuest = !mIsGuest && !mDisallowAddUser && canAddUsersWhenLocked; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateAddUserCapabilities File: src/com/android/settings/users/UserSettings.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3889
HIGH
7.2
android
updateAddUserCapabilities
src/com/android/settings/users/UserSettings.java
bd5d5176c74021e8cf4970f93f273ba3023c3d72
0
Analyze the following code function for security vulnerabilities
private void restoreInstanceState(Bundle savedInstanceState) { if (savedInstanceState.containsKey(ID_FEED_STRING) && savedInstanceState.containsKey(IS_FOLDER_BOOLEAN) && savedInstanceState.containsKey(OPTIONAL_FOLDER_ID)) { NewsListRecyclerAdapter adapter = new NewsListRecyclerAdapter(this, getNewsReaderDetailFragment().binding.list, this, mPostDelayHandler, mPrefs); adapter.setTotalItemCount(savedInstanceState.getInt(LIST_ADAPTER_TOTAL_COUNT)); adapter.setCachedPages(savedInstanceState.getInt(LIST_ADAPTER_PAGE_COUNT)); getNewsReaderDetailFragment() .getRecyclerView() .setAdapter(adapter); updateDetailFragment(savedInstanceState.getLong(ID_FEED_STRING), savedInstanceState.getBoolean(IS_FOLDER_BOOLEAN), savedInstanceState.getLong(OPTIONAL_FOLDER_ID), false); } mSearchString = savedInstanceState.getString(SEARCH_KEY, null); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: restoreInstanceState File: News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java Repository: nextcloud/news-android The code follows secure coding practices.
[ "CWE-829" ]
CVE-2021-41256
MEDIUM
5.8
nextcloud/news-android
restoreInstanceState
News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java
05449cb666059af7de2302df9d5c02997a23df85
0
Analyze the following code function for security vulnerabilities
@Override public Route.AssetDefinition assets(final String path, final String location) { return assets(path, new AssetHandler(location)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: assets 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
assets
jooby/src/main/java/org/jooby/Jooby.java
34f526028e6cd0652125baa33936ffb6a8a4a009
0
Analyze the following code function for security vulnerabilities
private String getExternalClientId(PersistentClientSessionEntity entity) { return new StorageId(entity.getClientStorageProvider(), entity.getExternalClientId()).getId(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getExternalClientId File: model/jpa/src/main/java/org/keycloak/models/jpa/session/JpaUserSessionPersisterProvider.java Repository: keycloak The code follows secure coding practices.
[ "CWE-770" ]
CVE-2023-6563
HIGH
7.7
keycloak
getExternalClientId
model/jpa/src/main/java/org/keycloak/models/jpa/session/JpaUserSessionPersisterProvider.java
11eb952e1df7cbb95b1e2c101dfd4839a2375695
0
Analyze the following code function for security vulnerabilities
@Editable(order=700, description="" + "Optionally specifies name of the attribute inside the user LDAP entry whose value will be taken as user " + "full name. This field is normally set to <i>displayName</i> according to RFC 2798. If left empty, full " + "name of the user will not be retrieved") public String getUserFullNameAttribute() { return userFullNameAttribute; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getUserFullNameAttribute File: server-plugin/server-plugin-authenticator-ldap/src/main/java/io/onedev/server/plugin/authenticator/ldap/LdapAuthenticator.java Repository: theonedev/onedev The code follows secure coding practices.
[ "CWE-90" ]
CVE-2021-32651
MEDIUM
4.3
theonedev/onedev
getUserFullNameAttribute
server-plugin/server-plugin-authenticator-ldap/src/main/java/io/onedev/server/plugin/authenticator/ldap/LdapAuthenticator.java
4440f0c57e440488d7e653417b2547eaae8ad19c
0
Analyze the following code function for security vulnerabilities
@Override protected int[] onCreateDrawableState(int extraSpace) { // When creating the drawable states, treat selected as focused to get the proper // highlight when in non-touch mode (i.e. physical keyboard). This is because only // a single view in a window can have focus, and the these will only appear if // the omnibox has focus, so we trick the drawable state into believing it has it. mForceIsFocused = isSelected() && !isInTouchMode(); int[] drawableState = super.onCreateDrawableState(extraSpace); mForceIsFocused = false; return drawableState; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onCreateDrawableState File: chrome/android/java/src/org/chromium/chrome/browser/omnibox/SuggestionView.java Repository: chromium The code follows secure coding practices.
[ "CWE-254" ]
CVE-2016-5163
MEDIUM
4.3
chromium
onCreateDrawableState
chrome/android/java/src/org/chromium/chrome/browser/omnibox/SuggestionView.java
3bd33fee094e863e5496ac24714c558bd58d28ef
0
Analyze the following code function for security vulnerabilities
private int getCurrentUserId() { try { return ActivityManagerNative.getDefault().getCurrentUser().id; } catch (RemoteException e) { throw e.rethrowFromSystemServer(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCurrentUserId 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
getCurrentUserId
core/java/android/hardware/fingerprint/FingerprintManager.java
f5334952131afa835dd3f08601fb3bced7b781cd
0
Analyze the following code function for security vulnerabilities
static String extractEncryptPart(String xml) { try { DocumentBuilder db = BUILDER_LOCAL.get(); Document document = db.parse(new InputSource(new StringReader(xml))); Element root = document.getDocumentElement(); return root.getElementsByTagName("Encrypt").item(0).getTextContent(); } catch (Exception e) { throw new RuntimeException(e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: extractEncryptPart File: weixin-java-common/src/main/java/me/chanjar/weixin/common/util/crypto/WxCryptUtil.java Repository: Wechat-Group/WxJava The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-20318
HIGH
7.5
Wechat-Group/WxJava
extractEncryptPart
weixin-java-common/src/main/java/me/chanjar/weixin/common/util/crypto/WxCryptUtil.java
6272639f02e397fed40828a2d0da66c30264bc0e
0
Analyze the following code function for security vulnerabilities
public void reInit() { style = new StyleSheet(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: reInit File: org/w3c/css/css/StyleSheetParser.java Repository: w3c/css-validator The code follows secure coding practices.
[ "CWE-79" ]
CVE-2020-4070
LOW
3.5
w3c/css-validator
reInit
org/w3c/css/css/StyleSheetParser.java
e5c09a9119167d3064db786d5f00d730b584a53b
0
Analyze the following code function for security vulnerabilities
public static void voidEncounterByHtmlFormSchema(Encounter e, HtmlForm htmlform, String voidReason) throws Exception { if (e != null && htmlform != null) { if (voidReason == null) voidReason = "htmlformentry"; boolean shouldVoidEncounter = true; Map<Obs, Obs> replacementObs = new HashMap<Obs, Obs>();//new, then source Map<Order, Order> replacementOrders = new HashMap<Order, Order>();//new, then source Encounter eTmp = returnEncounterCopy(e, replacementObs, replacementOrders); FormEntrySession session = new FormEntrySession(eTmp.getPatient(), eTmp, Mode.VIEW, htmlform, null); // session gets a null HttpSession session.getHtmlToDisplay(); List<FormSubmissionControllerAction> actions = session.getSubmissionController().getActions(); Set<Obs> matchedObs = new HashSet<Obs>(); Set<Order> matchedOrders = new HashSet<Order>(); for (FormSubmissionControllerAction lfca : actions) { if (lfca instanceof ObsSubmissionElement) { ObsSubmissionElement ose = (ObsSubmissionElement) lfca; if (ose.getExistingObs() != null) { matchedObs.add(ose.getExistingObs()); } } if (lfca instanceof ObsGroupAction) { ObsGroupAction oga = (ObsGroupAction) lfca; if (oga.getExistingGroup() != null) { matchedObs.add(oga.getExistingGroup()); } } if (lfca instanceof GettingExistingOrder) { GettingExistingOrder dse = (GettingExistingOrder) lfca; if (dse.getExistingOrder() != null) { matchedOrders.add(dse.getExistingOrder()); } } } for (Obs o : e.getAllObs(false)) { //ignore voided obs boolean matched = false; for (Obs oMatched : matchedObs) { if (replacementObs.get(oMatched) != null && replacementObs.get(oMatched).equals(o)) { o.setVoided(true); o.setVoidedBy(Context.getAuthenticatedUser()); o.setVoidReason(voidReason); o.setDateVoided(new Date()); matched = true; break; } } if (!matched) shouldVoidEncounter = false; } for (Order o : e.getOrders()) { if (!o.isVoided()) { //ignore voided orders boolean matched = false; for (Order oMatched : matchedOrders) { //Order.equals only checks Id value if (replacementOrders.get(oMatched) != null && replacementOrders.get(oMatched).equals(o) && !o.isVoided()) { o.setVoided(true); o.setVoidedBy(Context.getAuthenticatedUser()); o.setVoidReason(voidReason); o.setDateVoided(new Date()); matched = true; break; } } if (!matched) shouldVoidEncounter = false; } } if (shouldVoidEncounter) { e.setVoided(true); e.setVoidedBy(Context.getAuthenticatedUser()); e.setVoidReason(voidReason); e.setDateVoided(new Date()); } eTmp = null; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: voidEncounterByHtmlFormSchema File: api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java Repository: openmrs/openmrs-module-htmlformentry The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-16521
HIGH
7.5
openmrs/openmrs-module-htmlformentry
voidEncounterByHtmlFormSchema
api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java
9dcd304688e65c31cac5532fe501b9816ed975ae
0
Analyze the following code function for security vulnerabilities
private void DownloadMoreItems() { final NewsReaderDetailFragment ndf = getNewsReaderDetailFragment(); // Folder is selected.. download more items for all feeds in this folder if(ndf.getIdFeed() == null) { Long idFolder = ndf.getIdFolder(); List<Integer> specialFolders = Arrays.asList( SubscriptionExpandableListAdapter.SPECIAL_FOLDERS.ALL_UNREAD_ITEMS.getValue(), SubscriptionExpandableListAdapter.SPECIAL_FOLDERS.ALL_STARRED_ITEMS.getValue(), SubscriptionExpandableListAdapter.SPECIAL_FOLDERS.ALL_ITEMS.getValue() ); // if a special folder is selected, we can start the sync if (specialFolders.contains(idFolder.intValue())) { startSync(); } else { // Otherwise load more items for that particular folder and all its feeds DatabaseConnectionOrm dbConn = new DatabaseConnectionOrm(this); for (Feed feed : dbConn.getFolderById(idFolder).getFeedList()) { downloadMoreItemsForFeed(feed.getId()); } } } else { // Single feed is selected.. download more items downloadMoreItemsForFeed(ndf.getIdFeed()); } Toast.makeText(this, getString(R.string.toast_GettingMoreItems), Toast.LENGTH_SHORT).show(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: DownloadMoreItems File: News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java Repository: nextcloud/news-android The code follows secure coding practices.
[ "CWE-829" ]
CVE-2021-41256
MEDIUM
5.8
nextcloud/news-android
DownloadMoreItems
News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java
05449cb666059af7de2302df9d5c02997a23df85
0
Analyze the following code function for security vulnerabilities
@Override public void setCameraDisabled(ComponentName who, String callerPackageName, boolean disabled, boolean parent) { if (!mHasFeature) { return; } CallerIdentity caller; if (isPolicyEngineForFinanceFlagEnabled()) { caller = getCallerIdentity(who, callerPackageName); } else { caller = getCallerIdentity(who); } final int userId = caller.getUserId(); checkCanExecuteOrThrowUnsafe(DevicePolicyManager.OPERATION_SET_CAMERA_DISABLED); if (isPolicyEngineForFinanceFlagEnabled()) { EnforcingAdmin enforcingAdmin = enforcePermissionAndGetEnforcingAdmin( who, MANAGE_DEVICE_POLICY_CAMERA, caller.getPackageName(), getProfileParentUserIfRequested(userId, parent)); try { setBackwardCompatibleUserRestriction( caller, enforcingAdmin, UserManager.DISALLOW_CAMERA, disabled, parent); } catch (IllegalStateException e) { throw new IllegalStateException( "Please use addUserRestriction or addUserRestrictionGlobally using the key" + " UserManager.DISALLOW_CAMERA to disable the camera locally or" + " globally, respectively"); } } else { Objects.requireNonNull(who, "ComponentName is null"); if (parent) { Preconditions.checkCallAuthorization( isProfileOwnerOfOrganizationOwnedDevice(caller)); } synchronized (getLockObject()) { ActiveAdmin admin = getActiveAdminForCallerLocked(who, DeviceAdminInfo.USES_POLICY_DISABLE_CAMERA, parent); if (admin.disableCamera != disabled) { admin.disableCamera = disabled; saveSettingsLocked(userId); } } // Tell the user manager that the restrictions have changed. pushUserRestrictions(userId); } final int affectedUserId = parent ? getProfileParentId(userId) : userId; if (SecurityLog.isLoggingEnabled() && who != null) { SecurityLog.writeEvent(SecurityLog.TAG_CAMERA_POLICY_SET, who.getPackageName(), userId, affectedUserId, disabled ? 1 : 0); } DevicePolicyEventLogger .createEvent(DevicePolicyEnums.SET_CAMERA_DISABLED) .setAdmin(caller.getPackageName()) .setBoolean(disabled) .setStrings(parent ? CALLED_FROM_PARENT : NOT_CALLED_FROM_PARENT) .write(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setCameraDisabled 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
setCameraDisabled
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
public static BufferedImage getPlantumlImage() { return getImage("logo.png"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPlantumlImage File: src/net/sourceforge/plantuml/version/PSystemVersion.java Repository: plantuml The code follows secure coding practices.
[ "CWE-284" ]
CVE-2023-3431
MEDIUM
5.3
plantuml
getPlantumlImage
src/net/sourceforge/plantuml/version/PSystemVersion.java
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
0
Analyze the following code function for security vulnerabilities
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); initializeUi(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onCreate File: src/com/android/managedprovisioning/provisioning/AdminIntegratedFlowPrepareActivity.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21275
HIGH
7.8
android
onCreate
src/com/android/managedprovisioning/provisioning/AdminIntegratedFlowPrepareActivity.java
8277a2a946e617a7ea65056e4cedeb1fecf3a5f5
0
Analyze the following code function for security vulnerabilities
public void saveToXml(XmlSerializer out) throws IOException, XmlPullParserException { saveToXml(XmlUtils.makeTyped(out)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: saveToXml File: core/java/android/os/PersistableBundle.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40074
MEDIUM
5.5
android
saveToXml
core/java/android/os/PersistableBundle.java
40e4ea759743737958dde018f3606d778f7a53f3
0
Analyze the following code function for security vulnerabilities
private boolean isMacRandomizationSupported() { return mContext.getResources().getBoolean( R.bool.config_wifi_connected_mac_randomization_supported); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isMacRandomizationSupported File: service/java/com/android/server/wifi/WifiConfigManager.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21242
CRITICAL
9.8
android
isMacRandomizationSupported
service/java/com/android/server/wifi/WifiConfigManager.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
protected static void fixFolderHost(Structure st) { if(!UtilMethods.isSet(st.getFolder())) { st.setFolder("SYSTEM_FOLDER"); } if(!UtilMethods.isSet(st.getHost())) { st.setHost("SYSTEM_HOST"); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: fixFolderHost File: src/com/dotmarketing/portlets/structure/factories/StructureFactory.java Repository: dotCMS/core The code follows secure coding practices.
[ "CWE-89" ]
CVE-2016-2355
HIGH
7.5
dotCMS/core
fixFolderHost
src/com/dotmarketing/portlets/structure/factories/StructureFactory.java
897f3632d7e471b7a73aabed5b19f6f53d4e5562
0
Analyze the following code function for security vulnerabilities
public static List getStrAssertions(List assertions) { List returnAssertions = new ArrayList(); if (assertions != null) { Iterator it = assertions.iterator(); while (it.hasNext()) { returnAssertions.add( ((Assertion)(it.next())).toString(true,true)); } } return returnAssertions; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getStrAssertions 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
getStrAssertions
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
private void removeAllComponents() { // Clean up old components components.values().forEach(this::removeComponentFromGrid); components.clear(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeAllComponents File: server/src/main/java/com/vaadin/ui/Grid.java Repository: vaadin/framework The code follows secure coding practices.
[ "CWE-79" ]
CVE-2019-25028
MEDIUM
4.3
vaadin/framework
removeAllComponents
server/src/main/java/com/vaadin/ui/Grid.java
c40bed109c3723b38694ed160ea647fef5b28593
0
Analyze the following code function for security vulnerabilities
private StackInfo getStackInfoLocked(ActivityStack stack) { StackInfo info = new StackInfo(); mWindowManager.getStackBounds(stack.mStackId, info.bounds); info.displayId = Display.DEFAULT_DISPLAY; info.stackId = stack.mStackId; ArrayList<TaskRecord> tasks = stack.getAllTasks(); final int numTasks = tasks.size(); int[] taskIds = new int[numTasks]; String[] taskNames = new String[numTasks]; for (int i = 0; i < numTasks; ++i) { final TaskRecord task = tasks.get(i); taskIds[i] = task.taskId; taskNames[i] = task.origActivity != null ? task.origActivity.flattenToString() : task.realActivity != null ? task.realActivity.flattenToString() : task.getTopActivity() != null ? task.getTopActivity().packageName : "unknown"; } info.taskIds = taskIds; info.taskNames = taskNames; return info; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getStackInfoLocked File: services/core/java/com/android/server/am/ActivityStackSupervisor.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2016-3838
MEDIUM
4.3
android
getStackInfoLocked
services/core/java/com/android/server/am/ActivityStackSupervisor.java
468651c86a8adb7aa56c708d2348e99022088af3
0
Analyze the following code function for security vulnerabilities
ActiveAdmin getProfileOwnerOrDefaultDeviceOwnerLocked(@UserIdInt int userId) { ensureLocked(); // Try to find an admin which can use reqPolicy final ComponentName poAdminComponent = mOwners.getProfileOwnerComponent(userId); if (poAdminComponent != null) { return getProfileOwnerLocked(userId); } return getDefaultDeviceOwnerLocked(userId); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getProfileOwnerOrDefaultDeviceOwnerLocked 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
getProfileOwnerOrDefaultDeviceOwnerLocked
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
private static void appendHotRestartConfig(XmlGenerator gen, HotRestartConfig m) { gen.open("hot-restart", "enabled", m != null && m.isEnabled()) .node("fsync", m != null && m.isFsync()) .close(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: appendHotRestartConfig File: hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java Repository: hazelcast The code follows secure coding practices.
[ "CWE-502" ]
CVE-2016-10750
MEDIUM
6.8
hazelcast
appendHotRestartConfig
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
0
Analyze the following code function for security vulnerabilities
public void cancelFling(long timeMs) { if (mNativeContentViewCore == 0) return; nativeFlingCancel(mNativeContentViewCore, timeMs); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: cancelFling 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
cancelFling
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
98a50b76141f0b14f292f49ce376e6554142d5e2
0
Analyze the following code function for security vulnerabilities
String getPackageName() { return getAsecPackageName(cid); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPackageName 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
getPackageName
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
private void validateNonPartitionTopicName(String topicName) { if (topicName.contains(TopicName.PARTITIONED_TOPIC_SUFFIX)) { try { // First check if what's after suffix "-partition-" is number or not, if not number then can create. int partitionIndex = topicName.indexOf(TopicName.PARTITIONED_TOPIC_SUFFIX); long suffix = Long.parseLong(topicName.substring(partitionIndex + TopicName.PARTITIONED_TOPIC_SUFFIX.length())); TopicName partitionTopicName = TopicName.get(domain(), namespaceName, topicName.substring(0, partitionIndex)); PartitionedTopicMetadata metadata = getPartitionedTopicMetadata(partitionTopicName, false, false); // Partition topic index is 0 to (number of partition - 1) if (metadata.partitions > 0 && suffix >= (long) metadata.partitions) { log.warn("[{}] Can't create topic {} with \"-partition-\" followed by" + " a number smaller then number of partition of partitioned topic {}.", clientAppId(), topicName, partitionTopicName.getLocalName()); throw new RestException(Status.PRECONDITION_FAILED, "Can't create topic " + topicName + " with \"-partition-\" followed by" + " a number smaller then number of partition of partitioned topic " + partitionTopicName.getLocalName()); } else if (metadata.partitions == 0) { log.warn("[{}] Can't create topic {} with \"-partition-\" followed by" + " numeric value if there isn't a partitioned topic {} created.", clientAppId(), topicName, partitionTopicName.getLocalName()); throw new RestException(Status.PRECONDITION_FAILED, "Can't create topic " + topicName + " with \"-partition-\" followed by" + " numeric value if there isn't a partitioned topic " + partitionTopicName.getLocalName() + " created."); } // If there is a partitioned topic with the same name and numeric suffix is smaller than the // number of partition for that partitioned topic, validation will pass. } catch (NumberFormatException e) { // Do nothing, if value after partition suffix is not pure numeric value, // as it can't conflict if user want to create partitioned topic with same // topic name prefix in the future. } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: validateNonPartitionTopicName 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
validateNonPartitionTopicName
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
5b35bb81c31f1bc2ad98c9fde5b39ec68110ca52
0
Analyze the following code function for security vulnerabilities
public void sendWithHandler(String content, InternalMessageHandler handler) throws IOException { if (!session.isOpen()) { throw new RuntimeException("No connection to controller"); } messageHandler.addHandler(handler); session.getBasicRemote().sendText(content); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sendWithHandler File: kie-server-parent/kie-server-controller/kie-server-controller-websocket-client/src/main/java/org/kie/server/controller/websocket/client/WebSocketKieServerControllerClient.java Repository: kiegroup/droolsjbpm-integration The code follows secure coding practices.
[ "CWE-260" ]
CVE-2016-7043
MEDIUM
5
kiegroup/droolsjbpm-integration
sendWithHandler
kie-server-parent/kie-server-controller/kie-server-controller-websocket-client/src/main/java/org/kie/server/controller/websocket/client/WebSocketKieServerControllerClient.java
e916032edd47aa46d15f3a11909b4804ee20a7e8
0
Analyze the following code function for security vulnerabilities
private void pushQueueTitleUpdate() { CharSequence queueTitle; synchronized (mLock) { if (mDestroyed) { return; } queueTitle = mQueueTitle; } Collection<ISessionControllerCallbackHolder> deadCallbackHolders = null; for (ISessionControllerCallbackHolder holder : mControllerCallbackHolders) { try { holder.mCallback.onQueueTitleChanged(queueTitle); } catch (DeadObjectException e) { if (deadCallbackHolders == null) { deadCallbackHolders = new ArrayList<>(); } deadCallbackHolders.add(holder); logCallbackException("Removing dead callback in pushQueueTitleUpdate", holder, e); } catch (RemoteException e) { logCallbackException("unexpected exception in pushQueueTitleUpdate", holder, e); } } if (deadCallbackHolders != null) { mControllerCallbackHolders.removeAll(deadCallbackHolders); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: pushQueueTitleUpdate File: services/core/java/com/android/server/media/MediaSessionRecord.java Repository: android The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-21280
MEDIUM
5.5
android
pushQueueTitleUpdate
services/core/java/com/android/server/media/MediaSessionRecord.java
06e772e05514af4aa427641784c5eec39a892ed3
0
Analyze the following code function for security vulnerabilities
private URL inputSpecRemoteUrl(){ try { return new URI(inputSpec).toURL(); } catch (URISyntaxException | MalformedURLException | IllegalArgumentException e) { return null; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: inputSpecRemoteUrl File: modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java Repository: OpenAPITools/openapi-generator The code follows secure coding practices.
[ "CWE-552" ]
CVE-2021-21429
LOW
2.1
OpenAPITools/openapi-generator
inputSpecRemoteUrl
modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java
6445ea6511a6ddab64c86ae263937dc90650c98c
0
Analyze the following code function for security vulnerabilities
boolean hideNonSystemOverlayWindowsWhenVisible() { return (mAttrs.privateFlags & SYSTEM_FLAG_HIDE_NON_SYSTEM_OVERLAY_WINDOWS) != 0 && mSession.mCanHideNonSystemOverlayWindows; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hideNonSystemOverlayWindowsWhenVisible File: services/core/java/com/android/server/wm/WindowState.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-35674
HIGH
7.8
android
hideNonSystemOverlayWindowsWhenVisible
services/core/java/com/android/server/wm/WindowState.java
7428962d3b064ce1122809d87af65099d1129c9e
0
Analyze the following code function for security vulnerabilities
private static void setBundledAppAbi(PackageParser.Package pkg, String apkRoot, String apkName) { final File codeFile = new File(pkg.codePath); final boolean has64BitLibs; final boolean has32BitLibs; if (isApkFile(codeFile)) { // Monolithic install has64BitLibs = (new File(apkRoot, new File(LIB64_DIR_NAME, apkName).getPath())).exists(); has32BitLibs = (new File(apkRoot, new File(LIB_DIR_NAME, apkName).getPath())).exists(); } else { // Cluster install final File rootDir = new File(codeFile, LIB_DIR_NAME); if (!ArrayUtils.isEmpty(Build.SUPPORTED_64_BIT_ABIS) && !TextUtils.isEmpty(Build.SUPPORTED_64_BIT_ABIS[0])) { final String isa = VMRuntime.getInstructionSet(Build.SUPPORTED_64_BIT_ABIS[0]); has64BitLibs = (new File(rootDir, isa)).exists(); } else { has64BitLibs = false; } if (!ArrayUtils.isEmpty(Build.SUPPORTED_32_BIT_ABIS) && !TextUtils.isEmpty(Build.SUPPORTED_32_BIT_ABIS[0])) { final String isa = VMRuntime.getInstructionSet(Build.SUPPORTED_32_BIT_ABIS[0]); has32BitLibs = (new File(rootDir, isa)).exists(); } else { has32BitLibs = false; } } if (has64BitLibs && !has32BitLibs) { // The package has 64 bit libs, but not 32 bit libs. Its primary // ABI should be 64 bit. We can safely assume here that the bundled // native libraries correspond to the most preferred ABI in the list. pkg.applicationInfo.primaryCpuAbi = Build.SUPPORTED_64_BIT_ABIS[0]; pkg.applicationInfo.secondaryCpuAbi = null; } else if (has32BitLibs && !has64BitLibs) { // The package has 32 bit libs but not 64 bit libs. Its primary // ABI should be 32 bit. pkg.applicationInfo.primaryCpuAbi = Build.SUPPORTED_32_BIT_ABIS[0]; pkg.applicationInfo.secondaryCpuAbi = null; } else if (has32BitLibs && has64BitLibs) { // The application has both 64 and 32 bit bundled libraries. We check // here that the app declares multiArch support, and warn if it doesn't. // // We will be lenient here and record both ABIs. The primary will be the // ABI that's higher on the list, i.e, a device that's configured to prefer // 64 bit apps will see a 64 bit primary ABI, if ((pkg.applicationInfo.flags & ApplicationInfo.FLAG_MULTIARCH) == 0) { Slog.e(TAG, "Package: " + pkg + " has multiple bundled libs, but is not multiarch."); } if (VMRuntime.is64BitInstructionSet(getPreferredInstructionSet())) { pkg.applicationInfo.primaryCpuAbi = Build.SUPPORTED_64_BIT_ABIS[0]; pkg.applicationInfo.secondaryCpuAbi = Build.SUPPORTED_32_BIT_ABIS[0]; } else { pkg.applicationInfo.primaryCpuAbi = Build.SUPPORTED_32_BIT_ABIS[0]; pkg.applicationInfo.secondaryCpuAbi = Build.SUPPORTED_64_BIT_ABIS[0]; } } else { pkg.applicationInfo.primaryCpuAbi = null; pkg.applicationInfo.secondaryCpuAbi = null; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setBundledAppAbi 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
setBundledAppAbi
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
public void removeDatatransferProgressListener( OnDatatransferProgressListener listener, OCUpload ocUpload ) { if (ocUpload == null || listener == null) { return; } String targetKey = buildRemoteName(ocUpload.getAccountName(), ocUpload.getRemotePath()); if (mBoundListeners.get(targetKey) == listener) { mBoundListeners.remove(targetKey); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeDatatransferProgressListener File: src/main/java/com/owncloud/android/files/services/FileUploader.java Repository: nextcloud/android The code follows secure coding practices.
[ "CWE-732" ]
CVE-2022-24886
LOW
2.1
nextcloud/android
removeDatatransferProgressListener
src/main/java/com/owncloud/android/files/services/FileUploader.java
c01fa0b17050cdcf77a468cc22f4071eae29d464
0
Analyze the following code function for security vulnerabilities
@Override public Boolean copy(Path destination) { try { if (Utils.isNotNullOrEmpty(getContext().getFile())) { copyFile(getContext().getFile(), destination.toFile()); return true; } else if (Utils.isNotNullOrEmpty(getContext().getDir())) { copyDir(getContext().getDir(), destination.toFile()); return true; } throw new IllegalStateException("No file or dir has been specified"); } catch (Exception e) { throw KubernetesClientException.launderThrowable(e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: copy File: kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/PodOperationsImpl.java Repository: fabric8io/kubernetes-client The code follows secure coding practices.
[ "CWE-22" ]
CVE-2021-20218
MEDIUM
5.8
fabric8io/kubernetes-client
copy
kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/PodOperationsImpl.java
325d67cc80b73f049a5d0cea4917c1f2709a8d86
0
Analyze the following code function for security vulnerabilities
default boolean isKeepAlive() { return getFirst(CONNECTION, String.class).map(val -> val.equalsIgnoreCase("keep-alive")).orElse(false); }
Vulnerability Classification: - CWE: CWE-400 - CVE: CVE-2022-21700 - Severity: MEDIUM - CVSS Score: 5.0 Description: Use ConversionContext constants where possible instead of class (#2356) Changes ------- * Added ArgumentConversionContext constants in ConversionContext * Replaced Argument.of and use of argument classes with ConversionContext constants where possible * Added getFirst method in ConvertibleMultiValues that accepts ArgumentConversionContent parameter Partially addresses issue #2355 Function: isKeepAlive File: http/src/main/java/io/micronaut/http/HttpHeaders.java Repository: micronaut-projects/micronaut-core Fixed Code: default boolean isKeepAlive() { return getFirst(CONNECTION, ConversionContext.STRING).map(val -> val.equalsIgnoreCase("keep-alive")).orElse(false); }
[ "CWE-400" ]
CVE-2022-21700
MEDIUM
5
micronaut-projects/micronaut-core
isKeepAlive
http/src/main/java/io/micronaut/http/HttpHeaders.java
b8ec32c311689667c69ae7d9f9c3b3a8abc96fe3
1
Analyze the following code function for security vulnerabilities
public static ByteSource asByteSource(File file) { return new FileByteSource(file); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: asByteSource File: android/guava/src/com/google/common/io/Files.java Repository: google/guava The code follows secure coding practices.
[ "CWE-552" ]
CVE-2023-2976
HIGH
7.1
google/guava
asByteSource
android/guava/src/com/google/common/io/Files.java
feb83a1c8fd2e7670b244d5afd23cba5aca43284
0
Analyze the following code function for security vulnerabilities
@Nonnull private static Number _parseNumberInt (@Nonnull final JsonStringBuilder s) { final int nLen = s.getLength (); // pos int nPos = 0; // max pos long base 10 len int nMax = 19; final boolean bNeg = s.charAt (0) == '-'; if (bNeg) { nPos++; nMax++; } if (nLen > nMax) { // BigInteger anyway return s.getAsBigInteger (); } boolean bMustCheck; if (nLen < nMax) { // Never BigInteger nMax = nLen; bMustCheck = false; } else { // nLen == nMax nMax = nLen - 1; bMustCheck = true; } // r gets negative since the negative maximas are 1 "larger" than the // positive maximas long r = 0; while (nPos < nMax) r = (r * 10L) + ('0' - s.charAt (nPos++)); if (bMustCheck) { final boolean bIsBig; if (r > -922337203685477580L) { bIsBig = false; } else if (r < -922337203685477580L) { bIsBig = true; } else { if (bNeg) bIsBig = s.charAt (nPos) > '8'; else bIsBig = s.charAt (nPos) > '7'; } if (bIsBig) return s.getAsBigInteger (); // Add the last char r = (r * 10L) + ('0' - s.charAt (nPos)); } if (!bNeg) r = -r; if (r >= Integer.MIN_VALUE && r <= Integer.MAX_VALUE) return Integer.valueOf ((int) r); return Long.valueOf (r); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: _parseNumberInt File: ph-json/src/main/java/com/helger/json/parser/JsonParser.java Repository: phax/ph-commons The code follows secure coding practices.
[ "CWE-787" ]
CVE-2023-34612
HIGH
7.5
phax/ph-commons
_parseNumberInt
ph-json/src/main/java/com/helger/json/parser/JsonParser.java
02a4d034dcfb2b6e1796b25f519bf57a6796edce
0
Analyze the following code function for security vulnerabilities
private final static long _long(int i1, int i2) { long l1 = i1; long l2 = i2; l2 = (l2 << 32) >>> 32; return (l1 << 32) + l2; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: _long 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
_long
cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
de072d314af8f5f269c8abec6930652af67bc8e6
0
Analyze the following code function for security vulnerabilities
protected void validateEncryptedPassword() { if (isNotEmpty(getEncryptedPassword())) { try { getPassword(); } catch (Exception e) { addError("encryptedPassword", format("Encrypted password value for %s with url '%s' is invalid. This usually happens when the cipher text is modified to have an invalid value.", this.getType(), this.getUriForDisplay())); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: validateEncryptedPassword File: config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java Repository: gocd The code follows secure coding practices.
[ "CWE-77" ]
CVE-2021-43286
MEDIUM
6.5
gocd
validateEncryptedPassword
config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
0
Analyze the following code function for security vulnerabilities
public String getURL(DocumentReference reference, String action, String querystring) throws XWikiException { return this.xwiki.getURL(reference, action, querystring, null, getXWikiContext()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getURL 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
getURL
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 static String processClass(ProcessRecord process) { if (process == null || process.getPid() == MY_PID) { return "system_server"; } else if ((process.info.flags & ApplicationInfo.FLAG_SYSTEM) != 0) { return "system_app"; } else { return "data_app"; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: processClass 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
processClass
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
@Nullable @Override public Intent getLongClickIntent() { return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getLongClickIntent File: packages/SystemUI/src/com/android/systemui/qs/tiles/QuickAccessWalletTile.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21289
MEDIUM
5.5
android
getLongClickIntent
packages/SystemUI/src/com/android/systemui/qs/tiles/QuickAccessWalletTile.java
7a5e51c918b7097be3c7e669e1825a4d159c4185
0
Analyze the following code function for security vulnerabilities
private Optional<Integer> lookupStyleIndex(final String ref) { int styleIdentifier = ref.lastIndexOf(STYLE_INDEX_REF_SEPARATOR); if (styleIdentifier > 0) { return Optional.of(Integer.parseInt(ref.substring(styleIdentifier + 2)) - 1); } return Optional.empty(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: lookupStyleIndex File: core/src/main/java/org/mapfish/print/map/style/SLDParserPlugin.java Repository: mapfish/mapfish-print The code follows secure coding practices.
[ "CWE-611" ]
CVE-2020-15232
MEDIUM
6.4
mapfish/mapfish-print
lookupStyleIndex
core/src/main/java/org/mapfish/print/map/style/SLDParserPlugin.java
e1d0527d13db06b2b62ca7d6afb9e97dacd67a0e
0
Analyze the following code function for security vulnerabilities
public Controller execute(FolderComponent folderComponent, UserRequest ureq, WindowControl wControl, Translator translator) { VFSContainer currentContainer = folderComponent.getCurrentContainer(); VFSContainer rootContainer = folderComponent.getRootContainer(); if (!VFSManager.exists(currentContainer)) { status = FolderCommandStatus.STATUS_FAILED; showError(translator.translate("FileDoesNotExist")); return null; } status = FolderCommandHelper.sanityCheck(wControl, folderComponent); if (status == FolderCommandStatus.STATUS_FAILED) { return null; } FileSelection selection = new FileSelection(ureq, folderComponent.getCurrentContainerPath()); status = FolderCommandHelper.sanityCheck3(wControl, folderComponent, selection); if (status == FolderCommandStatus.STATUS_FAILED) { return null; } boolean selectionWithContainer = false; List<String> filenames = selection.getFiles(); List<VFSLeaf> leafs = new ArrayList<>(); for (String file : filenames) { VFSItem item = currentContainer.resolve(file); if (item instanceof VFSContainer) { selectionWithContainer = true; } else if (item instanceof VFSLeaf) { leafs.add((VFSLeaf) item); } } if (selectionWithContainer) { if (leafs.isEmpty()) { wControl.setError(getTranslator().translate("send.mail.noFileSelected")); return null; } else { setFormWarning(getTranslator().translate("send.mail.selectionContainsFolder")); } } setFiles(rootContainer, leafs); return this; }
Vulnerability Classification: - CWE: CWE-22 - CVE: CVE-2021-41152 - Severity: MEDIUM - CVSS Score: 4.0 Description: OO-5696: validate file selections against current container Function: execute File: src/main/java/org/olat/core/util/mail/ui/SendDocumentsByEMailController.java Repository: OpenOLAT Fixed Code: public Controller execute(FolderComponent folderComponent, UserRequest ureq, WindowControl wControl, Translator translator) { VFSContainer currentContainer = folderComponent.getCurrentContainer(); VFSContainer rootContainer = folderComponent.getRootContainer(); if (!VFSManager.exists(currentContainer)) { status = FolderCommandStatus.STATUS_FAILED; showError(translator.translate("FileDoesNotExist")); return null; } status = FolderCommandHelper.sanityCheck(wControl, folderComponent); if (status == FolderCommandStatus.STATUS_FAILED) { return null; } FileSelection selection = new FileSelection(ureq, folderComponent.getCurrentContainer(), folderComponent.getCurrentContainerPath()); status = FolderCommandHelper.sanityCheck3(wControl, folderComponent, selection); if (status == FolderCommandStatus.STATUS_FAILED) { return null; } boolean selectionWithContainer = false; List<String> filenames = selection.getFiles(); List<VFSLeaf> leafs = new ArrayList<>(); for (String file : filenames) { VFSItem item = currentContainer.resolve(file); if (item instanceof VFSContainer) { selectionWithContainer = true; } else if (item instanceof VFSLeaf) { leafs.add((VFSLeaf) item); } } if (selectionWithContainer) { if (leafs.isEmpty()) { wControl.setError(getTranslator().translate("send.mail.noFileSelected")); return null; } else { setFormWarning(getTranslator().translate("send.mail.selectionContainsFolder")); } } setFiles(rootContainer, leafs); return this; }
[ "CWE-22" ]
CVE-2021-41152
MEDIUM
4
OpenOLAT
execute
src/main/java/org/olat/core/util/mail/ui/SendDocumentsByEMailController.java
418bb509ffcb0e25ab4390563c6c47f0458583eb
1
Analyze the following code function for security vulnerabilities
@Override public void removeAllVisibleRecentTasks() { mAmInternal.enforceCallingPermission(REMOVE_TASKS, "removeAllVisibleRecentTasks()"); synchronized (mGlobalLock) { final long ident = Binder.clearCallingIdentity(); try { getRecentTasks().removeAllVisibleTasks(mAmInternal.getCurrentUserId()); } finally { Binder.restoreCallingIdentity(ident); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeAllVisibleRecentTasks File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40094
HIGH
7.8
android
removeAllVisibleRecentTasks
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
1120bc7e511710b1b774adf29ba47106292365e7
0
Analyze the following code function for security vulnerabilities
@Override public @Nullable String resolve(@NotNull Dragonfly dragonfly, @NotNull MavenDependency dependency) throws ResolveFailureException { if (!dependency.getVersion().contains("SNAPSHOT")) { throw new ResolveFailureException("Cannot resolve a dependency as a snapshot if it isn't a snapshot"); } else { Set<String> urls = getUrls(dragonfly, dependency); if (urls.isEmpty()) { throw new ResolveFailureException("Cannot resolve dependency: " + dependency); } String data = null; String resolvedUrl = null; for (String url : urls) { if ((data = get(url, dragonfly.getTimeout())) != null) { resolvedUrl = url; break; } } if (null == data) { throw new ResolveFailureException("Cannot resolve dependency: " + dependency); } try { DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); Document document = builder.parse(new InputSource(new StringReader(data))); Element root = document.getDocumentElement(); Element snapshotData = (Element) root.getElementsByTagName("snapshot").item(0); String timestamp = snapshotData.getElementsByTagName("timestamp").item(0).getTextContent(); String buildNumber = snapshotData.getElementsByTagName("buildNumber").item(0).getTextContent(); return String.format( OUTPUT_FORMAT, resolvedUrl.replace("/maven-metadata.xml", ""), dependency.getArtifactId(), dependency.getVersion().replace("-SNAPSHOT", ""), timestamp, buildNumber ); } catch (Exception ex) { throw new ResolveFailureException("Cannot resolve dependency: " + dependency, ex); } } }
Vulnerability Classification: - CWE: CWE-611 - CVE: CVE-2022-41967 - Severity: HIGH - CVSS Score: 7.5 Description: fix: CVE-2022-41967 Dragonfly v0.3.0-SNAPSHOT fails to properly configure the DocumentBuilderFactory to prevent XML enternal entity (XXE) attacks when parsing maven-metadata.xml files provided by external Maven repositories during "SNAPSHOT" version resolution. This patches CVE-2022-41967 by disabling features which may lead to XXE. If you are currently using v0.3.0-SNAPSHOT it is STRONGLY advised to update Dragonfly to v0.3.1-SNAPSHOT just to be safe. Function: resolve File: src/main/java/dev/hypera/dragonfly/resolvers/impl/MavenSnapshotResolver.java Repository: HyperaDev/Dragonfly Fixed Code: @Override public @Nullable String resolve(@NotNull Dragonfly dragonfly, @NotNull MavenDependency dependency) throws ResolveFailureException { if (!dependency.getVersion().contains("SNAPSHOT")) { throw new ResolveFailureException("Cannot resolve a dependency as a snapshot if it isn't a snapshot"); } else { Set<String> urls = getUrls(dragonfly, dependency); if (urls.isEmpty()) { throw new ResolveFailureException("Cannot resolve dependency: " + dependency); } String data = null; String resolvedUrl = null; for (String url : urls) { if ((data = get(url, dragonfly.getTimeout())) != null) { resolvedUrl = url; break; } } if (null == data) { throw new ResolveFailureException("Cannot resolve dependency: " + dependency); } try { DocumentBuilder builder = documentBuilderFactory.newDocumentBuilder(); Document document = builder.parse(new InputSource(new StringReader(data))); Element root = document.getDocumentElement(); Element snapshotData = (Element) root.getElementsByTagName("snapshot").item(0); String timestamp = snapshotData.getElementsByTagName("timestamp").item(0).getTextContent(); String buildNumber = snapshotData.getElementsByTagName("buildNumber").item(0).getTextContent(); return String.format( OUTPUT_FORMAT, resolvedUrl.replace("/maven-metadata.xml", ""), dependency.getArtifactId(), dependency.getVersion().replace("-SNAPSHOT", ""), timestamp, buildNumber ); } catch (Exception ex) { throw new ResolveFailureException("Cannot resolve dependency: " + dependency, ex); } } }
[ "CWE-611" ]
CVE-2022-41967
HIGH
7.5
HyperaDev/Dragonfly
resolve
src/main/java/dev/hypera/dragonfly/resolvers/impl/MavenSnapshotResolver.java
9661375e1135127ca6cdb5712e978bec33cc06b3
1
Analyze the following code function for security vulnerabilities
private String buildPasswordHash(String algorithm, String pw, byte[] salt, int rounds) { SecretKey key = buildPasswordKey(algorithm, pw, salt, rounds); if (key != null) { return byteArrayToHex(key.getEncoded()); } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: buildPasswordHash File: services/backup/java/com/android/server/backup/BackupManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-3759
MEDIUM
5
android
buildPasswordHash
services/backup/java/com/android/server/backup/BackupManagerService.java
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
0
Analyze the following code function for security vulnerabilities
private EnforcingAdmin getEnforcingAdminForCaller(@Nullable ComponentName who, String callerPackageName) { CallerIdentity caller = getCallerIdentity(who, callerPackageName); int userId = caller.getUserId(); ActiveAdmin admin; if (isDeviceOwner(caller) || isProfileOwner(caller) || isCallerDelegate(caller)) { ComponentName component; synchronized (getLockObject()) { if (who != null) { admin = getActiveAdminUncheckedLocked(who, userId); component = who; } else { admin = getDeviceOrProfileOwnerAdminLocked(userId); component = admin.info.getComponent(); } } return EnforcingAdmin.createEnterpriseEnforcingAdmin(component, userId, admin); } // Check for non-DPC active admins. admin = getActiveAdminForCaller(who, caller); if (admin != null) { return EnforcingAdmin.createDeviceAdminEnforcingAdmin(admin.info.getComponent(), userId, admin); } admin = getUserData(userId).createOrGetPermissionBasedAdmin(userId); return EnforcingAdmin.createEnforcingAdmin(caller.getPackageName(), userId, admin); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getEnforcingAdminForCaller 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
getEnforcingAdminForCaller
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
private Drawable getEncircledDefaultIcon() { if (mDefaultIconDrawable == null) { mDefaultIconDrawable = encircle(Utils.getDefaultUserIconAsBitmap(UserHandle.USER_NULL)); } return mDefaultIconDrawable; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getEncircledDefaultIcon File: src/com/android/settings/users/UserSettings.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3889
HIGH
7.2
android
getEncircledDefaultIcon
src/com/android/settings/users/UserSettings.java
bd5d5176c74021e8cf4970f93f273ba3023c3d72
0
Analyze the following code function for security vulnerabilities
private void parseOptionsLocked(boolean takeUser) throws CommandException { String opt; while ((opt = getNextOption()) != null) { switch (opt) { case "--user": if (takeUser) { mUserId = UserHandle.parseUserArg(getNextArgRequired()); if (!isUserUnlockedL(mUserId)) { throw new CommandException( "User " + mUserId + " is not running or locked"); } break; } // fallthrough case "--flags": mShortcutMatchFlags = Integer.parseInt(getNextArgRequired()); break; default: throw new CommandException("Unknown option: " + opt); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: parseOptionsLocked File: services/core/java/com/android/server/pm/ShortcutService.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40079
HIGH
7.8
android
parseOptionsLocked
services/core/java/com/android/server/pm/ShortcutService.java
96e0524c48c6e58af7d15a2caf35082186fc8de2
0
Analyze the following code function for security vulnerabilities
public static Intent getStyleWallpapersIntent(Context context) { return new Intent(Intent.ACTION_SET_WALLPAPER).setComponent( new ComponentName(context.getString(R.string.wallpaper_picker_package), context.getString(R.string.custom_activity_picker) )); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getStyleWallpapersIntent File: src/com/android/launcher3/util/PackageManagerHelper.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2023-40097
HIGH
7.8
android
getStyleWallpapersIntent
src/com/android/launcher3/util/PackageManagerHelper.java
6c9a41117d5a9365cf34e770bbb00138f6bf997e
0
Analyze the following code function for security vulnerabilities
public void setGlobals(final List<Annotation> globals) { this.globals = globals; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setGlobals File: src/graph/Plot.java Repository: OpenTSDB/opentsdb The code follows secure coding practices.
[ "CWE-78" ]
CVE-2020-35476
HIGH
7.5
OpenTSDB/opentsdb
setGlobals
src/graph/Plot.java
b762338664c3ee6e3f773bc04da2a8af24a5c486
0
Analyze the following code function for security vulnerabilities
@Override public XWikiAttachment uploadAttachment(DocumentReference documentReference, Part part) throws TemporaryAttachmentException { XWikiAttachment xWikiAttachment; long uploadMaxSize = getUploadMaxSize(documentReference); if (part.getSize() > uploadMaxSize) { throw new TemporaryAttachmentException(String.format( "The file size [%s] is larger than the upload max size [%s]", part.getSize(), uploadMaxSize)); } TemporaryAttachmentSession temporaryAttachmentSession = getOrCreateSession(); XWikiContext context = this.contextProvider.get(); try { xWikiAttachment = new XWikiAttachment(); xWikiAttachment.setFilename(part.getSubmittedFileName()); xWikiAttachment.setContent(part.getInputStream()); xWikiAttachment.setAuthorReference(context.getUserReference()); temporaryAttachmentSession.addAttachment(documentReference, xWikiAttachment); } catch (IOException e) { throw new TemporaryAttachmentException("Error while reading the content of a request part", e); } return xWikiAttachment; }
Vulnerability Classification: - CWE: CWE-749 - CVE: CVE-2023-26478 - Severity: HIGH - CVSS Score: 8.1 Description: XWIKI-20180: TemporaryAttachmentsScriptService#uploadTemporaryAttachment return an XWikiAttachment instance Function: uploadAttachment File: xwiki-platform-core/xwiki-platform-store/xwiki-platform-store-filesystem-oldcore/src/main/java/org/xwiki/store/filesystem/internal/DefaultTemporaryAttachmentSessionsManager.java Repository: xwiki/xwiki-platform Fixed Code: @Override public XWikiAttachment uploadAttachment(DocumentReference documentReference, Part part) throws TemporaryAttachmentException { XWikiAttachment xWikiAttachment; long uploadMaxSize = getUploadMaxSize(documentReference); if (part.getSize() > uploadMaxSize) { throw new TemporaryAttachmentException(String.format( "The file size [%s] is larger than the upload max size [%s]", part.getSize(), uploadMaxSize)); } TemporaryAttachmentSession temporaryAttachmentSession = getOrCreateSession(); XWikiContext context = this.contextProvider.get(); try { xWikiAttachment = new XWikiAttachment(); xWikiAttachment.setFilename(part.getSubmittedFileName()); xWikiAttachment.setContent(part.getInputStream()); xWikiAttachment.setAuthorReference(context.getUserReference()); // Initialize an empty document with the right document reference and locale. We don't set the actual // document since it's a temporary attachment, but it is still useful to have a minimal knowledge of the // document it is stored for. xWikiAttachment.setDoc(new XWikiDocument(documentReference, documentReference.getLocale()), false); temporaryAttachmentSession.addAttachment(documentReference, xWikiAttachment); } catch (IOException e) { throw new TemporaryAttachmentException("Error while reading the content of a request part", e); } return xWikiAttachment; }
[ "CWE-749" ]
CVE-2023-26478
HIGH
8.1
xwiki/xwiki-platform
uploadAttachment
xwiki-platform-core/xwiki-platform-store/xwiki-platform-store-filesystem-oldcore/src/main/java/org/xwiki/store/filesystem/internal/DefaultTemporaryAttachmentSessionsManager.java
3c73c59e39b6436b1074d8834cf276916010014d
1
Analyze the following code function for security vulnerabilities
public Node createContainer(Node containerParent, String containerName) { Element node = mDoc.createElement(containerName); containerParent.appendChild(node); return node; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createContainer File: base/util/src/main/java/com/netscape/cmsutil/xml/XMLObject.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
createContainer
base/util/src/main/java/com/netscape/cmsutil/xml/XMLObject.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
public boolean isAffineSupported() { return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isAffineSupported File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java Repository: codenameone/CodenameOne The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-4903
MEDIUM
5.1
codenameone/CodenameOne
isAffineSupported
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
public int getNamespaceCount(int depth) throws XmlPullParserException { throw new XmlPullParserException("getNamespaceCount() not supported"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getNamespaceCount File: core/java/android/content/res/XmlBlock.java Repository: android The code follows secure coding practices.
[ "CWE-415" ]
CVE-2023-40103
HIGH
7.8
android
getNamespaceCount
core/java/android/content/res/XmlBlock.java
c3bc12c484ef3bbca4cec19234437c45af5e584d
0
Analyze the following code function for security vulnerabilities
@PostMapping("/{id}") public String edit(@PathVariable(required = false) String id, @RequestParam(required = false) String name, @RequestParam(required = false) String location, @RequestParam(required = false) String latlng, @RequestParam(required = false) String website, @RequestParam(required = false) String aboutme, @RequestParam(required = false) String picture, HttpServletRequest req, Model model) { Profile authUser = utils.getAuthUser(req); Profile showUser = getProfileForEditing(id, authUser); if (showUser != null) { boolean updateProfile = false; if (!isMyid(authUser, id)) { showUser = utils.getParaClient().read(Profile.id(id)); } if (!StringUtils.equals(showUser.getLocation(), location)) { showUser.setLatlng(latlng); showUser.setLocation(location); updateProfile = true; } if (!StringUtils.equals(showUser.getWebsite(), website) && (StringUtils.isBlank(website) || Utils.isValidURL(website))) { showUser.setWebsite(website); updateProfile = true; } if (!StringUtils.equals(showUser.getAboutme(), aboutme)) { showUser.setAboutme(aboutme); updateProfile = true; } updateProfile = updateUserPictureAndName(showUser, picture, name) || updateProfile; boolean isComplete = showUser.isComplete() && isMyid(authUser, showUser.getId()); if (updateProfile || utils.addBadgeOnce(showUser, Badge.NICEPROFILE, isComplete)) { showUser.update(); } model.addAttribute("user", showUser); } return "redirect:" + PROFILELINK + (isMyid(authUser, id) ? "" : "/" + id); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: edit File: src/main/java/com/erudika/scoold/controllers/ProfileController.java Repository: Erudika/scoold The code follows secure coding practices.
[ "CWE-130" ]
CVE-2022-1543
MEDIUM
6.5
Erudika/scoold
edit
src/main/java/com/erudika/scoold/controllers/ProfileController.java
62a0e92e1486ddc17676a7ead2c07ff653d167ce
0
Analyze the following code function for security vulnerabilities
@Override public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException { Console cons = System.console(); char[] password = this.password; if (cons == null && password == null) { throw new UnsupportedCallbackException(callbacks[0], "Console is not available"); } for (Callback callback : callbacks) { if (!(callback instanceof PasswordCallback)) { throw new UnsupportedCallbackException(callback); } PasswordCallback pwdCallback = (PasswordCallback) callback; if (password != null) { pwdCallback.setPassword(password); continue; } // It is used instead of cons.readPassword(prompt), because the prompt may contain '%' // characters pwdCallback.setPassword( castNonNull(cons, "System.console()") .readPassword("%s", pwdCallback.getPrompt()) ); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handle File: pgjdbc/src/main/java/org/postgresql/ssl/LibPQFactory.java Repository: pgjdbc The code follows secure coding practices.
[ "CWE-665" ]
CVE-2022-21724
HIGH
7.5
pgjdbc
handle
pgjdbc/src/main/java/org/postgresql/ssl/LibPQFactory.java
f4d0ed69c0b3aae8531d83d6af4c57f22312c813
0
Analyze the following code function for security vulnerabilities
@Override public ComponentName getResolvedComponentName() { if (mSourceInfo != null) { return mSourceInfo.getResolvedComponentName(); } else if (mBackupResolveInfo != null) { return new ComponentName(mBackupResolveInfo.activityInfo.packageName, mBackupResolveInfo.activityInfo.name); } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getResolvedComponentName File: core/java/com/android/internal/app/ChooserActivity.java Repository: android The code follows secure coding practices.
[ "CWE-254", "CWE-19" ]
CVE-2016-3752
HIGH
7.5
android
getResolvedComponentName
core/java/com/android/internal/app/ChooserActivity.java
ddbf2db5b946be8fdc45c7b0327bf560b2a06988
0
Analyze the following code function for security vulnerabilities
public TypeDeserializer findPropertyContentTypeDeserializer(DeserializationConfig config, JavaType containerType, AnnotatedMember propertyEntity) throws JsonMappingException { AnnotationIntrospector ai = config.getAnnotationIntrospector(); TypeResolverBuilder<?> b = ai.findPropertyContentTypeResolver(config, propertyEntity, containerType); JavaType contentType = containerType.getContentType(); // Defaulting: if no annotations on member, check class if (b == null) { return findTypeDeserializer(config, contentType); } // but if annotations found, may need to resolve subtypes: Collection<NamedType> subtypes = config.getSubtypeResolver().collectAndResolveSubtypesByTypeId( config, propertyEntity, contentType); return b.buildTypeDeserializer(config, contentType, subtypes); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: findPropertyContentTypeDeserializer File: src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java Repository: FasterXML/jackson-databind The code follows secure coding practices.
[ "CWE-502" ]
CVE-2019-16942
HIGH
7.5
FasterXML/jackson-databind
findPropertyContentTypeDeserializer
src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
0
Analyze the following code function for security vulnerabilities
@VisibleForTesting public void setDaoRegistryForUnitTest(DaoRegistry theDaoRegistry) { myDaoRegistry = theDaoRegistry; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setDaoRegistryForUnitTest File: hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaBundleProvider.java Repository: hapifhir/hapi-fhir The code follows secure coding practices.
[ "CWE-400" ]
CVE-2021-32053
MEDIUM
5
hapifhir/hapi-fhir
setDaoRegistryForUnitTest
hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaBundleProvider.java
a5e4f56e1c6f55093ff334cf698ffdeea2f33960
0
Analyze the following code function for security vulnerabilities
public JobStatus getCurrentInitializerJobStatus() { // Get XWiki initializer job JobStatus jobStatus = getJobStatus(); if (jobStatus == null) { return null; } // The XWiki initialization is not done yet if (jobStatus.getState() != State.FINISHED) { return jobStatus; } // If XWiki initialization did not failed if (this.xwiki != null) { // Get current wiki initializer job Job wikiJob = this.xwiki.getWikiInitializerJob(this.context.getWikiId()); jobStatus = wikiJob != null ? wikiJob.getStatus() : null; } return jobStatus; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCurrentInitializerJobStatus 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
getCurrentInitializerJobStatus
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
@Override protected void onStart() { super.onStart(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onStart File: Ports/Android/src/com/codename1/impl/android/CodenameOneActivity.java Repository: codenameone/CodenameOne The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-4903
MEDIUM
5.1
codenameone/CodenameOne
onStart
Ports/Android/src/com/codename1/impl/android/CodenameOneActivity.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
ActivityStartController getActivityStartController() { return mActivityStartController; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getActivityStartController 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
getActivityStartController
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
@Test public void saveTransSyntaxError(TestContext context) { postgresClient = createFoo(context); postgresClient.startTx(asyncAssertTx(context, trans -> { postgresClient.save(trans, "'", xPojo, context.asyncAssertFailure(save -> { postgresClient.rollbackTx(trans, context.asyncAssertSuccess()); })); })); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: saveTransSyntaxError File: domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java Repository: folio-org/raml-module-builder The code follows secure coding practices.
[ "CWE-89" ]
CVE-2019-15534
HIGH
7.5
folio-org/raml-module-builder
saveTransSyntaxError
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
private void removeUserStateLocked(final int userHandle) { mContext.getSystemService(StorageManager.class) .deleteUserKey(userHandle); // Cleanup package manager settings mPm.cleanUpUserLILPw(this, userHandle); // Remove this user from the list mUsers.remove(userHandle); // Remove user file AtomicFile userFile = new AtomicFile(new File(mUsersDir, userHandle + XML_SUFFIX)); userFile.delete(); // Update the user list writeUserListLocked(); updateUserIdsLocked(); removeDirectoryRecursive(Environment.getUserSystemDirectory(userHandle)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeUserStateLocked File: services/core/java/com/android/server/pm/UserManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-2457
LOW
2.1
android
removeUserStateLocked
services/core/java/com/android/server/pm/UserManagerService.java
12332e05f632794e18ea8c4ac52c98e82532e5db
0
Analyze the following code function for security vulnerabilities
@Override public void toggleKeyboardShortcutsMenu(int deviceId) { int msg = MSG_TOGGLE_KEYBOARD_SHORTCUTS_MENU; mHandler.removeMessages(msg); mHandler.obtainMessage(msg, deviceId, 0).sendToTarget(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toggleKeyboardShortcutsMenu 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
toggleKeyboardShortcutsMenu
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
public int optInt(int index, int defaultValue) { try { return getInt(index); } catch (Exception e) { return defaultValue; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: optInt File: src/main/java/org/codehaus/jettison/json/JSONArray.java Repository: jettison-json/jettison The code follows secure coding practices.
[ "CWE-674", "CWE-787" ]
CVE-2022-45693
HIGH
7.5
jettison-json/jettison
optInt
src/main/java/org/codehaus/jettison/json/JSONArray.java
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
0
Analyze the following code function for security vulnerabilities
@SuppressWarnings("unused") @CalledByNative private void showPastePopupWithFeedback(int x, int y) { // TODO(jdduke): Remove this when there is a better signal that long press caused // showing of the paste popup. See http://crbug.com/150151. if (showPastePopup(x, y)) { mContainerView.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: showPastePopupWithFeedback 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
showPastePopupWithFeedback
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
9d343ad2ea6ec395c377a4efa266057155bfa9c1
0
Analyze the following code function for security vulnerabilities
private void createLicense(QuestionItemImpl poolItem, AssessmentItemMetadata metadata) { String license = metadata.getLicense(); String licensor = metadata.getCreator(); QTIMetadataConverter converter = new QTIMetadataConverter(qItemTypeDao, qEduContextDao, qpoolService); converter.createLicense(poolItem, license, licensor); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createLicense File: src/main/java/org/olat/ims/qti21/pool/QTI21ImportProcessor.java Repository: OpenOLAT The code follows secure coding practices.
[ "CWE-22" ]
CVE-2021-39180
HIGH
9
OpenOLAT
createLicense
src/main/java/org/olat/ims/qti21/pool/QTI21ImportProcessor.java
5668a41ab3f1753102a89757be013487544279d5
0
Analyze the following code function for security vulnerabilities
public boolean hasQuit() { return mHasQuit; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hasQuit File: service/java/com/android/server/wifi/ClientModeImpl.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21242
CRITICAL
9.8
android
hasQuit
service/java/com/android/server/wifi/ClientModeImpl.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
public void setUniqueIndexesCheckedBeforeSave(boolean theUniqueIndexesCheckedBeforeSave) { myUniqueIndexesCheckedBeforeSave = theUniqueIndexesCheckedBeforeSave; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setUniqueIndexesCheckedBeforeSave File: hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java Repository: hapifhir/hapi-fhir The code follows secure coding practices.
[ "CWE-400" ]
CVE-2021-32053
MEDIUM
5
hapifhir/hapi-fhir
setUniqueIndexesCheckedBeforeSave
hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
f2934b229c491235ab0e7782dea86b324521082a
0
Analyze the following code function for security vulnerabilities
@Provides @SysUISingleton static NotifShadeEventSource provideNotifShadeEventSource( NotifPipelineFlags notifPipelineFlags, Lazy<ShadeEventCoordinator> shadeEventCoordinatorLazy, Lazy<LegacyNotificationPresenterExtensions> legacyNotificationPresenterExtensionsLazy) { return notifPipelineFlags.isNewPipelineEnabled() ? shadeEventCoordinatorLazy.get() : legacyNotificationPresenterExtensionsLazy.get(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: provideNotifShadeEventSource File: packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40098
MEDIUM
5.5
android
provideNotifShadeEventSource
packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java
d21ffbe8a2eeb2a5e6da7efbb1a0430ba6b022e0
0
Analyze the following code function for security vulnerabilities
public void setProgress(String message, int percent);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setProgress File: main/src/com/google/refine/importing/ImportingUtilities.java Repository: OpenRefine The code follows secure coding practices.
[ "CWE-22" ]
CVE-2018-19859
MEDIUM
4
OpenRefine
setProgress
main/src/com/google/refine/importing/ImportingUtilities.java
e243e73e4064de87a913946bd320fbbe246da656
0