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
|
@Bean
public CorsFilter corsFilter() {
CorsConfiguration config = new CorsConfiguration();
config.setAllowCredentials(true);
config.addAllowedOrigin("*");
config.addAllowedHeader("*");
config.setMaxAge(18000L);
config.addAllowedMethod("*");
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
source.registerCorsConfiguration("/**", config);
return new CorsFilter(source);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: corsFilter
File: console/src/main/java/com/alibaba/nacos/console/config/ConsoleConfig.java
Repository: alibaba/nacos
The code follows secure coding practices.
|
[
"CWE-290"
] |
CVE-2021-29441
|
HIGH
| 7.5
|
alibaba/nacos
|
corsFilter
|
console/src/main/java/com/alibaba/nacos/console/config/ConsoleConfig.java
|
91d16023d91ea21a5e58722c751485a0b9bbeeb3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getIconMaxDimensions(String packageName, int userId) {
verifyCaller(packageName, userId);
synchronized (mLock) {
return mMaxIconDimension;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getIconMaxDimensions
File: services/core/java/com/android/server/pm/ShortcutService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40079
|
HIGH
| 7.8
|
android
|
getIconMaxDimensions
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
default void onNetworkUpdated(
@NonNull WifiConfiguration newConfig, @NonNull WifiConfiguration oldConfig) { }
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onNetworkUpdated
File: service/java/com/android/server/wifi/WifiConfigManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
onNetworkUpdated
|
service/java/com/android/server/wifi/WifiConfigManager.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String getItemGroupAndItemMetaCondition(String crfVersionIds) {
return " where cv.crf_version_id in (" + crfVersionIds + ") and cv.crf_version_id = ifm.crf_version_id"
+ " and ifm.item_id = item.item_id and ifm.response_set_id = rs.response_set_id"
+ " and ifm.item_id = igm.item_id and cv.crf_version_id = igm.crf_version_id and igm.item_group_id = ig.item_group_id"
+ " order by cv.crf_id, cv.crf_version_id desc, ig.item_group_id, item.item_id, rs.response_set_id";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getItemGroupAndItemMetaCondition
File: core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
Repository: OpenClinica
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-24831
|
HIGH
| 7.5
|
OpenClinica
|
getItemGroupAndItemMetaCondition
|
core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
|
b152cc63019230c9973965a98e4386ea5322c18f
| 0
|
Analyze the following code function for security vulnerabilities
|
public void backupAgentCreated(String agentPackageName, IBinder agent) {
if (DEBUG_BACKUP) Slog.v(TAG_BACKUP, "backupAgentCreated: " + agentPackageName
+ " = " + agent);
synchronized(this) {
if (!agentPackageName.equals(mBackupAppName)) {
Slog.e(TAG, "Backup agent created for " + agentPackageName + " but not requested!");
return;
}
}
long oldIdent = Binder.clearCallingIdentity();
try {
IBackupManager bm = IBackupManager.Stub.asInterface(
ServiceManager.getService(Context.BACKUP_SERVICE));
bm.agentConnected(agentPackageName, agent);
} catch (RemoteException e) {
// can't happen; the backup manager service is local
} catch (Exception e) {
Slog.w(TAG, "Exception trying to deliver BackupAgent binding: ");
e.printStackTrace();
} finally {
Binder.restoreCallingIdentity(oldIdent);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: backupAgentCreated
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2018-9492
|
HIGH
| 7.2
|
android
|
backupAgentCreated
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public void reportCurKeyguardUsageEvent(boolean keyguardShowing) {
ActivityManagerService.this.reportGlobalUsageEvent(keyguardShowing
? UsageEvents.Event.KEYGUARD_SHOWN
: UsageEvents.Event.KEYGUARD_HIDDEN);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: reportCurKeyguardUsageEvent
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
|
reportCurKeyguardUsageEvent
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void dumpHeapFinished(String path) {
synchronized (this) {
if (Binder.getCallingPid() != mMemWatchDumpPid) {
Slog.w(TAG, "dumpHeapFinished: Calling pid " + Binder.getCallingPid()
+ " does not match last pid " + mMemWatchDumpPid);
return;
}
if (mMemWatchDumpFile == null || !mMemWatchDumpFile.equals(path)) {
Slog.w(TAG, "dumpHeapFinished: Calling path " + path
+ " does not match last path " + mMemWatchDumpFile);
return;
}
if (DEBUG_PSS) Slog.d(TAG_PSS, "Dump heap finished for " + path);
mHandler.sendEmptyMessage(POST_DUMP_HEAP_NOTIFICATION_MSG);
// Forced gc to clean up the remnant hprof fd.
Runtime.getRuntime().gc();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpHeapFinished
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2018-9492
|
HIGH
| 7.2
|
android
|
dumpHeapFinished
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onChildItemLongClicked(long idFeed) {
startDialogFragment(idFeed, false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onChildItemLongClicked
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
|
onChildItemLongClicked
|
News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java
|
05449cb666059af7de2302df9d5c02997a23df85
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getPublicId() {
return fPublicId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPublicId
File: ext/java/nokogiri/XmlSchema.java
Repository: sparklemotion/nokogiri
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2020-26247
|
MEDIUM
| 4
|
sparklemotion/nokogiri
|
getPublicId
|
ext/java/nokogiri/XmlSchema.java
|
9c87439d9afa14a365ff13e73adc809cb2c3d97b
| 0
|
Analyze the following code function for security vulnerabilities
|
void sendContinueUserSwitchLocked(UserStartedState uss, int oldUserId, int newUserId) {
mCurUserSwitchCallback = null;
mHandler.removeMessages(USER_SWITCH_TIMEOUT_MSG);
mHandler.sendMessage(mHandler.obtainMessage(CONTINUE_USER_SWITCH_MSG,
oldUserId, newUserId, uss));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendContinueUserSwitchLocked
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3833
|
MEDIUM
| 4.3
|
android
|
sendContinueUserSwitchLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void clearChanges() {
changes = null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearChanges
File: flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2023-25499
|
MEDIUM
| 6.5
|
vaadin/flow
|
clearChanges
|
flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java
|
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
| 0
|
Analyze the following code function for security vulnerabilities
|
private UserReferenceSerializer<String> getUserReferenceCompactWikiSerializer()
{
return Utils.getComponent(UserReferenceSerializer.TYPE_STRING, "compactwiki/document");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserReferenceCompactWikiSerializer
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2023-29523
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
getUserReferenceCompactWikiSerializer
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
0d547181389f7941e53291af940966413823f61c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
void setClientVisible(boolean clientVisible) {
// TODO(shell-transitions): Remove mDeferHidingClient once everything is shell-transitions.
// pip activities should just remain in clientVisible.
if (!clientVisible && mDeferHidingClient) return;
super.setClientVisible(clientVisible);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setClientVisible
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
|
setClientVisible
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
private static boolean parse(XMLTokener x, JSONObject context, String name, XMLParserConfiguration config)
throws JSONException {
char c;
int i;
JSONObject jsonObject = null;
String string;
String tagName;
Object token;
XMLXsiTypeConverter<?> xmlXsiTypeConverter;
// Test for and skip past these forms:
// <!-- ... -->
// <! ... >
// <![ ... ]]>
// <? ... ?>
// Report errors for these forms:
// <>
// <=
// <<
token = x.nextToken();
// <!
if (token == BANG) {
c = x.next();
if (c == '-') {
if (x.next() == '-') {
x.skipPast("-->");
return false;
}
x.back();
} else if (c == '[') {
token = x.nextToken();
if ("CDATA".equals(token)) {
if (x.next() == '[') {
string = x.nextCDATA();
if (string.length() > 0) {
context.accumulate(config.getcDataTagName(), string);
}
return false;
}
}
throw x.syntaxError("Expected 'CDATA['");
}
i = 1;
do {
token = x.nextMeta();
if (token == null) {
throw x.syntaxError("Missing '>' after '<!'.");
} else if (token == LT) {
i += 1;
} else if (token == GT) {
i -= 1;
}
} while (i > 0);
return false;
} else if (token == QUEST) {
// <?
x.skipPast("?>");
return false;
} else if (token == SLASH) {
// Close tag </
token = x.nextToken();
if (name == null) {
throw x.syntaxError("Mismatched close tag " + token);
}
if (!token.equals(name)) {
throw x.syntaxError("Mismatched " + name + " and " + token);
}
if (x.nextToken() != GT) {
throw x.syntaxError("Misshaped close tag");
}
return true;
} else if (token instanceof Character) {
throw x.syntaxError("Misshaped tag");
// Open tag <
} else {
tagName = (String) token;
token = null;
jsonObject = new JSONObject();
boolean nilAttributeFound = false;
xmlXsiTypeConverter = null;
for (;;) {
if (token == null) {
token = x.nextToken();
}
// attribute = value
if (token instanceof String) {
string = (String) token;
token = x.nextToken();
if (token == EQ) {
token = x.nextToken();
if (!(token instanceof String)) {
throw x.syntaxError("Missing value");
}
if (config.isConvertNilAttributeToNull()
&& NULL_ATTR.equals(string)
&& Boolean.parseBoolean((String) token)) {
nilAttributeFound = true;
} else if(config.getXsiTypeMap() != null && !config.getXsiTypeMap().isEmpty()
&& TYPE_ATTR.equals(string)) {
xmlXsiTypeConverter = config.getXsiTypeMap().get(token);
} else if (!nilAttributeFound) {
jsonObject.accumulate(string,
config.isKeepStrings()
? ((String) token)
: stringToValue((String) token));
}
token = null;
} else {
jsonObject.accumulate(string, "");
}
} else if (token == SLASH) {
// Empty tag <.../>
if (x.nextToken() != GT) {
throw x.syntaxError("Misshaped tag");
}
if (config.getForceList().contains(tagName)) {
// Force the value to be an array
if (nilAttributeFound) {
context.append(tagName, JSONObject.NULL);
} else if (jsonObject.length() > 0) {
context.append(tagName, jsonObject);
} else {
context.put(tagName, new JSONArray());
}
} else {
if (nilAttributeFound) {
context.accumulate(tagName, JSONObject.NULL);
} else if (jsonObject.length() > 0) {
context.accumulate(tagName, jsonObject);
} else {
context.accumulate(tagName, "");
}
}
return false;
} else if (token == GT) {
// Content, between <...> and </...>
for (;;) {
token = x.nextContent();
if (token == null) {
if (tagName != null) {
throw x.syntaxError("Unclosed tag " + tagName);
}
return false;
} else if (token instanceof String) {
string = (String) token;
if (string.length() > 0) {
if(xmlXsiTypeConverter != null) {
jsonObject.accumulate(config.getcDataTagName(),
stringToValue(string, xmlXsiTypeConverter));
} else {
jsonObject.accumulate(config.getcDataTagName(),
config.isKeepStrings() ? string : stringToValue(string));
}
}
} else if (token == LT) {
// Nested element
if (parse(x, jsonObject, tagName, config)) {
if (config.getForceList().contains(tagName)) {
// Force the value to be an array
if (jsonObject.length() == 0) {
context.put(tagName, new JSONArray());
} else if (jsonObject.length() == 1
&& jsonObject.opt(config.getcDataTagName()) != null) {
context.append(tagName, jsonObject.opt(config.getcDataTagName()));
} else {
context.append(tagName, jsonObject);
}
} else {
if (jsonObject.length() == 0) {
context.accumulate(tagName, "");
} else if (jsonObject.length() == 1
&& jsonObject.opt(config.getcDataTagName()) != null) {
context.accumulate(tagName, jsonObject.opt(config.getcDataTagName()));
} else {
context.accumulate(tagName, jsonObject);
}
}
return false;
}
}
}
} else {
throw x.syntaxError("Misshaped tag");
}
}
}
}
|
Vulnerability Classification:
- CWE: CWE-787
- CVE: CVE-2022-45688
- Severity: HIGH
- CVSS Score: 7.5
Description: fix: limit the nesting depth
Function: parse
File: src/main/java/org/json/XML.java
Repository: stleary/JSON-java
Fixed Code:
private static boolean parse(XMLTokener x, JSONObject context, String name, XMLParserConfiguration config, int currentNestingDepth)
throws JSONException {
char c;
int i;
JSONObject jsonObject = null;
String string;
String tagName;
Object token;
XMLXsiTypeConverter<?> xmlXsiTypeConverter;
// Test for and skip past these forms:
// <!-- ... -->
// <! ... >
// <![ ... ]]>
// <? ... ?>
// Report errors for these forms:
// <>
// <=
// <<
token = x.nextToken();
// <!
if (token == BANG) {
c = x.next();
if (c == '-') {
if (x.next() == '-') {
x.skipPast("-->");
return false;
}
x.back();
} else if (c == '[') {
token = x.nextToken();
if ("CDATA".equals(token)) {
if (x.next() == '[') {
string = x.nextCDATA();
if (string.length() > 0) {
context.accumulate(config.getcDataTagName(), string);
}
return false;
}
}
throw x.syntaxError("Expected 'CDATA['");
}
i = 1;
do {
token = x.nextMeta();
if (token == null) {
throw x.syntaxError("Missing '>' after '<!'.");
} else if (token == LT) {
i += 1;
} else if (token == GT) {
i -= 1;
}
} while (i > 0);
return false;
} else if (token == QUEST) {
// <?
x.skipPast("?>");
return false;
} else if (token == SLASH) {
// Close tag </
token = x.nextToken();
if (name == null) {
throw x.syntaxError("Mismatched close tag " + token);
}
if (!token.equals(name)) {
throw x.syntaxError("Mismatched " + name + " and " + token);
}
if (x.nextToken() != GT) {
throw x.syntaxError("Misshaped close tag");
}
return true;
} else if (token instanceof Character) {
throw x.syntaxError("Misshaped tag");
// Open tag <
} else {
tagName = (String) token;
token = null;
jsonObject = new JSONObject();
boolean nilAttributeFound = false;
xmlXsiTypeConverter = null;
for (;;) {
if (token == null) {
token = x.nextToken();
}
// attribute = value
if (token instanceof String) {
string = (String) token;
token = x.nextToken();
if (token == EQ) {
token = x.nextToken();
if (!(token instanceof String)) {
throw x.syntaxError("Missing value");
}
if (config.isConvertNilAttributeToNull()
&& NULL_ATTR.equals(string)
&& Boolean.parseBoolean((String) token)) {
nilAttributeFound = true;
} else if(config.getXsiTypeMap() != null && !config.getXsiTypeMap().isEmpty()
&& TYPE_ATTR.equals(string)) {
xmlXsiTypeConverter = config.getXsiTypeMap().get(token);
} else if (!nilAttributeFound) {
jsonObject.accumulate(string,
config.isKeepStrings()
? ((String) token)
: stringToValue((String) token));
}
token = null;
} else {
jsonObject.accumulate(string, "");
}
} else if (token == SLASH) {
// Empty tag <.../>
if (x.nextToken() != GT) {
throw x.syntaxError("Misshaped tag");
}
if (config.getForceList().contains(tagName)) {
// Force the value to be an array
if (nilAttributeFound) {
context.append(tagName, JSONObject.NULL);
} else if (jsonObject.length() > 0) {
context.append(tagName, jsonObject);
} else {
context.put(tagName, new JSONArray());
}
} else {
if (nilAttributeFound) {
context.accumulate(tagName, JSONObject.NULL);
} else if (jsonObject.length() > 0) {
context.accumulate(tagName, jsonObject);
} else {
context.accumulate(tagName, "");
}
}
return false;
} else if (token == GT) {
// Content, between <...> and </...>
for (;;) {
token = x.nextContent();
if (token == null) {
if (tagName != null) {
throw x.syntaxError("Unclosed tag " + tagName);
}
return false;
} else if (token instanceof String) {
string = (String) token;
if (string.length() > 0) {
if(xmlXsiTypeConverter != null) {
jsonObject.accumulate(config.getcDataTagName(),
stringToValue(string, xmlXsiTypeConverter));
} else {
jsonObject.accumulate(config.getcDataTagName(),
config.isKeepStrings() ? string : stringToValue(string));
}
}
} else if (token == LT) {
// Nested element
if (currentNestingDepth == config.getMaxNestingDepth()) {
throw x.syntaxError("Maximum nesting depth of " + config.getMaxNestingDepth() + " reached");
}
if (parse(x, jsonObject, tagName, config, currentNestingDepth + 1)) {
if (config.getForceList().contains(tagName)) {
// Force the value to be an array
if (jsonObject.length() == 0) {
context.put(tagName, new JSONArray());
} else if (jsonObject.length() == 1
&& jsonObject.opt(config.getcDataTagName()) != null) {
context.append(tagName, jsonObject.opt(config.getcDataTagName()));
} else {
context.append(tagName, jsonObject);
}
} else {
if (jsonObject.length() == 0) {
context.accumulate(tagName, "");
} else if (jsonObject.length() == 1
&& jsonObject.opt(config.getcDataTagName()) != null) {
context.accumulate(tagName, jsonObject.opt(config.getcDataTagName()));
} else {
context.accumulate(tagName, jsonObject);
}
}
return false;
}
}
}
} else {
throw x.syntaxError("Misshaped tag");
}
}
}
}
|
[
"CWE-787"
] |
CVE-2022-45688
|
HIGH
| 7.5
|
stleary/JSON-java
|
parse
|
src/main/java/org/json/XML.java
|
f566a1d9ee1f8139357017dc6c7def1da19cd8d4
| 1
|
Analyze the following code function for security vulnerabilities
|
Call getFirstCallWithState(int... states) {
return getFirstCallWithState(null, states);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFirstCallWithState
File: src/com/android/server/telecom/CallsManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2423
|
MEDIUM
| 6.6
|
android
|
getFirstCallWithState
|
src/com/android/server/telecom/CallsManager.java
|
a06c9a4aef69ae27b951523cf72bf72412bf48fa
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
public boolean hasSelection() {
return mHasSelection;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasSelection
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-1021"
] |
CVE-2015-1241
|
MEDIUM
| 4.3
|
chromium
|
hasSelection
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
9d343ad2ea6ec395c377a4efa266057155bfa9c1
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setSecret(final String secret) {
this.secret = secret;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSecret
File: pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java
Repository: pac4j
The code follows secure coding practices.
|
[
"CWE-347"
] |
CVE-2021-44878
|
MEDIUM
| 5
|
pac4j
|
setSecret
|
pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java
|
22b82ffd702a132d9f09da60362fc6264fc281ae
| 0
|
Analyze the following code function for security vulnerabilities
|
public void addProfilePolicySet(String id, Vector<ProfilePolicy> policySet) {
this.policySets.put(id, policySet);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addProfilePolicySet
File: base/common/src/main/java/com/netscape/certsrv/profile/ProfileData.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
addProfilePolicySet
|
base/common/src/main/java/com/netscape/certsrv/profile/ProfileData.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
private void removeAdminArtifacts(final ComponentName adminReceiver, final int userHandle) {
synchronized (getLockObject()) {
final ActiveAdmin admin = getActiveAdminUncheckedLocked(adminReceiver, userHandle);
if (admin == null) {
return;
}
final DevicePolicyData policy = getUserData(userHandle);
final boolean doProxyCleanup = admin.info.usesPolicy(
DeviceAdminInfo.USES_POLICY_SETS_GLOBAL_PROXY);
policy.mAdminList.remove(admin);
policy.mAdminMap.remove(adminReceiver);
policy.validatePasswordOwner();
if (doProxyCleanup) {
resetGlobalProxyLocked(policy);
}
pushActiveAdminPackagesLocked(userHandle);
saveSettingsLocked(userHandle);
updateMaximumTimeToLockLocked(userHandle);
policy.mRemovingAdmins.remove(adminReceiver);
pushScreenCapturePolicy(userHandle);
Slogf.i(LOG_TAG, "Device admin " + adminReceiver + " removed from user " + userHandle);
}
pushMeteredDisabledPackages(userHandle);
// The removed admin might have disabled camera, so update user
// restrictions.
pushUserRestrictions(userHandle);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeAdminArtifacts
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
|
removeAdminArtifacts
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public static int getSqlStatementType(String sql) {
sql = sql.trim();
if (sql.length() < 3) {
return STATEMENT_OTHER;
}
String prefixSql = sql.substring(0, 3).toUpperCase(Locale.ROOT);
if (prefixSql.equals("SEL")) {
return STATEMENT_SELECT;
} else if (prefixSql.equals("INS") ||
prefixSql.equals("UPD") ||
prefixSql.equals("REP") ||
prefixSql.equals("DEL")) {
return STATEMENT_UPDATE;
} else if (prefixSql.equals("ATT")) {
return STATEMENT_ATTACH;
} else if (prefixSql.equals("COM")) {
return STATEMENT_COMMIT;
} else if (prefixSql.equals("END")) {
return STATEMENT_COMMIT;
} else if (prefixSql.equals("ROL")) {
boolean isRollbackToSavepoint = sql.toUpperCase(Locale.ROOT).contains(" TO ");
if (isRollbackToSavepoint) {
Log.w(TAG, "Statement '" + sql
+ "' may not work on API levels 16-27, use ';" + sql + "' instead");
return STATEMENT_OTHER;
}
return STATEMENT_ABORT;
} else if (prefixSql.equals("BEG")) {
return STATEMENT_BEGIN;
} else if (prefixSql.equals("PRA")) {
return STATEMENT_PRAGMA;
} else if (prefixSql.equals("CRE") || prefixSql.equals("DRO") ||
prefixSql.equals("ALT")) {
return STATEMENT_DDL;
} else if (prefixSql.equals("ANA") || prefixSql.equals("DET")) {
return STATEMENT_UNPREPARED;
}
return STATEMENT_OTHER;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSqlStatementType
File: core/java/android/database/DatabaseUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2023-40121
|
MEDIUM
| 5.5
|
android
|
getSqlStatementType
|
core/java/android/database/DatabaseUtils.java
|
3287ac2d2565dc96bf6177967f8e3aed33954253
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public ServerBuilder annotatedService(String pathPrefix, Object service,
Iterable<?> exceptionHandlersAndConverters) {
virtualHostTemplate.annotatedService(pathPrefix, service, exceptionHandlersAndConverters);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: annotatedService
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
|
annotatedService
|
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
|
df7f85824a62e997b910b5d6194a3335841065fd
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void initializeRequestListIfNeeded(XWikiContext context)
{
if (!context.containsKey(this.contextKey)) {
context.put(this.contextKey, new LinkedHashSet<String>());
}
if (!context.containsKey(this.parametersContextKey)) {
context.put(this.parametersContextKey, new HashMap<String, Map<String, Object>>());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initializeRequestListIfNeeded
File: xwiki-platform-core/xwiki-platform-skin/xwiki-platform-skin-skinx/src/main/java/com/xpn/xwiki/plugin/skinx/AbstractSkinExtensionPlugin.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-29206
|
MEDIUM
| 5.4
|
xwiki/xwiki-platform
|
initializeRequestListIfNeeded
|
xwiki-platform-core/xwiki-platform-skin/xwiki-platform-skin-skinx/src/main/java/com/xpn/xwiki/plugin/skinx/AbstractSkinExtensionPlugin.java
|
fe65bc35d5672dd2505b7ac4ec42aec57d500fbb
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getDeviceDensity() {
DisplayMetrics metrics = new DisplayMetrics();
if (getActivity() != null) {
getActivity().getWindowManager().getDefaultDisplay().getMetrics(metrics);
} else {
metrics = getContext().getResources().getDisplayMetrics();
}
if(metrics.densityDpi < DisplayMetrics.DENSITY_MEDIUM) {
return Display.DENSITY_LOW;
}
if(metrics.densityDpi < 213) {
return Display.DENSITY_MEDIUM;
}
// 213 == TV
if(metrics.densityDpi >= 213 && metrics.densityDpi <= DisplayMetrics.DENSITY_HIGH) {
return Display.DENSITY_HIGH;
}
if(metrics.densityDpi > DisplayMetrics.DENSITY_HIGH && metrics.densityDpi < 400) {
return Display.DENSITY_VERY_HIGH;
}
if(metrics.densityDpi >= 400 && metrics.densityDpi < 560) {
return Display.DENSITY_HD;
}
if(metrics.densityDpi >= 560 && metrics.densityDpi <= 640) {
return Display.DENSITY_2HD;
}
if(metrics.densityDpi > 640) {
return Display.DENSITY_4K;
}
return Display.DENSITY_MEDIUM;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDeviceDensity
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
|
getDeviceDensity
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void showWaitingForDebugger(IApplicationThread who, boolean waiting) {
synchronized (this) {
ProcessRecord app =
who != null ? getRecordForAppLocked(who) : null;
if (app == null) return;
Message msg = Message.obtain();
msg.what = WAIT_FOR_DEBUGGER_UI_MSG;
msg.obj = app;
msg.arg1 = waiting ? 1 : 0;
mUiHandler.sendMessage(msg);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: showWaitingForDebugger
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2018-9492
|
HIGH
| 7.2
|
android
|
showWaitingForDebugger
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getName() {
return name;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getName
File: base/common/src/main/java/com/netscape/certsrv/profile/PolicyConstraint.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
getName
|
base/common/src/main/java/com/netscape/certsrv/profile/PolicyConstraint.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@GuardedBy("mLock")
private List<String> getSettingsNamesLocked(int settingsType, int userId) {
// Don't enforce the instant app whitelist for now -- its too prone to unintended breakage
// in the current form.
return mSettingsRegistry.getSettingsNamesLocked(settingsType, userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSettingsNamesLocked
File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40117
|
HIGH
| 7.8
|
android
|
getSettingsNamesLocked
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
ff86ff28cf82124f8e65833a2dd8c319aea08945
| 0
|
Analyze the following code function for security vulnerabilities
|
private int updateProfileOffDeadlineLocked(
int profileUserId, ActiveAdmin profileOwner, boolean unlocked) {
final long now = mInjector.systemCurrentTimeMillis();
if (profileOwner.mProfileOffDeadline != 0 && now > profileOwner.mProfileOffDeadline) {
Slogf.i(LOG_TAG, "Profile off deadline has been reached, unlocked: " + unlocked);
if (profileOwner.mProfileOffDeadline != -1) {
// Move the deadline far to the past so that it cannot be rolled back by TZ change.
profileOwner.mProfileOffDeadline = -1;
saveSettingsLocked(profileUserId);
}
return unlocked ? PROFILE_OFF_NOTIFICATION_NONE : PROFILE_OFF_NOTIFICATION_SUSPENDED;
}
boolean shouldSaveSettings = false;
if (profileOwner.mSuspendPersonalApps) {
// When explicit suspension is active, deadline shouldn't be set.
if (profileOwner.mProfileOffDeadline != 0) {
profileOwner.mProfileOffDeadline = 0;
shouldSaveSettings = true;
}
} else if (profileOwner.mProfileOffDeadline != 0
&& (profileOwner.mProfileMaximumTimeOffMillis == 0)) {
// There is a deadline but either there is no policy -> clear
// the deadline.
Slogf.i(LOG_TAG, "Profile off deadline is reset to zero");
profileOwner.mProfileOffDeadline = 0;
shouldSaveSettings = true;
} else if (profileOwner.mProfileOffDeadline == 0
&& (profileOwner.mProfileMaximumTimeOffMillis != 0 && !unlocked)) {
// There profile is locked and there is a policy, but the deadline is not set -> set the
// deadline.
Slogf.i(LOG_TAG, "Profile off deadline is set.");
profileOwner.mProfileOffDeadline = now + profileOwner.mProfileMaximumTimeOffMillis;
shouldSaveSettings = true;
}
if (shouldSaveSettings) {
saveSettingsLocked(profileUserId);
}
final long alarmTime;
final int notificationState;
if (unlocked || profileOwner.mProfileOffDeadline == 0) {
alarmTime = 0;
notificationState = PROFILE_OFF_NOTIFICATION_NONE;
} else if (profileOwner.mProfileOffDeadline - now < MANAGED_PROFILE_OFF_WARNING_PERIOD) {
// The deadline is close, upon the alarm personal apps should be suspended.
alarmTime = profileOwner.mProfileOffDeadline;
notificationState = PROFILE_OFF_NOTIFICATION_WARNING;
} else {
// The deadline is quite far, upon the alarm we should warn the user first, so the
// alarm is scheduled earlier than the actual deadline.
alarmTime = profileOwner.mProfileOffDeadline - MANAGED_PROFILE_OFF_WARNING_PERIOD;
notificationState = PROFILE_OFF_NOTIFICATION_NONE;
}
final AlarmManager am = mInjector.getAlarmManager();
final Intent intent = new Intent(ACTION_PROFILE_OFF_DEADLINE);
intent.setPackage(mContext.getPackageName());
// Broadcast alarms sent by system are immutable
final PendingIntent pi = mInjector.pendingIntentGetBroadcast(
mContext, REQUEST_PROFILE_OFF_DEADLINE, intent,
PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_UPDATE_CURRENT
| PendingIntent.FLAG_IMMUTABLE);
if (alarmTime == 0) {
Slogf.i(LOG_TAG, "Profile off deadline alarm is removed.");
am.cancel(pi);
} else {
Slogf.i(LOG_TAG, "Profile off deadline alarm is set.");
am.set(AlarmManager.RTC, alarmTime, pi);
}
return notificationState;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateProfileOffDeadlineLocked
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
|
updateProfileOffDeadlineLocked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public void deleteWithProgrammingRights() throws XWikiException
{
if (hasProgrammingRights()) {
deleteDocument();
} else {
java.lang.Object[] args = { this.getFullName() };
throw new XWikiException(XWikiException.MODULE_XWIKI_ACCESS, XWikiException.ERROR_XWIKI_ACCESS_DENIED,
"Access denied with no programming rights document {0}", null, args);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deleteWithProgrammingRights
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-23615
|
MEDIUM
| 5.5
|
xwiki/xwiki-platform
|
deleteWithProgrammingRights
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
|
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
| 0
|
Analyze the following code function for security vulnerabilities
|
private String readPreviousNameInternal(UserAccounts accounts, Account account) {
if (account == null) {
return null;
}
synchronized (accounts.dbLock) {
synchronized (accounts.cacheLock) {
AtomicReference<String> previousNameRef = accounts.previousNameCache.get(account);
if (previousNameRef == null) {
String previousName = accounts.accountsDb.findDeAccountPreviousName(account);
previousNameRef = new AtomicReference<>(previousName);
accounts.previousNameCache.put(account, previousNameRef);
return previousName;
} else {
return previousNameRef.get();
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readPreviousNameInternal
File: services/core/java/com/android/server/accounts/AccountManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-502"
] |
CVE-2023-45777
|
HIGH
| 7.8
|
android
|
readPreviousNameInternal
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
private void clearAutocompleteSpanIfInvalid() {
Editable editableText = getEditableText();
CharSequence previousUserText = mAutocompleteSpan.mUserText;
CharSequence previousAutocompleteText = mAutocompleteSpan.mAutocompleteText;
if (editableText.length()
!= (previousUserText.length() + previousAutocompleteText.length())) {
mAutocompleteSpan.clearSpan();
} else if (TextUtils.indexOf(getText(), previousUserText) != 0
|| TextUtils.indexOf(getText(),
previousAutocompleteText, previousUserText.length()) != 0) {
mAutocompleteSpan.clearSpan();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearAutocompleteSpanIfInvalid
File: chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-254"
] |
CVE-2016-5163
|
MEDIUM
| 4.3
|
chromium
|
clearAutocompleteSpanIfInvalid
|
chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java
|
3bd33fee094e863e5496ac24714c558bd58d28ef
| 0
|
Analyze the following code function for security vulnerabilities
|
private void getFileInfo(String path) {
String pathTmp = path;
if (pathTmp == "") {
pathTmp = getFilePath();
}
String[] tmp = pathTmp.split("/");
File file = new File(this.fileRoot + pathTmp);
this.item = new HashMap<String, Object>();
String fileName = tmp[tmp.length - 1];
this.item.put("filename", fileName);
if (file.isFile())
this.item.put("filetype", fileName.substring(fileName.lastIndexOf(".") + 1));
else
this.item.put("filetype", "dir");
this.item.put("filemtime", "" + file.lastModified());
this.item.put("filectime", "" + file.lastModified());
this.item.put("preview", getConfig("icons-path") + "/" + getConfig("icons-default")); // @simo
HashMap<String, String> props = new HashMap<String, String>();
if (file.isDirectory()) {
this.item.put("preview", getConfig("icons-path") + getConfig("icons-directory"));
} else if (isImage(pathTmp)) {
this.item.put("preview", ACTION_PATH + "?mode=preview&path=" + pathTmp);
Dimension imgData = getImageSize(fileRoot + pathTmp);
props.put("Height", "" + imgData.height);
props.put("Width", "" + imgData.width);
props.put("Size", "" + file.length());
} else {
File icon = new File(fileRoot + getConfig("icons-path")
+ ((String) this.item.get("filetype")).toLowerCase() + ".png");
if (icon.exists()) {
this.item.put("preview", getConfig("icons-path") + ((String) this.item.get("filetype")).toLowerCase()
+ ".png");
props.put("Size", "" + file.length());
}
}
props.put("Date Modified", dateFormat.format(new Date(new Long((String) this.item.get("filemtime")))));
this.item.put("properties", props);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFileInfo
File: src/main/java/com/jflyfox/modules/filemanager/FileManager.java
Repository: jflyfox/jfinal_cms
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2021-37262
|
MEDIUM
| 5
|
jflyfox/jfinal_cms
|
getFileInfo
|
src/main/java/com/jflyfox/modules/filemanager/FileManager.java
|
e7fd0fe9362464c4d2bd308318eecc89a847b116
| 0
|
Analyze the following code function for security vulnerabilities
|
private void validateSystemSettingValue(String name, String value) {
Settings.System.Validator validator = Settings.System.VALIDATORS.get(name);
if (validator != null && !validator.validate(value)) {
throw new IllegalArgumentException("Invalid value: " + value
+ " for setting: " + name);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: validateSystemSettingValue
File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3876
|
HIGH
| 7.2
|
android
|
validateSystemSettingValue
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
91fc934bb2e5ea59929bb2f574de6db9b5100745
| 0
|
Analyze the following code function for security vulnerabilities
|
public byte[] encode()
{
final ByteBuffer bb = ByteBuffer.allocate(length);
bb.order(ByteOrder.BIG_ENDIAN);
bb.putInt(length);
bb.putInt(nonce.length);
bb.put(nonce);
if (keyName != null) {
final byte[] b = keyName.getBytes();
bb.putInt(b.length);
bb.put(b);
}
return bb.array();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: encode
File: src/main/java/org/cryptacular/CiphertextHeader.java
Repository: vt-middleware/cryptacular
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2020-7226
|
MEDIUM
| 5
|
vt-middleware/cryptacular
|
encode
|
src/main/java/org/cryptacular/CiphertextHeader.java
|
8c6c7528f1e24c6b71f3e36db0cb8a697256ce25
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void queryByNamedQuery(String projectName, String namedQuery, Revision revision,
AsyncMethodCallback resultHandler) {
unimplemented(resultHandler);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: queryByNamedQuery
File: server/src/main/java/com/linecorp/centraldogma/server/internal/thrift/CentralDogmaServiceImpl.java
Repository: line/centraldogma
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2021-38388
|
MEDIUM
| 6.5
|
line/centraldogma
|
queryByNamedQuery
|
server/src/main/java/com/linecorp/centraldogma/server/internal/thrift/CentralDogmaServiceImpl.java
|
e83b558ef9eaa44f71b7d9236bdec9f68c85b8bd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void marshal(Object graph, Result result) throws XmlMappingException {
marshal(graph, result, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: marshal
File: spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java
Repository: spring-projects/spring-framework
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-4152
|
MEDIUM
| 6.8
|
spring-projects/spring-framework
|
marshal
|
spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java
|
2843b7d2ee12e3f9c458f6f816befd21b402e3b9
| 0
|
Analyze the following code function for security vulnerabilities
|
public void sendOptionsChangedIntentLocked(Widget widget) {
Intent intent = new Intent(AppWidgetManager.ACTION_APPWIDGET_OPTIONS_CHANGED);
intent.setComponent(widget.provider.info.provider);
intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, widget.appWidgetId);
intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_OPTIONS, widget.options);
sendBroadcastAsUser(intent, widget.provider.info.getProfile());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendOptionsChangedIntentLocked
File: services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-1541
|
MEDIUM
| 4.3
|
android
|
sendOptionsChangedIntentLocked
|
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
|
0b98d304c467184602b4c6bce76fda0b0274bc07
| 0
|
Analyze the following code function for security vulnerabilities
|
public void save(String table, String id, Object entity, boolean returnId, boolean upsert, boolean convertEntity,
Handler<AsyncResult<String>> replyHandler) {
client.getConnection(conn -> save(conn, table, id, entity,
returnId, upsert, convertEntity, closeAndHandleResult(conn, replyHandler)));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: save
File: domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
save
|
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void onCreate(Bundle icicle) {
super.onCreate(icicle);
addPreferencesFromResource(R.xml.callforward_options);
mSubscriptionInfoHelper = new SubscriptionInfoHelper(this, getIntent());
mSubscriptionInfoHelper.setActionBarTitle(
getActionBar(), getResources(), R.string.call_forwarding_settings_with_label);
mPhone = mSubscriptionInfoHelper.getPhone();
PersistableBundle b = null;
boolean supportCFB = true;
boolean supportCFNRc = true;
boolean supportCFNRy = true;
if (mSubscriptionInfoHelper.hasSubId()) {
b = PhoneGlobals.getInstance().getCarrierConfigForSubId(
mSubscriptionInfoHelper.getSubId());
} else {
b = PhoneGlobals.getInstance().getCarrierConfig();
}
if (b != null) {
mReplaceInvalidCFNumbers = b.getBoolean(
CarrierConfigManager.KEY_CALL_FORWARDING_MAP_NON_NUMBER_TO_VOICEMAIL_BOOL);
mCallForwardByUssd = b.getBoolean(
CarrierConfigManager.KEY_USE_CALL_FORWARDING_USSD_BOOL);
supportCFB = b.getBoolean(
CarrierConfigManager.KEY_CALL_FORWARDING_WHEN_BUSY_SUPPORTED_BOOL);
supportCFNRc = b.getBoolean(
CarrierConfigManager.KEY_CALL_FORWARDING_WHEN_UNREACHABLE_SUPPORTED_BOOL);
supportCFNRy = b.getBoolean(
CarrierConfigManager.KEY_CALL_FORWARDING_WHEN_UNANSWERED_SUPPORTED_BOOL);
}
PreferenceScreen prefSet = getPreferenceScreen();
mButtonCFU = (CallForwardEditPreference) prefSet.findPreference(BUTTON_CFU_KEY);
mButtonCFB = (CallForwardEditPreference) prefSet.findPreference(BUTTON_CFB_KEY);
mButtonCFNRy = (CallForwardEditPreference) prefSet.findPreference(BUTTON_CFNRY_KEY);
mButtonCFNRc = (CallForwardEditPreference) prefSet.findPreference(BUTTON_CFNRC_KEY);
mButtonCFU.setParentActivity(this, mButtonCFU.reason);
mButtonCFB.setParentActivity(this, mButtonCFB.reason);
mButtonCFNRy.setParentActivity(this, mButtonCFNRy.reason);
mButtonCFNRc.setParentActivity(this, mButtonCFNRc.reason);
mPreferences.add(mButtonCFU);
layoutCallForwardItem(supportCFB, mButtonCFB, prefSet);
layoutCallForwardItem(supportCFNRy, mButtonCFNRy, prefSet);
layoutCallForwardItem(supportCFNRc, mButtonCFNRc, prefSet);
if (mCallForwardByUssd) {
//the call forwarding ussd command's behavior is similar to the call forwarding when
//unanswered,so only display the call forwarding when unanswered item.
prefSet.removePreference(mButtonCFU);
prefSet.removePreference(mButtonCFB);
prefSet.removePreference(mButtonCFNRc);
mPreferences.remove(mButtonCFU);
mPreferences.remove(mButtonCFB);
mPreferences.remove(mButtonCFNRc);
mButtonCFNRy.setDependency(null);
}
// we wait to do the initialization until onResume so that the
// TimeConsumingPreferenceActivity dialog can display as it
// relies on onResume / onPause to maintain its foreground state.
mFirstResume = true;
mIcicle = icicle;
ActionBar actionBar = getActionBar();
if (actionBar != null) {
// android.R.id.home will be triggered in onOptionsItemSelected()
actionBar.setDisplayHomeAsUpEnabled(true);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onCreate
File: src/com/android/phone/GsmUmtsCallForwardOptions.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-862"
] |
CVE-2023-35665
|
HIGH
| 7.8
|
android
|
onCreate
|
src/com/android/phone/GsmUmtsCallForwardOptions.java
|
674039e70e1c5bf29b808899ac80c709acc82290
| 0
|
Analyze the following code function for security vulnerabilities
|
public static byte[] ASCIIHexDecode(byte in[]) {
ByteArrayOutputStream out = new ByteArrayOutputStream();
boolean first = true;
int n1 = 0;
for (int k = 0; k < in.length; ++k) {
int ch = in[k] & 0xff;
if (ch == '>')
break;
if (PRTokeniser.isWhitespace(ch))
continue;
int n = PRTokeniser.getHex(ch);
if (n == -1)
throw new RuntimeException("Illegal character in ASCIIHexDecode.");
if (first)
n1 = n;
else
out.write((byte)((n1 << 4) + n));
first = !first;
}
if (!first)
out.write((byte)(n1 << 4));
return out.toByteArray();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: ASCIIHexDecode
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
|
ASCIIHexDecode
|
java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
|
9b0cbb76c8434a8505f02ada02a94263dcae9247
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated(since = "9.0RC1")
public Document toXMLDocument(XWikiContext context) throws XWikiException
{
return toXMLDocument(true, false, false, false, context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toXMLDocument
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2023-29523
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
toXMLDocument
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
0d547181389f7941e53291af940966413823f61c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void allowsShortJpaSyntax() throws Exception {
assertCountQuery(SIMPLE_QUERY, COUNT_QUERY);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: allowsShortJpaSyntax
File: src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsUnitTests.java
Repository: spring-projects/spring-data-jpa
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-6652
|
MEDIUM
| 6.8
|
spring-projects/spring-data-jpa
|
allowsShortJpaSyntax
|
src/test/java/org/springframework/data/jpa/repository/query/QueryUtilsUnitTests.java
|
b8e7fe
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public IdentityProvider getIdentityProvider(String federatedIdPName, String tenantDomain)
throws IdentityApplicationManagementException {
try {
startTenantFlow(tenantDomain);
IdentityProviderDAO idpdao = ApplicationMgtSystemConfig.getInstance().getIdentityProviderDAO();
return idpdao.getIdentityProvider(federatedIdPName);
} catch (Exception e) {
String error = "Error occurred while retrieving Identity Provider: " + federatedIdPName + ". " +
e.getMessage();
throw new IdentityApplicationManagementException(error, e);
} finally {
endTenantFlow();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getIdentityProvider
File: components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
Repository: wso2/carbon-identity-framework
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-42646
|
MEDIUM
| 6.4
|
wso2/carbon-identity-framework
|
getIdentityProvider
|
components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
|
e9119883ee02a884f3c76c7bbc4022a4f4c58fc0
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
boolean check(DiscoveryStrategyConfig c1, DiscoveryStrategyConfig c2) {
return c1 == c2 || !(c1 == null || c2 == null)
&& nullSafeEqual(c1.getClassName(), c2.getClassName())
&& nullSafeEqual(c1.getProperties(), c2.getProperties());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: check
File: hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
check
|
hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
private void sendResourceUpdatedBroadcast(int resourceType, List<String> resourceIds) {
final Intent intent = new Intent(ACTION_DEVICE_POLICY_RESOURCE_UPDATED);
intent.putExtra(EXTRA_RESOURCE_IDS, resourceIds.toArray(String[]::new));
intent.putExtra(EXTRA_RESOURCE_TYPE, resourceType);
intent.setFlags(Intent.FLAG_RECEIVER_FOREGROUND);
intent.setFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY);
List<UserInfo> users = mUserManager.getAliveUsers();
for (int i = 0; i < users.size(); i++) {
UserHandle user = users.get(i).getUserHandle();
mContext.sendBroadcastAsUser(intent, user);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendResourceUpdatedBroadcast
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
|
sendResourceUpdatedBroadcast
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
@UnsupportedAppUsage
public CharSequence get(int idx) {
CharSequence seq = getSequence(idx);
return seq == null ? "" : seq;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: get
File: core/java/android/content/res/StringBlock.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-415"
] |
CVE-2023-40103
|
HIGH
| 7.8
|
android
|
get
|
core/java/android/content/res/StringBlock.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isNotify() {
return notify;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isNotify
File: src/com/dotmarketing/cms/comment/struts/CommentsForm.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-254",
"CWE-264"
] |
CVE-2016-8600
|
MEDIUM
| 5
|
dotCMS/core
|
isNotify
|
src/com/dotmarketing/cms/comment/struts/CommentsForm.java
|
cb84b130065c9eed1d1df9e4770ffa5d4bd30569
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean hasUserSetupCompleted(int userHandle) {
if (!mHasFeature) {
return true;
}
return mInjector.hasUserSetupCompleted(getUserData(userHandle));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasUserSetupCompleted
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
|
hasUserSetupCompleted
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setKeyguardBottomAreaVisibility(int statusBarState,
boolean goingToFullShade) {
mKeyguardBottomArea.animate().cancel();
if (goingToFullShade) {
mKeyguardBottomArea.animate()
.alpha(0f)
.setStartDelay(mStatusBar.getKeyguardFadingAwayDelay())
.setDuration(mStatusBar.getKeyguardFadingAwayDuration() / 2)
.setInterpolator(Interpolators.ALPHA_OUT)
.withEndAction(mAnimateKeyguardBottomAreaInvisibleEndRunnable)
.start();
} else if (statusBarState == StatusBarState.KEYGUARD
|| statusBarState == StatusBarState.SHADE_LOCKED) {
mKeyguardBottomArea.setVisibility(View.VISIBLE);
mKeyguardBottomArea.setAlpha(1f);
} else {
mKeyguardBottomArea.setVisibility(View.GONE);
mKeyguardBottomArea.setAlpha(1f);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setKeyguardBottomAreaVisibility
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
setKeyguardBottomAreaVisibility
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("javadoc")
public int computeHorizontalScrollOffset() {
return mRenderCoordinates.getScrollXPixInt();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: computeHorizontalScrollOffset
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
computeHorizontalScrollOffset
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
private void sendPutConfigurationForUserMsg(int userId, Configuration config) {
final ContentResolver resolver = mContext.getContentResolver();
Settings.System.putConfigurationForUser(resolver, config, userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendPutConfigurationForUserMsg
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
|
sendPutConfigurationForUserMsg
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getPackageForIntentSender(IIntentSender sender) throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeStrongBinder(sender.asBinder());
mRemote.transact(GET_PACKAGE_FOR_INTENT_SENDER_TRANSACTION, data, reply, 0);
reply.readException();
String res = reply.readString();
data.recycle();
reply.recycle();
return res;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPackageForIntentSender
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
getPackageForIntentSender
|
core/java/android/app/ActivityManagerNative.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setLeftButton(IntentButton button) {
mLeftButton = button;
if (!(mLeftButton instanceof DefaultLeftButton)) {
mLeftIsVoiceAssist = false;
}
updateLeftAffordance();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setLeftButton
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
setLeftButton
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setReadLength(int readLength) {
readLength_ = readLength;
checkReadLength_ = true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setReadLength
File: thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TBinaryProtocol.java
Repository: facebook/fbthrift
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2019-11938
|
MEDIUM
| 5
|
facebook/fbthrift
|
setReadLength
|
thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TBinaryProtocol.java
|
08c2d412adb214c40bb03be7587057b25d053030
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected XMLReader createReader() throws SAXException {
if (textConverterRef == null) {
throw new ProcessException(
"No XML fragment wrapper has been assigned to the parser but XML fragment parsers require one");
}
// Load the latest TextConverter to get round the issue of the pipeline
// being cached and therefore holding onto
// stale TextConverter.
// TODO: We need to use the cached TextConverter service ideally but
// before we do it needs to be aware cluster
// wide when TextConverter has been updated.
final TextConverter tc = textConverterService.loadByUuid(textConverterRef.getUuid());
if (tc == null) {
throw new ProcessException(
"TextConverter \"" + textConverterRef.getName() + "\" appears to have been deleted");
}
if (!TextConverterType.XML_FRAGMENT.equals(tc.getConverterType())) {
throw new ProcessException("The assigned text converter is not an XML fragment.");
}
// If we are in stepping mode and have made code changes then we want to
// add them to the newly loaded text
// converter.
if (injectedCode != null) {
tc.setData(injectedCode);
usePool = false;
}
// Get a text converter generated parser from the pool.
poolItem = parserFactoryPool.borrowObject(tc, usePool);
final StoredParserFactory storedParserFactory = poolItem.getValue();
final StoredErrorReceiver storedErrorReceiver = storedParserFactory.getErrorReceiver();
final ParserFactory parserFactory = storedParserFactory.getParserFactory();
if (storedErrorReceiver.getTotalErrors() == 0 && parserFactory != null) {
return parserFactory.getParser();
} else {
storedErrorReceiver.replay(new ErrorReceiverIdDecorator(getElementId(), getErrorReceiverProxy()));
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createReader
File: stroom-pipeline/src/main/java/stroom/xml/converter/xmlfragment/XMLFragmentParser.java
Repository: gchq/stroom
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000651
|
HIGH
| 7.5
|
gchq/stroom
|
createReader
|
stroom-pipeline/src/main/java/stroom/xml/converter/xmlfragment/XMLFragmentParser.java
|
ba30ffd415bd7d32ee40ba4b04035267ce80b499
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isWebBrowserEditionResource(HttpServletRequest request) {
return request.getRequestURI().contains(getApplicationURL() + "/services/wbe/");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isWebBrowserEditionResource
File: core-war/src/main/java/org/silverpeas/web/token/SessionSynchronizerTokenValidator.java
Repository: Silverpeas/Silverpeas-Core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-47324
|
MEDIUM
| 5.4
|
Silverpeas/Silverpeas-Core
|
isWebBrowserEditionResource
|
core-war/src/main/java/org/silverpeas/web/token/SessionSynchronizerTokenValidator.java
|
9a55728729a3b431847045c674b3e883507d1e1a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void onCameraClick() {
if (EffortlessPermissions.hasPermissions(this, PERMISSIONS_CAMERA)) {
videoOn = !videoOn;
if (videoOn) {
binding.cameraButton.getHierarchy().setPlaceholderImage(R.drawable.ic_videocam_white_24px);
if (cameraEnumerator.getDeviceNames().length > 1) {
binding.switchSelfVideoButton.setVisibility(View.VISIBLE);
}
} else {
binding.cameraButton.getHierarchy().setPlaceholderImage(R.drawable.ic_videocam_off_white_24px);
binding.switchSelfVideoButton.setVisibility(View.GONE);
}
toggleMedia(videoOn, true);
} else if (EffortlessPermissions.somePermissionPermanentlyDenied(this, PERMISSIONS_CAMERA)) {
// Camera permission is permanently denied so we cannot request it normally.
OpenAppDetailsDialogFragment.show(
R.string.nc_camera_permission_permanently_denied,
R.string.nc_permissions_settings, (AppCompatActivity) this);
} else {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
requestPermissions(PERMISSIONS_CAMERA, 100);
} else {
onRequestPermissionsResult(100, PERMISSIONS_CAMERA, new int[]{1});
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onCameraClick
File: app/src/main/java/com/nextcloud/talk/activities/CallActivity.java
Repository: nextcloud/talk-android
The code follows secure coding practices.
|
[
"CWE-732",
"CWE-200"
] |
CVE-2022-41926
|
MEDIUM
| 5.5
|
nextcloud/talk-android
|
onCameraClick
|
app/src/main/java/com/nextcloud/talk/activities/CallActivity.java
|
bb7e82fbcbd8c10d0d0128d736c41cec0f79e7d0
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String trimToSize(String source, int length, String suffix) {
int area = (length > 100) ? length / 2 : length;
return trimToSize(source, length, area, suffix);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: trimToSize
File: src/org/opencms/util/CmsStringUtil.java
Repository: alkacon/opencms-core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2013-4600
|
MEDIUM
| 4.3
|
alkacon/opencms-core
|
trimToSize
|
src/org/opencms/util/CmsStringUtil.java
|
72a05e3ea1cf692e2efce002687272e63f98c14a
| 0
|
Analyze the following code function for security vulnerabilities
|
private void reconcileApps(String volumeUuid) {
final File[] files = FileUtils
.listFilesOrEmpty(Environment.getDataAppDirectory(volumeUuid));
for (File file : files) {
final boolean isPackage = (isApkFile(file) || file.isDirectory())
&& !PackageInstallerService.isStageName(file.getName());
if (!isPackage) {
// Ignore entries which are not packages
continue;
}
boolean destroyApp = false;
String packageName = null;
try {
final PackageLite pkg = PackageParser.parsePackageLite(file,
PackageParser.PARSE_MUST_BE_APK);
packageName = pkg.packageName;
synchronized (mPackages) {
final PackageSetting ps = mSettings.mPackages.get(packageName);
if (ps == null) {
logCriticalInfo(Log.WARN, "Destroying " + packageName + " on + "
+ volumeUuid + " because we found no install record");
destroyApp = true;
} else if (!TextUtils.equals(volumeUuid, ps.volumeUuid)) {
logCriticalInfo(Log.WARN, "Destroying " + packageName + " on "
+ volumeUuid + " because we expected it on " + ps.volumeUuid);
destroyApp = true;
}
}
} catch (PackageParserException e) {
logCriticalInfo(Log.WARN, "Destroying " + file + " due to parse failure: " + e);
destroyApp = true;
}
if (destroyApp) {
synchronized (mInstallLock) {
if (packageName != null) {
removeDataDirsLI(volumeUuid, packageName);
}
if (file.isDirectory()) {
mInstaller.rmPackageDir(file.getAbsolutePath());
} else {
file.delete();
}
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: reconcileApps
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
|
reconcileApps
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
public Boolean isUseResourceRoleMappings() {
return useResourceRoleMappings;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isUseResourceRoleMappings
File: services/src/main/java/org/keycloak/services/managers/ClientManager.java
Repository: keycloak
The code follows secure coding practices.
|
[
"CWE-798"
] |
CVE-2019-14837
|
MEDIUM
| 6.4
|
keycloak
|
isUseResourceRoleMappings
|
services/src/main/java/org/keycloak/services/managers/ClientManager.java
|
9a7c1a91a59ab85e7f8889a505be04a71580777f
| 0
|
Analyze the following code function for security vulnerabilities
|
public final boolean isCheckForEOI ()
{
return m_bCheckForEOI;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isCheckForEOI
File: ph-json/src/main/java/com/helger/json/parser/JsonParser.java
Repository: phax/ph-commons
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-34612
|
HIGH
| 7.5
|
phax/ph-commons
|
isCheckForEOI
|
ph-json/src/main/java/com/helger/json/parser/JsonParser.java
|
02a4d034dcfb2b6e1796b25f519bf57a6796edce
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void testDeserializationAsFloat02() throws Exception
{
Instant date = Instant.ofEpochSecond(123456789L, 183917322);
Instant value = MAPPER.readValue("123456789.183917322", Instant.class);
assertEquals("The value is not correct.", date, value);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: testDeserializationAsFloat02
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
|
testDeserializationAsFloat02
|
datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestInstantSerialization.java
|
ba27ce5909dfb49bcaf753ad3e04ecb980010b0b
| 0
|
Analyze the following code function for security vulnerabilities
|
private void addComponent(Component c) {
extensionComponents.add(c);
c.setParent(this);
markAsDirty();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addComponent
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
|
addComponent
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean jsFunction_isUserExistsInRole(Context cx, Scriptable thisObj,
Object[] args, Function funObj)
throws ScriptException,
APIManagementException, org.wso2.carbon.user.api.UserStoreException {
if (args == null || args.length == 0) {
handleException("Invalid input parameters to the isUserExists method");
}
String username = (String) args[0];
String roleNames = (String) args[1];
String tenantDomain = MultitenantUtils.getTenantDomain(APIUtil.replaceEmailDomainBack(username));
UserRegistrationConfigDTO signupConfig = SelfSignUpUtil.getSignupConfiguration(tenantDomain);
//add user storage info
username = SelfSignUpUtil.getDomainSpecificUserName(username, signupConfig);
String tenantAwareUserName = MultitenantUtils.getTenantAwareUsername(username);
boolean exists = false;
try {
RealmService realmService = ServiceReferenceHolder.getInstance().getRealmService();
//UserRealm realm = realmService.getBootstrapRealm();
int tenantId = ServiceReferenceHolder.getInstance().getRealmService().getTenantManager()
.getTenantId(tenantDomain);
UserRealm realm = (UserRealm) realmService.getTenantUserRealm(tenantId);
UserStoreManager manager = realm.getUserStoreManager();
String[] roleNamesArr = roleNames.split(",");
for (String roleName : roleNamesArr) {
AbstractUserStoreManager abstractManager = (AbstractUserStoreManager) manager;
if (abstractManager.isUserInRole(tenantAwareUserName, roleName)) {
exists = true;
break;
}
}
} catch (UserStoreException e) {
handleException("Error while checking user existence for " + username + " roles" + roleNames, e);
}
return exists;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: jsFunction_isUserExistsInRole
File: components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
Repository: wso2/carbon-apimgt
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2018-20736
|
LOW
| 3.5
|
wso2/carbon-apimgt
|
jsFunction_isUserExistsInRole
|
components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
|
490f2860822f89d745b7c04fa9570bd86bef4236
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void purgeRepository(String projectName, String repositoryName, AsyncMethodCallback resultHandler) {
handleAsVoidResult(executor.execute(Command.purgeRepository(SYSTEM, projectName, repositoryName))
.thenCompose(unused -> mds.purgeRepo(SYSTEM, projectName, repositoryName)),
resultHandler);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: purgeRepository
File: server/src/main/java/com/linecorp/centraldogma/server/internal/thrift/CentralDogmaServiceImpl.java
Repository: line/centraldogma
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2021-38388
|
MEDIUM
| 6.5
|
line/centraldogma
|
purgeRepository
|
server/src/main/java/com/linecorp/centraldogma/server/internal/thrift/CentralDogmaServiceImpl.java
|
e83b558ef9eaa44f71b7d9236bdec9f68c85b8bd
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<Object> updateObjectsFromRequest(String className) throws XWikiException
{
return updateObjectsFromRequest(className, "");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateObjectsFromRequest
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-23615
|
MEDIUM
| 5.5
|
xwiki/xwiki-platform
|
updateObjectsFromRequest
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
|
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
| 0
|
Analyze the following code function for security vulnerabilities
|
Column getColumnByColumnId(String columnId) {
Object propertyId = getPropertyIdByColumnId(columnId);
return getColumn(propertyId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getColumnByColumnId
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
|
getColumnByColumnId
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
public Page<E> pageSize(int pageSize) {
this.pageSize = pageSize;
calculateStartAndEndRow();
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: pageSize
File: src/main/java/com/github/pagehelper/Page.java
Repository: pagehelper/Mybatis-PageHelper
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-28111
|
HIGH
| 7.5
|
pagehelper/Mybatis-PageHelper
|
pageSize
|
src/main/java/com/github/pagehelper/Page.java
|
554a524af2d2b30d09505516adc412468a84d8fa
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void setUseSni(boolean flag) {
useSni = Boolean.valueOf(flag);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUseSni
File: src/main/java/org/conscrypt/SSLParametersImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3840
|
HIGH
| 10
|
android
|
setUseSni
|
src/main/java/org/conscrypt/SSLParametersImpl.java
|
5af5e93463f4333187e7e35f3bd2b846654aa214
| 0
|
Analyze the following code function for security vulnerabilities
|
public void notifyOutstandingRpc(ShutdownSignalException signal) {
RpcWrapper k = nextOutstandingRpc();
if (k != null) {
k.shutdown(signal);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: notifyOutstandingRpc
File: src/main/java/com/rabbitmq/client/impl/AMQChannel.java
Repository: rabbitmq/rabbitmq-java-client
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-46120
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-java-client
|
notifyOutstandingRpc
|
src/main/java/com/rabbitmq/client/impl/AMQChannel.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
public void browserForward(PeerComponent browserPeer) {
((AndroidImplementation.AndroidBrowserComponent) browserPeer).forward();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: browserForward
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
|
browserForward
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean equals(@Nullable Object o) {
if (this == o) {
return true;
}
if (!(o instanceof Map.Entry)) {
return false;
}
final Map.Entry<?, ?> that = (Map.Entry<?, ?>) o;
final Object thatKey = that.getKey();
return thatKey instanceof AsciiString &&
keyEquals(key, (CharSequence) thatKey) &&
Objects.equals(value, that.getValue());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: equals
File: core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2019-16771
|
MEDIUM
| 5
|
line/armeria
|
equals
|
core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
|
b597f7a865a527a84ee3d6937075cfbb4470ed20
| 0
|
Analyze the following code function for security vulnerabilities
|
public void getProcessStatesForPIDs(/*in*/ int[] pids, /*out*/ int[] states) {
if (pids == null) {
throw new NullPointerException("pids");
} else if (states == null) {
throw new NullPointerException("states");
} else if (pids.length != states.length) {
throw new IllegalArgumentException("input and output arrays have different lengths!");
}
synchronized (mPidsSelfLocked) {
for (int i = 0; i < pids.length; i++) {
ProcessRecord pr = mPidsSelfLocked.get(pids[i]);
states[i] = (pr == null) ? ActivityManager.PROCESS_STATE_NONEXISTENT :
pr.curProcState;
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProcessStatesForPIDs
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
|
getProcessStatesForPIDs
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
9878bb99b77c3681f0fda116e2964bac26f349c3
| 0
|
Analyze the following code function for security vulnerabilities
|
public Authentication getAuthentication(String authName) {
return authentications.get(authName);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAuthentication
File: samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
getAuthentication
|
samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void freeStorage(final String volumeUuid, final long freeStorageSize,
final IntentSender pi) {
mContext.enforceCallingOrSelfPermission(
android.Manifest.permission.CLEAR_APP_CACHE, null);
// Queue up an async operation since clearing cache may take a little while.
mHandler.post(new Runnable() {
public void run() {
mHandler.removeCallbacks(this);
int retCode = -1;
synchronized (mInstallLock) {
retCode = mInstaller.freeCache(volumeUuid, freeStorageSize);
if (retCode < 0) {
Slog.w(TAG, "Couldn't clear application caches");
}
}
if(pi != null) {
try {
// Callback via pending intent
int code = (retCode >= 0) ? 1 : 0;
pi.sendIntent(null, code, null,
null, null);
} catch (SendIntentException e1) {
Slog.i(TAG, "Failed to send pending intent");
}
}
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: freeStorage
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
|
freeStorage
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
public synchronized void putItem(TopLevelItem item) throws IOException, InterruptedException {
String name = item.getName();
TopLevelItem old = items.get(name);
if (old ==item) return; // noop
checkPermission(Item.CREATE);
if (old!=null)
old.delete();
items.put(name,item);
ItemListener.fireOnCreated(item);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: putItem
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
|
putItem
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public SaReactorFilter setAuth(SaFilterAuthStrategy auth) {
this.auth = auth;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAuth
File: sa-token-starter/sa-token-reactor-spring-boot-starter/src/main/java/cn/dev33/satoken/reactor/filter/SaReactorFilter.java
Repository: dromara/Sa-Token
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-44794
|
CRITICAL
| 9.8
|
dromara/Sa-Token
|
setAuth
|
sa-token-starter/sa-token-reactor-spring-boot-starter/src/main/java/cn/dev33/satoken/reactor/filter/SaReactorFilter.java
|
954efeb73277f924f836da2a25322ea35ee1bfa3
| 0
|
Analyze the following code function for security vulnerabilities
|
IAccountManagerResponse getResponseAndClose() {
if (mResponse == null) {
close();
return null;
}
IAccountManagerResponse response = mResponse;
close(); // this clears mResponse so we need to save the response before this call
return response;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getResponseAndClose
File: services/core/java/com/android/server/accounts/AccountManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-502"
] |
CVE-2023-45777
|
HIGH
| 7.8
|
android
|
getResponseAndClose
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean getScreenCaptureDisabled(ComponentName who, int userHandle, boolean parent) {
if (!mHasFeature) {
return false;
}
final CallerIdentity caller = getCallerIdentity(who);
Preconditions.checkCallAuthorization(hasFullCrossUsersPermission(caller, userHandle));
if (parent) {
Preconditions.checkCallAuthorization(
isProfileOwnerOfOrganizationOwnedDevice(getCallerIdentity().getUserId()));
}
return !mPolicyCache.isScreenCaptureAllowed(userHandle);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getScreenCaptureDisabled
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
|
getScreenCaptureDisabled
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
private AnnotationMap[] collectAnnotations(Annotation[][] mainAnns, Annotation[][] mixinAnns) {
final int count = mainAnns.length;
AnnotationMap[] result = new AnnotationMap[count];
for (int i = 0; i < count; ++i) {
AnnotationCollector c = collectAnnotations(AnnotationCollector.emptyCollector(),
mainAnns[i]);
if (mixinAnns != null) {
c = collectAnnotations(c, mixinAnns[i]);
}
result[i] = c.asAnnotationMap();
}
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: collectAnnotations
File: src/main/java/com/fasterxml/jackson/databind/introspect/AnnotatedCreatorCollector.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2019-16942
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
collectAnnotations
|
src/main/java/com/fasterxml/jackson/databind/introspect/AnnotatedCreatorCollector.java
|
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean hasManageOngoingCallsPermission(String callingPackage) {
try {
Log.startSession("TSI.hMOCP");
enforceCallingPackage(callingPackage, "hasManageOngoingCallsPermission");
return PermissionChecker.checkPermissionForDataDeliveryFromDataSource(
mContext, Manifest.permission.MANAGE_ONGOING_CALLS,
Binder.getCallingPid(),
new AttributionSource(mContext.getAttributionSource(),
new AttributionSource(Binder.getCallingUid(),
callingPackage, /*attributionTag*/ null)),
"Checking whether the caller has MANAGE_ONGOING_CALLS permission")
== PermissionChecker.PERMISSION_GRANTED;
} finally {
Log.endSession();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasManageOngoingCallsPermission
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
|
hasManageOngoingCallsPermission
|
src/com/android/server/telecom/TelecomServiceImpl.java
|
68dca62035c49e14ad26a54f614199cb29a3393f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public AttributeList deserialize(
JsonParser parser,
DeserializationContext context
) throws IOException, JsonProcessingException {
AttributeList list = new AttributeList();
JsonNode node = parser.getCodec().readTree(parser);
JsonNode attributeNode = node.get("Attribute");
for (JsonNode attr : attributeNode) {
Attribute attribute = new Attribute();
attribute.name = attr.get("name").asText();
attribute.value = attr.get("value").asText();
list.attrs.add(attribute);
}
return list;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deserialize
File: base/common/src/main/java/com/netscape/certsrv/base/RESTMessage.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
deserialize
|
base/common/src/main/java/com/netscape/certsrv/base/RESTMessage.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
protected CountDownLatch getStopped() {
return stopped;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStopped
File: activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
Repository: apache/activemq
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-3576
|
MEDIUM
| 5
|
apache/activemq
|
getStopped
|
activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
|
00921f2
| 0
|
Analyze the following code function for security vulnerabilities
|
public int finish() {
if(has_error()) {
return -1;
} else if(is_finished()) {
return 1;
} else {
return 0;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: finish
File: ext/puma_http11/org/jruby/puma/Http11Parser.java
Repository: puma
The code follows secure coding practices.
|
[
"CWE-444"
] |
CVE-2021-41136
|
LOW
| 3.6
|
puma
|
finish
|
ext/puma_http11/org/jruby/puma/Http11Parser.java
|
acdc3ae571dfae0e045cf09a295280127db65c7f
| 0
|
Analyze the following code function for security vulnerabilities
|
public void connect() throws WebSocketException
{
try
{
// Connect to the server (either a proxy or a WebSocket endpoint).
doConnect();
}
catch (WebSocketException e)
{
// Failed to connect the server.
try
{
// Close the socket.
mSocket.close();
}
catch (IOException ioe)
{
// Ignore any error raised by close().
}
throw e;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: connect
File: src/main/java/com/neovisionaries/ws/client/SocketConnector.java
Repository: TakahikoKawasaki/nv-websocket-client
The code follows secure coding practices.
|
[
"CWE-295"
] |
CVE-2017-1000209
|
MEDIUM
| 4.3
|
TakahikoKawasaki/nv-websocket-client
|
connect
|
src/main/java/com/neovisionaries/ws/client/SocketConnector.java
|
feb9c8302757fd279f4cfc99cbcdfb6ee709402d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void executeList(TestContext context) {
Async async = context.async();
JsonArray ids = new JsonArray().add(randomUuid()).add(randomUuid());
List<JsonArray> list = new ArrayList<>(2);
list.add(new JsonArray().add(ids.getString(0)));
list.add(new JsonArray().add(ids.getString(1)));
insertXAndSingleQuotePojo(context, ids).execute("DELETE FROM tenant_raml_module_builder.foo WHERE id=?", list, res -> {
assertSuccess(context, res);
List<UpdateResult> result = res.result();
context.assertEquals(2, result.size());
context.assertEquals(1, result.get(0).getUpdated());
context.assertEquals(1, result.get(1).getUpdated());
async.complete();
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: executeList
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
|
executeList
|
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
public void addStanzaAcknowledgedListener(StanzaListener listener) {
stanzaAcknowledgedListeners.add(listener);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addStanzaAcknowledgedListener
File: smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
Repository: igniterealtime/Smack
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2016-10027
|
MEDIUM
| 4.3
|
igniterealtime/Smack
|
addStanzaAcknowledgedListener
|
smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
|
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isDigit() {
return current>='0' && current<='9';
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isDigit
File: src/main/org/hjson/JsonParser.java
Repository: hjson/hjson-java
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-34620
|
HIGH
| 7.5
|
hjson/hjson-java
|
isDigit
|
src/main/org/hjson/JsonParser.java
|
91bef056d56bf968451887421c89a44af1d692ff
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean isImplicitlyExcludingAllSystemGestures() {
final boolean stickyHideNav =
mAttrs.insetsFlags.behavior == BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
&& !getRequestedVisibility(ITYPE_NAVIGATION_BAR);
return stickyHideNav && mWmService.mConstants.mSystemGestureExcludedByPreQStickyImmersive
&& mActivityRecord != null && mActivityRecord.mTargetSdk < Build.VERSION_CODES.Q;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isImplicitlyExcludingAllSystemGestures
File: services/core/java/com/android/server/wm/WindowState.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35674
|
HIGH
| 7.8
|
android
|
isImplicitlyExcludingAllSystemGestures
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void startDocument() {
this.isValidating = true;
this.current = null;
this.peer = null;
this.lastWasEndElement = false;
this.parents.clear();
this.characters = null;
this.configurationStack.clear();
this.namespaces.clear();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startDocument
File: drools-core/src/main/java/org/drools/core/xml/ExtensibleXmlParser.java
Repository: apache/incubator-kie-drools
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2014-8125
|
HIGH
| 7.5
|
apache/incubator-kie-drools
|
startDocument
|
drools-core/src/main/java/org/drools/core/xml/ExtensibleXmlParser.java
|
c48464c3b246e6ef0d4cd0dbf67e83ccd532c6d3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int hashCode() {
return (key == null ? 0 : key.hashCode()) ^ AsciiString.hashCode(value);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hashCode
File: core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2019-16771
|
MEDIUM
| 5
|
line/armeria
|
hashCode
|
core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
|
b597f7a865a527a84ee3d6937075cfbb4470ed20
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setDefaultIntentResultListener(IntentResultListener l) {
this.defaultResultListener = l;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDefaultIntentResultListener
File: Ports/Android/src/com/codename1/impl/android/CodenameOneActivity.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
setDefaultIntentResultListener
|
Ports/Android/src/com/codename1/impl/android/CodenameOneActivity.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequiresPermission(value = MANAGE_DEVICE_POLICY_SECURITY_LOGGING, conditional = true)
public boolean isSecurityLoggingEnabled(@Nullable ComponentName admin) {
throwIfParentInstance("isSecurityLoggingEnabled");
try {
return mService.isSecurityLoggingEnabled(admin, mContext.getPackageName());
} catch (RemoteException re) {
throw re.rethrowFromSystemServer();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isSecurityLoggingEnabled
File: core/java/android/app/admin/DevicePolicyManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
isSecurityLoggingEnabled
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressLint("InflateParams")
protected void showCreateContactDialog(final String prefilledJid, final Invite invite) {
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
Fragment prev = getSupportFragmentManager().findFragmentByTag(FRAGMENT_TAG_DIALOG);
if (prev != null) {
ft.remove(prev);
}
ft.addToBackStack(null);
EnterJidDialog dialog = EnterJidDialog.newInstance(
mActivatedAccounts,
getString(R.string.dialog_title_create_contact),
getString(R.string.create),
prefilledJid,
null,
invite == null || !invite.hasFingerprints()
);
dialog.setOnEnterJidDialogPositiveListener((accountJid, contactJid) -> {
if (!xmppConnectionServiceBound) {
return false;
}
final Account account = xmppConnectionService.findAccountByJid(accountJid);
if (account == null) {
return true;
}
final Contact contact = account.getRoster().getContact(contactJid);
if (invite != null && invite.getName() != null) {
contact.setServerName(invite.getName());
}
if (contact.isSelf()) {
switchToConversation(contact, null);
return true;
} else if (contact.showInRoster()) {
throw new EnterJidDialog.JidError(getString(R.string.contact_already_exists));
} else {
xmppConnectionService.createContact(contact, true);
if (invite != null && invite.hasFingerprints()) {
xmppConnectionService.verifyFingerprints(contact, invite.getFingerprints());
}
switchToConversation(contact, invite == null ? null : invite.getBody());
return true;
}
});
dialog.show(ft, FRAGMENT_TAG_DIALOG);
}
|
Vulnerability Classification:
- CWE: CWE-200
- CVE: CVE-2018-18467
- Severity: MEDIUM
- CVSS Score: 5.0
Description: Do not insert text shared over XMPP uri when already drafting message
XMPP uris in the style of `xmpp:test@domain.tld?body=Something` can be used to
directly share a message with a specific contact. Previously the text was
always appended to the message currently in draft. The message was never send
automatically. Essentially those links where treated like normal text share
intents (for example when sharing a URL from the browser) but without the
contact selection.
There is a concern (CVE-2018-18467) that when this URI is invoked automatically
and the user is currently drafting a long message to that particular contact
the text could be inserted in the draft field (input box) without the user
noticing.
To circumvent that the text shared over XMPP uris that contain a particular
contact is now appended only if the draft box is currently empty.
Sharing text normally (**with** manual contact selection) is still treated the
same; meaning the shared text will be appended to the current draft. This is
intended behaviour to make the
'Hey I have this cool link here;' *open browser*, *share link* - secenario
work.
Function: showCreateContactDialog
File: src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
Repository: iNPUTmice/Conversations
Fixed Code:
@SuppressLint("InflateParams")
protected void showCreateContactDialog(final String prefilledJid, final Invite invite) {
FragmentTransaction ft = getSupportFragmentManager().beginTransaction();
Fragment prev = getSupportFragmentManager().findFragmentByTag(FRAGMENT_TAG_DIALOG);
if (prev != null) {
ft.remove(prev);
}
ft.addToBackStack(null);
EnterJidDialog dialog = EnterJidDialog.newInstance(
mActivatedAccounts,
getString(R.string.dialog_title_create_contact),
getString(R.string.create),
prefilledJid,
null,
invite == null || !invite.hasFingerprints()
);
dialog.setOnEnterJidDialogPositiveListener((accountJid, contactJid) -> {
if (!xmppConnectionServiceBound) {
return false;
}
final Account account = xmppConnectionService.findAccountByJid(accountJid);
if (account == null) {
return true;
}
final Contact contact = account.getRoster().getContact(contactJid);
if (invite != null && invite.getName() != null) {
contact.setServerName(invite.getName());
}
if (contact.isSelf()) {
switchToConversation(contact);
return true;
} else if (contact.showInRoster()) {
throw new EnterJidDialog.JidError(getString(R.string.contact_already_exists));
} else {
xmppConnectionService.createContact(contact, true);
if (invite != null && invite.hasFingerprints()) {
xmppConnectionService.verifyFingerprints(contact, invite.getFingerprints());
}
switchToConversationDoNotAppend(contact, invite == null ? null : invite.getBody());
return true;
}
});
dialog.show(ft, FRAGMENT_TAG_DIALOG);
}
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
showCreateContactDialog
|
src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 1
|
Analyze the following code function for security vulnerabilities
|
@LargeTest
@Test
public void testPullNonPullableExternalCall() throws Exception {
// TODO: Revisit this unit test once telecom support for filtering external calls from
// InCall services is implemented.
mConnectionServiceFixtureA.mConnectionServiceDelegate.mProperties =
Connection.PROPERTY_IS_EXTERNAL_CALL;
IdPair ids = startAndMakeActiveIncomingCall("650-555-1212",
mPhoneAccountA0.getAccountHandle(), mConnectionServiceFixtureA);
assertEquals(Call.STATE_ACTIVE, mInCallServiceFixtureX.getCall(ids.mCallId).getState());
// Attempt to pull the call and verify the API call makes it through
mInCallServiceFixtureX.mInCallAdapter.pullExternalCall(ids.mCallId);
Thread.sleep(TEST_TIMEOUT);
verify(mConnectionServiceFixtureA.getTestDouble(), never())
.pullExternalCall(eq(ids.mConnectionId), any());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: testPullNonPullableExternalCall
File: tests/src/com/android/server/telecom/tests/BasicCallTests.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
testPullNonPullableExternalCall
|
tests/src/com/android/server/telecom/tests/BasicCallTests.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public DynamicForm discardingErrors() {
final Form<Dynamic> form = super.discardingErrors();
return new DynamicForm(
super.rawData(),
super.files(),
form.errors(),
form.value(),
this.messagesApi,
this.formatters,
this.validatorFactory,
this.config,
lang().orElse(null));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: discardingErrors
File: web/play-java-forms/src/main/java/play/data/DynamicForm.java
Repository: playframework
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-31018
|
MEDIUM
| 5
|
playframework
|
discardingErrors
|
web/play-java-forms/src/main/java/play/data/DynamicForm.java
|
15393b736df939e35e275af2347155f296c684f2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Intent getIntentForIntentSender(IIntentSender pendingResult) {
if (!(pendingResult instanceof PendingIntentRecord)) {
return null;
}
try {
PendingIntentRecord res = (PendingIntentRecord)pendingResult;
return res.key.requestIntent != null ? new Intent(res.key.requestIntent) : null;
} catch (ClassCastException e) {
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getIntentForIntentSender
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3833
|
MEDIUM
| 4.3
|
android
|
getIntentForIntentSender
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
public int startPostEnroll(IBinder token) {
IFingerprintDaemon daemon = getFingerprintDaemon();
if (daemon == null) {
Slog.w(TAG, "startPostEnroll: no fingeprintd!");
return 0;
}
try {
return daemon.postEnroll();
} catch (RemoteException e) {
Slog.e(TAG, "startPostEnroll failed", e);
}
return 0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startPostEnroll
File: services/core/java/com/android/server/fingerprint/FingerprintService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
startPostEnroll
|
services/core/java/com/android/server/fingerprint/FingerprintService.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Route.Definition before(final String method, final String pattern,
final Route.Before handler) {
return appendDefinition(method, pattern, handler);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: before
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
|
before
|
jooby/src/main/java/org/jooby/Jooby.java
|
34f526028e6cd0652125baa33936ffb6a8a4a009
| 0
|
Analyze the following code function for security vulnerabilities
|
public long getMinRoamingUplinkBandwidth() {
return mMinRoamingUplinkBandwidth;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMinRoamingUplinkBandwidth
File: framework/java/android/net/wifi/hotspot2/pps/Policy.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21240
|
MEDIUM
| 5.5
|
android
|
getMinRoamingUplinkBandwidth
|
framework/java/android/net/wifi/hotspot2/pps/Policy.java
|
69119d1d3102e27b6473c785125696881bce9563
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setManagedSubscriptionsPolicy(@Nullable ManagedSubscriptionsPolicy policy) {
throwIfParentInstance("setManagedSubscriptionsPolicy");
try {
mService.setManagedSubscriptionsPolicy(policy);
} catch (RemoteException re) {
throw re.rethrowFromSystemServer();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setManagedSubscriptionsPolicy
File: core/java/android/app/admin/DevicePolicyManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
setManagedSubscriptionsPolicy
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.