instruction
string
input
string
output
string
cwe_ids
list
cve_id
string
severity
string
cvss_score
float64
repo_name
string
func_name
string
file_path
string
commit_hash
string
is_vulnerable
int64
Analyze the following code function for security vulnerabilities
public void save(AsyncResult<SQLConnection> sqlConnection, String table, Object entity, Handler<AsyncResult<String>> replyHandler) { save(sqlConnection, table, /* id */ null, entity, /* returnId */ true, /* upsert */ false, /* convertEntity */ true, replyHandler); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: save File: domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java Repository: folio-org/raml-module-builder The code follows secure coding practices.
[ "CWE-89" ]
CVE-2019-15534
HIGH
7.5
folio-org/raml-module-builder
save
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
public static long directBufferAddress(ByteBuffer buffer) { return PlatformDependent0.directBufferAddress(buffer); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: directBufferAddress File: common/src/main/java/io/netty/util/internal/PlatformDependent.java Repository: netty The code follows secure coding practices.
[ "CWE-668", "CWE-378", "CWE-379" ]
CVE-2022-24823
LOW
1.9
netty
directBufferAddress
common/src/main/java/io/netty/util/internal/PlatformDependent.java
185f8b2756a36aaa4f973f1a2a025e7d981823f1
0
Analyze the following code function for security vulnerabilities
protected String getExecutionPreamble() { if ( getWorkingDirectoryAsString() == null ) { return null; } String dir = getWorkingDirectoryAsString(); StringBuilder sb = new StringBuilder(); sb.append( "cd " ); sb.append( quoteOneItem( dir, false ) ); sb.append( " && " ); return sb.toString(); }
Vulnerability Classification: - CWE: CWE-116 - CVE: CVE-2022-29599 - Severity: HIGH - CVSS Score: 7.5 Description: [MSHARED-297] - Minor code cleanup Function: getExecutionPreamble File: src/main/java/org/apache/maven/shared/utils/cli/shell/BourneShell.java Repository: apache/maven-shared-utils Fixed Code: protected String getExecutionPreamble() { if ( getWorkingDirectoryAsString() == null ) { return null; } String dir = getWorkingDirectoryAsString(); return "cd " + quoteOneItem( dir, false ) + " && "; }
[ "CWE-116" ]
CVE-2022-29599
HIGH
7.5
apache/maven-shared-utils
getExecutionPreamble
src/main/java/org/apache/maven/shared/utils/cli/shell/BourneShell.java
bb6b6a4bf44cc09f120068bd29fed3e9ab10eb6f
1
Analyze the following code function for security vulnerabilities
public static String stripSegmentFromPath(String path, String segment) { if (!path.startsWith(segment)) { // The context path probably contains special characters that are encoded in the URL try { segment = URIUtil.encodePath(segment); } catch (URIException e) { LOGGER.warn("Invalid path: [" + segment + "]"); } } if (!path.startsWith(segment)) { // Some clients also encode -, although it's allowed in the path segment = segment.replaceAll("-", "%2D"); } if (!path.startsWith(segment)) { // Can't find the context path in the URL (shouldn't happen), just skip to the next path segment return path.substring(path.indexOf('/', 1)); } return path.substring(segment.length()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: stripSegmentFromPath 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
stripSegmentFromPath
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 unbroadcastIntent(IApplicationThread caller, Intent intent, int userId) throws RemoteException;
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: unbroadcastIntent File: core/java/android/app/IActivityManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
unbroadcastIntent
core/java/android/app/IActivityManager.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
protected boolean removeEldestEntry(Map.Entry<String, SyntaxHighlighter> eldest) { return size() > HIGHLIGHTER_CACHE_SIZE; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeEldestEntry File: console/src/main/java/org/jline/console/impl/DefaultPrinter.java Repository: jline/jline3 The code follows secure coding practices.
[ "CWE-787" ]
CVE-2023-50572
MEDIUM
5.5
jline/jline3
removeEldestEntry
console/src/main/java/org/jline/console/impl/DefaultPrinter.java
f3c60a3e6255e8e0c20d5043a4fe248446f292bb
0
Analyze the following code function for security vulnerabilities
private long getLockTimeout(int userId) { // if the screen turned off because of timeout or the user hit the power button, // and we don't need to lock immediately, set an alarm // to enable it a bit later (i.e, give the user a chance // to turn the screen back on within a certain window without // having to unlock the screen) final ContentResolver cr = mContext.getContentResolver(); // From SecuritySettings final long lockAfterTimeout = Settings.Secure.getInt(cr, Settings.Secure.LOCK_SCREEN_LOCK_AFTER_TIMEOUT, KEYGUARD_LOCK_AFTER_DELAY_DEFAULT); // From DevicePolicyAdmin final long policyTimeout = mLockPatternUtils.getDevicePolicyManager() .getMaximumTimeToLock(null, userId); long timeout; if (policyTimeout <= 0) { timeout = lockAfterTimeout; } else { // From DisplaySettings long displayTimeout = Settings.System.getInt(cr, SCREEN_OFF_TIMEOUT, KEYGUARD_DISPLAY_TIMEOUT_DELAY_DEFAULT); // policy in effect. Make sure we don't go beyond policy limit. displayTimeout = Math.max(displayTimeout, 0); // ignore negative values timeout = Math.min(policyTimeout - displayTimeout, lockAfterTimeout); timeout = Math.max(timeout, 0); } return timeout; }
Vulnerability Classification: - CWE: CWE-Other - CVE: CVE-2023-21281 - Severity: HIGH - CVSS Score: 7.8 Description: Use Settings.System.getIntForUser instead of getInt to make sure user specific settings are used Bug: 265431505 Test: atest KeyguardViewMediatorTest (cherry picked from commit 625e009fc195ba5d658ca2d78ebb23d2770cc6c4) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:dbdfadc24c81453c9c51e0d549b0ace924f4341e) Merged-In: I66a660c091c90a957a0fd1e144c013840db3f47e Change-Id: I66a660c091c90a957a0fd1e144c013840db3f47e Function: getLockTimeout File: packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java Repository: android Fixed Code: private long getLockTimeout(int userId) { // if the screen turned off because of timeout or the user hit the power button, // and we don't need to lock immediately, set an alarm // to enable it a bit later (i.e, give the user a chance // to turn the screen back on within a certain window without // having to unlock the screen) final ContentResolver cr = mContext.getContentResolver(); // From SecuritySettings final long lockAfterTimeout = Settings.Secure.getIntForUser(cr, Settings.Secure.LOCK_SCREEN_LOCK_AFTER_TIMEOUT, KEYGUARD_LOCK_AFTER_DELAY_DEFAULT, userId); // From DevicePolicyAdmin final long policyTimeout = mLockPatternUtils.getDevicePolicyManager() .getMaximumTimeToLock(null, userId); long timeout; if (policyTimeout <= 0) { timeout = lockAfterTimeout; } else { // From DisplaySettings long displayTimeout = Settings.System.getIntForUser(cr, SCREEN_OFF_TIMEOUT, KEYGUARD_DISPLAY_TIMEOUT_DELAY_DEFAULT, userId); // policy in effect. Make sure we don't go beyond policy limit. displayTimeout = Math.max(displayTimeout, 0); // ignore negative values timeout = Math.min(policyTimeout - displayTimeout, lockAfterTimeout); timeout = Math.max(timeout, 0); } return timeout; }
[ "CWE-Other" ]
CVE-2023-21281
HIGH
7.8
android
getLockTimeout
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
badb243574d7fca9aa89152d9d25eeb4f8615385
1
Analyze the following code function for security vulnerabilities
@GET @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, MediaType.APPLICATION_ATOM_XML}) @Path("{username}") public OnmsUser getUser(@Context final SecurityContext securityContext, @PathParam("username") final String username) { final OnmsUser user = getOnmsUser(username); return filterUserPassword(securityContext, user); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getUser File: opennms-webapp-rest/src/main/java/org/opennms/web/rest/v1/UserRestService.java Repository: OpenNMS/opennms The code follows secure coding practices.
[ "CWE-269" ]
CVE-2023-0872
HIGH
8
OpenNMS/opennms
getUser
opennms-webapp-rest/src/main/java/org/opennms/web/rest/v1/UserRestService.java
34ab169a74b2bc489ab06d0dbf33fee1ed94c93c
0
Analyze the following code function for security vulnerabilities
public ParcelFileDescriptor openContentUri(Uri uri) throws RemoteException { enforceNotIsolatedCaller("openContentUri"); final int userId = UserHandle.getCallingUserId(); String name = uri.getAuthority(); ContentProviderHolder cph = getContentProviderExternalUnchecked(name, null, userId); ParcelFileDescriptor pfd = null; if (cph != null) { // We record the binder invoker's uid in thread-local storage before // going to the content provider to open the file. Later, in the code // that handles all permissions checks, we look for this uid and use // that rather than the Activity Manager's own uid. The effect is that // we do the check against the caller's permissions even though it looks // to the content provider like the Activity Manager itself is making // the request. Binder token = new Binder(); sCallerIdentity.set(new Identity( token, Binder.getCallingPid(), Binder.getCallingUid())); try { pfd = cph.provider.openFile(null, uri, "r", null, token); } catch (FileNotFoundException e) { // do nothing; pfd will be returned null } finally { // Ensure that whatever happens, we clean up the identity state sCallerIdentity.remove(); } // We've got the fd now, so we're done with the provider. removeContentProviderExternalUnchecked(name, null, userId); } else { Slog.d(TAG, "Failed to get provider for authority '" + name + "'"); } return pfd; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: openContentUri 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
openContentUri
services/core/java/com/android/server/am/ActivityManagerService.java
aaa0fee0d7a8da347a0c47cef5249c70efee209e
0
Analyze the following code function for security vulnerabilities
IIntentSender getIntentSenderLocked(int type, String packageName, int callingUid, int userId, IBinder token, String resultWho, int requestCode, Intent[] intents, String[] resolvedTypes, int flags, Bundle options) { if (DEBUG_MU) Slog.v(TAG_MU, "getIntentSenderLocked(): uid=" + callingUid); ActivityRecord activity = null; if (type == ActivityManager.INTENT_SENDER_ACTIVITY_RESULT) { activity = ActivityRecord.isInStackLocked(token); if (activity == null) { return null; } if (activity.finishing) { return null; } } final boolean noCreate = (flags&PendingIntent.FLAG_NO_CREATE) != 0; final boolean cancelCurrent = (flags&PendingIntent.FLAG_CANCEL_CURRENT) != 0; final boolean updateCurrent = (flags&PendingIntent.FLAG_UPDATE_CURRENT) != 0; flags &= ~(PendingIntent.FLAG_NO_CREATE|PendingIntent.FLAG_CANCEL_CURRENT |PendingIntent.FLAG_UPDATE_CURRENT); PendingIntentRecord.Key key = new PendingIntentRecord.Key( type, packageName, activity, resultWho, requestCode, intents, resolvedTypes, flags, options, userId); WeakReference<PendingIntentRecord> ref; ref = mIntentSenderRecords.get(key); PendingIntentRecord rec = ref != null ? ref.get() : null; if (rec != null) { if (!cancelCurrent) { if (updateCurrent) { if (rec.key.requestIntent != null) { rec.key.requestIntent.replaceExtras(intents != null ? intents[intents.length - 1] : null); } if (intents != null) { intents[intents.length-1] = rec.key.requestIntent; rec.key.allIntents = intents; rec.key.allResolvedTypes = resolvedTypes; } else { rec.key.allIntents = null; rec.key.allResolvedTypes = null; } } return rec; } rec.canceled = true; mIntentSenderRecords.remove(key); } if (noCreate) { return rec; } rec = new PendingIntentRecord(this, key, callingUid); mIntentSenderRecords.put(key, rec.ref); if (type == ActivityManager.INTENT_SENDER_ACTIVITY_RESULT) { if (activity.pendingResults == null) { activity.pendingResults = new HashSet<WeakReference<PendingIntentRecord>>(); } activity.pendingResults.add(rec.ref); } return rec; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getIntentSenderLocked File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-2500
MEDIUM
4.3
android
getIntentSenderLocked
services/core/java/com/android/server/am/ActivityManagerService.java
9878bb99b77c3681f0fda116e2964bac26f349c3
0
Analyze the following code function for security vulnerabilities
protected Document loadXML(String filename) throws IOException, ParserConfigurationException, SAXException { DocumentBuilder builder = DocumentBuilderFactory.newInstance() .newDocumentBuilder(); return builder.parse(new File(filename)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: loadXML File: dspace-api/src/main/java/org/dspace/app/itemimport/ItemImportServiceImpl.java Repository: DSpace The code follows secure coding practices.
[ "CWE-22" ]
CVE-2022-31195
HIGH
7.2
DSpace
loadXML
dspace-api/src/main/java/org/dspace/app/itemimport/ItemImportServiceImpl.java
7af52a0883a9dbc475cf3001f04ed11b24c8a4c0
0
Analyze the following code function for security vulnerabilities
private ArrayNode parseArray(int nextState) throws IOException { // array = array-open [ array-values ] ws-comment-newline array-close // array-values = ws-comment-newline val ws-comment-newline array-sep array-values // array-values =/ ws-comment-newline val ws-comment-newline [ array-sep ] pollExpected(TomlToken.ARRAY_OPEN, Lexer.EXPECT_VALUE); TomlArrayNode node = (TomlArrayNode) factory.arrayNode(); while (true) { TomlToken token = peek(); if (token == TomlToken.ARRAY_CLOSE) { break; } JsonNode value = parseValue(Lexer.EXPECT_ARRAY_SEP); node.add(value); TomlToken sepToken = peek(); if (sepToken == TomlToken.ARRAY_CLOSE) { break; } else if (sepToken == TomlToken.COMMA) { pollExpected(TomlToken.COMMA, Lexer.EXPECT_VALUE); } else { throw errorContext.atPosition(lexer).unexpectedToken(sepToken, "comma or array end"); } } pollExpected(TomlToken.ARRAY_CLOSE, nextState); node.closed = true; return node; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: parseArray File: toml/src/main/java/com/fasterxml/jackson/dataformat/toml/Parser.java Repository: FasterXML/jackson-dataformats-text The code follows secure coding practices.
[ "CWE-787" ]
CVE-2023-3894
HIGH
7.5
FasterXML/jackson-dataformats-text
parseArray
toml/src/main/java/com/fasterxml/jackson/dataformat/toml/Parser.java
20a209387931dba31e1a027b74976911c3df39fe
0
Analyze the following code function for security vulnerabilities
private static boolean isBase64(char ch) { return 0<=ch && ch<128 && IS_BASE64[ch]; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isBase64 File: core/src/main/java/hudson/util/SecretRewriter.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-326" ]
CVE-2017-2598
MEDIUM
4
jenkinsci/jenkins
isBase64
core/src/main/java/hudson/util/SecretRewriter.java
e6aa166246d1734f4798a9e31f78842f4c85c28b
0
Analyze the following code function for security vulnerabilities
public void setStyle(Class style) { cssFouffa.setStyle(style); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setStyle 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
setStyle
org/w3c/css/css/StyleSheetParser.java
e5c09a9119167d3064db786d5f00d730b584a53b
0
Analyze the following code function for security vulnerabilities
void cancelInitializing() { if (mStartingData != null) { // Remove orphaned starting window. if (DEBUG_VISIBILITY) Slog.w(TAG_VISIBILITY, "Found orphaned starting window " + this); removeStartingWindowAnimation(false /* prepareAnimation */); } if (!mDisplayContent.mUnknownAppVisibilityController.allResolved()) { // Remove the unknown visibility record because an invisible activity shouldn't block // the keyguard transition. mDisplayContent.mUnknownAppVisibilityController.appRemovedOrHidden(this); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: cancelInitializing File: services/core/java/com/android/server/wm/ActivityRecord.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21145
HIGH
7.8
android
cancelInitializing
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
public Integer getServerIndex() { return serverIndex; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getServerIndex File: samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java Repository: OpenAPITools/openapi-generator The code follows secure coding practices.
[ "CWE-668" ]
CVE-2021-21430
LOW
2.1
OpenAPITools/openapi-generator
getServerIndex
samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
@Override public ActivityManager.TaskDescription getTaskDescription(int id) { synchronized (this) { enforceCallerIsRecentsOrHasPermission(MANAGE_ACTIVITY_STACKS, "getTaskDescription()"); final TaskRecord tr = mStackSupervisor.anyTaskForIdLocked(id, MATCH_TASK_IN_STACKS_OR_RECENT_TASKS); if (tr != null) { return tr.lastTaskDescription; } } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTaskDescription 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
getTaskDescription
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
protected abstract VaadinContext constructVaadinContext();
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: constructVaadinContext File: flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java Repository: vaadin/flow The code follows secure coding practices.
[ "CWE-203" ]
CVE-2021-31404
LOW
1.9
vaadin/flow
constructVaadinContext
flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
621ef1b322737d963bee624b2d2e38cd739903d9
0
Analyze the following code function for security vulnerabilities
public Marker createMarker() { return new Marker( arguments.size() ); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createMarker File: src/main/java/org/codehaus/plexus/util/cli/Commandline.java Repository: codehaus-plexus/plexus-utils The code follows secure coding practices.
[ "CWE-78" ]
CVE-2017-1000487
HIGH
7.5
codehaus-plexus/plexus-utils
createMarker
src/main/java/org/codehaus/plexus/util/cli/Commandline.java
b38a1b3a4352303e4312b2bb601a0d7ec6e28f41
0
Analyze the following code function for security vulnerabilities
public Arg createArg( boolean insertAtStart ) { Arg argument = new Argument(); if ( insertAtStart ) { arguments.insertElementAt( argument, 0 ); } else { arguments.addElement( argument ); } return argument; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createArg File: src/main/java/org/codehaus/plexus/util/cli/Commandline.java Repository: codehaus-plexus/plexus-utils The code follows secure coding practices.
[ "CWE-78" ]
CVE-2017-1000487
HIGH
7.5
codehaus-plexus/plexus-utils
createArg
src/main/java/org/codehaus/plexus/util/cli/Commandline.java
b38a1b3a4352303e4312b2bb601a0d7ec6e28f41
0
Analyze the following code function for security vulnerabilities
public static String getHomeUrl(HttpServletRequest request) { return request.getContextPath() + "/"; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getHomeUrl File: common/src/main/java/com/zrlog/web/util/WebTools.java Repository: 94fzb/zrlog The code follows secure coding practices.
[ "CWE-79" ]
CVE-2020-21316
MEDIUM
4.3
94fzb/zrlog
getHomeUrl
common/src/main/java/com/zrlog/web/util/WebTools.java
b921c1ae03b8290f438657803eee05226755c941
0
Analyze the following code function for security vulnerabilities
private void verifyShellState() { if ( shell.getWorkingDirectory() == null ) { shell.setWorkingDirectory( workingDir ); } if ( shell.getExecutable() == null ) { shell.setExecutable( executable ); } }
Vulnerability Classification: - CWE: CWE-78 - CVE: CVE-2017-1000487 - Severity: HIGH - CVSS Score: 7.5 Description: [PLXUTILS-161] Commandline shell injection problems Patch by Charles Duffy, applied unmodified Function: verifyShellState File: src/main/java/org/codehaus/plexus/util/cli/Commandline.java Repository: codehaus-plexus/plexus-utils Fixed Code: private void verifyShellState() { if ( shell.getWorkingDirectory() == null ) { shell.setWorkingDirectory( workingDir ); } if ( shell.getOriginalExecutable() == null ) { shell.setExecutable( executable ); } }
[ "CWE-78" ]
CVE-2017-1000487
HIGH
7.5
codehaus-plexus/plexus-utils
verifyShellState
src/main/java/org/codehaus/plexus/util/cli/Commandline.java
b38a1b3a4352303e4312b2bb601a0d7ec6e28f41
1
Analyze the following code function for security vulnerabilities
private boolean isFinancedDeviceOwner(CallerIdentity caller) { synchronized (getLockObject()) { return isDeviceOwnerLocked(caller) && getDeviceOwnerTypeLocked( mOwners.getDeviceOwnerPackageName()) == DEVICE_OWNER_TYPE_FINANCED; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isFinancedDeviceOwner File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2023-21284
MEDIUM
5.5
android
isFinancedDeviceOwner
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
String getName() { return mName; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getName File: src/com/android/certinstaller/CredentialHelper.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-2422
HIGH
9.3
android
getName
src/com/android/certinstaller/CredentialHelper.java
70dde9870e9450e10418a32206ac1bb30f036b2c
0
Analyze the following code function for security vulnerabilities
private boolean checkBootAnimationCompleteLocked() { if (SystemService.isRunning(BOOT_ANIMATION_SERVICE)) { mH.removeMessages(H.CHECK_IF_BOOT_ANIMATION_FINISHED); mH.sendEmptyMessageDelayed(H.CHECK_IF_BOOT_ANIMATION_FINISHED, BOOT_ANIMATION_POLL_INTERVAL); if (DEBUG_BOOT) Slog.i(TAG, "checkBootAnimationComplete: Waiting for anim complete"); return false; } if (DEBUG_BOOT) Slog.i(TAG, "checkBootAnimationComplete: Animation complete!"); return true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkBootAnimationCompleteLocked File: services/core/java/com/android/server/wm/WindowManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3875
HIGH
7.2
android
checkBootAnimationCompleteLocked
services/core/java/com/android/server/wm/WindowManagerService.java
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
0
Analyze the following code function for security vulnerabilities
private void setupActions() { archiveAction = new DockingAction("Archive Project", getName()) { @Override public void actionPerformed(ActionContext context) { archiveProject(); } }; ProjectManager projectManager = tool.getProjectManager(); String[] archiveMenuPath = { ToolConstants.MENU_FILE, "Archive Current Project..." }; archiveAction.setMenuBarData(new MenuData(archiveMenuPath, PROJECT_GROUP_C_2)); archiveAction.setEnabled(projectManager.getActiveProject() != null); archiveAction.setHelpLocation(new HelpLocation("FrontEndPlugin", "Archive_Project")); restoreAction = new DockingAction("Restore Archived Project", getName()) { @Override public void actionPerformed(ActionContext context) { restoreProject(); } }; String[] restoreMenuPath = { ToolConstants.MENU_FILE, "Restore Project..." }; restoreAction.setMenuBarData(new MenuData(restoreMenuPath, PROJECT_GROUP_C_2)); restoreAction.setEnabled(projectManager.getActiveProject() == null); restoreAction.setHelpLocation(new HelpLocation("FrontEndPlugin", "Restore_Project")); if (tool instanceof FrontEndTool) { tool.addAction(archiveAction); tool.addAction(restoreAction); ((FrontEndTool) tool).addProjectListener(this); } if (tool.getProject() == null) { archiveAction.setEnabled(false); } else { restoreAction.setEnabled(false); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setupActions File: Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/archive/ArchivePlugin.java Repository: NationalSecurityAgency/ghidra The code follows secure coding practices.
[ "CWE-22" ]
CVE-2019-13623
MEDIUM
6.8
NationalSecurityAgency/ghidra
setupActions
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/archive/ArchivePlugin.java
6c0171c9200b4490deb94abf3c92d1b3da59f9bf
0
Analyze the following code function for security vulnerabilities
private boolean canHideNavigationBar() { return mHasNavigationBar && !mAccessibilityManager.isTouchExplorationEnabled(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: canHideNavigationBar File: policy/src/com/android/internal/policy/impl/PhoneWindowManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-0812
MEDIUM
6.6
android
canHideNavigationBar
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
84669ca8de55d38073a0dcb01074233b0a417541
0
Analyze the following code function for security vulnerabilities
private void pushSessionDestroyed() { synchronized (mLock) { // This is the only method that may be (and can only be) called // after the session is destroyed. if (!mDestroyed) { return; } } for (ISessionControllerCallbackHolder holder : mControllerCallbackHolders) { try { holder.mCallback.asBinder().unlinkToDeath(holder.mDeathMonitor, 0); holder.mCallback.onSessionDestroyed(); } catch (NoSuchElementException e) { logCallbackException("error unlinking to binder death", holder, e); } catch (DeadObjectException e) { logCallbackException("Removing dead callback in pushSessionDestroyed", holder, e); } catch (RemoteException e) { logCallbackException("unexpected exception in pushSessionDestroyed", holder, e); } } // After notifying clear all listeners mControllerCallbackHolders.clear(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: pushSessionDestroyed 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
pushSessionDestroyed
services/core/java/com/android/server/media/MediaSessionRecord.java
06e772e05514af4aa427641784c5eec39a892ed3
0
Analyze the following code function for security vulnerabilities
public Map<String, String> getServiceFriendlyNames() { return mServiceFriendlyNames; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getServiceFriendlyNames File: framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java Repository: android The code follows secure coding practices.
[ "CWE-120" ]
CVE-2023-21243
MEDIUM
5.5
android
getServiceFriendlyNames
framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java
5b49b8711efaadadf5052ba85288860c2d7ca7a6
0
Analyze the following code function for security vulnerabilities
@UnsupportedAppUsage public @NonNull InputStream openNonAsset(@NonNull String fileName) throws IOException { return openNonAsset(0, fileName, ACCESS_STREAMING); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: openNonAsset 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
openNonAsset
core/java/android/content/res/AssetManager.java
c3bc12c484ef3bbca4cec19234437c45af5e584d
0
Analyze the following code function for security vulnerabilities
public boolean canDelete(Post showPost, Profile authUser) { return canDelete(showPost, authUser, null); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: canDelete File: src/main/java/com/erudika/scoold/utils/ScooldUtils.java Repository: Erudika/scoold The code follows secure coding practices.
[ "CWE-130" ]
CVE-2022-1543
MEDIUM
6.5
Erudika/scoold
canDelete
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
62a0e92e1486ddc17676a7ead2c07ff653d167ce
0
Analyze the following code function for security vulnerabilities
private int computeSize(ByteBuffer[] buffers, int offset, int length) throws IllegalArgumentException { debug("JSSEngine: computeSize()"); int result = 0; if (buffers == null || buffers.length == 0) { debug("JSSEngine.compueSize(): no buffers - result=" + result); return result; } // Semantics of arguments: // // - buffers is where we're reading/writing application data. // - offset is the index of the first buffer we read/write to. // - length is the total number of buffers we read/write to. // // We use a relative index and an absolute index to handle these // constraints. for (int rel_index = 0; rel_index < length; rel_index++) { int index = offset + rel_index; if (index >= buffers.length) { throw new IllegalArgumentException("offset (" + offset + ") or length (" + length + ") exceeds contract based on number of buffers (" + buffers.length + ")"); } if (rel_index == 0 && buffers[index] == null) { // If our first buffer is null, assume the rest are and skip // everything else. This commonly happens when null is passed // as the src parameter to wrap or when null is passed as the // dst parameter to unwrap. debug("JSSEngine.computeSize(): null first buffer - result=" + result); return result; } if (buffers[index] == null) { throw new IllegalArgumentException("Buffer at index " + index + " is null."); } result += buffers[index].remaining(); } debug("JSSEngine.computeSize(): result=" + result); return result; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: computeSize File: src/main/java/org/mozilla/jss/ssl/javax/JSSEngineReferenceImpl.java Repository: dogtagpki/jss The code follows secure coding practices.
[ "CWE-401" ]
CVE-2021-4213
HIGH
7.5
dogtagpki/jss
computeSize
src/main/java/org/mozilla/jss/ssl/javax/JSSEngineReferenceImpl.java
5922560a78d0dee61af8a33cc9cfbf4cfa291448
0
Analyze the following code function for security vulnerabilities
public String getLabel() { return label; }
Vulnerability Classification: - CWE: CWE-79 - CVE: CVE-2023-47324 - Severity: MEDIUM - CVSS Score: 5.4 Description: Bug #13811: fixing stored XSS leading to full account takeover * making HTML sanitize processing accessible for JSTL instructions * sanitizing user notification title and contents on registering * sanitizing user notification title and contents on rendering * sanitizing browse bar parts * modifying the user and group saving action names in order to get the user token verifications * applying the token validation from component request router abstraction Function: getLabel File: core-web/src/main/java/org/silverpeas/core/web/util/viewgenerator/html/browsebars/BrowseBarElement.java Repository: Silverpeas/Silverpeas-Core Fixed Code: public String getLabel() { return HtmlSanitizer.get().sanitize(label); }
[ "CWE-79" ]
CVE-2023-47324
MEDIUM
5.4
Silverpeas/Silverpeas-Core
getLabel
core-web/src/main/java/org/silverpeas/core/web/util/viewgenerator/html/browsebars/BrowseBarElement.java
9a55728729a3b431847045c674b3e883507d1e1a
1
Analyze the following code function for security vulnerabilities
@Override public HttpHeaders clear() { headers.clear(); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: clear File: codec-http/src/main/java/io/netty/handler/codec/http/DefaultHttpHeaders.java Repository: netty The code follows secure coding practices.
[ "CWE-444" ]
CVE-2021-43797
MEDIUM
4.3
netty
clear
codec-http/src/main/java/io/netty/handler/codec/http/DefaultHttpHeaders.java
07aa6b5938a8b6ed7a6586e066400e2643897323
0
Analyze the following code function for security vulnerabilities
public String getName() { return name; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getName File: src/gribbit/auth/Cookie.java Repository: lukehutch/gribbit The code follows secure coding practices.
[ "CWE-346" ]
CVE-2014-125071
MEDIUM
5.2
lukehutch/gribbit
getName
src/gribbit/auth/Cookie.java
620418df247aebda3dd4be1dda10fe229ea505dd
0
Analyze the following code function for security vulnerabilities
@Override public void cleanup() { if(nativeVideo != null) { nativeVideo.stopPlayback(); fireMediaStateChange(State.Paused); } nativeVideo = null; if (nativePlayer && curentForm != null) { curentForm.showBack(); curentForm = null; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: cleanup 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
cleanup
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
public Date parseDate(String str) { try { return dateFormat.parse(str); } catch (java.text.ParseException e) { throw new RuntimeException(e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: parseDate File: samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiClient.java Repository: OpenAPITools/openapi-generator The code follows secure coding practices.
[ "CWE-668" ]
CVE-2021-21430
LOW
2.1
OpenAPITools/openapi-generator
parseDate
samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
@UnsupportedAppUsage private int getBaseLayoutResource() { return R.layout.notification_template_material_base; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getBaseLayoutResource File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
getBaseLayoutResource
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
ActivityStarter setStartFlags(int startFlags) { mRequest.startFlags = startFlags; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setStartFlags File: services/core/java/com/android/server/wm/ActivityStarter.java Repository: android The code follows secure coding practices.
[ "CWE-269" ]
CVE-2023-21269
HIGH
7.8
android
setStartFlags
services/core/java/com/android/server/wm/ActivityStarter.java
70ec64dc5a2a816d6aa324190a726a85fd749b30
0
Analyze the following code function for security vulnerabilities
@GetMapping("/delete") public ResultDTO<Void> deleteAppInfo(Long appId) { appInfoRepository.deleteById(appId); return ResultDTO.success(null); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: deleteAppInfo File: powerjob-server/src/main/java/com/github/kfcfans/powerjob/server/web/controller/AppInfoController.java Repository: PowerJob The code follows secure coding practices.
[ "CWE-522" ]
CVE-2020-28865
MEDIUM
5
PowerJob
deleteAppInfo
powerjob-server/src/main/java/com/github/kfcfans/powerjob/server/web/controller/AppInfoController.java
464ce2dc0ca3e65fa1dc428239829890c52a413a
0
Analyze the following code function for security vulnerabilities
private UserInfo createRestrictedProfile() { UserInfo newUserInfo = mUserManager.createRestrictedProfile(mAddingUserName); Utils.assignDefaultPhoto(getActivity(), newUserInfo.id); return newUserInfo; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createRestrictedProfile 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
createRestrictedProfile
src/com/android/settings/users/UserSettings.java
bd5d5176c74021e8cf4970f93f273ba3023c3d72
0
Analyze the following code function for security vulnerabilities
public AwTestContainerView createDetachedAwTestContainerView( final AwContentsClient awContentsClient, boolean supportsLegacyQuirks) { final TestDependencyFactory testDependencyFactory = createTestDependencyFactory(); boolean allowHardwareAcceleration = isHardwareAcceleratedTest(); final AwTestContainerView testContainerView = testDependencyFactory.createAwTestContainerView(getActivity(), allowHardwareAcceleration); AwSettings awSettings = testDependencyFactory.createAwSettings(getActivity(), supportsLegacyQuirks); testContainerView.initialize(new AwContents(mBrowserContext, testContainerView, testContainerView.getContext(), testContainerView.getInternalAccessDelegate(), testContainerView.getNativeDrawGLFunctorFactory(), awContentsClient, awSettings, testDependencyFactory)); return testContainerView; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createDetachedAwTestContainerView File: android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java Repository: chromium The code follows secure coding practices.
[ "CWE-254" ]
CVE-2016-5155
MEDIUM
4.3
chromium
createDetachedAwTestContainerView
android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java
b8dcfeb065bbfd777cdc5f5433da9a87f25e6ec6
0
Analyze the following code function for security vulnerabilities
@Test public void startTxNullConnection(TestContext context) { postgresClientNullConnection().startTx(context.asyncAssertFailure()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: startTxNullConnection 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
startTxNullConnection
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
public static void stopEmbeddedPostgres() { if (embeddedPostgres != null) { closeAllClients(); LogUtil.formatLogMessage(PostgresClient.class.getName(), "stopEmbeddedPostgres", "called stop on embedded postgress ..."); embeddedPostgres.stop(); embeddedPostgres = null; embeddedMode = false; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: stopEmbeddedPostgres File: domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java Repository: folio-org/raml-module-builder The code follows secure coding practices.
[ "CWE-89" ]
CVE-2019-15534
HIGH
7.5
folio-org/raml-module-builder
stopEmbeddedPostgres
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
public static void copy(File source, File target) { if (!source.exists()) { throw new IllegalArgumentException("Source does not exist"); } if (source.isDirectory()) { copyDirectory(source, target); } else { copyFile(source, target, -1); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: copy File: hazelcast/src/main/java/com/hazelcast/nio/IOUtil.java Repository: hazelcast The code follows secure coding practices.
[ "CWE-502" ]
CVE-2016-10750
MEDIUM
6.8
hazelcast
copy
hazelcast/src/main/java/com/hazelcast/nio/IOUtil.java
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
0
Analyze the following code function for security vulnerabilities
@Override public IActivityContainer createStackOnDisplay(int displayId) throws RemoteException { enforceCallingPermission(MANAGE_ACTIVITY_STACKS, "createStackOnDisplay()"); synchronized (this) { final int stackId = mStackSupervisor.getNextStackId(); final ActivityStack stack = mStackSupervisor.createStackOnDisplay(stackId, displayId, true /*onTop*/); if (stack == null) { return null; } return stack.mActivityContainer; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createStackOnDisplay File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3912
HIGH
9.3
android
createStackOnDisplay
services/core/java/com/android/server/am/ActivityManagerService.java
6c049120c2d749f0c0289d822ec7d0aa692f55c5
0
Analyze the following code function for security vulnerabilities
private void getUniqueLinkedEntityReferences(BaseObject xobject, EntityType entityType, Set<EntityReference> references, XWikiContext xcontext) { if (xobject == null) { return; } BaseClass xclass = xobject.getXClass(xcontext); for (Object fieldClass : xclass.getProperties()) { // Wiki content stored in xobjects if (fieldClass instanceof TextAreaClass && ((TextAreaClass) fieldClass).isWikiContent()) { TextAreaClass textAreaClass = (TextAreaClass) fieldClass; PropertyInterface field = xobject.getField(textAreaClass.getName()); // Make sure the field is the right type (might happen while a document is being migrated) if (field instanceof LargeStringProperty) { LargeStringProperty largeField = (LargeStringProperty) field; try { XDOM dom = parseContent(getSyntax(), largeField.getValue(), getDocumentReference()); getUniqueLinkedEntityReferences(dom, entityType, references); } catch (XWikiException e) { LOGGER.warn("Failed to extract links from xobject property [{}], skipping it. Error: {}", largeField.getReference(), ExceptionUtils.getRootCauseMessage(e)); } } } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getUniqueLinkedEntityReferences File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-787" ]
CVE-2023-26470
HIGH
7.5
xwiki/xwiki-platform
getUniqueLinkedEntityReferences
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
db3d1c62fc5fb59fefcda3b86065d2d362f55164
0
Analyze the following code function for security vulnerabilities
private void initDiscoveryMulticast(Configuration pConfig) { String url = findAgentUrl(pConfig); if (url != null || listenForDiscoveryMcRequests(pConfig)) { backendManager.getAgentDetails().setUrl(url); try { discoveryMulticastResponder = new DiscoveryMulticastResponder(backendManager,restrictor,logHandler); discoveryMulticastResponder.start(); } catch (IOException e) { logHandler.error("Cannot start discovery multicast handler: " + e,e); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: initDiscoveryMulticast File: agent/core/src/main/java/org/jolokia/http/AgentServlet.java Repository: jolokia The code follows secure coding practices.
[ "CWE-79" ]
CVE-2018-1000129
MEDIUM
4.3
jolokia
initDiscoveryMulticast
agent/core/src/main/java/org/jolokia/http/AgentServlet.java
5895d5c137c335e6b473e9dcb9baf748851bbc5f
0
Analyze the following code function for security vulnerabilities
public Builder removeIOExceptionFilter(IOExceptionFilter ioExceptionFilter) { ioExceptionFilters.remove(ioExceptionFilter); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removeIOExceptionFilter File: api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java Repository: AsyncHttpClient/async-http-client The code follows secure coding practices.
[ "CWE-345" ]
CVE-2013-7397
MEDIUM
4.3
AsyncHttpClient/async-http-client
removeIOExceptionFilter
api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java
df6ed70e86c8fc340ed75563e016c8baa94d7e72
0
Analyze the following code function for security vulnerabilities
@Override public int getOrganizationColorForUser(int userHandle) { if (!mHasFeature) { return ActiveAdmin.DEF_ORGANIZATION_COLOR; } Preconditions.checkArgumentNonnegative(userHandle, "Invalid userId"); final CallerIdentity caller = getCallerIdentity(); Preconditions.checkCallAuthorization(hasFullCrossUsersPermission(caller, userHandle)); Preconditions.checkCallAuthorization(isManagedProfile(userHandle), "You can " + "not get organization color outside a managed profile, userId = %d", userHandle); synchronized (getLockObject()) { ActiveAdmin profileOwner = getProfileOwnerAdminLocked(userHandle); return (profileOwner != null) ? profileOwner.organizationColor : ActiveAdmin.DEF_ORGANIZATION_COLOR; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getOrganizationColorForUser File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2023-21284
MEDIUM
5.5
android
getOrganizationColorForUser
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
@SuppressWarnings("unused") @CalledByNative private void updateFrameInfo( float scrollOffsetX, float scrollOffsetY, float pageScaleFactor, float minPageScaleFactor, float maxPageScaleFactor, float contentWidth, float contentHeight, float viewportWidth, float viewportHeight, float controlsOffsetYCss, float contentOffsetYCss, float overdrawBottomHeightCss) { TraceEvent.instant("ContentViewCore:updateFrameInfo"); // Adjust contentWidth/Height to be always at least as big as // the actual viewport (as set by onSizeChanged). final float deviceScale = mRenderCoordinates.getDeviceScaleFactor(); contentWidth = Math.max(contentWidth, mViewportWidthPix / (deviceScale * pageScaleFactor)); contentHeight = Math.max(contentHeight, mViewportHeightPix / (deviceScale * pageScaleFactor)); final float contentOffsetYPix = mRenderCoordinates.fromDipToPix(contentOffsetYCss); final boolean contentSizeChanged = contentWidth != mRenderCoordinates.getContentWidthCss() || contentHeight != mRenderCoordinates.getContentHeightCss(); final boolean scaleLimitsChanged = minPageScaleFactor != mRenderCoordinates.getMinPageScaleFactor() || maxPageScaleFactor != mRenderCoordinates.getMaxPageScaleFactor(); final boolean pageScaleChanged = pageScaleFactor != mRenderCoordinates.getPageScaleFactor(); final boolean scrollChanged = pageScaleChanged || scrollOffsetX != mRenderCoordinates.getScrollX() || scrollOffsetY != mRenderCoordinates.getScrollY(); final boolean contentOffsetChanged = contentOffsetYPix != mRenderCoordinates.getContentOffsetYPix(); final boolean needHidePopupZoomer = contentSizeChanged || scrollChanged; final boolean needUpdateZoomControls = scaleLimitsChanged || scrollChanged; final boolean needTemporarilyHideHandles = scrollChanged; if (needHidePopupZoomer) mPopupZoomer.hide(true); if (scrollChanged) { mContainerViewInternals.onScrollChanged( (int) mRenderCoordinates.fromLocalCssToPix(scrollOffsetX), (int) mRenderCoordinates.fromLocalCssToPix(scrollOffsetY), (int) mRenderCoordinates.getScrollXPix(), (int) mRenderCoordinates.getScrollYPix()); } mRenderCoordinates.updateFrameInfo( scrollOffsetX, scrollOffsetY, contentWidth, contentHeight, viewportWidth, viewportHeight, pageScaleFactor, minPageScaleFactor, maxPageScaleFactor, contentOffsetYPix); if (scrollChanged || contentOffsetChanged) { for (mGestureStateListenersIterator.rewind(); mGestureStateListenersIterator.hasNext();) { mGestureStateListenersIterator.next().onScrollOffsetOrExtentChanged( computeVerticalScrollOffset(), computeVerticalScrollExtent()); } } if (needTemporarilyHideHandles) temporarilyHideTextHandles(); if (needUpdateZoomControls) mZoomControlsDelegate.updateZoomControls(); if (contentOffsetChanged) updateHandleScreenPositions(); // Update offsets for fullscreen. final float controlsOffsetPix = controlsOffsetYCss * deviceScale; final float overdrawBottomHeightPix = overdrawBottomHeightCss * deviceScale; getContentViewClient().onOffsetsForFullscreenChanged( controlsOffsetPix, contentOffsetYPix, overdrawBottomHeightPix); if (mBrowserAccessibilityManager != null) { mBrowserAccessibilityManager.notifyFrameInfoInitialized(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateFrameInfo 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
updateFrameInfo
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
98a50b76141f0b14f292f49ce376e6554142d5e2
0
Analyze the following code function for security vulnerabilities
public boolean isMoved() { return move; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isMoved File: src/main/java/org/olat/core/commons/modules/bc/commands/CmdMoveCopy.java Repository: OpenOLAT The code follows secure coding practices.
[ "CWE-22" ]
CVE-2021-41152
MEDIUM
4
OpenOLAT
isMoved
src/main/java/org/olat/core/commons/modules/bc/commands/CmdMoveCopy.java
418bb509ffcb0e25ab4390563c6c47f0458583eb
0
Analyze the following code function for security vulnerabilities
public Descriptor<Publisher> getPublisher(String shortClassName) { return findDescriptor(shortClassName, Publisher.all()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPublisher 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
getPublisher
core/src/main/java/jenkins/model/Jenkins.java
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
0
Analyze the following code function for security vulnerabilities
private void openRestoredProject() { try { SwingUtilities.invokeAndWait(() -> { ProjectManager pm = plugin.getTool().getProjectManager(); try { Project project = pm.openProject(projectLocator, true, true); pm.rememberProject(projectLocator); FrontEndTool tool = (FrontEndTool) plugin.getTool(); tool.setActiveProject(project); } catch (NotOwnerException e) { // can't happen since resetOwner is true } catch (Exception e) { Msg.info(this, "Restore Archive: Error opening project: " + projectLocator.getName()); Msg.showError(this, null, "Restore Archive Error", "Failed to open newly restored project", e); } }); } catch (InvocationTargetException | InterruptedException e) { // ignore } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: openRestoredProject File: Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/archive/RestoreTask.java Repository: NationalSecurityAgency/ghidra The code follows secure coding practices.
[ "CWE-22" ]
CVE-2019-13623
MEDIUM
6.8
NationalSecurityAgency/ghidra
openRestoredProject
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/archive/RestoreTask.java
c15364e0a4bd2bcd3bdf13a35afd6ac9607a5164
0
Analyze the following code function for security vulnerabilities
public void setSCDsTypesExpected() { this.unsetTypeExpected(); int i=1; this.setTypeExpected(i, TypeNames.INT); // crf_id ++i; this.setTypeExpected(i, TypeNames.INT); // crf_version_id ++i; this.setTypeExpected(i, TypeNames.INT); // item_id ++i; this.setTypeExpected(i, TypeNames.STRING); // crf_version_oid ++i; this.setTypeExpected(i, TypeNames.STRING); // item_oid ++i; this.setTypeExpected(i, TypeNames.STRING); // control_item_name ++i; this.setTypeExpected(i, TypeNames.STRING); // option_value ++i; this.setTypeExpected(i, TypeNames.STRING); // message }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setSCDsTypesExpected File: core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java Repository: OpenClinica The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-24831
HIGH
7.5
OpenClinica
setSCDsTypesExpected
core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
b152cc63019230c9973965a98e4386ea5322c18f
0
Analyze the following code function for security vulnerabilities
@MediumTest @Test public void testBasicConferenceCall() throws Exception { makeConferenceCall(); }
Vulnerability Classification: - CWE: CWE-Other - CVE: CVE-2023-21283 - Severity: MEDIUM - CVSS Score: 5.5 Description: [conflict] Resolve StatusHints image exploit across user. am: a853f6ba61 Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/services/Telecomm/+/23463634 Fixes: 285211549 Fixes: 280797684 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:41042bd0c8e1e47c19dfdb2a378c70d2090b1e15) Merged-In: I69b0c64413ce3b5e8f56c4fbc5e195a5f5adb6d7 Change-Id: I69b0c64413ce3b5e8f56c4fbc5e195a5f5adb6d7 Function: testBasicConferenceCall File: tests/src/com/android/server/telecom/tests/BasicCallTests.java Repository: android Fixed Code: @MediumTest @Test public void testBasicConferenceCall() throws Exception { makeConferenceCall(null, null); }
[ "CWE-Other" ]
CVE-2023-21283
MEDIUM
5.5
android
testBasicConferenceCall
tests/src/com/android/server/telecom/tests/BasicCallTests.java
9b41a963f352fdb3da1da8c633d45280badfcb24
1
Analyze the following code function for security vulnerabilities
@Override public boolean installKeyPair(ComponentName who, String callerPackage, byte[] privKey, byte[] cert, byte[] chain, String alias, boolean requestAccess, boolean isUserSelectable) { final CallerIdentity caller = getCallerIdentity(who, callerPackage); final boolean isCallerDelegate = isCallerDelegate(caller, DELEGATION_CERT_INSTALL); final boolean isCredentialManagementApp = isCredentialManagementApp(caller); if (isPermissionCheckFlagEnabled()) { Preconditions.checkCallAuthorization( hasPermission(MANAGE_DEVICE_POLICY_CERTIFICATES, caller.getPackageName(), caller.getUserId()) || isCredentialManagementApp); } else { Preconditions.checkCallAuthorization((caller.hasAdminComponent() && (isProfileOwner(caller) || isDefaultDeviceOwner(caller))) || (caller.hasPackage() && (isCallerDelegate || isCredentialManagementApp))); } if (isCredentialManagementApp) { Preconditions.checkCallAuthorization(!isUserSelectable, "The credential " + "management app is not allowed to install a user selectable key pair"); Preconditions.checkCallAuthorization( isAliasInCredentialManagementAppPolicy(caller, alias), CREDENTIAL_MANAGEMENT_APP_INVALID_ALIAS_MSG); } checkCanExecuteOrThrowUnsafe(DevicePolicyManager.OPERATION_INSTALL_KEY_PAIR); final long id = mInjector.binderClearCallingIdentity(); try { final KeyChainConnection keyChainConnection = KeyChain.bindAsUser(mContext, caller.getUserHandle()); try { IKeyChainService keyChain = keyChainConnection.getService(); if (!keyChain.installKeyPair(privKey, cert, chain, alias, KeyStore.UID_SELF)) { logInstallKeyPairFailure(caller, isCredentialManagementApp); return false; } if (requestAccess) { keyChain.setGrant(caller.getUid(), alias, true); } keyChain.setUserSelectable(alias, isUserSelectable); DevicePolicyEventLogger .createEvent(DevicePolicyEnums.INSTALL_KEY_PAIR) .setAdmin(caller.getPackageName()) .setBoolean(/* isDelegate */ isCallerDelegate) .setStrings(isCredentialManagementApp ? CREDENTIAL_MANAGEMENT_APP : NOT_CREDENTIAL_MANAGEMENT_APP) .write(); return true; } catch (RemoteException e) { Slogf.e(LOG_TAG, "Installing certificate", e); } finally { keyChainConnection.close(); } } catch (InterruptedException e) { Slogf.w(LOG_TAG, "Interrupted while installing certificate", e); Thread.currentThread().interrupt(); } finally { mInjector.binderRestoreCallingIdentity(id); } logInstallKeyPairFailure(caller, isCredentialManagementApp); return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: installKeyPair 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
installKeyPair
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
@Override public void addWindowToken(IBinder token, int type) { WindowManagerService.this.addWindowToken(token, type); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addWindowToken File: services/core/java/com/android/server/wm/WindowManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3875
HIGH
7.2
android
addWindowToken
services/core/java/com/android/server/wm/WindowManagerService.java
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
0
Analyze the following code function for security vulnerabilities
private void migrateUserMatcher24(Element userMatcherElement) { String userMatcher; String userMatcherClass = userMatcherElement.attributeValue("class"); if (userMatcherClass.contains("Anyone")) { userMatcher = "anyone"; } else if (userMatcherClass.contains("CodeWriters")) { userMatcher = "code writers"; } else if (userMatcherClass.contains("CodeReaders")) { userMatcher = "code readers"; } else if (userMatcherClass.contains("IssueReaders")) { userMatcher = "issue readers"; } else if (userMatcherClass.contains("ProjectAdministrators")) { userMatcher = "project administrators"; } else if (userMatcherClass.contains("SpecifiedUser")) { userMatcher = "user(" + escapeValue24(userMatcherElement.elementText("userName").trim()) + ")"; } else { userMatcher = "group(" + escapeValue24(userMatcherElement.elementText("groupName").trim()) + ")"; } userMatcherElement.clearContent(); userMatcherElement.remove(userMatcherElement.attribute("class")); userMatcherElement.setText(userMatcher); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: migrateUserMatcher24 File: server-core/src/main/java/io/onedev/server/migration/DataMigrator.java Repository: theonedev/onedev The code follows secure coding practices.
[ "CWE-338" ]
CVE-2023-24828
HIGH
8.8
theonedev/onedev
migrateUserMatcher24
server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
d67dd9686897fe5e4ab881d749464aa7c06a68e5
0
Analyze the following code function for security vulnerabilities
public final NokogiriErrorHandler getNokogiriErrorHandler() { return errorHandler; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getNokogiriErrorHandler File: ext/java/nokogiri/XmlSaxParserContext.java Repository: sparklemotion/nokogiri The code follows secure coding practices.
[ "CWE-241" ]
CVE-2022-29181
MEDIUM
6.4
sparklemotion/nokogiri
getNokogiriErrorHandler
ext/java/nokogiri/XmlSaxParserContext.java
db05ba9a1bd4b90aa6c76742cf6102a7c7297267
0
Analyze the following code function for security vulnerabilities
protected abstract void doPost(HttpServletRequest httpRequest, HttpServletResponse httpResponse) throws IOException, ServletException;
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: doPost File: web/src/main/java/org/openmrs/web/filter/StartupFilter.java Repository: openmrs/openmrs-core The code follows secure coding practices.
[ "CWE-22" ]
CVE-2022-23612
MEDIUM
5
openmrs/openmrs-core
doPost
web/src/main/java/org/openmrs/web/filter/StartupFilter.java
db8454bf19a092a78d53ee4dba2af628b730a6e7
0
Analyze the following code function for security vulnerabilities
public String getURLFragment(EntityReference reference) { return StringUtils.join(extractListFromReference(reference), "/"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getURLFragment File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2023-35166
HIGH
8.8
xwiki/xwiki-platform
getURLFragment
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
0
Analyze the following code function for security vulnerabilities
protected boolean associate(String userId, Location location) { if (!isRunning()) { return false; } synchronized (_uid2Location) { Set<Location> locations = _uid2Location.computeIfAbsent(userId, k -> new HashSet<>()); boolean result = locations.add(location); if (_logger.isDebugEnabled()) { _logger.debug("Associations: {}", _uid2Location.size()); } // Logging below can generate hugely long lines. if (_logger.isTraceEnabled()) { _logger.trace("Associations: {}", _uid2Location); } return result; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: associate File: cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Seti.java Repository: cometd The code follows secure coding practices.
[ "CWE-863" ]
CVE-2022-24721
MEDIUM
5.5
cometd
associate
cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Seti.java
bb445a143fbf320f17c62e340455cd74acfb5929
0
Analyze the following code function for security vulnerabilities
private void addUserNow(final int userType) { synchronized (mUserLock) { mAddingUser = true; mAddingUserName = userType == USER_TYPE_USER ? getString(R.string.user_new_user_name) : getString(R.string.user_new_profile_name); //updateUserList(); new Thread() { public void run() { UserInfo user; // Could take a few seconds if (userType == USER_TYPE_USER) { user = createTrustedUser(); } else { user = createRestrictedProfile(); } if (user == null) { mAddingUser = false; return; } synchronized (mUserLock) { if (userType == USER_TYPE_USER) { mHandler.sendEmptyMessage(MESSAGE_UPDATE_LIST); mHandler.sendMessage(mHandler.obtainMessage( MESSAGE_SETUP_USER, user.id, user.serialNumber)); } else { mHandler.sendMessage(mHandler.obtainMessage( MESSAGE_CONFIG_USER, user.id, user.serialNumber)); } } } }.start(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addUserNow 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
addUserNow
src/com/android/settings/users/UserSettings.java
bd5d5176c74021e8cf4970f93f273ba3023c3d72
0
Analyze the following code function for security vulnerabilities
private void banConfigurationIfNecessary(int type, @Nullable String prefix, SettingsState settingsState) { // Banning should be performed only for Settings.Config and for non-shell reset calls if (!shouldBan(type)) { return; } if (prefix != null) { settingsState.banConfigurationLocked(prefix, getAllConfigFlags(prefix)); } else { Set<String> configPrefixes = settingsState.getAllConfigPrefixesLocked(); for (String configPrefix : configPrefixes) { settingsState.banConfigurationLocked(configPrefix, getAllConfigFlags(configPrefix)); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: banConfigurationIfNecessary File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40117
HIGH
7.8
android
banConfigurationIfNecessary
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
ff86ff28cf82124f8e65833a2dd8c319aea08945
0
Analyze the following code function for security vulnerabilities
@Override public final int startActivityFromRecents(int taskId, Bundle bOptions) { if (checkCallingPermission(START_TASKS_FROM_RECENTS) != PackageManager.PERMISSION_GRANTED) { String msg = "Permission Denial: startActivityFromRecents called without " + START_TASKS_FROM_RECENTS; Slog.w(TAG, msg); throw new SecurityException(msg); } final long origId = Binder.clearCallingIdentity(); try { synchronized (this) { return mStackSupervisor.startActivityFromRecentsInner(taskId, bOptions); } } finally { Binder.restoreCallingIdentity(origId); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: startActivityFromRecents File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3912
HIGH
9.3
android
startActivityFromRecents
services/core/java/com/android/server/am/ActivityManagerService.java
6c049120c2d749f0c0289d822ec7d0aa692f55c5
0
Analyze the following code function for security vulnerabilities
private JsonValue readNull() throws IOException { read(); readRequiredChar('u'); readRequiredChar('l'); readRequiredChar('l'); return JsonValue.NULL; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: readNull File: src/main/org/hjson/JsonParser.java Repository: hjson/hjson-java The code follows secure coding practices.
[ "CWE-787" ]
CVE-2023-34620
HIGH
7.5
hjson/hjson-java
readNull
src/main/org/hjson/JsonParser.java
91bef056d56bf968451887421c89a44af1d692ff
0
Analyze the following code function for security vulnerabilities
private void advanceToNextUri(FileInput fileInput) throws IOException { watermark = 0; createReader(fileInput, currentInputUriIterator.next()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: advanceToNextUri File: server/src/main/java/io/crate/execution/engine/collect/files/FileReadingIterator.java Repository: crate The code follows secure coding practices.
[ "CWE-22" ]
CVE-2024-24565
MEDIUM
6.5
crate
advanceToNextUri
server/src/main/java/io/crate/execution/engine/collect/files/FileReadingIterator.java
4e857d675683095945dd524d6ba03e692c70ecd6
0
Analyze the following code function for security vulnerabilities
@Override public boolean getCrossProfileCallerIdDisabled(ComponentName who) { if (!mHasFeature) { return false; } Objects.requireNonNull(who, "ComponentName is null"); final CallerIdentity caller = getCallerIdentity(who); Preconditions.checkCallAuthorization(isProfileOwner(caller)); synchronized (getLockObject()) { ActiveAdmin admin = getProfileOwnerLocked(caller); return admin.disableCallerId; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCrossProfileCallerIdDisabled File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-20" ]
CVE-2023-21284
MEDIUM
5.5
android
getCrossProfileCallerIdDisabled
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
@Override protected AbstractChainingPrintRenderer getSyntaxRenderer() { return new HTML5ChainingRenderer(this.linkRenderer, this.imageRenderer, getListenerChain()); }
Vulnerability Classification: - CWE: CWE-79 - CVE: CVE-2023-32070 - Severity: MEDIUM - CVSS Score: 6.1 Description: XRENDERING-663: Restrict allowed attributes in HTML rendering * Change HTML renderers to only print allowed attributes and elements. * Add prefix to forbidden attributes to preserve them in XWiki syntax. * Adapt tests to expect that invalid attributes get a prefix. Function: getSyntaxRenderer File: xwiki-rendering-macros/xwiki-rendering-macro-html/src/main/java/org/xwiki/rendering/internal/macro/html/renderers/html5/HTMLMacroHTML5Renderer.java Repository: xwiki/xwiki-rendering Fixed Code: @Override protected AbstractChainingPrintRenderer getSyntaxRenderer() { return new HTML5ChainingRenderer(this.linkRenderer, this.imageRenderer, this.htmlElementSanitizer, getListenerChain()); }
[ "CWE-79" ]
CVE-2023-32070
MEDIUM
6.1
xwiki/xwiki-rendering
getSyntaxRenderer
xwiki-rendering-macros/xwiki-rendering-macro-html/src/main/java/org/xwiki/rendering/internal/macro/html/renderers/html5/HTMLMacroHTML5Renderer.java
c40e2f5f9482ec6c3e71dbf1fff5ba8a5e44cdc1
1
Analyze the following code function for security vulnerabilities
@VisibleForTesting Bitmap getBitmapFromXmlResource(int drawableRes) { Drawable drawable = getResources().getDrawable(drawableRes, getTheme()); Canvas canvas = new Canvas(); Bitmap bitmap = Bitmap.createBitmap(drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight(), Bitmap.Config.ARGB_8888); canvas.setBitmap(bitmap); drawable.setBounds(0, 0, drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight()); drawable.draw(canvas); return bitmap; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getBitmapFromXmlResource File: src/com/android/settings/SettingsActivity.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2018-9501
HIGH
7.2
android
getBitmapFromXmlResource
src/com/android/settings/SettingsActivity.java
5e43341b8c7eddce88f79c9a5068362927c05b54
0
Analyze the following code function for security vulnerabilities
@Override public void removed(ServerSession session, ServerMessage message, boolean timeout) { disassociate(_userId, session); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: removed File: cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Seti.java Repository: cometd The code follows secure coding practices.
[ "CWE-863" ]
CVE-2022-24721
MEDIUM
5.5
cometd
removed
cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Seti.java
bb445a143fbf320f17c62e340455cd74acfb5929
0
Analyze the following code function for security vulnerabilities
@UnsupportedAppUsage public boolean isGroupChild() { return mGroupKey != null && (flags & FLAG_GROUP_SUMMARY) == 0; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isGroupChild File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
isGroupChild
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
public byte[] engineGetIV() { if (engineSpec != null) { return engineSpec.getNonce(); } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: engineGetIV File: prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dh/IESCipher.java Repository: bcgit/bc-java The code follows secure coding practices.
[ "CWE-361" ]
CVE-2016-1000345
MEDIUM
4.3
bcgit/bc-java
engineGetIV
prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dh/IESCipher.java
21dcb3d9744c83dcf2ff8fcee06dbca7bfa4ef35
0
Analyze the following code function for security vulnerabilities
public Argument createArgument( boolean insertAtStart ) { Argument argument = new Argument(); if ( insertAtStart ) { arguments.insertElementAt( argument, 0 ); } else { arguments.addElement( argument ); } return argument; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createArgument File: src/main/java/org/codehaus/plexus/util/cli/Commandline.java Repository: codehaus-plexus/plexus-utils The code follows secure coding practices.
[ "CWE-78" ]
CVE-2017-1000487
HIGH
7.5
codehaus-plexus/plexus-utils
createArgument
src/main/java/org/codehaus/plexus/util/cli/Commandline.java
b38a1b3a4352303e4312b2bb601a0d7ec6e28f41
0
Analyze the following code function for security vulnerabilities
void remove() { if (this == firstNonPseudo) { firstNonPseudo = firstNonPseudo.after; } before.after = after; after.before = before; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: remove File: core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java Repository: line/armeria The code follows secure coding practices.
[ "CWE-74" ]
CVE-2019-16771
MEDIUM
5
line/armeria
remove
core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
b597f7a865a527a84ee3d6937075cfbb4470ed20
0
Analyze the following code function for security vulnerabilities
@Override public boolean processLogin(SecurityRequestWrapper request, HttpServletResponse response, XWikiContext context) throws Exception { try { Principal principal = MyBasicAuthenticator.checkLogin(request, response, context); if (principal != null) { return false; } if ("1".equals(request.getParameter("basicauth"))) { return true; } } catch (Exception e) { // in case of exception we continue on Form Auth. // we don't want this to interfere with the most common behavior } // process any persistent login information, if user is not already logged in, // persistent logins are enabled, and the persistent login info is present in this request if (this.persistentLoginManager != null) { Principal principal = request.getUserPrincipal(); // If cookies are turned on: // 1) if user is not already authenticated, authenticate // 2) if xwiki.authentication.always is set to 1 in xwiki.cfg file, authenticate if (principal == null || context.getWiki().ParamAsLong("xwiki.authentication.always", 0) == 1) { String username = convertUsername(this.persistentLoginManager.getRememberedUsername(request, response), context); String password = this.persistentLoginManager.getRememberedPassword(request, response); principal = authenticate(username, password, context); if (principal != null) { if (LOGGER.isDebugEnabled()) { LOGGER.debug("User " + principal.getName() + " has been authentified from cookie"); } // make sure the Principal contains wiki name information if (!StringUtils.contains(principal.getName(), ':')) { principal = new SimplePrincipal(context.getWikiId() + ":" + principal.getName()); } request.setUserPrincipal(principal); this.getUserAuthenticatedEventNotifier().notify(principal.getName()); } else { // Failed to authenticate, better cleanup the user stored in the session request.setUserPrincipal(null); if (username != null || password != null) { // Failed authentication with remembered login, better forget login now this.persistentLoginManager.forgetLogin(request, response); } } } } // process login form submittal if ((this.loginSubmitPattern != null) && request.getMatchableURL().endsWith(this.loginSubmitPattern)) { String username = convertUsername(request.getParameter(FORM_USERNAME), context); String password = request.getParameter(FORM_PASSWORD); String rememberme = request.getParameter(FORM_REMEMBERME); rememberme = (rememberme == null) ? "false" : rememberme; return processLogin(username, password, rememberme, request, response, context); } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: processLogin File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/user/impl/xwiki/MyFormAuthenticator.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-601" ]
CVE-2022-23618
MEDIUM
5.8
xwiki/xwiki-platform
processLogin
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/user/impl/xwiki/MyFormAuthenticator.java
5251c02080466bf9fb55288f04a37671108f8096
0
Analyze the following code function for security vulnerabilities
@Override public Route.Collection post(final String path1, final String path2, final Route.Filter filter) { return new Route.Collection( new Route.Definition[]{post(path1, filter), post(path2, filter)}); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: post 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
post
jooby/src/main/java/org/jooby/Jooby.java
34f526028e6cd0652125baa33936ffb6a8a4a009
0
Analyze the following code function for security vulnerabilities
@PostConstruct public final void ensureEncrypted() { this.userName = stripToNull(this.userName); setPasswordIfNotBlank(password); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: ensureEncrypted 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
ensureEncrypted
config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
0
Analyze the following code function for security vulnerabilities
Iterator<Tuple<MediaPackage, String>> getAllMediaPackages() throws SearchServiceDatabaseException;
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAllMediaPackages File: modules/search-service-impl/src/main/java/org/opencastproject/search/impl/persistence/SearchServiceDatabase.java Repository: opencast The code follows secure coding practices.
[ "CWE-863" ]
CVE-2021-21318
MEDIUM
5.5
opencast
getAllMediaPackages
modules/search-service-impl/src/main/java/org/opencastproject/search/impl/persistence/SearchServiceDatabase.java
b18c6a7f81f08ed14884592a6c14c9ab611ad450
0
Analyze the following code function for security vulnerabilities
public void setSiteId(short siteId) { this.siteId = siteId; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setSiteId File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/log/LogUpload.java Repository: sanluan/PublicCMS The code follows secure coding practices.
[ "CWE-79" ]
CVE-2020-21333
LOW
3.5
sanluan/PublicCMS
setSiteId
publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/log/LogUpload.java
b4d5956e65b14347b162424abb197a180229b3db
0
Analyze the following code function for security vulnerabilities
@Override boolean check(SemaphoreConfig c1, SemaphoreConfig c2) { return c1 == c2 || !(c1 == null || c2 == null) && nullSafeEqual(c1.getName(), c2.getName()) && nullSafeEqual(c1.getBackupCount(), c2.getBackupCount()) && nullSafeEqual(c1.getAsyncBackupCount(), c2.getAsyncBackupCount()) && nullSafeEqual(c1.getQuorumName(), c2.getQuorumName()) && nullSafeEqual(c1.getInitialPermits(), c2.getInitialPermits()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: check File: hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java Repository: hazelcast The code follows secure coding practices.
[ "CWE-502" ]
CVE-2016-10750
MEDIUM
6.8
hazelcast
check
hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
0
Analyze the following code function for security vulnerabilities
private byte[] getRequestBodyBytes(String url) throws IOException { HttpFileHandle fileHandler = new HttpFileHandle(JFinal.me().getConstants().getBaseUploadPath()); HttpUtil.getInstance().sendGetRequest(url, new HashMap<>(), fileHandler, new HashMap<>()); return IOUtil.getByteByInputStream(new FileInputStream(fileHandler.getT().getPath())); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRequestBodyBytes File: service/src/main/java/com/zrlog/service/ArticleService.java Repository: 94fzb/zrlog The code follows secure coding practices.
[ "CWE-79" ]
CVE-2019-16643
LOW
3.5
94fzb/zrlog
getRequestBodyBytes
service/src/main/java/com/zrlog/service/ArticleService.java
4a91c83af669e31a22297c14f089d8911d353fa1
0
Analyze the following code function for security vulnerabilities
public static XMLBuilder2 parse(InputSource inputSource) { try { return new XMLBuilder2(parseDocumentImpl(inputSource)); } catch (ParserConfigurationException e) { throw wrapExceptionAsRuntimeException(e); } catch (SAXException e) { throw wrapExceptionAsRuntimeException(e); } catch (IOException e) { throw wrapExceptionAsRuntimeException(e); } }
Vulnerability Classification: - CWE: CWE-611 - CVE: CVE-2014-125087 - Severity: MEDIUM - CVSS Score: 5.2 Description: Disable external entities by default to prevent XXE injection attacks, re #6 XML Builder classes now explicitly enable or disable 'external-general-entities' and 'external-parameter-entities' features of the DocumentBuilderFactory when #create or #parse methods are used. To prevent XML External Entity (XXE) injection attacks, these features are disabled by default. They can only be enabled by passing a true boolean value to new versions of the #create and #parse methods that accept a flag for this feature. Function: parse File: src/main/java/com/jamesmurty/utils/XMLBuilder2.java Repository: jmurty/java-xmlbuilder Fixed Code: public static XMLBuilder2 parse(InputSource inputSource) { return XMLBuilder2.parse(inputSource, false); }
[ "CWE-611" ]
CVE-2014-125087
MEDIUM
5.2
jmurty/java-xmlbuilder
parse
src/main/java/com/jamesmurty/utils/XMLBuilder2.java
e6fddca201790abab4f2c274341c0bb8835c3e73
1
Analyze the following code function for security vulnerabilities
public int getMaximumExpansionSize() { return myMaximumExpansionSize; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getMaximumExpansionSize 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
getMaximumExpansionSize
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
private static ArrayList<SQLiteDatabase> getActiveDatabases() { ArrayList<SQLiteDatabase> databases = new ArrayList<SQLiteDatabase>(); synchronized (sActiveDatabases) { databases.addAll(sActiveDatabases.keySet()); } return databases; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getActiveDatabases File: core/java/android/database/sqlite/SQLiteDatabase.java Repository: android The code follows secure coding practices.
[ "CWE-89" ]
CVE-2018-9493
LOW
2.1
android
getActiveDatabases
core/java/android/database/sqlite/SQLiteDatabase.java
ebc250d16c747f4161167b5ff58b3aea88b37acf
0
Analyze the following code function for security vulnerabilities
public void setAttributeList(String attribList) { if (StringUtil.isNotNull(attribList)) { this.attributeKeys.clear(); this.attributeKeys.addAll(StringUtil.tokenize(attribList)); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setAttributeList File: picketlink-tomcat-common/src/main/java/org/picketlink/identity/federation/bindings/tomcat/idp/AbstractIDPValve.java Repository: picketlink/picketlink-bindings The code follows secure coding practices.
[ "CWE-264" ]
CVE-2015-3158
MEDIUM
4
picketlink/picketlink-bindings
setAttributeList
picketlink-tomcat-common/src/main/java/org/picketlink/identity/federation/bindings/tomcat/idp/AbstractIDPValve.java
341a37aefd69e67b6b5f6d775499730d6ccaff0d
0
Analyze the following code function for security vulnerabilities
@GetMapping("/checkPassword") @ResponseBody public boolean checkPassword(String password) { SysUser user = getSysUser(); if (passwordService.matches(user, password)) { return true; } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkPassword File: ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java Repository: yangzongzhuan/RuoYi The code follows secure coding practices.
[ "CWE-79" ]
CVE-2022-32065
LOW
3.5
yangzongzhuan/RuoYi
checkPassword
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java
d8b2a9a905fb750fa60e2400238cf4750a77c5e6
0
Analyze the following code function for security vulnerabilities
@Override public void initialize() throws InitializationException { this.registerLogoutListener(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: initialize File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-459" ]
CVE-2023-36468
HIGH
8.8
xwiki/xwiki-platform
initialize
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
0
Analyze the following code function for security vulnerabilities
@Override public void setInstallerPackageName(String targetPackage, String installerPackageName) { final int uid = Binder.getCallingUid(); // writer synchronized (mPackages) { PackageSetting targetPackageSetting = mSettings.mPackages.get(targetPackage); if (targetPackageSetting == null) { throw new IllegalArgumentException("Unknown target package: " + targetPackage); } PackageSetting installerPackageSetting; if (installerPackageName != null) { installerPackageSetting = mSettings.mPackages.get(installerPackageName); if (installerPackageSetting == null) { throw new IllegalArgumentException("Unknown installer package: " + installerPackageName); } } else { installerPackageSetting = null; } Signature[] callerSignature; Object obj = mSettings.getUserIdLPr(uid); if (obj != null) { if (obj instanceof SharedUserSetting) { callerSignature = ((SharedUserSetting)obj).signatures.mSignatures; } else if (obj instanceof PackageSetting) { callerSignature = ((PackageSetting)obj).signatures.mSignatures; } else { throw new SecurityException("Bad object " + obj + " for uid " + uid); } } else { throw new SecurityException("Unknown calling uid " + uid); } // Verify: can't set installerPackageName to a package that is // not signed with the same cert as the caller. if (installerPackageSetting != null) { if (compareSignatures(callerSignature, installerPackageSetting.signatures.mSignatures) != PackageManager.SIGNATURE_MATCH) { throw new SecurityException( "Caller does not have same cert as new installer package " + installerPackageName); } } // Verify: if target already has an installer package, it must // be signed with the same cert as the caller. if (targetPackageSetting.installerPackageName != null) { PackageSetting setting = mSettings.mPackages.get( targetPackageSetting.installerPackageName); // If the currently set package isn't valid, then it's always // okay to change it. if (setting != null) { if (compareSignatures(callerSignature, setting.signatures.mSignatures) != PackageManager.SIGNATURE_MATCH) { throw new SecurityException( "Caller does not have same cert as old installer package " + targetPackageSetting.installerPackageName); } } } // Okay! targetPackageSetting.installerPackageName = installerPackageName; scheduleWriteSettingsLocked(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setInstallerPackageName 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
setInstallerPackageName
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
public boolean isEditable() { return getState(false).editable; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isEditable 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
isEditable
server/src/main/java/com/vaadin/ui/Grid.java
c40bed109c3723b38694ed160ea647fef5b28593
0
Analyze the following code function for security vulnerabilities
public int read(double[] d, int off, int len) throws IOException { return rawRead(d, off * 8, len * 8); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: read File: src/main/java/org/xerial/snappy/SnappyInputStream.java Repository: xerial/snappy-java The code follows secure coding practices.
[ "CWE-770" ]
CVE-2023-34455
HIGH
7.5
xerial/snappy-java
read
src/main/java/org/xerial/snappy/SnappyInputStream.java
3bf67857fcf70d9eea56eed4af7c925671e8eaea
0
Analyze the following code function for security vulnerabilities
protected File makeFileFromChunks(String tmpDir, File chunkDirPath, HttpServletRequest request) throws IOException { int resumableTotalChunks = Integer.valueOf(request.getParameter("resumableTotalChunks")); String resumableFilename = request.getParameter("resumableFilename"); String chunkPath = chunkDirPath.getAbsolutePath() + File.separator + "part"; File destFile = null; String destFilePath = tmpDir + File.separator + resumableFilename; destFile = new File(destFilePath); InputStream is = null; OutputStream os = null; try { destFile.createNewFile(); os = new FileOutputStream(destFile); for (int i = 1; i <= resumableTotalChunks; i++) { File fi = new File(chunkPath.concat(Integer.toString(i))); try { is = new FileInputStream(fi); byte[] buffer = new byte[1024]; int lenght; while ((lenght = is.read(buffer)) > 0) { os.write(buffer, 0, lenght); } } catch (IOException e) { // try to delete destination file, as we got an exception while writing it. if(!destFile.delete()) { log.warn("While writing an uploaded file an error occurred. " + "We were unable to delete the damaged file: " + destFile.getAbsolutePath() + "."); } // throw IOException to handle it in the calling method throw e; } } } finally { try { if (is != null) { is.close(); } } catch (IOException ex) { // nothing to do here } try { if (os != null) { os.close(); } } catch (IOException ex) { // nothing to do here } if (!deleteDirectory(chunkDirPath)) { log.warn("Coudln't delete temporary upload path " + chunkDirPath.getAbsolutePath() + ", ignoring it."); } } return destFile; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: makeFileFromChunks File: dspace-jspui/src/main/java/org/dspace/app/webui/servlet/SubmissionController.java Repository: DSpace The code follows secure coding practices.
[ "CWE-22" ]
CVE-2022-31194
HIGH
7.2
DSpace
makeFileFromChunks
dspace-jspui/src/main/java/org/dspace/app/webui/servlet/SubmissionController.java
d1dd7d23329ef055069759df15cfa200c8e3
0
Analyze the following code function for security vulnerabilities
public void onHintFinished() { // Delay the reset a bit so the user can read the text. mKeyguardIndicationController.hideTransientIndicationDelayed(HINT_RESET_DELAY_MS); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onHintFinished 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
onHintFinished
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
public Map<String, Authentication> getAuthentications() { return authentications; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAuthentications File: samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java Repository: OpenAPITools/openapi-generator The code follows secure coding practices.
[ "CWE-668" ]
CVE-2021-21430
LOW
2.1
OpenAPITools/openapi-generator
getAuthentications
samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
public void initialize(KeyGenerationParameters param) { this.gmssParams = (GMSSKeyGenerationParameters)param; // generate GMSSParameterset this.gmssPS = new GMSSParameters(gmssParams.getParameters().getNumOfLayers(), gmssParams.getParameters().getHeightOfTrees(), gmssParams.getParameters().getWinternitzParameter(), gmssParams.getParameters().getK()); this.numLayer = gmssPS.getNumOfLayers(); this.heightOfTrees = gmssPS.getHeightOfTrees(); this.otsIndex = gmssPS.getWinternitzParameter(); this.K = gmssPS.getK(); // seeds this.currentSeeds = new byte[numLayer][mdLength]; this.nextNextSeeds = new byte[numLayer - 1][mdLength]; // construct SecureRandom for initial seed generation SecureRandom secRan = new SecureRandom(); // generation of initial seeds for (int i = 0; i < numLayer; i++) { secRan.nextBytes(currentSeeds[i]); gmssRandom.nextSeed(currentSeeds[i]); } this.initialized = true; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: initialize File: core/src/main/java/org/bouncycastle/pqc/crypto/gmss/GMSSKeyPairGenerator.java Repository: bcgit/bc-java The code follows secure coding practices.
[ "CWE-470" ]
CVE-2018-1000613
HIGH
7.5
bcgit/bc-java
initialize
core/src/main/java/org/bouncycastle/pqc/crypto/gmss/GMSSKeyPairGenerator.java
4092ede58da51af9a21e4825fbad0d9a3ef5a223
0
Analyze the following code function for security vulnerabilities
public static CertData fromCertChain(PKCS7 pkcs7) throws Exception { X509Certificate[] certs = pkcs7.getCertificates(); certs = Cert.sortCertificateChain(certs); X509Certificate cert = certs[certs.length - 1]; CertData data = new CertData(); data.setSerialNumber(new CertId(cert.getSerialNumber())); Principal issuerDN = cert.getIssuerDN(); if (issuerDN != null) data.setIssuerDN(issuerDN.toString()); Principal subjectDN = cert.getSubjectDN(); if (subjectDN != null) data.setSubjectDN(subjectDN.toString()); Date notBefore = cert.getNotBefore(); if (notBefore != null) data.setNotBefore(notBefore.toString()); Date notAfter = cert.getNotAfter(); if (notAfter != null) data.setNotAfter(notAfter.toString()); String b64 = Cert.HEADER + "\n" + Utils.base64encodeMultiLine(cert.getEncoded()) + Cert.FOOTER + "\n"; data.setEncoded(b64); byte[] pkcs7bytes = pkcs7.getBytes(); String pkcs7str = Utils.base64encodeSingleLine(pkcs7bytes); data.setPkcs7CertChain(pkcs7str); return data; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: fromCertChain File: base/common/src/main/java/com/netscape/certsrv/cert/CertData.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
fromCertChain
base/common/src/main/java/com/netscape/certsrv/cert/CertData.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
public void setCertTypeSubSSLCA(String certTypeSubSSLCA) { this.certTypeSubSSLCA = certTypeSubSSLCA; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setCertTypeSubSSLCA File: base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
setCertTypeSubSSLCA
base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
private void doSave(boolean showToast) { sendOrSaveWithSanityChecks(true, showToast, false, false); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: doSave File: src/com/android/mail/compose/ComposeActivity.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-2425
MEDIUM
4.3
android
doSave
src/com/android/mail/compose/ComposeActivity.java
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
0
Analyze the following code function for security vulnerabilities
public Set<String> attemptResolveIndexNames(final User user, final IndexNameExpressionResolver resolver, final ClusterService cs) { return getResolvedIndexPattern(user, resolver, cs, true); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: attemptResolveIndexNames File: src/main/java/org/opensearch/security/securityconf/ConfigModelV7.java Repository: opensearch-project/security The code follows secure coding practices.
[ "CWE-612", "CWE-863" ]
CVE-2022-41918
MEDIUM
6.3
opensearch-project/security
attemptResolveIndexNames
src/main/java/org/opensearch/security/securityconf/ConfigModelV7.java
f7cc569c9d3fa5d5432c76c854eed280d45ce6f4
0