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
|
protected void sendRedirect(XWikiResponse response, String url) throws XWikiException
{
try {
if (url != null) {
response.sendRedirect(response.encodeRedirectURL(url));
}
} catch (IOException e) {
Object[] args = {url};
throw new XWikiException(XWikiException.MODULE_XWIKI_APP, XWikiException.ERROR_XWIKI_APP_REDIRECT_EXCEPTION,
"Exception while sending redirect to page {0}", e, args);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendRedirect
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
|
sendRedirect
|
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 void removeColumn(String columnId) {
removeColumn(getColumnOrThrow(columnId));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeColumn
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
|
removeColumn
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
public HttpRequest verifyHttpsHost(final boolean verifyHttpsHost) {
this.verifyHttpsHost = verifyHttpsHost;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: verifyHttpsHost
File: src/main/java/jodd/http/HttpRequest.java
Repository: oblac/jodd-http
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2022-29631
|
MEDIUM
| 5
|
oblac/jodd-http
|
verifyHttpsHost
|
src/main/java/jodd/http/HttpRequest.java
|
e50f573c8f6a39212ade68c6eb1256b2889fa8a6
| 0
|
Analyze the following code function for security vulnerabilities
|
private String marshalSPTemplate(ServiceProvider serviceProvider, String tenantDomain)
throws IdentityApplicationManagementException {
try {
JAXBContext jaxbContext = JAXBContext.newInstance(ServiceProvider.class);
Marshaller marshaller = jaxbContext.createMarshaller();
DocumentBuilderFactory docBuilderFactory = IdentityUtil.getSecuredDocumentBuilderFactory();
Document document = docBuilderFactory.newDocumentBuilder().newDocument();
marshaller.marshal(serviceProvider, document);
TransformerFactory transformerFactory = TransformerFactory.newInstance();
Transformer transformer = transformerFactory.newTransformer();
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
transformer.setOutputProperty(OutputKeys.CDATA_SECTION_ELEMENTS,
"AuthenticationScript inboundConfiguration");
StringWriter stringBuilder = new StringWriter();
StreamResult result = new StreamResult(stringBuilder);
transformer.transform(new DOMSource(document), result);
return stringBuilder.getBuffer().toString();
} catch (JAXBException | ParserConfigurationException | TransformerException e) {
throw new IdentityApplicationManagementException(String.format("Error in exporting Service Provider " +
"template from SP %s@%s", serviceProvider.getApplicationName(), tenantDomain), e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: marshalSPTemplate
File: components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
Repository: wso2/carbon-identity-framework
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-42646
|
MEDIUM
| 6.4
|
wso2/carbon-identity-framework
|
marshalSPTemplate
|
components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
|
e9119883ee02a884f3c76c7bbc4022a4f4c58fc0
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setDocumentArchive(String sarch) throws XWikiException
{
XWikiDocumentArchive xda = new XWikiDocumentArchive(getId());
xda.setArchive(sarch);
setDocumentArchive(xda);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDocumentArchive
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
|
setDocumentArchive
|
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
|
@Test
public void detectsConstructorExpressionWithLineBreaks() {
assertThat(hasConstructorExpression("select new foo.bar.FooBar(\na.id) from DtoA a "), is(true));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: detectsConstructorExpressionWithLineBreaks
File: src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsUnitTests.java
Repository: spring-projects/spring-data-jpa
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-6652
|
MEDIUM
| 6.8
|
spring-projects/spring-data-jpa
|
detectsConstructorExpressionWithLineBreaks
|
src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsUnitTests.java
|
b8e7fe
| 0
|
Analyze the following code function for security vulnerabilities
|
int checkComponentPermission(String permission, int pid, int uid,
int owningUid, boolean exported) {
if (pid == MY_PID) {
return PackageManager.PERMISSION_GRANTED;
}
return ActivityManager.checkComponentPermission(permission, uid,
owningUid, exported);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkComponentPermission
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
|
checkComponentPermission
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
private void updateLinksForRename(XWikiDocument sourceDoc, DocumentReference newDocumentReference,
List<DocumentReference> backlinkDocumentReferences, List<DocumentReference> childDocumentReferences,
XWikiContext context) throws XWikiException
{
// Step 2: For each child document, update its parent reference.
if (childDocumentReferences != null) {
for (DocumentReference childDocumentReference : childDocumentReferences) {
XWikiDocument childDocument = getDocument(childDocumentReference, context);
String compactReference = getCompactEntityReferenceSerializer().serialize(newDocumentReference);
childDocument.setParent(compactReference);
String saveMessage = localizePlainOrKey("core.comment.renameParent", compactReference);
childDocument.setAuthorReference(context.getUserReference());
saveDocument(childDocument, saveMessage, true, context);
}
}
// Step 3: For each backlink to rename, parse the backlink document and replace the links with the new name.
for (DocumentReference backlinkDocumentReference : backlinkDocumentReferences) {
XWikiDocument backlinkRootDocument = getDocument(backlinkDocumentReference, context);
// Update default locale instance
renameLinks(backlinkRootDocument, sourceDoc.getDocumentReference(), newDocumentReference, context);
// Update translations
for (Locale locale : backlinkRootDocument.getTranslationLocales(context)) {
XWikiDocument backlinkDocument = backlinkRootDocument.getTranslatedDocument(locale, context);
renameLinks(backlinkDocument, sourceDoc.getDocumentReference(), newDocumentReference, context);
}
}
// Get new document
XWikiDocument newDocument = getDocument(newDocumentReference, context);
// Step 4: Refactor the relative links contained in the document to make sure they are relative to the new
// document's location.
if (Utils.getContextComponentManager().hasComponent(BlockRenderer.class, sourceDoc.getSyntax().toIdString())) {
// Only support syntax for which a renderer is provided
LinkedResourceHelper linkedResourceHelper = Utils.getComponent(LinkedResourceHelper.class);
DocumentReference oldDocumentReference = sourceDoc.getDocumentReference();
XDOM newDocumentXDOM = newDocument.getXDOM();
List<Block> blocks = linkedResourceHelper.getBlocks(newDocumentXDOM);
// FIXME: Duplicate code. See org.xwiki.refactoring.internal.DefaultLinkRefactoring#updateRelativeLinks in
// xwiki-platform-refactoring-default
boolean modified = false;
for (Block block : blocks) {
org.xwiki.rendering.listener.reference.ResourceReference resourceReference =
linkedResourceHelper.getResourceReference(block);
if (resourceReference == null) {
// Skip invalid blocks.
continue;
}
org.xwiki.rendering.listener.reference.ResourceType resourceType = resourceReference.getType();
// TODO: support ATTACHMENT as well.
if (!org.xwiki.rendering.listener.reference.ResourceType.DOCUMENT.equals(resourceType) &&
!org.xwiki.rendering.listener.reference.ResourceType.SPACE.equals(resourceType)) {
// We are currently only interested in Document or Space references.
continue;
}
// current link, use the old document's reference to fill in blanks.
EntityReference oldLinkReference = getResourceReferenceEntityReferenceResolver()
.resolve(resourceReference, null, oldDocumentReference);
// new link, use the new document's reference to fill in blanks.
EntityReference newLinkReference = getResourceReferenceEntityReferenceResolver()
.resolve(resourceReference, null, newDocumentReference);
// If the new and old link references don`t match, then we must update the relative link.
if (!newLinkReference.equals(oldLinkReference)) {
modified = true;
// Serialize the old (original) link relative to the new document's location, in compact form.
String serializedLinkReference =
getCompactWikiEntityReferenceSerializer().serialize(oldLinkReference, newDocumentReference);
// Update the reference in the XDOM.
linkedResourceHelper.setResourceReferenceString(block, serializedLinkReference);
}
}
// Set the new content and save document if needed
if (modified) {
newDocument.setContent(newDocumentXDOM);
newDocument.setAuthorReference(context.getUserReference());
saveDocument(newDocument, context);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateLinksForRename
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-32620
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
updateLinksForRename
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Provides
@RequestScoped
SessionId sessionId(Request request, Response response, SessionIdGenerator idGenerator, SessionCookieConfig cookieConfig) {
return new CookieBasedSessionId(request, response, idGenerator, cookieConfig);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sessionId
File: ratpack-session/src/main/java/ratpack/session/SessionModule.java
Repository: ratpack
The code follows secure coding practices.
|
[
"CWE-338"
] |
CVE-2019-11808
|
MEDIUM
| 4.3
|
ratpack
|
sessionId
|
ratpack-session/src/main/java/ratpack/session/SessionModule.java
|
f2b63eb82dd71194319fd3945f5edf29b8f3a42d
| 0
|
Analyze the following code function for security vulnerabilities
|
private native int nativeSendMouseWheelEvent(
long nativeContentViewCoreImpl, long timeMs, float x, float y, float verticalAxis,
float horizontalAxis);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nativeSendMouseWheelEvent
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
|
nativeSendMouseWheelEvent
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
9d343ad2ea6ec395c377a4efa266057155bfa9c1
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onReceive(Context context1, Intent intent) {
// Don't delete accounts when updating a authenticator's
// package.
if (!intent.getBooleanExtra(Intent.EXTRA_REPLACING, false)) {
/* Purging data requires file io, don't block the main thread. This is probably
* less than ideal because we are introducing a race condition where old grants
* could be exercised until they are purged. But that race condition existed
* anyway with the broadcast receiver.
*
* Ideally, we would completely clear the cache, purge data from the database,
* and then rebuild the cache. All under the cache lock. But that change is too
* large at this point.
*/
final String removedPackageName = intent.getData().getSchemeSpecificPart();
Runnable purgingRunnable = new Runnable() {
@Override
public void run() {
purgeOldGrantsAll();
// Notify authenticator about removed app?
removeVisibilityValuesForPackage(removedPackageName);
}
};
mHandler.post(purgingRunnable);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onReceive
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
|
onReceive
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected Map<String, ObjectId> getObjectIdCache() {
Map<String, ObjectId> objectIdCache = new HashMap<>();
if (resolvedRevision != null)
objectIdCache.put(state.blobIdent.revision, resolvedRevision);
return objectIdCache;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getObjectIdCache
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
|
getObjectIdCache
|
server-core/src/main/java/io/onedev/server/web/page/project/blob/ProjectBlobPage.java
|
0c060153fb97c0288a1917efdb17cc426934dacb
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setRinging(String callId, Session.Info sessionInfo) {
Log.startSession(sessionInfo, LogUtils.Sessions.CSW_SET_RINGING, mPackageAbbreviation);
long token = Binder.clearCallingIdentity();
try {
synchronized (mLock) {
logIncoming("setRinging %s", callId);
Call call = mCallIdMapper.getCall(callId);
if (call != null) {
mCallsManager.markCallAsRinging(call);
} else {
// Log.w(this, "setRinging, unknown call id: %s", msg.obj);
}
}
} catch (Throwable t) {
Log.e(ConnectionServiceWrapper.this, t, "");
throw t;
} finally {
Binder.restoreCallingIdentity(token);
Log.endSession();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setRinging
File: src/com/android/server/telecom/ConnectionServiceWrapper.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
setRinging
|
src/com/android/server/telecom/ConnectionServiceWrapper.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
private void handleDisplayAdded(int displayId) {
boolean newDisplay;
synchronized (mService) {
newDisplay = mActivityDisplays.get(displayId) == null;
if (newDisplay) {
ActivityDisplay activityDisplay = new ActivityDisplay(displayId);
if (activityDisplay.mDisplay == null) {
Slog.w(TAG, "Display " + displayId + " gone before initialization complete");
return;
}
mActivityDisplays.put(displayId, activityDisplay);
}
}
if (newDisplay) {
mWindowManager.onDisplayAdded(displayId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleDisplayAdded
File: services/core/java/com/android/server/am/ActivityStackSupervisor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3838
|
MEDIUM
| 4.3
|
android
|
handleDisplayAdded
|
services/core/java/com/android/server/am/ActivityStackSupervisor.java
|
468651c86a8adb7aa56c708d2348e99022088af3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Boolean checkProjectExist(String relateId) {
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkProjectExist
File: test-track/backend/src/main/java/io/metersphere/service/issue/platform/AbstractIssuePlatform.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2022-23544
|
MEDIUM
| 6.1
|
metersphere
|
checkProjectExist
|
test-track/backend/src/main/java/io/metersphere/service/issue/platform/AbstractIssuePlatform.java
|
d0f95b50737c941b29d507a4cc3545f2dc6ab121
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getQueueSize()
{
return this.indexQueue.size() + this.resolveQueue.size() + this.batchSize;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getQueueSize
File: xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/internal/DefaultSolrIndexer.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-312",
"CWE-200"
] |
CVE-2023-50719
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
getQueueSize
|
xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/internal/DefaultSolrIndexer.java
|
3e5272f2ef0dff06a8f4db10afd1949b2f9e6eea
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void appNotRespondingViaProvider(IBinder connection) {
enforceCallingPermission(
android.Manifest.permission.REMOVE_TASKS, "appNotRespondingViaProvider()");
final ContentProviderConnection conn = (ContentProviderConnection) connection;
if (conn == null) {
Slog.w(TAG, "ContentProviderConnection is null");
return;
}
final ProcessRecord host = conn.provider.proc;
if (host == null) {
Slog.w(TAG, "Failed to find hosting ProcessRecord");
return;
}
mHandler.post(new Runnable() {
@Override
public void run() {
mAppErrors.appNotResponding(host, null, null, false,
"ContentProvider not responding");
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: appNotRespondingViaProvider
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
|
appNotRespondingViaProvider
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void arrayCopy(Object src, int offset, int byteLength, Object dest, int dest_offset)
throws IOException
{
impl.arrayCopy(src, offset, byteLength, dest, dest_offset);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: arrayCopy
File: src/main/java/org/xerial/snappy/Snappy.java
Repository: xerial/snappy-java
The code follows secure coding practices.
|
[
"CWE-190"
] |
CVE-2023-34454
|
HIGH
| 7.5
|
xerial/snappy-java
|
arrayCopy
|
src/main/java/org/xerial/snappy/Snappy.java
|
d0042551e4a3509a725038eb9b2ad1f683674d94
| 0
|
Analyze the following code function for security vulnerabilities
|
protected SASLAuthentication getSASLAuthentication() {
return saslAuthentication;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSASLAuthentication
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
|
getSASLAuthentication
|
smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
|
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
| 0
|
Analyze the following code function for security vulnerabilities
|
public void addAutoTypeCheckHandler(AutoTypeCheckHandler h) {
List<AutoTypeCheckHandler> autoTypeCheckHandlers = this.autoTypeCheckHandlers;
if (autoTypeCheckHandlers == null) {
this.autoTypeCheckHandlers
= autoTypeCheckHandlers
= new CopyOnWriteArrayList();
}
autoTypeCheckHandlers.add(h);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addAutoTypeCheckHandler
File: src/main/java/com/alibaba/fastjson/parser/ParserConfig.java
Repository: alibaba/fastjson
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2022-25845
|
MEDIUM
| 6.8
|
alibaba/fastjson
|
addAutoTypeCheckHandler
|
src/main/java/com/alibaba/fastjson/parser/ParserConfig.java
|
8f3410f81cbd437f7c459f8868445d50ad301f15
| 0
|
Analyze the following code function for security vulnerabilities
|
private Boolean isUserDnAbsolute(String userDN) {
try
{
URI userURI = new URI(userDN);
return userURI.isAbsolute();
}
catch (URISyntaxException e)
{
return false;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isUserDnAbsolute
File: jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/AdvancedLdapLoginModule.java
Repository: wildfly-security/jboss-negotiation
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2015-1849
|
MEDIUM
| 4.3
|
wildfly-security/jboss-negotiation
|
isUserDnAbsolute
|
jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/AdvancedLdapLoginModule.java
|
0dc9d191b6eb1d13b8f0189c5b02ba6576f4722e
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void readObjStm(PRStream stream, IntHashtable map) throws IOException {
int first = stream.getAsNumber(PdfName.FIRST).intValue();
int n = stream.getAsNumber(PdfName.N).intValue();
byte b[] = getStreamBytes(stream, tokens.getFile());
PRTokeniser saveTokens = tokens;
tokens = new PRTokeniser(b);
try {
int address[] = new int[n];
int objNumber[] = new int[n];
boolean ok = true;
for (int k = 0; k < n; ++k) {
ok = tokens.nextToken();
if (!ok)
break;
if (tokens.getTokenType() != PRTokeniser.TK_NUMBER) {
ok = false;
break;
}
objNumber[k] = tokens.intValue();
ok = tokens.nextToken();
if (!ok)
break;
if (tokens.getTokenType() != PRTokeniser.TK_NUMBER) {
ok = false;
break;
}
address[k] = tokens.intValue() + first;
}
if (!ok)
throw new InvalidPdfException("Error reading ObjStm");
for (int k = 0; k < n; ++k) {
if (map.containsKey(k)) {
tokens.seek(address[k]);
PdfObject obj = readPRObject();
xrefObj.set(objNumber[k], obj);
}
}
}
finally {
tokens = saveTokens;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readObjStm
File: java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
Repository: pdftk-java/pdftk
The code follows secure coding practices.
|
[
"CWE-835"
] |
CVE-2021-37819
|
HIGH
| 7.5
|
pdftk-java/pdftk
|
readObjStm
|
java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
|
9b0cbb76c8434a8505f02ada02a94263dcae9247
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setUrl(@Nullable URI url) {
this.url = url;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUrl
File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/HipchatNotifier.java
Repository: codecentric/spring-boot-admin
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2022-46166
|
CRITICAL
| 9.8
|
codecentric/spring-boot-admin
|
setUrl
|
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/HipchatNotifier.java
|
c14c3ec12533f71f84de9ce3ce5ceb7991975f75
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
saveState(outState);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onSaveInstanceState
File: src/com/android/settings/SettingsActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2018-9501
|
HIGH
| 7.2
|
android
|
onSaveInstanceState
|
src/com/android/settings/SettingsActivity.java
|
5e43341b8c7eddce88f79c9a5068362927c05b54
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setAllowInlineMatchUrlReferences(boolean theAllowInlineMatchUrlReferences) {
myAllowInlineMatchUrlReferences = theAllowInlineMatchUrlReferences;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAllowInlineMatchUrlReferences
File: hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
Repository: hapifhir/hapi-fhir
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-32053
|
MEDIUM
| 5
|
hapifhir/hapi-fhir
|
setAllowInlineMatchUrlReferences
|
hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
|
f2934b229c491235ab0e7782dea86b324521082a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void deleteByPojoSingleQuote(TestContext context) throws FieldException {
deleteByPojo(context, singleQuotePojo); // SQL injection?
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deleteByPojoSingleQuote
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
|
deleteByPojoSingleQuote
|
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 onLoaderReset(Loader<Cursor> arg0) {
// Do nothing.
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onLoaderReset
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
|
onLoaderReset
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
void unbindRemainingServices() {
if (DEBUG) {
Log.d(TAG, "unbindRemainingServices, " + mServiceConnections.size() + " left");
}
for (int i = 0, N = mServiceConnections.size(); i < N; i++) {
final ChooserTargetServiceConnection conn = mServiceConnections.get(i);
if (DEBUG) Log.d(TAG, "unbinding " + conn);
unbindService(conn);
conn.destroy();
}
mServiceConnections.clear();
mChooserHandler.removeMessages(CHOOSER_TARGET_SERVICE_WATCHDOG_TIMEOUT);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unbindRemainingServices
File: core/java/com/android/internal/app/ChooserActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-254",
"CWE-19"
] |
CVE-2016-3752
|
HIGH
| 7.5
|
android
|
unbindRemainingServices
|
core/java/com/android/internal/app/ChooserActivity.java
|
ddbf2db5b946be8fdc45c7b0327bf560b2a06988
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable
public CharSequence getSequence(int idx) {
synchronized (this) {
if (mStrings != null) {
CharSequence res = mStrings[idx];
if (res != null) {
return res;
}
} else if (mSparseStrings != null) {
CharSequence res = mSparseStrings.get(idx);
if (res != null) {
return res;
}
} else {
final int num = nativeGetSize(mNative);
if (mUseSparse && num > 250) {
mSparseStrings = new SparseArray<CharSequence>();
} else {
mStrings = new CharSequence[num];
}
}
String str = nativeGetString(mNative, idx);
if (str == null) {
return null;
}
CharSequence res = str;
int[] style = nativeGetStyle(mNative, idx);
if (localLOGV) Log.v(TAG, "Got string: " + str);
if (localLOGV) Log.v(TAG, "Got styles: " + Arrays.toString(style));
if (style != null) {
if (mStyleIDs == null) {
mStyleIDs = new StyleIDs();
}
// the style array is a flat array of <type, start, end> hence
// the magic constant 3.
for (int styleIndex = 0; styleIndex < style.length; styleIndex += 3) {
int styleId = style[styleIndex];
if (styleId == mStyleIDs.boldId || styleId == mStyleIDs.italicId
|| styleId == mStyleIDs.underlineId || styleId == mStyleIDs.ttId
|| styleId == mStyleIDs.bigId || styleId == mStyleIDs.smallId
|| styleId == mStyleIDs.subId || styleId == mStyleIDs.supId
|| styleId == mStyleIDs.strikeId || styleId == mStyleIDs.listItemId
|| styleId == mStyleIDs.marqueeId) {
// id already found skip to next style
continue;
}
String styleTag = nativeGetString(mNative, styleId);
if (styleTag == null) {
return null;
}
if (styleTag.equals("b")) {
mStyleIDs.boldId = styleId;
} else if (styleTag.equals("i")) {
mStyleIDs.italicId = styleId;
} else if (styleTag.equals("u")) {
mStyleIDs.underlineId = styleId;
} else if (styleTag.equals("tt")) {
mStyleIDs.ttId = styleId;
} else if (styleTag.equals("big")) {
mStyleIDs.bigId = styleId;
} else if (styleTag.equals("small")) {
mStyleIDs.smallId = styleId;
} else if (styleTag.equals("sup")) {
mStyleIDs.supId = styleId;
} else if (styleTag.equals("sub")) {
mStyleIDs.subId = styleId;
} else if (styleTag.equals("strike")) {
mStyleIDs.strikeId = styleId;
} else if (styleTag.equals("li")) {
mStyleIDs.listItemId = styleId;
} else if (styleTag.equals("marquee")) {
mStyleIDs.marqueeId = styleId;
}
}
res = applyStyles(str, style, mStyleIDs);
}
if (res != null) {
if (mStrings != null) mStrings[idx] = res;
else mSparseStrings.put(idx, res);
}
return res;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSequence
File: core/java/android/content/res/StringBlock.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-415"
] |
CVE-2023-40103
|
HIGH
| 7.8
|
android
|
getSequence
|
core/java/android/content/res/StringBlock.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
private void removeVisibilityValuesForPackage(String packageName) {
if (isSpecialPackageKey(packageName)) {
return;
}
synchronized (mUsers) {
int numberOfUsers = mUsers.size();
for (int i = 0; i < numberOfUsers; i++) {
UserAccounts accounts = mUsers.valueAt(i);
try {
mPackageManager.getPackageUidAsUser(packageName, accounts.userId);
} catch (NameNotFoundException e) {
// package does not exist - remove visibility values
accounts.accountsDb.deleteAccountVisibilityForPackage(packageName);
synchronized (accounts.dbLock) {
synchronized (accounts.cacheLock) {
for (Account account : accounts.visibilityCache.keySet()) {
Map<String, Integer> accountVisibility =
getPackagesAndVisibilityForAccountLocked(account, accounts);
accountVisibility.remove(packageName);
}
AccountManager.invalidateLocalAccountsDataCaches();
}
}
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeVisibilityValuesForPackage
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
|
removeVisibilityValuesForPackage
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
private IntermediateClientRequestControl getIntermediateClientRequestControl()
{
Authentication authentication = SecurityContextHolder.getContext()
.getAuthentication();
Object userDetails = authentication.getDetails();
String authzId = userDetails instanceof LDAPUser ?
((LDAPUser) userDetails).getAuthzID() :
"u:" + authentication.getName();
return new IntermediateClientRequestControl(null, null, null, authzId,
CLIENT_SESSION_ID, null, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getIntermediateClientRequestControl
File: src/main/java/com/unboundid/webapp/ssam/SSAMController.java
Repository: pingidentity/ssam
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2018-25084
|
MEDIUM
| 4
|
pingidentity/ssam
|
getIntermediateClientRequestControl
|
src/main/java/com/unboundid/webapp/ssam/SSAMController.java
|
f64b10d63bb19ca2228b0c2d561a1a6e5a3bf251
| 0
|
Analyze the following code function for security vulnerabilities
|
void completeSwitchAndInitalize(UserStartedState uss, int newUserId,
boolean clearInitializing, boolean clearSwitching) {
boolean unfrozen = false;
synchronized (this) {
if (clearInitializing) {
uss.initializing = false;
getUserManagerLocked().makeInitialized(uss.mHandle.getIdentifier());
}
if (clearSwitching) {
uss.switching = false;
}
if (!uss.switching && !uss.initializing) {
mWindowManager.stopFreezingScreen();
unfrozen = true;
}
}
if (unfrozen) {
final int N = mUserSwitchObservers.beginBroadcast();
for (int i=0; i<N; i++) {
try {
mUserSwitchObservers.getBroadcastItem(i).onUserSwitchComplete(newUserId);
} catch (RemoteException e) {
}
}
mUserSwitchObservers.finishBroadcast();
}
stopGuestUserIfBackground();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: completeSwitchAndInitalize
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
|
completeSwitchAndInitalize
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
private void removeCredentialManagementApp(String packageName) {
mBackgroundHandler.post(() -> {
try (KeyChainConnection connection = mInjector.keyChainBind()) {
IKeyChainService service = connection.getService();
if (service.hasCredentialManagementApp()
&& packageName.equals(service.getCredentialManagementAppPackageName())) {
service.removeCredentialManagementApp();
}
} catch (RemoteException | InterruptedException | IllegalStateException
| AssertionError e) {
Slogf.e(LOG_TAG, "Unable to remove the credential management app", e);
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeCredentialManagementApp
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
|
removeCredentialManagementApp
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@UnsupportedAppUsage
public boolean packageHasActiveAdmins(String packageName, int userId) {
if (mService != null) {
try {
return mService.packageHasActiveAdmins(packageName, userId);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: packageHasActiveAdmins
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
|
packageHasActiveAdmins
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void removePackageFromPreferred(String packageName) {
Slog.w(TAG, "removePackageFromPreferred: this is now a no-op");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removePackageFromPreferred
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
|
removePackageFromPreferred
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
@GET
@Path("/")
@Produces(MediaType.APPLICATION_JSON)
public List<String> getFiles(@QueryParam("changedFilesOnly") boolean changedFilesOnly, @Context SecurityContext securityContext) {
if (!securityContext.isUserInRole(Authentication.ROLE_FILESYSTEM_EDITOR)) {
throw new ForbiddenException("FILESYSTEM EDITOR role is required for enumerating files.");
}
try {
return Files.find(etcFolder, 4, (path, basicFileAttributes) -> isSupportedExtension(path), FileVisitOption.FOLLOW_LINKS)
.filter(p -> !p.equals(USERS_XML) || securityContext.isUserInRole(Authentication.ROLE_ADMIN))
.map(p -> etcFolder.relativize(p).toString())
.filter(p -> !changedFilesOnly || !doesFileExistAndMatchContentsWithEtcPristine(p, securityContext))
.sorted()
.collect(Collectors.toList());
} catch (IOException e) {
throw new RuntimeException("Failed to enumerate files in path: " + etcFolder, e);
}
}
|
Vulnerability Classification:
- CWE: CWE-91
- CVE: CVE-2023-40612
- Severity: HIGH
- CVSS Score: 8.0
Description: NMS-15704: Added tests
Function: getFiles
File: opennms-webapp-rest/src/main/java/org/opennms/web/rest/v1/FilesystemRestService.java
Repository: OpenNMS/opennms
Fixed Code:
@GET
@Path("/")
@Produces(MediaType.APPLICATION_JSON)
public List<String> getFiles(@QueryParam("changedFilesOnly") boolean changedFilesOnly, @Context SecurityContext securityContext) {
if (!securityContext.isUserInRole(Authentication.ROLE_FILESYSTEM_EDITOR)) {
throw new ForbiddenException("FILESYSTEM EDITOR role is required for enumerating files.");
}
try {
return Files.find(etcFolder, 4, (path, basicFileAttributes) -> isSupportedExtension(path), FileVisitOption.FOLLOW_LINKS)
.filter(p -> !p.equals(usersXml) || securityContext.isUserInRole(Authentication.ROLE_ADMIN))
.map(p -> etcFolder.relativize(p).toString())
.filter(p -> !changedFilesOnly || !doesFileExistAndMatchContentsWithEtcPristine(p, securityContext))
.sorted()
.collect(Collectors.toList());
} catch (IOException e) {
throw new RuntimeException("Failed to enumerate files in path: " + etcFolder, e);
}
}
|
[
"CWE-91"
] |
CVE-2023-40612
|
HIGH
| 8
|
OpenNMS/opennms
|
getFiles
|
opennms-webapp-rest/src/main/java/org/opennms/web/rest/v1/FilesystemRestService.java
|
726328874812cfb5d0a28c5a76b3925e531928b7
| 1
|
Analyze the following code function for security vulnerabilities
|
public void handleUserStop(int userId) {
if (mVerboseLoggingEnabled) {
Log.v(TAG, "Handling user stop for " + userId);
}
if (userId == mCurrentUserId
&& mUserManager.isUserUnlockingOrUnlocked(UserHandle.of(mCurrentUserId))) {
saveToStore(true);
clearInternalDataForUser(mCurrentUserId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleUserStop
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
|
handleUserStop
|
service/java/com/android/server/wifi/WifiConfigManager.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Component getVideoComponent() {
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getVideoComponent
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
|
getVideoComponent
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public java.math.@Nullable BigDecimal getBigDecimal(@Positive int columnIndex) throws SQLException {
return getBigDecimal(columnIndex, -1);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getBigDecimal
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
|
getBigDecimal
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
@GuardedBy("getLockObject()")
private void discardDeviceWideLogsLocked() {
mSecurityLogMonitor.discardLogs();
if (mNetworkLogger != null) {
mNetworkLogger.discardLogs();
}
// TODO: We should discard pre-boot security logs here too, as otherwise those
// logs (which might contain data from the user just removed) will be
// available after next boot.
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: discardDeviceWideLogsLocked
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
|
discardDeviceWideLogsLocked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public void deletePage(String space, String page) throws Exception
{
delete(new LocalDocumentReference(space, page));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deletePage
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
|
deletePage
|
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
|
@Override
public ComponentName getDeviceOwnerComponent(boolean callingUserOnly) {
if (!mHasFeature) {
return null;
}
if (!callingUserOnly) {
Preconditions.checkCallAuthorization(canManageUsers(getCallerIdentity())
|| hasCallingOrSelfPermission(MANAGE_PROFILE_AND_DEVICE_OWNERS));
}
synchronized (getLockObject()) {
if (!mOwners.hasDeviceOwner()) {
return null;
}
if (callingUserOnly && mInjector.userHandleGetCallingUserId() !=
mOwners.getDeviceOwnerUserId()) {
return null;
}
return mOwners.getDeviceOwnerComponent();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDeviceOwnerComponent
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
|
getDeviceOwnerComponent
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nonnull
public final JsonParser setAlwaysUseBigNumber (final boolean bAlwaysUseBigNumber)
{
m_bAlwaysUseBigNumber = bAlwaysUseBigNumber;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAlwaysUseBigNumber
File: ph-json/src/main/java/com/helger/json/parser/JsonParser.java
Repository: phax/ph-commons
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-34612
|
HIGH
| 7.5
|
phax/ph-commons
|
setAlwaysUseBigNumber
|
ph-json/src/main/java/com/helger/json/parser/JsonParser.java
|
02a4d034dcfb2b6e1796b25f519bf57a6796edce
| 0
|
Analyze the following code function for security vulnerabilities
|
public AsyncHttpClientConfigBean setCompressionEnabled(boolean compressionEnabled) {
this.compressionEnabled = compressionEnabled;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setCompressionEnabled
File: api/src/main/java/org/asynchttpclient/AsyncHttpClientConfigBean.java
Repository: AsyncHttpClient/async-http-client
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2013-7397
|
MEDIUM
| 4.3
|
AsyncHttpClient/async-http-client
|
setCompressionEnabled
|
api/src/main/java/org/asynchttpclient/AsyncHttpClientConfigBean.java
|
df6ed70e86c8fc340ed75563e016c8baa94d7e72
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<DemandDTO> getDemandList(String projectId) {
//getTestStories
List<DemandDTO> list = new ArrayList<>();
try {
String session = zentaoClient.login();
String key = getProjectId(projectId);
HttpEntity<MultiValueMap<String, String>> requestEntity = new HttpEntity<>(new HttpHeaders());
RestTemplate restTemplate = new RestTemplate();
String storyGet = zentaoClient.requestUrl.getStoryGet();
ResponseEntity<String> responseEntity = restTemplate.exchange(storyGet + session,
HttpMethod.POST, requestEntity, String.class, key);
String body = responseEntity.getBody();
Map obj = JSON.parseMap(body);
LogUtil.info("project story: " + key + obj);
if (obj != null) {
String data = obj.get("data").toString();
if (StringUtils.isBlank(data)) {
return list;
}
// 兼容处理11.5版本格式 [{obj},{obj}]
if (data.charAt(0) == '[') {
List array = (List) obj.get("data");
for (int i = 0; i < array.size(); i++) {
Map o = (Map) array.get(i);
DemandDTO demandDTO = new DemandDTO();
demandDTO.setId(o.get("id").toString());
demandDTO.setName(o.get("title").toString());
demandDTO.setPlatform(key);
list.add(demandDTO);
}
}
// {"5": {"children": {"51": {}}}, "6": {}}
else if (data.startsWith("{\"")) {
Map<String, Map<String, String>> dataMap = JSON.parseMap(data);
Collection<Map<String, String>> values = dataMap.values();
values.forEach(v -> {
Map jsonObject = JSON.parseMap(JSON.toJSONString(v));
DemandDTO demandDTO = new DemandDTO();
demandDTO.setId(jsonObject.get("id").toString());
demandDTO.setName(jsonObject.get("title").toString());
demandDTO.setPlatform(key);
list.add(demandDTO);
if (jsonObject.get("children") != null) {
LinkedHashMap<String, Map<String, String>> children = (LinkedHashMap<String, Map<String, String>>) jsonObject.get("children");
Collection<Map<String, String>> childrenMap = children.values();
childrenMap.forEach(ch -> {
DemandDTO dto = new DemandDTO();
dto.setId(ch.get("id"));
dto.setName(ch.get("title"));
dto.setPlatform(key);
list.add(dto);
});
}
});
}
// 处理格式 {{"id": {obj}},{"id",{obj}}}
else if (data.charAt(0) == '{') {
Map dataObject = (Map) obj.get("data");
String s = JSON.toJSONString(dataObject);
Map<String, Object> map = JSON.parseMap(s);
Collection<Object> values = map.values();
values.forEach(v -> {
Map jsonObject = JSON.parseMap(JSON.toJSONString(v));
DemandDTO demandDTO = new DemandDTO();
demandDTO.setId(jsonObject.get("id").toString());
demandDTO.setName(jsonObject.get("title").toString());
demandDTO.setPlatform(key);
list.add(demandDTO);
});
}
}
} catch (Exception e) {
LogUtil.error("get zentao demand fail " + e.getMessage());
}
return list;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDemandList
File: test-track/backend/src/main/java/io/metersphere/service/issue/platform/ZentaoPlatform.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2022-23544
|
MEDIUM
| 6.1
|
metersphere
|
getDemandList
|
test-track/backend/src/main/java/io/metersphere/service/issue/platform/ZentaoPlatform.java
|
d0f95b50737c941b29d507a4cc3545f2dc6ab121
| 0
|
Analyze the following code function for security vulnerabilities
|
private static int compareMaybeComparables(Object a, Object b) {
if (hasCommonComparableBaseType(a, b)) {
return compareComparables(a, b);
}
return compareComparables(Objects.toString(a, ""),
Objects.toString(b, ""));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: compareMaybeComparables
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
|
compareMaybeComparables
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void removeClientSession(String userSessionId, String clientUUID, boolean offline) {
String offlineStr = offlineToString(offline);
StorageId clientStorageId = new StorageId(clientUUID);
String clientId = PersistentClientSessionEntity.EXTERNAL;
String clientStorageProvider = PersistentClientSessionEntity.LOCAL;
String externalId = PersistentClientSessionEntity.LOCAL;
if (clientStorageId.isLocal()) {
clientId = clientUUID;
} else {
clientStorageProvider = clientStorageId.getProviderId();
externalId = clientStorageId.getExternalId();
}
PersistentClientSessionEntity sessionEntity = em.find(PersistentClientSessionEntity.class, new PersistentClientSessionEntity.Key(userSessionId, clientId, clientStorageProvider, externalId, offlineStr), LockModeType.PESSIMISTIC_WRITE);
if (sessionEntity != null) {
em.remove(sessionEntity);
// Remove userSession if it was last clientSession
List<PersistentClientSessionEntity> clientSessions = getClientSessionsByUserSession(sessionEntity.getUserSessionId(), offline);
if (clientSessions.size() == 0) {
offlineStr = offlineToString(offline);
PersistentUserSessionEntity userSessionEntity = em.find(PersistentUserSessionEntity.class, new PersistentUserSessionEntity.Key(sessionEntity.getUserSessionId(), offlineStr), LockModeType.PESSIMISTIC_WRITE);
if (userSessionEntity != null) {
em.remove(userSessionEntity);
}
}
em.flush();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeClientSession
File: model/jpa/src/main/java/org/keycloak/models/jpa/session/JpaUserSessionPersisterProvider.java
Repository: keycloak
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2023-6563
|
HIGH
| 7.7
|
keycloak
|
removeClientSession
|
model/jpa/src/main/java/org/keycloak/models/jpa/session/JpaUserSessionPersisterProvider.java
|
11eb952e1df7cbb95b1e2c101dfd4839a2375695
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void appliesIgnoreCaseOrderingCorrectly() {
Sort sort = new Sort(new Sort.Order("firstname").ignoreCase());
String query = "select p from Person p";
assertThat(applySorting(query, sort, "p"), endsWith("order by lower(p.firstname) asc"));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: appliesIgnoreCaseOrderingCorrectly
File: src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsUnitTests.java
Repository: spring-projects/spring-data-jpa
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-6652
|
MEDIUM
| 6.8
|
spring-projects/spring-data-jpa
|
appliesIgnoreCaseOrderingCorrectly
|
src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsUnitTests.java
|
b8e7fe
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void printRaw(String raw)
{
handleSpaceWhenStartElement();
super.printRaw(raw);
this.elementEnded = true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: printRaw
File: xwiki-rendering-xml/src/main/java/org/xwiki/rendering/renderer/printer/XHTMLWikiPrinter.java
Repository: xwiki/xwiki-rendering
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-32070
|
MEDIUM
| 6.1
|
xwiki/xwiki-rendering
|
printRaw
|
xwiki-rendering-xml/src/main/java/org/xwiki/rendering/renderer/printer/XHTMLWikiPrinter.java
|
c40e2f5f9482ec6c3e71dbf1fff5ba8a5e44cdc1
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
@Before
public void setUp() throws Exception {
super.setUp();
doReturn(mContext).when(mContext).createContextAsUser(any(UserHandle.class), anyInt());
mPackageManager = mContext.getPackageManager();
when(mPackageManager.getPackageUid(anyString(), eq(0))).thenReturn(Binder.getCallingUid());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUp
File: tests/src/com/android/server/telecom/tests/BasicCallTests.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
setUp
|
tests/src/com/android/server/telecom/tests/BasicCallTests.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public ThemeResourceProvider create(KeycloakSession session) {
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: create
File: services/src/main/java/org/keycloak/theme/ClasspathThemeResourceProviderFactory.java
Repository: keycloak
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-3856
|
MEDIUM
| 4.3
|
keycloak
|
create
|
services/src/main/java/org/keycloak/theme/ClasspathThemeResourceProviderFactory.java
|
73f0474008e1bebd0733e62a22aceda9e5de6743
| 0
|
Analyze the following code function for security vulnerabilities
|
public WindowContainerToken getLaunchRootTask() {
return mLaunchRootTask;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLaunchRootTask
File: core/java/android/app/ActivityOptions.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-20918
|
CRITICAL
| 9.8
|
android
|
getLaunchRootTask
|
core/java/android/app/ActivityOptions.java
|
51051de4eb40bb502db448084a83fd6cbfb7d3cf
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void safeSwingBlockingCall(@Nonnull final Runnable runnable) {
if (SwingUtilities.isEventDispatchThread()) {
runnable.run();
} else {
try {
SwingUtilities.invokeAndWait(runnable);
} catch (InterruptedException ex) {
Thread.currentThread().interrupt();
} catch (InvocationTargetException ex) {
throw new RuntimeException("Detected exception during SwingUtilities.invokeAndWait", ex);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: safeSwingBlockingCall
File: mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java
Repository: raydac/netbeans-mmd-plugin
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000542
|
MEDIUM
| 6.8
|
raydac/netbeans-mmd-plugin
|
safeSwingBlockingCall
|
mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java
|
9fba652bf06e649186b8f9e612d60e9cc15097e9
| 0
|
Analyze the following code function for security vulnerabilities
|
protected final void _verifyNullForPrimitiveCoercion(DeserializationContext ctxt, String str) throws JsonMappingException
{
Enum<?> feat;
boolean enable;
if (!ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS)) {
feat = MapperFeature.ALLOW_COERCION_OF_SCALARS;
enable = true;
} else if (ctxt.isEnabled(DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES)) {
feat = DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES;
enable = false;
} else {
return;
}
String strDesc = str.isEmpty() ? "empty String (\"\")" : String.format("String \"%s\"", str);
_reportFailedNullCoerce(ctxt, enable, feat, strDesc);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _verifyNullForPrimitiveCoercion
File: src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2022-42003
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
_verifyNullForPrimitiveCoercion
|
src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java
|
d78d00ee7b5245b93103fef3187f70543d67ca33
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public final float getFloat(CharSequence name, float defaultValue) {
final Float v = getFloat(name);
return v != null ? v : defaultValue;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFloat
File: core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2019-16771
|
MEDIUM
| 5
|
line/armeria
|
getFloat
|
core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
|
b597f7a865a527a84ee3d6937075cfbb4470ed20
| 0
|
Analyze the following code function for security vulnerabilities
|
public void noteWakeupAlarm(IIntentSender sender, int sourceUid, String sourcePkg, String tag)
throws RemoteException {
Parcel data = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeStrongBinder(sender.asBinder());
data.writeInt(sourceUid);
data.writeString(sourcePkg);
data.writeString(tag);
mRemote.transact(NOTE_WAKEUP_ALARM_TRANSACTION, data, null, 0);
data.recycle();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: noteWakeupAlarm
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
noteWakeupAlarm
|
core/java/android/app/ActivityManagerNative.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
void initializeReadJarPermissions() {
resourcePermissions = new ArrayList<>();
JARDesc jars[] = resources.getJARs();
for (JARDesc jar : jars) {
Permission p = CacheUtil.getReadPermission(jar.getLocation(), jar.getVersion());
if (p == null) {
LOG.info("Unable to add permission for {}", jar.getLocation());
} else {
resourcePermissions.add(p);
LOG.info("Permission added: {}", p.toString());
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initializeReadJarPermissions
File: core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
Repository: AdoptOpenJDK/IcedTea-Web
The code follows secure coding practices.
|
[
"CWE-345",
"CWE-94",
"CWE-22"
] |
CVE-2019-10182
|
MEDIUM
| 5.8
|
AdoptOpenJDK/IcedTea-Web
|
initializeReadJarPermissions
|
core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
|
e0818f521a0711aeec4b913b49b5fc6a52815662
| 0
|
Analyze the following code function for security vulnerabilities
|
private void handleFlagDimBehind(WindowState w) {
final WindowManager.LayoutParams attrs = w.mAttrs;
if ((attrs.flags & FLAG_DIM_BEHIND) != 0
&& w.isDisplayedLw()
&& !w.mExiting) {
final WindowStateAnimator winAnimator = w.mWinAnimator;
final TaskStack stack = w.getStack();
if (stack == null) {
return;
}
stack.setDimmingTag();
if (!stack.isDimming(winAnimator)) {
if (localLOGV) Slog.v(TAG, "Win " + w + " start dimming.");
stack.startDimmingIfNeeded(winAnimator);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleFlagDimBehind
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
|
handleFlagDimBehind
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setSaverMode(boolean mode) {
mPowerMan.setPowerSaveMode(mode);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSaverMode
File: packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3854
|
MEDIUM
| 5
|
android
|
setSaverMode
|
packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java
|
05e0705177d2078fa9f940ce6df723312cfab976
| 0
|
Analyze the following code function for security vulnerabilities
|
public static int releaseMemory() {
return SQLiteGlobal.releaseMemory();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: releaseMemory
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
|
releaseMemory
|
core/java/android/database/sqlite/SQLiteDatabase.java
|
ebc250d16c747f4161167b5ff58b3aea88b37acf
| 0
|
Analyze the following code function for security vulnerabilities
|
public void sendMockNdefTag(NdefMessage msg) {
sendMessage(MSG_MOCK_NDEF, msg);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendMockNdefTag
File: src/com/android/nfc/NfcService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3761
|
LOW
| 2.1
|
android
|
sendMockNdefTag
|
src/com/android/nfc/NfcService.java
|
9ea802b5456a36f1115549b645b65c791eff3c2c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean equals(@Nullable Object rval) {
if (rval == null) {
return false;
}
PackageNamePermissionQuery other;
try {
other = (PackageNamePermissionQuery) rval;
} catch (ClassCastException ex) {
return false;
}
return Objects.equals(permName, other.permName)
&& Objects.equals(pkgName, other.pkgName)
&& userId == other.userId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: equals
File: core/java/android/permission/PermissionManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-281"
] |
CVE-2023-21249
|
MEDIUM
| 5.5
|
android
|
equals
|
core/java/android/permission/PermissionManager.java
|
c00b7e7dbc1fa30339adef693d02a51254755d7f
| 0
|
Analyze the following code function for security vulnerabilities
|
public int createNewObject(String classname) throws XWikiException
{
int index = getDoc().createNewObject(classname, getXWikiContext());
updateAuthor();
return index;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createNewObject
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
|
createNewObject
|
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
|
private void updateSelfVideoViewPosition() {
Log.d(TAG, "updateSelfVideoViewPosition");
if (!isInPipMode) {
FrameLayout.LayoutParams layoutParams =
(FrameLayout.LayoutParams) binding.selfVideoRenderer.getLayoutParams();
DisplayMetrics displayMetrics = getApplicationContext().getResources().getDisplayMetrics();
int screenWidthPx = displayMetrics.widthPixels;
int screenWidthDp = (int) DisplayUtils.convertPixelToDp(screenWidthPx, getApplicationContext());
float newXafterRotate = 0;
float newYafterRotate;
if (binding.callInfosLinearLayout.getVisibility() == View.VISIBLE) {
newYafterRotate = 250;
} else {
newYafterRotate = 20;
}
if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) {
layoutParams.height = (int) getResources().getDimension(R.dimen.large_preview_dimension);
layoutParams.width = FrameLayout.LayoutParams.WRAP_CONTENT;
newXafterRotate = (float) (screenWidthDp - getResources().getDimension(R.dimen.large_preview_dimension) * 0.8);
} else if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) {
layoutParams.height = FrameLayout.LayoutParams.WRAP_CONTENT;
layoutParams.width = (int) getResources().getDimension(R.dimen.large_preview_dimension);
newXafterRotate = (float) (screenWidthDp - getResources().getDimension(R.dimen.large_preview_dimension) * 0.5);
}
binding.selfVideoRenderer.setLayoutParams(layoutParams);
int newXafterRotatePx = (int) DisplayUtils.convertDpToPixel(newXafterRotate, getApplicationContext());
binding.selfVideoViewWrapper.setY(newYafterRotate);
binding.selfVideoViewWrapper.setX(newXafterRotatePx);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateSelfVideoViewPosition
File: app/src/main/java/com/nextcloud/talk/activities/CallActivity.java
Repository: nextcloud/talk-android
The code follows secure coding practices.
|
[
"CWE-732",
"CWE-200"
] |
CVE-2022-41926
|
MEDIUM
| 5.5
|
nextcloud/talk-android
|
updateSelfVideoViewPosition
|
app/src/main/java/com/nextcloud/talk/activities/CallActivity.java
|
bb7e82fbcbd8c10d0d0128d736c41cec0f79e7d0
| 0
|
Analyze the following code function for security vulnerabilities
|
public void keyguardWaitingForActivityDrawn() throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
mRemote.transact(KEYGUARD_WAITING_FOR_ACTIVITY_DRAWN_TRANSACTION, data, reply, 0);
reply.readException();
data.recycle();
reply.recycle();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: keyguardWaitingForActivityDrawn
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
keyguardWaitingForActivityDrawn
|
core/java/android/app/ActivityManagerNative.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setAction(String action) {
synchronized (this) {
logger.trace("setAction: " + action);
this.action = action;
if (searchBean != null && action != null) {
switch (action) {
case "nextHit":
searchBean.setHitIndexOperand(1);
break;
case "prevHit":
searchBean.setHitIndexOperand(-1);
break;
default:
// do nothing
break;
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAction
File: goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java
Repository: intranda/goobi-viewer-core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-29014
|
MEDIUM
| 6.1
|
intranda/goobi-viewer-core
|
setAction
|
goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java
|
c29efe60e745a94d03debc17681c4950f3917455
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String getAction() {
return this.action;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAction
File: spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/FormTag.java
Repository: spring-projects/spring-framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-1904
|
MEDIUM
| 4.3
|
spring-projects/spring-framework
|
getAction
|
spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/FormTag.java
|
741b4b229ae032bd17175b46f98673ce0bd2d485
| 0
|
Analyze the following code function for security vulnerabilities
|
String getRemoteAlias(BluetoothDevice device) {
enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission");
DeviceProperties deviceProp = mRemoteDevices.getDeviceProperties(device);
if (deviceProp == null) return null;
return deviceProp.getAlias();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRemoteAlias
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
|
getRemoteAlias
|
src/com/android/bluetooth/btservice/AdapterService.java
|
122feb9a0b04290f55183ff2f0384c6c53756bd8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void watchFile(
String projectName, String repositoryName, Revision lastKnownRevision,
Query query, long timeoutMillis, AsyncMethodCallback resultHandler) {
if (timeoutMillis <= 0) {
rejectInvalidWatchTimeout("watchFile", resultHandler);
return;
}
final Repository repo = projectManager.get(projectName).repos().get(repositoryName);
final CompletableFuture<com.linecorp.centraldogma.common.Entry<Object>> future =
watchService.watchFile(repo, convert(lastKnownRevision), convert(query), timeoutMillis);
handleWatchFileResult(future, resultHandler);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: watchFile
File: server/src/main/java/com/linecorp/centraldogma/server/internal/thrift/CentralDogmaServiceImpl.java
Repository: line/centraldogma
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2021-38388
|
MEDIUM
| 6.5
|
line/centraldogma
|
watchFile
|
server/src/main/java/com/linecorp/centraldogma/server/internal/thrift/CentralDogmaServiceImpl.java
|
e83b558ef9eaa44f71b7d9236bdec9f68c85b8bd
| 0
|
Analyze the following code function for security vulnerabilities
|
int getPid() {
return app != null ? app.getPid() : 0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPid
File: services/core/java/com/android/server/wm/ActivityRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21145
|
HIGH
| 7.8
|
android
|
getPid
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
public static int generateId(final String url, final String path) {
return CustomComponentHolder.getImpl().getIdGeneratorInstance()
.generateId(url, path, false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: generateId
File: library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java
Repository: lingochamp/FileDownloader
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-11248
|
HIGH
| 7.5
|
lingochamp/FileDownloader
|
generateId
|
library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java
|
b023cc081bbecdd2a9f3549a3ae5c12a9647ed7f
| 0
|
Analyze the following code function for security vulnerabilities
|
public int validateUser(boolean withConfirmEmail) throws XWikiException
{
return this.xwiki.validateUser(withConfirmEmail, getXWikiContext());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: validateUser
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
|
validateUser
|
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
|
private int _readAndWriteBytes(OutputStream out, int total) throws IOException
{
int left = total;
while (left > 0) {
int avail = _inputEnd - _inputPtr;
if (_inputPtr >= _inputEnd) {
loadMoreGuaranteed();
avail = _inputEnd - _inputPtr;
}
int count = Math.min(avail, left);
out.write(_inputBuffer, _inputPtr, count);
_inputPtr += count;
left -= count;
}
_tokenIncomplete = false;
return total;
}
|
Vulnerability Classification:
- CWE: CWE-770
- CVE: CVE-2020-28491
- Severity: MEDIUM
- CVSS Score: 5.0
Description: Fix eager allocation aspect of #186
Function: _readAndWriteBytes
File: cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
Repository: FasterXML/jackson-dataformats-binary
Fixed Code:
private int _readAndWriteBytes(OutputStream out, final int total) throws IOException
{
int left = total;
while (left > 0) {
int avail = _inputEnd - _inputPtr;
if (_inputPtr >= _inputEnd) {
if (!loadMore()) {
_reportIncompleteBinaryRead(total, total-left);
}
avail = _inputEnd - _inputPtr;
}
int count = Math.min(avail, left);
out.write(_inputBuffer, _inputPtr, count);
_inputPtr += count;
left -= count;
}
_tokenIncomplete = false;
return total;
}
|
[
"CWE-770"
] |
CVE-2020-28491
|
MEDIUM
| 5
|
FasterXML/jackson-dataformats-binary
|
_readAndWriteBytes
|
cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
|
de072d314af8f5f269c8abec6930652af67bc8e6
| 1
|
Analyze the following code function for security vulnerabilities
|
private native void nativeExtractSmartClipData(long nativeContentViewCoreImpl,
int x, int y, int w, int h);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nativeExtractSmartClipData
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
|
nativeExtractSmartClipData
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Object ckeditorUploadFile(HttpServletRequest request) {
String token = request.getParameter(SysConf.TOKEN);
// 从Redis中获取七牛云配置文件
Map<String, String> qiNiuResultMap = feignUtil.getSystemConfigMap(token);
SystemConfig systemConfig = feignUtil.getSystemConfigByMap(qiNiuResultMap);
Map<String, Object> map = new HashMap<>();
Map<String, Object> errorMap = new HashMap<>();
//引用自己设计的一个工具类
AboutFileUtil af = new AboutFileUtil();
// 转换成多部分request
MultipartHttpServletRequest multiRequest = (MultipartHttpServletRequest) request;
// 取得request中的所有文件名
Iterator<String> iter = multiRequest.getFileNames();
while (iter.hasNext()) {
MultipartFile file = multiRequest.getFile(iter.next());
if (file != null) {
//获取旧名称
String oldName = file.getOriginalFilename();
//获取扩展名
String expandedName = FileUtils.getPicExpandedName(oldName);
//判断是否是图片
if (!af.isPic(expandedName)) {
map.put(SysConf.UPLOADED, 0);
errorMap.put(SysConf.MESSAGE, "请上传正确的图片");
map.put(SysConf.ERROR, errorMap);
return map;
}
//对图片大小进行限制
if (file.getSize() > (10 * 1024 * 1024)) {
map.put(SysConf.UPLOADED, 0);
errorMap.put(SysConf.MESSAGE, "图片大小不能超过10M");
map.put(SysConf.ERROR, errorMap);
return map;
}
// 设置图片上传服务必要的信息
request.setAttribute(SysConf.USER_UID, SysConf.DEFAULT_UID);
request.setAttribute(SysConf.ADMIN_UID, SysConf.DEFAULT_UID);
request.setAttribute(SysConf.PROJECT_NAME, SysConf.BLOG);
request.setAttribute(SysConf.SORT_NAME, SysConf.ADMIN);
List<MultipartFile> fileData = new ArrayList<>();
fileData.add(file);
// 批量上传图片
String result = fileService.batchUploadFile(request, fileData, systemConfig);
Map<String, Object> resultMap = JsonUtils.jsonToMap(result);
String code = resultMap.get(SysConf.CODE).toString();
if (SysConf.SUCCESS.equals(code)) {
List<HashMap<String, Object>> resultList = (List<HashMap<String, Object>>) resultMap.get(SysConf.DATA);
if (resultList.size() > 0) {
Map<String, Object> picture = resultList.get(0);
String fileName = picture.get(SysConf.PIC_NAME).toString();
map.put(SysConf.UPLOADED, 1);
map.put(SysConf.FILE_NAME, fileName);
// 设置博客详情显示方式
if (EFilePriority.QI_NIU.equals(systemConfig.getContentPicturePriority())) {
String qiNiuPictureBaseUrl = systemConfig.getQiNiuPictureBaseUrl();
String qiNiuUrl = picture.get(SysConf.QI_NIU_URL).toString();
map.put(SysConf.URL, qiNiuPictureBaseUrl + qiNiuUrl);
} else if (EFilePriority.MINIO.equals(systemConfig.getContentPicturePriority())) {
String minioPictureBaseUrl = systemConfig.getMinioPictureBaseUrl();
String url = minioPictureBaseUrl + picture.get(SysConf.MINIO_URL).toString();
map.put(SysConf.URL, url);
} else {
String localPictureBaseUrl = systemConfig.getLocalPictureBaseUrl();
// 设置图片服务根域名
String url = localPictureBaseUrl + picture.get(SysConf.PIC_URL).toString();
map.put(SysConf.URL, url);
}
}
} else {
map.put(SysConf.UPLOADED, 0);
errorMap.put(SysConf.MESSAGE, "上传失败");
map.put(SysConf.ERROR, errorMap);
}
}
}
return map;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: ckeditorUploadFile
File: mogu_picture/src/main/java/com/moxi/mogublog/picture/service/impl/FileServiceImpl.java
Repository: moxi624/mogu_blog_v2
The code follows secure coding practices.
|
[
"CWE-434"
] |
CVE-2022-27047
|
HIGH
| 7.5
|
moxi624/mogu_blog_v2
|
ckeditorUploadFile
|
mogu_picture/src/main/java/com/moxi/mogublog/picture/service/impl/FileServiceImpl.java
|
2d9eb941cda8fd168f9447cd6b4262f31f074d92
| 0
|
Analyze the following code function for security vulnerabilities
|
void removeUserLocked(int userId) {
mUserStackInFront.delete(userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeUserLocked
File: services/core/java/com/android/server/am/ActivityStackSupervisor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3838
|
MEDIUM
| 4.3
|
android
|
removeUserLocked
|
services/core/java/com/android/server/am/ActivityStackSupervisor.java
|
468651c86a8adb7aa56c708d2348e99022088af3
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
void startRelaunching() {
if (mPendingRelaunchCount == 0) {
mRelaunchStartTime = SystemClock.elapsedRealtime();
}
clearAllDrawn();
mPendingRelaunchCount++;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startRelaunching
File: services/core/java/com/android/server/wm/ActivityRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21145
|
HIGH
| 7.8
|
android
|
startRelaunching
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void setReadOnlyProperties(boolean readonly) {
this.readonlyProperties = readonly;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setReadOnlyProperties
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
|
setReadOnlyProperties
|
src/main/java/com/rabbitmq/jms/client/RMQMessage.java
|
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
| 0
|
Analyze the following code function for security vulnerabilities
|
public DocumentStats getCurrentMonthSpaceStats(String action)
{
Scope scope = ScopeFactory.createSpaceScope(this.doc.getSpace(), false);
Range range = RangeFactory.ALL;
Period period = PeriodFactory.getCurrentMonth();
XWikiStatsService statisticsService = getXWikiContext().getWiki().getStatsService(getXWikiContext());
List<DocumentStats> stats = statisticsService.getDocumentStatistics(action, scope, period, range, this.context);
if (stats.size() > 0) {
return stats.get(0);
}
return new DocumentStats();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCurrentMonthSpaceStats
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
|
getCurrentMonthSpaceStats
|
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 int startActivities(IApplicationThread caller, String callingPackage,
Intent[] intents, String[] resolvedTypes, IBinder resultTo,
Bundle options, int userId) throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeStrongBinder(caller != null ? caller.asBinder() : null);
data.writeString(callingPackage);
data.writeTypedArray(intents, 0);
data.writeStringArray(resolvedTypes);
data.writeStrongBinder(resultTo);
if (options != null) {
data.writeInt(1);
options.writeToParcel(data, 0);
} else {
data.writeInt(0);
}
data.writeInt(userId);
mRemote.transact(START_ACTIVITIES_TRANSACTION, data, reply, 0);
reply.readException();
int result = reply.readInt();
reply.recycle();
data.recycle();
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startActivities
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
startActivities
|
core/java/android/app/ActivityManagerNative.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
private MonitoringFilter validateDataItemFilter(
Object filterObject,
UInteger attributeId,
AttributeGroup attributeGroup
) throws UaException {
if (filterObject instanceof MonitoringFilter) {
if (filterObject instanceof DataChangeFilter) {
DataChangeFilter filter = (DataChangeFilter) filterObject;
DeadbandType deadbandType = DeadbandType.from(filter.getDeadbandType().intValue());
if (deadbandType == null) {
throw new UaException(StatusCodes.Bad_DeadbandFilterInvalid);
}
if (deadbandType == DeadbandType.Percent) {
// Percent deadband is not currently implemented
throw new UaException(StatusCodes.Bad_MonitoredItemFilterUnsupported);
}
if (deadbandType == DeadbandType.Absolute &&
!AttributeId.Value.isEqual(attributeId)) {
// Absolute deadband is only allowed for Value attributes
throw new UaException(StatusCodes.Bad_FilterNotAllowed);
}
if (deadbandType != DeadbandType.None) {
NodeId dataTypeId = null;
try {
dataTypeId = attributeGroup.getDataType();
} catch (UaException ignored) {
// noop
}
if (dataTypeId == null) {
dataTypeId = NodeId.NULL_VALUE;
}
if (!Identifiers.Number.equals(dataTypeId) && !subtypeOf(server, dataTypeId, Identifiers.Number)) {
throw new UaException(StatusCodes.Bad_FilterNotAllowed);
}
}
return filter;
} else if (filterObject instanceof EventFilter) {
throw new UaException(StatusCodes.Bad_FilterNotAllowed);
} else {
// AggregateFilter or some future unimplemented filter
throw new UaException(StatusCodes.Bad_MonitoredItemFilterUnsupported);
}
} else {
throw new UaException(StatusCodes.Bad_MonitoredItemFilterInvalid);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: validateDataItemFilter
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
|
validateDataItemFilter
|
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
|
private XWikiDocument getObjectDocument(BaseCollection object, XWikiContext context)
{
try {
XWikiDocument doc = object.getOwnerDocument();
if (doc == null) {
doc = context.getWiki().getDocument(object.getDocumentReference(), context);
}
return doc;
} catch (Exception e) {
// Used to convert a Document Reference to string (compact form without the wiki part if it matches
// the current wiki).
LOGGER.warn(
"Error while getting the syntax corresponding to object [{}]. "
+ "Defaulting to using XWiki 1.0 syntax. Internal error [{}]",
object.getReference(), ExceptionUtils.getRootCauseMessage(e));
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getObjectDocument
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/objects/classes/TextAreaClass.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-41046
|
MEDIUM
| 6.3
|
xwiki/xwiki-platform
|
getObjectDocument
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/objects/classes/TextAreaClass.java
|
edc52579eeaab1b4514785c134044671a1ecd839
| 0
|
Analyze the following code function for security vulnerabilities
|
public void dropActiveData(String key) {
if (activeData.contains(key)) {
droppedData.add(key);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dropActiveData
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
|
dropActiveData
|
server/src/main/java/com/vaadin/data/provider/DataCommunicator.java
|
9a93593d9f3802d2881fc8ad22dbc210d0d1d295
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setDatabase(String database)
{
this.database = database;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDatabase
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-32620
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
setDatabase
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
public void clearListeners() {
mBoundListeners.clear();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearListeners
File: app/src/main/java/com/owncloud/android/files/services/FileUploader.java
Repository: nextcloud/android
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-39210
|
MEDIUM
| 5.5
|
nextcloud/android
|
clearListeners
|
app/src/main/java/com/owncloud/android/files/services/FileUploader.java
|
cd3bd0845a97e1d43daa0607a122b66b0068c751
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
public void setSearchBuilderFactoryForUnitTest(SearchBuilderFactory theSearchBuilderFactory) {
mySearchBuilderFactory = theSearchBuilderFactory;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSearchBuilderFactoryForUnitTest
File: hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaBundleProvider.java
Repository: hapifhir/hapi-fhir
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-32053
|
MEDIUM
| 5
|
hapifhir/hapi-fhir
|
setSearchBuilderFactoryForUnitTest
|
hapi-fhir-jpaserver-base/src/main/java/ca/uhn/fhir/jpa/search/PersistedJpaBundleProvider.java
|
a5e4f56e1c6f55093ff334cf698ffdeea2f33960
| 0
|
Analyze the following code function for security vulnerabilities
|
private AuthenticationInfo attemptLogin()
{
for ( String uStore : idProvider )
{
final AuthenticationInfo authInfo = authenticate( IdProviderKey.from( uStore ) );
if ( ( authInfo != null ) && authInfo.isAuthenticated() )
{
return authInfo;
}
}
return AuthenticationInfo.unAuthenticated();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: attemptLogin
File: modules/lib/lib-auth/src/main/java/com/enonic/xp/lib/auth/LoginHandler.java
Repository: enonic/xp
The code follows secure coding practices.
|
[
"CWE-384"
] |
CVE-2024-23679
|
CRITICAL
| 9.8
|
enonic/xp
|
attemptLogin
|
modules/lib/lib-auth/src/main/java/com/enonic/xp/lib/auth/LoginHandler.java
|
0189975691e9e6407a9fee87006f730e84f734ff
| 0
|
Analyze the following code function for security vulnerabilities
|
public long readLong() throws IOException {
return primitiveTypes.readLong();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readLong
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
|
readLong
|
luni/src/main/java/java/io/ObjectInputStream.java
|
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
| 0
|
Analyze the following code function for security vulnerabilities
|
public String displayForm(DocumentReference classReference, String header, String format, XWikiContext context)
{
return displayForm(classReference, header, format, true, context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: displayForm
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-26470
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
displayForm
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
public void finishHeavyWeightApp() throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
mRemote.transact(FINISH_HEAVY_WEIGHT_APP_TRANSACTION, data, reply, 0);
reply.readException();
data.recycle();
reply.recycle();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: finishHeavyWeightApp
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
finishHeavyWeightApp
|
core/java/android/app/ActivityManagerNative.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
private void parseOwner(final List<Element> elements) throws GameParseException {
for (final Element current : elements) {
final Territory territory = getTerritory(current, "territory", true);
final PlayerId owner = getPlayerId(current, "owner", true);
territory.setOwner(owner);
// Set the original owner on startup.
// TODO Look into this
// The addition of this caused the automated tests to fail as TestAttachment can't be cast to TerritoryAttachment
// The addition of this IF to pass the tests is wrong, but works until a better solution is found.
// Kevin will look into it.
if (!territory.getData().getGameName().equals("gameExample")
&& !territory.getData().getGameName().equals("test")) {
// set the original owner
final TerritoryAttachment ta = TerritoryAttachment.get(territory);
if (ta != null) {
// If we already have an original owner set (ie: we set it previously in the attachment using originalOwner or
// occupiedTerrOf), then we DO NOT set the original owner again.
// This is how we can have a game start with territories owned by 1 faction but controlled by a 2nd faction.
final PlayerId currentOwner = ta.getOriginalOwner();
if (currentOwner == null) {
ta.setOriginalOwner(owner);
}
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseOwner
File: game-core/src/main/java/games/strategy/engine/data/GameParser.java
Repository: triplea-game/triplea
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000546
|
MEDIUM
| 6.8
|
triplea-game/triplea
|
parseOwner
|
game-core/src/main/java/games/strategy/engine/data/GameParser.java
|
0f23875a4c6e166218859a63c884995f15c53895
| 0
|
Analyze the following code function for security vulnerabilities
|
private static String createNoClassMsg(String configClass) {
return String.format(Locale.ENGLISH, NO_CLASS_MSG, configClass);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createNoClassMsg
File: graylog2-server/src/main/java/org/graylog2/rest/resources/system/ClusterConfigResource.java
Repository: Graylog2/graylog2-server
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2024-24824
|
HIGH
| 8.8
|
Graylog2/graylog2-server
|
createNoClassMsg
|
graylog2-server/src/main/java/org/graylog2/rest/resources/system/ClusterConfigResource.java
|
75ef2b8d60e7d67f859b79fe712c8ae7b2e861d8
| 0
|
Analyze the following code function for security vulnerabilities
|
@SystemApi
@RequiresPermission(Manifest.permission.MANAGE_ONE_TIME_PERMISSION_SESSIONS)
public void startOneTimePermissionSession(@NonNull String packageName,
@DurationMillisLong long timeoutMillis,
@DurationMillisLong long revokeAfterKilledDelayMillis,
@ActivityManager.RunningAppProcessInfo.Importance int importanceToResetTimer,
@ActivityManager.RunningAppProcessInfo.Importance int importanceToKeepSessionAlive) {
try {
mPermissionManager.startOneTimePermissionSession(packageName, mContext.getUserId(),
timeoutMillis, revokeAfterKilledDelayMillis, importanceToResetTimer,
importanceToKeepSessionAlive);
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
}
|
Vulnerability Classification:
- CWE: CWE-281
- CVE: CVE-2023-21249
- Severity: MEDIUM
- CVSS Score: 5.5
Description: Watch uid proc state instead of importance for 1-time permissions
The system process may bind to an app with the flag
BIND_FOREGROUND_SERVICE, this will put the client in the foreground
service importance level without the normal requirement that foreground
services must show a notification. Looking at proc states instead allows
us to differentiate between these two levels of foreground service and
revoke the client when not in use.
This change makes the parameters `importanceToResetTimer` and
`importanceToKeepSessionAlive` in PermissionManager#startOneTimePermissionSession
obsolete.
Test: atest CtsPermissionTestCases + manual testing with mic/cam/loc
Bug: 217981062
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:0be78fbbf7d92bf29858aa0c48b171045ab5057f)
Merged-In: I7a725647c001062d1a76a82b680a02e3e2edcb03
Change-Id: I7a725647c001062d1a76a82b680a02e3e2edcb03
Function: startOneTimePermissionSession
File: core/java/android/permission/PermissionManager.java
Repository: android
Fixed Code:
@SystemApi
@RequiresPermission(Manifest.permission.MANAGE_ONE_TIME_PERMISSION_SESSIONS)
public void startOneTimePermissionSession(@NonNull String packageName,
@DurationMillisLong long timeoutMillis,
@DurationMillisLong long revokeAfterKilledDelayMillis,
@ActivityManager.RunningAppProcessInfo.Importance int importanceToResetTimer,
@ActivityManager.RunningAppProcessInfo.Importance int importanceToKeepSessionAlive) {
try {
mPermissionManager.startOneTimePermissionSession(packageName, mContext.getUserId(),
timeoutMillis, revokeAfterKilledDelayMillis);
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
}
|
[
"CWE-281"
] |
CVE-2023-21249
|
MEDIUM
| 5.5
|
android
|
startOneTimePermissionSession
|
core/java/android/permission/PermissionManager.java
|
c00b7e7dbc1fa30339adef693d02a51254755d7f
| 1
|
Analyze the following code function for security vulnerabilities
|
private void splitHeader(AppendableCharSequence sb) {
final int length = sb.length();
int nameStart;
int nameEnd;
int colonEnd;
int valueStart;
int valueEnd;
nameStart = findNonWhitespace(sb, 0, false);
for (nameEnd = nameStart; nameEnd < length; nameEnd ++) {
char ch = sb.charAtUnsafe(nameEnd);
// https://tools.ietf.org/html/rfc7230#section-3.2.4
//
// No whitespace is allowed between the header field-name and colon. In
// the past, differences in the handling of such whitespace have led to
// security vulnerabilities in request routing and response handling. A
// server MUST reject any received request message that contains
// whitespace between a header field-name and colon with a response code
// of 400 (Bad Request). A proxy MUST remove any such whitespace from a
// response message before forwarding the message downstream.
if (ch == ':' ||
// In case of decoding a request we will just continue processing and header validation
// is done in the DefaultHttpHeaders implementation.
//
// In the case of decoding a response we will "skip" the whitespace.
(!isDecodingRequest() && isOWS(ch))) {
break;
}
}
if (nameEnd == length) {
// There was no colon present at all.
throw new IllegalArgumentException("No colon found");
}
for (colonEnd = nameEnd; colonEnd < length; colonEnd ++) {
if (sb.charAtUnsafe(colonEnd) == ':') {
colonEnd ++;
break;
}
}
name = sb.subStringUnsafe(nameStart, nameEnd);
valueStart = findNonWhitespace(sb, colonEnd, true);
if (valueStart == length) {
value = EMPTY_VALUE;
} else {
valueEnd = findEndOfString(sb);
value = sb.subStringUnsafe(valueStart, valueEnd);
}
}
|
Vulnerability Classification:
- CWE: CWE-444
- CVE: CVE-2021-43797
- Severity: MEDIUM
- CVSS Score: 4.3
Description: Merge pull request from GHSA-wx5j-54mm-rqqq
Motivation:
We should validate that only OWS is allowed before / after a header name and otherwise throw. At the moment we just "strip" everything except OWS.
Modifications:
- Adjust code to correctly validate
- Add unit tests
Result:
More strict and correct behaviour
Function: splitHeader
File: codec-http/src/main/java/io/netty/handler/codec/http/HttpObjectDecoder.java
Repository: netty
Fixed Code:
private void splitHeader(AppendableCharSequence sb) {
final int length = sb.length();
int nameStart;
int nameEnd;
int colonEnd;
int valueStart;
int valueEnd;
nameStart = findNonWhitespace(sb, 0);
for (nameEnd = nameStart; nameEnd < length; nameEnd ++) {
char ch = sb.charAtUnsafe(nameEnd);
// https://tools.ietf.org/html/rfc7230#section-3.2.4
//
// No whitespace is allowed between the header field-name and colon. In
// the past, differences in the handling of such whitespace have led to
// security vulnerabilities in request routing and response handling. A
// server MUST reject any received request message that contains
// whitespace between a header field-name and colon with a response code
// of 400 (Bad Request). A proxy MUST remove any such whitespace from a
// response message before forwarding the message downstream.
if (ch == ':' ||
// In case of decoding a request we will just continue processing and header validation
// is done in the DefaultHttpHeaders implementation.
//
// In the case of decoding a response we will "skip" the whitespace.
(!isDecodingRequest() && isOWS(ch))) {
break;
}
}
if (nameEnd == length) {
// There was no colon present at all.
throw new IllegalArgumentException("No colon found");
}
for (colonEnd = nameEnd; colonEnd < length; colonEnd ++) {
if (sb.charAtUnsafe(colonEnd) == ':') {
colonEnd ++;
break;
}
}
name = sb.subStringUnsafe(nameStart, nameEnd);
valueStart = findNonWhitespace(sb, colonEnd);
if (valueStart == length) {
value = EMPTY_VALUE;
} else {
valueEnd = findEndOfString(sb);
value = sb.subStringUnsafe(valueStart, valueEnd);
}
}
|
[
"CWE-444"
] |
CVE-2021-43797
|
MEDIUM
| 4.3
|
netty
|
splitHeader
|
codec-http/src/main/java/io/netty/handler/codec/http/HttpObjectDecoder.java
|
07aa6b5938a8b6ed7a6586e066400e2643897323
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public void refreshChunk(int chunkX, int chunkZ) {
getWorld().refreshChunk(chunkX, chunkZ);
}
|
Vulnerability Classification:
- CWE: CWE-400
- CVE: CVE-2023-35925
- Severity: MEDIUM
- CVSS Score: 5.5
Description: feat: prevent edits outside +/- 30,000,000 blocks
Function: refreshChunk
File: worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java
Repository: IntellectualSites/FastAsyncWorldEdit
Fixed Code:
@Override
public void refreshChunk(int chunkX, int chunkZ) {
testCoords(BlockVector3.at(chunkX << 16, 0, chunkZ << 16));
getWorld().refreshChunk(chunkX, chunkZ);
}
|
[
"CWE-400"
] |
CVE-2023-35925
|
MEDIUM
| 5.5
|
IntellectualSites/FastAsyncWorldEdit
|
refreshChunk
|
worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java
|
3a8dfb4f7b858a439c35f7af1d56d21f796f61f5
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public LocallyAvailableResource add(final String path, final Action<File> addAction) {
try {
return doAdd(path, new Action<File>() {
@Override
public void execute(File file) {
try {
addAction.execute(file);
} catch (Throwable e) {
throw new FileStoreAddActionException(String.format("Failed to add into filestore '%s' at '%s' ", getBaseDir().getAbsolutePath(), path), e);
}
}
});
} catch (FileStoreAddActionException e) {
throw e;
} catch (Throwable e) {
throw new FileStoreException(String.format("Failed to add into filestore '%s' at '%s' ", getBaseDir().getAbsolutePath(), path), e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: add
File: subprojects/core/src/main/java/org/gradle/internal/resource/local/DefaultPathKeyFileStore.java
Repository: gradle
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2023-35946
|
MEDIUM
| 5.5
|
gradle
|
add
|
subprojects/core/src/main/java/org/gradle/internal/resource/local/DefaultPathKeyFileStore.java
|
859eae2b2acf751ae7db3c9ffefe275aa5da0d5d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void write(byte[] buf, int off, int nbytes) {
digest.update(buf, off, nbytes);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: write
File: core/java/android/util/jar/StrictJarVerifier.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21253
|
MEDIUM
| 5.5
|
android
|
write
|
core/java/android/util/jar/StrictJarVerifier.java
|
84df68840b6f2407146e722ebd95a7d8bc6e3529
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated(since = "9.10RC1")
public void addAttachment(XWikiAttachment attachment)
{
setAttachment(attachment);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addAttachment
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-74"
] |
CVE-2023-29523
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
addAttachment
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
0d547181389f7941e53291af940966413823f61c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public RequestDispatcher getRequestDispatcher(String name) {
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRequestDispatcher
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
|
getRequestDispatcher
|
h2/src/test/org/h2/test/server/TestWeb.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<? extends Location> findReferences(DOMDocument xmlDocument, Position position, ReferenceContext context,
CancelChecker cancelChecker) {
return reference.findReferences(xmlDocument, position, context, cancelChecker);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findReferences
File: org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/services/XMLLanguageService.java
Repository: eclipse/lemminx
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2019-18212
|
MEDIUM
| 4
|
eclipse/lemminx
|
findReferences
|
org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/services/XMLLanguageService.java
|
e37c399aa266be1b7a43061d4afc43dc230410d2
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.