instruction
string | input
string | output
string | cwe_ids
list | cve_id
string | severity
string | cvss_score
float64 | repo_name
string | func_name
string | file_path
string | commit_hash
string | is_vulnerable
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Analyze the following code function for security vulnerabilities
|
public static DevModeHandlerImpl start(int runningPort, Lookup lookup,
File npmFolder, CompletableFuture<Void> waitFor) {
ApplicationConfiguration configuration = lookup
.lookup(ApplicationConfiguration.class);
if (configuration.isProductionMode()
|| !configuration.enableDevServer()) {
return null;
}
if (atomicHandler.get() == null) {
atomicHandler.compareAndSet(null,
createInstance(runningPort, lookup, npmFolder, waitFor));
}
return getDevModeHandler();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: start
File: vaadin-dev-server/src/main/java/com/vaadin/base/devserver/DevModeHandlerImpl.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-172"
] |
CVE-2021-33604
|
LOW
| 1.2
|
vaadin/flow
|
start
|
vaadin-dev-server/src/main/java/com/vaadin/base/devserver/DevModeHandlerImpl.java
|
2a801c42b406a00c44f4a85b4b4e4a4c5bf89adc
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setIgnoreTextChangesForAutocomplete(boolean ignoreAutocomplete) {
assert mUrlBarDelegate != null;
mIgnoreAutocomplete = ignoreAutocomplete;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setIgnoreTextChangesForAutocomplete
File: chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-254"
] |
CVE-2016-5163
|
MEDIUM
| 4.3
|
chromium
|
setIgnoreTextChangesForAutocomplete
|
chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java
|
3bd33fee094e863e5496ac24714c558bd58d28ef
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequiresPermission(value = MANAGE_DEVICE_POLICY_KEYGUARD, conditional = true)
public void setKeyguardDisabledFeatures(@Nullable ComponentName admin, int which) {
if (mService != null) {
try {
mService.setKeyguardDisabledFeatures(
admin, mContext.getPackageName(), which, mParentInstance);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setKeyguardDisabledFeatures
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
|
setKeyguardDisabledFeatures
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
private Syntax getDefaultDocumentSyntax()
{
Syntax syntax = Utils.getComponent(CoreConfiguration.class).getDefaultDocumentSyntax();
if (syntax == null || (!Utils.getComponentManager().hasComponent(Parser.class, syntax.toIdString())
&& !Syntax.XWIKI_2_1.equals(syntax))) {
LOGGER.warn("Failed to find parser for the default syntax [{}]. Defaulting to xwiki/2.1 syntax.", syntax);
syntax = Syntax.XWIKI_2_1;
}
return syntax;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDefaultDocumentSyntax
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
|
getDefaultDocumentSyntax
|
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
|
@Column(name = "sort", nullable = false)
public int getSort() {
return this.sort;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSort
File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/sys/SysModule.java
Repository: sanluan/PublicCMS
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2018-18927
|
LOW
| 3.5
|
sanluan/PublicCMS
|
getSort
|
publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/sys/SysModule.java
|
2b411dc2821c69539138aaf7632b938b659a58fa
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String convertAlternativeFilename(String id) {
String convertedId = id;
if(id != null) {
if(id.endsWith(WIKI_DOT_FILE_SUFFIX)) {
convertedId = convertAlternativeFilename(id, WIKI_DOT_FILE_SUFFIX);
} else if(id.endsWith(WIKI_DOT_PROPERTIES_SUFFIX)) {
convertedId = convertAlternativeFilename(id, WIKI_DOT_PROPERTIES_SUFFIX);
}
}
return convertedId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: convertAlternativeFilename
File: src/main/java/org/olat/modules/wiki/WikiManager.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-39180
|
HIGH
| 9
|
OpenOLAT
|
convertAlternativeFilename
|
src/main/java/org/olat/modules/wiki/WikiManager.java
|
699490be8e931af0ef1f135c55384db1f4232637
| 0
|
Analyze the following code function for security vulnerabilities
|
private void editScenario(ApiTestImportRequest request, ScenarioImport apiImport) {
SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.BATCH);
ApiScenarioMapper batchMapper = sqlSession.getMapper(ApiScenarioMapper.class);
List<ApiScenarioWithBLOBs> data = apiImport.getData();
currentScenarioOrder.remove();
int num = 0;
Project project = new Project();
if (!CollectionUtils.isEmpty(data) && data.get(0) != null && data.get(0).getProjectId() != null) {
project = projectMapper.selectByPrimaryKey(data.get(0).getProjectId());
num = getNextNum(data.get(0).getProjectId());
request.setOpenCustomNum(project.getScenarioCustomNum());
}
for (int i = 0; i < data.size(); i++) {
ApiScenarioWithBLOBs item = data.get(i);
if (item.getName().length() > 255) {
item.setName(item.getName().substring(0, 255));
}
item.setNum(num);
if (BooleanUtils.isFalse(project.getScenarioCustomNum())) {
// 如果未开启,即使有自定值也直接覆盖
item.setCustomNum(String.valueOf(num));
} else {
if (StringUtils.isBlank(item.getCustomNum())) {
item.setCustomNum(String.valueOf(num));
}
}
num++;
if (StringUtils.isBlank(item.getId())) {
item.setId(UUID.randomUUID().toString());
}
importCreate(item, batchMapper, request);
if (i % 300 == 0) {
sqlSession.flushStatements();
}
}
sqlSession.flushStatements();
if (sqlSession != null && sqlSessionFactory != null) {
SqlSessionUtils.closeSqlSession(sqlSession, sqlSessionFactory);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: editScenario
File: backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2021-45789
|
MEDIUM
| 6.5
|
metersphere
|
editScenario
|
backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java
|
d74e02cdff47cdf7524d305d098db6ffb7f61b47
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
if (!isIgnorableException(cause)) {
LOGGER.error("", cause);
if (ctx.channel().isActive()) {
sendError(ctx, HttpResponseStatus.INTERNAL_SERVER_ERROR);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: exceptionCaught
File: ratpack-core/src/main/java/ratpack/server/internal/NettyHandlerAdapter.java
Repository: ratpack
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2019-17513
|
MEDIUM
| 5
|
ratpack
|
exceptionCaught
|
ratpack-core/src/main/java/ratpack/server/internal/NettyHandlerAdapter.java
|
efb910d38a96494256f36675ef0e5061097dd77d
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("unused")
@CalledByNative
private void setTitle(String title) {
getContentViewClient().onUpdateTitle(title);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setTitle
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
setTitle
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getUserPreferenceFromCookie(String prefname, XWikiContext context)
{
Cookie[] cookies = context.getRequest().getCookies();
if (cookies == null) {
return null;
}
for (Cookie cookie : cookies) {
String name = cookie.getName();
if (name.equals(prefname)) {
String value = cookie.getValue();
if (!value.trim().equals("")) {
return value;
} else {
break;
}
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserPreferenceFromCookie
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
|
getUserPreferenceFromCookie
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
ComponentName startServiceInPackage(int uid,
Intent service, String resolvedType, int userId) {
synchronized(this) {
if (DEBUG_SERVICE)
Slog.v(TAG, "startServiceInPackage: " + service + " type=" + resolvedType);
final long origId = Binder.clearCallingIdentity();
ComponentName res = mServices.startServiceLocked(null, service,
resolvedType, -1, uid, userId);
Binder.restoreCallingIdentity(origId);
return res;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startServiceInPackage
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3833
|
MEDIUM
| 4.3
|
android
|
startServiceInPackage
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void config(final OServerNetworkListener iListener, final OServer iServer, final Socket iSocket,
final OContextConfiguration iConfiguration) throws IOException {
configuration = iConfiguration;
registerStatelessCommands(iListener);
final String addHeaders = iConfiguration.getValueAsString("network.http.additionalResponseHeaders", null);
if (addHeaders != null)
additionalResponseHeaders = addHeaders.split(";");
// CREATE THE CLIENT CONNECTION
connection = iServer.getClientConnectionManager().connect(this);
server = iServer;
requestMaxContentLength = iConfiguration.getValueAsInteger(OGlobalConfiguration.NETWORK_HTTP_MAX_CONTENT_LENGTH);
socketTimeout = iConfiguration.getValueAsInteger(OGlobalConfiguration.NETWORK_SOCKET_TIMEOUT);
responseCharSet = iConfiguration.getValueAsString(OGlobalConfiguration.NETWORK_HTTP_CONTENT_CHARSET);
jsonResponseError = iConfiguration.getValueAsBoolean(OGlobalConfiguration.NETWORK_HTTP_JSON_RESPONSE_ERROR);
channel = new OChannelTextServer(iSocket, iConfiguration);
channel.connected();
connection.data.caller = channel.toString();
listeningAddress = getListeningAddress();
start();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: config
File: server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/ONetworkProtocolHttpAbstract.java
Repository: orientechnologies/orientdb
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2015-2912
|
MEDIUM
| 6.8
|
orientechnologies/orientdb
|
config
|
server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/ONetworkProtocolHttpAbstract.java
|
d5a45e608ba8764fd817c1bdd7cf966564e828e9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void finalize() throws Throwable {
try {
close();
} finally {
super.finalize();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: finalize
File: core/java/android/bluetooth/BluetoothSocket.java
Repository: Genymobile/f2ut_platform_frameworks_base
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2014-9908
|
LOW
| 3.3
|
Genymobile/f2ut_platform_frameworks_base
|
finalize
|
core/java/android/bluetooth/BluetoothSocket.java
|
f24cec326f5f65c693544fb0b92c37f633bacda2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Future<Void> close() {
Promise<Void> promise = Promise.promise();
close(promise);
return promise.future();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: close
File: src/main/java/io/vertx/ext/stomp/impl/StompServerImpl.java
Repository: vert-x3/vertx-stomp
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2023-32081
|
MEDIUM
| 6.5
|
vert-x3/vertx-stomp
|
close
|
src/main/java/io/vertx/ext/stomp/impl/StompServerImpl.java
|
0de4bc5a44ddb57e74d92c445f16456fa03f265b
| 0
|
Analyze the following code function for security vulnerabilities
|
private static int findNonSPLenient(AppendableCharSequence sb, int offset) {
for (int result = offset; result < sb.length(); ++result) {
char c = sb.charAtUnsafe(result);
// See https://tools.ietf.org/html/rfc7230#section-3.5
if (isSPLenient(c)) {
continue;
}
if (Character.isWhitespace(c)) {
// Any other whitespace delimiter is invalid
throw new IllegalArgumentException("Invalid separator");
}
return result;
}
return sb.length();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findNonSPLenient
File: codec-http/src/main/java/io/netty/handler/codec/http/HttpObjectDecoder.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-444"
] |
CVE-2021-43797
|
MEDIUM
| 4.3
|
netty
|
findNonSPLenient
|
codec-http/src/main/java/io/netty/handler/codec/http/HttpObjectDecoder.java
|
07aa6b5938a8b6ed7a6586e066400e2643897323
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public MergeTarget newEmptyTargetForField(
Descriptors.FieldDescriptor descriptor, Message defaultInstance) {
throw new UnsupportedOperationException("newEmptyTargetForField() called on FieldSet object");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: newEmptyTargetForField
File: java/core/src/main/java/com/google/protobuf/MessageReflection.java
Repository: protocolbuffers/protobuf
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2022-3509
|
HIGH
| 7.5
|
protocolbuffers/protobuf
|
newEmptyTargetForField
|
java/core/src/main/java/com/google/protobuf/MessageReflection.java
|
a3888f53317a8018e7a439bac4abeb8f3425d5e9
| 0
|
Analyze the following code function for security vulnerabilities
|
public static BigDecimal toBigDecimal(long seconds, int nanoseconds)
{
if (nanoseconds == 0L) {
// 14-Mar-2015, tatu: Let's retain one zero to avoid interpretation
// as integral number
if (seconds == 0L) { // except for "0.0" where it can not be done without scientific notation
return BigDecimal.ZERO.setScale(1);
}
return BigDecimal.valueOf(seconds).setScale(9);
}
return new BigDecimal(toDecimal(seconds, nanoseconds));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toBigDecimal
File: datetime/src/main/java/com/fasterxml/jackson/datatype/jsr310/DecimalUtils.java
Repository: FasterXML/jackson-modules-java8
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-1000873
|
MEDIUM
| 4.3
|
FasterXML/jackson-modules-java8
|
toBigDecimal
|
datetime/src/main/java/com/fasterxml/jackson/datatype/jsr310/DecimalUtils.java
|
ba27ce5909dfb49bcaf753ad3e04ecb980010b0b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onRefresh() {
startSync();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onRefresh
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
|
onRefresh
|
News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java
|
05449cb666059af7de2302df9d5c02997a23df85
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isPopup() {
return Boolean.valueOf(getParamIsPopup()).booleanValue();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isPopup
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
|
isPopup
|
src/org/opencms/workplace/CmsDialog.java
|
72a05e3ea1cf692e2efce002687272e63f98c14a
| 0
|
Analyze the following code function for security vulnerabilities
|
private void notifyStatusChanged(int moveId, int status, long estMillis) {
Slog.v(TAG, "Move " + moveId + " status " + status);
final SomeArgs args = SomeArgs.obtain();
args.argi1 = moveId;
args.argi2 = status;
args.arg3 = estMillis;
obtainMessage(MSG_STATUS_CHANGED, args).sendToTarget();
synchronized (mLastStatus) {
mLastStatus.put(moveId, status);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: notifyStatusChanged
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
|
notifyStatusChanged
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
public void clearFingerprintRecognized() {
mUserFingerprintAuthenticated.clear();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearFingerprintRecognized
File: packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
clearFingerprintRecognized
|
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
private float getFadeoutAlpha() {
float alpha = (getNotificationsTopY() + mNotificationStackScroller.getFirstItemMinHeight())
/ mQsMinExpansionHeight;
alpha = Math.max(0, Math.min(alpha, 1));
alpha = (float) Math.pow(alpha, 0.75);
return alpha;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFadeoutAlpha
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
getFadeoutAlpha
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isProvidersListEmpty() {
return mProviders.isEmpty();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isProvidersListEmpty
File: service/java/com/android/server/wifi/hotspot2/PasspointManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-120"
] |
CVE-2023-21243
|
MEDIUM
| 5.5
|
android
|
isProvidersListEmpty
|
service/java/com/android/server/wifi/hotspot2/PasspointManager.java
|
5b49b8711efaadadf5052ba85288860c2d7ca7a6
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String getTestStr(String teststr) throws BadFormDesignException {
if (StringUtils.isBlank(teststr))
throw new BadFormDesignException("Can't extract the test expression from " + teststr);
//get the text inside the quotes, i.e the expression
String[] actualExpression = StringUtils.substringsBetween(teststr, "\"", "\"");
if (actualExpression == null || actualExpression.length != 1 || StringUtils.isBlank(actualExpression[0])) {
throw new BadFormDesignException("Can't extract the test expression from " + teststr);//throw bad design exception here
}
return actualExpression[0];
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTestStr
File: api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java
Repository: openmrs/openmrs-module-htmlformentry
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-16521
|
HIGH
| 7.5
|
openmrs/openmrs-module-htmlformentry
|
getTestStr
|
api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java
|
9dcd304688e65c31cac5532fe501b9816ed975ae
| 0
|
Analyze the following code function for security vulnerabilities
|
public void dump(PrintWriter pw) {
pw.println("Dump of PasspointManager");
pw.println("mEnabled: " + mEnabled);
pw.println("PasspointManager - Providers Begin ---");
for (Map.Entry<String, PasspointProvider> entry : mProviders.entrySet()) {
pw.println(entry.getValue());
}
pw.println("PasspointManager - Providers End ---");
pw.println("PasspointManager - Next provider ID to be assigned " + mProviderIndex);
mAnqpCache.dump(pw);
mAnqpRequestManager.dump(pw);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dump
File: service/java/com/android/server/wifi/hotspot2/PasspointManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-120"
] |
CVE-2023-21243
|
MEDIUM
| 5.5
|
android
|
dump
|
service/java/com/android/server/wifi/hotspot2/PasspointManager.java
|
5b49b8711efaadadf5052ba85288860c2d7ca7a6
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean llcpActivated(NfcDepEndpoint device) {
Log.d(TAG, "LLCP Activation message");
if (device.getMode() == NfcDepEndpoint.MODE_P2P_TARGET) {
if (DBG) Log.d(TAG, "NativeP2pDevice.MODE_P2P_TARGET");
if (device.connect()) {
/* Check LLCP compliancy */
if (mDeviceHost.doCheckLlcp()) {
/* Activate LLCP Link */
if (mDeviceHost.doActivateLlcp()) {
if (DBG) Log.d(TAG, "Initiator Activate LLCP OK");
synchronized (NfcService.this) {
// Register P2P device
mObjectMap.put(device.getHandle(), device);
}
mP2pLinkManager.onLlcpActivated(device.getLlcpVersion());
return true;
} else {
/* should not happen */
Log.w(TAG, "Initiator LLCP activation failed. Disconnect.");
device.disconnect();
}
} else {
if (DBG) Log.d(TAG, "Remote Target does not support LLCP. Disconnect.");
device.disconnect();
}
} else {
if (DBG) Log.d(TAG, "Cannot connect remote Target. Polling loop restarted.");
/*
* The polling loop should have been restarted in failing
* doConnect
*/
}
} else if (device.getMode() == NfcDepEndpoint.MODE_P2P_INITIATOR) {
if (DBG) Log.d(TAG, "NativeP2pDevice.MODE_P2P_INITIATOR");
/* Check LLCP compliancy */
if (mDeviceHost.doCheckLlcp()) {
/* Activate LLCP Link */
if (mDeviceHost.doActivateLlcp()) {
if (DBG) Log.d(TAG, "Target Activate LLCP OK");
synchronized (NfcService.this) {
// Register P2P device
mObjectMap.put(device.getHandle(), device);
}
mP2pLinkManager.onLlcpActivated(device.getLlcpVersion());
return true;
}
} else {
Log.w(TAG, "checkLlcp failed");
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: llcpActivated
File: src/com/android/nfc/NfcService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3761
|
LOW
| 2.1
|
android
|
llcpActivated
|
src/com/android/nfc/NfcService.java
|
9ea802b5456a36f1115549b645b65c791eff3c2c
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setEatPrefix(String argEatPrefix) {
this.eatPrefix = argEatPrefix;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setEatPrefix
File: src/main/java/emissary/pickup/WorkBundle.java
Repository: NationalSecurityAgency/emissary
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2021-32634
|
MEDIUM
| 6.5
|
NationalSecurityAgency/emissary
|
setEatPrefix
|
src/main/java/emissary/pickup/WorkBundle.java
|
40260b1ec1f76cc92361702cc14fa1e4388e19d7
| 0
|
Analyze the following code function for security vulnerabilities
|
static public InputStream tryOpenAsCompressedFile(File file, String mimeType) {
return tryOpenAsCompressedFile(file, mimeType, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: tryOpenAsCompressedFile
File: main/src/com/google/refine/importing/ImportingUtilities.java
Repository: OpenRefine
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-19859
|
MEDIUM
| 4
|
OpenRefine
|
tryOpenAsCompressedFile
|
main/src/com/google/refine/importing/ImportingUtilities.java
|
e243e73e4064de87a913946bd320fbbe246da656
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public void saveAllAttachments(boolean updateParent, boolean transaction, XWikiContext context)
throws XWikiException
{
for (XWikiAttachment attachment : this.attachmentList) {
saveAttachmentContent(attachment, false, transaction, context);
}
// Save the document
if (updateParent) {
context.getWiki().saveDocument(this, context);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: saveAllAttachments
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
|
saveAllAttachments
|
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
|
void handleTimeout(int token, Object obj) {
// Notify any synchronous waiters
Operation op = null;
synchronized (mCurrentOpLock) {
op = mCurrentOperations.get(token);
if (MORE_DEBUG) {
if (op == null) Slog.w(TAG, "Timeout of token " + Integer.toHexString(token)
+ " but no op found");
}
int state = (op != null) ? op.state : OP_TIMEOUT;
if (state == OP_PENDING) {
if (DEBUG) Slog.v(TAG, "TIMEOUT: token=" + Integer.toHexString(token));
op.state = OP_TIMEOUT;
mCurrentOperations.put(token, op);
}
mCurrentOpLock.notifyAll();
}
// If there's a TimeoutHandler for this event, call it
if (op != null && op.callback != null) {
op.callback.handleTimeout();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleTimeout
File: services/backup/java/com/android/server/backup/BackupManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3759
|
MEDIUM
| 5
|
android
|
handleTimeout
|
services/backup/java/com/android/server/backup/BackupManagerService.java
|
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
| 0
|
Analyze the following code function for security vulnerabilities
|
IPackageManager getPackageManager() {
return AppGlobals.getPackageManager();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPackageManager
File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40094
|
HIGH
| 7.8
|
android
|
getPackageManager
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int[] getRunningUserIds() {
if (checkCallingPermission(INTERACT_ACROSS_USERS)
!= PackageManager.PERMISSION_GRANTED) {
String msg = "Permission Denial: isUserRunning() from pid="
+ Binder.getCallingPid()
+ ", uid=" + Binder.getCallingUid()
+ " requires " + INTERACT_ACROSS_USERS;
Slog.w(TAG, msg);
throw new SecurityException(msg);
}
synchronized (this) {
return mUserController.getStartedUserArrayLocked();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRunningUserIds
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3912
|
HIGH
| 9.3
|
android
|
getRunningUserIds
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setMetaDataDirty(boolean metaDataDirty)
{
this.isMetaDataDirty = metaDataDirty;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setMetaDataDirty
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
|
setMetaDataDirty
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected <RemoteInterfaceType, RemoteCallResponseType> Map<String, CallResult<RemoteCallResponseType>> requestOnAllNodes(
Class<RemoteInterfaceType> interfaceClass, Function<RemoteInterfaceType, Call<RemoteCallResponseType>> fn, Duration timeout) {
return super.requestOnAllNodes(interfaceClass, fn, timeout);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: requestOnAllNodes
File: graylog2-server/src/main/java/org/graylog2/rest/resources/system/debug/bundle/SupportBundleService.java
Repository: Graylog2/graylog2-server
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2023-41044
|
LOW
| 3.8
|
Graylog2/graylog2-server
|
requestOnAllNodes
|
graylog2-server/src/main/java/org/graylog2/rest/resources/system/debug/bundle/SupportBundleService.java
|
02b8792e6f4b829f0c1d87fcbf2d58b73458b938
| 0
|
Analyze the following code function for security vulnerabilities
|
public void sendConfirmationMail(String xwikiname, String password, String email, String add_message,
String contentfield) throws XWikiException
{
if (hasProgrammingRights()) {
this.xwiki.sendConfirmationEmail(xwikiname, password, email, add_message, contentfield, getXWikiContext());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendConfirmationMail
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2023-37911
|
MEDIUM
| 6.5
|
xwiki/xwiki-platform
|
sendConfirmationMail
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
|
f471f2a392aeeb9e51d59fdfe1d76fccf532523f
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getAttributeValue(Node n, String name)
{
NamedNodeMap nm = n.getAttributes();
for (int i = 0; i < nm.getLength(); i++)
{
Node node = nm.item(i);
if (name.equals(node.getNodeName()))
{
return node.getNodeValue();
}
}
return "";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAttributeValue
File: dspace-api/src/main/java/org/dspace/app/itemimport/ItemImport.java
Repository: DSpace
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-31195
|
HIGH
| 7.2
|
DSpace
|
getAttributeValue
|
dspace-api/src/main/java/org/dspace/app/itemimport/ItemImport.java
|
56e76049185bbd87c994128a9d77735ad7af0199
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void removeTemplateItem(Context context, Collection collection)
throws SQLException, AuthorizeException, IOException {
// Check authorisation
AuthorizeUtil.authorizeManageTemplateItem(context, collection);
Item template = collection.getTemplateItem();
if (template != null) {
log.info(LogHelper.getHeader(context, "remove_template_item",
"collection_id=" + collection.getID() + ",template_item_id="
+ template.getID()));
// temporarily turn off auth system, we have already checked the permission on the top of the method
// check it again will fail because we have already broken the relation between the collection and the item
context.turnOffAuthorisationSystem();
collection.setTemplateItem(null);
itemService.delete(context, template);
context.restoreAuthSystemState();
}
context.addEvent(new Event(Event.MODIFY, Constants.COLLECTION,
collection.getID(), "remove_template_item", getIdentifiers(context, collection)));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeTemplateItem
File: dspace-api/src/main/java/org/dspace/content/CollectionServiceImpl.java
Repository: DSpace
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-41189
|
HIGH
| 9
|
DSpace
|
removeTemplateItem
|
dspace-api/src/main/java/org/dspace/content/CollectionServiceImpl.java
|
277b499a5cd3a4f5eb2370513a1b7e4ec2a6e041
| 0
|
Analyze the following code function for security vulnerabilities
|
private String[] populateNonExemptAndExemptFromPolicyApps(String[] packageNames,
Set<String> outputExemptApps) {
Preconditions.checkArgument(outputExemptApps.isEmpty(), "outputExemptApps is not empty");
List<String> exemptAppsList = listPolicyExemptAppsUnchecked(mContext);
if (exemptAppsList.isEmpty()) {
return packageNames;
}
// Using a set so contains() is O(1)
Set<String> exemptApps = new HashSet<>(exemptAppsList);
List<String> nonExemptApps = new ArrayList<>(packageNames.length);
for (int i = 0; i < packageNames.length; i++) {
String app = packageNames[i];
if (exemptApps.contains(app)) {
outputExemptApps.add(app);
} else {
nonExemptApps.add(app);
}
}
String[] result = new String[nonExemptApps.size()];
nonExemptApps.toArray(result);
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: populateNonExemptAndExemptFromPolicyApps
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
populateNonExemptAndExemptFromPolicyApps
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getGlobalPrivateDnsMode(@NonNull ComponentName who) {
if (!mHasFeature) {
return PRIVATE_DNS_MODE_UNKNOWN;
}
Objects.requireNonNull(who, "ComponentName is null");
final CallerIdentity caller = getCallerIdentity(who);
Preconditions.checkCallAuthorization(isDefaultDeviceOwner(caller));
final int currentMode = ConnectivitySettingsManager.getPrivateDnsMode(mContext);
switch (currentMode) {
case ConnectivitySettingsManager.PRIVATE_DNS_MODE_OFF:
return PRIVATE_DNS_MODE_OFF;
case ConnectivitySettingsManager.PRIVATE_DNS_MODE_OPPORTUNISTIC:
return PRIVATE_DNS_MODE_OPPORTUNISTIC;
case ConnectivitySettingsManager.PRIVATE_DNS_MODE_PROVIDER_HOSTNAME:
return PRIVATE_DNS_MODE_PROVIDER_HOSTNAME;
}
return PRIVATE_DNS_MODE_UNKNOWN;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getGlobalPrivateDnsMode
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
|
getGlobalPrivateDnsMode
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean checkPassword(String password, int userId) throws RequestThrottledException {
throwIfCalledOnMainThread();
try {
VerifyCredentialResponse response =
getLockSettings().checkPassword(password, userId);
if (response.getResponseCode() == VerifyCredentialResponse.RESPONSE_OK) {
return true;
} else if (response.getResponseCode() == VerifyCredentialResponse.RESPONSE_RETRY) {
throw new RequestThrottledException(response.getTimeout());
} else {
return false;
}
} catch (RemoteException re) {
return true;
}
}
|
Vulnerability Classification:
- CWE: CWE-264
- CVE: CVE-2016-3908
- Severity: MEDIUM
- CVSS Score: 4.3
Description: Fix vulnerability in LockSettings service
Fixes bug 30003944
Change-Id: I8700d4424c6186c8d5e71d2fdede0223ad86904d
(cherry picked from commit 2d71384a139ae27cbc7b57f06662bf6ee2010f2b)
Function: checkPassword
File: core/java/com/android/internal/widget/LockPatternUtils.java
Repository: android
Fixed Code:
public boolean checkPassword(String password, int userId) throws RequestThrottledException {
throwIfCalledOnMainThread();
try {
VerifyCredentialResponse response =
getLockSettings().checkPassword(password, userId);
if (response.getResponseCode() == VerifyCredentialResponse.RESPONSE_OK) {
return true;
} else if (response.getResponseCode() == VerifyCredentialResponse.RESPONSE_RETRY) {
throw new RequestThrottledException(response.getTimeout());
} else {
return false;
}
} catch (RemoteException re) {
return false;
}
}
|
[
"CWE-264"
] |
CVE-2016-3908
|
MEDIUM
| 4.3
|
android
|
checkPassword
|
core/java/com/android/internal/widget/LockPatternUtils.java
|
96daf7d4893f614714761af2d53dfb93214a32e4
| 1
|
Analyze the following code function for security vulnerabilities
|
public void setUsageStatsManager(UsageStatsManagerInternal usageStatsManager) {
synchronized (mGlobalLock) {
mUsageStatsInternal = usageStatsManager;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUsageStatsManager
File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40094
|
HIGH
| 7.8
|
android
|
setUsageStatsManager
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
private void repostDelayedHide(int delay) {
int recommendedTimeout = mAccessibilityManager.getRecommendedTimeoutMillis(delay,
FLAG_CONTENT_ICONS | FLAG_CONTENT_CONTROLS);
mMainExecutor.removeCallbacks(mHideMenuRunnable);
mMainExecutor.executeDelayed(mHideMenuRunnable, recommendedTimeout);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: repostDelayedHide
File: libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuView.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40123
|
MEDIUM
| 5.5
|
android
|
repostDelayedHide
|
libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuView.java
|
7212a4bec2d2f1a74fa54a12a04255d6a183baa9
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setQuery(String rawQuery) {
Map<String, String> parameters = new HashMap<>();
// parsing the query parameters
try {
for (String param : rawQuery.split("&")) {
String[] pair = param.split("=");
String key = URLDecoder.decode(pair[0], "US-ASCII");
String value = null;
if (pair.length > 1) {
value = URLDecoder.decode(pair[1], "US-ASCII");
}
parameters.put(key, value);
}
} catch (IOException e) {
throw new IllegalArgumentException("Cannot parse the query parameters", e);
}
for (Entry<String, String> entry : parameters.entrySet()) {
BiConsumer<String, ConnectionFactory> handler = URI_QUERY_PARAMETER_HANDLERS
.get(entry.getKey());
if (handler != null) {
handler.accept(entry.getValue(), this);
} else {
processUriQueryParameter(entry.getKey(), entry.getValue());
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setQuery
File: src/main/java/com/rabbitmq/client/ConnectionFactory.java
Repository: rabbitmq/rabbitmq-java-client
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-46120
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-java-client
|
setQuery
|
src/main/java/com/rabbitmq/client/ConnectionFactory.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
public DescribableList<NodeProperty<?>, NodePropertyDescriptor> getGlobalNodeProperties() {
return globalNodeProperties;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getGlobalNodeProperties
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
|
getGlobalNodeProperties
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
public void registerUidObserver(IUidObserver observer) throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: registerUidObserver
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
registerUidObserver
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean endCallInternal() {
// Always operate on the foreground call if one exists, otherwise get the first call in
// priority order by call-state.
Call call = mCallsManager.getForegroundCall();
if (call == null) {
call = mCallsManager.getFirstCallWithState(
CallState.ACTIVE,
CallState.DIALING,
CallState.RINGING,
CallState.ON_HOLD);
}
if (call != null) {
if (call.getState() == CallState.RINGING) {
call.reject(false /* rejectWithMessage */, null);
} else {
call.disconnect();
}
return true;
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: endCallInternal
File: src/com/android/server/telecom/TelecomServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-0847
|
HIGH
| 7.2
|
android
|
endCallInternal
|
src/com/android/server/telecom/TelecomServiceImpl.java
|
2750faaa1ec819eed9acffea7bd3daf867fda444
| 0
|
Analyze the following code function for security vulnerabilities
|
private String marshalSP(ServiceProvider serviceProvider, String tenantDomain)
throws IdentityApplicationManagementException {
try {
JAXBContext jaxbContext = JAXBContext.newInstance(ServiceProvider.class);
Marshaller marshaller = jaxbContext.createMarshaller();
DocumentBuilderFactory docBuilderFactory = IdentityUtil.getSecuredDocumentBuilderFactory();
Document document = docBuilderFactory.newDocumentBuilder().newDocument();
marshaller.marshal(serviceProvider, document);
TransformerFactory transformerFactory = TransformerFactory.newInstance();
Transformer transformer = transformerFactory.newTransformer();
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
transformer.setOutputProperty(OutputKeys.CDATA_SECTION_ELEMENTS,
"AuthenticationScript inboundConfiguration");
StringWriter stringBuilder = new StringWriter();
StreamResult result = new StreamResult(stringBuilder);
transformer.transform(new DOMSource(document), result);
return stringBuilder.getBuffer().toString();
} catch (JAXBException | ParserConfigurationException | TransformerException e) {
throw new IdentityApplicationManagementException(String.format("Error in exporting Service Provider %s@%s",
serviceProvider.getApplicationName(), tenantDomain), e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: marshalSP
File: components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
Repository: wso2/carbon-identity-framework
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-42646
|
MEDIUM
| 6.4
|
wso2/carbon-identity-framework
|
marshalSP
|
components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
|
e9119883ee02a884f3c76c7bbc4022a4f4c58fc0
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("resource") // Clears warning about RandomAccessFile not
// being closed. It is closed in operationComplete().
public void sendFile(final HttpResponseStatus status,
final String path,
final int max_age) throws IOException {
if (max_age < 0) {
throw new IllegalArgumentException("Negative max_age=" + max_age
+ " for path=" + path);
}
if (!channel().isConnected()) {
done();
return;
}
RandomAccessFile file;
try {
file = new RandomAccessFile(path, "r");
} catch (FileNotFoundException e) {
logWarn("File not found: " + e.getMessage());
if (getQueryString() != null && !getQueryString().isEmpty()) {
getQueryString().remove("png"); // Avoid potential recursion.
}
this.sendReply(HttpResponseStatus.NOT_FOUND, serializer.formatNotFoundV1());
return;
}
final long length = file.length();
{
final String mimetype = guessMimeTypeFromUri(path);
response().headers().set(HttpHeaders.Names.CONTENT_TYPE,
mimetype == null ? "text/plain" : mimetype);
final long mtime = new File(path).lastModified();
if (mtime > 0) {
response().headers().set(HttpHeaders.Names.AGE,
(System.currentTimeMillis() - mtime) / 1000);
} else {
logWarn("Found a file with mtime=" + mtime + ": " + path);
}
response().headers().set(HttpHeaders.Names.CACHE_CONTROL,
"max-age=" + max_age);
HttpHeaders.setContentLength(response(), length);
channel().write(response());
}
final DefaultFileRegion region = new DefaultFileRegion(file.getChannel(),
0, length);
final ChannelFuture future = channel().write(region);
future.addListener(new ChannelFutureListener() {
public void operationComplete(final ChannelFuture future) {
region.releaseExternalResources();
done();
}
});
if (!HttpHeaders.isKeepAlive(request())) {
future.addListener(ChannelFutureListener.CLOSE);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendFile
File: src/tsd/HttpQuery.java
Repository: OpenTSDB/opentsdb
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-25827
|
MEDIUM
| 6.1
|
OpenTSDB/opentsdb
|
sendFile
|
src/tsd/HttpQuery.java
|
ff02c1e95e60528275f69b31bcbf7b2ac625cea8
| 0
|
Analyze the following code function for security vulnerabilities
|
public ClientConfig getDefaultClientConfig() {
ClientConfig clientConfig = new ClientConfig();
clientConfig.register(MultiPartFeature.class);
clientConfig.register(json);
clientConfig.register(JacksonFeature.class);
clientConfig.property(HttpUrlConnectorProvider.SET_METHOD_WORKAROUND, true);
// turn off compliance validation to be able to send payloads with DELETE calls
clientConfig.property(ClientProperties.SUPPRESS_HTTP_COMPLIANCE_VALIDATION, true);
if (debugging) {
clientConfig.register(new LoggingFeature(java.util.logging.Logger.getLogger(LoggingFeature.DEFAULT_LOGGER_NAME), java.util.logging.Level.INFO, LoggingFeature.Verbosity.PAYLOAD_ANY, 1024*50 /* Log payloads up to 50K */));
clientConfig.property(LoggingFeature.LOGGING_FEATURE_VERBOSITY, LoggingFeature.Verbosity.PAYLOAD_ANY);
// Set logger to ALL
java.util.logging.Logger.getLogger(LoggingFeature.DEFAULT_LOGGER_NAME).setLevel(java.util.logging.Level.ALL);
} else {
// suppress warnings for payloads with DELETE calls:
java.util.logging.Logger.getLogger("org.glassfish.jersey.client").setLevel(java.util.logging.Level.SEVERE);
}
return clientConfig;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDefaultClientConfig
File: samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
getDefaultClientConfig
|
samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void internalResetCursor(AsyncResponse asyncResponse, String subName, long timestamp,
boolean authoritative) {
if (topicName.isGlobal()) {
try {
validateGlobalNamespaceOwnership(namespaceName);
} catch (Exception e) {
log.warn("[{}][{}] Failed to reset cursor on subscription {} to time {}: {}",
clientAppId(), topicName,
subName, timestamp, e.getMessage());
resumeAsyncResponseExceptionally(asyncResponse, e);
return;
}
}
validateTopicOwnership(topicName, authoritative);
validateTopicOperation(topicName, TopicOperation.RESET_CURSOR, subName);
// If the topic name is a partition name, no need to get partition topic metadata again
if (topicName.isPartitioned()) {
internalResetCursorForNonPartitionedTopic(asyncResponse, subName, timestamp, authoritative);
} else {
getPartitionedTopicMetadataAsync(topicName,
authoritative, false).thenAccept(partitionMetadata -> {
final int numPartitions = partitionMetadata.partitions;
if (numPartitions > 0) {
final CompletableFuture<Void> future = new CompletableFuture<>();
final AtomicInteger count = new AtomicInteger(numPartitions);
final AtomicInteger failureCount = new AtomicInteger(0);
final AtomicReference<Throwable> partitionException = new AtomicReference<>();
for (int i = 0; i < numPartitions; i++) {
TopicName topicNamePartition = topicName.getPartition(i);
try {
pulsar().getAdminClient().topics()
.resetCursorAsync(topicNamePartition.toString(),
subName, timestamp).handle((r, ex) -> {
if (ex != null) {
if (ex instanceof PreconditionFailedException) {
// throw the last exception if all partitions get this error
// any other exception on partition is reported back to user
failureCount.incrementAndGet();
partitionException.set(ex);
} else {
log.warn("[{}] [{}] Failed to reset cursor on subscription {} to time {}",
clientAppId(), topicNamePartition, subName, timestamp, ex);
future.completeExceptionally(ex);
return null;
}
}
if (count.decrementAndGet() == 0) {
future.complete(null);
}
return null;
});
} catch (Exception e) {
log.warn("[{}] [{}] Failed to reset cursor on subscription {} to time {}", clientAppId(),
topicNamePartition, subName, timestamp, e);
future.completeExceptionally(e);
}
}
future.whenComplete((r, ex) -> {
if (ex != null) {
if (ex instanceof PulsarAdminException) {
asyncResponse.resume(new RestException((PulsarAdminException) ex));
return;
} else {
asyncResponse.resume(new RestException(ex));
return;
}
}
// report an error to user if unable to reset for all partitions
if (failureCount.get() == numPartitions) {
log.warn("[{}] [{}] Failed to reset cursor on subscription {} to time {}",
clientAppId(), topicName,
subName, timestamp, partitionException.get());
asyncResponse.resume(
new RestException(Status.PRECONDITION_FAILED,
partitionException.get().getMessage()));
return;
} else if (failureCount.get() > 0) {
log.warn("[{}] [{}] Partial errors for reset cursor on subscription {} to time {}",
clientAppId(), topicName, subName, timestamp, partitionException.get());
}
asyncResponse.resume(Response.noContent().build());
});
} else {
internalResetCursorForNonPartitionedTopic(asyncResponse, subName, timestamp, authoritative);
}
}).exceptionally(ex -> {
log.error("[{}] Failed to expire messages for all subscription on topic {}",
clientAppId(), topicName, ex);
resumeAsyncResponseExceptionally(asyncResponse, ex);
return null;
});
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: internalResetCursor
File: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
Repository: apache/pulsar
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-41571
|
MEDIUM
| 4
|
apache/pulsar
|
internalResetCursor
|
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
|
5b35bb81c31f1bc2ad98c9fde5b39ec68110ca52
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onPackagesSuspendedChanged(String[] packages, boolean suspended, int userId) {
synchronized (mGlobalLock) {
mRecentTasks.onPackagesSuspendedChanged(packages, suspended, userId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onPackagesSuspendedChanged
File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40094
|
HIGH
| 7.8
|
android
|
onPackagesSuspendedChanged
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Group findByName(Context context, String name) throws SQLException {
if (name == null) {
return null;
}
return groupDAO.findByName(context, name);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findByName
File: dspace-api/src/main/java/org/dspace/eperson/GroupServiceImpl.java
Repository: DSpace
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-41189
|
HIGH
| 9
|
DSpace
|
findByName
|
dspace-api/src/main/java/org/dspace/eperson/GroupServiceImpl.java
|
277b499a5cd3a4f5eb2370513a1b7e4ec2a6e041
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getTitle(XWikiRequest request, XWikiDocument newDocument, boolean isSpace)
{
String title = request.getParameter("title");
if (StringUtils.isEmpty(title)) {
if (isSpace) {
title = newDocument.getDocumentReference().getLastSpaceReference().getName();
} else {
title = newDocument.getDocumentReference().getName();
// Avoid WebHome titles for pages that are really space homepages.
if (WEBHOME.equals(title)) {
title = newDocument.getDocumentReference().getLastSpaceReference().getName();
}
}
}
return title;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTitle
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/CreateAction.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2022-23617
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
getTitle
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/CreateAction.java
|
30c52b01559b8ef5ed1035dac7c34aaf805764d5
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public List<Project> getProjects() {
return Util.createSubList(items.values(),Project.class);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProjects
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
|
getProjects
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
public static boolean moduloPredicateImpl(URI input, int readerNumber, int numReaders) {
int hash = input.hashCode();
if (hash == Integer.MIN_VALUE) {
hash = 0; // Math.abs(Integer.MIN_VALUE) == Integer.MIN_VALUE
}
return Math.abs(hash) % numReaders == readerNumber;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: moduloPredicateImpl
File: server/src/main/java/io/crate/execution/engine/collect/files/FileReadingIterator.java
Repository: crate
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2024-24565
|
MEDIUM
| 6.5
|
crate
|
moduloPredicateImpl
|
server/src/main/java/io/crate/execution/engine/collect/files/FileReadingIterator.java
|
4e857d675683095945dd524d6ba03e692c70ecd6
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void printModule(MapValue module, int dateColWidth, int versionColWidth, int authorsColWidth,
int nameColWidth, int descColWidth, int minDescColWidth) {
String orgName = module.getStringValue("orgName");
String packageName = module.getStringValue("name");
printInCLI("|" + orgName + "/" + packageName, nameColWidth);
String summary = module.getStringValue("summary");
if (descColWidth >= minDescColWidth) {
printInCLI(summary, descColWidth - authorsColWidth);
String authors = "";
ArrayValue authorsArr = module.getArrayValue("authors");
if (authorsArr.size() > 0) {
for (int j = 0; j < authorsArr.size(); j++) {
if (j == 0) {
authors = (String) authorsArr.get(j);
} else if (j == authorsArr.size() - 1) {
authors = (String) authorsArr.get(j);
} else {
authors = ", " + authorsArr.get(j);
}
}
}
printInCLI(authors, authorsColWidth);
} else {
printInCLI(summary, descColWidth);
}
long createTimeJson = module.getIntValue("createdDate");
printInCLI(getDateCreated(createTimeJson), dateColWidth);
String packageVersion = module.getStringValue("version");
printInCLI(packageVersion, versionColWidth);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: printModule
File: cli/ballerina-cli-module/src/main/java/org/ballerinalang/cli/module/Search.java
Repository: ballerina-platform/ballerina-lang
The code follows secure coding practices.
|
[
"CWE-306"
] |
CVE-2021-32700
|
MEDIUM
| 5.8
|
ballerina-platform/ballerina-lang
|
printModule
|
cli/ballerina-cli-module/src/main/java/org/ballerinalang/cli/module/Search.java
|
4609ffee1744ecd16aac09303b1783bf0a525816
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable
private String remove0(int h, int i, CharSequence name) {
HeaderEntry e = entries[i];
if (e == null) {
return null;
}
String value = null;
HeaderEntry next = e.next;
while (next != null) {
if (next.hash == h && keyEquals(next.key, name)) {
value = next.value;
e.next = next.next;
next.remove();
--size;
} else {
e = next;
}
next = e.next;
}
e = entries[i];
if (e.hash == h && keyEquals(e.key, name)) {
if (value == null) {
value = e.value;
}
entries[i] = e.next;
e.remove();
--size;
}
return value;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: remove0
File: 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
|
remove0
|
core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
|
b597f7a865a527a84ee3d6937075cfbb4470ed20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setContent(ByteBuf buffer) throws IOException {
ObjectUtil.checkNotNull(buffer, "buffer");
try {
size = buffer.readableBytes();
checkSize(size);
if (definedSize > 0 && definedSize < size) {
throw new IOException("Out of size: " + size + " > " + definedSize);
}
if (file == null) {
file = tempFile();
}
if (buffer.readableBytes() == 0) {
// empty file
if (!file.createNewFile()) {
if (file.length() == 0) {
return;
} else {
if (!file.delete() || !file.createNewFile()) {
throw new IOException("file exists already: " + file);
}
}
}
return;
}
RandomAccessFile accessFile = new RandomAccessFile(file, "rw");
try {
accessFile.setLength(0);
FileChannel localfileChannel = accessFile.getChannel();
ByteBuffer byteBuffer = buffer.nioBuffer();
int written = 0;
while (written < size) {
written += localfileChannel.write(byteBuffer);
}
buffer.readerIndex(buffer.readerIndex() + written);
localfileChannel.force(false);
} finally {
accessFile.close();
}
setCompleted();
} finally {
// Release the buffer as it was retained before and we not need a reference to it at all
// See https://github.com/netty/netty/issues/1516
buffer.release();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setContent
File: codec-http/src/main/java/io/netty/handler/codec/http/multipart/AbstractDiskHttpData.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-378",
"CWE-379"
] |
CVE-2021-21290
|
LOW
| 1.9
|
netty
|
setContent
|
codec-http/src/main/java/io/netty/handler/codec/http/multipart/AbstractDiskHttpData.java
|
c735357bf29d07856ad171c6611a2e1a0e0000ec
| 0
|
Analyze the following code function for security vulnerabilities
|
private static boolean installForwardLocked(int installFlags) {
return (installFlags & PackageManager.INSTALL_FORWARD_LOCK) != 0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: installForwardLocked
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
|
installForwardLocked
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int sendIntentSender(IIntentSender target, IBinder whitelistToken, int code,
Intent intent, String resolvedType,
IIntentReceiver finishedReceiver, String requiredPermission, Bundle options) {
if (target instanceof PendingIntentRecord) {
return ((PendingIntentRecord)target).sendWithResult(code, intent, resolvedType,
whitelistToken, finishedReceiver, requiredPermission, options);
} else {
if (intent == null) {
// Weird case: someone has given us their own custom IIntentSender, and now
// they have someone else trying to send to it but of course this isn't
// really a PendingIntent, so there is no base Intent, and the caller isn't
// supplying an Intent... but we never want to dispatch a null Intent to
// a receiver, so um... let's make something up.
Slog.wtf(TAG, "Can't use null intent with direct IIntentSender call");
intent = new Intent(Intent.ACTION_MAIN);
}
try {
target.send(code, intent, resolvedType, whitelistToken, null,
requiredPermission, options);
} catch (RemoteException e) {
}
// Platform code can rely on getting a result back when the send is done, but if
// this intent sender is from outside of the system we can't rely on it doing that.
// So instead we don't give it the result receiver, and instead just directly
// report the finish immediately.
if (finishedReceiver != null) {
try {
finishedReceiver.performReceive(intent, 0,
null, null, false, false, UserHandle.getCallingUserId());
} catch (RemoteException e) {
}
}
return 0;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendIntentSender
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
|
sendIntentSender
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void endList(ListType type, Map<String, String> parameters)
{
if (type == ListType.BULLETED) {
getXHTMLWikiPrinter().printXMLEndElement("ul");
} else {
getXHTMLWikiPrinter().printXMLEndElement("ol");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: endList
File: xwiki-rendering-syntaxes/xwiki-rendering-syntax-xhtml/src/main/java/org/xwiki/rendering/internal/renderer/xhtml/XHTMLChainingRenderer.java
Repository: xwiki/xwiki-rendering
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-32070
|
MEDIUM
| 6.1
|
xwiki/xwiki-rendering
|
endList
|
xwiki-rendering-syntaxes/xwiki-rendering-syntax-xhtml/src/main/java/org/xwiki/rendering/internal/renderer/xhtml/XHTMLChainingRenderer.java
|
c40e2f5f9482ec6c3e71dbf1fff5ba8a5e44cdc1
| 0
|
Analyze the following code function for security vulnerabilities
|
public LlcpServerSocket createLlcpServerSocket(int sap, String sn, int miu, int rw,
int linearBufferLength) throws LlcpException {
return mDeviceHost.createLlcpServerSocket(sap, sn, miu, rw, linearBufferLength);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createLlcpServerSocket
File: src/com/android/nfc/NfcService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3761
|
LOW
| 2.1
|
android
|
createLlcpServerSocket
|
src/com/android/nfc/NfcService.java
|
9ea802b5456a36f1115549b645b65c791eff3c2c
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean isRestoring() {
return isRestoring;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isRestoring
File: Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/archive/ArchivePlugin.java
Repository: NationalSecurityAgency/ghidra
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2019-13623
|
MEDIUM
| 6.8
|
NationalSecurityAgency/ghidra
|
isRestoring
|
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/archive/ArchivePlugin.java
|
6c0171c9200b4490deb94abf3c92d1b3da59f9bf
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable
@Override
public CharSequence getPageTitle(int position) {
switch (position) {
case 0:
return getResources().getString(R.string.contacts);
case 1:
return getResources().getString(R.string.conferences);
default:
return super.getPageTitle(position);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPageTitle
File: src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
getPageTitle
|
src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onSaveInstanceState(Bundle b) {
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onSaveInstanceState
File: Ports/Android/src/com/codename1/location/AndroidLocationPlayServiceManager.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
onSaveInstanceState
|
Ports/Android/src/com/codename1/location/AndroidLocationPlayServiceManager.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
private String localizePlainOrKey(String key, Object... parameters)
{
return StringUtils.defaultString(getLocalization().getTranslationPlain(key, parameters), key);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: localizePlainOrKey
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
|
localizePlainOrKey
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
protected Lock getSessionLock(WrappedSession wrappedSession) {
Object lock = wrappedSession.getAttribute(getLockAttributeName());
if (lock instanceof ReentrantLock) {
return (ReentrantLock) lock;
}
if (lock == null) {
return null;
}
throw new RuntimeException(
"Something else than a ReentrantLock was stored in the "
+ getLockAttributeName() + " in the session");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSessionLock
File: flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-203"
] |
CVE-2021-31404
|
LOW
| 1.9
|
vaadin/flow
|
getSessionLock
|
flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
|
621ef1b322737d963bee624b2d2e38cd739903d9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void init(Application application) {
prettyPrint = application.getPippoSettings().isDev();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: init
File: pippo-content-type-parent/pippo-jaxb/src/main/java/ro/pippo/jaxb/JaxbEngine.java
Repository: pippo-java/pippo
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-20059
|
HIGH
| 7.5
|
pippo-java/pippo
|
init
|
pippo-content-type-parent/pippo-jaxb/src/main/java/ro/pippo/jaxb/JaxbEngine.java
|
9f36e5891c0b11f840e1e1561ae96d83ba9ce759
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void addSyncStanzaListener(StanzaListener packetListener, StanzaFilter packetFilter) {
if (packetListener == null) {
throw new NullPointerException("Packet listener is null.");
}
ListenerWrapper wrapper = new ListenerWrapper(packetListener, packetFilter);
synchronized (syncRecvListeners) {
syncRecvListeners.put(packetListener, wrapper);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addSyncStanzaListener
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
|
addSyncStanzaListener
|
smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
|
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean hasForegroundServiceNotification(String pkg, int userId,
String channelId) {
synchronized (ActivityManagerService.this) {
return mServices.hasForegroundServiceNotificationLocked(pkg, userId, channelId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasForegroundServiceNotification
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
|
hasForegroundServiceNotification
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
@GuardedBy("getLockObject()")
private void moveDoPoliciesToProfileParentAdminLocked(
ActiveAdmin doAdmin, ActiveAdmin parentAdmin) {
// The following policies can be already controlled via parent instance, skip if so.
if (parentAdmin.mPasswordPolicy.quality == PASSWORD_QUALITY_UNSPECIFIED) {
parentAdmin.mPasswordPolicy = doAdmin.mPasswordPolicy;
}
if (parentAdmin.passwordHistoryLength == ActiveAdmin.DEF_PASSWORD_HISTORY_LENGTH) {
parentAdmin.passwordHistoryLength = doAdmin.passwordHistoryLength;
}
if (parentAdmin.passwordExpirationTimeout == ActiveAdmin.DEF_PASSWORD_HISTORY_LENGTH) {
parentAdmin.passwordExpirationTimeout = doAdmin.passwordExpirationTimeout;
}
if (parentAdmin.maximumFailedPasswordsForWipe
== ActiveAdmin.DEF_MAXIMUM_FAILED_PASSWORDS_FOR_WIPE) {
parentAdmin.maximumFailedPasswordsForWipe = doAdmin.maximumFailedPasswordsForWipe;
}
if (parentAdmin.maximumTimeToUnlock == ActiveAdmin.DEF_MAXIMUM_TIME_TO_UNLOCK) {
parentAdmin.maximumTimeToUnlock = doAdmin.maximumTimeToUnlock;
}
if (parentAdmin.strongAuthUnlockTimeout
== DevicePolicyManager.DEFAULT_STRONG_AUTH_TIMEOUT_MS) {
parentAdmin.strongAuthUnlockTimeout = doAdmin.strongAuthUnlockTimeout;
}
parentAdmin.disabledKeyguardFeatures |=
doAdmin.disabledKeyguardFeatures & PROFILE_KEYGUARD_FEATURES_AFFECT_OWNER;
parentAdmin.trustAgentInfos.putAll(doAdmin.trustAgentInfos);
// The following policies weren't available to PO, but will be available after migration.
parentAdmin.disableCamera = doAdmin.disableCamera;
parentAdmin.disableScreenCapture = doAdmin.disableScreenCapture;
parentAdmin.accountTypesWithManagementDisabled.addAll(
doAdmin.accountTypesWithManagementDisabled);
moveDoUserRestrictionsToCopeParent(doAdmin, parentAdmin);
// From Android 11, {@link setAutoTimeRequired} is no longer used. The user restriction
// {@link UserManager#DISALLOW_CONFIG_DATE_TIME} should be used to enforce auto time
// settings instead.
if (doAdmin.requireAutoTime) {
parentAdmin.ensureUserRestrictions().putBoolean(
UserManager.DISALLOW_CONFIG_DATE_TIME, true);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: moveDoPoliciesToProfileParentAdminLocked
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
|
moveDoPoliciesToProfileParentAdminLocked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public void ensureNotImmutable(@NonNull String id, boolean ignoreInvisible) {
ensureNotImmutable(findShortcutById(id), ignoreInvisible);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: ensureNotImmutable
File: services/core/java/com/android/server/pm/ShortcutPackage.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40075
|
MEDIUM
| 5.5
|
android
|
ensureNotImmutable
|
services/core/java/com/android/server/pm/ShortcutPackage.java
|
ae768fbb9975fdab267f525831cb52f485ab0ecc
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setIp(String ip) {
this.ip = ip;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setIp
File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/log/LogOperate.java
Repository: sanluan/PublicCMS
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-21333
|
LOW
| 3.5
|
sanluan/PublicCMS
|
setIp
|
publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/log/LogOperate.java
|
b4d5956e65b14347b162424abb197a180229b3db
| 0
|
Analyze the following code function for security vulnerabilities
|
public String detail() {
return detail(convertRequestParam(getPara()));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: detail
File: web/src/main/java/com/zrlog/web/controller/blog/ArticleController.java
Repository: 94fzb/zrlog
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-21316
|
MEDIUM
| 4.3
|
94fzb/zrlog
|
detail
|
web/src/main/java/com/zrlog/web/controller/blog/ArticleController.java
|
b921c1ae03b8290f438657803eee05226755c941
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String getValue(Map<String, String[]> parameterMap, String key) {
String[] values = parameterMap.get(key);
if (CommonUtils.notEmpty(values)) {
return values[0];
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getValue
File: publiccms-parent/publiccms-common/src/main/java/com/publiccms/common/tools/RequestUtils.java
Repository: sanluan/PublicCMS
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-21333
|
LOW
| 3.5
|
sanluan/PublicCMS
|
getValue
|
publiccms-parent/publiccms-common/src/main/java/com/publiccms/common/tools/RequestUtils.java
|
b4d5956e65b14347b162424abb197a180229b3db
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void runTeardown() {
Assert.assertTrue("HTTP connection is not allowed", messagedAccessDenied);
}
|
Vulnerability Classification:
- CWE: CWE-862
- CVE: CVE-2019-10648
- Severity: HIGH
- CVSS Score: 7.5
Description: Bug-406: DNS interaction is not blocked by Robocode's security manager + test(s) to verify the fix
Function: runTeardown
File: robocode.tests/src/test/java/net/sf/robocode/test/robots/TestHttpAttack.java
Repository: robo-code/robocode
Fixed Code:
@Override
protected void runTeardown() {
Assert.assertTrue("Socket connection is not allowed", securityExceptionOccurred);
}
|
[
"CWE-862"
] |
CVE-2019-10648
|
HIGH
| 7.5
|
robo-code/robocode
|
runTeardown
|
robocode.tests/src/test/java/net/sf/robocode/test/robots/TestHttpAttack.java
|
836c84635e982e74f2f2771b2c8640c3a34221bd
| 1
|
Analyze the following code function for security vulnerabilities
|
private long getFadeOutDuration(@AnimationType int animationType) {
switch (animationType) {
case ANIM_TYPE_NONE:
return ANIMATION_NONE_DURATION_MS;
case ANIM_TYPE_HIDE:
return ANIMATION_HIDE_DURATION_MS;
case ANIM_TYPE_DISMISS:
return mDismissFadeOutDurationMs;
default:
throw new IllegalStateException("Invalid animation type " + animationType);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFadeOutDuration
File: libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuView.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40123
|
MEDIUM
| 5.5
|
android
|
getFadeOutDuration
|
libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuView.java
|
7212a4bec2d2f1a74fa54a12a04255d6a183baa9
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isFingerprintDetectionRunning() {
return mFingerprintRunningState == FINGERPRINT_STATE_RUNNING;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isFingerprintDetectionRunning
File: packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
isFingerprintDetectionRunning
|
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
boolean injectIsLowRamDevice() {
return ActivityManager.isLowRamDeviceStatic();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: injectIsLowRamDevice
File: services/core/java/com/android/server/pm/ShortcutService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40079
|
HIGH
| 7.8
|
android
|
injectIsLowRamDevice
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
public void rename(DocumentReference newReference) throws XWikiException
{
if (hasAccessLevel("delete") && this.context.getWiki().checkAccess("edit",
this.context.getWiki().getDocument(newReference, this.context), this.context)) {
this.getDoc().rename(newReference, getXWikiContext());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: rename
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
|
rename
|
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
|
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
CertRetrievalRequest other = (CertRetrievalRequest) obj;
return Objects.equals(certId, other.certId) && Objects.equals(requestId, other.requestId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: equals
File: base/common/src/main/java/com/netscape/certsrv/cert/CertRetrievalRequest.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
equals
|
base/common/src/main/java/com/netscape/certsrv/cert/CertRetrievalRequest.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Bundle getActivityOptions(IBinder token) {
final long origId = Binder.clearCallingIdentity();
try {
synchronized (this) {
final ActivityRecord r = ActivityRecord.isInStackLocked(token);
if (r != null) {
final ActivityOptions activityOptions = r.takeOptionsLocked();
return activityOptions == null ? null : activityOptions.toBundle();
}
return null;
}
} finally {
Binder.restoreCallingIdentity(origId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getActivityOptions
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
|
getActivityOptions
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
private void logAppCompatState() {
mTaskSupervisor.getActivityMetricsLogger().logAppCompatState(this);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: logAppCompatState
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
|
logAppCompatState
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
private void configureRandomizedMacAddress(WifiConfiguration config) {
if (config == null) {
Log.e(getTag(), "No config to change MAC address to");
return;
}
String currentMacString = mWifiNative.getMacAddress(mInterfaceName);
MacAddress currentMac = getMacAddressFromBssidString(currentMacString);
MacAddress newMac = isSecondaryInternet() && mClientModeManager.isSecondaryInternetDbsAp()
? MacAddressUtils.createRandomUnicastAddress()
: mWifiConfigManager.getRandomizedMacAndUpdateIfNeeded(config);
if (!WifiConfiguration.isValidMacAddressForRandomization(newMac)) {
Log.wtf(getTag(), "Config generated an invalid MAC address");
} else if (Objects.equals(newMac, currentMac)) {
Log.d(getTag(), "No changes in MAC address");
} else {
mWifiMetrics.logStaEvent(mInterfaceName, StaEvent.TYPE_MAC_CHANGE, config);
boolean setMacSuccess =
mWifiNative.setStaMacAddress(mInterfaceName, newMac);
if (setMacSuccess) {
mWifiNative.removeNetworkCachedDataIfNeeded(config.networkId, newMac);
}
Log.d(getTag(), "ConnectedMacRandomization SSID(" + config.getPrintableSsid()
+ "). setMacAddress(" + newMac.toString() + ") from "
+ currentMacString + " = " + setMacSuccess);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: configureRandomizedMacAddress
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
|
configureRandomizedMacAddress
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void setFiles(VFSContainer rootContainer, List<VFSLeaf> files) {
StringBuilder subjectSb = new StringBuilder();
if (StringHelper.containsNonWhitespace(subjectElement.getValue())) {
subjectSb.append(subjectElement.getValue()).append('\n').append('\n');
}
StringBuilder bodySb = new StringBuilder();
if (StringHelper.containsNonWhitespace(bodyElement.getValue())) {
bodySb.append(bodyElement.getValue()).append('\n').append('\n');
}
attachments = new ArrayList<>();
long fileSize = 0l;
for (VFSLeaf file : files) {
VFSMetadata infos = null;
if (file.canMeta() == VFSConstants.YES) {
infos = file.getMetaInfo();
}
// subject
appendToSubject(file, infos, subjectSb);
// body
appendMetadatas(file, infos, bodySb);
appendBusinessPath(rootContainer, file, bodySb);
bodySb.append('\n').append('\n');
fileSize += file.getSize();
if (allowAttachments && file instanceof LocalFileImpl) {
File f = ((LocalFileImpl) file).getBasefile();
attachments.add(f);
}
}
int mailQuota = CoreSpringFactory.getImpl(MailModule.class).getMaxSizeForAttachement();
long fileSizeInMB = fileSize / (1024l * 1024l);
if (allowAttachments) {
if (fileSizeInMB > mailQuota) {
attachments.clear();
setFormWarning("send.mail.fileToBigForAttachments", new String[] { String.valueOf(mailQuota), String.valueOf(fileSizeInMB) });
} else {
List<FileInfo> infos = new ArrayList<>(files.size());
for (VFSLeaf file : files) {
final String name = file.getName();
final double size = file.getSize() / (1024.0 * 1024.0);
final String sizeStr = formatMb.format(size);
final String cssClass = CSSHelper.createFiletypeIconCssClassFor(file.getName());
infos.add(new FileInfo(name, sizeStr, cssClass));
}
attachmentsLayout.contextPut("attachments", infos);
}
}
subjectElement.setValue(subjectSb.toString());
bodyElement.setValue(bodySb.toString());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setFiles
File: src/main/java/org/olat/core/util/mail/ui/SendDocumentsByEMailController.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-41152
|
MEDIUM
| 4
|
OpenOLAT
|
setFiles
|
src/main/java/org/olat/core/util/mail/ui/SendDocumentsByEMailController.java
|
418bb509ffcb0e25ab4390563c6c47f0458583eb
| 0
|
Analyze the following code function for security vulnerabilities
|
private Configuration populateConfig(Set<TemplateDescriptorEntity> templates, List<GlobalFunctionEntity> globalFunctionTemplates,
AMWTemplateExceptionHandler templateExceptionHandler) {
Configuration cfg = getConfiguration(templateExceptionHandler);
StringTemplateLoader loader = new StringTemplateLoader();
for (TemplateDescriptorEntity template : templates) {
loader.putTemplate(template.getName(), template.getFileContent());
if (template.getTargetPath() != null && !template.getTargetPath().isEmpty()) {
loader.putTemplate(template.getName() + BaseTemplateProcessor.FILEPATH_PLACEHOLDER,
template.getTargetPath());
}
}
addGlobalFunctionTemplates(globalFunctionTemplates, loader);
cfg.setTemplateLoader(loader);
return cfg;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: populateConfig
File: AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/generator/control/extracted/templates/BaseTemplateProcessor.java
Repository: liimaorg/liima
The code follows secure coding practices.
|
[
"CWE-917"
] |
CVE-2023-26092
|
CRITICAL
| 9.8
|
liimaorg/liima
|
populateConfig
|
AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/generator/control/extracted/templates/BaseTemplateProcessor.java
|
78ba2e198c615dc8858e56eee3290989f0362686
| 0
|
Analyze the following code function for security vulnerabilities
|
void columnReorder(ColumnReorderEvent event);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: columnReorder
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
|
columnReorder
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getIccSerialNumberForSubscriber(int subId) {
PhoneSubInfoProxy phoneSubInfoProxy = getPhoneSubInfoProxy(subId);
if (phoneSubInfoProxy != null) {
return phoneSubInfoProxy.getIccSerialNumber();
} else {
Rlog.e(TAG,"getIccSerialNumber phoneSubInfoProxy is" +
" null for Subscription:" + subId);
return null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getIccSerialNumberForSubscriber
File: src/java/com/android/internal/telephony/PhoneSubInfoController.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-0831
|
MEDIUM
| 4.3
|
android
|
getIccSerialNumberForSubscriber
|
src/java/com/android/internal/telephony/PhoneSubInfoController.java
|
79eecef63f3ea99688333c19e22813f54d4a31b1
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setOauthCredentials(String clientId, String clientSecret) {
for (Authentication auth : authentications.values()) {
if (auth instanceof OAuth) {
((OAuth) auth).setCredentials(clientId, clientSecret, isDebugging());
return this;
}
}
throw new RuntimeException("No OAuth2 authentication configured!");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setOauthCredentials
File: samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
setOauthCredentials
|
samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void prepForProcessing()
{
clearValidationExceptions();
setOverWriteExistingData(true);
setIgnoreDuplicates(false);
jobGroupsToDelete.clear();
jobsToDelete.clear();
triggerGroupsToDelete.clear();
triggersToDelete.clear();
loadedJobs.clear();
loadedTriggers.clear();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: prepForProcessing
File: quartz-core/src/main/java/org/quartz/xml/XMLSchedulingDataProcessor.java
Repository: quartz-scheduler/quartz
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2019-13990
|
HIGH
| 7.5
|
quartz-scheduler/quartz
|
prepForProcessing
|
quartz-core/src/main/java/org/quartz/xml/XMLSchedulingDataProcessor.java
|
a1395ba118df306c7fe67c24fb0c9a95a4473140
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void roundToIncrement(BigDecimal roundingIncrement, MathContext mathContext) {
// TODO(13701): Avoid this check on every call to roundToIncrement().
BigDecimal stripped = roundingIncrement.stripTrailingZeros();
if (stripped.unscaledValue().compareTo(BigInteger.valueOf(5)) == 0) {
roundToNickel(-stripped.scale(), mathContext);
return;
}
BigDecimal temp = toBigDecimal();
temp = temp.divide(roundingIncrement, 0, mathContext.getRoundingMode())
.multiply(roundingIncrement).round(mathContext);
if (temp.signum() == 0) {
setBcdToZero(); // keeps negative flag for -0.0
} else {
setToBigDecimal(temp);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: roundToIncrement
File: icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_AbstractBCD.java
Repository: unicode-org/icu
The code follows secure coding practices.
|
[
"CWE-190"
] |
CVE-2018-18928
|
HIGH
| 7.5
|
unicode-org/icu
|
roundToIncrement
|
icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_AbstractBCD.java
|
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public XMLBuilder2 text(String value) {
return this.text(value, false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: text
File: src/main/java/com/jamesmurty/utils/XMLBuilder2.java
Repository: jmurty/java-xmlbuilder
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2014-125087
|
MEDIUM
| 5.2
|
jmurty/java-xmlbuilder
|
text
|
src/main/java/com/jamesmurty/utils/XMLBuilder2.java
|
e6fddca201790abab4f2c274341c0bb8835c3e73
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void toggleKeyboardShortcuts(int deviceId) {
KeyboardShortcuts.toggle(mContext, deviceId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toggleKeyboardShortcuts
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
|
toggleKeyboardShortcuts
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public static Response createCorrectVariant(String responseObj, HttpHeaders headers, javax.ws.rs.core.Response.Status status) {
Response.ResponseBuilder responseBuilder = null;
Variant v = getVariant(headers);
if( status != null ) {
responseBuilder = Response.status(status).entity(responseObj).variant(v);
} else {
responseBuilder = Response.ok(responseObj, v);
}
return responseBuilder.build();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createCorrectVariant
File: kie-server-parent/kie-server-controller/kie-server-controller-rest/src/main/java/org/kie/server/controller/rest/ControllerUtils.java
Repository: kiegroup/droolsjbpm-integration
The code follows secure coding practices.
|
[
"CWE-260"
] |
CVE-2016-7043
|
MEDIUM
| 5
|
kiegroup/droolsjbpm-integration
|
createCorrectVariant
|
kie-server-parent/kie-server-controller/kie-server-controller-rest/src/main/java/org/kie/server/controller/rest/ControllerUtils.java
|
e916032edd47aa46d15f3a11909b4804ee20a7e8
| 0
|
Analyze the following code function for security vulnerabilities
|
public TMap readMapBegin() throws TException {
return new TMap(readByte(), readByte(), readI32());
}
|
Vulnerability Classification:
- CWE: CWE-770
- CVE: CVE-2019-11938
- Severity: MEDIUM
- CVSS Score: 5.0
Description: Java: Check the size of the remaining frame before deserializing collection
Summary:
In order to avoid over-allocating memory for malformed or truncated frame, we ensure that we have enough data (we only check for the lower bound) in the current frame.
This is a partial fix for CVE-2019-11938.
Reviewed By: vitaut
Differential Revision: D14500775
fbshipit-source-id: ca8b38965514d6319addcb72c8999a6854a94a88
Function: readMapBegin
File: thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TBinaryProtocol.java
Repository: facebook/fbthrift
Fixed Code:
public TMap readMapBegin() throws TException {
byte keyType = readByte();
byte valueType = readByte();
int size = readI32();
ensureMapHasEnough(size, keyType, valueType);
return new TMap(keyType, valueType, size);
}
|
[
"CWE-770"
] |
CVE-2019-11938
|
MEDIUM
| 5
|
facebook/fbthrift
|
readMapBegin
|
thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TBinaryProtocol.java
|
71c97ffdcb61cccf1f8267774e873e21ebd3ebd3
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onEmptySpaceClicked(float x, float y) {
onEmptySpaceClick(x);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onEmptySpaceClicked
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
onEmptySpaceClicked
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isControllerAMonkey() {
synchronized (mGlobalLock) {
return mController != null && mControllerIsAMonkey;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isControllerAMonkey
File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40094
|
HIGH
| 7.8
|
android
|
isControllerAMonkey
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void resetThrottling() {
enforceSystemOrShell();
resetThrottlingInner(getCallingUserId());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resetThrottling
File: services/core/java/com/android/server/pm/ShortcutService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40079
|
HIGH
| 7.8
|
android
|
resetThrottling
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getLastSelectedNetwork() {
return mLastSelectedNetworkId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLastSelectedNetwork
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
|
getLastSelectedNetwork
|
service/java/com/android/server/wifi/WifiConfigManager.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
public Column<T, ?> addColumn(String propertyName,
AbstractRenderer<? super T, ?> renderer) {
Objects.requireNonNull(propertyName, "Property name cannot be null");
Objects.requireNonNull(renderer, "Renderer cannot be null");
if (getColumn(propertyName) != null) {
throw new IllegalStateException(
"There is already a column for " + propertyName);
}
PropertyDefinition<T, ?> definition = propertySet
.getProperty(propertyName)
.orElseThrow(() -> new IllegalArgumentException(
"Could not resolve property name " + propertyName
+ " from " + propertySet));
if (!renderer.getPresentationType()
.isAssignableFrom(definition.getType())) {
throw new IllegalArgumentException(
renderer + " cannot be used with a property of type "
+ definition.getType().getName());
}
@SuppressWarnings({ "unchecked", "rawtypes" })
Column<T, ?> column = addColumn(definition.getGetter(),
(AbstractRenderer) renderer).setId(definition.getName())
.setCaption(definition.getCaption());
return column;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addColumn
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
|
addColumn
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.