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
|
@PUT
@Path("singlepage")
@Operation(summary = "Attach a Single Page Element on course", description = "This attaches a Single Page Element onto a given course. The element will\n" +
" be inserted underneath the supplied parentNodeId. The page is found in the\n" +
" resource folder of the course.")
@ApiResponse(responseCode = "200", description = "The content of the single page", content = {
@Content(mediaType = "application/json", schema = @Schema(implementation = CourseNodeVO.class)),
@Content(mediaType = "application/xml", schema = @Schema(implementation = CourseNodeVO.class)) })
@ApiResponse(responseCode = "401", description = "The roles of the authenticated user are not sufficient")
@ApiResponse(responseCode = "404", description = "The course or parentNode not found")
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
public Response attachSinglePage(@PathParam("courseId") Long courseId, @QueryParam("parentNodeId") String parentNodeId,
@QueryParam("position") Integer position, @QueryParam("shortTitle") @DefaultValue("undefined") String shortTitle,
@QueryParam("longTitle") @DefaultValue("undefined") String longTitle, @QueryParam("objectives") @DefaultValue("undefined") String objectives,
@QueryParam("visibilityExpertRules") String visibilityExpertRules, @QueryParam("accessExpertRules") String accessExpertRules,
@QueryParam("filename") String filename, @QueryParam("path") String path, @Context HttpServletRequest request) {
SinglePageCustomConfig config = new SinglePageCustomConfig(path, filename);
return attach(courseId, parentNodeId, "sp", position, shortTitle, longTitle, objectives, visibilityExpertRules, accessExpertRules, config, request);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: attachSinglePage
File: src/main/java/org/olat/restapi/repository/course/CourseElementWebService.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-41242
|
HIGH
| 7.9
|
OpenOLAT
|
attachSinglePage
|
src/main/java/org/olat/restapi/repository/course/CourseElementWebService.java
|
c450df7d7ffe6afde39ebca6da9136f1caa16ec4
| 0
|
Analyze the following code function for security vulnerabilities
|
private void addHandlerInternal(MessageHandler handler, Class<?> type, boolean partial) {
verify(type, handler);
List<HandlerWrapper> handlerWrappers = createHandlerWrappers(type, handler, partial);
for(HandlerWrapper handlerWrapper : handlerWrappers) {
if (handlers.containsKey(handlerWrapper.getFrameType())) {
throw JsrWebSocketMessages.MESSAGES.handlerAlreadyRegistered(handlerWrapper.getFrameType());
} else {
if (handlers.putIfAbsent(handlerWrapper.getFrameType(), handlerWrapper) != null) {
throw JsrWebSocketMessages.MESSAGES.handlerAlreadyRegistered(handlerWrapper.getFrameType());
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addHandlerInternal
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
|
addHandlerInternal
|
websockets-jsr/src/main/java/io/undertow/websockets/jsr/FrameHandler.java
|
c7e84a0b7efced38506d7d1dfea5902366973877
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setRegistryLogins(List<RegistryLogin> registryLogins) {
this.registryLogins = registryLogins;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setRegistryLogins
File: server-plugin/server-plugin-executor-kubernetes/src/main/java/io/onedev/server/plugin/executor/kubernetes/KubernetesExecutor.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-610"
] |
CVE-2022-39206
|
CRITICAL
| 9.9
|
theonedev/onedev
|
setRegistryLogins
|
server-plugin/server-plugin-executor-kubernetes/src/main/java/io/onedev/server/plugin/executor/kubernetes/KubernetesExecutor.java
|
0052047a5b5095ac6a6b4a73a522d0272fec3a22
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public IntentSender createRequestAccountAccessIntentSenderAsUser(@NonNull Account account,
@NonNull String packageName, @NonNull UserHandle userHandle) {
if (UserHandle.getAppId(Binder.getCallingUid()) != Process.SYSTEM_UID) {
throw new SecurityException("Can be called only by system UID");
}
Objects.requireNonNull(account, "account cannot be null");
Objects.requireNonNull(packageName, "packageName cannot be null");
Objects.requireNonNull(userHandle, "userHandle cannot be null");
final int userId = userHandle.getIdentifier();
Preconditions.checkArgumentInRange(userId, 0, Integer.MAX_VALUE, "user must be concrete");
final int uid;
try {
uid = mPackageManager.getPackageUidAsUser(packageName, userId);
} catch (NameNotFoundException e) {
Slog.e(TAG, "Unknown package " + packageName);
return null;
}
Intent intent = newRequestAccountAccessIntent(account, packageName, uid, null);
final long identity = Binder.clearCallingIdentity();
try {
return PendingIntent.getActivityAsUser(
mContext, 0, intent, PendingIntent.FLAG_ONE_SHOT
| PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_IMMUTABLE,
null, new UserHandle(userId)).getIntentSender();
} finally {
Binder.restoreCallingIdentity(identity);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createRequestAccountAccessIntentSenderAsUser
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
|
createRequestAccountAccessIntentSenderAsUser
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void createRestrictedFile(File file, boolean writableByOwner) throws IOException {
createRestrictedFile(file, false, writableByOwner);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createRestrictedFile
File: core/src/main/java/net/sourceforge/jnlp/util/FileUtils.java
Repository: AdoptOpenJDK/IcedTea-Web
The code follows secure coding practices.
|
[
"CWE-345",
"CWE-94",
"CWE-22"
] |
CVE-2019-10182
|
MEDIUM
| 5.8
|
AdoptOpenJDK/IcedTea-Web
|
createRestrictedFile
|
core/src/main/java/net/sourceforge/jnlp/util/FileUtils.java
|
2ab070cdac087bd208f64fa8138bb709f8d7680c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public View getView(int position, View convertView, ViewGroup parent) {
final RowViewHolder holder;
if (convertView == null) {
holder = createViewHolder(parent);
} else {
holder = (RowViewHolder) convertView.getTag();
}
bindViewHolder(position, holder);
return holder.row;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getView
File: core/java/com/android/internal/app/ChooserActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-254",
"CWE-19"
] |
CVE-2016-3752
|
HIGH
| 7.5
|
android
|
getView
|
core/java/com/android/internal/app/ChooserActivity.java
|
ddbf2db5b946be8fdc45c7b0327bf560b2a06988
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setCharacterEncoding(String s)
{
this.response.setCharacterEncoding(s);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setCharacterEncoding
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiServletResponse.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-601"
] |
CVE-2022-23618
|
MEDIUM
| 5.8
|
xwiki/xwiki-platform
|
setCharacterEncoding
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiServletResponse.java
|
5251c02080466bf9fb55288f04a37671108f8096
| 0
|
Analyze the following code function for security vulnerabilities
|
@SneakyThrows
public void migrate(String tenantKey) {
final StopWatch stopWatch = createStarted();
try {
log.info("START - SETUP:CreateTenant:liquibase tenantKey: {}", tenantKey);
assertTenantKeyValid(tenantKey);
SpringLiquibase liquibase = new SpringLiquibase();
liquibase.setResourceLoader(resourceLoader);
liquibase.setDataSource(dataSource);
liquibase.setChangeLog(CHANGE_LOG_PATH);
liquibase.setContexts(liquibaseProperties.getContexts());
liquibase.setDefaultSchema(tenantKey.toLowerCase());
liquibase.setDropFirst(liquibaseProperties.isDropFirst());
liquibase.setChangeLogParameters(DatabaseUtil.defaultParams(tenantKey));
liquibase.setShouldRun(true);
liquibase.afterPropertiesSet();
log.info("STOP - SETUP:CreateTenant:liquibase tenantKey: {}, result: OK, time = {} ms", tenantKey,
stopWatch.getTime());
} catch (Exception e) {
log.info("STOP - SETUP:CreateTenant:liquibase tenantKey: {}, result: FAIL, error: {}, time = {} ms",
tenantKey, e.getMessage(), stopWatch.getTime());
throw e;
}
}
|
Vulnerability Classification:
- CWE: CWE-89
- CVE: CVE-2019-15557
- Severity: HIGH
- CVSS Score: 7.5
Description: fix create schema for new tenant
Function: migrate
File: src/main/java/com/icthh/xm/uaa/service/tenant/TenantDatabaseService.java
Repository: xm-online/xm-uaa
Fixed Code:
@SneakyThrows
public void migrate(String tenantKey) {
final StopWatch stopWatch = createStarted();
try {
log.info("START - SETUP:CreateTenant:liquibase tenantKey: {}", tenantKey);
assertTenantKeyValid(tenantKey);
SpringLiquibase liquibase = new SpringLiquibase();
liquibase.setResourceLoader(resourceLoader);
liquibase.setDataSource(dataSource);
liquibase.setChangeLog(CHANGE_LOG_PATH);
liquibase.setContexts(liquibaseProperties.getContexts());
liquibase.setDefaultSchema(tenantKey);
liquibase.setDropFirst(liquibaseProperties.isDropFirst());
liquibase.setChangeLogParameters(DatabaseUtil.defaultParams(tenantKey));
liquibase.setShouldRun(true);
liquibase.afterPropertiesSet();
log.info("STOP - SETUP:CreateTenant:liquibase tenantKey: {}, result: OK, time = {} ms", tenantKey,
stopWatch.getTime());
} catch (Exception e) {
log.info("STOP - SETUP:CreateTenant:liquibase tenantKey: {}, result: FAIL, error: {}, time = {} ms",
tenantKey, e.getMessage(), stopWatch.getTime());
throw e;
}
}
|
[
"CWE-89"
] |
CVE-2019-15557
|
HIGH
| 7.5
|
xm-online/xm-uaa
|
migrate
|
src/main/java/com/icthh/xm/uaa/service/tenant/TenantDatabaseService.java
|
de1bb967b81c0cfe9854b13c030512b85200f7e3
| 1
|
Analyze the following code function for security vulnerabilities
|
public String getSkinFile(String filename, String skin, XWikiContext context)
{
return getSkinFile(filename, skin, false, context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSkinFile
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
|
getSkinFile
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void removeSortListener(SortListener listener) {
removeListener(SortEvent.class, listener, SORT_ORDER_CHANGE_METHOD);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeSortListener
File: server/src/main/java/com/vaadin/ui/Grid.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-25028
|
MEDIUM
| 4.3
|
vaadin/framework
|
removeSortListener
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
public static HttpHeaders toArmeria(Http2Headers headers, boolean request, boolean endOfStream) {
final HttpHeadersBuilder builder;
if (request) {
builder = headers.contains(HttpHeaderNames.METHOD) ? RequestHeaders.builder()
: HttpHeaders.builder();
} else {
builder = headers.contains(HttpHeaderNames.STATUS) ? ResponseHeaders.builder()
: HttpHeaders.builder();
}
toArmeria(builder, headers, endOfStream);
return builder.build();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toArmeria
File: core/src/main/java/com/linecorp/armeria/internal/ArmeriaHttpUtil.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2019-16771
|
MEDIUM
| 5
|
line/armeria
|
toArmeria
|
core/src/main/java/com/linecorp/armeria/internal/ArmeriaHttpUtil.java
|
b597f7a865a527a84ee3d6937075cfbb4470ed20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public EntityType getEntityType() {
return EntityType.BackupConfig;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getEntityType
File: api/api-backup-config-v1/src/main/java/com/thoughtworks/go/apiv1/backupconfig/BackupConfigControllerV1.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2021-25924
|
HIGH
| 9.3
|
gocd
|
getEntityType
|
api/api-backup-config-v1/src/main/java/com/thoughtworks/go/apiv1/backupconfig/BackupConfigControllerV1.java
|
7d0baab0d361c377af84994f95ba76c280048548
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
public static @Nullable String extractRelativePathWithDisplayName(@Nullable String path) {
if (path == null) return null;
if (path.equals("/storage/emulated") || path.equals("/storage/emulated/")) {
// This path is not reachable for MediaProvider.
return null;
}
// We are extracting relative path for the directory itself, we add "/" so that we can use
// same PATTERN_RELATIVE_PATH to match relative path for directory. For example, relative
// path of '/storage/<volume_name>' is null where as relative path for directory is "/", for
// PATTERN_RELATIVE_PATH to match '/storage/<volume_name>', it should end with "/".
if (!path.endsWith("/")) {
// Relative path for directory should end with "/".
path += "/";
}
final Matcher matcher = PATTERN_RELATIVE_PATH.matcher(path);
if (matcher.find()) {
if (matcher.end() == path.length()) {
// This is the top-level directory, so relative path is "/"
return "/";
}
return path.substring(matcher.end());
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: extractRelativePathWithDisplayName
File: src/com/android/providers/media/util/FileUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2023-35670
|
HIGH
| 7.8
|
android
|
extractRelativePathWithDisplayName
|
src/com/android/providers/media/util/FileUtils.java
|
db3c69afcb0a45c8aa2f333fcde36217889899fe
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean onCreateOptionsMenu(Menu menu) {
final boolean superCreated = super.onCreateOptionsMenu(menu);
// Don't render any menu items when there are no accounts.
if (mAccounts == null || mAccounts.length == 0) {
return superCreated;
}
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.compose_menu, menu);
/*
* Start save in the correct enabled state.
* 1) If a user launches compose from within gmail, save is disabled
* until they add something, at which point, save is enabled, auto save
* on exit; if the user empties everything, save is disabled, exiting does not
* auto-save
* 2) if a user replies/ reply all/ forwards from within gmail, save is
* disabled until they change something, at which point, save is
* enabled, auto save on exit; if the user empties everything, save is
* disabled, exiting does not auto-save.
* 3) If a user launches compose from another application and something
* gets populated (attachments, recipients, body, subject, etc), save is
* enabled, auto save on exit; if the user empties everything, save is
* disabled, exiting does not auto-save
*/
mSave = menu.findItem(R.id.save);
String action = getIntent() != null ? getIntent().getAction() : null;
enableSave(mInnerSavedState != null ?
mInnerSavedState.getBoolean(EXTRA_SAVE_ENABLED)
: (Intent.ACTION_SEND.equals(action)
|| Intent.ACTION_SEND_MULTIPLE.equals(action)
|| Intent.ACTION_SENDTO.equals(action)
|| isDraftDirty()));
final MenuItem helpItem = menu.findItem(R.id.help_info_menu_item);
final MenuItem sendFeedbackItem = menu.findItem(R.id.feedback_menu_item);
final MenuItem attachFromServiceItem = menu.findItem(R.id.attach_from_service_stub1);
if (helpItem != null) {
helpItem.setVisible(mAccount != null
&& mAccount.supportsCapability(AccountCapabilities.HELP_CONTENT));
}
if (sendFeedbackItem != null) {
sendFeedbackItem.setVisible(mAccount != null
&& mAccount.supportsCapability(AccountCapabilities.SEND_FEEDBACK));
}
if (attachFromServiceItem != null) {
attachFromServiceItem.setVisible(shouldEnableAttachFromServiceMenu(mAccount));
}
// Show attach picture on pre-K devices.
menu.findItem(R.id.add_photo_attachment).setVisible(!Utils.isRunningKitkatOrLater());
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onCreateOptionsMenu
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
|
onCreateOptionsMenu
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
public long getRootAvailableSpace(String root) {
return -1;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRootAvailableSpace
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
|
getRootAvailableSpace
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@JsonIgnore
public Set<String> getAllSpaces() {
return getSpaces().stream().filter(s -> !s.equalsIgnoreCase(Post.DEFAULT_SPACE)).collect(Collectors.toSet());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAllSpaces
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
|
getAllSpaces
|
src/main/java/com/erudika/scoold/core/Profile.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setAuthService(XWikiAuthService authService)
{
this.authService = authService;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAuthService
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
|
setAuthService
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
private void migrate72(File dataDir, Stack<Integer> versions) {
Map<String, Integer> stateOrdinals = new HashMap<>();
for (File file: dataDir.listFiles()) {
if (file.getName().startsWith("Settings.xml")) {
VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file);
for (Element element: dom.getRootElement().elements()) {
if (element.elementTextTrim("key").equals("ISSUE")) {
Element valueElement = element.element("value");
if (valueElement != null) {
int index = 0;
for (Element stateSpecElement: valueElement.element("stateSpecs").elements())
stateOrdinals.put(stateSpecElement.elementText("name").trim(), index++);
for (Element boardSpecElement: valueElement.element("boardSpecs").elements())
boardSpecElement.addElement("displayLinks");
valueElement.addElement("listLinks");
}
}
}
dom.writeToFile(file, false);
}
}
for (File file: dataDir.listFiles()) {
if (file.getName().startsWith("Issues.xml")) {
VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file);
for (Element element: dom.getRootElement().elements()) {
int ordinal = stateOrdinals.get(element.elementText("state").trim());
element.addElement("stateOrdinal").setText(String.valueOf(ordinal));
}
dom.writeToFile(file, false);
} else if (file.getName().startsWith("Projects.xml")) {
VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file);
for (Element element: dom.getRootElement().elements()) {
Element issueSettingElement = element.element("issueSetting");
if (issueSettingElement.element("listFields") != null)
issueSettingElement.addElement("listLinks");
Element boardSpecsElement = issueSettingElement.element("boardSpecs");
if (boardSpecsElement != null) {
for (Element boardSpecElement: boardSpecsElement.elements())
boardSpecElement.addElement("displayLinks");
}
}
dom.writeToFile(file, false);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: migrate72
File: server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-338"
] |
CVE-2023-24828
|
HIGH
| 8.8
|
theonedev/onedev
|
migrate72
|
server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
|
d67dd9686897fe5e4ab881d749464aa7c06a68e5
| 0
|
Analyze the following code function for security vulnerabilities
|
public static int[] unshuffleIntArray(byte[] input) throws IOException {
int[] output = new int[input.length / 4];
int numProcessed = impl.unshuffle(input, 0, 4, input.length, output, 0);
assert(numProcessed == input.length);
return output;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unshuffleIntArray
File: src/main/java/org/xerial/snappy/BitShuffle.java
Repository: xerial/snappy-java
The code follows secure coding practices.
|
[
"CWE-190"
] |
CVE-2023-34453
|
HIGH
| 7.5
|
xerial/snappy-java
|
unshuffleIntArray
|
src/main/java/org/xerial/snappy/BitShuffle.java
|
820e2e074c58748b41dbd547f4edba9e108ad905
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setStatus(UiStatus status) {
mStatus = status;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setStatus
File: services/credentials/java/com/android/server/credentials/CredentialManagerUi.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40076
|
MEDIUM
| 5.5
|
android
|
setStatus
|
services/credentials/java/com/android/server/credentials/CredentialManagerUi.java
|
9b68987df85b681f9362a3cadca6496796d23bbc
| 0
|
Analyze the following code function for security vulnerabilities
|
private void updateConnectingThread(Thread new_thread) {
synchronized(mConnectingThreadMutex) {
if (mConnectingThread == null) {
mConnectingThread = new_thread;
} else try {
Log.d(TAG, "updateConnectingThread: old thread is still running, killing it.");
mConnectingThread.interrupt();
mConnectingThread.join(50);
} catch (InterruptedException e) {
Log.d(TAG, "updateConnectingThread: failed to join(): " + e);
} finally {
mConnectingThread = new_thread;
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateConnectingThread
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
|
updateConnectingThread
|
src/org/yaxim/androidclient/service/SmackableImp.java
|
65a38dc77545d9568732189e86089390f0ceaf9f
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<String> getForbiddenGroups()
{
List<String> groups = getProperty(PROP_GROUPS_FORBIDDEN, List.class);
return groups != null && !groups.isEmpty() ? groups : null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getForbiddenGroups
File: oidc-authenticator/src/main/java/org/xwiki/contrib/oidc/auth/internal/OIDCClientConfiguration.java
Repository: xwiki-contrib/oidc
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2022-39387
|
HIGH
| 7.5
|
xwiki-contrib/oidc
|
getForbiddenGroups
|
oidc-authenticator/src/main/java/org/xwiki/contrib/oidc/auth/internal/OIDCClientConfiguration.java
|
0247af1417925b9734ab106ad7cd934ee870ac89
| 0
|
Analyze the following code function for security vulnerabilities
|
static void setPlotDimensions(final HttpQuery query, final Plot plot) {
String wxh = query.getQueryStringParam("wxh");
if (wxh != null && !wxh.isEmpty()) {
wxh = URLDecoder.decode(wxh.trim());
if (!WXH_VALIDATOR.matcher(wxh).find()) {
throw new IllegalArgumentException("'wxh' was invalid. "
+ "Must satisfy the pattern " + WXH_VALIDATOR.toString());
}
final int wxhlength = wxh.length();
if (wxhlength < 7) { // 100x100 minimum.
throw new BadRequestException("Parameter wxh too short: " + wxh);
}
final int x = wxh.indexOf('x', 3); // Start at 2 as min size is 100x100
if (x < 0) {
throw new BadRequestException("Invalid wxh parameter: " + wxh);
}
try {
final short width = Short.parseShort(wxh.substring(0, x));
final short height = Short.parseShort(wxh.substring(x + 1, wxhlength));
try {
plot.setDimensions(width, height);
} catch (IllegalArgumentException e) {
throw new BadRequestException("Invalid wxh parameter: " + wxh + ", "
+ e.getMessage());
}
} catch (NumberFormatException e) {
throw new BadRequestException("Can't parse wxh '" + wxh + "': "
+ e.getMessage());
}
}
}
|
Vulnerability Classification:
- CWE: CWE-78
- CVE: CVE-2023-25826
- Severity: CRITICAL
- CVSS Score: 9.8
Description: Improved fix for #2261.
Regular expressions wouldn't catch the newlines or possibly other
control characters. Now we'll use the TAG validation code to make
sure the inputs are only plain ASCII printables first.
Fixes CVE-2018-12972, CVE-2020-35476
Function: setPlotDimensions
File: src/tsd/GraphHandler.java
Repository: OpenTSDB/opentsdb
Fixed Code:
static void setPlotDimensions(final HttpQuery query, final Plot plot) {
String wxh = query.getQueryStringParam("wxh");
if (wxh != null && !wxh.isEmpty()) {
wxh = URLDecoder.decode(wxh.trim());
validateString("wxh", wxh);
if (!WXH_VALIDATOR.matcher(wxh).find()) {
throw new IllegalArgumentException("'wxh' was invalid. "
+ "Must satisfy the pattern " + WXH_VALIDATOR.toString());
}
final int wxhlength = wxh.length();
if (wxhlength < 7) { // 100x100 minimum.
throw new BadRequestException("Parameter wxh too short: " + wxh);
}
final int x = wxh.indexOf('x', 3); // Start at 2 as min size is 100x100
if (x < 0) {
throw new BadRequestException("Invalid wxh parameter: " + wxh);
}
try {
final short width = Short.parseShort(wxh.substring(0, x));
final short height = Short.parseShort(wxh.substring(x + 1, wxhlength));
try {
plot.setDimensions(width, height);
} catch (IllegalArgumentException e) {
throw new BadRequestException("Invalid wxh parameter: " + wxh + ", "
+ e.getMessage());
}
} catch (NumberFormatException e) {
throw new BadRequestException("Can't parse wxh '" + wxh + "': "
+ e.getMessage());
}
}
}
|
[
"CWE-78"
] |
CVE-2023-25826
|
CRITICAL
| 9.8
|
OpenTSDB/opentsdb
|
setPlotDimensions
|
src/tsd/GraphHandler.java
|
26be40a5e5b6ce8b0b1e4686c4b0d7911e5d8a25
| 1
|
Analyze the following code function for security vulnerabilities
|
private void cutRect(Rect rect, Rect toRemove) {
if (toRemove.isEmpty()) return;
if (toRemove.top < rect.bottom && toRemove.bottom > rect.top) {
if (toRemove.right >= rect.right && toRemove.left >= rect.left) {
rect.right = toRemove.left;
} else if (toRemove.left <= rect.left && toRemove.right <= rect.right) {
rect.left = toRemove.right;
}
}
if (toRemove.left < rect.right && toRemove.right > rect.left) {
if (toRemove.bottom >= rect.bottom && toRemove.top >= rect.top) {
rect.bottom = toRemove.top;
} else if (toRemove.top <= rect.top && toRemove.bottom <= rect.bottom) {
rect.top = toRemove.bottom;
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cutRect
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
|
cutRect
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
public Builder setForceReDownload(Boolean forceReDownload) {
isForceReDownload = forceReDownload;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setForceReDownload
File: library/src/main/java/com/liulishuo/filedownloader/download/DownloadLaunchRunnable.java
Repository: lingochamp/FileDownloader
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-11248
|
HIGH
| 7.5
|
lingochamp/FileDownloader
|
setForceReDownload
|
library/src/main/java/com/liulishuo/filedownloader/download/DownloadLaunchRunnable.java
|
b023cc081bbecdd2a9f3549a3ae5c12a9647ed7f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int windowTypeToLayerLw(int type) {
if (type >= FIRST_APPLICATION_WINDOW && type <= LAST_APPLICATION_WINDOW) {
return 2;
}
switch (type) {
case TYPE_UNIVERSE_BACKGROUND:
return 1;
case TYPE_PRIVATE_PRESENTATION:
return 2;
case TYPE_WALLPAPER:
// wallpaper is at the bottom, though the window manager may move it.
return 2;
case TYPE_PHONE:
return 3;
case TYPE_SEARCH_BAR:
return 4;
case TYPE_VOICE_INTERACTION:
// voice interaction layer is almost immediately above apps.
return 5;
case TYPE_SYSTEM_DIALOG:
return 6;
case TYPE_TOAST:
// toasts and the plugged-in battery thing
return 7;
case TYPE_PRIORITY_PHONE:
// SIM errors and unlock. Not sure if this really should be in a high layer.
return 8;
case TYPE_DREAM:
// used for Dreams (screensavers with TYPE_DREAM windows)
return 9;
case TYPE_SYSTEM_ALERT:
// like the ANR / app crashed dialogs
return 10;
case TYPE_INPUT_METHOD:
// on-screen keyboards and other such input method user interfaces go here.
return 11;
case TYPE_INPUT_METHOD_DIALOG:
// on-screen keyboards and other such input method user interfaces go here.
return 12;
case TYPE_KEYGUARD_SCRIM:
// the safety window that shows behind keyguard while keyguard is starting
return 13;
case TYPE_STATUS_BAR_SUB_PANEL:
return 14;
case TYPE_STATUS_BAR:
return 15;
case TYPE_STATUS_BAR_PANEL:
return 16;
case TYPE_KEYGUARD_DIALOG:
return 17;
case TYPE_VOLUME_OVERLAY:
// the on-screen volume indicator and controller shown when the user
// changes the device volume
return 18;
case TYPE_SYSTEM_OVERLAY:
// the on-screen volume indicator and controller shown when the user
// changes the device volume
return 19;
case TYPE_NAVIGATION_BAR:
// the navigation bar, if available, shows atop most things
return 20;
case TYPE_NAVIGATION_BAR_PANEL:
// some panels (e.g. search) need to show on top of the navigation bar
return 21;
case TYPE_SYSTEM_ERROR:
// system-level error dialogs
return 22;
case TYPE_MAGNIFICATION_OVERLAY:
// used to highlight the magnified portion of a display
return 23;
case TYPE_DISPLAY_OVERLAY:
// used to simulate secondary display devices
return 24;
case TYPE_DRAG:
// the drag layer: input for drag-and-drop is associated with this window,
// which sits above all other focusable windows
return 25;
case TYPE_ACCESSIBILITY_OVERLAY:
// overlay put by accessibility services to intercept user interaction
return 26;
case TYPE_SECURE_SYSTEM_OVERLAY:
return 27;
case TYPE_BOOT_PROGRESS:
return 28;
case TYPE_POINTER:
// the (mouse) pointer layer
return 29;
case TYPE_HIDDEN_NAV_CONSUMER:
return 30;
}
Log.e(TAG, "Unknown window type: " + type);
return 2;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: windowTypeToLayerLw
File: policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-0812
|
MEDIUM
| 6.6
|
android
|
windowTypeToLayerLw
|
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
|
84669ca8de55d38073a0dcb01074233b0a417541
| 0
|
Analyze the following code function for security vulnerabilities
|
private void processReturnFiles(VFSLeaf target, List<BulkAssessmentRow> rows) {
Map<String, BulkAssessmentRow> assessedIdToRow = new HashMap<>();
for(BulkAssessmentRow row:rows) {
assessedIdToRow.put(row.getAssessedId(), row);
}
if(target.exists()) {
File parentTarget = ((LocalImpl)target).getBasefile().getParentFile();
ZipEntry entry;
try(InputStream is = target.getInputStream();
ZipInputStream zis = new ZipInputStream(is)) {
byte[] b = new byte[FileUtils.BSIZE];
while ((entry = zis.getNextEntry()) != null) {
if(!entry.isDirectory()) {
while (zis.read(b) > 0) {
//continue
}
Path op = new File(parentTarget, entry.getName()).toPath();
if(!Files.isHidden(op) && !op.toFile().isDirectory()) {
Path parentDir = op.getParent();
String assessedId = parentDir.getFileName().toString();
String filename = op.getFileName().toString();
BulkAssessmentRow row;
if(assessedIdToRow.containsKey(assessedId)) {
row = assessedIdToRow.get(assessedId);
} else {
row = new BulkAssessmentRow();
row.setAssessedId(assessedId);
assessedIdToRow.put(assessedId, row);
rows.add(row);
}
if(row.getReturnFiles() == null) {
row.setReturnFiles(new ArrayList<String>(2));
}
row.getReturnFiles().add(filename);
}
}
}
} catch(Exception e) {
logError("", e);
}
}
}
|
Vulnerability Classification:
- CWE: CWE-22
- CVE: CVE-2021-39180
- Severity: HIGH
- CVSS Score: 9.0
Description: OO-5549: check parent by unzip
Function: processReturnFiles
File: src/main/java/org/olat/course/assessment/bulk/DataStepForm.java
Repository: OpenOLAT
Fixed Code:
private void processReturnFiles(VFSLeaf target, List<BulkAssessmentRow> rows) {
Map<String, BulkAssessmentRow> assessedIdToRow = new HashMap<>();
for(BulkAssessmentRow row:rows) {
assessedIdToRow.put(row.getAssessedId(), row);
}
if(target.exists()) {
File parentTarget = ((LocalImpl)target).getBasefile().getParentFile();
ZipEntry entry;
try(InputStream is = target.getInputStream();
ZipInputStream zis = new ZipInputStream(is)) {
byte[] b = new byte[FileUtils.BSIZE];
while ((entry = zis.getNextEntry()) != null) {//TODO zip
if(!entry.isDirectory()) {
while (zis.read(b) > 0) {
//continue
}
Path op = new File(parentTarget, entry.getName()).toPath();
if(!Files.isHidden(op) && !op.toFile().isDirectory()) {
Path parentDir = op.getParent();
String assessedId = parentDir.getFileName().toString();
String filename = op.getFileName().toString();
BulkAssessmentRow row;
if(assessedIdToRow.containsKey(assessedId)) {
row = assessedIdToRow.get(assessedId);
} else {
row = new BulkAssessmentRow();
row.setAssessedId(assessedId);
assessedIdToRow.put(assessedId, row);
rows.add(row);
}
if(row.getReturnFiles() == null) {
row.setReturnFiles(new ArrayList<String>(2));
}
row.getReturnFiles().add(filename);
}
}
}
} catch(Exception e) {
logError("", e);
}
}
}
|
[
"CWE-22"
] |
CVE-2021-39180
|
HIGH
| 9
|
OpenOLAT
|
processReturnFiles
|
src/main/java/org/olat/course/assessment/bulk/DataStepForm.java
|
5668a41ab3f1753102a89757be013487544279d5
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public ServerBuilder annotatedService(String pathPrefix, Object service,
Object... exceptionHandlersAndConverters) {
virtualHostTemplate.annotatedService(pathPrefix, service, exceptionHandlersAndConverters);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: annotatedService
File: core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-44487
|
HIGH
| 7.5
|
line/armeria
|
annotatedService
|
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
|
df7f85824a62e997b910b5d6194a3335841065fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public XMLBuilder2 cdata(byte[] data) {
super.cdataImpl(data);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cdata
File: src/main/java/com/jamesmurty/utils/XMLBuilder2.java
Repository: jmurty/java-xmlbuilder
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2014-125087
|
MEDIUM
| 5.2
|
jmurty/java-xmlbuilder
|
cdata
|
src/main/java/com/jamesmurty/utils/XMLBuilder2.java
|
e6fddca201790abab4f2c274341c0bb8835c3e73
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public XMLBuilder2 c(String comment) {
return comment(comment);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: c
File: src/main/java/com/jamesmurty/utils/XMLBuilder2.java
Repository: jmurty/java-xmlbuilder
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2014-125087
|
MEDIUM
| 5.2
|
jmurty/java-xmlbuilder
|
c
|
src/main/java/com/jamesmurty/utils/XMLBuilder2.java
|
e6fddca201790abab4f2c274341c0bb8835c3e73
| 0
|
Analyze the following code function for security vulnerabilities
|
@NonNull
@Override
public int[] getGidsForUid(int uid) {
return mPermissionManagerServiceImpl.getGidsForUid(uid);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getGidsForUid
File: services/core/java/com/android/server/pm/permission/PermissionManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-281"
] |
CVE-2023-21249
|
MEDIUM
| 5.5
|
android
|
getGidsForUid
|
services/core/java/com/android/server/pm/permission/PermissionManagerService.java
|
c00b7e7dbc1fa30339adef693d02a51254755d7f
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean retryToPopulateIndex(final String systemUserName) {
if (retriesToPopulateIndex > 0) {
return false;
}
long instancesInSolr = 0L;
try {
instancesInSolr = indexManager.count();
} catch (Exception e) {
throw new IllegalStateException(e);
}
if (instancesInSolr > 0) {
logger.debug("Search index found, other files could be indexed. No retry needed.");
return false;
}
retriesToPopulateIndex++;
new Thread() {
public void run() {
try {
Thread.sleep(30000);
} catch (InterruptedException ex) {
}
populateIndex(systemUserName);
}
}.start();
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: retryToPopulateIndex
File: modules/search-service-impl/src/main/java/org/opencastproject/search/impl/SearchServiceImpl.java
Repository: opencast
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-21318
|
MEDIUM
| 5.5
|
opencast
|
retryToPopulateIndex
|
modules/search-service-impl/src/main/java/org/opencastproject/search/impl/SearchServiceImpl.java
|
b18c6a7f81f08ed14884592a6c14c9ab611ad450
| 0
|
Analyze the following code function for security vulnerabilities
|
private void stashProviderRestoreUpdateLocked(Provider provider, int oldId, int newId) {
ArrayList<RestoreUpdateRecord> r = mUpdatesByProvider.get(provider);
if (r == null) {
r = new ArrayList<>();
mUpdatesByProvider.put(provider, r);
} else {
// don't duplicate
if (alreadyStashed(r, oldId, newId)) {
if (DEBUG) {
Slog.i(TAG, "ID remap " + oldId + " -> " + newId
+ " already stashed for " + provider);
}
return;
}
}
r.add(new RestoreUpdateRecord(oldId, newId));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: stashProviderRestoreUpdateLocked
File: services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-1541
|
MEDIUM
| 4.3
|
android
|
stashProviderRestoreUpdateLocked
|
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
|
0b98d304c467184602b4c6bce76fda0b0274bc07
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
@CheckForNull
synchronized File getFile() {
return file;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFile
File: android/guava/src/com/google/common/io/FileBackedOutputStream.java
Repository: google/guava
The code follows secure coding practices.
|
[
"CWE-552"
] |
CVE-2023-2976
|
HIGH
| 7.1
|
google/guava
|
getFile
|
android/guava/src/com/google/common/io/FileBackedOutputStream.java
|
feb83a1c8fd2e7670b244d5afd23cba5aca43284
| 0
|
Analyze the following code function for security vulnerabilities
|
void clearOomAdjObserver() {
synchronized (this) {
mCurOomAdjUid = -1;
mCurOomAdjObserver = null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearOomAdjObserver
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
|
clearOomAdjObserver
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
protected final void asyncGo(Runnable runnable) {
cachedExecutorService.execute(runnable);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: asyncGo
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
|
asyncGo
|
smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
|
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected ResolveInfo newResult(PackageParser.ActivityIntentInfo info,
int match, int userId) {
if (!sUserManager.exists(userId)) return null;
if (!mSettings.isEnabledLPr(info.activity.info, mFlags, userId)) {
return null;
}
final PackageParser.Activity activity = info.activity;
if (mSafeMode && (activity.info.applicationInfo.flags
&ApplicationInfo.FLAG_SYSTEM) == 0) {
return null;
}
PackageSetting ps = (PackageSetting) activity.owner.mExtras;
if (ps == null) {
return null;
}
ActivityInfo ai = PackageParser.generateActivityInfo(activity, mFlags,
ps.readUserState(userId), userId);
if (ai == null) {
return null;
}
final ResolveInfo res = new ResolveInfo();
res.activityInfo = ai;
if ((mFlags&PackageManager.GET_RESOLVED_FILTER) != 0) {
res.filter = info;
}
if (info != null) {
res.handleAllWebDataURI = info.handleAllWebDataURI();
}
res.priority = info.getPriority();
res.preferredOrder = activity.owner.mPreferredOrder;
//System.out.println("Result: " + res.activityInfo.className +
// " = " + res.priority);
res.match = match;
res.isDefault = info.hasDefault;
res.labelRes = info.labelRes;
res.nonLocalizedLabel = info.nonLocalizedLabel;
if (userNeedsBadging(userId)) {
res.noResourceId = true;
} else {
res.icon = info.icon;
}
res.iconResourceId = info.icon;
res.system = res.activityInfo.applicationInfo.isSystemApp();
return res;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: newResult
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
|
newResult
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
private void enforceGrantRevokeRuntimePermissionPermissions(String message) {
if (mContext.checkCallingOrSelfPermission(Manifest.permission.GRANT_RUNTIME_PERMISSIONS)
!= PackageManager.PERMISSION_GRANTED
&& mContext.checkCallingOrSelfPermission(Manifest.permission.REVOKE_RUNTIME_PERMISSIONS)
!= PackageManager.PERMISSION_GRANTED) {
throw new SecurityException(message + " requires "
+ Manifest.permission.GRANT_RUNTIME_PERMISSIONS + " or "
+ Manifest.permission.REVOKE_RUNTIME_PERMISSIONS);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: enforceGrantRevokeRuntimePermissionPermissions
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
|
enforceGrantRevokeRuntimePermissionPermissions
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfo info) {
super.onInitializeAccessibilityNodeInfo(host, info);
String label = null;
if (host == mLockIcon) {
label = getResources().getString(R.string.unlock_label);
} else if (host == mRightAffordanceView) {
label = getResources().getString(R.string.camera_label);
} else if (host == mLeftAffordanceView) {
if (mLeftIsVoiceAssist) {
label = getResources().getString(R.string.voice_assist_label);
} else {
label = getResources().getString(R.string.phone_label);
}
}
info.addAction(new AccessibilityAction(ACTION_CLICK, label));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onInitializeAccessibilityNodeInfo
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
onInitializeAccessibilityNodeInfo
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isRequestedForLocalOnly(WifiConfiguration currentWifiConfiguration,
String currentBssid) {
Set<Integer> uids =
mNetworkFactory.getSpecificNetworkRequestUids(
currentWifiConfiguration, currentBssid);
// Check if there is an active specific request in WifiNetworkFactory for local only.
return !uids.isEmpty();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isRequestedForLocalOnly
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
|
isRequestedForLocalOnly
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean shouldListenForFingerprint() {
return (mKeyguardIsVisible || !mDeviceInteractive || mBouncer || mGoingToSleep)
&& !mSwitchingUser && !mFingerprintAlreadyAuthenticated
&& !isFingerprintDisabled(getCurrentUser());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: shouldListenForFingerprint
File: packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
shouldListenForFingerprint
|
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
private void disableAllFields() {
mName.setEnabled(false);
mApn.setEnabled(false);
mProxy.setEnabled(false);
mPort.setEnabled(false);
mUser.setEnabled(false);
mServer.setEnabled(false);
mPassword.setEnabled(false);
mMmsProxy.setEnabled(false);
mMmsPort.setEnabled(false);
mMmsc.setEnabled(false);
mMcc.setEnabled(false);
mMnc.setEnabled(false);
mApnType.setEnabled(false);
mAuthType.setEnabled(false);
mProtocol.setEnabled(false);
mRoamingProtocol.setEnabled(false);
mCarrierEnabled.setEnabled(false);
mBearerMulti.setEnabled(false);
mMvnoType.setEnabled(false);
mMvnoMatchData.setEnabled(false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: disableAllFields
File: src/com/android/settings/network/apn/ApnEditor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40125
|
HIGH
| 7.8
|
android
|
disableAllFields
|
src/com/android/settings/network/apn/ApnEditor.java
|
63d464c3fa5c7b9900448fef3844790756e557eb
| 0
|
Analyze the following code function for security vulnerabilities
|
private void enforceWriteSettingsPermission(String func, String callingPackage,
String callingAttributionTag) {
int uid = Binder.getCallingUid();
if (uid == ROOT_UID) {
return;
}
if (Settings.checkAndNoteWriteSettingsOperation(mContext, uid,
callingPackage, callingAttributionTag, false)) {
return;
}
String msg = "Permission Denial: " + func + " from pid="
+ Binder.getCallingPid()
+ ", uid=" + uid
+ " requires " + android.Manifest.permission.WRITE_SETTINGS;
Slog.w(TAG, msg);
throw new SecurityException(msg);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: enforceWriteSettingsPermission
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
|
enforceWriteSettingsPermission
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
private Response sendRequest(String method, Invocation.Builder invocationBuilder, Entity<?> entity) {
Response response;
if ("POST".equals(method)) {
response = invocationBuilder.post(entity);
} else if ("PUT".equals(method)) {
response = invocationBuilder.put(entity);
} else if ("DELETE".equals(method)) {
response = invocationBuilder.method("DELETE", entity);
} else if ("PATCH".equals(method)) {
response = invocationBuilder.method("PATCH", entity);
} else {
response = invocationBuilder.method(method);
}
return response;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendRequest
File: samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
sendRequest
|
samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
ReentrantLock getWriteLock() {
return writeLock;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getWriteLock
File: src/main/java/net/schmizz/sshj/transport/TransportImpl.java
Repository: hierynomus/sshj
The code follows secure coding practices.
|
[
"CWE-354"
] |
CVE-2023-48795
|
MEDIUM
| 5.9
|
hierynomus/sshj
|
getWriteLock
|
src/main/java/net/schmizz/sshj/transport/TransportImpl.java
|
94fcc960e0fb198ddec0f7efc53f95ac627fe083
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void dumpFilter(PrintWriter out, String prefix,
PackageParser.ActivityIntentInfo filter) {
out.print(prefix); out.print(
Integer.toHexString(System.identityHashCode(filter.activity)));
out.print(' ');
filter.activity.printComponentShortName(out);
out.print(" filter ");
out.println(Integer.toHexString(System.identityHashCode(filter)));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpFilter
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
|
dumpFilter
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void onPostCreate(Bundle savedInstanceState) {
super.onPostCreate(savedInstanceState);
getSupportFragmentManager()
.beginTransaction()
.replace(R.id.container, new SettingsFragment())
.commit();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onPostCreate
File: News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/SettingsActivity.java
Repository: nextcloud/news-android
The code follows secure coding practices.
|
[
"CWE-829"
] |
CVE-2021-41256
|
MEDIUM
| 5.8
|
nextcloud/news-android
|
onPostCreate
|
News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/SettingsActivity.java
|
05449cb666059af7de2302df9d5c02997a23df85
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void copyDbObject(
String dbObject,
boolean useSuffix,
Connection connSource,
Connection connTarget,
List<String> valuePatterns,
List<String> valueReplacements,
PrintStream out
) throws SQLException {
String currentStatement = null;
Database_2 db = new Database_2();
try {
Database_2[] plugins = Utils.getDatabasePlugIns();
db = plugins[0];
} catch (Exception e) {
out.println("Can not activate database plugin: " + e.getMessage());
}
try {
// Delete all rows from target
PreparedStatement s = connTarget.prepareStatement(currentStatement = "DELETE FROM " + dbObject + (useSuffix ? "_" : ""));
s.executeUpdate();
s.close();
// Read all rows from source
s = connSource.prepareStatement(currentStatement = "SELECT * FROM " + dbObject + (useSuffix ? "_" : ""));
ResultSet rs = s.executeQuery();
if(rs != null) {
ResultSetMetaData rsm = rs.getMetaData();
FastResultSet frs = new FastResultSet(rs);
int nRows = 0;
while (frs.next()) {
// Read row from source and prepare INSERT statement
String statement = "INSERT INTO " + dbObject + (useSuffix ? "_" : "") + " ";
List<Object> statementParameters = new ArrayList<Object>();
List<String> processTargetColumnNames = new ArrayList<String>();
for (int j = 0; j < rsm.getColumnCount(); j++) {
String columnName = rsm.getColumnName(j + 1);
if(frs.getObject(columnName) != null) {
String mappedColumnName = CopyDb.mapColumnName(connTarget, dbObject, columnName);
if(mappedColumnName != null) {
statement += (statementParameters.size() == 0 ? " (" : ", ") + mappedColumnName;
processTargetColumnNames.add(mappedColumnName);
if(frs.getObject(columnName) instanceof java.sql.Clob) {
try {
statementParameters.add(CopyDb.getStringFromClob((java.sql.Clob) frs.getObject(columnName)));
} catch (Exception e) {
out.println("Reading Clob failed. Reason: " + e.getMessage());
out.println("statement=" + statement);
out.println("parameters=" + statementParameters);
}
} else if(frs.getObject(columnName) instanceof java.sql.Blob) {
try {
statementParameters.add(CopyDb.getBytesFromBlob((java.sql.Blob) frs.getObject(columnName)));
} catch (Exception e) {
out.println("Reading Blob failed. Reason: " + e.getMessage());
out.println("statement=" + statement);
out.println("parameters=" + statementParameters);
}
} else {
statementParameters.add(
CopyDb.mapColumnValue(
connSource,
dbObject,
columnName,
frs.getObject(columnName),
valuePatterns,
valueReplacements
)
);
}
}
}
}
statement += ") VALUES (";
for (int j = 0; j < statementParameters.size(); j++) {
statement += j == 0 ? "?" : ", ?";
}
statement += ")";
// Add row to target
try {
PreparedStatement t = connTarget.prepareStatement(currentStatement = statement);
for (int j = 0; j < statementParameters.size(); j++) {
Object parameter = statementParameters.get(j);
if("oracle.sql.TIMESTAMP".equals(parameter.getClass().getName())) {
Method timestampValueMethod = parameter.getClass().getMethod("timestampValue", new Class[] {});
parameter = timestampValueMethod.invoke(parameter, new Object[] {});
} else if("microsoft.sql.DateTimeOffset".equals(parameter.getClass().getName())) {
Method timestampValueMethod = parameter.getClass().getMethod("getTimestamp", new Class[] {});
parameter = timestampValueMethod.invoke(parameter, new Object[] {});
}
if(parameter instanceof java.sql.Timestamp) {
t.setTimestamp(j + 1, (java.sql.Timestamp) parameter);
} else if(parameter instanceof java.sql.Date) {
t.setDate(j + 1, (java.sql.Date) parameter);
} else if(parameter instanceof Double) {
t.setBigDecimal(j + 1, new BigDecimal((Double)parameter));
} else if(parameter instanceof Float) {
t.setBigDecimal(j + 1, new BigDecimal((Float)parameter));
} else {
db.setPreparedStatementValue(connTarget, t, j + 1, parameter);
}
}
t.executeUpdate();
t.close();
} catch (Exception e) {
new ServiceException(e).log();
out.println("Insert failed. Reason: " + e.getMessage());
out.println("statement=" + statement);
out.println("parameters=" + statementParameters);
}
nRows++;
if(nRows % 1000 == 0) {
out.println(nRows + " rows copied");
}
}
rs.close();
} else {
out.println("Did not copy table (result set is null). Statement: " + currentStatement);
}
s.close();
} catch (Exception e) {
new ServiceException(e).log();
out.println("Can not copy table (see log for more info). Statement: " + currentStatement);
}
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2021-25959
- Severity: MEDIUM
- CVSS Score: 4.3
Description: Fixes #94
Function: copyDbObject
File: core/src/main/java/org/opencrx/kernel/tools/CopyDb.java
Repository: opencrx
Fixed Code:
public static void copyDbObject(
String dbObject,
boolean useSuffix,
Connection connSource,
Connection connTarget,
List<String> valuePatterns,
List<String> valueReplacements,
PrintStream out
) throws SQLException {
String currentStatement = null;
Database_2 db = new Database_2();
try {
Database_2[] plugins = Utils.getDatabasePlugIns();
db = plugins[0];
} catch (Exception e) {
out.println("Can not activate database plugin: " + e.getMessage());
}
try {
// Delete all rows from target
PreparedStatement s = connTarget.prepareStatement(currentStatement = "DELETE FROM " + dbObject + (useSuffix ? "_" : ""));
s.executeUpdate();
s.close();
// Read all rows from source
s = connSource.prepareStatement(currentStatement = "SELECT * FROM " + dbObject + (useSuffix ? "_" : ""));
s.setFetchSize(100);
ResultSet rs = s.executeQuery();
if(rs != null) {
ResultSetMetaData rsm = rs.getMetaData();
FastResultSet frs = new FastResultSet(rs);
int nRows = 0;
while (frs.next()) {
// Read row from source and prepare INSERT statement
String statement = "INSERT INTO " + dbObject + (useSuffix ? "_" : "") + " ";
List<Object> statementParameters = new ArrayList<Object>();
List<String> processTargetColumnNames = new ArrayList<String>();
for (int j = 0; j < rsm.getColumnCount(); j++) {
String columnName = rsm.getColumnName(j + 1);
if(frs.getObject(columnName) != null) {
String mappedColumnName = CopyDb.mapColumnName(connTarget, dbObject, columnName);
if(mappedColumnName != null) {
statement += (statementParameters.size() == 0 ? " (" : ", ") + mappedColumnName;
processTargetColumnNames.add(mappedColumnName);
if(frs.getObject(columnName) instanceof java.sql.Clob) {
try {
statementParameters.add(CopyDb.getStringFromClob((java.sql.Clob) frs.getObject(columnName)));
} catch (Exception e) {
out.println("Reading Clob failed. Reason: " + e.getMessage());
out.println("statement=" + statement);
out.println("parameters=" + statementParameters);
}
} else if(frs.getObject(columnName) instanceof java.sql.Blob) {
try {
statementParameters.add(CopyDb.getBytesFromBlob((java.sql.Blob) frs.getObject(columnName)));
} catch (Exception e) {
out.println("Reading Blob failed. Reason: " + e.getMessage());
out.println("statement=" + statement);
out.println("parameters=" + statementParameters);
}
} else {
statementParameters.add(
CopyDb.mapColumnValue(
connSource,
dbObject,
columnName,
frs.getObject(columnName),
valuePatterns,
valueReplacements
)
);
}
}
}
}
statement += ") VALUES (";
for (int j = 0; j < statementParameters.size(); j++) {
statement += j == 0 ? "?" : ", ?";
}
statement += ")";
// Add row to target
try {
PreparedStatement t = connTarget.prepareStatement(currentStatement = statement);
for (int j = 0; j < statementParameters.size(); j++) {
Object parameter = statementParameters.get(j);
if("oracle.sql.TIMESTAMP".equals(parameter.getClass().getName())) {
Method timestampValueMethod = parameter.getClass().getMethod("timestampValue", new Class[] {});
parameter = timestampValueMethod.invoke(parameter, new Object[] {});
} else if("microsoft.sql.DateTimeOffset".equals(parameter.getClass().getName())) {
Method timestampValueMethod = parameter.getClass().getMethod("getTimestamp", new Class[] {});
parameter = timestampValueMethod.invoke(parameter, new Object[] {});
}
if(parameter instanceof java.sql.Timestamp) {
t.setTimestamp(j + 1, (java.sql.Timestamp) parameter);
} else if(parameter instanceof java.sql.Date) {
t.setDate(j + 1, (java.sql.Date) parameter);
} else if(parameter instanceof Double) {
t.setBigDecimal(j + 1, new BigDecimal((Double)parameter));
} else if(parameter instanceof Float) {
t.setBigDecimal(j + 1, new BigDecimal((Float)parameter));
} else {
db.setPreparedStatementValue(connTarget, t, j + 1, parameter);
}
}
t.executeUpdate();
t.close();
} catch (Exception e) {
new ServiceException(e).log();
out.println("Insert failed. Reason: " + e.getMessage());
out.println("statement=" + statement);
out.println("parameters=" + statementParameters);
}
nRows++;
if(nRows % 1000 == 0) {
out.println(nRows + " rows copied");
}
}
rs.close();
} else {
out.println("Did not copy table (result set is null). Statement: " + currentStatement);
}
s.close();
} catch (Exception e) {
new ServiceException(e).log();
out.println("Can not copy table (see log for more info). Statement: " + currentStatement);
}
}
|
[
"CWE-79"
] |
CVE-2021-25959
|
MEDIUM
| 4.3
|
opencrx
|
copyDbObject
|
core/src/main/java/org/opencrx/kernel/tools/CopyDb.java
|
14e75f95e5f56fbe7ee897bdf5d858788072e818
| 1
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("javadoc")
public boolean awakenScrollBars(int startDelay, boolean invalidate) {
// For the default implementation of ContentView which draws the scrollBars on the native
// side, calling this function may get us into a bad state where we keep drawing the
// scrollBars, so disable it by always returning false.
if (mContainerView.getScrollBarStyle() == View.SCROLLBARS_INSIDE_OVERLAY) {
return false;
} else {
return mContainerViewInternals.super_awakenScrollBars(startDelay, invalidate);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: awakenScrollBars
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
|
awakenScrollBars
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
PendingUi hide() {
if (sVerbose) Slog.v(TAG, "Hiding save dialog.");
try {
mDialog.hide();
} finally {
mOverlayControl.showOverlays();
}
return mPendingUi;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hide
File: services/autofill/java/com/android/server/autofill/ui/SaveUi.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-610"
] |
CVE-2023-40133
|
MEDIUM
| 5.5
|
android
|
hide
|
services/autofill/java/com/android/server/autofill/ui/SaveUi.java
|
08becc8c600f14c5529115cc1a1e0c97cd503f33
| 0
|
Analyze the following code function for security vulnerabilities
|
public static ClickHouseNode of(String uri) {
return of(uri, DEFAULT);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: of
File: clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNode.java
Repository: ClickHouse/clickhouse-java
The code follows secure coding practices.
|
[
"CWE-209"
] |
CVE-2024-23689
|
HIGH
| 8.8
|
ClickHouse/clickhouse-java
|
of
|
clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNode.java
|
4f8d9303eb991b39ec7e7e34825241efa082238a
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isShowingInterstitialPage() {
return mNativeContentViewCore == 0 ?
false : nativeIsShowingInterstitialPage(mNativeContentViewCore);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isShowingInterstitialPage
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
|
isShowingInterstitialPage
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean jsFunction_isDataPublishingEnabled(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
throws APIManagementException {
return HostObjectUtils.checkDataPublishingEnabled();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: jsFunction_isDataPublishingEnabled
File: components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
Repository: wso2/carbon-apimgt
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2018-20736
|
LOW
| 3.5
|
wso2/carbon-apimgt
|
jsFunction_isDataPublishingEnabled
|
components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
|
490f2860822f89d745b7c04fa9570bd86bef4236
| 0
|
Analyze the following code function for security vulnerabilities
|
private XmlFile getConfigFile() {
return new XmlFile(XSTREAM, new File(root,"config.xml"));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getConfigFile
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
|
getConfigFile
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
public static NativeObject jsFunction_getAllPaginatedPublishedAPIs(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
throws ScriptException, APIManagementException {
APIConsumer apiConsumer = getAPIConsumer(thisObj);
String tenantDomain;
boolean returnAPItags = false;
String [] statusList = {APIConstants.PUBLISHED};
if (args[0] != null) {
tenantDomain = (String) args[0];
} else {
tenantDomain = MultitenantConstants.SUPER_TENANT_DOMAIN_NAME;
}
int start = Integer.parseInt((String) args[1]);
int end = Integer.parseInt((String) args[2]);
if (args.length > 3 && args[3] != null) {
returnAPItags = Boolean.parseBoolean((String) args[3]);
}
return getPaginatedAPIsByStatus(apiConsumer, tenantDomain, start, end, statusList, returnAPItags);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: jsFunction_getAllPaginatedPublishedAPIs
File: components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
Repository: wso2/carbon-apimgt
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2018-20736
|
LOW
| 3.5
|
wso2/carbon-apimgt
|
jsFunction_getAllPaginatedPublishedAPIs
|
components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
|
490f2860822f89d745b7c04fa9570bd86bef4236
| 0
|
Analyze the following code function for security vulnerabilities
|
protected boolean _handleSingleArgumentCreator(CreatorCollector creators,
AnnotatedWithParams ctor, boolean isCreator, boolean isVisible)
{
// otherwise either 'simple' number, String, or general delegate:
Class<?> type = ctor.getRawParameterType(0);
if (type == String.class || type == CLASS_CHAR_SEQUENCE) {
if (isCreator || isVisible) {
creators.addStringCreator(ctor, isCreator);
}
return true;
}
if (type == int.class || type == Integer.class) {
if (isCreator || isVisible) {
creators.addIntCreator(ctor, isCreator);
}
return true;
}
if (type == long.class || type == Long.class) {
if (isCreator || isVisible) {
creators.addLongCreator(ctor, isCreator);
}
return true;
}
if (type == double.class || type == Double.class) {
if (isCreator || isVisible) {
creators.addDoubleCreator(ctor, isCreator);
}
return true;
}
if (type == boolean.class || type == Boolean.class) {
if (isCreator || isVisible) {
creators.addBooleanCreator(ctor, isCreator);
}
return true;
}
// Delegating Creator ok iff it has @JsonCreator (etc)
if (isCreator) {
creators.addDelegatingCreator(ctor, isCreator, null, 0);
return true;
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _handleSingleArgumentCreator
File: src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2019-16942
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
_handleSingleArgumentCreator
|
src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java
|
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
| 0
|
Analyze the following code function for security vulnerabilities
|
public ConnectionFactory load(Map<String, String> properties, String prefix) {
ConnectionFactoryConfigurator.load(this, properties, prefix);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: load
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
|
load
|
src/main/java/com/rabbitmq/client/ConnectionFactory.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
public void addEntry(LocalDocumentReference reference, String entryName)
{
addEntry(reference, entryName, XarModel.ACTION_OVERWRITE);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addEntry
File: xwiki-platform-core/xwiki-platform-xar/xwiki-platform-xar-model/src/main/java/org/xwiki/xar/XarPackage.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2023-27480
|
HIGH
| 7.7
|
xwiki/xwiki-platform
|
addEntry
|
xwiki-platform-core/xwiki-platform-xar/xwiki-platform-xar-model/src/main/java/org/xwiki/xar/XarPackage.java
|
e3527b98fdd8dc8179c24dc55e662b2c55199434
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isFile() {
return internal != null && internal.isFile();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isFile
File: src/net/sourceforge/plantuml/security/SFile.java
Repository: plantuml
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2023-3431
|
MEDIUM
| 5.3
|
plantuml
|
isFile
|
src/net/sourceforge/plantuml/security/SFile.java
|
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
| 0
|
Analyze the following code function for security vulnerabilities
|
public ChannelFuture getSSLEngineInboundCloseFuture() {
return sslEngineCloseFuture;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSSLEngineInboundCloseFuture
File: src/main/java/org/jboss/netty/handler/ssl/SslHandler.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2014-3488
|
MEDIUM
| 5
|
netty
|
getSSLEngineInboundCloseFuture
|
src/main/java/org/jboss/netty/handler/ssl/SslHandler.java
|
2fa9400a59d0563a66908aba55c41e7285a04994
| 0
|
Analyze the following code function for security vulnerabilities
|
public void processFileAndScheduleJobs(Scheduler sched,
boolean overWriteExistingJobs) throws SchedulerException, Exception {
String fileName = QUARTZ_XML_DEFAULT_FILE_NAME;
processFile(fileName, getSystemIdForFileName(fileName));
// The overWriteExistingJobs flag was set by processFile() -> prepForProcessing(), then by xml parsing, and then now
// we need to reset it again here by this method parameter to override it.
setOverWriteExistingData(overWriteExistingJobs);
executePreProcessCommands(sched);
scheduleJobs(sched);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: processFileAndScheduleJobs
File: quartz-core/src/main/java/org/quartz/xml/XMLSchedulingDataProcessor.java
Repository: quartz-scheduler/quartz
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2019-13990
|
HIGH
| 7.5
|
quartz-scheduler/quartz
|
processFileAndScheduleJobs
|
quartz-core/src/main/java/org/quartz/xml/XMLSchedulingDataProcessor.java
|
a1395ba118df306c7fe67c24fb0c9a95a4473140
| 0
|
Analyze the following code function for security vulnerabilities
|
private void factoryResetIfDelayedEarlier() {
synchronized (getLockObject()) {
DevicePolicyData policy = getUserData(UserHandle.USER_SYSTEM);
if (policy.mFactoryResetFlags == 0) return;
if (policy.mFactoryResetReason == null) {
// Shouldn't happen.
Slogf.e(LOG_TAG, "no persisted reason for factory resetting");
policy.mFactoryResetReason = "requested before boot";
}
FactoryResetter factoryResetter = FactoryResetter.newBuilder(mContext)
.setReason(policy.mFactoryResetReason).setForce(true)
.setWipeEuicc((policy.mFactoryResetFlags & DevicePolicyData
.FACTORY_RESET_FLAG_WIPE_EUICC) != 0)
.setWipeAdoptableStorage((policy.mFactoryResetFlags & DevicePolicyData
.FACTORY_RESET_FLAG_WIPE_EXTERNAL_STORAGE) != 0)
.setWipeFactoryResetProtection((policy.mFactoryResetFlags & DevicePolicyData
.FACTORY_RESET_FLAG_WIPE_FACTORY_RESET_PROTECTION) != 0)
.build();
Slogf.i(LOG_TAG, "Factory resetting on boot using " + factoryResetter);
try {
if (!factoryResetter.factoryReset()) {
// Shouldn't happen because FactoryResetter was created without a
// DevicePolicySafetyChecker.
Slogf.wtf(LOG_TAG, "Factory reset using " + factoryResetter + " failed.");
}
} catch (IOException e) {
// Shouldn't happen.
Slogf.wtf(LOG_TAG, "Could not factory reset using " + factoryResetter, e);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: factoryResetIfDelayedEarlier
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
|
factoryResetIfDelayedEarlier
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public Intent registerReceiver(IApplicationThread caller, String callerPackage,
IIntentReceiver receiver, IntentFilter filter, String permission, int userId) {
enforceNotIsolatedCaller("registerReceiver");
int callingUid;
int callingPid;
synchronized(this) {
ProcessRecord callerApp = null;
if (caller != null) {
callerApp = getRecordForAppLocked(caller);
if (callerApp == null) {
throw new SecurityException(
"Unable to find app for caller " + caller
+ " (pid=" + Binder.getCallingPid()
+ ") when registering receiver " + receiver);
}
if (callerApp.info.uid != Process.SYSTEM_UID &&
!callerApp.pkgList.containsKey(callerPackage) &&
!"android".equals(callerPackage)) {
throw new SecurityException("Given caller package " + callerPackage
+ " is not running in process " + callerApp);
}
callingUid = callerApp.info.uid;
callingPid = callerApp.pid;
} else {
callerPackage = null;
callingUid = Binder.getCallingUid();
callingPid = Binder.getCallingPid();
}
userId = this.handleIncomingUser(callingPid, callingUid, userId,
true, ALLOW_FULL_ONLY, "registerReceiver", callerPackage);
List allSticky = null;
// Look for any matching sticky broadcasts...
Iterator actions = filter.actionsIterator();
if (actions != null) {
while (actions.hasNext()) {
String action = (String)actions.next();
allSticky = getStickiesLocked(action, filter, allSticky,
UserHandle.USER_ALL);
allSticky = getStickiesLocked(action, filter, allSticky,
UserHandle.getUserId(callingUid));
}
} else {
allSticky = getStickiesLocked(null, filter, allSticky,
UserHandle.USER_ALL);
allSticky = getStickiesLocked(null, filter, allSticky,
UserHandle.getUserId(callingUid));
}
// The first sticky in the list is returned directly back to
// the client.
Intent sticky = allSticky != null ? (Intent)allSticky.get(0) : null;
if (DEBUG_BROADCAST) Slog.v(TAG, "Register receiver " + filter
+ ": " + sticky);
if (receiver == null) {
return sticky;
}
ReceiverList rl
= (ReceiverList)mRegisteredReceivers.get(receiver.asBinder());
if (rl == null) {
rl = new ReceiverList(this, callerApp, callingPid, callingUid,
userId, receiver);
if (rl.app != null) {
rl.app.receivers.add(rl);
} else {
try {
receiver.asBinder().linkToDeath(rl, 0);
} catch (RemoteException e) {
return sticky;
}
rl.linkedToDeath = true;
}
mRegisteredReceivers.put(receiver.asBinder(), rl);
} else if (rl.uid != callingUid) {
throw new IllegalArgumentException(
"Receiver requested to register for uid " + callingUid
+ " was previously registered for uid " + rl.uid);
} else if (rl.pid != callingPid) {
throw new IllegalArgumentException(
"Receiver requested to register for pid " + callingPid
+ " was previously registered for pid " + rl.pid);
} else if (rl.userId != userId) {
throw new IllegalArgumentException(
"Receiver requested to register for user " + userId
+ " was previously registered for user " + rl.userId);
}
BroadcastFilter bf = new BroadcastFilter(filter, rl, callerPackage,
permission, callingUid, userId);
rl.add(bf);
if (!bf.debugCheck()) {
Slog.w(TAG, "==> For Dynamic broadast");
}
mReceiverResolver.addFilter(bf);
// Enqueue broadcasts for all existing stickies that match
// this filter.
if (allSticky != null) {
ArrayList receivers = new ArrayList();
receivers.add(bf);
int N = allSticky.size();
for (int i=0; i<N; i++) {
Intent intent = (Intent)allSticky.get(i);
BroadcastQueue queue = broadcastQueueForIntent(intent);
BroadcastRecord r = new BroadcastRecord(queue, intent, null,
null, -1, -1, null, null, AppOpsManager.OP_NONE, receivers, null, 0,
null, null, false, true, true, -1);
queue.enqueueParallelBroadcastLocked(r);
queue.scheduleBroadcastsLocked();
}
}
return sticky;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: registerReceiver
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
|
registerReceiver
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
private final long[] getKsmInfo() {
long[] longOut = new long[4];
final int[] SINGLE_LONG_FORMAT = new int[] {
PROC_SPACE_TERM| PROC_OUT_LONG
};
long[] longTmp = new long[1];
readProcFile("/sys/kernel/mm/ksm/pages_shared",
SINGLE_LONG_FORMAT, null, longTmp, null);
longOut[KSM_SHARED] = longTmp[0] * ProcessList.PAGE_SIZE / 1024;
longTmp[0] = 0;
readProcFile("/sys/kernel/mm/ksm/pages_sharing",
SINGLE_LONG_FORMAT, null, longTmp, null);
longOut[KSM_SHARING] = longTmp[0] * ProcessList.PAGE_SIZE / 1024;
longTmp[0] = 0;
readProcFile("/sys/kernel/mm/ksm/pages_unshared",
SINGLE_LONG_FORMAT, null, longTmp, null);
longOut[KSM_UNSHARED] = longTmp[0] * ProcessList.PAGE_SIZE / 1024;
longTmp[0] = 0;
readProcFile("/sys/kernel/mm/ksm/pages_volatile",
SINGLE_LONG_FORMAT, null, longTmp, null);
longOut[KSM_VOLATILE] = longTmp[0] * ProcessList.PAGE_SIZE / 1024;
return longOut;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getKsmInfo
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
|
getKsmInfo
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public ServerBuilder blockingTaskExecutor(int numThreads) {
checkArgument(numThreads >= 0, "numThreads: %s (expected: >= 0)", numThreads);
final BlockingTaskExecutor executor = BlockingTaskExecutor.builder()
.numThreads(numThreads)
.build();
return blockingTaskExecutor(executor, true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: blockingTaskExecutor
File: core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-44487
|
HIGH
| 7.5
|
line/armeria
|
blockingTaskExecutor
|
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
|
df7f85824a62e997b910b5d6194a3335841065fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean setKeyGrantToWifiAuth(String callerPackage, String alias, boolean hasGrant) {
Preconditions.checkStringNotEmpty(alias, "Alias to grant cannot be empty");
final CallerIdentity caller = getCallerIdentity(callerPackage);
Preconditions.checkCallAuthorization(canChooseCertificates(caller));
try {
return setKeyChainGrantInternal(
alias, hasGrant, Process.WIFI_UID, caller.getUserHandle());
} catch (IllegalArgumentException e) {
if (mInjector.isChangeEnabled(THROW_EXCEPTION_WHEN_KEY_MISSING, caller.getPackageName(),
caller.getUserId())) {
throw e;
}
return false;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setKeyGrantToWifiAuth
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
setKeyGrantToWifiAuth
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getTempFolderPath() {
return tempFolderPath;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTempFolderPath
File: samples/openapi3/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
|
getTempFolderPath
|
samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onSystemReady() {
mPermissionManagerServiceImpl.onSystemReady();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onSystemReady
File: services/core/java/com/android/server/pm/permission/PermissionManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-281"
] |
CVE-2023-21249
|
MEDIUM
| 5.5
|
android
|
onSystemReady
|
services/core/java/com/android/server/pm/permission/PermissionManagerService.java
|
c00b7e7dbc1fa30339adef693d02a51254755d7f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public int createUser(String userName, Map<String, ?> map, String parent, String content, String syntaxId,
String userRights, XWikiContext context) throws XWikiException
{
Syntax syntax;
try {
syntax = Syntax.valueOf(syntaxId);
} catch (ParseException e) {
syntax = getDefaultDocumentSyntaxInternal();
}
return createUser(userName, map, getRelativeEntityReferenceResolver().resolve(parent, EntityType.DOCUMENT),
content, syntax, userRights, context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createUser
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
|
createUser
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int readBytes(byte[] value) throws JMSException {
if (readbuf==null) {
readbuf = (byte[])this.readPrimitiveType(ByteArray.class);
if (readbuf==null) return -1;
}
if (readbuf!=null) {
if (readbuf==EOF_ARRAY) {
readbuf = null;
return -1;
} else if (readbuf.length > value.length) {
int result = value.length;
int diff = readbuf.length - result;
System.arraycopy(readbuf, 0, value, 0, result);
byte[] tmp = new byte[diff];
System.arraycopy(readbuf, result, tmp, 0, diff);
readbuf = tmp;
return result;
} else {
int result = Math.min(readbuf.length, value.length);
System.arraycopy(readbuf, 0, value, 0, result);
readbuf = (result==value.length) ? EOF_ARRAY : null;
return result;
}
} else {
throw new MessageFormatException(String.format(UNABLE_TO_CAST, null,"byte[]"));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readBytes
File: src/main/java/com/rabbitmq/jms/client/message/RMQStreamMessage.java
Repository: rabbitmq/rabbitmq-jms-client
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2020-36282
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-jms-client
|
readBytes
|
src/main/java/com/rabbitmq/jms/client/message/RMQStreamMessage.java
|
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
| 0
|
Analyze the following code function for security vulnerabilities
|
public void failAgent(IBackupAgent agent, String message) {
try {
agent.fail(message);
} catch (Exception e) {
Slog.w(TAG, "Error conveying failure to " + mCurrentPackage.packageName);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: failAgent
File: services/backup/java/com/android/server/backup/BackupManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3759
|
MEDIUM
| 5
|
android
|
failAgent
|
services/backup/java/com/android/server/backup/BackupManagerService.java
|
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
| 0
|
Analyze the following code function for security vulnerabilities
|
static LocalNotification createNotificationFromBundle(Bundle b){
LocalNotification n = new LocalNotification();
n.setId(b.getString("NOTIF_ID"));
n.setAlertTitle(b.getString("NOTIF_TITLE"));
n.setAlertBody(b.getString("NOTIF_BODY"));
n.setAlertSound(b.getString("NOTIF_SOUND"));
n.setAlertImage(b.getString("NOTIF_IMAGE"));
n.setBadgeNumber(b.getInt("NOTIF_NUMBER"));
return n;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createNotificationFromBundle
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
|
createNotificationFromBundle
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public Client getHttpClient() {
return httpClient;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getHttpClient
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
|
getHttpClient
|
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
|
@Override
public boolean setAccountVisibility(Account account, String packageName, int newVisibility) {
Objects.requireNonNull(account, "account cannot be null");
Objects.requireNonNull(packageName, "packageName cannot be null");
int callingUid = Binder.getCallingUid();
int userId = UserHandle.getCallingUserId();
if (!isAccountManagedByCaller(account.type, callingUid, userId)
&& !isSystemUid(callingUid)) {
String msg = String.format(
"uid %s cannot get secrets for accounts of type: %s",
callingUid,
account.type);
throw new SecurityException(msg);
}
final long identityToken = clearCallingIdentity();
try {
UserAccounts accounts = getUserAccounts(userId);
return setAccountVisibility(account, packageName, newVisibility, true /* notify */,
accounts);
} finally {
restoreCallingIdentity(identityToken);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAccountVisibility
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
|
setAccountVisibility
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
private void finishConnectingThread() {
synchronized(mConnectingThreadMutex) {
mConnectingThread = null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: finishConnectingThread
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
|
finishConnectingThread
|
src/org/yaxim/androidclient/service/SmackableImp.java
|
65a38dc77545d9568732189e86089390f0ceaf9f
| 0
|
Analyze the following code function for security vulnerabilities
|
public void importConsumerTypes(File[] consumerTypes) throws IOException {
ConsumerTypeImporter importer = new ConsumerTypeImporter(consumerTypeCurator);
Set<ConsumerType> consumerTypeObjs = new HashSet<ConsumerType>();
for (File consumerType : consumerTypes) {
Reader reader = null;
try {
reader = new FileReader(consumerType);
consumerTypeObjs.add(importer.createObject(mapper, reader));
}
finally {
if (reader != null) {
reader.close();
}
}
}
importer.store(consumerTypeObjs);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: importConsumerTypes
File: src/main/java/org/candlepin/sync/Importer.java
Repository: candlepin
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2012-6119
|
LOW
| 2.1
|
candlepin
|
importConsumerTypes
|
src/main/java/org/candlepin/sync/Importer.java
|
f4d93230e58b969c506b4c9778e04482a059b08c
| 0
|
Analyze the following code function for security vulnerabilities
|
public static int makeKey(int type, int userId) {
return SettingsState.makeKey(type, userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: makeKey
File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40117
|
HIGH
| 7.8
|
android
|
makeKey
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
ff86ff28cf82124f8e65833a2dd8c319aea08945
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean zip(String sourceFilePath, String zipFilePath, boolean overwrite) throws IOException {
if (notEmpty(sourceFilePath)) {
File zipFile = new File(zipFilePath);
if (zipFile.exists() && !overwrite) {
return false;
} else {
zipFile.getParentFile().mkdirs();
try (ZipOutputStream zipOutputStream = new ZipOutputStream(new FileOutputStream(zipFile));) {
compress(Paths.get(sourceFilePath), zipOutputStream, BLANK);
zipFile.setReadable(true, false);
zipFile.setWritable(true, false);
return true;
}
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: zip
File: publiccms-parent/publiccms-common/src/main/java/com/publiccms/common/tools/ZipUtils.java
Repository: sanluan/PublicCMS
The code follows secure coding practices.
|
[
"CWE-434"
] |
CVE-2018-12914
|
HIGH
| 7.5
|
sanluan/PublicCMS
|
zip
|
publiccms-parent/publiccms-common/src/main/java/com/publiccms/common/tools/ZipUtils.java
|
c19fe66378c75725f3e3a380a6cb9f8b8a7dcb71
| 0
|
Analyze the following code function for security vulnerabilities
|
private List<PanelShareDto> convertTree(List<PanelShareDto> data) {
String username = AuthUtils.getUser().getUsername();
Map<String, List<PanelShareDto>> map = data.stream()
.filter(panelShareDto -> StringUtils.isNotEmpty(panelShareDto.getCreator())
&& !StringUtils.equals(username, panelShareDto.getCreator()))
.collect(Collectors.groupingBy(PanelShareDto::getCreator));
return map.entrySet().stream().map(entry -> {
PanelShareDto panelShareDto = new PanelShareDto();
panelShareDto.setName(entry.getKey());
panelShareDto.setChildren(entry.getValue());
return panelShareDto;
}).collect(Collectors.toList());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: convertTree
File: backend/src/main/java/io/dataease/service/panel/ShareService.java
Repository: dataease
The code follows secure coding practices.
|
[
"CWE-639"
] |
CVE-2023-32310
|
HIGH
| 8.1
|
dataease
|
convertTree
|
backend/src/main/java/io/dataease/service/panel/ShareService.java
|
72f428e87b5395c03d2f94ef6185fc247ddbc8dc
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean alreadyStashed(ArrayList<RestoreUpdateRecord> stash,
final int oldId, final int newId) {
final int N = stash.size();
for (int i = 0; i < N; i++) {
RestoreUpdateRecord r = stash.get(i);
if (r.oldId == oldId && r.newId == newId) {
return true;
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: alreadyStashed
File: services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-1541
|
MEDIUM
| 4.3
|
android
|
alreadyStashed
|
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
|
0b98d304c467184602b4c6bce76fda0b0274bc07
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getDisplayName() {
return delegate.getDisplayName() + " (JNDI)";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDisplayName
File: modules/library/jdbc/src/main/java/org/geotools/jdbc/JDBCJNDIDataStoreFactory.java
Repository: geotools
The code follows secure coding practices.
|
[
"CWE-917"
] |
CVE-2022-24818
|
HIGH
| 7.5
|
geotools
|
getDisplayName
|
modules/library/jdbc/src/main/java/org/geotools/jdbc/JDBCJNDIDataStoreFactory.java
|
4f70fa3234391dd0cda883a20ab0ec75688cba49
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean hasSentValidMsg(String pkg, int uid) {
try {
return sINM.hasSentValidMsg(pkg, uid);
} catch (Exception e) {
Log.w(TAG, "Error calling NoMan", e);
return false;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasSentValidMsg
File: src/com/android/settings/notification/NotificationBackend.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35667
|
HIGH
| 7.8
|
android
|
hasSentValidMsg
|
src/com/android/settings/notification/NotificationBackend.java
|
d8355ac47e068ad20c6a7b1602e72f0585ec0085
| 0
|
Analyze the following code function for security vulnerabilities
|
private void writeStartElement(final TransformerHandler th, final String name) throws SAXException {
th.startElement("", name, name, BLANK_ATTRIBUTES);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeStartElement
File: stroom-core-server/src/main/java/stroom/importexport/server/Config.java
Repository: gchq/stroom
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000651
|
HIGH
| 7.5
|
gchq/stroom
|
writeStartElement
|
stroom-core-server/src/main/java/stroom/importexport/server/Config.java
|
ba30ffd415bd7d32ee40ba4b04035267ce80b499
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getUserAgent() {
return userAgent;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserAgent
File: api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java
Repository: AsyncHttpClient/async-http-client
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2013-7397
|
MEDIUM
| 4.3
|
AsyncHttpClient/async-http-client
|
getUserAgent
|
api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java
|
df6ed70e86c8fc340ed75563e016c8baa94d7e72
| 0
|
Analyze the following code function for security vulnerabilities
|
private void parseMinimumEngineVersionNumber(final Node minimumVersion) throws EngineVersionException {
if (minimumVersion == null) {
return;
}
final Version mapMinimumEngineVersion = new Version(((Element) minimumVersion).getAttribute("minimumVersion"));
if (!GameEngineVersion.of(ClientContext.engineVersion())
.isCompatibleWithMapMinimumEngineVersion(mapMinimumEngineVersion)) {
throw new EngineVersionException(
String.format("Current engine version: %s, is not compatible with version: %s, required by map: %s",
ClientContext.engineVersion(),
mapMinimumEngineVersion.toString(),
data.getGameName()));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseMinimumEngineVersionNumber
File: game-core/src/main/java/games/strategy/engine/data/GameParser.java
Repository: triplea-game/triplea
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000546
|
MEDIUM
| 6.8
|
triplea-game/triplea
|
parseMinimumEngineVersionNumber
|
game-core/src/main/java/games/strategy/engine/data/GameParser.java
|
0f23875a4c6e166218859a63c884995f15c53895
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<BaseObject> put(DocumentReference key, List<BaseObject> value)
{
// Makes sure to always insert BaseObjects
return xObjects.put(key, value instanceof BaseObjects ? (BaseObjects) value : new BaseObjects(value));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: put
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
|
put
|
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
|
private void closeAll() throws SSLException {
receivedShutdown = true;
closeOutbound();
closeInbound();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: closeAll
File: handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-835"
] |
CVE-2016-4970
|
HIGH
| 7.8
|
netty
|
closeAll
|
handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java
|
bc8291c80912a39fbd2303e18476d15751af0bf1
| 0
|
Analyze the following code function for security vulnerabilities
|
private void handleCancelNetworkLoggingNotification() {
if (mNetworkLoggingNotificationUserId == UserHandle.USER_NULL) {
// Happens when setNetworkLoggingActive(false) is called before called with true
Slogf.d(LOG_TAG, "Not cancelling network logging notification for USER_NULL");
return;
}
Slogf.i(LOG_TAG, "Cancelling network logging notification for user %d",
mNetworkLoggingNotificationUserId);
mInjector.getNotificationManager().cancelAsUser(/* tag= */ null,
SystemMessage.NOTE_NETWORK_LOGGING,
UserHandle.of(mNetworkLoggingNotificationUserId));
mNetworkLoggingNotificationUserId = UserHandle.USER_NULL;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleCancelNetworkLoggingNotification
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
|
handleCancelNetworkLoggingNotification
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
boolean hasDeviceIdAccessUnchecked(String packageName, int uid) {
final int userId = UserHandle.getUserId(uid);
// TODO(b/280048070): Introduce a permission to handle device ID access
if (isPermissionCheckFlagEnabled()
&& !(isUidProfileOwnerLocked(uid) || isUidDeviceOwnerLocked(uid))) {
return hasPermission(MANAGE_DEVICE_POLICY_CERTIFICATES, packageName, userId);
} else {
ComponentName deviceOwner = getDeviceOwnerComponent(true);
if (deviceOwner != null && (deviceOwner.getPackageName().equals(packageName)
|| isCallerDelegate(packageName, uid, DELEGATION_CERT_INSTALL))) {
return true;
}
ComponentName profileOwner = getProfileOwnerAsUser(userId);
final boolean isCallerProfileOwnerOrDelegate = profileOwner != null
&& (profileOwner.getPackageName().equals(packageName)
|| isCallerDelegate(packageName, uid, DELEGATION_CERT_INSTALL));
if (isCallerProfileOwnerOrDelegate && (isProfileOwnerOfOrganizationOwnedDevice(userId)
|| isUserAffiliatedWithDevice(userId))) {
return true;
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasDeviceIdAccessUnchecked
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
hasDeviceIdAccessUnchecked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
private void handleNotifyProvidersChanged(Host host, IAppWidgetHost callbacks) {
try {
callbacks.providersChanged();
} catch (RemoteException re) {
synchronized (mLock) {
Slog.e(TAG, "Widget host dead: " + host.id, re);
host.callbacks = null;
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleNotifyProvidersChanged
File: services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-1541
|
MEDIUM
| 4.3
|
android
|
handleNotifyProvidersChanged
|
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
|
0b98d304c467184602b4c6bce76fda0b0274bc07
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean hasMoved() {
return mHasSurface && (mWindowFrames.hasContentChanged() || mMovedByResize)
&& !mAnimatingExit
&& (mWindowFrames.mRelFrame.top != mWindowFrames.mLastRelFrame.top
|| mWindowFrames.mRelFrame.left != mWindowFrames.mLastRelFrame.left)
&& (!mIsChildWindow || !getParentWindow().hasMoved())
&& !mTransitionController.isCollecting();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasMoved
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
|
hasMoved
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isTopOfTask(IBinder token) throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isTopOfTask
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
isTopOfTask
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
public static Collection<XarEntry> getEntries(File file) throws XarException, IOException
{
XarPackage xarPackage = new XarPackage(file);
return xarPackage.getEntries();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getEntries
File: xwiki-platform-core/xwiki-platform-xar/xwiki-platform-xar-model/src/main/java/org/xwiki/xar/XarPackage.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2023-27480
|
HIGH
| 7.7
|
xwiki/xwiki-platform
|
getEntries
|
xwiki-platform-core/xwiki-platform-xar/xwiki-platform-xar-model/src/main/java/org/xwiki/xar/XarPackage.java
|
e3527b98fdd8dc8179c24dc55e662b2c55199434
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getImageHeight(Object i) {
return ((Bitmap) i).getHeight();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getImageHeight
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
|
getImageHeight
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void validateKexState(int cmd, KexState expected) {
KexState actual = kexState.get();
if (!expected.equals(actual)) {
throw new IllegalStateException("Received KEX command=" + SshConstants.getCommandMessageName(cmd)
+ " while in state=" + actual + " instead of " + expected);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: validateKexState
File: sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
Repository: apache/mina-sshd
The code follows secure coding practices.
|
[
"CWE-354"
] |
CVE-2023-48795
|
MEDIUM
| 5.9
|
apache/mina-sshd
|
validateKexState
|
sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
|
6b0fd46f64bcb75eeeee31d65f10242660aad7c1
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public final int startActivityAsUser(IApplicationThread caller, String callingPackage,
Intent intent, String resolvedType, IBinder resultTo, String resultWho, int requestCode,
int startFlags, ProfilerInfo profilerInfo, Bundle options, int userId) {
enforceNotIsolatedCaller("startActivity");
userId = handleIncomingUser(Binder.getCallingPid(), Binder.getCallingUid(), userId,
false, ALLOW_FULL_ONLY, "startActivity", null);
// TODO: Switch to user app stacks here.
return mStackSupervisor.startActivityMayWait(caller, -1, callingPackage, intent,
resolvedType, null, null, resultTo, resultWho, requestCode, startFlags,
profilerInfo, null, null, options, userId, null, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startActivityAsUser
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
|
startActivityAsUser
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void waitForExtras() {
try {
mExtrasLock.await(TelecomSystemTest.TEST_TIMEOUT, TimeUnit.MILLISECONDS);
} catch (InterruptedException ie) {
}
mExtrasLock = new CountDownLatch(1);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: waitForExtras
File: tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
waitForExtras
|
tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
public AuthorizationCodeRequestUrl newAuthorizationUrl() {
return new AuthorizationCodeRequestUrl(authorizationServerEncodedUrl, clientId).setScopes(
scopes);
}
|
Vulnerability Classification:
- CWE: CWE-863
- CVE: CVE-2020-7692
- Severity: MEDIUM
- CVSS Score: 6.4
Description: feat: add PKCE support to AuthorizationCodeFlow (#470)
* Initial test code for a PKCE enabled Authorization Code Flow
* WIP: work on README.md
* Script to initialize keycloak by adding client via REST API.
* Improve keycloak init script and some code cleanup. Still WIP.
* WIP: work on README.md
* Working PKCE AuthorizationCodeFlow. Some cleanup of test classes.
* Add scopes back to the AuthorizationCodeRequestUrl creation.
* Simplify code by moving PKCE entirely into the AuthorizationCodeFlow class. Add documentation.
* Remove wildcard imports as that seems to be the way to do things here.
* Add @since annotation in JavaDoc to the PKCE parameters of the autorization url class.
* Add PKCE unit test, documentation and minor cleanup of dependencies for code sample.
* Add PKCE unit test, documentation and minor cleanup of dependencies for code sample.
* Annotate PKCE with Beta annotation.
* Responding to code review comments
* Responding to more PR comments
* Improve Keycloak PKCE sample documentation
* Add license header with copyright to new files. Improve documentation.
Function: newAuthorizationUrl
File: google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/AuthorizationCodeFlow.java
Repository: googleapis/google-oauth-java-client
Fixed Code:
public AuthorizationCodeRequestUrl newAuthorizationUrl() {
AuthorizationCodeRequestUrl url = new AuthorizationCodeRequestUrl(authorizationServerEncodedUrl, clientId);
url.setScopes(scopes);
if (pkce != null) {
url.setCodeChallenge(pkce.getChallenge());
url.setCodeChallengeMethod(pkce.getChallengeMethod());
}
return url;
}
|
[
"CWE-863"
] |
CVE-2020-7692
|
MEDIUM
| 6.4
|
googleapis/google-oauth-java-client
|
newAuthorizationUrl
|
google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/AuthorizationCodeFlow.java
|
13433cd7dd06267fc261f0b1d4764f8e3432c824
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean resumeExternalProcessing() {
context.next();
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resumeExternalProcessing
File: independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/VertxResteasyReactiveRequestContext.java
Repository: quarkusio/quarkus
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-0981
|
MEDIUM
| 6.5
|
quarkusio/quarkus
|
resumeExternalProcessing
|
independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/VertxResteasyReactiveRequestContext.java
|
96c64fd8f09c02a497e2db366c64dd9196582442
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void emailSuccessMessage(Context context, EPerson eperson,
String fileName) throws MessagingException
{
try
{
Locale supportedLocale = I18nUtil.getEPersonLocale(eperson);
Email email = Email.getEmail(I18nUtil.getEmailFilename(supportedLocale, "bte_batch_import_success"));
email.addRecipient(eperson.getEmail());
email.addArgument(fileName);
email.send();
}
catch (Exception e)
{
log.warn(LogManager.getHeader(context, "emailSuccessMessage", "cannot notify user of import"), e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: emailSuccessMessage
File: dspace-api/src/main/java/org/dspace/app/itemimport/ItemImport.java
Repository: DSpace
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-31195
|
HIGH
| 7.2
|
DSpace
|
emailSuccessMessage
|
dspace-api/src/main/java/org/dspace/app/itemimport/ItemImport.java
|
56e76049185bbd87c994128a9d77735ad7af0199
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.