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 ServerBuilder https(InetSocketAddress localAddress) {
return port(new ServerPort(requireNonNull(localAddress, "localAddress"), HTTPS));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: https
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
|
https
|
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
|
df7f85824a62e997b910b5d6194a3335841065fd
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void maybeThrowExceptionForMultiArchCopy(String message, int copyRet) throws
PackageManagerException {
if (copyRet < 0) {
if (copyRet != PackageManager.NO_NATIVE_LIBRARIES &&
copyRet != PackageManager.INSTALL_FAILED_NO_MATCHING_ABIS) {
throw new PackageManagerException(copyRet, message);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: maybeThrowExceptionForMultiArchCopy
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
|
maybeThrowExceptionForMultiArchCopy
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean hasNext() {
if (stack.isEmpty() && (currentEvent != null && currentEvent.compareTo(Event.KEY_NAME) > 0)) {
JsonToken token = tokenizer.nextToken();
if (token != JsonToken.EOF) {
throw new JsonParsingException(JsonMessages.PARSER_EXPECTED_EOF(token),
getLastCharLocation());
}
return false;
} else if (!stack.isEmpty() && !tokenizer.hasNextToken()) {
currentEvent = currentContext.getNextEvent();
return false;
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasNext
File: impl/src/main/java/org/eclipse/parsson/JsonParserImpl.java
Repository: eclipse-ee4j/parsson
The code follows secure coding practices.
|
[
"CWE-834"
] |
CVE-2023-4043
|
HIGH
| 7.5
|
eclipse-ee4j/parsson
|
hasNext
|
impl/src/main/java/org/eclipse/parsson/JsonParserImpl.java
|
ab239fee273cb262910890f1a6fe666ae92cd623
| 0
|
Analyze the following code function for security vulnerabilities
|
protected Intent getRedactionInterstitialIntent(Context context) {
return RedactionInterstitial.createStartIntent(context, mUserId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRedactionInterstitialIntent
File: src/com/android/settings/password/ChooseLockPattern.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40117
|
HIGH
| 7.8
|
android
|
getRedactionInterstitialIntent
|
src/com/android/settings/password/ChooseLockPattern.java
|
11815817de2f2d70fe842b108356a1bc75d44ffb
| 0
|
Analyze the following code function for security vulnerabilities
|
void setShouldDockBigOverlays(boolean shouldDockBigOverlays) {
this.shouldDockBigOverlays = shouldDockBigOverlays;
getTask().getRootTask().onShouldDockBigOverlaysChanged();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setShouldDockBigOverlays
File: services/core/java/com/android/server/wm/ActivityRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21145
|
HIGH
| 7.8
|
android
|
setShouldDockBigOverlays
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getURL(EntityReference reference, String action, String querystring) throws XWikiException
{
return this.xwiki.getURL(reference, action, querystring, null, getXWikiContext());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getURL
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2023-37911
|
MEDIUM
| 6.5
|
xwiki/xwiki-platform
|
getURL
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
|
f471f2a392aeeb9e51d59fdfe1d76fccf532523f
| 0
|
Analyze the following code function for security vulnerabilities
|
public Object fromXML(File file) {
return fromXML(file, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fromXML
File: xstream/src/java/com/thoughtworks/xstream/XStream.java
Repository: x-stream/xstream
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-43859
|
MEDIUM
| 5
|
x-stream/xstream
|
fromXML
|
xstream/src/java/com/thoughtworks/xstream/XStream.java
|
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
| 0
|
Analyze the following code function for security vulnerabilities
|
protected SocketInterceptorConfig parseSocketInterceptorConfig(final Node node) {
SocketInterceptorConfig socketInterceptorConfig = new SocketInterceptorConfig();
final NamedNodeMap atts = node.getAttributes();
final Node enabledNode = atts.getNamedItem("enabled");
final boolean enabled = enabledNode != null && getBooleanValue(getTextContent(enabledNode).trim());
socketInterceptorConfig.setEnabled(enabled);
for (Node n : childElements(node)) {
final String nodeName = cleanNodeName(n);
if ("class-name".equals(nodeName)) {
socketInterceptorConfig.setClassName(getTextContent(n).trim());
} else if ("properties".equals(nodeName)) {
fillProperties(n, socketInterceptorConfig.getProperties());
}
}
return socketInterceptorConfig;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseSocketInterceptorConfig
File: hazelcast/src/main/java/com/hazelcast/config/AbstractXmlConfigHelper.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
parseSocketInterceptorConfig
|
hazelcast/src/main/java/com/hazelcast/config/AbstractXmlConfigHelper.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
public JavaType getValueType() { return _valueType; }
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getValueType
File: src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2022-42003
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
getValueType
|
src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java
|
d78d00ee7b5245b93103fef3187f70543d67ca33
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onImage(ResourceReference reference, boolean freestanding, Map<String, String> parameters)
{
onImage(reference, freestanding, null, parameters);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onImage
File: xwiki-rendering-syntaxes/xwiki-rendering-syntax-xhtml/src/main/java/org/xwiki/rendering/internal/renderer/xhtml/XHTMLChainingRenderer.java
Repository: xwiki/xwiki-rendering
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-32070
|
MEDIUM
| 6.1
|
xwiki/xwiki-rendering
|
onImage
|
xwiki-rendering-syntaxes/xwiki-rendering-syntax-xhtml/src/main/java/org/xwiki/rendering/internal/renderer/xhtml/XHTMLChainingRenderer.java
|
c40e2f5f9482ec6c3e71dbf1fff5ba8a5e44cdc1
| 0
|
Analyze the following code function for security vulnerabilities
|
public void prepare() {
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: prepare
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
|
prepare
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean readNextToken(PathTokenAppender appender) {
char c = path.currentChar();
switch (c) {
case OPEN_SQUARE_BRACKET:
if (!readBracketPropertyToken(appender) && !readArrayToken(appender) && !readWildCardToken(appender)
&& !readFilterToken(appender) && !readPlaceholderToken(appender)) {
fail("Could not parse token starting at position " + path.position() + ". Expected ?, ', 0-9, * ");
}
return true;
case PERIOD:
if (!readDotToken(appender)) {
fail("Could not parse token starting at position " + path.position());
}
return true;
case WILDCARD:
if (!readWildCardToken(appender)) {
fail("Could not parse token starting at position " + path.position());
}
return true;
default:
if (!readPropertyOrFunctionToken(appender)) {
fail("Could not parse token starting at position " + path.position());
}
return true;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readNextToken
File: json-path/src/main/java/com/jayway/jsonpath/internal/path/PathCompiler.java
Repository: json-path/JsonPath
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-51074
|
MEDIUM
| 5.3
|
json-path/JsonPath
|
readNextToken
|
json-path/src/main/java/com/jayway/jsonpath/internal/path/PathCompiler.java
|
f49ff25e3bad8c8a0c853058181f2c00b5beb305
| 0
|
Analyze the following code function for security vulnerabilities
|
@NonNull
public Builder setSmallIcon(@DrawableRes int icon) {
return setSmallIcon(icon != 0
? Icon.createWithResource(mContext, icon)
: null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSmallIcon
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
setSmallIcon
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
private static boolean scrolledToBottom(AbsListView listView) {
final int count = listView.getCount();
if (count == 0) {
return true;
} else if (listView.getLastVisiblePosition() == count - 1) {
final View lastChild = listView.getChildAt(listView.getChildCount() - 1);
return lastChild != null && lastChild.getBottom() <= listView.getHeight();
} else {
return false;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: scrolledToBottom
File: src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
scrolledToBottom
|
src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void resolveQueryArgs(@NonNull Bundle queryArgs,
@NonNull Consumer<String> honored,
@NonNull Function<String, String> collatorFactory) {
// We're always going to handle selections
honored.accept(QUERY_ARG_SQL_SELECTION);
honored.accept(QUERY_ARG_SQL_SELECTION_ARGS);
resolveGroupBy(queryArgs, honored);
resolveSortOrder(queryArgs, honored, collatorFactory);
resolveLimit(queryArgs, honored);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resolveQueryArgs
File: src/com/android/providers/media/util/DatabaseUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2023-35683
|
MEDIUM
| 5.5
|
android
|
resolveQueryArgs
|
src/com/android/providers/media/util/DatabaseUtils.java
|
23d156ed1bed6d2c2b325f0be540d0afca510c49
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void addPersistentPreferredActivity(ComponentName who, IntentFilter filter,
ComponentName activity) {
Objects.requireNonNull(who, "ComponentName is null");
final CallerIdentity caller = getCallerIdentity(who);
Preconditions.checkCallAuthorization(isProfileOwner(caller)
|| isDefaultDeviceOwner(caller) || isFinancedDeviceOwner(caller));
final int userHandle = caller.getUserId();
synchronized (getLockObject()) {
long id = mInjector.binderClearCallingIdentity();
try {
mIPackageManager.addPersistentPreferredActivity(filter, activity, userHandle);
mIPackageManager.flushPackageRestrictionsAsUser(userHandle);
} catch (RemoteException re) {
// Shouldn't happen
} finally {
mInjector.binderRestoreCallingIdentity(id);
}
}
final String activityPackage =
(activity != null ? activity.getPackageName() : null);
DevicePolicyEventLogger
.createEvent(DevicePolicyEnums.ADD_PERSISTENT_PREFERRED_ACTIVITY)
.setAdmin(who)
.setStrings(activityPackage, getIntentFilterActions(filter))
.write();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addPersistentPreferredActivity
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
|
addPersistentPreferredActivity
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onTopItemClicked(long idFeed, boolean isFolder, Long optional_folder_id) {
if (binding.drawerLayout != null)
binding.drawerLayout.closeDrawer(GravityCompat.START);
updateDetailFragment(idFeed, isFolder, optional_folder_id, true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onTopItemClicked
File: News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java
Repository: nextcloud/news-android
The code follows secure coding practices.
|
[
"CWE-829"
] |
CVE-2021-41256
|
MEDIUM
| 5.8
|
nextcloud/news-android
|
onTopItemClicked
|
News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java
|
05449cb666059af7de2302df9d5c02997a23df85
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void handleKeyboardEvent(KeyEvent event) {
if (event.getAction() == KeyEvent.ACTION_DOWN) {
int direction;
switch (event.getKeyCode()) {
case KeyEvent.KEYCODE_DPAD_DOWN:
direction = View.FOCUS_DOWN;
break;
case KeyEvent.KEYCODE_DPAD_UP:
direction = View.FOCUS_UP;
break;
case KeyEvent.KEYCODE_DPAD_LEFT:
direction = View.FOCUS_LEFT;
break;
case KeyEvent.KEYCODE_DPAD_RIGHT:
direction = View.FOCUS_RIGHT;
break;
default:
direction = 0;
break;
}
if (direction != 0 && tryToMoveFocus(direction)) return;
}
mContentsClient.onUnhandledKeyEvent(event);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleKeyboardEvent
File: android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
handleKeyboardEvent
|
android_webview/java/src/org/chromium/android_webview/AwWebContentsDelegateAdapter.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setDateFormat(DateFormat dateFormat) {
this.dateFormat = dateFormat;
// also set the date format for model (de)serialization with Date properties
this.json.setDateFormat((DateFormat) dateFormat.clone());
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDateFormat
File: samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
setDateFormat
|
samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
public ArtemisSecurityConfigurationBuilder withThreadTrustScope(TrustScope threadTrustScope) {
this.threadTrustScope = Objects.requireNonNull(threadTrustScope);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: withThreadTrustScope
File: src/main/java/de/tum/in/test/api/security/ArtemisSecurityConfigurationBuilder.java
Repository: ls1intum/Ares
The code follows secure coding practices.
|
[
"CWE-501",
"CWE-653"
] |
CVE-2024-23682
|
HIGH
| 8.2
|
ls1intum/Ares
|
withThreadTrustScope
|
src/main/java/de/tum/in/test/api/security/ArtemisSecurityConfigurationBuilder.java
|
4c146ff85a0fa6022087fb0cffa6b8021d51101f
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String getAttachedFilePath(String inputStudyOid) {
// Using a standard library to validate/Sanitize user inputs which will be used in path expression to prevent from path traversal
String studyOid = FilenameUtils.getName(inputStudyOid);
String attachedFilePath = CoreResources.getField("attached_file_location");
if (attachedFilePath == null || attachedFilePath.length() <= 0) {
attachedFilePath = CoreResources.getField("filePath") + "attached_files" + File.separator + studyOid + File.separator;
} else {
attachedFilePath += studyOid + File.separator;
}
return attachedFilePath;
}
|
Vulnerability Classification:
- CWE: CWE-22
- CVE: CVE-2022-24830
- Severity: HIGH
- CVSS Score: 7.5
Description: OC-17139: code changes after code review
Function: getAttachedFilePath
File: web/src/main/java/org/akaza/openclinica/controller/openrosa/OpenRosaSubmissionController.java
Repository: OpenClinica
Fixed Code:
public static String getAttachedFilePath(String studyOid) throws Exception {
String attachedFilePath = CoreResources.getField("attached_file_location");
if (attachedFilePath == null || attachedFilePath.length() <= 0) {
attachedFilePath = CoreResources.getField("filePath") + "attached_files" + File.separator;
}
File tempFile = new File(attachedFilePath,studyOid);
String canonicalPath= tempFile.getCanonicalPath();
if (canonicalPath.startsWith(attachedFilePath)) {
if (attachedFilePath == null || attachedFilePath.length() <= 0) {
attachedFilePath = CoreResources.getField("filePath") + "attached_files" + File.separator + studyOid + File.separator;
} else {
attachedFilePath += studyOid + File.separator;
}
return attachedFilePath;
}else {
throw new RuntimeException("Traversal attempt - file path not allowed " + studyOid);
}
}
|
[
"CWE-22"
] |
CVE-2022-24830
|
HIGH
| 7.5
|
OpenClinica
|
getAttachedFilePath
|
web/src/main/java/org/akaza/openclinica/controller/openrosa/OpenRosaSubmissionController.java
|
6f864e86543f903bd20d6f9fc7056115106441f3
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<Map<String, Object>> toJson() {
List<Map<String, Object>> jsonList = new ArrayList();
for (DirectoryEntry entry : this) {
jsonList.add(entry.toJson());
}
return jsonList;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toJson
File: common/src/main/java/com/thoughtworks/go/domain/DirectoryEntries.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2021-43288
|
LOW
| 3.5
|
gocd
|
toJson
|
common/src/main/java/com/thoughtworks/go/domain/DirectoryEntries.java
|
f5c1d2aa9ab302a97898a6e4b16218e64fe8e9e4
| 0
|
Analyze the following code function for security vulnerabilities
|
private void updateStatus() {
if (config.getHIDMode() == 0) {
config.setNetworkStatus(false);
EditorActivity.stopNetworkSocketService(this);
ipButton.setVisibility(View.GONE);
ipStatusDivider.setVisibility(View.GONE);
if (config.getUSBStatus()) {
statusText.setText(R.string.config_status_usb_on);
statusImage.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.ic_usb));
} else {
statusText.setText(R.string.config_status_usb_off);
statusImage.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.ic_usb_off));
}
} else if (config.getHIDMode() == 1) {
EditorActivity.startNetworkSocketService(this);
ipButton.setVisibility(View.VISIBLE);
ipStatusDivider.setVisibility(View.VISIBLE);
if (config.getNetworkStatus()) {
statusText.setText(R.string.config_status_net_on);
statusImage.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.ic_net));
} else {
statusText.setText(R.string.config_status_net_off);
statusImage.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.ic_net_off));
}
EditorActivity.updateNotification(this);
}
}
|
Vulnerability Classification:
- CWE: CWE-327
- CVE: CVE-2021-41096
- Severity: MEDIUM
- CVSS Score: 5.0
Description: Fix security vulnerabilities
Function: updateStatus
File: app/src/main/java/com/mayank/rucky/activity/ConfigActivity.java
Repository: mayankmetha/Rucky
Fixed Code:
private void updateStatus() {
if (config.getHIDMode() == 0) {
config.setNetworkStatus(false);
EditorActivity.stopNetworkSocketService(this);
ipButton.setVisibility(View.INVISIBLE);
ipStatusDivider.setVisibility(View.INVISIBLE);
if (config.getUSBStatus()) {
statusText.setText(R.string.config_status_usb_on);
statusImage.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.ic_usb));
} else {
statusText.setText(R.string.config_status_usb_off);
statusImage.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.ic_usb_off));
}
} else if (config.getHIDMode() == 1) {
EditorActivity.startNetworkSocketService(this);
ipButton.setVisibility(View.VISIBLE);
ipStatusDivider.setVisibility(View.VISIBLE);
if (config.getNetworkStatus()) {
statusText.setText(R.string.config_status_net_on);
statusImage.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.ic_net));
} else {
statusText.setText(R.string.config_status_net_off);
statusImage.setImageDrawable(ContextCompat.getDrawable(this, R.drawable.ic_net_off));
}
EditorActivity.updateNotification(this);
}
}
|
[
"CWE-327"
] |
CVE-2021-41096
|
MEDIUM
| 5
|
mayankmetha/Rucky
|
updateStatus
|
app/src/main/java/com/mayank/rucky/activity/ConfigActivity.java
|
5e3a477365009f488a73efd26a91168502de1b93
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public Route.Collection patch(final String path1, final String path2,
final Route.Handler 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
|
@Test
public void executeTransParam(TestContext context) {
Async asyncTotal = context.async();
Async async1 = context.async();
JsonArray ids = new JsonArray().add(randomUuid()).add(randomUuid());
postgresClient = insertXAndSingleQuotePojo(context, ids);
postgresClient.startTx(trans -> {
assertSuccess(context, trans);
postgresClient.execute(trans, "DELETE FROM tenant_raml_module_builder.foo WHERE id=?", new JsonArray().add(ids.getString(1)), res -> {
assertSuccess(context, res);
postgresClient.rollbackTx(trans, rollback -> {
assertSuccess(context, rollback);
async1.complete();
});
});
});
async1.awaitSuccess(5000);
Async async2 = context.async();
postgresClient.startTx(trans -> {
assertSuccess(context, trans);
postgresClient.execute(trans, "DELETE FROM tenant_raml_module_builder.foo WHERE id=?", new JsonArray().add(ids.getString(0)), res -> {
assertSuccess(context, res);
postgresClient.endTx(trans, end -> {
assertSuccess(context, end);
async2.complete();
});
});
});
async2.awaitSuccess(5000);
Async async3 = context.async();
postgresClient.getById(FOO, ids, res -> {
assertSuccess(context, res);
context.assertEquals(1, res.result().size());
async3.complete();
});
async3.awaitSuccess(5000);
asyncTotal.complete();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: executeTransParam
File: domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
executeTransParam
|
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
void validate() throws NamingException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: validate
File: src/main/java/cd/go/authentication/ldap/LdapClient.java
Repository: gocd/gocd-ldap-authentication-plugin
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2022-24832
|
MEDIUM
| 4.9
|
gocd/gocd-ldap-authentication-plugin
|
validate
|
src/main/java/cd/go/authentication/ldap/LdapClient.java
|
87fa7dac5d899b3960ab48e151881da4793cfcc3
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean updatePersonalAppsSuspension(int profileUserId, boolean unlocked) {
final boolean shouldSuspend;
synchronized (getLockObject()) {
final ActiveAdmin profileOwner = getProfileOwnerAdminLocked(profileUserId);
if (profileOwner != null) {
final int notificationState =
updateProfileOffDeadlineLocked(profileUserId, profileOwner, unlocked);
final boolean suspendedExplicitly = profileOwner.mSuspendPersonalApps;
final boolean suspendedByTimeout = profileOwner.mProfileOffDeadline == -1;
Slogf.d(LOG_TAG,
"Personal apps suspended explicitly: %b, by timeout: %b, notification: %d",
suspendedExplicitly, suspendedByTimeout, notificationState);
updateProfileOffDeadlineNotificationLocked(
profileUserId, profileOwner, notificationState);
shouldSuspend = suspendedExplicitly || suspendedByTimeout;
} else {
shouldSuspend = false;
}
}
final int parentUserId = getProfileParentId(profileUserId);
suspendPersonalAppsInternal(parentUserId, shouldSuspend);
return shouldSuspend;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updatePersonalAppsSuspension
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
|
updatePersonalAppsSuspension
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setTocCurrentPage(String tocCurrentPage)
throws PresentationException, IndexUnreachableException, DAOException, ViewerConfigurationException {
synchronized (this) {
int[] pages = StringTools.getIntegerRange(tocCurrentPage);
this.tocCurrentPage = pages[0];
if (this.tocCurrentPage < 1) {
this.tocCurrentPage = 1;
}
// Do not call getToc() here - the setter is usually called before update(), so the required information for proper TOC creation is not yet available
if (viewManager != null && viewManager.getToc() != null) {
int currentCurrentPage = viewManager.getToc().getCurrentPage();
viewManager.getToc().setCurrentPage(this.tocCurrentPage);
// The TOC object will correct values that are too high, so update the local value, if necessary
if (viewManager.getToc().getCurrentPage() != this.tocCurrentPage) {
this.tocCurrentPage = viewManager.getToc().getCurrentPage();
}
// Create a new TOC if pagination is enabled and the paginator page has changed
if (currentCurrentPage != this.tocCurrentPage && DataManager.getInstance().getConfiguration().getTocAnchorGroupElementsPerPage() > 0
&& viewManager != null) {
viewManager.getToc()
.generate(viewManager.getTopStructElement(), viewManager.isListAllVolumesInTOC(), viewManager.getMimeType(),
this.tocCurrentPage);
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setTocCurrentPage
File: goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java
Repository: intranda/goobi-viewer-core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-29014
|
MEDIUM
| 6.1
|
intranda/goobi-viewer-core
|
setTocCurrentPage
|
goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java
|
c29efe60e745a94d03debc17681c4950f3917455
| 0
|
Analyze the following code function for security vulnerabilities
|
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553)
void setThemeTo(long dstThemePtr, @NonNull AssetManager srcAssetManager, long srcThemePtr) {
synchronized (this) {
ensureValidLocked();
synchronized (srcAssetManager) {
srcAssetManager.ensureValidLocked();
nativeThemeCopy(mObject, dstThemePtr, srcAssetManager.mObject, srcThemePtr);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setThemeTo
File: core/java/android/content/res/AssetManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-415"
] |
CVE-2023-40103
|
HIGH
| 7.8
|
android
|
setThemeTo
|
core/java/android/content/res/AssetManager.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public ProcessingInstruction createProcessingInstruction(String target, String data) throws DOMException {
return doc.createProcessingInstruction(target, data);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createProcessingInstruction
File: HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java
Repository: LoboEvolution
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000540
|
MEDIUM
| 6.8
|
LoboEvolution
|
createProcessingInstruction
|
HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java
|
9b75694cedfa4825d4a2330abf2719d470c654cd
| 0
|
Analyze the following code function for security vulnerabilities
|
private void addMedias(AtRuleMedia m, String medias, ApplContext ac) throws InvalidParamException {
// before CSS3, let's parse it the easy way...
if (ac.getCssVersion().compareTo(CssVersion.CSS3) < 0) {
StringTokenizer tokens = new StringTokenizer(medias, ",");
while (tokens.hasMoreTokens()) {
m.addMedia(null, tokens.nextToken().trim(), ac);
}
} else {
CssFouffa muP = new CssFouffa(ac, new StringReader(medias));
try {
AtRuleMedia arm = muP.parseMediaDeclaration();
if (arm != null) {
m.allMedia = arm.allMedia;
}
} catch (ParseException pex) {
// error already added, so nothing else to do
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addMedias
File: org/w3c/css/css/StyleSheetParser.java
Repository: w3c/css-validator
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-4070
|
LOW
| 3.5
|
w3c/css-validator
|
addMedias
|
org/w3c/css/css/StyleSheetParser.java
|
e5c09a9119167d3064db786d5f00d730b584a53b
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setClosed(boolean closed) {
this.closed = closed;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setClosed
File: src/com/dotmarketing/portlets/workflows/model/WorkflowSearcher.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-4040
|
MEDIUM
| 6.5
|
dotCMS/core
|
setClosed
|
src/com/dotmarketing/portlets/workflows/model/WorkflowSearcher.java
|
bc4db5d71dc67015572f8e4c6fdf87e29b854d02
| 0
|
Analyze the following code function for security vulnerabilities
|
public static GlobalTerminationRevisionConfig withCurrentRevision() {
return create(TERMINATION_REVISION);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: withCurrentRevision
File: graylog2-server/src/main/java/org/graylog2/security/UserSessionTerminationService.java
Repository: Graylog2/graylog2-server
The code follows secure coding practices.
|
[
"CWE-613"
] |
CVE-2023-41041
|
LOW
| 3.1
|
Graylog2/graylog2-server
|
withCurrentRevision
|
graylog2-server/src/main/java/org/graylog2/security/UserSessionTerminationService.java
|
bb88f3d0b2b0351669ab32c60b595ab7242a3fe3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean releaseActivityInstance(IBinder token) {
synchronized(this) {
final long origId = Binder.clearCallingIdentity();
try {
ActivityRecord r = ActivityRecord.isInStackLocked(token);
if (r == null) {
return false;
}
return r.task.stack.safelyDestroyActivityLocked(r, "app-req");
} finally {
Binder.restoreCallingIdentity(origId);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: releaseActivityInstance
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2500
|
MEDIUM
| 4.3
|
android
|
releaseActivityInstance
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
9878bb99b77c3681f0fda116e2964bac26f349c3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<ZenModeConfig.ZenRule> getZenRules() throws RemoteException {
enforcePolicyAccess(Binder.getCallingUid(), "getAutomaticZenRules");
return mZenModeHelper.getZenRules();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getZenRules
File: services/core/java/com/android/server/notification/NotificationManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3884
|
MEDIUM
| 4.3
|
android
|
getZenRules
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
public GridMultiSelect<T> asMultiSelect() {
return new GridMultiSelect<>(this);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: asMultiSelect
File: server/src/main/java/com/vaadin/ui/Grid.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-25028
|
MEDIUM
| 4.3
|
vaadin/framework
|
asMultiSelect
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
public HttpRequest open(final HttpConnectionProvider httpConnectionProvider) {
if (this.httpConnection != null) {
throw new HttpException("Connection already opened");
}
try {
this.httpConnectionProvider = httpConnectionProvider;
this.httpConnection = httpConnectionProvider.createHttpConnection(this);
} catch (final IOException ioex) {
throw new HttpException("Can't connect to: " + url(), ioex);
}
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: open
File: src/main/java/jodd/http/HttpRequest.java
Repository: oblac/jodd-http
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2022-29631
|
MEDIUM
| 5
|
oblac/jodd-http
|
open
|
src/main/java/jodd/http/HttpRequest.java
|
e50f573c8f6a39212ade68c6eb1256b2889fa8a6
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setRefinable(boolean refinable) {
if (refinable) {
mRefineView.setVisibility(VISIBLE);
mRefineView.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// Post the refine action to the end of the UI thread to allow the refine view
// a chance to update its background selection state.
PerformRefineSuggestion performRefine = new PerformRefineSuggestion();
if (!post(performRefine)) performRefine.run();
}
});
} else {
mRefineView.setOnClickListener(null);
mRefineView.setVisibility(GONE);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setRefinable
File: chrome/android/java/src/org/chromium/chrome/browser/omnibox/SuggestionView.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-254"
] |
CVE-2016-5163
|
MEDIUM
| 4.3
|
chromium
|
setRefinable
|
chrome/android/java/src/org/chromium/chrome/browser/omnibox/SuggestionView.java
|
3bd33fee094e863e5496ac24714c558bd58d28ef
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void updateDateSeparators() {
synchronized (this.messageList) {
DateSeparator.addAll(this.messageList);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateDateSeparators
File: src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
updateDateSeparators
|
src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void save(MapSession session) {
if (!session.getId().equals(session.getOriginalId())) {
deleteById(session.getOriginalId());
}
cache.put(session.getId(), session, session.getMaxInactiveInterval().getSeconds(), TimeUnit.SECONDS);
}
|
Vulnerability Classification:
- CWE: CWE-384
- CVE: CVE-2019-10158
- Severity: HIGH
- CVSS Score: 7.5
Description: ISPN-10224 Skip Listener notification on remove
Function: save
File: spring/spring5/spring5-common/src/main/java/org/infinispan/spring/common/session/AbstractInfinispanSessionRepository.java
Repository: infinispan
Fixed Code:
@Override
public void save(MapSession session) {
if (!session.getId().equals(session.getOriginalId())) {
removeFromCacheWithoutNotifications(session.getOriginalId());
}
cache.put(session.getId(), session, session.getMaxInactiveInterval().getSeconds(), TimeUnit.SECONDS);
}
|
[
"CWE-384"
] |
CVE-2019-10158
|
HIGH
| 7.5
|
infinispan
|
save
|
spring/spring5/spring5-common/src/main/java/org/infinispan/spring/common/session/AbstractInfinispanSessionRepository.java
|
716664772d3673ca243bf841fe61c89cf12d8976
| 1
|
Analyze the following code function for security vulnerabilities
|
@POST
@Produces(MediaType.TEXT_XML)
@Consumes(MediaType.MULTIPART_FORM_DATA)
@Path("addAttachment")
@RestQuery(name = "addAttachmentInputStream", description = "Add an attachment to a given media package using an input stream", restParameters = {
@RestParameter(description = "The kind of attachment", isRequired = true, name = "flavor", type = RestParameter.Type.STRING),
@RestParameter(description = "The media package as XML", isRequired = true, name = "mediaPackage", type = RestParameter.Type.TEXT) }, bodyParameter = @RestParameter(description = "The attachment file", isRequired = true, name = "BODY", type = RestParameter.Type.FILE), reponses = {
@RestResponse(description = "Returns augmented media package", responseCode = HttpServletResponse.SC_OK),
@RestResponse(description = "Media package not valid", responseCode = HttpServletResponse.SC_BAD_REQUEST),
@RestResponse(description = "", responseCode = HttpServletResponse.SC_INTERNAL_SERVER_ERROR) }, returnDescription = "")
public Response addMediaPackageAttachment(@Context HttpServletRequest request) {
logger.trace("add attachment as multipart-form-data");
return addMediaPackageElement(request, MediaPackageElement.Type.Attachment);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addMediaPackageAttachment
File: modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/endpoint/IngestRestService.java
Repository: opencast
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2020-5230
|
MEDIUM
| 5
|
opencast
|
addMediaPackageAttachment
|
modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/endpoint/IngestRestService.java
|
bbb473f34ab95497d6c432c81285efb0c739f317
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getApiUrl() {
return apiUrl;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getApiUrl
File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/TelegramNotifier.java
Repository: codecentric/spring-boot-admin
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2022-46166
|
CRITICAL
| 9.8
|
codecentric/spring-boot-admin
|
getApiUrl
|
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/TelegramNotifier.java
|
c14c3ec12533f71f84de9ce3ce5ceb7991975f75
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean canDeviceOwnerChange(String restriction) {
return !IMMUTABLE_BY_OWNERS.contains(restriction);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: canDeviceOwnerChange
File: services/core/java/com/android/server/pm/UserRestrictionsUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3876
|
HIGH
| 7.2
|
android
|
canDeviceOwnerChange
|
services/core/java/com/android/server/pm/UserRestrictionsUtils.java
|
91fc934bb2e5ea59929bb2f574de6db9b5100745
| 0
|
Analyze the following code function for security vulnerabilities
|
private void searchAndStreamFile(FileEntry fileEntry, String term, OutputStream outputStream) {
Path folder = loggingPath(null);
try {
List<String> lines = IOUtils.readLines(new FileInputStream(new File(folder.toFile().toString(), fileEntry.getFilename())))
.stream()
.filter(line -> line.contains(term))
.map(line -> "[" + fileEntry.getFilename() + "] " + line)
.collect(toList());
for (String line : lines) {
outputStream.write(line.getBytes());
outputStream.write(System.lineSeparator().getBytes());
}
} catch (IOException e) {
throw new RuntimeException("error reading file", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: searchAndStreamFile
File: lib/src/main/java/eu/hinsch/spring/boot/actuator/logview/LogViewEndpoint.java
Repository: lukashinsch/spring-boot-actuator-logview
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-21234
|
MEDIUM
| 4
|
lukashinsch/spring-boot-actuator-logview
|
searchAndStreamFile
|
lib/src/main/java/eu/hinsch/spring/boot/actuator/logview/LogViewEndpoint.java
|
760acbb939a8d1f7d1a7dfcd51ca848eea04e772
| 0
|
Analyze the following code function for security vulnerabilities
|
private void doKeyguardLaterLocked() {
long timeout = getLockTimeout(KeyguardUpdateMonitor.getCurrentUser());
if (timeout == 0) {
doKeyguardLocked(null);
} else {
doKeyguardLaterLocked(timeout);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doKeyguardLaterLocked
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
|
doKeyguardLaterLocked
|
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
|
d18d8b350756b0e89e051736c1f28744ed31e93a
| 0
|
Analyze the following code function for security vulnerabilities
|
public final void setScript(File scriptFile) throws
it.geosolutions.jaiext.jiffle.JiffleException {
BufferedReader reader = null;
try {
reader = new BufferedReader(new FileReader(scriptFile));
StringBuilder sb = new StringBuilder();
String line;
while ((line = reader.readLine()) != null) {
line = line.trim();
if (line.length() > 0) {
sb.append(line);
sb.append('\n'); // put the newline back on for the parser
}
}
setScript(sb.toString());
} catch (IOException ex) {
throw new it.geosolutions.jaiext.jiffle.JiffleException("Could not read the script file", ex);
} finally {
if (reader != null) {
try {
reader.close();
} catch (IOException ignored) {
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setScript
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
|
setScript
|
jt-jiffle/jt-jiffle-language/src/main/java/it/geosolutions/jaiext/jiffle/Jiffle.java
|
cb1d6565d38954676b0a366da4f965fef38da1cb
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<DocumentReference> getChildrenReferences(int nb, int start, XWikiContext context) throws XWikiException
{
// Use cases:
// - the parent document reference saved in the database matches the reference of this document, in its fully
// serialized form (eg "wiki:space.page"). Note that this is normally not required since the wiki part
// isn't saved in the database when it matches the current wiki.
// - the parent document reference saved in the database matches the reference of this document, in its
// serialized form without the wiki part (eg "space.page"). The reason we don't need to specify the wiki
// part is because document parents saved in the database don't have the wiki part specified when it matches
// the current wiki.
// - the parent document reference saved in the database matches the page name part of this document's
// reference (eg "page") and the parent document's space is the same as this document's space.
List<DocumentReference> children = new ArrayList<DocumentReference>();
try {
Query query = getStore().getQueryManager()
.createQuery("select distinct doc.fullName from XWikiDocument doc where "
+ "doc.parent=:prefixedFullName or doc.parent=:fullName or (doc.parent=:name and doc.space=:space)",
Query.XWQL);
query.addFilter(Utils.getComponent(QueryFilter.class, "hidden"));
query.bindValue("prefixedFullName",
getDefaultEntityReferenceSerializer().serialize(getDocumentReference()));
query.bindValue("fullName", LOCAL_REFERENCE_SERIALIZER.serialize(getDocumentReference()));
query.bindValue("name", getDocumentReference().getName());
query.bindValue("space",
LOCAL_REFERENCE_SERIALIZER.serialize(getDocumentReference().getLastSpaceReference()));
query.setLimit(nb).setOffset(start);
List<String> queryResults = query.execute();
WikiReference wikiReference = this.getDocumentReference().getWikiReference();
for (String fullName : queryResults) {
children.add(getCurrentDocumentReferenceResolver().resolve(fullName, wikiReference));
}
} catch (QueryException e) {
throw new XWikiException(XWikiException.MODULE_XWIKI_STORE, XWikiException.ERROR_XWIKI_UNKNOWN,
String.format("Failed to retrieve children for document [%s]", this.getDocumentReference()), e);
}
return children;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getChildrenReferences
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
|
getChildrenReferences
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setNeedsInput(boolean needsInput) {
mKeyguardViewControllerLazy.get().setNeedsInput(needsInput);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setNeedsInput
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
|
setNeedsInput
|
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
|
d18d8b350756b0e89e051736c1f28744ed31e93a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected Object decode(
final ChannelHandlerContext ctx, Channel channel, ChannelBuffer in) throws Exception {
final int startOffset = in.readerIndex();
final int endOffset = in.writerIndex();
int offset = startOffset;
int totalLength = 0;
// If we calculated the length of the current SSL record before, use that information.
if (packetLength > 0) {
if (endOffset - startOffset < packetLength) {
return null;
} else {
offset += packetLength;
totalLength = packetLength;
packetLength = 0;
}
}
boolean nonSslRecord = false;
while (totalLength < OpenSslEngine.MAX_ENCRYPTED_PACKET_LENGTH) {
final int readableBytes = endOffset - offset;
if (readableBytes < 5) {
break;
}
final int packetLength = getEncryptedPacketLength(in, offset);
if (packetLength == -1) {
nonSslRecord = true;
break;
}
assert packetLength > 0;
if (packetLength > readableBytes) {
// wait until the whole packet can be read
this.packetLength = packetLength;
break;
}
int newTotalLength = totalLength + packetLength;
if (newTotalLength > OpenSslEngine.MAX_ENCRYPTED_PACKET_LENGTH) {
// Don't read too much.
break;
}
// We have a whole packet.
// Increment the offset to handle the next packet.
offset += packetLength;
totalLength = newTotalLength;
}
ChannelBuffer unwrapped = null;
if (totalLength > 0) {
// The buffer contains one or more full SSL records.
// Slice out the whole packet so unwrap will only be called with complete packets.
// Also directly reset the packetLength. This is needed as unwrap(..) may trigger
// decode(...) again via:
// 1) unwrap(..) is called
// 2) wrap(...) is called from within unwrap(...)
// 3) wrap(...) calls unwrapLater(...)
// 4) unwrapLater(...) calls decode(...)
//
// See https://github.com/netty/netty/issues/1534
final ByteBuffer inNetBuf = in.toByteBuffer(in.readerIndex(), totalLength);
unwrapped = unwrap(ctx, channel, in, inNetBuf, totalLength);
assert !inNetBuf.hasRemaining() || engine.isInboundDone();
}
if (nonSslRecord) {
// Not an SSL/TLS packet
NotSslRecordException e = new NotSslRecordException(
"not an SSL/TLS record: " + ChannelBuffers.hexDump(in));
in.skipBytes(in.readableBytes());
if (closeOnSslException) {
// first trigger the exception and then close the channel
fireExceptionCaught(ctx, e);
Channels.close(ctx, future(channel));
// just return null as we closed the channel before, that
// will take care of cleanup etc
return null;
} else {
throw e;
}
}
return unwrapped;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: decode
File: src/main/java/org/jboss/netty/handler/ssl/SslHandler.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2014-3488
|
MEDIUM
| 5
|
netty
|
decode
|
src/main/java/org/jboss/netty/handler/ssl/SslHandler.java
|
2fa9400a59d0563a66908aba55c41e7285a04994
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean equals(Object obj) {
if (obj instanceof CacheId) {
CacheId c = (CacheId) obj;
if (c.id == null && this.id == null) {
return true;
}
if (c.id == null) {
return false;
}
return c.id.equals(this.id);
} else {
return false;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: equals
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
|
equals
|
core/src/main/java/net/sourceforge/jnlp/cache/CacheUtil.java
|
2ab070cdac087bd208f64fa8138bb709f8d7680c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
@CacheEvict(value={CacheConstant.SYS_USERS_CACHE}, allEntries=true)
@Transactional(rollbackFor = Exception.class)
public boolean deleteBatchUsers(String userIds) {
//1.删除用户
this.removeByIds(Arrays.asList(userIds.split(",")));
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deleteBatchUsers
File: jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java
Repository: jeecgboot/jeecg-boot
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-45208
|
MEDIUM
| 4.3
|
jeecgboot/jeecg-boot
|
deleteBatchUsers
|
jeecg-module-system/jeecg-system-biz/src/main/java/org/jeecg/modules/system/service/impl/SysUserServiceImpl.java
|
51e2227bfe54f5d67b09411ee9a336750164e73d
| 0
|
Analyze the following code function for security vulnerabilities
|
@JsonProperty(FIELD_REQUEST_TIMEOUT)
public abstract int requestTimeout();
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: requestTimeout
File: graylog2-server/src/main/java/org/graylog2/lookup/adapters/DnsLookupDataAdapter.java
Repository: Graylog2/graylog2-server
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2023-41045
|
MEDIUM
| 5.3
|
Graylog2/graylog2-server
|
requestTimeout
|
graylog2-server/src/main/java/org/graylog2/lookup/adapters/DnsLookupDataAdapter.java
|
466af814523cffae9fbc7e77bab7472988f03c3e
| 0
|
Analyze the following code function for security vulnerabilities
|
public HttpRequest queryString(final String queryString) {
return queryString(queryString, true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: queryString
File: src/main/java/jodd/http/HttpRequest.java
Repository: oblac/jodd-http
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2022-29631
|
MEDIUM
| 5
|
oblac/jodd-http
|
queryString
|
src/main/java/jodd/http/HttpRequest.java
|
e50f573c8f6a39212ade68c6eb1256b2889fa8a6
| 0
|
Analyze the following code function for security vulnerabilities
|
@GuardedBy("this")
private boolean startInstrumentationOfSdkSandbox(
ComponentName className,
String profileFile,
Bundle arguments,
IInstrumentationWatcher watcher,
IUiAutomationConnection uiAutomationConnection,
int userId,
String abiOverride,
InstrumentationInfo instrumentationInfo,
ApplicationInfo sdkSandboxClientAppInfo,
boolean noRestart,
boolean disableHiddenApiChecks,
boolean disableTestApiChecks) {
if (noRestart) {
reportStartInstrumentationFailureLocked(
watcher,
className,
"Instrumenting sdk sandbox with --no-restart flag is not supported");
return false;
}
final ApplicationInfo sdkSandboxInfo;
try {
final PackageManager pm = mContext.getPackageManager();
sdkSandboxInfo = pm.getApplicationInfoAsUser(pm.getSdkSandboxPackageName(), 0, userId);
} catch (NameNotFoundException e) {
reportStartInstrumentationFailureLocked(
watcher, className, "Can't find SdkSandbox package");
return false;
}
final SdkSandboxManagerLocal sandboxManagerLocal =
LocalManagerRegistry.getManager(SdkSandboxManagerLocal.class);
if (sandboxManagerLocal == null) {
reportStartInstrumentationFailureLocked(
watcher, className, "Can't locate SdkSandboxManagerLocal");
return false;
}
final String processName = sandboxManagerLocal.getSdkSandboxProcessNameForInstrumentation(
sdkSandboxClientAppInfo);
ActiveInstrumentation activeInstr = new ActiveInstrumentation(this);
activeInstr.mClass = className;
activeInstr.mTargetProcesses = new String[]{processName};
activeInstr.mTargetInfo = sdkSandboxInfo;
activeInstr.mProfileFile = profileFile;
activeInstr.mArguments = arguments;
activeInstr.mWatcher = watcher;
activeInstr.mUiAutomationConnection = uiAutomationConnection;
activeInstr.mResultClass = className;
activeInstr.mHasBackgroundActivityStartsPermission = false;
activeInstr.mHasBackgroundForegroundServiceStartsPermission = false;
// Instrumenting sdk sandbox without a restart is not supported
activeInstr.mNoRestart = false;
final int callingUid = Binder.getCallingUid();
final long token = Binder.clearCallingIdentity();
try {
sandboxManagerLocal.notifyInstrumentationStarted(
sdkSandboxClientAppInfo.packageName, sdkSandboxClientAppInfo.uid);
synchronized (mProcLock) {
int sdkSandboxUid = Process.toSdkSandboxUid(sdkSandboxClientAppInfo.uid);
// Kill the package sdk sandbox process belong to. At this point sdk sandbox is
// already killed.
forceStopPackageLocked(
instrumentationInfo.targetPackage,
/* appId= */ -1,
/* callerWillRestart= */ true,
/* purgeCache= */ false,
/* doIt= */ true,
/* evenPersistent= */ true,
/* uninstalling= */ false,
userId,
"start instr");
ProcessRecord app = addAppLocked(
sdkSandboxInfo,
processName,
/* isolated= */ false,
/* isSdkSandbox= */ true,
sdkSandboxUid,
sdkSandboxClientAppInfo.packageName,
disableHiddenApiChecks,
disableTestApiChecks,
abiOverride,
ZYGOTE_POLICY_FLAG_EMPTY);
app.setActiveInstrumentation(activeInstr);
activeInstr.mFinished = false;
activeInstr.mSourceUid = callingUid;
activeInstr.mRunningProcesses.add(app);
if (!mActiveInstrumentation.contains(activeInstr)) {
mActiveInstrumentation.add(activeInstr);
}
app.mProfile.addHostingComponentType(HOSTING_COMPONENT_TYPE_INSTRUMENTATION);
}
} finally {
Binder.restoreCallingIdentity(token);
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startInstrumentationOfSdkSandbox
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
|
startInstrumentationOfSdkSandbox
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public DisplayInfo getDefaultDisplayInfoLocked() {
return getDefaultDisplayContentLocked().getDisplayInfo();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDefaultDisplayInfoLocked
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
|
getDefaultDisplayInfoLocked
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void close() {
try { _socket.setSoLinger(true, SOCKET_CLOSING_TIMEOUT); } catch (Exception _e) {}
// async flush if possible
// see https://github.com/rabbitmq/rabbitmq-java-client/issues/194
Callable<Void> flushCallable = new Callable<Void>() {
@Override
public Void call() throws Exception {
flush();
return null;
}
};
Future<Void> flushTask = null;
try {
if(this._shutdownExecutor == null) {
flushCallable.call();
} else {
flushTask = this._shutdownExecutor.submit(flushCallable);
flushTask.get(SOCKET_CLOSING_TIMEOUT, TimeUnit.SECONDS);
}
} catch(Exception e) {
if(flushTask != null) {
flushTask.cancel(true);
}
}
try { _socket.close(); } catch (Exception _e) {}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: close
File: src/main/java/com/rabbitmq/client/impl/SocketFrameHandler.java
Repository: rabbitmq/rabbitmq-java-client
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-46120
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-java-client
|
close
|
src/main/java/com/rabbitmq/client/impl/SocketFrameHandler.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
protected int getDepth(
RequestContext requestContext
) {
HttpServletRequest req = requestContext.getHttpServletRequest();
int depth = 1; // default is 1
String depthStr = req.getHeader("Depth");
if(depthStr != null) {
try {
depth = Integer.parseInt(depthStr);
} catch(Exception ignore) {}
}
return depth;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDepth
File: core/src/main/java/org/opencrx/application/uses/net/sf/webdav/methods/WebDavMethod.java
Repository: opencrx
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2023-46502
|
CRITICAL
| 9.8
|
opencrx
|
getDepth
|
core/src/main/java/org/opencrx/application/uses/net/sf/webdav/methods/WebDavMethod.java
|
ce7a71db0bb34ecbcb0e822d40598e410a48b399
| 0
|
Analyze the following code function for security vulnerabilities
|
public Object addRow(Object... values) {
if (values == null) {
throw new IllegalArgumentException("Values cannot be null");
}
Indexed dataSource = getContainerDataSource();
List<String> columnOrder = getState(false).columnOrder;
if (values.length != columnOrder.size()) {
throw new IllegalArgumentException(
"There are " + columnOrder.size() + " visible columns, but "
+ values.length + " cell values were provided.");
}
// First verify all parameter types
for (int i = 0; i < columnOrder.size(); i++) {
Object propertyId = getPropertyIdByColumnId(columnOrder.get(i));
Class<?> propertyType = dataSource.getType(propertyId);
if (values[i] != null && !propertyType.isInstance(values[i])) {
throw new IllegalArgumentException("Parameter " + i + "("
+ values[i] + ") is not an instance of "
+ propertyType.getCanonicalName());
}
}
Object itemId = dataSource.addItem();
try {
Item item = dataSource.getItem(itemId);
for (int i = 0; i < columnOrder.size(); i++) {
Object propertyId = getPropertyIdByColumnId(columnOrder.get(i));
Property<Object> property = item.getItemProperty(propertyId);
property.setValue(values[i]);
}
} catch (RuntimeException e) {
try {
dataSource.removeItem(itemId);
} catch (Exception e2) {
getLogger().log(Level.SEVERE,
"Error recovering from exception in addRow", e);
}
throw e;
}
return itemId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addRow
File: server/src/main/java/com/vaadin/ui/Grid.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-25028
|
MEDIUM
| 4.3
|
vaadin/framework
|
addRow
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
@Pure
public @Nullable InputStream getBinaryStream(String columnName) throws SQLException {
return getBinaryStream(findColumn(columnName));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getBinaryStream
File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
Repository: pgjdbc
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-31197
|
HIGH
| 8
|
pgjdbc
|
getBinaryStream
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void notifyError(SSHException error) {
log.debug("Got notified of {}", error.toString());
ErrorDeliveryUtil.alertEvents(error, kexInitSent, done);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: notifyError
File: src/main/java/net/schmizz/sshj/transport/KeyExchanger.java
Repository: hierynomus/sshj
The code follows secure coding practices.
|
[
"CWE-354"
] |
CVE-2023-48795
|
MEDIUM
| 5.9
|
hierynomus/sshj
|
notifyError
|
src/main/java/net/schmizz/sshj/transport/KeyExchanger.java
|
94fcc960e0fb198ddec0f7efc53f95ac627fe083
| 0
|
Analyze the following code function for security vulnerabilities
|
public void reset()
{
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: reset
File: core/src/main/java/org/bouncycastle/crypto/engines/AESEngine.java
Repository: bcgit/bc-java
The code follows secure coding practices.
|
[
"CWE-310"
] |
CVE-2016-1000339
|
MEDIUM
| 5
|
bcgit/bc-java
|
reset
|
core/src/main/java/org/bouncycastle/crypto/engines/AESEngine.java
|
413b42f4d770456508585c830cfcde95f9b0e93b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void startRtt(String callId, ParcelFileDescriptor fromInCall,
ParcelFileDescriptor toInCall, Session.Info sessionInfo) throws RemoteException {
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startRtt
File: tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
startRtt
|
tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setSystemDialer(ComponentName testComponentName) {
try {
Log.startSession("TSI.sSD");
enforceModifyPermission();
enforceShellOnly(Binder.getCallingUid(), "setSystemDialer");
synchronized (mLock) {
long token = Binder.clearCallingIdentity();
try {
mDefaultDialerCache.setSystemDialerComponentName(testComponentName);
} finally {
Binder.restoreCallingIdentity(token);
}
}
} finally {
Log.endSession();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSystemDialer
File: src/com/android/server/telecom/TelecomServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21394
|
MEDIUM
| 5.5
|
android
|
setSystemDialer
|
src/com/android/server/telecom/TelecomServiceImpl.java
|
68dca62035c49e14ad26a54f614199cb29a3393f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable
private ShortcutUser loadUserLocked(@UserIdInt int userId) {
final File path = getUserFile(userId);
if (DEBUG || DEBUG_REBOOT) {
Slog.d(TAG, "Loading from " + path);
}
final AtomicFile file = new AtomicFile(path);
final FileInputStream in;
try {
in = file.openRead();
} catch (FileNotFoundException e) {
if (DEBUG || DEBUG_REBOOT) {
Slog.d(TAG, "Not found " + path);
}
return null;
}
try {
final ShortcutUser ret = loadUserInternal(userId, in, /* forBackup= */ false);
return ret;
} catch (IOException | XmlPullParserException | InvalidFileFormatException e) {
Slog.e(TAG, "Failed to read file " + file.getBaseFile(), e);
return null;
} finally {
IoUtils.closeQuietly(in);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: loadUserLocked
File: services/core/java/com/android/server/pm/ShortcutService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40092
|
MEDIUM
| 5.5
|
android
|
loadUserLocked
|
services/core/java/com/android/server/pm/ShortcutService.java
|
a5e55363e69b3c84d3f4011c7b428edb1a25752c
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isDtmField(Field field) {
if (field.getType() == FieldType.REFERENCE && entity.getMainEntity() != null) {
return field.equals(MetadataHelper.getDetailToMainField(entity));
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isDtmField
File: src/main/java/com/rebuild/core/metadata/EntityRecordCreator.java
Repository: getrebuild/rebuild
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-1613
|
MEDIUM
| 4
|
getrebuild/rebuild
|
isDtmField
|
src/main/java/com/rebuild/core/metadata/EntityRecordCreator.java
|
d0de4cc35303168f44ca57712c824b5cb9525e54
| 0
|
Analyze the following code function for security vulnerabilities
|
public void gc()
{
System.gc();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: gc
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
|
gc
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressFBWarnings("DMI")
private void notifyUploadResult(UploadFileOperation upload, RemoteOperationResult uploadResult) {
Log_OC.d(TAG, "NotifyUploadResult with resultCode: " + uploadResult.getCode());
// cancelled operation or success -> silent removal of progress notification
if (mNotificationManager == null) {
mNotificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
}
// Only notify if the upload fails
if (!uploadResult.isCancelled() &&
!uploadResult.isSuccess() &&
ResultCode.LOCAL_FILE_NOT_FOUND != uploadResult.getCode() &&
uploadResult.getCode() != ResultCode.DELAYED_FOR_WIFI &&
uploadResult.getCode() != ResultCode.DELAYED_FOR_CHARGING &&
uploadResult.getCode() != ResultCode.DELAYED_IN_POWER_SAVE_MODE &&
uploadResult.getCode() != ResultCode.LOCK_FAILED) {
int tickerId = R.string.uploader_upload_failed_ticker;
String content;
// check credentials error
boolean needsToUpdateCredentials = uploadResult.getCode() == ResultCode.UNAUTHORIZED;
if (needsToUpdateCredentials) {
tickerId = R.string.uploader_upload_failed_credentials_error;
} else if (uploadResult.getCode() == ResultCode.SYNC_CONFLICT) { // check file conflict
tickerId = R.string.uploader_upload_failed_sync_conflict_error;
}
mNotificationBuilder
.setTicker(getString(tickerId))
.setContentTitle(getString(tickerId))
.setAutoCancel(true)
.setOngoing(false)
.setProgress(0, 0, false);
content = ErrorMessageAdapter.getErrorCauseMessage(uploadResult, upload, getResources());
if (needsToUpdateCredentials) {
// let the user update credentials with one click
Intent updateAccountCredentials = new Intent(this, AuthenticatorActivity.class);
updateAccountCredentials.putExtra(
AuthenticatorActivity.EXTRA_ACCOUNT, upload.getUser().toPlatformAccount()
);
updateAccountCredentials.putExtra(
AuthenticatorActivity.EXTRA_ACTION,
AuthenticatorActivity.ACTION_UPDATE_EXPIRED_TOKEN
);
updateAccountCredentials.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
updateAccountCredentials.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
updateAccountCredentials.addFlags(Intent.FLAG_FROM_BACKGROUND);
mNotificationBuilder.setContentIntent(PendingIntent.getActivity(
this,
(int) System.currentTimeMillis(),
updateAccountCredentials,
PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_IMMUTABLE
));
} else {
Intent intent;
if (uploadResult.getCode() == ResultCode.SYNC_CONFLICT) {
intent = ConflictsResolveActivity.createIntent(upload.getFile(),
upload.getUser(),
upload.getOCUploadId(),
Intent.FLAG_ACTIVITY_CLEAR_TOP,
this);
} else {
intent = UploadListActivity.createIntent(upload.getFile(),
upload.getUser(),
Intent.FLAG_ACTIVITY_CLEAR_TOP,
this);
}
mNotificationBuilder.setContentIntent(PendingIntent.getActivity(this,
(int) System.currentTimeMillis(),
intent,
PendingIntent.FLAG_IMMUTABLE)
);
}
mNotificationBuilder.setContentText(content);
if (!uploadResult.isSuccess()) {
mNotificationManager.notify((new SecureRandom()).nextInt(), mNotificationBuilder.build());
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: notifyUploadResult
File: app/src/main/java/com/owncloud/android/files/services/FileUploader.java
Repository: nextcloud/android
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-39210
|
MEDIUM
| 5.5
|
nextcloud/android
|
notifyUploadResult
|
app/src/main/java/com/owncloud/android/files/services/FileUploader.java
|
cd3bd0845a97e1d43daa0607a122b66b0068c751
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String getAttachmentsInfo(Attachments attachments)
{
StringBuffer sb = new StringBuffer();
sb.append(String.format("Attachments: %d\n", attachments.getAttachments().size()));
for (Attachment attachment : attachments.getAttachments()) {
sb.append(String.format("* %s\n", attachment.getName()));
}
return sb.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAttachmentsInfo
File: xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-test/xwiki-platform-rest-test-tests/src/test/it/org/xwiki/rest/test/framework/AbstractHttpIT.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2023-37277
|
CRITICAL
| 9.6
|
xwiki/xwiki-platform
|
getAttachmentsInfo
|
xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-test/xwiki-platform-rest-test-tests/src/test/it/org/xwiki/rest/test/framework/AbstractHttpIT.java
|
4c175405faa0e62437df397811c7526dfc0fbae7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void testDeserializationFromStringWithZeroZoneOffset01() throws Exception {
Instant date = Instant.now();
String json = formatWithZeroZoneOffset(date, "+00:00");
Instant result = MAPPER.readValue(json, Instant.class);
assertEquals("The value is not correct.", date, result);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: testDeserializationFromStringWithZeroZoneOffset01
File: datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestInstantSerialization.java
Repository: FasterXML/jackson-modules-java8
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-1000873
|
MEDIUM
| 4.3
|
FasterXML/jackson-modules-java8
|
testDeserializationFromStringWithZeroZoneOffset01
|
datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestInstantSerialization.java
|
ba27ce5909dfb49bcaf753ad3e04ecb980010b0b
| 0
|
Analyze the following code function for security vulnerabilities
|
private static String byteToHex(final byte[] hash)
{
Formatter formatter = new Formatter();
for (byte b : hash)
{
formatter.format("%02x", b);
}
String result = formatter.toString();
formatter.close();
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: byteToHex
File: HeatMapServer/src/com/datformers/servlet/LoginServlet.java
Repository: ssn2013/cis450Project
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2015-10020
|
MEDIUM
| 5.2
|
ssn2013/cis450Project
|
byteToHex
|
HeatMapServer/src/com/datformers/servlet/LoginServlet.java
|
39b495011437a105c7670e17e071f99195b4922e
| 0
|
Analyze the following code function for security vulnerabilities
|
public int removeUnusedObjects() {
boolean hits[] = new boolean[xrefObj.size()];
removeUnusedNode(trailer, hits);
int total = 0;
if (partial) {
for (int k = 1; k < hits.length; ++k) {
if (!hits[k]) {
xref[k * 2] = -1;
xref[k * 2 + 1] = 0;
xrefObj.set(k, null);
++total;
}
}
}
else {
for (int k = 1; k < hits.length; ++k) {
if (!hits[k]) {
xrefObj.set(k, null);
++total;
}
}
}
return total;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeUnusedObjects
File: java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
Repository: pdftk-java/pdftk
The code follows secure coding practices.
|
[
"CWE-835"
] |
CVE-2021-37819
|
HIGH
| 7.5
|
pdftk-java/pdftk
|
removeUnusedObjects
|
java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
|
9b0cbb76c8434a8505f02ada02a94263dcae9247
| 0
|
Analyze the following code function for security vulnerabilities
|
@GuardedBy("mLock")
@Override
void scheduleSaveToAppSearchLocked() {
final Map<String, ShortcutInfo> copy = new ArrayMap<>(mShortcuts);
if (!mTransientShortcuts.isEmpty()) {
copy.putAll(mTransientShortcuts);
mTransientShortcuts.clear();
}
saveShortcutsAsync(copy.values().stream().filter(ShortcutInfo::usesQuota).collect(
Collectors.toList()));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: scheduleSaveToAppSearchLocked
File: services/core/java/com/android/server/pm/ShortcutPackage.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40075
|
MEDIUM
| 5.5
|
android
|
scheduleSaveToAppSearchLocked
|
services/core/java/com/android/server/pm/ShortcutPackage.java
|
ae768fbb9975fdab267f525831cb52f485ab0ecc
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean currentMccEqualsSimMcc(ServiceState s) {
String simNumeric = ((TelephonyManager) mPhone.getContext().
getSystemService(Context.TELEPHONY_SERVICE)).
getSimOperatorNumericForPhone(getPhoneId());
String operatorNumeric = s.getOperatorNumeric();
boolean equalsMcc = true;
try {
equalsMcc = simNumeric.substring(0, 3).
equals(operatorNumeric.substring(0, 3));
} catch (Exception e){
}
return equalsMcc;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: currentMccEqualsSimMcc
File: src/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2016-3831
|
MEDIUM
| 5
|
android
|
currentMccEqualsSimMcc
|
src/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
|
f47bc301ccbc5e6d8110afab5a1e9bac1d4ef058
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void addLogHandler(Handler handler) {
LOG.addHandler(handler);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addLogHandler
File: rt/transports/http/src/main/java/org/apache/cxf/transport/https/HttpsURLConnectionFactory.java
Repository: apache/cxf
The code follows secure coding practices.
|
[
"CWE-755"
] |
CVE-2018-8039
|
MEDIUM
| 6.8
|
apache/cxf
|
addLogHandler
|
rt/transports/http/src/main/java/org/apache/cxf/transport/https/HttpsURLConnectionFactory.java
|
fae6fabf9bd7647f5e9cb68897a7d72b545b741b
| 0
|
Analyze the following code function for security vulnerabilities
|
public void updateClob(@Positive int columnIndex, @Nullable Clob x) throws SQLException {
throw org.postgresql.Driver.notImplemented(this.getClass(), "updateClob(int,Clob)");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateClob
File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
Repository: pgjdbc
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-31197
|
HIGH
| 8
|
pgjdbc
|
updateClob
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean verify(Attributes attributes, String entry, byte[] data,
int start, int end, boolean ignoreSecondEndline, boolean ignorable) {
for (int i = 0; i < DIGEST_ALGORITHMS.length; i++) {
String algorithm = DIGEST_ALGORITHMS[i];
String hash = attributes.getValue(algorithm + entry);
if (hash == null) {
continue;
}
MessageDigest md;
try {
md = MessageDigest.getInstance(algorithm);
} catch (NoSuchAlgorithmException e) {
continue;
}
if (ignoreSecondEndline && data[end - 1] == '\n' && data[end - 2] == '\n') {
md.update(data, start, end - 1 - start);
} else {
md.update(data, start, end - start);
}
byte[] b = md.digest();
byte[] encodedHashBytes = hash.getBytes(StandardCharsets.ISO_8859_1);
return verifyMessageDigest(b, encodedHashBytes);
}
return ignorable;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: verify
File: core/java/android/util/jar/StrictJarVerifier.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21253
|
MEDIUM
| 5.5
|
android
|
verify
|
core/java/android/util/jar/StrictJarVerifier.java
|
84df68840b6f2407146e722ebd95a7d8bc6e3529
| 0
|
Analyze the following code function for security vulnerabilities
|
public Collection<Column> getErrorColumns() {
return Collections.unmodifiableCollection(errorColumns);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getErrorColumns
File: server/src/main/java/com/vaadin/ui/Grid.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-25028
|
MEDIUM
| 4.3
|
vaadin/framework
|
getErrorColumns
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getProfileWithMinimumFailedPasswordsForWipe(int userHandle, boolean parent) {
if (!mHasFeature || !mLockPatternUtils.hasSecureLockScreen()) {
return UserHandle.USER_NULL;
}
Preconditions.checkArgumentNonnegative(userHandle, "Invalid userId");
final CallerIdentity caller = getCallerIdentity();
Preconditions.checkCallAuthorization(hasFullCrossUsersPermission(caller, userHandle));
synchronized (getLockObject()) {
ActiveAdmin admin = getAdminWithMinimumFailedPasswordsForWipeLocked(
userHandle, parent);
return admin != null ? getUserIdToWipeForFailedPasswords(admin) : UserHandle.USER_NULL;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProfileWithMinimumFailedPasswordsForWipe
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
|
getProfileWithMinimumFailedPasswordsForWipe
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
@Transactional( readOnly = true )
public List<ProgramDataElementDimensionItem> getGeneratedProgramDataElements( String programUid )
{
Program program = getProgram( programUid );
List<ProgramDataElementDimensionItem> programDataElements = Lists.newArrayList();
if ( program == null )
{
return programDataElements;
}
for ( DataElement element : program.getDataElements() )
{
programDataElements.add( new ProgramDataElementDimensionItem( program, element ) );
}
Collections.sort( programDataElements );
return programDataElements;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getGeneratedProgramDataElements
File: dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/DefaultProgramService.java
Repository: dhis2/dhis2-core
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-24848
|
MEDIUM
| 6.5
|
dhis2/dhis2-core
|
getGeneratedProgramDataElements
|
dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/DefaultProgramService.java
|
ef04483a9b177d62e48dcf4e498b302a11f95e7d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable
static ActivityRecord isInAnyTask(IBinder token) {
final ActivityRecord r = ActivityRecord.forTokenLocked(token);
return (r != null && r.isAttached()) ? r : null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isInAnyTask
File: services/core/java/com/android/server/wm/ActivityRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21145
|
HIGH
| 7.8
|
android
|
isInAnyTask
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String encodeURL(String s)
{
return this.response.encodeURL(s);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: encodeURL
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiServletResponse.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-601"
] |
CVE-2022-23618
|
MEDIUM
| 5.8
|
xwiki/xwiki-platform
|
encodeURL
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiServletResponse.java
|
5251c02080466bf9fb55288f04a37671108f8096
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setConferenceMergeFailed(String callId, Session.Info sessionInfo) {
Log.startSession(sessionInfo, "CSW.sCMF", mPackageAbbreviation);
long token = Binder.clearCallingIdentity();
try {
synchronized (mLock) {
logIncoming("setConferenceMergeFailed %s", callId);
// TODO: we should move the UI for indication a merge failure here
// from CallNotifier.onSuppServiceFailed(). This way the InCallUI can
// deliver the message anyway that they want. b/20530631.
Call call = mCallIdMapper.getCall(callId);
if (call != null) {
call.onConnectionEvent(Connection.EVENT_CALL_MERGE_FAILED, null);
} else {
Log.w(this, "setConferenceMergeFailed, unknown call id: %s", callId);
}
}
} catch (Throwable t) {
Log.e(ConnectionServiceWrapper.this, t, "");
throw t;
} finally {
Binder.restoreCallingIdentity(token);
Log.endSession();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setConferenceMergeFailed
File: src/com/android/server/telecom/ConnectionServiceWrapper.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
setConferenceMergeFailed
|
src/com/android/server/telecom/ConnectionServiceWrapper.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
private PendingIntent createBackgroundPendingIntent(boolean forceService) {
Context context = AndroidNativeUtil.getContext().getApplicationContext();
final Class bgListenerClass = getBackgroundLocationListener();
if (bgListenerClass == null) {
return null;
}
if (!forceService && Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
Intent intent = new Intent(context, BackgroundLocationBroadcastReceiver.class);
intent.setData(Uri.parse("http://codenameone.com/a?" + bgListenerClass.getName()));
intent.setAction(BackgroundLocationBroadcastReceiver.ACTION_PROCESS_UPDATES);
PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
return pendingIntent;
} else {
Intent intent = new Intent(context, BackgroundLocationHandler.class);
intent.setData(Uri.parse("http://codenameone.com/a?" + bgListenerClass.getName()));
PendingIntent pendingIntent = PendingIntent.getService(context, 0,
intent,
PendingIntent.FLAG_UPDATE_CURRENT);
return pendingIntent;
}
}
|
Vulnerability Classification:
- CWE: CWE-668
- CVE: CVE-2022-4903
- Severity: MEDIUM
- CVSS Score: 5.1
Description: Fixed #3583 Pending Intent vulnerability
Function: createBackgroundPendingIntent
File: Ports/Android/src/com/codename1/location/AndroidLocationPlayServiceManager.java
Repository: codenameone/CodenameOne
Fixed Code:
private PendingIntent createBackgroundPendingIntent(boolean forceService) {
Context context = AndroidNativeUtil.getContext().getApplicationContext();
final Class bgListenerClass = getBackgroundLocationListener();
if (bgListenerClass == null) {
return null;
}
if (!forceService && Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
Intent intent = new Intent(context, BackgroundLocationBroadcastReceiver.class);
intent.setData(Uri.parse("http://codenameone.com/a?" + bgListenerClass.getName()));
intent.setAction(BackgroundLocationBroadcastReceiver.ACTION_PROCESS_UPDATES);
PendingIntent pendingIntent = AndroidImplementation.getBroadcastPendingIntent(context, 0, intent);
return pendingIntent;
} else {
Intent intent = new Intent(context, BackgroundLocationHandler.class);
intent.setData(Uri.parse("http://codenameone.com/a?" + bgListenerClass.getName()));
PendingIntent pendingIntent = AndroidImplementation.getPendingIntent(context, 0,
intent);
return pendingIntent;
}
}
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
createBackgroundPendingIntent
|
Ports/Android/src/com/codename1/location/AndroidLocationPlayServiceManager.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 1
|
Analyze the following code function for security vulnerabilities
|
public DateFormat getDateFormat() {
return dateFormat;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDateFormat
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
|
getDateFormat
|
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
|
public void onShowNextAffiliatedTask() {
showRelativeAffiliatedTask(true);
}
|
Vulnerability Classification:
- CWE: CWE-264
- CVE: CVE-2016-0813
- Severity: MEDIUM
- CVSS Score: 6.6
Description: DO NOT MERGE Ensure that the device is provisioned before showing Recents.
Bug: 25476219
Change-Id: I5bb9cca74790521de71c0037b4f2421c3d21b3f6
Function: onShowNextAffiliatedTask
File: packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java
Repository: android
Fixed Code:
public void onShowNextAffiliatedTask() {
// Ensure the device has been provisioned before allowing the user to interact with
// recents
if (!isDeviceProvisioned()) {
return;
}
showRelativeAffiliatedTask(true);
}
|
[
"CWE-264"
] |
CVE-2016-0813
|
MEDIUM
| 6.6
|
android
|
onShowNextAffiliatedTask
|
packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java
|
16a76dadcc23a13223e9c2216dad1fe5cad7d6e1
| 1
|
Analyze the following code function for security vulnerabilities
|
protected void configureParser(final XMLReader parser, final SAXHandler contentHandler)
throws JDOMException {
// Setup SAX handlers.
parser.setContentHandler(contentHandler);
if (saxEntityResolver != null) {
parser.setEntityResolver(saxEntityResolver);
}
if (saxDTDHandler != null) {
parser.setDTDHandler(saxDTDHandler);
} else {
parser.setDTDHandler(contentHandler);
}
if (saxErrorHandler != null) {
parser.setErrorHandler(saxErrorHandler);
} else {
parser.setErrorHandler(new BuilderErrorHandler());
}
boolean success = false;
try {
parser.setProperty(SAX_PROPERTY_LEXICAL_HANDLER,
contentHandler);
success = true;
} catch (final SAXNotSupportedException e) {
// No lexical reporting available
} catch (final SAXNotRecognizedException e) {
// No lexical reporting available
}
// Some parsers use alternate property for lexical handling (grr...)
if (!success) {
try {
parser.setProperty(SAX_PROPERTY_LEXICAL_HANDLER_ALT,
contentHandler);
success = true;
} catch (final SAXNotSupportedException e) {
// No lexical reporting available
} catch (final SAXNotRecognizedException e) {
// No lexical reporting available
}
}
// Set any user-specified features on the parser.
for (final Map.Entry<String, Boolean> me : features.entrySet()) {
internalSetFeature(parser, me.getKey(), me.getValue().booleanValue(), me.getKey());
}
// Set any user-specified properties on the parser.
for (final Map.Entry<String, Object> me : properties.entrySet()) {
internalSetProperty(parser, me.getKey(), me.getValue(), me.getKey());
}
// Set entity expansion
// Note SAXHandler can work regardless of how this is set, but when
// entity expansion it's worth it to try to tell the parser not to
// even bother with external general entities.
// Apparently no parsers yet support this feature.
// XXX It might make sense to setEntityResolver() with a resolver
// that simply ignores external general entities
try {
if (parser.getFeature(SAX_FEATURE_EXTERNAL_ENT) != expand) {
parser.setFeature(SAX_FEATURE_EXTERNAL_ENT, expand);
}
} catch (final SAXException e) { /* Ignore... */
}
// Try setting the DeclHandler if entity expansion is off
if (!expand) {
try {
parser.setProperty(SAX_PROPERTY_DECLARATION_HANDLER,
contentHandler);
success = true;
} catch (final SAXNotSupportedException e) {
// No lexical reporting available
} catch (final SAXNotRecognizedException e) {
// No lexical reporting available
}
}
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2021-33813
- Severity: MEDIUM
- CVSS Score: 5.0
Description: fix setFeature bug and add test case
Function: configureParser
File: core/src/java/org/jdom2/input/SAXBuilder.java
Repository: hunterhacker/jdom
Fixed Code:
protected void configureParser(final XMLReader parser, final SAXHandler contentHandler)
throws JDOMException {
// Setup SAX handlers.
parser.setContentHandler(contentHandler);
if (saxEntityResolver != null) {
parser.setEntityResolver(saxEntityResolver);
}
if (saxDTDHandler != null) {
parser.setDTDHandler(saxDTDHandler);
} else {
parser.setDTDHandler(contentHandler);
}
if (saxErrorHandler != null) {
parser.setErrorHandler(saxErrorHandler);
} else {
parser.setErrorHandler(new BuilderErrorHandler());
}
boolean success = false;
try {
parser.setProperty(SAX_PROPERTY_LEXICAL_HANDLER,
contentHandler);
success = true;
} catch (final SAXNotSupportedException e) {
// No lexical reporting available
} catch (final SAXNotRecognizedException e) {
// No lexical reporting available
}
// Some parsers use alternate property for lexical handling (grr...)
if (!success) {
try {
parser.setProperty(SAX_PROPERTY_LEXICAL_HANDLER_ALT,
contentHandler);
success = true;
} catch (final SAXNotSupportedException e) {
// No lexical reporting available
} catch (final SAXNotRecognizedException e) {
// No lexical reporting available
}
}
// Set any user-specified properties on the parser.
for (final Map.Entry<String, Object> me : properties.entrySet()) {
internalSetProperty(parser, me.getKey(), me.getValue(), me.getKey());
}
// Set entity expansion
// Note SAXHandler can work regardless of how this is set, but when
// entity expansion it's worth it to try to tell the parser not to
// even bother with external general entities.
// Apparently no parsers yet support this feature.
// XXX It might make sense to setEntityResolver() with a resolver
// that simply ignores external general entities
try {
if (parser.getFeature(SAX_FEATURE_EXTERNAL_ENT) != expand) {
parser.setFeature(SAX_FEATURE_EXTERNAL_ENT, expand);
}
} catch (final SAXException e) { /* Ignore... */
}
// Try setting the DeclHandler if entity expansion is off
if (!expand) {
try {
parser.setProperty(SAX_PROPERTY_DECLARATION_HANDLER,
contentHandler);
success = true;
} catch (final SAXNotSupportedException e) {
// No lexical reporting available
} catch (final SAXNotRecognizedException e) {
// No lexical reporting available
}
}
// Set any user-specified features on the parser.
for (final Map.Entry<String, Boolean> me : features.entrySet()) {
internalSetFeature(parser, me.getKey(), me.getValue().booleanValue(), me.getKey());
}
}
|
[
"CWE-611"
] |
CVE-2021-33813
|
MEDIUM
| 5
|
hunterhacker/jdom
|
configureParser
|
core/src/java/org/jdom2/input/SAXBuilder.java
|
bd3ab78370098491911d7fe9d7a43b97144a234e
| 1
|
Analyze the following code function for security vulnerabilities
|
public int getPortableVersion() {
return portableVersion;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPortableVersion
File: hazelcast/src/main/java/com/hazelcast/config/SerializationConfig.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
getPortableVersion
|
hazelcast/src/main/java/com/hazelcast/config/SerializationConfig.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void registerProcessObserver(IProcessObserver processObserver) {
ActivityManagerService.this.registerProcessObserver(processObserver);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: registerProcessObserver
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
|
registerProcessObserver
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isMarkResourcesForReindexingUponSearchParameterChange() {
return myMarkResourcesForReindexingUponSearchParameterChange;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isMarkResourcesForReindexingUponSearchParameterChange
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
|
isMarkResourcesForReindexingUponSearchParameterChange
|
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
|
@Override
public boolean enable() throws RemoteException {
NfcPermissions.enforceAdminPermissions(mContext);
saveNfcOnSetting(true);
if (mIsAirplaneSensitive && isAirplaneModeOn()) {
if (!mIsAirplaneToggleable) {
Log.i(TAG, "denying enable() request (airplane mode)");
return false;
}
// Make sure the override survives a reboot
mPrefsEditor.putBoolean(PREF_AIRPLANE_OVERRIDE, true);
mPrefsEditor.apply();
}
new EnableDisableTask().execute(TASK_ENABLE);
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: enable
File: src/com/android/nfc/NfcService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3761
|
LOW
| 2.1
|
android
|
enable
|
src/com/android/nfc/NfcService.java
|
9ea802b5456a36f1115549b645b65c791eff3c2c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void addItemsAtomic(Context c, List<Collection> mycollections, String sourceDir, String mapFile, boolean template) throws Exception {
try {
addItems(c, mycollections, sourceDir, mapFile, template);
} catch (Exception addException) {
log.error("AddItems encountered an error, will try to revert. Error: " + addException.getMessage());
deleteItems(c, mapFile);
log.info("Attempted to delete partial (errored) import");
throw addException;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addItemsAtomic
File: dspace-api/src/main/java/org/dspace/app/itemimport/ItemImportServiceImpl.java
Repository: DSpace
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-31195
|
HIGH
| 7.2
|
DSpace
|
addItemsAtomic
|
dspace-api/src/main/java/org/dspace/app/itemimport/ItemImportServiceImpl.java
|
7af52a0883a9dbc475cf3001f04ed11b24c8a4c0
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected List<Contentlet> search(String query, int limit, int offset, String sortBy) throws DotDataException, DotStateException, DotSecurityException {
SearchHits hits = indexSearch(query, limit, offset, sortBy);
List<String> inodes=new ArrayList<String>();
for(SearchHit h : hits)
inodes.add(h.field("inode").getValue().toString());
return findContentlets(inodes);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: search
File: src/com/dotcms/content/elasticsearch/business/ESContentFactoryImpl.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-2355
|
HIGH
| 7.5
|
dotCMS/core
|
search
|
src/com/dotcms/content/elasticsearch/business/ESContentFactoryImpl.java
|
897f3632d7e471b7a73aabed5b19f6f53d4e5562
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public long getCacheControlDuration() {
return ServletUtil.CACHE_NO_CACHE;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCacheControlDuration
File: src/main/java/org/olat/core/commons/modules/bc/commands/CmdDownloadZip.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-41152
|
MEDIUM
| 4
|
OpenOLAT
|
getCacheControlDuration
|
src/main/java/org/olat/core/commons/modules/bc/commands/CmdDownloadZip.java
|
418bb509ffcb0e25ab4390563c6c47f0458583eb
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isUserAddedCertificate(X509Certificate cert) {
if (trustedCertificateStore == null) {
return false;
} else {
return trustedCertificateStore.isUserAddedCertificate(cert);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isUserAddedCertificate
File: src/platform/java/org/conscrypt/TrustManagerImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-254",
"CWE-345"
] |
CVE-2016-0818
|
MEDIUM
| 4.3
|
android
|
isUserAddedCertificate
|
src/platform/java/org/conscrypt/TrustManagerImpl.java
|
c4ab1b959280413fb11bf4fd7f6b4c2ba38bd779
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setQuietPeriod(Integer quietPeriod) throws IOException {
this.quietPeriod = quietPeriod;
save();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setQuietPeriod
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
|
setQuietPeriod
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getFacesResourceURL(FacesContext context, String Url, boolean isGlobal) {
return getWebXml(context).getFacesResourceURL(context, Url, isGlobal);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFacesResourceURL
File: framework/impl/src/main/java/org/ajax4jsf/resource/ResourceBuilderImpl.java
Repository: nuxeo/richfaces-3.3
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2013-4521
|
HIGH
| 7.5
|
nuxeo/richfaces-3.3
|
getFacesResourceURL
|
framework/impl/src/main/java/org/ajax4jsf/resource/ResourceBuilderImpl.java
|
6cbad2a6dcb70d3e33a6ce5879b1a3ad79eb1aec
| 0
|
Analyze the following code function for security vulnerabilities
|
public void updateViewCount(Post showPost, HttpServletRequest req, HttpServletResponse res) {
//do not count views from author
if (showPost != null && !isMine(showPost, getAuthUser(req))) {
String postviews = StringUtils.trimToEmpty(HttpUtils.getStateParam("postviews", req));
if (!StringUtils.contains(postviews, showPost.getId())) {
long views = (showPost.getViewcount() == null) ? 0 : showPost.getViewcount();
showPost.setViewcount(views + 1); //increment count
HttpUtils.setStateParam("postviews", (postviews.isEmpty() ? "" : postviews + ".") + showPost.getId(),
req, res);
pc.update(showPost);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateViewCount
File: src/main/java/com/erudika/scoold/utils/ScooldUtils.java
Repository: Erudika/scoold
The code follows secure coding practices.
|
[
"CWE-130"
] |
CVE-2022-1543
|
MEDIUM
| 6.5
|
Erudika/scoold
|
updateViewCount
|
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public SerializationServiceBuilder setClassLoader(ClassLoader classLoader) {
this.classLoader = classLoader;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setClassLoader
File: hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/DefaultSerializationServiceBuilder.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
setClassLoader
|
hazelcast/src/main/java/com/hazelcast/internal/serialization/impl/DefaultSerializationServiceBuilder.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
static int checkPermission(String permission, int pid, int uid) {
if (permission == null) {
return PackageManager.PERMISSION_DENIED;
}
return checkComponentPermission(permission, pid, uid, -1, true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkPermission
File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40094
|
HIGH
| 7.8
|
android
|
checkPermission
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
final public String getOperatingSystemSpecifcResourcePath() {
return getPlatformSpecifcResourcePath(getOperatingSystem());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getOperatingSystemSpecifcResourcePath
File: hawtjni-runtime/src/main/java/org/fusesource/hawtjni/runtime/Library.java
Repository: fusesource/hawtjni
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2013-2035
|
MEDIUM
| 4.4
|
fusesource/hawtjni
|
getOperatingSystemSpecifcResourcePath
|
hawtjni-runtime/src/main/java/org/fusesource/hawtjni/runtime/Library.java
|
92c266170ce98edc200c656bd034a237098b8aa5
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.