instruction
string | input
string | output
string | cwe_ids
list | cve_id
string | severity
string | cvss_score
float64 | repo_name
string | func_name
string | file_path
string | commit_hash
string | is_vulnerable
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Analyze the following code function for security vulnerabilities
|
public void setSiteId(short siteId) {
this.siteId = siteId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSiteId
File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/log/LogLogin.java
Repository: sanluan/PublicCMS
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-21333
|
LOW
| 3.5
|
sanluan/PublicCMS
|
setSiteId
|
publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/log/LogLogin.java
|
b4d5956e65b14347b162424abb197a180229b3db
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setBearerToken(String bearerToken) {
for (Authentication auth : authentications.values()) {
if (auth instanceof HttpBearerAuth) {
((HttpBearerAuth) auth).setBearerToken(bearerToken);
return this;
}
}
throw new RuntimeException("No Bearer authentication configured!");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setBearerToken
File: samples/client/petstore/java/okhttp-gson-parcelableModel/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
|
setBearerToken
|
samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
private void manCenterXmlGenerator(XmlGenerator gen, Config config) {
if (config.getManagementCenterConfig() != null) {
ManagementCenterConfig mcConfig = config.getManagementCenterConfig();
gen.open("management-center",
"enabled", mcConfig.isEnabled(),
"update-interval", mcConfig.getUpdateInterval());
gen.node("url", mcConfig.getUrl());
if (mcConfig.getUrl() != null) {
mcMutualAuthConfigXmlGenerator(gen, config.getManagementCenterConfig());
}
gen.close();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: manCenterXmlGenerator
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
|
manCenterXmlGenerator
|
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable
public URI getUrl() {
return url;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUrl
File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/HipchatNotifier.java
Repository: codecentric/spring-boot-admin
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2022-46166
|
CRITICAL
| 9.8
|
codecentric/spring-boot-admin
|
getUrl
|
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/HipchatNotifier.java
|
c14c3ec12533f71f84de9ce3ce5ceb7991975f75
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Object makeTransformScale(float scaleX, float scaleY, float scaleZ) {
CN1Matrix4f t = CN1Matrix4f.makeIdentity();
t.scale(scaleX, scaleY, scaleZ);
return t;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: makeTransformScale
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
|
makeTransformScale
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public Map<String, Jiffle.ImageRole> getImageParams() {
return Collections.unmodifiableMap(imageParams);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getImageParams
File: jt-jiffle/jt-jiffle-language/src/main/java/it/geosolutions/jaiext/jiffle/Jiffle.java
Repository: geosolutions-it/jai-ext
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2022-24816
|
HIGH
| 7.5
|
geosolutions-it/jai-ext
|
getImageParams
|
jt-jiffle/jt-jiffle-language/src/main/java/it/geosolutions/jaiext/jiffle/Jiffle.java
|
cb1d6565d38954676b0a366da4f965fef38da1cb
| 0
|
Analyze the following code function for security vulnerabilities
|
private void cacheRawData(byte[] b, int len) {
if (lastReadRawDataCache != null) {
System.arraycopy(b, 0, lastReadRawDataCache, 0, len);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cacheRawData
File: src/main/java/net/lingala/zip4j/io/inputstream/CipherInputStream.java
Repository: srikanth-lingala/zip4j
The code follows secure coding practices.
|
[
"CWE-346"
] |
CVE-2023-22899
|
MEDIUM
| 5.9
|
srikanth-lingala/zip4j
|
cacheRawData
|
src/main/java/net/lingala/zip4j/io/inputstream/CipherInputStream.java
|
ddd8fdc8ad0583eb4a6172dc86c72c881485c55b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean convertToTranslucent(IBinder token, Bundle options) {
SafeActivityOptions safeOptions = SafeActivityOptions.fromBundle(options);
final long origId = Binder.clearCallingIdentity();
try {
synchronized (this) {
final ActivityRecord r = ActivityRecord.isInStackLocked(token);
if (r == null) {
return false;
}
final TaskRecord task = r.getTask();
int index = task.mActivities.lastIndexOf(r);
if (index > 0) {
ActivityRecord under = task.mActivities.get(index - 1);
under.returningOptions = safeOptions != null ? safeOptions.getOptions(r) : null;
}
final boolean translucentChanged = r.changeWindowTranslucency(false);
if (translucentChanged) {
r.getStack().convertActivityToTranslucent(r);
}
mStackSupervisor.ensureActivitiesVisibleLocked(null, 0, !PRESERVE_WINDOWS);
mWindowManager.setAppFullscreen(token, false);
return translucentChanged;
}
} finally {
Binder.restoreCallingIdentity(origId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: convertToTranslucent
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
|
convertToTranslucent
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void onStart() {
super.onStart();
Intent intent = getIntent();
intent.putExtra(
SettingsActivity.SP_FEED_LIST_LAYOUT,
mPrefs.getString(SettingsActivity.SP_FEED_LIST_LAYOUT, "0")
);
setResult(RESULT_OK,intent);
}
|
Vulnerability Classification:
- CWE: CWE-829
- CVE: CVE-2021-41256
- Severity: MEDIUM
- CVSS Score: 5.8
Description: fix GHSL-2021-1033
Signed-off-by: David Luhmer <david-dev@live.de>
Function: onStart
File: News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/SettingsActivity.java
Repository: nextcloud/news-android
Fixed Code:
@Override
protected void onStart() {
super.onStart();
// Fix GHSL-2021-1033
Intent intent = new Intent();
String feedListLayout = mPrefs.getString(SettingsActivity.SP_FEED_LIST_LAYOUT, "0");
intent.putExtra(SettingsActivity.AI_FEED_LIST_LAYOUT, feedListLayout);
setResult(RESULT_OK, intent);
}
|
[
"CWE-829"
] |
CVE-2021-41256
|
MEDIUM
| 5.8
|
nextcloud/news-android
|
onStart
|
News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/SettingsActivity.java
|
05449cb666059af7de2302df9d5c02997a23df85
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onPosition(AjaxRequestTarget target, String position) {
state.position = position;
pushState(target);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onPosition
File: server-core/src/main/java/io/onedev/server/web/page/project/blob/ProjectBlobPage.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-434"
] |
CVE-2021-21245
|
HIGH
| 7.5
|
theonedev/onedev
|
onPosition
|
server-core/src/main/java/io/onedev/server/web/page/project/blob/ProjectBlobPage.java
|
0c060153fb97c0288a1917efdb17cc426934dacb
| 0
|
Analyze the following code function for security vulnerabilities
|
public InputStream openInputStream(Object connection) throws IOException {
if (connection instanceof String) {
String con = (String) connection;
if (con.startsWith("file://")) {
con = con.substring(7);
}
InputStream fc = createFileInputStream(con);
BufferedInputStream o = new BufferedInputStream(fc, con);
return o;
}
if(connection instanceof HttpURLConnection) {
HttpURLConnection ht = (HttpURLConnection)connection;
if(ht.getResponseCode() < 400) {
return new BufferedInputStream(ht.getInputStream());
}
return new BufferedInputStream(ht.getErrorStream());
} else {
return new BufferedInputStream(((URLConnection) connection).getInputStream());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: openInputStream
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
|
openInputStream
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {
if (preference == mSubMenuVoicemailSettings) {
return true;
} else if (preference.getKey().equals(mVoicemailSettings.getKey())) {
// Check key instead of comparing reference because closing the voicemail notification
// ringtone dialog invokes onResume(), but leaves the old preference screen up,
// TODO: Revert to checking reference after migrating voicemail to its own activity.
if (DBG) log("onPreferenceTreeClick: Voicemail Settings Preference is clicked.");
final Dialog dialog = ((PreferenceScreen) preference).getDialog();
if (dialog != null) {
dialog.getActionBar().setDisplayHomeAsUpEnabled(false);
}
mSubMenuVoicemailSettings =
(EditPhoneNumberPreference) findPreference(BUTTON_VOICEMAIL_KEY);
mSubMenuVoicemailSettings.setParentActivity(this, VOICEMAIL_PREF_ID, this);
mSubMenuVoicemailSettings.setDialogOnClosedListener(this);
mSubMenuVoicemailSettings.setDialogTitle(R.string.voicemail_settings_number_label);
updateVoiceNumberField();
if (preference.getIntent() != null) {
if (DBG) log("Invoking cfg intent " + preference.getIntent().getPackage());
// onActivityResult() will be responsible for resetting some of variables.
this.startActivityForResult(preference.getIntent(), VOICEMAIL_PROVIDER_CFG_ID);
return true;
} else {
if (DBG) log("onPreferenceTreeClick(). No intent; use default behavior in xml.");
// onActivityResult() will not be called, so reset variables here.
mPreviousVMProviderKey = VoicemailProviderListPreference.DEFAULT_KEY;
mVMProviderSettingsForced = false;
return false;
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onPreferenceTreeClick
File: src/com/android/phone/settings/VoicemailSettingsActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-862"
] |
CVE-2023-35665
|
HIGH
| 7.8
|
android
|
onPreferenceTreeClick
|
src/com/android/phone/settings/VoicemailSettingsActivity.java
|
674039e70e1c5bf29b808899ac80c709acc82290
| 0
|
Analyze the following code function for security vulnerabilities
|
private void commonSymmetricEncInterceptorConfigXmlBodyGenerator(XmlGenerator gen,
AbstractSymmetricEncryptionConfig sec) {
if (sec == null) {
return;
}
gen.node("algorithm", sec.getAlgorithm())
.node("salt", getOrMaskValue(sec.getSalt()));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: commonSymmetricEncInterceptorConfigXmlBodyGenerator
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
|
commonSymmetricEncInterceptorConfigXmlBodyGenerator
|
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
|
80a502d53cc48bf895711ab55f95e3a51e344ac1
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean getAllowGeneratedReplies() {
return mAllowGeneratedReplies;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAllowGeneratedReplies
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
getAllowGeneratedReplies
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
public void updateObject(List<String> spaces, String page, String className, int objectNumber, Object... properties)
{
// TODO: would be even quicker using REST
Map<String, Object> queryParameters =
(Map<String, Object>) toQueryParameters(className, objectNumber, properties);
// Append the updateOrCreate objectPolicy since we always want this in our tests.
queryParameters.put("objectPolicy", "updateOrCreate");
gotoPage(spaces, page, "save", queryParameters);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateObject
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
|
updateObject
|
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
|
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void navNodeActive(StringBuffer sb,
NavNode node,
NavTreeIndex treeIndex,
Map parameters,
int depth) {
if (!canRender(node, depth)) {
return;
}
titleBuf.append(" - " + node.getName());
renderNode(sb, node, treeIndex, parameters,
"active");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: navNodeActive
File: java/code/src/com/redhat/rhn/frontend/nav/DialognavRenderer.java
Repository: spacewalkproject/spacewalk
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2016-3079
|
MEDIUM
| 4.3
|
spacewalkproject/spacewalk
|
navNodeActive
|
java/code/src/com/redhat/rhn/frontend/nav/DialognavRenderer.java
|
7b9ff9ad
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isAccountNonExpired() {
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isAccountNonExpired
File: core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2014-2064
|
MEDIUM
| 5
|
jenkinsci/jenkins
|
isAccountNonExpired
|
core/src/main/java/hudson/security/HudsonPrivateSecurityRealm.java
|
fbf96734470caba9364f04e0b77b0bae7293a1ec
| 0
|
Analyze the following code function for security vulnerabilities
|
public void finishPreferencePanel(int resultCode, Intent resultData) {
setResult(resultCode, resultData);
finish();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: finishPreferencePanel
File: src/com/android/settings/SettingsActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2018-9501
|
HIGH
| 7.2
|
android
|
finishPreferencePanel
|
src/com/android/settings/SettingsActivity.java
|
5e43341b8c7eddce88f79c9a5068362927c05b54
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getUrl() {
String currDomain = SaManager.getConfig().getCurrDomain();
if( ! SaFoxUtil.isEmpty(currDomain)) {
return currDomain + this.getRequestPath();
}
return request.getURI().toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUrl
File: sa-token-starter/sa-token-reactor-spring-boot3-starter/src/main/java/cn/dev33/satoken/reactor/model/SaRequestForReactor.java
Repository: dromara/Sa-Token
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-44794
|
CRITICAL
| 9.8
|
dromara/Sa-Token
|
getUrl
|
sa-token-starter/sa-token-reactor-spring-boot3-starter/src/main/java/cn/dev33/satoken/reactor/model/SaRequestForReactor.java
|
954efeb73277f924f836da2a25322ea35ee1bfa3
| 0
|
Analyze the following code function for security vulnerabilities
|
protected Optional<String> parseClaimString(JwtClaims claims, String claimName) {
return parseClaim(claims, claimName).map(Object::toString);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseClaimString
File: security-oauth2/src/main/java/io/micronaut/security/oauth2/client/IdTokenClaimsValidator.java
Repository: micronaut-projects/micronaut-security
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2023-36820
|
MEDIUM
| 6.5
|
micronaut-projects/micronaut-security
|
parseClaimString
|
security-oauth2/src/main/java/io/micronaut/security/oauth2/client/IdTokenClaimsValidator.java
|
9728b925221a0d87798ccf250657a3c214b7e980
| 0
|
Analyze the following code function for security vulnerabilities
|
private void addWindowToListInOrderLocked(final WindowState win, boolean addToToken) {
if (DEBUG_FOCUS_LIGHT) Slog.d(TAG, "addWindowToListInOrderLocked: win=" + win +
" Callers=" + Debug.getCallers(4));
if (win.mAttachedWindow == null) {
final WindowToken token = win.mToken;
int tokenWindowsPos = 0;
if (token.appWindowToken != null) {
tokenWindowsPos = addAppWindowToListLocked(win);
} else {
addFreeWindowToListLocked(win);
}
if (addToToken) {
if (DEBUG_ADD_REMOVE) Slog.v(TAG, "Adding " + win + " to " + token);
token.windows.add(tokenWindowsPos, win);
}
} else {
addAttachedWindowToListLocked(win, addToToken);
}
if (win.mAppToken != null && addToToken) {
win.mAppToken.allAppWindows.add(win);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addWindowToListInOrderLocked
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
|
addWindowToListInOrderLocked
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override public synchronized void publish(LogRecord record) {
if (record.getLevel().intValue() >= Level.INFO.intValue()) {
super.publish(record);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: publish
File: core/src/main/java/hudson/WebAppMain.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-254"
] |
CVE-2014-9634
|
MEDIUM
| 5
|
jenkinsci/jenkins
|
publish
|
core/src/main/java/hudson/WebAppMain.java
|
582128b9ac179a788d43c1478be8a5224dc19710
| 0
|
Analyze the following code function for security vulnerabilities
|
private static BufferedImage getImage(final String name) {
try {
final InputStream is = PSystemVersion.class.getResourceAsStream(name);
final BufferedImage image = SImageIO.read(is);
is.close();
return image;
} catch (IOException e) {
Logme.error(e);
}
return new BufferedImage(10, 10, BufferedImage.TYPE_INT_ARGB);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getImage
File: src/net/sourceforge/plantuml/version/PSystemVersion.java
Repository: plantuml
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2023-3431
|
MEDIUM
| 5.3
|
plantuml
|
getImage
|
src/net/sourceforge/plantuml/version/PSystemVersion.java
|
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public DefaultJpaInstanceConfiguration transactionType(TransactionType transactionType) {
put(PersistenceUnitProperties.TRANSACTION_TYPE, transactionType.name());
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: transactionType
File: src/main/java/uk/q3c/krail/jpa/persist/DefaultJpaInstanceConfiguration.java
Repository: KrailOrg/krail-jpa
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-15018
|
MEDIUM
| 5.2
|
KrailOrg/krail-jpa
|
transactionType
|
src/main/java/uk/q3c/krail/jpa/persist/DefaultJpaInstanceConfiguration.java
|
c1e848665492e21ef6cc9be443205e36b9a1f6be
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onDestroy() {
Log_OC.v(TAG, "Destroying service");
mBinder = null;
mServiceHandler = null;
mServiceLooper.quit();
mServiceLooper = null;
mNotificationManager = null;
// remove AccountsUpdatedListener
AccountManager am = AccountManager.get(getApplicationContext());
am.removeOnAccountsUpdatedListener(this);
super.onDestroy();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onDestroy
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
|
onDestroy
|
src/main/java/com/owncloud/android/files/services/FileDownloader.java
|
27559efb79d45782e000b762860658d49e9c35e9
| 0
|
Analyze the following code function for security vulnerabilities
|
public void onPermissionsChanged(int uid) {
if (mPermissionListeners.getRegisteredCallbackCount() > 0) {
obtainMessage(MSG_ON_PERMISSIONS_CHANGED, uid, 0).sendToTarget();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onPermissionsChanged
File: services/core/java/com/android/server/pm/PackageManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2016-2497
|
HIGH
| 7.5
|
android
|
onPermissionsChanged
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
private void migrate50(File dataDir, Stack<Integer> versions) {
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: migrate50
File: server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-338"
] |
CVE-2023-24828
|
HIGH
| 8.8
|
theonedev/onedev
|
migrate50
|
server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
|
d67dd9686897fe5e4ab881d749464aa7c06a68e5
| 0
|
Analyze the following code function for security vulnerabilities
|
private void runWithServiceContext(Runnable runnable) {
setCurrent(this);
try {
runnable.run();
} finally {
setCurrent(null);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: runWithServiceContext
File: flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-203"
] |
CVE-2021-31404
|
LOW
| 1.9
|
vaadin/flow
|
runWithServiceContext
|
flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
|
621ef1b322737d963bee624b2d2e38cd739903d9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void destroy() {
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: destroy
File: hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/JavaDefaultSerializers.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
destroy
|
hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/JavaDefaultSerializers.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
public ServerBuilder port(ServerPort port) {
ports.add(requireNonNull(port, "port"));
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: port
File: core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-44487
|
HIGH
| 7.5
|
line/armeria
|
port
|
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
|
df7f85824a62e997b910b5d6194a3335841065fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public void nullifyUsedVars() {
bundle = null;
options = null;
sharedState = null;
host = null;
domain = null;
userName = null;
smbConfFileName = null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nullifyUsedVars
File: openam-authentication/openam-auth-nt/src/main/java/com/sun/identity/authentication/modules/nt/NT.java
Repository: OpenIdentityPlatform/OpenAM
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2022-34298
|
MEDIUM
| 5
|
OpenIdentityPlatform/OpenAM
|
nullifyUsedVars
|
openam-authentication/openam-auth-nt/src/main/java/com/sun/identity/authentication/modules/nt/NT.java
|
3b242fbd6bdc1e2fa2f07842213a6301a0a0b468
| 0
|
Analyze the following code function for security vulnerabilities
|
public Route.Definition apply(final Route.Definition route) {
attrs.build().forEach(route::attr);
if (name != null) {
route.name(name);
}
if (prefix != null) {
route.name(prefix + "/" + route.name());
}
if (consumes != null) {
route.consumes(consumes);
}
if (produces != null) {
route.produces(produces);
}
if (excludes != null) {
route.excludes(excludes);
}
if (mapper != null) {
route.map(mapper);
}
if (renderer != null) {
route.renderer(renderer);
}
return route;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: apply
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
|
apply
|
jooby/src/main/java/org/jooby/Jooby.java
|
34f526028e6cd0652125baa33936ffb6a8a4a009
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isEnforceReferentialIntegrityOnWrite() {
return myEnforceReferentialIntegrityOnWrite;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isEnforceReferentialIntegrityOnWrite
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
|
isEnforceReferentialIntegrityOnWrite
|
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
|
public void onKeyguardVisibilityChanged(boolean showing) {
if (DEBUG) Log.d(TAG, "onKeyguardVisibilityChanged(" + showing + ")");
mKeyguardIsVisible = showing;
for (int i = 0; i < mCallbacks.size(); i++) {
KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get();
if (cb != null) {
cb.onKeyguardVisibilityChangedRaw(showing);
}
}
if (!showing) {
mFingerprintAlreadyAuthenticated = false;
}
updateFingerprintListeningState();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onKeyguardVisibilityChanged
File: packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
onKeyguardVisibilityChanged
|
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
protected TokenCache.Value readCachedTokenInternal(
UserAccounts accounts,
Account account,
String tokenType,
String callingPackage,
byte[] pkgSigDigest) {
synchronized (accounts.cacheLock) {
return accounts.accountTokenCaches.get(
account, tokenType, callingPackage, pkgSigDigest);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readCachedTokenInternal
File: services/core/java/com/android/server/accounts/AccountManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-502"
] |
CVE-2023-45777
|
HIGH
| 7.8
|
android
|
readCachedTokenInternal
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getRequestPath() {
return request.path();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRequestPath
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
|
getRequestPath
|
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
|
public boolean getReuseParser() {
return reuseParser;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getReuseParser
File: core/src/java/org/jdom2/input/SAXBuilder.java
Repository: hunterhacker/jdom
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-33813
|
MEDIUM
| 5
|
hunterhacker/jdom
|
getReuseParser
|
core/src/java/org/jdom2/input/SAXBuilder.java
|
bd3ab78370098491911d7fe9d7a43b97144a234e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void onStartedWakingUp(boolean cameraGestureTriggered) {
Trace.beginSection("KeyguardViewMediator#onStartedWakingUp");
// TODO: Rename all screen off/on references to interactive/sleeping
synchronized (this) {
mDeviceInteractive = true;
if (mPendingLock && !cameraGestureTriggered) {
doKeyguardLocked(null);
}
mAnimatingScreenOff = false;
cancelDoKeyguardLaterLocked();
cancelDoKeyguardForChildProfilesLocked();
if (DEBUG) Log.d(TAG, "onStartedWakingUp, seq = " + mDelayedShowingSequence);
notifyStartedWakingUp();
}
mUpdateMonitor.dispatchStartedWakingUp();
maybeSendUserPresentBroadcast();
Trace.endSection();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onStartedWakingUp
File: packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21267
|
MEDIUM
| 5.5
|
android
|
onStartedWakingUp
|
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
|
d18d8b350756b0e89e051736c1f28744ed31e93a
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getCode() {
return code;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCode
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
|
getCode
|
base/common/src/main/java/com/netscape/certsrv/base/PKIException.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public static void addExclude(String URLPattern) {
// not needed anymore
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addExclude
File: dotCMS/src/main/java/com/dotmarketing/filters/CMSFilter.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-434"
] |
CVE-2017-11466
|
HIGH
| 9
|
dotCMS/core
|
addExclude
|
dotCMS/src/main/java/com/dotmarketing/filters/CMSFilter.java
|
ab2bb2e00b841d131b8734227f9106e3ac31bb99
| 0
|
Analyze the following code function for security vulnerabilities
|
private JSON buildResultSearch(Entity searchEntity, String quickFields, String q, String appendWhere, int maxResults) {
String searchWhere = "(1=1)";
if (StringUtils.isNotBlank(q)) {
// 查询字段
Set<String> searchFields = ParseHelper.buildQuickFields(searchEntity, quickFields);
if (searchFields.isEmpty()) {
return JSONUtils.EMPTY_ARRAY;
}
String like = " like '%" + StringEscapeUtils.escapeSql(q) + "%'";
searchWhere = StringUtils.join(searchFields.iterator(), like + " or ") + like;
}
if (appendWhere != null) {
searchWhere = String.format("(%s) and (%s)", appendWhere, searchWhere);
} else {
searchWhere = String.format("(%s)", searchWhere);
}
List<Object> result = resultSearch(searchWhere, searchEntity, maxResults);
return (JSON) JSON.toJSON(result);
}
|
Vulnerability Classification:
- CWE: CWE-89
- CVE: CVE-2023-1495
- Severity: MEDIUM
- CVSS Score: 6.5
Description: H5 sync2 (#595)
* style: 目录样式gh
* style: J_new
* feat: advListFilterTabs
* feat: nav-copyto
* enh: 助记码全拼
* enh: 地图搜索选点
* enh: topnav
* list pn
* .form-line.v33
* open TAG
* KVS addShutdownHook
* fix: #594
---------
Co-authored-by: devezhao <zhaofang123@gmail.com>
Function: buildResultSearch
File: src/main/java/com/rebuild/web/general/ReferenceSearchController.java
Repository: getrebuild/rebuild
Fixed Code:
private JSON buildResultSearch(Entity searchEntity, String quickFields, String q, String appendWhere, int maxResults) {
String searchWhere = "(1=1)";
if (StringUtils.isNotBlank(q)) {
// 查询字段
Set<String> searchFields = ParseHelper.buildQuickFields(searchEntity, quickFields);
if (searchFields.isEmpty()) {
return JSONUtils.EMPTY_ARRAY;
}
String like = " like '%" + CommonsUtils.escapeSql(q) + "%'";
searchWhere = StringUtils.join(searchFields.iterator(), like + " or ") + like;
}
if (appendWhere != null) {
searchWhere = String.format("(%s) and (%s)", appendWhere, searchWhere);
} else {
searchWhere = String.format("(%s)", searchWhere);
}
List<Object> result = resultSearch(searchWhere, searchEntity, maxResults);
return (JSON) JSON.toJSON(result);
}
|
[
"CWE-89"
] |
CVE-2023-1495
|
MEDIUM
| 6.5
|
getrebuild/rebuild
|
buildResultSearch
|
src/main/java/com/rebuild/web/general/ReferenceSearchController.java
|
c9474f84e5f376dd2ade2078e3039961a9425da7
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public String toString() {
StringBuilder sb = new StringBuilder(128);
sb.append("FileMetadata{");
sb.append(packageName); sb.append(',');
sb.append(type); sb.append(',');
sb.append(domain); sb.append(':'); sb.append(path); sb.append(',');
sb.append(size);
sb.append('}');
return sb.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toString
File: services/backup/java/com/android/server/backup/BackupManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3759
|
MEDIUM
| 5
|
android
|
toString
|
services/backup/java/com/android/server/backup/BackupManagerService.java
|
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
| 0
|
Analyze the following code function for security vulnerabilities
|
@Exported
public String getDescription() {
return systemMessage;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDescription
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
|
getDescription
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
private void language() {
Button langBtn = findViewById(R.id.hidBtn);
ArrayList<String> languages;
if(!config.getHIDCustomise()) {
languages = new ArrayList<>(Arrays.asList(getResources().getStringArray(R.array.hidLanguages)));
langBtn.setText(languages.get(config.getHIDLanguage()));
langBtn.setOnClickListener(view -> {
AlertDialog.Builder builder = new AlertDialog.Builder(ConfigActivity.this);
builder.setCancelable(false);
builder.setSingleChoiceItems(getResources().getStringArray(R.array.hidLanguages), config.getHIDLanguage(), (dialog, i) -> {
config.setHIDLanguage(i);
dialog.dismiss();
langBtn.setText(languages.get(config.getHIDLanguage()));
});
builder.setNegativeButton(getResources().getString(R.string.btn_cancel), (dialog, which) -> dialog.cancel());
AlertDialog hidDialog = builder.create();
Objects.requireNonNull(hidDialog.getWindow()).setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE);
hidDialog.show();
});
} else {
ArrayList<String> filename = new ArrayList<>();
languages = new ArrayList<>();
final File[] tmp = Objects.requireNonNull(this.getExternalFilesDir("keymap")).listFiles();
assert tmp != null;
for(File file: tmp) {
if(file.getPath().endsWith(".json"))
filename.add(file.getName());
}
for(int i = 0; i < filename.size(); i++) {
languages.add(filename.get(i).replace(".json", "").replace("_"," ").toUpperCase());
}
langBtn.setText(languages.get(filename.indexOf(config.getHIDFileSelected())));
langBtn.setOnClickListener(view -> {
AlertDialog.Builder builder = new AlertDialog.Builder(ConfigActivity.this);
builder.setCancelable(false);
builder.setSingleChoiceItems(languages.toArray(new CharSequence[0]), filename.indexOf(config.getHIDFileSelected()), (dialog, i) -> {
config.setHIDFileSelected(filename.get(i));
dialog.dismiss();
langBtn.setText(languages.get(i));
});
builder.setNegativeButton(getResources().getString(R.string.btn_cancel), (dialog, which) -> dialog.cancel());
AlertDialog hidDialog = builder.create();
Objects.requireNonNull(hidDialog.getWindow()).setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE);
hidDialog.show();
});
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: language
File: app/src/main/java/com/mayank/rucky/activity/ConfigActivity.java
Repository: mayankmetha/Rucky
The code follows secure coding practices.
|
[
"CWE-327"
] |
CVE-2021-41096
|
MEDIUM
| 5
|
mayankmetha/Rucky
|
language
|
app/src/main/java/com/mayank/rucky/activity/ConfigActivity.java
|
5e3a477365009f488a73efd26a91168502de1b93
| 0
|
Analyze the following code function for security vulnerabilities
|
private SSLEngineResult.Status getEngineStatus() {
return engineClosed? CLOSED : OK;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getEngineStatus
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
|
getEngineStatus
|
handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java
|
bc8291c80912a39fbd2303e18476d15751af0bf1
| 0
|
Analyze the following code function for security vulnerabilities
|
private String calcCheckUrl(String fieldName) {
String capitalizedFieldName = StringUtils.capitalize(fieldName);
Method method = ReflectionUtils.getPublicMethodNamed(getClass(),"doCheck"+ capitalizedFieldName);
if(method==null)
return NONE;
return '\'' + getDescriptorUrl() + "/check" + capitalizedFieldName + '\'' + buildParameterList(method, new StringBuilder()).append(".toString()");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: calcCheckUrl
File: core/src/main/java/hudson/model/Descriptor.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
calcCheckUrl
|
core/src/main/java/hudson/model/Descriptor.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isBooting() {
return mBooting;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isBooting
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
|
isBooting
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void lockScreen(){
((CodenameOneActivity)getContext()).lockScreen();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: lockScreen
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
|
lockScreen
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
private void processDataModels(DataModelType xmlDataModel, PackageType xmlPackage,
PluginPackages pluginPackageEntity) {
log.info("start to process data model...");
if (xmlDataModel == null) {
log.info("data model is null...");
return;
}
int lastDataModelVersion = -1;
PluginPackageDataModel existModelEntity = pluginPackageDataModelMapper
.selectLatestDataModelByPackageName(pluginPackageEntity.getName());
if (existModelEntity != null) {
lastDataModelVersion = existModelEntity.getVersion();
}
PluginPackageDataModel dataModelEntity = new PluginPackageDataModel();
dataModelEntity.setId(LocalIdGenerator.generateId());
boolean isDynamic = "true".equalsIgnoreCase(xmlDataModel.getIsDynamic());
dataModelEntity.setIsDynamic(isDynamic);
dataModelEntity.setPackageName(xmlPackage.getName());
String updatePath = xmlDataModel.getPath();
if (StringUtils.isEmpty(updatePath) && isDynamic) {
updatePath = DEFAULT_DATA_MODEL_UPDATE_PATH;
}
dataModelEntity.setUpdatePath(updatePath);
String updateMethod = xmlDataModel.getMethod();
if (StringUtils.isEmpty(updateMethod) && isDynamic) {
updateMethod = DEFAULT_DATA_MODEL_UPDATE_METHOD;
}
dataModelEntity.setUpdateMethod(updateMethod);
dataModelEntity.setUpdateSource(PluginPackageDataModel.PLUGIN_PACKAGE);
dataModelEntity.setUpdateTime(System.currentTimeMillis());
dataModelEntity.setVersion(lastDataModelVersion + 1);
pluginPackageDataModelMapper.insert(dataModelEntity);
List<EntityType> xmlEntityList = xmlDataModel.getEntity();
if (xmlEntityList == null || xmlEntityList.isEmpty()) {
return;
}
List<PluginPackageAttributes> savedAttributes = new ArrayList<>();
for (EntityType xmlEntity : xmlEntityList) {
PluginPackageEntities entity = new PluginPackageEntities();
entity.setDataModelId(dataModelEntity.getId());
entity.setDataModelVersion(dataModelEntity.getVersion());
entity.setDescription(xmlEntity.getDescription());
entity.setDisplayName(xmlEntity.getDisplayName());
entity.setId(LocalIdGenerator.generateId());
entity.setName(xmlEntity.getName());
entity.setPackageName(xmlPackage.getName());
pluginPackageEntitiesMapper.insert(entity);
List<AttributeType> xmlAttributeList = xmlEntity.getAttribute();
if (xmlAttributeList == null || xmlAttributeList.isEmpty()) {
continue;
}
int orderNo = 0;
for (AttributeType xmlAttribute : xmlAttributeList) {
PluginPackageAttributes attributeEntity = new PluginPackageAttributes();
attributeEntity.setId(LocalIdGenerator.generateId());
attributeEntity.setCreatedTime(new Date());
attributeEntity.setOrderNo(orderNo);
attributeEntity.setDataType(xmlAttribute.getDatatype());
attributeEntity.setDescription(xmlAttribute.getDescription());
attributeEntity.setEntityId(entity.getId());
attributeEntity.setName(xmlAttribute.getName());
String refPackage = xmlAttribute.getRefPackage();
if (StringUtils.isBlank(refPackage)) {
refPackage = xmlPackage.getName();
}
attributeEntity.setRefAttr(xmlAttribute.getRef());
attributeEntity.setRefPackage(refPackage);
attributeEntity.setRefEntity(xmlAttribute.getRefEntity());
boolean mandatory = false;
if("Y".equalsIgnoreCase(xmlAttribute.getRequired())) {
mandatory = true;
}
attributeEntity.setMandatory(mandatory);
String multiple = "N";
if(StringUtils.isNoneBlank(xmlAttribute.getMultiple())) {
multiple = xmlAttribute.getMultiple().trim();
}
attributeEntity.setMultiple(multiple);
pluginPackageAttributesMapper.insert(attributeEntity);
savedAttributes.add(attributeEntity);
orderNo++;
}
}
for (PluginPackageAttributes attribute : savedAttributes) {
String referenceId = calAttributeReference(pluginPackageEntity, dataModelEntity, attribute);
if (StringUtils.isNoneBlank(referenceId)) {
attribute.setReferenceId(referenceId);
pluginPackageAttributesMapper.updateByPrimaryKey(attribute);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: processDataModels
File: platform-core/src/main/java/com/webank/wecube/platform/core/service/plugin/PluginArtifactsMgmtService.java
Repository: WeBankPartners/wecube-platform
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-45746
|
MEDIUM
| 5
|
WeBankPartners/wecube-platform
|
processDataModels
|
platform-core/src/main/java/com/webank/wecube/platform/core/service/plugin/PluginArtifactsMgmtService.java
|
1164dae43c505f8a0233cc049b2689d6ca6d0c37
| 0
|
Analyze the following code function for security vulnerabilities
|
private void fetchLogs(ProxiedResourceHelper proxiedResourceHelper, String nodeId, List<LogFile> logFiles, Path nodeDir) {
final Path logDir = nodeDir.resolve("logs");
var ignored = logDir.toFile().mkdirs();
applyBundleSizeLogFileLimit(logFiles).forEach(logFile -> {
try {
final ProxiedResource.NodeResponse<ResponseBody> response = proxiedResourceHelper.doNodeApiCall(nodeId,
RemoteSupportBundleInterface.class, f -> f.getLogFile(logFile.id()), Function.identity(), CALL_TIMEOUT);
if (response.entity().isPresent()) {
final String logName = Path.of(logFile.name()).getFileName().toString();
try (FileOutputStream fileOutputStream = new FileOutputStream(logDir.resolve(logName).toFile())) {
try (var logFileStream = response.entity().get().byteStream()) {
logFileStream.transferTo(fileOutputStream);
}
}
} else {
LOG.warn("Failed to fetch logfile <{}> from node <{}>: Empty response", logFile.name(), nodeId);
}
} catch (IOException e) {
LOG.warn("Failed to fetch logfile <{}> from node <{}>", logFile.name(), nodeId, e);
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fetchLogs
File: graylog2-server/src/main/java/org/graylog2/rest/resources/system/debug/bundle/SupportBundleService.java
Repository: Graylog2/graylog2-server
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2023-41044
|
LOW
| 3.8
|
Graylog2/graylog2-server
|
fetchLogs
|
graylog2-server/src/main/java/org/graylog2/rest/resources/system/debug/bundle/SupportBundleService.java
|
02b8792e6f4b829f0c1d87fcbf2d58b73458b938
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setHidden(String file, boolean h) {
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setHidden
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
|
setHidden
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void maybePruneOldTraces(File tracesDir) {
final long now = System.currentTimeMillis();
final File[] traceFiles = tracesDir.listFiles();
if (traceFiles != null) {
for (File file : traceFiles) {
if ((now - file.lastModified()) > DAY_IN_MILLIS) {
if (!file.delete()) {
Slog.w(TAG, "Unable to prune stale trace file: " + file);
}
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: maybePruneOldTraces
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
|
maybePruneOldTraces
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
private void decryptBlock(int[][] KW)
{
int t0 = this.C0 ^ KW[ROUNDS][0];
int t1 = this.C1 ^ KW[ROUNDS][1];
int t2 = this.C2 ^ KW[ROUNDS][2];
int r = ROUNDS - 1, r0, r1, r2, r3 = this.C3 ^ KW[ROUNDS][3];
while (r > 1)
{
r0 = Tinv0[t0&255] ^ shift(Tinv0[(r3>>8)&255], 24) ^ shift(Tinv0[(t2>>16)&255], 16) ^ shift(Tinv0[(t1>>24)&255], 8) ^ KW[r][0];
r1 = Tinv0[t1&255] ^ shift(Tinv0[(t0>>8)&255], 24) ^ shift(Tinv0[(r3>>16)&255], 16) ^ shift(Tinv0[(t2>>24)&255], 8) ^ KW[r][1];
r2 = Tinv0[t2&255] ^ shift(Tinv0[(t1>>8)&255], 24) ^ shift(Tinv0[(t0>>16)&255], 16) ^ shift(Tinv0[(r3>>24)&255], 8) ^ KW[r][2];
r3 = Tinv0[r3&255] ^ shift(Tinv0[(t2>>8)&255], 24) ^ shift(Tinv0[(t1>>16)&255], 16) ^ shift(Tinv0[(t0>>24)&255], 8) ^ KW[r--][3];
t0 = Tinv0[r0&255] ^ shift(Tinv0[(r3>>8)&255], 24) ^ shift(Tinv0[(r2>>16)&255], 16) ^ shift(Tinv0[(r1>>24)&255], 8) ^ KW[r][0];
t1 = Tinv0[r1&255] ^ shift(Tinv0[(r0>>8)&255], 24) ^ shift(Tinv0[(r3>>16)&255], 16) ^ shift(Tinv0[(r2>>24)&255], 8) ^ KW[r][1];
t2 = Tinv0[r2&255] ^ shift(Tinv0[(r1>>8)&255], 24) ^ shift(Tinv0[(r0>>16)&255], 16) ^ shift(Tinv0[(r3>>24)&255], 8) ^ KW[r][2];
r3 = Tinv0[r3&255] ^ shift(Tinv0[(r2>>8)&255], 24) ^ shift(Tinv0[(r1>>16)&255], 16) ^ shift(Tinv0[(r0>>24)&255], 8) ^ KW[r--][3];
}
r0 = Tinv0[t0&255] ^ shift(Tinv0[(r3>>8)&255], 24) ^ shift(Tinv0[(t2>>16)&255], 16) ^ shift(Tinv0[(t1>>24)&255], 8) ^ KW[r][0];
r1 = Tinv0[t1&255] ^ shift(Tinv0[(t0>>8)&255], 24) ^ shift(Tinv0[(r3>>16)&255], 16) ^ shift(Tinv0[(t2>>24)&255], 8) ^ KW[r][1];
r2 = Tinv0[t2&255] ^ shift(Tinv0[(t1>>8)&255], 24) ^ shift(Tinv0[(t0>>16)&255], 16) ^ shift(Tinv0[(r3>>24)&255], 8) ^ KW[r][2];
r3 = Tinv0[r3&255] ^ shift(Tinv0[(t2>>8)&255], 24) ^ shift(Tinv0[(t1>>16)&255], 16) ^ shift(Tinv0[(t0>>24)&255], 8) ^ KW[r][3];
// the final round's table is a simple function of Si so we don't use a whole other four tables for it
this.C0 = (Si[r0&255]&255) ^ ((Si[(r3>>8)&255]&255)<<8) ^ ((Si[(r2>>16)&255]&255)<<16) ^ (Si[(r1>>24)&255]<<24) ^ KW[0][0];
this.C1 = (Si[r1&255]&255) ^ ((Si[(r0>>8)&255]&255)<<8) ^ ((Si[(r3>>16)&255]&255)<<16) ^ (Si[(r2>>24)&255]<<24) ^ KW[0][1];
this.C2 = (Si[r2&255]&255) ^ ((Si[(r1>>8)&255]&255)<<8) ^ ((Si[(r0>>16)&255]&255)<<16) ^ (Si[(r3>>24)&255]<<24) ^ KW[0][2];
this.C3 = (Si[r3&255]&255) ^ ((Si[(r2>>8)&255]&255)<<8) ^ ((Si[(r1>>16)&255]&255)<<16) ^ (Si[(r0>>24)&255]<<24) ^ KW[0][3];
}
|
Vulnerability Classification:
- CWE: CWE-310
- CVE: CVE-2016-1000339
- Severity: MEDIUM
- CVSS Score: 5.0
Description: added better support for DH domain parameters
added s box allocation to AESEngine
reduced use of AESFastEngine.
Function: decryptBlock
File: core/src/main/java/org/bouncycastle/crypto/engines/AESEngine.java
Repository: bcgit/bc-java
Fixed Code:
private void decryptBlock(int[][] KW)
{
int t0 = this.C0 ^ KW[ROUNDS][0];
int t1 = this.C1 ^ KW[ROUNDS][1];
int t2 = this.C2 ^ KW[ROUNDS][2];
int r = ROUNDS - 1, r0, r1, r2, r3 = this.C3 ^ KW[ROUNDS][3];
while (r > 1)
{
r0 = Tinv0[t0&255] ^ shift(Tinv0[(r3>>8)&255], 24) ^ shift(Tinv0[(t2>>16)&255], 16) ^ shift(Tinv0[(t1>>24)&255], 8) ^ KW[r][0];
r1 = Tinv0[t1&255] ^ shift(Tinv0[(t0>>8)&255], 24) ^ shift(Tinv0[(r3>>16)&255], 16) ^ shift(Tinv0[(t2>>24)&255], 8) ^ KW[r][1];
r2 = Tinv0[t2&255] ^ shift(Tinv0[(t1>>8)&255], 24) ^ shift(Tinv0[(t0>>16)&255], 16) ^ shift(Tinv0[(r3>>24)&255], 8) ^ KW[r][2];
r3 = Tinv0[r3&255] ^ shift(Tinv0[(t2>>8)&255], 24) ^ shift(Tinv0[(t1>>16)&255], 16) ^ shift(Tinv0[(t0>>24)&255], 8) ^ KW[r--][3];
t0 = Tinv0[r0&255] ^ shift(Tinv0[(r3>>8)&255], 24) ^ shift(Tinv0[(r2>>16)&255], 16) ^ shift(Tinv0[(r1>>24)&255], 8) ^ KW[r][0];
t1 = Tinv0[r1&255] ^ shift(Tinv0[(r0>>8)&255], 24) ^ shift(Tinv0[(r3>>16)&255], 16) ^ shift(Tinv0[(r2>>24)&255], 8) ^ KW[r][1];
t2 = Tinv0[r2&255] ^ shift(Tinv0[(r1>>8)&255], 24) ^ shift(Tinv0[(r0>>16)&255], 16) ^ shift(Tinv0[(r3>>24)&255], 8) ^ KW[r][2];
r3 = Tinv0[r3&255] ^ shift(Tinv0[(r2>>8)&255], 24) ^ shift(Tinv0[(r1>>16)&255], 16) ^ shift(Tinv0[(r0>>24)&255], 8) ^ KW[r--][3];
}
r0 = Tinv0[t0&255] ^ shift(Tinv0[(r3>>8)&255], 24) ^ shift(Tinv0[(t2>>16)&255], 16) ^ shift(Tinv0[(t1>>24)&255], 8) ^ KW[r][0];
r1 = Tinv0[t1&255] ^ shift(Tinv0[(t0>>8)&255], 24) ^ shift(Tinv0[(r3>>16)&255], 16) ^ shift(Tinv0[(t2>>24)&255], 8) ^ KW[r][1];
r2 = Tinv0[t2&255] ^ shift(Tinv0[(t1>>8)&255], 24) ^ shift(Tinv0[(t0>>16)&255], 16) ^ shift(Tinv0[(r3>>24)&255], 8) ^ KW[r][2];
r3 = Tinv0[r3&255] ^ shift(Tinv0[(t2>>8)&255], 24) ^ shift(Tinv0[(t1>>16)&255], 16) ^ shift(Tinv0[(t0>>24)&255], 8) ^ KW[r][3];
// the final round's table is a simple function of Si so we don't use a whole other four tables for it
this.C0 = (Si[r0&255]&255) ^ ((s[(r3>>8)&255]&255)<<8) ^ ((s[(r2>>16)&255]&255)<<16) ^ (Si[(r1>>24)&255]<<24) ^ KW[0][0];
this.C1 = (s[r1&255]&255) ^ ((s[(r0>>8)&255]&255)<<8) ^ ((Si[(r3>>16)&255]&255)<<16) ^ (s[(r2>>24)&255]<<24) ^ KW[0][1];
this.C2 = (s[r2&255]&255) ^ ((Si[(r1>>8)&255]&255)<<8) ^ ((Si[(r0>>16)&255]&255)<<16) ^ (s[(r3>>24)&255]<<24) ^ KW[0][2];
this.C3 = (Si[r3&255]&255) ^ ((s[(r2>>8)&255]&255)<<8) ^ ((s[(r1>>16)&255]&255)<<16) ^ (s[(r0>>24)&255]<<24) ^ KW[0][3];
}
|
[
"CWE-310"
] |
CVE-2016-1000339
|
MEDIUM
| 5
|
bcgit/bc-java
|
decryptBlock
|
core/src/main/java/org/bouncycastle/crypto/engines/AESEngine.java
|
413b42f4d770456508585c830cfcde95f9b0e93b
| 1
|
Analyze the following code function for security vulnerabilities
|
public static String getJwtTokenFromAuthorizationHeaderValue(final String value) {
if (value != null) {
final String bearerSchemaName = "Bearer ";
if (value.startsWith(bearerSchemaName)) {
return value.substring(bearerSchemaName.length());
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getJwtTokenFromAuthorizationHeaderValue
File: ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/authentication/AuthenticationUtils.java
Repository: hyperledger/besu
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-21369
|
MEDIUM
| 4
|
hyperledger/besu
|
getJwtTokenFromAuthorizationHeaderValue
|
ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/authentication/AuthenticationUtils.java
|
06e35a58c07a30c0fbdc0aae45a3e8b06b53c022
| 0
|
Analyze the following code function for security vulnerabilities
|
@Beta
@SuppressWarnings("GoodTime") // reading system time without TimeSource
public static void touch(File file) throws IOException {
checkNotNull(file);
if (!file.createNewFile() && !file.setLastModified(System.currentTimeMillis())) {
throw new IOException("Unable to update modification time of " + file);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: touch
File: guava/src/com/google/common/io/Files.java
Repository: google/guava
The code follows secure coding practices.
|
[
"CWE-732"
] |
CVE-2020-8908
|
LOW
| 2.1
|
google/guava
|
touch
|
guava/src/com/google/common/io/Files.java
|
fec0dbc4634006a6162cfd4d0d09c962073ddf40
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void exchangeComplete(HttpServerExchange exchange) {
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: exchangeComplete
File: servlet/src/main/java/io/undertow/servlet/handlers/ServletInitialHandler.java
Repository: undertow-io/undertow
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2019-10184
|
MEDIUM
| 5
|
undertow-io/undertow
|
exchangeComplete
|
servlet/src/main/java/io/undertow/servlet/handlers/ServletInitialHandler.java
|
d2715e3afa13f50deaa19643676816ce391551e9
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isUnicornFlagEnabled() {
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isUnicornFlagEnabled
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
isUnicornFlagEnabled
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getShellCommand()
{
return shellCommand;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getShellCommand
File: src/main/java/org/codehaus/plexus/util/cli/shell/Shell.java
Repository: codehaus-plexus/plexus-utils
The code follows secure coding practices.
|
[
"CWE-78"
] |
CVE-2017-1000487
|
HIGH
| 7.5
|
codehaus-plexus/plexus-utils
|
getShellCommand
|
src/main/java/org/codehaus/plexus/util/cli/shell/Shell.java
|
b38a1b3a4352303e4312b2bb601a0d7ec6e28f41
| 0
|
Analyze the following code function for security vulnerabilities
|
public ModuleLocation[] getLocations(EnvVars env, AbstractBuild<?,?> build) {
// check if we've got a old location
if (modules != null) {
// import the old configuration
List<ModuleLocation> oldLocations = new ArrayList<ModuleLocation>();
StringTokenizer tokens = new StringTokenizer(modules);
while (tokens.hasMoreTokens()) {
// the remote (repository location)
// the normalized name is always without the trailing '/'
String remoteLoc = Util.removeTrailingSlash(tokens.nextToken());
oldLocations.add(new ModuleLocation(remoteLoc, null));
}
locations = oldLocations.toArray(new ModuleLocation[oldLocations.size()]);
modules = null;
}
if(env == null && build == null)
return locations;
ModuleLocation[] outLocations = new ModuleLocation[locations.length];
EnvVars env2 = env != null ? new EnvVars(env) : new EnvVars();
if (build != null) {
env2.putAll(build.getBuildVariables());
}
EnvVars.resolve(env2);
for (int i = 0; i < outLocations.length; i++) {
outLocations[i] = locations[i].getExpandedLocation(env2);
}
return outLocations;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLocations
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
|
getLocations
|
src/main/java/hudson/scm/SubversionSCM.java
|
7d4562d6f7e40de04bbe29577b51c79f07d05ba6
| 0
|
Analyze the following code function for security vulnerabilities
|
public static long getTreeIndex(long index, int xmssTreeHeight)
{
return index >> xmssTreeHeight;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTreeIndex
File: core/src/main/java/org/bouncycastle/pqc/crypto/xmss/XMSSUtil.java
Repository: bcgit/bc-java
The code follows secure coding practices.
|
[
"CWE-470"
] |
CVE-2018-1000613
|
HIGH
| 7.5
|
bcgit/bc-java
|
getTreeIndex
|
core/src/main/java/org/bouncycastle/pqc/crypto/xmss/XMSSUtil.java
|
4092ede58da51af9a21e4825fbad0d9a3ef5a223
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Route.Collection patch(final String path1, final String path2,
final Route.OneArgHandler handler) {
return new Route.Collection(
new Route.Definition[]{patch(path1, handler), patch(path2, handler)});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: patch
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
|
patch
|
jooby/src/main/java/org/jooby/Jooby.java
|
34f526028e6cd0652125baa33936ffb6a8a4a009
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable
public DatabaseErrorHandler getErrorHandler() {
return mErrorHandler;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getErrorHandler
File: core/java/android/database/sqlite/SQLiteDatabase.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2018-9493
|
LOW
| 2.1
|
android
|
getErrorHandler
|
core/java/android/database/sqlite/SQLiteDatabase.java
|
ebc250d16c747f4161167b5ff58b3aea88b37acf
| 0
|
Analyze the following code function for security vulnerabilities
|
public abstract long getLastModified();
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLastModified
File: opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
Repository: OpenNMS/opennms
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2021-25931
|
MEDIUM
| 6.8
|
OpenNMS/opennms
|
getLastModified
|
opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
|
607151ea8f90212a3fb37c977fa57c7d58d26a84
| 0
|
Analyze the following code function for security vulnerabilities
|
public static ArrayList<Object[]> generateData() {
DirectoryNode root = new DirectoryNode("Root", PathsAndFiles.CACHE_DIR.getFile(), null);
CacheDirectory.getDirStructure(root);
ArrayList<Object[]> data = new ArrayList<>();
for (DirectoryNode identifier : root.getChildren()) {
for (DirectoryNode type : identifier.getChildren()) {
for (DirectoryNode domain : type.getChildren()) {
//after domain, there is optional port dir. It is skipped here (as is skipped path on domain)
for (DirectoryNode leaf : CacheDirectory.getLeafData(domain)) {
final File f = leaf.getFile();
PropertiesFile pf = new PropertiesFile(new File(f.toString() + CacheDirectory.INFO_SUFFIX));
// if jnlp-path in .info equals path of app to delete mark to delete
String jnlpPath = pf.getProperty(CacheEntry.KEY_JNLP_PATH);
Object[] o = {
leaf,
f.getParentFile(),
type,
domain,
f.length(),
new Date(f.lastModified()),
jnlpPath
};
data.add(o);
}
}
}
}
return data;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: generateData
File: core/src/main/java/net/sourceforge/jnlp/cache/CacheUtil.java
Repository: AdoptOpenJDK/IcedTea-Web
The code follows secure coding practices.
|
[
"CWE-345",
"CWE-94",
"CWE-22"
] |
CVE-2019-10182
|
MEDIUM
| 5.8
|
AdoptOpenJDK/IcedTea-Web
|
generateData
|
core/src/main/java/net/sourceforge/jnlp/cache/CacheUtil.java
|
2ab070cdac087bd208f64fa8138bb709f8d7680c
| 0
|
Analyze the following code function for security vulnerabilities
|
public final int getParagraphRight(int line) {
int right = mWidth;
int dir = getParagraphDirection(line);
if (dir == DIR_LEFT_TO_RIGHT || !mSpannedText) {
return right; // leading margin has no impact, or no styles
}
return right - getParagraphLeadingMargin(line);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getParagraphRight
File: core/java/android/text/Layout.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-9452
|
MEDIUM
| 4.3
|
android
|
getParagraphRight
|
core/java/android/text/Layout.java
|
3b6f84b77c30ec0bab5147b0cffc192c86ba2634
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void keyguardGoingAway(int flags) {
enforceNotIsolatedCaller("keyguardGoingAway");
final long token = Binder.clearCallingIdentity();
try {
synchronized (this) {
if (DEBUG_LOCKSCREEN) logLockScreen("");
mWindowManager.keyguardGoingAway(flags);
if (mLockScreenShown == LOCK_SCREEN_SHOWN) {
mLockScreenShown = LOCK_SCREEN_HIDDEN;
updateSleepIfNeededLocked();
// Some stack visibility might change (e.g. docked stack)
mStackSupervisor.ensureActivitiesVisibleLocked(null, 0, !PRESERVE_WINDOWS);
applyVrModeIfNeededLocked(mFocusedActivity, true);
}
}
} finally {
Binder.restoreCallingIdentity(token);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: keyguardGoingAway
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3912
|
HIGH
| 9.3
|
android
|
keyguardGoingAway
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<String> getPermittedAccessibilityServicesForUser(int userId) {
if (!mHasFeature) {
return null;
}
final CallerIdentity caller = getCallerIdentity();
Preconditions.checkCallAuthorization(canManageUsers(caller) || canQueryAdminPolicy(caller));
List<String> result = null;
synchronized (getLockObject()) {
// If we have multiple profiles we return the intersection of the
// permitted lists. This can happen in cases where we have a device
// and profile owner.
int[] profileIds = mUserManager.getProfileIdsWithDisabled(userId);
for (int profileId : profileIds) {
// Just loop though all admins, only device or profiles
// owners can have permitted lists set.
DevicePolicyData policy = getUserDataUnchecked(profileId);
final int N = policy.mAdminList.size();
for (int j = 0; j < N; j++) {
ActiveAdmin admin = policy.mAdminList.get(j);
List<String> fromAdmin = admin.permittedAccessiblityServices;
if (fromAdmin != null) {
if (result == null) {
result = new ArrayList<>(fromAdmin);
} else {
result.retainAll(fromAdmin);
}
}
}
}
}
// If we have a permitted list add all system accessibility services.
if (result != null) {
long id = mInjector.binderClearCallingIdentity();
try {
UserInfo user = getUserInfo(userId);
if (user.isManagedProfile()) {
userId = user.profileGroupId;
}
// Move AccessibilityManager out of {@link getLockObject} to prevent potential
// deadlock.
final List<AccessibilityServiceInfo> installedServices =
withAccessibilityManager(userId,
AccessibilityManager::getInstalledAccessibilityServiceList);
if (installedServices != null) {
for (AccessibilityServiceInfo service : installedServices) {
ServiceInfo serviceInfo = service.getResolveInfo().serviceInfo;
ApplicationInfo applicationInfo = serviceInfo.applicationInfo;
if ((applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0) {
result.add(serviceInfo.packageName);
}
}
}
} finally {
mInjector.binderRestoreCallingIdentity(id);
}
}
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPermittedAccessibilityServicesForUser
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
getPermittedAccessibilityServicesForUser
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setLockScreenShown(boolean shown) throws RemoteException
{
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeInt(shown ? 1 : 0);
mRemote.transact(SET_LOCK_SCREEN_SHOWN_TRANSACTION, data, reply, 0);
reply.readException();
data.recycle();
reply.recycle();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setLockScreenShown
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
setLockScreenShown
|
core/java/android/app/ActivityManagerNative.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
void setUserDirectory(UserDirectoryService userDirectory) {
this.userDirectory = userDirectory;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUserDirectory
File: modules/kernel/src/main/java/org/opencastproject/kernel/security/SecurityServiceSpringImpl.java
Repository: opencast
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2020-5206
|
MEDIUM
| 6.4
|
opencast
|
setUserDirectory
|
modules/kernel/src/main/java/org/opencastproject/kernel/security/SecurityServiceSpringImpl.java
|
b157e1fb3b35991ca7bf59f0730329fbe7ce82e8
| 0
|
Analyze the following code function for security vulnerabilities
|
private void resetNow() {
HttpMessage message = this.message;
this.message = null;
name = null;
value = null;
contentLength = Long.MIN_VALUE;
lineParser.reset();
headerParser.reset();
trailer = null;
if (!isDecodingRequest()) {
HttpResponse res = (HttpResponse) message;
if (res != null && isSwitchingToNonHttp1Protocol(res)) {
currentState = State.UPGRADED;
return;
}
}
resetRequested = false;
currentState = State.SKIP_CONTROL_CHARS;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resetNow
File: codec-http/src/main/java/io/netty/handler/codec/http/HttpObjectDecoder.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-444"
] |
CVE-2019-16869
|
MEDIUM
| 5
|
netty
|
resetNow
|
codec-http/src/main/java/io/netty/handler/codec/http/HttpObjectDecoder.java
|
39cafcb05c99f2aa9fce7e6597664c9ed6a63a95
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getRootUrl() {
String url = JenkinsLocationConfiguration.get().getUrl();
if(url!=null) {
return Util.ensureEndsWith(url,"/");
}
StaplerRequest req = Stapler.getCurrentRequest();
if(req!=null)
return getRootUrlFromRequest();
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRootUrl
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
|
getRootUrl
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
private String toSpaceElement(Iterable<?> spaces)
{
StringBuilder builder = new StringBuilder();
for (Object space : spaces) {
if (builder.length() > 0) {
builder.append("/spaces/");
}
if (space instanceof EntityReference) {
builder.append(((EntityReference) space).getName());
} else {
builder.append(space.toString());
}
}
return builder.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toSpaceElement
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
|
toSpaceElement
|
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
|
@Nullable
public CursorFactory getCursorFactory() {
return mCursorFactory;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCursorFactory
File: core/java/android/database/sqlite/SQLiteDatabase.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2018-9493
|
LOW
| 2.1
|
android
|
getCursorFactory
|
core/java/android/database/sqlite/SQLiteDatabase.java
|
ebc250d16c747f4161167b5ff58b3aea88b37acf
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String toString()
{
return getFullName();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toString
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
|
toString
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
public Aluno getAluno(String ra)throws Exception{
String comSql = "select * from ACI_Aluno where ra='"+ra+"'";
ResultSet result = this.bancoConec.execConsulta(comSql);
if(result.first()){
Aluno aluno = new Aluno(result.getString("RA"),
result.getString("nome"),result.getString("Email"), result.getString("telefone")
, result.getString("Endereco"),result.getString("Responsavel"));
result.close();
return aluno;
}else{
result.close();
return null;
}
}
|
Vulnerability Classification:
- CWE: CWE-89
- CVE: CVE-2015-10037
- Severity: MEDIUM
- CVSS Score: 5.2
Description: Prooteçao contra SQL Injection
Function: getAluno
File: Escola Eclipse/Escola/src/banco_de_dados/dao/Alunos.java
Repository: marinaguimaraes/ACI_Escola
Fixed Code:
public Aluno getAluno(String ra)throws Exception{
String comSql = "select * from ACI_Aluno where ra='"+ra.replace("'", "")+"'";
ResultSet result = this.bancoConec.execConsulta(comSql);
if(result.first()){
Aluno aluno = new Aluno(result.getString("RA"),
result.getString("nome"),result.getString("Email"), result.getString("telefone")
, result.getString("Endereco"),result.getString("Responsavel"));
result.close();
return aluno;
}else{
result.close();
return null;
}
}
|
[
"CWE-89"
] |
CVE-2015-10037
|
MEDIUM
| 5.2
|
marinaguimaraes/ACI_Escola
|
getAluno
|
Escola Eclipse/Escola/src/banco_de_dados/dao/Alunos.java
|
34eed1f7b9295d1424912f79989d8aba5de41e9f
| 1
|
Analyze the following code function for security vulnerabilities
|
public static String marshal(final Object obj) {
final StringWriter jaxbWriter = new StringWriter();
marshal(obj, jaxbWriter);
return jaxbWriter.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: marshal
File: core/xml/src/main/java/org/opennms/core/xml/JaxbUtils.java
Repository: OpenNMS/opennms
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2023-0871
|
MEDIUM
| 6.1
|
OpenNMS/opennms
|
marshal
|
core/xml/src/main/java/org/opennms/core/xml/JaxbUtils.java
|
3c17231714e3d55809efc580a05734ed530f9ad4
| 0
|
Analyze the following code function for security vulnerabilities
|
public void prepareForInsert() {
mPreparedStatement = getStatement(false);
mPreparedStatement.clearBindings();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: prepareForInsert
File: core/java/android/database/DatabaseUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2023-40121
|
MEDIUM
| 5.5
|
android
|
prepareForInsert
|
core/java/android/database/DatabaseUtils.java
|
3287ac2d2565dc96bf6177967f8e3aed33954253
| 0
|
Analyze the following code function for security vulnerabilities
|
public void stop() {
scheduledThreadPool.shutdownNow();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: stop
File: bbb-common-web/src/main/java/org/bigbluebutton/presentation/PresentationUrlDownloadService.java
Repository: bigbluebutton
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2023-43798
|
MEDIUM
| 5.4
|
bigbluebutton
|
stop
|
bbb-common-web/src/main/java/org/bigbluebutton/presentation/PresentationUrlDownloadService.java
|
02ba4c6ff8e78a0f4384ad1b7c7367c5a90376e8
| 0
|
Analyze the following code function for security vulnerabilities
|
@FastNative
private static native int nativeGetAttributeIndex(
long state, String namespace, String name);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nativeGetAttributeIndex
File: core/java/android/content/res/XmlBlock.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-415"
] |
CVE-2023-40103
|
HIGH
| 7.8
|
android
|
nativeGetAttributeIndex
|
core/java/android/content/res/XmlBlock.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean hasDefaultCreator() {
return _creators[C_DEFAULT] != null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasDefaultCreator
File: src/main/java/com/fasterxml/jackson/databind/deser/impl/CreatorCollector.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2019-16942
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
hasDefaultCreator
|
src/main/java/com/fasterxml/jackson/databind/deser/impl/CreatorCollector.java
|
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
| 0
|
Analyze the following code function for security vulnerabilities
|
public XWikiURLFactoryService getURLFactoryService()
{
if (this.urlFactoryService == null) {
synchronized (this.URLFACTORY_SERVICE_LOCK) {
if (this.urlFactoryService == null) {
LOGGER.info("Initializing URLFactory Service...");
XWikiURLFactoryService factoryService = null;
String urlFactoryServiceClass = getConfiguration().getProperty("xwiki.urlfactory.serviceclass");
if (urlFactoryServiceClass != null) {
try {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Using custom URLFactory Service Class [" + urlFactoryServiceClass + "]");
}
factoryService = (XWikiURLFactoryService) Class.forName(urlFactoryServiceClass)
.getConstructor(new Class<?>[] { XWiki.class }).newInstance(new Object[] { this });
} catch (Exception e) {
factoryService = null;
LOGGER.warn("Failed to initialize URLFactory Service [" + urlFactoryServiceClass + "]", e);
}
}
if (factoryService == null) {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Using default URLFactory Service Class [" + urlFactoryServiceClass + "]");
}
factoryService = new XWikiURLFactoryServiceImpl(this);
}
// Set the urlFactoryService object in one assignment to prevent threading
// issues when checking for
// null above.
this.urlFactoryService = factoryService;
}
}
}
return this.urlFactoryService;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getURLFactoryService
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
|
getURLFactoryService
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) {
Map map = (Map) createCollection(context.getRequiredType());
populateMap(reader, context, map);
return map;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unmarshal
File: xstream/src/java/com/thoughtworks/xstream/converters/collections/MapConverter.java
Repository: x-stream/xstream
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-43859
|
MEDIUM
| 5
|
x-stream/xstream
|
unmarshal
|
xstream/src/java/com/thoughtworks/xstream/converters/collections/MapConverter.java
|
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
| 0
|
Analyze the following code function for security vulnerabilities
|
public PrivateKey getClientPrivateKey() {
return mClientPrivateKey;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getClientPrivateKey
File: wifi/java/android/net/wifi/WifiEnterpriseConfig.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3897
|
MEDIUM
| 4.3
|
android
|
getClientPrivateKey
|
wifi/java/android/net/wifi/WifiEnterpriseConfig.java
|
81be4e3aac55305cbb5c9d523cf5c96c66604b39
| 0
|
Analyze the following code function for security vulnerabilities
|
@PostMapping("/{id}/make-mod")
public String makeMod(@PathVariable String id, HttpServletRequest req, HttpServletResponse res) {
Profile authUser = utils.getAuthUser(req);
if (!isMyid(authUser, Profile.id(id))) {
Profile showUser = utils.getParaClient().read(Profile.id(id));
if (showUser != null) {
if (utils.isAdmin(authUser) && !utils.isAdmin(showUser)) {
showUser.setGroups(utils.isMod(showUser) ? USERS.toString() : MODS.toString());
showUser.update();
}
}
}
if (utils.isAjaxRequest(req)) {
res.setStatus(200);
return "base";
} else {
return "redirect:" + PROFILELINK + "/" + id;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: makeMod
File: src/main/java/com/erudika/scoold/controllers/ProfileController.java
Repository: Erudika/scoold
The code follows secure coding practices.
|
[
"CWE-130"
] |
CVE-2022-1543
|
MEDIUM
| 6.5
|
Erudika/scoold
|
makeMod
|
src/main/java/com/erudika/scoold/controllers/ProfileController.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
protected boolean somethingToRead() throws IOException {
if (!applicationBuffer.hasRemaining()) {
applicationBuffer.clear();
int read = NioHelper.read(channel, applicationBuffer);
applicationBuffer.flip();
if (read > 0) {
return true;
} else {
return false;
}
} else {
return true;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: somethingToRead
File: src/main/java/com/rabbitmq/client/impl/nio/FrameBuilder.java
Repository: rabbitmq/rabbitmq-java-client
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-46120
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-java-client
|
somethingToRead
|
src/main/java/com/rabbitmq/client/impl/nio/FrameBuilder.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
public void expandWithQs() {
if (mQsExpansionEnabled) {
mQsExpandImmediate = true;
}
expand(true /* animate */);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: expandWithQs
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
expandWithQs
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean startNextMatchingActivity(IBinder callingActivity,
Intent intent, Bundle options) throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeStrongBinder(callingActivity);
intent.writeToParcel(data, 0);
if (options != null) {
data.writeInt(1);
options.writeToParcel(data, 0);
} else {
data.writeInt(0);
}
mRemote.transact(START_NEXT_MATCHING_ACTIVITY_TRANSACTION, data, reply, 0);
reply.readException();
int result = reply.readInt();
reply.recycle();
data.recycle();
return result != 0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startNextMatchingActivity
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
startNextMatchingActivity
|
core/java/android/app/ActivityManagerNative.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
private static String getCaCertAlias(byte[] certBuffer) throws CertificateException {
final CertificateFactory certFactory = CertificateFactory.getInstance("X.509");
final X509Certificate cert = (X509Certificate) certFactory.generateCertificate(
new ByteArrayInputStream(certBuffer));
return new TrustedCertificateStore().getCertificateAlias(cert);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCaCertAlias
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
|
getCaCertAlias
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void deletePage(EntityReference reference)
{
deletePage(reference, false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deletePage
File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2023-35166
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
deletePage
|
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
|
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public OnGoingLogicalCondition eq(T value) {
Condition conditionLocal = new EqualCondition<T>(selector, selector.generateParameter(value));
return getOnGoingLogicalCondition(conditionLocal);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: eq
File: src/main/java/org/torpedoquery/jpa/internal/conditions/ConditionBuilder.java
Repository: xjodoin/torpedoquery
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2019-11343
|
HIGH
| 7.5
|
xjodoin/torpedoquery
|
eq
|
src/main/java/org/torpedoquery/jpa/internal/conditions/ConditionBuilder.java
|
3c20b874fba9cc2a78b9ace10208de1602b56c3f
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean addOneIntentFilterVerification(int verifierId, int userId, int verificationId,
T filter, String packageName);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addOneIntentFilterVerification
File: services/core/java/com/android/server/pm/PackageManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2016-2497
|
HIGH
| 7.5
|
android
|
addOneIntentFilterVerification
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isExpired(@NonNull PasspointConfiguration config) {
long expirationTime = config.getSubscriptionExpirationTimeMillis();
if (expirationTime != Long.MIN_VALUE) {
long curTime = System.currentTimeMillis();
// Check expiration and return true for expired profiles
if (curTime >= expirationTime) {
Log.d(TAG, "Profile for " + config.getServiceFriendlyName() + " has expired, "
+ "expiration time: " + expirationTime + ", current time: "
+ curTime);
return true;
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isExpired
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
|
isExpired
|
service/java/com/android/server/wifi/hotspot2/PasspointManager.java
|
5b49b8711efaadadf5052ba85288860c2d7ca7a6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setOrganizationName(@Nullable ComponentName who, String callerPackageName,
CharSequence text) {
if (!mHasFeature) {
return;
}
CallerIdentity caller = getCallerIdentity(who);
ActiveAdmin admin = null;
if (isPermissionCheckFlagEnabled()) {
EnforcingAdmin enforcingAdmin = enforcePermissionAndGetEnforcingAdmin(
who,
MANAGE_DEVICE_POLICY_ORGANIZATION_IDENTITY,
caller.getPackageName(),
caller.getUserId());
admin = enforcingAdmin.getActiveAdmin();
} else {
Objects.requireNonNull(who, "ComponentName is null");
Preconditions.checkCallAuthorization(isDeviceOwner(caller) || isProfileOwner(caller));
}
text = truncateIfLonger(text, MAX_ORG_NAME_LENGTH);
synchronized (getLockObject()) {
if (!isPermissionCheckFlagEnabled()) {
admin = getProfileOwnerOrDeviceOwnerLocked(caller.getUserId());
}
if (!TextUtils.equals(admin.organizationName, text)) {
admin.organizationName = (text == null || text.length() == 0)
? null : text.toString();
saveSettingsLocked(caller.getUserId());
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setOrganizationName
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
setOrganizationName
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
private String[] buildNonSuspendedPackagesUnionArray(String[] nonSuspendedPackages,
Set<String> exemptApps) {
String[] result = new String[nonSuspendedPackages.length + exemptApps.size()];
int index = 0;
for (String app : nonSuspendedPackages) {
result[index++] = app;
}
for (String app : exemptApps) {
result[index++] = app;
}
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: buildNonSuspendedPackagesUnionArray
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
|
buildNonSuspendedPackagesUnionArray
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void disableCertificateValidation(ClientBuilder clientBuilder) throws KeyManagementException, NoSuchAlgorithmException {
TrustManager[] trustAllCerts = new X509TrustManager[] {
new X509TrustManager() {
@Override
public X509Certificate[] getAcceptedIssuers() {
return null;
}
@Override
public void checkClientTrusted(X509Certificate[] certs, String authType) {
}
@Override
public void checkServerTrusted(X509Certificate[] certs, String authType) {
}
}
};
SSLContext sslContext = SSLContext.getInstance("TLS");
sslContext.init(null, trustAllCerts, new SecureRandom());
clientBuilder.sslContext(sslContext);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: disableCertificateValidation
File: samples/client/petstore/java/okhttp-gson-dynamicOperations/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
|
disableCertificateValidation
|
samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public IBinder getFocusedWindowToken() {
synchronized (mWindowMap) {
WindowState windowState = getFocusedWindowLocked();
if (windowState != null) {
return windowState.mClient.asBinder();
}
return null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFocusedWindowToken
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
|
getFocusedWindowToken
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
private static String toHttp2Path(URI uri) {
final StringBuilder pathBuilder = new StringBuilder(
length(uri.getRawPath()) + length(uri.getRawQuery()) + length(uri.getRawFragment()) + 2);
if (!isNullOrEmpty(uri.getRawPath())) {
pathBuilder.append(uri.getRawPath());
}
if (!isNullOrEmpty(uri.getRawQuery())) {
pathBuilder.append('?');
pathBuilder.append(uri.getRawQuery());
}
if (!isNullOrEmpty(uri.getRawFragment())) {
pathBuilder.append('#');
pathBuilder.append(uri.getRawFragment());
}
return pathBuilder.length() != 0 ? pathBuilder.toString() : EMPTY_REQUEST_PATH;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toHttp2Path
File: core/src/main/java/com/linecorp/armeria/internal/ArmeriaHttpUtil.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2019-16771
|
MEDIUM
| 5
|
line/armeria
|
toHttp2Path
|
core/src/main/java/com/linecorp/armeria/internal/ArmeriaHttpUtil.java
|
b597f7a865a527a84ee3d6937075cfbb4470ed20
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getExpandedSystemId() {
return fCurrentEntity != null ? fCurrentEntity.expandedSystemId : null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getExpandedSystemId
File: src/org/cyberneko/html/HTMLScanner.java
Repository: sparklemotion/nekohtml
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-24839
|
MEDIUM
| 5
|
sparklemotion/nekohtml
|
getExpandedSystemId
|
src/org/cyberneko/html/HTMLScanner.java
|
a800fce3b079def130ed42a408ff1d09f89e773d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<XWikiDocument> searchDocuments(String wheresql, boolean distinctbylanguage, int nb, int start,
XWikiContext context) throws XWikiException
{
return searchDocuments(wheresql, distinctbylanguage, nb, start, null, context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: searchDocuments
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-459"
] |
CVE-2023-36468
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
searchDocuments
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
|
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void finalize() throws Throwable {
try {
dispose(true);
} finally {
super.finalize();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: finalize
File: core/java/android/database/sqlite/SQLiteDatabase.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2018-9493
|
LOW
| 2.1
|
android
|
finalize
|
core/java/android/database/sqlite/SQLiteDatabase.java
|
ebc250d16c747f4161167b5ff58b3aea88b37acf
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.