instruction
string | input
string | output
string | cwe_ids
list | cve_id
string | severity
string | cvss_score
float64 | repo_name
string | func_name
string | file_path
string | commit_hash
string | is_vulnerable
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Analyze the following code function for security vulnerabilities
|
public boolean refContentProvider(IBinder connection, int stable, int unstable) {
ContentProviderConnection conn;
try {
conn = (ContentProviderConnection)connection;
} catch (ClassCastException e) {
String msg ="refContentProvider: " + connection
+ " not a ContentProviderConnection";
Slog.w(TAG, msg);
throw new IllegalArgumentException(msg);
}
if (conn == null) {
throw new NullPointerException("connection is null");
}
synchronized (this) {
if (stable > 0) {
conn.numStableIncs += stable;
}
stable = conn.stableCount + stable;
if (stable < 0) {
throw new IllegalStateException("stableCount < 0: " + stable);
}
if (unstable > 0) {
conn.numUnstableIncs += unstable;
}
unstable = conn.unstableCount + unstable;
if (unstable < 0) {
throw new IllegalStateException("unstableCount < 0: " + unstable);
}
if ((stable+unstable) <= 0) {
throw new IllegalStateException("ref counts can't go to zero here: stable="
+ stable + " unstable=" + unstable);
}
conn.stableCount = stable;
conn.unstableCount = unstable;
return !conn.dead;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: refContentProvider
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2018-9492
|
HIGH
| 7.2
|
android
|
refContentProvider
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<WifiConfiguration> getSavedNetworks(int targetUid) {
return getConfiguredNetworks(true, true, targetUid);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSavedNetworks
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
|
getSavedNetworks
|
service/java/com/android/server/wifi/WifiConfigManager.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
public void save() throws IOException {
try (FileWriter fileWriter = new FileWriter(realmFileCopy);
PrintWriter printWriter = new PrintWriter(fileWriter);) {
for (Map.Entry<String,Section> entry : sections.entrySet()) {
writeSection(printWriter, entry.getKey(), entry.getValue());
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: save
File: src/main/java/com/gitblit/StoredUserConfig.java
Repository: gitblit-org/gitblit
The code follows secure coding practices.
|
[
"CWE-269"
] |
CVE-2022-31267
|
HIGH
| 7.5
|
gitblit-org/gitblit
|
save
|
src/main/java/com/gitblit/StoredUserConfig.java
|
9b4afad6f4be212474809533ec2c280cce86501a
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean isAbsolute(String url)
{
if (url.startsWith("//")) // //www.domain.com/start
{
return true;
}
if (url.startsWith("/")) // /somePage.html
{
return false;
}
boolean result = false;
try
{
URI uri = new URI(url);
result = uri.isAbsolute();
}
catch (URISyntaxException e) {} //Ignore
return result;
}
|
Vulnerability Classification:
- CWE: CWE-601, CWE-918
- CVE: CVE-2022-1767
- Severity: MEDIUM
- CVSS Score: 5.0
Description: 18.0.7 release
Function: isAbsolute
File: src/main/java/com/mxgraph/online/AbsAuthServlet.java
Repository: jgraph/drawio
Fixed Code:
public static boolean isAbsolute(String url)
{
if (url.startsWith("//")) // //www.domain.com/start
{
return true;
}
try
{
URI uri = new URI(url);
return uri.isAbsolute();
}
catch (URISyntaxException e)
{
return true; // Block malformed URLs also
}
}
|
[
"CWE-601",
"CWE-918"
] |
CVE-2022-1767
|
MEDIUM
| 5
|
jgraph/drawio
|
isAbsolute
|
src/main/java/com/mxgraph/online/AbsAuthServlet.java
|
c63f3a04450f30798df47f9badbc74eb8a69fbdf
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public String reverse(final Map<String, Object> vars) {
return route.reverse(vars);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: reverse
File: jooby/src/main/java/org/jooby/internal/RouteImpl.java
Repository: jooby-project/jooby
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-15477
|
MEDIUM
| 4.3
|
jooby-project/jooby
|
reverse
|
jooby/src/main/java/org/jooby/internal/RouteImpl.java
|
34856a738829d8fedca4ed27bd6ff413af87186f
| 0
|
Analyze the following code function for security vulnerabilities
|
private void cloneAttachments(final XWikiDocument sourceDocument)
{
this.getAttachmentList().clear();
for (XWikiAttachment attach : sourceDocument.getAttachmentList()) {
XWikiAttachment newAttach = (XWikiAttachment) attach.clone();
setAttachment(newAttach);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cloneAttachments
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
|
cloneAttachments
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
public DocumentReference getAuthorReference()
{
return this.authorReference;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAuthorReference
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
|
getAuthorReference
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher) {
this.applicationEventPublisher.setApplicationEventPublisher(applicationEventPublisher);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setApplicationEventPublisher
File: spring/spring5/spring5-common/src/main/java/org/infinispan/spring/common/session/AbstractInfinispanSessionRepository.java
Repository: infinispan
The code follows secure coding practices.
|
[
"CWE-384"
] |
CVE-2019-10158
|
HIGH
| 7.5
|
infinispan
|
setApplicationEventPublisher
|
spring/spring5/spring5-common/src/main/java/org/infinispan/spring/common/session/AbstractInfinispanSessionRepository.java
|
f3efef8de7fec4108dd5ab725cea6ae09f14815d
| 0
|
Analyze the following code function for security vulnerabilities
|
public File doSaveTempDiagram(String filename, String fileextension) throws IOException {
File tempFile = new File(Path.temp() + filename + "." + fileextension);
tempFile.deleteOnExit();
if (fileextension.equals(Program.getInstance().getExtension())) {
save(tempFile, true);
}
else {
doExportAs(fileextension, tempFile);
}
return tempFile;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doSaveTempDiagram
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
|
doSaveTempDiagram
|
umlet-swing/src/main/java/com/baselet/diagram/io/DiagramFileHandler.java
|
e1c4cc6ae692cc8d1c367460dbf79343e996f9bd
| 0
|
Analyze the following code function for security vulnerabilities
|
public String dialogStart(String attributes) {
return dialog(HTML_START, attributes);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dialogStart
File: src/org/opencms/workplace/CmsDialog.java
Repository: alkacon/opencms-core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2013-4600
|
MEDIUM
| 4.3
|
alkacon/opencms-core
|
dialogStart
|
src/org/opencms/workplace/CmsDialog.java
|
72a05e3ea1cf692e2efce002687272e63f98c14a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public synchronized OutputStream setBinaryStream() throws SQLException {
checkFreed();
initialize();
active = true;
byteArrayOutputStream = new ByteArrayOutputStream();
return byteArrayOutputStream;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setBinaryStream
File: pgjdbc/src/main/java/org/postgresql/jdbc/PgSQLXML.java
Repository: pgjdbc
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2020-13692
|
MEDIUM
| 6.8
|
pgjdbc
|
setBinaryStream
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgSQLXML.java
|
14b62aca4764d496813f55a43d050b017e01eb65
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void selectSingleParamTxException(TestContext context) {
postgresClient().selectSingle(null, "SELECT 1", new JsonArray(), context.asyncAssertFailure());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: selectSingleParamTxException
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
|
selectSingleParamTxException
|
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onResume() {
super.onResume();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onResume
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
|
onResume
|
src/main/java/eu/siacs/conversations/ui/XmppActivity.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void uploadUpdateFile(
Context context,
Account account,
OCFile existingFile,
Integer behaviour,
NameCollisionPolicy nameCollisionPolicy
) {
uploadUpdateFile(context, account, new OCFile[]{existingFile}, behaviour, nameCollisionPolicy, true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: uploadUpdateFile
File: src/main/java/com/owncloud/android/files/services/FileUploader.java
Repository: nextcloud/android
The code follows secure coding practices.
|
[
"CWE-732"
] |
CVE-2022-24886
|
LOW
| 2.1
|
nextcloud/android
|
uploadUpdateFile
|
src/main/java/com/owncloud/android/files/services/FileUploader.java
|
c01fa0b17050cdcf77a468cc22f4071eae29d464
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void endProcessing() {
try {
super.endProcessing();
} catch (final LoggedException e) {
throw e;
} catch (final Throwable e) {
throw ProcessException.wrap(e);
} finally {
// Return the parser factory to the pool if we have used one.
if (poolItem != null && parserFactoryPool != null) {
parserFactoryPool.returnObject(poolItem, usePool);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: endProcessing
File: stroom-pipeline/src/main/java/stroom/pipeline/server/parser/CombinedParser.java
Repository: gchq/stroom
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000651
|
HIGH
| 7.5
|
gchq/stroom
|
endProcessing
|
stroom-pipeline/src/main/java/stroom/pipeline/server/parser/CombinedParser.java
|
ba30ffd415bd7d32ee40ba4b04035267ce80b499
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String concat(String ... dbColumns) throws DotRuntimeException{
if (dbColumns == null){
throw new DotRuntimeException("the column list being concated are null");
}
StringBuilder bob = new StringBuilder();
boolean first = true;
for (String col : dbColumns) {
if(DbConnectionFactory.isMsSql()){
if(!first){
bob.append(" + ");
}
bob.append("cast( " ).append( col ).append( " as varchar(512))");
}else if(DbConnectionFactory.isMySql()){
if(first){
bob.append("CONCAT(");
}else{
bob.append(",");
}
bob.append(col);
}else{
if(!first){
bob.append(" || ");
}
bob.append(col);
}
first = false;
}
if(DbConnectionFactory.isMySql()){
bob.append(")");
}
return bob.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: concat
File: src/com/dotmarketing/common/util/SQLUtil.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-2355
|
HIGH
| 7.5
|
dotCMS/core
|
concat
|
src/com/dotmarketing/common/util/SQLUtil.java
|
897f3632d7e471b7a73aabed5b19f6f53d4e5562
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public KBTemplate fetchByUuid_First(String uuid,
OrderByComparator<KBTemplate> orderByComparator) {
List<KBTemplate> list = findByUuid(uuid, 0, 1, orderByComparator);
if (!list.isEmpty()) {
return list.get(0);
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fetchByUuid_First
File: modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java
Repository: brianchandotcom/liferay-portal
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2017-12647
|
MEDIUM
| 4.3
|
brianchandotcom/liferay-portal
|
fetchByUuid_First
|
modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java
|
ef93d984be9d4d478a5c4b1ca9a86f4e80174774
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getState() throws RemoteException {
synchronized (NfcService.this) {
return mState;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getState
File: src/com/android/nfc/NfcService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3761
|
LOW
| 2.1
|
android
|
getState
|
src/com/android/nfc/NfcService.java
|
9ea802b5456a36f1115549b645b65c791eff3c2c
| 0
|
Analyze the following code function for security vulnerabilities
|
public String display(String fieldname)
{
if (this.currentObj == null) {
return this.doc.display(fieldname, getXWikiContext());
} else {
return this.doc.display(fieldname, this.currentObj.getBaseObject(), getXWikiContext());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: display
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-23615
|
MEDIUM
| 5.5
|
xwiki/xwiki-platform
|
display
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
|
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
| 0
|
Analyze the following code function for security vulnerabilities
|
public void scrollToEnd() {
getRpcProxy(GridClientRpc.class).scrollToEnd();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: scrollToEnd
File: server/src/main/java/com/vaadin/ui/Grid.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-25028
|
MEDIUM
| 4.3
|
vaadin/framework
|
scrollToEnd
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
@NonNull
public Builder setSmallIcon(@DrawableRes int icon, int level) {
mN.iconLevel = level;
return setSmallIcon(icon);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSmallIcon
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
setSmallIcon
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void addOnPermissionsChangeListener(IOnPermissionsChangeListener listener) {
mContext.enforceCallingOrSelfPermission(
Manifest.permission.OBSERVE_GRANT_REVOKE_PERMISSIONS,
"addOnPermissionsChangeListener");
synchronized (mPackages) {
mOnPermissionChangeListeners.addListenerLocked(listener);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addOnPermissionsChangeListener
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
|
addOnPermissionsChangeListener
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
Intent getHomeIntent() {
Intent intent = new Intent(mTopAction, mTopData != null ? Uri.parse(mTopData) : null);
intent.setComponent(mTopComponent);
intent.addFlags(Intent.FLAG_DEBUG_TRIAGED_MISSING);
if (mFactoryTest != FactoryTest.FACTORY_TEST_LOW_LEVEL) {
intent.addCategory(Intent.CATEGORY_HOME);
}
return intent;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getHomeIntent
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2018-9492
|
HIGH
| 7.2
|
android
|
getHomeIntent
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onAccountsUpdated(Account[] accounts) {
//review the current download and cancel it if its account doesn't exist
if (mCurrentDownload != null && !accountManager.exists(mCurrentDownload.getAccount())) {
mCurrentDownload.cancel();
}
// The rest of downloads are cancelled when they try to start
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onAccountsUpdated
File: src/main/java/com/owncloud/android/files/services/FileDownloader.java
Repository: nextcloud/android
The code follows secure coding practices.
|
[
"CWE-732"
] |
CVE-2022-24886
|
LOW
| 2.1
|
nextcloud/android
|
onAccountsUpdated
|
src/main/java/com/owncloud/android/files/services/FileDownloader.java
|
27559efb79d45782e000b762860658d49e9c35e9
| 0
|
Analyze the following code function for security vulnerabilities
|
private void doDiscardWithoutConfirmation() {
synchronized (mDraftLock) {
if (mDraftId != UIProvider.INVALID_MESSAGE_ID) {
ContentValues values = new ContentValues();
values.put(BaseColumns._ID, mDraftId);
if (!mAccount.expungeMessageUri.equals(Uri.EMPTY)) {
getContentResolver().update(mAccount.expungeMessageUri, values, null, null);
} else {
getContentResolver().delete(mDraft.uri, null, null);
}
// This is not strictly necessary (since we should not try to
// save the draft after calling this) but it ensures that if we
// do save again for some reason we make a new draft rather than
// trying to resave an expunged draft.
mDraftId = UIProvider.INVALID_MESSAGE_ID;
}
}
// Display a toast to let the user know
Toast.makeText(this, R.string.message_discarded, Toast.LENGTH_SHORT).show();
// This prevents the draft from being saved in onPause().
discardChanges();
mPerformedSendOrDiscard = true;
finish();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doDiscardWithoutConfirmation
File: src/com/android/mail/compose/ComposeActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2425
|
MEDIUM
| 4.3
|
android
|
doDiscardWithoutConfirmation
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
public HttpSerializer serializer() {
return this.serializer;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: serializer
File: src/tsd/HttpQuery.java
Repository: OpenTSDB/opentsdb
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-25827
|
MEDIUM
| 6.1
|
OpenTSDB/opentsdb
|
serializer
|
src/tsd/HttpQuery.java
|
ff02c1e95e60528275f69b31bcbf7b2ac625cea8
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isRegisteredAttributionSource(@NonNull AttributionSource source) {
synchronized (mLock) {
final AttributionSource cachedSource = mAttributions.get(source.getToken());
if (cachedSource != null) {
return cachedSource.equals(source);
}
return false;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isRegisteredAttributionSource
File: services/core/java/com/android/server/pm/permission/PermissionManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-281"
] |
CVE-2023-21249
|
MEDIUM
| 5.5
|
android
|
isRegisteredAttributionSource
|
services/core/java/com/android/server/pm/permission/PermissionManagerService.java
|
c00b7e7dbc1fa30339adef693d02a51254755d7f
| 0
|
Analyze the following code function for security vulnerabilities
|
public String[] getToAddresses() {
return getAddressesFromList(mTo);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getToAddresses
File: src/com/android/mail/compose/ComposeActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2425
|
MEDIUM
| 4.3
|
android
|
getToAddresses
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
public void doFingerprintCleanup(StaplerResponse rsp) throws IOException {
FingerprintCleanupThread.invoke();
rsp.setStatus(HttpServletResponse.SC_OK);
rsp.setContentType("text/plain");
rsp.getWriter().println("Invoked");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doFingerprintCleanup
File: core/src/main/java/jenkins/model/Jenkins.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-2065
|
MEDIUM
| 4.3
|
jenkinsci/jenkins
|
doFingerprintCleanup
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void reportMessages(Jiffle.Result result) throws
it.geosolutions.jaiext.jiffle.JiffleException {
reportMessages(result.messages);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: reportMessages
File: jt-jiffle/jt-jiffle-language/src/main/java/it/geosolutions/jaiext/jiffle/Jiffle.java
Repository: geosolutions-it/jai-ext
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2022-24816
|
HIGH
| 7.5
|
geosolutions-it/jai-ext
|
reportMessages
|
jt-jiffle/jt-jiffle-language/src/main/java/it/geosolutions/jaiext/jiffle/Jiffle.java
|
cb1d6565d38954676b0a366da4f965fef38da1cb
| 0
|
Analyze the following code function for security vulnerabilities
|
void dismissZoomPicker();
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dismissZoomPicker
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
|
dismissZoomPicker
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
private void pushActiveAdminPackagesLocked(int userId) {
mUsageStatsManagerInternal.setActiveAdminApps(
getActiveAdminPackagesLocked(userId), userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: pushActiveAdminPackagesLocked
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
|
pushActiveAdminPackagesLocked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isUserAMonkey() {
synchronized (mProcLock) {
// If there is a controller also implies the user is a monkey.
return mUserIsMonkey || mActivityTaskManager.isControllerAMonkey();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isUserAMonkey
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
|
isUserAMonkey
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public TfsMaterial getTfsMaterial() {
return getExistingOrDefaultMaterial(new TfsMaterial(new GoCipher(), new UrlArgument(""), "", "", "", ""));
}
|
Vulnerability Classification:
- CWE: CWE-668
- CVE: CVE-2022-39309
- Severity: MEDIUM
- CVSS Score: 6.5
Description: SCMMaterial changes #000
* SCMMaterial unlike SCMMaterialConfig objects are used for polling,
they do not need to encrypt the password. Hence removing the
encryptedPassword attribute.
Function: getTfsMaterial
File: domain/src/main/java/com/thoughtworks/go/config/materials/Materials.java
Repository: gocd
Fixed Code:
public TfsMaterial getTfsMaterial() {
return getExistingOrDefaultMaterial(new TfsMaterial(new UrlArgument(""), "", "", "", ""));
}
|
[
"CWE-668"
] |
CVE-2022-39309
|
MEDIUM
| 6.5
|
gocd
|
getTfsMaterial
|
domain/src/main/java/com/thoughtworks/go/config/materials/Materials.java
|
691b479f1310034992da141760e9c5d1f5b60e8a
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public void addOnCrossProfileWidgetProvidersChangeListener(
OnCrossProfileWidgetProvidersChangeListener listener) {
synchronized (getLockObject()) {
if (mWidgetProviderListeners == null) {
mWidgetProviderListeners = new ArrayList<>();
}
if (!mWidgetProviderListeners.contains(listener)) {
mWidgetProviderListeners.add(listener);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addOnCrossProfileWidgetProvidersChangeListener
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
|
addOnCrossProfileWidgetProvidersChangeListener
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public void sendReceiptIfRequested(Packet packet) {
DeliveryReceiptRequest drr = (DeliveryReceiptRequest)packet.getExtension(
DeliveryReceiptRequest.ELEMENT, DeliveryReceipt.NAMESPACE);
if (drr != null) {
Message ack = new Message(packet.getFrom(), Message.Type.normal);
ack.addExtension(new DeliveryReceipt(packet.getPacketID()));
mXMPPConnection.sendPacket(ack);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendReceiptIfRequested
File: src/org/yaxim/androidclient/service/SmackableImp.java
Repository: ge0rg/yaxim
The code follows secure coding practices.
|
[
"CWE-20",
"CWE-346"
] |
CVE-2017-5589
|
MEDIUM
| 4.3
|
ge0rg/yaxim
|
sendReceiptIfRequested
|
src/org/yaxim/androidclient/service/SmackableImp.java
|
65a38dc77545d9568732189e86089390f0ceaf9f
| 0
|
Analyze the following code function for security vulnerabilities
|
public ServerBuilder http(InetSocketAddress localAddress) {
return port(new ServerPort(requireNonNull(localAddress, "localAddress"), HTTP));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: http
File: core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-44487
|
HIGH
| 7.5
|
line/armeria
|
http
|
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
|
df7f85824a62e997b910b5d6194a3335841065fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void configEngine(Engine engine) {
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: configEngine
File: web/src/main/java/com/zrlog/web/config/ZrLogConfig.java
Repository: 94fzb/zrlog
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-16643
|
LOW
| 3.5
|
94fzb/zrlog
|
configEngine
|
web/src/main/java/com/zrlog/web/config/ZrLogConfig.java
|
4a91c83af669e31a22297c14f089d8911d353fa1
| 0
|
Analyze the following code function for security vulnerabilities
|
private void updateAllSharedLibrariesLPw() {
for (PackageParser.Package pkg : mPackages.values()) {
try {
updateSharedLibrariesLPw(pkg, null);
} catch (PackageManagerException e) {
Slog.e(TAG, "updateAllSharedLibrariesLPw failed: " + e.getMessage());
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateAllSharedLibrariesLPw
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
|
updateAllSharedLibrariesLPw
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
public long getRabbitDeliveryTag() {
return this.rabbitDeliveryTag;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRabbitDeliveryTag
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
|
getRabbitDeliveryTag
|
src/main/java/com/rabbitmq/jms/client/RMQMessage.java
|
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getUserOrgUnitPathsFilter( Set<String> userOrgUnitPaths )
{
return Stream.concat(
Stream.of( "ou.organisationUnitId is null" ),
userOrgUnitPaths.stream()
.map( userOrgUnitPath -> "ou.path like '" + userOrgUnitPath + "%'" ) )
.collect( joining( " or ", "(", ")" ) );
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserOrgUnitPathsFilter
File: dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/association/AbstractOrganisationUnitAssociationsQueryBuilder.java
Repository: dhis2/dhis2-core
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-24848
|
MEDIUM
| 6.5
|
dhis2/dhis2-core
|
getUserOrgUnitPathsFilter
|
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/association/AbstractOrganisationUnitAssociationsQueryBuilder.java
|
ef04483a9b177d62e48dcf4e498b302a11f95e7d
| 0
|
Analyze the following code function for security vulnerabilities
|
ActivityStarter setActivityOptions(SafeActivityOptions options) {
mRequest.activityOptions = options;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setActivityOptions
File: services/core/java/com/android/server/wm/ActivityStarter.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-269"
] |
CVE-2023-21269
|
HIGH
| 7.8
|
android
|
setActivityOptions
|
services/core/java/com/android/server/wm/ActivityStarter.java
|
70ec64dc5a2a816d6aa324190a726a85fd749b30
| 0
|
Analyze the following code function for security vulnerabilities
|
private static boolean isJarEntryDigestNeededInManifest(String entryName) {
// NOTE: This logic is different from what's required by the JAR signing scheme. This is
// because Android's APK verification logic differs from that spec. In particular, JAR
// signing spec includes into JAR manifest all files in subdirectories of META-INF and
// any files inside META-INF not related to signatures.
if (entryName.startsWith("META-INF/")) {
return false;
}
return !entryName.endsWith("/");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isJarEntryDigestNeededInManifest
File: src/main/java/com/android/apksig/internal/apk/v1/V1SchemeVerifier.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21253
|
MEDIUM
| 5.5
|
android
|
isJarEntryDigestNeededInManifest
|
src/main/java/com/android/apksig/internal/apk/v1/V1SchemeVerifier.java
|
41d882324288085fd32ae0bb70dc85f5fd0e2be7
| 0
|
Analyze the following code function for security vulnerabilities
|
public void validateAccounts(int userId) {
final UserAccounts accounts = getUserAccounts(userId);
// Invalidate user-specific cache to make sure we catch any
// removed authenticators.
validateAccountsInternal(accounts, true /* invalidateAuthenticatorCache */);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: validateAccounts
File: services/core/java/com/android/server/accounts/AccountManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-502"
] |
CVE-2023-45777
|
HIGH
| 7.8
|
android
|
validateAccounts
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setLogoutHandler(final LogoutHandler logoutHandler) {
this.logoutHandler = logoutHandler;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setLogoutHandler
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
|
setLogoutHandler
|
pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java
|
22b82ffd702a132d9f09da60362fc6264fc281ae
| 0
|
Analyze the following code function for security vulnerabilities
|
void updateSleepIfNeededLocked() {
if (mSleeping && !shouldSleepLocked()) {
mSleeping = false;
mStackSupervisor.comeOutOfSleepIfNeededLocked();
} else if (!mSleeping && shouldSleepLocked()) {
mSleeping = true;
mStackSupervisor.goingToSleepLocked();
// Initialize the wake times of all processes.
checkExcessivePowerUsageLocked(false);
mHandler.removeMessages(CHECK_EXCESSIVE_WAKE_LOCKS_MSG);
Message nmsg = mHandler.obtainMessage(CHECK_EXCESSIVE_WAKE_LOCKS_MSG);
mHandler.sendMessageDelayed(nmsg, POWER_CHECK_DELAY);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateSleepIfNeededLocked
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3833
|
MEDIUM
| 4.3
|
android
|
updateSleepIfNeededLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
private void reAddWindowToListInOrderLocked(WindowState win) {
addWindowToListInOrderLocked(win, false);
// This is a hack to get all of the child windows added as well
// at the right position. Child windows should be rare and
// this case should be rare, so it shouldn't be that big a deal.
WindowList windows = win.getWindowList();
int wpos = windows.indexOf(win);
if (wpos >= 0) {
if (DEBUG_WINDOW_MOVEMENT) Slog.v(TAG, "ReAdd removing from " + wpos + ": " + win);
windows.remove(wpos);
mWindowsChanged = true;
reAddWindowLocked(wpos, win);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: reAddWindowToListInOrderLocked
File: services/core/java/com/android/server/wm/WindowManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3875
|
HIGH
| 7.2
|
android
|
reAddWindowToListInOrderLocked
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
@SafeVarargs
public final ServerBuilder service(
HttpServiceWithRoutes serviceWithRoutes,
Function<? super HttpService, ? extends HttpService>... decorators) {
virtualHostTemplate.service(serviceWithRoutes, decorators);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: service
File: core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-44487
|
HIGH
| 7.5
|
line/armeria
|
service
|
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
|
df7f85824a62e997b910b5d6194a3335841065fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setId(String id) {
this.id = id;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setId
File: base/common/src/main/java/com/netscape/certsrv/profile/ProfileOutput.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
setId
|
base/common/src/main/java/com/netscape/certsrv/profile/ProfileOutput.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
private synchronized void ensureKexOngoing()
throws TransportException {
if (!isKexOngoing())
throw new TransportException(DisconnectReason.PROTOCOL_ERROR,
"Key exchange packet received when key exchange was not ongoing");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: ensureKexOngoing
File: src/main/java/net/schmizz/sshj/transport/KeyExchanger.java
Repository: hierynomus/sshj
The code follows secure coding practices.
|
[
"CWE-354"
] |
CVE-2023-48795
|
MEDIUM
| 5.9
|
hierynomus/sshj
|
ensureKexOngoing
|
src/main/java/net/schmizz/sshj/transport/KeyExchanger.java
|
94fcc960e0fb198ddec0f7efc53f95ac627fe083
| 0
|
Analyze the following code function for security vulnerabilities
|
public static ProfileInput fromXML(String xml) throws Exception {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.parse(new InputSource(new StringReader(xml)));
Element profileElement = document.getDocumentElement();
return fromDOM(profileElement);
}
|
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/ProfileInput.java
Repository: dogtagpki/pki
Fixed Code:
public static ProfileInput 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 profileElement = document.getDocumentElement();
return fromDOM(profileElement);
}
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
fromXML
|
base/common/src/main/java/com/netscape/certsrv/profile/ProfileInput.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 1
|
Analyze the following code function for security vulnerabilities
|
private int readPlaintextData(final ByteBuffer dst) {
final int sslRead;
if (dst.isDirect()) {
final int pos = dst.position();
final long addr = Buffer.address(dst) + pos;
final int len = dst.limit() - pos;
sslRead = SSL.readFromSSL(ssl, addr, len);
if (sslRead > 0) {
dst.position(pos + sslRead);
}
} else {
final int pos = dst.position();
final int limit = dst.limit();
final int len = Math.min(MAX_ENCRYPTED_PACKET_LENGTH, limit - pos);
final ByteBuf buf = alloc.directBuffer(len);
try {
final long addr = memoryAddress(buf);
sslRead = SSL.readFromSSL(ssl, addr, len);
if (sslRead > 0) {
dst.limit(pos + sslRead);
buf.getBytes(0, dst);
dst.limit(limit);
}
} finally {
buf.release();
}
}
return sslRead;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readPlaintextData
File: handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-835"
] |
CVE-2016-4970
|
HIGH
| 7.8
|
netty
|
readPlaintextData
|
handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java
|
bc8291c80912a39fbd2303e18476d15751af0bf1
| 0
|
Analyze the following code function for security vulnerabilities
|
void systemReady() {
synchronized (mInstallLock) {
synchronized (mPackagesLock) {
// Prune out any partially created/partially removed users.
ArrayList<UserInfo> partials = new ArrayList<UserInfo>();
for (int i = 0; i < mUsers.size(); i++) {
UserInfo ui = mUsers.valueAt(i);
if ((ui.partial || ui.guestToRemove) && i != 0) {
partials.add(ui);
}
}
for (int i = 0; i < partials.size(); i++) {
UserInfo ui = partials.get(i);
Slog.w(LOG_TAG, "Removing partially created user " + ui.id
+ " (name=" + ui.name + ")");
removeUserStateLocked(ui.id);
}
}
}
onUserForeground(UserHandle.USER_OWNER);
mAppOpsService = IAppOpsService.Stub.asInterface(
ServiceManager.getService(Context.APP_OPS_SERVICE));
for (int i = 0; i < mUserIds.length; ++i) {
try {
mAppOpsService.setUserRestrictions(mUserRestrictions.get(mUserIds[i]), mUserIds[i]);
} catch (RemoteException e) {
Log.w(LOG_TAG, "Unable to notify AppOpsService of UserRestrictions");
}
}
}
|
Vulnerability Classification:
- CWE: CWE-264
- CVE: CVE-2016-2457
- Severity: LOW
- CVSS Score: 2.1
Description: [DO NOT MERGE] Disallow guest user from changing Wifi settings
Disallow existing and newly created guest users from
changing Wifi settings.
BUG: 27411179
TEST: Flashed device, switched to existing guest user, and verified
that Wifi settings are disabled.
TEST: Flashed device, created new guest user, and verified that Wifi
settings are disabled.
Change-Id: Ia1bf4cce0369017b62f69d317c7ab2e30e3949b3
Function: systemReady
File: services/core/java/com/android/server/pm/UserManagerService.java
Repository: android
Fixed Code:
void systemReady() {
synchronized (mInstallLock) {
synchronized (mPackagesLock) {
// Prune out any partially created/partially removed users.
ArrayList<UserInfo> partials = new ArrayList<UserInfo>();
for (int i = 0; i < mUsers.size(); i++) {
UserInfo ui = mUsers.valueAt(i);
if ((ui.partial || ui.guestToRemove) && i != 0) {
partials.add(ui);
}
}
for (int i = 0; i < partials.size(); i++) {
UserInfo ui = partials.get(i);
Slog.w(LOG_TAG, "Removing partially created user " + ui.id
+ " (name=" + ui.name + ")");
removeUserStateLocked(ui.id);
}
}
}
onUserForeground(UserHandle.USER_OWNER);
mAppOpsService = IAppOpsService.Stub.asInterface(
ServiceManager.getService(Context.APP_OPS_SERVICE));
for (int i = 0; i < mUserIds.length; ++i) {
try {
mAppOpsService.setUserRestrictions(mUserRestrictions.get(mUserIds[i]), mUserIds[i]);
} catch (RemoteException e) {
Log.w(LOG_TAG, "Unable to notify AppOpsService of UserRestrictions");
}
}
UserInfo currentGuestUser = null;
synchronized (mPackagesLock) {
currentGuestUser = findCurrentGuestUserLocked();
}
if (currentGuestUser != null && !hasUserRestriction(
UserManager.DISALLOW_CONFIG_WIFI, currentGuestUser.id)) {
// If a guest user currently exists, apply the DISALLOW_CONFIG_WIFI option
// to it, in case this guest was created in a previous version where this
// user restriction was not a default guest restriction.
setUserRestriction(UserManager.DISALLOW_CONFIG_WIFI, true, currentGuestUser.id);
}
}
|
[
"CWE-264"
] |
CVE-2016-2457
|
LOW
| 2.1
|
android
|
systemReady
|
services/core/java/com/android/server/pm/UserManagerService.java
|
12332e05f632794e18ea8c4ac52c98e82532e5db
| 1
|
Analyze the following code function for security vulnerabilities
|
public io.netty.handler.codec.http.Cookie toNettyCookie() {
io.netty.handler.codec.http.Cookie nettyCookie = new DefaultCookie(name, WebUtils.escapeCookieValue(value));
if (path != null && !path.isEmpty()) {
nettyCookie.setPath(path);
}
nettyCookie.setMaxAge(maxAgeSeconds);
nettyCookie.setDiscard(discardAtEndOfBrowserSession);
nettyCookie.setHttpOnly(true); // TODO
if (GribbitProperties.SSL) {
nettyCookie.setSecure(true); // TODO
}
return nettyCookie;
}
|
Vulnerability Classification:
- CWE: CWE-346
- CVE: CVE-2014-125071
- Severity: MEDIUM
- CVSS Score: 5.2
Description: Protect against CSWSH: (Cross-Site WebSocket Hijacking)
Function: toNettyCookie
File: src/gribbit/auth/Cookie.java
Repository: lukehutch/gribbit
Fixed Code:
public io.netty.handler.codec.http.Cookie toNettyCookie() {
io.netty.handler.codec.http.Cookie nettyCookie = new DefaultCookie(name, WebUtils.escapeCookieValue(value));
if (path != null && !path.isEmpty()) {
nettyCookie.setPath(path);
}
nettyCookie.setMaxAge(maxAgeSeconds);
nettyCookie.setDiscard(discardAtEndOfBrowserSession);
nettyCookie.setHttpOnly(true); // TODO
if (GribbitProperties.SSL) {
// If SSL is enabled, force cookies to only be delivered over SSL, to prevent cookie hijacking
// on public wifi networks
nettyCookie.setSecure(true);
}
return nettyCookie;
}
|
[
"CWE-346"
] |
CVE-2014-125071
|
MEDIUM
| 5.2
|
lukehutch/gribbit
|
toNettyCookie
|
src/gribbit/auth/Cookie.java
|
620418df247aebda3dd4be1dda10fe229ea505dd
| 1
|
Analyze the following code function for security vulnerabilities
|
public ServerBuilder serverListener(ServerListener serverListener) {
requireNonNull(serverListener, "serverListener");
serverListeners.add(serverListener);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: serverListener
File: core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-44487
|
HIGH
| 7.5
|
line/armeria
|
serverListener
|
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
|
df7f85824a62e997b910b5d6194a3335841065fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void removeMediaErrorListener(ActionListener<MediaErrorEvent> l) {
errorListeners.removeListener(l);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeMediaErrorListener
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
|
removeMediaErrorListener
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public String dialogToggleStart(String headline, String id, boolean show) {
StringBuffer result = new StringBuffer(512);
// set icon and style class to use: hide user permissions
String image = "plus.png";
String styleClass = "hide";
if (show) {
// show user permissions
image = "minus.png";
styleClass = "show";
}
result.append("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n");
result.append("<tr>\n");
result.append("\t<td style=\"vertical-align: bottom; padding-bottom: 2px;\"><a href=\"javascript:toggleDetail('");
result.append(id);
result.append("');\"><img src=\"");
result.append(getSkinUri());
result.append("commons/");
result.append(image);
result.append("\" class=\"noborder\" id=\"ic-");
result.append(id);
result.append("\"></a></td>\n");
result.append("\t<td>");
result.append(dialogSubheadline(headline));
result.append("</td>\n");
result.append("</tr>\n");
result.append("</table>\n");
result.append("<div class=\"");
result.append(styleClass);
result.append("\" id=\"");
result.append(id);
result.append("\">\n");
return result.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dialogToggleStart
File: src/org/opencms/workplace/CmsDialog.java
Repository: alkacon/opencms-core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2013-4600
|
MEDIUM
| 4.3
|
alkacon/opencms-core
|
dialogToggleStart
|
src/org/opencms/workplace/CmsDialog.java
|
72a05e3ea1cf692e2efce002687272e63f98c14a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void playFromMediaId(String packageName, int pid, int uid, String mediaId,
Bundle extras) {
try {
final String reason = TAG + ":playFromMediaId";
mService.tempAllowlistTargetPkgIfPossible(getUid(), getPackageName(),
pid, uid, packageName, reason);
mCb.onPlayFromMediaId(packageName, pid, uid, mediaId, extras);
} catch (RemoteException e) {
Log.e(TAG, "Remote failure in playFromMediaId.", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: playFromMediaId
File: services/core/java/com/android/server/media/MediaSessionRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21280
|
MEDIUM
| 5.5
|
android
|
playFromMediaId
|
services/core/java/com/android/server/media/MediaSessionRecord.java
|
06e772e05514af4aa427641784c5eec39a892ed3
| 0
|
Analyze the following code function for security vulnerabilities
|
public void deleteFile(String file) {
file = removeFilePrefix(file);
File f = new File(file);
f.delete();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deleteFile
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
|
deleteFile
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onServiceConnected(ComponentName name, IBinder service) {
synchronized (mLock) {
/* Service is already deactivated, don't bind */
if (mState == STATE_IDLE) {
return;
}
mService = new Messenger(service);
mServiceName = name;
mServiceBound = true;
Log.d(TAG, "Service bound");
mState = STATE_XFER;
// Send pending select APDU
if (mSelectApdu != null) {
sendDataToServiceLocked(mService, mSelectApdu);
mSelectApdu = null;
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onServiceConnected
File: src/com/android/nfc/cardemulation/HostEmulationManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35671
|
MEDIUM
| 5.5
|
android
|
onServiceConnected
|
src/com/android/nfc/cardemulation/HostEmulationManager.java
|
745632835f3d97513a9c2a96e56e1dc06c4e4176
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String getSafeSignerName(String name) {
if (name.isEmpty()) {
throw new IllegalArgumentException("Empty name");
}
// According to https://docs.oracle.com/javase/tutorial/deployment/jar/signing.html, the
// name must not be longer than 8 characters and may contain only A-Z, 0-9, _, and -.
StringBuilder result = new StringBuilder();
char[] nameCharsUpperCase = name.toUpperCase(Locale.US).toCharArray();
for (int i = 0; i < Math.min(nameCharsUpperCase.length, 8); i++) {
char c = nameCharsUpperCase[i];
if (((c >= 'A') && (c <= 'Z'))
|| ((c >= '0') && (c <= '9'))
|| (c == '-')
|| (c == '_')) {
result.append(c);
} else {
result.append('_');
}
}
return result.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSafeSignerName
File: src/main/java/com/android/apksig/internal/apk/v1/V1SchemeSigner.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21253
|
MEDIUM
| 5.5
|
android
|
getSafeSignerName
|
src/main/java/com/android/apksig/internal/apk/v1/V1SchemeSigner.java
|
41d882324288085fd32ae0bb70dc85f5fd0e2be7
| 0
|
Analyze the following code function for security vulnerabilities
|
protected XWikiContext initializeXWikiContext(HttpServletRequest servletRequest,
HttpServletResponse servletResponse, XWikiForm form) throws XWikiException, ServletException
{
String action = getName();
XWikiRequest request = new XWikiServletRequest(servletRequest);
XWikiResponse response = new XWikiServletResponse(servletResponse);
XWikiContext context = Utils.prepareContext(action, request, response,
new XWikiServletContext(servletRequest.getServletContext()));
if (form != null) {
form.reset(request);
}
// Add the form to the context
context.setForm(form);
// Initialize the Container component which is the new way of transporting the Context in the new
// component architecture.
initializeContainerComponent(context);
return context;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initializeXWikiContext
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiAction.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2022-23617
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
initializeXWikiContext
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiAction.java
|
b35ef0edd4f2ff2c974cbeef6b80fcf9b5a44554
| 0
|
Analyze the following code function for security vulnerabilities
|
public RemoteAnimationAdapter getRemoteAnimationAdapter() {
return mRemoteAnimationAdapter;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRemoteAnimationAdapter
File: core/java/android/app/ActivityOptions.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-20918
|
CRITICAL
| 9.8
|
android
|
getRemoteAnimationAdapter
|
core/java/android/app/ActivityOptions.java
|
51051de4eb40bb502db448084a83fd6cbfb7d3cf
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable private WifiConfiguration getConnectedWifiConfigurationInternal() {
if (mLastNetworkId == WifiConfiguration.INVALID_NETWORK_ID) {
return null;
}
return mWifiConfigManager.getConfiguredNetwork(mLastNetworkId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getConnectedWifiConfigurationInternal
File: service/java/com/android/server/wifi/ClientModeImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
getConnectedWifiConfigurationInternal
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
public Builder removeTag(String tag) {
if (!ClickHouseChecker.isNullOrEmpty(tag)) {
tags.remove(tag);
}
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeTag
File: clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNode.java
Repository: ClickHouse/clickhouse-java
The code follows secure coding practices.
|
[
"CWE-209"
] |
CVE-2024-23689
|
HIGH
| 8.8
|
ClickHouse/clickhouse-java
|
removeTag
|
clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNode.java
|
4f8d9303eb991b39ec7e7e34825241efa082238a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int read() throws IOException {
int result = 0;
synchronized (this) {
if (++pos > size) {
result = -1;
}
}
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: read
File: server-adapters/resteasy-undertow/src/test/java/org/jboss/resteasy/test/undertow/AsyncIOResource.java
Repository: resteasy
The code follows secure coding practices.
|
[
"CWE-378"
] |
CVE-2023-0482
|
MEDIUM
| 5.5
|
resteasy
|
read
|
server-adapters/resteasy-undertow/src/test/java/org/jboss/resteasy/test/undertow/AsyncIOResource.java
|
807d7456f2137cde8ef7c316707211bf4e542d56
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean hasFeature() {
return getPackageManager().hasSystemFeature(PackageManager.FEATURE_DEVICE_ADMIN);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasFeature
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
|
hasFeature
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void engineInit(byte[] params)
throws IOException
{
ccmParams = CCMParameters.getInstance(params);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: engineInit
File: prov/src/main/java/org/bouncycastle/jcajce/provider/symmetric/AES.java
Repository: bcgit/bc-java
The code follows secure coding practices.
|
[
"CWE-310"
] |
CVE-2016-1000339
|
MEDIUM
| 5
|
bcgit/bc-java
|
engineInit
|
prov/src/main/java/org/bouncycastle/jcajce/provider/symmetric/AES.java
|
413b42f4d770456508585c830cfcde95f9b0e93b
| 0
|
Analyze the following code function for security vulnerabilities
|
@UnsupportedAppUsage
public @Nullable List<ComponentName> getActiveAdminsAsUser(int userId) {
if (mService != null) {
try {
return mService.getActiveAdmins(userId);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getActiveAdminsAsUser
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
|
getActiveAdminsAsUser
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void destroy() {
backendManager.destroy();
if (discoveryMulticastResponder != null) {
discoveryMulticastResponder.stop();
discoveryMulticastResponder = null;
}
super.destroy();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: destroy
File: agent/core/src/main/java/org/jolokia/http/AgentServlet.java
Repository: jolokia
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2014-0168
|
MEDIUM
| 6.8
|
jolokia
|
destroy
|
agent/core/src/main/java/org/jolokia/http/AgentServlet.java
|
2d9b168cfbbf5a6d16fa6e8a5b34503e3dc42364
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getDeleter()
{
return this.deletedDoc.getDeleter();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDeleter
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/DeletedDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2023-29208
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
getDeleter
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/DeletedDocument.java
|
d9e947559077e947315bf700c5703dfc7dd8a8d7
| 0
|
Analyze the following code function for security vulnerabilities
|
private void cleanupAfterView() {
ResponseWriter orig = (ResponseWriter) ctx.getAttributes().
get(ORIGINAL_WRITER);
assert(null != orig);
// move aside the PartialResponseWriter
ctx.setResponseWriter(orig);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cleanupAfterView
File: impl/src/main/java/com/sun/faces/context/PartialViewContextImpl.java
Repository: eclipse-ee4j/mojarra
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-17091
|
MEDIUM
| 4.3
|
eclipse-ee4j/mojarra
|
cleanupAfterView
|
impl/src/main/java/com/sun/faces/context/PartialViewContextImpl.java
|
a3fa9573789ed5e867c43ea38374f4dbd5a8f81f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int read() throws IOException {
checkReadPrimitiveTypes();
return primitiveData.read();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: read
File: luni/src/main/java/java/io/ObjectInputStream.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-7911
|
HIGH
| 7.2
|
android
|
read
|
luni/src/main/java/java/io/ObjectInputStream.java
|
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getPacketOverheadEstimate()
{
return tc.getPacketOverheadEstimate();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPacketOverheadEstimate
File: src/main/java/com/trilead/ssh2/transport/TransportManager.java
Repository: connectbot/sshlib
The code follows secure coding practices.
|
[
"CWE-354"
] |
CVE-2023-48795
|
MEDIUM
| 5.9
|
connectbot/sshlib
|
getPacketOverheadEstimate
|
src/main/java/com/trilead/ssh2/transport/TransportManager.java
|
5c8b534f6e97db7ac0e0e579331213aa25c173ab
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public TtyExecOutputErrorable<String, OutputStream, PipedInputStream, ExecWatch> writingInput(PipedOutputStream inPipe) {
return new PodOperationsImpl(getContext().withInPipe(inPipe));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writingInput
File: kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/PodOperationsImpl.java
Repository: fabric8io/kubernetes-client
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-20218
|
MEDIUM
| 5.8
|
fabric8io/kubernetes-client
|
writingInput
|
kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/PodOperationsImpl.java
|
325d67cc80b73f049a5d0cea4917c1f2709a8d86
| 0
|
Analyze the following code function for security vulnerabilities
|
public void callback(String[] args);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: callback
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
|
callback
|
core/java/android/database/sqlite/SQLiteDatabase.java
|
ebc250d16c747f4161167b5ff58b3aea88b37acf
| 0
|
Analyze the following code function for security vulnerabilities
|
private void unbindService(ServiceConnection connection) {
final long token = Binder.clearCallingIdentity();
try {
mContext.unbindService(connection);
} finally {
Binder.restoreCallingIdentity(token);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unbindService
File: services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-1541
|
MEDIUM
| 4.3
|
android
|
unbindService
|
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
|
0b98d304c467184602b4c6bce76fda0b0274bc07
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void beforeTextChanged(CharSequence arg0, int arg1, int arg2, int arg3) {}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: beforeTextChanged
File: src/com/android/phone/settings/fdn/EditFdnContactScreen.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-862"
] |
CVE-2023-35665
|
HIGH
| 7.8
|
android
|
beforeTextChanged
|
src/com/android/phone/settings/fdn/EditFdnContactScreen.java
|
674039e70e1c5bf29b808899ac80c709acc82290
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<ApplicationInfo> getRunningExternalApplications() {
enforceNotIsolatedCaller("getRunningExternalApplications");
List<ActivityManager.RunningAppProcessInfo> runningApps = getRunningAppProcesses();
List<ApplicationInfo> retList = new ArrayList<ApplicationInfo>();
if (runningApps != null && runningApps.size() > 0) {
Set<String> extList = new HashSet<String>();
for (ActivityManager.RunningAppProcessInfo app : runningApps) {
if (app.pkgList != null) {
for (String pkg : app.pkgList) {
extList.add(pkg);
}
}
}
IPackageManager pm = AppGlobals.getPackageManager();
for (String pkg : extList) {
try {
ApplicationInfo info = pm.getApplicationInfo(pkg, 0, UserHandle.getCallingUserId());
if ((info.flags & ApplicationInfo.FLAG_EXTERNAL_STORAGE) != 0) {
retList.add(info);
}
} catch (RemoteException e) {
}
}
}
return retList;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRunningExternalApplications
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3833
|
MEDIUM
| 4.3
|
android
|
getRunningExternalApplications
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public LocalPortForward portForward(int port) {
try {
return new PortForwarderWebsocket(client).forward(getResourceUrl(), port);
} catch (Throwable t) {
throw KubernetesClientException.launderThrowable(t);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: portForward
File: kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/PodOperationsImpl.java
Repository: fabric8io/kubernetes-client
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-20218
|
MEDIUM
| 5.8
|
fabric8io/kubernetes-client
|
portForward
|
kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/PodOperationsImpl.java
|
325d67cc80b73f049a5d0cea4917c1f2709a8d86
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String jsStringEscape(String s) {
StringBuilder buf = new StringBuilder();
for( int i=0; i<s.length(); i++ ) {
char ch = s.charAt(i);
switch(ch) {
case '\'':
buf.append("\\'");
break;
case '\\':
buf.append("\\\\");
break;
case '"':
buf.append("\\\"");
break;
default:
buf.append(ch);
}
}
return buf.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: jsStringEscape
File: core/src/main/java/hudson/Functions.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-310"
] |
CVE-2014-2061
|
MEDIUM
| 5
|
jenkinsci/jenkins
|
jsStringEscape
|
core/src/main/java/hudson/Functions.java
|
bf539198564a1108b7b71a973bf7de963a6213ef
| 0
|
Analyze the following code function for security vulnerabilities
|
final StandardTemplateParams hideTitle(boolean hideTitle) {
this.mHideTitle = hideTitle;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hideTitle
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
hideTitle
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String generateAssertionHandle() {
if (random == null) {
return null;
}
byte bytes[] = new byte[SAMLConstants.ID_LENGTH];
random.nextBytes(bytes);
String id = null;
try {
id = SystemConfigurationUtil.getServerID(
SAMLServiceManager.getServerProtocol(),
SAMLServiceManager.getServerHost(),
Integer.parseInt(SAMLServiceManager.getServerPort()),
SAMLServiceManager.getServerURI());
} catch (Exception ex) {
if (SAMLUtils.debug.messageEnabled()) {
SAMLUtils.debug.message("SAMLUtil:generateAssertionHandle: "
+ "exception obtain serverID:", ex);
}
}
if (id != null) {
byte idBytes[] = stringToByteArray(id);
// TODO: should we check if idBytes.length == 2 ?
if (idBytes.length < bytes.length) {
for (int i = 1; i <= idBytes.length; i++) {
bytes[bytes.length - i] = idBytes[idBytes.length - i];
}
}
}
return byteArrayToString(bytes);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: generateAssertionHandle
File: openam-federation/openam-federation-library/src/main/java/com/sun/identity/saml/common/SAMLUtils.java
Repository: OpenIdentityPlatform/OpenAM
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2023-37471
|
CRITICAL
| 9.8
|
OpenIdentityPlatform/OpenAM
|
generateAssertionHandle
|
openam-federation/openam-federation-library/src/main/java/com/sun/identity/saml/common/SAMLUtils.java
|
7c18543d126e8a567b83bb4535631825aaa9d742
| 0
|
Analyze the following code function for security vulnerabilities
|
protected Intent getFindSensorIntent(Context context) {
return new Intent(context, FingerprintEnrollFindSensor.class);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFindSensorIntent
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
|
getFindSensorIntent
|
src/com/android/settings/password/ChooseLockGeneric.java
|
5e43341b8c7eddce88f79c9a5068362927c05b54
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result + ((email == null) ? 0 : email.hashCode());
result = prime * result + ((fullName == null) ? 0 : fullName.hashCode());
result = prime * result + ((id == null) ? 0 : id.hashCode());
result = prime * result + ((roles == null) ? 0 : roles.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/account/Account.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/account/Account.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
int deleteLogicDeleted(@Param("userIds") String userIds);
|
Vulnerability Classification:
- CWE: CWE-89
- CVE: CVE-2022-45208
- Severity: MEDIUM
- CVSS Score: 4.3
Description: /sys/user/putRecycleBin is affected by sql injection #4126
/sys/user/deleteRecycleBin is affected by sql injection #4125
Function: deleteLogicDeleted
File: jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysUserMapper.java
Repository: jeecgboot/jeecg-boot
Fixed Code:
int deleteLogicDeleted(@Param("userIds") List<String> userIds);
|
[
"CWE-89"
] |
CVE-2022-45208
|
MEDIUM
| 4.3
|
jeecgboot/jeecg-boot
|
deleteLogicDeleted
|
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/mapper/SysUserMapper.java
|
51e2227bfe54f5d67b09411ee9a336750164e73d
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public ServerHttpResponse end(byte[] data) {
response.end(Buffer.buffer(data));
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: end
File: independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/VertxResteasyReactiveRequestContext.java
Repository: quarkusio/quarkus
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-0981
|
MEDIUM
| 6.5
|
quarkusio/quarkus
|
end
|
independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/VertxResteasyReactiveRequestContext.java
|
96c64fd8f09c02a497e2db366c64dd9196582442
| 0
|
Analyze the following code function for security vulnerabilities
|
private void readApiKey()
{
if (API_KEY == null)
{
try
{
API_KEY = Utils
.readInputStream(getServletContext()
.getResourceAsStream(API_KEY_FILE_PATH))
.replaceAll("\n", "");
}
catch (IOException e)
{
throw new RuntimeException("Invalid API key file/path");
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readApiKey
File: src/main/java/com/mxgraph/online/ConverterServlet.java
Repository: jgraph/drawio
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-3398
|
HIGH
| 7.5
|
jgraph/drawio
|
readApiKey
|
src/main/java/com/mxgraph/online/ConverterServlet.java
|
064729fec4262f9373d9fdcafda0be47cd18dd50
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void parseReverseLookupDomain(PtrDnsAnswer.Builder dnsAnswerBuilder, String hostname) {
dnsAnswerBuilder.fullDomain(hostname);
final InternetDomainName internetDomainName = InternetDomainName.from(hostname);
if (internetDomainName.hasPublicSuffix()) {
// Use Guava to extract domain name.
final InternetDomainName topDomainName = internetDomainName.topDomainUnderRegistrySuffix();
dnsAnswerBuilder.domain(topDomainName.toString());
} else {
/* Manually extract domain name.
* Eg. for hostname test.some-domain.com, only some-domain.com will be extracted. */
String[] split = hostname.split("\\.");
if (split.length > 1) {
dnsAnswerBuilder.domain(split[split.length - 2] + "." + split[split.length - 1]);
} else if (split.length == 1) {
dnsAnswerBuilder.domain(hostname); // Domain is a single word with no dots.
} else {
dnsAnswerBuilder.domain(""); // Domain is blank.
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseReverseLookupDomain
File: graylog2-server/src/main/java/org/graylog2/lookup/adapters/dnslookup/DnsClient.java
Repository: Graylog2/graylog2-server
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2023-41045
|
MEDIUM
| 5.3
|
Graylog2/graylog2-server
|
parseReverseLookupDomain
|
graylog2-server/src/main/java/org/graylog2/lookup/adapters/dnslookup/DnsClient.java
|
466af814523cffae9fbc7e77bab7472988f03c3e
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isRtlCharAt(int offset) {
int line = getLineForOffset(offset);
Directions dirs = getLineDirections(line);
if (dirs == DIRS_ALL_LEFT_TO_RIGHT) {
return false;
}
if (dirs == DIRS_ALL_RIGHT_TO_LEFT) {
return true;
}
int[] runs = dirs.mDirections;
int lineStart = getLineStart(line);
for (int i = 0; i < runs.length; i += 2) {
int start = lineStart + runs[i];
int limit = start + (runs[i+1] & RUN_LENGTH_MASK);
if (offset >= start && offset < limit) {
int level = (runs[i+1] >>> RUN_LEVEL_SHIFT) & RUN_LEVEL_MASK;
return ((level & 1) != 0);
}
}
// Should happen only if the offset is "out of bounds"
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isRtlCharAt
File: core/java/android/text/Layout.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-9452
|
MEDIUM
| 4.3
|
android
|
isRtlCharAt
|
core/java/android/text/Layout.java
|
3b6f84b77c30ec0bab5147b0cffc192c86ba2634
| 0
|
Analyze the following code function for security vulnerabilities
|
protected Client buildHttpClient() {
// use the default client config if not yet initialized
if (clientConfig == null) {
clientConfig = getDefaultClientConfig();
}
ClientBuilder clientBuilder = ClientBuilder.newBuilder();
customizeClientBuilder(clientBuilder);
clientBuilder = clientBuilder.withConfig(clientConfig);
return clientBuilder.build();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: buildHttpClient
File: samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
buildHttpClient
|
samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
public static WebClient.Builder builder() {
return builder(HttpClient.create());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: builder
File: app/server/appsmith-interfaces/src/main/java/com/appsmith/util/WebClientUtils.java
Repository: appsmithorg/appsmith
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2022-4096
|
MEDIUM
| 6.5
|
appsmithorg/appsmith
|
builder
|
app/server/appsmith-interfaces/src/main/java/com/appsmith/util/WebClientUtils.java
|
769719ccfe667f059fe0b107a19ec9feb90f2e40
| 0
|
Analyze the following code function for security vulnerabilities
|
private void updateUidState() {
updateUidState(getCurrentState());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateUidState
File: services/core/java/com/android/server/pm/permission/OneTimePermissionUserManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21254
|
HIGH
| 7.8
|
android
|
updateUidState
|
services/core/java/com/android/server/pm/permission/OneTimePermissionUserManager.java
|
fa539c85503dc63bfb53c76b6f12b3549f14a709
| 0
|
Analyze the following code function for security vulnerabilities
|
public ServerBuilder http2MaxFrameSize(int http2MaxFrameSize) {
checkArgument(http2MaxFrameSize >= MAX_FRAME_SIZE_LOWER_BOUND &&
http2MaxFrameSize <= MAX_FRAME_SIZE_UPPER_BOUND,
"http2MaxFrameSize: %s (expected: >= %s and <= %s)",
http2MaxFrameSize, MAX_FRAME_SIZE_LOWER_BOUND, MAX_FRAME_SIZE_UPPER_BOUND);
this.http2MaxFrameSize = http2MaxFrameSize;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: http2MaxFrameSize
File: core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-44487
|
HIGH
| 7.5
|
line/armeria
|
http2MaxFrameSize
|
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
|
df7f85824a62e997b910b5d6194a3335841065fd
| 0
|
Analyze the following code function for security vulnerabilities
|
private static APIKey getAppKey(Application app, String keyType) {
List<APIKey> apiKeys = app.getKeys();
return getKeyOfType(apiKeys, keyType);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAppKey
File: components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
Repository: wso2/carbon-apimgt
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2018-20736
|
LOW
| 3.5
|
wso2/carbon-apimgt
|
getAppKey
|
components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
|
490f2860822f89d745b7c04fa9570bd86bef4236
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getURL(List<String> spaces, String page)
{
return getURL(spaces, page, "view", "");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getURL
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
|
getURL
|
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 final LicenseType getLicenseType() {
return type;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLicenseType
File: src/net/sourceforge/plantuml/version/LicenseInfo.java
Repository: plantuml
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2023-3431
|
MEDIUM
| 5.3
|
plantuml
|
getLicenseType
|
src/net/sourceforge/plantuml/version/LicenseInfo.java
|
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Route.Definition head() {
return appendDefinition(HEAD, "*", filter(HeadHandler.class)).name("*.head");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: head
File: jooby/src/main/java/org/jooby/Jooby.java
Repository: jooby-project/jooby
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-7647
|
MEDIUM
| 5
|
jooby-project/jooby
|
head
|
jooby/src/main/java/org/jooby/Jooby.java
|
34f526028e6cd0652125baa33936ffb6a8a4a009
| 0
|
Analyze the following code function for security vulnerabilities
|
private void updateCanAddCall() {
boolean newCanAddCall = canAddCall();
if (newCanAddCall != mCanAddCall) {
mCanAddCall = newCanAddCall;
for (CallsManagerListener listener : mListeners) {
if (Log.SYSTRACE_DEBUG) {
Trace.beginSection(listener.getClass().toString() + " updateCanAddCall");
}
listener.onCanAddCallChanged(mCanAddCall);
if (Log.SYSTRACE_DEBUG) {
Trace.endSection();
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateCanAddCall
File: src/com/android/server/telecom/CallsManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2423
|
MEDIUM
| 6.6
|
android
|
updateCanAddCall
|
src/com/android/server/telecom/CallsManager.java
|
a06c9a4aef69ae27b951523cf72bf72412bf48fa
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
void createViewAndroid(WindowAndroid windowAndroid) {
mViewAndroid = new ViewAndroid(windowAndroid, mViewAndroidDelegate);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createViewAndroid
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-1021"
] |
CVE-2015-1241
|
MEDIUM
| 4.3
|
chromium
|
createViewAndroid
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
9d343ad2ea6ec395c377a4efa266057155bfa9c1
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.