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
|
private void migrate36(File dataDir, Stack<Integer> versions) {
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: migrate36
File: server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-338"
] |
CVE-2023-24828
|
HIGH
| 8.8
|
theonedev/onedev
|
migrate36
|
server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
|
d67dd9686897fe5e4ab881d749464aa7c06a68e5
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void showLogin(HttpServletRequest request, HttpServletResponse response) throws IOException
{
String savedRequestId = request.getParameter(SavedRequestManager.getSavedRequestIdentifier());
if (StringUtils.isEmpty(savedRequestId)) {
// Save this request
savedRequestId = SavedRequestManager.saveRequest(request);
}
String sridParameter = SavedRequestManager.getSavedRequestIdentifier() + "=" + savedRequestId;
// Redirect to login page
StringBuilder redirectBack = new StringBuilder(request.getRequestURI());
redirectBack.append('?');
String delimiter = "";
if (StringUtils.isNotEmpty(request.getQueryString())) {
redirectBack.append(request.getQueryString());
delimiter = "&";
}
if (!request.getParameterMap().containsKey(SavedRequestManager.getSavedRequestIdentifier())) {
redirectBack.append(delimiter);
redirectBack.append(sridParameter);
}
response.sendRedirect(response.encodeRedirectURL(request.getContextPath() + this.loginPage + "?"
+ sridParameter + "&xredirect=" + URLEncoder.encode(redirectBack.toString(), "UTF-8")));
return;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: showLogin
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/user/impl/xwiki/MyFormAuthenticator.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-601"
] |
CVE-2022-23618
|
MEDIUM
| 5.8
|
xwiki/xwiki-platform
|
showLogin
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/user/impl/xwiki/MyFormAuthenticator.java
|
5251c02080466bf9fb55288f04a37671108f8096
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setAttachmentRecycleBinStore(AttachmentRecycleBinStore attachmentRecycleBinStore)
{
this.attachmentRecycleBinStore = attachmentRecycleBinStore;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAttachmentRecycleBinStore
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
|
setAttachmentRecycleBinStore
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
private void throwTokenInvalidException() throws TokenValidationException {
String now = TemporalFormatter.toBaseIso8601(OffsetDateTime.now(), true);
throw new TokenValidationException("Attempt of a CSRF attack detected at " + now);
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2023-47324
- Severity: MEDIUM
- CVSS Score: 5.4
Description: Bug #13811: fixing stored XSS leading to full account takeover
* making HTML sanitize processing accessible for JSTL instructions
* sanitizing user notification title and contents on registering
* sanitizing user notification title and contents on rendering
* sanitizing browse bar parts
* modifying the user and group saving action names in order to get the user token verifications
* applying the token validation from component request router abstraction
Function: throwTokenInvalidException
File: core-rs/src/main/java/org/silverpeas/core/web/token/SynchronizerTokenService.java
Repository: Silverpeas/Silverpeas-Core
Fixed Code:
private void throwTokenInvalidException(final HttpServletRequest request)
throws TokenValidationException {
String now = TemporalFormatter.toBaseIso8601(OffsetDateTime.now(), true);
final TokenValidationException exception = new TokenValidationException(
"Attempt of a CSRF attack detected at " + now);
logger.error("The request for path {0} isn''t valid: {1}", request.getRequestURI(),
exception.getMessage());
throw exception;
}
|
[
"CWE-79"
] |
CVE-2023-47324
|
MEDIUM
| 5.4
|
Silverpeas/Silverpeas-Core
|
throwTokenInvalidException
|
core-rs/src/main/java/org/silverpeas/core/web/token/SynchronizerTokenService.java
|
9a55728729a3b431847045c674b3e883507d1e1a
| 1
|
Analyze the following code function for security vulnerabilities
|
protected static int getNextConcatenatedRef() {
sConcatenatedRef += 1;
return sConcatenatedRef;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNextConcatenatedRef
File: src/java/com/android/internal/telephony/SMSDispatcher.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2015-3858
|
HIGH
| 9.3
|
android
|
getNextConcatenatedRef
|
src/java/com/android/internal/telephony/SMSDispatcher.java
|
df31d37d285dde9911b699837c351aed2320b586
| 0
|
Analyze the following code function for security vulnerabilities
|
public Intent getMarketIntent(String packageName) {
return new Intent(Intent.ACTION_VIEW)
.setData(new Uri.Builder()
.scheme("market")
.authority("details")
.appendQueryParameter("id", packageName)
.build())
.putExtra(Intent.EXTRA_REFERRER, new Uri.Builder().scheme("android-app")
.authority(mContext.getPackageName()).build());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMarketIntent
File: src/com/android/launcher3/util/PackageManagerHelper.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2023-40097
|
HIGH
| 7.8
|
android
|
getMarketIntent
|
src/com/android/launcher3/util/PackageManagerHelper.java
|
6c9a41117d5a9365cf34e770bbb00138f6bf997e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Object makeTransformInverse(Object nativeTransform) {
CN1Matrix4f inverted = CN1Matrix4f.makeIdentity();
inverted.setData(((CN1Matrix4f)nativeTransform).getData());
if( inverted.invert()){
return inverted;
}
return null;
//Matrix inverted = new Matrix();
//if(((Matrix) nativeTransform).invert(inverted)){
// return inverted;
//}
//return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: makeTransformInverse
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
|
makeTransformInverse
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean enablePowerSave() {
return setPowerSave(~0, true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: enablePowerSave
File: service/java/com/android/server/wifi/ClientModeImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
enablePowerSave
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String getItemGroupAndItemMetaSql(String crfVersionIds) {
return "select cv.crf_id, cv.crf_version_id,"
+ " ig.item_group_id, item.item_id, rs.response_set_id, cv.oc_oid as crf_version_oid, ig.oc_oid as item_group_oid, item.oc_oid as item_oid,"
+ " ig.name as item_group_name, item.name as item_name, item.item_data_type_id, ifm.item_header, ifm.left_item_text,"
+ " ifm.right_item_text, ifm.required as item_required, ifm.regexp, ifm.regexp_error_msg, ifm.width_decimal,"
+ " rs.response_type_id, rs.options_text, rs.options_values, rs.label as response_label,"
+ " igm.item_group_header, igm.repeating_group,item.description as item_description, ifm.section_id, ifm.question_number_label from crf_version cv,"
+ " (select crf_version_id, item_id, response_set_id, header as item_header, left_item_text, right_item_text, required, regexp,"
+ " regexp_error_msg, width_decimal, section_id, question_number_label from item_form_metadata where crf_version_id in (" + crfVersionIds + "))ifm, item, response_set rs,"
+ " (select crf_version_id, item_group_id, item_id, header as item_group_header,repeating_group from item_group_metadata where crf_version_id in (" + crfVersionIds
+ "))igm," + " item_group ig "
+ this.getItemGroupAndItemMetaCondition(crfVersionIds);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getItemGroupAndItemMetaSql
File: core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
Repository: OpenClinica
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-24831
|
HIGH
| 7.5
|
OpenClinica
|
getItemGroupAndItemMetaSql
|
core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
|
b152cc63019230c9973965a98e4386ea5322c18f
| 0
|
Analyze the following code function for security vulnerabilities
|
public void opComplete(int token, long result) {
if (MORE_DEBUG) {
Slog.v(TAG, "opComplete: " + Integer.toHexString(token) + " result=" + result);
}
Operation op = null;
synchronized (mCurrentOpLock) {
op = mCurrentOperations.get(token);
if (op != null) {
op.state = OP_ACKNOWLEDGED;
}
mCurrentOpLock.notifyAll();
}
// The completion callback, if any, is invoked on the handler
if (op != null && op.callback != null) {
Message msg = mBackupHandler.obtainMessage(MSG_OP_COMPLETE, op.callback);
// NB: this cannot distinguish between results > 2 gig
msg.arg1 = (result > Integer.MAX_VALUE) ? Integer.MAX_VALUE : (int) result;
mBackupHandler.sendMessage(msg);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: opComplete
File: services/backup/java/com/android/server/backup/BackupManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3759
|
MEDIUM
| 5
|
android
|
opComplete
|
services/backup/java/com/android/server/backup/BackupManagerService.java
|
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isFile(File working) {
return working.exists();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isFile
File: brut.apktool/apktool-lib/src/main/java/brut/androlib/ApkBuilder.java
Repository: iBotPeaches/Apktool
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2024-21633
|
HIGH
| 7.8
|
iBotPeaches/Apktool
|
isFile
|
brut.apktool/apktool-lib/src/main/java/brut/androlib/ApkBuilder.java
|
d348c43b24a9de350ff6e5bd610545a10c1fc712
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
void handleReject(@NonNull String ssid) {
if (!isConnectionValid(ssid)) return;
boolean disconnectRequired = !useTrustOnFirstUse();
mWifiConfigManager.updateNetworkSelectionStatus(mCurrentTofuConfig.networkId,
WifiConfiguration.NetworkSelectionStatus.DISABLED_BY_WIFI_MANAGER);
dismissDialogAndNotification();
clearInternalData();
if (disconnectRequired) clearNativeData();
if (null != mCallbacks) mCallbacks.onReject(ssid, disconnectRequired);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleReject
File: service/java/com/android/server/wifi/InsecureEapNetworkHandler.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
handleReject
|
service/java/com/android/server/wifi/InsecureEapNetworkHandler.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
public static CharSink asCharSink(File file, Charset charset, FileWriteMode... modes) {
return asByteSink(file, modes).asCharSink(charset);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: asCharSink
File: guava/src/com/google/common/io/Files.java
Repository: google/guava
The code follows secure coding practices.
|
[
"CWE-552"
] |
CVE-2023-2976
|
HIGH
| 7.1
|
google/guava
|
asCharSink
|
guava/src/com/google/common/io/Files.java
|
feb83a1c8fd2e7670b244d5afd23cba5aca43284
| 0
|
Analyze the following code function for security vulnerabilities
|
private Set<EntityReference> getUniqueLinkedEntityReferences(XWikiContext context,
Map<EntityType, Set<ResourceType>> entityTypes)
{
Set<EntityReference> references;
XWikiDocument contextDoc = context.getDoc();
WikiReference contextWikiReference = context.getWikiReference();
try {
// Make sure the right document is used as context document
context.setDoc(this);
// Make sure the right wiki is used as context document
context.setWikiReference(getDocumentReference().getWikiReference());
if (is10Syntax()) {
references = (Set) getUniqueLinkedPages10(context);
} else {
references = new LinkedHashSet<>();
// Document content
XDOM dom = getXDOM();
getUniqueLinkedEntityReferences(dom, entityTypes, references);
// XObjects
for (List<BaseObject> xobjects : getXObjects().values()) {
xobjects.stream()
.forEach(xobject -> getUniqueLinkedEntityReferences(xobject, entityTypes, references, context));
}
}
} finally {
context.setDoc(contextDoc);
context.setWikiReference(contextWikiReference);
}
return references;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUniqueLinkedEntityReferences
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
|
getUniqueLinkedEntityReferences
|
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
|
protected ResultSetMetaData createMetaData() throws SQLException {
return new PgResultSetMetaData(connection, fields);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createMetaData
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
|
createMetaData
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
private @Nullable WifiConfiguration getInternalConfiguredNetworkByUpgradableType(
@NonNull WifiConfiguration config) {
WifiConfiguration internalConfig = null;
int securityType = config.getDefaultSecurityParams().getSecurityType();
WifiConfiguration possibleExistingConfig = new WifiConfiguration(config);
switch (securityType) {
case WifiConfiguration.SECURITY_TYPE_PSK:
possibleExistingConfig.setSecurityParams(WifiConfiguration.SECURITY_TYPE_SAE);
break;
case WifiConfiguration.SECURITY_TYPE_SAE:
possibleExistingConfig.setSecurityParams(WifiConfiguration.SECURITY_TYPE_PSK);
break;
case WifiConfiguration.SECURITY_TYPE_EAP:
possibleExistingConfig.setSecurityParams(
WifiConfiguration.SECURITY_TYPE_EAP_WPA3_ENTERPRISE);
break;
case WifiConfiguration.SECURITY_TYPE_EAP_WPA3_ENTERPRISE:
possibleExistingConfig.setSecurityParams(
WifiConfiguration.SECURITY_TYPE_EAP);
break;
case WifiConfiguration.SECURITY_TYPE_OPEN:
possibleExistingConfig.setSecurityParams(WifiConfiguration.SECURITY_TYPE_OWE);
break;
case WifiConfiguration.SECURITY_TYPE_OWE:
possibleExistingConfig.setSecurityParams(WifiConfiguration.SECURITY_TYPE_OPEN);
break;
default:
return null;
}
internalConfig = mConfiguredNetworks.getByConfigKeyForCurrentUser(
possibleExistingConfig.getProfileKey());
return internalConfig;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInternalConfiguredNetworkByUpgradableType
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
|
getInternalConfiguredNetworkByUpgradableType
|
service/java/com/android/server/wifi/WifiConfigManager.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<List<ObjectDiff>> getClassDiff(Document origdoc, Document newdoc)
{
try {
if ((origdoc == null) && (newdoc == null)) {
return Collections.emptyList();
}
if (origdoc == null) {
return this.doc.getClassDiff(new XWikiDocument(newdoc.getDocumentReference()), newdoc.doc,
getXWikiContext());
}
if (newdoc == null) {
return this.doc.getClassDiff(origdoc.doc, new XWikiDocument(origdoc.getDocumentReference()),
getXWikiContext());
}
return this.doc.getClassDiff(origdoc.doc, newdoc.doc, getXWikiContext());
} catch (Exception e) {
java.lang.Object[] args = { origdoc.getFullName(), origdoc.getVersion(), newdoc.getVersion() };
List list = new ArrayList();
XWikiException xe =
new XWikiException(XWikiException.MODULE_XWIKI_DIFF, XWikiException.ERROR_XWIKI_DIFF_CLASS_ERROR,
"Error while making class diff of {0} between version {1} and version {2}", e, args);
String errormsg = Util.getHTMLExceptionMessage(xe, getXWikiContext());
list.add(errormsg);
return list;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getClassDiff
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
|
getClassDiff
|
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 RMQSession getSession() {
return this.session;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSession
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
|
getSession
|
src/main/java/com/rabbitmq/jms/client/RMQMessage.java
|
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
| 0
|
Analyze the following code function for security vulnerabilities
|
public Number optNumber(String key, Number defaultValue) {
Object val = this.opt(key);
if (NULL.equals(val)) {
return defaultValue;
}
if (val instanceof Number){
return (Number) val;
}
try {
return stringToNumber(val.toString());
} catch (Exception e) {
return defaultValue;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: optNumber
File: src/main/java/org/json/JSONObject.java
Repository: stleary/JSON-java
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2023-5072
|
HIGH
| 7.5
|
stleary/JSON-java
|
optNumber
|
src/main/java/org/json/JSONObject.java
|
661114c50dcfd53bb041aab66f14bb91e0a87c8a
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean isCorrectConfirmationMethod(SubjectConfirmation sc) {
if (sc == null) {
return false;
}
Set cmSet = sc.getConfirmationMethod();
if ((cmSet == null) || (cmSet.size() != 1)) {
if (SAMLUtils.debug.messageEnabled()) {
SAMLUtils.debug.message("SAMLUtils.isCorrectConfirmationMethod:"
+ " missing ConfirmationMethod in the Subject.");
}
return false;
}
String conMethod = (String) cmSet.iterator().next();
if ((conMethod == null) ||
(!conMethod.equals(SAMLConstants.CONFIRMATION_METHOD_IS))) {
if (SAMLUtils.debug.messageEnabled()) {
SAMLUtils.debug.message("SAMLUtils.isCorrectConfirmationMethod:"
+ " wrong ConfirmationMethod value.");
}
return false;
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isCorrectConfirmationMethod
File: openam-federation/openam-federation-library/src/main/java/com/sun/identity/saml/common/SAMLUtils.java
Repository: OpenIdentityPlatform/OpenAM
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2023-37471
|
CRITICAL
| 9.8
|
OpenIdentityPlatform/OpenAM
|
isCorrectConfirmationMethod
|
openam-federation/openam-federation-library/src/main/java/com/sun/identity/saml/common/SAMLUtils.java
|
7c18543d126e8a567b83bb4535631825aaa9d742
| 0
|
Analyze the following code function for security vulnerabilities
|
public int engineDoFinal(
byte[] input,
int inputOffset,
int inputLength,
byte[] output,
int outputOffset)
throws ShortBufferException, IllegalBlockSizeException, BadPaddingException
{
byte[] buf = engineDoFinal(input, inputOffset, inputLength);
System.arraycopy(buf, 0, output, outputOffset, buf.length);
return buf.length;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: engineDoFinal
File: prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dh/IESCipher.java
Repository: bcgit/bc-java
The code follows secure coding practices.
|
[
"CWE-361"
] |
CVE-2016-1000345
|
MEDIUM
| 4.3
|
bcgit/bc-java
|
engineDoFinal
|
prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dh/IESCipher.java
|
21dcb3d9744c83dcf2ff8fcee06dbca7bfa4ef35
| 0
|
Analyze the following code function for security vulnerabilities
|
private native void nativeFlingStart(
long nativeContentViewCoreImpl, long timeMs, float x, float y, float vx, float vy);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nativeFlingStart
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
|
nativeFlingStart
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
private static Object handleWatchFailure(Throwable thrown) {
if (Throwables.getRootCause(thrown) instanceof CancellationException) {
// timeout happens
return HttpResponse.of(HttpStatus.NOT_MODIFIED);
}
return Exceptions.throwUnsafely(thrown);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleWatchFailure
File: server/src/main/java/com/linecorp/centraldogma/server/internal/api/ContentServiceV1.java
Repository: line/centraldogma
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2021-38388
|
MEDIUM
| 6.5
|
line/centraldogma
|
handleWatchFailure
|
server/src/main/java/com/linecorp/centraldogma/server/internal/api/ContentServiceV1.java
|
6a395aed73f0b009cf8174a3ebf3ed826521c11d
| 0
|
Analyze the following code function for security vulnerabilities
|
protected abstract User getUser();
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUser
File: server-core/src/main/java/io/onedev/server/web/component/user/twofactorauthentication/TwoFactorAuthenticationSetupPanel.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-338"
] |
CVE-2023-24828
|
HIGH
| 8.8
|
theonedev/onedev
|
getUser
|
server-core/src/main/java/io/onedev/server/web/component/user/twofactorauthentication/TwoFactorAuthenticationSetupPanel.java
|
d67dd9686897fe5e4ab881d749464aa7c06a68e5
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
static TreeTraverser<File> fileTreeTraverser() {
return FILE_TREE_TRAVERSER;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fileTreeTraverser
File: guava/src/com/google/common/io/Files.java
Repository: google/guava
The code follows secure coding practices.
|
[
"CWE-732"
] |
CVE-2020-8908
|
LOW
| 2.1
|
google/guava
|
fileTreeTraverser
|
guava/src/com/google/common/io/Files.java
|
fec0dbc4634006a6162cfd4d0d09c962073ddf40
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getLikeToConditionSQL(String column, Object param) {
String paramStr = getParameterSQL(param);
return column + " LIKE " + paramStr;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLikeToConditionSQL
File: dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java
Repository: dashbuilder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-4999
|
HIGH
| 7.5
|
dashbuilder
|
getLikeToConditionSQL
|
dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java
|
8574899e3b6455547b534f570b2330ff772e524b
| 0
|
Analyze the following code function for security vulnerabilities
|
private void addError(Issue msg, Object... parameters) {
mErrors.add(new IssueWithParams(msg, parameters));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addError
File: src/main/java/com/android/apksig/ApkVerifier.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21253
|
MEDIUM
| 5.5
|
android
|
addError
|
src/main/java/com/android/apksig/ApkVerifier.java
|
039f815895f62c9f8af23df66622b66246f3f61e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void notifyCleartextNetwork(int uid, byte[] firstPacket) {
mHandler.obtainMessage(NOTIFY_CLEARTEXT_NETWORK_MSG, uid, 0, firstPacket).sendToTarget();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: notifyCleartextNetwork
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
|
notifyCleartextNetwork
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getHeaderRowCount() {
return header.getRowCount();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getHeaderRowCount
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
|
getHeaderRowCount
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void main(String[] args) {
int exitCode = EXIT_FAILURE; // failure by default
// Validate command line arguments
if (args.length < 2 || args.length > 4) {
System.err.println("LaunchSupport expected 2 to 4 arguments but got " + args.length);
System.exit(exitCode);
}
// Parse command line arguments
String installDirPath = args[0];
String mode = args[1];
boolean ask = false;
boolean save = false;
for (int i = 2; i < args.length; i++) {
if (args[i].equals("-ask")) {
ask = true;
}
else if (args[i].equals("-save")) {
save = true;
}
else {
System.err.println("LaunchSupport received illegal argument: " + args[i]);
System.exit(exitCode);
}
}
try {
File installDir = new File(installDirPath).getCanonicalFile(); // change relative path to absolute
JavaConfig javaConfig = new JavaConfig(installDir);
JavaFinder javaFinder = JavaFinder.create();
// Pass control to a mode-specific handler
switch (mode.toLowerCase()) {
case "-java_home":
exitCode = handleJavaHome(javaConfig, javaFinder, JavaFilter.ANY, ask, save);
break;
case "-jdk_home":
exitCode =
handleJavaHome(javaConfig, javaFinder, JavaFilter.JDK_ONLY, ask, save);
break;
case "-vmargs":
exitCode = handleVmArgs(javaConfig);
break;
default:
System.err.println("LaunchSupport received illegal argument: " + mode);
break;
}
}
catch (Exception e) {
System.err.println(e.getMessage());
}
System.exit(exitCode);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: main
File: GhidraBuild/LaunchSupport/src/main/java/LaunchSupport.java
Repository: NationalSecurityAgency/ghidra
The code follows secure coding practices.
|
[
"CWE-77"
] |
CVE-2023-22671
|
CRITICAL
| 9.8
|
NationalSecurityAgency/ghidra
|
main
|
GhidraBuild/LaunchSupport/src/main/java/LaunchSupport.java
|
1640b544c3d99b5ce8a89d9ca4b540da22be3a0e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setCommonName(String commonName) {
this.commonName = commonName;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setCommonName
File: base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
setCommonName
|
base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
void setLockTaskModeLocked(TaskRecord task, int lockTaskModeState, String reason,
boolean andResume) {
if (task == null) {
// Take out of lock task mode if necessary
final TaskRecord lockedTask = getLockedTaskLocked();
if (lockedTask != null) {
removeLockedTaskLocked(lockedTask);
if (!mLockTaskModeTasks.isEmpty()) {
// There are locked tasks remaining, can only finish this task, not unlock it.
if (DEBUG_LOCKTASK) Slog.w(TAG_LOCKTASK,
"setLockTaskModeLocked: Tasks remaining, can't unlock");
lockedTask.performClearTaskLocked();
resumeTopActivitiesLocked();
return;
}
}
if (DEBUG_LOCKTASK) Slog.w(TAG_LOCKTASK,
"setLockTaskModeLocked: No tasks to unlock. Callers=" + Debug.getCallers(4));
return;
}
// Should have already been checked, but do it again.
if (task.mLockTaskAuth == LOCK_TASK_AUTH_DONT_LOCK) {
if (DEBUG_LOCKTASK) Slog.w(TAG_LOCKTASK,
"setLockTaskModeLocked: Can't lock due to auth");
return;
}
if (isLockTaskModeViolation(task)) {
Slog.e(TAG_LOCKTASK, "setLockTaskMode: Attempt to start an unauthorized lock task.");
return;
}
if (mLockTaskModeTasks.isEmpty()) {
// First locktask.
final Message lockTaskMsg = Message.obtain();
lockTaskMsg.obj = task.intent.getComponent().getPackageName();
lockTaskMsg.arg1 = task.userId;
lockTaskMsg.what = LOCK_TASK_START_MSG;
lockTaskMsg.arg2 = lockTaskModeState;
mHandler.sendMessage(lockTaskMsg);
}
// Add it or move it to the top.
if (DEBUG_LOCKTASK) Slog.w(TAG_LOCKTASK, "setLockTaskModeLocked: Locking to " + task +
" Callers=" + Debug.getCallers(4));
mLockTaskModeTasks.remove(task);
mLockTaskModeTasks.add(task);
if (task.mLockTaskUid == -1) {
task.mLockTaskUid = task.effectiveUid;
}
if (andResume) {
findTaskToMoveToFrontLocked(task, 0, null, reason);
resumeTopActivitiesLocked();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setLockTaskModeLocked
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
|
setLockTaskModeLocked
|
services/core/java/com/android/server/am/ActivityStackSupervisor.java
|
468651c86a8adb7aa56c708d2348e99022088af3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Column(name = "user_id", nullable = false)
public long getUserId() {
return this.userId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserId
File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/log/LogUpload.java
Repository: sanluan/PublicCMS
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-21333
|
LOW
| 3.5
|
sanluan/PublicCMS
|
getUserId
|
publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/log/LogUpload.java
|
b4d5956e65b14347b162424abb197a180229b3db
| 0
|
Analyze the following code function for security vulnerabilities
|
private void verifyUnlockLocked() {
if (DEBUG) Log.d(TAG, "verifyUnlockLocked");
mHandler.sendEmptyMessage(VERIFY_UNLOCK);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: verifyUnlockLocked
File: packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21267
|
MEDIUM
| 5.5
|
android
|
verifyUnlockLocked
|
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
|
d18d8b350756b0e89e051736c1f28744ed31e93a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setEmail(String email) {
this.eMail = email;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setEmail
File: base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
setEmail
|
base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void setMemory(byte[] dst, int dstIndex, long bytes, byte value) {
PlatformDependent0.setMemory(dst, BYTE_ARRAY_BASE_OFFSET + dstIndex, bytes, value);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setMemory
File: common/src/main/java/io/netty/util/internal/PlatformDependent.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-668",
"CWE-378",
"CWE-379"
] |
CVE-2022-24823
|
LOW
| 1.9
|
netty
|
setMemory
|
common/src/main/java/io/netty/util/internal/PlatformDependent.java
|
185f8b2756a36aaa4f973f1a2a025e7d981823f1
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String vsm(String pipelineName, int pipelineCounter) {
return StrSubstitutor.replace("/pipelines/value_stream_map/${pipeline_name}/${pipeline_counter}",
of("pipeline_name", pipelineName, "pipeline_counter", pipelineCounter));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: vsm
File: spark/spark-base/src/main/java/com/thoughtworks/go/spark/Routes.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-697"
] |
CVE-2022-39308
|
MEDIUM
| 5.9
|
gocd
|
vsm
|
spark/spark-base/src/main/java/com/thoughtworks/go/spark/Routes.java
|
236d4baf92e6607f2841c151c855adcc477238b8
| 0
|
Analyze the following code function for security vulnerabilities
|
public LogicalCondition getLogicalCondition() {
return logicalCondition;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLogicalCondition
File: src/main/java/org/torpedoquery/jpa/internal/conditions/ConditionBuilder.java
Repository: xjodoin/torpedoquery
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2019-11343
|
HIGH
| 7.5
|
xjodoin/torpedoquery
|
getLogicalCondition
|
src/main/java/org/torpedoquery/jpa/internal/conditions/ConditionBuilder.java
|
3c20b874fba9cc2a78b9ace10208de1602b56c3f
| 0
|
Analyze the following code function for security vulnerabilities
|
static String[] splitString(String str, char sep) {
int count = 1;
int i = 0;
while ((i=str.indexOf(sep, i)) >= 0) {
count++;
i++;
}
String[] res = new String[count];
i=0;
count = 0;
int lastI=0;
while ((i=str.indexOf(sep, i)) >= 0) {
res[count] = str.substring(lastI, i);
count++;
i++;
lastI = i;
}
res[count] = str.substring(lastI, str.length());
return res;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: splitString
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
|
splitString
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
private void readStatusLocked() {
if (Log.isLoggable(TAG_FILE, Log.VERBOSE)) {
Log.v(TAG_FILE, "Reading " + mStatusFile.getBaseFile());
}
try {
byte[] data = mStatusFile.readFully();
Parcel in = Parcel.obtain();
in.unmarshall(data, 0, data.length);
in.setDataPosition(0);
int token;
while ((token=in.readInt()) != STATUS_FILE_END) {
if (token == STATUS_FILE_ITEM) {
SyncStatusInfo status = new SyncStatusInfo(in);
if (mAuthorities.indexOfKey(status.authorityId) >= 0) {
status.pending = false;
if (Log.isLoggable(TAG_FILE, Log.VERBOSE)) {
Log.v(TAG_FILE, "Adding status for id " + status.authorityId);
}
mSyncStatus.put(status.authorityId, status);
}
} else {
// Ooops.
Log.w(TAG, "Unknown status token: " + token);
break;
}
}
} catch (java.io.IOException e) {
Log.i(TAG, "No initial status");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readStatusLocked
File: services/core/java/com/android/server/content/SyncStorageEngine.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2016-2424
|
HIGH
| 7.1
|
android
|
readStatusLocked
|
services/core/java/com/android/server/content/SyncStorageEngine.java
|
d3383d5bfab296ba3adbc121ff8a7b542bde4afb
| 0
|
Analyze the following code function for security vulnerabilities
|
public ArtemisSecurityConfigurationBuilder configureFromContext(TestContext context) {
testClass = Objects.requireNonNull(context.testClass());
testMethod = Objects.requireNonNull(context.testMethod());
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: configureFromContext
File: src/main/java/de/tum/in/test/api/security/ArtemisSecurityConfigurationBuilder.java
Repository: ls1intum/Ares
The code follows secure coding practices.
|
[
"CWE-501",
"CWE-653"
] |
CVE-2024-23682
|
HIGH
| 8.2
|
ls1intum/Ares
|
configureFromContext
|
src/main/java/de/tum/in/test/api/security/ArtemisSecurityConfigurationBuilder.java
|
4c146ff85a0fa6022087fb0cffa6b8021d51101f
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String sanitizeDbColumnName(String dirty) {
return ILLEGAL_IN_COLUMN_NAME_PATTERN.matcher(dirty).replaceAll("");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sanitizeDbColumnName
File: core/lib/src/main/java/org/opennms/core/utils/WebSecurityUtils.java
Repository: OpenNMS/opennms
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2016-6555
|
MEDIUM
| 4.3
|
OpenNMS/opennms
|
sanitizeDbColumnName
|
core/lib/src/main/java/org/opennms/core/utils/WebSecurityUtils.java
|
29007e7aeeb792aa73d45fafb16ae9ef19e78a18
| 0
|
Analyze the following code function for security vulnerabilities
|
protected final void _verifyNullForPrimitive(DeserializationContext ctxt) throws JsonMappingException
{
if (ctxt.isEnabled(DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES)) {
ctxt.reportInputMismatch(this,
"Cannot coerce `null` to %s (disable `DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES` to allow)",
_coercedTypeDesc());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _verifyNullForPrimitive
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
|
_verifyNullForPrimitive
|
src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java
|
d78d00ee7b5245b93103fef3187f70543d67ca33
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getDeviceOwnerName() {
if (!mHasFeature) {
return null;
}
Preconditions.checkCallAuthorization(canManageUsers(getCallerIdentity())
|| hasCallingOrSelfPermission(MANAGE_PROFILE_AND_DEVICE_OWNERS));
synchronized (getLockObject()) {
if (!mOwners.hasDeviceOwner()) {
return null;
}
// TODO This totally ignores the name passed to setDeviceOwner (change for b/20679292)
// Should setDeviceOwner/ProfileOwner still take a name?
String deviceOwnerPackage = mOwners.getDeviceOwnerPackageName();
return getApplicationLabel(deviceOwnerPackage, UserHandle.USER_SYSTEM);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDeviceOwnerName
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
|
getDeviceOwnerName
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
final void runInBackgroundDisabled(int uid) {
synchronized (this) {
UidRecord uidRec = mProcessList.getUidRecordLOSP(uid);
if (uidRec != null) {
// This uid is actually running... should it be considered background now?
if (uidRec.isIdle()) {
doStopUidLocked(uidRec.getUid(), uidRec);
}
} else {
// This uid isn't actually running... still send a report about it being "stopped".
doStopUidLocked(uid, null);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: runInBackgroundDisabled
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21292
|
MEDIUM
| 5.5
|
android
|
runInBackgroundDisabled
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
protected Object getApp() {
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getApp
File: Ports/Android/src/com/codename1/impl/android/CodenameOneActivity.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
getApp
|
Ports/Android/src/com/codename1/impl/android/CodenameOneActivity.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getConfigString(String key) {
return getConfig(key);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getConfigString
File: src/main/java/com/jflyfox/modules/filemanager/FileManager.java
Repository: jflyfox/jfinal_cms
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2021-37262
|
MEDIUM
| 5
|
jflyfox/jfinal_cms
|
getConfigString
|
src/main/java/com/jflyfox/modules/filemanager/FileManager.java
|
e7fd0fe9362464c4d2bd308318eecc89a847b116
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean isFunction()
{
return type.equals("function");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isFunction
File: app/src/main/java/com/mkulesh/micromath/io/ImportFromSMathStudio.java
Repository: mkulesh/microMathematics
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000821
|
HIGH
| 7.5
|
mkulesh/microMathematics
|
isFunction
|
app/src/main/java/com/mkulesh/micromath/io/ImportFromSMathStudio.java
|
5c05ac8de16c569ff0a1816f20be235090d3dd9d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setRequiredPasswordComplexity(
String callerPackageName, int passwordComplexity, boolean calledOnParent) {
if (!mHasFeature) {
return;
}
final Set<Integer> allowedModes = Set.of(PASSWORD_COMPLEXITY_NONE, PASSWORD_COMPLEXITY_LOW,
PASSWORD_COMPLEXITY_MEDIUM, PASSWORD_COMPLEXITY_HIGH);
Preconditions.checkArgument(allowedModes.contains(passwordComplexity),
"Provided complexity is not one of the allowed values.");
CallerIdentity caller = getCallerIdentity(callerPackageName);
if (!isPermissionCheckFlagEnabled()) {
Preconditions.checkCallAuthorization(
isDefaultDeviceOwner(caller) || isProfileOwner(caller));
Preconditions.checkArgument(!calledOnParent || isProfileOwner(caller));
}
synchronized (getLockObject()) {
ActiveAdmin admin;
if (isPermissionCheckFlagEnabled()) {
// TODO: Make sure this returns the parent of the fake admin
// TODO: Deal with null componentname
int affectedUser = calledOnParent
? getProfileParentId(caller.getUserId()) : caller.getUserId();
admin = enforcePermissionAndGetEnforcingAdmin(
null, MANAGE_DEVICE_POLICY_LOCK_CREDENTIALS,
caller.getPackageName(), affectedUser).getActiveAdmin();
} else {
admin = getParentOfAdminIfRequired(
getProfileOwnerOrDeviceOwnerLocked(caller.getUserId()), calledOnParent);
}
if (admin.mPasswordComplexity != passwordComplexity) {
// We require the caller to explicitly clear any password quality requirements set
// on the parent DPM instance, to avoid the case where password requirements are
// specified in the form of quality on the parent but complexity on the profile
// itself.
if (!calledOnParent) {
final boolean hasQualityRequirementsOnParent = admin.hasParentActiveAdmin()
&& admin.getParentActiveAdmin().mPasswordPolicy.quality
!= PASSWORD_QUALITY_UNSPECIFIED;
Preconditions.checkState(!hasQualityRequirementsOnParent,
"Password quality is set on the parent when attempting to set password"
+ "complexity. Clear the quality by setting the password quality "
+ "on the parent to PASSWORD_QUALITY_UNSPECIFIED first");
}
mInjector.binderWithCleanCallingIdentity(() -> {
admin.mPasswordComplexity = passwordComplexity;
// Reset the password policy.
admin.mPasswordPolicy = new PasswordPolicy();
updatePasswordValidityCheckpointLocked(caller.getUserId(), calledOnParent);
updatePasswordQualityCacheForUserGroup(caller.getUserId());
saveSettingsLocked(caller.getUserId());
});
//TODO(b/276855301): caller.getPackageName() will be null when the coexistence flags are
// turned off. Change back to caller.getPackageName once this API is unflagged.
DevicePolicyEventLogger
.createEvent(DevicePolicyEnums.SET_PASSWORD_COMPLEXITY)
.setAdmin(admin.info.getPackageName())
.setInt(passwordComplexity)
.setBoolean(calledOnParent)
.write();
}
logPasswordComplexityRequiredIfSecurityLogEnabled(caller.getPackageName(),
caller.getUserId(), calledOnParent, passwordComplexity);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setRequiredPasswordComplexity
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
|
setRequiredPasswordComplexity
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
private void reportShortcutUsedInternal(String packageName, String shortcutId, int userId) {
final long token = injectClearCallingIdentity();
try {
mUsageStatsManagerInternal.reportShortcutUsage(packageName, shortcutId, userId);
} finally {
injectRestoreCallingIdentity(token);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: reportShortcutUsedInternal
File: services/core/java/com/android/server/pm/ShortcutService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40079
|
HIGH
| 7.8
|
android
|
reportShortcutUsedInternal
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
private void readHeaders(final long fileLength) throws IOException, RarException {
this.markHead = null;
this.newMhd = null;
this.headers.clear();
this.currentHeaderIndex = 0;
int toRead = 0;
//keep track of positions already processed for
//more robustness against corrupt files
final Set<Long> processedPositions = new HashSet<>();
while (true) {
int size = 0;
long newpos = 0;
RawDataIo rawData = new RawDataIo(channel);
final byte[] baseBlockBuffer = safelyAllocate(BaseBlock.BaseBlockSize, MAX_HEADER_SIZE);
// if header is encrypted,there is a 8-byte salt before each header
if (newMhd != null && newMhd.isEncrypted()) {
byte[] salt = new byte[8];
rawData.readFully(salt, 8);
try {
Cipher cipher = Rijndael.buildDecipherer(password, salt);
rawData.setCipher(cipher);
} catch (Exception e) {
throw new InitDeciphererFailedException(e);
}
}
final long position = this.channel.getPosition();
// Weird, but is trying to read beyond the end of the file
if (position >= fileLength) {
break;
}
// logger.info("\n--------reading header--------");
size = rawData.readFully(baseBlockBuffer, baseBlockBuffer.length);
if (size == 0) {
break;
}
final BaseBlock block = new BaseBlock(baseBlockBuffer);
block.setPositionInFile(position);
UnrarHeadertype headerType = block.getHeaderType();
if (headerType == null) {
logger.warn("unknown block header!");
throw new CorruptHeaderException();
}
switch (headerType) {
case MarkHeader:
this.markHead = new MarkHeader(block);
if (!this.markHead.isSignature()) {
if (markHead.getVersion() == RARVersion.V5) {
logger.warn("Support for rar version 5 is not yet implemented!");
throw new UnsupportedRarV5Exception();
} else {
throw new BadRarArchiveException();
}
}
this.headers.add(this.markHead);
// markHead.print();
break;
case MainHeader:
toRead = block.hasEncryptVersion() ? MainHeader.mainHeaderSizeWithEnc
: MainHeader.mainHeaderSize;
final byte[] mainbuff = safelyAllocate(toRead, MAX_HEADER_SIZE);
rawData.readFully(mainbuff, mainbuff.length);
final MainHeader mainhead = new MainHeader(block, mainbuff);
this.headers.add(mainhead);
this.newMhd = mainhead;
break;
case SignHeader:
toRead = SignHeader.signHeaderSize;
final byte[] signBuff = safelyAllocate(toRead, MAX_HEADER_SIZE);
rawData.readFully(signBuff, signBuff.length);
final SignHeader signHead = new SignHeader(block, signBuff);
this.headers.add(signHead);
break;
case AvHeader:
toRead = AVHeader.avHeaderSize;
final byte[] avBuff = safelyAllocate(toRead, MAX_HEADER_SIZE);
rawData.readFully(avBuff, avBuff.length);
final AVHeader avHead = new AVHeader(block, avBuff);
this.headers.add(avHead);
break;
case CommHeader:
toRead = CommentHeader.commentHeaderSize;
final byte[] commBuff = safelyAllocate(toRead, MAX_HEADER_SIZE);
rawData.readFully(commBuff, commBuff.length);
final CommentHeader commHead = new CommentHeader(block, commBuff);
this.headers.add(commHead);
newpos = commHead.getPositionInFile() + commHead.getHeaderSize(isEncrypted());
this.channel.setPosition(newpos);
if (processedPositions.contains(newpos)) {
throw new BadRarArchiveException();
}
processedPositions.add(newpos);
break;
case EndArcHeader:
toRead = 0;
if (block.hasArchiveDataCRC()) {
toRead += EndArcHeader.endArcArchiveDataCrcSize;
}
if (block.hasVolumeNumber()) {
toRead += EndArcHeader.endArcVolumeNumberSize;
}
EndArcHeader endArcHead;
if (toRead > 0) {
final byte[] endArchBuff = safelyAllocate(toRead, MAX_HEADER_SIZE);
rawData.readFully(endArchBuff, endArchBuff.length);
endArcHead = new EndArcHeader(block, endArchBuff);
} else {
endArcHead = new EndArcHeader(block, null);
}
this.headers.add(endArcHead);
return;
default:
final byte[] blockHeaderBuffer = safelyAllocate(BlockHeader.blockHeaderSize, MAX_HEADER_SIZE);
rawData.readFully(blockHeaderBuffer, blockHeaderBuffer.length);
final BlockHeader blockHead = new BlockHeader(block,
blockHeaderBuffer);
switch (blockHead.getHeaderType()) {
case NewSubHeader:
case FileHeader:
toRead = blockHead.getHeaderSize(false)
- BlockHeader.BaseBlockSize
- BlockHeader.blockHeaderSize;
final byte[] fileHeaderBuffer = safelyAllocate(toRead, MAX_HEADER_SIZE);
rawData.readFully(fileHeaderBuffer, fileHeaderBuffer.length);
final FileHeader fh = new FileHeader(blockHead, fileHeaderBuffer);
this.headers.add(fh);
newpos = fh.getPositionInFile() + fh.getHeaderSize(isEncrypted()) + fh.getFullPackSize();
this.channel.setPosition(newpos);
if (processedPositions.contains(newpos)) {
throw new BadRarArchiveException();
}
processedPositions.add(newpos);
break;
case ProtectHeader:
toRead = blockHead.getHeaderSize(false)
- BlockHeader.BaseBlockSize
- BlockHeader.blockHeaderSize;
final byte[] protectHeaderBuffer = safelyAllocate(toRead, MAX_HEADER_SIZE);
rawData.readFully(protectHeaderBuffer, protectHeaderBuffer.length);
final ProtectHeader ph = new ProtectHeader(blockHead, protectHeaderBuffer);
newpos = ph.getPositionInFile() + ph.getHeaderSize(isEncrypted()) + ph.getDataSize();
this.channel.setPosition(newpos);
if (processedPositions.contains(newpos)) {
throw new BadRarArchiveException();
}
processedPositions.add(newpos);
break;
case SubHeader: {
final byte[] subHeadbuffer = safelyAllocate(SubBlockHeader.SubBlockHeaderSize, MAX_HEADER_SIZE);
rawData.readFully(subHeadbuffer, subHeadbuffer.length);
final SubBlockHeader subHead = new SubBlockHeader(blockHead,
subHeadbuffer);
subHead.print();
switch (subHead.getSubType()) {
case MAC_HEAD: {
final byte[] macHeaderbuffer = safelyAllocate(MacInfoHeader.MacInfoHeaderSize, MAX_HEADER_SIZE);
rawData.readFully(macHeaderbuffer, macHeaderbuffer.length);
final MacInfoHeader macHeader = new MacInfoHeader(subHead,
macHeaderbuffer);
macHeader.print();
this.headers.add(macHeader);
break;
}
// TODO implement other subheaders
case BEEA_HEAD:
break;
case EA_HEAD: {
final byte[] eaHeaderBuffer = safelyAllocate(EAHeader.EAHeaderSize, MAX_HEADER_SIZE);
rawData.readFully(eaHeaderBuffer, eaHeaderBuffer.length);
final EAHeader eaHeader = new EAHeader(subHead,
eaHeaderBuffer);
eaHeader.print();
this.headers.add(eaHeader);
break;
}
case NTACL_HEAD:
break;
case STREAM_HEAD:
break;
case UO_HEAD:
toRead = subHead.getHeaderSize(false);
toRead -= BaseBlock.BaseBlockSize;
toRead -= BlockHeader.blockHeaderSize;
toRead -= SubBlockHeader.SubBlockHeaderSize;
final byte[] uoHeaderBuffer = safelyAllocate(toRead, MAX_HEADER_SIZE);
rawData.readFully(uoHeaderBuffer, uoHeaderBuffer.length);
final UnixOwnersHeader uoHeader = new UnixOwnersHeader(
subHead, uoHeaderBuffer);
uoHeader.print();
this.headers.add(uoHeader);
break;
default:
break;
}
break;
}
default:
logger.warn("Unknown Header");
throw new NotRarArchiveException();
}
}
// logger.info("\n--------end header--------");
}
}
|
Vulnerability Classification:
- CWE: CWE-835
- CVE: CVE-2022-23596
- Severity: MEDIUM
- CVSS Score: 5.0
Description: fix: invalid subheader type would throw npe and make the extract loop
closes #73
Function: readHeaders
File: src/main/java/com/github/junrar/Archive.java
Repository: junrar
Fixed Code:
private void readHeaders(final long fileLength) throws IOException, RarException {
this.markHead = null;
this.newMhd = null;
this.headers.clear();
this.currentHeaderIndex = 0;
int toRead = 0;
//keep track of positions already processed for
//more robustness against corrupt files
final Set<Long> processedPositions = new HashSet<>();
while (true) {
int size = 0;
long newpos = 0;
RawDataIo rawData = new RawDataIo(channel);
final byte[] baseBlockBuffer = safelyAllocate(BaseBlock.BaseBlockSize, MAX_HEADER_SIZE);
// if header is encrypted,there is a 8-byte salt before each header
if (newMhd != null && newMhd.isEncrypted()) {
byte[] salt = new byte[8];
rawData.readFully(salt, 8);
try {
Cipher cipher = Rijndael.buildDecipherer(password, salt);
rawData.setCipher(cipher);
} catch (Exception e) {
throw new InitDeciphererFailedException(e);
}
}
final long position = this.channel.getPosition();
// Weird, but is trying to read beyond the end of the file
if (position >= fileLength) {
break;
}
// logger.info("\n--------reading header--------");
size = rawData.readFully(baseBlockBuffer, baseBlockBuffer.length);
if (size == 0) {
break;
}
final BaseBlock block = new BaseBlock(baseBlockBuffer);
block.setPositionInFile(position);
UnrarHeadertype headerType = block.getHeaderType();
if (headerType == null) {
logger.warn("unknown block header!");
throw new CorruptHeaderException();
}
switch (headerType) {
case MarkHeader:
this.markHead = new MarkHeader(block);
if (!this.markHead.isSignature()) {
if (markHead.getVersion() == RARVersion.V5) {
logger.warn("Support for rar version 5 is not yet implemented!");
throw new UnsupportedRarV5Exception();
} else {
throw new BadRarArchiveException();
}
}
this.headers.add(this.markHead);
// markHead.print();
break;
case MainHeader:
toRead = block.hasEncryptVersion() ? MainHeader.mainHeaderSizeWithEnc
: MainHeader.mainHeaderSize;
final byte[] mainbuff = safelyAllocate(toRead, MAX_HEADER_SIZE);
rawData.readFully(mainbuff, mainbuff.length);
final MainHeader mainhead = new MainHeader(block, mainbuff);
this.headers.add(mainhead);
this.newMhd = mainhead;
break;
case SignHeader:
toRead = SignHeader.signHeaderSize;
final byte[] signBuff = safelyAllocate(toRead, MAX_HEADER_SIZE);
rawData.readFully(signBuff, signBuff.length);
final SignHeader signHead = new SignHeader(block, signBuff);
this.headers.add(signHead);
break;
case AvHeader:
toRead = AVHeader.avHeaderSize;
final byte[] avBuff = safelyAllocate(toRead, MAX_HEADER_SIZE);
rawData.readFully(avBuff, avBuff.length);
final AVHeader avHead = new AVHeader(block, avBuff);
this.headers.add(avHead);
break;
case CommHeader:
toRead = CommentHeader.commentHeaderSize;
final byte[] commBuff = safelyAllocate(toRead, MAX_HEADER_SIZE);
rawData.readFully(commBuff, commBuff.length);
final CommentHeader commHead = new CommentHeader(block, commBuff);
this.headers.add(commHead);
newpos = commHead.getPositionInFile() + commHead.getHeaderSize(isEncrypted());
this.channel.setPosition(newpos);
if (processedPositions.contains(newpos)) {
throw new BadRarArchiveException();
}
processedPositions.add(newpos);
break;
case EndArcHeader:
toRead = 0;
if (block.hasArchiveDataCRC()) {
toRead += EndArcHeader.endArcArchiveDataCrcSize;
}
if (block.hasVolumeNumber()) {
toRead += EndArcHeader.endArcVolumeNumberSize;
}
EndArcHeader endArcHead;
if (toRead > 0) {
final byte[] endArchBuff = safelyAllocate(toRead, MAX_HEADER_SIZE);
rawData.readFully(endArchBuff, endArchBuff.length);
endArcHead = new EndArcHeader(block, endArchBuff);
} else {
endArcHead = new EndArcHeader(block, null);
}
this.headers.add(endArcHead);
return;
default:
final byte[] blockHeaderBuffer = safelyAllocate(BlockHeader.blockHeaderSize, MAX_HEADER_SIZE);
rawData.readFully(blockHeaderBuffer, blockHeaderBuffer.length);
final BlockHeader blockHead = new BlockHeader(block,
blockHeaderBuffer);
switch (blockHead.getHeaderType()) {
case NewSubHeader:
case FileHeader:
toRead = blockHead.getHeaderSize(false)
- BlockHeader.BaseBlockSize
- BlockHeader.blockHeaderSize;
final byte[] fileHeaderBuffer = safelyAllocate(toRead, MAX_HEADER_SIZE);
rawData.readFully(fileHeaderBuffer, fileHeaderBuffer.length);
final FileHeader fh = new FileHeader(blockHead, fileHeaderBuffer);
this.headers.add(fh);
newpos = fh.getPositionInFile() + fh.getHeaderSize(isEncrypted()) + fh.getFullPackSize();
this.channel.setPosition(newpos);
if (processedPositions.contains(newpos)) {
throw new BadRarArchiveException();
}
processedPositions.add(newpos);
break;
case ProtectHeader:
toRead = blockHead.getHeaderSize(false)
- BlockHeader.BaseBlockSize
- BlockHeader.blockHeaderSize;
final byte[] protectHeaderBuffer = safelyAllocate(toRead, MAX_HEADER_SIZE);
rawData.readFully(protectHeaderBuffer, protectHeaderBuffer.length);
final ProtectHeader ph = new ProtectHeader(blockHead, protectHeaderBuffer);
newpos = ph.getPositionInFile() + ph.getHeaderSize(isEncrypted()) + ph.getDataSize();
this.channel.setPosition(newpos);
if (processedPositions.contains(newpos)) {
throw new BadRarArchiveException();
}
processedPositions.add(newpos);
break;
case SubHeader: {
final byte[] subHeadbuffer = safelyAllocate(SubBlockHeader.SubBlockHeaderSize, MAX_HEADER_SIZE);
rawData.readFully(subHeadbuffer, subHeadbuffer.length);
final SubBlockHeader subHead = new SubBlockHeader(blockHead,
subHeadbuffer);
subHead.print();
SubBlockHeaderType subType = subHead.getSubType();
if (subType == null) break;
switch (subType) {
case MAC_HEAD: {
final byte[] macHeaderbuffer = safelyAllocate(MacInfoHeader.MacInfoHeaderSize, MAX_HEADER_SIZE);
rawData.readFully(macHeaderbuffer, macHeaderbuffer.length);
final MacInfoHeader macHeader = new MacInfoHeader(subHead,
macHeaderbuffer);
macHeader.print();
this.headers.add(macHeader);
break;
}
// TODO implement other subheaders
case BEEA_HEAD:
break;
case EA_HEAD: {
final byte[] eaHeaderBuffer = safelyAllocate(EAHeader.EAHeaderSize, MAX_HEADER_SIZE);
rawData.readFully(eaHeaderBuffer, eaHeaderBuffer.length);
final EAHeader eaHeader = new EAHeader(subHead,
eaHeaderBuffer);
eaHeader.print();
this.headers.add(eaHeader);
break;
}
case NTACL_HEAD:
break;
case STREAM_HEAD:
break;
case UO_HEAD:
toRead = subHead.getHeaderSize(false);
toRead -= BaseBlock.BaseBlockSize;
toRead -= BlockHeader.blockHeaderSize;
toRead -= SubBlockHeader.SubBlockHeaderSize;
final byte[] uoHeaderBuffer = safelyAllocate(toRead, MAX_HEADER_SIZE);
rawData.readFully(uoHeaderBuffer, uoHeaderBuffer.length);
final UnixOwnersHeader uoHeader = new UnixOwnersHeader(
subHead, uoHeaderBuffer);
uoHeader.print();
this.headers.add(uoHeader);
break;
default:
break;
}
break;
}
default:
logger.warn("Unknown Header");
throw new NotRarArchiveException();
}
}
// logger.info("\n--------end header--------");
}
}
|
[
"CWE-835"
] |
CVE-2022-23596
|
MEDIUM
| 5
|
junrar
|
readHeaders
|
src/main/java/com/github/junrar/Archive.java
|
7b16b3d90b91445fd6af0adfed22c07413d4fab7
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
setFormDescription("send.mail.description");
setFormStyle("o_send_documents");
int emailCols = 25;
String toPage = velocity_root + "/tos.html";
userListBox = FormLayoutContainer.createCustomFormLayout("send.mail.to.auto", getTranslator(), toPage);
userListBox.setLabel("send.mail.to", null);
userListBox.setRootForm(mainForm);
userListBox.contextPut("tos", toValues);
formLayout.add(userListBox);
addEmailLink = uifactory.addFormLink("add.email", userListBox);
addEmailLink.setIconLeftCSS("o_icon o_icon_add");
subjectElement = uifactory.addTextElement("tsubject", "send.mail.subject", 255, "", formLayout);
bodyElement = uifactory.addTextAreaElement("tbody", "send.mail.body", -1, 20, emailCols, false, false, "", formLayout);
if (allowAttachments) {
String page = Util.getPackageVelocityRoot(MailModule.class) + "/sendattachments.html";
attachmentsLayout = FormLayoutContainer.createCustomFormLayout("attachments", getTranslator(), page);
attachmentsLayout.setRootForm(mainForm);
attachmentsLayout.setLabel("send.mail.attachments", null);
formLayout.add(attachmentsLayout);
}
FormLayoutContainer buttonGroupLayout = FormLayoutContainer.createButtonLayout("buttonGroupLayout", getTranslator());
formLayout.add(buttonGroupLayout);
uifactory.addFormSubmitButton("ok", buttonGroupLayout);
uifactory.addFormCancelButton("cancel", buttonGroupLayout, ureq, getWindowControl());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initForm
File: src/main/java/org/olat/core/util/mail/ui/SendDocumentsByEMailController.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-41152
|
MEDIUM
| 4
|
OpenOLAT
|
initForm
|
src/main/java/org/olat/core/util/mail/ui/SendDocumentsByEMailController.java
|
418bb509ffcb0e25ab4390563c6c47f0458583eb
| 0
|
Analyze the following code function for security vulnerabilities
|
protected abstract String getRelationshipTableName();
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRelationshipTableName
File: dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/association/AbstractOrganisationUnitAssociationsQueryBuilder.java
Repository: dhis2/dhis2-core
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-24848
|
MEDIUM
| 6.5
|
dhis2/dhis2-core
|
getRelationshipTableName
|
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/association/AbstractOrganisationUnitAssociationsQueryBuilder.java
|
ef04483a9b177d62e48dcf4e498b302a11f95e7d
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean occludesParent() {
return occludesParent(false /* includingFinishing */);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: occludesParent
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
|
occludesParent
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
public abstract BaseXMLBuilder namespace(String prefix, String namespaceURI);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: namespace
File: src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
Repository: jmurty/java-xmlbuilder
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2014-125087
|
MEDIUM
| 5.2
|
jmurty/java-xmlbuilder
|
namespace
|
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
|
e6fddca201790abab4f2c274341c0bb8835c3e73
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void sendError(int arg0, String arg1) throws IOException {
// ignore
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendError
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
|
sendError
|
h2/src/test/org/h2/test/server/TestWeb.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 0
|
Analyze the following code function for security vulnerabilities
|
public static short[] unshuffleShortArray(byte[] input) throws IOException {
short[] output = new short[input.length / 2];
int numProcessed = impl.unshuffle(input, 0, 2, input.length, output, 0);
assert(numProcessed == input.length);
return output;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unshuffleShortArray
File: src/main/java/org/xerial/snappy/BitShuffle.java
Repository: xerial/snappy-java
The code follows secure coding practices.
|
[
"CWE-190"
] |
CVE-2023-34453
|
HIGH
| 7.5
|
xerial/snappy-java
|
unshuffleShortArray
|
src/main/java/org/xerial/snappy/BitShuffle.java
|
820e2e074c58748b41dbd547f4edba9e108ad905
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public synchronized void close() throws IOException {
out.close();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: close
File: android/guava/src/com/google/common/io/FileBackedOutputStream.java
Repository: google/guava
The code follows secure coding practices.
|
[
"CWE-552"
] |
CVE-2023-2976
|
HIGH
| 7.1
|
google/guava
|
close
|
android/guava/src/com/google/common/io/FileBackedOutputStream.java
|
feb83a1c8fd2e7670b244d5afd23cba5aca43284
| 0
|
Analyze the following code function for security vulnerabilities
|
private void dispatchProcessesChanged() {
int N;
synchronized (this) {
N = mPendingProcessChanges.size();
if (mActiveProcessChanges.length < N) {
mActiveProcessChanges = new ProcessChangeItem[N];
}
mPendingProcessChanges.toArray(mActiveProcessChanges);
mPendingProcessChanges.clear();
if (DEBUG_PROCESS_OBSERVERS) Slog.i(TAG_PROCESS_OBSERVERS,
"*** Delivering " + N + " process changes");
}
int i = mProcessObservers.beginBroadcast();
while (i > 0) {
i--;
final IProcessObserver observer = mProcessObservers.getBroadcastItem(i);
if (observer != null) {
try {
for (int j=0; j<N; j++) {
ProcessChangeItem item = mActiveProcessChanges[j];
if ((item.changes&ProcessChangeItem.CHANGE_ACTIVITIES) != 0) {
if (DEBUG_PROCESS_OBSERVERS) Slog.i(TAG_PROCESS_OBSERVERS,
"ACTIVITIES CHANGED pid=" + item.pid + " uid="
+ item.uid + ": " + item.foregroundActivities);
observer.onForegroundActivitiesChanged(item.pid, item.uid,
item.foregroundActivities);
}
}
} catch (RemoteException e) {
}
}
}
mProcessObservers.finishBroadcast();
synchronized (this) {
for (int j=0; j<N; j++) {
mAvailProcessChanges.add(mActiveProcessChanges[j]);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dispatchProcessesChanged
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
|
dispatchProcessesChanged
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getCleanPathSecure() {
String result = internal.getAbsolutePath();
result = result.replace("\0", "");
result = result.replace("\\\\", "/");
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCleanPathSecure
File: src/net/sourceforge/plantuml/security/SFile.java
Repository: plantuml
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2023-3431
|
MEDIUM
| 5.3
|
plantuml
|
getCleanPathSecure
|
src/net/sourceforge/plantuml/security/SFile.java
|
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isConnected() {
return datasource != null && super.isConnected();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isConnected
File: modules/library/referencing/src/main/java/org/geotools/referencing/factory/AbstractEpsgMediator.java
Repository: geotools
The code follows secure coding practices.
|
[
"CWE-917"
] |
CVE-2022-24818
|
HIGH
| 7.5
|
geotools
|
isConnected
|
modules/library/referencing/src/main/java/org/geotools/referencing/factory/AbstractEpsgMediator.java
|
4f70fa3234391dd0cda883a20ab0ec75688cba49
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getCommentTitle() {
return commentTitle;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCommentTitle
File: src/com/dotmarketing/cms/comment/struts/CommentsForm.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-254",
"CWE-264"
] |
CVE-2016-8600
|
MEDIUM
| 5
|
dotCMS/core
|
getCommentTitle
|
src/com/dotmarketing/cms/comment/struts/CommentsForm.java
|
cb84b130065c9eed1d1df9e4770ffa5d4bd30569
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setOrganizationIdForUser(@NonNull String packageName,
@NonNull String enterpriseId, @UserIdInt int userId) {
if (mService == null) {
return;
}
try {
mService.setOrganizationIdForUser(packageName, enterpriseId, userId);
} catch (RemoteException re) {
throw re.rethrowFromSystemServer();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setOrganizationIdForUser
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
|
setOrganizationIdForUser
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
private void handleError(@Nullable String ssid) {
if (mCurrentTofuConfig != null) {
mWifiConfigManager.updateNetworkSelectionStatus(mCurrentTofuConfig.networkId,
WifiConfiguration.NetworkSelectionStatus
.DISABLED_BY_WIFI_MANAGER);
}
dismissDialogAndNotification();
clearInternalData();
clearNativeData();
if (null != mCallbacks) mCallbacks.onError(ssid);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleError
File: service/java/com/android/server/wifi/InsecureEapNetworkHandler.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
handleError
|
service/java/com/android/server/wifi/InsecureEapNetworkHandler.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
public void addJavascriptInterface(Object object, String name) {
addPossiblyUnsafeJavascriptInterface(object, name, JavascriptInterface.class);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addJavascriptInterface
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
|
addJavascriptInterface
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
public abstract int getLineStart(int line);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLineStart
File: core/java/android/text/Layout.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-9452
|
MEDIUM
| 4.3
|
android
|
getLineStart
|
core/java/android/text/Layout.java
|
3b6f84b77c30ec0bab5147b0cffc192c86ba2634
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getPageUrl(String pageOrderRange) throws IndexUnreachableException {
return getPageUrl(null, pageOrderRange);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPageUrl
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
|
getPageUrl
|
goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java
|
c29efe60e745a94d03debc17681c4950f3917455
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean isInitializing(XWikiContext xcontext)
{
return Boolean.TRUE.equals(xcontext.getEngineContext().getAttribute("xwiki.init"));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isInitializing
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
|
isInitializing
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setPassword(Account account, String password) {
final int callingUid = Binder.getCallingUid();
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.v(TAG, "setAuthToken: " + account
+ ", caller's uid " + callingUid
+ ", pid " + Binder.getCallingPid());
}
Objects.requireNonNull(account, "account cannot be null");
int userId = UserHandle.getCallingUserId();
if (!isAccountManagedByCaller(account.type, callingUid, userId)) {
String msg = String.format(
"uid %s cannot set secrets for accounts of type: %s",
callingUid,
account.type);
throw new SecurityException(msg);
}
final long identityToken = clearCallingIdentity();
try {
UserAccounts accounts = getUserAccounts(userId);
setPasswordInternal(accounts, account, password, callingUid);
} finally {
restoreCallingIdentity(identityToken);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setPassword
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
|
setPassword
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void cancelAllNotifications(String pkg, int userId) {
checkCallerIsSystemOrSameApp(pkg);
userId = ActivityManager.handleIncomingUser(Binder.getCallingPid(),
Binder.getCallingUid(), userId, true, false, "cancelAllNotifications", pkg);
// Calling from user space, don't allow the canceling of actively
// running foreground services.
cancelAllNotificationsInt(Binder.getCallingUid(), Binder.getCallingPid(),
pkg, 0, Notification.FLAG_FOREGROUND_SERVICE, true, userId,
REASON_APP_CANCEL_ALL, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cancelAllNotifications
File: services/core/java/com/android/server/notification/NotificationManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3884
|
MEDIUM
| 4.3
|
android
|
cancelAllNotifications
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onPreDhcpAction() {
sendMessage(CMD_PRE_DHCP_ACTION);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onPreDhcpAction
File: service/java/com/android/server/wifi/ClientModeImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
onPreDhcpAction
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setEscapeXml(boolean escapeXml) {
_escapeXml = escapeXml;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setEscapeXml
File: util-taglib/src/com/liferay/taglib/ui/HeaderTag.java
Repository: brianchandotcom/liferay-portal
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2017-12647
|
MEDIUM
| 4.3
|
brianchandotcom/liferay-portal
|
setEscapeXml
|
util-taglib/src/com/liferay/taglib/ui/HeaderTag.java
|
bd92daa70ab77a40eff0eb18e8e91f3e095694e1
| 0
|
Analyze the following code function for security vulnerabilities
|
int getProfileConnectionState(int profile) {
enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission");
return mAdapterProperties.getProfileConnectionState(profile);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProfileConnectionState
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
|
getProfileConnectionState
|
src/com/android/bluetooth/btservice/AdapterService.java
|
122feb9a0b04290f55183ff2f0384c6c53756bd8
| 0
|
Analyze the following code function for security vulnerabilities
|
@LargeTest
@Test
public void testIncomingEmergencyCallback() throws Exception {
// Make an outgoing emergency call
String phoneNumber = "650-555-1212";
IdPair ids = startAndMakeDialingEmergencyCall(phoneNumber,
mPhoneAccountE0.getAccountHandle(), mConnectionServiceFixtureA);
mInCallServiceFixtureX.mInCallAdapter.disconnectCall(ids.mCallId);
mConnectionServiceFixtureA.sendSetDisconnected(ids.mConnectionId, DisconnectCause.LOCAL);
// Incoming call should be marked as a potential emergency callback
Bundle extras = new Bundle();
extras.putParcelable(
TelecomManager.EXTRA_INCOMING_CALL_ADDRESS,
Uri.fromParts(PhoneAccount.SCHEME_TEL, phoneNumber, null));
mTelecomSystem.getTelecomServiceImpl().getBinder()
.addNewIncomingCall(mPhoneAccountA0.getAccountHandle(), extras);
waitForHandlerAction(mConnectionServiceFixtureA.mConnectionServiceDelegate.getHandler(),
TEST_TIMEOUT);
ArgumentCaptor<ConnectionRequest> connectionRequestCaptor
= ArgumentCaptor.forClass(ConnectionRequest.class);
verify(mConnectionServiceFixtureA.getTestDouble())
.createConnection(any(PhoneAccountHandle.class), anyString(),
connectionRequestCaptor.capture(), eq(true), eq(false), any());
assertTrue(connectionRequestCaptor.getValue().getExtras().containsKey(
android.telecom.Call.EXTRA_LAST_EMERGENCY_CALLBACK_TIME_MILLIS));
assertTrue(connectionRequestCaptor.getValue().getExtras().getLong(
android.telecom.Call.EXTRA_LAST_EMERGENCY_CALLBACK_TIME_MILLIS, 0) > 0);
assertTrue(connectionRequestCaptor.getValue().getExtras().containsKey(
TelecomManager.EXTRA_INCOMING_CALL_ADDRESS));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: testIncomingEmergencyCallback
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
|
testIncomingEmergencyCallback
|
tests/src/com/android/server/telecom/tests/BasicCallTests.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected Class<? extends AbstractPlugin> getPluginClass() {
return OneDev.class;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPluginClass
File: server-core/src/main/java/io/onedev/server/CoreModule.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2021-21244
|
HIGH
| 7.5
|
theonedev/onedev
|
getPluginClass
|
server-core/src/main/java/io/onedev/server/CoreModule.java
|
4f5dc6fb9e50f2c41c4929b0d8c5824b2cca3d65
| 0
|
Analyze the following code function for security vulnerabilities
|
private EntityReferenceSerializer<String> getDefaultStringEntityReferenceSerializer()
{
if (this.defaultStringEntityReferenceSerializer == null) {
this.defaultStringEntityReferenceSerializer = Utils.getComponent(EntityReferenceSerializer.TYPE_STRING);
}
return this.defaultStringEntityReferenceSerializer;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDefaultStringEntityReferenceSerializer
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
|
getDefaultStringEntityReferenceSerializer
|
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
|
public JSONArray put(boolean value) {
put(value ? Boolean.TRUE : Boolean.FALSE);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: put
File: src/main/java/org/codehaus/jettison/json/JSONArray.java
Repository: jettison-json/jettison
The code follows secure coding practices.
|
[
"CWE-674",
"CWE-787"
] |
CVE-2022-45693
|
HIGH
| 7.5
|
jettison-json/jettison
|
put
|
src/main/java/org/codehaus/jettison/json/JSONArray.java
|
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setOauthBasePath(String basePath) {
for(Authentication auth : authentications.values()) {
if (auth instanceof OAuth) {
((OAuth) auth).setBasePath(basePath);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setOauthBasePath
File: samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
setOauthBasePath
|
samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient addDefaultCookie(String key, String value) {
defaultCookieMap.put(key, value);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addDefaultCookie
File: samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
addDefaultCookie
|
samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void binderDied() {
mResponse = null;
close();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: binderDied
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
|
binderDied
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void onAttachedToWindow() {
super.onAttachedToWindow();
mAccessibilityController.addStateChangedCallback(this);
mRightExtension = Dependency.get(ExtensionController.class).newExtension(IntentButton.class)
.withPlugin(IntentButtonProvider.class, RIGHT_BUTTON_PLUGIN,
p -> p.getIntentButton())
.withTunerFactory(new LockButtonFactory(mContext, LOCKSCREEN_RIGHT_BUTTON))
.withDefault(() -> new DefaultRightButton())
.withCallback(button -> setRightButton(button))
.build();
mLeftExtension = Dependency.get(ExtensionController.class).newExtension(IntentButton.class)
.withPlugin(IntentButtonProvider.class, LEFT_BUTTON_PLUGIN,
p -> p.getIntentButton())
.withTunerFactory(new LockButtonFactory(mContext, LOCKSCREEN_LEFT_BUTTON))
.withDefault(() -> new DefaultLeftButton())
.withCallback(button -> setLeftButton(button))
.build();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onAttachedToWindow
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
onAttachedToWindow
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
protected InputOutputFactory createInputOutputFactory() {
overrideByteOrder();
if (byteOrder == null) {
byteOrder = useNativeByteOrder ? nativeOrder() : BIG_ENDIAN;
}
return byteOrder == nativeOrder() && allowUnsafe && GlobalMemoryAccessorRegistry.MEM_AVAILABLE
? new UnsafeInputOutputFactory()
: new ByteArrayInputOutputFactory(byteOrder);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createInputOutputFactory
File: hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/DefaultSerializationServiceBuilder.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
createInputOutputFactory
|
hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/DefaultSerializationServiceBuilder.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
@GET
@Path("deletesmallfile")
public void deleteSmallFile() throws Exception {
if (smallFile.exists()) {
smallFile.delete();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deleteSmallFile
File: testsuite/integration-tests/src/test/java/org/jboss/resteasy/test/response/resource/RangeResource.java
Repository: resteasy
The code follows secure coding practices.
|
[
"CWE-378"
] |
CVE-2023-0482
|
MEDIUM
| 5.5
|
resteasy
|
deleteSmallFile
|
testsuite/integration-tests/src/test/java/org/jboss/resteasy/test/response/resource/RangeResource.java
|
807d7456f2137cde8ef7c316707211bf4e542d56
| 0
|
Analyze the following code function for security vulnerabilities
|
private void closeOutboundAndChannel(
final ChannelHandlerContext context, final ChannelStateEvent e) {
if (!e.getChannel().isConnected()) {
context.sendDownstream(e);
return;
}
// Ensure that the tear-down logic beyond this point is never invoked concurrently nor multiple times.
if (!CLOSED_OUTBOUND_AND_CHANNEL_UPDATER.compareAndSet(this, 0, 1)) {
// The other thread called this method already, and thus the connection will be closed eventually.
// So, just wait until the connection is closed, and then forward the event so that the sink handles
// the duplicate close attempt.
e.getChannel().getCloseFuture().addListener(new ChannelFutureListener() {
public void operationComplete(ChannelFuture future) throws Exception {
context.sendDownstream(e);
}
});
return;
}
boolean passthrough = true;
try {
try {
unwrapNonAppData(ctx, e.getChannel());
} catch (SSLException ex) {
if (logger.isDebugEnabled()) {
logger.debug("Failed to unwrap before sending a close_notify message", ex);
}
}
if (!engine.isOutboundDone()) {
if (SENT_CLOSE_NOTIFY_UPDATER.compareAndSet(this, 0, 1)) {
engine.closeOutbound();
try {
ChannelFuture closeNotifyFuture = wrapNonAppData(context, e.getChannel());
closeNotifyFuture.addListener(
new ClosingChannelFutureListener(context, e));
passthrough = false;
} catch (SSLException ex) {
if (logger.isDebugEnabled()) {
logger.debug("Failed to encode a close_notify message", ex);
}
}
}
}
} finally {
if (passthrough) {
context.sendDownstream(e);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: closeOutboundAndChannel
File: src/main/java/org/jboss/netty/handler/ssl/SslHandler.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2014-3488
|
MEDIUM
| 5
|
netty
|
closeOutboundAndChannel
|
src/main/java/org/jboss/netty/handler/ssl/SslHandler.java
|
2fa9400a59d0563a66908aba55c41e7285a04994
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setVirtualHost(String virtualHost) {
this.virtualHost = virtualHost;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setVirtualHost
File: src/main/java/com/rabbitmq/client/ConnectionFactory.java
Repository: rabbitmq/rabbitmq-java-client
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-46120
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-java-client
|
setVirtualHost
|
src/main/java/com/rabbitmq/client/ConnectionFactory.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<News> newsFromAuthor(String author, String region){
Query query = em.createQuery("SELECT n FROM News n INNER JOIN n.authors a WHERE n.region LIKE :r AND a.name LIKE :author ORDER BY date DESC");
query.setParameter("r", region);
query.setParameter("author", author);
@SuppressWarnings("unchecked")
List<News> news = query.getResultList();
return news;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: newsFromAuthor
File: Cnn-EJB/ejbModule/ejbs/NewsBean.java
Repository: rfsimoes/IS_Projecto2
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2014-125038
|
MEDIUM
| 5.2
|
rfsimoes/IS_Projecto2
|
newsFromAuthor
|
Cnn-EJB/ejbModule/ejbs/NewsBean.java
|
aa128b2c9c9fdcbbf5ecd82c1e92103573017fe0
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setTitleFromBackStack() {
final int count = getFragmentManager().getBackStackEntryCount();
if (count == 0) {
if (mInitialTitleResId > 0) {
setTitle(mInitialTitleResId);
} else {
setTitle(mInitialTitle);
}
return;
}
FragmentManager.BackStackEntry bse = getFragmentManager().getBackStackEntryAt(count - 1);
setTitleFromBackStackEntry(bse);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setTitleFromBackStack
File: src/com/android/settings/SettingsActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2018-9501
|
HIGH
| 7.2
|
android
|
setTitleFromBackStack
|
src/com/android/settings/SettingsActivity.java
|
5e43341b8c7eddce88f79c9a5068362927c05b54
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setSectionLabelsTypesExpected() {
this.unsetTypeExpected();
int i = 1;
this.setTypeExpected(i, TypeNames.INT); // section_id
++i;
this.setTypeExpected(i, TypeNames.STRING); // label
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSectionLabelsTypesExpected
File: core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
Repository: OpenClinica
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-24831
|
HIGH
| 7.5
|
OpenClinica
|
setSectionLabelsTypesExpected
|
core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
|
b152cc63019230c9973965a98e4386ea5322c18f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int addAppTask(IBinder activityToken, Intent intent,
ActivityManager.TaskDescription description, Bitmap thumbnail) throws RemoteException {
final int callingUid = Binder.getCallingUid();
final long callingIdent = Binder.clearCallingIdentity();
try {
synchronized (this) {
ActivityRecord r = ActivityRecord.isInStackLocked(activityToken);
if (r == null) {
throw new IllegalArgumentException("Activity does not exist; token="
+ activityToken);
}
ComponentName comp = intent.getComponent();
if (comp == null) {
throw new IllegalArgumentException("Intent " + intent
+ " must specify explicit component");
}
if (thumbnail.getWidth() != mThumbnailWidth
|| thumbnail.getHeight() != mThumbnailHeight) {
throw new IllegalArgumentException("Bad thumbnail size: got "
+ thumbnail.getWidth() + "x" + thumbnail.getHeight() + ", require "
+ mThumbnailWidth + "x" + mThumbnailHeight);
}
if (intent.getSelector() != null) {
intent.setSelector(null);
}
if (intent.getSourceBounds() != null) {
intent.setSourceBounds(null);
}
if ((intent.getFlags()&Intent.FLAG_ACTIVITY_NEW_DOCUMENT) != 0) {
if ((intent.getFlags()&Intent.FLAG_ACTIVITY_RETAIN_IN_RECENTS) == 0) {
// The caller has added this as an auto-remove task... that makes no
// sense, so turn off auto-remove.
intent.addFlags(Intent.FLAG_ACTIVITY_RETAIN_IN_RECENTS);
}
}
final ActivityInfo ainfo = AppGlobals.getPackageManager().getActivityInfo(comp,
STOCK_PM_FLAGS, UserHandle.getUserId(callingUid));
if (ainfo.applicationInfo.uid != callingUid) {
throw new SecurityException(
"Can't add task for another application: target uid="
+ ainfo.applicationInfo.uid + ", calling uid=" + callingUid);
}
final ActivityStack stack = r.getStack();
final TaskRecord task = stack.createTaskRecord(
mStackSupervisor.getNextTaskIdForUserLocked(r.userId), ainfo, intent,
null /* voiceSession */, null /* voiceInteractor */, !ON_TOP);
if (!mRecentTasks.addToBottom(task)) {
// The app has too many tasks already and we can't add any more
stack.removeTask(task, "addAppTask", REMOVE_TASK_MODE_DESTROYING);
return INVALID_TASK_ID;
}
task.lastTaskDescription.copyFrom(description);
// TODO: Send the thumbnail to WM to store it.
return task.taskId;
}
} finally {
Binder.restoreCallingIdentity(callingIdent);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addAppTask
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
|
addAppTask
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isOemPrivate() {
return mIsOemPrivate;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isOemPrivate
File: framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-120"
] |
CVE-2023-21243
|
MEDIUM
| 5.5
|
android
|
isOemPrivate
|
framework/java/android/net/wifi/hotspot2/PasspointConfiguration.java
|
5b49b8711efaadadf5052ba85288860c2d7ca7a6
| 0
|
Analyze the following code function for security vulnerabilities
|
private void fireRemoval(final DomNode exParent) {
final HtmlPage htmlPage = getHtmlPageOrNull();
if (htmlPage != null) {
// some actions executed on removal need an intact parent relationship (e.g. for the
// DocumentPositionComparator) so we have to restore it temporarily
parent_ = exParent;
htmlPage.notifyNodeRemoved(this);
parent_ = null;
}
if (exParent != null) {
final DomChangeEvent event = new DomChangeEvent(exParent, this);
fireNodeDeleted(event);
// ask ex-parent to fire event (because we don't have parent now)
exParent.fireNodeDeleted(event);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fireRemoval
File: src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
Repository: HtmlUnit/htmlunit
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-2798
|
HIGH
| 7.5
|
HtmlUnit/htmlunit
|
fireRemoval
|
src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
|
940dc7fd
| 0
|
Analyze the following code function for security vulnerabilities
|
protected boolean dumpActivity(FileDescriptor fd, PrintWriter pw, String name, String[] args,
int opti, boolean dumpAll, boolean dumpVisibleStacksOnly, boolean dumpFocusedStackOnly) {
ArrayList<ActivityRecord> activities;
synchronized (this) {
activities = mStackSupervisor.getDumpActivitiesLocked(name, dumpVisibleStacksOnly,
dumpFocusedStackOnly);
}
if (activities.size() <= 0) {
return false;
}
String[] newArgs = new String[args.length - opti];
System.arraycopy(args, opti, newArgs, 0, args.length - opti);
TaskRecord lastTask = null;
boolean needSep = false;
for (int i=activities.size()-1; i>=0; i--) {
ActivityRecord r = activities.get(i);
if (needSep) {
pw.println();
}
needSep = true;
synchronized (this) {
final TaskRecord task = r.getTask();
if (lastTask != task) {
lastTask = task;
pw.print("TASK "); pw.print(lastTask.affinity);
pw.print(" id="); pw.print(lastTask.taskId);
pw.print(" userId="); pw.println(lastTask.userId);
if (dumpAll) {
lastTask.dump(pw, " ");
}
}
}
dumpActivity(" ", fd, pw, activities.get(i), newArgs, dumpAll);
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpActivity
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
|
dumpActivity
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@JsonProperty("projectIDs")
public Set<Long> getProjectIds() {
return _projectsMetadata.keySet();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProjectIds
File: main/src/com/google/refine/io/FileProjectManager.java
Repository: OpenRefine
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2023-37476
|
HIGH
| 7.8
|
OpenRefine
|
getProjectIds
|
main/src/com/google/refine/io/FileProjectManager.java
|
e9c1e65d58b47aec8cd676bd5c07d97b002f205e
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean execute(XmppActivity activity) {
XmppConnectionService service = activity.xmppConnectionService;
Conversation conversation = service.findConversationByUuid(this.uuid);
if (conversation == null) {
return false;
}
if (conversation.getMode() == Conversation.MODE_MULTI) {
for (Jid jid : jids) {
service.invite(conversation, jid);
}
return false;
} else {
jids.add(conversation.getJid().asBareJid());
return service.createAdhocConference(conversation.getAccount(), null, jids, activity.adhocCallback);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: execute
File: src/main/java/eu/siacs/conversations/ui/XmppActivity.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
execute
|
src/main/java/eu/siacs/conversations/ui/XmppActivity.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void send(String toUser, String toChannel, Object data) {
_session.getChannel(_setiChannel).publish(new SetiMessage(toUser, toChannel, data));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: send
File: cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Seti.java
Repository: cometd
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-24721
|
MEDIUM
| 5.5
|
cometd
|
send
|
cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Seti.java
|
bb445a143fbf320f17c62e340455cd74acfb5929
| 0
|
Analyze the following code function for security vulnerabilities
|
public SortedMap<Integer, RangeSet> getRelationship(AbstractProject that) {
TreeMap<Integer,RangeSet> r = new TreeMap<Integer,RangeSet>(REVERSE_INTEGER_COMPARATOR);
checkAndRecord(that, r, this.getBuilds());
// checkAndRecord(that, r, that.getBuilds());
return r;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRelationship
File: core/src/main/java/hudson/model/AbstractProject.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
getRelationship
|
core/src/main/java/hudson/model/AbstractProject.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void readDesign(Element tableSectionElement,
DesignContext designContext) {
super.readDesign(tableSectionElement, designContext);
if (defaultRow == null && !rows.isEmpty()) {
grid.setDefaultHeaderRow(rows.get(0));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readDesign
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
|
readDesign
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean hasAttributes() {
return doc.hasAttributes();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasAttributes
File: HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java
Repository: LoboEvolution
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000540
|
MEDIUM
| 6.8
|
LoboEvolution
|
hasAttributes
|
HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java
|
9b75694cedfa4825d4a2330abf2719d470c654cd
| 0
|
Analyze the following code function for security vulnerabilities
|
private void readFile(HttpServletResponse resp, File file) {
OutputStream os = null;
FileInputStream fis = null;
try {
os = resp.getOutputStream();
fis = new FileInputStream(file);
byte fileContent[] = new byte[(int) file.length()];
fis.read(fileContent);
os.write(fileContent);
} catch (Exception e) {
this.error(sprintf(lang("INVALID_DIRECTORY_OR_FILE"), file.getName()));
} finally {
try {
if (os != null)
os.close();
} catch (Exception e2) {
}
try {
if (fis != null)
fis.close();
} catch (Exception e2) {
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readFile
File: src/main/java/com/jflyfox/modules/filemanager/FileManager.java
Repository: jflyfox/jfinal_cms
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2021-37262
|
MEDIUM
| 5
|
jflyfox/jfinal_cms
|
readFile
|
src/main/java/com/jflyfox/modules/filemanager/FileManager.java
|
e7fd0fe9362464c4d2bd308318eecc89a847b116
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void setMediaPackageSerializer(MediaPackageSerializer serializer) {
this.serializer = serializer;
if (solrRequester != null)
solrRequester.setMediaPackageSerializer(serializer);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setMediaPackageSerializer
File: modules/search-service-impl/src/main/java/org/opencastproject/search/impl/SearchServiceImpl.java
Repository: opencast
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-21318
|
MEDIUM
| 5.5
|
opencast
|
setMediaPackageSerializer
|
modules/search-service-impl/src/main/java/org/opencastproject/search/impl/SearchServiceImpl.java
|
b18c6a7f81f08ed14884592a6c14c9ab611ad450
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.