instruction
string | input
string | output
string | cwe_ids
list | cve_id
string | severity
string | cvss_score
float64 | repo_name
string | func_name
string | file_path
string | commit_hash
string | is_vulnerable
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Analyze the following code function for security vulnerabilities
|
public void setBackoff(EndPoint info, long nextSyncTime, long nextDelay) {
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.v(TAG, "setBackoff: " + info
+ " -> nextSyncTime " + nextSyncTime + ", nextDelay " + nextDelay);
}
boolean changed;
synchronized (mAuthorities) {
if (info.target_provider
&& (info.account == null || info.provider == null)) {
// Do more work for a provider sync if the provided info has specified all
// accounts/providers.
changed = setBackoffLocked(
info.account /* may be null */,
info.userId,
info.provider /* may be null */,
nextSyncTime, nextDelay);
} else {
AuthorityInfo authorityInfo =
getOrCreateAuthorityLocked(info, -1 /* ident */, true);
if (authorityInfo.backoffTime == nextSyncTime
&& authorityInfo.backoffDelay == nextDelay) {
changed = false;
} else {
authorityInfo.backoffTime = nextSyncTime;
authorityInfo.backoffDelay = nextDelay;
changed = true;
}
}
}
if (changed) {
reportChange(ContentResolver.SYNC_OBSERVER_TYPE_SETTINGS);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setBackoff
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
|
setBackoff
|
services/core/java/com/android/server/content/SyncStorageEngine.java
|
d3383d5bfab296ba3adbc121ff8a7b542bde4afb
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String connectionUrl() {
EntityManager entityManager = entityManagerProvider.get();
return (String) entityManager.getProperties()
.get(PersistenceUnitProperties.JDBC_URL);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: connectionUrl
File: src/main/java/uk/q3c/krail/jpa/persist/BaseJpaDao.java
Repository: KrailOrg/krail-jpa
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-15018
|
MEDIUM
| 5.2
|
KrailOrg/krail-jpa
|
connectionUrl
|
src/main/java/uk/q3c/krail/jpa/persist/BaseJpaDao.java
|
c1e848665492e21ef6cc9be443205e36b9a1f6be
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onReachabilityFailure(ReachabilityLossInfoParcelable lossInfo) {
sendMessage(CMD_IP_REACHABILITY_FAILURE, lossInfo);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onReachabilityFailure
File: service/java/com/android/server/wifi/ClientModeImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
onReachabilityFailure
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setProfileName(ComponentName who, String profileName) {
Objects.requireNonNull(who, "ComponentName is null");
final CallerIdentity caller = getCallerIdentity(who);
Preconditions.checkCallAuthorization(
isDefaultDeviceOwner(caller) || isProfileOwner(caller));
mInjector.binderWithCleanCallingIdentity(() -> {
mUserManager.setUserName(caller.getUserId(), profileName);
DevicePolicyEventLogger
.createEvent(DevicePolicyEnums.SET_PROFILE_NAME)
.setAdmin(caller.getComponentName())
.write();
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setProfileName
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
|
setProfileName
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setServerVariables(Map<String, String> serverVariables) {
this.serverVariables = serverVariables;
updateBasePath();
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setServerVariables
File: samples/client/petstore/java/retrofit2-play26/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
|
setServerVariables
|
samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
public static ProfileParameter fromXML(String xml) throws Exception {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.parse(new InputSource(new StringReader(xml)));
Element profileParameterElement = document.getDocumentElement();
return fromDOM(profileParameterElement);
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2022-2414
- Severity: HIGH
- CVSS Score: 7.5
Description: Disable access to external entities when parsing XML
This reduces the vulnerability of XML parsers to XXE (XML external
entity) injection.
The best way to prevent XXE is to stop using XML altogether, which we do
plan to do. Until that happens I consider it worthwhile to tighten the
security here though.
Function: fromXML
File: base/common/src/main/java/com/netscape/certsrv/profile/ProfileParameter.java
Repository: dogtagpki/pki
Fixed Code:
public static ProfileParameter fromXML(String xml) throws Exception {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.parse(new InputSource(new StringReader(xml)));
Element profileParameterElement = document.getDocumentElement();
return fromDOM(profileParameterElement);
}
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
fromXML
|
base/common/src/main/java/com/netscape/certsrv/profile/ProfileParameter.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public int compare(DashboardCategory lhs, DashboardCategory rhs) {
return rhs.priority - lhs.priority;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: compare
File: packages/SettingsLib/src/com/android/settingslib/drawer/TileUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3889
|
HIGH
| 7.2
|
android
|
compare
|
packages/SettingsLib/src/com/android/settingslib/drawer/TileUtils.java
|
e206f02d46ae5e38c74d138b51f6e1637e261abe
| 0
|
Analyze the following code function for security vulnerabilities
|
public Iterator<String> getConverterIds() {
return converterIdMap.keySet().iterator();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getConverterIds
File: impl/src/main/java/com/sun/faces/application/applicationimpl/InstanceFactory.java
Repository: eclipse-ee4j/mojarra
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-14371
|
MEDIUM
| 5
|
eclipse-ee4j/mojarra
|
getConverterIds
|
impl/src/main/java/com/sun/faces/application/applicationimpl/InstanceFactory.java
|
1b434748d9239f42eae8aa7d37d7a0930c061e24
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<Fingerprint> getEnrolledFingerprints(int userId) {
return mFingerprintUtils.getFingerprintsForUser(mContext, userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getEnrolledFingerprints
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
|
getEnrolledFingerprints
|
services/core/java/com/android/server/fingerprint/FingerprintService.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
public static Path getTextFilePath(String pi, String relativeFilePath) throws PresentationException, IndexUnreachableException {
if (StringUtils.isBlank(relativeFilePath)) {
return null;
}
String dataRepository = DataManager.getInstance().getSearchIndex().findDataRepositoryName(pi);
Path filePath = Paths.get(getDataRepositoryPath(dataRepository), relativeFilePath);
return filePath;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTextFilePath
File: goobi-viewer-core/src/main/java/io/goobi/viewer/controller/DataFileTools.java
Repository: intranda/goobi-viewer-core
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-15124
|
MEDIUM
| 4
|
intranda/goobi-viewer-core
|
getTextFilePath
|
goobi-viewer-core/src/main/java/io/goobi/viewer/controller/DataFileTools.java
|
44ceb8e2e7e888391e8a941127171d6366770df3
| 0
|
Analyze the following code function for security vulnerabilities
|
public Credential getCredential() {
return mCredential;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCredential
File: framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-120"
] |
CVE-2023-21243
|
MEDIUM
| 5.5
|
android
|
getCredential
|
framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java
|
5b49b8711efaadadf5052ba85288860c2d7ca7a6
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean checkToClearCache() {
if (!okToClearCache()) {
LOG.error("Cannot clear the cache at this time. Try later. If the problem persists, try closing your browser(s) & JNLP applications. At the end you can try to kill all java applications. \\\\\\n You can clear cache by javaws -Xclearcache or via itw-settings Cache -> View files -> Purge");
return false;
}
return CacheLRUWrapper.getInstance().getCacheDir().getFile().isDirectory();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkToClearCache
File: core/src/main/java/net/sourceforge/jnlp/cache/CacheUtil.java
Repository: AdoptOpenJDK/IcedTea-Web
The code follows secure coding practices.
|
[
"CWE-345",
"CWE-94",
"CWE-22"
] |
CVE-2019-10182
|
MEDIUM
| 5.8
|
AdoptOpenJDK/IcedTea-Web
|
checkToClearCache
|
core/src/main/java/net/sourceforge/jnlp/cache/CacheUtil.java
|
2ab070cdac087bd208f64fa8138bb709f8d7680c
| 0
|
Analyze the following code function for security vulnerabilities
|
public Set<String> getFavspaces() {
if (favspaces == null) {
favspaces = new LinkedHashSet<String>();
}
return favspaces;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFavspaces
File: src/main/java/com/erudika/scoold/core/Profile.java
Repository: Erudika/scoold
The code follows secure coding practices.
|
[
"CWE-130"
] |
CVE-2022-1543
|
MEDIUM
| 6.5
|
Erudika/scoold
|
getFavspaces
|
src/main/java/com/erudika/scoold/core/Profile.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean shutdown(int timeout) {
if (checkCallingPermission(android.Manifest.permission.SHUTDOWN)
!= PackageManager.PERMISSION_GRANTED) {
throw new SecurityException("Requires permission "
+ android.Manifest.permission.SHUTDOWN);
}
boolean timedout = false;
synchronized(this) {
mShuttingDown = true;
updateEventDispatchingLocked();
timedout = mStackSupervisor.shutdownLocked(timeout);
}
mAppOpsService.shutdown();
if (mUsageStatsService != null) {
mUsageStatsService.prepareShutdown();
}
mBatteryStatsService.shutdown();
synchronized (this) {
mProcessStats.shutdownLocked();
notifyTaskPersisterLocked(null, true);
}
return timedout;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: shutdown
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3833
|
MEDIUM
| 4.3
|
android
|
shutdown
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean isNewBDSInitNeeded(long globalIndex, int xmssHeight, int layer)
{
if (globalIndex == 0)
{
return false;
}
return (globalIndex % (long)Math.pow((1 << xmssHeight), layer + 1) == 0) ? true : false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isNewBDSInitNeeded
File: core/src/main/java/org/bouncycastle/pqc/crypto/xmss/XMSSUtil.java
Repository: bcgit/bc-java
The code follows secure coding practices.
|
[
"CWE-470"
] |
CVE-2018-1000613
|
HIGH
| 7.5
|
bcgit/bc-java
|
isNewBDSInitNeeded
|
core/src/main/java/org/bouncycastle/pqc/crypto/xmss/XMSSUtil.java
|
4092ede58da51af9a21e4825fbad0d9a3ef5a223
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Byte getByteAndRemove(K name) {
V v = getAndRemove(name);
try {
return v != null ? toByte(name, v) : null;
} catch (RuntimeException ignore) {
return null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getByteAndRemove
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
|
getByteAndRemove
|
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
|
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
| 0
|
Analyze the following code function for security vulnerabilities
|
public static byte[] cacheNameBytes() {
return HotRodConstants.DEFAULT_CACHE_NAME_BYTES;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cacheNameBytes
File: client/hotrod-client/src/main/java/org/infinispan/client/hotrod/RemoteCacheManager.java
Repository: infinispan
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2017-15089
|
MEDIUM
| 6.5
|
infinispan
|
cacheNameBytes
|
client/hotrod-client/src/main/java/org/infinispan/client/hotrod/RemoteCacheManager.java
|
efc44b7b0a5dd4f44773808840dd9785cabcf21c
| 0
|
Analyze the following code function for security vulnerabilities
|
public String parameterToString(Object param) {
if (param == null) {
return "";
} else if (param instanceof Date) {
return formatDate((Date) param);
} else if (param instanceof OffsetDateTime) {
return formatOffsetDateTime((OffsetDateTime) param);
} else if (param instanceof Collection) {
StringBuilder b = new StringBuilder();
for(Object o : (Collection)param) {
if(b.length() > 0) {
b.append(',');
}
b.append(String.valueOf(o));
}
return b.toString();
} else {
return String.valueOf(param);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parameterToString
File: samples/client/petstore/java/okhttp-gson/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
|
parameterToString
|
samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<ProminentProjectAction> getProminentActions() {
List<Action> a = getActions();
List<ProminentProjectAction> pa = new Vector<ProminentProjectAction>();
for (Action action : a) {
if(action instanceof ProminentProjectAction)
pa.add((ProminentProjectAction) action);
}
return pa;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProminentActions
File: core/src/main/java/hudson/model/AbstractProject.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
getProminentActions
|
core/src/main/java/hudson/model/AbstractProject.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
private static String parseContentDisposition(String contentDisposition) {
try {
Matcher m = CONTENT_DISPOSITION_PATTERN.matcher(contentDisposition);
if (m.find()) {
return m.group(1);
}
} catch (IllegalStateException ex) {
// This function is defined as returning null when it can't parse the header
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseContentDisposition
File: src/com/android/providers/downloads/Helpers.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2016-0848
|
HIGH
| 7.2
|
android
|
parseContentDisposition
|
src/com/android/providers/downloads/Helpers.java
|
bdc831357e7a116bc561d51bf2ddc85ff11c01a9
| 0
|
Analyze the following code function for security vulnerabilities
|
private void checkAdminCanSetRestriction(CallerIdentity caller, boolean parent, String key) {
if (parent) {
Preconditions.checkCallAuthorization(
isProfileOwnerOfOrganizationOwnedDevice(caller));
} else {
Preconditions.checkCallAuthorization(
isDeviceOwner(caller) || isProfileOwner(caller));
}
synchronized (getLockObject()) {
if (isDefaultDeviceOwner(caller)) {
if (!UserRestrictionsUtils.canDeviceOwnerChange(key)) {
throw new SecurityException("Device owner cannot set user restriction "
+ key);
}
Preconditions.checkArgument(!parent,
"Cannot use the parent instance in Device Owner mode");
} else if (isFinancedDeviceOwner(caller)) {
if (!UserRestrictionsUtils.canFinancedDeviceOwnerChange(key)) {
throw new SecurityException("Cannot set user restriction " + key
+ " when managing a financed device");
}
Preconditions.checkArgument(!parent,
"Cannot use the parent instance in Financed Device Owner"
+ " mode");
} else {
boolean profileOwnerCanChangeOnItself = !parent
&& UserRestrictionsUtils.canProfileOwnerChange(
key, caller.getUserId() == getMainUserId());
boolean orgOwnedProfileOwnerCanChangeGlobally = parent
&& isProfileOwnerOfOrganizationOwnedDevice(caller)
&& UserRestrictionsUtils.canProfileOwnerOfOrganizationOwnedDeviceChange(
key);
if (!profileOwnerCanChangeOnItself && !orgOwnedProfileOwnerCanChangeGlobally) {
throw new SecurityException("Profile owner cannot set user restriction "
+ key);
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkAdminCanSetRestriction
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
checkAdminCanSetRestriction
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onMetadataChanged(MediaMetadata metadata) {
super.onMetadataChanged(metadata);
if (DEBUG_MEDIA) Log.v(TAG, "DEBUG_MEDIA: onMetadataChanged: " + metadata);
mMediaMetadata = metadata;
updateMediaMetaData(true, true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onMetadataChanged
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
|
onMetadataChanged
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
@LargeTest
@Test
public void testOutgoingCallAndSelectPhoneAccount() throws Exception {
// Remove default PhoneAccount so that the Call moves into the correct
// SELECT_PHONE_ACCOUNT state.
mTelecomSystem.getPhoneAccountRegistrar().setUserSelectedOutgoingPhoneAccount(
null, Process.myUserHandle());
int startingNumConnections = mConnectionServiceFixtureA.mConnectionById.size();
int startingNumCalls = mInCallServiceFixtureX.mCallById.size();
String callId = startOutgoingPhoneCallWithNoPhoneAccount("650-555-1212",
mConnectionServiceFixtureA);
mTelecomSystem.getCallsManager().getLatestPreAccountSelectionFuture().join();
waitForHandlerAction(mConnectionServiceFixtureA.mConnectionServiceDelegate.getHandler(),
TEST_TIMEOUT);
assertEquals(Call.STATE_SELECT_PHONE_ACCOUNT,
mInCallServiceFixtureX.getCall(callId).getState());
assertEquals(Call.STATE_SELECT_PHONE_ACCOUNT,
mInCallServiceFixtureY.getCall(callId).getState());
mInCallServiceFixtureX.mInCallAdapter.phoneAccountSelected(callId,
mPhoneAccountA0.getAccountHandle(), false);
waitForHandlerAction(mConnectionServiceFixtureA.mConnectionServiceDelegate.getHandler(),
TEST_TIMEOUT);
waitForHandlerAction(mConnectionServiceFixtureA.mConnectionServiceDelegate.getHandler(),
TEST_TIMEOUT);
verifyAndProcessOutgoingCallBroadcast(mPhoneAccountA0.getAccountHandle());
IdPair ids = outgoingCallPhoneAccountSelected(mPhoneAccountA0.getAccountHandle(),
startingNumConnections, startingNumCalls, mConnectionServiceFixtureA);
when(mClockProxy.currentTimeMillis()).thenReturn(TEST_DISCONNECT_TIME);
when(mClockProxy.elapsedRealtime()).thenReturn(TEST_DISCONNECT_ELAPSED_TIME);
mConnectionServiceFixtureA.sendSetDisconnected(ids.mConnectionId, DisconnectCause.LOCAL);
assertEquals(Call.STATE_DISCONNECTED,
mInCallServiceFixtureX.getCall(ids.mCallId).getState());
assertEquals(Call.STATE_DISCONNECTED,
mInCallServiceFixtureY.getCall(ids.mCallId).getState());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: testOutgoingCallAndSelectPhoneAccount
File: tests/src/com/android/server/telecom/tests/BasicCallTests.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
testOutgoingCallAndSelectPhoneAccount
|
tests/src/com/android/server/telecom/tests/BasicCallTests.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String fixName(final Context context, final String name) {
return (context != null) ? fixName(context, name, null) : name;
}
|
Vulnerability Classification:
- CWE: CWE-917
- CVE: CVE-2022-24818
- Severity: HIGH
- CVSS Score: 7.5
Description: [GEOT-7115] Streamline JNDI lookups
Function: fixName
File: modules/library/metadata/src/main/java/org/geotools/util/factory/GeoTools.java
Repository: geotools
Fixed Code:
@Deprecated
public static String fixName(final Context context, final String name) {
return (context != null) ? fixName(context, name, null) : name;
}
|
[
"CWE-917"
] |
CVE-2022-24818
|
HIGH
| 7.5
|
geotools
|
fixName
|
modules/library/metadata/src/main/java/org/geotools/util/factory/GeoTools.java
|
4f70fa3234391dd0cda883a20ab0ec75688cba49
| 1
|
Analyze the following code function for security vulnerabilities
|
private void maybeSetDefaultProfileOwnerUserRestrictions() {
synchronized (getLockObject()) {
for (final int userId : mOwners.getProfileOwnerKeys()) {
final ActiveAdmin profileOwner = getProfileOwnerAdminLocked(userId);
// The following restrictions used to be applied to managed profiles by different
// means (via Settings or by disabling components). Now they are proper user
// restrictions so we apply them to managed profile owners. Non-managed secondary
// users didn't have those restrictions so we skip them to keep existing behavior.
if (profileOwner == null || !mUserManager.isManagedProfile(userId)) {
continue;
}
maybeSetDefaultRestrictionsForAdminLocked(userId, profileOwner);
ensureUnknownSourcesRestrictionForProfileOwnerLocked(
userId, profileOwner, false /* newOwner */);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: maybeSetDefaultProfileOwnerUserRestrictions
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
maybeSetDefaultProfileOwnerUserRestrictions
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Beta
public static Predicate<File> isFile() {
return FilePredicate.IS_FILE;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isFile
File: guava/src/com/google/common/io/Files.java
Repository: google/guava
The code follows secure coding practices.
|
[
"CWE-732"
] |
CVE-2020-8908
|
LOW
| 2.1
|
google/guava
|
isFile
|
guava/src/com/google/common/io/Files.java
|
fec0dbc4634006a6162cfd4d0d09c962073ddf40
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean roleAllowed(RolesAllowed rolesAllowed,
HttpServletRequest request) {
if (rolesAllowed == null) {
return true;
}
for (String role : rolesAllowed.value()) {
if (request.isUserInRole(role)) {
return true;
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: roleAllowed
File: fusion-endpoint/src/main/java/com/vaadin/flow/server/connect/auth/VaadinConnectAccessChecker.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-203"
] |
CVE-2021-31406
|
LOW
| 1.9
|
vaadin/flow
|
roleAllowed
|
fusion-endpoint/src/main/java/com/vaadin/flow/server/connect/auth/VaadinConnectAccessChecker.java
|
3fe644cab2cffa5b86316dbe71b11df1083861a9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Pure
protected Object getUUID(byte[] data) throws SQLException {
return new UUID(ByteConverter.int8(data, 0), ByteConverter.int8(data, 8));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUUID
File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
Repository: pgjdbc
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-31197
|
HIGH
| 8
|
pgjdbc
|
getUUID
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
public static Object instantiate(String classname, Properties info, boolean tryString,
@Nullable String stringarg)
throws ClassNotFoundException, SecurityException, NoSuchMethodException,
IllegalArgumentException, InstantiationException, IllegalAccessException,
InvocationTargetException {
@Nullable Object[] args = {info};
Constructor<?> ctor = null;
Class<?> cls = Class.forName(classname);
try {
ctor = cls.getConstructor(Properties.class);
} catch (NoSuchMethodException ignored) {
}
if (tryString && ctor == null) {
try {
ctor = cls.getConstructor(String.class);
args = new String[]{stringarg};
} catch (NoSuchMethodException ignored) {
}
}
if (ctor == null) {
ctor = cls.getConstructor();
args = new Object[0];
}
return ctor.newInstance(args);
}
|
Vulnerability Classification:
- CWE: CWE-665
- CVE: CVE-2022-21724
- Severity: HIGH
- CVSS Score: 7.5
Description: Merge pull request from GHSA-v7wg-cpwc-24m4
This ensures arbitrary classes can't be passed instead of
AuthenticationPlugin, SocketFactory, SSLSocketFactory, CallbackHandler, HostnameVerifier
Function: instantiate
File: pgjdbc/src/main/java/org/postgresql/util/ObjectFactory.java
Repository: pgjdbc
Fixed Code:
public static <T> T instantiate(Class<T> expectedClass, String classname, Properties info,
boolean tryString,
@Nullable String stringarg)
throws ClassNotFoundException, SecurityException, NoSuchMethodException,
IllegalArgumentException, InstantiationException, IllegalAccessException,
InvocationTargetException {
@Nullable Object[] args = {info};
Constructor<? extends T> ctor = null;
Class<? extends T> cls = Class.forName(classname).asSubclass(expectedClass);
try {
ctor = cls.getConstructor(Properties.class);
} catch (NoSuchMethodException ignored) {
}
if (tryString && ctor == null) {
try {
ctor = cls.getConstructor(String.class);
args = new String[]{stringarg};
} catch (NoSuchMethodException ignored) {
}
}
if (ctor == null) {
ctor = cls.getConstructor();
args = new Object[0];
}
return ctor.newInstance(args);
}
|
[
"CWE-665"
] |
CVE-2022-21724
|
HIGH
| 7.5
|
pgjdbc
|
instantiate
|
pgjdbc/src/main/java/org/postgresql/util/ObjectFactory.java
|
f4d0ed69c0b3aae8531d83d6af4c57f22312c813
| 1
|
Analyze the following code function for security vulnerabilities
|
public @StringRes int getMessage(boolean isAlpha, int type) {
switch (type) {
case TYPE_FINGERPRINT:
case TYPE_FACE:
case TYPE_BIOMETRIC:
return isAlpha ? alphaMessageForBiometrics : numericMessageForBiometrics;
case TYPE_NONE:
default:
return 0;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMessage
File: src/com/android/settings/password/ChooseLockPassword.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40117
|
HIGH
| 7.8
|
android
|
getMessage
|
src/com/android/settings/password/ChooseLockPassword.java
|
11815817de2f2d70fe842b108356a1bc75d44ffb
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void restart() {
ActivityManagerService.this.restart();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: restart
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
|
restart
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public void writeTo(File uploadFile, Class<?> type, Type genericType,
Annotation[] annotations, MediaType mediaType,
MultivaluedMap<String, Object> httpHeaders,
OutputStream entityStream) throws IOException {
httpHeaders.add(HttpHeaders.CONTENT_LENGTH, String.valueOf(uploadFile.length()));
doWrite(uploadFile, entityStream);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeTo
File: independent-projects/resteasy-reactive/common/runtime/src/main/java/org/jboss/resteasy/reactive/common/providers/serialisers/FileBodyHandler.java
Repository: quarkusio/quarkus
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2023-0481
|
LOW
| 3.3
|
quarkusio/quarkus
|
writeTo
|
independent-projects/resteasy-reactive/common/runtime/src/main/java/org/jboss/resteasy/reactive/common/providers/serialisers/FileBodyHandler.java
|
95d5904f7cf18c8165b97d8ca03b203d7f69c17e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected List<QueryTable> getQueryTableInfo(String dictCodeString) {
//针对转义字符进行解码
try {
if (dictCodeString.contains("%")) {
dictCodeString = URLDecoder.decode(dictCodeString, "UTF-8");
}
} catch (UnsupportedEncodingException e) {
//e.printStackTrace();
}
dictCodeString = dictCodeString.trim();
// 无论什么场景 第二、三个元素一定是表的字段,直接add
if (dictCodeString != null && dictCodeString.indexOf(SymbolConstant.COMMA) > 0) {
String[] arr = dictCodeString.split(SymbolConstant.COMMA);
if (arr.length != 3 && arr.length != 4) {
return null;
}
String tableName = getTableName(arr[0]);
QueryTable table = new QueryTable(tableName, "");
// 无论什么场景 第二、三个元素一定是表的字段,直接add
table.addField(arr[1].trim());
String filed = arr[2].trim();
if (oConvertUtils.isNotEmpty(filed)) {
table.addField(filed);
}
List<QueryTable> list = new ArrayList<>();
list.add(table);
return list;
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getQueryTableInfo
File: jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/security/DictQueryBlackListHandler.java
Repository: jeecgboot/jeecg-boot
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2023-38992
|
CRITICAL
| 9.8
|
jeecgboot/jeecg-boot
|
getQueryTableInfo
|
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/security/DictQueryBlackListHandler.java
|
d36caf8c696a84edc7e4204c7dc9c4d3f91a9534
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean previewAble() {
return new WebSite().getBoolValueByName("upgradePreview");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: previewAble
File: web/src/main/java/com/zrlog/web/plugin/UpdateVersionPlugin.java
Repository: 94fzb/zrlog
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-16643
|
LOW
| 3.5
|
94fzb/zrlog
|
previewAble
|
web/src/main/java/com/zrlog/web/plugin/UpdateVersionPlugin.java
|
4a91c83af669e31a22297c14f089d8911d353fa1
| 0
|
Analyze the following code function for security vulnerabilities
|
public void autoConnect(){
if (getState() != BluetoothAdapter.STATE_ON){
errorLog("autoConnect() - BT is not ON. Exiting autoConnect");
return;
}
if (isQuietModeEnabled() == false) {
debugLog( "autoConnect() - Initiate auto connection on BT on...");
autoConnectHeadset();
autoConnectA2dp();
}
else {
debugLog( "autoConnect() - BT is in quiet mode. Not initiating auto connections");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: autoConnect
File: src/com/android/bluetooth/btservice/AdapterService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-362",
"CWE-20"
] |
CVE-2016-3760
|
MEDIUM
| 5.4
|
android
|
autoConnect
|
src/com/android/bluetooth/btservice/AdapterService.java
|
122feb9a0b04290f55183ff2f0384c6c53756bd8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Response processFlush(FlushCommand command) throws Exception {
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: processFlush
File: activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
Repository: apache/activemq
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-3576
|
MEDIUM
| 5
|
apache/activemq
|
processFlush
|
activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
|
00921f2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
protected abstract XDOM extractTitleFromContent(DocumentModelBridge document,
DocumentDisplayerParameters parameters);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: extractTitleFromContent
File: xwiki-platform-core/xwiki-platform-display/xwiki-platform-display-api/src/main/java/org/xwiki/display/internal/AbstractDocumentTitleDisplayer.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2023-46244
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
extractTitleFromContent
|
xwiki-platform-core/xwiki-platform-display/xwiki-platform-display-api/src/main/java/org/xwiki/display/internal/AbstractDocumentTitleDisplayer.java
|
11a9170dfe63e59f4066db67f84dbfce4ed619c6
| 0
|
Analyze the following code function for security vulnerabilities
|
public static DevModeHandlerImpl getDevModeHandler() {
return atomicHandler.get();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDevModeHandler
File: vaadin-dev-server/src/main/java/com/vaadin/base/devserver/DevModeHandlerImpl.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-172"
] |
CVE-2021-33604
|
LOW
| 1.2
|
vaadin/flow
|
getDevModeHandler
|
vaadin-dev-server/src/main/java/com/vaadin/base/devserver/DevModeHandlerImpl.java
|
2a801c42b406a00c44f4a85b4b4e4a4c5bf89adc
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean insertConfigSetting(String name, String value, boolean makeDefault) {
if (DEBUG) {
Slog.v(LOG_TAG, "insertConfigSetting(" + name + ", " + value + ", "
+ makeDefault + ")");
}
return mutateConfigSetting(name, value, null, makeDefault,
MUTATION_OPERATION_INSERT, 0);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: insertConfigSetting
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
|
insertConfigSetting
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
ff86ff28cf82124f8e65833a2dd8c319aea08945
| 0
|
Analyze the following code function for security vulnerabilities
|
private static int getAttributionChainId(boolean startDataDelivery,
AttributionSource source) {
if (source == null || source.getNext() == null || !startDataDelivery) {
return AppOpsManager.ATTRIBUTION_CHAIN_ID_NONE;
}
int attributionChainId = sAttributionChainIds.incrementAndGet();
// handle overflow
if (attributionChainId < 0) {
attributionChainId = 0;
sAttributionChainIds.set(0);
}
return attributionChainId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAttributionChainId
File: services/core/java/com/android/server/pm/permission/PermissionManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-281"
] |
CVE-2023-21249
|
MEDIUM
| 5.5
|
android
|
getAttributionChainId
|
services/core/java/com/android/server/pm/permission/PermissionManagerService.java
|
c00b7e7dbc1fa30339adef693d02a51254755d7f
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean dumpHeap(String process, int userId, boolean managed,
String path, ParcelFileDescriptor fd) throws RemoteException {
try {
synchronized (this) {
// note: hijacking SET_ACTIVITY_WATCHER, but should be changed to
// its own permission (same as profileControl).
if (checkCallingPermission(android.Manifest.permission.SET_ACTIVITY_WATCHER)
!= PackageManager.PERMISSION_GRANTED) {
throw new SecurityException("Requires permission "
+ android.Manifest.permission.SET_ACTIVITY_WATCHER);
}
if (fd == null) {
throw new IllegalArgumentException("null fd");
}
ProcessRecord proc = findProcessLocked(process, userId, "dumpHeap");
if (proc == null || proc.thread == null) {
throw new IllegalArgumentException("Unknown process: " + process);
}
boolean isDebuggable = "1".equals(SystemProperties.get(SYSTEM_DEBUGGABLE, "0"));
if (!isDebuggable) {
if ((proc.info.flags&ApplicationInfo.FLAG_DEBUGGABLE) == 0) {
throw new SecurityException("Process not debuggable: " + proc);
}
}
proc.thread.dumpHeap(managed, path, fd);
fd = null;
return true;
}
} catch (RemoteException e) {
throw new IllegalStateException("Process disappeared");
} finally {
if (fd != null) {
try {
fd.close();
} catch (IOException e) {
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpHeap
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3833
|
MEDIUM
| 4.3
|
android
|
dumpHeap
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void setScanner(Scanner scanner) {
fScanner = scanner;
if (DEBUG_SCANNER) {
System.out.print("$$$ setScanner(");
System.out.print(scanner!=null?scanner.getClass().getName():"null");
System.out.println(");");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setScanner
File: src/org/cyberneko/html/HTMLScanner.java
Repository: sparklemotion/nekohtml
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-24839
|
MEDIUM
| 5
|
sparklemotion/nekohtml
|
setScanner
|
src/org/cyberneko/html/HTMLScanner.java
|
a800fce3b079def130ed42a408ff1d09f89e773d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean onForceStopPackage(String packageName, boolean doit, boolean evenPersistent,
int userId) {
synchronized (mGlobalLock) {
// In case if setWindowManager hasn't been called yet when booting.
if (mRootWindowContainer == null) return false;
return mRootWindowContainer.finishDisabledPackageActivities(packageName,
null /* filterByClasses */, doit, evenPersistent, userId,
// Only remove the activities without process because the activities with
// attached process will be removed when handling process died with
// WindowProcessController#isRemoved == true.
true /* onlyRemoveNoProcess */);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onForceStopPackage
File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40094
|
HIGH
| 7.8
|
android
|
onForceStopPackage
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
private void parseRepairFrontierRules(final List<Element> elements, final RepairFrontier frontier)
throws GameParseException {
for (final Element element : elements) {
frontier.addRule(getRepairRule(element, "name", true));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseRepairFrontierRules
File: game-core/src/main/java/games/strategy/engine/data/GameParser.java
Repository: triplea-game/triplea
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000546
|
MEDIUM
| 6.8
|
triplea-game/triplea
|
parseRepairFrontierRules
|
game-core/src/main/java/games/strategy/engine/data/GameParser.java
|
0f23875a4c6e166218859a63c884995f15c53895
| 0
|
Analyze the following code function for security vulnerabilities
|
@Unstable
protected String getName()
{
return this.componentDescriptor.getRoleHint();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getName
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiAction.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2022-23617
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
getName
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiAction.java
|
b35ef0edd4f2ff2c974cbeef6b80fcf9b5a44554
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getSkinFile(String filename)
{
return this.xwiki.getSkinFile(filename, getXWikiContext());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSkinFile
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2023-37911
|
MEDIUM
| 6.5
|
xwiki/xwiki-platform
|
getSkinFile
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
|
f471f2a392aeeb9e51d59fdfe1d76fccf532523f
| 0
|
Analyze the following code function for security vulnerabilities
|
void clearMetadata() {
final File pmState = new File(mStateDir, PACKAGE_MANAGER_SENTINEL);
if (pmState.exists()) pmState.delete();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearMetadata
File: services/backup/java/com/android/server/backup/BackupManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3759
|
MEDIUM
| 5
|
android
|
clearMetadata
|
services/backup/java/com/android/server/backup/BackupManagerService.java
|
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
| 0
|
Analyze the following code function for security vulnerabilities
|
public UpdateRecordResponse read(ReadCommentRequest commentRequest) {
new Comment().doRead(commentRequest.getId());
return new UpdateRecordResponse();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: read
File: service/src/main/java/com/zrlog/service/CommentService.java
Repository: 94fzb/zrlog
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-21316
|
MEDIUM
| 4.3
|
94fzb/zrlog
|
read
|
service/src/main/java/com/zrlog/service/CommentService.java
|
b921c1ae03b8290f438657803eee05226755c941
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean isBackgroundRestrictedNoCheck(final int uid, final String packageName) {
final int mode = mAppOpsService.checkOperation(AppOpsManager.OP_RUN_ANY_IN_BACKGROUND,
uid, packageName);
return mode != AppOpsManager.MODE_ALLOWED;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isBackgroundRestrictedNoCheck
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
|
isBackgroundRestrictedNoCheck
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getCurrentContentSyntaxId(String defaultSyntaxId, XWikiContext context)
{
String syntaxId = getCurrentContentSyntaxIdInternal(context);
if (syntaxId == null) {
syntaxId = defaultSyntaxId;
}
return syntaxId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCurrentContentSyntaxId
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
|
getCurrentContentSyntaxId
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
FileMetadata readTarHeaders(InputStream instream) throws IOException {
byte[] block = new byte[512];
FileMetadata info = null;
boolean gotHeader = readTarHeader(instream, block);
if (gotHeader) {
try {
// okay, presume we're okay, and extract the various metadata
info = new FileMetadata();
info.size = extractRadix(block, 124, 12, 8);
info.mtime = extractRadix(block, 136, 12, 8);
info.mode = extractRadix(block, 100, 8, 8);
info.path = extractString(block, 345, 155); // prefix
String path = extractString(block, 0, 100);
if (path.length() > 0) {
if (info.path.length() > 0) info.path += '/';
info.path += path;
}
// tar link indicator field: 1 byte at offset 156 in the header.
int typeChar = block[156];
if (typeChar == 'x') {
// pax extended header, so we need to read that
gotHeader = readPaxExtendedHeader(instream, info);
if (gotHeader) {
// and after a pax extended header comes another real header -- read
// that to find the real file type
gotHeader = readTarHeader(instream, block);
}
if (!gotHeader) throw new IOException("Bad or missing pax header");
typeChar = block[156];
}
switch (typeChar) {
case '0': info.type = BackupAgent.TYPE_FILE; break;
case '5': {
info.type = BackupAgent.TYPE_DIRECTORY;
if (info.size != 0) {
Slog.w(TAG, "Directory entry with nonzero size in header");
info.size = 0;
}
break;
}
case 0: {
// presume EOF
if (DEBUG) Slog.w(TAG, "Saw type=0 in tar header block, info=" + info);
return null;
}
default: {
Slog.e(TAG, "Unknown tar entity type: " + typeChar);
throw new IOException("Unknown entity type " + typeChar);
}
}
// Parse out the path
//
// first: apps/shared/unrecognized
if (FullBackup.SHARED_PREFIX.regionMatches(0,
info.path, 0, FullBackup.SHARED_PREFIX.length())) {
// File in shared storage. !!! TODO: implement this.
info.path = info.path.substring(FullBackup.SHARED_PREFIX.length());
info.packageName = SHARED_BACKUP_AGENT_PACKAGE;
info.domain = FullBackup.SHARED_STORAGE_TOKEN;
if (DEBUG) Slog.i(TAG, "File in shared storage: " + info.path);
} else if (FullBackup.APPS_PREFIX.regionMatches(0,
info.path, 0, FullBackup.APPS_PREFIX.length())) {
// App content! Parse out the package name and domain
// strip the apps/ prefix
info.path = info.path.substring(FullBackup.APPS_PREFIX.length());
// extract the package name
int slash = info.path.indexOf('/');
if (slash < 0) throw new IOException("Illegal semantic path in " + info.path);
info.packageName = info.path.substring(0, slash);
info.path = info.path.substring(slash+1);
// if it's a manifest or metadata payload we're done, otherwise parse
// out the domain into which the file will be restored
if (!info.path.equals(BACKUP_MANIFEST_FILENAME)
&& !info.path.equals(BACKUP_METADATA_FILENAME)) {
slash = info.path.indexOf('/');
if (slash < 0) throw new IOException("Illegal semantic path in non-manifest " + info.path);
info.domain = info.path.substring(0, slash);
info.path = info.path.substring(slash + 1);
}
}
} catch (IOException e) {
if (DEBUG) {
Slog.e(TAG, "Parse error in header: " + e.getMessage());
HEXLOG(block);
}
throw e;
}
}
return info;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readTarHeaders
File: services/backup/java/com/android/server/backup/BackupManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3759
|
MEDIUM
| 5
|
android
|
readTarHeaders
|
services/backup/java/com/android/server/backup/BackupManagerService.java
|
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
| 0
|
Analyze the following code function for security vulnerabilities
|
@CalledByNative
private void onSmartClipDataExtracted(String result) {
if (mSmartClipDataListener != null ) {
mSmartClipDataListener.onSmartClipDataExtracted(result);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onSmartClipDataExtracted
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
|
onSmartClipDataExtracted
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
public static NativeObject jsFunction_mapExistingOauthClient(Context cx, Scriptable thisObj, Object[] args,
Function funObj)
throws ScriptException, APIManagementException, ParseException {
if (args != null && args.length != 0) {
try {
NativeObject apiData = (NativeObject) args[0];
//this parameter will hold oAuthApplication properties that required to create new oAuthApplication.
String jsonString = (String) apiData.get("jsonParams", apiData);
//logged in user name.
String userName = (String) apiData.get("username", apiData);
//this is consumer key of the oAuthApplication.
String clientId = (String) apiData.get("client_id", apiData);
//APIM application name.
String applicationName = (String) apiData.get("applicationName", apiData);
String keyType = (String) apiData.get("keytype", apiData);
String tokenType = APIConstants.DEFAULT_TOKEN_TYPE;
Map<String, Object> keyDetails = getAPIConsumer(thisObj).mapExistingOAuthClient(jsonString, userName, clientId, applicationName, keyType, tokenType);
NativeObject row = new NativeObject();
Set<Map.Entry<String, Object>> entries = keyDetails.entrySet();
for (Map.Entry<String, Object> entry : entries) {
row.put(entry.getKey(), row, entry.getValue());
}
return row;
} catch (Exception e) {
handleException("Error while obtaining the application access token for the application" + e
.getMessage(), e);
}
} else {
handleException("Invalid input parameters.");
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: jsFunction_mapExistingOauthClient
File: components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
Repository: wso2/carbon-apimgt
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2018-20736
|
LOW
| 3.5
|
wso2/carbon-apimgt
|
jsFunction_mapExistingOauthClient
|
components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
|
490f2860822f89d745b7c04fa9570bd86bef4236
| 0
|
Analyze the following code function for security vulnerabilities
|
protected AutoLoginProcessor createAutoLoginProcessor() {
return new AutoLoginProcessor() {
@Override
public void processAutoLoginResult(String accountName, String authToken,
boolean success, String result) {
}
};
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createAutoLoginProcessor
File: chrome/android/java/src/org/chromium/chrome/browser/Tab.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
createAutoLoginProcessor
|
chrome/android/java/src/org/chromium/chrome/browser/Tab.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
public Builder withSecretKeySeed(byte[] val)
{
secretKeySeed = XMSSUtil.cloneArray(val);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: withSecretKeySeed
File: core/src/main/java/org/bouncycastle/pqc/crypto/xmss/XMSSMTPrivateKeyParameters.java
Repository: bcgit/bc-java
The code follows secure coding practices.
|
[
"CWE-470"
] |
CVE-2018-1000613
|
HIGH
| 7.5
|
bcgit/bc-java
|
withSecretKeySeed
|
core/src/main/java/org/bouncycastle/pqc/crypto/xmss/XMSSMTPrivateKeyParameters.java
|
4092ede58da51af9a21e4825fbad0d9a3ef5a223
| 0
|
Analyze the following code function for security vulnerabilities
|
public void onServiceDisconnected(ComponentName name) {
disconnect();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onServiceDisconnected
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
|
onServiceDisconnected
|
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
|
0b98d304c467184602b4c6bce76fda0b0274bc07
| 0
|
Analyze the following code function for security vulnerabilities
|
public WindowAndroid getWindowAndroid() {
return mWindowAndroid;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getWindowAndroid
File: chrome/android/java/src/org/chromium/chrome/browser/Tab.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
getWindowAndroid
|
chrome/android/java/src/org/chromium/chrome/browser/Tab.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
private PendingIntent createGeofencePendingIntent(Class geofenceListenerClass, com.codename1.location.Geofence gf, boolean forceService) {
Context context = AndroidNativeUtil.getContext().getApplicationContext();
if (!forceService && Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
if (geofencePendingIntent != null) {
return geofencePendingIntent;
}
Intent intent = new Intent(context, BackgroundLocationBroadcastReceiver.class);
intent.setAction(BackgroundLocationBroadcastReceiver.ACTION_PROCESS_GEOFENCE_TRANSITIONS);
intent.setData(Uri.parse("http://codenameone.com/a?" + geofenceListenerClass.getName()));
//intent.setAction(BackgroundLocationBroadcastReceiver.ACTION_PROCESS_GEOFENCE_TRANSITIONS);
geofencePendingIntent = PendingIntent.getBroadcast(AndroidNativeUtil.getContext().getApplicationContext(), 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
return geofencePendingIntent;
} else {
Intent intent = new Intent(context, GeofenceHandler.class);
intent.putExtra("geofenceClass", geofenceListenerClass.getName());
intent.putExtra("geofenceID", gf.getId());
PendingIntent pendingIntent = PendingIntent.getService(context, 0,
intent,
PendingIntent.FLAG_UPDATE_CURRENT);
return pendingIntent;
}
}
|
Vulnerability Classification:
- CWE: CWE-668
- CVE: CVE-2022-4903
- Severity: MEDIUM
- CVSS Score: 5.1
Description: Fixed #3583 Pending Intent vulnerability
Function: createGeofencePendingIntent
File: Ports/Android/src/com/codename1/location/AndroidLocationPlayServiceManager.java
Repository: codenameone/CodenameOne
Fixed Code:
private PendingIntent createGeofencePendingIntent(Class geofenceListenerClass, com.codename1.location.Geofence gf, boolean forceService) {
Context context = AndroidNativeUtil.getContext().getApplicationContext();
if (!forceService && Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
if (geofencePendingIntent != null) {
return geofencePendingIntent;
}
Intent intent = new Intent(context, BackgroundLocationBroadcastReceiver.class);
intent.setAction(BackgroundLocationBroadcastReceiver.ACTION_PROCESS_GEOFENCE_TRANSITIONS);
intent.setData(Uri.parse("http://codenameone.com/a?" + geofenceListenerClass.getName()));
//intent.setAction(BackgroundLocationBroadcastReceiver.ACTION_PROCESS_GEOFENCE_TRANSITIONS);
geofencePendingIntent = AndroidImplementation.getBroadcastPendingIntent(AndroidNativeUtil.getContext().getApplicationContext(), 0, intent);
return geofencePendingIntent;
} else {
Intent intent = new Intent(context, GeofenceHandler.class);
intent.putExtra("geofenceClass", geofenceListenerClass.getName());
intent.putExtra("geofenceID", gf.getId());
PendingIntent pendingIntent = AndroidImplementation.getPendingIntent(context, 0,
intent);
return pendingIntent;
}
}
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
createGeofencePendingIntent
|
Ports/Android/src/com/codename1/location/AndroidLocationPlayServiceManager.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 1
|
Analyze the following code function for security vulnerabilities
|
public void checkRemoteZip() throws IOException, NoSuchAlgorithmException, DigestException
{
// fetch zip file sha1
boolean fetchZip = true;
String remoteHash = null;
File digestFile = null;
if (digestType != null)
{
// check hash against local hash if exists
remoteHash = loadTextFromURL(digestUrl, new String[] { "" })[0];
if (!remoteHash.isEmpty())
{
digestFile = new File(localDir, zipFileName + "." + digestType.toLowerCase());
// if local digest exists and hashes match skip getting the zip file
if (digestFile.exists())
{
String existingHash = loadTextFromFile(digestFile, new String[] { "" })[0];
if (!existingHash.isEmpty() && remoteHash.equals(existingHash))
fetchZip = false;
}
}
}
if (fetchZip)
{
// download zip
File localZip = new File(localDir, zipFileName);
if (localZip.exists())
localZip.delete();
OutputStream output = new FileOutputStream(localZip);
try
{
URLConnection uc = zipUrl.openConnection();
uc.addRequestProperty("User-Agent", "MMV/" + MappingGui.VERSION_NUMBER);
byte[] buffer = new byte[1024]; // Or whatever
int bytesRead;
try (InputStream is = uc.getInputStream())
{
while ((bytesRead = is.read(buffer)) > 0)
output.write(buffer, 0, bytesRead);
}
}
finally
{
output.close();
}
// Check hash of downloaded file to ensure we received it correctly
if (digestType != null && !remoteHash.isEmpty())
{
String downloadHash = getFileDigest(new FileInputStream(localZip), digestType);
if (!remoteHash.equals(downloadHash))
throw new java.security.DigestException("Remote digest does not match digest of downloaded file!");
}
// extract zip file
extractZip(localZip, localDir);
if (localZip.exists())
localZip.delete();
// save new hash after successful extract
if (digestType != null && !remoteHash.isEmpty())
{
if (digestFile.exists())
digestFile.delete();
digestFile.createNewFile();
PrintWriter out = new PrintWriter(new FileWriter(digestFile));
out.print(remoteHash);
out.close();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkRemoteZip
File: src/main/java/bspkrs/mmv/RemoteZipHandler.java
Repository: bspkrs/MCPMappingViewer
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-4494
|
CRITICAL
| 9.8
|
bspkrs/MCPMappingViewer
|
checkRemoteZip
|
src/main/java/bspkrs/mmv/RemoteZipHandler.java
|
6e602746c96b4756c271d080dae7d22ad804a1bd
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void internalSkipAllMessages(AsyncResponse asyncResponse, String subName, boolean authoritative) {
if (topicName.isGlobal()) {
try {
validateGlobalNamespaceOwnership(namespaceName);
} catch (Exception e) {
log.error("[{}] Failed to skip all messages for subscription {} on topic {}",
clientAppId(), subName, topicName, e);
resumeAsyncResponseExceptionally(asyncResponse, e);
return;
}
}
validateTopicOwnership(topicName, authoritative);
validateTopicOperation(topicName, TopicOperation.SKIP, subName);
// If the topic name is a partition name, no need to get partition topic metadata again
if (topicName.isPartitioned()) {
internalSkipAllMessagesForNonPartitionedTopic(asyncResponse, subName, authoritative);
} else {
getPartitionedTopicMetadataAsync(topicName,
authoritative, false).thenAccept(partitionMetadata -> {
if (partitionMetadata.partitions > 0) {
final List<CompletableFuture<Void>> futures = Lists.newArrayList();
for (int i = 0; i < partitionMetadata.partitions; i++) {
TopicName topicNamePartition = topicName.getPartition(i);
try {
futures.add(pulsar()
.getAdminClient()
.topics()
.skipAllMessagesAsync(topicNamePartition.toString(),
subName));
} catch (Exception e) {
log.error("[{}] Failed to skip all messages {} {}",
clientAppId(), topicNamePartition, subName, e);
asyncResponse.resume(new RestException(e));
return;
}
}
FutureUtil.waitForAll(futures).handle((result, exception) -> {
if (exception != null) {
Throwable t = exception.getCause();
if (t instanceof NotFoundException) {
asyncResponse.resume(new RestException(Status.NOT_FOUND, "Subscription not found"));
return null;
} else {
log.error("[{}] Failed to skip all messages {} {}",
clientAppId(), topicName, subName, t);
asyncResponse.resume(new RestException(t));
return null;
}
}
asyncResponse.resume(Response.noContent().build());
return null;
});
} else {
internalSkipAllMessagesForNonPartitionedTopic(asyncResponse, subName, authoritative);
}
}).exceptionally(ex -> {
log.error("[{}] Failed to skip all messages for subscription {} on topic {}",
clientAppId(), subName, topicName, ex);
resumeAsyncResponseExceptionally(asyncResponse, ex);
return null;
});
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: internalSkipAllMessages
File: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
Repository: apache/pulsar
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-41571
|
MEDIUM
| 4
|
apache/pulsar
|
internalSkipAllMessages
|
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
|
5b35bb81c31f1bc2ad98c9fde5b39ec68110ca52
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String toString() {
return id;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toString
File: modules/common/src/main/java/org/opencastproject/mediapackage/identifier/IdImpl.java
Repository: opencast
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2020-5230
|
MEDIUM
| 5
|
opencast
|
toString
|
modules/common/src/main/java/org/opencastproject/mediapackage/identifier/IdImpl.java
|
bbb473f34ab95497d6c432c81285efb0c739f317
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getTags(XWikiContext context)
{
ListProperty prop = (ListProperty) getTagProperty(context);
// I don't know why we need to XML-escape the list of tags but for backwards compatibility we need to keep doing
// this. When this method was added it was using ListProperty#getTextValue() which used to return
// ListProperty#toFormString() before we fixed it to return the unescaped value because we need to save the raw
// value in the database and ListProperty#getTextValue() is called when the list property is saved.
return prop != null ? prop.toFormString() : "";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTags
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
|
getTags
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<BaseObject> addXObjectsFromRequest(DocumentReference classReference, String pref, XWikiContext context)
throws XWikiException
{
@SuppressWarnings("unchecked")
Map<String, String[]> map = context.getRequest().getParameterMap();
List<Integer> objectsNumberDone = new ArrayList<Integer>();
List<BaseObject> objects = new ArrayList<BaseObject>();
String start = pref + LOCAL_REFERENCE_SERIALIZER.serialize(classReference) + "_";
for (String name : map.keySet()) {
if (name.startsWith(start)) {
int pos = name.indexOf('_', start.length() + 1);
String prefix = name.substring(0, pos);
int num = Integer.decode(prefix.substring(prefix.lastIndexOf('_') + 1)).intValue();
if (!objectsNumberDone.contains(Integer.valueOf(num))) {
objectsNumberDone.add(Integer.valueOf(num));
objects.add(addXObjectFromRequest(classReference, pref, num, context));
}
}
}
return objects;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addXObjectsFromRequest
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
|
addXObjectsFromRequest
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
public HgVersion version() {
CommandLine hg = createCommandLine("hg").withArgs("version").withEncoding("utf-8");
String hgOut = execute(hg, new NamedProcessTag("hg version check")).outputAsString();
return HgVersion.parse(hgOut);
}
|
Vulnerability Classification:
- CWE: CWE-77
- CVE: CVE-2022-29184
- Severity: MEDIUM
- CVSS Score: 6.5
Description: Improve escaping of arguments when constructing Hg command calls
Function: version
File: domain/src/main/java/com/thoughtworks/go/domain/materials/mercurial/HgCommand.java
Repository: gocd
Fixed Code:
public HgVersion version() {
CommandLine hg = createCommandLine("hg").withArgs("version").withEncoding("UTF-8");
String hgOut = execute(hg, new NamedProcessTag("hg version check")).outputAsString();
return HgVersion.parse(hgOut);
}
|
[
"CWE-77"
] |
CVE-2022-29184
|
MEDIUM
| 6.5
|
gocd
|
version
|
domain/src/main/java/com/thoughtworks/go/domain/materials/mercurial/HgCommand.java
|
37d35115db2ada2190173f9413cfe1bc6c295ecb
| 1
|
Analyze the following code function for security vulnerabilities
|
private void saveNitzTime(long time) {
mSavedTime = time;
mSavedAtTime = SystemClock.elapsedRealtime();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: saveNitzTime
File: src/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2016-3831
|
MEDIUM
| 5
|
android
|
saveNitzTime
|
src/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
|
f47bc301ccbc5e6d8110afab5a1e9bac1d4ef058
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getHeader(String name) {
return request.getHeader(name);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getHeader
File: sa-token-starter/sa-token-jakarta-servlet/src/main/java/cn/dev33/satoken/servlet/model/SaRequestForServlet.java
Repository: dromara/Sa-Token
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-44794
|
CRITICAL
| 9.8
|
dromara/Sa-Token
|
getHeader
|
sa-token-starter/sa-token-jakarta-servlet/src/main/java/cn/dev33/satoken/servlet/model/SaRequestForServlet.java
|
954efeb73277f924f836da2a25322ea35ee1bfa3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int read(byte[] b, int off, int len) throws IOException {
lengthToRead = len;
offsetWithAesBlock = off;
bytesCopiedInThisIteration = 0;
if (remainingAes16ByteBlockLength != 0) {
copyBytesFromBuffer(b, offsetWithAesBlock);
if (bytesCopiedInThisIteration == len) {
return bytesCopiedInThisIteration;
}
}
if (lengthToRead < 16) {
aes16ByteBlockReadLength = super.read(aes16ByteBlock, 0, aes16ByteBlock.length);
aes16ByteBlockPointer = 0;
if (aes16ByteBlockReadLength == -1) {
remainingAes16ByteBlockLength = 0;
if (bytesCopiedInThisIteration > 0) {
return bytesCopiedInThisIteration;
}
return -1;
}
remainingAes16ByteBlockLength = aes16ByteBlockReadLength;
copyBytesFromBuffer(b, offsetWithAesBlock);
if (bytesCopiedInThisIteration == len) {
return bytesCopiedInThisIteration;
}
}
int readLen = super.read(b, offsetWithAesBlock, (lengthToRead - lengthToRead %16));
if (readLen == -1) {
if (bytesCopiedInThisIteration > 0) {
return bytesCopiedInThisIteration;
} else {
return -1;
}
} else {
return readLen + bytesCopiedInThisIteration;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: read
File: src/main/java/net/lingala/zip4j/io/inputstream/AesCipherInputStream.java
Repository: srikanth-lingala/zip4j
The code follows secure coding practices.
|
[
"CWE-346"
] |
CVE-2023-22899
|
MEDIUM
| 5.9
|
srikanth-lingala/zip4j
|
read
|
src/main/java/net/lingala/zip4j/io/inputstream/AesCipherInputStream.java
|
ddd8fdc8ad0583eb4a6172dc86c72c881485c55b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String lookupNamespaceURI(final String prefix) {
throw new UnsupportedOperationException("DomNode.lookupNamespaceURI is not yet implemented.");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: lookupNamespaceURI
File: src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
Repository: HtmlUnit/htmlunit
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-2798
|
HIGH
| 7.5
|
HtmlUnit/htmlunit
|
lookupNamespaceURI
|
src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
|
940dc7fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isNetworkTemporarilyDisabledByUser(String network) {
if (mUserTemporarilyDisabledList.isLocked(network)) {
return true;
}
mUserTemporarilyDisabledList.remove(network);
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isNetworkTemporarilyDisabledByUser
File: service/java/com/android/server/wifi/WifiConfigManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
isNetworkTemporarilyDisabledByUser
|
service/java/com/android/server/wifi/WifiConfigManager.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean isNeedSync(long bytesDelta, long timestampDelta) {
return bytesDelta > FileDownloadUtils.getMinProgressStep()
&& timestampDelta > FileDownloadUtils.getMinProgressTime();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isNeedSync
File: library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java
Repository: lingochamp/FileDownloader
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-11248
|
HIGH
| 7.5
|
lingochamp/FileDownloader
|
isNeedSync
|
library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java
|
b023cc081bbecdd2a9f3549a3ae5c12a9647ed7f
| 0
|
Analyze the following code function for security vulnerabilities
|
private Map<String, CacheEntry> propsCache() {
if (propsCache == null) {
propsCache = new LRUCache<>(maxCacheSize);
}
return propsCache;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: propsCache
File: vertx-web/src/main/java/io/vertx/ext/web/handler/impl/StaticHandlerImpl.java
Repository: vert-x3/vertx-web
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-12542
|
HIGH
| 7.5
|
vert-x3/vertx-web
|
propsCache
|
vertx-web/src/main/java/io/vertx/ext/web/handler/impl/StaticHandlerImpl.java
|
57a65dce6f4c5aa5e3ce7288685e7f3447eb8f3b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public StaticHandler setIncludeHidden(boolean includeHidden) {
this.includeHidden = includeHidden;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setIncludeHidden
File: vertx-web/src/main/java/io/vertx/ext/web/handler/impl/StaticHandlerImpl.java
Repository: vert-x3/vertx-web
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-12542
|
HIGH
| 7.5
|
vert-x3/vertx-web
|
setIncludeHidden
|
vertx-web/src/main/java/io/vertx/ext/web/handler/impl/StaticHandlerImpl.java
|
57a65dce6f4c5aa5e3ce7288685e7f3447eb8f3b
| 0
|
Analyze the following code function for security vulnerabilities
|
public TvExtender setChannelId(String channelId) {
mChannelId = channelId;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setChannelId
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
setChannelId
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
public void init() {
patternDir = new File(patternDirStr);
if (type == RUNTYPE.testinfo)
infoPath = new File(info);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: init
File: src/edu/stanford/nlp/semgraph/semgrex/ssurgeon/Ssurgeon.java
Repository: stanfordnlp/CoreNLP
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-3878
|
HIGH
| 7.5
|
stanfordnlp/CoreNLP
|
init
|
src/edu/stanford/nlp/semgraph/semgrex/ssurgeon/Ssurgeon.java
|
e5bbe135a02a74b952396751ed3015e8b8252e99
| 0
|
Analyze the following code function for security vulnerabilities
|
public long getKeyguardFadingAwayDelay() {
return mKeyguardFadingAwayDelay;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getKeyguardFadingAwayDelay
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
|
getKeyguardFadingAwayDelay
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Beta
public static void move(File from, File to) throws IOException {
checkNotNull(from);
checkNotNull(to);
checkArgument(!from.equals(to), "Source %s and destination %s must be different", from, to);
if (!from.renameTo(to)) {
copy(from, to);
if (!from.delete()) {
if (!to.delete()) {
throw new IOException("Unable to delete " + to);
}
throw new IOException("Unable to delete " + from);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: move
File: guava/src/com/google/common/io/Files.java
Repository: google/guava
The code follows secure coding practices.
|
[
"CWE-732"
] |
CVE-2020-8908
|
LOW
| 2.1
|
google/guava
|
move
|
guava/src/com/google/common/io/Files.java
|
fec0dbc4634006a6162cfd4d0d09c962073ddf40
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getOutputSyntaxString()
{
return getProperties().getString("outputSyntax");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getOutputSyntaxString
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/skin/AbstractResourceSkin.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-29253
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
getOutputSyntaxString
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/skin/AbstractResourceSkin.java
|
4917c8f355717bb636d763844528b1fe0f95e8e2
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void collectStats(final StatsCollector collector) {
collector.record("http.latency", graphlatency, "type=graph");
collector.record("http.latency", gnuplotlatency, "type=gnuplot");
collector.record("http.graph.requests", graphs_diskcache_hit, "cache=disk");
collector.record("http.graph.requests", graphs_generated, "cache=miss");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: collectStats
File: src/tsd/GraphHandler.java
Repository: OpenTSDB/opentsdb
The code follows secure coding practices.
|
[
"CWE-78"
] |
CVE-2023-25826
|
CRITICAL
| 9.8
|
OpenTSDB/opentsdb
|
collectStats
|
src/tsd/GraphHandler.java
|
26be40a5e5b6ce8b0b1e4686c4b0d7911e5d8a25
| 0
|
Analyze the following code function for security vulnerabilities
|
public static List<String> getNodeTexts(Node node, String... nodePath) {
List<Node> nodes = getNodes(node, nodePath);
if (nodes != null) {
List<String> strs = new ArrayList<>(nodes.size());
for (Node n:nodes) {
strs.add(n.getTextContent());
}
return strs;
} else {
return null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNodeTexts
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
|
getNodeTexts
|
src/edu/stanford/nlp/util/XMLUtils.java
|
5d83f1e8482ca304db8be726cad89554c88f136a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String createQueryFragment(AtomicInteger incrementor) {
if (condition != null) {
return condition.createQueryFragment(incrementor);
} else {
return "";
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createQueryFragment
File: src/main/java/org/torpedoquery/jpa/internal/conditions/ConditionBuilder.java
Repository: xjodoin/torpedoquery
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2019-11343
|
HIGH
| 7.5
|
xjodoin/torpedoquery
|
createQueryFragment
|
src/main/java/org/torpedoquery/jpa/internal/conditions/ConditionBuilder.java
|
3c20b874fba9cc2a78b9ace10208de1602b56c3f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int removeVip(String vipId) {
if(vips.containsKey(vipId)){
vips.remove(vipId);
return 0;
} else {
return -1;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeVip
File: src/main/java/net/floodlightcontroller/loadbalancer/LoadBalancer.java
Repository: floodlight
The code follows secure coding practices.
|
[
"CWE-362",
"CWE-476"
] |
CVE-2015-6569
|
MEDIUM
| 4.3
|
floodlight
|
removeVip
|
src/main/java/net/floodlightcontroller/loadbalancer/LoadBalancer.java
|
7f5bedb625eec3ff4d29987c31cef2553a962b36
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onHeadsUpPinnedModeChanged(final boolean inPinnedMode) {
mNotificationStackScroller.setInHeadsUpPinnedMode(inPinnedMode);
if (inPinnedMode) {
mHeadsUpExistenceChangedRunnable.run();
updateNotificationTranslucency();
} else {
setHeadsUpAnimatingAway(true);
mNotificationStackScroller.runAfterAnimationFinished(
mHeadsUpExistenceChangedRunnable);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onHeadsUpPinnedModeChanged
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
onHeadsUpPinnedModeChanged
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isAutoUpdate() {
return autoUpdate;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isAutoUpdate
File: domain/src/main/java/com/thoughtworks/go/config/materials/ScmMaterial.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-39309
|
MEDIUM
| 6.5
|
gocd
|
isAutoUpdate
|
domain/src/main/java/com/thoughtworks/go/config/materials/ScmMaterial.java
|
691b479f1310034992da141760e9c5d1f5b60e8a
| 0
|
Analyze the following code function for security vulnerabilities
|
public UI getUI() {
return ui;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUI
File: flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2023-25499
|
MEDIUM
| 6.5
|
vaadin/flow
|
getUI
|
flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
|
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String printFormattedMetadata(final IBaseDataObject payload) {
final StringBuilder out = new StringBuilder();
out.append(LS);
for (final Map.Entry<String, Collection<Object>> entry : payload.getParameters().entrySet()) {
out.append(entry.getKey() + SEP + entry.getValue() + LS);
}
return out.toString();
}
|
Vulnerability Classification:
- CWE: CWE-502
- CVE: CVE-2021-32634
- Severity: MEDIUM
- CVSS Score: 6.5
Description: Merge pull request from GHSA-m5qf-gfmp-7638
* Remove unsafe serialization from PayloadUtil
* This code will likely be removed wholesale, but this change
should be used as a departure point for future development
if we end up re-implementing moveTo and friends.
* Removed vestigial MoveTo related code.
* Remove unsafe serialization in WorkSpace infra.
* Favor DataInput/DataOutputStream over ObjectInput/ObjectOutputStream
* Implement lightweight serialization in WorkBundle/WorkUnit
* Updates to WorkBundle serDe, added tests.
- set limit on number of WorkUnits per bundle. In practice these are
commonly less than 1024.
- added null handling for WorkBundle/WorkUnit string fields.
- confirmed readUTF/writeUTF has a limit ensuring strings will
be 65535 characters or less.
* Minor cleanup to WorkBundleTest
* Minor Change to WorkBundleTest
* Formatting updates
Function: printFormattedMetadata
File: src/main/java/emissary/util/PayloadUtil.java
Repository: NationalSecurityAgency/emissary
Fixed Code:
public static String printFormattedMetadata(final IBaseDataObject payload) {
final StringBuilder out = new StringBuilder();
out.append(LS);
for (final Map.Entry<String, Collection<Object>> entry : payload.getParameters().entrySet()) {
out.append(entry.getKey()).append(SEP).append(entry.getValue()).append(LS);
}
return out.toString();
}
|
[
"CWE-502"
] |
CVE-2021-32634
|
MEDIUM
| 6.5
|
NationalSecurityAgency/emissary
|
printFormattedMetadata
|
src/main/java/emissary/util/PayloadUtil.java
|
40260b1ec1f76cc92361702cc14fa1e4388e19d7
| 1
|
Analyze the following code function for security vulnerabilities
|
@GuardedBy("getLockObject()")
private void maybePauseDeviceWideLoggingLocked() {
if (!areAllUsersAffiliatedWithDeviceLocked()) {
if (mOwners.hasDeviceOwner()) {
Slogf.i(LOG_TAG, "There are unaffiliated users, network logging will be "
+ "paused if enabled.");
if (mNetworkLogger != null) {
mNetworkLogger.pause();
}
}
if (!isOrganizationOwnedDeviceWithManagedProfile()) {
Slogf.i(LOG_TAG, "Not org-owned managed profile device, security logging will be "
+ "paused if enabled.");
mSecurityLogMonitor.pause();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: maybePauseDeviceWideLoggingLocked
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
|
maybePauseDeviceWideLoggingLocked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public void disableWriteAheadLogging() {
synchronized (mLock) {
throwIfNotOpenLocked();
final int oldFlags = mConfigurationLocked.openFlags;
final boolean walDisabled = (oldFlags & ENABLE_WRITE_AHEAD_LOGGING) == 0;
final boolean compatibilityWalDisabled = (oldFlags & DISABLE_COMPATIBILITY_WAL) != 0;
if (walDisabled && compatibilityWalDisabled) {
return;
}
mConfigurationLocked.openFlags &= ~ENABLE_WRITE_AHEAD_LOGGING;
// If an app explicitly disables WAL, compatibility mode should be disabled too
mConfigurationLocked.openFlags |= DISABLE_COMPATIBILITY_WAL;
try {
mConnectionPoolLocked.reconfigure(mConfigurationLocked);
} catch (RuntimeException ex) {
mConfigurationLocked.openFlags = oldFlags;
throw ex;
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: disableWriteAheadLogging
File: core/java/android/database/sqlite/SQLiteDatabase.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2018-9493
|
LOW
| 2.1
|
android
|
disableWriteAheadLogging
|
core/java/android/database/sqlite/SQLiteDatabase.java
|
ebc250d16c747f4161167b5ff58b3aea88b37acf
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int update(Uri uri, ContentValues values, String selection, String[] selectionArgs) {
return 0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: update
File: provider_src/com/android/email/provider/AttachmentProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3918
|
MEDIUM
| 4.3
|
android
|
update
|
provider_src/com/android/email/provider/AttachmentProvider.java
|
6b2b0bd7c771c698f11d7be89c2c57c8722c7454
| 0
|
Analyze the following code function for security vulnerabilities
|
public List getHeaders() {
return this.headers;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getHeaders
File: src/java/winstone/WinstoneResponse.java
Repository: jenkinsci/winstone
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2011-4344
|
LOW
| 2.6
|
jenkinsci/winstone
|
getHeaders
|
src/java/winstone/WinstoneResponse.java
|
410ed3001d51c689cf59085b7417466caa2ded7b
| 0
|
Analyze the following code function for security vulnerabilities
|
public static JellyContext getCurrentJellyContext() {
JellyContext context = ExpressionFactory2.CURRENT_CONTEXT.get();
assert context!=null;
return context;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCurrentJellyContext
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
|
getCurrentJellyContext
|
core/src/main/java/hudson/Functions.java
|
bf539198564a1108b7b71a973bf7de963a6213ef
| 0
|
Analyze the following code function for security vulnerabilities
|
public void attachAgent(String process, String path) {
try {
synchronized (this) {
ProcessRecord proc = findProcessLocked(process, UserHandle.USER_SYSTEM, "attachAgent");
if (proc == null || proc.thread == null) {
throw new IllegalArgumentException("Unknown process: " + process);
}
boolean isDebuggable = "1".equals(SystemProperties.get(SYSTEM_DEBUGGABLE, "0"));
if (!isDebuggable) {
if ((proc.info.flags & ApplicationInfo.FLAG_DEBUGGABLE) == 0) {
throw new SecurityException("Process not debuggable: " + proc);
}
}
proc.thread.attachAgent(path);
}
} catch (RemoteException e) {
throw new IllegalStateException("Process disappeared");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: attachAgent
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
|
attachAgent
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
private void startNotificationLogging() {
mStackScroller.setChildLocationsChangedListener(mNotificationLocationsChangedListener);
// Some transitions like mVisibleToUser=false -> mVisibleToUser=true don't
// cause the scroller to emit child location events. Hence generate
// one ourselves to guarantee that we're reporting visible
// notifications.
// (Note that in cases where the scroller does emit events, this
// additional event doesn't break anything.)
mNotificationLocationsChangedListener.onChildLocationsChanged(mStackScroller);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startNotificationLogging
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
|
startNotificationLogging
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public StaticRow<?> getRow() {
return row;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRow
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
|
getRow
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
public int addAppTask(IBinder activityToken, Intent intent,
ActivityManager.TaskDescription description, Bitmap thumbnail) throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeStrongBinder(activityToken);
intent.writeToParcel(data, 0);
description.writeToParcel(data, 0);
thumbnail.writeToParcel(data, 0);
mRemote.transact(ADD_APP_TASK_TRANSACTION, data, reply, 0);
reply.readException();
int res = reply.readInt();
data.recycle();
reply.recycle();
return res;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addAppTask
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
addAppTask
|
core/java/android/app/ActivityManagerNative.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
private int runInstallCommit() throws RemoteException {
final int sessionId = Integer.parseInt(nextArg());
PackageInstaller.Session session = null;
try {
session = new PackageInstaller.Session(mInstaller.openSession(sessionId));
final LocalIntentReceiver receiver = new LocalIntentReceiver();
session.commit(receiver.getIntentSender());
final Intent result = receiver.getResult();
final int status = result.getIntExtra(PackageInstaller.EXTRA_STATUS,
PackageInstaller.STATUS_FAILURE);
if (status == PackageInstaller.STATUS_SUCCESS) {
System.out.println("Success");
return 0;
} else {
Log.e(TAG, "Failure details: " + result.getExtras());
System.err.println("Failure ["
+ result.getStringExtra(PackageInstaller.EXTRA_STATUS_MESSAGE) + "]");
return 1;
}
} finally {
IoUtils.closeQuietly(session);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: runInstallCommit
File: cmds/pm/src/com/android/commands/pm/Pm.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3833
|
HIGH
| 9.3
|
android
|
runInstallCommit
|
cmds/pm/src/com/android/commands/pm/Pm.java
|
4e4743a354e26467318b437892a9980eb9b8328a
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void sendNetworkChangeBroadcast(
Context context, DetailedState networkAgentState, boolean verboseLoggingEnabled) {
Intent intent = new Intent(WifiManager.NETWORK_STATE_CHANGED_ACTION);
intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
NetworkInfo networkInfo = makeNetworkInfo(networkAgentState);
intent.putExtra(WifiManager.EXTRA_NETWORK_INFO, networkInfo);
if (verboseLoggingEnabled) {
Log.d(TAG, "Sending broadcast=NETWORK_STATE_CHANGED_ACTION"
+ " networkAgentState=" + networkAgentState);
}
//TODO(b/69974497) This should be non-sticky, but settings needs fixing first.
context.sendStickyBroadcastAsUser(intent, UserHandle.ALL);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendNetworkChangeBroadcast
File: service/java/com/android/server/wifi/ClientModeImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
sendNetworkChangeBroadcast
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void updateProperty(FF4j ff4j, HttpServletRequest req) {
String name = req.getParameter("name");
String type = req.getParameter("pType");
String description = req.getParameter("desc");
String value = req.getParameter("pValue");
String uid = req.getParameter("uid");
String featureId = req.getParameter(WebConstants.FEATURE_UID);
Property<?> ap;
// To update the core the uid is the name (rename, edit)
if (uid == null) {
uid = name;
}
// Update Feature property
if (Util.hasLength(featureId)) {
Feature current = ff4j.getFeatureStore().read(featureId);
ap = current.getProperty(uid);
ap.setDescription(description);
if (ap.getType().equalsIgnoreCase(type)) {
ap.setValueFromString(value);
} else {
ap = PropertyFactory.createProperty(name, type, value);
LOGGER.warn("By changing property type you loose the fixedValues, cannot evaluate ? at runtime");
}
ff4j.getFeatureStore().update(current);
} else if (ff4j.getPropertiesStore().existProperty(uid)) {
// Do not change name, just and update
if (uid.equalsIgnoreCase(name)) {
ap = ff4j.getPropertiesStore().readProperty(uid);
// just an update for the value
if (ap.getType().equalsIgnoreCase(type)) {
ap.setDescription(description);
ap.setValueFromString(value);
ff4j.getPropertiesStore().updateProperty(ap);
} else {
ap = PropertyFactory.createProperty(name, type, value);
ap.setDescription(description);
// Note : Fixed Values are LOST if type changed => cannot cast ? to T
LOGGER.warn("By changing property type you loose the fixedValues, cannot evaluate ? at runtime");
ff4j.getPropertiesStore().deleteProperty(name);
ff4j.getPropertiesStore().createProperty(ap);
}
} else {
// Name change delete and create a new
ap = PropertyFactory.createProperty(name, type, value);
ap.setDescription(description);
// Note : Fixed Values are LOST if name changed => cannot cast ? to T
LOGGER.warn("By changing property name you loose the fixedValues, cannot evaluate generics at runtime (type inference)");
ff4j.getPropertiesStore().deleteProperty(uid);
ff4j.getPropertiesStore().createProperty(ap);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateProperty
File: ff4j-web/src/main/java/org/ff4j/web/embedded/ConsoleOperations.java
Repository: ff4j
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2022-44262
|
CRITICAL
| 9.8
|
ff4j
|
updateProperty
|
ff4j-web/src/main/java/org/ff4j/web/embedded/ConsoleOperations.java
|
991df72725f78adbc413d9b0fbb676201f1882e0
| 0
|
Analyze the following code function for security vulnerabilities
|
public Builder tags(String tag, String... more) {
this.tags.clear();
addTag(tag);
if (more != null) {
for (String t : more) {
addTag(t);
}
}
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: tags
File: clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNode.java
Repository: ClickHouse/clickhouse-java
The code follows secure coding practices.
|
[
"CWE-209"
] |
CVE-2024-23689
|
HIGH
| 8.8
|
ClickHouse/clickhouse-java
|
tags
|
clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNode.java
|
4f8d9303eb991b39ec7e7e34825241efa082238a
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequiresPermission(value = MANAGE_DEVICE_POLICY_ORGANIZATION_IDENTITY, conditional = true)
public void setOrganizationName(@Nullable ComponentName admin, @Nullable CharSequence title) {
throwIfParentInstance("setOrganizationName");
try {
mService.setOrganizationName(admin, mContext.getPackageName(), title);
} catch (RemoteException re) {
throw re.rethrowFromSystemServer();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setOrganizationName
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
|
setOrganizationName
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
private void readWhitespace() {
while (path.inBounds()) {
char c = path.currentChar();
if (!isWhitespace(c)) {
break;
}
path.incrementPosition(1);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readWhitespace
File: json-path/src/main/java/com/jayway/jsonpath/internal/path/PathCompiler.java
Repository: json-path/JsonPath
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-51074
|
MEDIUM
| 5.3
|
json-path/JsonPath
|
readWhitespace
|
json-path/src/main/java/com/jayway/jsonpath/internal/path/PathCompiler.java
|
f49ff25e3bad8c8a0c853058181f2c00b5beb305
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.