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
|
@Override
public boolean exists() {
URL url;
if (this.clazz != null) {
url = this.clazz.getResource(this.path);
} else {
url = this.classLoader.getResource(this.path);
}
return (url != null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: exists
File: src/main/java/spark/resource/ClassPathResource.java
Repository: perwendel/spark
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-9159
|
MEDIUM
| 5
|
perwendel/spark
|
exists
|
src/main/java/spark/resource/ClassPathResource.java
|
a221a864db28eb736d36041df2fa6eb8839fc5cd
| 0
|
Analyze the following code function for security vulnerabilities
|
public Connection newConnection(ExecutorService executor, AddressResolver addressResolver) throws IOException, TimeoutException {
return newConnection(executor, addressResolver, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: newConnection
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
|
newConnection
|
src/main/java/com/rabbitmq/client/ConnectionFactory.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
private SpTemplate doGetApplicationTemplate(String templateName, String tenantDomain)
throws IdentityApplicationManagementException {
// Get SP template from cache
ServiceProviderTemplateCacheKey templateCacheKey = new ServiceProviderTemplateCacheKey(templateName,
tenantDomain);
SpTemplate spTemplate = getSpTemplateFromCache(templateCacheKey);
if (spTemplate == null) {
// Get SP template from database
spTemplate = getSpTemplateFromDB(templateName, tenantDomain, templateCacheKey);
}
return spTemplate;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doGetApplicationTemplate
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
|
doGetApplicationTemplate
|
components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
|
e9119883ee02a884f3c76c7bbc4022a4f4c58fc0
| 0
|
Analyze the following code function for security vulnerabilities
|
private List<IssuesDao> filterSyncIssuesByCreated(List<IssuesDao> issues, IssueSyncRequest syncRequest) {
List<IssuesDao> filterIssues = issues.stream().filter(issue -> {
if (syncRequest.isPre()) {
return issue.getCreateTime() <= syncRequest.getCreateTime();
} else {
return issue.getCreateTime() >= syncRequest.getCreateTime();
}
}).collect(Collectors.toList());
return filterIssues;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: filterSyncIssuesByCreated
File: test-track/backend/src/main/java/io/metersphere/service/IssuesService.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2022-23544
|
MEDIUM
| 6.1
|
metersphere
|
filterSyncIssuesByCreated
|
test-track/backend/src/main/java/io/metersphere/service/IssuesService.java
|
d0f95b50737c941b29d507a4cc3545f2dc6ab121
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getHeader(String name) {
return request.getHeaders().getFirst(name);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getHeader
File: sa-token-starter/sa-token-reactor-spring-boot-starter/src/main/java/cn/dev33/satoken/reactor/model/SaRequestForReactor.java
Repository: dromara/Sa-Token
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-44794
|
CRITICAL
| 9.8
|
dromara/Sa-Token
|
getHeader
|
sa-token-starter/sa-token-reactor-spring-boot-starter/src/main/java/cn/dev33/satoken/reactor/model/SaRequestForReactor.java
|
954efeb73277f924f836da2a25322ea35ee1bfa3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getType()
{
return HINT;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getType
File: xwiki-platform-core/xwiki-platform-attachment/xwiki-platform-attachment-api/src/main/java/org/xwiki/attachment/internal/refactoring/job/MoveAttachmentJob.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-37910
|
HIGH
| 8.1
|
xwiki/xwiki-platform
|
getType
|
xwiki-platform-core/xwiki-platform-attachment/xwiki-platform-attachment-api/src/main/java/org/xwiki/attachment/internal/refactoring/job/MoveAttachmentJob.java
|
d7720219d60d7201c696c3196c9d4a86d0881325
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean isDefaultDirectoryName(@Nullable String dirName) {
for (String defaultDirName : DEFAULT_FOLDER_NAMES) {
if (defaultDirName.equalsIgnoreCase(dirName)) {
return true;
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isDefaultDirectoryName
File: src/com/android/providers/media/util/FileUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2023-35670
|
HIGH
| 7.8
|
android
|
isDefaultDirectoryName
|
src/com/android/providers/media/util/FileUtils.java
|
db3c69afcb0a45c8aa2f333fcde36217889899fe
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String scanStartElement(boolean[] empty) throws IOException {
String ename = scanName(true);
int length = ename != null ? ename.length() : 0;
int c = length > 0 ? ename.charAt(0) : -1;
if (length == 0 || !((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))) {
if (fReportErrors) {
fErrorReporter.reportError("HTML1009", null);
}
if (fDocumentHandler != null && fElementCount >= fElementDepth) {
fStringBuffer.clear();
fStringBuffer.append('<');
if (length > 0) {
fStringBuffer.append(ename);
}
fDocumentHandler.characters(fStringBuffer, null);
}
return null;
}
ename = modifyName(ename, fNamesElems);
fAttributes.removeAllAttributes();
int beginLineNumber = fBeginLineNumber;
int beginColumnNumber = fBeginColumnNumber;
int beginCharacterOffset = fBeginCharacterOffset;
while (scanAttribute(fAttributes, empty)) {
// do nothing
}
fBeginLineNumber = beginLineNumber;
fBeginColumnNumber = beginColumnNumber;
fBeginCharacterOffset = beginCharacterOffset;
if (fByteStream != null && fElementDepth == -1) {
if (ename.equalsIgnoreCase("META") && !fIgnoreSpecifiedCharset) {
if (DEBUG_CHARSET) {
System.out.println("+++ <META>");
}
String httpEquiv = getValue(fAttributes, "http-equiv");
if (httpEquiv != null && httpEquiv.equalsIgnoreCase("content-type")) {
if (DEBUG_CHARSET) {
System.out.println("+++ @content-type: \""+httpEquiv+'"');
}
String content = getValue(fAttributes, "content");
if (content != null) {
content = removeSpaces(content);
int index1 = content.toLowerCase().indexOf("charset=");
if (index1 != -1) {
final int index2 = content.indexOf(';', index1);
final String charset = index2 != -1 ? content.substring(index1+8, index2) : content.substring(index1+8);
changeEncoding(charset);
}
}
}
else {
final String metaCharset = getValue(fAttributes, "charset");
if (metaCharset != null) {
changeEncoding(metaCharset);
}
}
}
else if (ename.equalsIgnoreCase("BODY")) {
fByteStream.clear();
fByteStream = null;
}
else {
HTMLElements.Element element = HTMLElements.getElement(ename);
if (element.parent != null && element.parent.length > 0) {
if (element.parent[0].code == HTMLElements.BODY) {
fByteStream.clear();
fByteStream = null;
}
}
}
}
if (fDocumentHandler != null && fElementCount >= fElementDepth) {
fQName.setValues(null, ename, ename, null);
if (DEBUG_CALLBACKS) {
System.out.println("startElement("+fQName+','+fAttributes+")");
}
fEndLineNumber = fCurrentEntity.getLineNumber();
fEndColumnNumber = fCurrentEntity.getColumnNumber();
fEndCharacterOffset = fCurrentEntity.getCharacterOffset();
if (empty[0]) {
fDocumentHandler.emptyElement(fQName, fAttributes, locationAugs());
}
else {
fDocumentHandler.startElement(fQName, fAttributes, locationAugs());
}
}
return ename;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: scanStartElement
File: src/org/cyberneko/html/HTMLScanner.java
Repository: sparklemotion/nekohtml
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-24839
|
MEDIUM
| 5
|
sparklemotion/nekohtml
|
scanStartElement
|
src/org/cyberneko/html/HTMLScanner.java
|
a800fce3b079def130ed42a408ff1d09f89e773d
| 0
|
Analyze the following code function for security vulnerabilities
|
private int stopUserLocked(final int userId, final IStopUserCallback callback) {
if (DEBUG_MU) Slog.i(TAG_MU, "stopUserLocked userId=" + userId);
if (mCurrentUserId == userId && mTargetUserId == UserHandle.USER_NULL) {
return ActivityManager.USER_OP_IS_CURRENT;
}
final UserState uss = mStartedUsers.get(userId);
if (uss == null) {
// User is not started, nothing to do... but we do need to
// callback if requested.
if (callback != null) {
mHandler.post(new Runnable() {
@Override
public void run() {
try {
callback.userStopped(userId);
} catch (RemoteException e) {
}
}
});
}
return ActivityManager.USER_OP_SUCCESS;
}
if (callback != null) {
uss.mStopCallbacks.add(callback);
}
if (uss.mState != UserState.STATE_STOPPING
&& uss.mState != UserState.STATE_SHUTDOWN) {
uss.mState = UserState.STATE_STOPPING;
updateStartedUserArrayLocked();
long ident = Binder.clearCallingIdentity();
try {
// We are going to broadcast ACTION_USER_STOPPING and then
// once that is done send a final ACTION_SHUTDOWN and then
// stop the user.
final Intent stoppingIntent = new Intent(Intent.ACTION_USER_STOPPING);
stoppingIntent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY);
stoppingIntent.putExtra(Intent.EXTRA_USER_HANDLE, userId);
stoppingIntent.putExtra(Intent.EXTRA_SHUTDOWN_USERSPACE_ONLY, true);
final Intent shutdownIntent = new Intent(Intent.ACTION_SHUTDOWN);
// This is the result receiver for the final shutdown broadcast.
final IIntentReceiver shutdownReceiver = new IIntentReceiver.Stub() {
@Override
public void performReceive(Intent intent, int resultCode, String data,
Bundle extras, boolean ordered, boolean sticky, int sendingUser) {
finishUserStop(uss);
}
};
// This is the result receiver for the initial stopping broadcast.
final IIntentReceiver stoppingReceiver = new IIntentReceiver.Stub() {
@Override
public void performReceive(Intent intent, int resultCode, String data,
Bundle extras, boolean ordered, boolean sticky, int sendingUser) {
// On to the next.
synchronized (ActivityManagerService.this) {
if (uss.mState != UserState.STATE_STOPPING) {
// Whoops, we are being started back up. Abort, abort!
return;
}
uss.mState = UserState.STATE_SHUTDOWN;
}
mBatteryStatsService.noteEvent(
BatteryStats.HistoryItem.EVENT_USER_RUNNING_FINISH,
Integer.toString(userId), userId);
mSystemServiceManager.stopUser(userId);
broadcastIntentLocked(null, null, shutdownIntent,
null, shutdownReceiver, 0, null, null, null, AppOpsManager.OP_NONE,
null, true, false, MY_PID, Process.SYSTEM_UID, userId);
}
};
// Kick things off.
broadcastIntentLocked(null, null, stoppingIntent,
null, stoppingReceiver, 0, null, null,
new String[] {INTERACT_ACROSS_USERS}, AppOpsManager.OP_NONE,
null, true, false, MY_PID, Process.SYSTEM_UID, UserHandle.USER_ALL);
} finally {
Binder.restoreCallingIdentity(ident);
}
}
return ActivityManager.USER_OP_SUCCESS;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: stopUserLocked
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2500
|
MEDIUM
| 4.3
|
android
|
stopUserLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
9878bb99b77c3681f0fda116e2964bac26f349c3
| 0
|
Analyze the following code function for security vulnerabilities
|
public void selectSingle(String sql, Handler<AsyncResult<JsonArray>> replyHandler) {
client.getConnection(conn -> selectSingle(conn, sql, closeAndHandleResult(conn, replyHandler)));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: selectSingle
File: domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
selectSingle
|
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
public synchronized void updateFloat(@Positive int columnIndex, float x) throws SQLException {
updateValue(columnIndex, x);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateFloat
File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
Repository: pgjdbc
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-31197
|
HIGH
| 8
|
pgjdbc
|
updateFloat
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public BlobIdent getBlobIdent() {
return state.blobIdent;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getBlobIdent
File: server-core/src/main/java/io/onedev/server/web/page/project/blob/ProjectBlobPage.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-434"
] |
CVE-2021-21245
|
HIGH
| 7.5
|
theonedev/onedev
|
getBlobIdent
|
server-core/src/main/java/io/onedev/server/web/page/project/blob/ProjectBlobPage.java
|
0c060153fb97c0288a1917efdb17cc426934dacb
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void executeWithBadDSFill() throws Exception {
final DataPoints[] datapoints = new DataPoints[1];
datapoints[0] = new MockDataPoints().getMock();
when(query_result.runAsync()).thenReturn(
Deferred.fromResult(datapoints));
try {
final HttpQuery query = NettyMocks.getQuery(tsdb,
"/api/query?start=1h-ago&m=sum:10m-avg-badbadbad:sys.cpu.user");
rpc.execute(tsdb, query);
fail("expected BadRequestException");
} catch (final BadRequestException exn) {
System.out.println(exn.getMessage());
assertTrue(exn.getMessage().startsWith(
"Unrecognized fill policy: badbadbad"));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: executeWithBadDSFill
File: test/tsd/TestQueryRpc.java
Repository: OpenTSDB/opentsdb
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-25827
|
MEDIUM
| 6.1
|
OpenTSDB/opentsdb
|
executeWithBadDSFill
|
test/tsd/TestQueryRpc.java
|
ff02c1e95e60528275f69b31bcbf7b2ac625cea8
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String mapPropertyType(String pType) {
if (pType == null) return null;
if (PROPERTY_TYPES.containsKey(pType.toLowerCase())) {
return PROPERTY_TYPES.get(pType.toLowerCase());
}
return pType;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: mapPropertyType
File: ff4j-core/src/main/java/org/ff4j/utils/MappingUtil.java
Repository: ff4j
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2022-44262
|
CRITICAL
| 9.8
|
ff4j
|
mapPropertyType
|
ff4j-core/src/main/java/org/ff4j/utils/MappingUtil.java
|
991df72725f78adbc413d9b0fbb676201f1882e0
| 0
|
Analyze the following code function for security vulnerabilities
|
public DataInputStream getInputStream() {
return _inputStream;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInputStream
File: src/main/java/com/rabbitmq/client/impl/SocketFrameHandler.java
Repository: rabbitmq/rabbitmq-java-client
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-46120
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-java-client
|
getInputStream
|
src/main/java/com/rabbitmq/client/impl/SocketFrameHandler.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
@PreAuthorize(value = "@permissionValidator.isSuperAdmin()")
@GetMapping
public SystemInfo getSystemInfo() {
SystemInfo systemInfo = new SystemInfo();
String version = Apollo.VERSION;
if (isValidVersion(version)) {
systemInfo.setVersion(version);
}
List<Env> allEnvList = portalSettings.getAllEnvs();
for (Env env : allEnvList) {
EnvironmentInfo environmentInfo = new EnvironmentInfo();
String metaServerAddresses = MetaDomainConsts.getMetaServerAddress(env);
environmentInfo.setEnv(env);
environmentInfo.setActive(portalSettings.isEnvActive(env));
environmentInfo.setMetaServerAddress(metaServerAddresses);
String selectedMetaServerAddress = MetaDomainConsts.getDomain(env);
try {
environmentInfo.setConfigServices(getServerAddress(selectedMetaServerAddress, CONFIG_SERVICE_URL_PATH));
environmentInfo.setAdminServices(getServerAddress(selectedMetaServerAddress, ADMIN_SERVICE_URL_PATH));
} catch (Throwable ex) {
String errorMessage = "Loading config/admin services from meta server: " + selectedMetaServerAddress + " failed!";
logger.error(errorMessage, ex);
environmentInfo.setErrorMessage(errorMessage + " Exception: " + ex.getMessage());
}
systemInfo.addEnvironment(environmentInfo);
}
return systemInfo;
}
|
Vulnerability Classification:
- CWE: CWE-918
- CVE: CVE-2019-10686
- Severity: HIGH
- CVSS Score: 7.5
Description: Fix SSRF, resolve #2103
Function: getSystemInfo
File: apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/SystemInfoController.java
Repository: apolloconfig/apollo
Fixed Code:
@PreAuthorize(value = "@permissionValidator.isSuperAdmin()")
@GetMapping
public SystemInfo getSystemInfo() {
SystemInfo systemInfo = new SystemInfo();
String version = Apollo.VERSION;
if (isValidVersion(version)) {
systemInfo.setVersion(version);
}
List<Env> allEnvList = portalSettings.getAllEnvs();
for (Env env : allEnvList) {
EnvironmentInfo environmentInfo = adaptEnv2EnvironmentInfo(env);
systemInfo.addEnvironment(environmentInfo);
}
return systemInfo;
}
|
[
"CWE-918"
] |
CVE-2019-10686
|
HIGH
| 7.5
|
apolloconfig/apollo
|
getSystemInfo
|
apollo-portal/src/main/java/com/ctrip/framework/apollo/portal/controller/SystemInfoController.java
|
56919378154fc27c9fb62cbfa68ab2df0bcac003
| 1
|
Analyze the following code function for security vulnerabilities
|
public static SvgSize parse(String s) {
if (CmsStringUtil.isEmptyOrWhitespaceOnly(s)) {
return null;
}
s = s.trim();
double length = -1;
int unitPos;
String unit = "";
// find longest prefix of s that can be parsed as a number, use the remaining part as the unit
for (unitPos = s.length(); unitPos >= 0; unitPos--) {
String prefix = s.substring(0, unitPos);
unit = s.substring(unitPos);
try {
length = Double.parseDouble(prefix);
break;
} catch (NumberFormatException e) {
// ignore
}
}
if (length < 0) {
LOG.warn("Invalid string for SVG size: " + s);
return null;
}
SvgSize result = new SvgSize();
result.m_size = length;
result.m_unit = unit;
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parse
File: src/org/opencms/file/types/CmsResourceTypeImage.java
Repository: alkacon/opencms-core
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-3312
|
MEDIUM
| 4
|
alkacon/opencms-core
|
parse
|
src/org/opencms/file/types/CmsResourceTypeImage.java
|
92e035423aa6967822d343e54392d4291648c0ee
| 0
|
Analyze the following code function for security vulnerabilities
|
private Context peek() {
return head;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: peek
File: impl/src/main/java/org/eclipse/parsson/JsonParserImpl.java
Repository: eclipse-ee4j/parsson
The code follows secure coding practices.
|
[
"CWE-834"
] |
CVE-2023-4043
|
HIGH
| 7.5
|
eclipse-ee4j/parsson
|
peek
|
impl/src/main/java/org/eclipse/parsson/JsonParserImpl.java
|
ab239fee273cb262910890f1a6fe666ae92cd623
| 0
|
Analyze the following code function for security vulnerabilities
|
public short readI16() throws TException {
return (short) zigzagToInt(readVarint32());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readI16
File: thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java
Repository: facebook/fbthrift
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2019-11938
|
MEDIUM
| 5
|
facebook/fbthrift
|
readI16
|
thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java
|
08c2d412adb214c40bb03be7587057b25d053030
| 0
|
Analyze the following code function for security vulnerabilities
|
public JSONObject toJSONObject(JSONArray names) throws JSONException {
if (names == null || names.length() == 0 || length() == 0) {
return null;
}
JSONObject jo = new JSONObject();
for (int i = 0; i < names.length(); i += 1) {
jo.put(names.getString(i), this.opt(i));
}
return jo;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toJSONObject
File: src/main/java/org/codehaus/jettison/json/JSONArray.java
Repository: jettison-json/jettison
The code follows secure coding practices.
|
[
"CWE-674",
"CWE-787"
] |
CVE-2022-45693
|
HIGH
| 7.5
|
jettison-json/jettison
|
toJSONObject
|
src/main/java/org/codehaus/jettison/json/JSONArray.java
|
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
boolean isAttachedLocked() {
return mSurface != null && super.isAttachedLocked();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isAttachedLocked
File: services/core/java/com/android/server/am/ActivityStackSupervisor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3838
|
MEDIUM
| 4.3
|
android
|
isAttachedLocked
|
services/core/java/com/android/server/am/ActivityStackSupervisor.java
|
468651c86a8adb7aa56c708d2348e99022088af3
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String trimToSize(String source, int length, int area, String suffix) {
if ((source == null) || (source.length() <= length)) {
// no operation is required
return source;
}
if (CmsStringUtil.isEmpty(suffix)) {
// we need an empty suffix
suffix = "";
}
// must remove the length from the after sequence chars since these are always added in the end
int modLength = length - suffix.length();
if (modLength <= 0) {
// we are to short, return beginning of the suffix
return suffix.substring(0, length);
}
int modArea = area + suffix.length();
if ((modArea > modLength) || (modArea < 0)) {
// area must not be longer then max length
modArea = modLength;
}
// first reduce the String to the maximum allowed length
String findPointSource = source.substring(modLength - modArea, modLength);
String result;
// try to find an "sentence ending" char in the text
int pos = lastIndexOf(findPointSource, SENTENCE_ENDING_CHARS);
if (pos >= 0) {
// found a sentence ender in the lookup area, keep the sentence ender
result = source.substring(0, (modLength - modArea) + pos + 1) + suffix;
} else {
// no sentence ender was found, try to find a whitespace
pos = lastWhitespaceIn(findPointSource);
if (pos >= 0) {
// found a whitespace, don't keep the whitespace
result = source.substring(0, (modLength - modArea) + pos) + suffix;
} else {
// not even a whitespace was found, just cut away what's to long
result = source.substring(0, modLength) + suffix;
}
}
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: trimToSize
File: src/org/opencms/util/CmsStringUtil.java
Repository: alkacon/opencms-core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2013-4600
|
MEDIUM
| 4.3
|
alkacon/opencms-core
|
trimToSize
|
src/org/opencms/util/CmsStringUtil.java
|
72a05e3ea1cf692e2efce002687272e63f98c14a
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getEncodingFromLocale(Locale loc) {
String localeString = loc.getLanguage() + "_" + loc.getCountry();
Map encMap = this.webAppConfig.getLocaleEncodingMap();
Logger.log(Logger.FULL_DEBUG, Launcher.RESOURCES,
"WinstoneResponse.LookForLocaleEncoding",
new String[] {localeString, encMap + ""});
String fullMatch = (String) encMap.get(localeString);
if (fullMatch != null) {
Logger.log(Logger.FULL_DEBUG, Launcher.RESOURCES,
"WinstoneResponse.FoundLocaleEncoding", fullMatch);
return fullMatch;
} else {
localeString = loc.getLanguage();
Logger.log(Logger.FULL_DEBUG, Launcher.RESOURCES,
"WinstoneResponse.LookForLocaleEncoding",
new String[] {localeString, encMap + ""});
String match = (String) encMap.get(localeString);
if (match != null) {
Logger.log(Logger.FULL_DEBUG, Launcher.RESOURCES,
"WinstoneResponse.FoundLocaleEncoding", match);
}
return match;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getEncodingFromLocale
File: src/java/winstone/WinstoneResponse.java
Repository: jenkinsci/winstone
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2011-4344
|
LOW
| 2.6
|
jenkinsci/winstone
|
getEncodingFromLocale
|
src/java/winstone/WinstoneResponse.java
|
410ed3001d51c689cf59085b7417466caa2ded7b
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isVisible() {
return getSectionState().visible;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isVisible
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
|
isVisible
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public PasswordMetrics getPasswordMinimumMetrics(@UserIdInt int userHandle,
boolean deviceWideOnly) {
final CallerIdentity caller = getCallerIdentity();
Preconditions.checkCallAuthorization(hasFullCrossUsersPermission(caller, userHandle)
&& (isSystemUid(caller) || hasCallingOrSelfPermission(
permission.SET_INITIAL_LOCK)));
return getPasswordMinimumMetricsUnchecked(userHandle, deviceWideOnly);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPasswordMinimumMetrics
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
|
getPasswordMinimumMetrics
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected XMLReader createReader() throws SAXException {
if (textConverterRef == null) {
throw new ProcessException(
"No XML fragment wrapper has been assigned to the parser but XML fragment parsers require one");
}
// Load the latest TextConverter to get round the issue of the pipeline
// being cached and therefore holding onto
// stale TextConverter.
// TODO: We need to use the cached TextConverter service ideally but
// before we do it needs to be aware cluster
// wide when TextConverter has been updated.
final TextConverter tc = textConverterService.loadByUuid(textConverterRef.getUuid());
if (tc == null) {
throw new ProcessException(
"TextConverter \"" + textConverterRef.getName() + "\" appears to have been deleted");
}
if (!TextConverterType.XML_FRAGMENT.equals(tc.getConverterType())) {
throw new ProcessException("The assigned text converter is not an XML fragment.");
}
// If we are in stepping mode and have made code changes then we want to
// add them to the newly loaded text
// converter.
if (injectedCode != null) {
tc.setData(injectedCode);
usePool = false;
}
// Get a text converter generated parser from the pool.
poolItem = parserFactoryPool.borrowObject(tc, usePool);
final StoredParserFactory storedParserFactory = poolItem.getValue();
final StoredErrorReceiver storedErrorReceiver = storedParserFactory.getErrorReceiver();
final ParserFactory parserFactory = storedParserFactory.getParserFactory();
if (storedErrorReceiver.getTotalErrors() == 0 && parserFactory != null) {
return parserFactory.getParser();
} else {
storedErrorReceiver.replay(new ErrorReceiverIdDecorator(getElementId(), getErrorReceiverProxy()));
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createReader
File: stroom-pipeline/src/main/java/stroom/pipeline/server/parser/XMLFragmentParser.java
Repository: gchq/stroom
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000651
|
HIGH
| 7.5
|
gchq/stroom
|
createReader
|
stroom-pipeline/src/main/java/stroom/pipeline/server/parser/XMLFragmentParser.java
|
ba30ffd415bd7d32ee40ba4b04035267ce80b499
| 0
|
Analyze the following code function for security vulnerabilities
|
private static boolean isEphemeralApp(@Nullable ApplicationInfo ai) {
return (ai != null) && ai.isInstantApp();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isEphemeralApp
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
|
isEphemeralApp
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
private void startDownloadWebPagesForOfflineReading() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
startForegroundService(new Intent(this, DownloadWebPageService.class));
} else {
startService(new Intent(this, DownloadWebPageService.class));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startDownloadWebPagesForOfflineReading
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
|
startDownloadWebPagesForOfflineReading
|
News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java
|
05449cb666059af7de2302df9d5c02997a23df85
| 0
|
Analyze the following code function for security vulnerabilities
|
public String formatNumber(Number numberIn, Locale localeIn) {
return getDebugVersionOfString(NumberFormat.getInstance(localeIn)
.format(numberIn));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: formatNumber
File: java/code/src/com/redhat/rhn/common/localization/LocalizationService.java
Repository: spacewalkproject/spacewalk
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2016-3079
|
MEDIUM
| 4.3
|
spacewalkproject/spacewalk
|
formatNumber
|
java/code/src/com/redhat/rhn/common/localization/LocalizationService.java
|
7b9ff9ad
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean matches(String pkg) {
if (!filtered) return true;
return zen ? true : pkg != null && pkg.toLowerCase().contains(pkgFilter);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: matches
File: services/core/java/com/android/server/notification/NotificationManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3884
|
MEDIUM
| 4.3
|
android
|
matches
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
@PutMapping(value = "/{modelId}")
@ResponseStatus(value = HttpStatus.OK)
@Authorize(action = Permission.ACTION_UPDATE)
public void saveModel(@PathVariable String modelId,
@RequestParam Map<String, String> values) throws TranscoderException, IOException {
Model model = repositoryService.getModel(modelId);
JSONObject modelJson = JSON.parseObject(model.getMetaInfo());
modelJson.put(MODEL_NAME, values.get("name"));
modelJson.put(MODEL_DESCRIPTION, values.get("description"));
model.setMetaInfo(modelJson.toString());
model.setName(values.get("name"));
repositoryService.saveModel(model);
repositoryService.addModelEditorSource(model.getId(), values.get("json_xml").getBytes("utf-8"));
InputStream svgStream = new ByteArrayInputStream(values.get("svg_xml").getBytes("utf-8"));
TranscoderInput input = new TranscoderInput(svgStream);
PNGTranscoder transcoder = new PNGTranscoder();
// Setup output
ByteArrayOutputStream outStream = new ByteArrayOutputStream();
TranscoderOutput output = new TranscoderOutput(outStream);
// Do the transformation
transcoder.transcode(input, output);
final byte[] result = outStream.toByteArray();
repositoryService.addModelEditorSourceExtra(model.getId(), result);
outStream.close();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: saveModel
File: hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/main/java/org/hswebframework/web/workflow/web/FlowableModelManagerController.java
Repository: hs-web/hsweb-framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2018-20594
|
MEDIUM
| 4.3
|
hs-web/hsweb-framework
|
saveModel
|
hsweb-system/hsweb-system-workflow/hsweb-system-workflow-local/src/main/java/org/hswebframework/web/workflow/web/FlowableModelManagerController.java
|
b72a2275ed21240296c6539bae1049c56abb542f
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getClientId() {
return clientId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getClientId
File: pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java
Repository: pac4j
The code follows secure coding practices.
|
[
"CWE-347"
] |
CVE-2021-44878
|
MEDIUM
| 5
|
pac4j
|
getClientId
|
pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java
|
22b82ffd702a132d9f09da60362fc6264fc281ae
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean isValidXMLChar(char c) {
return (c >= 32 || c == '\n' || c == '\r' || c == '\t');
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isValidXMLChar
File: bundles/org.jkiss.utils/src/org/jkiss/utils/xml/XMLUtils.java
Repository: dbeaver
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-3836
|
MEDIUM
| 4.3
|
dbeaver
|
isValidXMLChar
|
bundles/org.jkiss.utils/src/org/jkiss/utils/xml/XMLUtils.java
|
4debf8f25184b7283681ed3fb5e9e887d9d4fe22
| 0
|
Analyze the following code function for security vulnerabilities
|
@Reference
public void setOrganizationDirectoryService(OrganizationDirectoryService organizationDirectory) {
organizationDirectoryService = organizationDirectory;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setOrganizationDirectoryService
File: modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/impl/IngestServiceImpl.java
Repository: opencast
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2022-29237
|
MEDIUM
| 5.5
|
opencast
|
setOrganizationDirectoryService
|
modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/impl/IngestServiceImpl.java
|
8d5ec1614eed109b812bc27b0c6d3214e456d4e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@GuardedBy("this")
final ProcessRecord startSdkSandboxProcessLocked(String processName,
ApplicationInfo info, boolean knownToBeDead, int intentFlags,
HostingRecord hostingRecord, int zygotePolicyFlags, int sdkSandboxUid,
String sdkSandboxClientAppPackage) {
return mProcessList.startProcessLocked(processName, info, knownToBeDead, intentFlags,
hostingRecord, zygotePolicyFlags, false /* allowWhileBooting */,
false /* isolated */, 0 /* isolatedUid */,
true /* isSdkSandbox */, sdkSandboxUid, sdkSandboxClientAppPackage,
null /* ABI override */, null /* entryPoint */,
null /* entryPointArgs */, null /* crashHandler */);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startSdkSandboxProcessLocked
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
|
startSdkSandboxProcessLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("resource")
protected Object deserializeWithUnwrapped(JsonParser p, DeserializationContext ctxt)
throws IOException
{
if (_delegateDeserializer != null) {
return _valueInstantiator.createUsingDelegate(ctxt, _delegateDeserializer.deserialize(p, ctxt));
}
if (_propertyBasedCreator != null) {
return deserializeUsingPropertyBasedWithUnwrapped(p, ctxt);
}
TokenBuffer tokens = ctxt.bufferForInputBuffering(p);
tokens.writeStartObject();
final Object bean = _valueInstantiator.createUsingDefault(ctxt);
// [databind#631]: Assign current value, to be accessible by custom serializers
p.setCurrentValue(bean);
if (_injectables != null) {
injectValues(ctxt, bean);
}
final Class<?> activeView = _needViewProcesing ? ctxt.getActiveView() : null;
String propName = p.hasTokenId(JsonTokenId.ID_FIELD_NAME) ? p.currentName() : null;
for (; propName != null; propName = p.nextFieldName()) {
p.nextToken();
SettableBeanProperty prop = _beanProperties.find(propName);
if (prop != null) { // normal case
if ((activeView != null) && !prop.visibleInView(activeView)) {
p.skipChildren();
continue;
}
try {
prop.deserializeAndSet(p, ctxt, bean);
} catch (Exception e) {
wrapAndThrow(e, bean, propName, ctxt);
}
continue;
}
// Things marked as ignorable should not be passed to any setter
if (IgnorePropertiesUtil.shouldIgnore(propName, _ignorableProps, _includableProps)) {
handleIgnoredProperty(p, ctxt, bean, propName);
continue;
}
// 29-Nov-2016, tatu: probably should try to avoid sending content
// both to any setter AND buffer... but, for now, the only thing
// we can do.
// how about any setter? We'll get copies but...
if (_anySetter == null) {
// but... others should be passed to unwrapped property deserializers
tokens.writeFieldName(propName);
tokens.copyCurrentStructure(p);
continue;
}
// Need to copy to a separate buffer first
TokenBuffer b2 = ctxt.bufferAsCopyOfValue(p);
tokens.writeFieldName(propName);
tokens.append(b2);
try {
_anySetter.deserializeAndSet(b2.asParserOnFirstToken(), ctxt, bean, propName);
} catch (Exception e) {
wrapAndThrow(e, bean, propName, ctxt);
}
}
tokens.writeEndObject();
_unwrappedPropertyHandler.processUnwrapped(p, ctxt, bean, tokens);
return bean;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deserializeWithUnwrapped
File: src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializer.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2022-42004
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
deserializeWithUnwrapped
|
src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializer.java
|
063183589218fec19a9293ed2f17ec53ea80ba88
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void enforceMaxPackageNameLength(String pkg) {
Preconditions.checkArgument(
pkg.length() <= MAX_PACKAGE_NAME_LENGTH, "Package name too long");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: enforceMaxPackageNameLength
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
|
enforceMaxPackageNameLength
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
private static FileSystem newFileSystem(Path path, Map<String,String> env) throws IOException {
for (FileSystemProvider provider: FileSystemProvider.installedProviders()) {
try {
return provider.newFileSystem(path, env);
} catch (UnsupportedOperationException uoe) {
//
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: newFileSystem
File: src/main/java/org/olat/fileresource/types/FileResource.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-39180
|
HIGH
| 9
|
OpenOLAT
|
newFileSystem
|
src/main/java/org/olat/fileresource/types/FileResource.java
|
699490be8e931af0ef1f135c55384db1f4232637
| 0
|
Analyze the following code function for security vulnerabilities
|
void clearClientTouchableRegion() {
mTouchableInsets = ViewTreeObserver.InternalInsetsInfo.TOUCHABLE_INSETS_FRAME;
mGivenTouchableRegion.setEmpty();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearClientTouchableRegion
File: services/core/java/com/android/server/wm/WindowState.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35674
|
HIGH
| 7.8
|
android
|
clearClientTouchableRegion
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
private static String getStringProperty(Properties props, String key, String defaultValue) {
return props.getProperty(key, defaultValue);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStringProperty
File: umlet-swing/src/main/java/com/baselet/control/config/handler/ConfigHandler.java
Repository: umlet
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000548
|
MEDIUM
| 6.8
|
umlet
|
getStringProperty
|
umlet-swing/src/main/java/com/baselet/control/config/handler/ConfigHandler.java
|
e1c4cc6ae692cc8d1c367460dbf79343e996f9bd
| 0
|
Analyze the following code function for security vulnerabilities
|
public String serializeToString(Object obj, Map<String, Object> formParams, String contentType, boolean isBodyNullable) throws ApiException {
try {
if (contentType.startsWith("multipart/form-data")) {
throw new ApiException("multipart/form-data not yet supported for serializeToString (http signature authentication)");
} else if (contentType.startsWith("application/x-www-form-urlencoded")) {
String formString = "";
for (Entry<String, Object> param : formParams.entrySet()) {
formString = param.getKey() + "=" + URLEncoder.encode(parameterToString(param.getValue()), "UTF-8") + "&";
}
if (formString.length() == 0) { // empty string
return formString;
} else {
return formString.substring(0, formString.length() - 1);
}
} else {
if (isBodyNullable) {
return obj == null ? "null" : json.getMapper().writeValueAsString(obj);
} else {
return obj == null ? "" : json.getMapper().writeValueAsString(obj);
}
}
} catch (Exception ex) {
throw new ApiException("Failed to perform serializeToString: " + ex.toString());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: serializeToString
File: samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
serializeToString
|
samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setVolumeTo(String packageName, int pid, int uid, int value) {
try {
final String reason = TAG + ":setVolumeTo";
mService.tempAllowlistTargetPkgIfPossible(getUid(), getPackageName(),
pid, uid, packageName, reason);
mCb.onSetVolumeTo(packageName, pid, uid, value);
} catch (RemoteException e) {
Log.e(TAG, "Remote failure in setVolumeTo.", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setVolumeTo
File: services/core/java/com/android/server/media/MediaSessionRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21280
|
MEDIUM
| 5.5
|
android
|
setVolumeTo
|
services/core/java/com/android/server/media/MediaSessionRecord.java
|
06e772e05514af4aa427641784c5eec39a892ed3
| 0
|
Analyze the following code function for security vulnerabilities
|
private void migrate76(File dataDir, Stack<Integer> versions) {
for (File file: dataDir.listFiles()) {
if (file.getName().startsWith("Settings.xml")) {
VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file);
for (Element element: dom.getRootElement().elements()) {
if (element.elementTextTrim("key").equals("PERFORMANCE")) {
Element valueElement = element.element("value");
if (valueElement != null) {
valueElement.addElement("maxCodeSearchEntries").setText("100");
}
}
}
dom.writeToFile(file, false);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: migrate76
File: server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-338"
] |
CVE-2023-24828
|
HIGH
| 8.8
|
theonedev/onedev
|
migrate76
|
server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
|
d67dd9686897fe5e4ab881d749464aa7c06a68e5
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public XWikiDocument getDocument(String fullname, XWikiContext context) throws XWikiException
{
XWikiDocument doc = new XWikiDocument();
doc.setFullName(fullname, context);
return getDocument(doc, context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDocument
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
|
getDocument
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Route.Collection patch(final String path1, final String path2,
final String path3, final Route.Filter filter) {
return new Route.Collection(
new Route.Definition[]{patch(path1, filter), patch(path2, filter),
patch(path3, filter)});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: patch
File: jooby/src/main/java/org/jooby/Jooby.java
Repository: jooby-project/jooby
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-7647
|
MEDIUM
| 5
|
jooby-project/jooby
|
patch
|
jooby/src/main/java/org/jooby/Jooby.java
|
34f526028e6cd0652125baa33936ffb6a8a4a009
| 0
|
Analyze the following code function for security vulnerabilities
|
public InstallationAdapterConfig toInstallationRepresentation(RealmModel realmModel, ClientModel clientModel, URI baseUri) {
InstallationAdapterConfig rep = new InstallationAdapterConfig();
rep.setAuthServerUrl(baseUri.toString());
rep.setRealm(realmModel.getName());
rep.setSslRequired(realmModel.getSslRequired().name().toLowerCase());
if (clientModel.isPublicClient() && !clientModel.isBearerOnly()) rep.setPublicClient(true);
if (clientModel.isBearerOnly()) rep.setBearerOnly(true);
if (clientModel.getRoles().size() > 0) rep.setUseResourceRoleMappings(true);
rep.setResource(clientModel.getClientId());
if (showClientCredentialsAdapterConfig(clientModel)) {
Map<String, Object> adapterConfig = getClientCredentialsAdapterConfig(clientModel);
rep.setCredentials(adapterConfig);
}
return rep;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toInstallationRepresentation
File: services/src/main/java/org/keycloak/services/managers/ClientManager.java
Repository: keycloak
The code follows secure coding practices.
|
[
"CWE-798"
] |
CVE-2019-14837
|
MEDIUM
| 6.4
|
keycloak
|
toInstallationRepresentation
|
services/src/main/java/org/keycloak/services/managers/ClientManager.java
|
9a7c1a91a59ab85e7f8889a505be04a71580777f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable
protected abstract String checkPermission(Project project);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkPermission
File: server-core/src/main/java/io/onedev/server/git/GitSshCommand.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2022-39205
|
CRITICAL
| 9.8
|
theonedev/onedev
|
checkPermission
|
server-core/src/main/java/io/onedev/server/git/GitSshCommand.java
|
f1e97688e4e19d6de1dfa1d00e04655209d39f8e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Argument<Publisher> argumentType() {
return Argument.of(Publisher.class);
}
|
Vulnerability Classification:
- CWE: CWE-400
- CVE: CVE-2022-21700
- Severity: MEDIUM
- CVSS Score: 5.0
Description: Use ConversionContext constants where possible instead of class (#2356)
Changes
-------
* Added ArgumentConversionContext constants in ConversionContext
* Replaced Argument.of and use of argument classes with
ConversionContext constants where possible
* Added getFirst method in ConvertibleMultiValues that accepts
ArgumentConversionContent parameter
Partially addresses issue #2355
Function: argumentType
File: http-server-netty/src/main/java/io/micronaut/http/server/netty/binders/PublisherBodyBinder.java
Repository: micronaut-projects/micronaut-core
Fixed Code:
@Override
public Argument<Publisher> argumentType() {
return TYPE;
}
|
[
"CWE-400"
] |
CVE-2022-21700
|
MEDIUM
| 5
|
micronaut-projects/micronaut-core
|
argumentType
|
http-server-netty/src/main/java/io/micronaut/http/server/netty/binders/PublisherBodyBinder.java
|
b8ec32c311689667c69ae7d9f9c3b3a8abc96fe3
| 1
|
Analyze the following code function for security vulnerabilities
|
public static Map getEnvVars() {
return new TreeMap<String,String>(EnvVars.masterEnvVars);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getEnvVars
File: core/src/main/java/hudson/Functions.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-310"
] |
CVE-2014-2061
|
MEDIUM
| 5
|
jenkinsci/jenkins
|
getEnvVars
|
core/src/main/java/hudson/Functions.java
|
bf539198564a1108b7b71a973bf7de963a6213ef
| 0
|
Analyze the following code function for security vulnerabilities
|
private void enforcePermissions(String[] permissions, String callerPackageName,
int targetUserId) throws SecurityException {
String heldPermission = "";
for (String permission : permissions) {
if (hasPermission(permission, callerPackageName)) {
heldPermission = permission;
break;
}
}
if (heldPermission.isEmpty()) {
throw new SecurityException("Caller does not have the required permissions for "
+ "this user. One of the following permission required: "
+ Arrays.toString(permissions));
}
enforcePermission(heldPermission, callerPackageName, targetUserId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: enforcePermissions
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
|
enforcePermissions
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onInputEvent(InputEvent event) {
finishInputEvent(event, true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onInputEvent
File: services/core/java/com/android/server/wm/WindowState.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35674
|
HIGH
| 7.8
|
android
|
onInputEvent
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
void setProcess(WindowProcessController proc) {
app = proc;
final ActivityRecord root = task != null ? task.getRootActivity() : null;
if (root == this) {
task.setRootProcess(proc);
}
proc.addActivityIfNeeded(this);
mInputDispatchingTimeoutMillis = getInputDispatchingTimeoutMillisLocked(this);
// Update the associated task fragment after setting the process, since it's required for
// filtering to only report activities that belong to the same process.
final TaskFragment tf = getTaskFragment();
if (tf != null) {
tf.sendTaskFragmentInfoChanged();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setProcess
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
|
setProcess
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void cancelRecentsAnimation(boolean restoreHomeRootTaskPosition) {
enforceTaskPermission("cancelRecentsAnimation()");
final long callingUid = Binder.getCallingUid();
final long origId = Binder.clearCallingIdentity();
try {
synchronized (mGlobalLock) {
// Cancel the recents animation synchronously (do not hold the WM lock)
mWindowManager.cancelRecentsAnimation(restoreHomeRootTaskPosition
? REORDER_MOVE_TO_ORIGINAL_POSITION
: REORDER_KEEP_IN_PLACE, "cancelRecentsAnimation/uid=" + callingUid);
}
} finally {
Binder.restoreCallingIdentity(origId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cancelRecentsAnimation
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
|
cancelRecentsAnimation
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getNodeValue() throws DOMException {
return doc.getNodeValue();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNodeValue
File: HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java
Repository: LoboEvolution
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000540
|
MEDIUM
| 6.8
|
LoboEvolution
|
getNodeValue
|
HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java
|
9b75694cedfa4825d4a2330abf2719d470c654cd
| 0
|
Analyze the following code function for security vulnerabilities
|
private void postHeavyWeightProcessNotification(
WindowProcessController proc, Intent intent, int userId) {
if (proc == null) {
return;
}
final INotificationManager inm = NotificationManager.getService();
if (inm == null) {
return;
}
try {
Context context = mContext.createPackageContext(proc.mInfo.packageName, 0);
String text = mContext.getString(R.string.heavy_weight_notification,
context.getApplicationInfo().loadLabel(context.getPackageManager()));
Notification notification =
new Notification.Builder(context,
SystemNotificationChannels.HEAVY_WEIGHT_APP)
.setSmallIcon(com.android.internal.R.drawable.stat_sys_adb)
.setWhen(0)
.setOngoing(true)
.setTicker(text)
.setColor(mContext.getColor(
com.android.internal.R.color.system_notification_accent_color))
.setContentTitle(text)
.setContentText(
mContext.getText(R.string.heavy_weight_notification_detail))
.setContentIntent(PendingIntent.getActivityAsUser(mContext, 0,
intent, PendingIntent.FLAG_CANCEL_CURRENT
| PendingIntent.FLAG_IMMUTABLE, null,
new UserHandle(userId)))
.build();
try {
inm.enqueueNotificationWithTag("android", "android", null,
SystemMessage.NOTE_HEAVY_WEIGHT_NOTIFICATION, notification, userId);
} catch (RuntimeException e) {
Slog.w(TAG, "Error showing notification for heavy-weight app", e);
} catch (RemoteException e) {
}
} catch (PackageManager.NameNotFoundException e) {
Slog.w(TAG, "Unable to create context for heavy notification", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: postHeavyWeightProcessNotification
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
|
postHeavyWeightProcessNotification
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequestMapping(value = "/user", method = RequestMethod.POST,
consumes = APPLICATION_FORM_URLENCODED_VALUE)
public String updateUser(@RequestParam Map<String, String> parameters,
Model model)
{
String username = SecurityContextHolder.getContext().getAuthentication()
.getName();
Entry targetEntry = null;
try
{
// get the currently authenticated user's entry and make a copy of it with
// the provided changes
Entry sourceEntry = getUserEntry();
model.addAttribute("passwordRequirements",
getPasswordRequirements(sourceEntry.getDN()));
targetEntry = sourceEntry.duplicate();
for(Map.Entry<String, String> e : parameters.entrySet())
{
// only handle attributes defined in the schema
String attribute = e.getKey();
if(schema.getAttributeType(attribute) != null)
{
// either remove the value from the entry or update it
String value = e.getValue().trim();
if("".equals(value))
{
targetEntry.removeAttribute(attribute);
}
else
{
targetEntry.setAttribute(attribute, value);
}
}
}
// get the modifications required to update the entry and apply them
List<Modification> mods = Entry.diff(sourceEntry, targetEntry, true);
if(!mods.isEmpty())
{
ModifyRequest request = new ModifyRequest(sourceEntry.getDN(), mods);
request.addControl(getIntermediateClientRequestControl());
pool.modify(sourceEntry.getDN(), mods);
}
populateUserModel(username, targetEntry, model);
model.addAttribute("success", "User changes were successfully saved.");
}
catch(LDAPException e)
{
// if we couldn't even get the entry, something bad happened, so return
// the error view
model.addAttribute("error", e.getMessage());
if(targetEntry == null)
{
model.addAttribute("username", username);
return "error";
}
// there was some sort of error encountered, probably when trying to
// modify the entry, so populate the model with everything needed to
// render the "user" view
Map<String, String> modelParameters = new HashMap<>(parameters);
modelParameters.remove("_csrf");
model.addAllAttributes(modelParameters);
populateUserModel(username, targetEntry, model);
}
return "user";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateUser
File: src/main/java/com/unboundid/webapp/ssam/SSAMController.java
Repository: pingidentity/ssam
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2018-25084
|
MEDIUM
| 4
|
pingidentity/ssam
|
updateUser
|
src/main/java/com/unboundid/webapp/ssam/SSAMController.java
|
f64b10d63bb19ca2228b0c2d561a1a6e5a3bf251
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean addPermissionAsync(PermissionInfo info) {
synchronized (mPackages) {
return addPermissionLocked(info, true);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addPermissionAsync
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
|
addPermissionAsync
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<Group> findAll(Context context, List<MetadataField> metadataSortFields) throws SQLException {
return findAll(context, metadataSortFields, -1, -1);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findAll
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
|
findAll
|
dspace-api/src/main/java/org/dspace/eperson/GroupServiceImpl.java
|
277b499a5cd3a4f5eb2370513a1b7e4ec2a6e041
| 0
|
Analyze the following code function for security vulnerabilities
|
public static Cookie getCookie(Cookie[] cookies, String name) {
if (CommonUtils.notEmpty(cookies)) {
for (Cookie cookie : cookies) {
if (cookie.getName().equalsIgnoreCase(name)) {
return cookie;
}
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCookie
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
|
getCookie
|
publiccms-parent/publiccms-common/src/main/java/com/publiccms/common/tools/RequestUtils.java
|
b4d5956e65b14347b162424abb197a180229b3db
| 0
|
Analyze the following code function for security vulnerabilities
|
public Object getObject(String classname)
{
return getObject(classname, false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getObject
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
|
getObject
|
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
|
private Map<String, Integer> getRequestingPackages(Account account, UserAccounts accounts) {
Set<String> packages = new HashSet<>();
synchronized (accounts.mReceiversForType) {
for (String type : new String[] {account.type, null}) {
Map<String, Integer> receivers = accounts.mReceiversForType.get(type);
if (receivers != null) {
packages.addAll(receivers.keySet());
}
}
}
Map<String, Integer> result = new HashMap<>();
for (String packageName : packages) {
result.put(packageName, resolveAccountVisibility(account, packageName, accounts));
}
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRequestingPackages
File: services/core/java/com/android/server/accounts/AccountManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-502"
] |
CVE-2023-45777
|
HIGH
| 7.8
|
android
|
getRequestingPackages
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
public HeaderRow getHeaderRow(int index) {
return getHeader().getRow(index);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getHeaderRow
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
|
getHeaderRow
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
protected OutputStream createFileOuputStream(java.io.File f) throws FileNotFoundException {
return new FileOutputStream(f);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createFileOuputStream
File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
createFileOuputStream
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public Column getAliasStatement(Select select, Column target) {
for (Column column : select.getColumns()) {
if (!(column instanceof SimpleColumn) &&
!StringUtils.isBlank(column.getAlias()) &&
areEquals(column, target)) {
return column;
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAliasStatement
File: dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java
Repository: dashbuilder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-4999
|
HIGH
| 7.5
|
dashbuilder
|
getAliasStatement
|
dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java
|
8574899e3b6455547b534f570b2330ff772e524b
| 0
|
Analyze the following code function for security vulnerabilities
|
private void showSettings() {
final Pair<ComponentName, Integer> topPipActivityInfo =
PipUtils.getTopPipActivity(mContext);
if (topPipActivityInfo.first != null) {
final Intent settingsIntent = new Intent(ACTION_PICTURE_IN_PICTURE_SETTINGS,
Uri.fromParts("package", topPipActivityInfo.first.getPackageName(), null));
settingsIntent.setFlags(FLAG_ACTIVITY_NEW_TASK | FLAG_ACTIVITY_CLEAR_TASK);
mContext.startActivityAsUser(settingsIntent, UserHandle.of(topPipActivityInfo.second));
mPipUiEventLogger.log(PipUiEventLogger.PipUiEventEnum.PICTURE_IN_PICTURE_SHOW_SETTINGS);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: showSettings
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
|
showSettings
|
libs/WindowManager/Shell/src/com/android/wm/shell/pip/phone/PipMenuView.java
|
7212a4bec2d2f1a74fa54a12a04255d6a183baa9
| 0
|
Analyze the following code function for security vulnerabilities
|
public synchronized void updateDate(@Positive int columnIndex,
java.sql.@Nullable Date x) throws SQLException {
updateValue(columnIndex, x);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateDate
File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
Repository: pgjdbc
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-31197
|
HIGH
| 8
|
pgjdbc
|
updateDate
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean checkUrlParameter(String url)
{
if (url != null)
{
try
{
URL parsedUrl = new URL(url);
String protocol = parsedUrl.getProtocol();
String host = parsedUrl.getHost();
InetAddress address = InetAddress.getByName(host);
String hostAddress = address.getHostAddress();
host = host.toLowerCase();
return (protocol.equals("http") || protocol.equals("https"))
&& !address.isAnyLocalAddress()
&& !address.isLoopbackAddress()
&& !host.endsWith(".internal") // Redundant
&& !host.endsWith(".local") // Redundant
&& !host.contains("localhost") // Redundant
&& !hostAddress.startsWith("0.") // 0.0.0.0/8
&& !hostAddress.startsWith("10.") // 10.0.0.0/8
&& !hostAddress.startsWith("127.") // 127.0.0.0/8
&& !hostAddress.startsWith("169.254.") // 169.254.0.0/16
&& !hostAddress.startsWith("172.16.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.17.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.18.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.19.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.20.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.21.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.22.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.23.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.24.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.25.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.26.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.27.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.28.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.29.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.30.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.31.") // 172.16.0.0/12
&& !hostAddress.startsWith("192.0.0.") // 192.0.0.0/24
&& !hostAddress.startsWith("192.168.") // 192.168.0.0/16
&& !hostAddress.startsWith("198.18.") // 198.18.0.0/15
&& !hostAddress.startsWith("198.19.") // 198.18.0.0/15
&& !host.endsWith(".arpa"); // reverse domain (needed?)
}
catch (MalformedURLException e)
{
return false;
}
catch (UnknownHostException e)
{
return false;
}
}
else
{
return false;
}
}
|
Vulnerability Classification:
- CWE: CWE-918
- CVE: CVE-2022-1722
- Severity: LOW
- CVSS Score: 2.1
Description: Adds isLinkLocalAddress() to address checks
Function: checkUrlParameter
File: src/main/java/com/mxgraph/online/ProxyServlet.java
Repository: jgraph/drawio
Fixed Code:
public boolean checkUrlParameter(String url)
{
if (url != null)
{
try
{
URL parsedUrl = new URL(url);
String protocol = parsedUrl.getProtocol();
String host = parsedUrl.getHost();
InetAddress address = InetAddress.getByName(host);
String hostAddress = address.getHostAddress();
host = host.toLowerCase();
return (protocol.equals("http") || protocol.equals("https"))
&& !address.isAnyLocalAddress()
&& !address.isLoopbackAddress()
&& !address.isLinkLocalAddress()
&& !host.endsWith(".internal") // Redundant
&& !host.endsWith(".local") // Redundant
&& !host.contains("localhost") // Redundant
&& !hostAddress.startsWith("0.") // 0.0.0.0/8
&& !hostAddress.startsWith("10.") // 10.0.0.0/8
&& !hostAddress.startsWith("127.") // 127.0.0.0/8
&& !hostAddress.startsWith("169.254.") // 169.254.0.0/16
&& !hostAddress.startsWith("172.16.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.17.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.18.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.19.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.20.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.21.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.22.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.23.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.24.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.25.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.26.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.27.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.28.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.29.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.30.") // 172.16.0.0/12
&& !hostAddress.startsWith("172.31.") // 172.16.0.0/12
&& !hostAddress.startsWith("192.0.0.") // 192.0.0.0/24
&& !hostAddress.startsWith("192.168.") // 192.168.0.0/16
&& !hostAddress.startsWith("198.18.") // 198.18.0.0/15
&& !hostAddress.startsWith("198.19.") // 198.18.0.0/15
&& !host.endsWith(".arpa"); // reverse domain (needed?)
}
catch (MalformedURLException e)
{
return false;
}
catch (UnknownHostException e)
{
return false;
}
}
else
{
return false;
}
}
|
[
"CWE-918"
] |
CVE-2022-1722
|
LOW
| 2.1
|
jgraph/drawio
|
checkUrlParameter
|
src/main/java/com/mxgraph/online/ProxyServlet.java
|
cf5c78aa0f3127fb10053db55b39f3017a0654ae
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setJMSCorrelationID(String correlationID) throws JMSException {
this.setStringProperty(JMS_MESSAGE_CORR_ID, correlationID);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setJMSCorrelationID
File: src/main/java/com/rabbitmq/jms/client/RMQMessage.java
Repository: rabbitmq/rabbitmq-jms-client
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2020-36282
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-jms-client
|
setJMSCorrelationID
|
src/main/java/com/rabbitmq/jms/client/RMQMessage.java
|
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
| 0
|
Analyze the following code function for security vulnerabilities
|
public void sendOnPostDialWait(String id, String remaining) throws Exception {
for (IConnectionServiceAdapter a : mConnectionServiceAdapters) {
a.onPostDialWait(id, remaining, null /*Session.Info*/);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendOnPostDialWait
File: tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
sendOnPostDialWait
|
tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
public void destroy() {
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: destroy
File: core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2014-2064
|
MEDIUM
| 5
|
jenkinsci/jenkins
|
destroy
|
core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java
|
fbf96734470caba9364f04e0b77b0bae7293a1ec
| 0
|
Analyze the following code function for security vulnerabilities
|
private byte[] getImage(String url) {
// Try to get the favicon from the url using an HTTP connection from the pool
// that also allows to configure timeout values (e.g. connect and get data)
final RequestConfig requestConfig = RequestConfig.custom()
.setConnectTimeout(2000)
.setSocketTimeout(2000)
.build();
final HttpUriRequest getRequest = RequestBuilder.get(url)
.setConfig(requestConfig)
.build();
try(final CloseableHttpResponse response = client.execute(getRequest)) {
if(response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
final byte[] result = EntityUtils.toByteArray(response.getEntity());
// Prevent SSRF by checking result (OF-1885)
if ( !GraphicsUtils.isImage( result ) ) {
LOGGER.info( "Ignoring response to an HTTP request that should have returned an image (but returned something else): {}", url) ;
return null;
}
return result;
}
} catch (final IOException ex) {
LOGGER.debug( "An exception occurred while trying to obtain an image from: {}", url, ex );
}
return null;
}
|
Vulnerability Classification:
- CWE: CWE-918
- CVE: CVE-2019-18394
- Severity: HIGH
- CVSS Score: 7.5
Description: Increate favicon retrieval timeouts
I've noticed that many favicons are not shown. Increasing retrieval timeouts in the hope that this yields better results.
Function: getImage
File: xmppserver/src/main/java/org/jivesoftware/util/FaviconServlet.java
Repository: igniterealtime/Openfire
Fixed Code:
private byte[] getImage(String url) {
// Try to get the favicon from the url using an HTTP connection from the pool
// that also allows to configure timeout values (e.g. connect and get data)
final RequestConfig requestConfig = RequestConfig.custom()
.setConnectTimeout(5000)
.setSocketTimeout(5000)
.build();
final HttpUriRequest getRequest = RequestBuilder.get(url)
.setConfig(requestConfig)
.build();
try(final CloseableHttpResponse response = client.execute(getRequest)) {
if(response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) {
final byte[] result = EntityUtils.toByteArray(response.getEntity());
// Prevent SSRF by checking result (OF-1885)
if ( !GraphicsUtils.isImage( result ) ) {
LOGGER.info( "Ignoring response to an HTTP request that should have returned an image (but returned something else): {}", url) ;
return null;
}
return result;
}
} catch (final IOException ex) {
LOGGER.debug( "An exception occurred while trying to obtain an image from: {}", url, ex );
}
return null;
}
|
[
"CWE-918"
] |
CVE-2019-18394
|
HIGH
| 7.5
|
igniterealtime/Openfire
|
getImage
|
xmppserver/src/main/java/org/jivesoftware/util/FaviconServlet.java
|
2dabb16e9ab4a378e33e32b2d4e4bc052d03d3c5
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public int countByUUID_G(String uuid, long groupId) {
FinderPath finderPath = FINDER_PATH_COUNT_BY_UUID_G;
Object[] finderArgs = new Object[] { uuid, groupId };
Long count = (Long)finderCache.getResult(finderPath, finderArgs, this);
if (count == null) {
StringBundler query = new StringBundler(3);
query.append(_SQL_COUNT_KBTEMPLATE_WHERE);
boolean bindUuid = false;
if (uuid == null) {
query.append(_FINDER_COLUMN_UUID_G_UUID_1);
}
else if (uuid.equals(StringPool.BLANK)) {
query.append(_FINDER_COLUMN_UUID_G_UUID_3);
}
else {
bindUuid = true;
query.append(_FINDER_COLUMN_UUID_G_UUID_2);
}
query.append(_FINDER_COLUMN_UUID_G_GROUPID_2);
String sql = query.toString();
Session session = null;
try {
session = openSession();
Query q = session.createQuery(sql);
QueryPos qPos = QueryPos.getInstance(q);
if (bindUuid) {
qPos.add(uuid);
}
qPos.add(groupId);
count = (Long)q.uniqueResult();
finderCache.putResult(finderPath, finderArgs, count);
}
catch (Exception e) {
finderCache.removeResult(finderPath, finderArgs);
throw processException(e);
}
finally {
closeSession(session);
}
}
return count.intValue();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: countByUUID_G
File: modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java
Repository: brianchandotcom/liferay-portal
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2017-12647
|
MEDIUM
| 4.3
|
brianchandotcom/liferay-portal
|
countByUUID_G
|
modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java
|
ef93d984be9d4d478a5c4b1ca9a86f4e80174774
| 0
|
Analyze the following code function for security vulnerabilities
|
public ViewPage createPageWithAttachment(String space, String page, String content, String title, String syntaxId,
String parentFullPageName, String attachmentName, InputStream attachmentData,
UsernamePasswordCredentials credentials) throws Exception
{
return createPageWithAttachment(Collections.singletonList(space), page, content, title, syntaxId,
parentFullPageName, attachmentName, attachmentData, credentials);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createPageWithAttachment
File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2023-35166
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
createPageWithAttachment
|
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
|
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getIndex() {
int index = 0;
for (DomNode n = previousSibling_; n != null && n.nextSibling_ != null; n = n.previousSibling_) {
index++;
}
return index;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getIndex
File: src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
Repository: HtmlUnit/htmlunit
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-2798
|
HIGH
| 7.5
|
HtmlUnit/htmlunit
|
getIndex
|
src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
|
940dc7fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public void sendCustomAction(String packageName, int pid, int uid, String action,
Bundle args) {
try {
final String reason = TAG + ":custom-" + action;
mService.tempAllowlistTargetPkgIfPossible(getUid(), getPackageName(),
pid, uid, packageName, reason);
mCb.onCustomAction(packageName, pid, uid, action, args);
} catch (RemoteException e) {
Log.e(TAG, "Remote failure in sendCustomAction.", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendCustomAction
File: services/core/java/com/android/server/media/MediaSessionRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21280
|
MEDIUM
| 5.5
|
android
|
sendCustomAction
|
services/core/java/com/android/server/media/MediaSessionRecord.java
|
06e772e05514af4aa427641784c5eec39a892ed3
| 0
|
Analyze the following code function for security vulnerabilities
|
protected boolean engineVerify(
byte[] sigBytes)
throws SignatureException
{
byte[] hash = new byte[digest.getDigestSize()];
digest.doFinal(hash, 0);
BigInteger[] sig;
try
{
sig = derDecode(sigBytes);
}
catch (Exception e)
{
throw new SignatureException("error decoding signature bytes.");
}
return signer.verifySignature(hash, sig[0], sig[1]);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: engineVerify
File: prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dsa/DSASigner.java
Repository: bcgit/bc-java
The code follows secure coding practices.
|
[
"CWE-347"
] |
CVE-2016-1000338
|
MEDIUM
| 5
|
bcgit/bc-java
|
engineVerify
|
prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dsa/DSASigner.java
|
b0c3ce99d43d73a096268831d0d120ffc89eac7f
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<StateTree.BeforeClientResponseEntry> dumpBeforeClientResponseEntries() {
ArrayList<BeforeClientResponseEntry> entries = beforeClientResponseEntries;
beforeClientResponseEntries = null;
return !entries.isEmpty() ? entries : Collections.emptyList();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpBeforeClientResponseEntries
File: flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2023-25499
|
MEDIUM
| 6.5
|
vaadin/flow
|
dumpBeforeClientResponseEntries
|
flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java
|
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void handle(final NativeRequest request, final NativeResponse response) throws Exception {
long start = System.currentTimeMillis();
Map<String, Object> locals = new HashMap<>(16);
Map<Object, Object> scope = new HashMap<>(16);
String method = _method == null ? request.method() : method(_method, request);
String path = normalizeURI(request.path());
if (rpath != null) {
path = rpath.apply(path);
}
// put request attributes first to make sure we don't override defaults
Map<String, Object> nativeAttrs = request.attributes();
if (nativeAttrs.size() > 0) {
locals.putAll(nativeAttrs);
}
// default locals
locals.put(CONTEXT_PATH, contextPath);
locals.put(PATH, path);
Route notFound = RouteImpl.notFound(method, path);
RequestImpl req = new RequestImpl(injector, request, contextPath, port, notFound, charset,
locales, scope, locals, start);
ResponseImpl rsp = new ResponseImpl(req, parserExecutor, response, notFound, renderers,
rendererMap, locals, req.charset(), request.header(REFERER), request.header(BYTE_RANGE));
MediaType type = req.type();
// seed req & rsp
scope.put(REQ, req);
scope.put(RSP, rsp);
// seed sse
Provider<Sse> sse = () -> Try.apply(() -> request.upgrade(Sse.class)).get();
scope.put(SSE, sse);
// seed session
Provider<Session> session = () -> req.session();
scope.put(SESS, session);
boolean deferred = false;
Throwable x = null;
try {
requestScope.enter(scope);
// force https?
if (redirectHttps != null) {
if (!req.secure()) {
rsp.redirect(MessageFormat.format(redirectHttps, path.substring(1)));
return;
}
}
// websocket?
if (hasSockets) {
if (upgrade(request)) {
Optional<WebSocket> sockets = findSockets(socketDefs, path);
if (sockets.isPresent()) {
NativeWebSocket ws = request.upgrade(NativeWebSocket.class);
ws.onConnect(() -> ((WebSocketImpl) sockets.get()).connect(injector, req, ws));
return;
}
}
}
// usual req/rsp
Route[] routes = routeCache
.getUnchecked(new RouteKey(method, path, type, req.accept()));
RouteChain chain = new RouteChain(req, rsp, routes);
scope.put(CHAIN, chain);
chain.next(req, rsp);
} catch (DeferredExecution ex) {
deferred = true;
onDeferred(scope, request, req, rsp, ex.deferred);
} catch (Throwable ex) {
x = ex;
} finally {
cleanup(req, rsp, true, x, !deferred);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handle
File: jooby/src/main/java/org/jooby/internal/HttpHandlerImpl.java
Repository: jooby-project/jooby
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-15477
|
MEDIUM
| 4.3
|
jooby-project/jooby
|
handle
|
jooby/src/main/java/org/jooby/internal/HttpHandlerImpl.java
|
34856a738829d8fedca4ed27bd6ff413af87186f
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getRelativeAssetsRootPath() {
String path = "";
path = Config.getStringProperty("ASSET_PATH");
return path;
}
|
Vulnerability Classification:
- CWE: CWE-434
- CVE: CVE-2017-11466
- Severity: HIGH
- CVSS Score: 9.0
Description: #12131 fixes arbitrary upload
Function: getRelativeAssetsRootPath
File: dotCMS/src/main/java/com/dotmarketing/portlets/fileassets/business/FileAssetAPIImpl.java
Repository: dotCMS/core
Fixed Code:
public String getRelativeAssetsRootPath() {
String path = "";
path = Config.getStringProperty("ASSET_PATH", "/assets");
return path;
}
|
[
"CWE-434"
] |
CVE-2017-11466
|
HIGH
| 9
|
dotCMS/core
|
getRelativeAssetsRootPath
|
dotCMS/src/main/java/com/dotmarketing/portlets/fileassets/business/FileAssetAPIImpl.java
|
208798c6aa9ca70f90740c8a8924e481283109ce
| 1
|
Analyze the following code function for security vulnerabilities
|
private boolean isLocalPortUsageAllowed(int port) {
if (port < -1 || port > MAX_PORT)
return false;
if (port == -1 || port == 0)
return true;
if (configuration == null)
return false;
return configuration.allowedLocalPorts().contains(port)
|| (configuration.allowLocalPortsAbove().orElse(MAX_PORT) < port
&& !configuration.excludedLocalPorts().contains(port));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isLocalPortUsageAllowed
File: src/main/java/de/tum/in/test/api/security/ArtemisSecurityManager.java
Repository: ls1intum/Ares
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2024-23683
|
HIGH
| 8.2
|
ls1intum/Ares
|
isLocalPortUsageAllowed
|
src/main/java/de/tum/in/test/api/security/ArtemisSecurityManager.java
|
af4f28a56e2fe600d8750b3b415352a0a3217392
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getReadTimeout() {
return readTimeout;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getReadTimeout
File: samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
getReadTimeout
|
samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void init(FilterConfig filterConfig) throws ServletException {
servletContext = filterConfig.getServletContext();
servletMajorVersion = servletContext.getMajorVersion();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: init
File: impl/src/main/java/org/richfaces/webapp/PushHandlerFilter.java
Repository: pslegr/core-1
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-0086
|
MEDIUM
| 4.3
|
pslegr/core-1
|
init
|
impl/src/main/java/org/richfaces/webapp/PushHandlerFilter.java
|
8131f15003f5bec73d475d2b724472e4b87d0757
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated(since = "2.2M1")
public int createNewObject(String className, XWikiContext context) throws XWikiException
{
return createXObject(
getXClassEntityReferenceResolver().resolve(className, EntityType.DOCUMENT, getDocumentReference()),
context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createNewObject
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2023-29523
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
createNewObject
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
0d547181389f7941e53291af940966413823f61c
| 0
|
Analyze the following code function for security vulnerabilities
|
public void stopReceivingPush() {
Intent unregIntent = new Intent("com.google.android.c2dm.intent.UNREGISTER");
unregIntent.setPackage("com.google.android.gms");
unregIntent.putExtra("app", PendingIntent.getBroadcast(this, 0, new Intent(), 0));
startService(unregIntent);
}
|
Vulnerability Classification:
- CWE: CWE-668
- CVE: CVE-2022-4903
- Severity: MEDIUM
- CVSS Score: 5.1
Description: Fixed #3583 Pending Intent vulnerability
Function: stopReceivingPush
File: Ports/Android/src/com/codename1/impl/android/CodenameOneActivity.java
Repository: codenameone/CodenameOne
Fixed Code:
public void stopReceivingPush() {
Intent unregIntent = new Intent("com.google.android.c2dm.intent.UNREGISTER");
unregIntent.setPackage("com.google.android.gms");
unregIntent.putExtra("app", AndroidImplementation.getBroadcastPendingIntent(this, 0, new Intent()));
startService(unregIntent);
}
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
stopReceivingPush
|
Ports/Android/src/com/codename1/impl/android/CodenameOneActivity.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 1
|
Analyze the following code function for security vulnerabilities
|
public int interval() {
return intervalInSeconds;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: interval
File: domain/src/main/java/com/thoughtworks/go/config/materials/Materials.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-39309
|
MEDIUM
| 6.5
|
gocd
|
interval
|
domain/src/main/java/com/thoughtworks/go/config/materials/Materials.java
|
691b479f1310034992da141760e9c5d1f5b60e8a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int[] getTechList(int nativeHandle) throws RemoteException {
NfcPermissions.enforceUserPermissions(mContext);
// Check if NFC is enabled
if (!isNfcEnabled()) {
return null;
}
/* find the tag in the hmap */
TagEndpoint tag = (TagEndpoint) findObject(nativeHandle);
if (tag != null) {
return tag.getTechList();
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTechList
File: src/com/android/nfc/NfcService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3761
|
LOW
| 2.1
|
android
|
getTechList
|
src/com/android/nfc/NfcService.java
|
9ea802b5456a36f1115549b645b65c791eff3c2c
| 0
|
Analyze the following code function for security vulnerabilities
|
protected CompletableFuture<Optional<PublishRate>> internalGetPublishRate() {
return getTopicPoliciesAsyncWithRetry(topicName)
.thenApply(op -> op.map(TopicPolicies::getPublishRate));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: internalGetPublishRate
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
|
internalGetPublishRate
|
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
|
5b35bb81c31f1bc2ad98c9fde5b39ec68110ca52
| 0
|
Analyze the following code function for security vulnerabilities
|
private void tryToAddRosterEntry(String user, String alias, String group, String token)
throws YaximXMPPException {
try {
// send a presence subscription request with token (must be before roster action!)
if (token != null && token.length() > 0) {
Presence preauth = new Presence(Presence.Type.subscribe);
preauth.setTo(user);
preauth.addExtension(new PreAuth(token));
mXMPPConnection.sendPacket(preauth);
}
// add to roster, triggers another sub request by Smack (sigh)
mRoster.createEntry(user, alias, new String[] { group });
// send a pre-approval
Presence pre_approval = new Presence(Presence.Type.subscribed);
pre_approval.setTo(user);
mXMPPConnection.sendPacket(pre_approval);
mConfig.whitelistInvitationJID(user);
} catch (XMPPException e) {
throw new YaximXMPPException("tryToAddRosterEntry", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: tryToAddRosterEntry
File: src/org/yaxim/androidclient/service/SmackableImp.java
Repository: ge0rg/yaxim
The code follows secure coding practices.
|
[
"CWE-20",
"CWE-346"
] |
CVE-2017-5589
|
MEDIUM
| 4.3
|
ge0rg/yaxim
|
tryToAddRosterEntry
|
src/org/yaxim/androidclient/service/SmackableImp.java
|
65a38dc77545d9568732189e86089390f0ceaf9f
| 0
|
Analyze the following code function for security vulnerabilities
|
public StompServer listen(int port, String host, Handler<AsyncResult<StompServer>> handler) {
if (port == -1) {
handler.handle(Future.failedFuture("TCP server disabled. The port is set to '-1'."));
return this;
}
StompServerHandler stomp;
synchronized (this) {
stomp = this.handler;
}
Objects.requireNonNull(stomp, "Cannot open STOMP server - no StompServerConnectionHandler attached to the " +
"server.");
server
.connectHandler(socket -> {
StompServerConnection connection = new StompServerTCPConnectionImpl(socket, this, writingFrameHandler);
FrameParser parser = new FrameParser(options);
socket.exceptionHandler((exception) -> {
LOGGER.error("The STOMP server caught a TCP socket error - closing connection", exception);
connection.close();
});
socket.endHandler(v -> connection.close());
parser
.errorHandler((exception) -> {
connection.write(
Frames.createInvalidFrameErrorFrame(exception));
connection.close();
}
)
.handler(frame -> stomp.handle(new ServerFrameImpl(frame, connection)));
socket.handler(parser);
})
.listen(port, host).onComplete(ar -> {
if (ar.failed()) {
if (handler != null) {
vertx.runOnContext(v -> handler.handle(Future.failedFuture(ar.cause())));
} else {
LOGGER.error(ar.cause());
}
} else {
listening = true;
LOGGER.info("STOMP server listening on " + ar.result().actualPort());
if (handler != null) {
vertx.runOnContext(v -> handler.handle(Future.succeededFuture(this)));
}
}
});
return this;
}
|
Vulnerability Classification:
- CWE: CWE-287
- CVE: CVE-2023-32081
- Severity: MEDIUM
- CVSS Score: 6.5
Description: STOMP server process client frames that would not send initially a connect frame
A Vert.x STOMP server processes client STOMP frames without checking that the client send an initial CONNECT frame replied with a successful CONNECTED frame. The client can subscribe to a destination or publish message without prior authentication. Any Vert.x STOMP server configured with an authentication handler is impacted.
Fixes CVE-2023-32081
Function: listen
File: src/main/java/io/vertx/ext/stomp/impl/StompServerImpl.java
Repository: vert-x3/vertx-stomp
Fixed Code:
public StompServer listen(int port, String host, Handler<AsyncResult<StompServer>> handler) {
if (port == -1) {
handler.handle(Future.failedFuture("TCP server disabled. The port is set to '-1'."));
return this;
}
StompServerHandler stomp;
synchronized (this) {
stomp = this.handler;
}
Objects.requireNonNull(stomp, "Cannot open STOMP server - no StompServerConnectionHandler attached to the " +
"server.");
server
.connectHandler(socket -> {
AtomicBoolean connected = new AtomicBoolean();
AtomicBoolean firstFrame = new AtomicBoolean();
StompServerConnection connection = new StompServerTCPConnectionImpl(socket, this, frame -> {
if (frame.frame().getCommand() == Command.CONNECTED) {
connected.set(true);
}
Handler<ServerFrame> h = writingFrameHandler;
if (h != null) {
h.handle(frame);
}
});
FrameParser parser = new FrameParser(options);
socket.exceptionHandler((exception) -> {
LOGGER.error("The STOMP server caught a TCP socket error - closing connection", exception);
connection.close();
});
socket.endHandler(v -> connection.close());
parser
.errorHandler((exception) -> {
connection.write(
Frames.createInvalidFrameErrorFrame(exception));
connection.close();
}
)
.handler(frame -> {
if (frame.getCommand() == Command.CONNECT || frame.getCommand() == Command.STOMP) {
if (firstFrame.compareAndSet(false, true)) {
stomp.handle(new ServerFrameImpl(frame, connection));
} else {
connection.write(Frames.createErrorFrame("Already connected", Collections.emptyMap(), ""));
connection.close();
}
} else if (connected.get()) {
stomp.handle(new ServerFrameImpl(frame, connection));
} else {
connection.write(Frames.createErrorFrame("Not connected", Collections.emptyMap(), ""));
connection.close();
}
});
socket.handler(parser);
})
.listen(port, host).onComplete(ar -> {
if (ar.failed()) {
if (handler != null) {
vertx.runOnContext(v -> handler.handle(Future.failedFuture(ar.cause())));
} else {
LOGGER.error(ar.cause());
}
} else {
listening = true;
LOGGER.info("STOMP server listening on " + ar.result().actualPort());
if (handler != null) {
vertx.runOnContext(v -> handler.handle(Future.succeededFuture(this)));
}
}
});
return this;
}
|
[
"CWE-287"
] |
CVE-2023-32081
|
MEDIUM
| 6.5
|
vert-x3/vertx-stomp
|
listen
|
src/main/java/io/vertx/ext/stomp/impl/StompServerImpl.java
|
0de4bc5a44ddb57e74d92c445f16456fa03f265b
| 1
|
Analyze the following code function for security vulnerabilities
|
public void bytesReadRead(int count) {
if (count > 0) {
totalPackedRead += count;
if (unrarCallback != null) {
unrarCallback.volumeProgressChanged(totalPackedRead,
totalPackedSize);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: bytesReadRead
File: src/main/java/com/github/junrar/Archive.java
Repository: junrar
The code follows secure coding practices.
|
[
"CWE-835"
] |
CVE-2018-12418
|
MEDIUM
| 4.3
|
junrar
|
bytesReadRead
|
src/main/java/com/github/junrar/Archive.java
|
ad8d0ba8e155630da8a1215cee3f253e0af45817
| 0
|
Analyze the following code function for security vulnerabilities
|
final void scheduleSleepTimeout() {
removeSleepTimeouts();
mHandler.sendEmptyMessageDelayed(SLEEP_TIMEOUT_MSG, SLEEP_TIMEOUT);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: scheduleSleepTimeout
File: services/core/java/com/android/server/am/ActivityStackSupervisor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3838
|
MEDIUM
| 4.3
|
android
|
scheduleSleepTimeout
|
services/core/java/com/android/server/am/ActivityStackSupervisor.java
|
468651c86a8adb7aa56c708d2348e99022088af3
| 0
|
Analyze the following code function for security vulnerabilities
|
private void writeToJournalLocked(String str) {
RandomAccessFile out = null;
try {
if (mJournal == null) mJournal = File.createTempFile("journal", null, mJournalDir);
out = new RandomAccessFile(mJournal, "rws");
out.seek(out.length());
out.writeUTF(str);
} catch (IOException e) {
Slog.e(TAG, "Can't write " + str + " to backup journal", e);
mJournal = null;
} finally {
try { if (out != null) out.close(); } catch (IOException e) {}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeToJournalLocked
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
|
writeToJournalLocked
|
services/backup/java/com/android/server/backup/BackupManagerService.java
|
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setParentReference(EntityReference parentReference)
{
if (!Objects.equals(getRelativeParentReference(), parentReference)) {
this.parentReference = intern(parentReference);
// Clean the absolute parent reference cache to rebuild it next time getParentReference is called.
this.parentReferenceCache = null;
setMetaDataDirty(true);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setParentReference
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
|
setParentReference
|
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
|
String systemPropertiesGet(String key) {
return SystemProperties.get(key);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: systemPropertiesGet
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
|
systemPropertiesGet
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String getErasedScoreItemDataIdsSql(String itemIds, String idataIds) {
return "select idata.item_data_id from item_data idata where idata.value='<erased>'"
+ " and idata.item_data_id in (" + idataIds + ") and idata.item_id in ("
+ " select distinct ifm.item_id from item_form_metadata ifm where ifm.response_set_id in ("
+ " select rs.response_set_id from response_set rs where rs.response_type_id in (8,9))"
+ " and ifm.item_id in " + itemIds + " limit 999)";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getErasedScoreItemDataIdsSql
File: core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
Repository: OpenClinica
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-24831
|
HIGH
| 7.5
|
OpenClinica
|
getErasedScoreItemDataIdsSql
|
core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
|
b152cc63019230c9973965a98e4386ea5322c18f
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean shouldDisableNonVrUiLocked() {
return mVrController.shouldDisableNonVrUiLocked();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: shouldDisableNonVrUiLocked
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
|
shouldDisableNonVrUiLocked
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@CriticalNative
/*package*/ static final native int nativeNext(long state);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nativeNext
File: core/java/android/content/res/XmlBlock.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-415"
] |
CVE-2023-40103
|
HIGH
| 7.8
|
android
|
nativeNext
|
core/java/android/content/res/XmlBlock.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean toDocument(Document doc, org.xwiki.rest.model.jaxb.Page restPage) throws XWikiException
{
boolean modified = false;
if (restPage.getContent() != null) {
doc.setContent(restPage.getContent());
modified = true;
}
if (restPage.getTitle() != null) {
doc.setTitle(restPage.getTitle());
modified = true;
}
if (restPage.getParent() != null) {
doc.setParent(restPage.getParent());
modified = true;
}
if (restPage.getSyntax() != null) {
doc.setSyntaxId(restPage.getSyntax());
modified = true;
}
doc.setHidden(restPage.isHidden());
// Set objects
if (restPage.getObjects() != null) {
Set<ObjectReference> newReferences = new HashSet<>();
// Add/update objects
for (ObjectSummary restObjectSummary : restPage.getObjects().getObjectSummaries()) {
if (restObjectSummary != null) {
org.xwiki.rest.model.jaxb.Object restObject = (org.xwiki.rest.model.jaxb.Object) restObjectSummary;
com.xpn.xwiki.api.Object xwikiObject =
doc.getObject(restObject.getClassName(), restObject.getNumber());
if (xwikiObject == null) {
xwikiObject = doc.newObject(restObject.getClassName());
}
toObject(xwikiObject, restObject);
modified = true;
newReferences.add(xwikiObject.getReference());
}
}
// Remove objects
List<com.xpn.xwiki.api.Object> toRemove = new ArrayList<>();
for (Vector<com.xpn.xwiki.api.Object> objects : doc.getxWikiObjects().values()) {
for (com.xpn.xwiki.api.Object object : objects) {
if (!newReferences.contains(object.getReference())) {
toRemove.add(object);
}
}
}
for (com.xpn.xwiki.api.Object obj : toRemove) {
doc.removeObject(obj);
modified = true;
}
}
// TODO: add support for class, see https://jira.xwiki.org/browse/XWIKI-12597
// TODO: add attachment content to the REST model ?
return modified;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toDocument
File: xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-server/src/main/java/org/xwiki/rest/internal/ModelFactory.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2023-35151
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
toDocument
|
xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-server/src/main/java/org/xwiki/rest/internal/ModelFactory.java
|
824cd742ecf5439971247da11bfe7e0ad2b10ede
| 0
|
Analyze the following code function for security vulnerabilities
|
private DiscoverResult retrieveCollectionsWithSubmit(Context context, DiscoverQuery discoverQuery,
String entityType, Community community, String q)
throws SQLException, SearchServiceException {
StringBuilder query = new StringBuilder();
EPerson currentUser = context.getCurrentUser();
if (!authorizeService.isAdmin(context)) {
String userId = "";
if (currentUser != null) {
userId = currentUser.getID().toString();
}
query.append("submit:(e").append(userId);
Set<Group> groups = groupService.allMemberGroupsSet(context, currentUser);
for (Group group : groups) {
query.append(" OR g").append(group.getID());
}
query.append(")");
discoverQuery.addFilterQueries(query.toString());
}
if (Objects.nonNull(community)) {
discoverQuery.addFilterQueries("location.comm:" + community.getID().toString());
}
if (StringUtils.isNotBlank(entityType)) {
discoverQuery.addFilterQueries("search.entitytype:" + entityType);
}
if (StringUtils.isNotBlank(q)) {
StringBuilder buildQuery = new StringBuilder();
String escapedQuery = ClientUtils.escapeQueryChars(q);
buildQuery.append(escapedQuery).append(" OR ").append(escapedQuery).append("*");
discoverQuery.setQuery(buildQuery.toString());
}
DiscoverResult resp = searchService.search(context, discoverQuery);
return resp;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: retrieveCollectionsWithSubmit
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
|
retrieveCollectionsWithSubmit
|
dspace-api/src/main/java/org/dspace/content/CollectionServiceImpl.java
|
277b499a5cd3a4f5eb2370513a1b7e4ec2a6e041
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void initialize() {
if (executionJob == null || executionJob.isCancelled()) {
if (((BigDecimal) getConfig().get(INTERVAL)) != null
&& ((BigDecimal) getConfig().get(INTERVAL)).intValue() > 0) {
int pollingInterval = ((BigDecimal) getConfig().get(INTERVAL)).intValue();
executionJob = scheduler.scheduleWithFixedDelay(periodicExecutionRunnable, 0, pollingInterval,
TimeUnit.SECONDS);
}
}
updateStatus(ThingStatus.ONLINE);
}
|
Vulnerability Classification:
- CWE: CWE-863
- CVE: CVE-2020-5242
- Severity: HIGH
- CVSS Score: 9.3
Description: Merge pull request from GHSA-w698-693g-23hv
* fix arbitrary code execution vulnerability
Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
* Update bundles/org.openhab.binding.exec/src/main/java/org/openhab/binding/exec/internal/handler/ExecHandler.java
Co-Authored-By: Christoph Weitkamp <github@christophweitkamp.de>
* address review comments
Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
Co-authored-by: Christoph Weitkamp <github@christophweitkamp.de>
Function: initialize
File: bundles/org.openhab.binding.exec/src/main/java/org/openhab/binding/exec/internal/handler/ExecHandler.java
Repository: openhab/openhab-addons
Fixed Code:
@Override
public void initialize() {
if (executionJob == null || executionJob.isCancelled()) {
if ((getConfig().get(INTERVAL)) != null && ((BigDecimal) getConfig().get(INTERVAL))
.intValue() > 0) {
int pollingInterval = ((BigDecimal) getConfig().get(INTERVAL)).intValue();
executionJob = scheduler.scheduleWithFixedDelay(this::execute, 0, pollingInterval, TimeUnit.SECONDS);
}
}
updateStatus(ThingStatus.ONLINE);
}
|
[
"CWE-863"
] |
CVE-2020-5242
|
HIGH
| 9.3
|
openhab/openhab-addons
|
initialize
|
bundles/org.openhab.binding.exec/src/main/java/org/openhab/binding/exec/internal/handler/ExecHandler.java
|
4c4cb664f2e2c3866aadf117d22fb54aa8dd0031
| 1
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.