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
|
void go() {
if (lastRi != curRi) {
ActivityInfo ai = ris.get(curRi).activityInfo;
ComponentName comp = new ComponentName(ai.packageName, ai.name);
intent.setComponent(comp);
doneReceivers.add(comp);
lastRi = curRi;
CharSequence label = ai.loadLabel(mContext.getPackageManager());
showBootMessage(mContext.getString(R.string.android_preparing_apk, label), false);
}
Slog.i(TAG, "Pre-boot of " + intent.getComponent().toShortString()
+ " for user " + users[curUser]);
EventLogTags.writeAmPreBoot(users[curUser], intent.getComponent().getPackageName());
broadcastIntentLocked(null, null, intent, null, this,
0, null, null, null, AppOpsManager.OP_NONE,
null, true, false, MY_PID, Process.SYSTEM_UID, users[curUser]);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: go
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2500
|
MEDIUM
| 4.3
|
android
|
go
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
9878bb99b77c3681f0fda116e2964bac26f349c3
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getUserErrorMessage() {
return userErrorMessage;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserErrorMessage
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
|
getUserErrorMessage
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isIgnoredSpaceForNotifications(Profile profile, String space) {
return profile != null && !profile.getFavspaces().isEmpty() && !profile.getFavspaces().contains(getSpaceId(space));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isIgnoredSpaceForNotifications
File: src/main/java/com/erudika/scoold/utils/ScooldUtils.java
Repository: Erudika/scoold
The code follows secure coding practices.
|
[
"CWE-130"
] |
CVE-2022-1543
|
MEDIUM
| 6.5
|
Erudika/scoold
|
isIgnoredSpaceForNotifications
|
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
private Map<JobKey, List<MutableTrigger>> buildTriggersByFQJobNameMap(List<MutableTrigger> triggers) {
Map<JobKey, List<MutableTrigger>> triggersByFQJobName = new HashMap<JobKey, List<MutableTrigger>>();
for(MutableTrigger trigger: triggers) {
List<MutableTrigger> triggersOfJob = triggersByFQJobName.get(trigger.getJobKey());
if(triggersOfJob == null) {
triggersOfJob = new LinkedList<MutableTrigger>();
triggersByFQJobName.put(trigger.getJobKey(), triggersOfJob);
}
triggersOfJob.add(trigger);
}
return triggersByFQJobName;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: buildTriggersByFQJobNameMap
File: quartz-core/src/main/java/org/quartz/xml/XMLSchedulingDataProcessor.java
Repository: quartz-scheduler/quartz
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2019-13990
|
HIGH
| 7.5
|
quartz-scheduler/quartz
|
buildTriggersByFQJobNameMap
|
quartz-core/src/main/java/org/quartz/xml/XMLSchedulingDataProcessor.java
|
a1395ba118df306c7fe67c24fb0c9a95a4473140
| 0
|
Analyze the following code function for security vulnerabilities
|
private native boolean startDiscoveryNative();
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startDiscoveryNative
File: src/com/android/bluetooth/btservice/AdapterService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-362",
"CWE-20"
] |
CVE-2016-3760
|
MEDIUM
| 5.4
|
android
|
startDiscoveryNative
|
src/com/android/bluetooth/btservice/AdapterService.java
|
122feb9a0b04290f55183ff2f0384c6c53756bd8
| 0
|
Analyze the following code function for security vulnerabilities
|
final StandardTemplateParams promotedPicture(Icon promotedPicture) {
this.mPromotedPicture = promotedPicture;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: promotedPicture
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
promotedPicture
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getLaunchedFromUid(IBinder activityToken) throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLaunchedFromUid
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
getLaunchedFromUid
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getOrderBy() {
return orderBy;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getOrderBy
File: src/main/java/com/github/pagehelper/Page.java
Repository: pagehelper/Mybatis-PageHelper
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-28111
|
HIGH
| 7.5
|
pagehelper/Mybatis-PageHelper
|
getOrderBy
|
src/main/java/com/github/pagehelper/Page.java
|
554a524af2d2b30d09505516adc412468a84d8fa
| 0
|
Analyze the following code function for security vulnerabilities
|
@Get("regex:/projects/(?<projectName>[^/]+)/repos/(?<repoName>[^/]+)/contents(?<path>(|/.*))$")
public CompletableFuture<?> getFiles(
ServiceRequestContext ctx,
@Param String path, @Param @Default("-1") String revision,
Repository repository,
@RequestConverter(WatchRequestConverter.class) @Nullable WatchRequest watchRequest,
@RequestConverter(QueryRequestConverter.class) @Nullable Query<?> query) {
final String normalizedPath = normalizePath(path);
// watch repository or a file
if (watchRequest != null) {
final Revision lastKnownRevision = watchRequest.lastKnownRevision();
final long timeOutMillis = watchRequest.timeoutMillis();
if (query != null) {
return watchFile(ctx, repository, lastKnownRevision, query, timeOutMillis);
}
return watchRepository(ctx, repository, lastKnownRevision, normalizedPath, timeOutMillis);
}
final Revision normalizedRev = repository.normalizeNow(new Revision(revision));
if (query != null) {
// get a file
return repository.get(normalizedRev, query)
.handle(returnOrThrow((Entry<?> result) -> convert(repository, normalizedRev,
result, true)));
}
// get files
final CompletableFuture<List<EntryDto<?>>> future = new CompletableFuture<>();
listFiles(repository, normalizedPath, normalizedRev, true, future);
return future;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFiles
File: server/src/main/java/com/linecorp/centraldogma/server/internal/api/ContentServiceV1.java
Repository: line/centraldogma
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2021-38388
|
MEDIUM
| 6.5
|
line/centraldogma
|
getFiles
|
server/src/main/java/com/linecorp/centraldogma/server/internal/api/ContentServiceV1.java
|
6a395aed73f0b009cf8174a3ebf3ed826521c11d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable
private List<String> getDelegatedShellPermissionsInternal() {
synchronized (mLock) {
if (mCheckPermissionDelegate == null) {
return Collections.EMPTY_LIST;
}
return mCheckPermissionDelegate.getDelegatedPermissionNames();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDelegatedShellPermissionsInternal
File: services/core/java/com/android/server/pm/permission/PermissionManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-281"
] |
CVE-2023-21249
|
MEDIUM
| 5.5
|
android
|
getDelegatedShellPermissionsInternal
|
services/core/java/com/android/server/pm/permission/PermissionManagerService.java
|
c00b7e7dbc1fa30339adef693d02a51254755d7f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public DescriptorImpl getDescriptor() {
return (DescriptorImpl)super.getDescriptor();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDescriptor
File: src/main/java/hudson/scm/SubversionSCM.java
Repository: jenkinsci/subversion-plugin
The code follows secure coding practices.
|
[
"CWE-255"
] |
CVE-2013-6372
|
LOW
| 2.1
|
jenkinsci/subversion-plugin
|
getDescriptor
|
src/main/java/hudson/scm/SubversionSCM.java
|
7d4562d6f7e40de04bbe29577b51c79f07d05ba6
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setMessage(String message) {
this.message = parser.parseExpression(message, ParserContext.TEMPLATE_EXPRESSION);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setMessage
File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/DingTalkNotifier.java
Repository: codecentric/spring-boot-admin
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2022-46166
|
CRITICAL
| 9.8
|
codecentric/spring-boot-admin
|
setMessage
|
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/DingTalkNotifier.java
|
c14c3ec12533f71f84de9ce3ce5ceb7991975f75
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isJsonMime(String mime) {
String jsonMime = "(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$";
return mime != null && (mime.matches(jsonMime) || mime.equals("*/*"));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isJsonMime
File: samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
isJsonMime
|
samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
protected AMQConnection createConnection(ConnectionParams params, FrameHandler frameHandler, MetricsCollector metricsCollector) {
return new AMQConnection(params, frameHandler, metricsCollector);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createConnection
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
|
createConnection
|
src/main/java/com/rabbitmq/client/ConnectionFactory.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isContextual() {
return mIsContextual;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isContextual
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
isContextual
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean canReadPrivilegedPhoneState(String callingPackage, String message) {
// The system/default dialer can always read phone state - so that emergency calls will
// still work.
if (isPrivilegedDialerCalling(callingPackage)) {
return true;
}
mContext.enforceCallingOrSelfPermission(READ_PRIVILEGED_PHONE_STATE, message);
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: canReadPrivilegedPhoneState
File: src/com/android/server/telecom/TelecomServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21394
|
MEDIUM
| 5.5
|
android
|
canReadPrivilegedPhoneState
|
src/com/android/server/telecom/TelecomServiceImpl.java
|
68dca62035c49e14ad26a54f614199cb29a3393f
| 0
|
Analyze the following code function for security vulnerabilities
|
private void parseMathExpression(Element e, boolean inRightOfPrevious, XmlSerializer serializer) throws Exception
{
final List<Element> elements = XmlUtils.getElements(e);
final Element input = XmlUtils.getElement(elements, "input");
final Element result = XmlUtils.getElement(elements, "result");
if (input == null)
{
return;
}
if (result == null)
{
parseEquation(input, inRightOfPrevious, serializer);
}
else
{
parseResult(input, result, inRightOfPrevious, serializer);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseMathExpression
File: app/src/main/java/com/mkulesh/micromath/io/ImportFromSMathStudio.java
Repository: mkulesh/microMathematics
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000821
|
HIGH
| 7.5
|
mkulesh/microMathematics
|
parseMathExpression
|
app/src/main/java/com/mkulesh/micromath/io/ImportFromSMathStudio.java
|
5c05ac8de16c569ff0a1816f20be235090d3dd9d
| 0
|
Analyze the following code function for security vulnerabilities
|
@TestApi
public void forceUpdateUserSetupComplete(@UserIdInt int userId) {
try {
mService.forceUpdateUserSetupComplete(userId);
} catch (RemoteException re) {
throw re.rethrowFromSystemServer();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: forceUpdateUserSetupComplete
File: core/java/android/app/admin/DevicePolicyManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
forceUpdateUserSetupComplete
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void restoreMinimizedApplication() {
if (getActivity() != null) {
Intent i = new Intent(getActivity(), getActivity().getClass());
i.setAction(Intent.ACTION_MAIN);
i.addCategory(Intent.CATEGORY_LAUNCHER);
getContext().startActivity(i);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: restoreMinimizedApplication
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
|
restoreMinimizedApplication
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public <T extends NodeFeature> Optional<T> getFeatureIfInitialized(
Class<T> featureType) {
if (features == null) {
return Optional.empty();
}
int featureIndex = getFeatureIndex(featureType);
if (features instanceof NodeFeature) {
if (featureIndex == 0) {
return Optional.of(featureType.cast(features));
} else {
return Optional.empty();
}
}
NodeFeature[] featuresArray = (NodeFeature[]) features;
if (featureIndex >= featuresArray.length) {
return Optional.empty();
}
return Optional.ofNullable(featuresArray[featureIndex])
.map(featureType::cast);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFeatureIfInitialized
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
|
getFeatureIfInitialized
|
flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java
|
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setNotAfter(String notAfter) {
this.notAfter = notAfter;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setNotAfter
File: base/common/src/main/java/com/netscape/certsrv/cert/CertData.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
setNotAfter
|
base/common/src/main/java/com/netscape/certsrv/cert/CertData.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Object deriveTrueTypeFont(Object font, float size, int weight) {
NativeFont fnt = (NativeFont)font;
CodenameOneTextPaint paint = (CodenameOneTextPaint)fnt.font;
paint.setAntiAlias(true);
Typeface type = paint.getTypeface();
int fontstyle = Typeface.NORMAL;
if ((weight & Font.STYLE_BOLD) != 0 || type.isBold()) {
fontstyle |= Typeface.BOLD;
}
if ((weight & Font.STYLE_ITALIC) != 0 || type.isItalic()) {
fontstyle |= Typeface.ITALIC;
}
type = Typeface.create(type, fontstyle);
CodenameOneTextPaint newPaint = new CodenameOneTextPaint(type);
newPaint.setTextSize(size);
newPaint.setAntiAlias(true);
NativeFont n = new NativeFont(com.codename1.ui.Font.FACE_SYSTEM, weight, com.codename1.ui.Font.SIZE_MEDIUM, newPaint, fnt.fileName, size, weight);
return n;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deriveTrueTypeFont
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
|
deriveTrueTypeFont
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String getParent(final String path) {
int length = path.length(), firstInPath = 0;
if (File.separatorChar == '\\' && length > 2 && path.charAt(1) == ':') {
firstInPath = 2;
}
int index = path.lastIndexOf(File.separatorChar);
if (index == -1 && firstInPath > 0) {
index = 2;
}
if (index == -1 || path.charAt(length - 1) == File.separatorChar) {
return null;
}
if (path.indexOf(File.separatorChar) == index
&& path.charAt(firstInPath) == File.separatorChar) {
return path.substring(0, index + 1);
}
return path.substring(0, index);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getParent
File: library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java
Repository: lingochamp/FileDownloader
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-11248
|
HIGH
| 7.5
|
lingochamp/FileDownloader
|
getParent
|
library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java
|
b023cc081bbecdd2a9f3549a3ae5c12a9647ed7f
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean checkAccess(String docname, String right)
{
try {
DocumentReference docReference = getCurrentMixedDocumentReferenceResolver().resolve(docname);
XWikiDocument doc = getXWikiContext().getWiki().getDocument(docReference, this.context);
return getXWikiContext().getWiki().checkAccess(right, doc, getXWikiContext());
} catch (XWikiException e) {
return false;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkAccess
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2023-37911
|
MEDIUM
| 6.5
|
xwiki/xwiki-platform
|
checkAccess
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
|
f471f2a392aeeb9e51d59fdfe1d76fccf532523f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getLockTaskModeState() {
synchronized (this) {
return mLockTaskController.getLockTaskModeState();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLockTaskModeState
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
|
getLockTaskModeState
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public User getUser(final String name) throws IOException {
update();
m_readLock.lock();
try {
return _getUser(name);
} finally {
m_readLock.unlock();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUser
File: opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
Repository: OpenNMS/opennms
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2021-25931
|
MEDIUM
| 6.8
|
OpenNMS/opennms
|
getUser
|
opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
|
607151ea8f90212a3fb37c977fa57c7d58d26a84
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean isFile(String fileName) {
return SupportedProtocols.from(fileName) == SupportedProtocols.file;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isFile
File: core/src/main/java/apoc/util/FileUtils.java
Repository: neo4j-contrib/neo4j-apoc-procedures
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-23532
|
MEDIUM
| 6.5
|
neo4j-contrib/neo4j-apoc-procedures
|
isFile
|
core/src/main/java/apoc/util/FileUtils.java
|
01e63ed2d187cd2a8aa1d78bf831ef0fdd69b522
| 0
|
Analyze the following code function for security vulnerabilities
|
private void writeBitmapLocked(UserInfo info, Bitmap bitmap) {
try {
File dir = new File(mUsersDir, Integer.toString(info.id));
File file = new File(dir, USER_PHOTO_FILENAME);
File tmp = new File(dir, USER_PHOTO_FILENAME_TMP);
if (!dir.exists()) {
dir.mkdir();
FileUtils.setPermissions(
dir.getPath(),
FileUtils.S_IRWXU|FileUtils.S_IRWXG|FileUtils.S_IXOTH,
-1, -1);
}
FileOutputStream os;
if (bitmap.compress(Bitmap.CompressFormat.PNG, 100, os = new FileOutputStream(tmp))
&& tmp.renameTo(file)) {
info.iconPath = file.getAbsolutePath();
}
try {
os.close();
} catch (IOException ioe) {
// What the ... !
}
tmp.delete();
} catch (FileNotFoundException e) {
Slog.w(LOG_TAG, "Error setting photo for user ", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeBitmapLocked
File: services/core/java/com/android/server/pm/UserManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2457
|
LOW
| 2.1
|
android
|
writeBitmapLocked
|
services/core/java/com/android/server/pm/UserManagerService.java
|
12332e05f632794e18ea8c4ac52c98e82532e5db
| 0
|
Analyze the following code function for security vulnerabilities
|
private void validateSPTemplateExists(String oldTemplateName, SpTemplate spTemplate, String tenantDomain)
throws IdentityApplicationManagementException {
if (!oldTemplateName.equals(spTemplate.getName())) {
validateSPTemplateExists(spTemplate, tenantDomain);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: validateSPTemplateExists
File: components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
Repository: wso2/carbon-identity-framework
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-42646
|
MEDIUM
| 6.4
|
wso2/carbon-identity-framework
|
validateSPTemplateExists
|
components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
|
e9119883ee02a884f3c76c7bbc4022a4f4c58fc0
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean startBinderTracking() throws RemoteException {
// TODO: hijacking SET_ACTIVITY_WATCHER, but should be changed to its own
// permission (same as profileControl).
if (checkCallingPermission(android.Manifest.permission.SET_ACTIVITY_WATCHER)
!= PackageManager.PERMISSION_GRANTED) {
throw new SecurityException("Requires permission "
+ android.Manifest.permission.SET_ACTIVITY_WATCHER);
}
synchronized (mProcLock) {
mBinderTransactionTrackingEnabled = true;
mProcessList.forEachLruProcessesLOSP(true, process -> {
final IApplicationThread thread = process.getThread();
if (!processSanityChecksLPr(process, thread)) {
return;
}
try {
thread.startBinderTracking();
} catch (RemoteException e) {
Log.v(TAG, "Process disappared");
}
});
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startBinderTracking
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
|
startBinderTracking
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isDarkModeEnabled() {
return CONF.darkModeEnabled();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isDarkModeEnabled
File: src/main/java/com/erudika/scoold/utils/ScooldUtils.java
Repository: Erudika/scoold
The code follows secure coding practices.
|
[
"CWE-130"
] |
CVE-2022-1543
|
MEDIUM
| 6.5
|
Erudika/scoold
|
isDarkModeEnabled
|
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
private native void nativeInit();
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nativeInit
File: chrome/android/java/src/org/chromium/chrome/browser/Tab.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
nativeInit
|
chrome/android/java/src/org/chromium/chrome/browser/Tab.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
public static Path expandIfZip(Path filePath) throws IOException {
if (!isZipFile(filePath)) {
return filePath;
}
FileTime pluginZipDate = Files.getLastModifiedTime(filePath);
String fileName = filePath.getFileName().toString();
String directoryName = fileName.substring(0, fileName.lastIndexOf("."));
Path pluginDirectory = filePath.resolveSibling(directoryName);
// Check whether directory traversal risks exist in the path
if (!isInvalidPath(pluginDirectory)) {
throw new SecurityException("Invalid destination directory");
}
if (!Files.exists(pluginDirectory) || pluginZipDate.compareTo(Files.getLastModifiedTime(pluginDirectory)) > 0) {
// expand '.zip' file
Unzip unzip = new Unzip();
unzip.setSource(filePath.toFile());
unzip.setDestination(pluginDirectory.toFile());
unzip.extract();
log.info("Expanded plugin zip '{}' in '{}'", filePath.getFileName(), pluginDirectory.getFileName());
}
return pluginDirectory;
}
|
Vulnerability Classification:
- CWE: CWE-22
- CVE: CVE-2023-40827
- Severity: HIGH
- CVSS Score: 7.5
Description: Add security checks to prevent directory traversal when decompressing
Function: expandIfZip
File: pf4j/src/main/java/org/pf4j/util/FileUtils.java
Repository: pf4j
Fixed Code:
public static Path expandIfZip(Path filePath) throws IOException {
if (!isZipFile(filePath)) {
return filePath;
}
FileTime pluginZipDate = Files.getLastModifiedTime(filePath);
String fileName = filePath.getFileName().toString();
String directoryName = fileName.substring(0, fileName.lastIndexOf("."));
Path pluginDirectory = filePath.resolveSibling(directoryName);
if (!Files.exists(pluginDirectory) || pluginZipDate.compareTo(Files.getLastModifiedTime(pluginDirectory)) > 0) {
// expand '.zip' file
Unzip unzip = new Unzip();
unzip.setSource(filePath.toFile());
unzip.setDestination(pluginDirectory.toFile());
unzip.extract();
log.info("Expanded plugin zip '{}' in '{}'", filePath.getFileName(), pluginDirectory.getFileName());
}
return pluginDirectory;
}
|
[
"CWE-22"
] |
CVE-2023-40827
|
HIGH
| 7.5
|
pf4j
|
expandIfZip
|
pf4j/src/main/java/org/pf4j/util/FileUtils.java
|
ed9392069fe14c6c30d9f876710e5ad40f7ea8c1
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override public long contentLength() throws IOException {
return delegate.contentLength();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: contentLength
File: retrofit/src/main/java/retrofit2/RequestBuilder.java
Repository: square/retrofit
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-1000850
|
MEDIUM
| 6.4
|
square/retrofit
|
contentLength
|
retrofit/src/main/java/retrofit2/RequestBuilder.java
|
b9a7f6ad72073ddd40254c0058710e87a073047d
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isEphemeralUser(@NonNull ComponentName admin) {
throwIfParentInstance("isEphemeralUser");
try {
return mService.isEphemeralUser(admin);
} catch (RemoteException re) {
throw re.rethrowFromSystemServer();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isEphemeralUser
File: core/java/android/app/admin/DevicePolicyManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
isEphemeralUser
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean canReadPhoneNumbers(String callingPackage, String callingFeatureId,
String message) {
boolean targetSdkPreR = false;
int uid = Binder.getCallingUid();
try {
ApplicationInfo applicationInfo = mPackageManager.getApplicationInfoAsUser(
callingPackage, 0, UserHandle.getUserHandleForUid(Binder.getCallingUid()));
targetSdkPreR = applicationInfo != null
&& applicationInfo.targetSdkVersion < Build.VERSION_CODES.R;
} catch (PackageManager.NameNotFoundException e) {
// In the case that the PackageManager cannot find the specified calling package apply
// the more restrictive target R+ requirements.
}
// Apps targeting pre-R can access phone numbers via READ_PHONE_STATE
if (targetSdkPreR) {
try {
return canReadPhoneState(callingPackage, callingFeatureId, message);
} catch (SecurityException e) {
// Apps targeting pre-R can still access phone numbers via the additional checks
// below.
}
} else {
// The system/default dialer can always read phone state - so that emergency calls will
// still work.
if (isPrivilegedDialerCalling(callingPackage)) {
return true;
}
if (mContext.checkCallingOrSelfPermission(READ_PRIVILEGED_PHONE_STATE)
== PackageManager.PERMISSION_GRANTED) {
return true;
}
}
if (mContext.checkCallingOrSelfPermission(READ_PHONE_NUMBERS)
== PackageManager.PERMISSION_GRANTED && mAppOpsManager.noteOpNoThrow(
AppOpsManager.OPSTR_READ_PHONE_NUMBERS, uid, callingPackage, callingFeatureId,
message) == AppOpsManager.MODE_ALLOWED) {
return true;
}
if (mContext.checkCallingOrSelfPermission(READ_SMS) == PackageManager.PERMISSION_GRANTED
&& mAppOpsManager.noteOpNoThrow(AppOpsManager.OPSTR_READ_SMS, uid, callingPackage,
callingFeatureId, message) == AppOpsManager.MODE_ALLOWED) {
return true;
}
// The default SMS app with the WRITE_SMS appop granted can access phone numbers.
if (mAppOpsManager.noteOpNoThrow(AppOpsManager.OPSTR_WRITE_SMS, uid, callingPackage,
callingFeatureId, message) == AppOpsManager.MODE_ALLOWED) {
return true;
}
throw new SecurityException("Package " + callingPackage
+ " does not meet the requirements to access the phone number");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: canReadPhoneNumbers
File: src/com/android/server/telecom/TelecomServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21394
|
MEDIUM
| 5.5
|
android
|
canReadPhoneNumbers
|
src/com/android/server/telecom/TelecomServiceImpl.java
|
68dca62035c49e14ad26a54f614199cb29a3393f
| 0
|
Analyze the following code function for security vulnerabilities
|
private void writeStatusLocked() {
if (Log.isLoggable(TAG_FILE, Log.VERBOSE)) {
Log.v(TAG_FILE, "Writing new " + mStatusFile.getBaseFile());
}
// The file is being written, so we don't need to have a scheduled
// write until the next change.
removeMessages(MSG_WRITE_STATUS);
FileOutputStream fos = null;
try {
fos = mStatusFile.startWrite();
Parcel out = Parcel.obtain();
final int N = mSyncStatus.size();
for (int i=0; i<N; i++) {
SyncStatusInfo status = mSyncStatus.valueAt(i);
out.writeInt(STATUS_FILE_ITEM);
status.writeToParcel(out, 0);
}
out.writeInt(STATUS_FILE_END);
fos.write(out.marshall());
out.recycle();
mStatusFile.finishWrite(fos);
} catch (java.io.IOException e1) {
Log.w(TAG, "Error writing status", e1);
if (fos != null) {
mStatusFile.failWrite(fos);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeStatusLocked
File: services/core/java/com/android/server/content/SyncStorageEngine.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2016-2424
|
HIGH
| 7.1
|
android
|
writeStatusLocked
|
services/core/java/com/android/server/content/SyncStorageEngine.java
|
d3383d5bfab296ba3adbc121ff8a7b542bde4afb
| 0
|
Analyze the following code function for security vulnerabilities
|
public GetMethod executeGet(Object resourceURI, EntityReference reference) throws Exception
{
return executeGet(resourceURI, toElements(reference));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: executeGet
File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2023-35166
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
executeGet
|
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
|
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
| 0
|
Analyze the following code function for security vulnerabilities
|
public void scheduleBroadcastsLocked() {
if (DEBUG_BROADCAST) Slog.v(TAG_BROADCAST, "Schedule broadcasts ["
+ mQueueName + "]: current="
+ mBroadcastsScheduled);
if (mBroadcastsScheduled) {
return;
}
mHandler.sendMessage(mHandler.obtainMessage(BROADCAST_INTENT_MSG, this));
mBroadcastsScheduled = true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: scheduleBroadcastsLocked
File: services/core/java/com/android/server/am/BroadcastQueue.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3912
|
HIGH
| 9.3
|
android
|
scheduleBroadcastsLocked
|
services/core/java/com/android/server/am/BroadcastQueue.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isManageable() {
return manageable;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isManageable
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
|
isManageable
|
activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
|
00921f2
| 0
|
Analyze the following code function for security vulnerabilities
|
public static File getConvertedMarkedFile(final Context context) {
return new File(context.getFilesDir().getAbsolutePath() + File.separator
+ INTERNAL_DOCUMENT_NAME, OLD_FILE_CONVERTED_FILE_NAME);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getConvertedMarkedFile
File: library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java
Repository: lingochamp/FileDownloader
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-11248
|
HIGH
| 7.5
|
lingochamp/FileDownloader
|
getConvertedMarkedFile
|
library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java
|
b023cc081bbecdd2a9f3549a3ae5c12a9647ed7f
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getContent() {
return content;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getContent
File: server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/OHttpResponse.java
Repository: orientechnologies/orientdb
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2015-2912
|
MEDIUM
| 6.8
|
orientechnologies/orientdb
|
getContent
|
server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/OHttpResponse.java
|
d5a45e608ba8764fd817c1bdd7cf966564e828e9
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String getFilePath(String path) {
String contextPath = this.get.get("contextPath");
// 根目录
if (StrUtils.isEmpty(contextPath)) {
return path;
}
if (path.startsWith(contextPath)) {
path = path.replaceFirst(contextPath, "");
}
return path;
}
|
Vulnerability Classification:
- CWE: CWE-74
- CVE: CVE-2021-37262
- Severity: MEDIUM
- CVSS Score: 5.0
Description: Fix unsafe `replaceFirst` call
Function: getFilePath
File: src/main/java/com/jflyfox/modules/filemanager/FileManager.java
Repository: jflyfox/jfinal_cms
Fixed Code:
protected String getFilePath(String path) {
String contextPath = this.get.get("contextPath");
// 根目录
if (StrUtils.isEmpty(contextPath)) {
return path;
}
if (path.startsWith(contextPath)) {
path = path.substring(contextPath.length());
}
return path;
}
|
[
"CWE-74"
] |
CVE-2021-37262
|
MEDIUM
| 5
|
jflyfox/jfinal_cms
|
getFilePath
|
src/main/java/com/jflyfox/modules/filemanager/FileManager.java
|
e7fd0fe9362464c4d2bd308318eecc89a847b116
| 1
|
Analyze the following code function for security vulnerabilities
|
public String getSchemaDropCommand() {
return this.dbDropSchemaCommand;
}
|
Vulnerability Classification:
- CWE: CWE-89
- CVE: CVE-2019-15558
- Severity: HIGH
- CVSS Score: 7.5
Description: fix sql injection
Function: getSchemaDropCommand
File: xm-commons-migration-db/src/main/java/com/icthh/xm/commons/migration/db/tenant/DropSchemaResolver.java
Repository: xm-online/xm-commons
Fixed Code:
@Deprecated
public String getSchemaDropCommand() {
return this.dbDropSchemaCommand;
}
|
[
"CWE-89"
] |
CVE-2019-15558
|
HIGH
| 7.5
|
xm-online/xm-commons
|
getSchemaDropCommand
|
xm-commons-migration-db/src/main/java/com/icthh/xm/commons/migration/db/tenant/DropSchemaResolver.java
|
de96e9c4339e37ab1172e3a4e16ee2b7dfe74a70
| 1
|
Analyze the following code function for security vulnerabilities
|
public void send(final int iCode, final String iReason, final String iContentType, final Object iContent, final String iHeaders)
throws IOException {
if (sendStarted)
// AVOID TO SEND RESPONSE TWICE
{
return;
}
sendStarted = true;
// final String content;
// final String contentType;
if (callbackFunction != null) {
content = callbackFunction + "(" + iContent + ")";
contentType = "text/javascript";
} else {
if (content == null || content.length() == 0) {
content = iContent != null ? iContent.toString() : null;
}
if (contentType == null || contentType.length() == 0) {
contentType = iContentType;
}
}
final boolean empty = content == null || content.length() == 0;
if (this.code > 0) {
writeStatus(this.code, iReason);
} else {
writeStatus(empty && iCode == 200 ? 204 : iCode, iReason);
}
writeHeaders(contentType, keepAlive);
if (iHeaders != null) {
writeLine(iHeaders);
}
if (sessionId != null)
writeLine("Set-Cookie: " + OHttpUtils.OSESSIONID + "=" + sessionId + "; Path=/; HttpOnly");
byte[] binaryContent = null;
if (!empty) {
if (contentEncoding != null && contentEncoding.equals(OHttpUtils.CONTENT_ACCEPT_GZIP_ENCODED)) {
binaryContent = compress(content);
} else {
binaryContent = content.getBytes(utf8);
}
}
writeLine(OHttpUtils.HEADER_CONTENT_LENGTH + (empty ? 0 : binaryContent.length));
writeLine(null);
if (binaryContent != null) {
out.write(binaryContent);
}
flush();
}
|
Vulnerability Classification:
- CWE: CWE-352
- CVE: CVE-2015-2912
- Severity: MEDIUM
- CVSS Score: 6.8
Description: Fixed issue #4824 about disabling JSONP support
Function: send
File: server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/OHttpResponse.java
Repository: orientechnologies/orientdb
Fixed Code:
public void send(final int iCode, final String iReason, final String iContentType, final Object iContent, final String iHeaders)
throws IOException {
if (sendStarted) {
// AVOID TO SEND RESPONSE TWICE
return;
}
sendStarted = true;
if (callbackFunction != null) {
content = callbackFunction + "(" + iContent + ")";
contentType = "text/javascript";
} else {
if (content == null || content.length() == 0) {
content = iContent != null ? iContent.toString() : null;
}
if (contentType == null || contentType.length() == 0) {
contentType = iContentType;
}
}
final boolean empty = content == null || content.length() == 0;
if (this.code > 0) {
writeStatus(this.code, iReason);
} else {
writeStatus(empty && iCode == 200 ? 204 : iCode, iReason);
}
writeHeaders(contentType, keepAlive);
if (iHeaders != null) {
writeLine(iHeaders);
}
if (sessionId != null)
writeLine("Set-Cookie: " + OHttpUtils.OSESSIONID + "=" + sessionId + "; Path=/; HttpOnly");
byte[] binaryContent = null;
if (!empty) {
if (contentEncoding != null && contentEncoding.equals(OHttpUtils.CONTENT_ACCEPT_GZIP_ENCODED)) {
binaryContent = compress(content);
} else {
binaryContent = content.getBytes(utf8);
}
}
writeLine(OHttpUtils.HEADER_CONTENT_LENGTH + (empty ? 0 : binaryContent.length));
writeLine(null);
if (binaryContent != null) {
out.write(binaryContent);
}
flush();
}
|
[
"CWE-352"
] |
CVE-2015-2912
|
MEDIUM
| 6.8
|
orientechnologies/orientdb
|
send
|
server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/OHttpResponse.java
|
f11dbced94cb587f445cb99db08735c023921053
| 1
|
Analyze the following code function for security vulnerabilities
|
boolean isSleepingLocked() {
return mSleeping;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isSleepingLocked
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
|
isSleepingLocked
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Route.Definition get(final String path, final Route.Handler handler) {
return appendDefinition(GET, path, handler);
}
|
Vulnerability Classification:
- CWE: CWE-22
- CVE: CVE-2020-7647
- Severity: MEDIUM
- CVSS Score: 5.0
Description: asset: path traversal fix #1639
Function: get
File: jooby/src/main/java/org/jooby/Jooby.java
Repository: jooby-project/jooby
Fixed Code:
@Override
public Route.Definition get(final String path, final Route.Handler handler) {
if (handler instanceof AssetHandler) {
return assets(path, (AssetHandler) handler);
} else {
return appendDefinition(GET, path, handler);
}
}
|
[
"CWE-22"
] |
CVE-2020-7647
|
MEDIUM
| 5
|
jooby-project/jooby
|
get
|
jooby/src/main/java/org/jooby/Jooby.java
|
34f526028e6cd0652125baa33936ffb6a8a4a009
| 1
|
Analyze the following code function for security vulnerabilities
|
public static AllUserSessions create(MongoDBSessionService sessionService) {
return new AllUserSessions(sessionService.loadAll());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: create
File: graylog2-server/src/main/java/org/graylog2/rest/resources/users/UsersResource.java
Repository: Graylog2/graylog2-server
The code follows secure coding practices.
|
[
"CWE-613"
] |
CVE-2023-41041
|
LOW
| 3.1
|
Graylog2/graylog2-server
|
create
|
graylog2-server/src/main/java/org/graylog2/rest/resources/users/UsersResource.java
|
bb88f3d0b2b0351669ab32c60b595ab7242a3fe3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Object setUserData(final String key, final Object data, final UserDataHandler handler) {
if (userData_ == null) {
userData_ = new HashMap<>();
}
return userData_.put(key, data);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUserData
File: src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
Repository: HtmlUnit/htmlunit
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-2798
|
HIGH
| 7.5
|
HtmlUnit/htmlunit
|
setUserData
|
src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
|
940dc7fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public final void activitySlept(IBinder token) {
if (localLOGV) Slog.v(TAG, "Activity slept: token=" + token);
final long origId = Binder.clearCallingIdentity();
synchronized (this) {
final ActivityRecord r = ActivityRecord.isInStackLocked(token);
if (r != null) {
mStackSupervisor.activitySleptLocked(r);
}
}
Binder.restoreCallingIdentity(origId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: activitySlept
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3833
|
MEDIUM
| 4.3
|
android
|
activitySlept
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean deleteConfigSetting(String name) {
if (DEBUG) {
Slog.v(LOG_TAG, "deleteConfigSetting(" + name + ")");
}
return mutateConfigSetting(name, null, null, false,
MUTATION_OPERATION_DELETE, 0);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deleteConfigSetting
File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40117
|
HIGH
| 7.8
|
android
|
deleteConfigSetting
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
ff86ff28cf82124f8e65833a2dd8c319aea08945
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void testSerializationAsString02() throws Exception
{
Instant date = Instant.ofEpochSecond(123456789L, 183917322);
String value = MAPPER.writer()
.without(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS)
.writeValueAsString(date);
assertEquals("The value is not correct.", '"' + FORMATTER.format(date) + '"', value);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: testSerializationAsString02
File: datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestInstantSerialization.java
Repository: FasterXML/jackson-modules-java8
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-1000873
|
MEDIUM
| 4.3
|
FasterXML/jackson-modules-java8
|
testSerializationAsString02
|
datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestInstantSerialization.java
|
ba27ce5909dfb49bcaf753ad3e04ecb980010b0b
| 0
|
Analyze the following code function for security vulnerabilities
|
private void sendMenuSelection(int menuId, boolean helpRequired) {
ByteArrayOutputStream buf = new ByteArrayOutputStream();
// tag
int tag = BerTlv.BER_MENU_SELECTION_TAG;
buf.write(tag);
// length
buf.write(0x00); // place holder
// device identities
tag = 0x80 | ComprehensionTlvTag.DEVICE_IDENTITIES.value();
buf.write(tag);
buf.write(0x02); // length
buf.write(DEV_ID_KEYPAD); // source device id
buf.write(DEV_ID_UICC); // destination device id
// item identifier
tag = 0x80 | ComprehensionTlvTag.ITEM_ID.value();
buf.write(tag);
buf.write(0x01); // length
buf.write(menuId); // menu identifier chosen
// help request
if (helpRequired) {
tag = ComprehensionTlvTag.HELP_REQUEST.value();
buf.write(tag);
buf.write(0x00); // length
}
byte[] rawData = buf.toByteArray();
// write real length
int len = rawData.length - 2; // minus (tag + length)
rawData[1] = (byte) len;
String hexString = IccUtils.bytesToHexString(rawData);
mCmdIf.sendEnvelope(hexString, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendMenuSelection
File: src/java/com/android/internal/telephony/cat/CatService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2015-3843
|
HIGH
| 9.3
|
android
|
sendMenuSelection
|
src/java/com/android/internal/telephony/cat/CatService.java
|
b48581401259439dc5ef6dcf8b0f303e4cbefbe9
| 0
|
Analyze the following code function for security vulnerabilities
|
public void addConstraint(PolicyConstraintValue constraint) {
constraints.add(constraint);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addConstraint
File: base/common/src/main/java/com/netscape/certsrv/profile/PolicyConstraint.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
addConstraint
|
base/common/src/main/java/com/netscape/certsrv/profile/PolicyConstraint.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@PostMapping(value = "/exposed")
@Loggable
@Transactional
@Operation(description = "Send exposed keys to server - includes a fix for the fact that GAEN doesn't give access to the current day's exposed key")
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "The exposed keys have been stored in the database"),
@ApiResponse(responseCode = "400", description =
"- Invalid base64 encoding in GaenRequest" +
"- negative rolling period" +
"- fake claim with non-fake keys"),
@ApiResponse(responseCode = "403", description = "Authentication failed") })
public @ResponseBody Callable<ResponseEntity<String>> addExposed(
@Valid @RequestBody @Parameter(description = "The GaenRequest contains the SecretKey from the guessed infection date, the infection date itself, and some authentication data to verify the test result") GaenRequest gaenRequest,
@RequestHeader(value = "User-Agent") @Parameter(description = "App Identifier (PackageName/BundleIdentifier) + App-Version + OS (Android/iOS) + OS-Version", example = "ch.ubique.android.starsdk;1.0;iOS;13.3") String userAgent,
@AuthenticationPrincipal @Parameter(description = "JWT token that can be verified by the backend server") Object principal) {
var now = Instant.now().toEpochMilli();
if (!this.validateRequest.isValid(principal)) {
return () -> ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
List<GaenKey> nonFakeKeys = new ArrayList<>();
for (var key : gaenRequest.getGaenKeys()) {
if (!validationUtils.isValidBase64Key(key.getKeyData())) {
return () -> new ResponseEntity<>("No valid base64 key", HttpStatus.BAD_REQUEST);
}
if (this.validateRequest.isFakeRequest(principal, key)
|| hasNegativeRollingPeriod(key)
|| hasInvalidKeyDate(principal, key)) {
continue;
}
if (key.getRollingPeriod().equals(0)) {
//currently only android seems to send 0 which can never be valid, since a non used key should not be submitted
//default value according to EN is 144, so just set it to that. If we ever get 0 from iOS we should log it, since
//this should not happen
key.setRollingPeriod(GaenKey.GaenKeyDefaultRollingPeriod);
if (userAgent.toLowerCase().contains("ios")) {
logger.error("Received a rolling period of 0 for an iOS User-Agent");
}
}
nonFakeKeys.add(key);
}
if (principal instanceof Jwt && ((Jwt) principal).containsClaim("fake")
&& ((Jwt) principal).getClaimAsString("fake").equals("1")) {
Jwt token = (Jwt) principal;
if (FAKE_CODE.equals(token.getSubject())) {
logger.info("Claim is fake - subject: {}", token.getSubject());
} else if (!nonFakeKeys.isEmpty()) {
return () -> ResponseEntity.badRequest().body("Claim is fake but list contains non fake keys");
}
}
if (!nonFakeKeys.isEmpty()) {
dataService.upsertExposees(nonFakeKeys);
}
var delayedKeyDateDuration = Duration.of(gaenRequest.getDelayedKeyDate(), GaenUnit.TenMinutes);
var delayedKeyDate = LocalDate.ofInstant(Instant.ofEpochMilli(delayedKeyDateDuration.toMillis()),
ZoneOffset.UTC);
var nowDay = LocalDate.now(ZoneOffset.UTC);
if (delayedKeyDate.isBefore(nowDay.minusDays(1)) || delayedKeyDate.isAfter(nowDay.plusDays(1))) {
return () -> ResponseEntity.badRequest().body("delayedKeyDate date must be between yesterday and tomorrow");
}
var responseBuilder = ResponseEntity.ok();
if (principal instanceof Jwt) {
var originalJWT = (Jwt) principal;
var jwtBuilder = Jwts.builder().setId(UUID.randomUUID().toString()).setIssuedAt(Date.from(Instant.now()))
.setIssuer("dpppt-sdk-backend").setSubject(originalJWT.getSubject())
.setExpiration(Date
.from(delayedKeyDate.atStartOfDay().toInstant(ZoneOffset.UTC).plus(Duration.ofHours(48))))
.claim("scope", "currentDayExposed").claim("delayedKeyDate", gaenRequest.getDelayedKeyDate());
if (originalJWT.containsClaim("fake")) {
jwtBuilder.claim("fake", originalJWT.getClaim("fake"));
}
String jwt = jwtBuilder.signWith(secondDayKey).compact();
responseBuilder.header("Authorization", "Bearer " + jwt);
responseBuilder.header("X-Exposed-Token", "Bearer " + jwt);
}
Callable<ResponseEntity<String>> cb = () -> {
normalizeRequestTime(now);
return responseBuilder.body("OK");
};
return cb;
}
|
Vulnerability Classification:
- CWE: CWE-200
- CVE: CVE-2020-26230
- Severity: LOW
- CVSS Score: 2.6
Description: [MAPR] Setted responses retention time on fake requests
Function: addExposed
File: dpppt-backend-sdk/dpppt-backend-sdk-ws/src/main/java/org/dpppt/backend/sdk/ws/controller/GaenController.java
Repository: RadarCOVID/radar-covid-backend-dp3t-server
Fixed Code:
@PostMapping(value = "/exposed")
@Loggable
@ResponseRetention(time = "application.response.retention.time.exposed")
@Transactional
@Operation(description = "Send exposed keys to server - includes a fix for the fact that GAEN doesn't give access to the current day's exposed key")
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "The exposed keys have been stored in the database"),
@ApiResponse(responseCode = "400", description =
"- Invalid base64 encoding in GaenRequest" +
"- negative rolling period" +
"- fake claim with non-fake keys"),
@ApiResponse(responseCode = "403", description = "Authentication failed") })
public @ResponseBody Callable<ResponseEntity<String>> addExposed(
@Valid @RequestBody @Parameter(description = "The GaenRequest contains the SecretKey from the guessed infection date, the infection date itself, and some authentication data to verify the test result") GaenRequest gaenRequest,
@RequestHeader(value = "User-Agent") @Parameter(description = "App Identifier (PackageName/BundleIdentifier) + App-Version + OS (Android/iOS) + OS-Version", example = "ch.ubique.android.starsdk;1.0;iOS;13.3") String userAgent,
@AuthenticationPrincipal @Parameter(description = "JWT token that can be verified by the backend server") Object principal) {
var now = Instant.now().toEpochMilli();
if (!this.validateRequest.isValid(principal)) {
return () -> ResponseEntity.status(HttpStatus.FORBIDDEN).build();
}
List<GaenKey> nonFakeKeys = new ArrayList<>();
for (var key : gaenRequest.getGaenKeys()) {
if (!validationUtils.isValidBase64Key(key.getKeyData())) {
return () -> new ResponseEntity<>("No valid base64 key", HttpStatus.BAD_REQUEST);
}
if (this.validateRequest.isFakeRequest(principal, key)
|| hasNegativeRollingPeriod(key)
|| hasInvalidKeyDate(principal, key)) {
continue;
}
if (key.getRollingPeriod().equals(0)) {
//currently only android seems to send 0 which can never be valid, since a non used key should not be submitted
//default value according to EN is 144, so just set it to that. If we ever get 0 from iOS we should log it, since
//this should not happen
key.setRollingPeriod(GaenKey.GaenKeyDefaultRollingPeriod);
if (userAgent.toLowerCase().contains("ios")) {
logger.error("Received a rolling period of 0 for an iOS User-Agent");
}
}
nonFakeKeys.add(key);
}
if (principal instanceof Jwt && ((Jwt) principal).containsClaim("fake")
&& ((Jwt) principal).getClaimAsString("fake").equals("1")) {
Jwt token = (Jwt) principal;
if (FAKE_CODE.equals(token.getSubject())) {
logger.info("Claim is fake - subject: {}", token.getSubject());
} else if (!nonFakeKeys.isEmpty()) {
return () -> ResponseEntity.badRequest().body("Claim is fake but list contains non fake keys");
}
}
if (!nonFakeKeys.isEmpty()) {
dataService.upsertExposees(nonFakeKeys);
}
var delayedKeyDateDuration = Duration.of(gaenRequest.getDelayedKeyDate(), GaenUnit.TenMinutes);
var delayedKeyDate = LocalDate.ofInstant(Instant.ofEpochMilli(delayedKeyDateDuration.toMillis()),
ZoneOffset.UTC);
var nowDay = LocalDate.now(ZoneOffset.UTC);
if (delayedKeyDate.isBefore(nowDay.minusDays(1)) || delayedKeyDate.isAfter(nowDay.plusDays(1))) {
return () -> ResponseEntity.badRequest().body("delayedKeyDate date must be between yesterday and tomorrow");
}
var responseBuilder = ResponseEntity.ok();
if (principal instanceof Jwt) {
var originalJWT = (Jwt) principal;
var jwtBuilder = Jwts.builder().setId(UUID.randomUUID().toString()).setIssuedAt(Date.from(Instant.now()))
.setIssuer("dpppt-sdk-backend").setSubject(originalJWT.getSubject())
.setExpiration(Date
.from(delayedKeyDate.atStartOfDay().toInstant(ZoneOffset.UTC).plus(Duration.ofHours(48))))
.claim("scope", "currentDayExposed").claim("delayedKeyDate", gaenRequest.getDelayedKeyDate());
if (originalJWT.containsClaim("fake")) {
jwtBuilder.claim("fake", originalJWT.getClaim("fake"));
}
String jwt = jwtBuilder.signWith(secondDayKey).compact();
responseBuilder.header("Authorization", "Bearer " + jwt);
responseBuilder.header("X-Exposed-Token", "Bearer " + jwt);
}
Callable<ResponseEntity<String>> cb = () -> {
normalizeRequestTime(now);
return responseBuilder.body("OK");
};
return cb;
}
|
[
"CWE-200"
] |
CVE-2020-26230
|
LOW
| 2.6
|
RadarCOVID/radar-covid-backend-dp3t-server
|
addExposed
|
dpppt-backend-sdk/dpppt-backend-sdk-ws/src/main/java/org/dpppt/backend/sdk/ws/controller/GaenController.java
|
c37f81636250892670750e3989139fd76d4beffe
| 1
|
Analyze the following code function for security vulnerabilities
|
public DefaultJpaInstanceConfiguration user(String user) {
put(PersistenceUnitProperties.JDBC_USER, user);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: user
File: src/main/java/uk/q3c/krail/jpa/persist/DefaultJpaInstanceConfiguration.java
Repository: KrailOrg/krail-jpa
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-15018
|
MEDIUM
| 5.2
|
KrailOrg/krail-jpa
|
user
|
src/main/java/uk/q3c/krail/jpa/persist/DefaultJpaInstanceConfiguration.java
|
c1e848665492e21ef6cc9be443205e36b9a1f6be
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getCurrentContentSyntaxId(XWikiContext context)
{
String syntaxId = getCurrentContentSyntaxIdInternal(context);
if (syntaxId == null) {
throw new RuntimeException("Cannot get the current syntax since there's no current document set");
}
return syntaxId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCurrentContentSyntaxId
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-32620
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
getCurrentContentSyntaxId
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable
final Float getFloatAndRemove(CharSequence name) {
final String v = getAndRemove(name);
return toFloat(v);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFloatAndRemove
File: core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2019-16771
|
MEDIUM
| 5
|
line/armeria
|
getFloatAndRemove
|
core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
|
b597f7a865a527a84ee3d6937075cfbb4470ed20
| 0
|
Analyze the following code function for security vulnerabilities
|
@SysUISingleton
@Provides
static NotificationPanelLogger provideNotificationPanelLogger() {
return new NotificationPanelLoggerImpl();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: provideNotificationPanelLogger
File: packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40098
|
MEDIUM
| 5.5
|
android
|
provideNotificationPanelLogger
|
packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java
|
d21ffbe8a2eeb2a5e6da7efbb1a0430ba6b022e0
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getSecurityLevel() {
if (mNativeTabAndroid == 0) return ToolbarModelSecurityLevel.NONE;
return nativeGetSecurityLevel(mNativeTabAndroid);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSecurityLevel
File: chrome/android/java/src/org/chromium/chrome/browser/Tab.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
getSecurityLevel
|
chrome/android/java/src/org/chromium/chrome/browser/Tab.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
public @Nullable ComponentName getProfileOwnerAsUser(final int userId) {
if (mService != null) {
try {
return mService.getProfileOwnerAsUser(userId);
} catch (RemoteException re) {
throw re.rethrowFromSystemServer();
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProfileOwnerAsUser
File: core/java/android/app/admin/DevicePolicyManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
getProfileOwnerAsUser
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void getByIdsNotFound(TestContext context) {
Async async = context.async();
createFoo(context).getByIdAsString(FOO, randomUuidArray(), res -> {
assertSuccess(context, res);
context.assertTrue(res.result().isEmpty());
async.complete();
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getByIdsNotFound
File: domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.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
|
getByIdsNotFound
|
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setMaxClockSkew(final int maxClockSkew) {
this.maxClockSkew = maxClockSkew;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setMaxClockSkew
File: pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java
Repository: pac4j
The code follows secure coding practices.
|
[
"CWE-347"
] |
CVE-2021-44878
|
MEDIUM
| 5
|
pac4j
|
setMaxClockSkew
|
pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java
|
22b82ffd702a132d9f09da60362fc6264fc281ae
| 0
|
Analyze the following code function for security vulnerabilities
|
private void applyAnnotations(FacesContext ctx, String rendererType, UIComponent c) {
if (c != null && ctx != null) {
associate.getAnnotationManager().applyComponentAnnotations(ctx, c);
if (rendererType != null) {
RenderKit rk = ctx.getRenderKit();
Renderer r = null;
if (rk != null) {
r = rk.getRenderer(c.getFamily(), rendererType);
if (r != null) {
c.setRendererType(rendererType);
associate.getAnnotationManager().applyRendererAnnotations(ctx, r, c);
}
}
if ((rk == null || r == null) && LOGGER.isLoggable(Level.FINE)) {
LOGGER.log(Level.FINE, "Unable to create Renderer with rendererType {0} for component with component type of {1}",
new Object[] { rendererType, c.getFamily() });
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: applyAnnotations
File: impl/src/main/java/com/sun/faces/application/applicationimpl/InstanceFactory.java
Repository: eclipse-ee4j/mojarra
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-14371
|
MEDIUM
| 5
|
eclipse-ee4j/mojarra
|
applyAnnotations
|
impl/src/main/java/com/sun/faces/application/applicationimpl/InstanceFactory.java
|
1b434748d9239f42eae8aa7d37d7a0930c061e24
| 0
|
Analyze the following code function for security vulnerabilities
|
ActivityRecord getHomeActivityForUser(int userId) {
final ArrayList<TaskRecord> tasks = mHomeStack.getAllTasks();
for (int taskNdx = tasks.size() - 1; taskNdx >= 0; --taskNdx) {
final TaskRecord task = tasks.get(taskNdx);
if (task.isHomeTask()) {
final ArrayList<ActivityRecord> activities = task.mActivities;
for (int activityNdx = activities.size() - 1; activityNdx >= 0; --activityNdx) {
final ActivityRecord r = activities.get(activityNdx);
if (r.isHomeActivity()
&& ((userId == UserHandle.USER_ALL) || (r.userId == userId))) {
return r;
}
}
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getHomeActivityForUser
File: services/core/java/com/android/server/am/ActivityStackSupervisor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3838
|
MEDIUM
| 4.3
|
android
|
getHomeActivityForUser
|
services/core/java/com/android/server/am/ActivityStackSupervisor.java
|
468651c86a8adb7aa56c708d2348e99022088af3
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean show(boolean doAnimation, boolean requestAnim) {
if (isLegacyPolicyVisibility() && mLegacyPolicyVisibilityAfterAnim) {
// Already showing.
return false;
}
if (!showToCurrentUser()) {
return false;
}
if (!mAppOpVisibility) {
// Being hidden due to app op request.
return false;
}
if (mPermanentlyHidden) {
// Permanently hidden until the app exists as apps aren't prepared
// to handle their windows being removed from under them.
return false;
}
if (mHiddenWhileSuspended) {
// Being hidden due to owner package being suspended.
return false;
}
if (mForceHideNonSystemOverlayWindow) {
// This is an alert window that is currently force hidden.
return false;
}
if (DEBUG_VISIBILITY) Slog.v(TAG, "Policy visibility true: " + this);
if (doAnimation) {
if (DEBUG_VISIBILITY) Slog.v(TAG, "doAnimation: mPolicyVisibility="
+ isLegacyPolicyVisibility()
+ " animating=" + isAnimating(TRANSITION | PARENTS));
if (!mToken.okToAnimate()) {
doAnimation = false;
} else if (isLegacyPolicyVisibility() && !isAnimating(TRANSITION | PARENTS)) {
// Check for the case where we are currently visible and
// not animating; we do not want to do animation at such a
// point to become visible when we already are.
doAnimation = false;
}
}
setPolicyVisibilityFlag(LEGACY_POLICY_VISIBILITY);
mLegacyPolicyVisibilityAfterAnim = true;
if (doAnimation) {
mWinAnimator.applyAnimationLocked(TRANSIT_ENTER, true);
}
if (requestAnim) {
mWmService.scheduleAnimationLocked();
}
if ((mAttrs.flags & FLAG_NOT_FOCUSABLE) == 0) {
mWmService.updateFocusedWindowLocked(UPDATE_FOCUS_NORMAL, false /* updateImWindows */);
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: show
File: services/core/java/com/android/server/wm/WindowState.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35674
|
HIGH
| 7.8
|
android
|
show
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
Encoder getEncoder() {
return encoder;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getEncoder
File: src/main/java/net/schmizz/sshj/transport/TransportImpl.java
Repository: hierynomus/sshj
The code follows secure coding practices.
|
[
"CWE-354"
] |
CVE-2023-48795
|
MEDIUM
| 5.9
|
hierynomus/sshj
|
getEncoder
|
src/main/java/net/schmizz/sshj/transport/TransportImpl.java
|
94fcc960e0fb198ddec0f7efc53f95ac627fe083
| 0
|
Analyze the following code function for security vulnerabilities
|
@Pure
private long readLongValue(byte[] bytes, int oid, long minVal, long maxVal, String targetType)
throws PSQLException {
long val;
// currently implemented binary encoded fields
switch (oid) {
case Oid.INT2:
val = ByteConverter.int2(bytes, 0);
break;
case Oid.INT4:
val = ByteConverter.int4(bytes, 0);
break;
case Oid.INT8:
val = ByteConverter.int8(bytes, 0);
break;
case Oid.FLOAT4:
val = (long) ByteConverter.float4(bytes, 0);
break;
case Oid.FLOAT8:
val = (long) ByteConverter.float8(bytes, 0);
break;
case Oid.NUMERIC:
Number num = ByteConverter.numeric(bytes);
if (num instanceof BigDecimal) {
val = ((BigDecimal) num).setScale(0 , RoundingMode.DOWN).longValueExact();
} else {
val = num.longValue();
}
break;
default:
throw new PSQLException(
GT.tr("Cannot convert the column of type {0} to requested type {1}.",
Oid.toString(oid), targetType),
PSQLState.DATA_TYPE_MISMATCH);
}
if (val < minVal || val > maxVal) {
throw new PSQLException(GT.tr("Bad value for type {0} : {1}", targetType, val),
PSQLState.NUMERIC_VALUE_OUT_OF_RANGE);
}
return val;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readLongValue
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
|
readLongValue
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean getUserHasTrust(int userId) {
return !isTrustDisabled(userId) && mUserHasTrust.get(userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserHasTrust
File: packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
getUserHasTrust
|
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String concatenateWhere(String a, String b) {
if (TextUtils.isEmpty(a)) {
return b;
}
if (TextUtils.isEmpty(b)) {
return a;
}
return "(" + a + ") AND (" + b + ")";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: concatenateWhere
File: core/java/android/database/DatabaseUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2023-40121
|
MEDIUM
| 5.5
|
android
|
concatenateWhere
|
core/java/android/database/DatabaseUtils.java
|
3287ac2d2565dc96bf6177967f8e3aed33954253
| 0
|
Analyze the following code function for security vulnerabilities
|
private void processProfileStateChanged(BluetoothDevice device, int profileId, int newState, int prevState) {
if (((profileId == BluetoothProfile.A2DP) ||(profileId == BluetoothProfile.HEADSET)) &&
(newState == BluetoothProfile.STATE_CONNECTED)){
debugLog( "Profile connected. Schedule missing profile connection if any");
connectOtherProfile(device, PROFILE_CONN_CONNECTED);
setProfileAutoConnectionPriority(device, profileId);
}
IBluetooth.Stub binder = mBinder;
if (binder != null) {
try {
binder.sendConnectionStateChange(device, profileId, newState,prevState);
} catch (RemoteException re) {
errorLog("" + re);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: processProfileStateChanged
File: src/com/android/bluetooth/btservice/AdapterService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-362",
"CWE-20"
] |
CVE-2016-3760
|
MEDIUM
| 5.4
|
android
|
processProfileStateChanged
|
src/com/android/bluetooth/btservice/AdapterService.java
|
122feb9a0b04290f55183ff2f0384c6c53756bd8
| 0
|
Analyze the following code function for security vulnerabilities
|
private void initToolbarData(Element elt) {
ToolbarData toolbar = file.getOptions().getToolbarData();
for (Element sub_elt : XmlIterator.forChildElements(elt)) {
if (sub_elt.getTagName().equals("sep")) {
toolbar.addSeparator();
} else if (sub_elt.getTagName().equals("tool")) {
Tool tool;
try {
tool = toTool(sub_elt);
} catch (XmlReaderException e) {
addErrors(e, "toolbar");
continue;
}
if (tool != null) {
tool = tool.cloneTool();
try {
initAttributeSet(sub_elt, tool.getAttributeSet(),
tool);
} catch (XmlReaderException e) {
addErrors(e, "toolbar." + tool.getName());
}
toolbar.addTool(tool);
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initToolbarData
File: src/com/cburch/logisim/file/XmlReader.java
Repository: logisim-evolution
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000889
|
MEDIUM
| 6.8
|
logisim-evolution
|
initToolbarData
|
src/com/cburch/logisim/file/XmlReader.java
|
90aee8f8ceef463884cc400af4f6d1f109fb0972
| 0
|
Analyze the following code function for security vulnerabilities
|
public void initActiveScan() {
logger.info("init active scan module");
activeScanButton.addActionListener(e -> {
try {
refreshOutput();
xrayCmd.setModule("webscan");
xrayCmd.setConfig(String.format("%s", configPath));
xrayCmd.setOthers(null);
String[] finalCmd = xrayCmd.buildCmd();
outputTextArea.setText(null);
stop = false;
execAndFresh(finalCmd);
} catch (Exception ex) {
ex.printStackTrace();
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initActiveScan
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
|
initActiveScan
|
src/main/java/com/chaitin/xray/form/MainForm.java
|
4d0d59663596db03f39d7edd2be251d48b52dcfc
| 0
|
Analyze the following code function for security vulnerabilities
|
private SettingsState getGlobalSettingsLocked() {
return getSettingsLocked(SETTINGS_TYPE_GLOBAL, UserHandle.USER_SYSTEM);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getGlobalSettingsLocked
File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3876
|
HIGH
| 7.2
|
android
|
getGlobalSettingsLocked
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
91fc934bb2e5ea59929bb2f574de6db9b5100745
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean removeDisabledHints(ManagedServiceInfo info, int hints) {
boolean removed = false;
for (int i = mListenersDisablingEffects.size() - 1; i >= 0; --i) {
final int hint = mListenersDisablingEffects.keyAt(i);
final ArraySet<ManagedServiceInfo> listeners =
mListenersDisablingEffects.valueAt(i);
if (hints == 0 || (hint & hints) == hint) {
removed = removed || listeners.remove(info);
}
}
return removed;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeDisabledHints
File: services/core/java/com/android/server/notification/NotificationManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3884
|
MEDIUM
| 4.3
|
android
|
removeDisabledHints
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getNumericPage(final String userID) throws IOException {
return getContactServiceProvider(userID, ContactType.numericPage.toString());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNumericPage
File: opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
Repository: OpenNMS/opennms
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2021-25931
|
MEDIUM
| 6.8
|
OpenNMS/opennms
|
getNumericPage
|
opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
|
607151ea8f90212a3fb37c977fa57c7d58d26a84
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String getItemDataMaxLengths(String crfVersionIds) {
return "select item_id, max(length(value)) as max_length from item_data where item_id in ("
+ " select distinct ifm.item_id from item_form_metadata ifm where ifm.crf_version_id in (" + crfVersionIds
+ ")) and length(value) > 0 group by item_id";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getItemDataMaxLengths
File: core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
Repository: OpenClinica
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-24831
|
HIGH
| 7.5
|
OpenClinica
|
getItemDataMaxLengths
|
core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
|
b152cc63019230c9973965a98e4386ea5322c18f
| 0
|
Analyze the following code function for security vulnerabilities
|
public BluetoothDevice getRemoteDevice() {
return mDevice;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRemoteDevice
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
|
getRemoteDevice
|
core/java/android/bluetooth/BluetoothSocket.java
|
f24cec326f5f65c693544fb0b92c37f633bacda2
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean checkKeyIntentParceledCorrectly(Bundle bundle) {
Parcel p = Parcel.obtain();
p.writeBundle(bundle);
p.setDataPosition(0);
Bundle simulateBundle = p.readBundle();
p.recycle();
Intent intent = bundle.getParcelable(AccountManager.KEY_INTENT, Intent.class);
Intent simulateIntent = simulateBundle.getParcelable(AccountManager.KEY_INTENT,
Intent.class);
if (intent == null) {
return (simulateIntent == null);
}
if (!intent.filterEquals(simulateIntent)) {
return false;
}
if (intent.getSelector() != simulateIntent.getSelector()) {
return false;
}
int prohibitedFlags = Intent.FLAG_GRANT_READ_URI_PERMISSION
| Intent.FLAG_GRANT_WRITE_URI_PERMISSION
| Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION
| Intent.FLAG_GRANT_PREFIX_URI_PERMISSION;
return (simulateIntent.getFlags() & prohibitedFlags) == 0;
}
|
Vulnerability Classification:
- CWE: CWE-Other, CWE-502
- CVE: CVE-2023-45777
- Severity: HIGH
- CVSS Score: 7.8
Description: Update AccountManagerService checkKeyIntentParceledCorrectly.
Bug: 265798288
Test: manual
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:8476b140eed0235df4e8f07d94420a1471191b55)
Merged-In: Ia2030a9dc371dccadd4e188a529351ac4232bb4f
Change-Id: Ia2030a9dc371dccadd4e188a529351ac4232bb4f
Function: checkKeyIntentParceledCorrectly
File: services/core/java/com/android/server/accounts/AccountManagerService.java
Repository: android
Fixed Code:
private boolean checkKeyIntentParceledCorrectly(Bundle bundle) {
Parcel p = Parcel.obtain();
p.writeBundle(bundle);
p.setDataPosition(0);
Bundle simulateBundle = p.readBundle();
p.recycle();
Intent intent = bundle.getParcelable(AccountManager.KEY_INTENT);
if (intent != null && intent.getClass() != Intent.class) {
return false;
}
Intent simulateIntent = simulateBundle.getParcelable(AccountManager.KEY_INTENT,
Intent.class);
if (intent == null) {
return (simulateIntent == null);
}
if (!intent.filterEquals(simulateIntent)) {
return false;
}
if (intent.getSelector() != simulateIntent.getSelector()) {
return false;
}
int prohibitedFlags = Intent.FLAG_GRANT_READ_URI_PERMISSION
| Intent.FLAG_GRANT_WRITE_URI_PERMISSION
| Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION
| Intent.FLAG_GRANT_PREFIX_URI_PERMISSION;
return (simulateIntent.getFlags() & prohibitedFlags) == 0;
}
|
[
"CWE-Other",
"CWE-502"
] |
CVE-2023-45777
|
HIGH
| 7.8
|
android
|
checkKeyIntentParceledCorrectly
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 1
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("unchecked") // cross your fingers
public <A> Optional<Http.MultipartFormData.FilePart<A>> file() {
return Optional.ofNullable((Http.MultipartFormData.FilePart<A>) file);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: file
File: web/play-java-forms/src/main/java/play/data/Form.java
Repository: playframework
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-31018
|
MEDIUM
| 5
|
playframework
|
file
|
web/play-java-forms/src/main/java/play/data/Form.java
|
15393b736df939e35e275af2347155f296c684f2
| 0
|
Analyze the following code function for security vulnerabilities
|
public void destroy() {
act.runOnUiThread(new Runnable() {
public void run() {
web.destroy();
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: destroy
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
|
destroy
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public void establish() {
if (MORE_DEBUG) Slog.i(TAG, "Initiating bind of OBB service on " + this);
Intent obbIntent = new Intent().setComponent(new ComponentName(
"com.android.sharedstoragebackup",
"com.android.sharedstoragebackup.ObbBackupService"));
BackupManagerService.this.mContext.bindService(
obbIntent, this, Context.BIND_AUTO_CREATE);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: establish
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
|
establish
|
services/backup/java/com/android/server/backup/BackupManagerService.java
|
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void close() throws IOException {
if (DBG) Log.d(TAG, "close() in, this: " + this + ", channel: " + mPort + ", state: " + mSocketState);
if(mSocketState == SocketState.CLOSED)
return;
else
{
synchronized(this)
{
if(mSocketState == SocketState.CLOSED)
return;
mSocketState = SocketState.CLOSED;
if (DBG) Log.d(TAG, "close() this: " + this + ", channel: " + mPort + ", mSocketIS: " + mSocketIS +
", mSocketOS: " + mSocketOS + "mSocket: " + mSocket);
if(mSocket != null) {
if (DBG) Log.d(TAG, "Closing mSocket: " + mSocket);
mSocket.shutdownInput();
mSocket.shutdownOutput();
mSocket.close();
mSocket = null;
}
if (mPfd != null) {
mPfd.close();
mPfd = null;
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: close
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
|
close
|
core/java/android/bluetooth/BluetoothSocket.java
|
f24cec326f5f65c693544fb0b92c37f633bacda2
| 0
|
Analyze the following code function for security vulnerabilities
|
private Drawable getProfileBadgeDrawable() {
if (mContext.getUserId() == UserHandle.USER_SYSTEM) {
// This user can never be a badged profile,
// and also includes USER_ALL system notifications.
return null;
}
// Note: This assumes that the current user can read the profile badge of the
// originating user.
DevicePolicyManager dpm = mContext.getSystemService(DevicePolicyManager.class);
return dpm.getResources().getDrawable(
getUpdatableProfileBadgeId(), SOLID_COLORED, NOTIFICATION,
this::getDefaultProfileBadgeDrawable);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProfileBadgeDrawable
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
getProfileBadgeDrawable
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isAlive() {
return mNativeContentViewCore != 0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isAlive
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
isAlive
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
public void refresh(T data) {
Objects.requireNonNull(data,
"DataCommunicator can not refresh null object");
Object id = getDataProvider().getId(data);
// ActiveDataHandler has always the latest data through KeyMapper.
Map<Object, T> activeData = getActiveDataHandler().getActiveData();
if (activeData.containsKey(id)) {
// Item is currently available at the client-side
if (updatedData.isEmpty()) {
markAsDirty();
}
updatedData.add(activeData.get(id));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: refresh
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
|
refresh
|
server/src/main/java/com/vaadin/data/provider/DataCommunicator.java
|
9a93593d9f3802d2881fc8ad22dbc210d0d1d295
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void statusBarVisibilityChanged(int visibility) {
if (mContext.checkCallingOrSelfPermission(android.Manifest.permission.STATUS_BAR)
!= PackageManager.PERMISSION_GRANTED) {
throw new SecurityException("Caller does not hold permission "
+ android.Manifest.permission.STATUS_BAR);
}
synchronized (mWindowMap) {
mLastStatusBarVisibility = visibility;
visibility = mPolicy.adjustSystemUiVisibilityLw(visibility);
updateStatusBarVisibilityLocked(visibility);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: statusBarVisibilityChanged
File: services/core/java/com/android/server/wm/WindowManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3875
|
HIGH
| 7.2
|
android
|
statusBarVisibilityChanged
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
private long insertInternal(ContentValues values, boolean allowReplace) {
// Start a transaction even though we don't really need one.
// This is to help maintain compatibility with applications that
// access InsertHelper from multiple threads even though they never should have.
// The original code used to lock the InsertHelper itself which was prone
// to deadlocks. Starting a transaction achieves the same mutual exclusion
// effect as grabbing a lock but without the potential for deadlocks.
mDb.beginTransactionNonExclusive();
try {
SQLiteStatement stmt = getStatement(allowReplace);
stmt.clearBindings();
if (DEBUG) Log.v(TAG, "--- inserting in table " + mTableName);
for (Map.Entry<String, Object> e: values.valueSet()) {
final String key = e.getKey();
int i = getColumnIndex(key);
DatabaseUtils.bindObjectToProgram(stmt, i, e.getValue());
if (DEBUG) {
Log.v(TAG, "binding " + e.getValue() + " to column " +
i + " (" + key + ")");
}
}
long result = stmt.executeInsert();
mDb.setTransactionSuccessful();
return result;
} catch (SQLException e) {
Log.e(TAG, "Error inserting " + values + " into table " + mTableName, e);
return -1;
} finally {
mDb.endTransaction();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: insertInternal
File: core/java/android/database/DatabaseUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2023-40121
|
MEDIUM
| 5.5
|
android
|
insertInternal
|
core/java/android/database/DatabaseUtils.java
|
3287ac2d2565dc96bf6177967f8e3aed33954253
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void setGoMaterialVariables(EnvironmentVariableContext environmentVariableContext) {
setVariableWithName(environmentVariableContext, this.getUrlArgument().withoutCredentials(), GO_MATERIAL_URL);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setGoMaterialVariables
File: domain/src/main/java/com/thoughtworks/go/config/materials/ScmMaterial.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-39309
|
MEDIUM
| 6.5
|
gocd
|
setGoMaterialVariables
|
domain/src/main/java/com/thoughtworks/go/config/materials/ScmMaterial.java
|
691b479f1310034992da141760e9c5d1f5b60e8a
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getPackageUid() {
return mPackageUid;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPackageUid
File: services/core/java/com/android/server/pm/ShortcutPackage.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40075
|
MEDIUM
| 5.5
|
android
|
getPackageUid
|
services/core/java/com/android/server/pm/ShortcutPackage.java
|
ae768fbb9975fdab267f525831cb52f485ab0ecc
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean cleanUp(String volumeUuid) {
final File codeFile = new File(Environment.getDataAppDirectory(volumeUuid),
move.dataAppName);
Slog.d(TAG, "Cleaning up " + move.packageName + " on " + volumeUuid);
synchronized (mInstallLock) {
// Clean up both app data and code
removeDataDirsLI(volumeUuid, move.packageName);
if (codeFile.isDirectory()) {
mInstaller.rmPackageDir(codeFile.getAbsolutePath());
} else {
codeFile.delete();
}
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cleanUp
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
|
cleanUp
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
protected CompletableFuture<Optional<Integer>> internalGetMaxSubscriptionsPerTopic() {
return getTopicPoliciesAsyncWithRetry(topicName)
.thenApply(op -> op.map(TopicPolicies::getMaxSubscriptionsPerTopic));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: internalGetMaxSubscriptionsPerTopic
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
|
internalGetMaxSubscriptionsPerTopic
|
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
|
5b35bb81c31f1bc2ad98c9fde5b39ec68110ca52
| 0
|
Analyze the following code function for security vulnerabilities
|
private void forceStopPackageLocked(final String packageName, int uid, String reason) {
forceStopPackageLocked(packageName, UserHandle.getAppId(uid), false,
false, true, false, false, UserHandle.getUserId(uid), reason);
Intent intent = new Intent(Intent.ACTION_PACKAGE_RESTARTED,
Uri.fromParts("package", packageName, null));
if (!mProcessesReady) {
intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY
| Intent.FLAG_RECEIVER_FOREGROUND);
}
intent.putExtra(Intent.EXTRA_UID, uid);
intent.putExtra(Intent.EXTRA_USER_HANDLE, UserHandle.getUserId(uid));
broadcastIntentLocked(null, null, intent,
null, null, 0, null, null, null, AppOpsManager.OP_NONE,
false, false,
MY_PID, Process.SYSTEM_UID, UserHandle.getUserId(uid));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: forceStopPackageLocked
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3833
|
MEDIUM
| 4.3
|
android
|
forceStopPackageLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
private void sendNetworkChangeBroadcastWithCurrentState() {
// copy into local variables to force lambda to capture by value and not reference, since
// mNetworkAgentState is mutable and can change
final DetailedState networkAgentState = mNetworkAgentState;
if (mVerboseLoggingEnabled) {
Log.d(getTag(), "Queueing broadcast=NETWORK_STATE_CHANGED_ACTION"
+ " networkAgentState=" + networkAgentState);
}
mBroadcastQueue.queueOrSendBroadcast(
mClientModeManager,
() -> sendNetworkChangeBroadcast(
mContext, networkAgentState, mVerboseLoggingEnabled));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendNetworkChangeBroadcastWithCurrentState
File: service/java/com/android/server/wifi/ClientModeImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
sendNetworkChangeBroadcastWithCurrentState
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public String getWeb()
{
return getSpace();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getWeb
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
|
getWeb
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public TailPrettyLoggable<String, LogWatch> sinceSeconds(int sinceSeconds) {
return new PodOperationsImpl(getContext().withSinceSeconds(sinceSeconds));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sinceSeconds
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
|
sinceSeconds
|
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 SerializableComparator<T> createSortingComparator() {
/*
* thenComparing is defined to return a serializable comparator as long
* as both original comparators are also serializable
*/
BinaryOperator<SerializableComparator<T>> operator = (comparator1,
comparator2) -> comparator1.thenComparing(comparator2)::compare;
return sortOrder.stream().map(
order -> order.getSorted().getComparator(order.getDirection()))
.reduce((x, y) -> 0, operator);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createSortingComparator
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
|
createSortingComparator
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
public <T> @Nullable T getObject(String columnLabel, Class<T> type) throws SQLException {
return getObject(findColumn(columnLabel), type);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getObject
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
|
getObject
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
@RequiresFeature(PackageManager.FEATURE_SECURE_LOCK_SCREEN)
public boolean resetPassword(String password, int flags) {
throwIfParentInstance("resetPassword");
if (mService != null) {
try {
return mService.resetPassword(password, flags);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resetPassword
File: core/java/android/app/admin/DevicePolicyManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
resetPassword
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
void enforceMaxActivityShortcuts(int numShortcuts) {
if (numShortcuts > mMaxShortcuts) {
throw new IllegalArgumentException("Max number of dynamic shortcuts exceeded");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: enforceMaxActivityShortcuts
File: services/core/java/com/android/server/pm/ShortcutService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40079
|
HIGH
| 7.8
|
android
|
enforceMaxActivityShortcuts
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.