instruction
string | input
string | output
string | cwe_ids
list | cve_id
string | severity
string | cvss_score
float64 | repo_name
string | func_name
string | file_path
string | commit_hash
string | is_vulnerable
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Analyze the following code function for security vulnerabilities
|
@Override
public int getPackageProcessState(String packageName, String callingPackage) {
if (!hasUsageStatsPermission(callingPackage)) {
enforceCallingPermission(android.Manifest.permission.GET_PACKAGE_IMPORTANCE,
"getPackageProcessState");
}
int procState = ActivityManager.PROCESS_STATE_NONEXISTENT;
synchronized (this) {
for (int i=mLruProcesses.size()-1; i>=0; i--) {
final ProcessRecord proc = mLruProcesses.get(i);
if (procState == ActivityManager.PROCESS_STATE_NONEXISTENT
|| procState > proc.setProcState) {
boolean found = false;
for (int j=proc.pkgList.size()-1; j>=0 && !found; j--) {
if (proc.pkgList.keyAt(j).equals(packageName)) {
procState = proc.setProcState;
found = true;
}
}
if (proc.pkgDeps != null && !found) {
for (int j=proc.pkgDeps.size()-1; j>=0; j--) {
if (proc.pkgDeps.valueAt(j).equals(packageName)) {
procState = proc.setProcState;
break;
}
}
}
}
}
}
return procState;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPackageProcessState
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2500
|
MEDIUM
| 4.3
|
android
|
getPackageProcessState
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
9878bb99b77c3681f0fda116e2964bac26f349c3
| 0
|
Analyze the following code function for security vulnerabilities
|
public void onSoftKeyboardShowModeChanged(int showMode) {
final Message message =
mCaller.obtainMessageI(DO_ON_SOFT_KEYBOARD_SHOW_MODE_CHANGED, showMode);
mCaller.sendMessage(message);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onSoftKeyboardShowModeChanged
File: core/java/android/accessibilityservice/AccessibilityService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3923
|
MEDIUM
| 4.3
|
android
|
onSoftKeyboardShowModeChanged
|
core/java/android/accessibilityservice/AccessibilityService.java
|
5f256310187b4ff2f13a7abb9afed9126facd7bc
| 0
|
Analyze the following code function for security vulnerabilities
|
public static ByteBuffer allocateDirectNoCleaner(int capacity) {
assert USE_DIRECT_BUFFER_NO_CLEANER;
incrementMemoryCounter(capacity);
try {
return PlatformDependent0.allocateDirectNoCleaner(capacity);
} catch (Throwable e) {
decrementMemoryCounter(capacity);
throwException(e);
return null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: allocateDirectNoCleaner
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
|
allocateDirectNoCleaner
|
common/src/main/java/io/netty/util/internal/PlatformDependent.java
|
185f8b2756a36aaa4f973f1a2a025e7d981823f1
| 0
|
Analyze the following code function for security vulnerabilities
|
public final void removeObserver(TabObserver observer) {
mObservers.removeObserver(observer);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeObserver
File: chrome/android/java/src/org/chromium/chrome/browser/Tab.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
removeObserver
|
chrome/android/java/src/org/chromium/chrome/browser/Tab.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
Notification.Action createDeleteAction(Context context, Resources r, Uri uri) {
// Make sure pending intents for the system user are still unique across users
// by setting the (otherwise unused) request code to the current user id.
int requestCode = mContext.getUserId();
// Create a delete action for the notification
PendingIntent deleteAction = PendingIntent.getBroadcast(context, requestCode,
new Intent(context, DeleteScreenshotReceiver.class)
.putExtra(ScreenshotController.SCREENSHOT_URI_ID, uri.toString())
.putExtra(ScreenshotController.EXTRA_ID, mScreenshotId)
.putExtra(ScreenshotController.EXTRA_SMART_ACTIONS_ENABLED,
mSmartActionsEnabled)
.addFlags(Intent.FLAG_RECEIVER_FOREGROUND),
PendingIntent.FLAG_CANCEL_CURRENT
| PendingIntent.FLAG_ONE_SHOT
| PendingIntent.FLAG_IMMUTABLE);
Notification.Action.Builder deleteActionBuilder = new Notification.Action.Builder(
Icon.createWithResource(r, R.drawable.ic_screenshot_delete),
r.getString(com.android.internal.R.string.delete), deleteAction);
return deleteActionBuilder.build();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createDeleteAction
File: packages/SystemUI/src/com/android/systemui/screenshot/SaveImageInBackgroundTask.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35676
|
HIGH
| 7.8
|
android
|
createDeleteAction
|
packages/SystemUI/src/com/android/systemui/screenshot/SaveImageInBackgroundTask.java
|
109e58b62dc9fedcee93983678ef9d4931e72afa
| 0
|
Analyze the following code function for security vulnerabilities
|
private int jjStartNfaWithStates_0(int pos, int kind, int state)
{
jjmatchedKind = kind;
jjmatchedPos = pos;
try { curChar = input_stream.readChar(); }
catch(java.io.IOException e) { return pos + 1; }
return jjMoveNfa_0(state, pos + 1);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: jjStartNfaWithStates_0
File: impl/src/main/java/com/sun/el/parser/ELParserTokenManager.java
Repository: jakartaee/expression-language
The code follows secure coding practices.
|
[
"CWE-917"
] |
CVE-2021-28170
|
MEDIUM
| 5
|
jakartaee/expression-language
|
jjStartNfaWithStates_0
|
impl/src/main/java/com/sun/el/parser/ELParserTokenManager.java
|
b6a3943ac5fba71cbc6719f092e319caa747855b
| 0
|
Analyze the following code function for security vulnerabilities
|
public void removePersistentCacheResult(String cacheName, Handler<AsyncResult<Integer>> replyHandler){
long start = System.nanoTime();
client.getConnection(res -> {
if (res.succeeded()) {
SQLConnection connection = res.result();
try {
connection.update("DROP TABLE " + schemaName + DOT + cacheName, query -> {
connection.close();
if (query.failed()) {
replyHandler.handle(Future.failedFuture(query.cause()));
} else {
replyHandler.handle(Future.succeededFuture(query.result().getUpdated()));
}
statsTracker("removePersistentCacheResult", "DROP TABLE " + cacheName, start);
});
} catch (Exception e) {
if(connection != null){
connection.close();
}
log.error(e.getMessage(), e);
replyHandler.handle(Future.failedFuture(e));
}
} else {
replyHandler.handle(Future.failedFuture(res.cause()));
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removePersistentCacheResult
File: domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
removePersistentCacheResult
|
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<JmxInfoDTO> batchGenPerformanceTestJmx(ApiScenarioBatchRequest request) {
ServiceUtils.getSelectAllIds(request, request.getCondition(),
(query) -> extApiScenarioMapper.selectIdsByQuery(query));
List<JmxInfoDTO> returnList = new ArrayList<>();
List<String> ids = request.getIds();
List<ApiScenarioWithBLOBs> apiScenarioList = extApiScenarioMapper.selectIds(ids);
if (CollectionUtils.isEmpty(apiScenarioList)) {
return returnList;
} else {
apiScenarioList.forEach(item -> {
String testName = item.getName();
MsTestPlan testPlan = new MsTestPlan();
testPlan.setHashTree(new LinkedList<>());
JmxInfoDTO dto = apiTestService.updateJmxString(generateJmx(item), testName, true);
String name = item.getName() + ".jmx";
dto.setId(item.getId());
dto.setName(name);
returnList.add(dto);
});
return returnList;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: batchGenPerformanceTestJmx
File: backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2021-45789
|
MEDIUM
| 6.5
|
metersphere
|
batchGenPerformanceTestJmx
|
backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java
|
d74e02cdff47cdf7524d305d098db6ffb7f61b47
| 0
|
Analyze the following code function for security vulnerabilities
|
void startPersistentApps(int matchFlags) {
if (mFactoryTest == FactoryTest.FACTORY_TEST_LOW_LEVEL) return;
synchronized (this) {
try {
final List<ApplicationInfo> apps = AppGlobals.getPackageManager()
.getPersistentApplications(STOCK_PM_FLAGS | matchFlags).getList();
for (ApplicationInfo app : apps) {
if (!"android".equals(app.packageName)) {
final ProcessRecord proc = addAppLocked(
app, null, false, null /* ABI override */,
ZYGOTE_POLICY_FLAG_BATCH_LAUNCH);
if (proc != null) {
proc.mProfile.addHostingComponentType(
HOSTING_COMPONENT_TYPE_PERSISTENT);
}
}
}
} catch (RemoteException ex) {
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startPersistentApps
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
|
startPersistentApps
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
private ResourceInfo doLookup(String libraryName, String resourceName, String localePrefix, boolean compressable, boolean isViewResource, List<String> contracts, FacesContext ctx) {
// Loop over the contracts as described in deriveResourceIdConsideringLocalePrefixAndContracts in the spec
for (String contract : contracts) {
ResourceInfo info = getResourceInfo(libraryName, resourceName, localePrefix, contract, compressable, isViewResource, ctx, null);
if (info != null) {
return info;
}
}
return getResourceInfo(libraryName, resourceName, localePrefix, null, compressable, isViewResource, ctx, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doLookup
File: impl/src/main/java/com/sun/faces/application/resource/ResourceManager.java
Repository: eclipse-ee4j/mojarra
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-14371
|
MEDIUM
| 5
|
eclipse-ee4j/mojarra
|
doLookup
|
impl/src/main/java/com/sun/faces/application/resource/ResourceManager.java
|
1b434748d9239f42eae8aa7d37d7a0930c061e24
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean hasCaCerts() {
return !mCaCerts.isEmpty();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasCaCerts
File: src/com/android/certinstaller/CredentialHelper.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2422
|
HIGH
| 9.3
|
android
|
hasCaCerts
|
src/com/android/certinstaller/CredentialHelper.java
|
70dde9870e9450e10418a32206ac1bb30f036b2c
| 0
|
Analyze the following code function for security vulnerabilities
|
public String[] getIsimImpu() {
PhoneSubInfoProxy phoneSubInfoProxy = getPhoneSubInfoProxy(getDefaultSubscription());
return phoneSubInfoProxy.getIsimImpu();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getIsimImpu
File: src/java/com/android/internal/telephony/PhoneSubInfoController.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-0831
|
MEDIUM
| 4.3
|
android
|
getIsimImpu
|
src/java/com/android/internal/telephony/PhoneSubInfoController.java
|
79eecef63f3ea99688333c19e22813f54d4a31b1
| 0
|
Analyze the following code function for security vulnerabilities
|
private synchronized void initXMPPConnection() {
// allow custom server / custom port to override SRV record
if (mConfig.customServer.length() > 0)
mXMPPConfig = new ConnectionConfiguration(mConfig.customServer,
mConfig.port, mConfig.server);
else
mXMPPConfig = new ConnectionConfiguration(mConfig.server); // use SRV
mXMPPConfig.setReconnectionAllowed(false);
mXMPPConfig.setSendPresence(false);
mXMPPConfig.setCompressionEnabled(false); // disable for now
mXMPPConfig.setDebuggerEnabled(mConfig.smackdebug);
if (mConfig.require_ssl)
this.mXMPPConfig.setSecurityMode(ConnectionConfiguration.SecurityMode.required);
// register MemorizingTrustManager for HTTPS
try {
SSLContext sc = SSLContext.getInstance("TLS");
MemorizingTrustManager mtm = YaximApplication.getApp(mService).mMTM;
sc.init(null, new X509TrustManager[] { mtm },
new java.security.SecureRandom());
this.mXMPPConfig.setCustomSSLContext(sc);
this.mXMPPConfig.setHostnameVerifier(mtm.wrapHostnameVerifier(
new org.apache.http.conn.ssl.StrictHostnameVerifier()));
} catch (java.security.GeneralSecurityException e) {
debugLog("initialize MemorizingTrustManager: " + e);
}
this.mXMPPConnection = new XmppStreamHandler.ExtXMPPConnection(mXMPPConfig);
this.mStreamHandler = new XmppStreamHandler(mXMPPConnection, mConfig.smackdebug);
mStreamHandler.addAckReceivedListener(new XmppStreamHandler.AckReceivedListener() {
public void ackReceived(long handled, long total) {
gotServerPong("" + handled);
}
});
mConfig.reconnect_required = false;
multiUserChats = new HashMap<String, MultiUserChat>();
initServiceDiscovery();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initXMPPConnection
File: src/org/yaxim/androidclient/service/SmackableImp.java
Repository: ge0rg/yaxim
The code follows secure coding practices.
|
[
"CWE-20",
"CWE-346"
] |
CVE-2017-5589
|
MEDIUM
| 4.3
|
ge0rg/yaxim
|
initXMPPConnection
|
src/org/yaxim/androidclient/service/SmackableImp.java
|
65a38dc77545d9568732189e86089390f0ceaf9f
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isIconStylePreferred(int theme) {
if (theme == 0) {
return false;
}
final AttributeCache.Entry ent = AttributeCache.instance().get(packageName, theme,
R.styleable.Window, mWmService.mCurrentUserId);
if (ent != null) {
if (ent.array.hasValue(R.styleable.Window_windowSplashScreenBehavior)) {
return ent.array.getInt(R.styleable.Window_windowSplashScreenBehavior,
SPLASH_SCREEN_BEHAVIOR_DEFAULT)
== SPLASH_SCREEN_BEHAVIOR_ICON_PREFERRED;
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isIconStylePreferred
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
|
isIconStylePreferred
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setCode(int code) {
this.code = code;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setCode
File: base/common/src/main/java/com/netscape/certsrv/base/PKIException.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
setCode
|
base/common/src/main/java/com/netscape/certsrv/base/PKIException.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setAnimatorDurationScale(float scale) {
mAnimatorDurationScaleSetting = scale;
ValueAnimator.setDurationScale(scale);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAnimatorDurationScale
File: services/core/java/com/android/server/wm/WindowManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3875
|
HIGH
| 7.2
|
android
|
setAnimatorDurationScale
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
char[] getQuotingTriggerChars()
{
return DEFAULT_QUOTING_TRIGGER_CHARS;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getQuotingTriggerChars
File: src/main/java/org/apache/maven/shared/utils/cli/shell/Shell.java
Repository: apache/maven-shared-utils
The code follows secure coding practices.
|
[
"CWE-116"
] |
CVE-2022-29599
|
HIGH
| 7.5
|
apache/maven-shared-utils
|
getQuotingTriggerChars
|
src/main/java/org/apache/maven/shared/utils/cli/shell/Shell.java
|
2735facbbbc2e13546328cb02dbb401b3776eea3
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("unused")
@CalledByNative
private void onScrollBeginEventAck() {
mTouchScrollInProgress = true;
hidePastePopup();
mZoomControlsDelegate.invokeZoomPicker();
updateGestureStateListener(GestureEventType.SCROLL_START);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onScrollBeginEventAck
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-1021"
] |
CVE-2015-1241
|
MEDIUM
| 4.3
|
chromium
|
onScrollBeginEventAck
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
9d343ad2ea6ec395c377a4efa266057155bfa9c1
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setApiKeyPrefix(String apiKeyPrefix) {
for (Authentication auth : authentications.values()) {
if (auth instanceof ApiKeyAuth) {
((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix);
return this;
}
}
throw new RuntimeException("No API key authentication configured!");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setApiKeyPrefix
File: samples/openapi3/client/petstore/java/jersey2-java8/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
|
setApiKeyPrefix
|
samples/openapi3/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
protected void _verifyStringForScalarCoercion(DeserializationContext ctxt, String str) throws JsonMappingException
{
MapperFeature feat = MapperFeature.ALLOW_COERCION_OF_SCALARS;
if (!ctxt.isEnabled(feat)) {
ctxt.reportInputMismatch(this, "Cannot coerce String \"%s\" to %s (enable `%s.%s` to allow)",
str, _coercedTypeDesc(), feat.getDeclaringClass().getSimpleName(), feat.name());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _verifyStringForScalarCoercion
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
|
_verifyStringForScalarCoercion
|
src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java
|
d78d00ee7b5245b93103fef3187f70543d67ca33
| 0
|
Analyze the following code function for security vulnerabilities
|
protected byte[] engineDoFinal(
byte[] input,
int inputOffset,
int inputLen)
throws IllegalBlockSizeException, BadPaddingException
{
if (input != null)
{
bOut.write(input, inputOffset, inputLen);
}
if (cipher instanceof RSABlindedEngine)
{
if (bOut.size() > cipher.getInputBlockSize() + 1)
{
throw new ArrayIndexOutOfBoundsException("too much data for RSA block");
}
}
else
{
if (bOut.size() > cipher.getInputBlockSize())
{
throw new ArrayIndexOutOfBoundsException("too much data for RSA block");
}
}
return getOutput();
}
|
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/rsa/CipherSpi.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/rsa/CipherSpi.java
|
21dcb3d9744c83dcf2ff8fcee06dbca7bfa4ef35
| 0
|
Analyze the following code function for security vulnerabilities
|
void removeIssueParentLink(IssuesUpdateRequest request);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeIssueParentLink
File: framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/track/issue/IssuesPlatform.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2022-23544
|
MEDIUM
| 6.1
|
metersphere
|
removeIssueParentLink
|
framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/track/issue/IssuesPlatform.java
|
d0f95b50737c941b29d507a4cc3545f2dc6ab121
| 0
|
Analyze the following code function for security vulnerabilities
|
public static SsurgPred assemblePredFromXML(Element elt) throws Exception {
String eltName = elt.getTagName();
switch (eltName) {
case SsurgeonPattern.PREDICATE_AND_TAG:
SsurgAndPred andPred = new SsurgAndPred();
for (Element childElt : getChildElements(elt)) {
SsurgPred childPred = assemblePredFromXML(childElt);
andPred.add(childPred);
return andPred;
}
break;
case SsurgeonPattern.PREDICATE_OR_TAG:
SsurgOrPred orPred = new SsurgOrPred();
for (Element childElt : getChildElements(elt)) {
SsurgPred childPred = assemblePredFromXML(childElt);
orPred.add(childPred);
return orPred;
}
break;
case SsurgeonPattern.PRED_WORDLIST_TEST_TAG:
String id = elt.getAttribute(SsurgeonPattern.PRED_ID_ATTR);
String resourceID = elt.getAttribute("resourceID");
String typeStr = elt.getAttribute("type");
String matchName = getEltText(elt).trim(); // node name to match on
if (matchName == null) {
throw new Exception("Could not find match name for " + elt);
}
if (id == null) {
throw new Exception("No ID attribute for element = " + elt);
}
return new WordlistTest(id, resourceID, typeStr, matchName);
}
// Not a valid node, error out!
throw new Exception("Invalid node encountered during Ssurgeon predicate processing, node name="+eltName);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: assemblePredFromXML
File: src/edu/stanford/nlp/semgraph/semgrex/ssurgeon/Ssurgeon.java
Repository: stanfordnlp/CoreNLP
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-3878
|
HIGH
| 7.5
|
stanfordnlp/CoreNLP
|
assemblePredFromXML
|
src/edu/stanford/nlp/semgraph/semgrex/ssurgeon/Ssurgeon.java
|
e5bbe135a02a74b952396751ed3015e8b8252e99
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public void removeSessionInitListener(SessionInitListener listener) {
sessionInitListeners.remove(listener);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeSessionInitListener
File: server/src/main/java/com/vaadin/server/VaadinService.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-203"
] |
CVE-2021-31403
|
LOW
| 1.9
|
vaadin/framework
|
removeSessionInitListener
|
server/src/main/java/com/vaadin/server/VaadinService.java
|
d852126ab6f0c43f937239305bd0e9594834fe34
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getCommonName() {
return commonName;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCommonName
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
|
getCommonName
|
base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void skip(InputStream stream, long skip) throws IOException
{
long count = skip;
while (count > 0)
{
long skipped = stream.skip(count);
if (skipped == 0)
{
throw new IOException("Cannot skip forward within InputStream");
}
count -= skipped;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: skip
File: src/main/java/net/sf/mpxj/common/InputStreamHelper.java
Repository: joniles/mpxj
The code follows secure coding practices.
|
[
"CWE-377",
"CWE-200"
] |
CVE-2022-41954
|
LOW
| 3.3
|
joniles/mpxj
|
skip
|
src/main/java/net/sf/mpxj/common/InputStreamHelper.java
|
ae0af24345d79ad45705265d9927fe55e94a5721
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void channelWritabilityChanged(ChannelHandlerContext ctx) throws Exception {
DefaultResponseTransmitter responseTransmitter = ctx.channel().attr(DefaultResponseTransmitter.ATTRIBUTE_KEY).get();
if (responseTransmitter != null) {
responseTransmitter.writabilityChanged();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: channelWritabilityChanged
File: ratpack-core/src/main/java/ratpack/server/internal/NettyHandlerAdapter.java
Repository: ratpack
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2019-17513
|
MEDIUM
| 5
|
ratpack
|
channelWritabilityChanged
|
ratpack-core/src/main/java/ratpack/server/internal/NettyHandlerAdapter.java
|
efb910d38a96494256f36675ef0e5061097dd77d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public StaticHandler setAlwaysAsyncFS(boolean alwaysAsyncFS) {
this.alwaysAsyncFS = alwaysAsyncFS;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAlwaysAsyncFS
File: vertx-web/src/main/java/io/vertx/ext/web/handler/impl/StaticHandlerImpl.java
Repository: vert-x3/vertx-web
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-12542
|
HIGH
| 7.5
|
vert-x3/vertx-web
|
setAlwaysAsyncFS
|
vertx-web/src/main/java/io/vertx/ext/web/handler/impl/StaticHandlerImpl.java
|
57a65dce6f4c5aa5e3ce7288685e7f3447eb8f3b
| 0
|
Analyze the following code function for security vulnerabilities
|
private void resumeCall() {
getTelecommManager().showInCallScreen(false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resumeCall
File: packages/Keyguard/src/com/android/keyguard/EmergencyButton.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3838
|
MEDIUM
| 4.3
|
android
|
resumeCall
|
packages/Keyguard/src/com/android/keyguard/EmergencyButton.java
|
468651c86a8adb7aa56c708d2348e99022088af3
| 0
|
Analyze the following code function for security vulnerabilities
|
private void dismissDialogAndNotification() {
mNotificationManager.cancel(SystemMessage.NOTE_SERVER_CA_CERTIFICATE);
if (mTofuAlertDialog != null) {
mTofuAlertDialog.dismissDialog();
mTofuAlertDialog = null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dismissDialogAndNotification
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
|
dismissDialogAndNotification
|
service/java/com/android/server/wifi/InsecureEapNetworkHandler.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
public IDToken getIdToken() {
return idToken;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getIdToken
File: core/src/main/java/org/keycloak/KeycloakSecurityContext.java
Repository: keycloak
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2020-1714
|
MEDIUM
| 6.5
|
keycloak
|
getIdToken
|
core/src/main/java/org/keycloak/KeycloakSecurityContext.java
|
d5483d884de797e2ef6e69f92085bc10bf87e864
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isWriteQueueFull() {
return response.writeQueueFull();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isWriteQueueFull
File: independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/VertxResteasyReactiveRequestContext.java
Repository: quarkusio/quarkus
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-0981
|
MEDIUM
| 6.5
|
quarkusio/quarkus
|
isWriteQueueFull
|
independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/VertxResteasyReactiveRequestContext.java
|
96c64fd8f09c02a497e2db366c64dd9196582442
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public void setPasswordMinimumLength(@NonNull ComponentName admin, int length) {
if (mService != null) {
try {
mService.setPasswordMinimumLength(admin, length, mParentInstance);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setPasswordMinimumLength
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
|
setPasswordMinimumLength
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void removeActiveAdmin(ComponentName adminReceiver, int userHandle) {
if (!mHasFeature) {
return;
}
Preconditions.checkArgumentNonnegative(userHandle, "Invalid userId");
final CallerIdentity caller = hasCallingOrSelfPermission(permission.MANAGE_DEVICE_ADMINS)
? getCallerIdentity() : getCallerIdentity(adminReceiver);
Preconditions.checkCallAuthorization(hasFullCrossUsersPermission(caller, userHandle));
checkCanExecuteOrThrowUnsafe(DevicePolicyManager.OPERATION_REMOVE_ACTIVE_ADMIN);
enforceUserUnlocked(userHandle);
synchronized (getLockObject()) {
ActiveAdmin admin = getActiveAdminUncheckedLocked(adminReceiver, userHandle);
if (admin == null) {
return;
}
// Active device/profile owners must remain active admins.
if (isDeviceOwner(adminReceiver, userHandle)
|| isProfileOwner(adminReceiver, userHandle)) {
Slogf.e(LOG_TAG, "Device/profile owner cannot be removed: component="
+ adminReceiver);
return;
}
mInjector.binderWithCleanCallingIdentity(() ->
removeActiveAdminLocked(adminReceiver, userHandle));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeActiveAdmin
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2023-21284
|
MEDIUM
| 5.5
|
android
|
removeActiveAdmin
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
void setVoiceSessionLocked(IVoiceInteractionSession session) {
voiceSession = session;
pendingVoiceInteractionStart = false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setVoiceSessionLocked
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
|
setVoiceSessionLocked
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onTransferProgress(long progressRate, long totalTransferredSoFar,
long totalToTransfer, String fileName) {
OnDatatransferProgressListener boundListener =
mBoundListeners.get(mCurrentDownload.getFile().getFileId());
if (boundListener != null) {
boundListener.onTransferProgress(progressRate, totalTransferredSoFar,
totalToTransfer, fileName);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onTransferProgress
File: src/main/java/com/owncloud/android/files/services/FileDownloader.java
Repository: nextcloud/android
The code follows secure coding practices.
|
[
"CWE-732"
] |
CVE-2022-24886
|
LOW
| 2.1
|
nextcloud/android
|
onTransferProgress
|
src/main/java/com/owncloud/android/files/services/FileDownloader.java
|
27559efb79d45782e000b762860658d49e9c35e9
| 0
|
Analyze the following code function for security vulnerabilities
|
public FF4jConfiguration parseConfiguration(Properties props) {
Util.assertNotNull(props, "Cannot parse null properties");
Map<String, String> mapProperties = new HashMap<String, String>();
for (final String name: props.stringPropertyNames()) {
mapProperties.put(name, props.getProperty(name));
}
return parseConfiguration(mapProperties);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseConfiguration
File: ff4j-config-properties/src/main/java/org/ff4j/parser/properties/PropertiesParser.java
Repository: ff4j
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2022-44262
|
CRITICAL
| 9.8
|
ff4j
|
parseConfiguration
|
ff4j-config-properties/src/main/java/org/ff4j/parser/properties/PropertiesParser.java
|
991df72725f78adbc413d9b0fbb676201f1882e0
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case MENU_IMPORT:
startActivityForResult(CONTACT_IMPORT_INTENT, CONTACTS_PICKER_CODE);
return true;
case MENU_DELETE:
deleteSelected();
return true;
case android.R.id.home:
onBackPressed();
return true;
}
return super.onOptionsItemSelected(item);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onOptionsItemSelected
File: src/com/android/phone/settings/fdn/EditFdnContactScreen.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-862"
] |
CVE-2023-35665
|
HIGH
| 7.8
|
android
|
onOptionsItemSelected
|
src/com/android/phone/settings/fdn/EditFdnContactScreen.java
|
674039e70e1c5bf29b808899ac80c709acc82290
| 0
|
Analyze the following code function for security vulnerabilities
|
public byte[] passwordToHash(String password, int userId) {
if (password == null) {
return null;
}
try {
byte[] saltedPassword = (password + getSalt(userId)).getBytes();
byte[] sha1 = MessageDigest.getInstance("SHA-1").digest(saltedPassword);
byte[] md5 = MessageDigest.getInstance("MD5").digest(saltedPassword);
byte[] combined = new byte[sha1.length + md5.length];
System.arraycopy(sha1, 0, combined, 0, sha1.length);
System.arraycopy(md5, 0, combined, sha1.length, md5.length);
final char[] hexEncoded = HexEncoding.encode(combined);
return new String(hexEncoded).getBytes(StandardCharsets.UTF_8);
} catch (NoSuchAlgorithmException e) {
throw new AssertionError("Missing digest algorithm: ", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: passwordToHash
File: core/java/com/android/internal/widget/LockPatternUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3908
|
MEDIUM
| 4.3
|
android
|
passwordToHash
|
core/java/com/android/internal/widget/LockPatternUtils.java
|
96daf7d4893f614714761af2d53dfb93214a32e4
| 0
|
Analyze the following code function for security vulnerabilities
|
private static String formatHeaderDate(Date dateIn) {
String date = null;
synchronized (HTTP_DF) {
date = HTTP_DF.format(dateIn);
}
return date;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: formatHeaderDate
File: src/java/winstone/WinstoneResponse.java
Repository: jenkinsci/winstone
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2011-4344
|
LOW
| 2.6
|
jenkinsci/winstone
|
formatHeaderDate
|
src/java/winstone/WinstoneResponse.java
|
410ed3001d51c689cf59085b7417466caa2ded7b
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
long injectElapsedRealtime() {
return SystemClock.elapsedRealtime();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: injectElapsedRealtime
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
|
injectElapsedRealtime
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
@GuardedBy("this")
private void ensureOpenLocked() {
// If mOpen is true, this implies that mObject != 0.
if (!mOpen) {
throw new RuntimeException("AssetManager has been closed");
}
}
|
Vulnerability Classification:
- CWE: CWE-415
- CVE: CVE-2023-40103
- Severity: HIGH
- CVSS Score: 7.8
Description: [res] Better native pointer tracking in Java
Make sure we clear the native pointers when freeing them,
so any race condition that calls into it gets a null instead
of calling into already freed object
Bug: 197260547
Test: build + unit tests
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:7c2f195cfc8c02403d61a394213398d13584a5de)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:b9ef411d0f480ee59d73601cce7fb40335a7d389)
Merged-In: I817dc2f5ef24e1fafeba3ce4c1c440abe70ad3ed
Change-Id: I817dc2f5ef24e1fafeba3ce4c1c440abe70ad3ed
Function: ensureOpenLocked
File: core/java/android/content/res/AssetManager.java
Repository: android
Fixed Code:
@GuardedBy("this")
private void ensureOpenLocked() {
// If mOpen is true, this implies that mObject != 0.
if (!mOpen) {
throw new RuntimeException("AssetManager has been closed");
}
// Let's still check if the native object exists, given all the memory corruptions.
if (mObject == 0) {
throw new RuntimeException("AssetManager is open but the native object is gone");
}
}
|
[
"CWE-415"
] |
CVE-2023-40103
|
HIGH
| 7.8
|
android
|
ensureOpenLocked
|
core/java/android/content/res/AssetManager.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 1
|
Analyze the following code function for security vulnerabilities
|
private ArrayList<ViewItem> createDatasetItems(FillResponse response,
AutofillId focusedViewId) {
final int datasetCount = response.getDatasets().size();
if (sVerbose) {
Slog.v(TAG, "Number datasets: " + datasetCount + " max visible: "
+ mVisibleDatasetsMaxCount);
}
final RemoteViews.InteractionHandler interceptionHandler = (view, pendingIntent, r) -> {
if (pendingIntent != null) {
mCallback.startIntentSender(pendingIntent.getIntentSender());
}
return true;
};
final ArrayList<ViewItem> items = new ArrayList<>(datasetCount);
for (int i = 0; i < datasetCount; i++) {
final Dataset dataset = response.getDatasets().get(i);
final int index = dataset.getFieldIds().indexOf(focusedViewId);
if (index >= 0) {
RemoteViews presentation = dataset.getFieldDialogPresentation(index);
if (presentation == null) {
if (sDebug) {
Slog.w(TAG, "not displaying UI on field " + focusedViewId + " because "
+ "service didn't provide a presentation for it on " + dataset);
}
continue;
}
final View view;
try {
if (sVerbose) Slog.v(TAG, "setting remote view for " + focusedViewId);
view = presentation.applyWithTheme(
mContext, null, interceptionHandler, mThemeId);
} catch (RuntimeException e) {
Slog.e(TAG, "Error inflating remote views", e);
continue;
}
// TODO: Extract the shared filtering logic here and in FillUi to a common
// method.
final Dataset.DatasetFieldFilter filter = dataset.getFilter(index);
Pattern filterPattern = null;
String valueText = null;
boolean filterable = true;
if (filter == null) {
final AutofillValue value = dataset.getFieldValues().get(index);
if (value != null && value.isText()) {
valueText = value.getTextValue().toString().toLowerCase();
}
} else {
filterPattern = filter.pattern;
if (filterPattern == null) {
if (sVerbose) {
Slog.v(TAG, "Explicitly disabling filter at id " + focusedViewId
+ " for dataset #" + index);
}
filterable = false;
}
}
items.add(new ViewItem(dataset, filterPattern, filterable, valueText, view));
}
}
return items;
}
|
Vulnerability Classification:
- CWE: CWE-Other, CWE-610
- CVE: CVE-2023-40133
- Severity: MEDIUM
- CVSS Score: 5.5
Description: [DO NOT MERGE] Verify URI Permissions in Autofill RemoteViews
Check permissions of URI inside of FillResponse's RemoteViews. If the
current user does not have the required permissions to view the URI, the
RemoteView is dropped from displaying.
This fixes a security spill in which a user can view content of another
user through a malicious Autofill provider.
Bug: 283137865
Fixes: b/283264674 b/281666022 b/281665050 b/281848557 b/281533566
b/281534749 b/283101289
Test: Verified by POC app attached in bugs
Test: atest CtsAutoFillServiceTestCases (added new tests)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:93810ba1c0a4d31f49adbf9454731e2b7defdfc0)
Merged-In: I6f4d2a35e89bbed7bd9e07bf5cd3e2d68b20af9a
Change-Id: I6f4d2a35e89bbed7bd9e07bf5cd3e2d68b20af9a
Function: createDatasetItems
File: services/autofill/java/com/android/server/autofill/ui/DialogFillUi.java
Repository: android
Fixed Code:
private ArrayList<ViewItem> createDatasetItems(FillResponse response,
AutofillId focusedViewId) {
final int datasetCount = response.getDatasets().size();
if (sVerbose) {
Slog.v(TAG, "Number datasets: " + datasetCount + " max visible: "
+ mVisibleDatasetsMaxCount);
}
final RemoteViews.InteractionHandler interceptionHandler = (view, pendingIntent, r) -> {
if (pendingIntent != null) {
mCallback.startIntentSender(pendingIntent.getIntentSender());
}
return true;
};
final ArrayList<ViewItem> items = new ArrayList<>(datasetCount);
for (int i = 0; i < datasetCount; i++) {
final Dataset dataset = response.getDatasets().get(i);
final int index = dataset.getFieldIds().indexOf(focusedViewId);
if (index >= 0) {
RemoteViews presentation = Helper.sanitizeRemoteView(
dataset.getFieldDialogPresentation(index));
if (presentation == null) {
if (sDebug) {
Slog.w(TAG, "not displaying UI on field " + focusedViewId + " because "
+ "service didn't provide a presentation for it on " + dataset);
}
continue;
}
final View view;
try {
if (sVerbose) Slog.v(TAG, "setting remote view for " + focusedViewId);
view = presentation.applyWithTheme(
mContext, null, interceptionHandler, mThemeId);
} catch (RuntimeException e) {
Slog.e(TAG, "Error inflating remote views", e);
continue;
}
// TODO: Extract the shared filtering logic here and in FillUi to a common
// method.
final Dataset.DatasetFieldFilter filter = dataset.getFilter(index);
Pattern filterPattern = null;
String valueText = null;
boolean filterable = true;
if (filter == null) {
final AutofillValue value = dataset.getFieldValues().get(index);
if (value != null && value.isText()) {
valueText = value.getTextValue().toString().toLowerCase();
}
} else {
filterPattern = filter.pattern;
if (filterPattern == null) {
if (sVerbose) {
Slog.v(TAG, "Explicitly disabling filter at id " + focusedViewId
+ " for dataset #" + index);
}
filterable = false;
}
}
items.add(new ViewItem(dataset, filterPattern, filterable, valueText, view));
}
}
return items;
}
|
[
"CWE-Other",
"CWE-610"
] |
CVE-2023-40133
|
MEDIUM
| 5.5
|
android
|
createDatasetItems
|
services/autofill/java/com/android/server/autofill/ui/DialogFillUi.java
|
08becc8c600f14c5529115cc1a1e0c97cd503f33
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean shutdown(int timeout) {
if (checkCallingPermission(android.Manifest.permission.SHUTDOWN)
!= PackageManager.PERMISSION_GRANTED) {
throw new SecurityException("Requires permission "
+ android.Manifest.permission.SHUTDOWN);
}
boolean timedout = false;
synchronized(this) {
mShuttingDown = true;
mStackSupervisor.prepareForShutdownLocked();
updateEventDispatchingLocked();
timedout = mStackSupervisor.shutdownLocked(timeout);
}
mAppOpsService.shutdown();
if (mUsageStatsService != null) {
mUsageStatsService.prepareShutdown();
}
mBatteryStatsService.shutdown();
synchronized (this) {
mProcessStats.shutdownLocked();
notifyTaskPersisterLocked(null, true);
}
return timedout;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: shutdown
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
|
shutdown
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getMaxConnectionLifeTimeInMs() {
return maxConnectionLifeTimeInMs;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMaxConnectionLifeTimeInMs
File: api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java
Repository: AsyncHttpClient/async-http-client
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2013-7397
|
MEDIUM
| 4.3
|
AsyncHttpClient/async-http-client
|
getMaxConnectionLifeTimeInMs
|
api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java
|
df6ed70e86c8fc340ed75563e016c8baa94d7e72
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean getWantClientAuth() {
return clientAuth == ClientAuth.OPTIONAL;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getWantClientAuth
File: handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-835"
] |
CVE-2016-4970
|
HIGH
| 7.8
|
netty
|
getWantClientAuth
|
handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java
|
bc8291c80912a39fbd2303e18476d15751af0bf1
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void interfacesConfigXmlGenerator(XmlGenerator gen, NetworkConfig netCfg) {
InterfacesConfig interfaces = netCfg.getInterfaces();
gen.open("interfaces", "enabled", interfaces.isEnabled());
for (String i : interfaces.getInterfaces()) {
gen.node("interface", i);
}
gen.close();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: interfacesConfigXmlGenerator
File: hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
interfacesConfigXmlGenerator
|
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String fixUnknownMcc(String operatorNumeric, int sid) {
if (sid <= 0) {
// no cdma information is available, do nothing
return operatorNumeric;
}
// resolve the mcc from sid;
// if mSavedTimeZone is null, TimeZone would get the default timeZone,
// and the fixTimeZone couldn't help, because it depends on operator Numeric;
// if the sid is conflict and timezone is unavailable, the mcc may be not right.
boolean isNitzTimeZone = false;
int timeZone = 0;
TimeZone tzone = null;
if (mSavedTimeZone != null) {
timeZone =
TimeZone.getTimeZone(mSavedTimeZone).getRawOffset()/MS_PER_HOUR;
isNitzTimeZone = true;
} else {
tzone = getNitzTimeZone(mZoneOffset, mZoneDst, mZoneTime);
if (tzone != null)
timeZone = tzone.getRawOffset()/MS_PER_HOUR;
}
int mcc = mHbpcdUtils.getMcc(sid,
timeZone, (mZoneDst ? 1 : 0), isNitzTimeZone);
if (mcc > 0) {
operatorNumeric = Integer.toString(mcc) + DEFAULT_MNC;
}
return operatorNumeric;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fixUnknownMcc
File: src/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2016-3831
|
MEDIUM
| 5
|
android
|
fixUnknownMcc
|
src/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
|
f47bc301ccbc5e6d8110afab5a1e9bac1d4ef058
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void printMetricHeader(final PrintWriter writer, final String metric,
final long timestamp) {
writer.print(metric);
writer.print(' ');
writer.print(timestamp / 1000L);
writer.print(' ');
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: printMetricHeader
File: src/tsd/GraphHandler.java
Repository: OpenTSDB/opentsdb
The code follows secure coding practices.
|
[
"CWE-78"
] |
CVE-2023-25826
|
CRITICAL
| 9.8
|
OpenTSDB/opentsdb
|
printMetricHeader
|
src/tsd/GraphHandler.java
|
26be40a5e5b6ce8b0b1e4686c4b0d7911e5d8a25
| 0
|
Analyze the following code function for security vulnerabilities
|
public static MappedByteBuffer map(File file, MapMode mode) throws IOException {
return mapInternal(file, mode, -1);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: map
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
|
map
|
guava/src/com/google/common/io/Files.java
|
feb83a1c8fd2e7670b244d5afd23cba5aca43284
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void beforeJFinalStop() {
PluginCoreProcess.getInstance().stopPluginCore();
for (IPlugin plugin : plugins.getPluginList()) {
plugin.stop();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: beforeJFinalStop
File: web/src/main/java/com/zrlog/web/config/ZrLogConfig.java
Repository: 94fzb/zrlog
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-16643
|
LOW
| 3.5
|
94fzb/zrlog
|
beforeJFinalStop
|
web/src/main/java/com/zrlog/web/config/ZrLogConfig.java
|
4a91c83af669e31a22297c14f089d8911d353fa1
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setUserSetupComplete(@UserIdInt int userId) {
Settings.Secure.putIntForUser(
mContext.getContentResolver(), USER_SETUP_COMPLETE, 1, userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUserSetupComplete
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2023-21284
|
MEDIUM
| 5.5
|
android
|
setUserSetupComplete
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public static final int myPid() {
return Os.getpid();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: myPid
File: core/java/android/os/Process.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3911
|
HIGH
| 9.3
|
android
|
myPid
|
core/java/android/os/Process.java
|
2c7008421cb67f5d89f16911bdbe36f6c35311ad
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String formatSize(long bytes) {
for (int i = 6; i > 0; i--) {
double step = Math.pow(1024, i);
if (bytes > step)
return String.format(Locale.ROOT, "%3.1f %s", bytes / step, UNITS[i]);
}
return Long.toString(bytes) + " " + UNITS[0];
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: formatSize
File: src/main/java/com/openkm/util/FormatUtil.java
Repository: openkm/document-management-system
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-40317
|
MEDIUM
| 5.4
|
openkm/document-management-system
|
formatSize
|
src/main/java/com/openkm/util/FormatUtil.java
|
870d518f7de349c3fa4c7b9883789fdca4590c4e
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getAttributeValue(Node n, String name)
{
NamedNodeMap nm = n.getAttributes();
for (int i = 0; i < nm.getLength(); i++)
{
Node node = nm.item(i);
if (name.equals(node.getNodeName()))
{
return node.getNodeValue();
}
}
return "";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAttributeValue
File: dspace-api/src/main/java/org/dspace/app/itemimport/ItemImportServiceImpl.java
Repository: DSpace
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-31195
|
HIGH
| 7.2
|
DSpace
|
getAttributeValue
|
dspace-api/src/main/java/org/dspace/app/itemimport/ItemImportServiceImpl.java
|
7af52a0883a9dbc475cf3001f04ed11b24c8a4c0
| 0
|
Analyze the following code function for security vulnerabilities
|
public void addHeader(String name, String value) {
if (isIncluding()) {
Logger.log(Logger.DEBUG, Launcher.RESOURCES, "WinstoneResponse.HeaderInInclude",
new String[] {name, value});
} else if (isCommitted()) {
Logger.log(Logger.DEBUG, Launcher.RESOURCES, "WinstoneResponse.HeaderAfterCommitted",
new String[] {name, value});
} else if (value != null) {
if (name.equals(CONTENT_TYPE_HEADER)) {
StringBuffer remainderHeader = new StringBuffer();
String headerEncoding = getCharsetFromContentTypeHeader(value, remainderHeader);
if (this.outputWriter != null) {
value = remainderHeader + ";charset=" + getCharacterEncoding();
} else if (headerEncoding != null) {
this.explicitEncoding = headerEncoding;
}
}
this.headers.add(name + ": " + value);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addHeader
File: src/java/winstone/WinstoneResponse.java
Repository: jenkinsci/winstone
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2011-4344
|
LOW
| 2.6
|
jenkinsci/winstone
|
addHeader
|
src/java/winstone/WinstoneResponse.java
|
410ed3001d51c689cf59085b7417466caa2ded7b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public SaReactorFilter addInclude(String... paths) {
includeList.addAll(Arrays.asList(paths));
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addInclude
File: sa-token-starter/sa-token-reactor-spring-boot3-starter/src/main/java/cn/dev33/satoken/reactor/filter/SaReactorFilter.java
Repository: dromara/Sa-Token
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-44794
|
CRITICAL
| 9.8
|
dromara/Sa-Token
|
addInclude
|
sa-token-starter/sa-token-reactor-spring-boot3-starter/src/main/java/cn/dev33/satoken/reactor/filter/SaReactorFilter.java
|
954efeb73277f924f836da2a25322ea35ee1bfa3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setMinimumRequiredWifiSecurityLevel(int level) {
final CallerIdentity caller = getCallerIdentity();
Preconditions.checkCallAuthorization(
isDefaultDeviceOwner(caller) || isProfileOwnerOfOrganizationOwnedDevice(caller),
"Wi-Fi minimum security level can only be controlled by a device owner or "
+ "a profile owner on an organization-owned device.");
boolean valueChanged = false;
synchronized (getLockObject()) {
final ActiveAdmin admin = getProfileOwnerOrDeviceOwnerLocked(caller);
if (admin.mWifiMinimumSecurityLevel != level) {
admin.mWifiMinimumSecurityLevel = level;
saveSettingsLocked(caller.getUserId());
valueChanged = true;
}
}
if (valueChanged) notifyMinimumRequiredWifiSecurityLevelChanged(level);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setMinimumRequiredWifiSecurityLevel
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2023-21284
|
MEDIUM
| 5.5
|
android
|
setMinimumRequiredWifiSecurityLevel
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
private void stopTrackingAppOpsChange(@NonNull String packageName) {
AppOpsChangedListener appOpsChangedListener = mAppOpsChangedListenerPerApp.remove(
packageName);
if (appOpsChangedListener == null) {
Log.i(TAG, "No app ops listener found for " + packageName);
return;
}
mAppOps.stopWatchingMode(appOpsChangedListener);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: stopTrackingAppOpsChange
File: service/java/com/android/server/wifi/hotspot2/PasspointManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-120"
] |
CVE-2023-21243
|
MEDIUM
| 5.5
|
android
|
stopTrackingAppOpsChange
|
service/java/com/android/server/wifi/hotspot2/PasspointManager.java
|
5b49b8711efaadadf5052ba85288860c2d7ca7a6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void parseQueryMTypeWTag() throws Exception {
HttpQuery query = NettyMocks.getQuery(tsdb,
"/api/query?start=1h-ago&m=sum:sys.cpu.0{host=web01}");
TSQuery tsq = (TSQuery) parseQuery.invoke(rpc, tsdb, query, expressions);
TSSubQuery sub = tsq.getQueries().get(0);
assertNotNull(sub.getTags());
assertEquals("literal_or(web01)", sub.getTags().get("host"));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseQueryMTypeWTag
File: test/tsd/TestQueryRpc.java
Repository: OpenTSDB/opentsdb
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-25827
|
MEDIUM
| 6.1
|
OpenTSDB/opentsdb
|
parseQueryMTypeWTag
|
test/tsd/TestQueryRpc.java
|
ff02c1e95e60528275f69b31bcbf7b2ac625cea8
| 0
|
Analyze the following code function for security vulnerabilities
|
private int reduceCompatConfigWidthSize(int curSize, int rotation, DisplayMetrics dm,
int dw, int dh) {
// TODO: Multidisplay: for now only use with default display.
dm.noncompatWidthPixels = mPolicy.getNonDecorDisplayWidth(dw, dh, rotation);
dm.noncompatHeightPixels = mPolicy.getNonDecorDisplayHeight(dw, dh, rotation);
float scale = CompatibilityInfo.computeCompatibleScaling(dm, null);
int size = (int)(((dm.noncompatWidthPixels / scale) / dm.density) + .5f);
if (curSize == 0 || size < curSize) {
curSize = size;
}
return curSize;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: reduceCompatConfigWidthSize
File: services/core/java/com/android/server/wm/WindowManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3875
|
HIGH
| 7.2
|
android
|
reduceCompatConfigWidthSize
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
public void gotoPage(String space, String page, String action, Map<String, ?> queryParameters)
{
gotoPage(Collections.singletonList(space), page, action, queryParameters);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: gotoPage
File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2023-35166
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
gotoPage
|
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
|
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isEnableInMemorySubscriptionMatching() {
return myEnableInMemorySubscriptionMatching;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isEnableInMemorySubscriptionMatching
File: hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
Repository: hapifhir/hapi-fhir
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-32053
|
MEDIUM
| 5
|
hapifhir/hapi-fhir
|
isEnableInMemorySubscriptionMatching
|
hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
|
f2934b229c491235ab0e7782dea86b324521082a
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String getFieldType(Type type)
{
if (type.equals(String.class) ||
(type instanceof Class && ( (Class) type).isEnum()) ||
type.equals(BigInteger.class) || type.equals(BigDecimal.class))
return "str";
else if (type.equals(Boolean.class) || type.equals(Boolean.TYPE))
return "bool";
else if (type.equals(Short.class) || type.equals(Short.TYPE) ||
type.equals(Integer.class) || type.equals(Integer.TYPE) ||
type.equals(Long.class) || type.equals(Long.TYPE) ||
type.equals(Float.class) || type.equals(Float.TYPE) ||
type.equals(Double.class) || type.equals(Double.TYPE) ||
type.equals(Byte.class) || type.equals(Byte.TYPE))
return "number";
else if (type instanceof Class)
{
Class cls = (Class) type;
if (Date.class.isAssignableFrom(cls) || Calendar.class.isAssignableFrom(cls))
return "date";
else if (cls.isArray())
return "bag";
else if (cls.isAssignableFrom(Map.class))
return "map";
else if (cls.isAssignableFrom(Collection.class))
return "bag";
}
else if (type instanceof ParameterizedType)
{
ParameterizedType pt = (ParameterizedType) type;
if (pt.getRawType() instanceof Class && Map.class.isAssignableFrom((Class) pt.getRawType()))
return "map";
else if (pt.getRawType() instanceof Class && Collection.class.isAssignableFrom((Class) pt.getRawType()))
return "bag";
}
return "bean";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFieldType
File: jboss-seam-remoting/src/main/java/org/jboss/seam/remoting/InterfaceGenerator.java
Repository: seam2/jboss-seam
The code follows secure coding practices.
|
[
"CWE-264",
"CWE-200"
] |
CVE-2013-6447
|
MEDIUM
| 5
|
seam2/jboss-seam
|
getFieldType
|
jboss-seam-remoting/src/main/java/org/jboss/seam/remoting/InterfaceGenerator.java
|
090aa6252affc978a96c388e3fc2c1c2688d9bb5
| 0
|
Analyze the following code function for security vulnerabilities
|
private void checkColumnExists(Object propertyId) {
if (getColumn(propertyId) == null) {
throw new IllegalArgumentException(
"There is no column with the property id " + propertyId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkColumnExists
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
|
checkColumnExists
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setUserAgent(String userAgent) {
userAgent = userAgent;
addDefaultHeader("User-Agent", userAgent);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUserAgent
File: samples/client/petstore/java/jersey2-java8-localdatetime/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
|
setUserAgent
|
samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void makeInactive(ProcessStatsService tracker) {
thread = null;
final ProcessStats.ProcessState origBase = baseProcessTracker;
if (origBase != null) {
if (origBase != null) {
origBase.setState(ProcessStats.STATE_NOTHING,
tracker.getMemFactorLocked(), SystemClock.uptimeMillis(), pkgList);
origBase.makeInactive();
}
baseProcessTracker = null;
for (int i=0; i<pkgList.size(); i++) {
ProcessStats.ProcessStateHolder holder = pkgList.valueAt(i);
if (holder.state != null && holder.state != origBase) {
holder.state.makeInactive();
}
holder.state = null;
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: makeInactive
File: services/core/java/com/android/server/am/ProcessRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2500
|
MEDIUM
| 4.3
|
android
|
makeInactive
|
services/core/java/com/android/server/am/ProcessRecord.java
|
9878bb99b77c3681f0fda116e2964bac26f349c3
| 0
|
Analyze the following code function for security vulnerabilities
|
void mutateShortcut(@NonNull final String id, @Nullable final ShortcutInfo shortcut,
@NonNull final Consumer<ShortcutInfo> transform) {
Objects.requireNonNull(id);
Objects.requireNonNull(transform);
synchronized (mLock) {
if (shortcut != null) {
transform.accept(shortcut);
}
final ShortcutInfo si = findShortcutById(id);
if (si == null) {
return;
}
transform.accept(si);
saveShortcut(si);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: mutateShortcut
File: services/core/java/com/android/server/pm/ShortcutPackage.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40075
|
MEDIUM
| 5.5
|
android
|
mutateShortcut
|
services/core/java/com/android/server/pm/ShortcutPackage.java
|
ae768fbb9975fdab267f525831cb52f485ab0ecc
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String getYuiSuffix() {
return DEBUG_YUI ? "debug" : "min";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getYuiSuffix
File: core/src/main/java/hudson/Functions.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-310"
] |
CVE-2014-2061
|
MEDIUM
| 5
|
jenkinsci/jenkins
|
getYuiSuffix
|
core/src/main/java/hudson/Functions.java
|
bf539198564a1108b7b71a973bf7de963a6213ef
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void runOnUiThreadSync(final Runnable r) {
if (getActivity() == null) {
throw new RuntimeException("Cannot run on UI thread because getActivity() is null. This generally means we are running inside a service in the background so UI access is disabled.");
}
final boolean[] completed = new boolean[1];
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
try {
r.run();
} catch(Throwable t) {
com.codename1.io.Log.e(t);
}
synchronized(completed) {
completed[0] = true;
completed.notify();
}
}
});
synchronized(completed) {
while(!completed[0]) {
try {
completed.wait();
} catch(InterruptedException err) {}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: runOnUiThreadSync
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
|
runOnUiThreadSync
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getThemeColor() {
return themeColor.getExpressionString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getThemeColor
File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/MicrosoftTeamsNotifier.java
Repository: codecentric/spring-boot-admin
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2022-46166
|
CRITICAL
| 9.8
|
codecentric/spring-boot-admin
|
getThemeColor
|
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/MicrosoftTeamsNotifier.java
|
c14c3ec12533f71f84de9ce3ce5ceb7991975f75
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String canonicalize(String searchResult)
{
String result = searchResult;
int len = searchResult.length();
if (searchResult.endsWith("\""))
{
result = searchResult.substring(0, len - 1) + "," + rolesCtxDN + "\"";
}
else
{
result = searchResult + "," + rolesCtxDN;
}
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: canonicalize
File: jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/AdvancedLdapLoginModule.java
Repository: wildfly-security/jboss-negotiation
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2015-1849
|
MEDIUM
| 4.3
|
wildfly-security/jboss-negotiation
|
canonicalize
|
jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/AdvancedLdapLoginModule.java
|
0dc9d191b6eb1d13b8f0189c5b02ba6576f4722e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Drawable getDisplayIcon() {
return mDisplayIcon;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDisplayIcon
File: core/java/com/android/internal/app/ChooserActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-254",
"CWE-19"
] |
CVE-2016-3752
|
HIGH
| 7.5
|
android
|
getDisplayIcon
|
core/java/com/android/internal/app/ChooserActivity.java
|
ddbf2db5b946be8fdc45c7b0327bf560b2a06988
| 0
|
Analyze the following code function for security vulnerabilities
|
static Set<String> getOuterJoinAliases(String query) {
Set<String> result = new HashSet<String>();
Matcher matcher = JOIN_PATTERN.matcher(query);
while (matcher.find()) {
String alias = matcher.group(QUERY_JOIN_ALIAS_GROUP_INDEX);
if (StringUtils.hasText(alias)) {
result.add(alias);
}
}
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getOuterJoinAliases
File: src/main/java/org/springframework/data/jpa/repository/query/QueryUtils.java
Repository: spring-projects/spring-data-jpa
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-6652
|
MEDIUM
| 6.8
|
spring-projects/spring-data-jpa
|
getOuterJoinAliases
|
src/main/java/org/springframework/data/jpa/repository/query/QueryUtils.java
|
b8e7fe
| 0
|
Analyze the following code function for security vulnerabilities
|
public static XMLTypeValidator createXMLTypeValidator(String xmlSchema) {
// create a SchemaFactory capable of understanding WXS schemas
SchemaFactory factory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
// load a WXS schema, represented by a Schema instance
Source xmlSchemaSource = new StreamSource(new StringReader(xmlSchema));
try {
return new XMLTypeValidator(factory.newSchema(xmlSchemaSource).newValidator());
} catch (SAXException e) {
e.printStackTrace();
return null;
}
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2018-12544
- Severity: HIGH
- CVSS Score: 7.5
Description: Create safe xml parsers
Function: createXMLTypeValidator
File: vertx-web-api-contract/src/main/java/io/vertx/ext/web/api/validation/impl/XMLTypeValidator.java
Repository: vert-x3/vertx-web
Fixed Code:
public static XMLTypeValidator createXMLTypeValidator(String xmlSchema) {
try {
// create a SchemaFactory capable of understanding WXS schemas
SchemaFactory factory = createSchemaFactoryInstance();
// load a WXS schema, represented by a Schema instance
Source xmlSchemaSource = new StreamSource(new StringReader(xmlSchema));
return new XMLTypeValidator(factory.newSchema(xmlSchemaSource).newValidator());
} catch (SAXException e) {
e.printStackTrace();
return null;
}
}
|
[
"CWE-611"
] |
CVE-2018-12544
|
HIGH
| 7.5
|
vert-x3/vertx-web
|
createXMLTypeValidator
|
vertx-web-api-contract/src/main/java/io/vertx/ext/web/api/validation/impl/XMLTypeValidator.java
|
d814d22ade14bafec47c4447a4ba9bff090f05e8
| 1
|
Analyze the following code function for security vulnerabilities
|
protected final boolean _intOverflow(long value) {
return (value < Integer.MIN_VALUE || value > Integer.MAX_VALUE);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _intOverflow
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
|
_intOverflow
|
src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java
|
d78d00ee7b5245b93103fef3187f70543d67ca33
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean hasCaCertInstalled(@Nullable ComponentName admin, byte[] certBuffer) {
throwIfParentInstance("hasCaCertInstalled");
if (mService != null) {
try {
mService.enforceCanManageCaCerts(admin, mContext.getPackageName());
return getCaCertAlias(certBuffer) != null;
} catch (RemoteException re) {
throw re.rethrowFromSystemServer();
} catch (CertificateException ce) {
Log.w(TAG, "Could not parse certificate", ce);
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasCaCertInstalled
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
|
hasCaCertInstalled
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean copyDocument(DocumentReference sourceDocumentReference, DocumentReference targetDocumentReference,
String wikilocale, boolean reset, boolean force, XWikiContext context) throws XWikiException
{
return copyDocument(sourceDocumentReference, targetDocumentReference, wikilocale, reset, force, false, context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: copyDocument
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-32620
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
copyDocument
|
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 int getHeartbeatTimeout() {
// Permit three missed heartbeats before closing the UI
return (int) (getDeploymentConfiguration().getHeartbeatInterval()
* (3.1));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getHeartbeatTimeout
File: server/src/main/java/com/vaadin/server/VaadinService.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-203"
] |
CVE-2021-31403
|
LOW
| 1.9
|
vaadin/framework
|
getHeartbeatTimeout
|
server/src/main/java/com/vaadin/server/VaadinService.java
|
d852126ab6f0c43f937239305bd0e9594834fe34
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public RequestPathAuthenticatorConfig[] getAllRequestPathAuthenticators(String tenantDomain)
throws IdentityApplicationManagementException {
try {
startTenantFlow(tenantDomain);
IdentityProviderDAO idpdao = ApplicationMgtSystemConfig.getInstance().getIdentityProviderDAO();
List<RequestPathAuthenticatorConfig> reqPathAuthenticators = idpdao.getAllRequestPathAuthenticators();
if (reqPathAuthenticators != null) {
return reqPathAuthenticators.toArray(new RequestPathAuthenticatorConfig[reqPathAuthenticators.size()]);
}
return new RequestPathAuthenticatorConfig[0];
} catch (Exception e) {
String error = "Error occurred while retrieving all Request Path Authenticators" + ". " + e.getMessage();
throw new IdentityApplicationManagementException(error, e);
} finally {
endTenantFlow();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAllRequestPathAuthenticators
File: components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
Repository: wso2/carbon-identity-framework
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-42646
|
MEDIUM
| 6.4
|
wso2/carbon-identity-framework
|
getAllRequestPathAuthenticators
|
components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
|
e9119883ee02a884f3c76c7bbc4022a4f4c58fc0
| 0
|
Analyze the following code function for security vulnerabilities
|
private void initialize(DataSource dataSource) throws AmbiguousTableNameException {
databaseTester = new DataSourceDatabaseTester(dataSource);
databaseTester.setSetUpOperation(DatabaseOperation.CLEAN_INSERT);
databaseTester.setTearDownOperation(DatabaseOperation.DELETE_ALL);
DefaultDataSet dataSet = new DefaultDataSet();
dataSet.addTable(new DefaultTable("agents"));
dataSet.addTable(new DefaultTable("pipelines"));
dataSet.addTable(new DefaultTable("pipelinestates"));
dataSet.addTable(new DefaultTable("materials"));
dataSet.addTable(new DefaultTable("modifications"));
dataSet.addTable(new DefaultTable("pipelineMaterialRevisions"));
dataSet.addTable(new DefaultTable("modifiedFiles"));
dataSet.addTable(new DefaultTable("notificationfilters"));
dataSet.addTable(new DefaultTable("users"));
dataSet.addTable(new DefaultTable("artifactPropertiesGenerator"));
dataSet.addTable(new DefaultTable("stages"));
dataSet.addTable(new DefaultTable("pipelineLabelCounts"));
dataSet.addTable(new DefaultTable("environmentVariables"));
dataSet.addTable(new DefaultTable("properties"));
dataSet.addTable(new DefaultTable("artifactPlans"));
dataSet.addTable(new DefaultTable("buildStateTransitions"));
dataSet.addTable(new DefaultTable("resources"));
dataSet.addTable(new DefaultTable("builds"));
dataSet.addTable(new DefaultTable("stageArtifactCleanupProhibited"));
dataSet.addTable(new DefaultTable("serverBackups"));
dataSet.addTable(new DefaultTable("jobAgentMetadata"));
dataSet.addTable(new DefaultTable("DataSharingSettings"));
dataSet.addTable(new DefaultTable("UsageDataReporting"));
databaseTester.setDataSet(dataSet);
}
|
Vulnerability Classification:
- CWE: CWE-697
- CVE: CVE-2022-39308
- Severity: MEDIUM
- CVSS Score: 5.9
Description: Access Token APIs (#5797)
* Define a AuthTokenSqlMapDao to store and retrieve token information from DB
* Introduce Auth Token API to manage auth tokens
* Store the hashed token instead of storing the raw value
* Some tests
* Store information of the user who has created the auth token
* Use SHA-256 instead of MD5 for hashing token value
* Change username data type from VARCHAR to VARCHAR_IGNORECASE
* Introduce AuthTokenMother to create authToken in tests
* Fix auth token controller specs
* Remove unused class variable from test
* Introduce auth token index endpoint to fetch all the tokens belonging to me
* Add extra attributes to auth token
* Salt Id
* Salt Value
* Auth Config Id
* Revoked At
* Add support for revoking access tokens
Add a method to validate and fetch access token object provided access token
* Rename controller package and module
* rename service and dao
* Rename auth token package
* Rename rules under url rewrite
* Renamed few more occurences of auth token to acccess tokens
Function: initialize
File: server/src/test-shared/java/com/thoughtworks/go/server/dao/DatabaseAccessHelper.java
Repository: gocd
Fixed Code:
private void initialize(DataSource dataSource) throws AmbiguousTableNameException {
databaseTester = new DataSourceDatabaseTester(dataSource);
databaseTester.setSetUpOperation(DatabaseOperation.CLEAN_INSERT);
databaseTester.setTearDownOperation(DatabaseOperation.DELETE_ALL);
DefaultDataSet dataSet = new DefaultDataSet();
dataSet.addTable(new DefaultTable("agents"));
dataSet.addTable(new DefaultTable("pipelines"));
dataSet.addTable(new DefaultTable("pipelinestates"));
dataSet.addTable(new DefaultTable("materials"));
dataSet.addTable(new DefaultTable("modifications"));
dataSet.addTable(new DefaultTable("pipelineMaterialRevisions"));
dataSet.addTable(new DefaultTable("modifiedFiles"));
dataSet.addTable(new DefaultTable("notificationfilters"));
dataSet.addTable(new DefaultTable("users"));
dataSet.addTable(new DefaultTable("artifactPropertiesGenerator"));
dataSet.addTable(new DefaultTable("stages"));
dataSet.addTable(new DefaultTable("pipelineLabelCounts"));
dataSet.addTable(new DefaultTable("environmentVariables"));
dataSet.addTable(new DefaultTable("properties"));
dataSet.addTable(new DefaultTable("artifactPlans"));
dataSet.addTable(new DefaultTable("buildStateTransitions"));
dataSet.addTable(new DefaultTable("resources"));
dataSet.addTable(new DefaultTable("builds"));
dataSet.addTable(new DefaultTable("stageArtifactCleanupProhibited"));
dataSet.addTable(new DefaultTable("serverBackups"));
dataSet.addTable(new DefaultTable("jobAgentMetadata"));
dataSet.addTable(new DefaultTable("DataSharingSettings"));
dataSet.addTable(new DefaultTable("UsageDataReporting"));
dataSet.addTable(new DefaultTable("AccessToken"));
databaseTester.setDataSet(dataSet);
}
|
[
"CWE-697"
] |
CVE-2022-39308
|
MEDIUM
| 5.9
|
gocd
|
initialize
|
server/src/test-shared/java/com/thoughtworks/go/server/dao/DatabaseAccessHelper.java
|
236d4baf92e6607f2841c151c855adcc477238b8
| 1
|
Analyze the following code function for security vulnerabilities
|
public void requestEnd(VaadinRequest request, VaadinResponse response,
VaadinSession session) {
if (session != null) {
assert VaadinSession.getCurrent() == session;
session.lock();
try {
cleanupSession(session);
final long duration = (System.nanoTime() - (Long) request
.getAttribute(REQUEST_START_TIME_ATTRIBUTE)) / 1000000;
session.setLastRequestDuration(duration);
} finally {
session.unlock();
}
}
CurrentInstance.clearAll();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: requestEnd
File: server/src/main/java/com/vaadin/server/VaadinService.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-203"
] |
CVE-2021-31403
|
LOW
| 1.9
|
vaadin/framework
|
requestEnd
|
server/src/main/java/com/vaadin/server/VaadinService.java
|
d852126ab6f0c43f937239305bd0e9594834fe34
| 0
|
Analyze the following code function for security vulnerabilities
|
private List<ResolveInfo> collectReceiverComponents(Intent intent, String resolvedType,
int callingUid, int[] users) {
List<ResolveInfo> receivers = null;
try {
HashSet<ComponentName> singleUserReceivers = null;
boolean scannedFirstReceivers = false;
for (int user : users) {
// Skip users that have Shell restrictions
if (callingUid == Process.SHELL_UID
&& getUserManagerLocked().hasUserRestriction(
UserManager.DISALLOW_DEBUGGING_FEATURES, user)) {
continue;
}
List<ResolveInfo> newReceivers = AppGlobals.getPackageManager()
.queryIntentReceivers(intent, resolvedType, STOCK_PM_FLAGS, user);
if (user != 0 && newReceivers != null) {
// If this is not the primary user, we need to check for
// any receivers that should be filtered out.
for (int i=0; i<newReceivers.size(); i++) {
ResolveInfo ri = newReceivers.get(i);
if ((ri.activityInfo.flags&ActivityInfo.FLAG_PRIMARY_USER_ONLY) != 0) {
newReceivers.remove(i);
i--;
}
}
}
if (newReceivers != null && newReceivers.size() == 0) {
newReceivers = null;
}
if (receivers == null) {
receivers = newReceivers;
} else if (newReceivers != null) {
// We need to concatenate the additional receivers
// found with what we have do far. This would be easy,
// but we also need to de-dup any receivers that are
// singleUser.
if (!scannedFirstReceivers) {
// Collect any single user receivers we had already retrieved.
scannedFirstReceivers = true;
for (int i=0; i<receivers.size(); i++) {
ResolveInfo ri = receivers.get(i);
if ((ri.activityInfo.flags&ActivityInfo.FLAG_SINGLE_USER) != 0) {
ComponentName cn = new ComponentName(
ri.activityInfo.packageName, ri.activityInfo.name);
if (singleUserReceivers == null) {
singleUserReceivers = new HashSet<ComponentName>();
}
singleUserReceivers.add(cn);
}
}
}
// Add the new results to the existing results, tracking
// and de-dupping single user receivers.
for (int i=0; i<newReceivers.size(); i++) {
ResolveInfo ri = newReceivers.get(i);
if ((ri.activityInfo.flags&ActivityInfo.FLAG_SINGLE_USER) != 0) {
ComponentName cn = new ComponentName(
ri.activityInfo.packageName, ri.activityInfo.name);
if (singleUserReceivers == null) {
singleUserReceivers = new HashSet<ComponentName>();
}
if (!singleUserReceivers.contains(cn)) {
singleUserReceivers.add(cn);
receivers.add(ri);
}
} else {
receivers.add(ri);
}
}
}
}
} catch (RemoteException ex) {
// pm is in same process, this will never happen.
}
return receivers;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: collectReceiverComponents
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3833
|
MEDIUM
| 4.3
|
android
|
collectReceiverComponents
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void instanceTrackingConfig(XmlGenerator gen, Config config) {
InstanceTrackingConfig trackingConfig = config.getInstanceTrackingConfig();
gen.open("instance-tracking", "enabled", trackingConfig.isEnabled())
.node("file-name", trackingConfig.getFileName())
.node("format-pattern", trackingConfig.getFormatPattern())
.close();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: instanceTrackingConfig
File: hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-522"
] |
CVE-2023-33264
|
MEDIUM
| 4.3
|
hazelcast
|
instanceTrackingConfig
|
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
|
80a502d53cc48bf895711ab55f95e3a51e344ac1
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setPasswordIfNotBlank(String password) {
this.password = StringUtils.stripToNull(password);
this.secretParamsForPassword = SecretParams.parse(password);
this.encryptedPassword = StringUtils.stripToNull(encryptedPassword);
if (this.password == null) {
return;
}
try {
this.encryptedPassword = this.goCipher.encrypt(password);
} catch (Exception e) {
bomb("Password encryption failed. Please verify your cipher key.", e);
}
this.password = null;
}
|
Vulnerability Classification:
- CWE: CWE-668
- CVE: CVE-2022-39309
- Severity: MEDIUM
- CVSS Score: 6.5
Description: SCMMaterial changes #000
* SCMMaterial unlike SCMMaterialConfig objects are used for polling,
they do not need to encrypt the password. Hence removing the
encryptedPassword attribute.
Function: setPasswordIfNotBlank
File: domain/src/main/java/com/thoughtworks/go/config/materials/ScmMaterial.java
Repository: gocd
Fixed Code:
private void setPasswordIfNotBlank(String password) {
this.password = StringUtils.stripToNull(password);
this.secretParamsForPassword = SecretParams.parse(password);
}
|
[
"CWE-668"
] |
CVE-2022-39309
|
MEDIUM
| 6.5
|
gocd
|
setPasswordIfNotBlank
|
domain/src/main/java/com/thoughtworks/go/config/materials/ScmMaterial.java
|
691b479f1310034992da141760e9c5d1f5b60e8a
| 1
|
Analyze the following code function for security vulnerabilities
|
public SyncStatusInfo getStatusByAuthority(EndPoint info) {
if (info.target_provider && (info.account == null || info.provider == null)) {
return null;
} else if (info.target_service && info.service == null) {
return null;
}
synchronized (mAuthorities) {
final int N = mSyncStatus.size();
for (int i = 0; i < N; i++) {
SyncStatusInfo cur = mSyncStatus.valueAt(i);
AuthorityInfo ainfo = mAuthorities.get(cur.authorityId);
if (ainfo != null
&& ainfo.target.matchesSpec(info)) {
return cur;
}
}
return null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStatusByAuthority
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
|
getStatusByAuthority
|
services/core/java/com/android/server/content/SyncStorageEngine.java
|
d3383d5bfab296ba3adbc121ff8a7b542bde4afb
| 0
|
Analyze the following code function for security vulnerabilities
|
private Route.Definition appendDefinition(String method, String pattern, Route.Filter filter) {
return appendDefinition(method, pattern, filter, Route.Definition::new);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: appendDefinition
File: jooby/src/main/java/org/jooby/Jooby.java
Repository: jooby-project/jooby
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-7647
|
MEDIUM
| 5
|
jooby-project/jooby
|
appendDefinition
|
jooby/src/main/java/org/jooby/Jooby.java
|
34f526028e6cd0652125baa33936ffb6a8a4a009
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isForceHiding(WindowManager.LayoutParams attrs) {
return (attrs.privateFlags & PRIVATE_FLAG_KEYGUARD) != 0 ||
(isKeyguardHostWindow(attrs) &&
(mKeyguardDelegate != null && mKeyguardDelegate.isShowing())) ||
(attrs.type == TYPE_KEYGUARD_SCRIM);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isForceHiding
File: policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-0812
|
MEDIUM
| 6.6
|
android
|
isForceHiding
|
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
|
84669ca8de55d38073a0dcb01074233b0a417541
| 0
|
Analyze the following code function for security vulnerabilities
|
public static <K, V> ConcurrentMap<K, V> newConcurrentHashMap(Map<? extends K, ? extends V> map) {
return new ConcurrentHashMap<K, V>(map);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: newConcurrentHashMap
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
|
newConcurrentHashMap
|
common/src/main/java/io/netty/util/internal/PlatformDependent.java
|
185f8b2756a36aaa4f973f1a2a025e7d981823f1
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getSignatureBlockEntryName() {
return mSignatureBlockEntry.getName();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSignatureBlockEntryName
File: src/main/java/com/android/apksig/internal/apk/v1/V1SchemeVerifier.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21253
|
MEDIUM
| 5.5
|
android
|
getSignatureBlockEntryName
|
src/main/java/com/android/apksig/internal/apk/v1/V1SchemeVerifier.java
|
41d882324288085fd32ae0bb70dc85f5fd0e2be7
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean addPermission(@NonNull PermissionInfo permissionInfo, boolean async) {
try {
return mPermissionManager.addPermission(permissionInfo, async);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addPermission
File: core/java/android/permission/PermissionManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-281"
] |
CVE-2023-21249
|
MEDIUM
| 5.5
|
android
|
addPermission
|
core/java/android/permission/PermissionManager.java
|
c00b7e7dbc1fa30339adef693d02a51254755d7f
| 0
|
Analyze the following code function for security vulnerabilities
|
public void selectStream(AsyncResult<SQLConnection> conn, String sql,
Handler<AsyncResult<SQLRowStream>> replyHandler) {
try {
if (conn.failed()) {
replyHandler.handle(Future.failedFuture(conn.cause()));
return;
}
conn.result().queryStream(sql, replyHandler);
} catch (Exception e) {
log.error("select stream sql: " + e.getMessage() + " - " + sql, e);
replyHandler.handle(Future.failedFuture(e));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: selectStream
File: domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
selectStream
|
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
private RenderingContext getRenderingContext()
{
if (this.renderingContext == null) {
this.renderingContext = Utils.getComponent(RenderingContext.class);
}
return this.renderingContext;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRenderingContext
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-26470
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
getRenderingContext
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
abstract public boolean isCanceled();
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isCanceled
File: main/src/com/google/refine/importing/ImportingUtilities.java
Repository: OpenRefine
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-19859
|
MEDIUM
| 4
|
OpenRefine
|
isCanceled
|
main/src/com/google/refine/importing/ImportingUtilities.java
|
e243e73e4064de87a913946bd320fbbe246da656
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean noteNotificationOp(String pkg, int uid) {
if (mAppOps.noteOpNoThrow(AppOpsManager.OP_POST_NOTIFICATION, uid, pkg)
!= AppOpsManager.MODE_ALLOWED) {
Slog.v(TAG, "notifications are disabled by AppOps for " + pkg);
return false;
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: noteNotificationOp
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
|
noteNotificationOp
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getFontAscent(Object nativeFont) {
Paint font = (nativeFont == null ? this.defaultFont
: (Paint) ((NativeFont) nativeFont).font);
return -Math.round(font.getFontMetrics().ascent);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFontAscent
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
|
getFontAscent
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public Descriptor<RepositoryBrowser<?>> getRepositoryBrowser(String shortClassName) {
return findDescriptor(shortClassName,RepositoryBrowser.all());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRepositoryBrowser
File: core/src/main/java/jenkins/model/Jenkins.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-2065
|
MEDIUM
| 4.3
|
jenkinsci/jenkins
|
getRepositoryBrowser
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void copyResource(Object obj, String fnm, File fdest) throws IOException, ContentError {
String s = getRelativeResource(obj, fnm);
FileUtil.writeStringToFile(s, new File(fdest, fnm));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: copyResource
File: src/main/java/org/lemsml/jlems/io/util/JUtil.java
Repository: LEMS/jLEMS
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-4583
|
HIGH
| 8.8
|
LEMS/jLEMS
|
copyResource
|
src/main/java/org/lemsml/jlems/io/util/JUtil.java
|
8c224637d7d561076364a9e3c2c375daeaf463dc
| 0
|
Analyze the following code function for security vulnerabilities
|
static Map<String,Long> parseRevisionFile(AbstractBuild<?,?> build) throws IOException {
return parseRevisionFile(build,true,false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseRevisionFile
File: src/main/java/hudson/scm/SubversionSCM.java
Repository: jenkinsci/subversion-plugin
The code follows secure coding practices.
|
[
"CWE-255"
] |
CVE-2013-6372
|
LOW
| 2.1
|
jenkinsci/subversion-plugin
|
parseRevisionFile
|
src/main/java/hudson/scm/SubversionSCM.java
|
7d4562d6f7e40de04bbe29577b51c79f07d05ba6
| 0
|
Analyze the following code function for security vulnerabilities
|
public static XWiki getMainXWiki(XWikiContext context) throws XWikiException
{
return getMainXWiki(true, context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMainXWiki
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
|
getMainXWiki
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.