instruction
string | input
string | output
string | cwe_ids
list | cve_id
string | severity
string | cvss_score
float64 | repo_name
string | func_name
string | file_path
string | commit_hash
string | is_vulnerable
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Analyze the following code function for security vulnerabilities
|
@Override
public short getShort(@Positive int columnIndex) throws SQLException {
connection.getLogger().log(Level.FINEST, " getShort columnIndex: {0}", columnIndex);
byte[] value = getRawValue(columnIndex);
if (value == null) {
return 0; // SQL NULL
}
if (isBinary(columnIndex)) {
int col = columnIndex - 1;
int oid = fields[col].getOID();
if (oid == Oid.INT2) {
return ByteConverter.int2(value, 0);
}
return (short) readLongValue(value, oid, Short.MIN_VALUE, Short.MAX_VALUE, "short");
}
return toShort(getFixedString(columnIndex));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getShort
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
|
getShort
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
void grantUriPermissionUncheckedLocked(int targetUid, String targetPkg, GrantUri grantUri,
final int modeFlags, UriPermissionOwner owner) {
if (!Intent.isAccessUriMode(modeFlags)) {
return;
}
// So here we are: the caller has the assumed permission
// to the uri, and the target doesn't. Let's now give this to
// the target.
if (DEBUG_URI_PERMISSION) Slog.v(TAG_URI_PERMISSION,
"Granting " + targetPkg + "/" + targetUid + " permission to " + grantUri);
final String authority = grantUri.uri.getAuthority();
final ProviderInfo pi = getProviderInfoLocked(authority, grantUri.sourceUserId,
MATCH_DEBUG_TRIAGED_MISSING);
if (pi == null) {
Slog.w(TAG, "No content provider found for grant: " + grantUri.toSafeString());
return;
}
if ((modeFlags & Intent.FLAG_GRANT_PREFIX_URI_PERMISSION) != 0) {
grantUri.prefix = true;
}
final UriPermission perm = findOrCreateUriPermissionLocked(
pi.packageName, targetPkg, targetUid, grantUri);
perm.grantModes(modeFlags, owner);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: grantUriPermissionUncheckedLocked
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3912
|
HIGH
| 9.3
|
android
|
grantUriPermissionUncheckedLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
@Nullable
public String getApplicationRestrictionsManagingPackage(
@NonNull ComponentName admin) {
throwIfParentInstance("getApplicationRestrictionsManagingPackage");
if (mService != null) {
try {
return mService.getApplicationRestrictionsManagingPackage(admin);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getApplicationRestrictionsManagingPackage
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
|
getApplicationRestrictionsManagingPackage
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
protected PostMethod executePost(String uri, InputStream content, String mediaType, int... expectedCodes)
throws Exception
{
return executePost(uri, content, mediaType, true, expectedCodes);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: executePost
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
|
executePost
|
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 String getFullPathName() {
if (file != null) {
return file.getAbsolutePath();
}
return "";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFullPathName
File: umlet-swing/src/main/java/com/baselet/diagram/io/DiagramFileHandler.java
Repository: umlet
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000548
|
MEDIUM
| 6.8
|
umlet
|
getFullPathName
|
umlet-swing/src/main/java/com/baselet/diagram/io/DiagramFileHandler.java
|
e1c4cc6ae692cc8d1c367460dbf79343e996f9bd
| 0
|
Analyze the following code function for security vulnerabilities
|
protected File doPostResumable(HttpServletRequest request)
throws FileSizeLimitExceededException, IOException, ServletException
{
File completedFile = null;
FileUploadRequest wrapper = null;
if (ConfigurationManager.getProperty("upload.temp.dir") != null)
{
tempDir = ConfigurationManager.getProperty("upload.temp.dir");
}
else {
tempDir = System.getProperty("java.io.tmpdir");
}
try
{
// if we already have a FileUploadRequest, use it
if (Class.forName("org.dspace.app.webui.util.FileUploadRequest").isInstance(request))
{
wrapper = (FileUploadRequest) request;
}
else // if not wrap the mulitpart request to get the submission info
{
wrapper = new FileUploadRequest(request);
}
}
catch (ClassNotFoundException ex)
{
// Cannot find a class that is part of the JSPUI?
log.fatal("Cannot find class org.dspace.app.webui.util.FileUploadRequest");
throw new ServletException("Cannot find class org.dspace.app.webui.util.FileUploadRequest.", ex);
}
String resumableIdentifier = wrapper.getParameter("resumableIdentifier");
long resumableTotalSize = Long.valueOf(wrapper.getParameter("resumableTotalSize"));
int resumableTotalChunks = Integer.valueOf(wrapper.getParameter("resumableTotalChunks"));
String chunkDirPath = tempDir + File.separator + resumableIdentifier;
File chunkDirPathFile = new File(chunkDirPath);
boolean foundAll = true;
long currentSize = 0l;
// check whether all chunks were received.
if(chunkDirPathFile.exists())
{
for (int p = 1; p <= resumableTotalChunks; p++)
{
File file = new File(chunkDirPath + File.separator + "part" + Integer.toString(p));
if (!file.exists())
{
foundAll = false;
break;
}
currentSize += file.length();
}
}
if (foundAll && currentSize >= resumableTotalSize)
{
try {
// assemble the file from it chunks.
File file = makeFileFromChunks(tempDir, chunkDirPathFile, wrapper);
if (file != null)
{
completedFile = file;
}
} catch (IOException ex) {
// if the assembling of a file results in an IOException a
// retransmission has to be triggered. Throw the IOException
// here and handle it above.
throw ex;
}
}
return completedFile;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doPostResumable
File: dspace-jspui/src/main/java/org/dspace/app/webui/servlet/SubmissionController.java
Repository: DSpace
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-31194
|
HIGH
| 7.2
|
DSpace
|
doPostResumable
|
dspace-jspui/src/main/java/org/dspace/app/webui/servlet/SubmissionController.java
|
d1dd7d23329ef055069759df15cfa200c8e3
| 0
|
Analyze the following code function for security vulnerabilities
|
public Map<String, Object> toMap() {
Map<String, Object> results = new HashMap<String, Object>();
for (Entry<String, Object> entry : this.entrySet()) {
Object value;
if (entry.getValue() == null || NULL.equals(entry.getValue())) {
value = null;
} else if (entry.getValue() instanceof JSONObject) {
value = ((JSONObject) entry.getValue()).toMap();
} else if (entry.getValue() instanceof JSONArray) {
value = ((JSONArray) entry.getValue()).toList();
} else {
value = entry.getValue();
}
results.put(entry.getKey(), value);
}
return results;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toMap
File: src/main/java/org/json/JSONObject.java
Repository: stleary/JSON-java
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2023-5072
|
HIGH
| 7.5
|
stleary/JSON-java
|
toMap
|
src/main/java/org/json/JSONObject.java
|
661114c50dcfd53bb041aab66f14bb91e0a87c8a
| 0
|
Analyze the following code function for security vulnerabilities
|
protected synchronized TransportConnectionState lookupConnectionState(ConsumerId id) {
return connectionStateRegister.lookupConnectionState(id);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: lookupConnectionState
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
|
lookupConnectionState
|
activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
|
00921f2
| 0
|
Analyze the following code function for security vulnerabilities
|
private CompletableFuture<Void> updatePartitionInOtherCluster(int numPartitions, Set<String> clusters) {
List<CompletableFuture<Void>> results = new ArrayList<>(clusters.size() - 1);
clusters.forEach(cluster -> {
if (cluster.equals(pulsar().getConfig().getClusterName())) {
return;
}
results.add(pulsar().getBrokerService().getClusterPulsarAdmin(cluster).topics()
.updatePartitionedTopicAsync(topicName.toString(),
numPartitions, true));
});
return FutureUtil.waitForAll(results);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updatePartitionInOtherCluster
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
|
updatePartitionInOtherCluster
|
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
|
5b35bb81c31f1bc2ad98c9fde5b39ec68110ca52
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void loadModelToDocument(Configuration c) throws Exception {
if (!c.isFromFile()) {
String newOntologyPath = c.getTmpFile().getAbsolutePath() + File.separator + "Ontology";
downloadOntology(c.getOntologyURI(), newOntologyPath);
c.setFromFile(true);
c.setOntologyPath(newOntologyPath);
}
logger.info("Load ontology " + c.getOntologyPath());
OWLOntologyManager manager = OWLManager.createOWLOntologyManager();
OWLOntologyIRIMapper jenaCatalogMapper = new CatalogIRIMapper();
manager.getIRIMappers().add(jenaCatalogMapper);
((CatalogIRIMapper) jenaCatalogMapper).printMap();
OWLOntologyLoaderConfiguration loadingConfig = new OWLOntologyLoaderConfiguration();
loadingConfig = loadingConfig.setMissingImportHandlingStrategy(MissingImportHandlingStrategy.SILENT);
OWLOntology ontology = manager
.loadOntologyFromOntologyDocument(new FileDocumentSource(new File(c.getOntologyPath())), loadingConfig);
c.getMainOntology().setMainOntology(ontology);
c.getMainOntology().setMainOntologyManager(manager);
c.getMainOntology().getOWLAPIModel().setOWLOntologyManager(manager);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: loadModelToDocument
File: src/main/java/widoco/WidocoUtils.java
Repository: dgarijo/Widoco
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-4772
|
HIGH
| 7.8
|
dgarijo/Widoco
|
loadModelToDocument
|
src/main/java/widoco/WidocoUtils.java
|
f2279b76827f32190adfa9bd5229b7d5a147fa92
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void notifyHeadsUpScreenOff() {
maybeEscalateHeadsUp();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: notifyHeadsUpScreenOff
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
notifyHeadsUpScreenOff
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean hasWebComponentConfigurations() {
WebComponentConfigurationRegistry registry = WebComponentConfigurationRegistry
.getInstance(getContext());
return registry.hasConfigurations();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasWebComponentConfigurations
File: flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-203"
] |
CVE-2021-31404
|
LOW
| 1.9
|
vaadin/flow
|
hasWebComponentConfigurations
|
flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
|
621ef1b322737d963bee624b2d2e38cd739903d9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void error(final int errorCode, Conversation object) {
runOnUiThread(() -> replaceToast(getString(errorCode)));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: error
File: src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
error
|
src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
public int addWorkUnit(WorkUnit workUnit) {
workUnitList.add(workUnit);
return size();
}
|
Vulnerability Classification:
- CWE: CWE-502
- CVE: CVE-2021-32634
- Severity: MEDIUM
- CVSS Score: 6.5
Description: Merge pull request from GHSA-m5qf-gfmp-7638
* Remove unsafe serialization from PayloadUtil
* This code will likely be removed wholesale, but this change
should be used as a departure point for future development
if we end up re-implementing moveTo and friends.
* Removed vestigial MoveTo related code.
* Remove unsafe serialization in WorkSpace infra.
* Favor DataInput/DataOutputStream over ObjectInput/ObjectOutputStream
* Implement lightweight serialization in WorkBundle/WorkUnit
* Updates to WorkBundle serDe, added tests.
- set limit on number of WorkUnits per bundle. In practice these are
commonly less than 1024.
- added null handling for WorkBundle/WorkUnit string fields.
- confirmed readUTF/writeUTF has a limit ensuring strings will
be 65535 characters or less.
* Minor cleanup to WorkBundleTest
* Minor Change to WorkBundleTest
* Formatting updates
Function: addWorkUnit
File: src/main/java/emissary/pickup/WorkBundle.java
Repository: NationalSecurityAgency/emissary
Fixed Code:
public int addWorkUnit(WorkUnit workUnit) {
if (workUnitList.size() >= MAX_UNITS) {
throw new IllegalStateException("WorkBundle may not contain more than " + MAX_UNITS + " WorkUnits.");
}
workUnitList.add(workUnit);
return size();
}
|
[
"CWE-502"
] |
CVE-2021-32634
|
MEDIUM
| 6.5
|
NationalSecurityAgency/emissary
|
addWorkUnit
|
src/main/java/emissary/pickup/WorkBundle.java
|
40260b1ec1f76cc92361702cc14fa1e4388e19d7
| 1
|
Analyze the following code function for security vulnerabilities
|
public String[] getPersonalAppsForSuspension(@UserIdInt int userId) {
return PersonalAppsSuspensionHelper.forUser(mContext, userId)
.getPersonalAppsForSuspension();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPersonalAppsForSuspension
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2023-21284
|
MEDIUM
| 5.5
|
android
|
getPersonalAppsForSuspension
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isWriteable(Class<?> type, Type genericType,
Annotation[] annotations,
MediaType mediaType) {
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isWriteable
File: submarine-server/server-core/src/main/java/org/apache/submarine/server/rest/provider/YamlEntityProvider.java
Repository: apache/submarine
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2023-46302
|
CRITICAL
| 9.8
|
apache/submarine
|
isWriteable
|
submarine-server/server-core/src/main/java/org/apache/submarine/server/rest/provider/YamlEntityProvider.java
|
ed5ad3b824ba388259e0d1ea137d7fca5f0c288e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void removeFileLocal(String name) {
//noinspection ResultOfMethodCallIgnored
new File(generatePath(name)).delete();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeFileLocal
File: brut.j.dir/src/main/java/brut/directory/FileDirectory.java
Repository: iBotPeaches/Apktool
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2024-21633
|
HIGH
| 7.8
|
iBotPeaches/Apktool
|
removeFileLocal
|
brut.j.dir/src/main/java/brut/directory/FileDirectory.java
|
d348c43b24a9de350ff6e5bd610545a10c1fc712
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onViewStateRestored(@Nullable Bundle savedInstanceState) {
super.onViewStateRestored(savedInstanceState);
fillUI(savedInstanceState == null);
setCarrierCustomizedConfigToUi();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onViewStateRestored
File: src/com/android/settings/network/apn/ApnEditor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40125
|
HIGH
| 7.8
|
android
|
onViewStateRestored
|
src/com/android/settings/network/apn/ApnEditor.java
|
63d464c3fa5c7b9900448fef3844790756e557eb
| 0
|
Analyze the following code function for security vulnerabilities
|
void updatePreviousProcess(ActivityRecord stoppedActivity) {
if (stoppedActivity.app != null && mTopApp != null
// Don't replace the previous process if the stopped one is the top, e.g. sleeping.
&& stoppedActivity.app != mTopApp
// The stopped activity must have been visible later than the previous.
&& stoppedActivity.lastVisibleTime > mPreviousProcessVisibleTime
// Home has its own retained state, so don't let it occupy the previous.
&& stoppedActivity.app != mHomeProcess) {
mPreviousProcess = stoppedActivity.app;
mPreviousProcessVisibleTime = stoppedActivity.lastVisibleTime;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updatePreviousProcess
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
|
updatePreviousProcess
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void dumpFilterLabel(PrintWriter out, String prefix, Object label, int count) {
PackageParser.Provider provider = (PackageParser.Provider)label;
out.print(prefix); out.print(
Integer.toHexString(System.identityHashCode(provider)));
out.print(' ');
provider.printComponentShortName(out);
if (count > 1) {
out.print(" ("); out.print(count); out.print(" filters)");
}
out.println();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpFilterLabel
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
|
dumpFilterLabel
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getVersion() {
return "6.0.0";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getVersion
File: wflow-core/src/main/java/org/joget/plugin/enterprise/UniversalTheme.java
Repository: jogetworkflow/jw-community
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-4560
|
MEDIUM
| 6.1
|
jogetworkflow/jw-community
|
getVersion
|
wflow-core/src/main/java/org/joget/plugin/enterprise/UniversalTheme.java
|
ecf8be8f6f0cb725c18536ddc726d42a11bdaa1b
| 0
|
Analyze the following code function for security vulnerabilities
|
protected JsonObject getDataObject(T data) {
JsonObject dataObject = Json.createObject();
for (DataGenerator<T> generator : generators) {
generator.generateData(data, dataObject);
}
return dataObject;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDataObject
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
|
getDataObject
|
server/src/main/java/com/vaadin/data/provider/DataCommunicator.java
|
9a93593d9f3802d2881fc8ad22dbc210d0d1d295
| 0
|
Analyze the following code function for security vulnerabilities
|
public void cleanupExpiredRecentFailureReasons() {
long timeoutDuration = mContext.getResources().getInteger(
R.integer.config_wifiRecentFailureReasonExpirationMinutes) * 60 * 1000;
for (WifiConfiguration config : getInternalConfiguredNetworks()) {
if (config.recentFailure.getAssociationStatus()
!= WifiConfiguration.RECENT_FAILURE_NONE
&& mClock.getElapsedSinceBootMillis()
>= config.recentFailure.getLastUpdateTimeSinceBootMillis() + timeoutDuration) {
config.recentFailure.clear();
sendConfiguredNetworkChangedBroadcast(WifiManager.CHANGE_REASON_CONFIG_CHANGE);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cleanupExpiredRecentFailureReasons
File: service/java/com/android/server/wifi/WifiConfigManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
cleanupExpiredRecentFailureReasons
|
service/java/com/android/server/wifi/WifiConfigManager.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
byte[] toAmqpByteArray() throws IOException, JMSException {
ByteArrayOutputStream bout = new ByteArrayOutputStream(DEFAULT_MESSAGE_BODY_SIZE);
//invoke write body
this.writeAmqpBody(bout);
//flush and return
bout.flush();
return bout.toByteArray();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toAmqpByteArray
File: src/main/java/com/rabbitmq/jms/client/RMQMessage.java
Repository: rabbitmq/rabbitmq-jms-client
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2020-36282
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-jms-client
|
toAmqpByteArray
|
src/main/java/com/rabbitmq/jms/client/RMQMessage.java
|
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
| 0
|
Analyze the following code function for security vulnerabilities
|
public void broadcastAssociatedBssidEvent(String iface, String bssid) {
sendMessage(iface, ASSOCIATED_BSSID_EVENT, 0, 0, bssid);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: broadcastAssociatedBssidEvent
File: service/java/com/android/server/wifi/WifiMonitor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
broadcastAssociatedBssidEvent
|
service/java/com/android/server/wifi/WifiMonitor.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void pnCounterXmlGenerator(XmlGenerator gen, Config config) {
for (PNCounterConfig counterConfig : config.getPNCounterConfigs().values()) {
gen.open("pn-counter", "name", counterConfig.getName())
.node("replica-count", counterConfig.getReplicaCount())
.node("quorum-ref", counterConfig.getQuorumName())
.node("statistics-enabled", counterConfig.isStatisticsEnabled())
.close();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: pnCounterXmlGenerator
File: hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
pnCounterXmlGenerator
|
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
@GuardedBy("getLockObject()")
private void updateMaximumTimeToLockLocked(@UserIdInt int userId) {
// Update the profile's timeout
if (isManagedProfile(userId)) {
updateProfileLockTimeoutLocked(userId);
}
mInjector.binderWithCleanCallingIdentity(() -> {
// Update the device timeout
final int parentId = getProfileParentId(userId);
final long timeMs = getMaximumTimeToLockPolicyFromAdmins(
getActiveAdminsForLockscreenPoliciesLocked(parentId));
final DevicePolicyData policy = getUserDataUnchecked(parentId);
if (policy.mLastMaximumTimeToLock == timeMs) {
return;
}
policy.mLastMaximumTimeToLock = timeMs;
if (policy.mLastMaximumTimeToLock != Long.MAX_VALUE) {
// Make sure KEEP_SCREEN_ON is disabled, since that
// would allow bypassing of the maximum time to lock.
mInjector.settingsGlobalPutInt(Settings.Global.STAY_ON_WHILE_PLUGGED_IN, 0);
}
getPowerManagerInternal().setMaximumScreenOffTimeoutFromDeviceAdmin(parentId, timeMs);
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateMaximumTimeToLockLocked
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
updateMaximumTimeToLockLocked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean copyDocument(String docname, String sourceWiki, String targetWiki, String wikilocale)
throws XWikiException
{
return this.copyDocument(docname, docname, sourceWiki, targetWiki, wikilocale, true, false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: copyDocument
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
|
copyDocument
|
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
|
protected void displayErrorDialog(final int errorCode) {
runOnUiThread(() -> {
Builder builder = new Builder(XmppActivity.this);
builder.setIconAttribute(android.R.attr.alertDialogIcon);
builder.setTitle(getString(R.string.error));
builder.setMessage(errorCode);
builder.setNeutralButton(R.string.accept, null);
builder.create().show();
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: displayErrorDialog
File: src/main/java/eu/siacs/conversations/ui/XmppActivity.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
displayErrorDialog
|
src/main/java/eu/siacs/conversations/ui/XmppActivity.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getWarNameAndBackup() {
String warName;
String contextPath = JFinal.me().getServletContext().getContextPath();
if ("/".equals(contextPath) || "".equals(contextPath)) {
warName = "/ROOT.war";
} else {
warName = contextPath + ".war";
}
String backupFolder = new File(PathKit.getWebRootPath()).getParentFile().getParentFile() + File.separator + "backup" + File.separator + new SimpleDateFormat("yyyy-MM-dd_HH_mm").format(new Date()) + File.separator;
new File(backupFolder).mkdirs();
FileUtils.moveOrCopyFolder(PathKit.getWebRootPath(), backupFolder, false);
String warPath = new File(PathKit.getWebRootPath()).getParent() + File.separator + warName;
if (new File(warPath).exists()) {
FileUtils.moveOrCopyFolder(warPath, backupFolder, false);
}
updateProcessMsg("备份当前版本到 " + backupFolder);
return warName;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getWarNameAndBackup
File: web/src/main/java/com/zrlog/web/plugin/WarUpdateVersionThread.java
Repository: 94fzb/zrlog
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-16643
|
LOW
| 3.5
|
94fzb/zrlog
|
getWarNameAndBackup
|
web/src/main/java/com/zrlog/web/plugin/WarUpdateVersionThread.java
|
4a91c83af669e31a22297c14f089d8911d353fa1
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getShortDescription() {
return Messages.CreateJobCommand_ShortDescription();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getShortDescription
File: core/src/main/java/hudson/cli/CreateJobCommand.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2014-2059
|
MEDIUM
| 6.5
|
jenkinsci/jenkins
|
getShortDescription
|
core/src/main/java/hudson/cli/CreateJobCommand.java
|
ad38d8480f20ce3cbf8fec3e2003bc83efda4f7d
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getOwnerCondition( CurrentUserGroupInfo currentUserGroupInfo )
{
return String.join( " or ",
jsonbFunction( EXTRACT_PATH_TEXT, "owner" ) + " = " + withQuotes( currentUserGroupInfo.getUserUID() ),
jsonbFunction( EXTRACT_PATH_TEXT, "owner" ) + " is null" );
}
|
Vulnerability Classification:
- CWE: CWE-89
- CVE: CVE-2022-24848
- Severity: MEDIUM
- CVSS Score: 6.5
Description: Merge pull request from GHSA-52vp-f7hj-cj92
Function: getOwnerCondition
File: dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/association/ProgramOrganisationUnitAssociationsQueryBuilder.java
Repository: dhis2/dhis2-core
Fixed Code:
private String getOwnerCondition( CurrentUserGroupInfo currentUserGroupInfo )
{
return String.join( " or ",
jsonbFunction( EXTRACT_PATH_TEXT, "owner" ) + " = " + singleQuote( currentUserGroupInfo.getUserUID() ),
jsonbFunction( EXTRACT_PATH_TEXT, "owner" ) + " is null" );
}
|
[
"CWE-89"
] |
CVE-2022-24848
|
MEDIUM
| 6.5
|
dhis2/dhis2-core
|
getOwnerCondition
|
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/association/ProgramOrganisationUnitAssociationsQueryBuilder.java
|
3b245d04a58b78f0dc9bae8559f36ee4ca36dfac
| 1
|
Analyze the following code function for security vulnerabilities
|
static int getFreePort() {
try (ServerSocket s = new ServerSocket(0)) {
s.setReuseAddress(true);
return s.getLocalPort();
} catch (IOException e) {
throw new IllegalStateException(
"Unable to find a free port for running webpack", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFreePort
File: vaadin-dev-server/src/main/java/com/vaadin/base/devserver/DevModeHandlerImpl.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-172"
] |
CVE-2021-33604
|
LOW
| 1.2
|
vaadin/flow
|
getFreePort
|
vaadin-dev-server/src/main/java/com/vaadin/base/devserver/DevModeHandlerImpl.java
|
2a801c42b406a00c44f4a85b4b4e4a4c5bf89adc
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setResourceRetriever(final ResourceRetriever resourceRetriever) {
this.resourceRetriever = resourceRetriever;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setResourceRetriever
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
|
setResourceRetriever
|
pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java
|
22b82ffd702a132d9f09da60362fc6264fc281ae
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public byte[] decrypt(final byte[] input) throws CryptoException, EncodingException
{
final CiphertextHeader header = CiphertextHeader.decode(input);
if (header.getKeyName() == null) {
throw new CryptoException("Ciphertext header does not contain required key");
}
return process(header, false, input);
}
|
Vulnerability Classification:
- CWE: CWE-770
- CVE: CVE-2020-7226
- Severity: MEDIUM
- CVSS Score: 5.0
Description: Define new ciphertext header format.
New format does not allocate any memory until HMAC check passes, which
guards against untrusted input. All encryption components have been
updated to use the new header, while preserving backward compatibility
to decrypt messages encrypted with the old format. The decoding process
for the old header has been hardened to impose reasonable limits on header
fields: nonce sizes up to 255 bytes, key names up to 500 bytes.
Fixes #52.
Function: decrypt
File: src/main/java/org/cryptacular/bean/AbstractCipherBean.java
Repository: vt-middleware/cryptacular
Fixed Code:
@Override
public byte[] decrypt(final byte[] input) throws CryptoException, EncodingException
{
return process(CipherUtil.decodeHeader(input, this::lookupKey), false, input);
}
|
[
"CWE-770"
] |
CVE-2020-7226
|
MEDIUM
| 5
|
vt-middleware/cryptacular
|
decrypt
|
src/main/java/org/cryptacular/bean/AbstractCipherBean.java
|
8c6c7528f1e24c6b71f3e36db0cb8a697256ce25
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public AsyncResource<Media> createBackgroundMediaAsync(final String uri) {
final AsyncResource<Media> out = new AsyncResource<Media>();
new Thread(new Runnable() {
public void run() {
try {
out.complete(createBackgroundMedia(uri));
} catch (IOException ex) {
out.error(ex);
}
}
}).start();
return out;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createBackgroundMediaAsync
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
|
createBackgroundMediaAsync
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void createUserSwitcher() {
mKeyguardUserSwitcher = new KeyguardUserSwitcher(mContext,
(ViewStub) mStatusBarWindow.findViewById(R.id.keyguard_user_switcher),
mKeyguardStatusBar, mNotificationPanel);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createUserSwitcher
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
createUserSwitcher
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void sendRawPdu(SmsTracker tracker) {
HashMap map = tracker.mData;
byte pdu[] = (byte[]) map.get("pdu");
if (mSmsSendDisabled) {
Rlog.e(TAG, "Device does not support sending sms.");
tracker.onFailed(mContext, RESULT_ERROR_NO_SERVICE, 0/*errorCode*/);
return;
}
if (pdu == null) {
Rlog.e(TAG, "Empty PDU");
tracker.onFailed(mContext, RESULT_ERROR_NULL_PDU, 0/*errorCode*/);
return;
}
// Get calling app package name via UID from Binder call
PackageManager pm = mContext.getPackageManager();
String[] packageNames = pm.getPackagesForUid(Binder.getCallingUid());
if (packageNames == null || packageNames.length == 0) {
// Refuse to send SMS if we can't get the calling package name.
Rlog.e(TAG, "Can't get calling app package name: refusing to send SMS");
tracker.onFailed(mContext, RESULT_ERROR_GENERIC_FAILURE, 0/*errorCode*/);
return;
}
// Get package info via packagemanager
PackageInfo appInfo;
try {
// XXX this is lossy- apps can share a UID
appInfo = pm.getPackageInfo(packageNames[0], PackageManager.GET_SIGNATURES);
} catch (PackageManager.NameNotFoundException e) {
Rlog.e(TAG, "Can't get calling app package info: refusing to send SMS");
tracker.onFailed(mContext, RESULT_ERROR_GENERIC_FAILURE, 0/*errorCode*/);
return;
}
// checkDestination() returns true if the destination is not a premium short code or the
// sending app is approved to send to short codes. Otherwise, a message is sent to our
// handler with the SmsTracker to request user confirmation before sending.
if (checkDestination(tracker)) {
// check for excessive outgoing SMS usage by this app
if (!mUsageMonitor.check(appInfo.packageName, SINGLE_PART_SMS)) {
sendMessage(obtainMessage(EVENT_SEND_LIMIT_REACHED_CONFIRMATION, tracker));
return;
}
sendSms(tracker);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendRawPdu
File: src/java/com/android/internal/telephony/SMSDispatcher.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2015-3858
|
HIGH
| 9.3
|
android
|
sendRawPdu
|
src/java/com/android/internal/telephony/SMSDispatcher.java
|
df31d37d285dde9911b699837c351aed2320b586
| 0
|
Analyze the following code function for security vulnerabilities
|
@NonNull
public CallStyle setIsVideo(boolean isVideo) {
mIsVideo = isVideo;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setIsVideo
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
setIsVideo
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
public AssetHandler maxAge(final Duration maxAge) {
return maxAge(maxAge.getSeconds());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: maxAge
File: jooby/src/main/java/org/jooby/handlers/AssetHandler.java
Repository: jooby-project/jooby
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-7647
|
MEDIUM
| 5
|
jooby-project/jooby
|
maxAge
|
jooby/src/main/java/org/jooby/handlers/AssetHandler.java
|
34f526028e6cd0652125baa33936ffb6a8a4a009
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Policy getNotificationPolicy(String pkg) {
enforcePolicyAccess(pkg, "getNotificationPolicy");
final long identity = Binder.clearCallingIdentity();
try {
return mZenModeHelper.getNotificationPolicy();
} finally {
Binder.restoreCallingIdentity(identity);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNotificationPolicy
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
|
getNotificationPolicy
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getBadges() {
return badges;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getBadges
File: src/main/java/com/erudika/scoold/core/Profile.java
Repository: Erudika/scoold
The code follows secure coding practices.
|
[
"CWE-130"
] |
CVE-2022-1543
|
MEDIUM
| 6.5
|
Erudika/scoold
|
getBadges
|
src/main/java/com/erudika/scoold/core/Profile.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isValid() {
return manifestFile;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isValid
File: src/main/java/org/olat/fileresource/types/ScormCPFileResource.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-39180
|
HIGH
| 9
|
OpenOLAT
|
isValid
|
src/main/java/org/olat/fileresource/types/ScormCPFileResource.java
|
699490be8e931af0ef1f135c55384db1f4232637
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isUsbDataSignalingEnabled(String packageName) {
final CallerIdentity caller = getCallerIdentity(packageName);
synchronized (getLockObject()) {
// If the caller is an admin, return the policy set by itself. Otherwise
// return the device-wide policy.
if (isDefaultDeviceOwner(caller) || isProfileOwnerOfOrganizationOwnedDevice(caller)) {
return getProfileOwnerOrDeviceOwnerLocked(
caller.getUserId()).mUsbDataSignalingEnabled;
} else {
return isUsbDataSignalingEnabledInternalLocked();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isUsbDataSignalingEnabled
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
isUsbDataSignalingEnabled
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setPreferenceSummary(ScreenLockType lock, @StringRes int summary) {
Preference preference = findPreference(lock.preferenceKey);
if (preference != null) {
preference.setSummary(summary);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setPreferenceSummary
File: src/com/android/settings/password/ChooseLockGeneric.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2018-9501
|
HIGH
| 7.2
|
android
|
setPreferenceSummary
|
src/com/android/settings/password/ChooseLockGeneric.java
|
5e43341b8c7eddce88f79c9a5068362927c05b54
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected boolean checkType(IInterface service) {
return service instanceof INotificationListener;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkType
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
|
checkType
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("javadoc")
public int computeHorizontalScrollExtent() {
return mRenderCoordinates.getLastFrameViewportWidthPixInt();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: computeHorizontalScrollExtent
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
|
computeHorizontalScrollExtent
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void closeClientTwice(TestContext context) {
PostgresClient c = PostgresClient.getInstance(vertx);
context.assertNotNull(c.getClient(), "getClient()");
c.closeClient(context.asyncAssertSuccess());
context.assertNull(c.getClient(), "getClient()");
c.closeClient(context.asyncAssertSuccess());
context.assertNull(c.getClient(), "getClient()");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: closeClientTwice
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
|
closeClientTwice
|
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void disassociateConversationContext(HttpServletRequest request) {
try {
httpConversationContext().dissociate(request);
} catch (Exception e) {
ServletLogger.LOG.unableToDissociateContext(httpConversationContext(), request);
ServletLogger.LOG.catchingDebug(e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: disassociateConversationContext
File: impl/src/main/java/org/jboss/weld/servlet/ConversationContextActivator.java
Repository: weld/core
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2014-8122
|
MEDIUM
| 4.3
|
weld/core
|
disassociateConversationContext
|
impl/src/main/java/org/jboss/weld/servlet/ConversationContextActivator.java
|
8e413202fa1af08c09c580f444e4fd16874f9c65
| 0
|
Analyze the following code function for security vulnerabilities
|
private void handleXmlEvent(Deque<Map<String, Object>> stack, XMLStreamReader reader, boolean simpleMode) throws XMLStreamException {
Map<String, Object> elementMap;
switch (reader.getEventType()) {
case START_DOCUMENT:
case END_DOCUMENT:
// intentionally empty
break;
case START_ELEMENT:
int attributes = reader.getAttributeCount();
elementMap = new LinkedHashMap<>(attributes + 3);
elementMap.put("_type", reader.getLocalName());
for (int a = 0; a < attributes; a++) {
elementMap.put(reader.getAttributeLocalName(a), reader.getAttributeValue(a));
}
if (!stack.isEmpty()) {
final Map<String, Object> last = stack.getLast();
String key = simpleMode ? "_" + reader.getLocalName() : "_children";
amendToList(last, key, elementMap);
}
stack.addLast(elementMap);
break;
case END_ELEMENT:
elementMap = stack.size() > 1 ? stack.removeLast() : stack.getLast();
// maintain compatibility with previous implementation:
// if we only have text childs, return them in "_text" and not in "_children"
Object children = elementMap.get("_children");
if (children != null) {
if ((children instanceof String) || collectionIsAllStrings(children)) {
elementMap.put("_text", children);
elementMap.remove("_children");
}
}
break;
case CHARACTERS:
final String text = reader.getText().trim();
if (!text.isEmpty()) {
Map<String, Object> map = stack.getLast();
amendToList(map, "_children", text);
}
break;
default:
throw new RuntimeException("dunno know how to handle xml event type " + reader.getEventType());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleXmlEvent
File: src/main/java/apoc/load/Xml.java
Repository: neo4j-contrib/neo4j-apoc-procedures
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000820
|
HIGH
| 7.5
|
neo4j-contrib/neo4j-apoc-procedures
|
handleXmlEvent
|
src/main/java/apoc/load/Xml.java
|
45bc09c8bd7f17283e2a7e85ce3f02cb4be4fd1a
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean getDrawnStateEvaluated() {
return mDrawnStateEvaluated;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDrawnStateEvaluated
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
|
getDrawnStateEvaluated
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String getSubmissionParameters(Context context,
HttpServletRequest request) throws SQLException, ServletException
{
SubmissionInfo si = getSubmissionInfo(context, request);
SubmissionStepConfig step = getCurrentStepConfig(request, si);
String info = "";
if ((si.getSubmissionItem() != null) && si.isInWorkflow())
{
info = info
+ "<input type=\"hidden\" name=\"workflow_id\" value=\""
+ si.getSubmissionItem().getID() + "\"/>";
}
else if (si.getSubmissionItem() != null)
{
info = info
+ "<input type=\"hidden\" name=\"workspace_item_id\" value=\""
+ si.getSubmissionItem().getID() + "\"/>";
}
if (si.getBundle() != null)
{
info = info + "<input type=\"hidden\" name=\"bundle_id\" value=\""
+ si.getBundle().getID() + "\"/>";
}
if (si.getBitstream() != null)
{
info = info
+ "<input type=\"hidden\" name=\"bitstream_id\" value=\""
+ si.getBitstream().getID() + "\"/>";
}
if (step != null)
{
info = info + "<input type=\"hidden\" name=\"step\" value=\""
+ step.getStepNumber() + "\"/>";
}
// save the current page from the current Step Servlet
int page = AbstractProcessingStep.getCurrentPage(request);
info = info + "<input type=\"hidden\" name=\"page\" value=\"" + page
+ "\"/>";
// save the current JSP name to a hidden variable
String jspDisplayed = JSPStepManager.getLastJSPDisplayed(request);
info = info + "<input type=\"hidden\" name=\"jsp\" value=\""
+ jspDisplayed + "\"/>";
return info;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSubmissionParameters
File: dspace-jspui/src/main/java/org/dspace/app/webui/servlet/SubmissionController.java
Repository: DSpace
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-31194
|
HIGH
| 7.2
|
DSpace
|
getSubmissionParameters
|
dspace-jspui/src/main/java/org/dspace/app/webui/servlet/SubmissionController.java
|
d1dd7d23329ef055069759df15cfa200c8e3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public long longValue() {
return bigDecimalValue().longValue();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: longValue
File: impl/src/main/java/org/eclipse/parsson/JsonNumberImpl.java
Repository: eclipse-ee4j/parsson
The code follows secure coding practices.
|
[
"CWE-834"
] |
CVE-2023-4043
|
HIGH
| 7.5
|
eclipse-ee4j/parsson
|
longValue
|
impl/src/main/java/org/eclipse/parsson/JsonNumberImpl.java
|
84764ffbe3d0376da242b27a9a526138d0dfb8e6
| 0
|
Analyze the following code function for security vulnerabilities
|
public void onStartingToHide() {
if (mCurrentSecurityMode != SecurityMode.None) {
getCurrentSecurityController().onStartingToHide();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onStartingToHide
File: packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21245
|
HIGH
| 7.8
|
android
|
onStartingToHide
|
packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java
|
a33159e8cb297b9eee6fa5c63c0e343d05fad622
| 0
|
Analyze the following code function for security vulnerabilities
|
public void printStackTraceToStream(Throwable t, Writer o) {
PrintWriter p = new PrintWriter(o);
t.printStackTrace(p);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: printStackTraceToStream
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
|
printStackTraceToStream
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void updateSingleQuote(TestContext context) {
createFoo(context)
.update(FOO, singleQuotePojo, randomUuid(), context.asyncAssertSuccess());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateSingleQuote
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
|
updateSingleQuote
|
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
public void handleLeftButton() {
if (mUiStage.leftMode == LeftButtonMode.Retry) {
if (mChosenPattern != null) {
mChosenPattern.zeroize();
mChosenPattern = null;
}
mLockPatternView.clearPattern();
updateStage(Stage.Introduction);
} else {
throw new IllegalStateException("left footer button pressed, but stage of " +
mUiStage + " doesn't make sense");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleLeftButton
File: src/com/android/settings/password/ChooseLockPattern.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40117
|
HIGH
| 7.8
|
android
|
handleLeftButton
|
src/com/android/settings/password/ChooseLockPattern.java
|
11815817de2f2d70fe842b108356a1bc75d44ffb
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public DispatcherType getDispatcherType() {
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDispatcherType
File: h2/src/test/org/h2/test/server/TestWeb.java
Repository: h2database
The code follows secure coding practices.
|
[
"CWE-312"
] |
CVE-2022-45868
|
HIGH
| 7.8
|
h2database
|
getDispatcherType
|
h2/src/test/org/h2/test/server/TestWeb.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 0
|
Analyze the following code function for security vulnerabilities
|
@SystemApi
@RequiresPermission(android.Manifest.permission.MANAGE_USERS)
public boolean isDeviceProvisioned() {
try {
return mService.isDeviceProvisioned();
} catch (RemoteException re) {
throw re.rethrowFromSystemServer();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isDeviceProvisioned
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
|
isDeviceProvisioned
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public static ProfileDataInfo fromXML(String xml) throws Exception {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.parse(new InputSource(new StringReader(xml)));
Element profileParameterElement = document.getDocumentElement();
return fromDOM(profileParameterElement);
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2022-2414
- Severity: HIGH
- CVSS Score: 7.5
Description: Disable access to external entities when parsing XML
This reduces the vulnerability of XML parsers to XXE (XML external
entity) injection.
The best way to prevent XXE is to stop using XML altogether, which we do
plan to do. Until that happens I consider it worthwhile to tighten the
security here though.
Function: fromXML
File: base/common/src/main/java/com/netscape/certsrv/profile/ProfileDataInfo.java
Repository: dogtagpki/pki
Fixed Code:
public static ProfileDataInfo fromXML(String xml) throws Exception {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.parse(new InputSource(new StringReader(xml)));
Element profileParameterElement = document.getDocumentElement();
return fromDOM(profileParameterElement);
}
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
fromXML
|
base/common/src/main/java/com/netscape/certsrv/profile/ProfileDataInfo.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 1
|
Analyze the following code function for security vulnerabilities
|
private boolean isReadOnlyLocked() {
return (mConfigurationLocked.openFlags & OPEN_READ_MASK) == OPEN_READONLY;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isReadOnlyLocked
File: core/java/android/database/sqlite/SQLiteDatabase.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2018-9493
|
LOW
| 2.1
|
android
|
isReadOnlyLocked
|
core/java/android/database/sqlite/SQLiteDatabase.java
|
ebc250d16c747f4161167b5ff58b3aea88b37acf
| 0
|
Analyze the following code function for security vulnerabilities
|
public static WikiManager getInstance() {
return instance;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInstance
File: src/main/java/org/olat/modules/wiki/WikiManager.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-39180
|
HIGH
| 9
|
OpenOLAT
|
getInstance
|
src/main/java/org/olat/modules/wiki/WikiManager.java
|
699490be8e931af0ef1f135c55384db1f4232637
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getRealAssetPath(String inode, String fileName, String ext) {
String _inode = inode;
String path = "";
String realPath = Config.getStringProperty("ASSET_REAL_PATH");
if (UtilMethods.isSet(realPath) && !realPath.endsWith(java.io.File.separator))
realPath = realPath + java.io.File.separator;
String assetPath = Config.getStringProperty("ASSET_PATH");
if (UtilMethods.isSet(assetPath) && !assetPath.endsWith(java.io.File.separator))
assetPath = assetPath + java.io.File.separator;
path = ((!UtilMethods.isSet(realPath)) ? assetPath : realPath)
+ _inode.charAt(0) + java.io.File.separator + _inode.charAt(1)
+ java.io.File.separator + _inode+ java.io.File.separator + "fileAsset" + java.io.File.separator + fileName + "." + ext;
if (!UtilMethods.isSet(realPath))
return FileUtil.getRealPath(path);
else
return path;
}
|
Vulnerability Classification:
- CWE: CWE-434
- CVE: CVE-2017-11466
- Severity: HIGH
- CVSS Score: 9.0
Description: #12131 fixes arbitrary upload
Function: getRealAssetPath
File: dotCMS/src/main/java/com/dotmarketing/portlets/fileassets/business/FileAssetAPIImpl.java
Repository: dotCMS/core
Fixed Code:
public String getRealAssetPath(String inode, String fileName, String ext) {
String _inode = inode;
String path = "";
String realPath = Config.getStringProperty("ASSET_REAL_PATH");
if (UtilMethods.isSet(realPath) && !realPath.endsWith(java.io.File.separator))
realPath = realPath + java.io.File.separator;
String assetPath = Config.getStringProperty("ASSET_PATH", "/assets");
if (UtilMethods.isSet(assetPath) && !assetPath.endsWith(java.io.File.separator))
assetPath = assetPath + java.io.File.separator;
path = ((!UtilMethods.isSet(realPath)) ? assetPath : realPath)
+ _inode.charAt(0) + java.io.File.separator + _inode.charAt(1)
+ java.io.File.separator + _inode+ java.io.File.separator + "fileAsset" + java.io.File.separator + fileName + "." + ext;
if (!UtilMethods.isSet(realPath))
return FileUtil.getRealPath(path);
else
return path;
}
|
[
"CWE-434"
] |
CVE-2017-11466
|
HIGH
| 9
|
dotCMS/core
|
getRealAssetPath
|
dotCMS/src/main/java/com/dotmarketing/portlets/fileassets/business/FileAssetAPIImpl.java
|
208798c6aa9ca70f90740c8a8924e481283109ce
| 1
|
Analyze the following code function for security vulnerabilities
|
boolean super_onKeyUp(int keyCode, KeyEvent event);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: super_onKeyUp
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
|
super_onKeyUp
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
void handleJavaScriptResult(String jsonResult);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleJavaScriptResult
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
|
handleJavaScriptResult
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean removeTask(int taskId) {
enforceCallingPermission(android.Manifest.permission.REMOVE_TASKS, "removeTask()");
synchronized (this) {
final long ident = Binder.clearCallingIdentity();
try {
return removeTaskByIdLocked(taskId, true, REMOVE_FROM_RECENTS);
} finally {
Binder.restoreCallingIdentity(ident);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeTask
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3912
|
HIGH
| 9.3
|
android
|
removeTask
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
private List<Identity> getInvalidToAddressesFromTextBoxList() {
List<Identity> invalidTos = new ArrayList<>();
// the toValues are either usernames (from autocompletion, thus OLAT
// users) or email-addresses (external)
if (FolderConfig.getSendDocumentToExtern()) {
for (IdentityWrapper toValue : toValues) {
Identity id = toValue.getIdentity();
if (!MailHelper.isValidEmailAddress(id.getUser().getProperty(UserConstants.EMAIL, null))
&& !securityManager.isIdentityVisible(id)) {
invalidTos.add(id);
}
}
} else {
for (IdentityWrapper toValue : toValues) {
Identity id = toValue.getIdentity();
if(!securityManager.isIdentityVisible(id)){
invalidTos.add(id);
}
}
}
return invalidTos;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInvalidToAddressesFromTextBoxList
File: src/main/java/org/olat/core/util/mail/ui/SendDocumentsByEMailController.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-41152
|
MEDIUM
| 4
|
OpenOLAT
|
getInvalidToAddressesFromTextBoxList
|
src/main/java/org/olat/core/util/mail/ui/SendDocumentsByEMailController.java
|
418bb509ffcb0e25ab4390563c6c47f0458583eb
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean _userHasRole(final User user, final String roleid) throws IOException {
if (roleid == null) throw new NullPointerException("roleid is null");
return m_groupManager.userHasRole(user.getUserId(), roleid);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _userHasRole
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
|
_userHasRole
|
opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
|
607151ea8f90212a3fb37c977fa57c7d58d26a84
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void initPushContent(String message, String image, String messageType, String category, Context context) {
com.codename1.push.PushContent.reset();
int iMessageType = 1;
try {iMessageType = Integer.parseInt(messageType);}catch(Throwable t){}
String actionId = null;
String reply = null;
boolean cancel = true;
if (context instanceof Activity) {
Activity activity = (Activity)context;
Bundle extras = activity.getIntent().getExtras();
if (extras != null) {
actionId = extras.getString("pushActionId");
extras.remove("pushActionId");
if (actionId != null && RemoteInputWrapper.isSupported()) {
Bundle textExtras = RemoteInputWrapper.getResultsFromIntent(activity.getIntent());
if (textExtras != null) {
CharSequence cs = textExtras.getCharSequence(actionId + "$Result");
if (cs != null) {
reply = cs.toString();
}
}
}
}
}
if (cancel) {
PushNotificationService.cancelNotification(context);
}
com.codename1.push.PushContent.setType(iMessageType);
com.codename1.push.PushContent.setCategory(category);
if (actionId != null) {
com.codename1.push.PushContent.setActionId(actionId);
}
if (reply != null) {
com.codename1.push.PushContent.setTextResponse(reply);
}
switch (iMessageType) {
case 1:
case 5:
com.codename1.push.PushContent.setBody(message);break;
case 2: com.codename1.push.PushContent.setMetaData(message);break;
case 3: {
String[] parts = message.split(";");
com.codename1.push.PushContent.setMetaData(parts[1]);
com.codename1.push.PushContent.setBody(parts[0]);
break;
}
case 4: {
String[] parts = message.split(";");
com.codename1.push.PushContent.setTitle(parts[0]);
com.codename1.push.PushContent.setBody(parts[1]);
break;
}
case 101: {
com.codename1.push.PushContent.setBody(message.substring(message.indexOf(" ") + 1));
com.codename1.push.PushContent.setType(1);
break;
}
case 102: {
String[] parts = message.split(";");
com.codename1.push.PushContent.setTitle(parts[1]);
com.codename1.push.PushContent.setBody(parts[2]);
com.codename1.push.PushContent.setType(2);
break;
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initPushContent
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
|
initPushContent
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public int checkPermission(String permission, int pid, int uid)
throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeString(permission);
data.writeInt(pid);
data.writeInt(uid);
mRemote.transact(CHECK_PERMISSION_TRANSACTION, data, reply, 0);
reply.readException();
int res = reply.readInt();
data.recycle();
reply.recycle();
return res;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkPermission
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
checkPermission
|
core/java/android/app/ActivityManagerNative.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
private static @ColorInt int flattenAlpha(@ColorInt int color, @ColorInt int background) {
return Color.alpha(color) == 0xff ? color
: ContrastColorUtil.compositeColors(color, background);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: flattenAlpha
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
flattenAlpha
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
@GuardedBy("this")
private void update(int len) throws IOException {
if (memory != null && (memory.getCount() + len > fileThreshold)) {
File temp = File.createTempFile("FileBackedOutputStream", null, parentDirectory);
if (resetOnFinalize) {
// Finalizers are not guaranteed to be called on system shutdown;
// this is insurance.
temp.deleteOnExit();
}
try {
FileOutputStream transfer = new FileOutputStream(temp);
transfer.write(memory.getBuffer(), 0, memory.getCount());
transfer.flush();
// We've successfully transferred the data; switch to writing to file
out = transfer;
} catch (IOException e) {
temp.delete();
throw e;
}
file = temp;
memory = null;
}
}
|
Vulnerability Classification:
- CWE: CWE-552
- CVE: CVE-2023-2976
- Severity: HIGH
- CVSS Score: 7.1
Description: Restrict permissions when creating temporary files and directories, or fail if that's not possible.
(Also, check that the provided `fileThreshold` is non-negative.)
- Fixes https://github.com/google/guava/issues/2575
- Fixes https://github.com/google/guava/issues/4011
RELNOTES=Reimplemented `Files.createTempDir` and `FileBackedOutputStream` to further address [CVE-2020-8908](https://github.com/google/guava/issues/4011) and [Guava issue #2575](https://github.com/google/guava/issues/2575) (CVE forthcoming).
PiperOrigin-RevId: 535359233
Function: update
File: android/guava/src/com/google/common/io/FileBackedOutputStream.java
Repository: google/guava
Fixed Code:
@GuardedBy("this")
private void update(int len) throws IOException {
if (memory != null && (memory.getCount() + len > fileThreshold)) {
File temp = TempFileCreator.INSTANCE.createTempFile("FileBackedOutputStream");
if (resetOnFinalize) {
// Finalizers are not guaranteed to be called on system shutdown;
// this is insurance.
temp.deleteOnExit();
}
try {
FileOutputStream transfer = new FileOutputStream(temp);
transfer.write(memory.getBuffer(), 0, memory.getCount());
transfer.flush();
// We've successfully transferred the data; switch to writing to file
out = transfer;
} catch (IOException e) {
temp.delete();
throw e;
}
file = temp;
memory = null;
}
}
|
[
"CWE-552"
] |
CVE-2023-2976
|
HIGH
| 7.1
|
google/guava
|
update
|
android/guava/src/com/google/common/io/FileBackedOutputStream.java
|
feb83a1c8fd2e7670b244d5afd23cba5aca43284
| 1
|
Analyze the following code function for security vulnerabilities
|
public void readFromForm(EditForm eform, XWikiContext context) throws XWikiException
{
readDocMetaFromForm(eform, context);
readTranslationMetaFromForm(eform, context);
// We add the new objects that have been submitted in the form, before filling them with their values.
Map<String, List<Integer>> objectsToAdd = eform.getObjectsToAdd();
for (String className : objectsToAdd.keySet()) {
DocumentReference classReference = resolveClassReference(className);
List<Integer> classIds = objectsToAdd.get(className);
for (Integer classId : classIds) {
// we ensure that the object has not been added yet, for example because of the update or create.
getXObject(classReference, classId, true, context);
}
}
ObjectPolicyType objectPolicy = eform.getObjectPolicy();
if (objectPolicy == null || objectPolicy.equals(ObjectPolicyType.UPDATE)) {
readObjectsFromForm(eform, context);
} else if (objectPolicy.equals(ObjectPolicyType.UPDATE_OR_CREATE)) {
readObjectsFromFormUpdateOrCreate(eform, context);
}
// remove xobjects
Map<String, List<Integer>> objectsToRemove = eform.getObjectsToRemove();
for (String className : objectsToRemove.keySet()) {
DocumentReference classReference = resolveClassReference(className);
List<Integer> classIds = objectsToRemove.get(className);
for (Integer classId : classIds) {
BaseObject xObject = getXObject(classReference, classId);
if (xObject != null) {
removeXObject(xObject);
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readFromForm
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
|
readFromForm
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
private static synchronized void clearAdapterService() {
sAdapterService = null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearAdapterService
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
|
clearAdapterService
|
src/com/android/bluetooth/btservice/AdapterService.java
|
122feb9a0b04290f55183ff2f0384c6c53756bd8
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void jetConfig(XmlGenerator gen, Config config) {
JetConfig jetConfig = config.getJetConfig();
EdgeConfig edgeConfig = jetConfig.getDefaultEdgeConfig();
gen.open("jet", "enabled", jetConfig.isEnabled(), "resource-upload-enabled", jetConfig.isResourceUploadEnabled())
.node("cooperative-thread-count", jetConfig.getCooperativeThreadCount())
.node("flow-control-period", jetConfig.getFlowControlPeriodMs())
.node("backup-count", jetConfig.getBackupCount())
.node("scale-up-delay-millis", jetConfig.getScaleUpDelayMillis())
.node("lossless-restart-enabled", jetConfig.isLosslessRestartEnabled())
.node("max-processor-accumulated-records", jetConfig.getMaxProcessorAccumulatedRecords())
.open("edge-defaults")
.node("queue-size", edgeConfig.getQueueSize())
.node("packet-size-limit", edgeConfig.getPacketSizeLimit())
.node("receive-window-multiplier", edgeConfig.getReceiveWindowMultiplier())
.close()
.close();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: jetConfig
File: hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-522"
] |
CVE-2023-33264
|
MEDIUM
| 4.3
|
hazelcast
|
jetConfig
|
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
|
80a502d53cc48bf895711ab55f95e3a51e344ac1
| 0
|
Analyze the following code function for security vulnerabilities
|
public void goToLockedShade(View expandView) {
int userId = mCurrentUserId;
ExpandableNotificationRow row = null;
if (expandView instanceof ExpandableNotificationRow) {
row = (ExpandableNotificationRow) expandView;
row.setUserExpanded(true /* userExpanded */, true /* allowChildExpansion */);
// Indicate that the group expansion is changing at this time -- this way the group
// and children backgrounds / divider animations will look correct.
row.setGroupExpansionChanging(true);
if (row.getStatusBarNotification() != null) {
userId = row.getStatusBarNotification().getUserId();
}
}
boolean fullShadeNeedsBouncer = !userAllowsPrivateNotificationsInPublic(mCurrentUserId)
|| !mShowLockscreenNotifications || mFalsingManager.shouldEnforceBouncer();
if (isLockscreenPublicMode(userId) && fullShadeNeedsBouncer) {
mLeaveOpenOnKeyguardHide = true;
showBouncerIfKeyguard();
mDraggedDownRow = row;
mPendingRemoteInputView = null;
} else {
mNotificationPanel.animateToFullShade(0 /* delay */);
setBarState(StatusBarState.SHADE_LOCKED);
updateKeyguardState(false /* goingToFullShade */, false /* fromShadeLocked */);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: goToLockedShade
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
goToLockedShade
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void clearPackagePersistentPreferredActivities(ComponentName who, String packageName) {
Objects.requireNonNull(who, "ComponentName is null");
final CallerIdentity caller = getCallerIdentity(who);
Preconditions.checkCallAuthorization(isProfileOwner(caller)
|| isDefaultDeviceOwner(caller) || isFinancedDeviceOwner(caller));
final int userHandle = caller.getUserId();
synchronized (getLockObject()) {
long id = mInjector.binderClearCallingIdentity();
try {
mIPackageManager.clearPackagePersistentPreferredActivities(packageName, userHandle);
mIPackageManager.flushPackageRestrictionsAsUser(userHandle);
} catch (RemoteException re) {
// Shouldn't happen
} finally {
mInjector.binderRestoreCallingIdentity(id);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearPackagePersistentPreferredActivities
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2023-21284
|
MEDIUM
| 5.5
|
android
|
clearPackagePersistentPreferredActivities
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected boolean supportsVariableSizeKey() {
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: supportsVariableSizeKey
File: src/main/java/org/conscrypt/OpenSSLCipher.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2461
|
HIGH
| 7.6
|
android
|
supportsVariableSizeKey
|
src/main/java/org/conscrypt/OpenSSLCipher.java
|
1638945d4ed9403790962ec7abed1b7a232a9ff8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String toString() {
return "LFolder [base="+getBasefile()+"] ";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toString
File: src/main/java/org/olat/core/util/vfs/LocalFolderImpl.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-41242
|
HIGH
| 7.9
|
OpenOLAT
|
toString
|
src/main/java/org/olat/core/util/vfs/LocalFolderImpl.java
|
336d5ce80681be61a0bbf4f73d2af5d1ff67e93a
| 0
|
Analyze the following code function for security vulnerabilities
|
public Object query(JSONPointer jsonPointer) {
return jsonPointer.queryFrom(this);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: query
File: src/main/java/org/json/JSONObject.java
Repository: stleary/JSON-java
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2023-5072
|
HIGH
| 7.5
|
stleary/JSON-java
|
query
|
src/main/java/org/json/JSONObject.java
|
661114c50dcfd53bb041aab66f14bb91e0a87c8a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void sendError(int sc, String msg) throws IOException {
if (isIncluding()) {
Logger.log(Logger.ERROR, Launcher.RESOURCES, "IncludeResponse.Error",
new String[] { "" + sc, msg });
return;
}
Logger.log(Logger.DEBUG, Launcher.RESOURCES,
"WinstoneResponse.SendingError", new String[] { "" + sc, msg });
if ((this.webAppConfig != null) && (this.req != null)) {
RequestDispatcher rd = this.webAppConfig
.getErrorDispatcherByCode(req.getRequestURI(), sc, msg, null);
if (rd != null) {
try {
rd.forward(this.req, this);
return;
} catch (IllegalStateException err) {
throw err;
} catch (IOException err) {
throw err;
} catch (Throwable err) {
Logger.log(Logger.WARNING, Launcher.RESOURCES,
"WinstoneResponse.ErrorInErrorPage", new String[] {
rd.getName(), sc + "" }, err);
return;
}
}
}
// If we are here there was no webapp and/or no request object, so
// show the default error page
if (this.errorStatusCode == null) {
this.statusCode = sc;
}
String output = Launcher.RESOURCES.getString("WinstoneResponse.ErrorPage",
new String[] { sc + "", (msg == null ? "" : msg), "",
Launcher.RESOURCES.getString("ServerVersion"),
"" + new Date() });
setContentLength(output.getBytes(getCharacterEncoding()).length);
Writer out = getWriter();
out.write(output);
out.flush();
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2011-4344
- Severity: LOW
- CVSS Score: 2.6
Description: escape error messages which are supposed be plain text and not markup
Function: sendError
File: src/java/winstone/WinstoneResponse.java
Repository: jenkinsci/winstone
Fixed Code:
public void sendError(int sc, String msg) throws IOException {
if (isIncluding()) {
Logger.log(Logger.ERROR, Launcher.RESOURCES, "IncludeResponse.Error",
new String[] { "" + sc, msg });
return;
}
Logger.log(Logger.DEBUG, Launcher.RESOURCES,
"WinstoneResponse.SendingError", new String[] { "" + sc, msg });
if ((this.webAppConfig != null) && (this.req != null)) {
RequestDispatcher rd = this.webAppConfig
.getErrorDispatcherByCode(req.getRequestURI(), sc, msg, null);
if (rd != null) {
try {
rd.forward(this.req, this);
return;
} catch (IllegalStateException err) {
throw err;
} catch (IOException err) {
throw err;
} catch (Throwable err) {
Logger.log(Logger.WARNING, Launcher.RESOURCES,
"WinstoneResponse.ErrorInErrorPage", new String[] {
rd.getName(), sc + "" }, err);
return;
}
}
}
// If we are here there was no webapp and/or no request object, so
// show the default error page
if (this.errorStatusCode == null) {
this.statusCode = sc;
}
String output = Launcher.RESOURCES.getString("WinstoneResponse.ErrorPage",
new String[] { sc + "", URIUtil.htmlEscape(msg == null ? "" : msg), "",
Launcher.RESOURCES.getString("ServerVersion"),
"" + new Date() });
setContentLength(output.getBytes(getCharacterEncoding()).length);
Writer out = getWriter();
out.write(output);
out.flush();
}
|
[
"CWE-79"
] |
CVE-2011-4344
|
LOW
| 2.6
|
jenkinsci/winstone
|
sendError
|
src/java/winstone/WinstoneResponse.java
|
410ed3001d51c689cf59085b7417466caa2ded7b
| 1
|
Analyze the following code function for security vulnerabilities
|
public StanzaListener getInterceptor() {
return packetInterceptor;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInterceptor
File: smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
Repository: igniterealtime/Smack
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2016-10027
|
MEDIUM
| 4.3
|
igniterealtime/Smack
|
getInterceptor
|
smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
|
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
| 0
|
Analyze the following code function for security vulnerabilities
|
public LocalDateTime expireAt(String token) {
long time = JWT.decode(token).getExpiresAt().getTime();
return Instant.ofEpochMilli(time)
.atZone(ZoneId.systemDefault())
.toLocalDateTime();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: expireAt
File: core/src/main/java/com/databasir/core/infrastructure/jwt/JwtTokens.java
Repository: vran-dev/databasir
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2022-24861
|
MEDIUM
| 6.5
|
vran-dev/databasir
|
expireAt
|
core/src/main/java/com/databasir/core/infrastructure/jwt/JwtTokens.java
|
ca22a8fef7a31c0235b0b2951260a7819b89993b
| 0
|
Analyze the following code function for security vulnerabilities
|
public String createStaticFile(SysSite site, String fullTemplatePath, String filePath, Integer pageIndex,
Map<String, Object> metadataMap, Map<String, Object> model) throws IOException, TemplateException {
if (CommonUtils.notEmpty(filePath)) {
if (null == model) {
model = new HashMap<>();
}
model.put("metadata", metadataMap);
model.put("pageIndex", pageIndex);
AbstractFreemarkerView.exposeSite(model, site);
filePath = FreeMarkerUtils.generateStringByString(filePath, webConfiguration, model);
if (filePath.startsWith(CommonConstants.SEPARATOR)) {
filePath = filePath.substring(1);
}
model.put("url", site.getSitePath() + filePath);
String staticFilePath;
if (filePath.endsWith(CommonConstants.SEPARATOR)) {
staticFilePath = filePath + CommonConstants.getDefaultPage();
} else {
staticFilePath = filePath;
}
if (CommonUtils.notEmpty(pageIndex) && 1 < pageIndex) {
int index = staticFilePath.lastIndexOf(CommonConstants.DOT);
staticFilePath = staticFilePath.substring(0, index) + CommonConstants.UNDERLINE + pageIndex
+ staticFilePath.substring(index, staticFilePath.length());
}
FreeMarkerUtils.generateFileByFile(fullTemplatePath, siteComponent.getWebFilePath(site, staticFilePath),
webConfiguration, model);
}
return filePath;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createStaticFile
File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/logic/component/template/TemplateComponent.java
Repository: sanluan/PublicCMS
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2020-20914
|
CRITICAL
| 9.8
|
sanluan/PublicCMS
|
createStaticFile
|
publiccms-parent/publiccms-core/src/main/java/com/publiccms/logic/component/template/TemplateComponent.java
|
bf24c5dd9177cb2da30d0f0a62cf8e130003c2ae
| 0
|
Analyze the following code function for security vulnerabilities
|
public @ColorInt int getBackgroundColor() {
return mBackgroundColor;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getBackgroundColor
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
getBackgroundColor
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean startHomeOnAllDisplays(int userId, String reason) {
synchronized (mGlobalLock) {
return mRootWindowContainer.startHomeOnAllDisplays(userId, reason);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startHomeOnAllDisplays
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
|
startHomeOnAllDisplays
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
private static String getFirstValidRedirectUri(Collection<String> validRedirects) {
final String redirectUri = validRedirects.stream().findFirst().orElse(null);
return (redirectUri != null) ? validateRedirectUriWildcard(redirectUri) : null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFirstValidRedirectUri
File: services/src/main/java/org/keycloak/protocol/oidc/utils/RedirectUtils.java
Repository: keycloak
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-4361
|
MEDIUM
| 6.1
|
keycloak
|
getFirstValidRedirectUri
|
services/src/main/java/org/keycloak/protocol/oidc/utils/RedirectUtils.java
|
a1cfe6e24e5b34792699a00b8b4a8016a5929e3a
| 0
|
Analyze the following code function for security vulnerabilities
|
public static @NonNull ArrayMap<String, Object> getValues(@NonNull ContentValues values) {
final ArrayMap<String, Object> res = new ArrayMap<>();
for (String key : values.keySet()) {
res.put(key, values.get(key));
}
return res;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getValues
File: src/com/android/providers/media/util/DatabaseUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2023-35683
|
MEDIUM
| 5.5
|
android
|
getValues
|
src/com/android/providers/media/util/DatabaseUtils.java
|
23d156ed1bed6d2c2b325f0be540d0afca510c49
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void notifyNetworkPolicyRulesUpdated(int uid, long procStateSeq) {
if (DEBUG_NETWORK) {
Slog.d(TAG_NETWORK, "Got update from NPMS for uid: "
+ uid + " seq: " + procStateSeq);
}
UidRecord record;
synchronized (mProcLock) {
record = mProcessList.getUidRecordLOSP(uid);
if (record == null) {
if (DEBUG_NETWORK) {
Slog.d(TAG_NETWORK, "No active uidRecord for uid: " + uid
+ " procStateSeq: " + procStateSeq);
}
return;
}
}
synchronized (record.networkStateLock) {
if (record.lastNetworkUpdatedProcStateSeq >= procStateSeq) {
if (DEBUG_NETWORK) {
Slog.d(TAG_NETWORK, "procStateSeq: " + procStateSeq + " has already"
+ " been handled for uid: " + uid);
}
return;
}
record.lastNetworkUpdatedProcStateSeq = procStateSeq;
if (record.procStateSeqWaitingForNetwork != 0
&& procStateSeq >= record.procStateSeqWaitingForNetwork) {
if (DEBUG_NETWORK) {
Slog.d(TAG_NETWORK, "Notifying all blocking threads for uid: " + uid
+ ", procStateSeq: " + procStateSeq
+ ", procStateSeqWaitingForNetwork: "
+ record.procStateSeqWaitingForNetwork);
}
record.networkStateLock.notifyAll();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: notifyNetworkPolicyRulesUpdated
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
|
notifyNetworkPolicyRulesUpdated
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public RevCommit getCommit() {
if (resolvedRevision != null)
return getProject().getRevCommit(resolvedRevision, true);
else
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCommit
File: server-core/src/main/java/io/onedev/server/web/page/project/blob/ProjectBlobPage.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-434"
] |
CVE-2021-21245
|
HIGH
| 7.5
|
theonedev/onedev
|
getCommit
|
server-core/src/main/java/io/onedev/server/web/page/project/blob/ProjectBlobPage.java
|
0c060153fb97c0288a1917efdb17cc426934dacb
| 0
|
Analyze the following code function for security vulnerabilities
|
private void pushUserRestrictions(int originatingUserId) {
final Bundle global;
final RestrictionsSet local = new RestrictionsSet();
final boolean isDeviceOwner;
synchronized (getLockObject()) {
isDeviceOwner = mOwners.isDeviceOwnerUserId(originatingUserId);
if (isDeviceOwner) {
final ActiveAdmin deviceOwner = getDeviceOwnerAdminLocked();
if (deviceOwner == null) {
return; // Shouldn't happen.
}
global = deviceOwner.getGlobalUserRestrictions(OWNER_TYPE_DEVICE_OWNER);
local.updateRestrictions(originatingUserId, deviceOwner.getLocalUserRestrictions(
OWNER_TYPE_DEVICE_OWNER));
} else {
final ActiveAdmin profileOwner = getProfileOwnerAdminLocked(originatingUserId);
if (profileOwner == null) {
return;
}
global = profileOwner.getGlobalUserRestrictions(OWNER_TYPE_PROFILE_OWNER);
local.updateRestrictions(originatingUserId, profileOwner.getLocalUserRestrictions(
OWNER_TYPE_PROFILE_OWNER));
// Global (device-wide) and local user restrictions set by the profile owner of an
// organization-owned device are stored in the parent ActiveAdmin instance.
if (isProfileOwnerOfOrganizationOwnedDevice(
profileOwner.getUserHandle().getIdentifier())) {
// The global restrictions set on the parent ActiveAdmin instance need to be
// merged with the global restrictions set on the profile owner ActiveAdmin
// instance, since both are to be applied device-wide.
UserRestrictionsUtils.merge(global,
profileOwner.getParentActiveAdmin().getGlobalUserRestrictions(
OWNER_TYPE_PROFILE_OWNER_OF_ORGANIZATION_OWNED_DEVICE));
// The local restrictions set on the parent ActiveAdmin instance are only to be
// applied to the primary user. They therefore need to be added the local
// restriction set with the primary user id as the key, in this case the
// primary user id is the target user.
local.updateRestrictions(
getProfileParentId(profileOwner.getUserHandle().getIdentifier()),
profileOwner.getParentActiveAdmin().getLocalUserRestrictions(
OWNER_TYPE_PROFILE_OWNER_OF_ORGANIZATION_OWNED_DEVICE));
}
}
}
mUserManagerInternal.setDevicePolicyUserRestrictions(originatingUserId, global, local,
isDeviceOwner);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: pushUserRestrictions
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2023-21284
|
MEDIUM
| 5.5
|
android
|
pushUserRestrictions
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public Component getActiveModalComponent() {
if (hasModalComponent()) {
return modalComponentStack.peek();
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getActiveModalComponent
File: flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2023-25499
|
MEDIUM
| 6.5
|
vaadin/flow
|
getActiveModalComponent
|
flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
|
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
| 0
|
Analyze the following code function for security vulnerabilities
|
@Editable(order=400, description="Specify login information for docker registries if necessary")
public List<RegistryLogin> getRegistryLogins() {
return registryLogins;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRegistryLogins
File: server-plugin/server-plugin-executor-serverdocker/src/main/java/io/onedev/server/plugin/executor/serverdocker/ServerDockerExecutor.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-610"
] |
CVE-2022-39206
|
CRITICAL
| 9.9
|
theonedev/onedev
|
getRegistryLogins
|
server-plugin/server-plugin-executor-serverdocker/src/main/java/io/onedev/server/plugin/executor/serverdocker/ServerDockerExecutor.java
|
0052047a5b5095ac6a6b4a73a522d0272fec3a22
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable
UByte getAccessLevel() throws UaException {
Object value = getValue(accessLevelValue);
if (value instanceof UByte) {
return (UByte) value;
} else {
return null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAccessLevel
File: opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/subscriptions/SubscriptionManager.java
Repository: eclipse/milo
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2022-25897
|
HIGH
| 7.5
|
eclipse/milo
|
getAccessLevel
|
opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/subscriptions/SubscriptionManager.java
|
4534381760d7d9f0bf00cbf6a8449bb0d13c6ce5
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String dumpCurrentRowToString(Cursor cursor) {
StringBuilder sb = new StringBuilder();
dumpCurrentRow(cursor, sb);
return sb.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpCurrentRowToString
File: core/java/android/database/DatabaseUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2023-40121
|
MEDIUM
| 5.5
|
android
|
dumpCurrentRowToString
|
core/java/android/database/DatabaseUtils.java
|
3287ac2d2565dc96bf6177967f8e3aed33954253
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result + ((inputs == null) ? 0 : inputs.hashCode());
result = prime * result + ((outputs == null) ? 0 : outputs.hashCode());
result = prime * result + ((profileId == null) ? 0 : profileId.hashCode());
result = prime * result + ((remoteAddr == null) ? 0 : remoteAddr.hashCode());
result = prime * result + ((remoteHost == null) ? 0 : remoteHost.hashCode());
result = prime * result + (renewal ? 1231 : 1237);
result = prime * result + ((serialNum == null) ? 0 : serialNum.hashCode());
result = prime * result + ((serverSideKeygenP12Passwd == null) ? 0 : serverSideKeygenP12Passwd.hashCode());
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hashCode
File: base/common/src/main/java/com/netscape/certsrv/cert/CertEnrollmentRequest.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
hashCode
|
base/common/src/main/java/com/netscape/certsrv/cert/CertEnrollmentRequest.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
void updateHasAboveClientLocked() {
hasAboveClient = false;
for (int i=connections.size()-1; i>=0; i--) {
ConnectionRecord cr = connections.valueAt(i);
if ((cr.flags&Context.BIND_ABOVE_CLIENT) != 0) {
hasAboveClient = true;
break;
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateHasAboveClientLocked
File: services/core/java/com/android/server/am/ProcessRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2500
|
MEDIUM
| 4.3
|
android
|
updateHasAboveClientLocked
|
services/core/java/com/android/server/am/ProcessRecord.java
|
9878bb99b77c3681f0fda116e2964bac26f349c3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setStrings(@NonNull List<DevicePolicyStringResource> strings) {
Preconditions.checkCallAuthorization(hasCallingOrSelfPermission(
android.Manifest.permission.UPDATE_DEVICE_MANAGEMENT_RESOURCES));
Objects.requireNonNull(strings, "strings must be provided.");
mInjector.binderWithCleanCallingIdentity(() -> {
if (mDeviceManagementResourcesProvider.updateStrings(strings))
sendStringsUpdatedBroadcast(
strings.stream().map(s -> s.getStringId()).collect(Collectors.toList()));
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setStrings
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2023-21284
|
MEDIUM
| 5.5
|
android
|
setStrings
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean switchUser(@NonNull ComponentName admin, @Nullable UserHandle userHandle) {
throwIfParentInstance("switchUser");
try {
return mService.switchUser(admin, userHandle);
} catch (RemoteException re) {
throw re.rethrowFromSystemServer();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: switchUser
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
|
switchUser
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getHelpFile(final String fieldName) {
return getHelpFile(getKlass(),fieldName);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getHelpFile
File: core/src/main/java/hudson/model/Descriptor.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
getHelpFile
|
core/src/main/java/hudson/model/Descriptor.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.