instruction
string | input
string | output
string | cwe_ids
list | cve_id
string | severity
string | cvss_score
float64 | repo_name
string | func_name
string | file_path
string | commit_hash
string | is_vulnerable
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Analyze the following code function for security vulnerabilities
|
@Override
public void close() throws IOException {
zipEntryInputStream.close();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: close
File: src/main/java/net/lingala/zip4j/io/inputstream/CipherInputStream.java
Repository: srikanth-lingala/zip4j
The code follows secure coding practices.
|
[
"CWE-346"
] |
CVE-2023-22899
|
MEDIUM
| 5.9
|
srikanth-lingala/zip4j
|
close
|
src/main/java/net/lingala/zip4j/io/inputstream/CipherInputStream.java
|
ddd8fdc8ad0583eb4a6172dc86c72c881485c55b
| 0
|
Analyze the following code function for security vulnerabilities
|
public static int portOrDefault(int port, boolean ssl) {
if (port != USE_DEFAULT_PORT) return port;
else if (ssl) return DEFAULT_AMQP_OVER_SSL_PORT;
else return DEFAULT_AMQP_PORT;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: portOrDefault
File: src/main/java/com/rabbitmq/client/ConnectionFactory.java
Repository: rabbitmq/rabbitmq-java-client
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-46120
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-java-client
|
portOrDefault
|
src/main/java/com/rabbitmq/client/ConnectionFactory.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
public void reset() throws IndexUnreachableException {
synchronized (this) {
logger.trace("reset (thread {})", Thread.currentThread().getId());
String pi = viewManager != null ? viewManager.getPi() : null;
viewManager = null;
topDocumentIddoc = 0;
logid = "";
action = "";
prevHit = null;
nextHit = null;
group = false;
clearCacheMode = null;
prevDocstructUrlCache.clear();
nextDocstructUrlCache.clear();
lastReceivedIdentifier = null;
// Any cleanup modules need to do when a record is unloaded
for (IModule module : DataManager.getInstance().getModules()) {
module.augmentResetRecord();
}
// Remove record lock for this record and session
if (BeanUtils.getSession() != null) {
DataManager.getInstance()
.getRecordLockManager()
.removeLockForPiAndSessionId(pi, BeanUtils.getSession().getId());
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: reset
File: goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java
Repository: intranda/goobi-viewer-core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-29014
|
MEDIUM
| 6.1
|
intranda/goobi-viewer-core
|
reset
|
goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java
|
c29efe60e745a94d03debc17681c4950f3917455
| 0
|
Analyze the following code function for security vulnerabilities
|
ConnectivityManager getConnectivityManager() {
return mContext.getSystemService(ConnectivityManager.class);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getConnectivityManager
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2023-21284
|
MEDIUM
| 5.5
|
android
|
getConnectivityManager
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isReadable(Class<?> type, Type genericType,
Annotation[] annotations,
MediaType mediaType) {
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isReadable
File: submarine-server/server-core/src/main/java/org/apache/submarine/server/rest/provider/YamlEntityProvider.java
Repository: apache/submarine
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2023-46302
|
CRITICAL
| 9.8
|
apache/submarine
|
isReadable
|
submarine-server/server-core/src/main/java/org/apache/submarine/server/rest/provider/YamlEntityProvider.java
|
ed5ad3b824ba388259e0d1ea137d7fca5f0c288e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void cancel(OCUpload storedUpload) {
cancel(storedUpload.getAccountName(), storedUpload.getRemotePath(), null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cancel
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
|
cancel
|
src/main/java/com/owncloud/android/files/services/FileUploader.java
|
c01fa0b17050cdcf77a468cc22f4071eae29d464
| 0
|
Analyze the following code function for security vulnerabilities
|
public void addCookie(Cookie[] cs, boolean addToWebViewCookieManager, boolean sync) {
if(addToWebViewCookieManager) {
CookieManager mgr;
CookieSyncManager syncer;
try {
syncer = CookieSyncManager.getInstance();
mgr = getCookieManager();
} catch(IllegalStateException ex) {
syncer = CookieSyncManager.createInstance(this.getContext());
mgr = getCookieManager();
}
java.text.SimpleDateFormat format = new java.text.SimpleDateFormat("EEE, dd-MMM-yyyy HH:mm:ss z");
format.setTimeZone(TimeZone.getTimeZone("GMT"));
for (Cookie c : cs) {
addCookie(c, mgr, format);
}
if(sync) {
syncer.sync();
}
}
super.addCookie(cs);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addCookie
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
|
addCookie
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public T setDouble(K name, double value) {
return set(name, fromDouble(name, value));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDouble
File: codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-436",
"CWE-113"
] |
CVE-2022-41915
|
MEDIUM
| 6.5
|
netty
|
setDouble
|
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
|
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setRevokedOnFrom(String revokedOnFrom) {
this.revokedOnFrom = revokedOnFrom;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setRevokedOnFrom
File: base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
setRevokedOnFrom
|
base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
private void onRemoveUserClicked(int userId) {
synchronized (mUserLock) {
if (mRemovingUserId == -1 && !mAddingUser) {
mRemovingUserId = userId;
showDialog(DIALOG_CONFIRM_REMOVE);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onRemoveUserClicked
File: src/com/android/settings/users/UserSettings.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3889
|
HIGH
| 7.2
|
android
|
onRemoveUserClicked
|
src/com/android/settings/users/UserSettings.java
|
bd5d5176c74021e8cf4970f93f273ba3023c3d72
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setRoom(@Nullable String room) {
this.room = room;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setRoom
File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/LetsChatNotifier.java
Repository: codecentric/spring-boot-admin
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2022-46166
|
CRITICAL
| 9.8
|
codecentric/spring-boot-admin
|
setRoom
|
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/LetsChatNotifier.java
|
c14c3ec12533f71f84de9ce3ce5ceb7991975f75
| 0
|
Analyze the following code function for security vulnerabilities
|
public void checkConnection(UrlArgument repositoryURL) {
execute(createCommandLine("hg").withArgs("id", "--id").withArg(repositoryURL).withNonArgSecrets(secrets).withEncoding("utf-8"), new NamedProcessTag(repositoryURL.forDisplay()));
}
|
Vulnerability Classification:
- CWE: CWE-77
- CVE: CVE-2022-29184
- Severity: MEDIUM
- CVSS Score: 6.5
Description: Improve escaping of arguments when constructing Hg command calls
Function: checkConnection
File: domain/src/main/java/com/thoughtworks/go/domain/materials/mercurial/HgCommand.java
Repository: gocd
Fixed Code:
public void checkConnection(UrlArgument repositoryURL) {
CommandLine hg = createCommandLine("hg")
.withArgs("id", "--id", "--")
.withArg(repositoryURL)
.withNonArgSecrets(secrets)
.withEncoding("UTF-8");
execute(hg, new NamedProcessTag(repositoryURL.forDisplay()));
}
|
[
"CWE-77"
] |
CVE-2022-29184
|
MEDIUM
| 6.5
|
gocd
|
checkConnection
|
domain/src/main/java/com/thoughtworks/go/domain/materials/mercurial/HgCommand.java
|
37d35115db2ada2190173f9413cfe1bc6c295ecb
| 1
|
Analyze the following code function for security vulnerabilities
|
private synchronized void joinRoomAsync(final String room, final String nickname, final String password) {
if (ongoingMucJoins.containsKey(room))
return;
Thread joiner = new Thread() {
@Override
public void run() {
Log.d(TAG, "async joining " + room);
boolean result = joinRoom(room, nickname, password);
Log.d(TAG, "async joining " + room + " done: " + result);
ongoingMucJoins.remove(room);
}
};
ongoingMucJoins.put(room, joiner);
joiner.start();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: joinRoomAsync
File: src/org/yaxim/androidclient/service/SmackableImp.java
Repository: ge0rg/yaxim
The code follows secure coding practices.
|
[
"CWE-20",
"CWE-346"
] |
CVE-2017-5589
|
MEDIUM
| 4.3
|
ge0rg/yaxim
|
joinRoomAsync
|
src/org/yaxim/androidclient/service/SmackableImp.java
|
65a38dc77545d9568732189e86089390f0ceaf9f
| 0
|
Analyze the following code function for security vulnerabilities
|
private void updateAllSelectedState() {
int totalRowCount = getParentGrid().datasource.size();
int rows = Math.min(totalRowCount, selectionLimit);
if (totalRowCount == 0) {
getState().allSelected = false;
} else {
getState().allSelected = selection.size() >= rows;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateAllSelectedState
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
|
updateAllSelectedState
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public String displayForm(String className, String header, String format, boolean linebreak, XWikiContext context)
{
return displayForm(resolveClassReference(className), header, format, linebreak, context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: displayForm
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-26470
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
displayForm
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getExternalAttachmentURL(String fullName, String filename, XWikiContext context)
{
XWikiDocument doc = new XWikiDocument();
doc.setFullName(fullName, context);
return doc.getExternalAttachmentURL(filename, "download", context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getExternalAttachmentURL
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
|
getExternalAttachmentURL
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
private VideoCapturer createCameraCapturer(CameraEnumerator enumerator) {
final String[] deviceNames = enumerator.getDeviceNames();
// First, try to find front facing camera
Logging.d(TAG, "Looking for front facing cameras.");
for (String deviceName : deviceNames) {
if (enumerator.isFrontFacing(deviceName)) {
Logging.d(TAG, "Creating front facing camera capturer.");
VideoCapturer videoCapturer = enumerator.createCapturer(deviceName, null);
if (videoCapturer != null) {
binding.selfVideoRenderer.setMirror(true);
return videoCapturer;
}
}
}
// Front facing camera not found, try something else
Logging.d(TAG, "Looking for other cameras.");
for (String deviceName : deviceNames) {
if (!enumerator.isFrontFacing(deviceName)) {
Logging.d(TAG, "Creating other camera capturer.");
VideoCapturer videoCapturer = enumerator.createCapturer(deviceName, null);
if (videoCapturer != null) {
binding.selfVideoRenderer.setMirror(false);
return videoCapturer;
}
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createCameraCapturer
File: app/src/main/java/com/nextcloud/talk/activities/CallActivity.java
Repository: nextcloud/talk-android
The code follows secure coding practices.
|
[
"CWE-732",
"CWE-200"
] |
CVE-2022-41926
|
MEDIUM
| 5.5
|
nextcloud/talk-android
|
createCameraCapturer
|
app/src/main/java/com/nextcloud/talk/activities/CallActivity.java
|
bb7e82fbcbd8c10d0d0128d736c41cec0f79e7d0
| 0
|
Analyze the following code function for security vulnerabilities
|
public void visitUris(@NonNull Consumer<Uri> visitor) {
if (publicVersion != null) {
publicVersion.visitUris(visitor);
}
visitor.accept(sound);
if (tickerView != null) tickerView.visitUris(visitor);
if (contentView != null) contentView.visitUris(visitor);
if (bigContentView != null) bigContentView.visitUris(visitor);
if (headsUpContentView != null) headsUpContentView.visitUris(visitor);
visitIconUri(visitor, mSmallIcon);
visitIconUri(visitor, mLargeIcon);
if (actions != null) {
for (Action action : actions) {
visitIconUri(visitor, action.getIcon());
}
}
if (extras != null) {
visitIconUri(visitor, extras.getParcelable(EXTRA_LARGE_ICON_BIG, Icon.class));
visitIconUri(visitor, extras.getParcelable(EXTRA_PICTURE_ICON, Icon.class));
// NOTE: The documentation of EXTRA_AUDIO_CONTENTS_URI explicitly says that it is a
// String representation of a Uri, but the previous implementation (and unit test) of
// this method has always treated it as a Uri object. Given the inconsistency,
// supporting both going forward is the safest choice.
Object audioContentsUri = extras.get(EXTRA_AUDIO_CONTENTS_URI);
if (audioContentsUri instanceof Uri) {
visitor.accept((Uri) audioContentsUri);
} else if (audioContentsUri instanceof String) {
visitor.accept(Uri.parse((String) audioContentsUri));
}
if (extras.containsKey(EXTRA_BACKGROUND_IMAGE_URI)) {
visitor.accept(Uri.parse(extras.getString(EXTRA_BACKGROUND_IMAGE_URI)));
}
ArrayList<Person> people = extras.getParcelableArrayList(EXTRA_PEOPLE_LIST);
if (people != null && !people.isEmpty()) {
for (Person p : people) {
visitor.accept(p.getIconUri());
}
}
final Person person = extras.getParcelable(EXTRA_MESSAGING_PERSON, Person.class);
if (person != null) {
visitor.accept(person.getIconUri());
}
}
if (isStyle(MessagingStyle.class) && extras != null) {
final Parcelable[] messages = extras.getParcelableArray(EXTRA_MESSAGES);
if (!ArrayUtils.isEmpty(messages)) {
for (MessagingStyle.Message message : MessagingStyle.Message
.getMessagesFromBundleArray(messages)) {
visitor.accept(message.getDataUri());
Person senderPerson = message.getSenderPerson();
if (senderPerson != null) {
visitor.accept(senderPerson.getIconUri());
}
}
}
final Parcelable[] historic = extras.getParcelableArray(EXTRA_HISTORIC_MESSAGES);
if (!ArrayUtils.isEmpty(historic)) {
for (MessagingStyle.Message message : MessagingStyle.Message
.getMessagesFromBundleArray(historic)) {
visitor.accept(message.getDataUri());
Person senderPerson = message.getSenderPerson();
if (senderPerson != null) {
visitor.accept(senderPerson.getIconUri());
}
}
}
visitIconUri(visitor, extras.getParcelable(EXTRA_CONVERSATION_ICON));
}
if (isStyle(CallStyle.class) & extras != null) {
Person callPerson = extras.getParcelable(EXTRA_CALL_PERSON);
if (callPerson != null) {
visitor.accept(callPerson.getIconUri());
}
visitIconUri(visitor, extras.getParcelable(EXTRA_VERIFICATION_ICON));
}
if (mBubbleMetadata != null) {
visitIconUri(visitor, mBubbleMetadata.getIcon());
}
}
|
Vulnerability Classification:
- CWE: CWE-862
- CVE: CVE-2023-21244
- Severity: MEDIUM
- CVSS Score: 6.7
Description: Verify URI permissions for EXTRA_REMOTE_INPUT_HISTORY_ITEMS.
Also added a step to serialize & deserialize the notification in the
test, to prevent exceptions about not being able to cast e.g.
Parcelable[] to RemoteInputHistoryItem[].
Test: atest NotificationManagerServiceTest & tested with POC from bug
Bug: 276729064
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:4e19431a60300c6ea6c7f7dd64299916e4eb09bc)
Merged-In: I7053ca59f9c7f1df5226418594109cfb8b609b1e
Change-Id: I7053ca59f9c7f1df5226418594109cfb8b609b1e
Function: visitUris
File: core/java/android/app/Notification.java
Repository: android
Fixed Code:
public void visitUris(@NonNull Consumer<Uri> visitor) {
if (publicVersion != null) {
publicVersion.visitUris(visitor);
}
visitor.accept(sound);
if (tickerView != null) tickerView.visitUris(visitor);
if (contentView != null) contentView.visitUris(visitor);
if (bigContentView != null) bigContentView.visitUris(visitor);
if (headsUpContentView != null) headsUpContentView.visitUris(visitor);
visitIconUri(visitor, mSmallIcon);
visitIconUri(visitor, mLargeIcon);
if (actions != null) {
for (Action action : actions) {
visitIconUri(visitor, action.getIcon());
}
}
if (extras != null) {
visitIconUri(visitor, extras.getParcelable(EXTRA_LARGE_ICON_BIG, Icon.class));
visitIconUri(visitor, extras.getParcelable(EXTRA_PICTURE_ICON, Icon.class));
// NOTE: The documentation of EXTRA_AUDIO_CONTENTS_URI explicitly says that it is a
// String representation of a Uri, but the previous implementation (and unit test) of
// this method has always treated it as a Uri object. Given the inconsistency,
// supporting both going forward is the safest choice.
Object audioContentsUri = extras.get(EXTRA_AUDIO_CONTENTS_URI);
if (audioContentsUri instanceof Uri) {
visitor.accept((Uri) audioContentsUri);
} else if (audioContentsUri instanceof String) {
visitor.accept(Uri.parse((String) audioContentsUri));
}
if (extras.containsKey(EXTRA_BACKGROUND_IMAGE_URI)) {
visitor.accept(Uri.parse(extras.getString(EXTRA_BACKGROUND_IMAGE_URI)));
}
ArrayList<Person> people = extras.getParcelableArrayList(EXTRA_PEOPLE_LIST);
if (people != null && !people.isEmpty()) {
for (Person p : people) {
visitor.accept(p.getIconUri());
}
}
final Person person = extras.getParcelable(EXTRA_MESSAGING_PERSON, Person.class);
if (person != null) {
visitor.accept(person.getIconUri());
}
final RemoteInputHistoryItem[] history = extras.getParcelableArray(
Notification.EXTRA_REMOTE_INPUT_HISTORY_ITEMS,
RemoteInputHistoryItem.class);
if (history != null) {
for (int i = 0; i < history.length; i++) {
RemoteInputHistoryItem item = history[i];
if (item.getUri() != null) {
visitor.accept(item.getUri());
}
}
}
}
if (isStyle(MessagingStyle.class) && extras != null) {
final Parcelable[] messages = extras.getParcelableArray(EXTRA_MESSAGES);
if (!ArrayUtils.isEmpty(messages)) {
for (MessagingStyle.Message message : MessagingStyle.Message
.getMessagesFromBundleArray(messages)) {
visitor.accept(message.getDataUri());
Person senderPerson = message.getSenderPerson();
if (senderPerson != null) {
visitor.accept(senderPerson.getIconUri());
}
}
}
final Parcelable[] historic = extras.getParcelableArray(EXTRA_HISTORIC_MESSAGES);
if (!ArrayUtils.isEmpty(historic)) {
for (MessagingStyle.Message message : MessagingStyle.Message
.getMessagesFromBundleArray(historic)) {
visitor.accept(message.getDataUri());
Person senderPerson = message.getSenderPerson();
if (senderPerson != null) {
visitor.accept(senderPerson.getIconUri());
}
}
}
visitIconUri(visitor, extras.getParcelable(EXTRA_CONVERSATION_ICON));
}
if (isStyle(CallStyle.class) & extras != null) {
Person callPerson = extras.getParcelable(EXTRA_CALL_PERSON);
if (callPerson != null) {
visitor.accept(callPerson.getIconUri());
}
visitIconUri(visitor, extras.getParcelable(EXTRA_VERIFICATION_ICON));
}
if (mBubbleMetadata != null) {
visitIconUri(visitor, mBubbleMetadata.getIcon());
}
}
|
[
"CWE-862"
] |
CVE-2023-21244
|
MEDIUM
| 6.7
|
android
|
visitUris
|
core/java/android/app/Notification.java
|
5a3d0c131175d923cf35c7beb3ee77a9e6485dad
| 1
|
Analyze the following code function for security vulnerabilities
|
boolean userManagerIsHeadlessSystemUserMode() {
return UserManager.isHeadlessSystemUserMode();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: userManagerIsHeadlessSystemUserMode
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2023-21284
|
MEDIUM
| 5.5
|
android
|
userManagerIsHeadlessSystemUserMode
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
List<String> getCommandLine( String executableParameter, String... argumentsParameter )
{
return getRawCommandLine( executableParameter, argumentsParameter );
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCommandLine
File: src/main/java/org/apache/maven/shared/utils/cli/shell/Shell.java
Repository: apache/maven-shared-utils
The code follows secure coding practices.
|
[
"CWE-116"
] |
CVE-2022-29599
|
HIGH
| 7.5
|
apache/maven-shared-utils
|
getCommandLine
|
src/main/java/org/apache/maven/shared/utils/cli/shell/Shell.java
|
2735facbbbc2e13546328cb02dbb401b3776eea3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public ExecListenable<String, ExecWatch> withTTY() {
return new PodOperationsImpl(getContext().withTty(true));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: withTTY
File: kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/PodOperationsImpl.java
Repository: fabric8io/kubernetes-client
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-20218
|
MEDIUM
| 5.8
|
fabric8io/kubernetes-client
|
withTTY
|
kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/PodOperationsImpl.java
|
325d67cc80b73f049a5d0cea4917c1f2709a8d86
| 0
|
Analyze the following code function for security vulnerabilities
|
protected List<Action> createTransientActions() {
Vector<Action> ta = new Vector<Action>();
for (JobProperty<? super P> p : Util.fixNull(properties))
ta.addAll(p.getJobActions((P)this));
for (TransientProjectActionFactory tpaf : TransientProjectActionFactory.all())
ta.addAll(Util.fixNull(tpaf.createFor(this))); // be defensive against null
return ta;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createTransientActions
File: core/src/main/java/hudson/model/AbstractProject.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
createTransientActions
|
core/src/main/java/hudson/model/AbstractProject.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setMinorEdit(boolean isMinor)
{
this.isMinorEdit = isMinor;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setMinorEdit
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-26470
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
setMinorEdit
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
private Object redirect(HttpServletRequest request, HttpServletResponse response, String location) {
try {
response.sendRedirect(request.getContextPath() + location);
} catch (Exception e) {
logger.debug(e.getStackTrace().toString());
} finally {
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: redirect
File: web/src/main/java/org/akaza/openclinica/controller/BatchCRFMigrationController.java
Repository: OpenClinica
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-24830
|
HIGH
| 7.5
|
OpenClinica
|
redirect
|
web/src/main/java/org/akaza/openclinica/controller/BatchCRFMigrationController.java
|
6f864e86543f903bd20d6f9fc7056115106441f3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getString() {
if (currentEvent == Event.KEY_NAME || currentEvent == Event.VALUE_STRING
|| currentEvent == Event.VALUE_NUMBER) {
return tokenizer.getValue();
}
throw new IllegalStateException(
JsonMessages.PARSER_GETSTRING_ERR(currentEvent));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getString
File: impl/src/main/java/org/eclipse/parsson/JsonParserImpl.java
Repository: eclipse-ee4j/parsson
The code follows secure coding practices.
|
[
"CWE-834"
] |
CVE-2023-4043
|
HIGH
| 7.5
|
eclipse-ee4j/parsson
|
getString
|
impl/src/main/java/org/eclipse/parsson/JsonParserImpl.java
|
ab239fee273cb262910890f1a6fe666ae92cd623
| 0
|
Analyze the following code function for security vulnerabilities
|
public CommandProcessor getCommandProcessor() {
return CommandProcessorHolder.getCommandProcessor();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCommandProcessor
File: hawtio-karaf-terminal/src/main/java/io/hawt/web/plugin/karaf/terminal/TerminalServlet.java
Repository: hawtio
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2014-0120
|
MEDIUM
| 6.8
|
hawtio
|
getCommandProcessor
|
hawtio-karaf-terminal/src/main/java/io/hawt/web/plugin/karaf/terminal/TerminalServlet.java
|
b4e23e002639c274a2f687ada980118512f06113
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void clearDeviceOwner(String packageName) {
Objects.requireNonNull(packageName, "packageName is null");
final CallerIdentity caller = getCallerIdentity(packageName);
synchronized (getLockObject()) {
final ComponentName deviceOwnerComponent = mOwners.getDeviceOwnerComponent();
final int deviceOwnerUserId = mOwners.getDeviceOwnerUserId();
if (!mOwners.hasDeviceOwner()
|| !deviceOwnerComponent.getPackageName().equals(packageName)
|| (deviceOwnerUserId != caller.getUserId())) {
throw new SecurityException(
"clearDeviceOwner can only be called by the device owner");
}
enforceUserUnlocked(deviceOwnerUserId);
DevicePolicyData policy = getUserData(deviceOwnerUserId);
if (policy.mPasswordTokenHandle != 0) {
mLockPatternUtils.removeEscrowToken(policy.mPasswordTokenHandle, deviceOwnerUserId);
}
final ActiveAdmin admin = getDeviceOwnerAdminLocked();
mInjector.binderWithCleanCallingIdentity(() -> {
clearDeviceOwnerLocked(admin, deviceOwnerUserId);
removeActiveAdminLocked(deviceOwnerComponent, deviceOwnerUserId);
sendOwnerChangedBroadcast(DevicePolicyManager.ACTION_DEVICE_OWNER_CHANGED,
deviceOwnerUserId);
});
Slogf.i(LOG_TAG, "Device owner removed: " + deviceOwnerComponent);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearDeviceOwner
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2023-21284
|
MEDIUM
| 5.5
|
android
|
clearDeviceOwner
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public Map<String, Pair<Object, Class>> getJavascriptInterfaces() {
return mJavaScriptInterfaces;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getJavascriptInterfaces
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-1021"
] |
CVE-2015-1241
|
MEDIUM
| 4.3
|
chromium
|
getJavascriptInterfaces
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
9d343ad2ea6ec395c377a4efa266057155bfa9c1
| 0
|
Analyze the following code function for security vulnerabilities
|
private void updateAdminCanGrantSensorsPermissionCache(@UserIdInt int userId) {
synchronized (getLockObject()) {
ActiveAdmin owner;
// If the user is affiliated the device (either a DO itself, or an affiliated PO),
// use mAdminCanGrantSensorsPermissions from the DO
if (isUserAffiliatedWithDeviceLocked(userId)) {
owner = getDeviceOwnerAdminLocked();
} else {
owner = getDeviceOrProfileOwnerAdminLocked(userId);
}
boolean canGrant = owner != null ? owner.mAdminCanGrantSensorsPermissions : false;
mPolicyCache.setAdminCanGrantSensorsPermissions(canGrant);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateAdminCanGrantSensorsPermissionCache
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
|
updateAdminCanGrantSensorsPermissionCache
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void decrementMemoryCounter(int capacity) {
if (DIRECT_MEMORY_COUNTER != null) {
long usedMemory = DIRECT_MEMORY_COUNTER.addAndGet(-capacity);
assert usedMemory >= 0;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: decrementMemoryCounter
File: common/src/main/java/io/netty/util/internal/PlatformDependent.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-668",
"CWE-378",
"CWE-379"
] |
CVE-2022-24823
|
LOW
| 1.9
|
netty
|
decrementMemoryCounter
|
common/src/main/java/io/netty/util/internal/PlatformDependent.java
|
185f8b2756a36aaa4f973f1a2a025e7d981823f1
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void refreshRow() throws SQLException {
checkUpdateable();
if (onInsertRow) {
throw new PSQLException(GT.tr("Can''t refresh the insert row."),
PSQLState.INVALID_CURSOR_STATE);
}
if (isBeforeFirst() || isAfterLast() || castNonNull(rows, "rows").isEmpty()) {
return;
}
StringBuilder selectSQL = new StringBuilder("select ");
ResultSetMetaData rsmd = getMetaData();
PGResultSetMetaData pgmd = (PGResultSetMetaData) rsmd;
for (int i = 1; i <= rsmd.getColumnCount(); i++) {
if (i > 1) {
selectSQL.append(", ");
}
selectSQL.append(pgmd.getBaseColumnName(i));
}
selectSQL.append(" from ").append(onlyTable).append(tableName).append(" where ");
List<PrimaryKey> primaryKeys = castNonNull(this.primaryKeys, "primaryKeys");
int numKeys = primaryKeys.size();
for (int i = 0; i < numKeys; i++) {
PrimaryKey primaryKey = primaryKeys.get(i);
selectSQL.append(primaryKey.name).append(" = ?");
if (i < numKeys - 1) {
selectSQL.append(" and ");
}
}
String sqlText = selectSQL.toString();
if (connection.getLogger().isLoggable(Level.FINE)) {
connection.getLogger().log(Level.FINE, "selecting {0}", sqlText);
}
// because updateable result sets do not yet support binary transfers we must request refresh
// with updateable result set to get field data in correct format
PreparedStatement selectStatement = null;
try {
selectStatement = connection.prepareStatement(sqlText,
ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
for (int i = 0; i < numKeys; i++) {
selectStatement.setObject(i + 1, primaryKeys.get(i).getValue());
}
PgResultSet rs = (PgResultSet) selectStatement.executeQuery();
if (rs.next()) {
// we know that the row is updatable as it was tested above.
if ( rs.thisRow == null ) {
rowBuffer = null;
} else {
rowBuffer = castNonNull(rs.thisRow).updateableCopy();
}
}
castNonNull(rows).set(currentRow, castNonNull(rowBuffer));
thisRow = rowBuffer;
connection.getLogger().log(Level.FINE, "done updates");
rs.close();
} finally {
JdbcBlackHole.close(selectStatement);
}
}
|
Vulnerability Classification:
- CWE: CWE-89
- CVE: CVE-2022-31197
- Severity: HIGH
- CVSS Score: 8.0
Description: Merge pull request from GHSA-r38f-c4h4-hqq2
Fixes SQL generated in PgResultSet.refresh() to escape column identifiers so as to prevent SQL injection.
Previously, the column names for both key and data columns in the table were copied as-is into the generated
SQL. This allowed a malicious table with column names that include statement terminator to be parsed and
executed as multiple separate commands.
Also adds a new test class ResultSetRefreshTest to verify this change.
Function: refreshRow
File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
Repository: pgjdbc
Fixed Code:
@Override
public void refreshRow() throws SQLException {
checkUpdateable();
if (onInsertRow) {
throw new PSQLException(GT.tr("Can''t refresh the insert row."),
PSQLState.INVALID_CURSOR_STATE);
}
if (isBeforeFirst() || isAfterLast() || castNonNull(rows, "rows").isEmpty()) {
return;
}
StringBuilder selectSQL = new StringBuilder("select ");
ResultSetMetaData rsmd = getMetaData();
PGResultSetMetaData pgmd = (PGResultSetMetaData) rsmd;
for (int i = 1; i <= rsmd.getColumnCount(); i++) {
if (i > 1) {
selectSQL.append(", ");
}
Utils.escapeIdentifier(selectSQL, pgmd.getBaseColumnName(i));
}
selectSQL.append(" from ").append(onlyTable).append(tableName).append(" where ");
List<PrimaryKey> primaryKeys = castNonNull(this.primaryKeys, "primaryKeys");
int numKeys = primaryKeys.size();
for (int i = 0; i < numKeys; i++) {
PrimaryKey primaryKey = primaryKeys.get(i);
Utils.escapeIdentifier(selectSQL, primaryKey.name);
selectSQL.append(" = ?");
if (i < numKeys - 1) {
selectSQL.append(" and ");
}
}
String sqlText = selectSQL.toString();
if (connection.getLogger().isLoggable(Level.FINE)) {
connection.getLogger().log(Level.FINE, "selecting {0}", sqlText);
}
// because updateable result sets do not yet support binary transfers we must request refresh
// with updateable result set to get field data in correct format
PreparedStatement selectStatement = null;
try {
selectStatement = connection.prepareStatement(sqlText,
ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
for (int i = 0; i < numKeys; i++) {
selectStatement.setObject(i + 1, primaryKeys.get(i).getValue());
}
PgResultSet rs = (PgResultSet) selectStatement.executeQuery();
if (rs.next()) {
// we know that the row is updatable as it was tested above.
if ( rs.thisRow == null ) {
rowBuffer = null;
} else {
rowBuffer = castNonNull(rs.thisRow).updateableCopy();
}
}
castNonNull(rows).set(currentRow, castNonNull(rowBuffer));
thisRow = rowBuffer;
connection.getLogger().log(Level.FINE, "done updates");
rs.close();
} finally {
JdbcBlackHole.close(selectStatement);
}
}
|
[
"CWE-89"
] |
CVE-2022-31197
|
HIGH
| 8
|
pgjdbc
|
refreshRow
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 1
|
Analyze the following code function for security vulnerabilities
|
boolean isPackageAssociationAllowed(String targetPackage) {
return mIsDebuggable || mAllowedPackageAssociations.contains(targetPackage);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isPackageAssociationAllowed
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
|
isPackageAssociationAllowed
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
CallerIdentity getCallerIdentity(@Nullable ComponentName adminComponent,
@Nullable String callerPackage) {
final int callerUid = mInjector.binderGetCallingUid();
if (callerPackage != null) {
if (!isCallingFromPackage(callerPackage, callerUid)) {
throw new SecurityException(
String.format("Caller with uid %d is not %s", callerUid, callerPackage));
}
}
if (adminComponent != null) {
final DevicePolicyData policy = getUserData(UserHandle.getUserId(callerUid));
ActiveAdmin admin = policy.mAdminMap.get(adminComponent);
// Throwing combined exception message for both the cases here, because from different
// security exceptions it could be deduced if particular package is admin package.
if (admin == null || admin.getUid() != callerUid) {
throw new SecurityException(String.format(
"Admin %s does not exist or is not owned by uid %d", adminComponent,
callerUid));
}
if (callerPackage != null) {
Preconditions.checkArgument(callerPackage.equals(adminComponent.getPackageName()));
} else {
callerPackage = adminComponent.getPackageName();
}
}
return new CallerIdentity(callerUid, callerPackage, adminComponent);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCallerIdentity
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2023-21284
|
MEDIUM
| 5.5
|
android
|
getCallerIdentity
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setSpaces(Set<String> spaces) {
this.spaces = spaces;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSpaces
File: src/main/java/com/erudika/scoold/core/Profile.java
Repository: Erudika/scoold
The code follows secure coding practices.
|
[
"CWE-130"
] |
CVE-2022-1543
|
MEDIUM
| 6.5
|
Erudika/scoold
|
setSpaces
|
src/main/java/com/erudika/scoold/core/Profile.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
public void shutdown() {
gnuplot.shutdown();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: shutdown
File: src/tsd/GraphHandler.java
Repository: OpenTSDB/opentsdb
The code follows secure coding practices.
|
[
"CWE-78"
] |
CVE-2023-25826
|
CRITICAL
| 9.8
|
OpenTSDB/opentsdb
|
shutdown
|
src/tsd/GraphHandler.java
|
26be40a5e5b6ce8b0b1e4686c4b0d7911e5d8a25
| 0
|
Analyze the following code function for security vulnerabilities
|
public void readObjectsFromFormUpdateOrCreate(EditForm eform, XWikiContext context) throws XWikiException
{
Map<String, SortedMap<Integer, Map<String, String[]>>> updateOrCreateMap = eform.getUpdateOrCreateMap();
for (Entry<String, SortedMap<Integer, Map<String, String[]>>> requestClassEntries : updateOrCreateMap
.entrySet()) {
String className = requestClassEntries.getKey();
DocumentReference requestClassReference = getCurrentDocumentReferenceResolver().resolve(className);
SortedMap<Integer, Map<String, String[]>> requestObjectMap = requestClassEntries.getValue();
for (Entry<Integer, Map<String, String[]>> requestObjectEntry : requestObjectMap.entrySet()) {
Integer requestObjectNumber = requestObjectEntry.getKey();
Map<String, String[]> requestObjectPropertyMap = requestObjectEntry.getValue();
List<String> properties = new ArrayList<>(requestObjectPropertyMap.keySet());
try {
BaseClass xClass = context.getWiki().getDocument(requestClassReference, context).getXClass();
// clean-up the properties that do not belong to the xclass
for (String property : properties) {
if (!xClass.getPropertyList().contains(property)) {
requestObjectPropertyMap.remove(property);
}
}
} catch (XWikiException e) {
// If the class page cannot be found, skip entirely the property update
LOGGER.warn("Failed to load document [{}], ignoring properties update [{}]. Reason: [{}]",
requestClassReference, StringUtils.join(properties, ","),
ExceptionUtils.getRootCauseMessage(e));
continue;
}
if (!requestObjectPropertyMap.isEmpty()) {
BaseObject oldObject = getXObject(requestClassReference, requestObjectNumber, true, context);
BaseClass baseClass = oldObject.getXClass(context);
BaseObject newObject = (BaseObject) baseClass.fromMap(requestObjectPropertyMap, oldObject);
newObject.setNumber(oldObject.getNumber());
newObject.setGuid(oldObject.getGuid());
newObject.setOwnerDocument(this);
setXObject(requestObjectNumber, newObject);
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readObjectsFromFormUpdateOrCreate
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-26470
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
readObjectsFromFormUpdateOrCreate
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
private void cancelPendingScreenshotChordAction() {
mHandler.removeCallbacks(mScreenshotRunnable);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cancelPendingScreenshotChordAction
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
|
cancelPendingScreenshotChordAction
|
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
|
84669ca8de55d38073a0dcb01074233b0a417541
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected byte getDigitPos(int position) {
if (usingBytes) {
if (position < 0 || position >= precision)
return 0;
return bcdBytes[position];
} else {
if (position < 0 || position >= 16)
return 0;
return (byte) ((bcdLong >>> (position * 4)) & 0xf);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDigitPos
File: icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_DualStorageBCD.java
Repository: unicode-org/icu
The code follows secure coding practices.
|
[
"CWE-190"
] |
CVE-2018-18928
|
HIGH
| 7.5
|
unicode-org/icu
|
getDigitPos
|
icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_DualStorageBCD.java
|
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setSubjectDN(String subjectDN) {
this.subjectDN = subjectDN;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSubjectDN
File: base/common/src/main/java/com/netscape/certsrv/cert/CertDataInfo.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
setSubjectDN
|
base/common/src/main/java/com/netscape/certsrv/cert/CertDataInfo.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isInCall(String callingPackage) {
if (!canReadPhoneState(callingPackage, "isInCall")) {
return false;
}
synchronized (mLock) {
final int callState = mCallsManager.getCallState();
return callState == TelephonyManager.CALL_STATE_OFFHOOK
|| callState == TelephonyManager.CALL_STATE_RINGING;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isInCall
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
|
isInCall
|
src/com/android/server/telecom/TelecomServiceImpl.java
|
2750faaa1ec819eed9acffea7bd3daf867fda444
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<Group> findByMetadataField(final Context context, final String searchValue,
final MetadataField metadataField) throws SQLException {
return groupDAO.findByMetadataField(context, searchValue, metadataField);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findByMetadataField
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
|
findByMetadataField
|
dspace-api/src/main/java/org/dspace/eperson/GroupServiceImpl.java
|
277b499a5cd3a4f5eb2370513a1b7e4ec2a6e041
| 0
|
Analyze the following code function for security vulnerabilities
|
public SerializationConfig addSerializerConfig(SerializerConfig serializerConfig) {
getSerializerConfigs().add(serializerConfig);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addSerializerConfig
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
|
addSerializerConfig
|
hazelcast/src/main/java/com/hazelcast/config/SerializationConfig.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
private static int[] getWidgetIds(ArrayList<Widget> widgets) {
int instancesSize = widgets.size();
int appWidgetIds[] = new int[instancesSize];
for (int i = 0; i < instancesSize; i++) {
appWidgetIds[i] = widgets.get(i).appWidgetId;
}
return appWidgetIds;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getWidgetIds
File: services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-1541
|
MEDIUM
| 4.3
|
android
|
getWidgetIds
|
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
|
0b98d304c467184602b4c6bce76fda0b0274bc07
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onANQPResponse(long bssid,
Map<Constants.ANQPElementType, ANQPElement> anqpElements) {
if (mVerboseLoggingEnabled) {
Log.d(TAG, "ANQP response received from BSSID "
+ Utils.macToString(bssid) + " - List of ANQP elements:");
int i = 0;
for (Constants.ANQPElementType type : anqpElements.keySet()) {
Log.d(TAG, "#" + i++ + ": " + type);
}
}
// Notify request manager for the completion of a request.
ANQPNetworkKey anqpKey =
mAnqpRequestManager.onRequestCompleted(bssid, anqpElements != null);
if (anqpElements == null || anqpKey == null) {
// Query failed or the request wasn't originated from us (not tracked by the
// request manager). Nothing to be done.
return;
}
if (anqpElements.containsKey(Constants.ANQPElementType.ANQPVenueUrl)) {
// Venue URL ANQP is requested and received only after the network is connected
mWifiMetrics.incrementTotalNumberOfPasspointConnectionsWithVenueUrl();
}
// Add new entry to the cache.
mAnqpCache.addOrUpdateEntry(anqpKey, anqpElements);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onANQPResponse
File: service/java/com/android/server/wifi/hotspot2/PasspointManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-120"
] |
CVE-2023-21243
|
MEDIUM
| 5.5
|
android
|
onANQPResponse
|
service/java/com/android/server/wifi/hotspot2/PasspointManager.java
|
5b49b8711efaadadf5052ba85288860c2d7ca7a6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable
private String getRoleHolderPackageNameOnUser(String role, int userId) {
RoleManager roleManager = mContext.getSystemService(RoleManager.class);
// Clear calling identity as the RoleManager APIs require privileged permissions.
return mInjector.binderWithCleanCallingIdentity(() -> {
List<UserInfo> users;
// Interpret USER_ALL as meaning "any" user.
if (userId == UserHandle.USER_ALL) {
users = mInjector.getUserManagerInternal().getUsers(/*excludeDying=*/ true);
} else {
users = List.of(new UserInfo(userId, /*name=*/ null, /*flags=*/ 0));
}
for (UserInfo user : users) {
List<String> roleHolders =
roleManager.getRoleHoldersAsUser(role, user.getUserHandle());
if (!roleHolders.isEmpty()) {
return roleHolders.get(0);
}
}
return null;
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRoleHolderPackageNameOnUser
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
|
getRoleHolderPackageNameOnUser
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public synchronized void updateTimestamp(
int columnIndex, @Nullable Timestamp x) throws SQLException {
updateValue(columnIndex, x);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateTimestamp
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
|
updateTimestamp
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getValue() {
if (value == null) {
return null;
}
if (value instanceof JsonObject) {
return ((JsonObject) value).encode();
}
if (value instanceof String || value.getClass().isPrimitive() || Primitives.isWrapperType(value.getClass())) {
return Json.encode(value);
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getValue
File: domain-models-runtime/src/main/java/org/folio/rest/persist/Criteria/UpdateSection.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
getValue
|
domain-models-runtime/src/main/java/org/folio/rest/persist/Criteria/UpdateSection.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setVisible(boolean visible) {
this.visible = visible;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setVisible
File: base/common/src/main/java/com/netscape/certsrv/profile/ProfileData.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
setVisible
|
base/common/src/main/java/com/netscape/certsrv/profile/ProfileData.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public int serialize() {
return this.ordinal();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: serialize
File: src/main/java/com/owncloud/android/files/services/FileUploader.java
Repository: nextcloud/android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2021-32695
|
MEDIUM
| 4.3
|
nextcloud/android
|
serialize
|
src/main/java/com/owncloud/android/files/services/FileUploader.java
|
97d6f2954c879f3bfebcd241993147bced5fd50b
| 0
|
Analyze the following code function for security vulnerabilities
|
private void logGenerateKeyPairFailure(CallerIdentity caller,
boolean isCredentialManagementApp) {
if (!isCredentialManagementApp) {
return;
}
DevicePolicyEventLogger
.createEvent(DevicePolicyEnums.CREDENTIAL_MANAGEMENT_APP_GENERATE_KEY_PAIR_FAILED)
.setStrings(caller.getPackageName())
.write();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: logGenerateKeyPairFailure
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2023-21284
|
MEDIUM
| 5.5
|
android
|
logGenerateKeyPairFailure
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
private void validatePartitionTopicUpdate(String topicName, int numberOfPartition) {
List<String> existingTopicList = internalGetList();
TopicName partitionTopicName = TopicName.get(domain(), namespaceName, topicName);
PartitionedTopicMetadata metadata = getPartitionedTopicMetadata(partitionTopicName, false, false);
int oldPartition = metadata.partitions;
String prefix = partitionTopicName.getPartitionedTopicName() + TopicName.PARTITIONED_TOPIC_SUFFIX;
for (String exsitingTopicName : existingTopicList) {
if (exsitingTopicName.startsWith(prefix)) {
try {
long suffix = Long.parseLong(exsitingTopicName.substring(
exsitingTopicName.indexOf(TopicName.PARTITIONED_TOPIC_SUFFIX)
+ TopicName.PARTITIONED_TOPIC_SUFFIX.length()));
// Skip partition of partitioned topic by making sure
// the numeric suffix greater than old partition number.
if (suffix >= oldPartition && suffix <= (long) numberOfPartition) {
log.warn(
"[{}] Already have non partition topic {} which contains partition suffix"
+ " '-partition-' and end with numeric value smaller than the new number"
+ " of partition. Update of partitioned topic {} could cause conflict.",
clientAppId(),
exsitingTopicName, topicName);
throw new RestException(Status.PRECONDITION_FAILED,
"Already have non partition topic " + exsitingTopicName
+ " which contains partition suffix '-partition-' "
+ "and end with numeric value and end with numeric value smaller than the new "
+ "number of partition. Update of partitioned topic "
+ topicName + " could cause conflict.");
}
} catch (NumberFormatException e) {
// Do nothing, if value after partition suffix is not pure numeric value,
// as it can't conflict with internal created partitioned topic's name.
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: validatePartitionTopicUpdate
File: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
Repository: apache/pulsar
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-41571
|
MEDIUM
| 4
|
apache/pulsar
|
validatePartitionTopicUpdate
|
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
|
5b35bb81c31f1bc2ad98c9fde5b39ec68110ca52
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
@Deprecated
public void addListener(ItemClickListener listener) {
addItemClickListener(listener);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addListener
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
|
addListener
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isExternalMediaAvailable() {
return mMediaMounted || Environment.isExternalStorageEmulated();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isExternalMediaAvailable
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
|
isExternalMediaAvailable
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
public void enable() throws IOException {
makeDisabled(false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: enable
File: core/src/main/java/hudson/model/AbstractProject.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
enable
|
core/src/main/java/hudson/model/AbstractProject.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
public String formatDate(Date date) {
return dateFormat.format(date);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: formatDate
File: samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
formatDate
|
samples/openapi3/client/petstore/java/jersey2-java8-special-characters/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
private int runTrimCaches() {
String size = nextArg();
if (size == null) {
System.err.println("Error: no size specified");
showUsage();
return 1;
}
int len = size.length();
long multiplier = 1;
if (len > 1) {
char c = size.charAt(len-1);
if (c == 'K' || c == 'k') {
multiplier = 1024L;
} else if (c == 'M' || c == 'm') {
multiplier = 1024L*1024L;
} else if (c == 'G' || c == 'g') {
multiplier = 1024L*1024L*1024L;
} else {
System.err.println("Invalid suffix: " + c);
showUsage();
return 1;
}
size = size.substring(0, len-1);
}
long sizeVal;
try {
sizeVal = Long.parseLong(size) * multiplier;
} catch (NumberFormatException e) {
System.err.println("Error: expected number at: " + size);
showUsage();
return 1;
}
String volumeUuid = nextArg();
if ("internal".equals(volumeUuid)) {
volumeUuid = null;
}
ClearDataObserver obs = new ClearDataObserver();
try {
mPm.freeStorageAndNotify(volumeUuid, sizeVal, obs);
synchronized (obs) {
while (!obs.finished) {
try {
obs.wait();
} catch (InterruptedException e) {
}
}
}
return 0;
} catch (RemoteException e) {
System.err.println(e.toString());
System.err.println(PM_NOT_RUNNING_ERR);
return 1;
} catch (IllegalArgumentException e) {
System.err.println("Bad argument: " + e.toString());
showUsage();
return 1;
} catch (SecurityException e) {
System.err.println("Operation not allowed: " + e.toString());
return 1;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: runTrimCaches
File: cmds/pm/src/com/android/commands/pm/Pm.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3833
|
HIGH
| 9.3
|
android
|
runTrimCaches
|
cmds/pm/src/com/android/commands/pm/Pm.java
|
4e4743a354e26467318b437892a9980eb9b8328a
| 0
|
Analyze the following code function for security vulnerabilities
|
public final void increaseWidthTo(int wid) {
if (wid < mWidth) {
throw new RuntimeException("attempted to reduce Layout width");
}
mWidth = wid;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: increaseWidthTo
File: core/java/android/text/Layout.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-9452
|
MEDIUM
| 4.3
|
android
|
increaseWidthTo
|
core/java/android/text/Layout.java
|
3b6f84b77c30ec0bab5147b0cffc192c86ba2634
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequiresPermissions("comment:delete")
@GetMapping("/delete")
@ResponseBody
public Result delete(Integer id) {
Comment comment = commentService.selectById(id);
commentService.delete(comment);
return success();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: delete
File: src/main/java/co/yiiu/pybbs/controller/admin/CommentAdminController.java
Repository: atjiu/pybbs
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-23391
|
MEDIUM
| 4.3
|
atjiu/pybbs
|
delete
|
src/main/java/co/yiiu/pybbs/controller/admin/CommentAdminController.java
|
7d83b97d19f5fed9f29f72e654ef3c2818021b4d
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String format(OpenmrsMetadata md, Locale locale) {
String override = getLocalization(locale, md.getClass().getSimpleName(), md.getUuid());
return override != null ? override : StringEscapeUtils.escapeHtml(md.getName());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: format
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
|
format
|
api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java
|
9dcd304688e65c31cac5532fe501b9816ed975ae
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getWhereSQL(Select select) {
StringBuilder sql = new StringBuilder();
List<Condition> wheres = select.getWheres();
boolean first = true;
for (Condition condition : wheres) {
if (first) {
sql.append(getWhereStatement(select)).append(" ");
} else {
sql.append(AND);
}
String str = getConditionSQL(condition);
sql.append(str);
first = false;
}
return sql.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getWhereSQL
File: dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java
Repository: dashbuilder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-4999
|
HIGH
| 7.5
|
dashbuilder
|
getWhereSQL
|
dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java
|
8574899e3b6455547b534f570b2330ff772e524b
| 0
|
Analyze the following code function for security vulnerabilities
|
static <T> T[] getParagraphSpans(Spanned text, int start, int end, Class<T> type) {
if (start == end && start > 0) {
return ArrayUtils.emptyArray(type);
}
return text.getSpans(start, end, type);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getParagraphSpans
File: core/java/android/text/Layout.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-9452
|
MEDIUM
| 4.3
|
android
|
getParagraphSpans
|
core/java/android/text/Layout.java
|
3b6f84b77c30ec0bab5147b0cffc192c86ba2634
| 0
|
Analyze the following code function for security vulnerabilities
|
public @ColorInt int getContrastColor() {
return mContrastColor;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getContrastColor
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
getContrastColor
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setTempFolderPath(String tempFolderPath) {
this.tempFolderPath = tempFolderPath;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setTempFolderPath
File: samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
setTempFolderPath
|
samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
public AsyncHttpClientConfigBean setRedirectEnabled(boolean redirectEnabled) {
this.redirectEnabled = redirectEnabled;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setRedirectEnabled
File: api/src/main/java/org/asynchttpclient/AsyncHttpClientConfigBean.java
Repository: AsyncHttpClient/async-http-client
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2013-7397
|
MEDIUM
| 4.3
|
AsyncHttpClient/async-http-client
|
setRedirectEnabled
|
api/src/main/java/org/asynchttpclient/AsyncHttpClientConfigBean.java
|
df6ed70e86c8fc340ed75563e016c8baa94d7e72
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean hasUserRestriction(String restriction, int userId) {
return getUserManager().hasUserRestriction(restriction, userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasUserRestriction
File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40094
|
HIGH
| 7.8
|
android
|
hasUserRestriction
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setParent(StateNode parent) {
if (hasDetached()) {
this.parent = null;
return;
}
boolean attachedBefore = isRegistered();
boolean attachedAfter = false;
if (parent != null) {
assert this.parent == null
: "Node is already attached to a parent: " + this.parent;
assert parent.hasChildAssert(this);
if (isAncestorOf(parent)) {
throw new IllegalStateException(
"Can't set own child as parent");
}
attachedAfter = parent.isRegistered();
NodeOwner parentOwner = parent.getOwner();
if (parentOwner != owner && parentOwner instanceof StateTree) {
setTree((StateTree) parentOwner);
}
}
if (!attachedBefore && attachedAfter) {
this.parent = parent;
onAttach();
} else if (attachedBefore && !attachedAfter) {
onDetach();
this.parent = parent;
} else {
this.parent = parent;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setParent
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
|
setParent
|
flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java
|
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void dismissKeyboardShortcutsMenu() {
int msg = MSG_DISMISS_KEYBOARD_SHORTCUTS_MENU;
mHandler.removeMessages(msg);
mHandler.sendEmptyMessage(msg);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dismissKeyboardShortcutsMenu
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
|
dismissKeyboardShortcutsMenu
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void finishSubActivity(IBinder token, String resultWho, int requestCode) throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: finishSubActivity
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
finishSubActivity
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
private void addExtensionComponent(Component c) {
if (extensionComponents.add(c)) {
c.setParent(this);
markAsDirty();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addExtensionComponent
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
|
addExtensionComponent
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
@Transactional
@Override
public void fork(Project from, Project to) {
Project parent = to.getParent();
if (parent != null && parent.isNew())
create(parent);
dao.persist(to);
UserAuthorization authorization = new UserAuthorization();
authorization.setProject(to);
authorization.setUser(SecurityUtils.getUser());
authorization.setRole(roleManager.getOwner());
userAuthorizationManager.save(authorization);
FileUtils.cleanDir(to.getGitDir());
new CloneCommand(to.getGitDir()).mirror(true).from(from.getGitDir().getAbsolutePath()).call();
checkSanity(to);
commitInfoManager.cloneInfo(from, to);
avatarManager.copyAvatar(from, to);
if (from.getLfsObjectsDir().exists()) {
for (File file: FileUtils.listFiles(from.getLfsObjectsDir(), Sets.newHashSet("**"), Sets.newHashSet())) {
String objectId = file.getName();
Lock lock = from.getLfsObjectLock(objectId).readLock();
lock.lock();
try {
FileUtils.copyFile(file, to.getLfsObjectFile(objectId));
} catch (IOException e) {
throw new RuntimeException(e);
} finally {
lock.unlock();
}
}
}
listenerRegistry.post(new ProjectCreated(to));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fork
File: server-core/src/main/java/io/onedev/server/entitymanager/impl/DefaultProjectManager.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2022-39205
|
CRITICAL
| 9.8
|
theonedev/onedev
|
fork
|
server-core/src/main/java/io/onedev/server/entitymanager/impl/DefaultProjectManager.java
|
f1e97688e4e19d6de1dfa1d00e04655209d39f8e
| 0
|
Analyze the following code function for security vulnerabilities
|
public static Connection getConnection(String jdbcUrl, String user, String password, String driverClass) {
try {
Class.forName(driverClass);
return DriverManager.getConnection(jdbcUrl, user, password);
} catch (ClassNotFoundException | SQLException e) {
LOGGER.error(e);
}
return null;
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2019-16643
- Severity: LOW
- CVSS Score: 3.5
Description: Upgrade jar version & fix #54
Signed-off-by: xiaochun <xchun90@163.com>
Function: getConnection
File: common/src/main/java/com/zrlog/util/ZrLogUtil.java
Repository: 94fzb/zrlog
Fixed Code:
public static Connection getConnection(String jdbcUrl, String user, String password, String driverClass) {
try {
Class.forName(driverClass);
return DriverManager.getConnection(jdbcUrl, user, password);
} catch (ClassNotFoundException | SQLException e) {
LOGGER.error("",e);
}
return null;
}
|
[
"CWE-79"
] |
CVE-2019-16643
|
LOW
| 3.5
|
94fzb/zrlog
|
getConnection
|
common/src/main/java/com/zrlog/util/ZrLogUtil.java
|
4a91c83af669e31a22297c14f089d8911d353fa1
| 1
|
Analyze the following code function for security vulnerabilities
|
@NonNull
public Builder setCustomBigContentView(RemoteViews contentView) {
mN.bigContentView = contentView;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setCustomBigContentView
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
setCustomBigContentView
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
private @Nullable LocalDateTime getLocalDateTime(int i) throws SQLException {
byte[] value = getRawValue(i);
if (value == null) {
return null;
}
int col = i - 1;
int oid = fields[col].getOID();
if (oid == Oid.TIMESTAMP) {
if (isBinary(i)) {
return getTimestampUtils().toLocalDateTimeBin(value);
} else {
return getTimestampUtils().toLocalDateTime(castNonNull(getString(i)));
}
}
throw new PSQLException(
GT.tr("Cannot convert the column of type {0} to requested type {1}.",
Oid.toString(oid), "java.time.LocalDateTime"),
PSQLState.DATA_TYPE_MISMATCH);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLocalDateTime
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
|
getLocalDateTime
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void onPositionSizeChange() {
if(!superPeerMode) {
Form f = getComponentForm();
if (v.getVisibility() == View.INVISIBLE
&& f != null
&& Display.getInstance().getCurrent() == f) {
doSetVisibilityInternal(true);
return;
}
layoutPeer();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onPositionSizeChange
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
|
onPositionSizeChange
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
static void addHttp2Authority(@Nullable String authority, RequestHeadersBuilder out) {
// The authority MUST NOT include the deprecated "userinfo" subcomponent
if (authority != null) {
final String actualAuthority;
if (authority.isEmpty()) {
actualAuthority = "";
} else {
final int start = authority.indexOf('@') + 1;
if (start == 0) {
actualAuthority = authority;
} else if (authority.length() == start) {
throw new IllegalArgumentException("authority: " + authority);
} else {
actualAuthority = authority.substring(start);
}
}
out.add(HttpHeaderNames.AUTHORITY, actualAuthority);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addHttp2Authority
File: core/src/main/java/com/linecorp/armeria/internal/ArmeriaHttpUtil.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2019-16771
|
MEDIUM
| 5
|
line/armeria
|
addHttp2Authority
|
core/src/main/java/com/linecorp/armeria/internal/ArmeriaHttpUtil.java
|
b597f7a865a527a84ee3d6937075cfbb4470ed20
| 0
|
Analyze the following code function for security vulnerabilities
|
private HttpRequestBase constructHttpRequest(String method) {
switch (method){
case "POST":
return new HttpPost();
case "PUT":
return new HttpPut();
case "PATCH":
return new HttpPatch();
default:
throw new IllegalArgumentException("Invalid method supplied");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: constructHttpRequest
File: notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/client/DestinationHttpClient.java
Repository: opendistro-for-elasticsearch/alerting
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2021-31828
|
MEDIUM
| 5.5
|
opendistro-for-elasticsearch/alerting
|
constructHttpRequest
|
notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/client/DestinationHttpClient.java
|
49cc584dd6bd38ca26129eeaca5cd04e40a27f25
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setup(byte[] ad)
{
if (n == -1L)
throw new IllegalStateException("Nonce has wrapped around");
ChaChaCore.initIV(input, n++);
ChaChaCore.hash(output, input);
Arrays.fill(polyKey, (byte)0);
xorBlock(polyKey, 0, polyKey, 0, 32, output);
poly.reset(polyKey, 0);
if (ad != null) {
poly.update(ad, 0, ad.length);
poly.pad();
}
if (++(input[12]) == 0)
++(input[13]);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setup
File: src/main/java/com/southernstorm/noise/protocol/ChaChaPolyCipherState.java
Repository: rweather/noise-java
The code follows secure coding practices.
|
[
"CWE-125",
"CWE-787"
] |
CVE-2020-25021
|
HIGH
| 7.5
|
rweather/noise-java
|
setup
|
src/main/java/com/southernstorm/noise/protocol/ChaChaPolyCipherState.java
|
18e86b6f8bea7326934109aa9ffa705ebf4bde90
| 0
|
Analyze the following code function for security vulnerabilities
|
public static Frame fromBodyFragment(int channelNumber, byte[] body, int offset, int length)
throws IOException
{
Frame frame = new Frame(AMQP.FRAME_BODY, channelNumber);
DataOutputStream bodyOut = frame.getOutputStream();
bodyOut.write(body, offset, length);
return frame;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fromBodyFragment
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
|
fromBodyFragment
|
src/main/java/com/rabbitmq/client/impl/Frame.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
private void detachDataProviderListener() {
if (dataProviderUpdateRegistration != null) {
dataProviderUpdateRegistration.remove();
dataProviderUpdateRegistration = null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: detachDataProviderListener
File: server/src/main/java/com/vaadin/data/provider/DataCommunicator.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2021-33609
|
MEDIUM
| 4
|
vaadin/framework
|
detachDataProviderListener
|
server/src/main/java/com/vaadin/data/provider/DataCommunicator.java
|
9a93593d9f3802d2881fc8ad22dbc210d0d1d295
| 0
|
Analyze the following code function for security vulnerabilities
|
void setTurnScreenOn(boolean turnScreenOn) {
mTurnScreenOn = turnScreenOn;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setTurnScreenOn
File: services/core/java/com/android/server/wm/ActivityRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21145
|
HIGH
| 7.8
|
android
|
setTurnScreenOn
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setContentDirty(boolean contentDirty)
{
this.isContentDirty = contentDirty;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setContentDirty
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-26470
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
setContentDirty
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
public XMLDocumentHandler getDocumentHandler() {
return fDocumentHandler;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDocumentHandler
File: src/org/cyberneko/html/HTMLScanner.java
Repository: sparklemotion/nekohtml
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-24839
|
MEDIUM
| 5
|
sparklemotion/nekohtml
|
getDocumentHandler
|
src/org/cyberneko/html/HTMLScanner.java
|
a800fce3b079def130ed42a408ff1d09f89e773d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isActive() {
return active;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isActive
File: activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
Repository: apache/activemq
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-3576
|
MEDIUM
| 5
|
apache/activemq
|
isActive
|
activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
|
00921f2
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<ServerConfiguration> getServers() {
return servers;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getServers
File: samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
getServers
|
samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getIconFileName() {
if(Jenkins.getInstance().getSecurityRealm() instanceof HudsonPrivateSecurityRealm)
return "user.png";
else
return null; // not applicable now
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getIconFileName
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
|
getIconFileName
|
core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java
|
fbf96734470caba9364f04e0b77b0bae7293a1ec
| 0
|
Analyze the following code function for security vulnerabilities
|
private static Properties loadPropertiesFromFile(String filePath) {
Properties result = new Properties();
try {
FileInputStream inputStream = new FileInputStream(filePath);
try {
result.load(inputStream);
} finally {
inputStream.close();
}
} catch (Exception ex) {
ex.printStackTrace();
}
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: loadPropertiesFromFile
File: umlet-swing/src/main/java/com/baselet/control/config/handler/ConfigHandler.java
Repository: umlet
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000548
|
MEDIUM
| 6.8
|
umlet
|
loadPropertiesFromFile
|
umlet-swing/src/main/java/com/baselet/control/config/handler/ConfigHandler.java
|
e1c4cc6ae692cc8d1c367460dbf79343e996f9bd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getString(String key, String defaultValue, int userId) throws RemoteException {
checkReadPermission(key, userId);
return getStringUnchecked(key, defaultValue, userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getString
File: services/core/java/com/android/server/LockSettingsService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-255"
] |
CVE-2016-3749
|
MEDIUM
| 4.6
|
android
|
getString
|
services/core/java/com/android/server/LockSettingsService.java
|
e83f0f6a5a6f35323f5367f99c8e287c440f33f5
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getSocketOpt(int optionName, byte [] optionVal) throws IOException {
int ret = 0;
if (mSocketState == SocketState.CLOSED) throw new IOException("socket closed");
IBluetooth bluetoothProxy = BluetoothAdapter.getDefaultAdapter().getBluetoothService(null);
if (bluetoothProxy == null) {
Log.e(TAG, "getSocketOpt fail, reason: bluetooth is off");
return -1;
}
try {
if(VDBG) Log.d(TAG, "getSocketOpt(), mType: " + mType + " mPort: " + mPort);
ret = bluetoothProxy.getSocketOpt(mType, mPort, optionName, optionVal);
} catch (RemoteException e) {
Log.e(TAG, Log.getStackTraceString(new Throwable()));
return -1;
}
return ret;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSocketOpt
File: core/java/android/bluetooth/BluetoothSocket.java
Repository: Genymobile/f2ut_platform_frameworks_base
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2014-9908
|
LOW
| 3.3
|
Genymobile/f2ut_platform_frameworks_base
|
getSocketOpt
|
core/java/android/bluetooth/BluetoothSocket.java
|
f24cec326f5f65c693544fb0b92c37f633bacda2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public long getSize(T t, Class<?> type, Type genericType,
Annotation[] annotations,
MediaType mediaType) {
return -1;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSize
File: submarine-server/server-core/src/main/java/org/apache/submarine/server/rest/provider/YamlEntityProvider.java
Repository: apache/submarine
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2023-46302
|
CRITICAL
| 9.8
|
apache/submarine
|
getSize
|
submarine-server/server-core/src/main/java/org/apache/submarine/server/rest/provider/YamlEntityProvider.java
|
ed5ad3b824ba388259e0d1ea137d7fca5f0c288e
| 0
|
Analyze the following code function for security vulnerabilities
|
protected JNLPClassLoader addNextResource() throws LaunchException {
if (available.isEmpty()) {
for (int i = 1; i < loaders.length; i++) {
JNLPClassLoader result = loaders[i].addNextResource();
if (result != null) {
return result;
}
}
return null;
}
// add jar
List<JARDesc> jars = new ArrayList<>();
jars.add(available.get(0));
fillInPartJars(jars);
checkForMain(jars);
activateJars(jars);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addNextResource
File: core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
Repository: AdoptOpenJDK/IcedTea-Web
The code follows secure coding practices.
|
[
"CWE-345",
"CWE-94",
"CWE-22"
] |
CVE-2019-10182
|
MEDIUM
| 5.8
|
AdoptOpenJDK/IcedTea-Web
|
addNextResource
|
core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
|
e0818f521a0711aeec4b913b49b5fc6a52815662
| 0
|
Analyze the following code function for security vulnerabilities
|
private void doDelete(AsyncResult<SQLConnection> connection, String table, String where,
Handler<AsyncResult<UpdateResult>> replyHandler) {
try {
long start = System.nanoTime();
String sql = DELETE + FROM + schemaName + DOT + table + " " + where;
log.debug("doDelete query = " + sql);
if (connection.failed()) {
replyHandler.handle(Future.failedFuture(connection.cause()));
return;
}
connection.result().update(sql, query -> {
statsTracker(DELETE_STAT_METHOD, table, start);
if (query.failed()) {
log.error(query.cause().getMessage(), query.cause());
replyHandler.handle(Future.failedFuture(query.cause()));
return;
}
replyHandler.handle(Future.succeededFuture(query.result()));
});
} catch (Exception e) {
log.error(e.getMessage(), e);
replyHandler.handle(Future.failedFuture(e));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doDelete
File: domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
doDelete
|
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setProviders(List<PasspointProvider> providers) {
mProviders.clear();
for (PasspointProvider provider : providers) {
provider.enableVerboseLogging(mVerboseLoggingEnabled);
mProviders.put(provider.getConfig().getUniqueId(), provider);
if (provider.getPackageName() != null) {
startTrackingAppOpsChange(provider.getPackageName(),
provider.getCreatorUid());
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setProviders
File: service/java/com/android/server/wifi/hotspot2/PasspointManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-120"
] |
CVE-2023-21243
|
MEDIUM
| 5.5
|
android
|
setProviders
|
service/java/com/android/server/wifi/hotspot2/PasspointManager.java
|
5b49b8711efaadadf5052ba85288860c2d7ca7a6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void event(UserRequest ureq, Component source, Event event) {
// no events to catch
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: event
File: src/main/java/org/olat/core/commons/modules/bc/commands/CmdDelete.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-41152
|
MEDIUM
| 4
|
OpenOLAT
|
event
|
src/main/java/org/olat/core/commons/modules/bc/commands/CmdDelete.java
|
418bb509ffcb0e25ab4390563c6c47f0458583eb
| 0
|
Analyze the following code function for security vulnerabilities
|
public void dataChanged(final String packageName) {
final int callingUserHandle = UserHandle.getCallingUserId();
if (callingUserHandle != UserHandle.USER_OWNER) {
// App is running under a non-owner user profile. For now, we do not back
// up data from secondary user profiles.
// TODO: backups for all user profiles.
if (MORE_DEBUG) {
Slog.v(TAG, "dataChanged(" + packageName + ") ignored because it's user "
+ callingUserHandle);
}
return;
}
final HashSet<String> targets = dataChangedTargets(packageName);
if (targets == null) {
Slog.w(TAG, "dataChanged but no participant pkg='" + packageName + "'"
+ " uid=" + Binder.getCallingUid());
return;
}
mBackupHandler.post(new Runnable() {
public void run() {
dataChangedImpl(packageName, targets);
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dataChanged
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
|
dataChanged
|
services/backup/java/com/android/server/backup/BackupManagerService.java
|
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
| 0
|
Analyze the following code function for security vulnerabilities
|
public void initOutputConfig() {
logger.info("init output config module");
htmlRadioButton.setSelected(true);
jsonRadioButton.setSelected(false);
cliRadioButton.setSelected(false);
outputConfigButton.addActionListener(e -> {
refreshOutput();
if (LANG == CHINESE) {
JOptionPane.showMessageDialog(null, "设置输出成功");
} else {
JOptionPane.showMessageDialog(null, "Success");
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initOutputConfig
File: src/main/java/com/chaitin/xray/form/MainForm.java
Repository: 4ra1n/super-xray
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2022-41958
|
HIGH
| 7.8
|
4ra1n/super-xray
|
initOutputConfig
|
src/main/java/com/chaitin/xray/form/MainForm.java
|
4d0d59663596db03f39d7edd2be251d48b52dcfc
| 0
|
Analyze the following code function for security vulnerabilities
|
private void process(final Path in, final Path out) {
try (final Reader reader = Files.newBufferedReader(in, StreamUtil.DEFAULT_CHARSET);
final Writer writer = Files.newBufferedWriter(out, StreamUtil.DEFAULT_CHARSET)) {
final TransformerHandler th = XMLUtil.createTransformerHandler(true);
th.setResult(new StreamResult(writer));
SAXParser parser = null;
try {
parser = PARSER_FACTORY.newSAXParser();
} catch (final ParserConfigurationException e) {
throw ProcessException.wrap(e);
}
final SafeXMLFilter filter = new SafeXMLFilter();
filter.setContentHandler(new XMLFilterContentHandlerAdaptor(th));
final LocationFactory locationFactory = new DefaultLocationFactory();
final XMLReader xmlReader = parser.getXMLReader();
xmlReader.setContentHandler(filter);
xmlReader.setErrorHandler(new ErrorHandlerAdaptor("XMLReader", locationFactory, new FatalErrorReceiver()));
xmlReader.parse(new InputSource(reader));
} catch (final Exception e) {
System.out.println("Error processing file: " + FileUtil.getCanonicalPath(in));
e.printStackTrace();
}
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2018-1000651
- Severity: HIGH
- CVSS Score: 7.5
Description: gh-813 Turn on secure processing feature for XML parsers etc
Function: process
File: stroom-pipeline/src/test/java/stroom/util/Sanitiser.java
Repository: gchq/stroom
Fixed Code:
private void process(final Path in, final Path out) {
try (final Reader reader = Files.newBufferedReader(in, StreamUtil.DEFAULT_CHARSET);
final Writer writer = Files.newBufferedWriter(out, StreamUtil.DEFAULT_CHARSET)) {
final TransformerHandler th = XMLUtil.createTransformerHandler(true);
th.setResult(new StreamResult(writer));
SAXParser parser;
try {
parser = PARSER_FACTORY.newSAXParser();
} catch (final ParserConfigurationException e) {
throw ProcessException.wrap(e);
}
final SafeXMLFilter filter = new SafeXMLFilter();
filter.setContentHandler(new XMLFilterContentHandlerAdaptor(th));
final LocationFactory locationFactory = new DefaultLocationFactory();
final XMLReader xmlReader = parser.getXMLReader();
xmlReader.setContentHandler(filter);
xmlReader.setErrorHandler(new ErrorHandlerAdaptor("XMLReader", locationFactory, new FatalErrorReceiver()));
xmlReader.parse(new InputSource(reader));
} catch (final Exception e) {
System.out.println("Error processing file: " + FileUtil.getCanonicalPath(in));
e.printStackTrace();
}
}
|
[
"CWE-611"
] |
CVE-2018-1000651
|
HIGH
| 7.5
|
gchq/stroom
|
process
|
stroom-pipeline/src/test/java/stroom/util/Sanitiser.java
|
ba30ffd415bd7d32ee40ba4b04035267ce80b499
| 1
|
Analyze the following code function for security vulnerabilities
|
private Element createXmlElementForGridElement(Document doc, GridElement e) {
// insert normal entity element
java.lang.Class<? extends GridElement> c = e.getClass();
String sElType = c.getName();
String sElPanelAttributes = e.getPanelAttributes();
String sElAdditionalAttributes = e.getAdditionalAttributes();
Element el = doc.createElement("element");
if (e instanceof NewGridElement) {
Element elType = doc.createElement("id");
elType.appendChild(doc.createTextNode(((NewGridElement) e).getId().toString()));
el.appendChild(elType);
}
else { // OldGridElement
Element elType = doc.createElement("type");
elType.appendChild(doc.createTextNode(sElType));
el.appendChild(elType);
}
Element elCoor = doc.createElement("coordinates");
el.appendChild(elCoor);
Element elX = doc.createElement("x");
elX.appendChild(doc.createTextNode("" + e.getRectangle().x));
elCoor.appendChild(elX);
Element elY = doc.createElement("y");
elY.appendChild(doc.createTextNode("" + e.getRectangle().y));
elCoor.appendChild(elY);
Element elW = doc.createElement("w");
elW.appendChild(doc.createTextNode("" + e.getRectangle().width));
elCoor.appendChild(elW);
Element elH = doc.createElement("h");
elH.appendChild(doc.createTextNode("" + e.getRectangle().height));
elCoor.appendChild(elH);
Element elPA = doc.createElement("panel_attributes");
elPA.appendChild(doc.createTextNode(sElPanelAttributes));
el.appendChild(elPA);
Element elAA = doc.createElement("additional_attributes");
elAA.appendChild(doc.createTextNode(sElAdditionalAttributes));
el.appendChild(elAA);
if (e instanceof CustomElement) {
Element elCO = doc.createElement("custom_code");
elCO.appendChild(doc.createTextNode(((CustomElement) e).getCode()));
el.appendChild(elCO);
}
return el;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createXmlElementForGridElement
File: umlet-swing/src/main/java/com/baselet/diagram/io/DiagramFileHandler.java
Repository: umlet
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000548
|
MEDIUM
| 6.8
|
umlet
|
createXmlElementForGridElement
|
umlet-swing/src/main/java/com/baselet/diagram/io/DiagramFileHandler.java
|
e1c4cc6ae692cc8d1c367460dbf79343e996f9bd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isCaCertApproved(String alias, int userId) {
Preconditions.checkCallAuthorization(canManageUsers(getCallerIdentity()));
synchronized (getLockObject()) {
return getUserData(userId).mAcceptedCaCertificates.contains(alias);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isCaCertApproved
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2023-21284
|
MEDIUM
| 5.5
|
android
|
isCaCertApproved
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
private static String getServerX509KeyType(long sslCipherNative) throws SSLException {
String kx_name = NativeCrypto.SSL_CIPHER_get_kx_name(sslCipherNative);
if (kx_name.equals("RSA") || kx_name.equals("DHE_RSA") || kx_name.equals("ECDHE_RSA")) {
return KEY_TYPE_RSA;
} else if (kx_name.equals("ECDHE_ECDSA")) {
return KEY_TYPE_EC;
} else if (kx_name.equals("ECDH_RSA")) {
return KEY_TYPE_EC_RSA;
} else if (kx_name.equals("ECDH_ECDSA")) {
return KEY_TYPE_EC_EC;
} else if (kx_name.equals("DH_RSA")) {
return KEY_TYPE_DH_RSA;
} else {
return null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getServerX509KeyType
File: src/main/java/org/conscrypt/SSLParametersImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3840
|
HIGH
| 10
|
android
|
getServerX509KeyType
|
src/main/java/org/conscrypt/SSLParametersImpl.java
|
5af5e93463f4333187e7e35f3bd2b846654aa214
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void notifyPinnedStackAnimationStarted() {
mTaskChangeNotificationController.notifyPinnedStackAnimationStarted();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: notifyPinnedStackAnimationStarted
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
|
notifyPinnedStackAnimationStarted
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.