instruction
string | input
string | output
string | cwe_ids
list | cve_id
string | severity
string | cvss_score
float64 | repo_name
string | func_name
string | file_path
string | commit_hash
string | is_vulnerable
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Analyze the following code function for security vulnerabilities
|
public JobLog toRestJobLog(Iterable<LogEvent> logs, URI self)
{
JobLog log = this.objectFactory.createJobLog();
// Serialize log
for (LogEvent logEvent : logs) {
// TODO: add support for log arguments
// TODO: add support for log Marker
org.xwiki.rest.model.jaxb.LogEvent event = this.objectFactory.createLogEvent();
event.setLevel(logEvent.getLevel().name());
Calendar calendarDate = Calendar.getInstance();
calendarDate.setTimeInMillis(logEvent.getTimeStamp());
event.setDate(calendarDate);
event.setFormattedMessage(logEvent.getFormattedMessage());
log.getLogEvents().add(event);
}
// Set link
if (self != null) {
Link link = this.objectFactory.createLink();
link.setHref(self.toString());
link.setRel(Relations.SELF);
log.getLinks().add(link);
}
return log;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toRestJobLog
File: xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-server/src/main/java/org/xwiki/rest/internal/ModelFactory.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2023-35151
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
toRestJobLog
|
xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-server/src/main/java/org/xwiki/rest/internal/ModelFactory.java
|
824cd742ecf5439971247da11bfe7e0ad2b10ede
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int hashCode() {
return Objects.hash(type, name, typeParameters);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hashCode
File: core/src/main/java/io/micronaut/core/type/DefaultArgument.java
Repository: micronaut-projects/micronaut-core
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-21700
|
MEDIUM
| 5
|
micronaut-projects/micronaut-core
|
hashCode
|
core/src/main/java/io/micronaut/core/type/DefaultArgument.java
|
b8ec32c311689667c69ae7d9f9c3b3a8abc96fe3
| 0
|
Analyze the following code function for security vulnerabilities
|
public Locale getRealLocale()
{
Locale locale = getLocale();
if (locale.equals(Locale.ROOT)) {
locale = getDefaultLocale();
}
return locale;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRealLocale
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-26470
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
getRealLocale
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<DocumentReference> getBackLinkedReferences() throws XWikiException
{
return this.doc.getBackLinkedReferences(getXWikiContext());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getBackLinkedReferences
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-648"
] |
CVE-2023-29507
|
HIGH
| 7.2
|
xwiki/xwiki-platform
|
getBackLinkedReferences
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
|
905cdd7c421dbf8c565557cdc773ab1aa9028f83
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void parseRequiresClosingTags(Element requiresClosingTagsListNode, List<String> requiresClosingTags) throws PolicyException {
if (requiresClosingTagsListNode != null) {
for (Element literalNode : getGrandChildrenByTagName(requiresClosingTagsListNode, "literal-list", "literal")) {
String value = getAttributeValue(literalNode, "value");
if (value != null && value.length() > 0) {
requiresClosingTags.add(value);
}
}
} else {
requiresClosingTags.addAll(Constants.defaultRequiresClosingTags);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseRequiresClosingTags
File: src/main/java/org/owasp/validator/html/Policy.java
Repository: nahsra/antisamy
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2017-14735
|
MEDIUM
| 4.3
|
nahsra/antisamy
|
parseRequiresClosingTags
|
src/main/java/org/owasp/validator/html/Policy.java
|
82da009e733a989a57190cd6aa1b6824724f6d36
| 0
|
Analyze the following code function for security vulnerabilities
|
private double getOperatingVolt() {
return getResources().getInteger(R.integer.config_bluetooth_operating_voltage_mv) / 1000.0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getOperatingVolt
File: src/com/android/bluetooth/btservice/AdapterService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-362",
"CWE-20"
] |
CVE-2016-3760
|
MEDIUM
| 5.4
|
android
|
getOperatingVolt
|
src/com/android/bluetooth/btservice/AdapterService.java
|
122feb9a0b04290f55183ff2f0384c6c53756bd8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void willStart() {
log.info("Starting UI Framework module");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: willStart
File: api/src/main/java/org/openmrs/module/uiframework/UiFrameworkActivator.java
Repository: openmrs/openmrs-module-uiframework
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-24621
|
MEDIUM
| 6.5
|
openmrs/openmrs-module-uiframework
|
willStart
|
api/src/main/java/org/openmrs/module/uiframework/UiFrameworkActivator.java
|
0422fa52c7eba3d96cce2936cb92897dca4b680a
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean associate(String userId, ServerSession session) {
if (session == null) {
throw new NullPointerException();
}
LocalLocation location = new LocalLocation(userId, session);
boolean wasAssociated = isAssociated(userId);
boolean added = associate(userId, location);
if (added) {
if (_logger.isDebugEnabled()) {
_logger.debug("Associated {} to user {}", session, userId);
}
session.addListener(location);
session.setAttribute(LocalLocation.class.getName(), location);
if (!wasAssociated) {
if (_logger.isDebugEnabled()) {
_logger.debug("Broadcasting association addition for user {}", userId);
}
// Let everyone in the cluster know that this session is here
_session.getChannel(SETI_ALL_CHANNEL).publish(new SetiPresence(true, userId));
}
}
return added;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: associate
File: cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Seti.java
Repository: cometd
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-24721
|
MEDIUM
| 5.5
|
cometd
|
associate
|
cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Seti.java
|
bb445a143fbf320f17c62e340455cd74acfb5929
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void jaasAuthenticationGenerator(XmlGenerator gen, JaasAuthenticationConfig c) {
if (c == null) {
return;
}
appendLoginModules(gen, "jaas", c.getLoginModuleConfigs());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: jaasAuthenticationGenerator
File: hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-522"
] |
CVE-2023-33264
|
MEDIUM
| 4.3
|
hazelcast
|
jaasAuthenticationGenerator
|
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
|
80a502d53cc48bf895711ab55f95e3a51e344ac1
| 0
|
Analyze the following code function for security vulnerabilities
|
private static boolean isSupportedExtension(java.nio.file.Path path) {
return SUPPORTED_FILE_EXTENSIONS.contains(FilenameUtils.getExtension(path.getFileName().toString()));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isSupportedExtension
File: opennms-webapp-rest/src/main/java/org/opennms/web/rest/v1/FilesystemRestService.java
Repository: OpenNMS/opennms
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40315
|
HIGH
| 8
|
OpenNMS/opennms
|
isSupportedExtension
|
opennms-webapp-rest/src/main/java/org/opennms/web/rest/v1/FilesystemRestService.java
|
201301e067329ababa3c0671ded5c4c43347d4a8
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
boolean shouldMakeActive(ActivityRecord activeActivity) {
// If the activity is stopped, stopping, cycle to an active state. We avoid doing
// this when there is an activity waiting to become translucent as the extra binder
// calls will lead to noticeable jank. A later call to
// Task#ensureActivitiesVisible will bring the activity to a proper
// active state.
if (!isState(STARTED, RESUMED, PAUSED, STOPPED, STOPPING)
// TODO (b/185876784) Check could we remove the check condition
// mTranslucentActivityWaiting != null here
|| getRootTask().mTranslucentActivityWaiting != null) {
return false;
}
if (this == activeActivity) {
return false;
}
if (!mTaskSupervisor.readyToResume()) {
// Making active is currently deferred (e.g. because an activity launch is in progress).
return false;
}
if (this.mLaunchTaskBehind) {
// This activity is being launched from behind, which means that it's not intended to be
// presented to user right now, even if it's set to be visible.
return false;
}
// Check if position in task allows to become paused
if (!task.hasChild(this)) {
throw new IllegalStateException("Activity not found in its task");
}
return getTaskFragment().topRunningActivity() == this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: shouldMakeActive
File: services/core/java/com/android/server/wm/ActivityRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21145
|
HIGH
| 7.8
|
android
|
shouldMakeActive
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getName() {
return name;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getName
File: base/common/src/main/java/com/netscape/certsrv/profile/PolicyDefault.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
getName
|
base/common/src/main/java/com/netscape/certsrv/profile/PolicyDefault.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String checkContentProviderAccess(String authority, int userId) {
return mCpHelper.checkContentProviderAccess(authority, userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkContentProviderAccess
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
|
checkContentProviderAccess
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
private CWLProcess extractProcess(JsonNode rootNode) {
if (rootNode != null) {
if (rootNode.has(CLASS)) {
switch(rootNode.get(CLASS).asText()) {
case WORKFLOW:
return CWLProcess.WORKFLOW;
case COMMANDLINETOOL:
return CWLProcess.COMMANDLINETOOL;
case EXPRESSIONTOOL:
return CWLProcess.EXPRESSIONTOOL;
}
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: extractProcess
File: src/main/java/org/commonwl/view/cwl/CWLService.java
Repository: common-workflow-language/cwlviewer
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2021-41110
|
HIGH
| 7.5
|
common-workflow-language/cwlviewer
|
extractProcess
|
src/main/java/org/commonwl/view/cwl/CWLService.java
|
f6066f09edb70033a2ce80200e9fa9e70a5c29de
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setImsRegistrationState(boolean registered) {
log("ImsRegistrationState - registered : " + registered);
if (mImsRegistrationOnOff && !registered) {
if (mAlarmSwitch) {
mImsRegistrationOnOff = registered;
Context context = mPhone.getContext();
AlarmManager am = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);
am.cancel(mRadioOffIntent);
mAlarmSwitch = false;
sendMessage(obtainMessage(EVENT_CHANGE_IMS_STATE));
return;
}
}
mImsRegistrationOnOff = registered;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setImsRegistrationState
File: src/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2016-3831
|
MEDIUM
| 5
|
android
|
setImsRegistrationState
|
src/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
|
f47bc301ccbc5e6d8110afab5a1e9bac1d4ef058
| 0
|
Analyze the following code function for security vulnerabilities
|
@GuardedBy("getLockObject()")
private void setProfileOwnerOnOrganizationOwnedDeviceUncheckedLocked(
ComponentName who, int userId, boolean isProfileOwnerOnOrganizationOwnedDevice) {
// Make sure that the user has a profile owner and that the specified
// component is the profile owner of that user.
if (!isProfileOwner(who, userId)) {
throw new IllegalArgumentException(String.format(
"Component %s is not a Profile Owner of user %d",
who.flattenToString(), userId));
}
Slogf.i(LOG_TAG, "%s %s as profile owner on organization-owned device for user %d",
isProfileOwnerOnOrganizationOwnedDevice ? "Marking" : "Unmarking",
who.flattenToString(), userId);
// First, set restriction on removing the profile.
mInjector.binderWithCleanCallingIdentity(() -> {
// Clear restriction as user.
final UserHandle parentUser = mUserManager.getProfileParent(UserHandle.of(userId));
if (parentUser == null) {
throw new IllegalStateException(String.format("User %d is not a profile", userId));
}
mUserManager.setUserRestriction(UserManager.DISALLOW_REMOVE_MANAGED_PROFILE,
isProfileOwnerOnOrganizationOwnedDevice,
parentUser);
mUserManager.setUserRestriction(UserManager.DISALLOW_ADD_USER,
isProfileOwnerOnOrganizationOwnedDevice,
parentUser);
});
// setProfileOwnerOfOrganizationOwnedDevice will trigger writing of the profile owner
// data, no need to do it manually.
mOwners.setProfileOwnerOfOrganizationOwnedDevice(userId,
isProfileOwnerOnOrganizationOwnedDevice);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setProfileOwnerOnOrganizationOwnedDeviceUncheckedLocked
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
|
setProfileOwnerOnOrganizationOwnedDeviceUncheckedLocked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public Configuration getConfiguration() {
Configuration ci;
synchronized(this) {
ci = new Configuration(getGlobalConfiguration());
ci.userSetLocale = false;
}
return ci;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getConfiguration
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
|
getConfiguration
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
private void handleAuthenticated() {
authenticated = true;
//TODO Replace with a proper call.
if (keyCachingService != null) {
keyCachingService.setMasterSecret(new Object());
}
// Finish and proceed with the next intent.
Intent nextIntent = getIntent().getParcelableExtra("next_intent");
if (nextIntent != null) {
startActivity(nextIntent);
// try {
// startActivity(nextIntent);
// } catch (java.lang.SecurityException e) {
// Log.w(TAG, "Access permission not passed from PassphraseActivity, retry sharing.");
// }
}
finish();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleAuthenticated
File: app/src/main/java/org/thoughtcrime/securesms/PassphrasePromptActivity.java
Repository: oxen-io/session-android
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2022-1955
|
LOW
| 2.1
|
oxen-io/session-android
|
handleAuthenticated
|
app/src/main/java/org/thoughtcrime/securesms/PassphrasePromptActivity.java
|
c69b49e676dd8f619418cf296d6fdad9ce5a9510
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void _addExplicitPropertyCreator(DeserializationContext ctxt,
BeanDescription beanDesc, CreatorCollector creators,
CreatorCandidate candidate)
throws JsonMappingException
{
final int paramCount = candidate.paramCount();
SettableBeanProperty[] properties = new SettableBeanProperty[paramCount];
for (int i = 0; i < paramCount; ++i) {
JacksonInject.Value injectId = candidate.injection(i);
AnnotatedParameter param = candidate.parameter(i);
PropertyName name = candidate.paramName(i);
if (name == null) {
// 21-Sep-2017, tatu: Looks like we want to block accidental use of Unwrapped,
// as that will not work with Creators well at all
NameTransformer unwrapper = ctxt.getAnnotationIntrospector().findUnwrappingNameTransformer(param);
if (unwrapper != null) {
_reportUnwrappedCreatorProperty(ctxt, beanDesc, param);
/*
properties[i] = constructCreatorProperty(ctxt, beanDesc, UNWRAPPED_CREATOR_PARAM_NAME, i, param, null);
++explicitNameCount;
*/
}
name = candidate.findImplicitParamName(i);
// Must be injectable or have name; without either won't work
if ((name == null) && (injectId == null)) {
ctxt.reportBadTypeDefinition(beanDesc,
"Argument #%d has no property name, is not Injectable: can not use as Creator %s", i, candidate);
}
}
properties[i] = constructCreatorProperty(ctxt, beanDesc, name, i, param, injectId);
}
creators.addPropertyCreator(candidate.creator(), true, properties);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _addExplicitPropertyCreator
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
|
_addExplicitPropertyCreator
|
src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java
|
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void setObjects(SolrInputDocument solrDocument, Locale locale, XWikiDocument originalDocument)
{
for (Map.Entry<DocumentReference, List<BaseObject>> objects : originalDocument.getXObjects().entrySet()) {
boolean hasObjectsOfThisType = false;
for (BaseObject object : objects.getValue()) {
// Yes, the old core can return null objects.
hasObjectsOfThisType |= object != null;
setObjectContent(solrDocument, object, locale);
}
if (hasObjectsOfThisType) {
solrDocument.addField(FieldUtils.CLASS, localSerializer.serialize(objects.getKey()));
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setObjects
File: xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/internal/metadata/DocumentSolrMetadataExtractor.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-312",
"CWE-200"
] |
CVE-2023-50719
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
setObjects
|
xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/internal/metadata/DocumentSolrMetadataExtractor.java
|
3e5272f2ef0dff06a8f4db10afd1949b2f9e6eea
| 0
|
Analyze the following code function for security vulnerabilities
|
public SSHClient getConnectedClient() throws IOException {
return getConnectedClient(new DefaultConfig());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getConnectedClient
File: src/itest/java/com/hierynomus/sshj/SshdContainer.java
Repository: hierynomus/sshj
The code follows secure coding practices.
|
[
"CWE-354"
] |
CVE-2023-48795
|
MEDIUM
| 5.9
|
hierynomus/sshj
|
getConnectedClient
|
src/itest/java/com/hierynomus/sshj/SshdContainer.java
|
94fcc960e0fb198ddec0f7efc53f95ac627fe083
| 0
|
Analyze the following code function for security vulnerabilities
|
public static Document parseDocument(java.io.Reader is) throws XMLException {
return parseDocument(new InputSource(is));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseDocument
File: bundles/org.jkiss.utils/src/org/jkiss/utils/xml/XMLUtils.java
Repository: dbeaver
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-3836
|
MEDIUM
| 4.3
|
dbeaver
|
parseDocument
|
bundles/org.jkiss.utils/src/org/jkiss/utils/xml/XMLUtils.java
|
4debf8f25184b7283681ed3fb5e9e887d9d4fe22
| 0
|
Analyze the following code function for security vulnerabilities
|
@NonNull
public Builder setOngoing(boolean ongoing) {
setFlag(FLAG_ONGOING_EVENT, ongoing);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setOngoing
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
setOngoing
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void onWindowVisibilityChanged(int visibility) {
super.onWindowVisibilityChanged(visibility);
if (visibility == View.GONE && isFocused()) mShowKeyboardOnWindowFocus = true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onWindowVisibilityChanged
File: chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-254"
] |
CVE-2016-5163
|
MEDIUM
| 4.3
|
chromium
|
onWindowVisibilityChanged
|
chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java
|
3bd33fee094e863e5496ac24714c558bd58d28ef
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean existsFile(String fileName) {
File file = new File(fileDir + demoPath + fileName);
return file.exists();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: existsFile
File: server/src/main/java/cn/keking/web/controller/FileController.java
Repository: kekingcn/kkFileView
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-36593
|
MEDIUM
| 6.5
|
kekingcn/kkFileView
|
existsFile
|
server/src/main/java/cn/keking/web/controller/FileController.java
|
86960e38135f551e8343d44caf4bac0a66234657
| 0
|
Analyze the following code function for security vulnerabilities
|
void reject(Call call, boolean rejectWithMessage, String message) {
final String callId = mCallIdMapper.getCallId(call);
if (callId != null && isServiceValid("reject")) {
try {
logOutgoing("reject %s", callId);
if (rejectWithMessage && call.can(
Connection.CAPABILITY_CAN_SEND_RESPONSE_VIA_CONNECTION)) {
mServiceInterface.rejectWithMessage(callId, message,
Log.getExternalSession(TELECOM_ABBREVIATION));
} else {
mServiceInterface.reject(callId, Log.getExternalSession(TELECOM_ABBREVIATION));
}
} catch (RemoteException e) {
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: reject
File: src/com/android/server/telecom/ConnectionServiceWrapper.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
reject
|
src/com/android/server/telecom/ConnectionServiceWrapper.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
public ArrayList<SyncHistoryItem> getSyncHistory() {
synchronized (mAuthorities) {
final int N = mSyncHistory.size();
ArrayList<SyncHistoryItem> items = new ArrayList<SyncHistoryItem>(N);
for (int i=0; i<N; i++) {
items.add(mSyncHistory.get(i));
}
return items;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSyncHistory
File: services/core/java/com/android/server/content/SyncStorageEngine.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2016-2424
|
HIGH
| 7.1
|
android
|
getSyncHistory
|
services/core/java/com/android/server/content/SyncStorageEngine.java
|
d3383d5bfab296ba3adbc121ff8a7b542bde4afb
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void addSessionListener(SessionListener listener) {
SessionListener.validateListener(listener);
// avoid race conditions on notifications while session is being closed
if (!isOpen()) {
log.warn("addSessionListener({})[{}] ignore registration while session is closing", this, listener);
return;
}
if (this.sessionListeners.add(listener)) {
if (log.isTraceEnabled()) {
log.trace("addSessionListener({})[{}] registered", this, listener);
}
} else {
if (log.isTraceEnabled()) {
log.trace("addSessionListener({})[{}] ignored duplicate", this, listener);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addSessionListener
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
|
addSessionListener
|
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 boolean isInQueue() {
return Jenkins.getInstance().getQueue().contains(this);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isInQueue
File: core/src/main/java/hudson/model/AbstractProject.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
isInQueue
|
core/src/main/java/hudson/model/AbstractProject.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
private void startActivityAsUser(Intent intent, UserHandle handle) {
if (isUserSetupComplete()) {
mContext.startActivityAsUser(intent, handle);
} else {
Slog.i(TAG, "Not starting activity because user setup is in progress: " + intent);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startActivityAsUser
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
|
startActivityAsUser
|
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
|
84669ca8de55d38073a0dcb01074233b0a417541
| 0
|
Analyze the following code function for security vulnerabilities
|
public final boolean isRequireStringQuotes ()
{
return m_bRequireStringQuotes;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isRequireStringQuotes
File: ph-json/src/main/java/com/helger/json/parser/JsonParser.java
Repository: phax/ph-commons
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-34612
|
HIGH
| 7.5
|
phax/ph-commons
|
isRequireStringQuotes
|
ph-json/src/main/java/com/helger/json/parser/JsonParser.java
|
02a4d034dcfb2b6e1796b25f519bf57a6796edce
| 0
|
Analyze the following code function for security vulnerabilities
|
public static byte[] compress(short[] input)
throws IOException
{
return rawCompress(input, input.length * 2); // short uses 2 bytes
}
|
Vulnerability Classification:
- CWE: CWE-190
- CVE: CVE-2023-34454
- Severity: HIGH
- CVSS Score: 7.5
Description: Merge pull request from GHSA-fjpj-2g6w-x25r
* Fixed integer overflow by checking if bytesize is bigger than input length, then throwing exception
* Fixed integer overflow by checking if bytesize is bigger than input length, then throwing exception
* Fixed integer overflow by checking if bytesize is bigger than input length, then throwing exception
* improved error messages by adding new error enum INPUT_TOO_LARGE in SnappyErrorCode.java, and added happy and sad cases in SnappyTest.java
* fixed mispelling: validArrayInputLength --> isInvalidArrayInputLength
* switched SnappyError into ILLEGAL_ARGUMENT in SnappyErrorCode.java and Snappy.java and fixed a typo in error comment
* Fix buffer size boundary tests
* Remove negative array size tests
* updated comments for unit test
---------
Co-authored-by: Taro L. Saito <leo@xerial.org>
Function: compress
File: src/main/java/org/xerial/snappy/Snappy.java
Repository: xerial/snappy-java
Fixed Code:
public static byte[] compress(short[] input)
throws IOException
{
int byteSize = input.length * 2;
if (byteSize < input.length) {
throw new SnappyError(SnappyErrorCode.TOO_LARGE_INPUT, "input array size is too large: " + input.length);
}
return rawCompress(input, byteSize); // short uses 2 bytes
}
|
[
"CWE-190"
] |
CVE-2023-34454
|
HIGH
| 7.5
|
xerial/snappy-java
|
compress
|
src/main/java/org/xerial/snappy/Snappy.java
|
d0042551e4a3509a725038eb9b2ad1f683674d94
| 1
|
Analyze the following code function for security vulnerabilities
|
private Predicate<ShortcutInfo> getFilterFromQuery(@Nullable ArraySet<String> ids,
@Nullable List<LocusId> locusIds, long changedSince,
@Nullable ComponentName componentName, int queryFlags,
boolean getPinnedByAnyLauncher) {
final ArraySet<LocusId> locIds = locusIds == null ? null
: new ArraySet<>(locusIds);
final boolean matchDynamic = (queryFlags & ShortcutQuery.FLAG_MATCH_DYNAMIC) != 0;
final boolean matchPinned = (queryFlags & ShortcutQuery.FLAG_MATCH_PINNED) != 0;
final boolean matchManifest = (queryFlags & ShortcutQuery.FLAG_MATCH_MANIFEST) != 0;
final boolean matchCached = (queryFlags & ShortcutQuery.FLAG_MATCH_CACHED) != 0;
return si -> {
if (si.getLastChangedTimestamp() < changedSince) {
return false;
}
if (ids != null && !ids.contains(si.getId())) {
return false;
}
if (locIds != null && !locIds.contains(si.getLocusId())) {
return false;
}
if (componentName != null) {
if (si.getActivity() != null
&& !si.getActivity().equals(componentName)) {
return false;
}
}
if (matchDynamic && si.isDynamic()) {
return true;
}
if ((matchPinned || getPinnedByAnyLauncher) && si.isPinned()) {
return true;
}
if (matchManifest && si.isDeclaredInManifest()) {
return true;
}
if (matchCached && si.isCached()) {
return true;
}
return false;
};
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFilterFromQuery
File: services/core/java/com/android/server/pm/ShortcutService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40079
|
HIGH
| 7.8
|
android
|
getFilterFromQuery
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isActiveSupervisionApp(int uid) {
if (!isProfileOwner(new CallerIdentity(uid, null, null))) {
return false;
}
synchronized (getLockObject()) {
final ActiveAdmin admin = getProfileOwnerAdminLocked(UserHandle.getUserId(uid));
if (admin == null) {
return false;
}
return isSupervisionComponentLocked(admin.info.getComponent());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isActiveSupervisionApp
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
|
isActiveSupervisionApp
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void sendError(int arg0) throws IOException {
// ignore
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendError
File: h2/src/test/org/h2/test/server/TestWeb.java
Repository: h2database
The code follows secure coding practices.
|
[
"CWE-312"
] |
CVE-2022-45868
|
HIGH
| 7.8
|
h2database
|
sendError
|
h2/src/test/org/h2/test/server/TestWeb.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 0
|
Analyze the following code function for security vulnerabilities
|
@NonNull
public Builder setActions(Action... actions) {
mActions.clear();
for (int i = 0; i < actions.length; i++) {
if (actions[i] != null) {
mActions.add(actions[i]);
}
}
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setActions
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
setActions
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
private void applyLidSwitchState() {
if (mLidState == LID_CLOSED && mLidControlsSleep) {
mPowerManager.goToSleep(SystemClock.uptimeMillis(),
PowerManager.GO_TO_SLEEP_REASON_LID_SWITCH,
PowerManager.GO_TO_SLEEP_FLAG_NO_DOZE);
}
synchronized (mLock) {
updateWakeGestureListenerLp();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: applyLidSwitchState
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
|
applyLidSwitchState
|
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
|
84669ca8de55d38073a0dcb01074233b0a417541
| 0
|
Analyze the following code function for security vulnerabilities
|
@GET
@Path("{configClass}")
@Produces(MoreMediaTypes.APPLICATION_SCHEMA_JSON)
@ApiOperation(value = "Get JSON schema of configuration class")
@Timed
@RequiresPermissions(RestPermissions.CLUSTER_CONFIG_ENTRY_READ)
public JsonSchema schema(@ApiParam(name = "configClass", value = "The name of the cluster configuration class", required = true)
@PathParam("configClass") @NotBlank String configClass) {
final Class<?> cls = classFromName(configClass);
if (cls == null) {
throw new NotFoundException(createNoClassMsg(configClass));
}
final SchemaFactoryWrapper visitor = new SchemaFactoryWrapper();
try {
objectMapper.acceptJsonFormatVisitor(objectMapper.constructType(cls), visitor);
} catch (JsonMappingException e) {
throw new InternalServerErrorException("Couldn't generate JSON schema for configuration class " + configClass, e);
}
return visitor.finalSchema();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: schema
File: graylog2-server/src/main/java/org/graylog2/rest/resources/system/ClusterConfigResource.java
Repository: Graylog2/graylog2-server
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2024-24824
|
HIGH
| 8.8
|
Graylog2/graylog2-server
|
schema
|
graylog2-server/src/main/java/org/graylog2/rest/resources/system/ClusterConfigResource.java
|
75ef2b8d60e7d67f859b79fe712c8ae7b2e861d8
| 0
|
Analyze the following code function for security vulnerabilities
|
private void addToLabelMap(HashMap<String, String> labelMap,
String srcLabel, String dstLabel, String toolNames) {
if (srcLabel != null && dstLabel != null) {
for (String tool : toolNames.split(";")) {
labelMap.put(srcLabel + ":" + tool, dstLabel);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addToLabelMap
File: src/com/cburch/logisim/file/XmlReader.java
Repository: logisim-evolution
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000889
|
MEDIUM
| 6.8
|
logisim-evolution
|
addToLabelMap
|
src/com/cburch/logisim/file/XmlReader.java
|
90aee8f8ceef463884cc400af4f6d1f109fb0972
| 0
|
Analyze the following code function for security vulnerabilities
|
private void mergeDppSecurityParamsWithInternalWifiConfiguration(
WifiConfiguration internalConfig, WifiConfiguration externalConfig) {
// Do not update for non-DPP network
if (!externalConfig.isSecurityType(WifiConfiguration.SECURITY_TYPE_DPP)) {
return;
}
if (externalConfig.getDppConnector().length != 0
&& externalConfig.getDppCSignKey().length != 0
&& externalConfig.getDppNetAccessKey().length != 0) {
internalConfig.setDppConnectionKeys(externalConfig.getDppConnector(),
externalConfig.getDppCSignKey(), externalConfig.getDppNetAccessKey());
}
if (externalConfig.getDppPrivateEcKey().length != 0) {
internalConfig.setDppConfigurator(externalConfig.getDppPrivateEcKey());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: mergeDppSecurityParamsWithInternalWifiConfiguration
File: service/java/com/android/server/wifi/WifiConfigManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
mergeDppSecurityParamsWithInternalWifiConfiguration
|
service/java/com/android/server/wifi/WifiConfigManager.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
public void registerLocalConverter(Class definedIn, String fieldName, Converter converter) {
if (localConversionMapper == null) {
throw new com.thoughtworks.xstream.InitializationException("No "
+ LocalConversionMapper.class.getName()
+ " available");
}
localConversionMapper.registerLocalConverter(definedIn, fieldName, converter);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: registerLocalConverter
File: xstream/src/java/com/thoughtworks/xstream/XStream.java
Repository: x-stream/xstream
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-43859
|
MEDIUM
| 5
|
x-stream/xstream
|
registerLocalConverter
|
xstream/src/java/com/thoughtworks/xstream/XStream.java
|
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Map<KexProposalOption, String> getServerKexProposals() {
return unmodServerProposal;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getServerKexProposals
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
|
getServerKexProposals
|
sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
|
6b0fd46f64bcb75eeeee31d65f10242660aad7c1
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
CallerIdentity getCallerIdentity(@Nullable ComponentName adminComponent) {
return getCallerIdentity(adminComponent, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCallerIdentity
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
|
getCallerIdentity
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public synchronized ReadyState getReadyState() {
return this.readyState;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getReadyState
File: Testing/src/main/java/org/loboevolution/html/test/SimpleHttpRequest.java
Repository: LoboEvolution
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000540
|
MEDIUM
| 6.8
|
LoboEvolution
|
getReadyState
|
Testing/src/main/java/org/loboevolution/html/test/SimpleHttpRequest.java
|
9b75694cedfa4825d4a2330abf2719d470c654cd
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getFullName()
{
return getLocalEntityReferenceSerializer().serialize(this.doc.getDocumentReference());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFullName
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-23615
|
MEDIUM
| 5.5
|
xwiki/xwiki-platform
|
getFullName
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
|
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isPreExpandValueSets() {
return myPreExpandValueSets;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isPreExpandValueSets
File: hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
Repository: hapifhir/hapi-fhir
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-32053
|
MEDIUM
| 5
|
hapifhir/hapi-fhir
|
isPreExpandValueSets
|
hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
|
f2934b229c491235ab0e7782dea86b324521082a
| 0
|
Analyze the following code function for security vulnerabilities
|
void initPowerManagement() {
PowerManager pm = (PowerManager)mService.mContext.getSystemService(Context.POWER_SERVICE);
mGoingToSleep = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "ActivityManager-Sleep");
mLaunchingActivity = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "*launch*");
mLaunchingActivity.setReferenceCounted(false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initPowerManagement
File: services/core/java/com/android/server/am/ActivityStackSupervisor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3838
|
MEDIUM
| 4.3
|
android
|
initPowerManagement
|
services/core/java/com/android/server/am/ActivityStackSupervisor.java
|
468651c86a8adb7aa56c708d2348e99022088af3
| 0
|
Analyze the following code function for security vulnerabilities
|
public PageableResponse<ArticleResponseEntry> page(PageableRequest pageableRequest, String keywords) {
Map<String, Object> data = new Log().find(pageableRequest.getPage(), pageableRequest.getRows(), keywords, pageableRequest.getOrder(), pageableRequest.getSort());
wrapperSearchKeyword(data, keywords);
return ZrLogUtil.convertPageable(data, ArticleResponseEntry.class);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: page
File: service/src/main/java/com/zrlog/service/ArticleService.java
Repository: 94fzb/zrlog
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-16643
|
LOW
| 3.5
|
94fzb/zrlog
|
page
|
service/src/main/java/com/zrlog/service/ArticleService.java
|
4a91c83af669e31a22297c14f089d8911d353fa1
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String parseCategory(String entity, String value) {
Entity rootEntity = MetadataHelper.getEntity(entity);
Field categoryField = DataListCategory.instance.getFieldOfCategory(rootEntity);
if (categoryField == null || StringUtils.isBlank(value)) return "(9=9)";
DisplayType dt = EasyMetaFactory.getDisplayType(categoryField);
value = StringEscapeUtils.escapeSql(value);
if (dt == DisplayType.MULTISELECT) {
return String.format("%s && %d", categoryField.getName(), ObjectUtils.toInt(value));
} else if (dt == DisplayType.N2NREFERENCE) {
return String.format(
"exists (select recordId from NreferenceItem where ^%s = recordId and belongField = '%s' and referenceId = '%s')",
rootEntity.getPrimaryField().getName(), categoryField.getName(), value);
} else if (dt == DisplayType.DATETIME || dt == DisplayType.DATE) {
String s = value + "0000-01-01 00:00:00".substring(value.length());
String e = value + "0000-12-31 23:59:59".substring(value.length());
if (dt == DisplayType.DATE) {
s = s.split(" ")[0];
e = e.split(" ")[0];
}
return MessageFormat.format("({0} >= ''{1}'' and {0} <= ''{2}'')", categoryField.getName(), s, e);
} else {
return String.format("%s = '%s'", categoryField.getName(), value);
}
}
|
Vulnerability Classification:
- CWE: CWE-89
- CVE: CVE-2023-1495
- Severity: MEDIUM
- CVSS Score: 6.5
Description: H5 sync2 (#595)
* style: 目录样式gh
* style: J_new
* feat: advListFilterTabs
* feat: nav-copyto
* enh: 助记码全拼
* enh: 地图搜索选点
* enh: topnav
* list pn
* .form-line.v33
* open TAG
* KVS addShutdownHook
* fix: #594
---------
Co-authored-by: devezhao <zhaofang123@gmail.com>
Function: parseCategory
File: src/main/java/com/rebuild/core/support/general/ProtocolFilterParser.java
Repository: getrebuild/rebuild
Fixed Code:
protected String parseCategory(String entity, String value) {
Entity rootEntity = MetadataHelper.getEntity(entity);
Field categoryField = DataListCategory.instance.getFieldOfCategory(rootEntity);
if (categoryField == null || StringUtils.isBlank(value)) return "(9=9)";
DisplayType dt = EasyMetaFactory.getDisplayType(categoryField);
value = CommonsUtils.escapeSql(value);
if (dt == DisplayType.MULTISELECT) {
return String.format("%s && %d", categoryField.getName(), ObjectUtils.toInt(value));
} else if (dt == DisplayType.N2NREFERENCE) {
return String.format(
"exists (select recordId from NreferenceItem where ^%s = recordId and belongField = '%s' and referenceId = '%s')",
rootEntity.getPrimaryField().getName(), categoryField.getName(), value);
} else if (dt == DisplayType.DATETIME || dt == DisplayType.DATE) {
String s = value + "0000-01-01 00:00:00".substring(value.length());
String e = value + "0000-12-31 23:59:59".substring(value.length());
if (dt == DisplayType.DATE) {
s = s.split(" ")[0];
e = e.split(" ")[0];
}
return MessageFormat.format("({0} >= ''{1}'' and {0} <= ''{2}'')", categoryField.getName(), s, e);
} else {
return String.format("%s = '%s'", categoryField.getName(), value);
}
}
|
[
"CWE-89"
] |
CVE-2023-1495
|
MEDIUM
| 6.5
|
getrebuild/rebuild
|
parseCategory
|
src/main/java/com/rebuild/core/support/general/ProtocolFilterParser.java
|
c9474f84e5f376dd2ade2078e3039961a9425da7
| 1
|
Analyze the following code function for security vulnerabilities
|
public void setShellArgs( String[] shellArgs )
{
this.shellArgs.clear();
this.shellArgs.addAll( Arrays.asList( shellArgs ) );
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setShellArgs
File: src/main/java/org/codehaus/plexus/util/cli/shell/Shell.java
Repository: codehaus-plexus/plexus-utils
The code follows secure coding practices.
|
[
"CWE-78"
] |
CVE-2017-1000487
|
HIGH
| 7.5
|
codehaus-plexus/plexus-utils
|
setShellArgs
|
src/main/java/org/codehaus/plexus/util/cli/shell/Shell.java
|
b38a1b3a4352303e4312b2bb601a0d7ec6e28f41
| 0
|
Analyze the following code function for security vulnerabilities
|
private void initHostedURI(IDPType idpConfiguration) {
String hostedURI = idpConfiguration.getHostedURI();
if (isNullOrEmpty(hostedURI)) {
hostedURI = "/hosted/";
} else if (!hostedURI.contains(".") && !hostedURI.endsWith("/")) {
// make sure the hosted uri have a slash at the end if it points to a directory
hostedURI = hostedURI + "/";
}
idpConfiguration.setHostedURI(hostedURI);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initHostedURI
File: picketlink-tomcat-common/src/main/java/org/picketlink/identity/federation/bindings/tomcat/idp/AbstractIDPValve.java
Repository: picketlink/picketlink-bindings
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2015-3158
|
MEDIUM
| 4
|
picketlink/picketlink-bindings
|
initHostedURI
|
picketlink-tomcat-common/src/main/java/org/picketlink/identity/federation/bindings/tomcat/idp/AbstractIDPValve.java
|
341a37aefd69e67b6b5f6d775499730d6ccaff0d
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean canShowWhenLocked() {
final TaskFragment taskFragment = getTaskFragment();
if (taskFragment != null && taskFragment.getAdjacentTaskFragment() != null
&& taskFragment.isEmbedded()) {
final TaskFragment adjacentTaskFragment = taskFragment.getAdjacentTaskFragment();
final ActivityRecord r = adjacentTaskFragment.getTopNonFinishingActivity();
return canShowWhenLocked(this) && canShowWhenLocked(r);
} else {
return canShowWhenLocked(this);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: canShowWhenLocked
File: services/core/java/com/android/server/wm/ActivityRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21145
|
HIGH
| 7.8
|
android
|
canShowWhenLocked
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
public Node getNode() {
// Collect inter-document start comments
blockCommentsCollector.collectEvents();
if (parser.checkEvent(Event.ID.StreamEnd)) {
List<CommentLine> commentLines = blockCommentsCollector.consume();
Mark startMark = commentLines.get(0).getStartMark();
List<NodeTuple> children = Collections.emptyList();
Node node = new MappingNode(Tag.COMMENT, false, children, startMark, null, FlowStyle.BLOCK);
node.setBlockComments(commentLines);
return node;
}
// Drop the DOCUMENT-START event.
parser.getEvent();
// Compose the root node.
Node node = composeNode(null);
// Drop the DOCUMENT-END event.
blockCommentsCollector.collectEvents();
if(!blockCommentsCollector.isEmpty()) {
node.setEndComments(blockCommentsCollector.consume());
}
parser.getEvent();
this.anchors.clear();
this.recursiveNodes.clear();
return node;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNode
File: src/main/java/org/yaml/snakeyaml/composer/Composer.java
Repository: snakeyaml
The code follows secure coding practices.
|
[
"CWE-776"
] |
CVE-2022-25857
|
HIGH
| 7.5
|
snakeyaml
|
getNode
|
src/main/java/org/yaml/snakeyaml/composer/Composer.java
|
fc300780da21f4bb92c148bc90257201220cf174
| 0
|
Analyze the following code function for security vulnerabilities
|
public final boolean contains(K name, V value, HashingStrategy<? super V> valueHashingStrategy) {
checkNotNull(name, "name");
int h = hashingStrategy.hashCode(name);
int i = index(h);
HeaderEntry<K, V> e = entries[i];
while (e != null) {
if (e.hash == h && hashingStrategy.equals(name, e.key) && valueHashingStrategy.equals(value, e.value)) {
return true;
}
e = e.next;
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: contains
File: codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-436",
"CWE-113"
] |
CVE-2022-41915
|
MEDIUM
| 6.5
|
netty
|
contains
|
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
|
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
| 0
|
Analyze the following code function for security vulnerabilities
|
public Binding<T, ?> getEditorBinding() {
return editorBinding;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getEditorBinding
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
|
getEditorBinding
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
public String renderTemplate(String template)
{
return this.xwiki.renderTemplate(template, getXWikiContext());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: renderTemplate
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2023-37911
|
MEDIUM
| 6.5
|
xwiki/xwiki-platform
|
renderTemplate
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
|
f471f2a392aeeb9e51d59fdfe1d76fccf532523f
| 0
|
Analyze the following code function for security vulnerabilities
|
protected static SSLParametersImpl getDefault() throws KeyManagementException {
SSLParametersImpl result = defaultParameters;
if (result == null) {
// single-check idiom
defaultParameters = result = new SSLParametersImpl(null,
null,
null,
new ClientSessionContext(),
new ServerSessionContext(),
null);
}
return (SSLParametersImpl) result.clone();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDefault
File: src/main/java/org/conscrypt/SSLParametersImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3840
|
HIGH
| 10
|
android
|
getDefault
|
src/main/java/org/conscrypt/SSLParametersImpl.java
|
5af5e93463f4333187e7e35f3bd2b846654aa214
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean removeUser(@NonNull ComponentName admin, @NonNull UserHandle userHandle) {
throwIfParentInstance("removeUser");
try {
return mService.removeUser(admin, userHandle);
} catch (RemoteException re) {
throw re.rethrowFromSystemServer();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeUser
File: core/java/android/app/admin/DevicePolicyManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
removeUser
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Map<KexProposalOption, String> getClientKexProposals() {
return unmodClientProposal;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getClientKexProposals
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
|
getClientKexProposals
|
sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
|
6b0fd46f64bcb75eeeee31d65f10242660aad7c1
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
@CanIgnoreReturnValue
public MergeTarget addRepeatedField(Descriptors.FieldDescriptor field, Object value) {
extensions.addRepeatedField(field, value);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addRepeatedField
File: java/core/src/main/java/com/google/protobuf/MessageReflection.java
Repository: protocolbuffers/protobuf
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2022-3509
|
HIGH
| 7.5
|
protocolbuffers/protobuf
|
addRepeatedField
|
java/core/src/main/java/com/google/protobuf/MessageReflection.java
|
a3888f53317a8018e7a439bac4abeb8f3425d5e9
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void deleteTaskFiles(String targetFilepath, String tempFilePath) {
deleteTempFile(tempFilePath);
deleteTargetFile(targetFilepath);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deleteTaskFiles
File: library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java
Repository: lingochamp/FileDownloader
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-11248
|
HIGH
| 7.5
|
lingochamp/FileDownloader
|
deleteTaskFiles
|
library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java
|
b023cc081bbecdd2a9f3549a3ae5c12a9647ed7f
| 0
|
Analyze the following code function for security vulnerabilities
|
private void sendDrawableUpdatedBroadcast(List<String> drawableIds) {
sendResourceUpdatedBroadcast(EXTRA_RESOURCE_TYPE_DRAWABLE, drawableIds);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendDrawableUpdatedBroadcast
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
|
sendDrawableUpdatedBroadcast
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
static List<String> findMissingFields(final MessageOrBuilder message) {
final List<String> results = new ArrayList<String>();
findMissingFields(message, "", results);
return results;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findMissingFields
File: java/core/src/main/java/com/google/protobuf/MessageReflection.java
Repository: protocolbuffers/protobuf
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2022-3509
|
HIGH
| 7.5
|
protocolbuffers/protobuf
|
findMissingFields
|
java/core/src/main/java/com/google/protobuf/MessageReflection.java
|
a3888f53317a8018e7a439bac4abeb8f3425d5e9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getInterruptionFilterFromListener(INotificationListener token)
throws RemoteException {
synchronized (mNotificationLight) {
return mInterruptionFilter;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInterruptionFilterFromListener
File: services/core/java/com/android/server/notification/NotificationManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3884
|
MEDIUM
| 4.3
|
android
|
getInterruptionFilterFromListener
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void stop(String packageName) {
mSessionCb.stop(packageName, Binder.getCallingPid(), Binder.getCallingUid());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: stop
File: services/core/java/com/android/server/media/MediaSessionRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21280
|
MEDIUM
| 5.5
|
android
|
stop
|
services/core/java/com/android/server/media/MediaSessionRecord.java
|
06e772e05514af4aa427641784c5eec39a892ed3
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String getImages(String input) {
String result = "";
String regex = "(\\!\\[.*?\\]\\((.*?)\\))";
if (StringUtils.isBlank(input)) {
return result;
}
Matcher matcher = Pattern.compile(regex).matcher(input);
while (matcher.find()) {
result += matcher.group();
}
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getImages
File: test-track/backend/src/main/java/io/metersphere/service/issue/platform/AbstractIssuePlatform.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2022-23544
|
MEDIUM
| 6.1
|
metersphere
|
getImages
|
test-track/backend/src/main/java/io/metersphere/service/issue/platform/AbstractIssuePlatform.java
|
d0f95b50737c941b29d507a4cc3545f2dc6ab121
| 0
|
Analyze the following code function for security vulnerabilities
|
private void wipeDataInternal(int flags, @NonNull String wipeReasonForUser,
boolean factoryReset) {
if (mService != null) {
try {
mService.wipeDataWithReason(mContext.getPackageName(), flags, wipeReasonForUser,
mParentInstance, factoryReset);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: wipeDataInternal
File: core/java/android/app/admin/DevicePolicyManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
wipeDataInternal
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public static ImportedFiles createImportedFiles(AParentFolder newCurrentDir) {
return new ImportedFiles(new ArrayList<SFile>(), newCurrentDir);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createImportedFiles
File: src/net/sourceforge/plantuml/preproc/ImportedFiles.java
Repository: plantuml
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2023-3431
|
MEDIUM
| 5.3
|
plantuml
|
createImportedFiles
|
src/net/sourceforge/plantuml/preproc/ImportedFiles.java
|
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test (expected = IllegalArgumentException.class)
public void parseQueryMTypeWGroupByNoSuchFilter() throws Exception {
HttpQuery query = NettyMocks.getQuery(tsdb,
"/api/query?start=1h-ago&m=sum:sys.cpu.0{host=nosuchfilter(*tsort)}"
+ "{host=dummyfilter(*quirm)}");
parseQuery.invoke(rpc, tsdb, query, expressions);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseQueryMTypeWGroupByNoSuchFilter
File: test/tsd/TestQueryRpc.java
Repository: OpenTSDB/opentsdb
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-25827
|
MEDIUM
| 6.1
|
OpenTSDB/opentsdb
|
parseQueryMTypeWGroupByNoSuchFilter
|
test/tsd/TestQueryRpc.java
|
ff02c1e95e60528275f69b31bcbf7b2ac625cea8
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getArchivePathName(ProjectLocator projectLocator) {
String defaultDirString = projectLocator.getLocation();
String dirString = Preferences.getProperty(LAST_ARCHIVE_DIR, defaultDirString);
String dateString = formatter.format(new Date());
String projectName = projectLocator.getName();
if (!dirString.endsWith(File.separator)) {
dirString = dirString + File.separator;
}
return dirString + projectName + "_" + dateString + ArchivePlugin.ARCHIVE_EXTENSION;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getArchivePathName
File: Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/archive/ArchivePlugin.java
Repository: NationalSecurityAgency/ghidra
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2019-13623
|
MEDIUM
| 6.8
|
NationalSecurityAgency/ghidra
|
getArchivePathName
|
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/archive/ArchivePlugin.java
|
6c0171c9200b4490deb94abf3c92d1b3da59f9bf
| 0
|
Analyze the following code function for security vulnerabilities
|
public Object parseValue(String input) {
if (input == null || input.trim().isEmpty()) return defaultValue;
if (listType != null) return listType.parseList(input);
return type.parse(input);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseValue
File: core/src/main/java/apoc/export/graphml/XmlGraphMLReader.java
Repository: neo4j/apoc
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2023-23926
|
HIGH
| 8.1
|
neo4j/apoc
|
parseValue
|
core/src/main/java/apoc/export/graphml/XmlGraphMLReader.java
|
3202b421b21973b2f57a43b33c88f3f6901cfd2a
| 0
|
Analyze the following code function for security vulnerabilities
|
void setDevicePolicySafetyChecker(DevicePolicySafetyChecker safetyChecker) {
mSafetyChecker = safetyChecker;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDevicePolicySafetyChecker
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
|
setDevicePolicySafetyChecker
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
private void createHotRodCache() {
createHotRodCache(startHotRodServer(cacheManager));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createHotRodCache
File: integrationtests/compatibility-mode-it/src/test/java/org/infinispan/it/compatibility/CompatibilityCacheFactory.java
Repository: infinispan
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2017-15089
|
MEDIUM
| 6.5
|
infinispan
|
createHotRodCache
|
integrationtests/compatibility-mode-it/src/test/java/org/infinispan/it/compatibility/CompatibilityCacheFactory.java
|
69be66141eee7abb1c47d46f0a6b74b079709f4b
| 0
|
Analyze the following code function for security vulnerabilities
|
protected float getHeaderTranslation() {
if (mStatusBar.getBarState() == StatusBarState.KEYGUARD) {
return 0;
}
float translation = NotificationUtils.interpolate(-mQsMinExpansionHeight, 0,
mNotificationStackScroller.getAppearFraction(mExpandedHeight));
return Math.min(0, translation);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getHeaderTranslation
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
getHeaderTranslation
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isDeviceProvisioningConfigApplied() {
Preconditions.checkCallAuthorization(canManageUsers(getCallerIdentity()));
synchronized (getLockObject()) {
final DevicePolicyData policy = getUserData(UserHandle.USER_SYSTEM);
return policy.mDeviceProvisioningConfigApplied;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isDeviceProvisioningConfigApplied
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
|
isDeviceProvisioningConfigApplied
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
private MacAddress getMacAddressFromBssidString(@Nullable String bssidStr) {
try {
return (bssidStr != null) ? MacAddress.fromString(bssidStr) : null;
} catch (IllegalArgumentException e) {
Log.e(getTag(), "Invalid BSSID format: " + bssidStr);
return null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMacAddressFromBssidString
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
|
getMacAddressFromBssidString
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
private void cleanupDisabledPackageComponentsLocked(
String packageName, int userId, boolean killProcess, String[] changedClasses) {
Set<String> disabledClasses = null;
boolean packageDisabled = false;
IPackageManager pm = AppGlobals.getPackageManager();
if (changedClasses == null) {
// Nothing changed...
return;
}
// Determine enable/disable state of the package and its components.
int enabled = PackageManager.COMPONENT_ENABLED_STATE_DEFAULT;
for (int i = changedClasses.length - 1; i >= 0; i--) {
final String changedClass = changedClasses[i];
if (changedClass.equals(packageName)) {
try {
// Entire package setting changed
enabled = pm.getApplicationEnabledSetting(packageName,
(userId != UserHandle.USER_ALL) ? userId : UserHandle.USER_SYSTEM);
} catch (Exception e) {
// No such package/component; probably racing with uninstall. In any
// event it means we have nothing further to do here.
return;
}
packageDisabled = enabled != PackageManager.COMPONENT_ENABLED_STATE_ENABLED
&& enabled != PackageManager.COMPONENT_ENABLED_STATE_DEFAULT;
if (packageDisabled) {
// Entire package is disabled.
// No need to continue to check component states.
disabledClasses = null;
break;
}
} else {
try {
enabled = pm.getComponentEnabledSetting(
new ComponentName(packageName, changedClass),
(userId != UserHandle.USER_ALL) ? userId : UserHandle.USER_SYSTEM);
} catch (Exception e) {
// As above, probably racing with uninstall.
return;
}
if (enabled != PackageManager.COMPONENT_ENABLED_STATE_ENABLED
&& enabled != PackageManager.COMPONENT_ENABLED_STATE_DEFAULT) {
if (disabledClasses == null) {
disabledClasses = new ArraySet<>(changedClasses.length);
}
disabledClasses.add(changedClass);
}
}
}
if (!packageDisabled && disabledClasses == null) {
// Nothing to do here...
return;
}
// Clean-up disabled activities.
if (mStackSupervisor.finishDisabledPackageActivitiesLocked(
packageName, disabledClasses, true, false, userId) && mBooted) {
mStackSupervisor.resumeFocusedStackTopActivityLocked();
mStackSupervisor.scheduleIdleLocked();
}
// Clean-up disabled tasks
cleanupDisabledPackageTasksLocked(packageName, disabledClasses, userId);
// Clean-up disabled services.
mServices.bringDownDisabledPackageServicesLocked(
packageName, disabledClasses, userId, false, killProcess, true);
// Clean-up disabled providers.
ArrayList<ContentProviderRecord> providers = new ArrayList<>();
mProviderMap.collectPackageProvidersLocked(
packageName, disabledClasses, true, false, userId, providers);
for (int i = providers.size() - 1; i >= 0; i--) {
removeDyingProviderLocked(null, providers.get(i), true);
}
// Clean-up disabled broadcast receivers.
for (int i = mBroadcastQueues.length - 1; i >= 0; i--) {
mBroadcastQueues[i].cleanupDisabledPackageReceiversLocked(
packageName, disabledClasses, userId, true);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cleanupDisabledPackageComponentsLocked
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3912
|
HIGH
| 9.3
|
android
|
cleanupDisabledPackageComponentsLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
private synchronized List<Trigger<?>> triggers() {
if (triggers == null) {
triggers = new Vector<Trigger<?>>();
}
return triggers;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: triggers
File: core/src/main/java/hudson/model/AbstractProject.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
triggers
|
core/src/main/java/hudson/model/AbstractProject.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setShortcutHostPackage(@NonNull String type, @Nullable String packageName,
int userId) {
ShortcutService.this.setShortcutHostPackage(type, packageName, userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setShortcutHostPackage
File: services/core/java/com/android/server/pm/ShortcutService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40079
|
HIGH
| 7.8
|
android
|
setShortcutHostPackage
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void fillSerializers(final Node node, SerializationConfig serializationConfig) {
for (Node child : childElements(node)) {
final String name = cleanNodeName(child);
final String value = getTextContent(child);
if ("serializer".equals(name)) {
SerializerConfig serializerConfig = new SerializerConfig();
final String typeClassName = getAttribute(child, "type-class");
final String className = getAttribute(child, "class-name");
serializerConfig.setTypeClassName(typeClassName);
serializerConfig.setClassName(className);
serializationConfig.addSerializerConfig(serializerConfig);
} else if ("global-serializer".equals(name)) {
GlobalSerializerConfig globalSerializerConfig = new GlobalSerializerConfig();
globalSerializerConfig.setClassName(value);
String attrValue = getAttribute(child, "override-java-serialization");
boolean overrideJavaSerialization = attrValue != null && getBooleanValue(attrValue.trim());
globalSerializerConfig.setOverrideJavaSerialization(overrideJavaSerialization);
serializationConfig.setGlobalSerializerConfig(globalSerializerConfig);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fillSerializers
File: hazelcast/src/main/java/com/hazelcast/config/AbstractXmlConfigHelper.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
fillSerializers
|
hazelcast/src/main/java/com/hazelcast/config/AbstractXmlConfigHelper.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public ScheduleBuilder<?> getScheduleBuilder() {
return SimpleScheduleBuilder.repeatMinutelyForever();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getScheduleBuilder
File: server-core/src/main/java/io/onedev/server/entitymanager/impl/DefaultProjectManager.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2022-39205
|
CRITICAL
| 9.8
|
theonedev/onedev
|
getScheduleBuilder
|
server-core/src/main/java/io/onedev/server/entitymanager/impl/DefaultProjectManager.java
|
f1e97688e4e19d6de1dfa1d00e04655209d39f8e
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("unchecked")
static <V> ConvertibleValues<V> empty() {
return ConvertibleValues.EMPTY;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: empty
File: core/src/main/java/io/micronaut/core/convert/value/ConvertibleValues.java
Repository: micronaut-projects/micronaut-core
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-21700
|
MEDIUM
| 5
|
micronaut-projects/micronaut-core
|
empty
|
core/src/main/java/io/micronaut/core/convert/value/ConvertibleValues.java
|
b8ec32c311689667c69ae7d9f9c3b3a8abc96fe3
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setTitle(String title)
{
if (title != null && !title.equals(this.title)) {
// Document titles usually contain velocity script, so it is not enough to set the metadata dirty, since we
// want to content author to be updated for programming or script rights to be updated.
setContentDirty(true);
}
this.title = title;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setTitle
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-26470
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
setTitle
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
public void taskBack(TaskEntity currentTaskEntity, Map<String, Object> variables) {
ActivityImpl activity = (ActivityImpl) ProcessDefUtils
.getActivity(processEngine, currentTaskEntity.getProcessDefinitionId(), currentTaskEntity.getTaskDefinitionKey())
.getIncomingTransitions().get(0).getSource();
jumpTask(currentTaskEntity, activity, variables);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: taskBack
File: src/main/java/com/thinkgem/jeesite/modules/act/service/ActTaskService.java
Repository: thinkgem/jeesite
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2023-34601
|
CRITICAL
| 9.8
|
thinkgem/jeesite
|
taskBack
|
src/main/java/com/thinkgem/jeesite/modules/act/service/ActTaskService.java
|
30750011b49f7c8d45d0f3ab13ed3a1a422655bb
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean equals(Object thatObject) {
if (this == thatObject) {
return true;
}
if (!(thatObject instanceof Policy)) {
return false;
}
Policy that = (Policy) thatObject;
return mMinHomeDownlinkBandwidth == that.mMinHomeDownlinkBandwidth
&& mMinHomeUplinkBandwidth == that.mMinHomeUplinkBandwidth
&& mMinRoamingDownlinkBandwidth == that.mMinRoamingDownlinkBandwidth
&& mMinRoamingUplinkBandwidth == that.mMinRoamingUplinkBandwidth
&& Arrays.equals(mExcludedSsidList, that.mExcludedSsidList)
&& (mRequiredProtoPortMap == null ? that.mRequiredProtoPortMap == null
: mRequiredProtoPortMap.equals(that.mRequiredProtoPortMap))
&& mMaximumBssLoadValue == that.mMaximumBssLoadValue
&& (mPreferredRoamingPartnerList == null
? that.mPreferredRoamingPartnerList == null
: mPreferredRoamingPartnerList.equals(that.mPreferredRoamingPartnerList))
&& (mPolicyUpdate == null ? that.mPolicyUpdate == null
: mPolicyUpdate.equals(that.mPolicyUpdate));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: equals
File: framework/java/android/net/wifi/hotspot2/pps/Policy.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21240
|
MEDIUM
| 5.5
|
android
|
equals
|
framework/java/android/net/wifi/hotspot2/pps/Policy.java
|
69119d1d3102e27b6473c785125696881bce9563
| 0
|
Analyze the following code function for security vulnerabilities
|
void registerDisconnected() {
if (mLastNetworkId != WifiConfiguration.INVALID_NETWORK_ID) {
mWifiConfigManager.updateNetworkAfterDisconnect(mLastNetworkId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: registerDisconnected
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
|
registerDisconnected
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
protected boolean getNeedClientAuth() {
return need_client_auth;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNeedClientAuth
File: src/main/java/org/conscrypt/SSLParametersImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3840
|
HIGH
| 10
|
android
|
getNeedClientAuth
|
src/main/java/org/conscrypt/SSLParametersImpl.java
|
5af5e93463f4333187e7e35f3bd2b846654aa214
| 0
|
Analyze the following code function for security vulnerabilities
|
public static PdfObject getPdfObject(PdfObject obj, PdfObject parent) {
if (obj == null)
return null;
if (!obj.isIndirect()) {
PRIndirectReference ref = null;
if (parent != null && (ref = parent.getIndRef()) != null && ref.getReader().isAppendable()) {
switch (obj.type()) {
case PdfObject.m_NULL: // ssteward
obj = new PdfNull();
break;
case PdfObject.BOOLEAN:
obj = new PdfBoolean(((PdfBoolean)obj).booleanValue());
break;
case PdfObject.NAME:
obj = new PdfName(obj.getBytes());
break;
}
obj.setIndRef(ref);
}
return obj;
}
return getPdfObject(obj);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPdfObject
File: java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
Repository: pdftk-java/pdftk
The code follows secure coding practices.
|
[
"CWE-835"
] |
CVE-2021-37819
|
HIGH
| 7.5
|
pdftk-java/pdftk
|
getPdfObject
|
java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
|
9b0cbb76c8434a8505f02ada02a94263dcae9247
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void stopEditing(final boolean forceVKBClose){
if (getActivity() == null) {
return;
}
final boolean[] flag = new boolean[]{false};
// InPlaceEditView.endEdit must be called from the UI thread.
// We must wait for this call to be over, otherwise Codename One's painting
// of the next form will be garbled.
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
// Must be called from the UI thread
InPlaceEditView.stopEdit(forceVKBClose);
synchronized (flag) {
flag[0] = true;
flag.notify();
}
}
});
if (!flag[0]) {
// Wait (if necessary) for the asynchronous runOnUiThread to do its work
synchronized (flag) {
try {
flag.wait();
} catch (InterruptedException e) {
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: stopEditing
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
|
stopEditing
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
AndroidImplementation.setActivity(this);
AndroidNativeUtil.onCreate(savedInstanceState);
if (android.os.Build.VERSION.SDK_INT >= 11) {
getWindow().requestFeature(Window.FEATURE_ACTION_BAR);
getActionBar().hide();
}
try {
if (isBillingEnabled()) {
String k = getBase64EncodedPublicKey();
if(k.length() == 0){
Log.e("Codename One", "android.licenseKey base64 is not configured");
}
getBillingSupport().initBilling();
}
} catch (Throwable t) {
// might happen if billing permissions are missing
System.out.print("This exception is totally valid and here only for debugging purposes");
t.printStackTrace();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onCreate
File: Ports/Android/src/com/codename1/impl/android/CodenameOneActivity.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
onCreate
|
Ports/Android/src/com/codename1/impl/android/CodenameOneActivity.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
void signalFullBackupRestoreCompletion(FullParams params) {
synchronized (params.latch) {
params.latch.set(true);
params.latch.notifyAll();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: signalFullBackupRestoreCompletion
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
|
signalFullBackupRestoreCompletion
|
services/backup/java/com/android/server/backup/BackupManagerService.java
|
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isDeviceOwnerInCallingUser(String packageName) {
final ComponentName deviceOwnerInCallingUser =
DevicePolicyManagerService.this.getDeviceOwnerComponent(
/* callingUserOnly= */ true);
return deviceOwnerInCallingUser != null
&& packageName.equals(deviceOwnerInCallingUser.getPackageName());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isDeviceOwnerInCallingUser
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
|
isDeviceOwnerInCallingUser
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public byte[] engineUpdate(
byte[] input,
int inputOffset,
int inputLen)
{
buffer.write(input, inputOffset, inputLen);
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: engineUpdate
File: prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/ec/IESCipher.java
Repository: bcgit/bc-java
The code follows secure coding practices.
|
[
"CWE-361"
] |
CVE-2016-1000345
|
MEDIUM
| 4.3
|
bcgit/bc-java
|
engineUpdate
|
prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/ec/IESCipher.java
|
21dcb3d9744c83dcf2ff8fcee06dbca7bfa4ef35
| 0
|
Analyze the following code function for security vulnerabilities
|
public JSONObject putOpt(String key, Object value) throws JSONException {
if (key != null && value != null) {
return this.put(key, value);
}
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: putOpt
File: src/main/java/org/json/JSONObject.java
Repository: stleary/JSON-java
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2023-5072
|
HIGH
| 7.5
|
stleary/JSON-java
|
putOpt
|
src/main/java/org/json/JSONObject.java
|
661114c50dcfd53bb041aab66f14bb91e0a87c8a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void addPersistentPreferredActivity(ComponentName who, String callerPackageName,
IntentFilter filter, ComponentName activity) {
CallerIdentity caller;
if (isPolicyEngineForFinanceFlagEnabled()) {
caller = getCallerIdentity(who, callerPackageName);
} else {
caller = getCallerIdentity(who);
}
final int userId = caller.getUserId();
if (isPolicyEngineForFinanceFlagEnabled()) {
EnforcingAdmin enforcingAdmin;
if (who == null) {
enforcingAdmin = enforcePermissionAndGetEnforcingAdmin(
who,
MANAGE_DEVICE_POLICY_LOCK_TASK,
caller.getPackageName(),
userId);
} else {
Preconditions.checkCallAuthorization(isProfileOwner(caller)
|| isDefaultDeviceOwner(caller) || isFinancedDeviceOwner(caller));
enforcingAdmin = getEnforcingAdminForCaller(who, callerPackageName);
}
if (!isPackageInstalledForUser(activity.getPackageName(), userId)) {
// Fail early as packageManager doesn't persist the activity if its not installed.
return;
}
mDevicePolicyEngine.setLocalPolicy(
PolicyDefinition.PERSISTENT_PREFERRED_ACTIVITY(filter),
enforcingAdmin,
new ComponentNamePolicyValue(activity),
userId);
} else {
Objects.requireNonNull(who, "ComponentName is null");
Preconditions.checkCallAuthorization(isProfileOwner(caller)
|| isDefaultDeviceOwner(caller) || isFinancedDeviceOwner(caller));
synchronized (getLockObject()) {
long id = mInjector.binderClearCallingIdentity();
try {
mIPackageManager.addPersistentPreferredActivity(filter, activity, userId);
mIPackageManager.flushPackageRestrictionsAsUser(userId);
} catch (RemoteException re) {
// Shouldn't happen
Slog.wtf(LOG_TAG, "Error adding persistent preferred activity", re);
} finally {
mInjector.binderRestoreCallingIdentity(id);
}
}
}
final String activityPackage =
(activity != null ? activity.getPackageName() : null);
DevicePolicyEventLogger
.createEvent(DevicePolicyEnums.ADD_PERSISTENT_PREFERRED_ACTIVITY)
.setAdmin(caller.getPackageName())
.setStrings(activityPackage, getIntentFilterActions(filter))
.write();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addPersistentPreferredActivity
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
|
addPersistentPreferredActivity
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void crashApplication(int uid, int initialPid, String packageName,
String message) {
if (checkCallingPermission(android.Manifest.permission.FORCE_STOP_PACKAGES)
!= PackageManager.PERMISSION_GRANTED) {
String msg = "Permission Denial: crashApplication() from pid="
+ Binder.getCallingPid()
+ ", uid=" + Binder.getCallingUid()
+ " requires " + android.Manifest.permission.FORCE_STOP_PACKAGES;
Slog.w(TAG, msg);
throw new SecurityException(msg);
}
synchronized(this) {
ProcessRecord proc = null;
// Figure out which process to kill. We don't trust that initialPid
// still has any relation to current pids, so must scan through the
// list.
synchronized (mPidsSelfLocked) {
for (int i=0; i<mPidsSelfLocked.size(); i++) {
ProcessRecord p = mPidsSelfLocked.valueAt(i);
if (p.uid != uid) {
continue;
}
if (p.pid == initialPid) {
proc = p;
break;
}
if (p.pkgList.containsKey(packageName)) {
proc = p;
}
}
}
if (proc == null) {
Slog.w(TAG, "crashApplication: nothing for uid=" + uid
+ " initialPid=" + initialPid
+ " packageName=" + packageName);
return;
}
if (proc.thread != null) {
if (proc.pid == Process.myPid()) {
Log.w(TAG, "crashApplication: trying to crash self!");
return;
}
long ident = Binder.clearCallingIdentity();
try {
proc.thread.scheduleCrash(message);
} catch (RemoteException e) {
}
Binder.restoreCallingIdentity(ident);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: crashApplication
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
|
crashApplication
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setRecentFailureAssociationStatus(int netId, int reason) {
WifiConfiguration config = getInternalConfiguredNetwork(netId);
if (config == null) {
return;
}
mWifiMetrics.incrementRecentFailureAssociationStatusCount(reason);
int previousReason = config.recentFailure.getAssociationStatus();
config.recentFailure.setAssociationStatus(reason, mClock.getElapsedSinceBootMillis());
if (previousReason != reason) {
sendConfiguredNetworkChangedBroadcast(WifiManager.CHANGE_REASON_CONFIG_CHANGE);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setRecentFailureAssociationStatus
File: service/java/com/android/server/wifi/WifiConfigManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
setRecentFailureAssociationStatus
|
service/java/com/android/server/wifi/WifiConfigManager.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
final public String getLibraryFileName() {
return map(name);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLibraryFileName
File: hawtjni-runtime/src/main/java/org/fusesource/hawtjni/runtime/Library.java
Repository: fusesource/hawtjni
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2013-2035
|
MEDIUM
| 4.4
|
fusesource/hawtjni
|
getLibraryFileName
|
hawtjni-runtime/src/main/java/org/fusesource/hawtjni/runtime/Library.java
|
92c266170ce98edc200c656bd034a237098b8aa5
| 0
|
Analyze the following code function for security vulnerabilities
|
public void pokeDrawLockLw(long timeout) {
if (isVisibleRequestedOrAdding()) {
if (mDrawLock == null) {
// We want the tag name to be somewhat stable so that it is easier to correlate
// in wake lock statistics. So in particular, we don't want to include the
// window's hash code as in toString().
final CharSequence tag = getWindowTag();
mDrawLock = mWmService.mPowerManager.newWakeLock(DRAW_WAKE_LOCK, "Window:" + tag);
mDrawLock.setReferenceCounted(false);
mDrawLock.setWorkSource(new WorkSource(mOwnerUid, mAttrs.packageName));
}
// Each call to acquire resets the timeout.
if (DEBUG_POWER) {
Slog.d(TAG, "pokeDrawLock: poking draw lock on behalf of visible window owned by "
+ mAttrs.packageName);
}
mDrawLock.acquire(timeout);
} else if (DEBUG_POWER) {
Slog.d(TAG, "pokeDrawLock: suppressed draw lock request for invisible window "
+ "owned by " + mAttrs.packageName);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: pokeDrawLockLw
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
|
pokeDrawLockLw
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void addToMapIfAbsent(MultiMap map, CharSequence key, CharSequence value) {
if (!map.contains(key)) {
map.set(key, value);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addToMapIfAbsent
File: vertx-web/src/main/java/io/vertx/ext/web/impl/Utils.java
Repository: vert-x3/vertx-web
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2023-24815
|
MEDIUM
| 5.3
|
vert-x3/vertx-web
|
addToMapIfAbsent
|
vertx-web/src/main/java/io/vertx/ext/web/impl/Utils.java
|
9e3a783b1d1a731055e9049078b1b1494ece9c15
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.