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
|
private void offsetVoiceInputWindowLw(WindowState win) {
final int gravity = win.getAttrs().gravity;
switch (gravity&((Gravity.AXIS_PULL_BEFORE|Gravity.AXIS_PULL_AFTER)
<< Gravity.AXIS_X_SHIFT)) {
case Gravity.AXIS_PULL_BEFORE<<Gravity.AXIS_X_SHIFT: {
int right = win.getContentFrameLw().right - win.getGivenContentInsetsLw().right;
if (mVoiceContentLeft < right) {
mVoiceContentLeft = right;
}
} break;
case Gravity.AXIS_PULL_AFTER<<Gravity.AXIS_X_SHIFT: {
int left = win.getContentFrameLw().left - win.getGivenContentInsetsLw().left;
if (mVoiceContentRight < left) {
mVoiceContentRight = left;
}
} break;
}
switch (gravity&((Gravity.AXIS_PULL_BEFORE|Gravity.AXIS_PULL_AFTER)
<< Gravity.AXIS_Y_SHIFT)) {
case Gravity.AXIS_PULL_BEFORE<<Gravity.AXIS_Y_SHIFT: {
int bottom = win.getContentFrameLw().bottom - win.getGivenContentInsetsLw().bottom;
if (mVoiceContentTop < bottom) {
mVoiceContentTop = bottom;
}
} break;
case Gravity.AXIS_PULL_AFTER<<Gravity.AXIS_Y_SHIFT: {
int top = win.getContentFrameLw().top - win.getGivenContentInsetsLw().top;
if (mVoiceContentBottom < top) {
mVoiceContentBottom = top;
}
} break;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: offsetVoiceInputWindowLw
File: policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-0812
|
MEDIUM
| 6.6
|
android
|
offsetVoiceInputWindowLw
|
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
|
84669ca8de55d38073a0dcb01074233b0a417541
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Object createImage(String path) throws IOException {
int IMAGE_MAX_SIZE = getDisplayHeight();
if (exists(path)) {
Bitmap b = null;
try {
//Decode image size
BitmapFactory.Options o = new BitmapFactory.Options();
o.inJustDecodeBounds = true;
o.inPreferredConfig = Bitmap.Config.ARGB_8888;
InputStream fis = createFileInputStream(path);
BitmapFactory.decodeStream(fis, null, o);
fis.close();
int scale = 1;
if (o.outHeight > IMAGE_MAX_SIZE || o.outWidth > IMAGE_MAX_SIZE) {
scale = (int) Math.pow(2, (int) Math.round(Math.log(IMAGE_MAX_SIZE / (double) Math.max(o.outHeight, o.outWidth)) / Math.log(0.5)));
}
//Decode with inSampleSize
BitmapFactory.Options o2 = new BitmapFactory.Options();
o2.inPreferredConfig = Bitmap.Config.ARGB_8888;
if(sampleSizeOverride != -1) {
o2.inSampleSize = sampleSizeOverride;
} else {
String sampleSize = Display.getInstance().getProperty("android.sampleSize", null);
if(sampleSize != null) {
o2.inSampleSize = Integer.parseInt(sampleSize);
} else {
o2.inSampleSize = scale;
}
}
o2.inPurgeable = true;
o2.inInputShareable = true;
fis = createFileInputStream(path);
b = BitmapFactory.decodeStream(fis, null, o2);
fis.close();
//fix rotation
ExifInterface exif = new ExifInterface(removeFilePrefix(path));
int orientation = exif.getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL);
int angle = 0;
switch (orientation) {
case ExifInterface.ORIENTATION_ROTATE_90:
angle = 90;
break;
case ExifInterface.ORIENTATION_ROTATE_180:
angle = 180;
break;
case ExifInterface.ORIENTATION_ROTATE_270:
angle = 270;
break;
}
if (sampleSizeOverride < 0 && angle != 0) {
Matrix mat = new Matrix();
mat.postRotate(angle);
Bitmap correctBmp = Bitmap.createBitmap(b, 0, 0, b.getWidth(), b.getHeight(), mat, true);
b.recycle();
b = correctBmp;
}
} catch (IOException e) {
}
return b;
} else {
InputStream in = this.getResourceAsStream(getClass(), path);
if (in == null) {
throw new IOException("Resource not found. " + path);
}
try {
return this.createImage(in);
} finally {
if (in != null) {
try {
in.close();
} catch (Exception ignored) {
;
}
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createImage
File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
createImage
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@GuardedBy("this")
private void decRefsLocked(long id) {
if (DEBUG_REFS && mRefStacks != null) {
mRefStacks.remove(id);
}
mNumRefs--;
if (mNumRefs == 0 && mObject != 0) {
nativeDestroy(mObject);
mObject = 0;
mApkAssets = sEmptyApkAssets;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: decRefsLocked
File: core/java/android/content/res/AssetManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-415"
] |
CVE-2023-40103
|
HIGH
| 7.8
|
android
|
decRefsLocked
|
core/java/android/content/res/AssetManager.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nonnegative
public int getLineNumber ()
{
return m_aParsePos.getLineNumber ();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLineNumber
File: ph-json/src/main/java/com/helger/json/parser/JsonParser.java
Repository: phax/ph-commons
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-34612
|
HIGH
| 7.5
|
phax/ph-commons
|
getLineNumber
|
ph-json/src/main/java/com/helger/json/parser/JsonParser.java
|
02a4d034dcfb2b6e1796b25f519bf57a6796edce
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getCountColumn() {
return countColumn;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCountColumn
File: src/main/java/com/github/pagehelper/Page.java
Repository: pagehelper/Mybatis-PageHelper
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-28111
|
HIGH
| 7.5
|
pagehelper/Mybatis-PageHelper
|
getCountColumn
|
src/main/java/com/github/pagehelper/Page.java
|
554a524af2d2b30d09505516adc412468a84d8fa
| 0
|
Analyze the following code function for security vulnerabilities
|
public void clearEmailValidationTok() {
emailValidationTok = null;
save();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearEmailValidationTok
File: src/gribbit/auth/User.java
Repository: lukehutch/gribbit
The code follows secure coding practices.
|
[
"CWE-346"
] |
CVE-2014-125071
|
MEDIUM
| 5.2
|
lukehutch/gribbit
|
clearEmailValidationTok
|
src/gribbit/auth/User.java
|
620418df247aebda3dd4be1dda10fe229ea505dd
| 0
|
Analyze the following code function for security vulnerabilities
|
public byte[] getPayload() {
if (payload != null) return payload;
// This is a Frame we've constructed ourselves. For some reason (e.g.
// testing), we're acting as if we received it even though it
// didn't come in off the wire.
return accumulator.toByteArray();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPayload
File: src/main/java/com/rabbitmq/client/impl/Frame.java
Repository: rabbitmq/rabbitmq-java-client
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-46120
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-java-client
|
getPayload
|
src/main/java/com/rabbitmq/client/impl/Frame.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean checkPackagesInPermittedListOrSystem(List<String> enabledPackages,
List<String> permittedList, int userIdToCheck) {
long id = mInjector.binderClearCallingIdentity();
try {
// If we have an enabled packages list for a managed profile the packages
// we should check are installed for the parent user.
UserInfo user = getUserInfo(userIdToCheck);
if (user.isManagedProfile()) {
userIdToCheck = user.profileGroupId;
}
for (String enabledPackage : enabledPackages) {
boolean systemService = false;
try {
ApplicationInfo applicationInfo = mIPackageManager.getApplicationInfo(
enabledPackage, PackageManager.MATCH_UNINSTALLED_PACKAGES,
userIdToCheck);
if (applicationInfo == null) {
return false;
}
systemService = (applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0;
} catch (RemoteException e) {
Slogf.i(LOG_TAG, "Can't talk to package managed", e);
}
if (!systemService && !permittedList.contains(enabledPackage)) {
return false;
}
}
} finally {
mInjector.binderRestoreCallingIdentity(id);
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkPackagesInPermittedListOrSystem
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
|
checkPackagesInPermittedListOrSystem
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isSniEnabledByDefault() {
String enableSNI = System.getProperty("jsse.enableSNIExtension", "true");
if ("true".equalsIgnoreCase(enableSNI)) {
return true;
} else if ("false".equalsIgnoreCase(enableSNI)) {
return false;
} else {
throw new RuntimeException(
"Can only set \"jsse.enableSNIExtension\" to \"true\" or \"false\"");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isSniEnabledByDefault
File: src/main/java/org/conscrypt/SSLParametersImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3840
|
HIGH
| 10
|
android
|
isSniEnabledByDefault
|
src/main/java/org/conscrypt/SSLParametersImpl.java
|
5af5e93463f4333187e7e35f3bd2b846654aa214
| 0
|
Analyze the following code function for security vulnerabilities
|
private void realDownloadWithSingleConnection(final long totalLength)
throws IOException, IllegalAccessException {
// connect
final ConnectionProfile profile;
if (!acceptPartial) {
model.setSoFar(0);
profile = ConnectionProfile.ConnectionProfileBuild
.buildBeginToEndConnectionProfile(totalLength);
} else {
profile = ConnectionProfile.ConnectionProfileBuild
.buildToEndConnectionProfile(model.getSoFar(), model.getSoFar(),
totalLength - model.getSoFar());
}
singleDownloadRunnable = new DownloadRunnable.Builder()
.setId(model.getId())
.setConnectionIndex(-1)
.setCallback(this)
.setUrl(model.getUrl())
.setEtag(model.getETag())
.setHeader(userRequestHeader)
.setWifiRequired(isWifiRequired)
.setConnectionModel(profile)
.setPath(model.getTempFilePath())
.build();
model.setConnectionCount(1);
database.updateConnectionCount(model.getId(), 1);
if (paused) {
model.setStatus(FileDownloadStatus.paused);
singleDownloadRunnable.pause();
} else {
singleDownloadRunnable.run();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: realDownloadWithSingleConnection
File: library/src/main/java/com/liulishuo/filedownloader/download/DownloadLaunchRunnable.java
Repository: lingochamp/FileDownloader
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-11248
|
HIGH
| 7.5
|
lingochamp/FileDownloader
|
realDownloadWithSingleConnection
|
library/src/main/java/com/liulishuo/filedownloader/download/DownloadLaunchRunnable.java
|
b023cc081bbecdd2a9f3549a3ae5c12a9647ed7f
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String uncompressString(byte[] input, String encoding)
throws IOException,
UnsupportedEncodingException
{
byte[] uncompressed = uncompress(input);
return new String(uncompressed, encoding);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: uncompressString
File: src/main/java/org/xerial/snappy/Snappy.java
Repository: xerial/snappy-java
The code follows secure coding practices.
|
[
"CWE-190"
] |
CVE-2023-34454
|
HIGH
| 7.5
|
xerial/snappy-java
|
uncompressString
|
src/main/java/org/xerial/snappy/Snappy.java
|
d0042551e4a3509a725038eb9b2ad1f683674d94
| 0
|
Analyze the following code function for security vulnerabilities
|
public static ConfigManager getInstance() {
return instance;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInstance
File: frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java
Repository: pytorch/serve
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2023-43654
|
CRITICAL
| 9.8
|
pytorch/serve
|
getInstance
|
frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java
|
391bdec3348e30de173fbb7c7277970e0b53c8ad
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void createClientSession(AuthenticatedClientSessionModel clientSession, boolean offline) {
PersistentAuthenticatedClientSessionAdapter adapter = new PersistentAuthenticatedClientSessionAdapter(session, clientSession);
PersistentClientSessionModel model = adapter.getUpdatedModel();
String userSessionId = clientSession.getUserSession().getId();
String clientId;
String clientStorageProvider;
String externalClientId;
StorageId clientStorageId = new StorageId(clientSession.getClient().getId());
if (clientStorageId.isLocal()) {
clientId = clientStorageId.getId();
clientStorageProvider = PersistentClientSessionEntity.LOCAL;
externalClientId = PersistentClientSessionEntity.LOCAL;
} else {
clientId = PersistentClientSessionEntity.EXTERNAL;
clientStorageProvider = clientStorageId.getProviderId();
externalClientId = clientStorageId.getExternalId();
}
String offlineStr = offlineToString(offline);
boolean exists = false;
PersistentClientSessionEntity entity = em.find(PersistentClientSessionEntity.class, new PersistentClientSessionEntity.Key(userSessionId, clientId, clientStorageProvider, externalClientId, offlineStr));
if (entity != null) {
// client session can already exist in some circumstances (EG. in case it was already present, but expired in the infinispan, but not yet expired in the DB)
exists = true;
} else {
entity = new PersistentClientSessionEntity();
entity.setUserSessionId(userSessionId);
entity.setClientId(clientId);
entity.setClientStorageProvider(clientStorageProvider);
entity.setExternalClientId(externalClientId);
entity.setOffline(offlineStr);
}
entity.setTimestamp(clientSession.getTimestamp());
entity.setData(model.getData());
if (!exists) {
em.persist(entity);
em.flush();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createClientSession
File: model/jpa/src/main/java/org/keycloak/models/jpa/session/JpaUserSessionPersisterProvider.java
Repository: keycloak
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2023-6563
|
HIGH
| 7.7
|
keycloak
|
createClientSession
|
model/jpa/src/main/java/org/keycloak/models/jpa/session/JpaUserSessionPersisterProvider.java
|
11eb952e1df7cbb95b1e2c101dfd4839a2375695
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void testDeserializationAsFloat03() throws Exception
{
Instant date = Instant.now();
Instant value = MAPPER.readValue(
DecimalUtils.toDecimal(date.getEpochSecond(), date.getNano()), Instant.class
);
assertEquals("The value is not correct.", date, value);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: testDeserializationAsFloat03
File: datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestInstantSerialization.java
Repository: FasterXML/jackson-modules-java8
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-1000873
|
MEDIUM
| 4.3
|
FasterXML/jackson-modules-java8
|
testDeserializationAsFloat03
|
datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestInstantSerialization.java
|
ba27ce5909dfb49bcaf753ad3e04ecb980010b0b
| 0
|
Analyze the following code function for security vulnerabilities
|
<T> T authenticate(String username, String password, Mapper<T> mapper);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: authenticate
File: src/main/java/cd/go/authentication/ldap/LdapClient.java
Repository: gocd/gocd-ldap-authentication-plugin
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2022-24832
|
MEDIUM
| 4.9
|
gocd/gocd-ldap-authentication-plugin
|
authenticate
|
src/main/java/cd/go/authentication/ldap/LdapClient.java
|
87fa7dac5d899b3960ab48e151881da4793cfcc3
| 0
|
Analyze the following code function for security vulnerabilities
|
private void throwError(OLATResourceable ores) {
throw new OLATRuntimeException(this.getClass(), "Unable to create wiki folder structure for resource: " + ores.getResourceableId(),
null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: throwError
File: src/main/java/org/olat/modules/wiki/WikiManager.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-39180
|
HIGH
| 9
|
OpenOLAT
|
throwError
|
src/main/java/org/olat/modules/wiki/WikiManager.java
|
699490be8e931af0ef1f135c55384db1f4232637
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isEnabled() {
boolean isEnabledSelf = isEnabledSelf();
if (getParent() != null && isEnabledSelf) {
return getParent().isEnabled();
}
return isEnabledSelf;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isEnabled
File: flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2023-25499
|
MEDIUM
| 6.5
|
vaadin/flow
|
isEnabled
|
flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java
|
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean killPids(int[] pids, String pReason, boolean secure) {
if (Binder.getCallingUid() != SYSTEM_UID) {
throw new SecurityException("killPids only available to the system");
}
final String reason = (pReason == null) ? "Unknown" : pReason;
// XXX Note: don't acquire main activity lock here, because the window
// manager calls in with its locks held.
boolean killed = false;
final ArrayList<ProcessRecord> killCandidates = new ArrayList<>();
synchronized (mPidsSelfLocked) {
int worstType = 0;
for (int i = 0; i < pids.length; i++) {
ProcessRecord proc = mPidsSelfLocked.get(pids[i]);
if (proc != null) {
int type = proc.mState.getSetAdj();
if (type > worstType) {
worstType = type;
}
}
}
// If the worst oom_adj is somewhere in the cached proc LRU range,
// then constrain it so we will kill all cached procs.
if (worstType < ProcessList.CACHED_APP_MAX_ADJ
&& worstType > ProcessList.CACHED_APP_MIN_ADJ) {
worstType = ProcessList.CACHED_APP_MIN_ADJ;
}
// If this is not a secure call, don't let it kill processes that
// are important.
if (!secure && worstType < ProcessList.SERVICE_ADJ) {
worstType = ProcessList.SERVICE_ADJ;
}
Slog.w(TAG, "Killing processes " + reason + " at adjustment " + worstType);
for (int i = 0; i < pids.length; i++) {
ProcessRecord proc = mPidsSelfLocked.get(pids[i]);
if (proc == null) {
continue;
}
int adj = proc.mState.getSetAdj();
if (adj >= worstType && !proc.isKilledByAm()) {
killCandidates.add(proc);
killed = true;
}
}
}
if (!killCandidates.isEmpty()) {
mHandler.post(() -> {
synchronized (ActivityManagerService.this) {
for (int i = 0, size = killCandidates.size(); i < size; i++) {
killCandidates.get(i).killLocked(reason,
ApplicationExitInfo.REASON_OTHER,
ApplicationExitInfo.SUBREASON_KILL_PID, true);
}
}
});
}
return killed;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: killPids
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
|
killPids
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public TvExtender setChannel(String channelId) {
mChannelId = channelId;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setChannel
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
setChannel
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getTagName()
{
return TAG_NAME;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTagName
File: svg-core/src/main/java/com/kitfox/svg/ImageSVG.java
Repository: blackears/svgSalamander
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2017-5617
|
MEDIUM
| 5.8
|
blackears/svgSalamander
|
getTagName
|
svg-core/src/main/java/com/kitfox/svg/ImageSVG.java
|
826555b0a3229b6cf4671fe4de7aa51b5946b63d
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean updateChecksumFile(MultipartHttpServletRequest request, JobIdentifier jobIdentifier, String filePath) throws IOException, IllegalArtifactLocationException {
MultipartFile checksumMultipartFile = getChecksumFile(request);
if (checksumMultipartFile != null) {
String checksumFilePath = String.format("%s/%s/%s", artifactsService.findArtifactRoot(jobIdentifier), ArtifactLogUtil.CRUISE_OUTPUT_FOLDER, ArtifactLogUtil.MD5_CHECKSUM_FILENAME);
File checksumFile = artifactsService.getArtifactLocation(checksumFilePath);
synchronized (checksumFilePath.intern()) {
return artifactsService.saveOrAppendFile(checksumFile, checksumMultipartFile.getInputStream());
}
} else {
LOGGER.warn("[Artifacts Upload] Checksum file not uploaded for artifact at path '{}'", filePath);
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateChecksumFile
File: server/src/main/java/com/thoughtworks/go/server/controller/ArtifactsController.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-43289
|
MEDIUM
| 5
|
gocd
|
updateChecksumFile
|
server/src/main/java/com/thoughtworks/go/server/controller/ArtifactsController.java
|
4c4bb4780eb0d3fc4cacfc4cfcc0b07e2eaf0595
| 0
|
Analyze the following code function for security vulnerabilities
|
public static GlobalTerminationRevisionConfig initial() {
// Default to 0 to make sure sessions get cleaned up on first run
return create(0);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initial
File: graylog2-server/src/main/java/org/graylog2/security/UserSessionTerminationService.java
Repository: Graylog2/graylog2-server
The code follows secure coding practices.
|
[
"CWE-613"
] |
CVE-2023-41041
|
LOW
| 3.1
|
Graylog2/graylog2-server
|
initial
|
graylog2-server/src/main/java/org/graylog2/security/UserSessionTerminationService.java
|
bb88f3d0b2b0351669ab32c60b595ab7242a3fe3
| 0
|
Analyze the following code function for security vulnerabilities
|
public Double optDoubleObject(String key, Double defaultValue) {
Number val = this.optNumber(key);
if (val == null) {
return defaultValue;
}
return val.doubleValue();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: optDoubleObject
File: src/main/java/org/json/JSONObject.java
Repository: stleary/JSON-java
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2023-5072
|
HIGH
| 7.5
|
stleary/JSON-java
|
optDoubleObject
|
src/main/java/org/json/JSONObject.java
|
661114c50dcfd53bb041aab66f14bb91e0a87c8a
| 0
|
Analyze the following code function for security vulnerabilities
|
public Page toRestPage(URI baseUri, URI self, Document doc, boolean useVersion, Boolean withPrettyNames,
Boolean withObjects, Boolean withXClass, Boolean withAttachments) throws XWikiException
{
Page page = this.objectFactory.createPage();
toRestPageSummary(page, baseUri, doc, useVersion, withPrettyNames);
XWikiContext xwikiContext = this.xcontextProvider.get();
page.setMajorVersion(doc.getRCSVersion().at(0));
page.setMinorVersion(doc.getRCSVersion().at(1));
page.setHidden(doc.isHidden());
page.setLanguage(doc.getLocale().toString());
page.setCreator(doc.getCreator());
if (withPrettyNames) {
page.setCreatorName(xwikiContext.getWiki().getUserName(doc.getCreator(), null, false, xwikiContext));
}
Calendar calendar = Calendar.getInstance();
calendar.setTime(doc.getCreationDate());
page.setCreated(calendar);
page.setModifier(doc.getContentAuthor());
if (withPrettyNames) {
page.setModifierName(xwikiContext.getWiki().getUserName(doc.getContentAuthor(), null, false, xwikiContext));
}
String originalAuthor = this.userReferenceSerializer.serialize(doc.getAuthors().getOriginalMetadataAuthor());
page.setOriginalMetadataAuthor(originalAuthor);
if (withPrettyNames) {
page.setOriginalMetadataAuthorName(
xwikiContext.getWiki().getUserName(originalAuthor, null, false, xwikiContext));
}
calendar = Calendar.getInstance();
calendar.setTime(doc.getContentUpdateDate());
page.setModified(calendar);
page.setComment(doc.getComment());
page.setContent(doc.getContent());
page.setHierarchy(toRestHierarchy(doc.getDocumentReference(), withPrettyNames));
if (self != null) {
Link pageLink = this.objectFactory.createLink();
pageLink.setHref(self.toString());
pageLink.setRel(Relations.SELF);
page.getLinks().add(pageLink);
}
com.xpn.xwiki.api.Class xwikiClass = doc.getxWikiClass();
if (xwikiClass != null) {
String classUri =
Utils.createURI(baseUri, ClassResource.class, doc.getWiki(), xwikiClass.getName()).toString();
Link classLink = this.objectFactory.createLink();
classLink.setHref(classUri);
classLink.setRel(Relations.CLASS);
page.getLinks().add(classLink);
}
XWikiContext xcontext = xcontextProvider.get();
// Add attachments
if (withAttachments) {
page.setAttachments(objectFactory.createAttachments());
for (com.xpn.xwiki.api.Attachment attachment : doc.getAttachmentList()) {
URL url = xcontext.getURLFactory().createAttachmentURL(attachment.getFilename(), doc.getSpace(),
doc.getDocumentReference().getName(), "download", null, doc.getWiki(), xcontext);
String attachmentXWikiAbsoluteUrl = url.toString();
String attachmentXWikiRelativeUrl = xcontext.getURLFactory().getURL(url, xcontext);
page.getAttachments().getAttachments().add(toRestAttachment(baseUri, attachment,
attachmentXWikiRelativeUrl, attachmentXWikiAbsoluteUrl, withPrettyNames, false));
}
}
// Add objects
if (withObjects) {
page.setObjects(objectFactory.createObjects());
XWikiDocument xwikiDocument = xcontext.getWiki().getDocument(doc.getDocumentReference(), xcontext);
for (List<BaseObject> objects : xwikiDocument.getXObjects().values()) {
for (BaseObject object : objects) {
// Deleting an object leads to a null entry in the list of objects.
if (object != null) {
page.getObjects().getObjectSummaries()
.add(toRestObject(baseUri, doc, object, false, withPrettyNames));
}
}
}
}
// Add xclass
if (withXClass) {
page.setClazz(toRestClass(baseUri, doc.getxWikiClass()));
}
return page;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toRestPage
File: xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-server/src/main/java/org/xwiki/rest/internal/ModelFactory.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2023-35151
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
toRestPage
|
xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-server/src/main/java/org/xwiki/rest/internal/ModelFactory.java
|
824cd742ecf5439971247da11bfe7e0ad2b10ede
| 0
|
Analyze the following code function for security vulnerabilities
|
public static @Nonnull
String removeAllISOControlsButTabs(@Nonnull final String str) {
final StringBuilder result = new StringBuilder(str.length());
for (final char c : str.toCharArray()) {
if (c != '\t' && Character.isISOControl(c)) {
continue;
}
result.append(c);
}
return result.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeAllISOControlsButTabs
File: mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java
Repository: raydac/netbeans-mmd-plugin
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000542
|
MEDIUM
| 6.8
|
raydac/netbeans-mmd-plugin
|
removeAllISOControlsButTabs
|
mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java
|
9fba652bf06e649186b8f9e612d60e9cc15097e9
| 0
|
Analyze the following code function for security vulnerabilities
|
public void adjustVolume(String packageName, int pid, int uid, boolean asSystemService,
int direction) {
try {
final String reason = TAG + ":adjustVolume";
mService.tempAllowlistTargetPkgIfPossible(getUid(), getPackageName(),
pid, uid, packageName, reason);
if (asSystemService) {
mCb.onAdjustVolume(mContext.getPackageName(), Process.myPid(),
Process.SYSTEM_UID, direction);
} else {
mCb.onAdjustVolume(packageName, pid, uid, direction);
}
} catch (RemoteException e) {
Log.e(TAG, "Remote failure in adjustVolume.", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: adjustVolume
File: services/core/java/com/android/server/media/MediaSessionRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21280
|
MEDIUM
| 5.5
|
android
|
adjustVolume
|
services/core/java/com/android/server/media/MediaSessionRecord.java
|
06e772e05514af4aa427641784c5eec39a892ed3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isInManagedCall(String callingPackage, String callingFeatureId) {
try {
Log.startSession("TSI.iIMC");
if (!canReadPhoneState(callingPackage, callingFeatureId, "isInManagedCall")) {
throw new SecurityException("Only the default dialer or caller with " +
"READ_PHONE_STATE permission can use this method.");
}
synchronized (mLock) {
return mCallsManager.hasOngoingManagedCalls();
}
} finally {
Log.endSession();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isInManagedCall
File: src/com/android/server/telecom/TelecomServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21394
|
MEDIUM
| 5.5
|
android
|
isInManagedCall
|
src/com/android/server/telecom/TelecomServiceImpl.java
|
68dca62035c49e14ad26a54f614199cb29a3393f
| 0
|
Analyze the following code function for security vulnerabilities
|
private List<AclEntry> getLocalAclEntries(ItemType type, List<AclEntry> parentAclList, List<AclEntry> childAclList)
{
List<AclEntry> aclList = new ArrayList<>();
for (AclEntry childEntry : childAclList)
{
boolean found = false;
for (AclEntry parentEntry : parentAclList)
{
if (!parentEntry.type().equals(childEntry.type())) continue;
if (!parentEntry.principal().equals(childEntry.principal())) continue;
if (!parentEntry.permissions().equals(childEntry.permissions())) continue;
if (!parentEntry.flags().equals(childEntry.flags()))
{
if (parentEntry.flags().contains(AclEntryFlag.INHERIT_ONLY))
{
found = true;
break;
}
else
{
if (type.equals(ItemType.FOLDER))
{
if (parentEntry.flags().contains(AclEntryFlag.DIRECTORY_INHERIT))
{
found = true;
break;
}
}
else
{
if (parentEntry.flags().contains(AclEntryFlag.FILE_INHERIT))
{
found = true;
break;
}
}
}
continue;
}
found = true;
break;
}
if (found) continue;
// System.out.println("CHILD: "+childEntry.toString());
/*
* System.out.println("\n\n");
* System.out.println("CHILD: "+childEntry.toString());
*
* for(AclEntry parentEntry : parentAclList){
*
* System.out.println("PARENT: "+parentEntry.toString()); }
*
* System.out.println("\n\n");
*/
aclList.add(childEntry);
}
return aclList;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLocalAclEntries
File: src/main/java/cloudsync/connector/LocalFilesystemConnector.java
Repository: HolgerHees/cloudsync
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-4773
|
LOW
| 3.3
|
HolgerHees/cloudsync
|
getLocalAclEntries
|
src/main/java/cloudsync/connector/LocalFilesystemConnector.java
|
3ad796833398af257c28e0ebeade68518e0e612a
| 0
|
Analyze the following code function for security vulnerabilities
|
List<PackageInfo> allAgentPackages() {
// !!! TODO: cache this and regenerate only when necessary
int flags = PackageManager.GET_SIGNATURES;
List<PackageInfo> packages = mPackageManager.getInstalledPackages(flags);
int N = packages.size();
for (int a = N-1; a >= 0; a--) {
PackageInfo pkg = packages.get(a);
try {
ApplicationInfo app = pkg.applicationInfo;
if (((app.flags&ApplicationInfo.FLAG_ALLOW_BACKUP) == 0)
|| app.backupAgentName == null) {
packages.remove(a);
}
else {
// we will need the shared library path, so look that up and store it here.
// This is used implicitly when we pass the PackageInfo object off to
// the Activity Manager to launch the app for backup/restore purposes.
app = mPackageManager.getApplicationInfo(pkg.packageName,
PackageManager.GET_SHARED_LIBRARY_FILES);
pkg.applicationInfo.sharedLibraryFiles = app.sharedLibraryFiles;
}
} catch (NameNotFoundException e) {
packages.remove(a);
}
}
return packages;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: allAgentPackages
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
|
allAgentPackages
|
services/backup/java/com/android/server/backup/BackupManagerService.java
|
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
| 0
|
Analyze the following code function for security vulnerabilities
|
public static <T> T convertRequestParam(Map<String, String[]> requestParam, Class<T> clazz) {
Map<String, Object> tempMap = new HashMap<>();
for (Map.Entry<String, String[]> entry : requestParam.entrySet()) {
if (entry.getValue() != null && entry.getValue().length > 0) {
if (entry.getValue().length > 1) {
tempMap.put(entry.getKey(), Arrays.asList(entry.getValue()));
} else {
tempMap.put(entry.getKey(), entry.getValue()[0]);
}
}
}
return BeanUtil.convert(tempMap, clazz);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: convertRequestParam
File: common/src/main/java/com/zrlog/util/ZrLogUtil.java
Repository: 94fzb/zrlog
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-16643
|
LOW
| 3.5
|
94fzb/zrlog
|
convertRequestParam
|
common/src/main/java/com/zrlog/util/ZrLogUtil.java
|
4a91c83af669e31a22297c14f089d8911d353fa1
| 0
|
Analyze the following code function for security vulnerabilities
|
@SneakyThrows
private void addDefaultEmailTemplates(String tenantName) {
Resource[] resources = getResourcePatternResolver(resourceLoader).getResources(DEFAULT_EMAILS_PATTERN);
stream(resources).forEach(sneakyThrows(resource -> {
AntPathMatcher matcher = new AntPathMatcher();
String path = resource.getURL().getPath();
int startIndex = path.indexOf(PATH_TO_EMAILS);
if (startIndex == -1) {
return;
}
path = path.substring(startIndex);
Map<String, String> fileParams = matcher.extractUriTemplateVariables(DEFAULT_EMAILS_PATH_PATTERN, path);
String email = IOUtils.toString(resource.getInputStream(), UTF_8);
String configPath = PATH_TO_EMAILS_IN_CONFIG + fileParams.get("lang") + "/" + fileParams.get("name") + ".ftl";
tenantConfigRepository.updateConfig(tenantName, configPath, email);
}));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addDefaultEmailTemplates
File: src/main/java/com/icthh/xm/uaa/service/tenant/TenantService.java
Repository: xm-online/xm-uaa
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15557
|
HIGH
| 7.5
|
xm-online/xm-uaa
|
addDefaultEmailTemplates
|
src/main/java/com/icthh/xm/uaa/service/tenant/TenantService.java
|
bd235434f119c67090952e08fc28abe41aea2e2c
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean checkForPermission(String permission, String description, boolean forceAsk){
//before sdk 23 no need to ask for permission
if(android.os.Build.VERSION.SDK_INT < 23){
return true;
}
String prompt = Display.getInstance().getProperty(permission, description);
if (android.support.v4.content.ContextCompat.checkSelfPermission(getContext(),
permission)
!= PackageManager.PERMISSION_GRANTED) {
if (getActivity() == null) {
return false;
}
// Should we show an explanation?
if (!forceAsk && android.support.v4.app.ActivityCompat.shouldShowRequestPermissionRationale(getActivity(),
permission)) {
// Show an expanation to the user *asynchronously* -- don't block
if(Dialog.show("Requires permission", prompt, "Ask again", "Don't Ask")){
return checkForPermission(permission, description, true);
}else {
return false;
}
} else {
// No explanation needed, we can request the permission.
((CodenameOneActivity)getActivity()).setRequestForPermission(true);
((CodenameOneActivity)getActivity()).setWaitingForPermissionResult(true);
android.support.v4.app.ActivityCompat.requestPermissions(getActivity(),
new String[]{permission},
1);
//wait for a response
Display.getInstance().invokeAndBlock(new Runnable() {
@Override
public void run() {
while(((CodenameOneActivity)getActivity()).isRequestForPermission()) {
try {
Thread.sleep(50);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
});
//check again if the permission is given after the dialog was displayed
return android.support.v4.content.ContextCompat.checkSelfPermission(getActivity(),
permission) == PackageManager.PERMISSION_GRANTED;
}
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkForPermission
File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
checkForPermission
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public T getItem() {
return item;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getItem
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
|
getItem
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
private void handleCreateConferenceComplete(
String callId,
ConnectionRequest request,
ParcelableConference conference) {
// TODO: Note we are not using parameter "request", which is a side effect of our tacit
// assumption that we have at most one outgoing conference attempt per ConnectionService.
// This may not continue to be the case.
if (conference.getState() == Connection.STATE_DISCONNECTED) {
// A conference that begins in the DISCONNECTED state is an indication of
// failure to connect; we handle all failures uniformly
removeCall(callId, conference.getDisconnectCause());
} else {
// Successful connection
if (mPendingResponses.containsKey(callId)) {
mPendingResponses.remove(callId)
.handleCreateConferenceSuccess(mCallIdMapper, conference);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleCreateConferenceComplete
File: src/com/android/server/telecom/ConnectionServiceWrapper.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
handleCreateConferenceComplete
|
src/com/android/server/telecom/ConnectionServiceWrapper.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean onTouchEvent(MotionEvent event) {
if (mBlockTouches || (mQs != null && mQs.isCustomizing())) {
return false;
}
initDownStates(event);
if (mListenForHeadsUp && !mHeadsUpTouchHelper.isTrackingHeadsUp()
&& mHeadsUpTouchHelper.onInterceptTouchEvent(event)) {
mIsExpansionFromHeadsUp = true;
MetricsLogger.count(mContext, COUNTER_PANEL_OPEN_PEEK, 1);
}
boolean handled = false;
if ((!mIsExpanding || mHintAnimationRunning)
&& !mQsExpanded
&& mStatusBar.getBarState() != StatusBarState.SHADE
&& !mDozing) {
handled |= mAffordanceHelper.onTouchEvent(event);
}
if (mOnlyAffordanceInThisMotion) {
return true;
}
handled |= mHeadsUpTouchHelper.onTouchEvent(event);
if (mQsOverscrollExpansionEnabled && !mHeadsUpTouchHelper.isTrackingHeadsUp()
&& handleQsTouch(event)) {
return true;
}
if (event.getActionMasked() == MotionEvent.ACTION_DOWN && isFullyCollapsed()) {
MetricsLogger.count(mContext, COUNTER_PANEL_OPEN, 1);
updateVerticalPanelPosition(event.getX());
handled = true;
}
handled |= super.onTouchEvent(event);
return mDozing ? handled : true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onTouchEvent
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
|
onTouchEvent
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
private ClassLoader getClassLoader() {
ClassLoader theClassLoader = this.classLoader;
if (theClassLoader == null) {
theClassLoader = Thread.currentThread().getContextClassLoader();
}
return theClassLoader;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getClassLoader
File: hazelcast/src/main/java/com/hazelcast/nio/IOUtil.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
getClassLoader
|
hazelcast/src/main/java/com/hazelcast/nio/IOUtil.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
@PostConstruct
public void init() {
methodsCache.initClassMethod("com.alibaba.nacos.naming.controllers");
methodsCache.initClassMethod("com.alibaba.nacos.console.controller");
methodsCache.initClassMethod("com.alibaba.nacos.config.server.controller");
}
|
Vulnerability Classification:
- CWE: CWE-290
- CVE: CVE-2021-29441
- Severity: HIGH
- CVSS Score: 7.5
Description: Fix #4701
Function: init
File: console/src/main/java/com/alibaba/nacos/console/config/ConsoleConfig.java
Repository: alibaba/nacos
Fixed Code:
@PostConstruct
public void init() {
methodsCache.initClassMethod("com.alibaba.nacos.core.controller");
methodsCache.initClassMethod("com.alibaba.nacos.naming.controllers");
methodsCache.initClassMethod("com.alibaba.nacos.config.server.controller");
methodsCache.initClassMethod("com.alibaba.nacos.console.controller");
}
|
[
"CWE-290"
] |
CVE-2021-29441
|
HIGH
| 7.5
|
alibaba/nacos
|
init
|
console/src/main/java/com/alibaba/nacos/console/config/ConsoleConfig.java
|
91d16023d91ea21a5e58722c751485a0b9bbeeb3
| 1
|
Analyze the following code function for security vulnerabilities
|
private void requestLocationUpdates(Context context, LocationRequest req, PendingIntent pendingIntent) {
PlayServices.getInstance().requestLocationUpdates(getmGoogleApiClient(), context, req, pendingIntent);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: requestLocationUpdates
File: Ports/Android/src/com/codename1/location/AndroidLocationPlayServiceManager.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
requestLocationUpdates
|
Ports/Android/src/com/codename1/location/AndroidLocationPlayServiceManager.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void drainTo(InputStream input, OutputStream output) throws IOException {
byte[] buffer = new byte[1024];
int n;
while (-1 != (n = input.read(buffer))) {
output.write(buffer, 0, n);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: drainTo
File: hazelcast/src/main/java/com/hazelcast/nio/IOUtil.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
drainTo
|
hazelcast/src/main/java/com/hazelcast/nio/IOUtil.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
public SerializationConfig addDataSerializableFactory(int factoryId, DataSerializableFactory dataSerializableFactory) {
getDataSerializableFactories().put(factoryId, dataSerializableFactory);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addDataSerializableFactory
File: hazelcast/src/main/java/com/hazelcast/config/SerializationConfig.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
addDataSerializableFactory
|
hazelcast/src/main/java/com/hazelcast/config/SerializationConfig.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
public String executeAndGetBodyAsString(EntityReference reference, Map<String, ?> queryParameters) throws Exception
{
String url = getURL(reference, "get", toQueryString(queryParameters));
GetMethod getMethod = executeGet(url);
String result = getMethod.getResponseBodyAsString();
getMethod.releaseConnection();
return result;
}
|
Vulnerability Classification:
- CWE: CWE-863
- CVE: CVE-2023-35166
- Severity: HIGH
- CVSS Score: 8.8
Description: XWIKI-20281: Improve tips rendering
Function: executeAndGetBodyAsString
File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
Repository: xwiki/xwiki-platform
Fixed Code:
public String executeAndGetBodyAsString(EntityReference reference, Map<String, ?> queryParameters) throws Exception
{
gotoPage(getURL(reference, "get", toQueryString(queryParameters)));
return getDriver().getPageSource();
}
|
[
"CWE-863"
] |
CVE-2023-35166
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
executeAndGetBodyAsString
|
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
|
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public Group findByIdOrLegacyId(Context context, String id) throws SQLException {
if (org.apache.commons.lang3.StringUtils.isNumeric(id)) {
return findByLegacyId(context, Integer.parseInt(id));
} else {
return find(context, UUIDUtils.fromString(id));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findByIdOrLegacyId
File: dspace-api/src/main/java/org/dspace/eperson/GroupServiceImpl.java
Repository: DSpace
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-41189
|
HIGH
| 9
|
DSpace
|
findByIdOrLegacyId
|
dspace-api/src/main/java/org/dspace/eperson/GroupServiceImpl.java
|
277b499a5cd3a4f5eb2370513a1b7e4ec2a6e041
| 0
|
Analyze the following code function for security vulnerabilities
|
public Object getItemId() {
return rowReference.getItemId();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getItemId
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
|
getItemId
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean checkTargetSourceIntent(TargetInfo target, Intent matchingIntent) {
final List<Intent> targetIntents = target.getAllSourceIntents();
for (int i = 0, N = targetIntents.size(); i < N; i++) {
final Intent targetIntent = targetIntents.get(i);
if (targetIntent.filterEquals(matchingIntent)) {
return true;
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkTargetSourceIntent
File: core/java/com/android/internal/app/ChooserActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-254",
"CWE-19"
] |
CVE-2016-3752
|
HIGH
| 7.5
|
android
|
checkTargetSourceIntent
|
core/java/com/android/internal/app/ChooserActivity.java
|
ddbf2db5b946be8fdc45c7b0327bf560b2a06988
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean hasQueryParameter(RoutingContext ctx, String parameterName) {
List<String> all = ctx.queryParam(parameterName);
return all != null && !all.isEmpty();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasQueryParameter
File: extensions/smallrye-graphql/runtime/src/main/java/io/quarkus/smallrye/graphql/runtime/SmallRyeGraphQLExecutionHandler.java
Repository: quarkusio/quarkus
The code follows secure coding practices.
|
[
"CWE-444"
] |
CVE-2022-2466
|
CRITICAL
| 9.8
|
quarkusio/quarkus
|
hasQueryParameter
|
extensions/smallrye-graphql/runtime/src/main/java/io/quarkus/smallrye/graphql/runtime/SmallRyeGraphQLExecutionHandler.java
|
08e5c3106ce4bfb18b24a38514eeba6464668b07
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getRelativeAssetsRootPath() {
String path = "";
path = Config.getStringProperty("ASSET_PATH", "/assets");
return path;
}
|
Vulnerability Classification:
- CWE: CWE-434
- CVE: CVE-2017-11466
- Severity: HIGH
- CVSS Score: 9.0
Description: #12131 fixes jenkins feedback
Function: getRelativeAssetsRootPath
File: dotCMS/src/main/java/com/dotmarketing/portlets/fileassets/business/FileAssetAPIImpl.java
Repository: dotCMS/core
Fixed Code:
public String getRelativeAssetsRootPath() {
String path = "";
path = Config.getStringProperty("ASSET_PATH", DEFAULT_RELATIVE_ASSET_PATH);
return path;
}
|
[
"CWE-434"
] |
CVE-2017-11466
|
HIGH
| 9
|
dotCMS/core
|
getRelativeAssetsRootPath
|
dotCMS/src/main/java/com/dotmarketing/portlets/fileassets/business/FileAssetAPIImpl.java
|
150d85278c9b7738c79a25616c0d2ff690855c51
| 1
|
Analyze the following code function for security vulnerabilities
|
private PackageFreezer freezePackageForInstall(String packageName, int userId, int installFlags,
String killReason) {
if ((installFlags & PackageManager.INSTALL_DONT_KILL_APP) != 0) {
return new PackageFreezer(mPm);
} else {
return mPm.freezePackage(packageName, userId, killReason);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: freezePackageForInstall
File: services/core/java/com/android/server/pm/InstallPackageHelper.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21257
|
HIGH
| 7.8
|
android
|
freezePackageForInstall
|
services/core/java/com/android/server/pm/InstallPackageHelper.java
|
1aec7feaf07e6d4568ca75d18158445dbeac10f6
| 0
|
Analyze the following code function for security vulnerabilities
|
static PhoneAccountHandle createAccountHandle(Context context, String sipProfileName) {
return new PhoneAccountHandle(
new ComponentName(context, SipConnectionService.class), sipProfileName);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createAccountHandle
File: sip/src/com/android/services/telephony/sip/SipUtil.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-0847
|
HIGH
| 7.2
|
android
|
createAccountHandle
|
sip/src/com/android/services/telephony/sip/SipUtil.java
|
a294ae5342410431a568126183efe86261668b5d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean shouldUpRecreateTask(IBinder token, String destAffinity) {
synchronized (this) {
ActivityRecord srec = ActivityRecord.forTokenLocked(token);
if (srec != null) {
return srec.getStack().shouldUpRecreateTaskLocked(srec, destAffinity);
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: shouldUpRecreateTask
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
|
shouldUpRecreateTask
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
private void initializeRecipientEditTextView(RecipientEditTextView view) {
view.setTokenizer(new Rfc822Tokenizer());
view.setThreshold(COMPLETION_THRESHOLD);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initializeRecipientEditTextView
File: src/com/android/mail/compose/ComposeActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2425
|
MEDIUM
| 4.3
|
android
|
initializeRecipientEditTextView
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequestMapping(value = { "/delete" })
public String actionDelete(HttpServletRequest theServletRequest, HomeRequest theRequest, BindingResult theBindingResult, ModelMap theModel) {
addCommonParams(theServletRequest, theRequest, theModel);
CaptureInterceptor interceptor = new CaptureInterceptor();
GenericClient client = theRequest.newClient(theServletRequest, getContext(theRequest), myConfig, interceptor);
RuntimeResourceDefinition def;
try {
def = getResourceType(theRequest, theServletRequest);
} catch (ServletException e) {
populateModelForResource(theServletRequest, theRequest, theModel);
theModel.put("errorMsg", toDisplayError(e.toString(), e));
return "resource";
}
String id = StringUtils.defaultString(theServletRequest.getParameter("resource-delete-id"));
if (StringUtils.isBlank(id)) {
populateModelForResource(theServletRequest, theRequest, theModel);
theModel.put("errorMsg", toDisplayError("No ID specified", null));
return "resource";
}
ResultType returnsResource = ResultType.RESOURCE;
String outcomeDescription = "Delete Resource";
long start = System.currentTimeMillis();
try {
IdDt resourceId = new IdDt(id);
if (!resourceId.hasResourceType()) {
resourceId = resourceId.withResourceType(def.getName());
}
client.delete().resourceById(resourceId).execute();
} catch (Exception e) {
returnsResource = handleClientException(client, e, theModel);
}
long delay = System.currentTimeMillis() - start;
processAndAddLastClientInvocation(client, returnsResource, theModel, delay, outcomeDescription, interceptor, theRequest);
ourLog.info(logPrefix(theModel) + "Deleted resource of type " + def.getName());
return "result";
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2020-24301
- Severity: MEDIUM
- CVSS Score: 4.3
Description: Resolve XSS vulnerability
Function: actionDelete
File: hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/Controller.java
Repository: hapifhir/hapi-fhir
Fixed Code:
@RequestMapping(value = { "/delete" })
public String actionDelete(HttpServletRequest theServletRequest, HomeRequest theRequest, BindingResult theBindingResult, ModelMap theModel) {
addCommonParams(theServletRequest, theRequest, theModel);
CaptureInterceptor interceptor = new CaptureInterceptor();
GenericClient client = theRequest.newClient(theServletRequest, getContext(theRequest), myConfig, interceptor);
RuntimeResourceDefinition def;
try {
def = getResourceType(theRequest, theServletRequest);
} catch (ServletException e) {
populateModelForResource(theServletRequest, theRequest, theModel);
theModel.put("errorMsg", toDisplayError(e.toString(), e));
return "resource";
}
String id = sanitizeUrlPart(defaultString(theServletRequest.getParameter("resource-delete-id")));
if (StringUtils.isBlank(id)) {
populateModelForResource(theServletRequest, theRequest, theModel);
theModel.put("errorMsg", toDisplayError("No ID specified", null));
return "resource";
}
ResultType returnsResource = ResultType.RESOURCE;
String outcomeDescription = "Delete Resource";
long start = System.currentTimeMillis();
try {
IdDt resourceId = new IdDt(id);
if (!resourceId.hasResourceType()) {
resourceId = resourceId.withResourceType(def.getName());
}
client.delete().resourceById(resourceId).execute();
} catch (Exception e) {
returnsResource = handleClientException(client, e, theModel);
}
long delay = System.currentTimeMillis() - start;
processAndAddLastClientInvocation(client, returnsResource, theModel, delay, outcomeDescription, interceptor, theRequest);
ourLog.info(logPrefix(theModel) + "Deleted resource of type " + def.getName());
return "result";
}
|
[
"CWE-79"
] |
CVE-2020-24301
|
MEDIUM
| 4.3
|
hapifhir/hapi-fhir
|
actionDelete
|
hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/Controller.java
|
adb3734fcbbf9a9165445e9ee5eef168dbcaedaf
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
@Transactional( readOnly = true )
public List<Program> getProgramsByDataEntryForm( DataEntryForm dataEntryForm )
{
return programStore.getByDataEntryForm( dataEntryForm );
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProgramsByDataEntryForm
File: dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/DefaultProgramService.java
Repository: dhis2/dhis2-core
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-24848
|
MEDIUM
| 6.5
|
dhis2/dhis2-core
|
getProgramsByDataEntryForm
|
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/DefaultProgramService.java
|
ef04483a9b177d62e48dcf4e498b302a11f95e7d
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void handleSplitBrainProtectionFunction(XmlGenerator gen,
SplitBrainProtectionConfig splitBrainProtectionConfig) {
if (splitBrainProtectionConfig.
getFunctionImplementation() instanceof ProbabilisticSplitBrainProtectionFunction) {
ProbabilisticSplitBrainProtectionFunction qf =
(ProbabilisticSplitBrainProtectionFunction)
splitBrainProtectionConfig.getFunctionImplementation();
long acceptableHeartbeatPause = qf.getAcceptableHeartbeatPauseMillis();
double threshold = qf.getSuspicionThreshold();
int maxSampleSize = qf.getMaxSampleSize();
long minStdDeviation = qf.getMinStdDeviationMillis();
long firstHeartbeatEstimate = qf.getHeartbeatIntervalMillis();
gen.open("probabilistic-split-brain-protection", "acceptable-heartbeat-pause-millis", acceptableHeartbeatPause,
"suspicion-threshold", threshold,
"max-sample-size", maxSampleSize,
"min-std-deviation-millis", minStdDeviation,
"heartbeat-interval-millis", firstHeartbeatEstimate);
gen.close();
} else if (splitBrainProtectionConfig.
getFunctionImplementation() instanceof RecentlyActiveSplitBrainProtectionFunction) {
RecentlyActiveSplitBrainProtectionFunction qf =
(RecentlyActiveSplitBrainProtectionFunction)
splitBrainProtectionConfig.getFunctionImplementation();
gen.open("recently-active-split-brain-protection", "heartbeat-tolerance-millis",
qf.getHeartbeatToleranceMillis());
gen.close();
} else {
gen.node("function-class-name",
classNameOrImplClass(splitBrainProtectionConfig.getFunctionClassName(),
splitBrainProtectionConfig.getFunctionImplementation()));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleSplitBrainProtectionFunction
File: hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-522"
] |
CVE-2023-33264
|
MEDIUM
| 4.3
|
hazelcast
|
handleSplitBrainProtectionFunction
|
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
|
80a502d53cc48bf895711ab55f95e3a51e344ac1
| 0
|
Analyze the following code function for security vulnerabilities
|
public InputStream openFile() {
if (isFileOk())
try {
return new BufferedInputStream(new FileInputStream(internal));
} catch (FileNotFoundException e) {
Logme.error(e);
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: openFile
File: src/net/sourceforge/plantuml/security/SFile.java
Repository: plantuml
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2023-3431
|
MEDIUM
| 5.3
|
plantuml
|
openFile
|
src/net/sourceforge/plantuml/security/SFile.java
|
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Uri getAdnUriForPhoneAccount(PhoneAccountHandle accountHandle,
String callingPackage) {
synchronized (mLock) {
enforcePermissionOrPrivilegedDialer(MODIFY_PHONE_STATE, callingPackage);
if (!isVisibleToCaller(accountHandle)) {
Log.d(this, "%s is not visible for the calling user [gA4PA]", accountHandle);
return null;
}
// Switch identity so that TelephonyManager checks Telecom's permissions instead.
long token = Binder.clearCallingIdentity();
String retval = "content://icc/adn/";
try {
long subId = mPhoneAccountRegistrar
.getSubscriptionIdForPhoneAccount(accountHandle);
retval = retval + "subId/" + subId;
} finally {
Binder.restoreCallingIdentity(token);
}
return Uri.parse(retval);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAdnUriForPhoneAccount
File: src/com/android/server/telecom/TelecomServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-0847
|
HIGH
| 7.2
|
android
|
getAdnUriForPhoneAccount
|
src/com/android/server/telecom/TelecomServiceImpl.java
|
2750faaa1ec819eed9acffea7bd3daf867fda444
| 0
|
Analyze the following code function for security vulnerabilities
|
public static HttpRequest delete(final String destination) {
return new HttpRequest()
.method(HttpMethod.DELETE)
.set(destination);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: delete
File: src/main/java/jodd/http/HttpRequest.java
Repository: oblac/jodd-http
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2022-29631
|
MEDIUM
| 5
|
oblac/jodd-http
|
delete
|
src/main/java/jodd/http/HttpRequest.java
|
e50f573c8f6a39212ade68c6eb1256b2889fa8a6
| 0
|
Analyze the following code function for security vulnerabilities
|
@SneakyThrows
private void addPermissionSpecification(String tenantName) {
String permissionsYml = mapper.writeValueAsString(new HashMap<>());
tenantConfigRepository.updateConfigFullPath(tenantName, API + permissionProperties.getPermissionsSpecPath(),
permissionsYml);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addPermissionSpecification
File: src/main/java/com/icthh/xm/uaa/service/tenant/TenantService.java
Repository: xm-online/xm-uaa
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15557
|
HIGH
| 7.5
|
xm-online/xm-uaa
|
addPermissionSpecification
|
src/main/java/com/icthh/xm/uaa/service/tenant/TenantService.java
|
bd235434f119c67090952e08fc28abe41aea2e2c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable CharSequence[] getResourceTextArray(@ArrayRes int resId) {
synchronized (this) {
ensureValidLocked();
final int[] rawInfoArray = nativeGetResourceStringArrayInfo(mObject, resId);
if (rawInfoArray == null) {
return null;
}
final int rawInfoArrayLen = rawInfoArray.length;
final int infoArrayLen = rawInfoArrayLen / 2;
final CharSequence[] retArray = new CharSequence[infoArrayLen];
for (int i = 0, j = 0; i < rawInfoArrayLen; i = i + 2, j++) {
int cookie = rawInfoArray[i];
int index = rawInfoArray[i + 1];
retArray[j] = (index >= 0 && cookie > 0)
? getPooledStringForCookie(cookie, index) : null;
}
return retArray;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getResourceTextArray
File: core/java/android/content/res/AssetManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-415"
] |
CVE-2023-40103
|
HIGH
| 7.8
|
android
|
getResourceTextArray
|
core/java/android/content/res/AssetManager.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
final void set(Iterable<? extends Entry<? extends CharSequence, String>> headers) {
requireNonNull(headers, "headers");
if (headers == this) {
return;
}
for (Entry<? extends CharSequence, String> e : headers) {
remove(e.getKey());
}
if (!addFast(headers)) {
addSlow(headers);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: set
File: core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2019-16771
|
MEDIUM
| 5
|
line/armeria
|
set
|
core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
|
b597f7a865a527a84ee3d6937075cfbb4470ed20
| 0
|
Analyze the following code function for security vulnerabilities
|
private File getSettingsFile(int key) {
if (isGlobalSettingsKey(key)) {
final int userId = getUserIdFromKey(key);
return new File(Environment.getUserSystemDirectory(userId),
SETTINGS_FILE_GLOBAL);
} else if (isSystemSettingsKey(key)) {
final int userId = getUserIdFromKey(key);
return new File(Environment.getUserSystemDirectory(userId),
SETTINGS_FILE_SYSTEM);
} else if (isSecureSettingsKey(key)) {
final int userId = getUserIdFromKey(key);
return new File(Environment.getUserSystemDirectory(userId),
SETTINGS_FILE_SECURE);
} else {
throw new IllegalArgumentException("Invalid settings key:" + key);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSettingsFile
File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3876
|
HIGH
| 7.2
|
android
|
getSettingsFile
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
91fc934bb2e5ea59929bb2f574de6db9b5100745
| 0
|
Analyze the following code function for security vulnerabilities
|
private void updateTilesList() {
// Generally the items that are will be changing from these updates will
// not be in the top list of tiles, so run it in the background and the
// SettingsDrawerActivity will pick up on the updates automatically.
AsyncTask.execute(new Runnable() {
@Override
public void run() {
doUpdateTilesList();
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateTilesList
File: src/com/android/settings/SettingsActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2018-9501
|
HIGH
| 7.2
|
android
|
updateTilesList
|
src/com/android/settings/SettingsActivity.java
|
5e43341b8c7eddce88f79c9a5068362927c05b54
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void finalize() throws Throwable {
close();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: finalize
File: core/java/android/content/res/AssetManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-415"
] |
CVE-2023-40103
|
HIGH
| 7.8
|
android
|
finalize
|
core/java/android/content/res/AssetManager.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean execute(AbstractBuild build, BuildListener listener) {
PrintStream logger = listener.getLogger();
// Check all downstream Project of the project, not just those defined by BuildTrigger
final DependencyGraph graph = Jenkins.getInstance().getDependencyGraph();
List<Dependency> downstreamProjects = new ArrayList<Dependency>(
graph.getDownstreamDependencies(build.getProject()));
// Sort topologically
Collections.sort(downstreamProjects, new Comparator<Dependency>() {
public int compare(Dependency lhs, Dependency rhs) {
// Swapping lhs/rhs to get reverse sort:
return graph.compare(rhs.getDownstreamProject(), lhs.getDownstreamProject());
}
});
for (Dependency dep : downstreamProjects) {
AbstractProject p = dep.getDownstreamProject();
if (p.isDisabled()) {
logger.println(Messages.BuildTrigger_Disabled(ModelHyperlinkNote.encodeTo(p)));
continue;
}
List<Action> buildActions = new ArrayList<Action>();
if (dep.shouldTriggerBuild(build, listener, buildActions)) {
// this is not completely accurate, as a new build might be triggered
// between these calls
String name = ModelHyperlinkNote.encodeTo(p)+" #"+p.getNextBuildNumber();
if(p.scheduleBuild(p.getQuietPeriod(), new UpstreamCause((Run)build),
buildActions.toArray(new Action[buildActions.size()]))) {
logger.println(Messages.BuildTrigger_Triggering(name));
} else {
logger.println(Messages.BuildTrigger_InQueue(name));
}
}
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: execute
File: core/src/main/java/hudson/tasks/BuildTrigger.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
execute
|
core/src/main/java/hudson/tasks/BuildTrigger.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean isWipeOutPermissionEnabled() {
return Boolean.getBoolean("hudson.security.WipeOutPermission");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isWipeOutPermissionEnabled
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
|
isWipeOutPermissionEnabled
|
core/src/main/java/hudson/Functions.java
|
bf539198564a1108b7b71a973bf7de963a6213ef
| 0
|
Analyze the following code function for security vulnerabilities
|
protected Object getSyncJsonParamValue(Object value) {
Map valObj = ((Map) value);
String accountId = Optional.ofNullable(valObj.get("accountId")).orElse("").toString();
Map child = (Map) valObj.get("child");
if (child != null) {// 级联框
List<Object> values = new ArrayList<>();
String id = Optional.ofNullable(valObj.get("id")).orElse("").toString();
if (StringUtils.isNotBlank(id)) {
values.add(valObj.get("id"));
}
if (StringUtils.isNotBlank(id)) {
values.add(child.get("id"));
}
return values;
} else if (StringUtils.isNotBlank(accountId) && isThirdPartTemplate) {
// 用户选择框
return accountId;
} else {
String id = Optional.ofNullable(valObj.get("id")).orElse("").toString();
if (StringUtils.isNotBlank(id)) {
return valObj.get("id");
} else {
return valObj.get("key");
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSyncJsonParamValue
File: test-track/backend/src/main/java/io/metersphere/service/issue/platform/AbstractIssuePlatform.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2022-23544
|
MEDIUM
| 6.1
|
metersphere
|
getSyncJsonParamValue
|
test-track/backend/src/main/java/io/metersphere/service/issue/platform/AbstractIssuePlatform.java
|
d0f95b50737c941b29d507a4cc3545f2dc6ab121
| 0
|
Analyze the following code function for security vulnerabilities
|
private void writeLog(int category) {
mMetricsLogger.write(newLogMaker(category, mType));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeLog
File: services/autofill/java/com/android/server/autofill/ui/SaveUi.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-610"
] |
CVE-2023-40133
|
MEDIUM
| 5.5
|
android
|
writeLog
|
services/autofill/java/com/android/server/autofill/ui/SaveUi.java
|
08becc8c600f14c5529115cc1a1e0c97cd503f33
| 0
|
Analyze the following code function for security vulnerabilities
|
public CopyBuildTask inFolder(Getter<File> in) {
inputType = FOLDER;
inputFile = in;
orGetterChangeNoticer(in);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: inFolder
File: APDE/src/main/java/com/calsignlabs/apde/build/dag/CopyBuildTask.java
Repository: Calsign/APDE
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-36628
|
CRITICAL
| 9.8
|
Calsign/APDE
|
inFolder
|
APDE/src/main/java/com/calsignlabs/apde/build/dag/CopyBuildTask.java
|
c6d64cbe465348c1bfd211122d89e3117afadecf
| 0
|
Analyze the following code function for security vulnerabilities
|
private List<ScanResult.InformationElement> findMatchingInfoElements(@Nullable String bssid) {
if (bssid == null) return null;
ScanResult matchingScanResult = mScanRequestProxy.getScanResult(bssid);
if (matchingScanResult == null || matchingScanResult.informationElements == null) {
return null;
}
return Arrays.asList(matchingScanResult.informationElements);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findMatchingInfoElements
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
|
findMatchingInfoElements
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
private static Obs returnObsCopy(Obs obsToCopy, Map<Obs, Obs> replacements) throws Exception {
Obs newObs = (Obs) returnCopy(obsToCopy);
if (obsToCopy.isObsGrouping()) {
newObs.setGroupMembers(null);
for (Obs oinner : obsToCopy.getGroupMembers()) {
Obs oinnerNew = returnObsCopy(oinner, replacements);
newObs.addGroupMember(oinnerNew);
}
}
replacements.put(newObs, obsToCopy);
return newObs;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: returnObsCopy
File: api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java
Repository: openmrs/openmrs-module-htmlformentry
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-16521
|
HIGH
| 7.5
|
openmrs/openmrs-module-htmlformentry
|
returnObsCopy
|
api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java
|
9dcd304688e65c31cac5532fe501b9816ed975ae
| 0
|
Analyze the following code function for security vulnerabilities
|
@LargeTest
@Test
public void testAudioManagerOperations() throws Exception {
AudioManager audioManager = (AudioManager) mComponentContextFixture.getTestDouble()
.getApplicationContext().getSystemService(Context.AUDIO_SERVICE);
IdPair outgoing = startAndMakeActiveOutgoingCall("650-555-1212",
mPhoneAccountA0.getAccountHandle(), mConnectionServiceFixtureA);
verify(audioManager, timeout(TEST_TIMEOUT)).requestAudioFocusForCall(anyInt(), anyInt());
verify(audioManager, timeout(TEST_TIMEOUT).atLeastOnce())
.setMode(AudioManager.MODE_IN_CALL);
mInCallServiceFixtureX.mInCallAdapter.mute(true);
verify(mAudioService, timeout(TEST_TIMEOUT))
.setMicrophoneMute(eq(true), any(String.class), any(Integer.class),
nullable(String.class));
mInCallServiceFixtureX.mInCallAdapter.mute(false);
verify(mAudioService, timeout(TEST_TIMEOUT))
.setMicrophoneMute(eq(false), any(String.class), any(Integer.class),
nullable(String.class));
mInCallServiceFixtureX.mInCallAdapter.setAudioRoute(CallAudioState.ROUTE_SPEAKER, null);
waitForHandlerAction(mTelecomSystem.getCallsManager().getCallAudioManager()
.getCallAudioRouteStateMachine().getHandler(), TEST_TIMEOUT);
ArgumentCaptor<AudioDeviceInfo> infoArgumentCaptor =
ArgumentCaptor.forClass(AudioDeviceInfo.class);
verify(audioManager, timeout(TEST_TIMEOUT)).setCommunicationDevice(
infoArgumentCaptor.capture());
assertEquals(AudioDeviceInfo.TYPE_BUILTIN_SPEAKER, infoArgumentCaptor.getValue().getType());
mInCallServiceFixtureX.mInCallAdapter.setAudioRoute(CallAudioState.ROUTE_EARPIECE, null);
waitForHandlerAction(mTelecomSystem.getCallsManager().getCallAudioManager()
.getCallAudioRouteStateMachine().getHandler(), TEST_TIMEOUT);
// setSpeakerPhoneOn(false) gets called once during the call initiation phase
verify(audioManager, timeout(TEST_TIMEOUT).atLeast(1))
.clearCommunicationDevice();
mConnectionServiceFixtureA.
sendSetDisconnected(outgoing.mConnectionId, DisconnectCause.REMOTE);
waitForHandlerAction(mTelecomSystem.getCallsManager().getCallAudioManager()
.getCallAudioModeStateMachine().getHandler(), TEST_TIMEOUT);
waitForHandlerAction(mTelecomSystem.getCallsManager().getCallAudioManager()
.getCallAudioRouteStateMachine().getHandler(), TEST_TIMEOUT);
verify(audioManager, timeout(TEST_TIMEOUT))
.abandonAudioFocusForCall();
verify(audioManager, timeout(TEST_TIMEOUT).atLeastOnce())
.setMode(AudioManager.MODE_NORMAL);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: testAudioManagerOperations
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
|
testAudioManagerOperations
|
tests/src/com/android/server/telecom/tests/BasicCallTests.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getUrlName() {
return "securityRealm/";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUrlName
File: core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2014-2064
|
MEDIUM
| 5
|
jenkinsci/jenkins
|
getUrlName
|
core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java
|
fbf96734470caba9364f04e0b77b0bae7293a1ec
| 0
|
Analyze the following code function for security vulnerabilities
|
public BigInteger optBigInteger(String key, BigInteger defaultValue) {
Object val = this.opt(key);
return objectToBigInteger(val, defaultValue);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: optBigInteger
File: src/main/java/org/json/JSONObject.java
Repository: stleary/JSON-java
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2023-5072
|
HIGH
| 7.5
|
stleary/JSON-java
|
optBigInteger
|
src/main/java/org/json/JSONObject.java
|
661114c50dcfd53bb041aab66f14bb91e0a87c8a
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getRequestedOrientation(IBinder token) throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRequestedOrientation
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
getRequestedOrientation
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onStrongAuthRequiredChanged(@StrongAuthFlags int strongAuthFlags,
int userId) {
mHandler.obtainMessage(H.MSG_ON_STRONG_AUTH_REQUIRED_CHANGED,
strongAuthFlags, userId).sendToTarget();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onStrongAuthRequiredChanged
File: core/java/com/android/internal/widget/LockPatternUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3908
|
MEDIUM
| 4.3
|
android
|
onStrongAuthRequiredChanged
|
core/java/com/android/internal/widget/LockPatternUtils.java
|
96daf7d4893f614714761af2d53dfb93214a32e4
| 0
|
Analyze the following code function for security vulnerabilities
|
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException,
ServletException {
if (request instanceof HttpServletRequest && response instanceof HttpServletResponse) {
HttpServletRequest httpReq = (HttpServletRequest) request;
HttpServletResponse httpResp = (HttpServletResponse) response;
if ("GET".equals(httpReq.getMethod())) {
Meteor meteor = Meteor.build(httpReq, SCOPE.REQUEST, Collections.<BroadcastFilter>emptyList(), null);
String pushSessionId = httpReq.getParameter(PUSH_SESSION_ID_PARAM);
Session session = null;
if (pushSessionId != null) {
ensureServletContextAvailable(request);
PushContext pushContext = (PushContext) servletContext.getAttribute(PushContext.INSTANCE_KEY_NAME);
session = pushContext.getSessionManager().getPushSession(pushSessionId);
}
if (session == null) {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug(MessageFormat.format("Session {0} was not found", pushSessionId));
}
httpResp.sendError(HttpServletResponse.SC_BAD_REQUEST);
return;
}
httpResp.setContentType("text/plain");
try {
Request pushRequest = new RequestImpl(meteor, session);
httpReq.setAttribute(SESSION_ATTRIBUTE_NAME, session);
httpReq.setAttribute(REQUEST_ATTRIBUTE_NAME, pushRequest);
pushRequest.suspend();
} catch (Exception e) {
LOGGER.error(e.getMessage(), e);
}
return;
}
}
}
|
Vulnerability Classification:
- CWE: CWE-20
- CVE: CVE-2014-0086
- Severity: MEDIUM
- CVSS Score: 4.3
Description: RF-13250: applying patch
Function: doFilter
File: impl/src/main/java/org/richfaces/webapp/PushHandlerFilter.java
Repository: pslegr/core-1
Fixed Code:
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException,
ServletException {
if (request instanceof HttpServletRequest && response instanceof HttpServletResponse) {
HttpServletRequest httpReq = (HttpServletRequest) request;
HttpServletResponse httpResp = (HttpServletResponse) response;
if ("GET".equals(httpReq.getMethod())) {
String pushSessionId = httpReq.getParameter(PUSH_SESSION_ID_PARAM);
Session session = null;
if (pushSessionId != null) {
ensureServletContextAvailable(request);
PushContext pushContext = (PushContext) servletContext.getAttribute(PushContext.INSTANCE_KEY_NAME);
session = pushContext.getSessionManager().getPushSession(pushSessionId);
}
if (session == null) {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug(MessageFormat.format("Session {0} was not found", pushSessionId));
}
httpResp.sendError(HttpServletResponse.SC_BAD_REQUEST);
return;
}
httpResp.setContentType("text/plain");
Meteor meteor = Meteor.build(httpReq, SCOPE.REQUEST, Collections.<BroadcastFilter>emptyList(), null);
try {
Request pushRequest = new RequestImpl(meteor, session);
httpReq.setAttribute(SESSION_ATTRIBUTE_NAME, session);
httpReq.setAttribute(REQUEST_ATTRIBUTE_NAME, pushRequest);
pushRequest.suspend();
} catch (Exception e) {
LOGGER.error(e.getMessage(), e);
}
return;
}
}
}
|
[
"CWE-20"
] |
CVE-2014-0086
|
MEDIUM
| 4.3
|
pslegr/core-1
|
doFilter
|
impl/src/main/java/org/richfaces/webapp/PushHandlerFilter.java
|
8131f15003f5bec73d475d2b724472e4b87d0757
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isEnabled() {
return Jenkins.getInstance().getSecurityRealm() instanceof HudsonPrivateSecurityRealm;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isEnabled
File: core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2014-2064
|
MEDIUM
| 5
|
jenkinsci/jenkins
|
isEnabled
|
core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java
|
fbf96734470caba9364f04e0b77b0bae7293a1ec
| 0
|
Analyze the following code function for security vulnerabilities
|
public Object read(final Reader reader) throws SAXException,
IOException {
return read( new InputSource( reader ) );
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: read
File: drools-core/src/main/java/org/drools/core/xml/ExtensibleXmlParser.java
Repository: apache/incubator-kie-drools
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2014-8125
|
HIGH
| 7.5
|
apache/incubator-kie-drools
|
read
|
drools-core/src/main/java/org/drools/core/xml/ExtensibleXmlParser.java
|
c48464c3b246e6ef0d4cd0dbf67e83ccd532c6d3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Pure
public @Nullable SQLWarning getWarnings() throws SQLException {
checkClosed();
return warnings;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getWarnings
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
|
getWarnings
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int checkUidPermission(int uid, @NonNull String permissionName) {
return PermissionManagerService.this.checkUidPermission(uid, permissionName);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkUidPermission
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
|
checkUidPermission
|
services/core/java/com/android/server/pm/permission/PermissionManagerService.java
|
c00b7e7dbc1fa30339adef693d02a51254755d7f
| 0
|
Analyze the following code function for security vulnerabilities
|
private void cancelUploadsForAccount(Account account) {
mPendingUploads.remove(account.name);
mUploadsStorageManager.removeUploads(account.name);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cancelUploadsForAccount
File: src/main/java/com/owncloud/android/files/services/FileUploader.java
Repository: nextcloud/android
The code follows secure coding practices.
|
[
"CWE-732"
] |
CVE-2022-24886
|
LOW
| 2.1
|
nextcloud/android
|
cancelUploadsForAccount
|
src/main/java/com/owncloud/android/files/services/FileUploader.java
|
c01fa0b17050cdcf77a468cc22f4071eae29d464
| 0
|
Analyze the following code function for security vulnerabilities
|
public String clearName(String name, boolean stripDots, boolean ascii, XWikiContext context)
{
String temp = name;
temp = temp.replaceAll(
"[\u00c0\u00c1\u00c2\u00c3\u00c4\u00c5\u0100\u0102\u0104\u01cd\u01de\u01e0\u01fa\u0200\u0202\u0226]", "A");
temp = temp.replaceAll(
"[\u00e0\u00e1\u00e2\u00e3\u00e4\u00e5\u0101\u0103\u0105\u01ce\u01df\u01e1\u01fb\u0201\u0203\u0227]", "a");
temp = temp.replaceAll("[\u00c6\u01e2\u01fc]", "AE");
temp = temp.replaceAll("[\u00e6\u01e3\u01fd]", "ae");
temp = temp.replaceAll("[\u008c\u0152]", "OE");
temp = temp.replaceAll("[\u009c\u0153]", "oe");
temp = temp.replaceAll("[\u00c7\u0106\u0108\u010a\u010c]", "C");
temp = temp.replaceAll("[\u00e7\u0107\u0109\u010b\u010d]", "c");
temp = temp.replaceAll("[\u00d0\u010e\u0110]", "D");
temp = temp.replaceAll("[\u00f0\u010f\u0111]", "d");
temp = temp.replaceAll("[\u00c8\u00c9\u00ca\u00cb\u0112\u0114\u0116\u0118\u011a\u0204\u0206\u0228]", "E");
temp = temp.replaceAll("[\u00e8\u00e9\u00ea\u00eb\u0113\u0115\u0117\u0119\u011b\u01dd\u0205\u0207\u0229]", "e");
temp = temp.replaceAll("[\u011c\u011e\u0120\u0122\u01e4\u01e6\u01f4]", "G");
temp = temp.replaceAll("[\u011d\u011f\u0121\u0123\u01e5\u01e7\u01f5]", "g");
temp = temp.replaceAll("[\u0124\u0126\u021e]", "H");
temp = temp.replaceAll("[\u0125\u0127\u021f]", "h");
temp = temp.replaceAll("[\u00cc\u00cd\u00ce\u00cf\u0128\u012a\u012c\u012e\u0130\u01cf\u0208\u020a]", "I");
temp = temp.replaceAll("[\u00ec\u00ed\u00ee\u00ef\u0129\u012b\u012d\u012f\u0131\u01d0\u0209\u020b]", "i");
temp = temp.replaceAll("[\u0132]", "IJ");
temp = temp.replaceAll("[\u0133]", "ij");
temp = temp.replaceAll("[\u0134]", "J");
temp = temp.replaceAll("[\u0135]", "j");
temp = temp.replaceAll("[\u0136\u01e8]", "K");
temp = temp.replaceAll("[\u0137\u0138\u01e9]", "k");
temp = temp.replaceAll("[\u0139\u013b\u013d\u013f\u0141]", "L");
temp = temp.replaceAll("[\u013a\u013c\u013e\u0140\u0142\u0234]", "l");
temp = temp.replaceAll("[\u00d1\u0143\u0145\u0147\u014a\u01f8]", "N");
temp = temp.replaceAll("[\u00f1\u0144\u0146\u0148\u0149\u014b\u01f9\u0235]", "n");
temp = temp.replaceAll(
"[\u00d2\u00d3\u00d4\u00d5\u00d6\u00d8\u014c\u014e\u0150\u01d1\u01ea\u01ec\u01fe\u020c\u020e\u022a\u022c"
+ "\u022e\u0230]",
"O");
temp = temp.replaceAll(
"[\u00f2\u00f3\u00f4\u00f5\u00f6\u00f8\u014d\u014f\u0151\u01d2\u01eb\u01ed\u01ff\u020d\u020f\u022b\u022d"
+ "\u022f\u0231]",
"o");
temp = temp.replaceAll("[\u0156\u0158\u0210\u0212]", "R");
temp = temp.replaceAll("[\u0157\u0159\u0211\u0213]", "r");
temp = temp.replaceAll("[\u015a\u015c\u015e\u0160\u0218]", "S");
temp = temp.replaceAll("[\u015b\u015d\u015f\u0161\u0219]", "s");
temp = temp.replaceAll("[\u00de\u0162\u0164\u0166\u021a]", "T");
temp = temp.replaceAll("[\u00fe\u0163\u0165\u0167\u021b\u0236]", "t");
temp = temp.replaceAll(
"[\u00d9\u00da\u00db\u00dc\u0168\u016a\u016c\u016e\u0170\u0172\u01d3\u01d5\u01d7\u01d9\u01db\u0214\u0216]",
"U");
temp = temp.replaceAll(
"[\u00f9\u00fa\u00fb\u00fc\u0169\u016b\u016d\u016f\u0171\u0173\u01d4\u01d6\u01d8\u01da\u01dc\u0215\u0217]",
"u");
temp = temp.replaceAll("[\u0174]", "W");
temp = temp.replaceAll("[\u0175]", "w");
temp = temp.replaceAll("[\u00dd\u0176\u0178\u0232]", "Y");
temp = temp.replaceAll("[\u00fd\u00ff\u0177\u0233]", "y");
temp = temp.replaceAll("[\u0179\u017b\u017d]", "Z");
temp = temp.replaceAll("[\u017a\u017c\u017e]", "z");
temp = temp.replaceAll("[\u00df]", "SS");
temp = temp.replaceAll("[_':,;\\\\/]", " ");
name = temp;
name = name.replaceAll("\\s+", "");
name = name.replaceAll("[\\(\\)]", " ");
if (stripDots) {
name = name.replaceAll("[\\.]", "");
}
if (ascii) {
name = name.replaceAll("[^a-zA-Z0-9\\-_\\.]", "");
}
if (name.length() > 250) {
name = name.substring(0, 250);
}
return name;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearName
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
|
clearName
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setIntHeader(String name, int value)
{
this.response.setIntHeader(name, value);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setIntHeader
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiServletResponse.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-601"
] |
CVE-2022-23618
|
MEDIUM
| 5.8
|
xwiki/xwiki-platform
|
setIntHeader
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiServletResponse.java
|
5251c02080466bf9fb55288f04a37671108f8096
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void afterPropertiesSet() throws Exception {
BeanUtils.assertAutowiring(this);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: afterPropertiesSet
File: opennms-webapp/src/main/java/org/opennms/web/controller/admin/group/GroupController.java
Repository: OpenNMS/opennms
The code follows secure coding practices.
|
[
"CWE-352",
"CWE-79"
] |
CVE-2021-25929
|
LOW
| 3.5
|
OpenNMS/opennms
|
afterPropertiesSet
|
opennms-webapp/src/main/java/org/opennms/web/controller/admin/group/GroupController.java
|
eb08b5ed4c5548f3e941a1f0d0363ae4439fa98c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Beta
public static Predicate<File> isDirectory() {
return FilePredicate.IS_DIRECTORY;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isDirectory
File: android/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
|
isDirectory
|
android/guava/src/com/google/common/io/Files.java
|
fec0dbc4634006a6162cfd4d0d09c962073ddf40
| 0
|
Analyze the following code function for security vulnerabilities
|
public void receiveVerificationResponse(int verificationId) {
IntentFilterVerificationState ivs = mIntentFilterVerificationStates.get(verificationId);
final boolean verified = ivs.isVerified();
ArrayList<PackageParser.ActivityIntentInfo> filters = ivs.getFilters();
final int count = filters.size();
if (DEBUG_DOMAIN_VERIFICATION) {
Slog.i(TAG, "Received verification response " + verificationId
+ " for " + count + " filters, verified=" + verified);
}
for (int n=0; n<count; n++) {
PackageParser.ActivityIntentInfo filter = filters.get(n);
filter.setVerified(verified);
if (DEBUG_DOMAIN_VERIFICATION) Slog.d(TAG, "IntentFilter " + filter.toString()
+ " verified with result:" + verified + " and hosts:"
+ ivs.getHostsString());
}
mIntentFilterVerificationStates.remove(verificationId);
final String packageName = ivs.getPackageName();
IntentFilterVerificationInfo ivi = null;
synchronized (mPackages) {
ivi = mSettings.getIntentFilterVerificationLPr(packageName);
}
if (ivi == null) {
Slog.w(TAG, "IntentFilterVerificationInfo not found for verificationId:"
+ verificationId + " packageName:" + packageName);
return;
}
if (DEBUG_DOMAIN_VERIFICATION) Slog.d(TAG,
"Updating IntentFilterVerificationInfo for package " + packageName
+" verificationId:" + verificationId);
synchronized (mPackages) {
if (verified) {
ivi.setStatus(INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_ALWAYS);
} else {
ivi.setStatus(INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_ASK);
}
scheduleWriteSettingsLocked();
final int userId = ivs.getUserId();
if (userId != UserHandle.USER_ALL) {
final int userStatus =
mSettings.getIntentFilterVerificationStatusLPr(packageName, userId);
int updatedStatus = INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_UNDEFINED;
boolean needUpdate = false;
// We cannot override the STATUS_ALWAYS / STATUS_NEVER states if they have
// already been set by the User thru the Disambiguation dialog
switch (userStatus) {
case INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_UNDEFINED:
if (verified) {
updatedStatus = INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_ALWAYS;
} else {
updatedStatus = INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_ASK;
}
needUpdate = true;
break;
case INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_ASK:
if (verified) {
updatedStatus = INTENT_FILTER_DOMAIN_VERIFICATION_STATUS_ALWAYS;
needUpdate = true;
}
break;
default:
// Nothing to do
}
if (needUpdate) {
mSettings.updateIntentFilterVerificationStatusLPw(
packageName, updatedStatus, userId);
scheduleWritePackageRestrictionsLocked(userId);
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: receiveVerificationResponse
File: services/core/java/com/android/server/pm/PackageManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2016-2497
|
HIGH
| 7.5
|
android
|
receiveVerificationResponse
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
void setBeamShareActivityState(boolean enabled) {
UserManager um = (UserManager) mContext.getSystemService(Context.USER_SERVICE);
// Propagate the state change to all user profiles related to the current
// user. Note that the list returned by getUserProfiles contains the
// current user.
List <UserHandle> luh = um.getUserProfiles();
for (UserHandle uh : luh){
enforceBeamShareActivityPolicy(mContext, uh, enabled);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setBeamShareActivityState
File: src/com/android/nfc/NfcService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3761
|
LOW
| 2.1
|
android
|
setBeamShareActivityState
|
src/com/android/nfc/NfcService.java
|
9ea802b5456a36f1115549b645b65c791eff3c2c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getName() {
return "H2 Console Server";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getName
File: h2/src/main/org/h2/server/web/WebServer.java
Repository: h2database
The code follows secure coding practices.
|
[
"CWE-312"
] |
CVE-2022-45868
|
HIGH
| 7.8
|
h2database
|
getName
|
h2/src/main/org/h2/server/web/WebServer.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
@Override
public final int startActivityAsUser(IApplicationThread caller, String callingPackage,
Intent intent, String resolvedType, IBinder resultTo, String resultWho, int requestCode,
int startFlags, ProfilerInfo profilerInfo, Bundle bOptions, int userId) {
return startActivityAsUserWithFeature(caller, callingPackage, null, intent, resolvedType,
resultTo, resultWho, requestCode, startFlags, profilerInfo, bOptions, userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startActivityAsUser
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21292
|
MEDIUM
| 5.5
|
android
|
startActivityAsUser
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void initDebugger() {
if (reader == null || writer == null) {
throw new NullPointerException("Reader or writer isn't initialized.");
}
// If debugging is enabled, we open a window and write out all network traffic.
if (config.isDebuggerEnabled()) {
if (debugger == null) {
debugger = SmackConfiguration.createDebugger(this, writer, reader);
}
if (debugger == null) {
LOGGER.severe("Debugging enabled but could not find debugger class");
} else {
// Obtain new reader and writer from the existing debugger
reader = debugger.newConnectionReader(reader);
writer = debugger.newConnectionWriter(writer);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initDebugger
File: smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
Repository: igniterealtime/Smack
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2016-10027
|
MEDIUM
| 4.3
|
igniterealtime/Smack
|
initDebugger
|
smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
|
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public <T> void addToAttachmentList(AttachmentKey<AttachmentList<T>> key, T value) {
if (key == null) {
throw UndertowMessages.MESSAGES.argumentCannotBeNull("key");
}
final Map<AttachmentKey<?>, Object> attachments = this.attachments;
synchronized (attachments) {
final List<T> list = key.cast(attachments.get(key));
if (list == null) {
final AttachmentList<T> newList = new AttachmentList<>((Class<T>) Object.class);
attachments.put(key, newList);
newList.add(value);
} else {
list.add(value);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addToAttachmentList
File: core/src/main/java/io/undertow/protocols/http2/Http2Channel.java
Repository: undertow-io/undertow
The code follows secure coding practices.
|
[
"CWE-214"
] |
CVE-2021-3859
|
HIGH
| 7.5
|
undertow-io/undertow
|
addToAttachmentList
|
core/src/main/java/io/undertow/protocols/http2/Http2Channel.java
|
e43f0ada3f4da6e8579e0020cec3cb1a81e487c2
| 0
|
Analyze the following code function for security vulnerabilities
|
private void logNotificationVisibilityChanges(
Collection<NotificationVisibility> newlyVisible,
Collection<NotificationVisibility> noLongerVisible) {
if (newlyVisible.isEmpty() && noLongerVisible.isEmpty()) {
return;
}
NotificationVisibility[] newlyVisibleAr =
newlyVisible.toArray(new NotificationVisibility[newlyVisible.size()]);
NotificationVisibility[] noLongerVisibleAr =
noLongerVisible.toArray(new NotificationVisibility[noLongerVisible.size()]);
try {
mBarService.onNotificationVisibilityChanged(newlyVisibleAr, noLongerVisibleAr);
} catch (RemoteException e) {
// Ignore.
}
final int N = newlyVisible.size();
if (N > 0) {
String[] newlyVisibleKeyAr = new String[N];
for (int i = 0; i < N; i++) {
newlyVisibleKeyAr[i] = newlyVisibleAr[i].key;
}
setNotificationsShown(newlyVisibleKeyAr);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: logNotificationVisibilityChanges
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
|
logNotificationVisibilityChanges
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public MessagingStyle setConversationType(@ConversationType int conversationType) {
mConversationType = conversationType;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setConversationType
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
setConversationType
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
void addInstrumentationResultsLocked(ProcessRecord app, Bundle results) {
if (app.instr == null) {
Slog.w(TAG, "finishInstrumentation called on non-instrumented: " + app);
return;
}
if (!app.instr.mFinished && results != null) {
if (app.instr.mCurResults == null) {
app.instr.mCurResults = new Bundle(results);
} else {
app.instr.mCurResults.putAll(results);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addInstrumentationResultsLocked
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
|
addInstrumentationResultsLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public View getView(int position, View convertView, ViewGroup parent) {
if (convertView == null) {
convertView = getInflater().inflate(R.layout.compose_mode_display_item, null);
}
((TextView) convertView.findViewById(R.id.mode)).setText(getItem(position));
return super.getView(position, convertView, parent);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getView
File: src/com/android/mail/compose/ComposeActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2425
|
MEDIUM
| 4.3
|
android
|
getView
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
private final void addProcessNameLocked(ProcessRecord proc) {
// We shouldn't already have a process under this name, but just in case we
// need to clean up whatever may be there now.
ProcessRecord old = removeProcessNameLocked(proc.processName, proc.uid);
if (old == proc && proc.persistent) {
// We are re-adding a persistent process. Whatevs! Just leave it there.
Slog.w(TAG, "Re-adding persistent process " + proc);
} else if (old != null) {
Slog.wtf(TAG, "Already have existing proc " + old + " when adding " + proc);
}
UidRecord uidRec = mActiveUids.get(proc.uid);
if (uidRec == null) {
uidRec = new UidRecord(proc.uid);
// This is the first appearance of the uid, report it now!
if (DEBUG_UID_OBSERVERS) Slog.i(TAG_UID_OBSERVERS,
"Creating new process uid: " + uidRec);
mActiveUids.put(proc.uid, uidRec);
noteUidProcessState(uidRec.uid, uidRec.curProcState);
enqueueUidChangeLocked(uidRec, -1, UidRecord.CHANGE_ACTIVE);
}
proc.uidRecord = uidRec;
uidRec.numProcs++;
mProcessNames.put(proc.processName, proc.uid, proc);
if (proc.isolated) {
mIsolatedProcesses.put(proc.uid, proc);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addProcessNameLocked
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3912
|
HIGH
| 9.3
|
android
|
addProcessNameLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
private void receiveServerIdent() throws IOException {
final Buffer.PlainBuffer buf = new Buffer.PlainBuffer();
while ((serverID = readIdentification(buf)).isEmpty()) {
int b = connInfo.in.read();
if (b == -1) {
log.error("Received end of connection, but no identification received. ");
throw new TransportException("Server closed connection during identification exchange");
}
buf.putByte((byte) b);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: receiveServerIdent
File: src/main/java/net/schmizz/sshj/transport/TransportImpl.java
Repository: hierynomus/sshj
The code follows secure coding practices.
|
[
"CWE-354"
] |
CVE-2023-48795
|
MEDIUM
| 5.9
|
hierynomus/sshj
|
receiveServerIdent
|
src/main/java/net/schmizz/sshj/transport/TransportImpl.java
|
94fcc960e0fb198ddec0f7efc53f95ac627fe083
| 0
|
Analyze the following code function for security vulnerabilities
|
public void removeUserStateLocked(int userId, boolean permanently) {
// We always keep the global settings in memory.
// Nuke system settings.
final int systemKey = makeKey(SETTINGS_TYPE_SYSTEM, userId);
final SettingsState systemSettingsState = mSettingsStates.get(systemKey);
if (systemSettingsState != null) {
if (permanently) {
mSettingsStates.remove(systemKey);
systemSettingsState.destroyLocked(null);
} else {
systemSettingsState.destroyLocked(new Runnable() {
@Override
public void run() {
mSettingsStates.remove(systemKey);
}
});
}
}
// Nuke secure settings.
final int secureKey = makeKey(SETTINGS_TYPE_SECURE, userId);
final SettingsState secureSettingsState = mSettingsStates.get(secureKey);
if (secureSettingsState != null) {
if (permanently) {
mSettingsStates.remove(secureKey);
secureSettingsState.destroyLocked(null);
} else {
secureSettingsState.destroyLocked(new Runnable() {
@Override
public void run() {
mSettingsStates.remove(secureKey);
}
});
}
}
// Nuke generation tracking data
mGenerationRegistry.onUserRemoved(userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeUserStateLocked
File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3876
|
HIGH
| 7.2
|
android
|
removeUserStateLocked
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
91fc934bb2e5ea59929bb2f574de6db9b5100745
| 0
|
Analyze the following code function for security vulnerabilities
|
public Builder setClientId(String clientId) {
this.clientId = Preconditions.checkNotNull(clientId);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setClientId
File: google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/AuthorizationCodeFlow.java
Repository: googleapis/google-oauth-java-client
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2020-7692
|
MEDIUM
| 6.4
|
googleapis/google-oauth-java-client
|
setClientId
|
google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/AuthorizationCodeFlow.java
|
13433cd7dd06267fc261f0b1d4764f8e3432c824
| 0
|
Analyze the following code function for security vulnerabilities
|
byte[] getBuffer() {
return buf;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getBuffer
File: guava/src/com/google/common/io/FileBackedOutputStream.java
Repository: google/guava
The code follows secure coding practices.
|
[
"CWE-552"
] |
CVE-2023-2976
|
HIGH
| 7.1
|
google/guava
|
getBuffer
|
guava/src/com/google/common/io/FileBackedOutputStream.java
|
feb83a1c8fd2e7670b244d5afd23cba5aca43284
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void testDeserializationAsString03() throws Exception
{
Duration value = READER.readValue("\" \"");
assertNull("The value should be null.", value);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: testDeserializationAsString03
File: datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestDurationDeserialization.java
Repository: FasterXML/jackson-modules-java8
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-1000873
|
MEDIUM
| 4.3
|
FasterXML/jackson-modules-java8
|
testDeserializationAsString03
|
datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestDurationDeserialization.java
|
ba27ce5909dfb49bcaf753ad3e04ecb980010b0b
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.