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
|
@TestApi
@RequiresPermission(android.Manifest.permission.FORCE_DEVICE_POLICY_MANAGER_LOGS)
public long forceSecurityLogs() {
if (mService == null) {
return 0;
}
try {
return mService.forceSecurityLogs();
} catch (RemoteException re) {
throw re.rethrowFromSystemServer();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: forceSecurityLogs
File: core/java/android/app/admin/DevicePolicyManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
forceSecurityLogs
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
protected CELLTYPE join(Set<CELLTYPE> cells) {
for (CELLTYPE cell : cells) {
if (getCellGroupForCell(cell) != null) {
throw new IllegalArgumentException(
"Cell already merged");
} else if (!this.cells.containsValue(cell)) {
throw new IllegalArgumentException(
"Cell does not exist on this row");
}
}
// Create new cell data for the group
CELLTYPE newCell = createCell();
Set<String> columnGroup = new HashSet<String>();
for (CELLTYPE cell : cells) {
columnGroup.add(cell.getColumnId());
}
rowState.cellGroups.put(columnGroup, newCell.getCellState());
cellGroups.put(cells, newCell);
return newCell;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: join
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
|
join
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
public void startRestrictingAutoJoinToSubscriptionId(int subscriptionId) {
int minDisableDurationMinutes = mContext.getResources().getInteger(R.integer
.config_wifiAllNonCarrierMergedWifiMinDisableDurationMinutes);
int maxDisableDurationMinutes = mContext.getResources().getInteger(R.integer
.config_wifiAllNonCarrierMergedWifiMaxDisableDurationMinutes);
localLog("startRestrictingAutoJoinToSubscriptionId: " + subscriptionId
+ " minDisableDurationMinutes:" + minDisableDurationMinutes
+ " maxDisableDurationMinutes:" + maxDisableDurationMinutes);
long maxDisableDurationMs = maxDisableDurationMinutes * 60 * 1000;
// do a clear to make sure we start at a clean state.
mNonCarrierMergedNetworksStatusTracker.clear();
mNonCarrierMergedNetworksStatusTracker.disableAllNonCarrierMergedNetworks(subscriptionId,
minDisableDurationMinutes * 60 * 1000,
maxDisableDurationMs);
for (WifiConfiguration config : getInternalConfiguredNetworks()) {
ScanDetailCache scanDetailCache = getScanDetailCacheForNetwork(config.networkId);
if (scanDetailCache == null) {
continue;
}
ScanResult scanResult = scanDetailCache.getMostRecentScanResult();
if (scanResult == null) {
continue;
}
if (mClock.getWallClockMillis() - scanResult.seen
< NON_CARRIER_MERGED_NETWORKS_SCAN_CACHE_QUERY_DURATION_MS) {
// do not disable if this is a carrier-merged-network with the given subscriptionId
if (config.carrierMerged && config.subscriptionId == subscriptionId) {
continue;
}
mNonCarrierMergedNetworksStatusTracker.temporarilyDisableNetwork(config,
USER_DISCONNECT_NETWORK_BLOCK_EXPIRY_MS, maxDisableDurationMs);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startRestrictingAutoJoinToSubscriptionId
File: service/java/com/android/server/wifi/WifiConfigManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
startRestrictingAutoJoinToSubscriptionId
|
service/java/com/android/server/wifi/WifiConfigManager.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isXMLOutput() {
return xmlOutput;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isXMLOutput
File: base/common/src/main/java/com/netscape/certsrv/profile/ProfileData.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
isXMLOutput
|
base/common/src/main/java/com/netscape/certsrv/profile/ProfileData.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public ExtendedClientDetails getExtendedClientDetails() {
return extendedClientDetails;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getExtendedClientDetails
File: flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2023-25499
|
MEDIUM
| 6.5
|
vaadin/flow
|
getExtendedClientDetails
|
flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
|
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void restorePreferredActivities(byte[] backup, int userId) {
if (Binder.getCallingUid() != Process.SYSTEM_UID) {
throw new SecurityException("Only the system may call restorePreferredActivities()");
}
try {
final XmlPullParser parser = Xml.newPullParser();
parser.setInput(new ByteArrayInputStream(backup), StandardCharsets.UTF_8.name());
restoreFromXml(parser, userId, TAG_PREFERRED_BACKUP,
new BlobXmlRestorer() {
@Override
public void apply(XmlPullParser parser, int userId)
throws XmlPullParserException, IOException {
synchronized (mPackages) {
mSettings.readPreferredActivitiesLPw(parser, userId);
}
}
} );
} catch (Exception e) {
if (DEBUG_BACKUP) {
Slog.e(TAG, "Exception restoring preferred activities: " + e.getMessage());
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: restorePreferredActivities
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
|
restorePreferredActivities
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
private void initAuthorizationPreFragment(Bundle savedInstanceState) {
/// step 0 - get UI elements in layout
mAuthStatusView = findViewById(R.id.auth_status_text);
/// step 1 - load and process relevant inputs (resources, intent, savedInstanceState)
if (savedInstanceState != null) {
mAuthStatusText = savedInstanceState.getString(KEY_AUTH_STATUS_TEXT);
mAuthStatusIcon = savedInstanceState.getInt(KEY_AUTH_STATUS_ICON);
}
/// step 2 - set properties of UI elements (text, visibility, enabled...)
showAuthStatus();
mHostUrlInput.setImeOptions(EditorInfo.IME_ACTION_NEXT);
mHostUrlInput.setOnEditorActionListener(this);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initAuthorizationPreFragment
File: src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java
Repository: nextcloud/android
The code follows secure coding practices.
|
[
"CWE-248"
] |
CVE-2021-32694
|
MEDIUM
| 4.3
|
nextcloud/android
|
initAuthorizationPreFragment
|
src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java
|
9343bdd85d70625a90e0c952897957a102c2421b
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void compressFile(File file, ZipOutputStream out, String fullName) throws IOException {
if (notEmpty(file)) {
ZipEntry entry = new ZipEntry(fullName);
entry.setTime(file.lastModified());
out.putNextEntry(entry);
write(new FileInputStream(file), out, false);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: compressFile
File: publiccms-parent/publiccms-common/src/main/java/com/publiccms/common/tools/ZipUtils.java
Repository: sanluan/PublicCMS
The code follows secure coding practices.
|
[
"CWE-434"
] |
CVE-2018-12914
|
HIGH
| 7.5
|
sanluan/PublicCMS
|
compressFile
|
publiccms-parent/publiccms-common/src/main/java/com/publiccms/common/tools/ZipUtils.java
|
c19fe66378c75725f3e3a380a6cb9f8b8a7dcb71
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
String pathInfo = req.getPathInfo();
if (pathInfo == null) {
resp.setStatus(HttpURLConnection.HTTP_NOT_FOUND);
return;
}
URL resource = bundle.getResource(path + pathInfo);
if (resource == null) {
resp.setStatus(HttpURLConnection.HTTP_NOT_FOUND);
return;
}
try (InputStream stream = resource.openStream()) {
IOUtils.copy(stream, resp.getOutputStream());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doGet
File: flow-osgi/src/main/java/com/vaadin/flow/osgi/support/AppConfigFactoryTracker.java
Repository: vaadin/osgi
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-31407
|
MEDIUM
| 5
|
vaadin/osgi
|
doGet
|
flow-osgi/src/main/java/com/vaadin/flow/osgi/support/AppConfigFactoryTracker.java
|
3e17674c2e3f88b6e682872c42b7d0ad7d9c4ad8
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getSelectedRecordLanguage() {
return selectedRecordLanguage;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSelectedRecordLanguage
File: goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java
Repository: intranda/goobi-viewer-core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-29014
|
MEDIUM
| 6.1
|
intranda/goobi-viewer-core
|
getSelectedRecordLanguage
|
goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java
|
c29efe60e745a94d03debc17681c4950f3917455
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void tryConnectToPara(Callable<Boolean> callable) {
retryConnection(callable, 0);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: tryConnectToPara
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
|
tryConnectToPara
|
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable
private static Float toFloat(@Nullable String v) {
try {
return v != null ? Float.parseFloat(v) : null;
} catch (NumberFormatException ignore) {
return null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toFloat
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
|
toFloat
|
core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
|
b597f7a865a527a84ee3d6937075cfbb4470ed20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setPacketReplyTimeout(long timeout) {
packetReplyTimeout = timeout;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setPacketReplyTimeout
File: smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
Repository: igniterealtime/Smack
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2016-10027
|
MEDIUM
| 4.3
|
igniterealtime/Smack
|
setPacketReplyTimeout
|
smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
|
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
| 0
|
Analyze the following code function for security vulnerabilities
|
public void updateSessionManagement(HttpSession session, String destination) {
StringUtil.requireDefined(destination);
SessionManagement sessionManagement = SessionManagementProvider.getSessionManagement();
sessionManagement.validateSession(session.getId());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateSessionManagement
File: core-web/src/main/java/org/silverpeas/core/web/mvc/route/ComponentRequestRouter.java
Repository: Silverpeas/Silverpeas-Core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-47324
|
MEDIUM
| 5.4
|
Silverpeas/Silverpeas-Core
|
updateSessionManagement
|
core-web/src/main/java/org/silverpeas/core/web/mvc/route/ComponentRequestRouter.java
|
9a55728729a3b431847045c674b3e883507d1e1a
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean jsFunction_isSubscribed(Context cx, Scriptable thisObj, Object[] args, Function funObj)
throws ScriptException, APIManagementException {
String username = null;
if (args != null && args.length != 0) {
String providerName = (String) args[0];
String apiName = (String) args[1];
String version = (String) args[2];
if (args[3] != null) {
username = (String) args[3];
}
APIIdentifier apiIdentifier = new APIIdentifier(providerName, apiName, version);
APIConsumer apiConsumer = getAPIConsumer(thisObj);
return username != null && apiConsumer.isSubscribed(apiIdentifier, username);
} else {
throw new APIManagementException("No input username value.");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: jsFunction_isSubscribed
File: components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
Repository: wso2/carbon-apimgt
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2018-20736
|
LOW
| 3.5
|
wso2/carbon-apimgt
|
jsFunction_isSubscribed
|
components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
|
490f2860822f89d745b7c04fa9570bd86bef4236
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Decoder<Object> getValueDecoder() {
return decoder;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getValueDecoder
File: redisson/src/main/java/org/redisson/codec/SerializationCodec.java
Repository: redisson
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2023-42809
|
HIGH
| 8.8
|
redisson
|
getValueDecoder
|
redisson/src/main/java/org/redisson/codec/SerializationCodec.java
|
fe6a2571801656ff1599ef87bdee20f519a5d1fe
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setGoRevisionVariables(EnvironmentVariableContext environmentVariableContext, String fromRevision, String toRevision) {
setVariableWithName(environmentVariableContext, toRevision, GO_REVISION);
setVariableWithName(environmentVariableContext, toRevision, GO_TO_REVISION);
setVariableWithName(environmentVariableContext, fromRevision, GO_FROM_REVISION);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setGoRevisionVariables
File: domain/src/main/java/com/thoughtworks/go/config/materials/ScmMaterial.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-39309
|
MEDIUM
| 6.5
|
gocd
|
setGoRevisionVariables
|
domain/src/main/java/com/thoughtworks/go/config/materials/ScmMaterial.java
|
691b479f1310034992da141760e9c5d1f5b60e8a
| 0
|
Analyze the following code function for security vulnerabilities
|
public static Node getNode(Node node, Pattern... nodePath) {
List<Node> nodes = getNodes(node, nodePath);
if (nodes != null && nodes.size() > 0) {
return nodes.get(0);
} else {
return null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNode
File: src/edu/stanford/nlp/util/XMLUtils.java
Repository: stanfordnlp/CoreNLP
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-3869
|
MEDIUM
| 5
|
stanfordnlp/CoreNLP
|
getNode
|
src/edu/stanford/nlp/util/XMLUtils.java
|
5d83f1e8482ca304db8be726cad89554c88f136a
| 0
|
Analyze the following code function for security vulnerabilities
|
protected XWikiDocument getTranslatedDocument(XWikiDocument doc, String language, XWikiContext context)
throws XWikiException
{
XWikiDocument tdoc;
if (StringUtils.isBlank(language) || language.equals("default") || language.equals(doc.getDefaultLanguage())) {
tdoc = doc;
} else {
tdoc = doc.getTranslatedDocument(language, context);
if (tdoc == doc) {
tdoc = new XWikiDocument(doc.getDocumentReference());
tdoc.setLanguage(language);
tdoc.setStore(doc.getStore());
}
tdoc.setTranslation(1);
}
return tdoc;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTranslatedDocument
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiAction.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2022-23617
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
getTranslatedDocument
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiAction.java
|
b35ef0edd4f2ff2c974cbeef6b80fcf9b5a44554
| 0
|
Analyze the following code function for security vulnerabilities
|
private void reduceImageSizesForRemoteView(RemoteViews remoteView, Context context,
boolean isLowRam) {
if (remoteView != null) {
Resources resources = context.getResources();
int maxWidth = resources.getDimensionPixelSize(isLowRam
? R.dimen.notification_custom_view_max_image_width_low_ram
: R.dimen.notification_custom_view_max_image_width);
int maxHeight = resources.getDimensionPixelSize(isLowRam
? R.dimen.notification_custom_view_max_image_height_low_ram
: R.dimen.notification_custom_view_max_image_height);
remoteView.reduceImageSizes(maxWidth, maxHeight);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: reduceImageSizesForRemoteView
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
reduceImageSizesForRemoteView
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
public String dialogButtonsSetOkCancel(String setAttributes, String okAttributes, String cancelAttributes) {
return dialogButtons(new int[] {BUTTON_SET, BUTTON_OK, BUTTON_CANCEL}, new String[] {
setAttributes,
okAttributes,
cancelAttributes});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dialogButtonsSetOkCancel
File: src/org/opencms/workplace/CmsDialog.java
Repository: alkacon/opencms-core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2013-4600
|
MEDIUM
| 4.3
|
alkacon/opencms-core
|
dialogButtonsSetOkCancel
|
src/org/opencms/workplace/CmsDialog.java
|
72a05e3ea1cf692e2efce002687272e63f98c14a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setParams(List<ProfileParameter> params) {
this.params = params;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setParams
File: base/common/src/main/java/com/netscape/certsrv/profile/PolicyDefault.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
setParams
|
base/common/src/main/java/com/netscape/certsrv/profile/PolicyDefault.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public void contextInitialized(ServletContextEvent event) {
final ServletContext context = event.getServletContext();
File home=null;
try {
// use the current request to determine the language
LocaleProvider.setProvider(new LocaleProvider() {
public Locale get() {
return Functions.getCurrentLocale();
}
});
// quick check to see if we (seem to) have enough permissions to run. (see #719)
JVM jvm;
try {
jvm = new JVM();
new URLClassLoader(new URL[0],getClass().getClassLoader());
} catch(SecurityException e) {
throw new InsufficientPermissionDetected(e);
}
try {// remove Sun PKCS11 provider if present. See http://wiki.jenkins-ci.org/display/JENKINS/Solaris+Issue+6276483
Security.removeProvider("SunPKCS11-Solaris");
} catch (SecurityException e) {
// ignore this error.
}
installLogger();
final FileAndDescription describedHomeDir = getHomeDir(event);
home = describedHomeDir.file.getAbsoluteFile();
home.mkdirs();
System.out.println("Jenkins home directory: "+home+" found at: "+describedHomeDir.description);
// check that home exists (as mkdirs could have failed silently), otherwise throw a meaningful error
if (!home.exists())
throw new NoHomeDir(home);
recordBootAttempt(home);
// make sure that we are using XStream in the "enhanced" (JVM-specific) mode
if(jvm.bestReflectionProvider().getClass()==PureJavaReflectionProvider.class) {
throw new IncompatibleVMDetected(); // nope
}
// JNA is no longer a hard requirement. It's just nice to have. See HUDSON-4820 for more context.
// // make sure JNA works. this can fail if
// // - platform is unsupported
// // - JNA is already loaded in another classloader
// // see http://wiki.jenkins-ci.org/display/JENKINS/JNA+is+already+loaded
// // TODO: or shall we instead modify Hudson to work gracefully without JNA?
// try {
// /*
// java.lang.UnsatisfiedLinkError: Native Library /builds/apps/glassfish/domains/hudson-domain/generated/jsp/j2ee-modules/hudson-1.309/loader/com/sun/jna/sunos-sparc/libjnidispatch.so already loaded in another classloader
// at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1743)
// at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1674)
// at java.lang.Runtime.load0(Runtime.java:770)
// at java.lang.System.load(System.java:1005)
// at com.sun.jna.Native.loadNativeLibraryFromJar(Native.java:746)
// at com.sun.jna.Native.loadNativeLibrary(Native.java:680)
// at com.sun.jna.Native.<clinit>(Native.java:108)
// at hudson.util.jna.GNUCLibrary.<clinit>(GNUCLibrary.java:86)
// at hudson.Util.createSymlink(Util.java:970)
// at hudson.model.Run.run(Run.java:1174)
// at hudson.matrix.MatrixBuild.run(MatrixBuild.java:149)
// at hudson.model.ResourceController.execute(ResourceController.java:88)
// at hudson.model.Executor.run(Executor.java:123)
// */
// String.valueOf(Native.POINTER_SIZE); // this meaningless operation forces the classloading and initialization
// } catch (LinkageError e) {
// if (e.getMessage().contains("another classloader"))
// context.setAttribute(APP,new JNADoublyLoaded(e));
// else
// context.setAttribute(APP,new HudsonFailedToLoad(e));
// }
// make sure this is servlet 2.4 container or above
try {
ServletResponse.class.getMethod("setCharacterEncoding",String.class);
} catch (NoSuchMethodException e) {
throw new IncompatibleServletVersionDetected(ServletResponse.class);
}
// make sure that we see Ant 1.7
try {
FileSet.class.getMethod("getDirectoryScanner");
} catch (NoSuchMethodException e) {
throw new IncompatibleAntVersionDetected(FileSet.class);
}
// make sure AWT is functioning, or else JFreeChart won't even load.
if(ChartUtil.awtProblemCause!=null) {
throw new AWTProblem(ChartUtil.awtProblemCause);
}
// some containers (in particular Tomcat) doesn't abort a launch
// even if the temp directory doesn't exist.
// check that and report an error
try {
File f = File.createTempFile("test", "test");
f.delete();
} catch (IOException e) {
throw new NoTempDir(e);
}
// Tomcat breaks XSLT with JDK 5.0 and onward. Check if that's the case, and if so,
// try to correct it
try {
TransformerFactory.newInstance();
// if this works we are all happy
} catch (TransformerFactoryConfigurationError x) {
// no it didn't.
LOGGER.log(WARNING, "XSLT not configured correctly. Hudson will try to fix this. See http://issues.apache.org/bugzilla/show_bug.cgi?id=40895 for more details",x);
System.setProperty(TransformerFactory.class.getName(),"com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl");
try {
TransformerFactory.newInstance();
LOGGER.info("XSLT is set to the JAXP RI in JRE");
} catch(TransformerFactoryConfigurationError y) {
LOGGER.log(SEVERE, "Failed to correct the problem.");
}
}
installExpressionFactory(event);
context.setAttribute(APP,new HudsonIsLoading());
final File _home = home;
initThread = new Thread("Jenkins initialization thread") {
@Override
public void run() {
boolean success = false;
try {
Jenkins instance = new Hudson(_home, context);
context.setAttribute(APP, instance);
BootFailure.getBootFailureFile(_home).delete();
// at this point we are open for business and serving requests normally
LOGGER.info("Jenkins is fully up and running");
success = true;
} catch (Error e) {
new HudsonFailedToLoad(e).publish(context,_home);
throw e;
} catch (Exception e) {
new HudsonFailedToLoad(e).publish(context,_home);
} finally {
Jenkins instance = Jenkins.getInstance();
if(!success && instance!=null)
instance.cleanUp();
}
}
};
initThread.start();
} catch (BootFailure e) {
e.publish(context,home);
} catch (Error e) {
LOGGER.log(SEVERE, "Failed to initialize Jenkins",e);
throw e;
} catch (RuntimeException e) {
LOGGER.log(SEVERE, "Failed to initialize Jenkins",e);
throw e;
}
}
|
Vulnerability Classification:
- CWE: CWE-254
- CVE: CVE-2014-9634
- Severity: MEDIUM
- CVSS Score: 5.0
Description: [FIXED JENKINS-25019]
A truly conforming servlet 3.0 container does not allow us to set "secure cookie" flag beyond ServletContextListener.onInitialized().
If we see that, don't scare the users.
Function: contextInitialized
File: core/src/main/java/hudson/WebAppMain.java
Repository: jenkinsci/jenkins
Fixed Code:
public void contextInitialized(ServletContextEvent event) {
final ServletContext context = event.getServletContext();
File home=null;
try {
// use the current request to determine the language
LocaleProvider.setProvider(new LocaleProvider() {
public Locale get() {
return Functions.getCurrentLocale();
}
});
// quick check to see if we (seem to) have enough permissions to run. (see #719)
JVM jvm;
try {
jvm = new JVM();
new URLClassLoader(new URL[0],getClass().getClassLoader());
} catch(SecurityException e) {
throw new InsufficientPermissionDetected(e);
}
try {// remove Sun PKCS11 provider if present. See http://wiki.jenkins-ci.org/display/JENKINS/Solaris+Issue+6276483
Security.removeProvider("SunPKCS11-Solaris");
} catch (SecurityException e) {
// ignore this error.
}
installLogger();
markCookieAsHttpOnly(context);
final FileAndDescription describedHomeDir = getHomeDir(event);
home = describedHomeDir.file.getAbsoluteFile();
home.mkdirs();
System.out.println("Jenkins home directory: "+home+" found at: "+describedHomeDir.description);
// check that home exists (as mkdirs could have failed silently), otherwise throw a meaningful error
if (!home.exists())
throw new NoHomeDir(home);
recordBootAttempt(home);
// make sure that we are using XStream in the "enhanced" (JVM-specific) mode
if(jvm.bestReflectionProvider().getClass()==PureJavaReflectionProvider.class) {
throw new IncompatibleVMDetected(); // nope
}
// JNA is no longer a hard requirement. It's just nice to have. See HUDSON-4820 for more context.
// // make sure JNA works. this can fail if
// // - platform is unsupported
// // - JNA is already loaded in another classloader
// // see http://wiki.jenkins-ci.org/display/JENKINS/JNA+is+already+loaded
// // TODO: or shall we instead modify Hudson to work gracefully without JNA?
// try {
// /*
// java.lang.UnsatisfiedLinkError: Native Library /builds/apps/glassfish/domains/hudson-domain/generated/jsp/j2ee-modules/hudson-1.309/loader/com/sun/jna/sunos-sparc/libjnidispatch.so already loaded in another classloader
// at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1743)
// at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1674)
// at java.lang.Runtime.load0(Runtime.java:770)
// at java.lang.System.load(System.java:1005)
// at com.sun.jna.Native.loadNativeLibraryFromJar(Native.java:746)
// at com.sun.jna.Native.loadNativeLibrary(Native.java:680)
// at com.sun.jna.Native.<clinit>(Native.java:108)
// at hudson.util.jna.GNUCLibrary.<clinit>(GNUCLibrary.java:86)
// at hudson.Util.createSymlink(Util.java:970)
// at hudson.model.Run.run(Run.java:1174)
// at hudson.matrix.MatrixBuild.run(MatrixBuild.java:149)
// at hudson.model.ResourceController.execute(ResourceController.java:88)
// at hudson.model.Executor.run(Executor.java:123)
// */
// String.valueOf(Native.POINTER_SIZE); // this meaningless operation forces the classloading and initialization
// } catch (LinkageError e) {
// if (e.getMessage().contains("another classloader"))
// context.setAttribute(APP,new JNADoublyLoaded(e));
// else
// context.setAttribute(APP,new HudsonFailedToLoad(e));
// }
// make sure this is servlet 2.4 container or above
try {
ServletResponse.class.getMethod("setCharacterEncoding",String.class);
} catch (NoSuchMethodException e) {
throw new IncompatibleServletVersionDetected(ServletResponse.class);
}
// make sure that we see Ant 1.7
try {
FileSet.class.getMethod("getDirectoryScanner");
} catch (NoSuchMethodException e) {
throw new IncompatibleAntVersionDetected(FileSet.class);
}
// make sure AWT is functioning, or else JFreeChart won't even load.
if(ChartUtil.awtProblemCause!=null) {
throw new AWTProblem(ChartUtil.awtProblemCause);
}
// some containers (in particular Tomcat) doesn't abort a launch
// even if the temp directory doesn't exist.
// check that and report an error
try {
File f = File.createTempFile("test", "test");
f.delete();
} catch (IOException e) {
throw new NoTempDir(e);
}
// Tomcat breaks XSLT with JDK 5.0 and onward. Check if that's the case, and if so,
// try to correct it
try {
TransformerFactory.newInstance();
// if this works we are all happy
} catch (TransformerFactoryConfigurationError x) {
// no it didn't.
LOGGER.log(WARNING, "XSLT not configured correctly. Hudson will try to fix this. See http://issues.apache.org/bugzilla/show_bug.cgi?id=40895 for more details",x);
System.setProperty(TransformerFactory.class.getName(),"com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl");
try {
TransformerFactory.newInstance();
LOGGER.info("XSLT is set to the JAXP RI in JRE");
} catch(TransformerFactoryConfigurationError y) {
LOGGER.log(SEVERE, "Failed to correct the problem.");
}
}
installExpressionFactory(event);
context.setAttribute(APP,new HudsonIsLoading());
final File _home = home;
initThread = new Thread("Jenkins initialization thread") {
@Override
public void run() {
boolean success = false;
try {
Jenkins instance = new Hudson(_home, context);
context.setAttribute(APP, instance);
BootFailure.getBootFailureFile(_home).delete();
// at this point we are open for business and serving requests normally
LOGGER.info("Jenkins is fully up and running");
success = true;
} catch (Error e) {
new HudsonFailedToLoad(e).publish(context,_home);
throw e;
} catch (Exception e) {
new HudsonFailedToLoad(e).publish(context,_home);
} finally {
Jenkins instance = Jenkins.getInstance();
if(!success && instance!=null)
instance.cleanUp();
}
}
};
initThread.start();
} catch (BootFailure e) {
e.publish(context,home);
} catch (Error e) {
LOGGER.log(SEVERE, "Failed to initialize Jenkins",e);
throw e;
} catch (RuntimeException e) {
LOGGER.log(SEVERE, "Failed to initialize Jenkins",e);
throw e;
}
}
|
[
"CWE-254"
] |
CVE-2014-9634
|
MEDIUM
| 5
|
jenkinsci/jenkins
|
contextInitialized
|
core/src/main/java/hudson/WebAppMain.java
|
582128b9ac179a788d43c1478be8a5224dc19710
| 1
|
Analyze the following code function for security vulnerabilities
|
private static native long nativeOpenNonAsset(long ptr, int cookie, @NonNull String fileName,
int accessMode);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nativeOpenNonAsset
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
|
nativeOpenNonAsset
|
core/java/android/content/res/AssetManager.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequiresPermissions("tag:list")
@GetMapping("/list")
public String list(@RequestParam(defaultValue = "1") Integer pageNo, String name, Model model) {
// name= SecurityUtil.sanitizeInput(name);
if (StringUtils.isEmpty(name)) name = null;
IPage<Tag> page = tagService.selectAll(pageNo, null, name);
model.addAttribute("page", page);
model.addAttribute("name", name);
return "admin/tag/list";
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2022-23391
- Severity: MEDIUM
- CVSS Score: 4.3
Description: 修复了一部分页面上输入框的xss注入
https://github.com/atjiu/pybbs/issues/171
Function: list
File: src/main/java/co/yiiu/pybbs/controller/admin/TagAdminController.java
Repository: atjiu/pybbs
Fixed Code:
@RequiresPermissions("tag:list")
@GetMapping("/list")
public String list(@RequestParam(defaultValue = "1") Integer pageNo, String name, Model model) {
if (name != null) name = name.replace("\"", "").replace("'", "");
// name= SecurityUtil.sanitizeInput(name);
if (StringUtils.isEmpty(name)) name = null;
IPage<Tag> page = tagService.selectAll(pageNo, null, name);
model.addAttribute("page", page);
model.addAttribute("name", name);
return "admin/tag/list";
}
|
[
"CWE-79"
] |
CVE-2022-23391
|
MEDIUM
| 4.3
|
atjiu/pybbs
|
list
|
src/main/java/co/yiiu/pybbs/controller/admin/TagAdminController.java
|
7d83b97d19f5fed9f29f72e654ef3c2818021b4d
| 1
|
Analyze the following code function for security vulnerabilities
|
private String getDefaultRoleHolderPackageName() {
String[] info = getDefaultRoleHolderPackageNameAndSignature();
if (info == null) {
return null;
}
return info[0];
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDefaultRoleHolderPackageName
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
|
getDefaultRoleHolderPackageName
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public Authentication getAuthentication(HttpServletRequest request, byte[] key) {
return getAuthentication(request, key, Endpoint.DEFAULT_ALIAS);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAuthentication
File: JOpenId/src/org/expressme/openid/OpenIdManager.java
Repository: michaelliao/jopenid
The code follows secure coding practices.
|
[
"CWE-208"
] |
CVE-2010-10006
|
LOW
| 1.4
|
michaelliao/jopenid
|
getAuthentication
|
JOpenId/src/org/expressme/openid/OpenIdManager.java
|
c9baaa976b684637f0d5a50268e91846a7a719ab
| 0
|
Analyze the following code function for security vulnerabilities
|
public Transport getTransport() {
return transport;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTransport
File: activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
Repository: apache/activemq
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-3576
|
MEDIUM
| 5
|
apache/activemq
|
getTransport
|
activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
|
00921f2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override public boolean enabledByDefault() { return _defaultState; }
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: enabledByDefault
File: cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
Repository: FasterXML/jackson-dataformats-binary
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2020-28491
|
MEDIUM
| 5
|
FasterXML/jackson-dataformats-binary
|
enabledByDefault
|
cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
|
de072d314af8f5f269c8abec6930652af67bc8e6
| 0
|
Analyze the following code function for security vulnerabilities
|
void installOthers() {
if (mCredentials.hasKeyPair()) {
saveKeyPair();
finish();
} else {
X509Certificate cert = mCredentials.getUserCertificate();
if (cert != null) {
// find matched private key
String key = Util.toMd5(cert.getPublicKey().getEncoded());
Map<String, byte[]> map = getPkeyMap();
byte[] privatekey = map.get(key);
if (privatekey != null) {
Log.d(TAG, "found matched key: " + privatekey);
map.remove(key);
savePkeyMap(map);
mCredentials.setPrivateKey(privatekey);
} else {
Log.d(TAG, "didn't find matched private key: " + key);
}
}
nameCredential();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: installOthers
File: src/com/android/certinstaller/CertInstaller.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2422
|
HIGH
| 9.3
|
android
|
installOthers
|
src/com/android/certinstaller/CertInstaller.java
|
70dde9870e9450e10418a32206ac1bb30f036b2c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public void setFactory(final JDOMFactory factory) {
setJDOMFactory(factory);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setFactory
File: core/src/java/org/jdom2/input/SAXBuilder.java
Repository: hunterhacker/jdom
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-33813
|
MEDIUM
| 5
|
hunterhacker/jdom
|
setFactory
|
core/src/java/org/jdom2/input/SAXBuilder.java
|
bd3ab78370098491911d7fe9d7a43b97144a234e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean onTransact(int code, Parcel data, Parcel reply, int flags)
throws RemoteException {
try {
return super.onTransact(code, data, reply, flags);
} catch (RuntimeException e) {
if (!(e instanceof SecurityException) && !(e instanceof IllegalArgumentException)) {
Slog.wtf(TAG, "Package Manager Crash", e);
}
throw e;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onTransact
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
|
onTransact
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
public void writeStructBegin(TStruct struct) throws TException {
lastField_.push(lastFieldId_);
lastFieldId_ = 0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeStructBegin
File: thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java
Repository: facebook/fbthrift
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2019-11938
|
MEDIUM
| 5
|
facebook/fbthrift
|
writeStructBegin
|
thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java
|
08c2d412adb214c40bb03be7587057b25d053030
| 0
|
Analyze the following code function for security vulnerabilities
|
ContentProviderConnection incProviderCountLocked(ProcessRecord r,
final ContentProviderRecord cpr, IBinder externalProcessToken, boolean stable) {
if (r != null) {
for (int i=0; i<r.conProviders.size(); i++) {
ContentProviderConnection conn = r.conProviders.get(i);
if (conn.provider == cpr) {
if (DEBUG_PROVIDER) Slog.v(TAG_PROVIDER,
"Adding provider requested by "
+ r.processName + " from process "
+ cpr.info.processName + ": " + cpr.name.flattenToShortString()
+ " scnt=" + conn.stableCount + " uscnt=" + conn.unstableCount);
if (stable) {
conn.stableCount++;
conn.numStableIncs++;
} else {
conn.unstableCount++;
conn.numUnstableIncs++;
}
return conn;
}
}
ContentProviderConnection conn = new ContentProviderConnection(cpr, r);
if (stable) {
conn.stableCount = 1;
conn.numStableIncs = 1;
} else {
conn.unstableCount = 1;
conn.numUnstableIncs = 1;
}
cpr.connections.add(conn);
r.conProviders.add(conn);
startAssociationLocked(r.uid, r.processName, r.curProcState,
cpr.uid, cpr.name, cpr.info.processName);
return conn;
}
cpr.addExternalProcessHandleLocked(externalProcessToken);
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: incProviderCountLocked
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
|
incProviderCountLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
private void cleanAppRestrictions(int userId) {
synchronized (mPackagesLock) {
File dir = Environment.getUserSystemDirectory(userId);
String[] files = dir.list();
if (files == null) return;
for (String fileName : files) {
if (fileName.startsWith(RESTRICTIONS_FILE_PREFIX)) {
File resFile = new File(dir, fileName);
if (resFile.exists()) {
resFile.delete();
}
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cleanAppRestrictions
File: services/core/java/com/android/server/pm/UserManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2457
|
LOW
| 2.1
|
android
|
cleanAppRestrictions
|
services/core/java/com/android/server/pm/UserManagerService.java
|
12332e05f632794e18ea8c4ac52c98e82532e5db
| 0
|
Analyze the following code function for security vulnerabilities
|
final ArrayList<ActivityRecord> processStoppingActivitiesLocked(boolean remove) {
ArrayList<ActivityRecord> stops = null;
final boolean nowVisible = allResumedActivitiesVisible();
for (int activityNdx = mStoppingActivities.size() - 1; activityNdx >= 0; --activityNdx) {
ActivityRecord s = mStoppingActivities.get(activityNdx);
final boolean waitingVisible = mWaitingVisibleActivities.contains(s);
if (DEBUG_ALL) Slog.v(TAG, "Stopping " + s + ": nowVisible=" + nowVisible
+ " waitingVisible=" + waitingVisible + " finishing=" + s.finishing);
if (waitingVisible && nowVisible) {
mWaitingVisibleActivities.remove(s);
if (s.finishing) {
// If this activity is finishing, it is sitting on top of
// everyone else but we now know it is no longer needed...
// so get rid of it. Otherwise, we need to go through the
// normal flow and hide it once we determine that it is
// hidden by the activities in front of it.
if (DEBUG_ALL) Slog.v(TAG, "Before stopping, can hide: " + s);
mWindowManager.setAppVisibility(s.appToken, false);
}
}
if ((!waitingVisible || mService.isSleepingOrShuttingDown()) && remove) {
if (DEBUG_ALL) Slog.v(TAG, "Ready to stop: " + s);
if (stops == null) {
stops = new ArrayList<>();
}
stops.add(s);
mStoppingActivities.remove(activityNdx);
}
}
return stops;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: processStoppingActivitiesLocked
File: services/core/java/com/android/server/am/ActivityStackSupervisor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3838
|
MEDIUM
| 4.3
|
android
|
processStoppingActivitiesLocked
|
services/core/java/com/android/server/am/ActivityStackSupervisor.java
|
468651c86a8adb7aa56c708d2348e99022088af3
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getURLToDeletePage(String space, String page)
{
return getURL(space, page, "delete", "confirm=1");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getURLToDeletePage
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
|
getURLToDeletePage
|
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
|
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
| 0
|
Analyze the following code function for security vulnerabilities
|
public void addNotification(StatusBarNotification notification, RankingMap ranking)
throws InflationException {
String key = notification.getKey();
if (DEBUG) Log.d(TAG, "addNotification key=" + key);
mNotificationData.updateRanking(ranking);
Entry shadeEntry = createNotificationViews(notification);
boolean isHeadsUped = shouldPeek(shadeEntry);
if (!isHeadsUped && notification.getNotification().fullScreenIntent != null) {
if (shouldSuppressFullScreenIntent(key)) {
if (DEBUG) {
Log.d(TAG, "No Fullscreen intent: suppressed by DND: " + key);
}
} else if (mNotificationData.getImportance(key)
< NotificationManager.IMPORTANCE_HIGH) {
if (DEBUG) {
Log.d(TAG, "No Fullscreen intent: not important enough: "
+ key);
}
} else {
// Stop screensaver if the notification has a full-screen intent.
// (like an incoming phone call)
awakenDreams();
// not immersive & a full-screen alert should be shown
if (DEBUG)
Log.d(TAG, "Notification has fullScreenIntent; sending fullScreenIntent");
try {
EventLog.writeEvent(EventLogTags.SYSUI_FULLSCREEN_NOTIFICATION,
key);
notification.getNotification().fullScreenIntent.send();
shadeEntry.notifyFullScreenIntentLaunched();
mMetricsLogger.count("note_fullscreen", 1);
} catch (PendingIntent.CanceledException e) {
}
}
}
abortExistingInflation(key);
mForegroundServiceController.addNotification(notification,
mNotificationData.getImportance(key));
mPendingNotifications.put(key, shadeEntry);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addNotification
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
|
addNotification
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isForegroundDisplayForceDeferred() {
return FOREGROUND_SERVICE_DEFERRED == mFgsDeferBehavior;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isForegroundDisplayForceDeferred
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
isForegroundDisplayForceDeferred
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
@GuardedBy("this")
final void updateOomAdjLocked(String oomAdjReason) {
mOomAdjuster.updateOomAdjLocked(oomAdjReason);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateOomAdjLocked
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21292
|
MEDIUM
| 5.5
|
android
|
updateOomAdjLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String collectionAsString(Collection<?> collection, String separator) {
StringBuffer string = new StringBuffer(128);
Iterator<?> it = collection.iterator();
while (it.hasNext()) {
string.append(it.next());
if (it.hasNext()) {
string.append(separator);
}
}
return string.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: collectionAsString
File: src/org/opencms/util/CmsStringUtil.java
Repository: alkacon/opencms-core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2013-4600
|
MEDIUM
| 4.3
|
alkacon/opencms-core
|
collectionAsString
|
src/org/opencms/util/CmsStringUtil.java
|
72a05e3ea1cf692e2efce002687272e63f98c14a
| 0
|
Analyze the following code function for security vulnerabilities
|
List<IssuesDao> getIssue(IssuesRequest request);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getIssue
File: framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/track/issue/IssuesPlatform.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2022-23544
|
MEDIUM
| 6.1
|
metersphere
|
getIssue
|
framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/track/issue/IssuesPlatform.java
|
d0f95b50737c941b29d507a4cc3545f2dc6ab121
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean containsTurnScreenOnWindow() {
// When we are relaunching, it is possible for us to be unfrozen before our previous
// windows have been added back. Using the cached value ensures that our previous
// showWhenLocked preference is honored until relaunching is complete.
if (isRelaunching()) {
return mLastContainsTurnScreenOnWindow;
}
for (int i = mChildren.size() - 1; i >= 0; i--) {
if ((mChildren.get(i).mAttrs.flags & LayoutParams.FLAG_TURN_SCREEN_ON) != 0) {
return true;
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: containsTurnScreenOnWindow
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
|
containsTurnScreenOnWindow
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean havePattern(int userId) throws RemoteException {
// Do we need a permissions check here?
return mStorage.hasPattern(userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: havePattern
File: services/core/java/com/android/server/LockSettingsService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-255"
] |
CVE-2016-3749
|
MEDIUM
| 4.6
|
android
|
havePattern
|
services/core/java/com/android/server/LockSettingsService.java
|
e83f0f6a5a6f35323f5367f99c8e287c440f33f5
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isRootUrlSecure() {
String url = getRootUrl();
return url!=null && url.startsWith("https");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isRootUrlSecure
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
|
isRootUrlSecure
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String getDocumentSkinExtensionURL(DocumentReference documentReference, String documentName,
String pluginName, XWikiContext context)
{
String queryString = String.format("%s&%s%s",
getLanguageQueryString(context),
getDocumentVersionQueryString(documentReference, context),
parametersAsQueryString(documentName, context));
return context.getWiki().getURL(documentReference, pluginName, queryString, "", context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDocumentSkinExtensionURL
File: xwiki-platform-core/xwiki-platform-skin/xwiki-platform-skin-skinx/src/main/java/com/xpn/xwiki/plugin/skinx/AbstractDocumentSkinExtensionPlugin.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-29206
|
MEDIUM
| 5.4
|
xwiki/xwiki-platform
|
getDocumentSkinExtensionURL
|
xwiki-platform-core/xwiki-platform-skin/xwiki-platform-skin-skinx/src/main/java/com/xpn/xwiki/plugin/skinx/AbstractDocumentSkinExtensionPlugin.java
|
fe65bc35d5672dd2505b7ac4ec42aec57d500fbb
| 0
|
Analyze the following code function for security vulnerabilities
|
private Object registeredObjectRead(int handle) throws InvalidObjectException {
Object res = objectsRead.get(handle - ObjectStreamConstants.baseWireHandle);
if (res == UNSHARED_OBJ) {
throw new InvalidObjectException("Cannot read back reference to unshared object");
}
return res;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: registeredObjectRead
File: luni/src/main/java/java/io/ObjectInputStream.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-7911
|
HIGH
| 7.2
|
android
|
registeredObjectRead
|
luni/src/main/java/java/io/ObjectInputStream.java
|
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String transferSpecialCharacter(String str) {
String regEx="[`~!@#$%^&*()+=|{}':;',\\[\\].<>/?~!@#¥%……&*()——+|{}【】‘;:”“’。,、?]";
Pattern pattern = Pattern.compile(regEx);
Matcher matcher = pattern.matcher(str);
if(matcher.find()){
CharSequence cs = str;
int j =0;
for(int i=0; i< cs.length(); i++){
String temp = String.valueOf(cs.charAt(i));
Matcher m2 = pattern.matcher(temp);
if(m2.find()){
StringBuilder sb = new StringBuilder(str);
str = sb.insert(j, "\\").toString();
j++;
}
j++; //转义完成后str的长度增1
}
}
return str;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: transferSpecialCharacter
File: test-track/backend/src/main/java/io/metersphere/service/issue/platform/AbstractIssuePlatform.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2022-23544
|
MEDIUM
| 6.1
|
metersphere
|
transferSpecialCharacter
|
test-track/backend/src/main/java/io/metersphere/service/issue/platform/AbstractIssuePlatform.java
|
d0f95b50737c941b29d507a4cc3545f2dc6ab121
| 0
|
Analyze the following code function for security vulnerabilities
|
public @ColorInt int getPrimaryTextColor() {
return mPrimaryTextColor;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPrimaryTextColor
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
getPrimaryTextColor
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<WifiConfiguration> getConfiguredNetworksWithPasswords() {
return getConfiguredNetworks(false, false, Process.WIFI_UID);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getConfiguredNetworksWithPasswords
File: service/java/com/android/server/wifi/WifiConfigManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
getConfiguredNetworksWithPasswords
|
service/java/com/android/server/wifi/WifiConfigManager.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
protected boolean showEmptyTextWarnings() {
return mAttachmentsView.getAttachments().size() == 0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: showEmptyTextWarnings
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
|
showEmptyTextWarnings
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public byte[] getSessionID() {
return kexer.getSessionID();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSessionID
File: src/main/java/net/schmizz/sshj/transport/TransportImpl.java
Repository: hierynomus/sshj
The code follows secure coding practices.
|
[
"CWE-354"
] |
CVE-2023-48795
|
MEDIUM
| 5.9
|
hierynomus/sshj
|
getSessionID
|
src/main/java/net/schmizz/sshj/transport/TransportImpl.java
|
94fcc960e0fb198ddec0f7efc53f95ac627fe083
| 0
|
Analyze the following code function for security vulnerabilities
|
private static int getMinimumSignatureSchemeVersionForTargetSdk(int targetSdkVersion) {
if (targetSdkVersion >= AndroidSdkVersion.R) {
return VERSION_APK_SIGNATURE_SCHEME_V2;
}
return VERSION_JAR_SIGNATURE_SCHEME;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMinimumSignatureSchemeVersionForTargetSdk
File: src/main/java/com/android/apksig/ApkVerifier.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21253
|
MEDIUM
| 5.5
|
android
|
getMinimumSignatureSchemeVersionForTargetSdk
|
src/main/java/com/android/apksig/ApkVerifier.java
|
039f815895f62c9f8af23df66622b66246f3f61e
| 0
|
Analyze the following code function for security vulnerabilities
|
private VFSStatus copyFrom(VFSItem source, boolean checkQuota, Identity savedBy) {
if (source.canCopy() != VFSConstants.YES) {
log.warn("Cannot copy file {} security denied", source);
return VFSConstants.NO_SECURITY_DENIED;
}
String sourcename = source.getName();
File basefile = getBasefile();
// check if there is already an item with the same name...
if (resolve(sourcename) != null) {
log.warn("Cannot copy file {} name already used", sourcename);
return VFSConstants.ERROR_NAME_ALREDY_USED;
}
// add either file bla.txt or folder blu as a child of this folder
if (source instanceof VFSContainer) {
// copy recursively
VFSContainer sourcecontainer = (VFSContainer)source;
// check if this is a containing container...
if (VFSManager.isSelfOrParent(sourcecontainer, this)) {
log.warn("Cannot copy file {} overlapping", this);
return VFSConstants.ERROR_OVERLAPPING;
}
// "copy" the container means creating a folder with that name
// and let the children copy
// create the folder
LocalFolderImpl rootcopyfolder = new LocalFolderImpl(new File(basefile, sourcename), this);
List<VFSItem> children = sourcecontainer.getItems(new VFSVersionsItemFilter());
for (VFSItem chd:children) {
VFSStatus status = rootcopyfolder.copyFrom(chd, false, savedBy);
if (status != VFSConstants.SUCCESS) {
log.warn("Cannot copy file {} with status {}", chd, status);
}
}
} else if (source instanceof VFSLeaf) {
// copy single item
VFSLeaf s = (VFSLeaf) source;
// check quota
if (checkQuota) {
long quotaLeft = VFSManager.getQuotaLeftKB(this);
if(quotaLeft != Quota.UNLIMITED && quotaLeft < (s.getSize() / 1024)) {
log.warn("Cannot copy file {} quota exceeded {}", s, quotaLeft);
return VFSConstants.ERROR_QUOTA_EXCEEDED;
}
}
File fTarget = new File(basefile, sourcename);
try(InputStream in=s.getInputStream()) {
FileUtils.bcopy(in, fTarget, "VFScopyFrom");
} catch (Exception e) {
return VFSConstants.ERROR_FAILED;
}
if(s.canMeta() == VFSConstants.YES || s.canVersion() == VFSConstants.YES) {
VFSItem target = resolve(sourcename);
if(target instanceof VFSLeaf && (target.canMeta() == VFSConstants.YES || s.canVersion() == VFSConstants.YES)) {
VFSRepositoryService vfsRepositoryService = CoreSpringFactory.getImpl(VFSRepositoryService.class);
vfsRepositoryService.itemSaved( (VFSLeaf)target, savedBy);
vfsRepositoryService.copyTo(s, (VFSLeaf)target, this, savedBy);
}
}
} else {
throw new RuntimeException("neither a leaf nor a container!");
}
return VFSConstants.SUCCESS;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: copyFrom
File: src/main/java/org/olat/core/util/vfs/LocalFolderImpl.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-41242
|
HIGH
| 7.9
|
OpenOLAT
|
copyFrom
|
src/main/java/org/olat/core/util/vfs/LocalFolderImpl.java
|
336d5ce80681be61a0bbf4f73d2af5d1ff67e93a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void suppressResizeConfigChanges(boolean suppress) throws RemoteException {
mActivityTaskManager.suppressResizeConfigChanges(suppress);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: suppressResizeConfigChanges
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21292
|
MEDIUM
| 5.5
|
android
|
suppressResizeConfigChanges
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setOriginalPicture(String originalPicture) {
this.originalPicture = originalPicture;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setOriginalPicture
File: src/main/java/com/erudika/scoold/core/Profile.java
Repository: Erudika/scoold
The code follows secure coding practices.
|
[
"CWE-130"
] |
CVE-2022-1543
|
MEDIUM
| 6.5
|
Erudika/scoold
|
setOriginalPicture
|
src/main/java/com/erudika/scoold/core/Profile.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
public Locale getLocale()
{
return this.doc.getLocale();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLocale
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-23615
|
MEDIUM
| 5.5
|
xwiki/xwiki-platform
|
getLocale
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
|
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
| 0
|
Analyze the following code function for security vulnerabilities
|
public synchronized String getStatusText() {
return this.statusText;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStatusText
File: Testing/src/main/java/org/loboevolution/html/test/SimpleHttpRequest.java
Repository: LoboEvolution
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000540
|
MEDIUM
| 6.8
|
LoboEvolution
|
getStatusText
|
Testing/src/main/java/org/loboevolution/html/test/SimpleHttpRequest.java
|
9b75694cedfa4825d4a2330abf2719d470c654cd
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<DeletedAttachment> getDeletedAttachments(String docName, XWikiContext context) throws XWikiException
{
if (hasAttachmentRecycleBin(context)) {
XWikiDocument doc = new XWikiDocument(getCurrentMixedDocumentReferenceResolver().resolve(docName));
return getAttachmentRecycleBinStore().getAllDeletedAttachments(doc, context, true);
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDeletedAttachments
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
|
getDeletedAttachments
|
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 Registration addHeartbeatListener(HeartbeatListener listener) {
return addListener(HeartbeatListener.class, listener);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addHeartbeatListener
File: flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2023-25499
|
MEDIUM
| 6.5
|
vaadin/flow
|
addHeartbeatListener
|
flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
|
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public PendingIntentInfo getInfoForIntentSender(IIntentSender sender) {
if (sender instanceof PendingIntentRecord) {
final PendingIntentRecord res = (PendingIntentRecord) sender;
final String packageName = res.key.packageName;
final int uid = res.uid;
final boolean shouldFilter = getPackageManagerInternal().filterAppAccess(
packageName, Binder.getCallingUid(), UserHandle.getUserId(uid));
return new PendingIntentInfo(
shouldFilter ? null : packageName,
shouldFilter ? INVALID_UID : uid,
(res.key.flags & PendingIntent.FLAG_IMMUTABLE) != 0,
res.key.type);
} else {
return new PendingIntentInfo(null, INVALID_UID, false,
ActivityManager.INTENT_SENDER_UNKNOWN);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInfoForIntentSender
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21292
|
MEDIUM
| 5.5
|
android
|
getInfoForIntentSender
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean disable(boolean saveState) throws RemoteException {
NfcPermissions.enforceAdminPermissions(mContext);
if (saveState) {
saveNfcOnSetting(false);
}
new EnableDisableTask().execute(TASK_DISABLE);
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: disable
File: src/com/android/nfc/NfcService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3761
|
LOW
| 2.1
|
android
|
disable
|
src/com/android/nfc/NfcService.java
|
9ea802b5456a36f1115549b645b65c791eff3c2c
| 0
|
Analyze the following code function for security vulnerabilities
|
public Object unmarshal(HierarchicalStreamReader reader, final UnmarshallingContext context) {
return fromString(reader.getValue());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unmarshal
File: core/src/main/java/hudson/util/Secret.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-326"
] |
CVE-2017-2598
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
unmarshal
|
core/src/main/java/hudson/util/Secret.java
|
e6aa166246d1734f4798a9e31f78842f4c85c28b
| 0
|
Analyze the following code function for security vulnerabilities
|
public AutoCompletionCandidates doAutoCompleteUpstreamProjects(@QueryParameter String value) {
AutoCompletionCandidates candidates = new AutoCompletionCandidates();
List<Job> jobs = Jenkins.getInstance().getItems(Job.class);
for (Job job: jobs) {
if (job.getFullName().startsWith(value)) {
if (job.hasPermission(Item.READ)) {
candidates.add(job.getFullName());
}
}
}
return candidates;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doAutoCompleteUpstreamProjects
File: core/src/main/java/hudson/model/AbstractProject.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
doAutoCompleteUpstreamProjects
|
core/src/main/java/hudson/model/AbstractProject.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setAppointmentRequestId(Integer appointmentRequestId) {
this.appointmentRequestId = appointmentRequestId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAppointmentRequestId
File: api/src/main/java/org/openmrs/module/appointmentscheduling/AppointmentRequest.java
Repository: openmrs/openmrs-module-appointmentscheduling
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-4727
|
MEDIUM
| 6.1
|
openmrs/openmrs-module-appointmentscheduling
|
setAppointmentRequestId
|
api/src/main/java/org/openmrs/module/appointmentscheduling/AppointmentRequest.java
|
2ccbe39c020809765de41eeb8ee4c70b5ec49cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<String> getCrossProfileCalendarPackagesForUser(int userHandle) {
if (!mHasFeature) {
return Collections.emptyList();
}
Preconditions.checkArgumentNonnegative(userHandle, "Invalid userId");
Preconditions.checkCallAuthorization(
hasCallingOrSelfPermission(permission.INTERACT_ACROSS_USERS)
|| hasCallingOrSelfPermission(permission.INTERACT_ACROSS_USERS_FULL));
synchronized (getLockObject()) {
final ActiveAdmin admin = getProfileOwnerAdminLocked(userHandle);
if (admin != null) {
return admin.mCrossProfileCalendarPackages;
}
}
return Collections.emptyList();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCrossProfileCalendarPackagesForUser
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
|
getCrossProfileCalendarPackagesForUser
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public static LicenseInfo retrieveDistributor() {
final InputStream dis = PSystemVersion.class.getResourceAsStream("/distributor.txt");
if (dis == null)
return null;
try {
final BufferedReader br = new BufferedReader(new InputStreamReader(dis));
final String licenseString = br.readLine();
br.close();
final LicenseInfo result = PLSSignature.retrieveDistributor(licenseString);
final Throwable creationPoint = new Throwable();
creationPoint.fillInStackTrace();
for (StackTraceElement ste : creationPoint.getStackTrace())
if (ste.toString().contains(result.context))
return result;
return null;
} catch (Exception e) {
Logme.error(e);
return null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: retrieveDistributor
File: src/net/sourceforge/plantuml/version/LicenseInfo.java
Repository: plantuml
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2023-3431
|
MEDIUM
| 5.3
|
plantuml
|
retrieveDistributor
|
src/net/sourceforge/plantuml/version/LicenseInfo.java
|
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
| 0
|
Analyze the following code function for security vulnerabilities
|
public @NotNull Dragonfly build() {
try {
return new Dragonfly(timeout, classLoader, directory, repositories, deleteOnRelocate, statusHandler);
} catch (IOException ex) {
throw new IllegalStateException(ex);
}
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2022-41967
- Severity: HIGH
- CVSS Score: 7.5
Description: fix: CVE-2022-41967
Dragonfly v0.3.0-SNAPSHOT fails to properly configure the
DocumentBuilderFactory to prevent XML enternal entity (XXE) attacks when
parsing maven-metadata.xml files provided by external Maven repositories
during "SNAPSHOT" version resolution.
This patches CVE-2022-41967 by disabling features which may lead to XXE.
If you are currently using v0.3.0-SNAPSHOT it is STRONGLY advised to
update Dragonfly to v0.3.1-SNAPSHOT just to be safe.
Function: build
File: src/main/java/dev/hypera/dragonfly/DragonflyBuilder.java
Repository: HyperaDev/Dragonfly
Fixed Code:
@Contract(value = "-> new", pure = true)
public @NotNull Dragonfly build() {
try {
return new Dragonfly(timeout, classLoader, directory, repositories, deleteOnRelocate, statusHandler);
} catch (IOException ex) {
throw new IllegalStateException(ex);
}
}
|
[
"CWE-611"
] |
CVE-2022-41967
|
HIGH
| 7.5
|
HyperaDev/Dragonfly
|
build
|
src/main/java/dev/hypera/dragonfly/DragonflyBuilder.java
|
9661375e1135127ca6cdb5712e978bec33cc06b3
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public int hashCode() {
return Objects.hash(_userId, _setiChannel);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hashCode
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
|
hashCode
|
cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Seti.java
|
bb445a143fbf320f17c62e340455cd74acfb5929
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Route.OneArgHandler promise(final String executor,
final Deferred.Initializer0 initializer) {
return req -> new Deferred(executor, initializer);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: promise
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
|
promise
|
jooby/src/main/java/org/jooby/Jooby.java
|
34f526028e6cd0652125baa33936ffb6a8a4a009
| 0
|
Analyze the following code function for security vulnerabilities
|
private void ensureSecureSettingAndroidIdSetLocked(SettingsState secureSettings) {
Setting value = secureSettings.getSettingLocked(Settings.Secure.ANDROID_ID);
if (!value.isNull()) {
return;
}
final int userId = getUserIdFromKey(secureSettings.mKey);
final UserInfo user;
final long identity = Binder.clearCallingIdentity();
try {
user = mUserManager.getUserInfo(userId);
} finally {
Binder.restoreCallingIdentity(identity);
}
if (user == null) {
// Can happen due to races when deleting users - treat as benign.
return;
}
String androidId = Long.toHexString(new SecureRandom().nextLong());
secureSettings.insertSettingLocked(Settings.Secure.ANDROID_ID, androidId,
SettingsState.SYSTEM_PACKAGE_NAME);
Slog.d(LOG_TAG, "Generated and saved new ANDROID_ID [" + androidId
+ "] for user " + userId);
// Write a drop box entry if it's a restricted profile
if (user.isRestricted()) {
DropBoxManager dbm = (DropBoxManager) getContext().getSystemService(
Context.DROPBOX_SERVICE);
if (dbm != null && dbm.isTagEnabled(DROPBOX_TAG_USERLOG)) {
dbm.addText(DROPBOX_TAG_USERLOG, System.currentTimeMillis()
+ "," + DROPBOX_TAG_USERLOG + "," + androidId + "\n");
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: ensureSecureSettingAndroidIdSetLocked
File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3876
|
HIGH
| 7.2
|
android
|
ensureSecureSettingAndroidIdSetLocked
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
91fc934bb2e5ea59929bb2f574de6db9b5100745
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void createFeature(FF4j ff4j, HttpServletRequest req) {
// uid
final String featureId = req.getParameter(FEATID);
if (featureId != null && !featureId.isEmpty()) {
Feature fp = new Feature(featureId, false);
// Description
final String featureDesc = req.getParameter(DESCRIPTION);
if (null != featureDesc && !featureDesc.isEmpty()) {
fp.setDescription(featureDesc);
}
// GroupName
final String groupName = req.getParameter(GROUPNAME);
if (null != groupName && !groupName.isEmpty()) {
fp.setGroup(groupName);
}
// Strategy
final String strategy = req.getParameter(STRATEGY);
if (null != strategy && !strategy.isEmpty()) {
try {
Class<?> strategyClass = Class.forName(strategy);
FlippingStrategy fstrategy = (FlippingStrategy) strategyClass.newInstance();
final String strategyParams = req.getParameter(STRATEGY_INIT);
if (null != strategyParams && !strategyParams.isEmpty()) {
Map<String, String> initParams = new HashMap<String, String>();
String[] params = strategyParams.split(";");
for (String currentP : params) {
String[] cur = currentP.split("=");
if (cur.length < 2) {
throw new IllegalArgumentException("Invalid Syntax : param1=val1,val2;param2=val3,val4");
}
initParams.put(cur[0], cur[1]);
}
fstrategy.init(featureId, initParams);
}
fp.setFlippingStrategy(fstrategy);
} catch (ClassNotFoundException e) {
throw new IllegalArgumentException("Cannot find strategy class", e);
} catch (InstantiationException e) {
throw new IllegalArgumentException("Cannot instantiate strategy", e);
} catch (IllegalAccessException e) {
throw new IllegalArgumentException("Cannot instantiate : no public constructor", e);
}
}
// Permissions
final String permission = req.getParameter(PERMISSION);
if (null != permission && PERMISSION_RESTRICTED.equals(permission)) {
@SuppressWarnings("unchecked")
Map<String, Object> parameters = req.getParameterMap();
Set<String> permissions = new HashSet<String>();
for (String key : parameters.keySet()) {
if (key.startsWith(PREFIX_CHECKBOX)) {
permissions.add(key.replace(PREFIX_CHECKBOX, ""));
}
}
fp.setPermissions(permissions);
}
// Creation
ff4j.getFeatureStore().create(fp);
LOGGER.info(featureId + " has been created");
}
}
|
Vulnerability Classification:
- CWE: CWE-Other
- CVE: CVE-2022-44262
- Severity: CRITICAL
- CVSS Score: 9.8
Description: fix: Validate FlippingStrategy in various parsers (#624)
Function: createFeature
File: ff4j-web/src/main/java/org/ff4j/web/embedded/ConsoleOperations.java
Repository: ff4j
Fixed Code:
public static void createFeature(FF4j ff4j, HttpServletRequest req) {
// uid
final String featureId = req.getParameter(FEATID);
if (featureId != null && !featureId.isEmpty()) {
Feature fp = new Feature(featureId, false);
// Description
final String featureDesc = req.getParameter(DESCRIPTION);
if (null != featureDesc && !featureDesc.isEmpty()) {
fp.setDescription(featureDesc);
}
// GroupName
final String groupName = req.getParameter(GROUPNAME);
if (null != groupName && !groupName.isEmpty()) {
fp.setGroup(groupName);
}
// Strategy
final String strategy = req.getParameter(STRATEGY);
if (null != strategy && !strategy.isEmpty()) {
try {
Class<?> strategyClass = Class.forName(strategy);
if (!FlippingStrategy.class.isAssignableFrom(strategyClass)) {
throw new IllegalArgumentException("Cannot create flipstrategy: <" + strategy + "> invalid type");
}
FlippingStrategy fstrategy = (FlippingStrategy) strategyClass.newInstance();
final String strategyParams = req.getParameter(STRATEGY_INIT);
if (null != strategyParams && !strategyParams.isEmpty()) {
Map<String, String> initParams = new HashMap<String, String>();
String[] params = strategyParams.split(";");
for (String currentP : params) {
String[] cur = currentP.split("=");
if (cur.length < 2) {
throw new IllegalArgumentException("Invalid Syntax : param1=val1,val2;param2=val3,val4");
}
initParams.put(cur[0], cur[1]);
}
fstrategy.init(featureId, initParams);
}
fp.setFlippingStrategy(fstrategy);
} catch (ClassNotFoundException e) {
throw new IllegalArgumentException("Cannot find strategy class", e);
} catch (InstantiationException e) {
throw new IllegalArgumentException("Cannot instantiate strategy", e);
} catch (IllegalAccessException e) {
throw new IllegalArgumentException("Cannot instantiate : no public constructor", e);
}
}
// Permissions
final String permission = req.getParameter(PERMISSION);
if (null != permission && PERMISSION_RESTRICTED.equals(permission)) {
@SuppressWarnings("unchecked")
Map<String, Object> parameters = req.getParameterMap();
Set<String> permissions = new HashSet<String>();
for (String key : parameters.keySet()) {
if (key.startsWith(PREFIX_CHECKBOX)) {
permissions.add(key.replace(PREFIX_CHECKBOX, ""));
}
}
fp.setPermissions(permissions);
}
// Creation
ff4j.getFeatureStore().create(fp);
LOGGER.info(featureId + " has been created");
}
}
|
[
"CWE-Other"
] |
CVE-2022-44262
|
CRITICAL
| 9.8
|
ff4j
|
createFeature
|
ff4j-web/src/main/java/org/ff4j/web/embedded/ConsoleOperations.java
|
991df72725f78adbc413d9b0fbb676201f1882e0
| 1
|
Analyze the following code function for security vulnerabilities
|
public void upgradeIfNeededLocked() {
// The version of all settings for a user is the same (all users have secure).
SettingsState secureSettings = getSettingsLocked(
SETTINGS_TYPE_SECURE, mUserId);
// Try an update from the current state.
final int oldVersion = secureSettings.getVersionLocked();
final int newVersion = SETTINGS_VERSION;
// If up do date - done.
if (oldVersion == newVersion) {
return;
}
// Try to upgrade.
final int curVersion = onUpgradeLocked(mUserId, oldVersion, newVersion);
// If upgrade failed start from scratch and upgrade.
if (curVersion != newVersion) {
// Drop state we have for this user.
removeUserStateLocked(mUserId, true);
// Recreate the database.
DatabaseHelper dbHelper = new DatabaseHelper(getContext(), mUserId);
SQLiteDatabase database = dbHelper.getWritableDatabase();
dbHelper.recreateDatabase(database, newVersion, curVersion, oldVersion);
// Migrate the settings for this user.
migrateLegacySettingsForUserLocked(dbHelper, database, mUserId);
// Now upgrade should work fine.
onUpgradeLocked(mUserId, oldVersion, newVersion);
}
// Set the global settings version if owner.
if (mUserId == UserHandle.USER_SYSTEM) {
SettingsState globalSettings = getSettingsLocked(
SETTINGS_TYPE_GLOBAL, mUserId);
globalSettings.setVersionLocked(newVersion);
}
// Set the secure settings version.
secureSettings.setVersionLocked(newVersion);
// Set the system settings version.
SettingsState systemSettings = getSettingsLocked(
SETTINGS_TYPE_SYSTEM, mUserId);
systemSettings.setVersionLocked(newVersion);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: upgradeIfNeededLocked
File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3876
|
HIGH
| 7.2
|
android
|
upgradeIfNeededLocked
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
91fc934bb2e5ea59929bb2f574de6db9b5100745
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setPulling(String callId, Session.Info sessionInfo) {
Log.startSession(sessionInfo, LogUtils.Sessions.CSW_SET_PULLING, mPackageAbbreviation);
long token = Binder.clearCallingIdentity();
try {
synchronized (mLock) {
logIncoming("setPulling %s", callId);
Call call = mCallIdMapper.getCall(callId);
if (call != null) {
mCallsManager.markCallAsPulling(call);
}
}
} catch (Throwable t) {
Log.e(ConnectionServiceWrapper.this, t, "");
throw t;
} finally {
Binder.restoreCallingIdentity(token);
Log.endSession();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setPulling
File: src/com/android/server/telecom/ConnectionServiceWrapper.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
setPulling
|
src/com/android/server/telecom/ConnectionServiceWrapper.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isMinorEdit()
{
return this.isMinorEdit;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isMinorEdit
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
|
isMinorEdit
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getPersistentIdentifier() throws IndexUnreachableException {
synchronized (this) {
if (viewManager != null) {
return viewManager.getPi();
}
return "-";
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPersistentIdentifier
File: goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java
Repository: intranda/goobi-viewer-core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-29014
|
MEDIUM
| 6.1
|
intranda/goobi-viewer-core
|
getPersistentIdentifier
|
goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java
|
c29efe60e745a94d03debc17681c4950f3917455
| 0
|
Analyze the following code function for security vulnerabilities
|
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
if(grantResults != null || grantResults.length == 0) {
requestForPermission = false;
return;
}
if (grantResults[0] == PackageManager.PERMISSION_GRANTED) {
Log.i("Codename One", "PERMISSION_GRANTED");
} else {
// Permission Denied
Toast.makeText(this, "Permission is denied", Toast.LENGTH_SHORT).show();
}
requestForPermission = false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onRequestPermissionsResult
File: Ports/Android/src/com/codename1/impl/android/CodenameOneActivity.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
onRequestPermissionsResult
|
Ports/Android/src/com/codename1/impl/android/CodenameOneActivity.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setProfileDescription(String profileDescription) {
this.profileDescription = profileDescription;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setProfileDescription
File: base/common/src/main/java/com/netscape/certsrv/profile/ProfileDataInfo.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
setProfileDescription
|
base/common/src/main/java/com/netscape/certsrv/profile/ProfileDataInfo.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setCrossProfileContactsSearchDisabled(ComponentName who, boolean disabled) {
if (!mHasFeature) {
return;
}
Objects.requireNonNull(who, "ComponentName is null");
final CallerIdentity caller = getCallerIdentity(who);
Preconditions.checkCallAuthorization(isProfileOwner(caller));
synchronized (getLockObject()) {
ActiveAdmin admin = getProfileOwnerLocked(caller.getUserId());
if (disabled) {
admin.mManagedProfileContactsAccess =
new PackagePolicy(PackagePolicy.PACKAGE_POLICY_ALLOWLIST);
} else {
admin.mManagedProfileContactsAccess =
new PackagePolicy(PackagePolicy.PACKAGE_POLICY_BLOCKLIST);
}
saveSettingsLocked(caller.getUserId());
}
DevicePolicyEventLogger
.createEvent(DevicePolicyEnums.SET_CROSS_PROFILE_CONTACTS_SEARCH_DISABLED)
.setAdmin(who)
.setBoolean(disabled)
.write();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setCrossProfileContactsSearchDisabled
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
|
setCrossProfileContactsSearchDisabled
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void doUnexpectedFailure(Throwable error) {
// If the user is using a version of the application different to what
// the server expects the names of the RPC serialization policy files
// will not match, and in that case GWT just sends the exception to the
// log, which is not very user or admin friendly, so we replace that
// with a more friendly message:
if (error instanceof SerializationException) {
error = new SerializationException(
"Can't find the serialization policy file. " + //$NON-NLS-1$
"This probably means that the user has an old " + //$NON-NLS-1$
"version of the application loaded in the " + //$NON-NLS-1$
"browser. To solve the issue the user needs " + //$NON-NLS-1$
"to close the browser and open it again, so " + //$NON-NLS-1$
"that the application is reloaded.", //$NON-NLS-1$
error
);
}
// Now that we replaced the message let GWT do what it uses to do:
super.doUnexpectedFailure(error);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doUnexpectedFailure
File: frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/server/gwt/GenericApiGWTServiceImpl.java
Repository: oVirt/ovirt-engine
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2024-0822
|
HIGH
| 7.5
|
oVirt/ovirt-engine
|
doUnexpectedFailure
|
frontend/webadmin/modules/frontend/src/main/java/org/ovirt/engine/ui/frontend/server/gwt/GenericApiGWTServiceImpl.java
|
036f617316f6d7077cd213eb613eb4816e33d1fc
| 0
|
Analyze the following code function for security vulnerabilities
|
public FingerprintUnlockController getFingerprintUnlockController() {
return mFingerprintUnlockController;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFingerprintUnlockController
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
|
getFingerprintUnlockController
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
private User _doCreateAccount(StaplerRequest req, StaplerResponse rsp, String formView) throws ServletException, IOException {
if(!allowsSignup())
throw HttpResponses.error(SC_UNAUTHORIZED,new Exception("User sign up is prohibited"));
boolean firstUser = !hasSomeUser();
User u = createAccount(req, rsp, enableCaptcha, formView);
if(u!=null) {
if(firstUser)
tryToMakeAdmin(u); // the first user should be admin, or else there's a risk of lock out
loginAndTakeBack(req, rsp, u);
}
return u;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _doCreateAccount
File: core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2014-2064
|
MEDIUM
| 5
|
jenkinsci/jenkins
|
_doCreateAccount
|
core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java
|
fbf96734470caba9364f04e0b77b0bae7293a1ec
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void setAction(int value) {
m_action = value;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAction
File: src/org/opencms/workplace/CmsDialog.java
Repository: alkacon/opencms-core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2013-4600
|
MEDIUM
| 4.3
|
alkacon/opencms-core
|
setAction
|
src/org/opencms/workplace/CmsDialog.java
|
72a05e3ea1cf692e2efce002687272e63f98c14a
| 0
|
Analyze the following code function for security vulnerabilities
|
public static IOException wrap(ShutdownSignalException ex, String message) {
IOException ioe = new IOException(message);
ioe.initCause(ex);
return ioe;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: wrap
File: src/main/java/com/rabbitmq/client/impl/AMQChannel.java
Repository: rabbitmq/rabbitmq-java-client
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-46120
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-java-client
|
wrap
|
src/main/java/com/rabbitmq/client/impl/AMQChannel.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
private Set<Range<Integer>> getUidRangeSet(List<Integer> uids) {
Collections.sort(uids);
Set<Range<Integer>> uidRanges = new ArraySet<>();
int start = 0;
int next = 0;
for (int i : uids) {
if (start == next) {
start = i;
next = start + 1;
} else if (i == next) {
next++;
} else {
uidRanges.add(new Range<>(start, next - 1));
start = i;
next = start + 1;
}
}
uidRanges.add(new Range<>(start, next - 1));
return uidRanges;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUidRangeSet
File: service/java/com/android/server/wifi/ClientModeImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
getUidRangeSet
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void writeDesign(Element design, DesignContext context) {
super.writeDesign(design, context);
Attributes attrs = design.attributes();
Grid def = context.getDefaultInstance(this);
DesignAttributeHandler.writeAttribute("editable", attrs,
isEditorEnabled(), def.isEditorEnabled(), boolean.class);
DesignAttributeHandler.writeAttribute("frozen-columns", attrs,
getFrozenColumnCount(), def.getFrozenColumnCount(), int.class);
if (getHeightMode() == HeightMode.ROW) {
DesignAttributeHandler.writeAttribute("rows", attrs,
getHeightByRows(), def.getHeightByRows(), double.class);
}
SelectionMode selectionMode = null;
if (selectionModel.getClass().equals(SingleSelectionModel.class)) {
selectionMode = SelectionMode.SINGLE;
} else if (selectionModel.getClass()
.equals(MultiSelectionModel.class)) {
selectionMode = SelectionMode.MULTI;
} else if (selectionModel.getClass().equals(NoSelectionModel.class)) {
selectionMode = SelectionMode.NONE;
}
assert selectionMode != null : "Unexpected selection model "
+ selectionModel.getClass().getName();
DesignAttributeHandler.writeAttribute("selection-mode", attrs,
selectionMode, getDefaultSelectionMode(), SelectionMode.class);
if (columns.isEmpty()) {
// Empty grid. Structure not needed.
return;
}
// Do structure.
Element tableElement = design.appendElement("table");
Element colGroup = tableElement.appendElement("colgroup");
List<Column> columnOrder = getColumns();
for (int i = 0; i < columnOrder.size(); ++i) {
Column column = columnOrder.get(i);
Element colElement = colGroup.appendElement("col");
column.writeDesign(colElement, context);
}
// Always write thead. Reads correctly when there no header rows
header.writeDesign(tableElement.appendElement("thead"), context);
if (context.shouldWriteData(this)) {
Element bodyElement = tableElement.appendElement("tbody");
for (Object itemId : datasource.getItemIds()) {
Element tableRow = bodyElement.appendElement("tr");
for (Column c : getColumns()) {
Object value = datasource.getItem(itemId)
.getItemProperty(c.getPropertyId()).getValue();
tableRow.appendElement("td")
.append((value != null ? DesignFormatter
.encodeForTextNode(value.toString()) : ""));
}
}
}
if (footer.getRowCount() > 0) {
footer.writeDesign(tableElement.appendElement("tfoot"), context);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeDesign
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
|
writeDesign
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void scanBarCode(ScanResult callback) {
if (getActivity() == null) {
return;
}
if (getActivity() instanceof CodenameOneActivity) {
((CodenameOneActivity) getActivity()).setIntentResultListener(this);
}
this.callback = callback;
IntentIntegrator in = new IntentIntegrator(getActivity());
Collection<String> types = IntentIntegrator.PRODUCT_CODE_TYPES;
if(Display.getInstance().getProperty("scanAllCodeTypes", "false").equals("true")) {
types = IntentIntegrator.ALL_CODE_TYPES;
}
if(Display.getInstance().getProperty("android.scanTypes", null) != null) {
String[] arr = Display.getInstance().getProperty("android.scanTypes", null).split(";");
types = Arrays.asList(arr);
}
if(!in.initiateScan(types, "ONE_D_MODE")){
// restore old activity handling
Display.getInstance().callSerially(new Runnable() {
@Override
public void run() {
CodeScannerImpl.this.callback.scanError(-1, "no scan app");
CodeScannerImpl.this.callback = null;
}
});
if (getActivity() instanceof CodenameOneActivity) {
((CodenameOneActivity) getActivity()).restoreIntentResultListener();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: scanBarCode
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
|
scanBarCode
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isMetricApiEnable() {
return Boolean.parseBoolean(getProperty(TS_ENABLE_METRICS_API, "true"));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isMetricApiEnable
File: frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java
Repository: pytorch/serve
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2023-43654
|
CRITICAL
| 9.8
|
pytorch/serve
|
isMetricApiEnable
|
frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java
|
391bdec3348e30de173fbb7c7277970e0b53c8ad
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean decProviderCountLocked(ContentProviderConnection conn,
ContentProviderRecord cpr, IBinder externalProcessToken, boolean stable) {
if (conn != null) {
cpr = conn.provider;
if (DEBUG_PROVIDER) Slog.v(TAG_PROVIDER,
"Removing provider requested by "
+ conn.client.processName + " from process "
+ cpr.info.processName + ": " + cpr.name.flattenToShortString()
+ " scnt=" + conn.stableCount + " uscnt=" + conn.unstableCount);
if (stable) {
conn.stableCount--;
} else {
conn.unstableCount--;
}
if (conn.stableCount == 0 && conn.unstableCount == 0) {
cpr.connections.remove(conn);
conn.client.conProviders.remove(conn);
stopAssociationLocked(conn.client.uid, conn.client.processName, cpr.uid, cpr.name);
return true;
}
return false;
}
cpr.removeExternalProcessHandleLocked(externalProcessToken);
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: decProviderCountLocked
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
|
decProviderCountLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
9878bb99b77c3681f0fda116e2964bac26f349c3
| 0
|
Analyze the following code function for security vulnerabilities
|
public static ActivityOptions makeThumbnailAspectScaleDownAnimation(View source,
Bitmap thumbnail, int startX, int startY, int targetWidth, int targetHeight,
Handler handler, OnAnimationStartedListener listener) {
return makeAspectScaledThumbnailAnimation(source, thumbnail, startX, startY,
targetWidth, targetHeight, handler, listener, false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: makeThumbnailAspectScaleDownAnimation
File: core/java/android/app/ActivityOptions.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-20918
|
CRITICAL
| 9.8
|
android
|
makeThumbnailAspectScaleDownAnimation
|
core/java/android/app/ActivityOptions.java
|
51051de4eb40bb502db448084a83fd6cbfb7d3cf
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getStringUnchecked(String key, String defaultValue, int userId) {
if (Settings.Secure.LOCK_PATTERN_ENABLED.equals(key)) {
long ident = Binder.clearCallingIdentity();
try {
return mLockPatternUtils.isLockPatternEnabled(userId) ? "1" : "0";
} finally {
Binder.restoreCallingIdentity(ident);
}
}
if (LockPatternUtils.LEGACY_LOCK_PATTERN_ENABLED.equals(key)) {
key = Settings.Secure.LOCK_PATTERN_ENABLED;
}
return mStorage.readKeyValue(key, defaultValue, userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStringUnchecked
File: services/core/java/com/android/server/LockSettingsService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3908
|
MEDIUM
| 4.3
|
android
|
getStringUnchecked
|
services/core/java/com/android/server/LockSettingsService.java
|
96daf7d4893f614714761af2d53dfb93214a32e4
| 0
|
Analyze the following code function for security vulnerabilities
|
public File getBuildDirFor(Job job) {
return expandVariablesForDirectory(buildsDir, job);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getBuildDirFor
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
|
getBuildDirFor
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getPathName() {
return "universal";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPathName
File: wflow-core/src/main/java/org/joget/plugin/enterprise/UniversalTheme.java
Repository: jogetworkflow/jw-community
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-4560
|
MEDIUM
| 6.1
|
jogetworkflow/jw-community
|
getPathName
|
wflow-core/src/main/java/org/joget/plugin/enterprise/UniversalTheme.java
|
ecf8be8f6f0cb725c18536ddc726d42a11bdaa1b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onRttInitiationSuccess(String callId, Session.Info sessionInfo)
throws RemoteException {
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onRttInitiationSuccess
File: src/com/android/server/telecom/ConnectionServiceWrapper.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
onRttInitiationSuccess
|
src/com/android/server/telecom/ConnectionServiceWrapper.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isReturning() {
return mIsReturning;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isReturning
File: core/java/android/app/ActivityOptions.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-20918
|
CRITICAL
| 9.8
|
android
|
isReturning
|
core/java/android/app/ActivityOptions.java
|
51051de4eb40bb502db448084a83fd6cbfb7d3cf
| 0
|
Analyze the following code function for security vulnerabilities
|
public void updateRowId(String columnName, @Nullable RowId x) throws SQLException {
updateRowId(findColumn(columnName), x);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateRowId
File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
Repository: pgjdbc
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-31197
|
HIGH
| 8
|
pgjdbc
|
updateRowId
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void appendOpenNode(StringBuilder xml, String name, Object... attributes) {
xml.append('<').append(name);
appendAttributes(xml, attributes);
xml.append('>');
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: appendOpenNode
File: hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-522"
] |
CVE-2023-33264
|
MEDIUM
| 4.3
|
hazelcast
|
appendOpenNode
|
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
|
80a502d53cc48bf895711ab55f95e3a51e344ac1
| 0
|
Analyze the following code function for security vulnerabilities
|
void logWindowList(final WindowList windows, String prefix) {
int N = windows.size();
while (N > 0) {
N--;
Slog.v(TAG, prefix + "#" + N + ": " + windows.get(N));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: logWindowList
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
|
logWindowList
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public @ColorInt int getOrganizationColor(@NonNull ComponentName admin) {
throwIfParentInstance("getOrganizationColor");
try {
return mService.getOrganizationColor(admin);
} catch (RemoteException re) {
throw re.rethrowFromSystemServer();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getOrganizationColor
File: core/java/android/app/admin/DevicePolicyManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
getOrganizationColor
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void onRestoreInstanceState(@NonNull Bundle savedInstanceState) {
restoreInstanceState(savedInstanceState);
super.onRestoreInstanceState(savedInstanceState);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onRestoreInstanceState
File: News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java
Repository: nextcloud/news-android
The code follows secure coding practices.
|
[
"CWE-829"
] |
CVE-2021-41256
|
MEDIUM
| 5.8
|
nextcloud/news-android
|
onRestoreInstanceState
|
News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java
|
05449cb666059af7de2302df9d5c02997a23df85
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.