instruction
string | input
string | output
string | cwe_ids
list | cve_id
string | severity
string | cvss_score
float64 | repo_name
string | func_name
string | file_path
string | commit_hash
string | is_vulnerable
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Analyze the following code function for security vulnerabilities
|
@Override
public void vibrate(int duration) {
if (!this.vibrateInitialized) {
try {
v = (Vibrator) getContext().getSystemService(Context.VIBRATOR_SERVICE);
} catch (Throwable e) {
Log.e("Codename One", "problem with virbrator(0)", e);
} finally {
this.vibrateInitialized = true;
}
}
if (v != null) {
try {
v.vibrate(duration);
} catch (Throwable e) {
Log.e("Codename One", "problem with virbrator(1)", e);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: vibrate
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
|
vibrate
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setDateFormat(DateFormat dateFormat) {
this.dateFormat = dateFormat;
// also set the date format for model (de)serialization with Date properties
this.json.setDateFormat((DateFormat) dateFormat.clone());
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDateFormat
File: samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
setDateFormat
|
samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
protected Buffer resolveOutputPacket(Buffer buffer) throws IOException {
Buffer ignoreBuf = null;
int ignoreDataLen = resolveIgnoreBufferDataLength();
if (ignoreDataLen > 0) {
ignoreBuf = createBuffer(SshConstants.SSH_MSG_IGNORE, ignoreDataLen + Byte.SIZE);
ignoreBuf.putUInt(ignoreDataLen);
int wpos = ignoreBuf.wpos();
synchronized (random) {
random.fill(ignoreBuf.array(), wpos, ignoreDataLen);
}
ignoreBuf.wpos(wpos + ignoreDataLen);
if (log.isDebugEnabled()) {
log.debug("resolveOutputPacket({}) append SSH_MSG_IGNORE message", this);
}
}
int curPos = buffer.rpos();
byte[] data = buffer.array();
int cmd = data[curPos] & 0xFF; // usually the 1st byte is the command
buffer = validateTargetBuffer(cmd, buffer);
if (ignoreBuf != null) {
ignoreBuf = encode(ignoreBuf);
IoSession networkSession = getIoSession();
networkSession.writeBuffer(ignoreBuf);
}
return encode(buffer);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resolveOutputPacket
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
|
resolveOutputPacket
|
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 T setFloat(K name, float value) {
return set(name, fromFloat(name, value));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setFloat
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
|
setFloat
|
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
|
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
| 0
|
Analyze the following code function for security vulnerabilities
|
public void writeString(String str) throws TException {
byte[] bytes = str.getBytes(StandardCharsets.UTF_8);
writeBinary(bytes, 0, bytes.length);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeString
File: thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java
Repository: facebook/fbthrift
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2019-11938
|
MEDIUM
| 5
|
facebook/fbthrift
|
writeString
|
thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java
|
08c2d412adb214c40bb03be7587057b25d053030
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void saveProjectMetadata(List<Long> modified) throws IOException {
for (Long id : modified) {
ProjectMetadata metadata = _projectsMetadata.get(id);
if (metadata != null) {
ProjectMetadataUtilities.save(metadata, getProjectDir(id));
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: saveProjectMetadata
File: main/src/com/google/refine/io/FileProjectManager.java
Repository: OpenRefine
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2023-37476
|
HIGH
| 7.8
|
OpenRefine
|
saveProjectMetadata
|
main/src/com/google/refine/io/FileProjectManager.java
|
e9c1e65d58b47aec8cd676bd5c07d97b002f205e
| 0
|
Analyze the following code function for security vulnerabilities
|
private void loadGroupStateLocked(int[] profileIds) {
// We can bind the widgets to host and providers only after
// reading the host and providers for all users since a widget
// can have a host and a provider in different users.
List<LoadedWidgetState> loadedWidgets = new ArrayList<>();
int version = 0;
final int profileIdCount = profileIds.length;
for (int i = 0; i < profileIdCount; i++) {
final int profileId = profileIds[i];
// No file written for this user - nothing to do.
AtomicFile file = getSavedStateFile(profileId);
try {
FileInputStream stream = file.openRead();
version = readProfileStateFromFileLocked(stream, profileId, loadedWidgets);
IoUtils.closeQuietly(stream);
} catch (FileNotFoundException e) {
Slog.w(TAG, "Failed to read state: " + e);
}
}
if (version >= 0) {
// Hooke'm up...
bindLoadedWidgets(loadedWidgets);
// upgrade the database if needed
performUpgradeLocked(version);
} else {
// failed reading, clean up
Slog.w(TAG, "Failed to read state, clearing widgets and hosts.");
mWidgets.clear();
mHosts.clear();
final int N = mProviders.size();
for (int i = 0; i < N; i++) {
mProviders.get(i).widgets.clear();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: loadGroupStateLocked
File: services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-1541
|
MEDIUM
| 4.3
|
android
|
loadGroupStateLocked
|
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
|
0b98d304c467184602b4c6bce76fda0b0274bc07
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<LogRecord> getLogRecords() throws IOException, InterruptedException {
return logRecords;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLogRecords
File: core/src/main/java/jenkins/model/Jenkins.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-2065
|
MEDIUM
| 4.3
|
jenkinsci/jenkins
|
getLogRecords
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
private void showSuggestionFragment(boolean scrollNeeded) {
final Class<? extends Fragment> fragmentClass = FeatureFactory.getFactory(this)
.getSuggestionFeatureProvider(this).getContextualSuggestionFragment();
if (fragmentClass == null) {
return;
}
mSuggestionView = findViewById(R.id.suggestion_content);
mTwoPaneSuggestionView = findViewById(R.id.two_pane_suggestion_content);
mHomepageView = findViewById(R.id.settings_homepage_container);
// Hide the homepage for preparing the suggestion. If scrolling is needed, the list views
// should be initialized in the invisible homepage view to prevent a scroll flicker.
mHomepageView.setVisibility(scrollNeeded ? View.INVISIBLE : View.GONE);
// Schedule a timer to show the homepage and hide the suggestion on timeout.
mHomepageView.postDelayed(() -> showHomepageWithSuggestion(false),
HOMEPAGE_LOADING_TIMEOUT_MS);
showFragment(new SuggestionFragCreator(fragmentClass, /* isTwoPaneLayout= */ false),
R.id.suggestion_content);
if (mIsEmbeddingActivityEnabled) {
showFragment(new SuggestionFragCreator(fragmentClass, /* isTwoPaneLayout= */ true),
R.id.two_pane_suggestion_content);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: showSuggestionFragment
File: src/com/android/settings/homepage/SettingsHomepageActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21256
|
HIGH
| 7.8
|
android
|
showSuggestionFragment
|
src/com/android/settings/homepage/SettingsHomepageActivity.java
|
62fc1d269f5e754fc8f00b6167d79c3933b4c1f4
| 0
|
Analyze the following code function for security vulnerabilities
|
public void savePage(EntityReference reference, String content, String title) throws Exception
{
savePage(reference, content, null, title, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: savePage
File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2023-35166
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
savePage
|
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
|
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
| 0
|
Analyze the following code function for security vulnerabilities
|
private void update() {
String exemptions = Settings.Global.getString(mContext.getContentResolver(),
Settings.Global.HIDDEN_API_BLACKLIST_EXEMPTIONS);
if (!TextUtils.equals(exemptions, mExemptionsStr)) {
mExemptionsStr = exemptions;
if ("*".equals(exemptions)) {
mBlacklistDisabled = true;
mExemptions = Collections.emptyList();
} else {
mBlacklistDisabled = false;
mExemptions = TextUtils.isEmpty(exemptions)
? Collections.emptyList()
: Arrays.asList(exemptions.split(","));
}
if (!ZYGOTE_PROCESS.setApiDenylistExemptions(mExemptions)) {
Slog.e(TAG, "Failed to set API blacklist exemptions!");
// leave mExemptionsStr as is, so we don't try to send the same list again.
mExemptions = Collections.emptyList();
}
}
mPolicy = getValidEnforcementPolicy(Settings.Global.HIDDEN_API_POLICY);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: update
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
|
update
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public Configuration getConfiguration() throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getConfiguration
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
getConfiguration
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected Subject getSubject() {
return currentSubject;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSubject
File: graylog2-server/src/main/java/org/graylog2/rest/resources/system/debug/bundle/SupportBundleService.java
Repository: Graylog2/graylog2-server
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2023-41044
|
LOW
| 3.8
|
Graylog2/graylog2-server
|
getSubject
|
graylog2-server/src/main/java/org/graylog2/rest/resources/system/debug/bundle/SupportBundleService.java
|
02b8792e6f4b829f0c1d87fcbf2d58b73458b938
| 0
|
Analyze the following code function for security vulnerabilities
|
@SystemApi
@RequiresPermission(android.Manifest.permission.MANAGE_PROFILE_AND_DEVICE_OWNERS)
public void setUserProvisioningState(
@UserProvisioningState int state, @NonNull UserHandle userHandle) {
setUserProvisioningState(state, userHandle.getIdentifier());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUserProvisioningState
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
|
setUserProvisioningState
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setMonitorCallback(RemoteCallback callback) {
if (callback == null) {
return;
}
getContext().enforceCallingOrSelfPermission(
Manifest.permission.MONITOR_DEVICE_CONFIG_ACCESS,
"Permission denial: registering for config access requires: "
+ Manifest.permission.MONITOR_DEVICE_CONFIG_ACCESS);
synchronized (mLock) {
mConfigMonitorCallback = callback;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setMonitorCallback
File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40117
|
HIGH
| 7.8
|
android
|
setMonitorCallback
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
ff86ff28cf82124f8e65833a2dd8c319aea08945
| 0
|
Analyze the following code function for security vulnerabilities
|
Builder setComponentSpecified(boolean componentSpecified) {
mComponentSpecified = componentSpecified;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setComponentSpecified
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
|
setComponentSpecified
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void getMemoryInfo(ActivityManager.MemoryInfo outInfo) {
final long homeAppMem = mProcessList.getMemLevel(ProcessList.HOME_APP_ADJ);
final long cachedAppMem = mProcessList.getMemLevel(ProcessList.CACHED_APP_MIN_ADJ);
outInfo.availMem = getFreeMemory();
outInfo.totalMem = getTotalMemory();
outInfo.threshold = homeAppMem;
outInfo.lowMemory = outInfo.availMem < (homeAppMem + ((cachedAppMem-homeAppMem)/2));
outInfo.hiddenAppThreshold = cachedAppMem;
outInfo.secondaryServerThreshold = mProcessList.getMemLevel(
ProcessList.SERVICE_ADJ);
outInfo.visibleAppThreshold = mProcessList.getMemLevel(
ProcessList.VISIBLE_APP_ADJ);
outInfo.foregroundAppThreshold = mProcessList.getMemLevel(
ProcessList.FOREGROUND_APP_ADJ);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMemoryInfo
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
|
getMemoryInfo
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public Set<XWikiLink> getUniqueWikiLinkedPages(XWikiContext context) throws XWikiException
{
Set<XWikiLink> links;
// We don't handle the links the same way in 1.0 syntax for retro-compatibility reason
// So here we explicitely get the link from the DB instead of looking inside the document.
if (is10Syntax()) {
links = new LinkedHashSet<>(getStore(context).loadLinks(getId(), context, true));
} else {
Set<String> linkedPages = getUniqueLinkedPages(context);
links = new LinkedHashSet<>(linkedPages.size());
for (String linkedPage : linkedPages) {
XWikiLink wikiLink = new XWikiLink();
wikiLink.setDocId(getId());
wikiLink.setFullName(LOCAL_REFERENCE_SERIALIZER.serialize(getDocumentReference()));
wikiLink.setLink(linkedPage);
links.add(wikiLink);
}
}
return links;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUniqueWikiLinkedPages
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
|
getUniqueWikiLinkedPages
|
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
|
protected String getTestClassName()
{
return getClass().getSimpleName();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTestClassName
File: xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-test/xwiki-platform-rest-test-tests/src/test/it/org/xwiki/rest/test/framework/AbstractHttpIT.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2023-37277
|
CRITICAL
| 9.6
|
xwiki/xwiki-platform
|
getTestClassName
|
xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-test/xwiki-platform-rest-test-tests/src/test/it/org/xwiki/rest/test/framework/AbstractHttpIT.java
|
4c175405faa0e62437df397811c7526dfc0fbae7
| 0
|
Analyze the following code function for security vulnerabilities
|
private void doSetTree(StateTree tree) {
if (tree == getOwner()) {
return;
}
if (getOwner() instanceof StateTree) {
boolean isOwnerAttached = ((StateTree) getOwner()).getRootNode()
.isAttached();
boolean isNotReplaced = ComponentUtil.getData(
((StateTree) getOwner()).getUI(),
ReplacedViaPreserveOnRefresh.class) == null;
if (isOwnerAttached || isNotReplaced) {
throw new IllegalStateException(
"Can't move a node from one state tree to another. "
+ "If this is intentional, first remove the "
+ "node from its current state tree by calling "
+ "removeFromTree");
} else {
id = -1;
}
}
owner = tree;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doSetTree
File: flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2023-25499
|
MEDIUM
| 6.5
|
vaadin/flow
|
doSetTree
|
flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java
|
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setManagerDN(String managerDN) {
this.managerDN = managerDN;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setManagerDN
File: server-plugin/server-plugin-authenticator-ldap/src/main/java/io/onedev/server/plugin/authenticator/ldap/LdapAuthenticator.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-90"
] |
CVE-2021-32651
|
MEDIUM
| 4.3
|
theonedev/onedev
|
setManagerDN
|
server-plugin/server-plugin-authenticator-ldap/src/main/java/io/onedev/server/plugin/authenticator/ldap/LdapAuthenticator.java
|
4440f0c57e440488d7e653417b2547eaae8ad19c
| 0
|
Analyze the following code function for security vulnerabilities
|
private int getComponentRestrictionForCallingPackage(ActivityInfo activityInfo,
String callingPackage, int callingPid, int callingUid, boolean ignoreTargetSecurity) {
if (!ignoreTargetSecurity && mService.checkComponentPermission(activityInfo.permission,
callingPid, callingUid, activityInfo.applicationInfo.uid, activityInfo.exported)
== PackageManager.PERMISSION_DENIED) {
return ACTIVITY_RESTRICTION_PERMISSION;
}
if (activityInfo.permission == null) {
return ACTIVITY_RESTRICTION_NONE;
}
final int opCode = AppOpsManager.permissionToOpCode(activityInfo.permission);
if (opCode == AppOpsManager.OP_NONE) {
return ACTIVITY_RESTRICTION_NONE;
}
if (mService.mAppOpsService.noteOperation(opCode, callingUid,
callingPackage) != AppOpsManager.MODE_ALLOWED) {
if (!ignoreTargetSecurity) {
return ACTIVITY_RESTRICTION_APPOP;
}
}
return ACTIVITY_RESTRICTION_NONE;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getComponentRestrictionForCallingPackage
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
|
getComponentRestrictionForCallingPackage
|
services/core/java/com/android/server/am/ActivityStackSupervisor.java
|
468651c86a8adb7aa56c708d2348e99022088af3
| 0
|
Analyze the following code function for security vulnerabilities
|
public final boolean isJavaLangObject() { return _class == Object.class; }
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isJavaLangObject
File: src/main/java/com/fasterxml/jackson/databind/JavaType.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2019-16942
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
isJavaLangObject
|
src/main/java/com/fasterxml/jackson/databind/JavaType.java
|
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
| 0
|
Analyze the following code function for security vulnerabilities
|
void sendDataToServiceLocked(Messenger service, byte[] data) {
if (service != mActiveService) {
sendDeactivateToActiveServiceLocked(HostApduService.DEACTIVATION_DESELECTED);
mActiveService = service;
if (service.equals(mPaymentService)) {
mActiveServiceName = mPaymentServiceName;
mActiveServiceUserId = mPaymentServiceUserId;
} else {
mActiveServiceName = mServiceName;
mActiveServiceUserId = mServiceUserId;
}
}
Message msg = Message.obtain(null, HostApduService.MSG_COMMAND_APDU);
Bundle dataBundle = new Bundle();
dataBundle.putByteArray("data", data);
msg.setData(dataBundle);
msg.replyTo = mMessenger;
try {
mActiveService.send(msg);
} catch (RemoteException e) {
Log.e(TAG, "Remote service has died, dropping APDU");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendDataToServiceLocked
File: src/com/android/nfc/cardemulation/HostEmulationManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35671
|
MEDIUM
| 5.5
|
android
|
sendDataToServiceLocked
|
src/com/android/nfc/cardemulation/HostEmulationManager.java
|
745632835f3d97513a9c2a96e56e1dc06c4e4176
| 0
|
Analyze the following code function for security vulnerabilities
|
public float getContentHeightCss() {
return mRenderCoordinates.getContentHeightCss();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getContentHeightCss
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
getContentHeightCss
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isAllowContainsSearches() {
return this.myModelConfig.isAllowContainsSearches();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isAllowContainsSearches
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
|
isAllowContainsSearches
|
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
|
public static CatService getInstance(CommandsInterface ci,
Context context, UiccCard ic, int slotId) {
UiccCardApplication ca = null;
IccFileHandler fh = null;
IccRecords ir = null;
if (ic != null) {
/* Since Cat is not tied to any application, but rather is Uicc application
* in itself - just get first FileHandler and IccRecords object
*/
ca = ic.getApplicationIndex(0);
if (ca != null) {
fh = ca.getIccFileHandler();
ir = ca.getIccRecords();
}
}
synchronized (sInstanceLock) {
if (sInstance == null) {
int simCount = TelephonyManager.getDefault().getSimCount();
sInstance = new CatService[simCount];
for (int i = 0; i < simCount; i++) {
sInstance[i] = null;
}
}
if (sInstance[slotId] == null) {
if (ci == null || ca == null || ir == null || context == null || fh == null
|| ic == null) {
return null;
}
sInstance[slotId] = new CatService(ci, ca, ir, context, fh, ic, slotId);
} else if ((ir != null) && (mIccRecords != ir)) {
if (mIccRecords != null) {
mIccRecords.unregisterForRecordsLoaded(sInstance[slotId]);
}
mIccRecords = ir;
mUiccApplication = ca;
mIccRecords.registerForRecordsLoaded(sInstance[slotId],
MSG_ID_ICC_RECORDS_LOADED, null);
CatLog.d(sInstance[slotId], "registerForRecordsLoaded slotid=" + slotId
+ " instance:" + sInstance[slotId]);
}
return sInstance[slotId];
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInstance
File: src/java/com/android/internal/telephony/cat/CatService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2015-3843
|
HIGH
| 9.3
|
android
|
getInstance
|
src/java/com/android/internal/telephony/cat/CatService.java
|
b48581401259439dc5ef6dcf8b0f303e4cbefbe9
| 0
|
Analyze the following code function for security vulnerabilities
|
void activityIdleInternal(ActivityRecord r) {
synchronized (mService) {
activityIdleInternalLocked(r != null ? r.appToken : null, true, null);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: activityIdleInternal
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
|
activityIdleInternal
|
services/core/java/com/android/server/am/ActivityStackSupervisor.java
|
468651c86a8adb7aa56c708d2348e99022088af3
| 0
|
Analyze the following code function for security vulnerabilities
|
public AsyncHttpClientConfigBean setProviderConfig(AsyncHttpProviderConfig<?, ?> providerConfig) {
this.providerConfig = providerConfig;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setProviderConfig
File: api/src/main/java/org/asynchttpclient/AsyncHttpClientConfigBean.java
Repository: AsyncHttpClient/async-http-client
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2013-7397
|
MEDIUM
| 4.3
|
AsyncHttpClient/async-http-client
|
setProviderConfig
|
api/src/main/java/org/asynchttpclient/AsyncHttpClientConfigBean.java
|
df6ed70e86c8fc340ed75563e016c8baa94d7e72
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void recordAggregatedUsageEvents(Context context, AppRow appRow) {
long now = System.currentTimeMillis();
long startTime = now - (DateUtils.DAY_IN_MILLIS * DAYS_TO_CHECK);
UsageEvents events = null;
try {
events = sUsageStatsManager.queryEventsForPackageForUser(
startTime, now, appRow.userId, appRow.pkg, context.getPackageName());
} catch (RemoteException e) {
e.printStackTrace();
}
recordAggregatedUsageEvents(events, appRow);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: recordAggregatedUsageEvents
File: src/com/android/settings/notification/NotificationBackend.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35667
|
HIGH
| 7.8
|
android
|
recordAggregatedUsageEvents
|
src/com/android/settings/notification/NotificationBackend.java
|
d8355ac47e068ad20c6a7b1602e72f0585ec0085
| 0
|
Analyze the following code function for security vulnerabilities
|
public void rename(DocumentReference newReference, List<DocumentReference> backlinkDocumentNames,
List<DocumentReference> childDocumentNames) throws XWikiException
{
if (hasAccessLevel("delete") && this.context.getWiki().checkAccess("edit",
this.context.getWiki().getDocument(newReference, this.context), this.context)) {
// Every page given in childDocumentNames has it's parent changed whether it needs it or not.
// Let's make sure the user has edit permission on any page given which is not actually a child.
// Otherwise it would be embarrassing if a user called:
// $doc.rename("mynewpage",$doc.getBacklinks(),$xwiki.searchDocuments("true"))
int counter = childDocumentNames.size();
List<String> actuallyChildren = getChildren();
while (counter > 0) {
counter--;
if (!actuallyChildren.contains(childDocumentNames.get(counter))
&& !this.context.getWiki().checkAccess("edit",
this.context.getWiki().getDocument(childDocumentNames.get(counter), this.context),
this.context)) {
return;
}
}
this.getDoc().rename(newReference, backlinkDocumentNames, childDocumentNames, getXWikiContext());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: rename
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-23615
|
MEDIUM
| 5.5
|
xwiki/xwiki-platform
|
rename
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
|
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onEnumerate(final long deviceId, final int[] fingerIds, final int[] groupIds) {
mHandler.post(new Runnable() {
@Override
public void run() {
handleEnumerate(deviceId, fingerIds, groupIds);
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onEnumerate
File: services/core/java/com/android/server/fingerprint/FingerprintService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
onEnumerate
|
services/core/java/com/android/server/fingerprint/FingerprintService.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
private void sendUpdateIntentLocked(Provider provider, int[] appWidgetIds) {
Intent intent = new Intent(AppWidgetManager.ACTION_APPWIDGET_UPDATE);
intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, appWidgetIds);
intent.setComponent(provider.info.provider);
sendBroadcastAsUser(intent, provider.info.getProfile());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendUpdateIntentLocked
File: services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-1541
|
MEDIUM
| 4.3
|
android
|
sendUpdateIntentLocked
|
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
|
0b98d304c467184602b4c6bce76fda0b0274bc07
| 0
|
Analyze the following code function for security vulnerabilities
|
public XWikiAttachmentStoreInterface getDefaultAttachmentContentStore()
{
return this.defaultAttachmentContentStore;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDefaultAttachmentContentStore
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-32620
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
getDefaultAttachmentContentStore
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void syncIssuesAttachment(IssuesUpdateRequest issuesRequest, File file, AttachmentSyncType syncType) {
if ("upload".equals(syncType.syncOperateType())) {
zentaoClient.uploadAttachment("bug", issuesRequest.getPlatformId(), file);
} else if ("delete".equals(syncType.syncOperateType())) {
Map bugInfo = zentaoClient.getBugById(issuesRequest.getPlatformId());
Map<String, Object> zenFiles = (Map) bugInfo.get("files");
for (String fileId : zenFiles.keySet()) {
Map fileInfo = (Map) zenFiles.get(fileId);
if (file.getName().equals(fileInfo.get("title"))) {
zentaoClient.deleteAttachment(fileId);
break;
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: syncIssuesAttachment
File: test-track/backend/src/main/java/io/metersphere/service/issue/platform/ZentaoPlatform.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2022-23544
|
MEDIUM
| 6.1
|
metersphere
|
syncIssuesAttachment
|
test-track/backend/src/main/java/io/metersphere/service/issue/platform/ZentaoPlatform.java
|
d0f95b50737c941b29d507a4cc3545f2dc6ab121
| 0
|
Analyze the following code function for security vulnerabilities
|
protected AlgorithmParameters engineGenerateParameters()
{
byte[] nonce = new byte[12];
if (random == null)
{
random = new SecureRandom();
}
random.nextBytes(nonce);
AlgorithmParameters params;
try
{
params = createParametersInstance("GCM");
params.init(new GCMParameters(nonce, 16).getEncoded());
}
catch (Exception e)
{
throw new RuntimeException(e.getMessage());
}
return params;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: engineGenerateParameters
File: prov/src/main/java/org/bouncycastle/jcajce/provider/symmetric/AES.java
Repository: bcgit/bc-java
The code follows secure coding practices.
|
[
"CWE-310"
] |
CVE-2016-1000339
|
MEDIUM
| 5
|
bcgit/bc-java
|
engineGenerateParameters
|
prov/src/main/java/org/bouncycastle/jcajce/provider/symmetric/AES.java
|
413b42f4d770456508585c830cfcde95f9b0e93b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getNumberParameterSQL(Number param) {
return param.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNumberParameterSQL
File: dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java
Repository: dashbuilder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-4999
|
HIGH
| 7.5
|
dashbuilder
|
getNumberParameterSQL
|
dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java
|
8574899e3b6455547b534f570b2330ff772e524b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onCreateDialogPositiveClick(Spinner spinner, String name) {
if (!xmppConnectionServiceBound) {
return;
}
final Account account = getSelectedAccount(spinner);
if (account == null) {
return;
}
Intent intent = new Intent(getApplicationContext(), ChooseContactActivity.class);
intent.putExtra(ChooseContactActivity.EXTRA_SHOW_ENTER_JID, false);
intent.putExtra(ChooseContactActivity.EXTRA_SELECT_MULTIPLE, true);
intent.putExtra(ChooseContactActivity.EXTRA_GROUP_CHAT_NAME, name.trim());
intent.putExtra(ChooseContactActivity.EXTRA_ACCOUNT, account.getJid().asBareJid().toString());
intent.putExtra(ChooseContactActivity.EXTRA_TITLE_RES_ID, R.string.choose_participants);
startActivityForResult(intent, REQUEST_CREATE_CONFERENCE);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onCreateDialogPositiveClick
File: src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
onCreateDialogPositiveClick
|
src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getPayloadRequestName() {
return name;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPayloadRequestName
File: javamelody-core/src/main/java/net/bull/javamelody/PayloadNameRequestWrapper.java
Repository: javamelody
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-15531
|
HIGH
| 7.5
|
javamelody
|
getPayloadRequestName
|
javamelody-core/src/main/java/net/bull/javamelody/PayloadNameRequestWrapper.java
|
ef111822562d0b9365bd3e671a75b65bd0613353
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setEditorCancelCaption(String cancelCaption)
throws IllegalArgumentException {
if (cancelCaption == null) {
throw new IllegalArgumentException("Cancel caption cannot be null");
}
getState().editorCancelCaption = cancelCaption;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setEditorCancelCaption
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
|
setEditorCancelCaption
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
public <E> PageSerializable<E> doSelectPageSerializable(ISelect select) {
select.doSelect();
return (PageSerializable<E>) this.toPageSerializable();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doSelectPageSerializable
File: src/main/java/com/github/pagehelper/Page.java
Repository: pagehelper/Mybatis-PageHelper
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-28111
|
HIGH
| 7.5
|
pagehelper/Mybatis-PageHelper
|
doSelectPageSerializable
|
src/main/java/com/github/pagehelper/Page.java
|
554a524af2d2b30d09505516adc412468a84d8fa
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getEditMode(String template, XWikiContext context)
throws XWikiException
{
// Determine the edit action (edit/inline) for the newly created document, if a template is passed it is
// used to determine the action. Default is 'edit'.
String editAction = ActionOnCreate.EDIT.name().toLowerCase();
XWiki xwiki = context.getWiki();
if (!StringUtils.isEmpty(template)) {
DocumentReference templateReference = getCurrentMixedDocumentReferenceResolver().resolve(template);
if (xwiki.exists(templateReference, context)) {
editAction = xwiki.getDocument(templateReference, context).getDefaultEditMode(context);
}
}
return editAction;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getEditMode
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/CreateAction.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2022-23617
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
getEditMode
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/CreateAction.java
|
30c52b01559b8ef5ed1035dac7c34aaf805764d5
| 0
|
Analyze the following code function for security vulnerabilities
|
public CopyOnWriteList<SCMListener> getSCMListeners() {
return scmListeners;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSCMListeners
File: core/src/main/java/jenkins/model/Jenkins.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-2065
|
MEDIUM
| 4.3
|
jenkinsci/jenkins
|
getSCMListeners
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
private static boolean copy(ZipInputStream oZip, VFSLeaf newEntry) {
try(OutputStream out = newEntry.getOutputStream(false)) {
return FileUtils.copy(oZip, out);
} catch(Exception e) {
handleIOException("", e);
return false;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: copy
File: src/main/java/org/olat/core/util/ZipUtil.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-39180
|
HIGH
| 9
|
OpenOLAT
|
copy
|
src/main/java/org/olat/core/util/ZipUtil.java
|
5668a41ab3f1753102a89757be013487544279d5
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getLinkName() {
return linkName;
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2023-7171
- Severity: LOW
- CVSS Score: 3.3
Description: fix(novel-admin): 友情链接URL格式校验
Function: getLinkName
File: novel-admin/src/main/java/com/java2nb/novel/domain/FriendLinkDO.java
Repository: 201206030/novel-plus
Fixed Code:
public String getLinkName() {
return linkName;
}
|
[
"CWE-79"
] |
CVE-2023-7171
|
LOW
| 3.3
|
201206030/novel-plus
|
getLinkName
|
novel-admin/src/main/java/com/java2nb/novel/domain/FriendLinkDO.java
|
d6093d8182362422370d7eaf6c53afde9ee45215
| 1
|
Analyze the following code function for security vulnerabilities
|
protected Object resolveObject(Object object) throws IOException {
// By default no object replacement. Subclasses can override
return object;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resolveObject
File: luni/src/main/java/java/io/ObjectInputStream.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-7911
|
HIGH
| 7.2
|
android
|
resolveObject
|
luni/src/main/java/java/io/ObjectInputStream.java
|
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getImportString(XWikiContext context)
{
StringBuilder result = new StringBuilder();
// Using LinkedHashSet to preserve the extensions order.
Set<String> extensions = new LinkedHashSet<String>();
// First, we add to the import string the extensions that should always be used.
// TODO Global extensions should be able to select a set of actions for which they are enabled.
extensions.addAll(getAlwaysUsedExtensions(context));
// Then, we add On-Demand extensions for this request.
extensions.addAll(getPulledResources(context));
// Add On-Page extensions
if (hasPageExtensions(context)) {
// Make sure to use a prefixed document full name for the current document as well, or else the "extensions"
// set will not detect if it was added before and it will be added twice.
EntityReferenceSerializer<String> serializer = getDefaultEntityReferenceSerializer();
String serializedCurrentDocumentName = serializer.serialize(context.getDoc().getDocumentReference());
// Add it to the list.
extensions.add(serializedCurrentDocumentName);
}
for (String documentName : extensions) {
result.append(getLink(documentName, context));
}
return result.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getImportString
File: xwiki-platform-core/xwiki-platform-skin/xwiki-platform-skin-skinx/src/main/java/com/xpn/xwiki/plugin/skinx/AbstractSkinExtensionPlugin.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-29206
|
MEDIUM
| 5.4
|
xwiki/xwiki-platform
|
getImportString
|
xwiki-platform-core/xwiki-platform-skin/xwiki-platform-skin-skinx/src/main/java/com/xpn/xwiki/plugin/skinx/AbstractSkinExtensionPlugin.java
|
fe65bc35d5672dd2505b7ac4ec42aec57d500fbb
| 0
|
Analyze the following code function for security vulnerabilities
|
public Action createFromParcel(Parcel in) {
return new Action(in);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createFromParcel
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
createFromParcel
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean applyCustomDescription(@NonNull Context context, @NonNull View saveUiView,
@NonNull ValueFinder valueFinder, @NonNull SaveInfo info) {
final CustomDescription customDescription = info.getCustomDescription();
if (customDescription == null) {
return false;
}
writeLog(MetricsEvent.AUTOFILL_SAVE_CUSTOM_DESCRIPTION);
final RemoteViews template = customDescription.getPresentation();
if (template == null) {
Slog.w(TAG, "No remote view on custom description");
return false;
}
// First apply the unconditional transformations (if any) to the templates.
final ArrayList<Pair<Integer, InternalTransformation>> transformations =
customDescription.getTransformations();
if (sVerbose) {
Slog.v(TAG, "applyCustomDescription(): transformations = " + transformations);
}
if (transformations != null) {
if (!InternalTransformation.batchApply(valueFinder, template, transformations)) {
Slog.w(TAG, "could not apply main transformations on custom description");
return false;
}
}
final RemoteViews.InteractionHandler handler =
(view, pendingIntent, response) -> {
Intent intent = response.getLaunchOptions(view).first;
final boolean isValid = isValidLink(pendingIntent, intent);
if (!isValid) {
final LogMaker log =
newLogMaker(MetricsEvent.AUTOFILL_SAVE_LINK_TAPPED, mType);
log.setType(MetricsEvent.TYPE_UNKNOWN);
mMetricsLogger.write(log);
return false;
}
startIntentSenderWithRestore(pendingIntent, intent);
return true;
};
try {
// Create the remote view peer.
final View customSubtitleView = template.applyWithTheme(
context, null, handler, mThemeId);
// Apply batch updates (if any).
final ArrayList<Pair<InternalValidator, BatchUpdates>> updates =
customDescription.getUpdates();
if (sVerbose) {
Slog.v(TAG, "applyCustomDescription(): view = " + customSubtitleView
+ " updates=" + updates);
}
if (updates != null) {
final int size = updates.size();
if (sDebug) Slog.d(TAG, "custom description has " + size + " batch updates");
for (int i = 0; i < size; i++) {
final Pair<InternalValidator, BatchUpdates> pair = updates.get(i);
final InternalValidator condition = pair.first;
if (condition == null || !condition.isValid(valueFinder)) {
if (sDebug) Slog.d(TAG, "Skipping batch update #" + i );
continue;
}
final BatchUpdates batchUpdates = pair.second;
// First apply the updates...
final RemoteViews templateUpdates = batchUpdates.getUpdates();
if (templateUpdates != null) {
if (sDebug) Slog.d(TAG, "Applying template updates for batch update #" + i);
templateUpdates.reapply(context, customSubtitleView);
}
// Then the transformations...
final ArrayList<Pair<Integer, InternalTransformation>> batchTransformations =
batchUpdates.getTransformations();
if (batchTransformations != null) {
if (sDebug) {
Slog.d(TAG, "Applying child transformation for batch update #" + i
+ ": " + batchTransformations);
}
if (!InternalTransformation.batchApply(valueFinder, template,
batchTransformations)) {
Slog.w(TAG, "Could not apply child transformation for batch update "
+ "#" + i + ": " + batchTransformations);
return false;
}
template.reapply(context, customSubtitleView);
}
}
}
// Apply click actions (if any).
final SparseArray<InternalOnClickAction> actions = customDescription.getActions();
if (actions != null) {
final int size = actions.size();
if (sDebug) Slog.d(TAG, "custom description has " + size + " actions");
if (!(customSubtitleView instanceof ViewGroup)) {
Slog.w(TAG, "cannot apply actions because custom description root is not a "
+ "ViewGroup: " + customSubtitleView);
} else {
final ViewGroup rootView = (ViewGroup) customSubtitleView;
for (int i = 0; i < size; i++) {
final int id = actions.keyAt(i);
final InternalOnClickAction action = actions.valueAt(i);
final View child = rootView.findViewById(id);
if (child == null) {
Slog.w(TAG, "Ignoring action " + action + " for view " + id
+ " because it's not on " + rootView);
continue;
}
child.setOnClickListener((v) -> {
if (sVerbose) {
Slog.v(TAG, "Applying " + action + " after " + v + " was clicked");
}
action.onClick(rootView);
});
}
}
}
applyTextViewStyle(customSubtitleView);
// Finally, add the custom description to the save UI.
final ViewGroup subtitleContainer =
saveUiView.findViewById(R.id.autofill_save_custom_subtitle);
subtitleContainer.addView(customSubtitleView);
subtitleContainer.setVisibility(View.VISIBLE);
subtitleContainer.setScrollBarDefaultDelayBeforeFade(
SCROLL_BAR_DEFAULT_DELAY_BEFORE_FADE_MS);
return true;
} catch (Exception e) {
Slog.e(TAG, "Error applying custom description. ", e);
}
return false;
}
|
Vulnerability Classification:
- CWE: CWE-Other, CWE-610
- CVE: CVE-2023-40133
- Severity: MEDIUM
- CVSS Score: 5.5
Description: [DO NOT MERGE] Verify URI Permissions in Autofill RemoteViews
Check permissions of URI inside of FillResponse's RemoteViews. If the
current user does not have the required permissions to view the URI, the
RemoteView is dropped from displaying.
This fixes a security spill in which a user can view content of another
user through a malicious Autofill provider.
Bug: 283137865
Fixes: b/283264674 b/281666022 b/281665050 b/281848557 b/281533566
b/281534749 b/283101289
Test: Verified by POC app attached in bugs
Test: atest CtsAutoFillServiceTestCases (added new tests)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:93810ba1c0a4d31f49adbf9454731e2b7defdfc0)
Merged-In: I6f4d2a35e89bbed7bd9e07bf5cd3e2d68b20af9a
Change-Id: I6f4d2a35e89bbed7bd9e07bf5cd3e2d68b20af9a
Function: applyCustomDescription
File: services/autofill/java/com/android/server/autofill/ui/SaveUi.java
Repository: android
Fixed Code:
private boolean applyCustomDescription(@NonNull Context context, @NonNull View saveUiView,
@NonNull ValueFinder valueFinder, @NonNull SaveInfo info) {
final CustomDescription customDescription = info.getCustomDescription();
if (customDescription == null) {
return false;
}
writeLog(MetricsEvent.AUTOFILL_SAVE_CUSTOM_DESCRIPTION);
final RemoteViews template = Helper.sanitizeRemoteView(customDescription.getPresentation());
if (template == null) {
Slog.w(TAG, "No remote view on custom description");
return false;
}
// First apply the unconditional transformations (if any) to the templates.
final ArrayList<Pair<Integer, InternalTransformation>> transformations =
customDescription.getTransformations();
if (sVerbose) {
Slog.v(TAG, "applyCustomDescription(): transformations = " + transformations);
}
if (transformations != null) {
if (!InternalTransformation.batchApply(valueFinder, template, transformations)) {
Slog.w(TAG, "could not apply main transformations on custom description");
return false;
}
}
final RemoteViews.InteractionHandler handler =
(view, pendingIntent, response) -> {
Intent intent = response.getLaunchOptions(view).first;
final boolean isValid = isValidLink(pendingIntent, intent);
if (!isValid) {
final LogMaker log =
newLogMaker(MetricsEvent.AUTOFILL_SAVE_LINK_TAPPED, mType);
log.setType(MetricsEvent.TYPE_UNKNOWN);
mMetricsLogger.write(log);
return false;
}
startIntentSenderWithRestore(pendingIntent, intent);
return true;
};
try {
// Create the remote view peer.
final View customSubtitleView = template.applyWithTheme(
context, null, handler, mThemeId);
// Apply batch updates (if any).
final ArrayList<Pair<InternalValidator, BatchUpdates>> updates =
customDescription.getUpdates();
if (sVerbose) {
Slog.v(TAG, "applyCustomDescription(): view = " + customSubtitleView
+ " updates=" + updates);
}
if (updates != null) {
final int size = updates.size();
if (sDebug) Slog.d(TAG, "custom description has " + size + " batch updates");
for (int i = 0; i < size; i++) {
final Pair<InternalValidator, BatchUpdates> pair = updates.get(i);
final InternalValidator condition = pair.first;
if (condition == null || !condition.isValid(valueFinder)) {
if (sDebug) Slog.d(TAG, "Skipping batch update #" + i );
continue;
}
final BatchUpdates batchUpdates = pair.second;
// First apply the updates...
final RemoteViews templateUpdates = batchUpdates.getUpdates();
if (templateUpdates != null) {
if (sDebug) Slog.d(TAG, "Applying template updates for batch update #" + i);
templateUpdates.reapply(context, customSubtitleView);
}
// Then the transformations...
final ArrayList<Pair<Integer, InternalTransformation>> batchTransformations =
batchUpdates.getTransformations();
if (batchTransformations != null) {
if (sDebug) {
Slog.d(TAG, "Applying child transformation for batch update #" + i
+ ": " + batchTransformations);
}
if (!InternalTransformation.batchApply(valueFinder, template,
batchTransformations)) {
Slog.w(TAG, "Could not apply child transformation for batch update "
+ "#" + i + ": " + batchTransformations);
return false;
}
template.reapply(context, customSubtitleView);
}
}
}
// Apply click actions (if any).
final SparseArray<InternalOnClickAction> actions = customDescription.getActions();
if (actions != null) {
final int size = actions.size();
if (sDebug) Slog.d(TAG, "custom description has " + size + " actions");
if (!(customSubtitleView instanceof ViewGroup)) {
Slog.w(TAG, "cannot apply actions because custom description root is not a "
+ "ViewGroup: " + customSubtitleView);
} else {
final ViewGroup rootView = (ViewGroup) customSubtitleView;
for (int i = 0; i < size; i++) {
final int id = actions.keyAt(i);
final InternalOnClickAction action = actions.valueAt(i);
final View child = rootView.findViewById(id);
if (child == null) {
Slog.w(TAG, "Ignoring action " + action + " for view " + id
+ " because it's not on " + rootView);
continue;
}
child.setOnClickListener((v) -> {
if (sVerbose) {
Slog.v(TAG, "Applying " + action + " after " + v + " was clicked");
}
action.onClick(rootView);
});
}
}
}
applyTextViewStyle(customSubtitleView);
// Finally, add the custom description to the save UI.
final ViewGroup subtitleContainer =
saveUiView.findViewById(R.id.autofill_save_custom_subtitle);
subtitleContainer.addView(customSubtitleView);
subtitleContainer.setVisibility(View.VISIBLE);
subtitleContainer.setScrollBarDefaultDelayBeforeFade(
SCROLL_BAR_DEFAULT_DELAY_BEFORE_FADE_MS);
return true;
} catch (Exception e) {
Slog.e(TAG, "Error applying custom description. ", e);
}
return false;
}
|
[
"CWE-Other",
"CWE-610"
] |
CVE-2023-40133
|
MEDIUM
| 5.5
|
android
|
applyCustomDescription
|
services/autofill/java/com/android/server/autofill/ui/SaveUi.java
|
08becc8c600f14c5529115cc1a1e0c97cd503f33
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean removeAccountExplicitly(Account account) {
final int callingUid = Binder.getCallingUid();
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.v(TAG, "removeAccountExplicitly: " + account
+ ", caller's uid " + callingUid
+ ", pid " + Binder.getCallingPid());
}
int userId = Binder.getCallingUserHandle().getIdentifier();
if (account == null) {
/*
* Null accounts should result in returning false, as per
* AccountManage.addAccountExplicitly(...) java doc.
*/
Log.e(TAG, "account is null");
return false;
} else if (!isAccountManagedByCaller(account.type, callingUid, userId)) {
String msg = String.format(
"uid %s cannot explicitly remove accounts of type: %s",
callingUid,
account.type);
throw new SecurityException(msg);
}
UserAccounts accounts = getUserAccountsForCaller();
final long accountId = accounts.accountsDb.findDeAccountId(account);
logRecord(
AccountsDb.DEBUG_ACTION_CALLED_ACCOUNT_REMOVE,
AccountsDb.TABLE_ACCOUNTS,
accountId,
accounts,
callingUid);
final long identityToken = clearCallingIdentity();
try {
return removeAccountInternal(accounts, account, callingUid);
} finally {
restoreCallingIdentity(identityToken);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeAccountExplicitly
File: services/core/java/com/android/server/accounts/AccountManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-502"
] |
CVE-2023-45777
|
HIGH
| 7.8
|
android
|
removeAccountExplicitly
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
public String display(String fieldname, String type, String pref, BaseObject obj, String wrappingSyntaxId,
XWikiContext context)
{
return display(fieldname, type, pref, obj, wrappingSyntaxId, true, context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: display
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
|
display
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public ArrayNode arrayNode() {
return new TomlArrayNode(this);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: arrayNode
File: toml/src/main/java/com/fasterxml/jackson/dataformat/toml/Parser.java
Repository: FasterXML/jackson-dataformats-text
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-3894
|
HIGH
| 7.5
|
FasterXML/jackson-dataformats-text
|
arrayNode
|
toml/src/main/java/com/fasterxml/jackson/dataformat/toml/Parser.java
|
20a209387931dba31e1a027b74976911c3df39fe
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onClick(View v) {
Object tag = v.getTag();
if (tag instanceof SendButtonAction) {
SendButtonAction action = (SendButtonAction) tag;
switch (action) {
case TAKE_PHOTO:
case RECORD_VIDEO:
case SEND_LOCATION:
case RECORD_VOICE:
case CHOOSE_PICTURE:
attachFile(action.toChoice());
break;
case CANCEL:
if (conversation != null) {
if (conversation.setCorrectingMessage(null)) {
binding.textinput.setText("");
binding.textinput.append(conversation.getDraftMessage());
conversation.setDraftMessage(null);
} else if (conversation.getMode() == Conversation.MODE_MULTI) {
conversation.setNextCounterpart(null);
}
updateChatMsgHint();
updateSendButton();
updateEditablity();
}
break;
default:
sendMessage();
}
} else {
sendMessage();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onClick
File: src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
onClick
|
src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String getExecutionPreamble()
{
if ( getWorkingDirectoryAsString() == null )
{
return null;
}
String dir = getWorkingDirectoryAsString();
StringBuilder sb = new StringBuilder();
sb.append( "cd " );
sb.append( unifyQuotes( dir ) );
sb.append( " && " );
return sb.toString();
}
|
Vulnerability Classification:
- CWE: CWE-116
- CVE: CVE-2022-29599
- Severity: HIGH
- CVSS Score: 7.5
Description: [MSHARED-297] - BourneShell unconditionally single quotes executable and arguments
Function: getExecutionPreamble
File: src/main/java/org/apache/maven/shared/utils/cli/shell/BourneShell.java
Repository: apache/maven-shared-utils
Fixed Code:
protected String getExecutionPreamble()
{
if ( getWorkingDirectoryAsString() == null )
{
return null;
}
String dir = getWorkingDirectoryAsString();
StringBuilder sb = new StringBuilder();
sb.append( "cd " );
sb.append( quoteOneItem( dir, false ) );
sb.append( " && " );
return sb.toString();
}
|
[
"CWE-116"
] |
CVE-2022-29599
|
HIGH
| 7.5
|
apache/maven-shared-utils
|
getExecutionPreamble
|
src/main/java/org/apache/maven/shared/utils/cli/shell/BourneShell.java
|
2735facbbbc2e13546328cb02dbb401b3776eea3
| 1
|
Analyze the following code function for security vulnerabilities
|
public boolean isFileAsset(Contentlet con) {
return (con != null && con.getStructure() != null && con.getStructure().getStructureType() == Structure.STRUCTURE_TYPE_FILEASSET) ;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isFileAsset
File: dotCMS/src/main/java/com/dotmarketing/portlets/fileassets/business/FileAssetAPIImpl.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-434"
] |
CVE-2017-11466
|
HIGH
| 9
|
dotCMS/core
|
isFileAsset
|
dotCMS/src/main/java/com/dotmarketing/portlets/fileassets/business/FileAssetAPIImpl.java
|
ab2bb2e00b841d131b8734227f9106e3ac31bb99
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void animateExpandSettingsPanel(String subPanel) {
if (SPEW) Log.d(TAG, "animateExpand: mExpandedVisible=" + mExpandedVisible);
if (!panelsEnabled()) {
return;
}
// Settings are not available in setup
if (!mUserSetup) return;
if (subPanel != null) {
mQSPanel.openDetails(subPanel);
}
mNotificationPanel.expandWithQs();
if (false) postStartTracing();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: animateExpandSettingsPanel
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
animateExpandSettingsPanel
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
int revertLogicDeleted(@Param("userIds") String userIds, @Param("entity") SysUser entity);
|
Vulnerability Classification:
- CWE: CWE-89
- CVE: CVE-2022-45208
- Severity: MEDIUM
- CVSS Score: 4.3
Description: /sys/user/putRecycleBin is affected by sql injection #4126
/sys/user/deleteRecycleBin is affected by sql injection #4125
Function: revertLogicDeleted
File: jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysUserMapper.java
Repository: jeecgboot/jeecg-boot
Fixed Code:
int revertLogicDeleted(@Param("userIds") List<String> userIds, @Param("entity") SysUser entity);
|
[
"CWE-89"
] |
CVE-2022-45208
|
MEDIUM
| 4.3
|
jeecgboot/jeecg-boot
|
revertLogicDeleted
|
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysUserMapper.java
|
51e2227bfe54f5d67b09411ee9a336750164e73d
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public <A extends Output<E>, E extends Exception> void append(A a, long l) throws E {
a.append(l);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: append
File: api/jstachio/src/main/java/io/jstach/jstachio/escapers/HtmlEscaper.java
Repository: jstachio
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-33962
|
MEDIUM
| 6.1
|
jstachio
|
append
|
api/jstachio/src/main/java/io/jstach/jstachio/escapers/HtmlEscaper.java
|
7b2f78377d1284df14c580be762a25af5f8dcd66
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String nodeToString(Node node, boolean prettyPrint) {
StringOutputStream s = new StringOutputStream();
printNode(s, node, prettyPrint, false);
return s.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nodeToString
File: src/edu/stanford/nlp/util/XMLUtils.java
Repository: stanfordnlp/CoreNLP
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-3869
|
MEDIUM
| 5
|
stanfordnlp/CoreNLP
|
nodeToString
|
src/edu/stanford/nlp/util/XMLUtils.java
|
5d83f1e8482ca304db8be726cad89554c88f136a
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isUserStopped(int userId) {
return mUserController.getStartedUserState(userId) == null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isUserStopped
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
|
isUserStopped
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getUserId() {
return UserHandle.getUserId(id.uid);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserId
File: services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-1541
|
MEDIUM
| 4.3
|
android
|
getUserId
|
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
|
0b98d304c467184602b4c6bce76fda0b0274bc07
| 0
|
Analyze the following code function for security vulnerabilities
|
private static int getSerialNumber(File file) throws IOException {
try {
final byte[] buf = new byte[256];
final int len = Os.getxattr(file.getAbsolutePath(), XATTR_SERIAL, buf);
final String serial = new String(buf, 0, len);
try {
return Integer.parseInt(serial);
} catch (NumberFormatException e) {
throw new IOException("Bad serial number: " + serial);
}
} catch (ErrnoException e) {
if (e.errno == OsConstants.ENODATA) {
return -1;
} else {
throw e.rethrowAsIOException();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSerialNumber
File: services/core/java/com/android/server/pm/UserManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2457
|
LOW
| 2.1
|
android
|
getSerialNumber
|
services/core/java/com/android/server/pm/UserManagerService.java
|
12332e05f632794e18ea8c4ac52c98e82532e5db
| 0
|
Analyze the following code function for security vulnerabilities
|
public Object parse(byte[] in, ContainerFactory containerFactory) throws ParseException {
return parse(in, containerFactory, ContentHandlerDumy.HANDLER);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parse
File: json-smart/src/main/java/net/minidev/json/parser/JSONParserByteArray.java
Repository: netplex/json-smart-v1
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2021-31684
|
MEDIUM
| 5
|
netplex/json-smart-v1
|
parse
|
json-smart/src/main/java/net/minidev/json/parser/JSONParserByteArray.java
|
c558138b3cb11f586643f95fbca4ce5c4e92a198
| 0
|
Analyze the following code function for security vulnerabilities
|
IBinder getHomeActivityToken() {
ActivityRecord homeActivity = getHomeActivity();
if (homeActivity != null) {
return homeActivity.appToken;
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getHomeActivityToken
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
|
getHomeActivityToken
|
services/core/java/com/android/server/am/ActivityStackSupervisor.java
|
468651c86a8adb7aa56c708d2348e99022088af3
| 0
|
Analyze the following code function for security vulnerabilities
|
public Token createToken(UserDetails userDetails) {
long expires = System.currentTimeMillis() + 1000L * tokenValidity;
String token = userDetails.getUsername() + ":" + expires + ":" + computeSignature(userDetails, expires);
return new Token(token, expires);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createToken
File: app/templates/src/main/java/package/security/xauth/_TokenProvider.java
Repository: jhipster/generator-jhipster
The code follows secure coding practices.
|
[
"CWE-307"
] |
CVE-2015-20110
|
HIGH
| 7.5
|
jhipster/generator-jhipster
|
createToken
|
app/templates/src/main/java/package/security/xauth/_TokenProvider.java
|
79fe5626cb1bb80f9ac86cf46980748e65d2bdbc
| 0
|
Analyze the following code function for security vulnerabilities
|
public String dialogSeparator() {
return "<div class=\"dialogseparator\" unselectable=\"on\"></div>";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dialogSeparator
File: src/org/opencms/workplace/CmsDialog.java
Repository: alkacon/opencms-core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2013-4600
|
MEDIUM
| 4.3
|
alkacon/opencms-core
|
dialogSeparator
|
src/org/opencms/workplace/CmsDialog.java
|
72a05e3ea1cf692e2efce002687272e63f98c14a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void doesNotQualifySortIfNoAliasDetected() {
assertThat(applySorting("from mytable where ?1 is null", new Sort("firstname")),
endsWith("order by firstname asc"));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doesNotQualifySortIfNoAliasDetected
File: src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsUnitTests.java
Repository: spring-projects/spring-data-jpa
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-6652
|
MEDIUM
| 6.8
|
spring-projects/spring-data-jpa
|
doesNotQualifySortIfNoAliasDetected
|
src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsUnitTests.java
|
b8e7fe
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
@Override
public void sendPacket(Stanza packet) throws NotConnectedException, InterruptedException {
sendStanza(packet);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendPacket
File: smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
Repository: igniterealtime/Smack
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2016-10027
|
MEDIUM
| 4.3
|
igniterealtime/Smack
|
sendPacket
|
smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
|
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nonnull
@MustNotContainNull
public static Topic[] getLeftToRightOrderedChildrens(@Nonnull final Topic topic) {
final List<Topic> result = new ArrayList<Topic>();
if (topic.getTopicLevel() == 0) {
for (final Topic t : topic.getChildren()) {
if (AbstractCollapsableElement.isLeftSidedTopic(t)) {
result.add(t);
}
}
for (final Topic t : topic.getChildren()) {
if (!AbstractCollapsableElement.isLeftSidedTopic(t)) {
result.add(t);
}
}
} else {
result.addAll(topic.getChildren());
}
return result.toArray(new Topic[result.size()]);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLeftToRightOrderedChildrens
File: mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java
Repository: raydac/netbeans-mmd-plugin
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000542
|
MEDIUM
| 6.8
|
raydac/netbeans-mmd-plugin
|
getLeftToRightOrderedChildrens
|
mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java
|
9fba652bf06e649186b8f9e612d60e9cc15097e9
| 0
|
Analyze the following code function for security vulnerabilities
|
public Authentication getAuthentication(String authName) {
return authentications.get(authName);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAuthentication
File: samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
getAuthentication
|
samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
String chooseServerPSKIdentityHint(PSKKeyManager keyManager);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: chooseServerPSKIdentityHint
File: src/main/java/org/conscrypt/SSLParametersImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3840
|
HIGH
| 10
|
android
|
chooseServerPSKIdentityHint
|
src/main/java/org/conscrypt/SSLParametersImpl.java
|
5af5e93463f4333187e7e35f3bd2b846654aa214
| 0
|
Analyze the following code function for security vulnerabilities
|
public DeletedAttachment getDeletedAttachment(String id, XWikiContext context) throws XWikiException
{
if (hasAttachmentRecycleBin(context)) {
return getAttachmentRecycleBinStore().getDeletedAttachment(NumberUtils.toLong(id), context, true);
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDeletedAttachment
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-32620
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
getDeletedAttachment
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
void onWindowsGone() {
if (DEBUG_VISIBILITY) Slog.v(TAG_WM, "Reporting gone in " + token);
if (DEBUG_SWITCH) Log.v(TAG_SWITCH, "windowsGone(): " + this);
nowVisible = false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onWindowsGone
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
|
onWindowsGone
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
public void deleteByDatabaseType(String databaseType) {
String baseDir = driverBaseDirectory + "/" + databaseType;
Path path = Paths.get(baseDir);
try {
if (Files.exists(path)) {
Files.list(path).forEach(file -> {
try {
Files.deleteIfExists(file);
} catch (IOException e) {
log.error("delete file error " + file, e);
}
});
}
Files.deleteIfExists(path);
} catch (IOException e) {
log.error("delete driver error " + databaseType, e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deleteByDatabaseType
File: core/src/main/java/com/databasir/core/infrastructure/driver/DriverResources.java
Repository: vran-dev/databasir
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2022-31196
|
HIGH
| 7.5
|
vran-dev/databasir
|
deleteByDatabaseType
|
core/src/main/java/com/databasir/core/infrastructure/driver/DriverResources.java
|
226c20e0c9124037671a91d6b3e5083bd2462058
| 0
|
Analyze the following code function for security vulnerabilities
|
private AttributedString truncateValue(Map<String, Object> options, AttributedString value) {
if (value.columnLength() > (int) options.getOrDefault(Printer.MAX_COLUMN_WIDTH, Integer.MAX_VALUE)) {
AttributedStringBuilder asb = new AttributedStringBuilder();
asb.append(value.columnSubSequence(0, (int) options.get(Printer.MAX_COLUMN_WIDTH) - 3));
asb.append("...");
return asb.toAttributedString();
}
return value;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: truncateValue
File: console/src/main/java/org/jline/console/impl/DefaultPrinter.java
Repository: jline/jline3
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-50572
|
MEDIUM
| 5.5
|
jline/jline3
|
truncateValue
|
console/src/main/java/org/jline/console/impl/DefaultPrinter.java
|
f3c60a3e6255e8e0c20d5043a4fe248446f292bb
| 0
|
Analyze the following code function for security vulnerabilities
|
public JSONException syntaxError(String message) {
return new JSONException(message + this.toString());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: syntaxError
File: src/main/java/org/json/JSONTokener.java
Repository: stleary/JSON-java
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2022-45690
|
HIGH
| 7.5
|
stleary/JSON-java
|
syntaxError
|
src/main/java/org/json/JSONTokener.java
|
7a124d857dc8da1165c87fa788e53359a317d0f7
| 0
|
Analyze the following code function for security vulnerabilities
|
public Pipeline savePipelineWithMaterials(Pipeline pipeline) {
saveRevs(pipeline.getBuildCause().getMaterialRevisions());
return save(pipeline);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: savePipelineWithMaterials
File: server/src/test-shared/java/com/thoughtworks/go/server/dao/DatabaseAccessHelper.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-697"
] |
CVE-2022-39308
|
MEDIUM
| 5.9
|
gocd
|
savePipelineWithMaterials
|
server/src/test-shared/java/com/thoughtworks/go/server/dao/DatabaseAccessHelper.java
|
236d4baf92e6607f2841c151c855adcc477238b8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void restoreCacheResources(XWikiContext context, UsedExtension extension)
{
getPulledResources(context).addAll(extension.resources);
getParametersMap(context).putAll(extension.parameters);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: restoreCacheResources
File: xwiki-platform-core/xwiki-platform-skin/xwiki-platform-skin-skinx/src/main/java/com/xpn/xwiki/plugin/skinx/AbstractSkinExtensionPlugin.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-29206
|
MEDIUM
| 5.4
|
xwiki/xwiki-platform
|
restoreCacheResources
|
xwiki-platform-core/xwiki-platform-skin/xwiki-platform-skin-skinx/src/main/java/com/xpn/xwiki/plugin/skinx/AbstractSkinExtensionPlugin.java
|
fe65bc35d5672dd2505b7ac4ec42aec57d500fbb
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected String getCipherName(int keyLength, Mode mode) {
return "aes-" + (keyLength * 8) + "-" + mode.toString().toLowerCase(Locale.US);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCipherName
File: src/main/java/org/conscrypt/OpenSSLCipher.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2461
|
HIGH
| 7.6
|
android
|
getCipherName
|
src/main/java/org/conscrypt/OpenSSLCipher.java
|
1638945d4ed9403790962ec7abed1b7a232a9ff8
| 0
|
Analyze the following code function for security vulnerabilities
|
public void persistentlyCacheResult(String cacheName, String tableName, Criterion filter, Handler<AsyncResult<Integer>> replyHandler){
String where = "";
if(filter != null){
where = filter.toString();
}
String q = "SELECT * FROM " + schemaName + DOT + tableName + SPACE + where;
persistentlyCacheResult(cacheName, q, replyHandler);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: persistentlyCacheResult
File: domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
persistentlyCacheResult
|
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void apply(Transaction t, SurfaceControl leash, long currentPlayTime) {
final float fraction = getFraction(currentPlayTime);
final float v = mInterpolator.getInterpolation(fraction);
t.setPosition(leash, mFrom.x + (mTo.x - mFrom.x) * v,
mFrom.y + (mTo.y - mFrom.y) * v);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: apply
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
|
apply
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
static void invalidateBinderCaches() {
DevicePolicyManager.invalidateBinderCaches();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: invalidateBinderCaches
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
|
invalidateBinderCaches
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
private void defaultInitialisation() {
syncable = -1; // default to "unknown"
backoffTime = -1; // if < 0 then we aren't in backoff mode
backoffDelay = -1; // if < 0 then we aren't in backoff mode
PeriodicSync defaultSync;
// Old version is one sync a day. Empty bundle gets replaced by any addPeriodicSync()
// call.
if (target.target_provider) {
defaultSync =
new PeriodicSync(target.account, target.provider,
new Bundle(),
DEFAULT_POLL_FREQUENCY_SECONDS,
calculateDefaultFlexTime(DEFAULT_POLL_FREQUENCY_SECONDS));
periodicSyncs.add(defaultSync);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: defaultInitialisation
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
|
defaultInitialisation
|
services/core/java/com/android/server/content/SyncStorageEngine.java
|
d3383d5bfab296ba3adbc121ff8a7b542bde4afb
| 0
|
Analyze the following code function for security vulnerabilities
|
protected boolean isDefaultKeyDeserializer(KeyDeserializer keyDeser) {
return ClassUtil.isJacksonStdImpl(keyDeser);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isDefaultKeyDeserializer
File: src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2022-42003
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
isDefaultKeyDeserializer
|
src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java
|
d78d00ee7b5245b93103fef3187f70543d67ca33
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("unchecked")
public void sendNewPostNotifications(Post question, HttpServletRequest req) {
if (question == null) {
return;
}
// the current user - same as utils.getAuthUser(req)
Profile postAuthor = question.getAuthor() != null ? question.getAuthor() : pc.read(question.getCreatorid());
if (!question.getType().equals(Utils.type(UnapprovedQuestion.class))) {
if (!isNewPostNotificationAllowed()) {
return;
}
Map<String, Object> model = new HashMap<String, Object>();
Map<String, String> lang = getLang(req);
String name = postAuthor.getName();
String body = Utils.markdownToHtml(question.getBody());
String picture = Utils.formatMessage("<img src='{0}' width='25'>", escapeHtmlAttribute(avatarRepository.
getLink(postAuthor, AvatarFormat.Square25)));
String postURL = CONF.serverUrl() + question.getPostLink(false, false);
String tagsString = Optional.ofNullable(question.getTags()).orElse(Collections.emptyList()).stream().
map(t -> "<span class=\"tag\">" + escapeHtml(t) + "</span>").
collect(Collectors.joining(" "));
String subject = Utils.formatMessage(lang.get("notification.newposts.subject"), name,
Utils.abbreviate(question.getTitle(), 255));
model.put("subject", escapeHtml(subject));
model.put("logourl", getSmallLogoUrl());
model.put("heading", Utils.formatMessage(lang.get("notification.newposts.heading"), picture, escapeHtml(name)));
model.put("body", Utils.formatMessage("<h2><a href='{0}'>{1}</a></h2><div>{2}</div><br>{3}",
postURL, escapeHtml(question.getTitle()), body, tagsString));
Set<String> emails = new HashSet<String>(getNotificationSubscribers(EMAIL_ALERTS_PREFIX + "new_post_subscribers"));
emails.addAll(getFavTagsSubscribers(question.getTags()));
sendEmailsToSubscribersInSpace(emails, question.getSpace(), subject, compileEmailTemplate(model));
} else if (postsNeedApproval() && question instanceof UnapprovedQuestion) {
Report rep = new Report();
rep.setDescription("New question awaiting approval");
rep.setSubType(Report.ReportType.OTHER);
rep.setLink(question.getPostLink(false, false));
rep.setAuthorName(postAuthor.getName());
rep.create();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendNewPostNotifications
File: src/main/java/com/erudika/scoold/utils/ScooldUtils.java
Repository: Erudika/scoold
The code follows secure coding practices.
|
[
"CWE-130"
] |
CVE-2022-1543
|
MEDIUM
| 6.5
|
Erudika/scoold
|
sendNewPostNotifications
|
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getUser(String id) {
User user = userMapper.selectByPrimaryKey(id);
if (user != null) {
return user.getName();
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUser
File: backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2021-45789
|
MEDIUM
| 6.5
|
metersphere
|
getUser
|
backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java
|
d74e02cdff47cdf7524d305d098db6ffb7f61b47
| 0
|
Analyze the following code function for security vulnerabilities
|
public ObjectInputStream createObjectInputStream(final HierarchicalStreamReader reader) throws IOException {
return createObjectInputStream(reader, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createObjectInputStream
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
|
createObjectInputStream
|
xstream/src/java/com/thoughtworks/xstream/XStream.java
|
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
| 0
|
Analyze the following code function for security vulnerabilities
|
private TranslationBundle getOnDemandDocumentBundle(DocumentReference documentReference)
throws TranslationBundleDoesNotExistsException
{
String uid = this.uidSerializer.serialize(documentReference);
TranslationBundle bundle = this.onDemandBundleCache.get(uid);
if (bundle == null) {
synchronized (this.onDemandBundleCache) {
bundle = this.onDemandBundleCache.get(uid);
if (bundle == null) {
bundle = createOnDemandDocumentBundle(documentReference, uid);
this.onDemandBundleCache.set(uid, bundle);
}
}
}
return bundle;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getOnDemandDocumentBundle
File: xwiki-platform-core/xwiki-platform-localization/xwiki-platform-localization-sources/xwiki-platform-localization-source-wiki/src/main/java/org/xwiki/localization/wiki/internal/DocumentTranslationBundleFactory.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2023-29510
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
getOnDemandDocumentBundle
|
xwiki-platform-core/xwiki-platform-localization/xwiki-platform-localization-sources/xwiki-platform-localization-source-wiki/src/main/java/org/xwiki/localization/wiki/internal/DocumentTranslationBundleFactory.java
|
d06ff8a58480abc7f63eb1d4b8b366024d990643
| 0
|
Analyze the following code function for security vulnerabilities
|
public static int determineRows(String s) {
if(s==null) return 5;
return Math.max(5,LINE_END.split(s).length);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: determineRows
File: core/src/main/java/hudson/Functions.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-310"
] |
CVE-2014-2061
|
MEDIUM
| 5
|
jenkinsci/jenkins
|
determineRows
|
core/src/main/java/hudson/Functions.java
|
bf539198564a1108b7b71a973bf7de963a6213ef
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<String> getId()
{
return this.id;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getId
File: xwiki-platform-core/xwiki-platform-display/xwiki-platform-display-api/src/main/java/org/xwiki/display/internal/DocumentContentAsyncRenderer.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-459"
] |
CVE-2023-36468
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
getId
|
xwiki-platform-core/xwiki-platform-display/xwiki-platform-display-api/src/main/java/org/xwiki/display/internal/DocumentContentAsyncRenderer.java
|
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
| 0
|
Analyze the following code function for security vulnerabilities
|
public static ParserConfig getGlobalInstance() {
return global;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getGlobalInstance
File: src/main/java/com/alibaba/fastjson/parser/ParserConfig.java
Repository: alibaba/fastjson
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2022-25845
|
MEDIUM
| 6.8
|
alibaba/fastjson
|
getGlobalInstance
|
src/main/java/com/alibaba/fastjson/parser/ParserConfig.java
|
8f3410f81cbd437f7c459f8868445d50ad301f15
| 0
|
Analyze the following code function for security vulnerabilities
|
void scheduleSaveUser(@UserIdInt int userId) {
scheduleSaveInner(userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: scheduleSaveUser
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
|
scheduleSaveUser
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
private static String uriDecode(String s) {
try {
// URLDecode decodes '+' to a space, as for
// form encoding. So protect plus signs.
return URLDecoder.decode(s.replace("+", "%2B"), "US-ASCII");
}
catch (IOException e) {
throw new RuntimeException(e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: uriDecode
File: src/main/java/com/rabbitmq/client/ConnectionFactory.java
Repository: rabbitmq/rabbitmq-java-client
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-46120
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-java-client
|
uriDecode
|
src/main/java/com/rabbitmq/client/ConnectionFactory.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
public void onDisplayChanged(int displayId) {
mH.sendMessage(mH.obtainMessage(H.DO_DISPLAY_CHANGED, displayId, 0));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onDisplayChanged
File: services/core/java/com/android/server/wm/WindowManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3875
|
HIGH
| 7.2
|
android
|
onDisplayChanged
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean hasRequestFilters() {
return !requestFilters.isEmpty();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasRequestFilters
File: api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java
Repository: AsyncHttpClient/async-http-client
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2013-7397
|
MEDIUM
| 4.3
|
AsyncHttpClient/async-http-client
|
hasRequestFilters
|
api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java
|
df6ed70e86c8fc340ed75563e016c8baa94d7e72
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void handleException(AbstractHttp2StreamSinkChannel channel, IOException exception) {
IoUtils.safeClose(channel);
handleBrokenSinkChannel(exception);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleException
File: core/src/main/java/io/undertow/protocols/http2/Http2Channel.java
Repository: undertow-io/undertow
The code follows secure coding practices.
|
[
"CWE-214"
] |
CVE-2021-3859
|
HIGH
| 7.5
|
undertow-io/undertow
|
handleException
|
core/src/main/java/io/undertow/protocols/http2/Http2Channel.java
|
e43f0ada3f4da6e8579e0020cec3cb1a81e487c2
| 0
|
Analyze the following code function for security vulnerabilities
|
public void writeBinary(byte[] buf) throws TException {
writeBinary(buf, 0, buf.length);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeBinary
File: thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java
Repository: facebook/fbthrift
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2019-11938
|
MEDIUM
| 5
|
facebook/fbthrift
|
writeBinary
|
thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java
|
08c2d412adb214c40bb03be7587057b25d053030
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String getDownloadAddedMessage() {
return FileDownloader.class.getName() + DOWNLOAD_ADDED_MESSAGE;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDownloadAddedMessage
File: src/main/java/com/owncloud/android/files/services/FileDownloader.java
Repository: nextcloud/android
The code follows secure coding practices.
|
[
"CWE-732"
] |
CVE-2022-24886
|
LOW
| 2.1
|
nextcloud/android
|
getDownloadAddedMessage
|
src/main/java/com/owncloud/android/files/services/FileDownloader.java
|
27559efb79d45782e000b762860658d49e9c35e9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Transactional(readOnly = true)
public PageHandler getPage(CmsContentQuery queryEntity, Boolean containChild, String orderField, String orderType,
Integer pageIndex, Integer pageSize) {
queryEntity.setCategoryIds(getCategoryIds(containChild, queryEntity.getCategoryId(), queryEntity.getCategoryIds()));
return dao.getPage(queryEntity, orderField, orderType, pageIndex, pageSize);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPage
File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/logic/service/cms/CmsContentService.java
Repository: sanluan/PublicCMS
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-21333
|
LOW
| 3.5
|
sanluan/PublicCMS
|
getPage
|
publiccms-parent/publiccms-core/src/main/java/com/publiccms/logic/service/cms/CmsContentService.java
|
b4d5956e65b14347b162424abb197a180229b3db
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void createShortcutIntentsAsync(int launcherUserId,
@NonNull String callingPackage, @NonNull String packageName,
@NonNull String shortcutId, int userId, int callingPid,
int callingUid, @NonNull AndroidFuture<Intent[]> cb) {
// Calling permission must be checked by LauncherAppsImpl.
Preconditions.checkStringNotEmpty(packageName, "packageName can't be empty");
Preconditions.checkStringNotEmpty(shortcutId, "shortcutId can't be empty");
// Check in memory shortcut first
synchronized (mLock) {
throwIfUserLockedL(userId);
throwIfUserLockedL(launcherUserId);
getLauncherShortcutsLocked(callingPackage, userId, launcherUserId)
.attemptToRestoreIfNeededAndSave();
final boolean getPinnedByAnyLauncher =
canSeeAnyPinnedShortcut(callingPackage, launcherUserId,
callingPid, callingUid);
// Make sure the shortcut is actually visible to the launcher.
final ShortcutInfo si = getShortcutInfoLocked(
launcherUserId, callingPackage, packageName, shortcutId, userId,
getPinnedByAnyLauncher);
if (si != null) {
if (!si.isEnabled() || !(si.isAlive() || getPinnedByAnyLauncher)) {
Log.e(TAG, "Shortcut " + shortcutId + " does not exist or disabled");
cb.complete(null);
return;
}
cb.complete(si.getIntents());
return;
}
}
// Otherwise check persisted shortcuts
getShortcutInfoAsync(launcherUserId, packageName, shortcutId, userId, si -> {
cb.complete(si == null ? null : si.getIntents());
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createShortcutIntentsAsync
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
|
createShortcutIntentsAsync
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.