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
boolean isVisible() {
return wouldBeVisibleIfPolicyIgnored() && isVisibleByPolicyOrInsets();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isVisible
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
|
isVisible
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
@GetMapping
@ApiOperation("Lists sheets")
public Page<SheetListVO> pageBy(@PageableDefault(sort = "createTime", direction = DESC) Pageable pageable) {
Page<Sheet> sheetPage = sheetService.pageBy(PostStatus.PUBLISHED, pageable);
return sheetService.convertToListVo(sheetPage);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: pageBy
File: src/main/java/run/halo/app/controller/content/api/SheetController.java
Repository: halo-dev/halo
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-19007
|
LOW
| 3.5
|
halo-dev/halo
|
pageBy
|
src/main/java/run/halo/app/controller/content/api/SheetController.java
|
d6b3d6cb5d681c7d8d64fd48de6c7c99b696bb8b
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<Widget> getWidgets() {
return widgets;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getWidgets
File: core/src/main/java/jenkins/model/Jenkins.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-2065
|
MEDIUM
| 4.3
|
jenkinsci/jenkins
|
getWidgets
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void updateParamsForAuth(String[] authNames, List<Pair> queryParams, Map<String, String> headerParams,
Map<String, String> cookieParams, String payload, String method, URI uri) throws ApiException {
for (String authName : authNames) {
Authentication auth = authentications.get(authName);
if (auth == null) {
continue;
}
auth.applyToParams(queryParams, headerParams, cookieParams, payload, method, uri);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateParamsForAuth
File: samples/client/petstore/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
|
updateParamsForAuth
|
samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
public ThreadFactory getThreadFactory() {
return threadFactory;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getThreadFactory
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
|
getThreadFactory
|
src/main/java/com/rabbitmq/client/ConnectionFactory.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<ServerConfiguration> getServers() {
return servers;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getServers
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
|
getServers
|
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
|
@Transactional
public SimpleObject submit(UiSessionContext sessionContext, @RequestParam("personId") Patient patient,
@RequestParam("htmlFormId") HtmlForm hf,
@RequestParam(value = "encounterId", required = false) Encounter encounter,
@RequestParam(value = "visitId", required = false) Visit visit,
@RequestParam(value = "createVisit", required = false) Boolean createVisit,
@RequestParam(value = "returnUrl", required = false) String returnUrl,
@SpringBean("adtService") AdtService adtService,
@SpringBean("featureToggles") FeatureToggleProperties featureToggles, UiUtils ui, HttpServletRequest request)
throws Exception {
// TODO formModifiedTimestamp and encounterModifiedTimestamp
boolean editMode = encounter != null;
FormEntrySession fes;
if (encounter != null) {
fes = new FormEntrySession(patient, encounter, FormEntryContext.Mode.EDIT, hf, request.getSession());
} else {
fes = new FormEntrySession(patient, hf, FormEntryContext.Mode.ENTER, request.getSession());
}
VisitDomainWrapper visitDomainWrapper = getVisitDomainWrapper(visit, encounter, adtService);
setupVelocityContext(fes, visitDomainWrapper, ui, sessionContext, featureToggles);
setupFormEntrySession(fes, visitDomainWrapper, null, ui, sessionContext, returnUrl);
fes.getHtmlToDisplay(); // needs to happen before we validate or process a form
// Validate and return with errors if any are found
List<FormSubmissionError> validationErrors = fes.getSubmissionController().validateSubmission(fes.getContext(),
request);
if (validationErrors.size() > 0) {
return returnHelper(validationErrors, fes, null);
}
try {
// No validation errors found so process form submission
fes.prepareForSubmit();
fes.getSubmissionController().handleFormSubmission(fes, request);
}
catch (Exception ex) {
StringWriter sw = new StringWriter();
ex.printStackTrace(new PrintWriter(sw));
validationErrors.add(new FormSubmissionError("general-form-error",
"Form submission error " + ex.getMessage() + "<br/>" + sw.toString()));
return returnHelper(validationErrors, fes, null);
}
// Check this form will actually create an encounter if its supposed to
if (fes.getContext().getMode() == FormEntryContext.Mode.ENTER && fes.hasEncouterTag()
&& (fes.getSubmissionActions().getEncountersToCreate() == null
|| fes.getSubmissionActions().getEncountersToCreate().size() == 0)) {
throw new IllegalArgumentException("This form is not going to create an encounter");
}
Encounter formEncounter = fes.getContext().getMode() == FormEntryContext.Mode.ENTER
? fes.getSubmissionActions().getEncountersToCreate().get(0)
: encounter;
// create a visit if necessary (note that this currently only works in real-time mode)
if (createVisit != null && (createVisit) && visit == null) {
visit = adtService.ensureActiveVisit(patient, sessionContext.getSessionLocation());
fes.getContext().setVisit(visit);
}
// attach to the visit if it exists and not already attached
if (visit != null && (encounter == null || encounter.getVisit() == null)) {
try {
new EncounterDomainWrapper(formEncounter).attachToVisit(visit);
}
catch (EncounterDateBeforeVisitStartDateException e) {
validationErrors.add(
new FormSubmissionError("general-form-error", ui.message("htmlformentryui.datetimeAfterVisitDate")));
}
catch (EncounterDateAfterVisitStopDateException e) {
validationErrors.add(
new FormSubmissionError("general-form-error", ui.message("htmlformentryui.datetimeBeforeVisitDate")));
}
if (validationErrors.size() > 0) {
return returnHelper(validationErrors, fes, null);
}
}
// Do actual encounter creation/updating
fes.applyActions();
request.getSession().setAttribute(UiCommonsConstants.SESSION_ATTRIBUTE_INFO_MESSAGE,
ui.message(
editMode ? "htmlformentryui.editHtmlForm.successMessage" : "htmlformentryui.enterHtmlForm.successMessage",
ui.format(hf.getForm()), ui.escapeJs(ui.format(patient))));
request.getSession().setAttribute(UiCommonsConstants.SESSION_ATTRIBUTE_TOAST_MESSAGE, "true");
return returnHelper(null, fes, formEncounter);
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2021-4284
- Severity: MEDIUM
- CVSS Score: 6.1
Description: Ra 1424: escapeJs is vulnerable to XSS attacks (#51)
* RA-1424: escapeJs vulnerable to XSS
* RA-1424: escapeJs vulnerable to XSS
Function: submit
File: omod/src/main/java/org/openmrs/module/htmlformentryui/fragment/controller/htmlform/EnterHtmlFormFragmentController.java
Repository: openmrs/openmrs-module-htmlformentryui
Fixed Code:
@Transactional
public SimpleObject submit(UiSessionContext sessionContext, @RequestParam("personId") Patient patient,
@RequestParam("htmlFormId") HtmlForm hf,
@RequestParam(value = "encounterId", required = false) Encounter encounter,
@RequestParam(value = "visitId", required = false) Visit visit,
@RequestParam(value = "createVisit", required = false) Boolean createVisit,
@RequestParam(value = "returnUrl", required = false) String returnUrl,
@SpringBean("adtService") AdtService adtService,
@SpringBean("featureToggles") FeatureToggleProperties featureToggles, UiUtils ui, HttpServletRequest request)
throws Exception {
// TODO formModifiedTimestamp and encounterModifiedTimestamp
boolean editMode = encounter != null;
FormEntrySession fes;
if (encounter != null) {
fes = new FormEntrySession(patient, encounter, FormEntryContext.Mode.EDIT, hf, request.getSession());
} else {
fes = new FormEntrySession(patient, hf, FormEntryContext.Mode.ENTER, request.getSession());
}
VisitDomainWrapper visitDomainWrapper = getVisitDomainWrapper(visit, encounter, adtService);
setupVelocityContext(fes, visitDomainWrapper, ui, sessionContext, featureToggles);
setupFormEntrySession(fes, visitDomainWrapper, null, ui, sessionContext, returnUrl);
fes.getHtmlToDisplay(); // needs to happen before we validate or process a form
// Validate and return with errors if any are found
List<FormSubmissionError> validationErrors = fes.getSubmissionController().validateSubmission(fes.getContext(),
request);
if (validationErrors.size() > 0) {
return returnHelper(validationErrors, fes, null);
}
try {
// No validation errors found so process form submission
fes.prepareForSubmit();
fes.getSubmissionController().handleFormSubmission(fes, request);
}
catch (Exception ex) {
StringWriter sw = new StringWriter();
ex.printStackTrace(new PrintWriter(sw));
validationErrors.add(new FormSubmissionError("general-form-error",
"Form submission error " + ex.getMessage() + "<br/>" + sw.toString()));
return returnHelper(validationErrors, fes, null);
}
// Check this form will actually create an encounter if its supposed to
if (fes.getContext().getMode() == FormEntryContext.Mode.ENTER && fes.hasEncouterTag()
&& (fes.getSubmissionActions().getEncountersToCreate() == null
|| fes.getSubmissionActions().getEncountersToCreate().size() == 0)) {
throw new IllegalArgumentException("This form is not going to create an encounter");
}
Encounter formEncounter = fes.getContext().getMode() == FormEntryContext.Mode.ENTER
? fes.getSubmissionActions().getEncountersToCreate().get(0)
: encounter;
// create a visit if necessary (note that this currently only works in real-time mode)
if (createVisit != null && (createVisit) && visit == null) {
visit = adtService.ensureActiveVisit(patient, sessionContext.getSessionLocation());
fes.getContext().setVisit(visit);
}
// attach to the visit if it exists and not already attached
if (visit != null && (encounter == null || encounter.getVisit() == null)) {
try {
new EncounterDomainWrapper(formEncounter).attachToVisit(visit);
}
catch (EncounterDateBeforeVisitStartDateException e) {
validationErrors.add(
new FormSubmissionError("general-form-error", ui.message("htmlformentryui.datetimeAfterVisitDate")));
}
catch (EncounterDateAfterVisitStopDateException e) {
validationErrors.add(
new FormSubmissionError("general-form-error", ui.message("htmlformentryui.datetimeBeforeVisitDate")));
}
if (validationErrors.size() > 0) {
return returnHelper(validationErrors, fes, null);
}
}
// Do actual encounter creation/updating
fes.applyActions();
request.getSession().setAttribute(UiCommonsConstants.SESSION_ATTRIBUTE_INFO_MESSAGE,
ui.message(
editMode ? "htmlformentryui.editHtmlForm.successMessage" : "htmlformentryui.enterHtmlForm.successMessage",
ui.format(hf.getForm()), ui.encodeJavaScript(ui.format(patient))));
request.getSession().setAttribute(UiCommonsConstants.SESSION_ATTRIBUTE_TOAST_MESSAGE, "true");
return returnHelper(null, fes, formEncounter);
}
|
[
"CWE-79"
] |
CVE-2021-4284
|
MEDIUM
| 6.1
|
openmrs/openmrs-module-htmlformentryui
|
submit
|
omod/src/main/java/org/openmrs/module/htmlformentryui/fragment/controller/htmlform/EnterHtmlFormFragmentController.java
|
811990972ea07649ae33c4b56c61c3b520895f07
| 1
|
Analyze the following code function for security vulnerabilities
|
public void setPackagesToScan(String[] packagesToScan) {
this.packagesToScan = packagesToScan;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setPackagesToScan
File: spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java
Repository: spring-projects/spring-framework
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-4152
|
MEDIUM
| 6.8
|
spring-projects/spring-framework
|
setPackagesToScan
|
spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java
|
2843b7d2ee12e3f9c458f6f816befd21b402e3b9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public abstract boolean isSecureConnection();
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isSecureConnection
File: smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
Repository: igniterealtime/Smack
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2016-10027
|
MEDIUM
| 4.3
|
igniterealtime/Smack
|
isSecureConnection
|
smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
|
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
| 0
|
Analyze the following code function for security vulnerabilities
|
int updateGlobalConfigurationLocked(@NonNull Configuration values, boolean initLocale,
boolean persistent, int userId) {
mTempConfig.setTo(getGlobalConfiguration());
final int changes = mTempConfig.updateFrom(values);
if (changes == 0) {
return 0;
}
ProtoLog.i(WM_DEBUG_CONFIGURATION, "Updating global configuration "
+ "to: %s", values);
writeConfigurationChanged(changes);
FrameworkStatsLog.write(FrameworkStatsLog.RESOURCE_CONFIGURATION_CHANGED,
values.colorMode,
values.densityDpi,
values.fontScale,
values.hardKeyboardHidden,
values.keyboard,
values.keyboardHidden,
values.mcc,
values.mnc,
values.navigation,
values.navigationHidden,
values.orientation,
values.screenHeightDp,
values.screenLayout,
values.screenWidthDp,
values.smallestScreenWidthDp,
values.touchscreen,
values.uiMode);
if (!initLocale && !values.getLocales().isEmpty() && values.userSetLocale) {
final LocaleList locales = values.getLocales();
int bestLocaleIndex = 0;
if (locales.size() > 1) {
if (mSupportedSystemLocales == null) {
mSupportedSystemLocales = Resources.getSystem().getAssets().getLocales();
}
bestLocaleIndex = Math.max(0, locales.getFirstMatchIndex(mSupportedSystemLocales));
}
SystemProperties.set("persist.sys.locale",
locales.get(bestLocaleIndex).toLanguageTag());
LocaleList.setDefault(locales, bestLocaleIndex);
}
mTempConfig.seq = increaseConfigurationSeqLocked();
Slog.i(TAG, "Config changes=" + Integer.toHexString(changes) + " " + mTempConfig);
// TODO(multi-display): Update UsageEvents#Event to include displayId.
mUsageStatsInternal.reportConfigurationChange(mTempConfig, mAmInternal.getCurrentUserId());
// TODO: If our config changes, should we auto dismiss any currently showing dialogs?
updateShouldShowDialogsLocked(mTempConfig);
AttributeCache ac = AttributeCache.instance();
if (ac != null) {
ac.updateConfiguration(mTempConfig);
}
// Make sure all resources in our process are updated right now, so that anyone who is going
// to retrieve resource values after we return will be sure to get the new ones. This is
// especially important during boot, where the first config change needs to guarantee all
// resources have that config before following boot code is executed.
mSystemThread.applyConfigurationToResources(mTempConfig);
if (persistent && Settings.System.hasInterestingConfigurationChanges(changes)) {
final Message msg = PooledLambda.obtainMessage(
ActivityTaskManagerService::sendPutConfigurationForUserMsg,
this, userId, new Configuration(mTempConfig));
mH.sendMessage(msg);
}
SparseArray<WindowProcessController> pidMap = mProcessMap.getPidMap();
for (int i = pidMap.size() - 1; i >= 0; i--) {
final int pid = pidMap.keyAt(i);
final WindowProcessController app = pidMap.get(pid);
ProtoLog.v(WM_DEBUG_CONFIGURATION, "Update process config of %s to new "
+ "config %s", app.mName, mTempConfig);
app.onConfigurationChanged(mTempConfig);
}
final Message msg = PooledLambda.obtainMessage(
ActivityManagerInternal::broadcastGlobalConfigurationChanged,
mAmInternal, changes, initLocale);
mH.sendMessage(msg);
// Update stored global config and notify everyone about the change.
mRootWindowContainer.onConfigurationChanged(mTempConfig);
return changes;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateGlobalConfigurationLocked
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
|
updateGlobalConfigurationLocked
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
protected java.util.Date _parseDateFromArray(JsonParser p, DeserializationContext ctxt)
throws IOException
{
final CoercionAction act = _findCoercionFromEmptyArray(ctxt);
final boolean unwrap = ctxt.isEnabled(DeserializationFeature.UNWRAP_SINGLE_VALUE_ARRAYS);
if (unwrap || (act != CoercionAction.Fail)) {
JsonToken t = p.nextToken();
if (t == JsonToken.END_ARRAY) {
switch (act) {
case AsEmpty:
return (java.util.Date) getEmptyValue(ctxt);
case AsNull:
case TryConvert:
return (java.util.Date) getNullValue(ctxt);
default:
}
} else if (unwrap) {
final Date parsed = _parseDate(p, ctxt);
_verifyEndArrayForSingle(p, ctxt);
return parsed;
}
}
return (java.util.Date) ctxt.handleUnexpectedToken(_valueClass, JsonToken.START_ARRAY, p, null);
}
|
Vulnerability Classification:
- CWE: CWE-502
- CVE: CVE-2022-42003
- Severity: HIGH
- CVSS Score: 7.5
Description: Fix #3590
Function: _parseDateFromArray
File: src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java
Repository: FasterXML/jackson-databind
Fixed Code:
protected java.util.Date _parseDateFromArray(JsonParser p, DeserializationContext ctxt)
throws IOException
{
final CoercionAction act = _findCoercionFromEmptyArray(ctxt);
final boolean unwrap = ctxt.isEnabled(DeserializationFeature.UNWRAP_SINGLE_VALUE_ARRAYS);
if (unwrap || (act != CoercionAction.Fail)) {
JsonToken t = p.nextToken();
if (t == JsonToken.END_ARRAY) {
switch (act) {
case AsEmpty:
return (java.util.Date) getEmptyValue(ctxt);
case AsNull:
case TryConvert:
return (java.util.Date) getNullValue(ctxt);
default:
}
} else if (unwrap) {
if (t == JsonToken.START_ARRAY) {
return (java.util.Date) handleNestedArrayForSingle(p, ctxt);
}
final Date parsed = _parseDate(p, ctxt);
_verifyEndArrayForSingle(p, ctxt);
return parsed;
}
}
return (java.util.Date) ctxt.handleUnexpectedToken(_valueClass, JsonToken.START_ARRAY, p, null);
}
|
[
"CWE-502"
] |
CVE-2022-42003
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
_parseDateFromArray
|
src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java
|
d78d00ee7b5245b93103fef3187f70543d67ca33
| 1
|
Analyze the following code function for security vulnerabilities
|
protected BlockAsyncRendererConfiguration createBlockAsyncRendererConfiguration(List<?> idElements, Block content,
MacroTransformationContext context)
{
return createBlockAsyncRendererConfiguration(idElements, content, getCurrentSource(context), context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createBlockAsyncRendererConfiguration
File: xwiki-platform-core/xwiki-platform-rendering/xwiki-platform-rendering-async/xwiki-platform-rendering-async-macro/src/main/java/org/xwiki/rendering/async/internal/AbstractExecutedContentMacro.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2023-26471
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
createBlockAsyncRendererConfiguration
|
xwiki-platform-core/xwiki-platform-rendering/xwiki-platform-rendering-async/xwiki-platform-rendering-async-macro/src/main/java/org/xwiki/rendering/async/internal/AbstractExecutedContentMacro.java
|
00532d9f1404287cf3ec3a05056640d809516006
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean deleteDatabase(@NonNull File file) {
if (file == null) {
throw new IllegalArgumentException("file must not be null");
}
boolean deleted = false;
deleted |= file.delete();
deleted |= new File(file.getPath() + "-journal").delete();
deleted |= new File(file.getPath() + "-shm").delete();
deleted |= new File(file.getPath() + "-wal").delete();
File dir = file.getParentFile();
if (dir != null) {
final String prefix = file.getName() + "-mj";
File[] files = dir.listFiles(new FileFilter() {
@Override
public boolean accept(File candidate) {
return candidate.getName().startsWith(prefix);
}
});
if (files != null) {
for (File masterJournal : files) {
deleted |= masterJournal.delete();
}
}
}
return deleted;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deleteDatabase
File: core/java/android/database/sqlite/SQLiteDatabase.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2018-9493
|
LOW
| 2.1
|
android
|
deleteDatabase
|
core/java/android/database/sqlite/SQLiteDatabase.java
|
ebc250d16c747f4161167b5ff58b3aea88b37acf
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void getNamedQuery(String projectName, String name, AsyncMethodCallback resultHandler) {
unimplemented(resultHandler);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNamedQuery
File: server/src/main/java/com/linecorp/centraldogma/server/internal/thrift/CentralDogmaServiceImpl.java
Repository: line/centraldogma
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2021-38388
|
MEDIUM
| 6.5
|
line/centraldogma
|
getNamedQuery
|
server/src/main/java/com/linecorp/centraldogma/server/internal/thrift/CentralDogmaServiceImpl.java
|
e83b558ef9eaa44f71b7d9236bdec9f68c85b8bd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected List<Object> getCommandConfigurationBeans() {
return Arrays.asList(configuration,
httpConfiguration,
elasticsearchConfiguration,
elasticsearchClientConfiguration,
emailConfiguration,
mongoDbConfiguration,
versionCheckConfiguration,
kafkaJournalConfiguration,
nettyTransportConfiguration,
pipelineConfiguration,
viewsConfiguration,
processingStatusConfig,
jobSchedulerConfiguration,
prometheusExporterConfiguration,
tlsConfiguration,
geoIpProcessorConfig);
}
|
Vulnerability Classification:
- CWE: CWE-345
- CVE: CVE-2023-41045
- Severity: MEDIUM
- CVSS Score: 5.3
Description: Merge pull request from GHSA-g96c-x7rh-99r3
* Add support for randomizing DNS Lookup source port
* Clarify purpose of lease
* Skip initial refresh
Previously, the pool was being refreshed immediately upon initialization. Now, the refresh waits until the `poolRefreshSeconds` duration has elapsed.
* Ensure thread safety, skip unused poller refreshes
* Add change log
* Restore location of local flag
Function: getCommandConfigurationBeans
File: graylog2-server/src/main/java/org/graylog2/commands/Server.java
Repository: Graylog2/graylog2-server
Fixed Code:
@Override
protected List<Object> getCommandConfigurationBeans() {
return Arrays.asList(configuration,
httpConfiguration,
elasticsearchConfiguration,
elasticsearchClientConfiguration,
emailConfiguration,
mongoDbConfiguration,
versionCheckConfiguration,
kafkaJournalConfiguration,
nettyTransportConfiguration,
pipelineConfiguration,
viewsConfiguration,
processingStatusConfig,
jobSchedulerConfiguration,
prometheusExporterConfiguration,
tlsConfiguration,
geoIpProcessorConfig,
dnsLookupAdapterConfiguration);
}
|
[
"CWE-345"
] |
CVE-2023-41045
|
MEDIUM
| 5.3
|
Graylog2/graylog2-server
|
getCommandConfigurationBeans
|
graylog2-server/src/main/java/org/graylog2/commands/Server.java
|
a101f4f12180fd3dfa7d3345188a099877a3c327
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public void updateCredentials(IAccountManagerResponse response, final Account account,
final String authTokenType, final boolean expectActivityLaunch,
final Bundle loginOptions) {
Bundle.setDefusable(loginOptions, true);
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.v(TAG, "updateCredentials: " + account
+ ", response " + response
+ ", authTokenType " + authTokenType
+ ", expectActivityLaunch " + expectActivityLaunch
+ ", caller's uid " + Binder.getCallingUid()
+ ", pid " + Binder.getCallingPid());
}
if (response == null) throw new IllegalArgumentException("response is null");
if (account == null) throw new IllegalArgumentException("account is null");
int userId = UserHandle.getCallingUserId();
final long identityToken = clearCallingIdentity();
try {
UserAccounts accounts = getUserAccounts(userId);
new Session(accounts, response, account.type, expectActivityLaunch,
true /* stripAuthTokenFromResult */, account.name,
false /* authDetailsRequired */, true /* updateLastCredentialTime */) {
@Override
public void run() throws RemoteException {
mAuthenticator.updateCredentials(this, account, authTokenType, loginOptions);
}
@Override
protected String toDebugString(long now) {
if (loginOptions != null) loginOptions.keySet();
return super.toDebugString(now) + ", updateCredentials"
+ ", " + account.toSafeString()
+ ", authTokenType " + authTokenType
+ ", loginOptions " + loginOptions;
}
}.bind();
} finally {
restoreCallingIdentity(identityToken);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateCredentials
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
|
updateCredentials
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void finishPackageInstall(int token) {
enforceSystemOrRoot("Only the system is allowed to finish installs");
if (DEBUG_INSTALL) {
Slog.v(TAG, "BM finishing package install for " + token);
}
final Message msg = mHandler.obtainMessage(POST_INSTALL, token, 0);
mHandler.sendMessage(msg);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: finishPackageInstall
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
|
finishPackageInstall
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int read()
throws IOException
{
if (uncompressedCursor < uncompressedLimit) {
return uncompressed[uncompressedCursor++] & 0xFF;
}
else {
if (hasNextChunk()) {
return read();
}
else {
return -1;
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: read
File: src/main/java/org/xerial/snappy/SnappyInputStream.java
Repository: xerial/snappy-java
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2023-34455
|
HIGH
| 7.5
|
xerial/snappy-java
|
read
|
src/main/java/org/xerial/snappy/SnappyInputStream.java
|
3bf67857fcf70d9eea56eed4af7c925671e8eaea
| 0
|
Analyze the following code function for security vulnerabilities
|
private void notifyPresenceAdded(String oortURL, String userId) {
PresenceListener.Event event = new PresenceListener.Event(this, userId, oortURL);
for (PresenceListener listener : _presenceListeners) {
try {
listener.presenceAdded(event);
} catch (Throwable x) {
_logger.info("Exception while invoking listener " + listener, x);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: notifyPresenceAdded
File: cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Seti.java
Repository: cometd
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-24721
|
MEDIUM
| 5.5
|
cometd
|
notifyPresenceAdded
|
cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Seti.java
|
bb445a143fbf320f17c62e340455cd74acfb5929
| 0
|
Analyze the following code function for security vulnerabilities
|
public Integer getQuarterlyVotes() {
if (quarterlyVotes < 0) {
quarterlyVotes = 0;
}
return quarterlyVotes;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getQuarterlyVotes
File: src/main/java/com/erudika/scoold/core/Profile.java
Repository: Erudika/scoold
The code follows secure coding practices.
|
[
"CWE-130"
] |
CVE-2022-1543
|
MEDIUM
| 6.5
|
Erudika/scoold
|
getQuarterlyVotes
|
src/main/java/com/erudika/scoold/core/Profile.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
private void revertToNitzTime() {
if (Settings.Global.getInt(mCr, Settings.Global.AUTO_TIME, 0) == 0) {
return;
}
if (DBG) {
log("revertToNitzTime: mSavedTime=" + mSavedTime + " mSavedAtTime=" + mSavedAtTime);
}
if (mSavedTime != 0 && mSavedAtTime != 0) {
setAndBroadcastNetworkSetTime(mSavedTime
+ (SystemClock.elapsedRealtime() - mSavedAtTime));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: revertToNitzTime
File: src/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2016-3831
|
MEDIUM
| 5
|
android
|
revertToNitzTime
|
src/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
|
f47bc301ccbc5e6d8110afab5a1e9bac1d4ef058
| 0
|
Analyze the following code function for security vulnerabilities
|
public void moveRosterItemToGroup(String user, String group)
throws YaximXMPPException {
tryToMoveRosterEntryToGroup(user, group);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: moveRosterItemToGroup
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
|
moveRosterItemToGroup
|
src/org/yaxim/androidclient/service/SmackableImp.java
|
65a38dc77545d9568732189e86089390f0ceaf9f
| 0
|
Analyze the following code function for security vulnerabilities
|
@JsonIgnore
public Integer getKeySize() {
String keySize = attributes.get(KEY_SIZE);
return keySize == null ? null : Integer.valueOf(keySize);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getKeySize
File: base/common/src/main/java/com/netscape/certsrv/key/KeyArchivalRequest.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
getKeySize
|
base/common/src/main/java/com/netscape/certsrv/key/KeyArchivalRequest.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean onContextItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.share_with:
ShareUtil.share(activity, selectedMessage);
return true;
case R.id.correct_message:
correctMessage(selectedMessage);
return true;
case R.id.copy_message:
ShareUtil.copyToClipboard(activity, selectedMessage);
return true;
case R.id.copy_link:
ShareUtil.copyLinkToClipboard(activity, selectedMessage);
return true;
case R.id.quote_message:
quoteMessage(selectedMessage);
return true;
case R.id.send_again:
resendMessage(selectedMessage);
return true;
case R.id.copy_url:
ShareUtil.copyUrlToClipboard(activity, selectedMessage);
return true;
case R.id.download_file:
startDownloadable(selectedMessage);
return true;
case R.id.cancel_transmission:
cancelTransmission(selectedMessage);
return true;
case R.id.retry_decryption:
retryDecryption(selectedMessage);
return true;
case R.id.delete_file:
deleteFile(selectedMessage);
return true;
case R.id.show_error_message:
showErrorMessage(selectedMessage);
return true;
default:
return super.onContextItemSelected(item);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onContextItemSelected
File: src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
onContextItemSelected
|
src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
BufferedReader createBufferedReader(InputStream inputStream) throws IOException {
BufferedReader reader;
if (compressed) {
reader = new BufferedReader(new InputStreamReader(new GZIPInputStream(inputStream),
StandardCharsets.UTF_8));
} else {
reader = new BufferedReader(new InputStreamReader(inputStream, StandardCharsets.UTF_8));
}
return reader;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createBufferedReader
File: server/src/main/java/io/crate/execution/engine/collect/files/FileReadingIterator.java
Repository: crate
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2024-24565
|
MEDIUM
| 6.5
|
crate
|
createBufferedReader
|
server/src/main/java/io/crate/execution/engine/collect/files/FileReadingIterator.java
|
4e857d675683095945dd524d6ba03e692c70ecd6
| 0
|
Analyze the following code function for security vulnerabilities
|
@JsonProperty
public String getId() {
return id;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getId
File: base/common/src/main/java/com/netscape/certsrv/profile/ProfileOutput.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
getId
|
base/common/src/main/java/com/netscape/certsrv/profile/ProfileOutput.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void close() throws IOException {
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: close
File: servlet/src/main/java/io/undertow/servlet/handlers/ServletInitialHandler.java
Repository: undertow-io/undertow
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2019-10184
|
MEDIUM
| 5
|
undertow-io/undertow
|
close
|
servlet/src/main/java/io/undertow/servlet/handlers/ServletInitialHandler.java
|
d2715e3afa13f50deaa19643676816ce391551e9
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getTextPin(final String userID) throws IOException {
return getContactInfo(userID, ContactType.textPage.toString());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTextPin
File: opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
Repository: OpenNMS/opennms
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2021-25931
|
MEDIUM
| 6.8
|
OpenNMS/opennms
|
getTextPin
|
opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
|
607151ea8f90212a3fb37c977fa57c7d58d26a84
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getErrorCode() {
return errorCode;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getErrorCode
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
|
getErrorCode
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onPostDialWait(Call call, String remaining) {
mInCallController.onPostDialWait(call, remaining);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onPostDialWait
File: src/com/android/server/telecom/CallsManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2423
|
MEDIUM
| 6.6
|
android
|
onPostDialWait
|
src/com/android/server/telecom/CallsManager.java
|
a06c9a4aef69ae27b951523cf72bf72412bf48fa
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Admin getAdminInfoById(int id) {
Admin admin = new Admin();
String sql = "select * from admin_table where id=?";
try {
ps = DbUtil.getConnection().prepareStatement(sql);
ps.setInt(1, id);
ResultSet rs = ps.executeQuery();
if (rs.next()) {
admin.setId(rs.getInt("id"));
admin.setAdminName(rs.getString("admin_name"));
admin.setPassword(rs.getString("password"));
}
} catch (ClassNotFoundException | SQLException e) {
e.printStackTrace();
}
return admin;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAdminInfoById
File: src/com/bijay/onlinevotingsystem/dao/AdminDaoImpl.java
Repository: bijaythapaa/OnlineVotingSystem
The code follows secure coding practices.
|
[
"CWE-916"
] |
CVE-2021-21253
|
MEDIUM
| 5
|
bijaythapaa/OnlineVotingSystem
|
getAdminInfoById
|
src/com/bijay/onlinevotingsystem/dao/AdminDaoImpl.java
|
0181cb0272857696c8eb3e44fcf6cb014ff90f09
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getOwnerCondition( CurrentUserGroupInfo currentUserGroupInfo )
{
return String.join( " or ",
jsonbFunction( EXTRACT_PATH_TEXT, "owner" ) + " = " + withQuotes( currentUserGroupInfo.getUserUID() ),
jsonbFunction( EXTRACT_PATH_TEXT, "owner" ) + " is null" );
}
|
Vulnerability Classification:
- CWE: CWE-89
- CVE: CVE-2022-24848
- Severity: MEDIUM
- CVSS Score: 6.5
Description: Merge pull request from GHSA-52vp-f7hj-cj92
* fix: Add validation for programs org unit associations [DHIS2-13056]
* fix compilation failure in test class
* Fix one more compilation failure in another test class
Co-authored-by: Lars Helge Øverland <lars@dhis2.org>
Co-authored-by: Ameen <ameen@dhis2.org>
Function: getOwnerCondition
File: dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/association/AbstractOrganisationUnitAssociationsQueryBuilder.java
Repository: dhis2/dhis2-core
Fixed Code:
private String getOwnerCondition( CurrentUserGroupInfo currentUserGroupInfo )
{
return String.join( " or ",
jsonbFunction( EXTRACT_PATH_TEXT, "owner" ) + " = " + singleQuote( currentUserGroupInfo.getUserUID() ),
jsonbFunction( EXTRACT_PATH_TEXT, "owner" ) + " is null" );
}
|
[
"CWE-89"
] |
CVE-2022-24848
|
MEDIUM
| 6.5
|
dhis2/dhis2-core
|
getOwnerCondition
|
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/association/AbstractOrganisationUnitAssociationsQueryBuilder.java
|
ef04483a9b177d62e48dcf4e498b302a11f95e7d
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<RunningTaskInfo> getTasks(int maxNum, int flags) {
final int callingUid = Binder.getCallingUid();
ArrayList<RunningTaskInfo> list = new ArrayList<RunningTaskInfo>();
synchronized(this) {
if (localLOGV) Slog.v(
TAG, "getTasks: max=" + maxNum + ", flags=" + flags);
final boolean allowed = isGetTasksAllowed("getTasks", Binder.getCallingPid(),
callingUid);
// TODO: Improve with MRU list from all ActivityStacks.
mStackSupervisor.getTasksLocked(maxNum, list, callingUid, allowed);
}
return list;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTasks
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3833
|
MEDIUM
| 4.3
|
android
|
getTasks
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isScrollInProgress() {
return mTouchScrollInProgress || mPotentiallyActiveFlingCount > 0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isScrollInProgress
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
isScrollInProgress
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
protected List<Rfc822Token[]> tokenizeAddressList(Collection<String> addresses) {
@VisibleForTesting
List<Rfc822Token[]> tokenized = new ArrayList<Rfc822Token[]>();
for (String address: addresses) {
tokenized.add(Rfc822Tokenizer.tokenize(address));
}
return tokenized;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: tokenizeAddressList
File: src/com/android/mail/compose/ComposeActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2425
|
MEDIUM
| 4.3
|
android
|
tokenizeAddressList
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setDomainSuffixMatch(String domain) {
setFieldValue(DOM_SUFFIX_MATCH_KEY, domain);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDomainSuffixMatch
File: wifi/java/android/net/wifi/WifiEnterpriseConfig.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3897
|
MEDIUM
| 4.3
|
android
|
setDomainSuffixMatch
|
wifi/java/android/net/wifi/WifiEnterpriseConfig.java
|
81be4e3aac55305cbb5c9d523cf5c96c66604b39
| 0
|
Analyze the following code function for security vulnerabilities
|
public void addImplicitArray(Class ownerType, String fieldName, String itemName) {
addImplicitCollection(ownerType, fieldName, itemName, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addImplicitArray
File: xstream/src/java/com/thoughtworks/xstream/XStream.java
Repository: x-stream/xstream
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-43859
|
MEDIUM
| 5
|
x-stream/xstream
|
addImplicitArray
|
xstream/src/java/com/thoughtworks/xstream/XStream.java
|
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void requestPinShortcut(String packageName, ShortcutInfo shortcut,
IntentSender resultIntent, int userId, AndroidFuture<String> ret) {
Objects.requireNonNull(shortcut);
Preconditions.checkArgument(shortcut.isEnabled(), "Shortcut must be enabled");
Preconditions.checkArgument(
!shortcut.isExcludedFromSurfaces(ShortcutInfo.SURFACE_LAUNCHER),
"Shortcut excluded from launcher cannot be pinned");
ret.complete(String.valueOf(requestPinItem(
packageName, userId, shortcut, null, null, resultIntent)));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: requestPinShortcut
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
|
requestPinShortcut
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
if (action.equals(Intent.ACTION_SCREEN_ON)) {
// Keep track of screen on/off state, but do not turn off the notification light
// until user passes through the lock screen or views the notification.
mScreenOn = true;
updateNotificationPulse();
} else if (action.equals(Intent.ACTION_SCREEN_OFF)) {
mScreenOn = false;
updateNotificationPulse();
} else if (action.equals(TelephonyManager.ACTION_PHONE_STATE_CHANGED)) {
mInCall = TelephonyManager.EXTRA_STATE_OFFHOOK
.equals(intent.getStringExtra(TelephonyManager.EXTRA_STATE));
updateNotificationPulse();
} else if (action.equals(Intent.ACTION_USER_STOPPED)) {
int userHandle = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, -1);
if (userHandle >= 0) {
cancelAllNotificationsInt(MY_UID, MY_PID, null, 0, 0, true, userHandle,
REASON_USER_STOPPED, null);
}
} else if (action.equals(Intent.ACTION_MANAGED_PROFILE_UNAVAILABLE)) {
int userHandle = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, -1);
if (userHandle >= 0) {
cancelAllNotificationsInt(MY_UID, MY_PID, null, 0, 0, true, userHandle,
REASON_PROFILE_TURNED_OFF, null);
}
} else if (action.equals(Intent.ACTION_USER_PRESENT)) {
// turn off LED when user passes through lock screen
mNotificationLight.turnOff();
if (mStatusBar != null) {
mStatusBar.notificationLightOff();
}
} else if (action.equals(Intent.ACTION_USER_SWITCHED)) {
final int user = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, UserHandle.USER_NULL);
// reload per-user settings
mSettingsObserver.update(null);
mUserProfiles.updateCache(context);
// Refresh managed services
mConditionProviders.onUserSwitched(user);
mListeners.onUserSwitched(user);
mRankerServices.onUserSwitched(user);
mZenModeHelper.onUserSwitched(user);
} else if (action.equals(Intent.ACTION_USER_ADDED)) {
mUserProfiles.updateCache(context);
} else if (action.equals(Intent.ACTION_USER_REMOVED)) {
final int user = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, UserHandle.USER_NULL);
mZenModeHelper.onUserRemoved(user);
} else if (action.equals(Intent.ACTION_USER_UNLOCKED)) {
final int user = intent.getIntExtra(Intent.EXTRA_USER_HANDLE, UserHandle.USER_NULL);
mConditionProviders.onUserUnlocked(user);
mListeners.onUserUnlocked(user);
mRankerServices.onUserUnlocked(user);
mZenModeHelper.onUserUnlocked(user);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onReceive
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
|
onReceive
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
public long getLineRangeForDraw(Canvas canvas) {
int dtop, dbottom;
synchronized (sTempRect) {
if (!canvas.getClipBounds(sTempRect)) {
// Negative range end used as a special flag
return TextUtils.packRangeInLong(0, -1);
}
dtop = sTempRect.top;
dbottom = sTempRect.bottom;
}
final int top = Math.max(dtop, 0);
final int bottom = Math.min(getLineTop(getLineCount()), dbottom);
if (top >= bottom) return TextUtils.packRangeInLong(0, -1);
return TextUtils.packRangeInLong(getLineForVertical(top), getLineForVertical(bottom));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLineRangeForDraw
File: core/java/android/text/Layout.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-9452
|
MEDIUM
| 4.3
|
android
|
getLineRangeForDraw
|
core/java/android/text/Layout.java
|
3b6f84b77c30ec0bab5147b0cffc192c86ba2634
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequiresPermission(value = MANAGE_DEVICE_POLICY_LOCK, conditional = true)
public void lockNow(@LockNowFlag int flags) {
if (mService != null) {
try {
mService.lockNow(flags, mContext.getPackageName(), mParentInstance);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: lockNow
File: core/java/android/app/admin/DevicePolicyManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
lockNow
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void readDocMetaFromForm(EditForm eform, XWikiContext context) throws XWikiException
{
String defaultLanguage = eform.getDefaultLanguage();
if (defaultLanguage != null) {
setDefaultLanguage(defaultLanguage);
}
String defaultTemplate = eform.getDefaultTemplate();
if (defaultTemplate != null) {
setDefaultTemplate(defaultTemplate);
}
String creator = eform.getCreator();
if ((creator != null) && (!creator.equals(getCreator()))) {
if ((getCreatorReference().equals(context.getUserReference()))
|| (context.getWiki().getRightService().hasAdminRights(context))) {
setCreator(creator);
}
}
String parent = eform.getParent();
if (parent != null) {
setParent(parent);
}
// Read the comment from the form
String comment = eform.getComment();
if (comment != null) {
setComment(comment);
}
// Read the minor edit checkbox from the form
setMinorEdit(eform.isMinorEdit());
String tags = eform.getTags();
if (!StringUtils.isEmpty(tags)) {
setTags(tags, context);
}
// Set the Syntax id if defined
String syntaxId = eform.getSyntaxId();
if (syntaxId != null) {
setSyntax(resolveSyntax(syntaxId));
}
// Read the hidden checkbox from the form
if (eform.getHidden() != null) {
setHidden("1".equals(eform.getHidden()));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readDocMetaFromForm
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
|
readDocMetaFromForm
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public KBTemplate findByUUID_G(String uuid, long groupId)
throws NoSuchTemplateException {
KBTemplate kbTemplate = fetchByUUID_G(uuid, groupId);
if (kbTemplate == null) {
StringBundler msg = new StringBundler(6);
msg.append(_NO_SUCH_ENTITY_WITH_KEY);
msg.append("uuid=");
msg.append(uuid);
msg.append(", groupId=");
msg.append(groupId);
msg.append(StringPool.CLOSE_CURLY_BRACE);
if (_log.isDebugEnabled()) {
_log.debug(msg.toString());
}
throw new NoSuchTemplateException(msg.toString());
}
return kbTemplate;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findByUUID_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
|
findByUUID_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
|
@Override
public void performIdleMaintenance() {
if (checkCallingPermission(android.Manifest.permission.SET_ACTIVITY_WATCHER)
!= PackageManager.PERMISSION_GRANTED) {
throw new SecurityException("Requires permission "
+ android.Manifest.permission.SET_ACTIVITY_WATCHER);
}
synchronized (this) {
final long now = SystemClock.uptimeMillis();
final long timeSinceLastIdle = now - mLastIdleTime;
final long lowRamSinceLastIdle = getLowRamTimeSinceIdle(now);
mLastIdleTime = now;
mLowRamTimeSinceLastIdle = 0;
if (mLowRamStartTime != 0) {
mLowRamStartTime = now;
}
StringBuilder sb = new StringBuilder(128);
sb.append("Idle maintenance over ");
TimeUtils.formatDuration(timeSinceLastIdle, sb);
sb.append(" low RAM for ");
TimeUtils.formatDuration(lowRamSinceLastIdle, sb);
Slog.i(TAG, sb.toString());
// If at least 1/3 of our time since the last idle period has been spent
// with RAM low, then we want to kill processes.
boolean doKilling = lowRamSinceLastIdle > (timeSinceLastIdle/3);
for (int i = mLruProcesses.size() - 1 ; i >= 0 ; i--) {
ProcessRecord proc = mLruProcesses.get(i);
if (proc.notCachedSinceIdle) {
if (proc.setProcState >= ActivityManager.PROCESS_STATE_BOUND_FOREGROUND_SERVICE
&& proc.setProcState <= ActivityManager.PROCESS_STATE_SERVICE) {
if (doKilling && proc.initialIdlePss != 0
&& proc.lastPss > ((proc.initialIdlePss*3)/2)) {
sb = new StringBuilder(128);
sb.append("Kill");
sb.append(proc.processName);
sb.append(" in idle maint: pss=");
sb.append(proc.lastPss);
sb.append(", swapPss=");
sb.append(proc.lastSwapPss);
sb.append(", initialPss=");
sb.append(proc.initialIdlePss);
sb.append(", period=");
TimeUtils.formatDuration(timeSinceLastIdle, sb);
sb.append(", lowRamPeriod=");
TimeUtils.formatDuration(lowRamSinceLastIdle, sb);
Slog.wtfQuiet(TAG, sb.toString());
proc.kill("idle maint (pss " + proc.lastPss
+ " from " + proc.initialIdlePss + ")", true);
}
}
} else if (proc.setProcState < ActivityManager.PROCESS_STATE_HOME
&& proc.setProcState >= ActivityManager.PROCESS_STATE_PERSISTENT) {
proc.notCachedSinceIdle = true;
proc.initialIdlePss = 0;
proc.nextPssTime = ProcessList.computeNextPssTime(proc.setProcState, null,
mTestPssMode, isSleepingLocked(), now);
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: performIdleMaintenance
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2018-9492
|
HIGH
| 7.2
|
android
|
performIdleMaintenance
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public static int getLeafIndex(long index, int xmssTreeHeight)
{
return (int)(index & ((1L << xmssTreeHeight) - 1L));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLeafIndex
File: core/src/main/java/org/bouncycastle/pqc/crypto/xmss/XMSSUtil.java
Repository: bcgit/bc-java
The code follows secure coding practices.
|
[
"CWE-470"
] |
CVE-2018-1000613
|
HIGH
| 7.5
|
bcgit/bc-java
|
getLeafIndex
|
core/src/main/java/org/bouncycastle/pqc/crypto/xmss/XMSSUtil.java
|
4092ede58da51af9a21e4825fbad0d9a3ef5a223
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int watchRotation(IRotationWatcher watcher) {
final IBinder watcherBinder = watcher.asBinder();
IBinder.DeathRecipient dr = new IBinder.DeathRecipient() {
@Override
public void binderDied() {
synchronized (mWindowMap) {
for (int i=0; i<mRotationWatchers.size(); i++) {
if (watcherBinder == mRotationWatchers.get(i).watcher.asBinder()) {
RotationWatcher removed = mRotationWatchers.remove(i);
IBinder binder = removed.watcher.asBinder();
if (binder != null) {
binder.unlinkToDeath(this, 0);
}
i--;
}
}
}
}
};
synchronized (mWindowMap) {
try {
watcher.asBinder().linkToDeath(dr, 0);
mRotationWatchers.add(new RotationWatcher(watcher, dr));
} catch (RemoteException e) {
// Client died, no cleanup needed.
}
return mRotation;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: watchRotation
File: services/core/java/com/android/server/wm/WindowManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3875
|
HIGH
| 7.2
|
android
|
watchRotation
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
private static File getDestinationDirectory(Context context, int destination, boolean running)
throws IOException {
switch (destination) {
case Downloads.Impl.DESTINATION_CACHE_PARTITION:
case Downloads.Impl.DESTINATION_CACHE_PARTITION_PURGEABLE:
case Downloads.Impl.DESTINATION_CACHE_PARTITION_NOROAMING:
if (running) {
return context.getFilesDir();
} else {
return context.getCacheDir();
}
case Downloads.Impl.DESTINATION_SYSTEMCACHE_PARTITION:
if (running) {
return new File(Environment.getDownloadCacheDirectory(),
Constants.DIRECTORY_CACHE_RUNNING);
} else {
return Environment.getDownloadCacheDirectory();
}
case Downloads.Impl.DESTINATION_EXTERNAL:
final File target = new File(
Environment.getExternalStorageDirectory(), Environment.DIRECTORY_DOWNLOADS);
if (!target.isDirectory() && target.mkdirs()) {
throw new IOException("unable to create external downloads directory");
}
return target;
default:
throw new IllegalStateException("unexpected destination: " + destination);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDestinationDirectory
File: src/com/android/providers/downloads/Helpers.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2016-0848
|
HIGH
| 7.2
|
android
|
getDestinationDirectory
|
src/com/android/providers/downloads/Helpers.java
|
bdc831357e7a116bc561d51bf2ddc85ff11c01a9
| 0
|
Analyze the following code function for security vulnerabilities
|
public static CountingInputStream inputStreamFor(Object input, Map<String, Object> headers, String payload, String compressionAlgo) throws IOException {
if (input == null) return null;
if (input instanceof String) {
String fileName = (String) input;
apocConfig().checkReadAllowed(fileName);
fileName = changeFileUrlIfImportDirectoryConstrained(fileName);
return Util.openInputStream(fileName, headers, payload, compressionAlgo);
} else if (input instanceof byte[]) {
return getInputStreamFromBinary((byte[]) input, compressionAlgo);
} else {
throw new RuntimeException(ERROR_BYTES_OR_STRING);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: inputStreamFor
File: core/src/main/java/apoc/util/FileUtils.java
Repository: neo4j-contrib/neo4j-apoc-procedures
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-23532
|
MEDIUM
| 6.5
|
neo4j-contrib/neo4j-apoc-procedures
|
inputStreamFor
|
core/src/main/java/apoc/util/FileUtils.java
|
01e63ed2d187cd2a8aa1d78bf831ef0fdd69b522
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
return inflater.inflate(R.layout.choose_lock_password, container, false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onCreateView
File: src/com/android/settings/password/ChooseLockPassword.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40117
|
HIGH
| 7.8
|
android
|
onCreateView
|
src/com/android/settings/password/ChooseLockPassword.java
|
11815817de2f2d70fe842b108356a1bc75d44ffb
| 0
|
Analyze the following code function for security vulnerabilities
|
public HttpRequest query(final String name, final String value) {
query.add(name, value);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: query
File: src/main/java/jodd/http/HttpRequest.java
Repository: oblac/jodd-http
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2022-29631
|
MEDIUM
| 5
|
oblac/jodd-http
|
query
|
src/main/java/jodd/http/HttpRequest.java
|
e50f573c8f6a39212ade68c6eb1256b2889fa8a6
| 0
|
Analyze the following code function for security vulnerabilities
|
private static Set<String> newSetWithUniqueCheck(String[] strings) {
final Set<String> ret = Sets.newArraySet(strings);
// Make sure there's no overlap.
Preconditions.checkState(ret.size() == strings.length);
return ret;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: newSetWithUniqueCheck
File: services/core/java/com/android/server/pm/UserRestrictionsUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3876
|
HIGH
| 7.2
|
android
|
newSetWithUniqueCheck
|
services/core/java/com/android/server/pm/UserRestrictionsUtils.java
|
91fc934bb2e5ea59929bb2f574de6db9b5100745
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public long getLastSecurityLogRetrievalTime() {
final CallerIdentity caller = getCallerIdentity();
Preconditions.checkCallAuthorization(
isDefaultDeviceOwner(caller) || canManageUsers(caller));
return getUserData(UserHandle.USER_SYSTEM).mLastSecurityLogRetrievalTime;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLastSecurityLogRetrievalTime
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
|
getLastSecurityLogRetrievalTime
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated(since = "4.3M2")
public XWikiDocument getTranslatedDocument(String language, XWikiContext context) throws XWikiException
{
return getTranslatedDocument(LocaleUtils.toLocale(language, Locale.ROOT), context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTranslatedDocument
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2023-29523
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
getTranslatedDocument
|
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 boolean getRemoveWithTaskOranizer() {
return mRemoveWithTaskOrganizer;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRemoveWithTaskOranizer
File: core/java/android/app/ActivityOptions.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-20918
|
CRITICAL
| 9.8
|
android
|
getRemoveWithTaskOranizer
|
core/java/android/app/ActivityOptions.java
|
51051de4eb40bb502db448084a83fd6cbfb7d3cf
| 0
|
Analyze the following code function for security vulnerabilities
|
public abstract BaseXMLBuilder element(String name, String namespaceURI);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: element
File: src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
Repository: jmurty/java-xmlbuilder
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2014-125087
|
MEDIUM
| 5.2
|
jmurty/java-xmlbuilder
|
element
|
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
|
e6fddca201790abab4f2c274341c0bb8835c3e73
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("unchecked")
private void highlightMap(Map<String, Object> options, Map<String, Object> map, int width, int depth) {
int maxrows = (int) options.get(Printer.MAXROWS);
int max = map.keySet().stream()
.map(String::length)
.max(Integer::compareTo)
.get();
if (max > (int) options.getOrDefault(Printer.MAX_COLUMN_WIDTH, Integer.MAX_VALUE)) {
max = (int) options.get(Printer.MAX_COLUMN_WIDTH);
}
Map<String, Object> mapOptions = new HashMap<>(options);
mapOptions.remove(Printer.MAX_COLUMN_WIDTH);
int indent = (int) options.get(Printer.INDENTION);
int maxDepth = (int) options.get(Printer.MAX_DEPTH);
for (Map.Entry<String, Object> entry : map.entrySet()) {
if (depth == 0
&& options.containsKey(Printer.COLUMNS)
&& !((List<String>) options.get(Printer.COLUMNS)).contains(entry.getKey())) {
continue;
}
AttributedStringBuilder asb =
new AttributedStringBuilder().tabs(Arrays.asList(0, depth * indent, depth * indent + max + 1));
if (depth != 0) {
asb.append("\t");
}
asb.styled(prntStyle.resolve(".mk"), truncateValue(max, entry.getKey()));
Object elem = entry.getValue();
boolean convert = canConvert(elem);
boolean highlightValue = true;
if (depth < maxDepth && !options.containsKey(Printer.TO_STRING)) {
if (elem instanceof Map || convert) {
Map<String, Object> childMap =
convert ? objectToMap(options, elem) : keysToString((Map<Object, Object>) elem);
if (!childMap.isEmpty()) {
println(asb.columnSubSequence(0, width), maxrows);
highlightMap(options, childMap, width, depth + 1);
highlightValue = false;
}
} else if (collectionObject(elem)) {
List<Object> collection = objectToList(elem);
if (!collection.isEmpty()) {
println(asb.columnSubSequence(0, width), maxrows);
Map<String, Object> listOptions = new HashMap<>(options);
listOptions.put(Printer.TO_STRING, true);
highlightList(listOptions, collection, width, depth + 1);
highlightValue = false;
}
}
}
if (highlightValue) {
AttributedString val = highlightMapValue(mapOptions, entry.getKey(), map);
asb.append("\t");
if (map.size() == 1) {
if (val.contains('\n')) {
for (String v : val.toString().split("\\r?\\n")) {
asb.append(highlightValue(options, entry.getKey(), v));
println(asb.columnSubSequence(0, width), maxrows);
asb = new AttributedStringBuilder().tabs(Arrays.asList(0, max + 1));
}
} else {
asb.append(val);
println(asb.columnSubSequence(0, width), maxrows);
}
} else {
if (val.contains('\n')) {
val = new AttributedString(
Arrays.asList(val.toString().split("\\r?\\n")).toString());
asb.append(highlightValue(options, entry.getKey(), val.toString()));
} else {
asb.append(val);
}
println(asb.columnSubSequence(0, width), maxrows);
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: highlightMap
File: console/src/main/java/org/jline/console/impl/DefaultPrinter.java
Repository: jline/jline3
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-50572
|
MEDIUM
| 5.5
|
jline/jline3
|
highlightMap
|
console/src/main/java/org/jline/console/impl/DefaultPrinter.java
|
f3c60a3e6255e8e0c20d5043a4fe248446f292bb
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void testDeserializationAsFloatEdgeCase11() throws Exception
{
String input = "-1e-10000000";
Duration value = READER.without(DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS)
.readValue(input);
assertEquals(0, value.getSeconds());
}
|
Vulnerability Classification:
- CWE: CWE-20
- CVE: CVE-2018-1000873
- Severity: MEDIUM
- CVSS Score: 4.3
Description: Avoid latency problems converting decimal to time.
Fixes https://github.com/FasterXML/jackson-databind/issues/2141
Function: testDeserializationAsFloatEdgeCase11
File: datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestDurationDeserialization.java
Repository: FasterXML/jackson-modules-java8
Fixed Code:
@Test(timeout = 100)
public void testDeserializationAsFloatEdgeCase11() throws Exception
{
String input = "-1e-10000000";
Duration value = READER.without(DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS)
.readValue(input);
assertEquals(0, value.getSeconds());
}
|
[
"CWE-20"
] |
CVE-2018-1000873
|
MEDIUM
| 4.3
|
FasterXML/jackson-modules-java8
|
testDeserializationAsFloatEdgeCase11
|
datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestDurationDeserialization.java
|
ba27ce5909dfb49bcaf753ad3e04ecb980010b0b
| 1
|
Analyze the following code function for security vulnerabilities
|
private void handleRankingSort() {
synchronized (mNotificationList) {
final int N = mNotificationList.size();
ArrayList<String> orderBefore = new ArrayList<String>(N);
ArrayList<String> groupOverrideBefore = new ArrayList<>(N);
int[] visibilities = new int[N];
int[] importances = new int[N];
for (int i = 0; i < N; i++) {
final NotificationRecord r = mNotificationList.get(i);
orderBefore.add(r.getKey());
groupOverrideBefore.add(r.sbn.getGroupKey());
visibilities[i] = r.getPackageVisibilityOverride();
importances[i] = r.getImportance();
mRankingHelper.extractSignals(r);
}
mRankingHelper.sort(mNotificationList);
for (int i = 0; i < N; i++) {
final NotificationRecord r = mNotificationList.get(i);
if (!orderBefore.get(i).equals(r.getKey())
|| visibilities[i] != r.getPackageVisibilityOverride()
|| importances[i] != r.getImportance()
|| !groupOverrideBefore.get(i).equals(r.sbn.getGroupKey())) {
scheduleSendRankingUpdate();
return;
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleRankingSort
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
|
handleRankingSort
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
private void buildAssistBundleLocked(PendingAssistExtras pae, Bundle result) {
if (result != null) {
pae.extras.putBundle(Intent.EXTRA_ASSIST_CONTEXT, result);
}
if (pae.hint != null) {
pae.extras.putBoolean(pae.hint, true);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: buildAssistBundleLocked
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
|
buildAssistBundleLocked
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setIssuedOn(Date issuedOn) {
this.issuedOn = issuedOn;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setIssuedOn
File: base/common/src/main/java/com/netscape/certsrv/cert/CertDataInfo.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
setIssuedOn
|
base/common/src/main/java/com/netscape/certsrv/cert/CertDataInfo.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getURLToLoginAsSuperAdmin()
{
return getURLToLoginAs(SUPER_ADMIN_CREDENTIALS.getUserName(), SUPER_ADMIN_CREDENTIALS.getPassword());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getURLToLoginAsSuperAdmin
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
|
getURLToLoginAsSuperAdmin
|
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 boolean loadFromStore() {
// If the user unlock comes in before we load from store, which means the user store have
// not been setup yet for the current user. Setup the user store before the read so that
// configurations for the current user will also being loaded.
if (mDeferredUserUnlockRead) {
Log.i(TAG, "Handling user unlock before loading from store.");
List<WifiConfigStore.StoreFile> userStoreFiles =
WifiConfigStore.createUserFiles(
mCurrentUserId, mFrameworkFacade.isNiapModeOn(mContext));
if (userStoreFiles == null) {
Log.wtf(TAG, "Failed to create user store files");
return false;
}
mWifiConfigStore.setUserStores(userStoreFiles);
mDeferredUserUnlockRead = false;
}
try {
mWifiConfigStore.read();
} catch (IOException | IllegalStateException e) {
Log.wtf(TAG, "Reading from new store failed. All saved networks are lost!", e);
return handleConfigStoreFailure(false);
} catch (XmlPullParserException e) {
Log.wtf(TAG, "XML deserialization of store failed. All saved networks are lost!", e);
return handleConfigStoreFailure(false);
}
loadInternalData(mNetworkListSharedStoreData.getConfigurations(),
mNetworkListUserStoreData.getConfigurations(),
mRandomizedMacStoreData.getMacMapping());
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: loadFromStore
File: service/java/com/android/server/wifi/WifiConfigManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
loadFromStore
|
service/java/com/android/server/wifi/WifiConfigManager.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String toCamelCase(String s) {
StringBuffer sb = new StringBuffer();
String[] words = s.replaceAll("[^A-Za-z]", " ").replaceAll("\\s+", " ").trim().split(" ");
for (int i = 0; i < words.length; i++) {
if (i == 0)
words[i] = words[i].toLowerCase();
else
words[i] = String.valueOf(words[i].charAt(0)).toUpperCase() + words[i].substring(1);
sb.append(words[i]);
}
return sb.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toCamelCase
File: api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java
Repository: openmrs/openmrs-module-htmlformentry
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-16521
|
HIGH
| 7.5
|
openmrs/openmrs-module-htmlformentry
|
toCamelCase
|
api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java
|
9dcd304688e65c31cac5532fe501b9816ed975ae
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void navigationEntryCommitted() {
// If a navigation is committed (e.g. from in-page redirect), the data we're showing
// is stale so dismiss the dialog.
mDialog.dismiss();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: navigationEntryCommitted
File: chrome/android/java/src/org/chromium/chrome/browser/WebsiteSettingsPopup.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2015-1261
|
MEDIUM
| 5
|
chromium
|
navigationEntryCommitted
|
chrome/android/java/src/org/chromium/chrome/browser/WebsiteSettingsPopup.java
|
5bf8a2dccf4777c5f065d918d1d9a2bbaa013f9f
| 0
|
Analyze the following code function for security vulnerabilities
|
private int getGroupParentLocked(int userId) {
// Most frequent use case.
if (userId == UserHandle.USER_SYSTEM) {
return userId;
}
// We are in the same process with the user manager and the returned
// user info is a cached instance, so just look up instead of cache.
final long identity = Binder.clearCallingIdentity();
try {
// Just a lookup and not reentrant, so holding a lock is fine.
UserInfo userInfo = mUserManager.getProfileParent(userId);
return (userInfo != null) ? userInfo.id : userId;
} finally {
Binder.restoreCallingIdentity(identity);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getGroupParentLocked
File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3876
|
HIGH
| 7.2
|
android
|
getGroupParentLocked
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
91fc934bb2e5ea59929bb2f574de6db9b5100745
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable
private ActiveAdmin getActiveAdminWithPolicyForUidLocked(ComponentName who, int reqPolicy,
int uid) {
ensureLocked();
// Try to find an admin which can use reqPolicy
final int userId = UserHandle.getUserId(uid);
final DevicePolicyData policy = getUserData(userId);
if (who != null) {
ActiveAdmin admin = policy.mAdminMap.get(who);
if (admin == null) {
throw new SecurityException("No active admin " + who);
}
if (admin.getUid() != uid) {
throw new SecurityException("Admin " + who + " is not owned by uid " + uid);
}
if (isActiveAdminWithPolicyForUserLocked(admin, reqPolicy, userId)) {
return admin;
}
} else {
for (ActiveAdmin admin : policy.mAdminList) {
if (admin.getUid() == uid && isActiveAdminWithPolicyForUserLocked(admin, reqPolicy,
userId)) {
return admin;
}
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getActiveAdminWithPolicyForUidLocked
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
|
getActiveAdminWithPolicyForUidLocked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void removeStacksWithActivityTypes(int[] activityTypes) {
enforceCallerIsRecentsOrHasPermission(MANAGE_ACTIVITY_STACKS,
"removeStacksWithActivityTypes()");
synchronized (this) {
final long ident = Binder.clearCallingIdentity();
try {
mStackSupervisor.removeStacksWithActivityTypes(activityTypes);
} finally {
Binder.restoreCallingIdentity(ident);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeStacksWithActivityTypes
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2018-9492
|
HIGH
| 7.2
|
android
|
removeStacksWithActivityTypes
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int startVoiceActivity(String callingPackage, int callingPid, int callingUid,
Intent intent, String resolvedType, IVoiceInteractionSession session,
IVoiceInteractor interactor, int startFlags, ProfilerInfo profilerInfo,
Bundle bOptions, int userId) {
enforceCallingPermission(BIND_VOICE_INTERACTION, "startVoiceActivity()");
if (session == null || interactor == null) {
throw new NullPointerException("null session or interactor");
}
userId = mUserController.handleIncomingUser(callingPid, callingUid, userId, false,
ALLOW_FULL_ONLY, "startVoiceActivity", null);
// TODO: Switch to user app stacks here.
return mActivityStartController.obtainStarter(intent, "startVoiceActivity")
.setCallingUid(callingUid)
.setCallingPackage(callingPackage)
.setResolvedType(resolvedType)
.setVoiceSession(session)
.setVoiceInteractor(interactor)
.setStartFlags(startFlags)
.setProfilerInfo(profilerInfo)
.setActivityOptions(bOptions)
.setMayWait(userId)
.execute();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startVoiceActivity
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2018-9492
|
HIGH
| 7.2
|
android
|
startVoiceActivity
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public final void removeHandler(MessageHandler handler) {
Map<Class<?>, Boolean> types = ClassUtils.getHandlerTypes(handler.getClass());
for (Entry<Class<?>, Boolean> e : types.entrySet()) {
Class<?> type = e.getKey();
List<HandlerWrapper> handlerWrappers = createHandlerWrappers(type, handler, e.getValue());
for(HandlerWrapper handlerWrapper : handlerWrappers) {
FrameType frameType = handlerWrapper.getFrameType();
HandlerWrapper wrapper = handlers.get(frameType);
if (wrapper != null && wrapper.getMessageType() == type) {
handlers.remove(frameType, wrapper);
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeHandler
File: websockets-jsr/src/main/java/io/undertow/websockets/jsr/FrameHandler.java
Repository: undertow-io/undertow
The code follows secure coding practices.
|
[
"CWE-401"
] |
CVE-2021-3690
|
HIGH
| 7.5
|
undertow-io/undertow
|
removeHandler
|
websockets-jsr/src/main/java/io/undertow/websockets/jsr/FrameHandler.java
|
c7e84a0b7efced38506d7d1dfea5902366973877
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void clearFiles() {
// This is only used for testing
workUnitList.clear();
oldestFileModificationTime = Long.MAX_VALUE;
youngestFileModificationTime = Long.MIN_VALUE;
totalFileSize = 0L;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearFiles
File: src/main/java/emissary/pickup/WorkBundle.java
Repository: NationalSecurityAgency/emissary
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2021-32634
|
MEDIUM
| 6.5
|
NationalSecurityAgency/emissary
|
clearFiles
|
src/main/java/emissary/pickup/WorkBundle.java
|
40260b1ec1f76cc92361702cc14fa1e4388e19d7
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean isLockTaskModeViolation(TaskRecord task, boolean isNewClearTask) {
if (getLockedTaskLocked() == task && !isNewClearTask) {
return false;
}
final int lockTaskAuth = task.mLockTaskAuth;
switch (lockTaskAuth) {
case LOCK_TASK_AUTH_DONT_LOCK:
return !mLockTaskModeTasks.isEmpty();
case LOCK_TASK_AUTH_LAUNCHABLE_PRIV:
case LOCK_TASK_AUTH_LAUNCHABLE:
case LOCK_TASK_AUTH_WHITELISTED:
return false;
case LOCK_TASK_AUTH_PINNABLE:
// Pinnable tasks can't be launched on top of locktask tasks.
return !mLockTaskModeTasks.isEmpty();
default:
Slog.w(TAG, "isLockTaskModeViolation: invalid lockTaskAuth value=" + lockTaskAuth);
return true;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isLockTaskModeViolation
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
|
isLockTaskModeViolation
|
services/core/java/com/android/server/am/ActivityStackSupervisor.java
|
468651c86a8adb7aa56c708d2348e99022088af3
| 0
|
Analyze the following code function for security vulnerabilities
|
public synchronized int rewriteRecursive(File dir, TaskListener listener) throws InvalidKeyException {
return rewriteRecursive(dir,"",listener);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: rewriteRecursive
File: core/src/main/java/hudson/util/SecretRewriter.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-326"
] |
CVE-2017-2598
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
rewriteRecursive
|
core/src/main/java/hudson/util/SecretRewriter.java
|
e6aa166246d1734f4798a9e31f78842f4c85c28b
| 0
|
Analyze the following code function for security vulnerabilities
|
default ZonedDateTime getDate(CharSequence name) {
return findDate(name).orElse(null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDate
File: http/src/main/java/io/micronaut/http/HttpHeaders.java
Repository: micronaut-projects/micronaut-core
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-21700
|
MEDIUM
| 5
|
micronaut-projects/micronaut-core
|
getDate
|
http/src/main/java/io/micronaut/http/HttpHeaders.java
|
b8ec32c311689667c69ae7d9f9c3b3a8abc96fe3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public CharSequence getDeviceOwnerLockScreenInfo() {
return mLockPatternUtils.getDeviceOwnerInfo();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDeviceOwnerLockScreenInfo
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
|
getDeviceOwnerLockScreenInfo
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void exit() {
mWifiConnectivityManager.handleConnectionStateChanged(
mClientModeManager,
WifiConnectivityManager.WIFI_STATE_TRANSITIONING);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: exit
File: service/java/com/android/server/wifi/ClientModeImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
exit
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
private static boolean methodsSupportSameArgs(Method getter, Method setter) {
if (getter != null && setter != null && setter.getParameterTypes() != null && setter.getParameterTypes().length == 1
&& getter.getReturnType() != null && getter.getReturnType().equals(setter.getParameterTypes()[0]))
return true;
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: methodsSupportSameArgs
File: api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java
Repository: openmrs/openmrs-module-htmlformentry
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-16521
|
HIGH
| 7.5
|
openmrs/openmrs-module-htmlformentry
|
methodsSupportSameArgs
|
api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java
|
9dcd304688e65c31cac5532fe501b9816ed975ae
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void checkSupportedKeySize(int keySize) throws InvalidKeyException {
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkSupportedKeySize
File: src/main/java/org/conscrypt/OpenSSLCipher.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2461
|
HIGH
| 7.6
|
android
|
checkSupportedKeySize
|
src/main/java/org/conscrypt/OpenSSLCipher.java
|
1638945d4ed9403790962ec7abed1b7a232a9ff8
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setAlwaysFinish(boolean enabled) throws RemoteException
{
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeInt(enabled ? 1 : 0);
mRemote.transact(SET_ALWAYS_FINISH_TRANSACTION, data, reply, 0);
reply.readException();
data.recycle();
reply.recycle();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAlwaysFinish
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
setAlwaysFinish
|
core/java/android/app/ActivityManagerNative.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setSeparateProfileChallengeEnabled(int userId, boolean enabled,
String managedUserPassword) throws RemoteException {
checkWritePermission(userId);
synchronized (mSeparateChallengeLock) {
setBoolean(SEPARATE_PROFILE_CHALLENGE_KEY, enabled, userId);
if (enabled) {
mStorage.removeChildProfileLock(userId);
removeKeystoreProfileKey(userId);
} else {
tieManagedProfileLockIfNecessary(userId, managedUserPassword);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSeparateProfileChallengeEnabled
File: services/core/java/com/android/server/LockSettingsService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3908
|
MEDIUM
| 4.3
|
android
|
setSeparateProfileChallengeEnabled
|
services/core/java/com/android/server/LockSettingsService.java
|
96daf7d4893f614714761af2d53dfb93214a32e4
| 0
|
Analyze the following code function for security vulnerabilities
|
private static long jmsExpiration(String rmqExpiration, Date da) {
if (null == da) da = new Date(); // assume now -- wrong nearly always
if (null == rmqExpiration)
return (0L);
try {
return da.getTime() + Long.valueOf(rmqExpiration);
} catch (NumberFormatException e) { // ignore it if conversion problems */ }
return (0L);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: jmsExpiration
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
|
jmsExpiration
|
src/main/java/com/rabbitmq/jms/client/RMQMessage.java
|
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String getEventGroupItemSqlSS(String studyIds, String sedIds, String itemIds, String dateConstraint, int datasetItemStatusId,
String studySubjectIds) {
String ecStatusConstraint = this.getECStatusConstraint(datasetItemStatusId);
String itStatusConstraint = this.getItemDataStatusConstraint(datasetItemStatusId);
return "select cvidata.event_crf_id, ig.item_group_id, ig.oc_oid as item_group_oid, ig.name as item_group_name,"
+ " cvidata.item_id, cvidata.item_oid, cvidata.item_data_ordinal, cvidata.value, cvidata.item_data_type_id, cvidata.item_data_id"
+ " from (select ec.event_crf_id, ec.crf_version_id, item.item_id, item.oc_oid as item_oid,"
+ " idata.ordinal as item_data_ordinal, idata.value as value, item.item_data_type_id, idata.item_data_id as item_data_id from item,"
+ " (select event_crf_id, item_id, ordinal, value, item_data_id from item_data where (status_id "
+ itStatusConstraint
+ ")"
+ " and event_crf_id in (select distinct event_crf_id from event_crf where study_subject_id in (select distinct"
+ " ss.study_subject_id from study_subject ss where ss.study_subject_id in ("
+ studySubjectIds
+ ") "
+ dateConstraint
+ ") and study_event_id"
+ " in (select distinct study_event_id from study_event"
+ " where study_event_definition_id in "
+ sedIds
+ " and study_subject_id in ("
+ " select distinct ss.study_subject_id from study_subject ss where ss.study_subject_id in ("
+ studySubjectIds
+ ") "
+ dateConstraint
+ "))))idata,"
+ " (select event_crf_id, crf_version_id from event_crf where status_id "
+ ecStatusConstraint
+ ")ec"
+ " where item.item_id in "
+ itemIds
+ " and length(idata.value) > 0 and item.item_id = idata.item_id and idata.event_crf_id = ec.event_crf_id"
+ " order by ec.event_crf_id, ec.crf_version_id, item.item_id, idata.ordinal) cvidata, item_group_metadata igm,"
+ " item_group ig where cvidata.crf_version_id = igm.crf_version_id and cvidata.item_id = igm.item_id"
+ " and igm.item_group_id = ig.item_group_id order by cvidata.event_crf_id, ig.item_group_id, cvidata.item_id, cvidata.item_data_ordinal";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getEventGroupItemSqlSS
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
|
getEventGroupItemSqlSS
|
core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
|
b152cc63019230c9973965a98e4386ea5322c18f
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String[] createCmdArray(String[] shell, String cOption, String commandLine) {
boolean startsWithShell = false;
for (String sh : shell) {
if (commandLine.startsWith(sh + " ")) {
startsWithShell = true;
break;
}
}
if (!startsWithShell) {
return new String[] { shell[0], cOption, commandLine };
} else {
logger.debug("Splitting by spaces");
try {
return commandLine.split(" ");
} catch (PatternSyntaxException e) {
logger.warn("An exception occurred while splitting '{}' : '{}'", commandLine, e.getMessage());
updateState(RUN, OnOffType.OFF);
updateState(OUTPUT, new StringType(e.getMessage()));
return new String[] {};
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createCmdArray
File: bundles/org.openhab.binding.exec/src/main/java/org/openhab/binding/exec/internal/handler/ExecHandler.java
Repository: openhab/openhab-addons
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2020-5242
|
HIGH
| 9.3
|
openhab/openhab-addons
|
createCmdArray
|
bundles/org.openhab.binding.exec/src/main/java/org/openhab/binding/exec/internal/handler/ExecHandler.java
|
4c4cb664f2e2c3866aadf117d22fb54aa8dd0031
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isSelfManagedConnectionService(PhoneAccountHandle phoneAccountHandle) {
if (phoneAccountHandle != null) {
PhoneAccount phoneAccount = mPhoneAccountRegistrar.getPhoneAccountUnchecked(
phoneAccountHandle);
return phoneAccount != null && phoneAccount.isSelfManaged();
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isSelfManagedConnectionService
File: src/com/android/server/telecom/TelecomServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21394
|
MEDIUM
| 5.5
|
android
|
isSelfManagedConnectionService
|
src/com/android/server/telecom/TelecomServiceImpl.java
|
68dca62035c49e14ad26a54f614199cb29a3393f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public ParcelFileDescriptor getShortcutIconFd(int launcherUserId,
@NonNull String callingPackage, @NonNull String packageName,
@NonNull String shortcutId, int userId) {
Objects.requireNonNull(callingPackage, "callingPackage");
Objects.requireNonNull(packageName, "packageName");
Objects.requireNonNull(shortcutId, "shortcutId");
synchronized (mLock) {
throwIfUserLockedL(userId);
throwIfUserLockedL(launcherUserId);
getLauncherShortcutsLocked(callingPackage, userId, launcherUserId)
.attemptToRestoreIfNeededAndSave();
final ShortcutPackage p = getUserShortcutsLocked(userId)
.getPackageShortcutsIfExists(packageName);
if (p == null) {
return null;
}
final ShortcutInfo shortcutInfo = p.findShortcutById(shortcutId);
if (shortcutInfo == null) {
return null;
}
return getShortcutIconParcelFileDescriptor(p, shortcutInfo);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getShortcutIconFd
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
|
getShortcutIconFd
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
public Date getResourceLastModificationDate(String name)
{
try {
if (getEngineContext() != null) {
return Util.getFileLastModificationDate(getEngineContext().getRealPath(name));
}
} catch (Exception ex) {
// Probably a SecurityException or the file is not accessible (inside a war)
LOGGER.info("Failed to get file modification date: " + ex.getMessage());
}
return new Date();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getResourceLastModificationDate
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
|
getResourceLastModificationDate
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void engineInit(AlgorithmParameterSpec paramSpec)
throws InvalidParameterSpecException
{
if (GcmSpecUtil.isGcmSpec(paramSpec))
{
ccmParams = CCMParameters.getInstance(GcmSpecUtil.extractGcmParameters(paramSpec));
}
else if (paramSpec instanceof AEADParameterSpec)
{
ccmParams = new CCMParameters(((AEADParameterSpec)paramSpec).getNonce(), ((AEADParameterSpec)paramSpec).getMacSizeInBits() / 8);
}
else
{
throw new InvalidParameterSpecException("AlgorithmParameterSpec class not recognized: " + paramSpec.getClass().getName());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: engineInit
File: prov/src/main/java/org/bouncycastle/jcajce/provider/symmetric/AES.java
Repository: bcgit/bc-java
The code follows secure coding practices.
|
[
"CWE-310"
] |
CVE-2016-1000339
|
MEDIUM
| 5
|
bcgit/bc-java
|
engineInit
|
prov/src/main/java/org/bouncycastle/jcajce/provider/symmetric/AES.java
|
413b42f4d770456508585c830cfcde95f9b0e93b
| 0
|
Analyze the following code function for security vulnerabilities
|
private void execJSSafe(final WebView web, final String js) {
if (useJSDispatchThread()) {
runOnJSDispatchThread(new Runnable() {
public void run() {
getActivity().runOnUiThread(new Runnable() {
public void run() {
execJSUnsafe(web, js);
}
});
}
});
} else {
getActivity().runOnUiThread(new Runnable() {
public void run() {
execJSUnsafe(web, js);
}
});
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: execJSSafe
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
|
execJSSafe
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public void toWriter(boolean wholeDocument, Writer writer, Properties outputProperties)
throws TransformerException {
StreamResult streamResult = new StreamResult(writer);
DOMSource domSource = null;
if (wholeDocument) {
domSource = new DOMSource(getDocument());
} else {
domSource = new DOMSource(getElement());
}
TransformerFactory tf = TransformerFactory.newInstance();
Transformer serializer = tf.newTransformer();
if (outputProperties != null) {
for (Entry<Object, Object> entry: outputProperties.entrySet()) {
serializer.setOutputProperty(
(String) entry.getKey(),
(String) entry.getValue());
}
}
serializer.transform(domSource, streamResult);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toWriter
File: src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
Repository: jmurty/java-xmlbuilder
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2014-125087
|
MEDIUM
| 5.2
|
jmurty/java-xmlbuilder
|
toWriter
|
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
|
e6fddca201790abab4f2c274341c0bb8835c3e73
| 0
|
Analyze the following code function for security vulnerabilities
|
void dumpAppRestrictionController(ProtoOutputStream proto, int uid) {
mAppRestrictionController.dumpAsProto(proto, uid);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpAppRestrictionController
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
|
dumpAppRestrictionController
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequestMapping(params = "action=" + ACTION_UPLOAD_SCRAW)
@ResponseBody
public Map<String, Object> uploadScraw(@RequestAttribute SysSite site, @SessionAttribute SysUser admin, String file,
HttpServletRequest request, HttpSession session) {
if (CommonUtils.notEmpty(file)) {
byte[] data = VerificationUtils.base64Decode(file);
String fileName = CmsFileUtils.getUploadFileName(SCRAW_TYPE);
String filePath = siteComponent.getWebFilePath(site, fileName);
try {
CmsFileUtils.writeByteArrayToFile(filePath, data);
FileSize fileSize = CmsFileUtils.getFileSize(filePath, SCRAW_TYPE);
logUploadService.save(new LogUpload(site.getId(), admin.getId(), LogLoginService.CHANNEL_WEB_MANAGER,
CommonConstants.BLANK, CmsFileUtils.FILE_TYPE_IMAGE, data.length, fileSize.getWidth(),
fileSize.getHeight(), RequestUtils.getIpAddress(request), CommonUtils.getDate(), fileName));
Map<String, Object> map = getResultMap(true);
map.put("size", data.length);
map.put("title", fileName);
map.put("url", fileName);
map.put("type", SCRAW_TYPE);
map.put("original", "scraw" + SCRAW_TYPE);
return map;
} catch (IllegalStateException | IOException e) {
log.error(e.getMessage(), e);
return getResultMap(false);
}
}
return getResultMap(false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: uploadScraw
File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/controller/admin/sys/UeditorAdminController.java
Repository: sanluan/PublicCMS
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2021-27693
|
CRITICAL
| 9.8
|
sanluan/PublicCMS
|
uploadScraw
|
publiccms-parent/publiccms-core/src/main/java/com/publiccms/controller/admin/sys/UeditorAdminController.java
|
0f4c4872914b6a71305e121a7d9a19c07cde0338
| 0
|
Analyze the following code function for security vulnerabilities
|
public Object getWikiNode()
{
return this.wikiNode;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getWikiNode
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
|
getWikiNode
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
public void initAnnotationMap() throws Exception {
String sql = "SELECT * "
+ "FROM annotation_v2 "
+ "WHERE variant_id = " + id + " "
+ "ORDER BY igm_rank,"
// when igm_rank is the same, the data sort by "Canonical" = "YES"
+ "case when canonical is null then 1 else 0 end,canonical;";
ResultSet rset = DBManager.executeQuery(sql);
while (rset.next()) {
Annotation anno = new Annotation(rset);
if (annotation == null) {
annotation = anno; // the most damaging one
}
if (!geneAnnotationMap.containsKey(anno.getGeneName())) {
geneAnnotationMap.put(anno.getGeneName(), new ArrayList<Annotation>());
}
geneAnnotationMap.get(anno.getGeneName()).add(anno);
}
rset.close();
}
|
Vulnerability Classification:
- CWE: CWE-89
- CVE: CVE-2016-15021
- Severity: MEDIUM
- CVSS Score: 5.2
Description: fixed sql injection vulnerability
Function: initAnnotationMap
File: src/main/java/object/Variant.java
Repository: nickzren/alsdb
Fixed Code:
public void initAnnotationMap() throws Exception {
String sql = "SELECT * "
+ "FROM annotation_v2 "
+ "WHERE variant_id = ? "
+ "ORDER BY igm_rank,"
// when igm_rank is the same, the data sort by "Canonical" = "YES"
+ "case when canonical is null then 1 else 0 end,canonical;";
PreparedStatement stmt = DBManager.prepareStatement(sql);
stmt.setInt(1, id);
ResultSet rset = stmt.executeQuery();
while (rset.next()) {
Annotation anno = new Annotation(rset);
if (annotation == null) {
annotation = anno; // the most damaging one
}
if (!geneAnnotationMap.containsKey(anno.getGeneName())) {
geneAnnotationMap.put(anno.getGeneName(), new ArrayList<Annotation>());
}
geneAnnotationMap.get(anno.getGeneName()).add(anno);
}
rset.close();
}
|
[
"CWE-89"
] |
CVE-2016-15021
|
MEDIUM
| 5.2
|
nickzren/alsdb
|
initAnnotationMap
|
src/main/java/object/Variant.java
|
cbc79a68145e845f951113d184b4de207c341599
| 1
|
Analyze the following code function for security vulnerabilities
|
void TokenLexicalActions(Token matchedToken)
{
switch(jjmatchedKind)
{
case 2 :
image.append(jjstrLiteralImages[2]);
lengthOfMatch = jjstrLiteralImages[2].length();
stack.push(DEFAULT);
break;
case 3 :
image.append(jjstrLiteralImages[3]);
lengthOfMatch = jjstrLiteralImages[3].length();
stack.push(DEFAULT);
break;
case 9 :
image.append(jjstrLiteralImages[9]);
lengthOfMatch = jjstrLiteralImages[9].length();
stack.push(curLexState);
break;
case 10 :
image.append(jjstrLiteralImages[10]);
lengthOfMatch = jjstrLiteralImages[10].length();
SwitchTo(stack.pop());
break;
default :
break;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: TokenLexicalActions
File: impl/src/main/java/com/sun/el/parser/ELParserTokenManager.java
Repository: jakartaee/expression-language
The code follows secure coding practices.
|
[
"CWE-917"
] |
CVE-2021-28170
|
MEDIUM
| 5
|
jakartaee/expression-language
|
TokenLexicalActions
|
impl/src/main/java/com/sun/el/parser/ELParserTokenManager.java
|
b6a3943ac5fba71cbc6719f092e319caa747855b
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String getEndElementName(EndElement endElement) {
return trim(endElement.getName().getLocalPart());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getEndElementName
File: saml-core/src/main/java/org/keycloak/saml/common/util/StaxParserUtil.java
Repository: keycloak
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2017-2582
|
MEDIUM
| 4
|
keycloak
|
getEndElementName
|
saml-core/src/main/java/org/keycloak/saml/common/util/StaxParserUtil.java
|
0cb5ba0f6e83162d221681f47b470c3042eef237
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
boolean check(NetworkConfig c1, NetworkConfig c2) {
return c1 == c2 || !(c1 == null || c2 == null)
&& nullSafeEqual(c1.getPort(), c2.getPort())
&& nullSafeEqual(c1.getPortCount(), c2.getPortCount())
&& nullSafeEqual(c1.isPortAutoIncrement(), c2.isPortAutoIncrement())
&& nullSafeEqual(c1.isReuseAddress(), c2.isReuseAddress())
&& nullSafeEqual(c1.getPublicAddress(), c2.getPublicAddress())
&& isCompatible(c1.getOutboundPortDefinitions(), c2.getOutboundPortDefinitions())
&& nullSafeEqual(c1.getOutboundPorts(), c2.getOutboundPorts())
&& isCompatible(c1.getInterfaces(), c2.getInterfaces())
&& isCompatible(c1.getJoin(), c2.getJoin())
&& isCompatible(c1.getSymmetricEncryptionConfig(), c2.getSymmetricEncryptionConfig())
&& isCompatible(c1.getSocketInterceptorConfig(), c2.getSocketInterceptorConfig())
&& isCompatible(c1.getSSLConfig(), c2.getSSLConfig());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: check
File: hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
check
|
hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
public abstract void reload() throws IOException, FileNotFoundException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: reload
File: opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
Repository: OpenNMS/opennms
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2021-25931
|
MEDIUM
| 6.8
|
OpenNMS/opennms
|
reload
|
opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
|
607151ea8f90212a3fb37c977fa57c7d58d26a84
| 0
|
Analyze the following code function for security vulnerabilities
|
private void updateURL() {
try {
host = StringUtils.toLowerEnglish(NetUtils.getLocalAddress());
StringBuilder builder = new StringBuilder(ssl ? "https" : "http").append("://")
.append(host).append(':').append(port);
if (key != null && serverSocket != null) {
builder.append("?key=").append(key);
}
url = builder.toString();
} catch (NoClassDefFoundError e) {
// Google App Engine does not allow java.net.InetAddress
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateURL
File: h2/src/main/org/h2/server/web/WebServer.java
Repository: h2database
The code follows secure coding practices.
|
[
"CWE-312"
] |
CVE-2022-45868
|
HIGH
| 7.8
|
h2database
|
updateURL
|
h2/src/main/org/h2/server/web/WebServer.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 0
|
Analyze the following code function for security vulnerabilities
|
public void writeString(String str) throws TException {
byte[] dat = str.getBytes(StandardCharsets.UTF_8);
writeI32(dat.length);
trans_.write(dat, 0, dat.length);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeString
File: thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TBinaryProtocol.java
Repository: facebook/fbthrift
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2019-11938
|
MEDIUM
| 5
|
facebook/fbthrift
|
writeString
|
thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TBinaryProtocol.java
|
08c2d412adb214c40bb03be7587057b25d053030
| 0
|
Analyze the following code function for security vulnerabilities
|
private void releaseHandshakeBuffer() {
releaseIfNotNull(handshakeBuffer);
handshakeBuffer = null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: releaseHandshakeBuffer
File: handler/src/main/java/io/netty/handler/ssl/SslClientHelloHandler.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-34462
|
MEDIUM
| 6.5
|
netty
|
releaseHandshakeBuffer
|
handler/src/main/java/io/netty/handler/ssl/SslClientHelloHandler.java
|
535da17e45201ae4278c0479e6162bb4127d4c32
| 0
|
Analyze the following code function for security vulnerabilities
|
public Attribute getDynamicAttributeByName(String name) {
Attribute dynamicAttribute = null;
for (String d : dynamicAttributes.keySet()) {
if (name.startsWith(d)) {
dynamicAttribute = dynamicAttributes.get(d);
break;
}
}
return dynamicAttribute;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDynamicAttributeByName
File: src/main/java/org/owasp/validator/html/Policy.java
Repository: nahsra/antisamy
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2017-14735
|
MEDIUM
| 4.3
|
nahsra/antisamy
|
getDynamicAttributeByName
|
src/main/java/org/owasp/validator/html/Policy.java
|
82da009e733a989a57190cd6aa1b6824724f6d36
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.