instruction
string | input
string | output
string | cwe_ids
list | cve_id
string | severity
string | cvss_score
float64 | repo_name
string | func_name
string | file_path
string | commit_hash
string | is_vulnerable
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Analyze the following code function for security vulnerabilities
|
public StandardTemplateParams headerless(boolean headerless) {
mHeaderless = headerless;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: headerless
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
headerless
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
private void resetUserChangesToRuntimePermissionsAndFlagsLPw(int userId) {
final int packageCount = mPackages.size();
for (int i = 0; i < packageCount; i++) {
PackageParser.Package pkg = mPackages.valueAt(i);
PackageSetting ps = (PackageSetting) pkg.mExtras;
resetUserChangesToRuntimePermissionsAndFlagsLPw(ps, userId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resetUserChangesToRuntimePermissionsAndFlagsLPw
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
|
resetUserChangesToRuntimePermissionsAndFlagsLPw
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Boolean isUsedInFetchArtifact(PipelineConfig pipelineConfig) {
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isUsedInFetchArtifact
File: domain/src/main/java/com/thoughtworks/go/config/materials/ScmMaterial.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-39309
|
MEDIUM
| 6.5
|
gocd
|
isUsedInFetchArtifact
|
domain/src/main/java/com/thoughtworks/go/config/materials/ScmMaterial.java
|
691b479f1310034992da141760e9c5d1f5b60e8a
| 0
|
Analyze the following code function for security vulnerabilities
|
public String findFilter( String url_suffix )
{
if( url_suffix == null )
{
throw new IllegalArgumentException( "The url_suffix must not be null." );
}
CaptureType type = em.find( CaptureType.class, url_suffix );
if( type != null )
{
return type.getCaptureFilter();
}
return null;
}
|
Vulnerability Classification:
- CWE: CWE-754
- CVE: CVE-2021-39196
- Severity: MEDIUM
- CVSS Score: 6.8
Description: Fixed major security bug.
A user could effectively specify an undefined url and the program would return a null filter rather than throwing an exception and returning an error to the user. This was a really bad bug. I found it when I was adding code to validate the path parameters. That will be coming in the next commit.
Function: findFilter
File: src/main/java/com/rtds/svc/CaptureTypeService.java
Repository: jdhwpgmbca/pcapture
Fixed Code:
public String findFilter( String url_suffix )
{
if( url_suffix == null )
{
throw new IllegalArgumentException( "The url_suffix must not be null." );
}
CaptureType type = em.find( CaptureType.class, url_suffix );
if( type == null )
{
throw new IllegalArgumentException( "The url_suffix must exist in the database." );
}
// It is okay for the capture filter itself to be null, but the CaptureType
// must be in the database, otherwise the user could effectively forge
// a capture filter for "all" just by requesting a non-existent filter.
return type.getCaptureFilter();
}
|
[
"CWE-754"
] |
CVE-2021-39196
|
MEDIUM
| 6.8
|
jdhwpgmbca/pcapture
|
findFilter
|
src/main/java/com/rtds/svc/CaptureTypeService.java
|
0f74f431e0970a2e5784dbd955cfa4760e3b1ef7
| 1
|
Analyze the following code function for security vulnerabilities
|
private void assignImplicitRanks(List<ShortcutInfo> shortcuts) {
for (int i = shortcuts.size() - 1; i >= 0; i--) {
shortcuts.get(i).setImplicitRank(i);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: assignImplicitRanks
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
|
assignImplicitRanks
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequiresPermission(value = MANAGE_DEVICE_POLICY_WIPE_DATA, conditional = true)
@RequiresFeature(PackageManager.FEATURE_SECURE_LOCK_SCREEN)
public void setMaximumFailedPasswordsForWipe(@Nullable ComponentName admin, int num) {
if (mService != null) {
try {
mService.setMaximumFailedPasswordsForWipe(
admin, mContext.getPackageName(), num, mParentInstance);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setMaximumFailedPasswordsForWipe
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
|
setMaximumFailedPasswordsForWipe
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public ThreadGroup getThreadGroup() {
if (!isActive)
return super.getThreadGroup();
return testThreadGroup;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getThreadGroup
File: src/main/java/de/tum/in/test/api/security/ArtemisSecurityManager.java
Repository: ls1intum/Ares
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2024-23683
|
HIGH
| 8.2
|
ls1intum/Ares
|
getThreadGroup
|
src/main/java/de/tum/in/test/api/security/ArtemisSecurityManager.java
|
af4f28a56e2fe600d8750b3b415352a0a3217392
| 0
|
Analyze the following code function for security vulnerabilities
|
public void clearProfileOwnerLocked(ActiveAdmin admin, int userId) {
mDeviceAdminServiceController.stopServiceForOwner(userId, "clear-profile-owner");
if (admin != null) {
admin.disableCamera = false;
admin.userRestrictions = null;
admin.defaultEnabledRestrictionsAlreadySet.clear();
}
final DevicePolicyData policyData = getUserData(userId);
policyData.mCurrentInputMethodSet = false;
policyData.mOwnerInstalledCaCerts.clear();
saveSettingsLocked(userId);
clearUserPoliciesLocked(userId);
clearApplicationRestrictions(userId);
mOwners.removeProfileOwner(userId);
mOwners.writeProfileOwner(userId);
deleteTransferOwnershipBundleLocked(userId);
toggleBackupServiceActive(userId, true);
applyProfileRestrictionsIfDeviceOwnerLocked();
setNetworkLoggingActiveInternal(false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearProfileOwnerLocked
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
|
clearProfileOwnerLocked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Api getPluginApi(XWikiPluginInterface plugin, XWikiContext context)
{
return new SkinExtensionPluginApi((AbstractSkinExtensionPlugin) plugin, context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPluginApi
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
|
getPluginApi
|
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 Route.Definition patch(final String path,
final Route.Filter filter) {
return appendDefinition(PATCH, path, filter);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: patch
File: jooby/src/main/java/org/jooby/Jooby.java
Repository: jooby-project/jooby
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-7647
|
MEDIUM
| 5
|
jooby-project/jooby
|
patch
|
jooby/src/main/java/org/jooby/Jooby.java
|
34f526028e6cd0652125baa33936ffb6a8a4a009
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public State newTileState() {
State state = new State();
state.handlesLongClick = false;
return state;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: newTileState
File: packages/SystemUI/src/com/android/systemui/qs/tiles/QuickAccessWalletTile.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21289
|
MEDIUM
| 5.5
|
android
|
newTileState
|
packages/SystemUI/src/com/android/systemui/qs/tiles/QuickAccessWalletTile.java
|
7a5e51c918b7097be3c7e669e1825a4d159c4185
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getMetricsTag() {
String tag = getClass().getName();
if (getIntent() != null && getIntent().hasExtra(EXTRA_SHOW_FRAGMENT)) {
tag = getIntent().getStringExtra(EXTRA_SHOW_FRAGMENT);
}
if (tag.startsWith("com.android.settings.")) {
tag = tag.replace("com.android.settings.", "");
}
return tag;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMetricsTag
File: src/com/android/settings/SettingsActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2018-9501
|
HIGH
| 7.2
|
android
|
getMetricsTag
|
src/com/android/settings/SettingsActivity.java
|
5e43341b8c7eddce88f79c9a5068362927c05b54
| 0
|
Analyze the following code function for security vulnerabilities
|
public void sendConfirmationEmail(String xwikiname, String password, String email, String message,
String contentfield, XWikiContext context) throws XWikiException
{
sendValidationEmail(xwikiname, password, email, "message", message, contentfield, context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendConfirmationEmail
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-32620
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
sendConfirmationEmail
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
TaskRecord recentTaskForIdLocked(int id) {
final int N = mRecentTasks.size();
for (int i=0; i<N; i++) {
TaskRecord tr = mRecentTasks.get(i);
if (tr.taskId == id) {
return tr;
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: recentTaskForIdLocked
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
|
recentTaskForIdLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void cancel(Account account, OCFile file) {
cancel(account.name, file.getRemotePath(), null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cancel
File: app/src/main/java/com/owncloud/android/files/services/FileUploader.java
Repository: nextcloud/android
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-39210
|
MEDIUM
| 5.5
|
nextcloud/android
|
cancel
|
app/src/main/java/com/owncloud/android/files/services/FileUploader.java
|
cd3bd0845a97e1d43daa0607a122b66b0068c751
| 0
|
Analyze the following code function for security vulnerabilities
|
private void resetBuffer(final XMLStringBuffer buffer, final int lineNumber,
final int columnNumber, final int characterOffset) {
lineNumber_ = lineNumber;
columnNumber_ = columnNumber;
this.characterOffset_ = characterOffset;
this.buffer = buffer.ch;
this.offset = buffer.offset;
this.length = buffer.length;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resetBuffer
File: src/org/cyberneko/html/HTMLScanner.java
Repository: sparklemotion/nekohtml
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-24839
|
MEDIUM
| 5
|
sparklemotion/nekohtml
|
resetBuffer
|
src/org/cyberneko/html/HTMLScanner.java
|
a800fce3b079def130ed42a408ff1d09f89e773d
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void fillValues(Node node, BeanDefinitionBuilder builder, String... excludeNames) {
Collection<String> epn = excludeNames != null && excludeNames.length > 0
? new HashSet<String>(asList(excludeNames)) : null;
fillAttributeValues(node, builder, epn);
for (Node n : childElements(node)) {
String name = xmlToJavaName(cleanNodeName(n));
if (epn != null && epn.contains(name)) {
continue;
}
String value = getTextContent(n);
builder.addPropertyValue(name, value);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fillValues
File: hazelcast-spring/src/main/java/com/hazelcast/spring/AbstractHazelcastBeanDefinitionParser.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
fillValues
|
hazelcast-spring/src/main/java/com/hazelcast/spring/AbstractHazelcastBeanDefinitionParser.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
private void updateEditablity() {
boolean canWrite = this.conversation.getMode() == Conversation.MODE_SINGLE || this.conversation.getMucOptions().participating() || this.conversation.getNextCounterpart() != null;
this.binding.textinput.setFocusable(canWrite);
this.binding.textinput.setFocusableInTouchMode(canWrite);
this.binding.textSendButton.setEnabled(canWrite);
this.binding.textinput.setCursorVisible(canWrite);
this.binding.textinput.setEnabled(canWrite);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateEditablity
File: src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
updateEditablity
|
src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void exportProject(long projectId, TarArchiveOutputStream tos) throws IOException {
File dir = this.getProjectDir(projectId);
this.tarDir("", dir, tos);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: exportProject
File: main/src/com/google/refine/io/FileProjectManager.java
Repository: OpenRefine
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2023-37476
|
HIGH
| 7.8
|
OpenRefine
|
exportProject
|
main/src/com/google/refine/io/FileProjectManager.java
|
e9c1e65d58b47aec8cd676bd5c07d97b002f205e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void processRequest() throws Exception {
FormProcessor fp = new FormProcessor(request);
String filePathName = "";
String fileName = fp.getString("fileName");
File f = new File(fileName);
if(fileName != null && fileName.indexOf("..") > -1) {
throw new RuntimeException("Traversal attempt - absolute path not allowed " + fileName);
}
if (fileName != null && fileName.length() > 0) {
int parentStudyId = currentStudy.getParentStudyId();
String testPath = Utils.getAttachedFileRootPath();
String tail = File.separator + f.getName();
String testName = testPath + currentStudy.getOid() + tail;
File temp = new File(testName);
if (temp.exists()) {
filePathName = testName;
logger.info(currentStudy.getName() + " existing filePathName=" + filePathName);
} else {
if (currentStudy.isSite(parentStudyId)) {
testName = testPath + ((StudyBean) new StudyDAO(sm.getDataSource()).findByPK(parentStudyId)).getOid() + tail;
temp = new File(testName);
if (temp.exists()) {
filePathName = testName;
logger.info("parent existing filePathName=" + filePathName);
}
} else {
ArrayList<StudyBean> sites = (ArrayList<StudyBean>) new StudyDAO(sm.getDataSource()).findAllByParent(currentStudy.getId());
for (StudyBean s : sites) {
testPath = Utils.getAttachedFilePath(s);
testName = testPath + tail;//+ s.getIdentifier() + tail;
File test = new File(testName);
if (test.exists()) {
filePathName = testName;
logger.info("site of currentStudy existing filePathName=" + filePathName);
break;
}
}
}
}
}
logger.info("filePathName=" + filePathName + " fileName=" + fileName);
File file = new File(filePathName);
if (!file.exists() || file.length() <= 0) {
addPageMessage("File " + filePathName + " " + respage.getString("not_exist"));
// try to use the passed in the existing file
file = new File(fileName);
}
if (!file.exists() || file.length() <= 0) {
addPageMessage("File " + filePathName + " " + respage.getString("not_exist"));
} else {
// response.setContentType("application/octet-stream");
response.setHeader("Content-disposition", "attachment; filename=\"" + fileName + "\";");
response.setHeader("Pragma", "public");
ServletOutputStream outStream = response.getOutputStream();
DataInputStream inStream = null;
try {
response.setContentType("application/download");
response.setHeader("Cache-Control", "max-age=0");
response.setContentLength((int) file.length());
byte[] bbuf = new byte[(int) file.length()];
inStream = new DataInputStream(new FileInputStream(file));
int length;
while (inStream != null && (length = inStream.read(bbuf)) != -1) {
outStream.write(bbuf, 0, length);
}
inStream.close();
outStream.flush();
outStream.close();
} catch (Exception ee) {
ee.printStackTrace();
} finally {
if (inStream != null) {
inStream.close();
}
if (outStream != null) {
outStream.close();
}
}
}
}
|
Vulnerability Classification:
- CWE: CWE-22
- CVE: CVE-2022-24830
- Severity: HIGH
- CVSS Score: 7.5
Description: OC-17139: code changes after code review
Function: processRequest
File: web/src/main/java/org/akaza/openclinica/control/submit/DownloadAttachedFileServlet.java
Repository: OpenClinica
Fixed Code:
@Override
public void processRequest() throws Exception {
FormProcessor fp = new FormProcessor(request);
String filePathName = "";
String fileName = fp.getString("fileName");
File f = new File(fileName);
if (fileName != null && fileName.length() > 0) {
int parentStudyId = currentStudy.getParentStudyId();
String testPath = Utils.getAttachedFileRootPath();
String tail = File.separator + f.getName();
String testName = testPath + currentStudy.getOid() + tail;
String filePath = testPath + currentStudy.getOid() +File.separator;
File temp = new File(filePath,f.getName());
String canonicalPath= temp.getCanonicalPath();
if (canonicalPath.startsWith(filePath)) {
;
}else {
throw new RuntimeException("Traversal attempt - file path not allowed " + fileName);
}
if (temp.exists()) {
filePathName = testName;
logger.info(currentStudy.getName() + " existing filePathName=" + filePathName);
} else {
if (currentStudy.isSite(parentStudyId)) {
testName = testPath + ((StudyBean) new StudyDAO(sm.getDataSource()).findByPK(parentStudyId)).getOid() + tail;
temp = new File(testName);
if (temp.exists()) {
filePathName = testName;
logger.info("parent existing filePathName=" + filePathName);
}
} else {
ArrayList<StudyBean> sites = (ArrayList<StudyBean>) new StudyDAO(sm.getDataSource()).findAllByParent(currentStudy.getId());
for (StudyBean s : sites) {
testPath = Utils.getAttachedFilePath(s);
testName = testPath + tail;//+ s.getIdentifier() + tail;
File test = new File(testName);
if (test.exists()) {
filePathName = testName;
logger.info("site of currentStudy existing filePathName=" + filePathName);
break;
}
}
}
}
}
logger.info("filePathName=" + filePathName + " fileName=" + fileName);
File file = new File(filePathName);
if (!file.exists() || file.length() <= 0) {
addPageMessage("File " + filePathName + " " + respage.getString("not_exist"));
// try to use the passed in the existing file
file = new File(fileName);
}
if (!file.exists() || file.length() <= 0) {
addPageMessage("File " + filePathName + " " + respage.getString("not_exist"));
} else {
// response.setContentType("application/octet-stream");
response.setHeader("Content-disposition", "attachment; filename=\"" + fileName + "\";");
response.setHeader("Pragma", "public");
ServletOutputStream outStream = response.getOutputStream();
DataInputStream inStream = null;
try {
response.setContentType("application/download");
response.setHeader("Cache-Control", "max-age=0");
response.setContentLength((int) file.length());
byte[] bbuf = new byte[(int) file.length()];
inStream = new DataInputStream(new FileInputStream(file));
int length;
while (inStream != null && (length = inStream.read(bbuf)) != -1) {
outStream.write(bbuf, 0, length);
}
inStream.close();
outStream.flush();
outStream.close();
} catch (Exception ee) {
ee.printStackTrace();
} finally {
if (inStream != null) {
inStream.close();
}
if (outStream != null) {
outStream.close();
}
}
}
}
|
[
"CWE-22"
] |
CVE-2022-24830
|
HIGH
| 7.5
|
OpenClinica
|
processRequest
|
web/src/main/java/org/akaza/openclinica/control/submit/DownloadAttachedFileServlet.java
|
6f864e86543f903bd20d6f9fc7056115106441f3
| 1
|
Analyze the following code function for security vulnerabilities
|
private static String toQuotedCommaSeparatedString(final Set<String> roles) {
return Joiner.on(',').join(Iterables.transform(roles, s -> {
return new StringBuilder(s.length() + 2).append('"').append(s).append('"').toString();
}));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toQuotedCommaSeparatedString
File: src/main/java/org/opensearch/security/securityconf/ConfigModelV7.java
Repository: opensearch-project/security
The code follows secure coding practices.
|
[
"CWE-612",
"CWE-863"
] |
CVE-2022-41918
|
MEDIUM
| 6.3
|
opensearch-project/security
|
toQuotedCommaSeparatedString
|
src/main/java/org/opensearch/security/securityconf/ConfigModelV7.java
|
f7cc569c9d3fa5d5432c76c854eed280d45ce6f4
| 0
|
Analyze the following code function for security vulnerabilities
|
public void updateBlob(@Positive int columnIndex, @Nullable InputStream inputStream, long length)
throws SQLException {
throw org.postgresql.Driver.notImplemented(this.getClass(),
"updateBlob(int, InputStream, long)");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateBlob
File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
Repository: pgjdbc
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-31197
|
HIGH
| 8
|
pgjdbc
|
updateBlob
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
@After
public void tearDown() throws Exception {
super.tearDown();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: tearDown
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
|
tearDown
|
tests/src/com/android/server/telecom/tests/BasicCallTests.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public final DeserializerFactory withAdditionalDeserializers(Deserializers additional) {
return withConfig(_factoryConfig.withAdditionalDeserializers(additional));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: withAdditionalDeserializers
File: src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2019-16942
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
withAdditionalDeserializers
|
src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java
|
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void discardMediaPackage(MediaPackage mp) throws IOException {
String mediaPackageId = mp.getIdentifier().toString();
for (MediaPackageElement element : mp.getElements()) {
if (!workingFileRepository.delete(mediaPackageId, element.getIdentifier()))
logger.warn("Unable to find (and hence, delete), this mediapackage element");
}
logger.info("Successfully discarded media package {}", mp);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: discardMediaPackage
File: modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/impl/IngestServiceImpl.java
Repository: opencast
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2022-29237
|
MEDIUM
| 5.5
|
opencast
|
discardMediaPackage
|
modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/impl/IngestServiceImpl.java
|
8d5ec1614eed109b812bc27b0c6d3214e456d4e7
| 0
|
Analyze the following code function for security vulnerabilities
|
private static Object getProviderRoleById(Integer providerRoleId) {
// we have to fetch the provider role by reflection, since the provider management module is not a required dependency
try {
Class<?> providerManagementServiceClass = Context.loadClass("org.openmrs.module.providermanagement.api.ProviderManagementService");
Object providerManagementService = Context.getService(providerManagementServiceClass);
Method getProviderRole = providerManagementServiceClass.getMethod("getProviderRole", Integer.class);
return getProviderRole.invoke(providerManagementService, providerRoleId);
}
catch(Exception e) {
throw new RuntimeException("Unable to get provider role by id; the Provider Management module needs to be installed if using the providerRoles attribute", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProviderRoleById
File: api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java
Repository: openmrs/openmrs-module-htmlformentry
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-16521
|
HIGH
| 7.5
|
openmrs/openmrs-module-htmlformentry
|
getProviderRoleById
|
api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java
|
9dcd304688e65c31cac5532fe501b9816ed975ae
| 0
|
Analyze the following code function for security vulnerabilities
|
int countMediaPackages() throws SearchServiceDatabaseException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: countMediaPackages
File: modules/search-service-impl/src/main/java/org/opencastproject/search/impl/persistence/SearchServiceDatabase.java
Repository: opencast
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-21318
|
MEDIUM
| 5.5
|
opencast
|
countMediaPackages
|
modules/search-service-impl/src/main/java/org/opencastproject/search/impl/persistence/SearchServiceDatabase.java
|
b18c6a7f81f08ed14884592a6c14c9ab611ad450
| 0
|
Analyze the following code function for security vulnerabilities
|
public SVNRevision getRevision(SVNRevision defaultValue) {
SVNRevision revision = getRevisionFromRemoteUrl(remote);
return revision != null ? revision : defaultValue;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRevision
File: src/main/java/hudson/scm/SubversionSCM.java
Repository: jenkinsci/subversion-plugin
The code follows secure coding practices.
|
[
"CWE-255"
] |
CVE-2013-6372
|
LOW
| 2.1
|
jenkinsci/subversion-plugin
|
getRevision
|
src/main/java/hudson/scm/SubversionSCM.java
|
7d4562d6f7e40de04bbe29577b51c79f07d05ba6
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("unused")
@CalledByNative
private void onFlingStartEventConsumed(int vx, int vy) {
mTouchScrollInProgress = false;
mPotentiallyActiveFlingCount++;
for (mGestureStateListenersIterator.rewind();
mGestureStateListenersIterator.hasNext();) {
mGestureStateListenersIterator.next().onFlingStartGesture(
vx, vy, computeVerticalScrollOffset(), computeVerticalScrollExtent());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onFlingStartEventConsumed
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
|
onFlingStartEventConsumed
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
9d343ad2ea6ec395c377a4efa266057155bfa9c1
| 0
|
Analyze the following code function for security vulnerabilities
|
public Mono<ActionExecutionResult> executeCommon(APIConnection apiConnection,
DatasourceConfiguration datasourceConfiguration,
ActionConfiguration actionConfiguration,
List<Map.Entry<String, String>> insertedParams) {
// Initializing object for error condition
ActionExecutionResult errorResult = new ActionExecutionResult();
initUtils.initializeResponseWithError(errorResult);
// Set of hint messages that can be returned to the user.
Set<String> hintMessages = new HashSet();
// Initializing request URL
String url = initUtils.initializeRequestUrl(actionConfiguration, datasourceConfiguration);
Boolean encodeParamsToggle = headerUtils.isEncodeParamsToggleEnabled(actionConfiguration);
URI uri;
try {
uri = uriUtils.createUriWithQueryParams(actionConfiguration, datasourceConfiguration, url,
encodeParamsToggle);
} catch (URISyntaxException e) {
ActionExecutionRequest actionExecutionRequest =
RequestCaptureFilter.populateRequestFields(actionConfiguration, null, insertedParams, objectMapper);
actionExecutionRequest.setUrl(url);
errorResult.setBody(AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR.getMessage(e));
errorResult.setRequest(actionExecutionRequest);
return Mono.just(errorResult);
}
ActionExecutionRequest actionExecutionRequest =
RequestCaptureFilter.populateRequestFields(actionConfiguration, uri, insertedParams, objectMapper);
try {
if (uriUtils.isHostDisallowed(uri)) {
errorResult.setBody(AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR.getMessage("Host not allowed."));
errorResult.setRequest(actionExecutionRequest);
return Mono.just(errorResult);
}
} catch (UnknownHostException e) {
errorResult.setBody(AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR.getMessage("Unknown host."));
errorResult.setRequest(actionExecutionRequest);
return Mono.just(errorResult);
}
WebClient.Builder webClientBuilder = triggerUtils.getWebClientBuilder(actionConfiguration,
datasourceConfiguration);
String reqContentType = headerUtils.getRequestContentType(actionConfiguration, datasourceConfiguration);
/* Check for content type */
final String contentTypeError = headerUtils.verifyContentType(actionConfiguration.getHeaders());
if (contentTypeError != null) {
errorResult.setBody(AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR.getMessage("Invalid value for Content-Type."));
errorResult.setRequest(actionExecutionRequest);
return Mono.just(errorResult);
}
HttpMethod httpMethod = actionConfiguration.getHttpMethod();
if (httpMethod == null) {
errorResult.setBody(AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR.getMessage("HTTPMethod must be set."));
errorResult.setRequest(actionExecutionRequest);
return Mono.just(errorResult);
}
final RequestCaptureFilter requestCaptureFilter = new RequestCaptureFilter(objectMapper);
Object requestBodyObj = dataUtils.getRequestBodyObject(actionConfiguration, reqContentType,
encodeParamsToggle,
httpMethod);
WebClient client = triggerUtils.getWebClient(webClientBuilder, apiConnection, reqContentType, objectMapper,
EXCHANGE_STRATEGIES, requestCaptureFilter);
/* Triggering the actual REST API call */
return triggerUtils.triggerApiCall(client, httpMethod, uri, requestBodyObj, actionExecutionRequest,
objectMapper, hintMessages, errorResult, requestCaptureFilter);
}
|
Vulnerability Classification:
- CWE: CWE-918
- CVE: CVE-2022-4096
- Severity: MEDIUM
- CVSS Score: 6.5
Description: fix: Better support for disallowed hosts (#16842)
Function: executeCommon
File: app/server/appsmith-plugins/restApiPlugin/src/main/java/com/external/plugins/RestApiPlugin.java
Repository: appsmithorg/appsmith
Fixed Code:
public Mono<ActionExecutionResult> executeCommon(APIConnection apiConnection,
DatasourceConfiguration datasourceConfiguration,
ActionConfiguration actionConfiguration,
List<Map.Entry<String, String>> insertedParams) {
// Initializing object for error condition
ActionExecutionResult errorResult = new ActionExecutionResult();
initUtils.initializeResponseWithError(errorResult);
// Set of hint messages that can be returned to the user.
Set<String> hintMessages = new HashSet<>();
// Initializing request URL
String url = initUtils.initializeRequestUrl(actionConfiguration, datasourceConfiguration);
Boolean encodeParamsToggle = headerUtils.isEncodeParamsToggleEnabled(actionConfiguration);
URI uri;
try {
uri = uriUtils.createUriWithQueryParams(actionConfiguration, datasourceConfiguration, url,
encodeParamsToggle);
} catch (URISyntaxException e) {
ActionExecutionRequest actionExecutionRequest =
RequestCaptureFilter.populateRequestFields(actionConfiguration, null, insertedParams, objectMapper);
actionExecutionRequest.setUrl(url);
errorResult.setBody(AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR.getMessage(e));
errorResult.setRequest(actionExecutionRequest);
return Mono.just(errorResult);
}
ActionExecutionRequest actionExecutionRequest =
RequestCaptureFilter.populateRequestFields(actionConfiguration, uri, insertedParams, objectMapper);
WebClient.Builder webClientBuilder = triggerUtils.getWebClientBuilder(actionConfiguration,
datasourceConfiguration);
String reqContentType = headerUtils.getRequestContentType(actionConfiguration, datasourceConfiguration);
/* Check for content type */
final String contentTypeError = headerUtils.verifyContentType(actionConfiguration.getHeaders());
if (contentTypeError != null) {
errorResult.setBody(AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR.getMessage("Invalid value for Content-Type."));
errorResult.setRequest(actionExecutionRequest);
return Mono.just(errorResult);
}
HttpMethod httpMethod = actionConfiguration.getHttpMethod();
if (httpMethod == null) {
errorResult.setBody(AppsmithPluginError.PLUGIN_EXECUTE_ARGUMENT_ERROR.getMessage("HTTPMethod must be set."));
errorResult.setRequest(actionExecutionRequest);
return Mono.just(errorResult);
}
final RequestCaptureFilter requestCaptureFilter = new RequestCaptureFilter(objectMapper);
Object requestBodyObj = dataUtils.getRequestBodyObject(actionConfiguration, reqContentType,
encodeParamsToggle,
httpMethod);
WebClient client = triggerUtils.getWebClient(webClientBuilder, apiConnection, reqContentType, objectMapper,
EXCHANGE_STRATEGIES, requestCaptureFilter);
/* Triggering the actual REST API call */
return triggerUtils.triggerApiCall(client, httpMethod, uri, requestBodyObj, actionExecutionRequest,
objectMapper, hintMessages, errorResult, requestCaptureFilter);
}
|
[
"CWE-918"
] |
CVE-2022-4096
|
MEDIUM
| 6.5
|
appsmithorg/appsmith
|
executeCommon
|
app/server/appsmith-plugins/restApiPlugin/src/main/java/com/external/plugins/RestApiPlugin.java
|
769719ccfe667f059fe0b107a19ec9feb90f2e40
| 1
|
Analyze the following code function for security vulnerabilities
|
private int compareSignaturesCompat(PackageSignatures existingSigs,
PackageParser.Package scannedPkg) {
if (!isCompatSignatureUpdateNeeded(scannedPkg)) {
return PackageManager.SIGNATURE_NO_MATCH;
}
ArraySet<Signature> existingSet = new ArraySet<Signature>();
for (Signature sig : existingSigs.mSignatures) {
existingSet.add(sig);
}
ArraySet<Signature> scannedCompatSet = new ArraySet<Signature>();
for (Signature sig : scannedPkg.mSignatures) {
try {
Signature[] chainSignatures = sig.getChainSignatures();
for (Signature chainSig : chainSignatures) {
scannedCompatSet.add(chainSig);
}
} catch (CertificateEncodingException e) {
scannedCompatSet.add(sig);
}
}
/*
* Make sure the expanded scanned set contains all signatures in the
* existing one.
*/
if (scannedCompatSet.equals(existingSet)) {
// Migrate the old signatures to the new scheme.
existingSigs.assignSignatures(scannedPkg.mSignatures);
// The new KeySets will be re-added later in the scanning process.
synchronized (mPackages) {
mSettings.mKeySetManagerService.removeAppKeySetDataLPw(scannedPkg.packageName);
}
return PackageManager.SIGNATURE_MATCH;
}
return PackageManager.SIGNATURE_NO_MATCH;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: compareSignaturesCompat
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
|
compareSignaturesCompat
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
public void sendConfirmationMail(String xwikiname, String password, String email, String contentfield)
throws XWikiException
{
if (hasProgrammingRights()) {
this.xwiki.sendConfirmationEmail(xwikiname, password, email, "", contentfield, getXWikiContext());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendConfirmationMail
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2023-37911
|
MEDIUM
| 6.5
|
xwiki/xwiki-platform
|
sendConfirmationMail
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
|
f471f2a392aeeb9e51d59fdfe1d76fccf532523f
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setUrl(URI url) {
this.url = url;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUrl
File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/OpsGenieNotifier.java
Repository: codecentric/spring-boot-admin
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2022-46166
|
CRITICAL
| 9.8
|
codecentric/spring-boot-admin
|
setUrl
|
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/OpsGenieNotifier.java
|
c14c3ec12533f71f84de9ce3ce5ceb7991975f75
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onUnlockMethodStateChanged() {
mLockIcon.update();
updateCameraVisibility();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onUnlockMethodStateChanged
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
|
onUnlockMethodStateChanged
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardBottomAreaView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void registerListeners() {
if (this instanceof XmppConnectionService.OnConversationUpdate) {
this.xmppConnectionService.setOnConversationListChangedListener((XmppConnectionService.OnConversationUpdate) this);
}
if (this instanceof XmppConnectionService.OnAccountUpdate) {
this.xmppConnectionService.setOnAccountListChangedListener((XmppConnectionService.OnAccountUpdate) this);
}
if (this instanceof XmppConnectionService.OnCaptchaRequested) {
this.xmppConnectionService.setOnCaptchaRequestedListener((XmppConnectionService.OnCaptchaRequested) this);
}
if (this instanceof XmppConnectionService.OnRosterUpdate) {
this.xmppConnectionService.setOnRosterUpdateListener((XmppConnectionService.OnRosterUpdate) this);
}
if (this instanceof XmppConnectionService.OnMucRosterUpdate) {
this.xmppConnectionService.setOnMucRosterUpdateListener((XmppConnectionService.OnMucRosterUpdate) this);
}
if (this instanceof OnUpdateBlocklist) {
this.xmppConnectionService.setOnUpdateBlocklistListener((OnUpdateBlocklist) this);
}
if (this instanceof XmppConnectionService.OnShowErrorToast) {
this.xmppConnectionService.setOnShowErrorToastListener((XmppConnectionService.OnShowErrorToast) this);
}
if (this instanceof OnKeyStatusUpdated) {
this.xmppConnectionService.setOnKeyStatusUpdatedListener((OnKeyStatusUpdated) this);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: registerListeners
File: src/main/java/eu/siacs/conversations/ui/XmppActivity.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
registerListeners
|
src/main/java/eu/siacs/conversations/ui/XmppActivity.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean postsNeedApproval() {
return CONF.postsNeedApproval();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: postsNeedApproval
File: src/main/java/com/erudika/scoold/utils/ScooldUtils.java
Repository: Erudika/scoold
The code follows secure coding practices.
|
[
"CWE-130"
] |
CVE-2022-1543
|
MEDIUM
| 6.5
|
Erudika/scoold
|
postsNeedApproval
|
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
private long toTimeMillis(K name, V value) {
try {
return valueConverter.convertToTimeMillis(value);
} catch (IllegalArgumentException e) {
throw new IllegalArgumentException(
"Failed to convert header value to millsecond for header '" + name + '\'');
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toTimeMillis
File: codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-436",
"CWE-113"
] |
CVE-2022-41915
|
MEDIUM
| 6.5
|
netty
|
toTimeMillis
|
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
|
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
| 0
|
Analyze the following code function for security vulnerabilities
|
Builder setResultWho(String resultWho) {
mResultWho = resultWho;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setResultWho
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
|
setResultWho
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int checkAddPermission(WindowManager.LayoutParams attrs, int[] outAppOp) {
int type = attrs.type;
outAppOp[0] = AppOpsManager.OP_NONE;
if (!((type >= FIRST_APPLICATION_WINDOW && type <= LAST_APPLICATION_WINDOW)
|| (type >= FIRST_SUB_WINDOW && type <= LAST_SUB_WINDOW)
|| (type >= FIRST_SYSTEM_WINDOW && type <= LAST_SYSTEM_WINDOW))) {
return WindowManagerGlobal.ADD_INVALID_TYPE;
}
if (type < FIRST_SYSTEM_WINDOW || type > LAST_SYSTEM_WINDOW) {
// Window manager will make sure these are okay.
return WindowManagerGlobal.ADD_OKAY;
}
String permission = null;
switch (type) {
case TYPE_TOAST:
// XXX right now the app process has complete control over
// this... should introduce a token to let the system
// monitor/control what they are doing.
outAppOp[0] = AppOpsManager.OP_TOAST_WINDOW;
break;
case TYPE_DREAM:
case TYPE_INPUT_METHOD:
case TYPE_WALLPAPER:
case TYPE_PRIVATE_PRESENTATION:
case TYPE_VOICE_INTERACTION:
case TYPE_ACCESSIBILITY_OVERLAY:
// The window manager will check these.
break;
case TYPE_PHONE:
case TYPE_PRIORITY_PHONE:
case TYPE_SYSTEM_ALERT:
case TYPE_SYSTEM_ERROR:
case TYPE_SYSTEM_OVERLAY:
permission = android.Manifest.permission.SYSTEM_ALERT_WINDOW;
outAppOp[0] = AppOpsManager.OP_SYSTEM_ALERT_WINDOW;
break;
default:
permission = android.Manifest.permission.INTERNAL_SYSTEM_WINDOW;
}
if (permission != null) {
if (mContext.checkCallingOrSelfPermission(permission)
!= PackageManager.PERMISSION_GRANTED) {
return WindowManagerGlobal.ADD_PERMISSION_DENIED;
}
}
return WindowManagerGlobal.ADD_OKAY;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkAddPermission
File: policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-0812
|
MEDIUM
| 6.6
|
android
|
checkAddPermission
|
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
|
84669ca8de55d38073a0dcb01074233b0a417541
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setMessage(String message) {
this.message = parser.parseExpression(message, ParserContext.TEMPLATE_EXPRESSION);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setMessage
File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/DiscordNotifier.java
Repository: codecentric/spring-boot-admin
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2022-46166
|
CRITICAL
| 9.8
|
codecentric/spring-boot-admin
|
setMessage
|
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/DiscordNotifier.java
|
c14c3ec12533f71f84de9ce3ce5ceb7991975f75
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
void checkAppWindowsReadyToShow() {
if (allDrawn == mLastAllDrawn) {
return;
}
mLastAllDrawn = allDrawn;
if (!allDrawn) {
return;
}
// The token has now changed state to having all windows shown... what to do, what to do?
if (mFreezingScreen) {
showAllWindowsLocked();
stopFreezingScreen(false, true);
ProtoLog.i(WM_DEBUG_ORIENTATION,
"Setting mOrientationChangeComplete=true because wtoken %s "
+ "numInteresting=%d numDrawn=%d",
this, mNumInterestingWindows, mNumDrawnWindows);
// This will set mOrientationChangeComplete and cause a pass through layout.
setAppLayoutChanges(FINISH_LAYOUT_REDO_WALLPAPER,
"checkAppWindowsReadyToShow: freezingScreen");
} else {
setAppLayoutChanges(FINISH_LAYOUT_REDO_ANIM, "checkAppWindowsReadyToShow");
// We can now show all of the drawn windows!
if (!getDisplayContent().mOpeningApps.contains(this) && canShowWindows()) {
showAllWindowsLocked();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkAppWindowsReadyToShow
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
|
checkAppWindowsReadyToShow
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
private UserOverviewDTO getAdminUserDTO(AllUserSessions sessions) {
final Optional<User> optionalAdmin = userManagementService.getRootUser();
if (!optionalAdmin.isPresent()) {
return null;
}
final User admin = optionalAdmin.get();
final Set<String> adminRoles = userManagementService.getRoleNames(admin);
final Optional<MongoDbSession> lastSession = sessions.forUser(admin);
return UserOverviewDTO.builder()
.username(admin.getName())
.fullName(admin.getFullName())
.email(admin.getEmail())
.externalUser(admin.isExternalUser())
.readOnly(admin.isReadOnly())
.id(admin.getId())
.fillSession(lastSession)
.roles(adminRoles)
.build();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAdminUserDTO
File: graylog2-server/src/main/java/org/graylog2/rest/resources/users/UsersResource.java
Repository: Graylog2/graylog2-server
The code follows secure coding practices.
|
[
"CWE-613"
] |
CVE-2023-41041
|
LOW
| 3.1
|
Graylog2/graylog2-server
|
getAdminUserDTO
|
graylog2-server/src/main/java/org/graylog2/rest/resources/users/UsersResource.java
|
bb88f3d0b2b0351669ab32c60b595ab7242a3fe3
| 0
|
Analyze the following code function for security vulnerabilities
|
public void saveLockPattern(List<LockPatternView.Cell> pattern, String savedPattern, int userId) {
try {
if (pattern == null || pattern.size() < MIN_LOCK_PATTERN_SIZE) {
throw new IllegalArgumentException("pattern must not be null and at least "
+ MIN_LOCK_PATTERN_SIZE + " dots long.");
}
getLockSettings().setLockPattern(patternToString(pattern), savedPattern, userId);
DevicePolicyManager dpm = getDevicePolicyManager();
// Update the device encryption password.
if (userId == UserHandle.USER_SYSTEM
&& LockPatternUtils.isDeviceEncryptionEnabled()) {
if (!shouldEncryptWithCredentials(true)) {
clearEncryptionPassword();
} else {
String stringPattern = patternToString(pattern);
updateEncryptionPassword(StorageManager.CRYPT_TYPE_PATTERN, stringPattern);
}
}
setBoolean(PATTERN_EVER_CHOSEN_KEY, true, userId);
setLong(PASSWORD_TYPE_KEY, DevicePolicyManager.PASSWORD_QUALITY_SOMETHING, userId);
dpm.setActivePasswordState(DevicePolicyManager.PASSWORD_QUALITY_SOMETHING,
pattern.size(), 0, 0, 0, 0, 0, 0, userId);
onAfterChangingPassword(userId);
} catch (RemoteException re) {
Log.e(TAG, "Couldn't save lock pattern " + re);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: saveLockPattern
File: core/java/com/android/internal/widget/LockPatternUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3908
|
MEDIUM
| 4.3
|
android
|
saveLockPattern
|
core/java/com/android/internal/widget/LockPatternUtils.java
|
96daf7d4893f614714761af2d53dfb93214a32e4
| 0
|
Analyze the following code function for security vulnerabilities
|
protected int engineDoFinal(
byte[] input,
int inputOffset,
int inputLen,
byte[] output,
int outputOffset)
throws IllegalBlockSizeException, BadPaddingException
{
if (input != null)
{
bOut.write(input, inputOffset, inputLen);
}
if (cipher instanceof RSABlindedEngine)
{
if (bOut.size() > cipher.getInputBlockSize() + 1)
{
throw new ArrayIndexOutOfBoundsException("too much data for RSA block");
}
}
else
{
if (bOut.size() > cipher.getInputBlockSize())
{
throw new ArrayIndexOutOfBoundsException("too much data for RSA block");
}
}
byte[] out = getOutput();
for (int i = 0; i != out.length; i++)
{
output[outputOffset + i] = out[i];
}
return out.length;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: engineDoFinal
File: prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/rsa/CipherSpi.java
Repository: bcgit/bc-java
The code follows secure coding practices.
|
[
"CWE-361"
] |
CVE-2016-1000345
|
MEDIUM
| 4.3
|
bcgit/bc-java
|
engineDoFinal
|
prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/rsa/CipherSpi.java
|
21dcb3d9744c83dcf2ff8fcee06dbca7bfa4ef35
| 0
|
Analyze the following code function for security vulnerabilities
|
private static String relativeToAbsoluteURI(KeycloakSession session, String rootUrl, String relative) {
if (rootUrl != null) {
rootUrl = ResolveRelative.resolveRootUrl(session, rootUrl);
}
if (rootUrl == null || rootUrl.isEmpty()) {
rootUrl = UriUtils.getOrigin(session.getContext().getUri().getBaseUri());
}
StringBuilder sb = new StringBuilder();
sb.append(rootUrl);
sb.append(relative);
return sb.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: relativeToAbsoluteURI
File: services/src/main/java/org/keycloak/protocol/oidc/utils/RedirectUtils.java
Repository: keycloak
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-4361
|
MEDIUM
| 6.1
|
keycloak
|
relativeToAbsoluteURI
|
services/src/main/java/org/keycloak/protocol/oidc/utils/RedirectUtils.java
|
a1cfe6e24e5b34792699a00b8b4a8016a5929e3a
| 0
|
Analyze the following code function for security vulnerabilities
|
protected JsonDeserializer<?> findConvertingContentDeserializer(DeserializationContext ctxt,
BeanProperty prop, JsonDeserializer<?> existingDeserializer)
throws JsonMappingException
{
final AnnotationIntrospector intr = ctxt.getAnnotationIntrospector();
if (_neitherNull(intr, prop)) {
AnnotatedMember member = prop.getMember();
if (member != null) {
Object convDef = intr.findDeserializationContentConverter(member);
if (convDef != null) {
Converter<Object,Object> conv = ctxt.converterInstance(prop.getMember(), convDef);
JavaType delegateType = conv.getInputType(ctxt.getTypeFactory());
if (existingDeserializer == null) {
existingDeserializer = ctxt.findContextualValueDeserializer(delegateType, prop);
}
return new StdDelegatingDeserializer<Object>(conv, delegateType, existingDeserializer);
}
}
}
return existingDeserializer;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findConvertingContentDeserializer
File: src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2022-42003
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
findConvertingContentDeserializer
|
src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java
|
d78d00ee7b5245b93103fef3187f70543d67ca33
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<ResolveInfo> queryIntentForPackage(Intent intent, String resolvedType,
int flags, ArrayList<PackageParser.Activity> packageActivities, int userId) {
if (!sUserManager.exists(userId)) return null;
if (packageActivities == null) {
return null;
}
mFlags = flags;
final boolean defaultOnly = (flags&PackageManager.MATCH_DEFAULT_ONLY) != 0;
final int N = packageActivities.size();
ArrayList<PackageParser.ActivityIntentInfo[]> listCut =
new ArrayList<PackageParser.ActivityIntentInfo[]>(N);
ArrayList<PackageParser.ActivityIntentInfo> intentFilters;
for (int i = 0; i < N; ++i) {
intentFilters = packageActivities.get(i).intents;
if (intentFilters != null && intentFilters.size() > 0) {
PackageParser.ActivityIntentInfo[] array =
new PackageParser.ActivityIntentInfo[intentFilters.size()];
intentFilters.toArray(array);
listCut.add(array);
}
}
return super.queryIntentFromList(intent, resolvedType, defaultOnly, listCut, userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: queryIntentForPackage
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
|
queryIntentForPackage
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean finishIfSameAffinity(ActivityRecord r) {
// End search once we get to the activity that doesn't have the same affinity.
if (!Objects.equals(r.taskAffinity, taskAffinity)) return true;
r.finishIfPossible("request-affinity", true /* oomAdj */);
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: finishIfSameAffinity
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
|
finishIfSameAffinity
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getScmCheckoutRetryCount() {
return scmCheckoutRetryCount;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getScmCheckoutRetryCount
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
|
getScmCheckoutRetryCount
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
private void reportStartInstrumentationFailure(IInstrumentationWatcher watcher,
ComponentName cn, String report) {
Slog.w(TAG, report);
try {
if (watcher != null) {
Bundle results = new Bundle();
results.putString(Instrumentation.REPORT_KEY_IDENTIFIER, "ActivityManagerService");
results.putString("Error", report);
watcher.instrumentationStatus(cn, -1, results);
}
} catch (RemoteException e) {
Slog.w(TAG, e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: reportStartInstrumentationFailure
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
|
reportStartInstrumentationFailure
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
9878bb99b77c3681f0fda116e2964bac26f349c3
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean beginFullBackup(FullBackupJob scheduledJob) {
long now = System.currentTimeMillis();
FullBackupEntry entry = null;
long latency = MIN_FULL_BACKUP_INTERVAL;
if (!mEnabled || !mProvisioned) {
// Backups are globally disabled, so don't proceed. We also don't reschedule
// the job driving automatic backups; that job will be scheduled again when
// the user enables backup.
if (MORE_DEBUG) {
Slog.i(TAG, "beginFullBackup but e=" + mEnabled
+ " p=" + mProvisioned + "; ignoring");
}
return false;
}
// Don't run the backup if we're in battery saver mode, but reschedule
// to try again in the not-so-distant future.
if (mPowerManager.isPowerSaveMode()) {
if (DEBUG) Slog.i(TAG, "Deferring scheduled full backups in battery saver mode");
FullBackupJob.schedule(mContext, KeyValueBackupJob.BATCH_INTERVAL);
return false;
}
if (DEBUG_SCHEDULING) {
Slog.i(TAG, "Beginning scheduled full backup operation");
}
// Great; we're able to run full backup jobs now. See if we have any work to do.
synchronized (mQueueLock) {
if (mRunningFullBackupTask != null) {
Slog.e(TAG, "Backup triggered but one already/still running!");
return false;
}
if (mFullBackupQueue.size() == 0) {
// no work to do so just bow out
if (DEBUG) {
Slog.i(TAG, "Backup queue empty; doing nothing");
}
return false;
}
// At this point we know that we have work to do, just not right now. Any
// exit without actually running backups will also require that we
// reschedule the job.
boolean runBackup = true;
if (!fullBackupAllowable(getTransport(mCurrentTransport))) {
if (MORE_DEBUG) {
Slog.i(TAG, "Preconditions not met; not running full backup");
}
runBackup = false;
// Typically this means we haven't run a key/value backup yet. Back off
// full-backup operations by the key/value job's run interval so that
// next time we run, we are likely to be able to make progress.
latency = KeyValueBackupJob.BATCH_INTERVAL;
}
if (runBackup) {
entry = mFullBackupQueue.get(0);
long timeSinceRun = now - entry.lastBackup;
runBackup = (timeSinceRun >= MIN_FULL_BACKUP_INTERVAL);
if (!runBackup) {
// It's too early to back up the next thing in the queue, so bow out
if (MORE_DEBUG) {
Slog.i(TAG, "Device ready but too early to back up next app");
}
// Wait until the next app in the queue falls due for a full data backup
latency = MIN_FULL_BACKUP_INTERVAL - timeSinceRun;
}
}
if (!runBackup) {
if (DEBUG_SCHEDULING) {
Slog.i(TAG, "Nothing pending full backup; rescheduling +" + latency);
}
final long deferTime = latency; // pin for the closure
mBackupHandler.post(new Runnable() {
@Override public void run() {
FullBackupJob.schedule(mContext, deferTime);
}
});
return false;
}
// Okay, the top thing is runnable now. Pop it off and get going.
mFullBackupQueue.remove(0);
CountDownLatch latch = new CountDownLatch(1);
String[] pkg = new String[] {entry.packageName};
mRunningFullBackupTask = new PerformFullTransportBackupTask(null, pkg, true,
scheduledJob, latch);
(new Thread(mRunningFullBackupTask)).start();
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: beginFullBackup
File: services/backup/java/com/android/server/backup/BackupManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3759
|
MEDIUM
| 5
|
android
|
beginFullBackup
|
services/backup/java/com/android/server/backup/BackupManagerService.java
|
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void onViewAttached() {
mUpdateMonitor.registerCallback(mKeyguardUpdateMonitorCallback);
mView.setSwipeListener(mSwipeListener);
mView.addMotionEventListener(mGlobalTouchListener);
mConfigurationController.addCallback(mConfigurationListener);
mUserSwitcherController.addUserSwitchCallback(mUserSwitchCallback);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onViewAttached
File: packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21245
|
HIGH
| 7.8
|
android
|
onViewAttached
|
packages/SystemUI/src/com/android/keyguard/KeyguardSecurityContainerController.java
|
a33159e8cb297b9eee6fa5c63c0e343d05fad622
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void resolveGroupBy(@NonNull Bundle queryArgs,
@NonNull Consumer<String> honored) {
final String[] columns = queryArgs.getStringArray(QUERY_ARG_GROUP_COLUMNS);
if (columns != null && columns.length != 0) {
String groupBy = TextUtils.join(", ", columns);
honored.accept(QUERY_ARG_GROUP_COLUMNS);
queryArgs.putString(QUERY_ARG_SQL_GROUP_BY, groupBy);
} else {
honored.accept(QUERY_ARG_SQL_GROUP_BY);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resolveGroupBy
File: src/com/android/providers/media/util/DatabaseUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2023-35683
|
MEDIUM
| 5.5
|
android
|
resolveGroupBy
|
src/com/android/providers/media/util/DatabaseUtils.java
|
23d156ed1bed6d2c2b325f0be540d0afca510c49
| 0
|
Analyze the following code function for security vulnerabilities
|
public @Nullable Reader getNCharacterStream(@Positive int columnIndex) throws SQLException {
connection.getLogger().log(Level.FINEST, " getNCharacterStream columnIndex: {0}", columnIndex);
throw org.postgresql.Driver.notImplemented(this.getClass(), "getNCharacterStream(int)");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNCharacterStream
File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
Repository: pgjdbc
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-31197
|
HIGH
| 8
|
pgjdbc
|
getNCharacterStream
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void traceLdapEnv(Properties env)
{
if (trace)
{
Properties tmp = new Properties();
tmp.putAll(env);
String credentials = tmp.getProperty(Context.SECURITY_CREDENTIALS);
String bindCredential = tmp.getProperty(BIND_CREDENTIAL);
if (credentials != null && credentials.length() > 0)
tmp.setProperty(Context.SECURITY_CREDENTIALS, "***");
if (bindCredential != null && bindCredential.length() > 0)
tmp.setProperty(BIND_CREDENTIAL, "***");
log.trace("Logging into LDAP server, env=" + tmp.toString());
}
}
|
Vulnerability Classification:
- CWE: CWE-200
- CVE: CVE-2015-1849
- Severity: MEDIUM
- CVSS Score: 4.3
Description: SECURITY-877
Function: traceLdapEnv
File: jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/AdvancedLdapLoginModule.java
Repository: wildfly-security/jboss-negotiation
Fixed Code:
protected void traceLdapEnv(Properties env)
{
if (trace)
{
Properties tmp = new Properties();
tmp.putAll(env);
String credentials = tmp.getProperty(Context.SECURITY_CREDENTIALS);
String bindCredential = tmp.getProperty(BIND_CREDENTIAL);
if (credentials != null && credentials.length() > 0) {
tmp.setProperty(Context.SECURITY_CREDENTIALS, "***");
}
if (bindCredential != null && bindCredential.length() > 0) {
tmp.setProperty(BIND_CREDENTIAL, "***");
}
log.trace("Logging into LDAP server, env=" + tmp.toString());
}
}
|
[
"CWE-200"
] |
CVE-2015-1849
|
MEDIUM
| 4.3
|
wildfly-security/jboss-negotiation
|
traceLdapEnv
|
jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/AdvancedLdapLoginModule.java
|
0dc9d191b6eb1d13b8f0189c5b02ba6576f4722e
| 1
|
Analyze the following code function for security vulnerabilities
|
private void notifyUploadStart(UploadFileOperation upload) {
// / create status notification with a progress bar
mLastPercent = 0;
mNotificationBuilder = NotificationUtils.newNotificationBuilder(this, themeColorUtils);
mNotificationBuilder
.setOngoing(true)
.setSmallIcon(R.drawable.notification_icon)
.setTicker(getString(R.string.uploader_upload_in_progress_ticker))
.setContentTitle(getString(R.string.uploader_upload_in_progress_ticker))
.setProgress(100, 0, false)
.setContentText(
String.format(getString(R.string.uploader_upload_in_progress_content), 0, upload.getFileName())
);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
mNotificationBuilder.setChannelId(NotificationUtils.NOTIFICATION_CHANNEL_UPLOAD);
}
/// includes a pending intent in the notification showing the details
Intent intent = UploadListActivity.createIntent(upload.getFile(),
upload.getUser(),
Intent.FLAG_ACTIVITY_CLEAR_TOP,
this);
mNotificationBuilder.setContentIntent(PendingIntent.getActivity(this,
(int) System.currentTimeMillis(),
intent,
PendingIntent.FLAG_IMMUTABLE)
);
if (!upload.isInstantPicture() && !upload.isInstantVideo()) {
if (mNotificationManager == null) {
mNotificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
}
mNotificationManager.notify(FOREGROUND_SERVICE_ID, mNotificationBuilder.build());
} // else wait until the upload really start (onTransferProgress is called), so that if it's discarded
// due to lack of Wifi, no notification is shown
// TODO generalize for automated uploads
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: notifyUploadStart
File: app/src/main/java/com/owncloud/android/files/services/FileUploader.java
Repository: nextcloud/android
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-39210
|
MEDIUM
| 5.5
|
nextcloud/android
|
notifyUploadStart
|
app/src/main/java/com/owncloud/android/files/services/FileUploader.java
|
cd3bd0845a97e1d43daa0607a122b66b0068c751
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<ActivityManager.RunningAppProcessInfo> getRunningAppProcesses()
throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRunningAppProcesses
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
getRunningAppProcesses
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
public KeyPair generateKeyPair()
{
if (!initialised)
{
DSAParametersGenerator pGen = new DSAParametersGenerator();
pGen.init(strength, certainty, random);
param = new DSAKeyGenerationParameters(random, pGen.generateParameters());
engine.init(param);
initialised = true;
}
AsymmetricCipherKeyPair pair = engine.generateKeyPair();
DSAPublicKeyParameters pub = (DSAPublicKeyParameters)pair.getPublic();
DSAPrivateKeyParameters priv = (DSAPrivateKeyParameters)pair.getPrivate();
return new KeyPair(new BCDSAPublicKey(pub), new BCDSAPrivateKey(priv));
}
|
Vulnerability Classification:
- CWE: CWE-310
- CVE: CVE-2016-1000343
- Severity: MEDIUM
- CVSS Score: 5.0
Description: updated default DSA parameters to follow 186-4
Function: generateKeyPair
File: prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dsa/KeyPairGeneratorSpi.java
Repository: bcgit/bc-java
Fixed Code:
public KeyPair generateKeyPair()
{
if (!initialised)
{
Integer paramStrength = Integers.valueOf(strength);
if (params.containsKey(paramStrength))
{
param = (DSAKeyGenerationParameters)params.get(paramStrength);
}
else
{
synchronized (lock)
{
// we do the check again in case we were blocked by a generator for
// our key size.
if (params.containsKey(paramStrength))
{
param = (DSAKeyGenerationParameters)params.get(paramStrength);
}
else
{
DSAParametersGenerator pGen;
DSAParameterGenerationParameters dsaParams;
// Typical combination of keysize and size of q.
// keysize = 1024, q's size = 160
// keysize = 2048, q's size = 224
// keysize = 2048, q's size = 256
// keysize = 3072, q's size = 256
// For simplicity if keysize is greater than 1024 then we choose q's size to be 256.
// For legacy keysize that is less than 1024-bit, we just use the 186-2 style parameters
if (strength == 1024)
{
pGen = new DSAParametersGenerator();
if (Properties.isOverrideSet("org.bouncycastle.dsa.FIPS186-2for1024bits"))
{
pGen.init(strength, certainty, random);
}
else
{
dsaParams = new DSAParameterGenerationParameters(1024, 160, certainty, random);
pGen.init(dsaParams);
}
}
else if (strength > 1024)
{
dsaParams = new DSAParameterGenerationParameters(strength, 256, certainty, random);
pGen = new DSAParametersGenerator(new SHA256Digest());
pGen.init(dsaParams);
}
else
{
pGen = new DSAParametersGenerator();
pGen.init(strength, certainty, random);
}
param = new DSAKeyGenerationParameters(random, pGen.generateParameters());
params.put(paramStrength, param);
}
}
}
engine.init(param);
initialised = true;
}
AsymmetricCipherKeyPair pair = engine.generateKeyPair();
DSAPublicKeyParameters pub = (DSAPublicKeyParameters)pair.getPublic();
DSAPrivateKeyParameters priv = (DSAPrivateKeyParameters)pair.getPrivate();
return new KeyPair(new BCDSAPublicKey(pub), new BCDSAPrivateKey(priv));
}
|
[
"CWE-310"
] |
CVE-2016-1000343
|
MEDIUM
| 5
|
bcgit/bc-java
|
generateKeyPair
|
prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dsa/KeyPairGeneratorSpi.java
|
50a53068c094d6cff37659da33c9b4505becd389
| 1
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public boolean removeObjects(String className)
{
return removeXObjects(resolveClassReference(className));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeObjects
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-26470
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
removeObjects
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isAjaxRequest(Request request) {
String requestedWithHeader = request.getHeader(GeneralConstants.HTTP_HEADER_X_REQUESTED_WITH);
return requestedWithHeader != null && "XMLHttpRequest".equalsIgnoreCase(requestedWithHeader);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isAjaxRequest
File: picketlink-tomcat-common/src/main/java/org/picketlink/identity/federation/bindings/tomcat/idp/AbstractIDPValve.java
Repository: picketlink/picketlink-bindings
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2015-3158
|
MEDIUM
| 4
|
picketlink/picketlink-bindings
|
isAjaxRequest
|
picketlink-tomcat-common/src/main/java/org/picketlink/identity/federation/bindings/tomcat/idp/AbstractIDPValve.java
|
341a37aefd69e67b6b5f6d775499730d6ccaff0d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setExpansion(float headerExpansionFraction) {
mExpansionAmount = headerExpansionFraction;
mSecondHalfAnimator.setPosition(headerExpansionFraction);
if (mShowFullAlarm) {
mFirstHalfAnimator.setPosition(headerExpansionFraction);
}
mDateSizeAnimator.setPosition(headerExpansionFraction);
mAlarmTranslation.setPosition(headerExpansionFraction);
mSettingsAlpha.setPosition(headerExpansionFraction);
updateAlarmVisibilities();
mExpandIndicator.setExpanded(headerExpansionFraction > EXPAND_INDICATOR_THRESHOLD);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setExpansion
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStatusBarHeader.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3886
|
HIGH
| 7.2
|
android
|
setExpansion
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStatusBarHeader.java
|
6ca6cd5a50311d58a1b7bf8fbef3f9aa29eadcd5
| 0
|
Analyze the following code function for security vulnerabilities
|
protected abstract HttpMessage createMessage(String[] initialLine) throws Exception;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createMessage
File: codec-http/src/main/java/io/netty/handler/codec/http/HttpObjectDecoder.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-444"
] |
CVE-2019-16869
|
MEDIUM
| 5
|
netty
|
createMessage
|
codec-http/src/main/java/io/netty/handler/codec/http/HttpObjectDecoder.java
|
39cafcb05c99f2aa9fce7e6597664c9ed6a63a95
| 0
|
Analyze the following code function for security vulnerabilities
|
public void issueExport(IssueExportRequest request, HttpServletResponse response) {
EasyExcelExporter.resetCellMaxTextLength();
Map<String, String> userMap = baseUserService.getProjectMemberOption(request.getProjectId()).stream().collect(Collectors.toMap(User::getId, User::getName));
// 获取缺陷模板及自定义字段
IssueTemplateDao issueTemplate = getIssueTemplateByProjectId(request.getProjectId());
List<CustomFieldDao> customFields = Optional.ofNullable(issueTemplate.getCustomFields()).orElse(new ArrayList<>());
// 根据自定义字段获取表头内容
List<List<String>> heads = new IssueExcelDataFactory().getIssueExcelDataLocal().getHead(issueTemplate.getIsThirdTemplate(), customFields, request);
// 获取导出缺陷列表
List<IssuesDao> exportIssues = getExportIssues(request, issueTemplate.getIsThirdTemplate(), customFields);
// 解析issue对象数据->excel对象数据
List<IssueExcelData> excelDataList = parseIssueDataToExcelData(exportIssues);
// 解析excel对象数据->excel列表数据
List<List<Object>> data = parseExcelDataToList(heads, excelDataList);
// 导出EXCEL
IssueTemplateHeadWriteHandler headHandler = new IssueTemplateHeadWriteHandler(userMap, heads, issueTemplate.getCustomFields());
// heads-> 表头内容, data -> 导出EXCEL列表数据, headHandler -> 表头处理
new EasyExcelExporter(new IssueExcelDataFactory().getExcelDataByLocal())
.exportByCustomWriteHandler(response, heads, data, Translator.get("issue_list_export_excel"),
Translator.get("issue_list_export_excel_sheet"), headHandler);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: issueExport
File: test-track/backend/src/main/java/io/metersphere/service/IssuesService.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2022-23544
|
MEDIUM
| 6.1
|
metersphere
|
issueExport
|
test-track/backend/src/main/java/io/metersphere/service/IssuesService.java
|
d0f95b50737c941b29d507a4cc3545f2dc6ab121
| 0
|
Analyze the following code function for security vulnerabilities
|
private void updateAfterSizeChanged() {
mPopupZoomer.hide(false);
// Execute a delayed form focus operation because the OSK was brought
// up earlier.
if (!mFocusPreOSKViewportRect.isEmpty()) {
Rect rect = new Rect();
getContainerView().getWindowVisibleDisplayFrame(rect);
if (!rect.equals(mFocusPreOSKViewportRect)) {
// Only assume the OSK triggered the onSizeChanged if width was preserved.
if (rect.width() == mFocusPreOSKViewportRect.width()) {
scrollFocusedEditableNodeIntoView();
}
cancelRequestToScrollFocusedEditableNodeIntoView();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateAfterSizeChanged
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
|
updateAfterSizeChanged
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
private void saveAttachment(XWikiAttachment attachment, boolean deleted, XWikiContext context) throws XWikiException
{
try {
// If the comment is larger than the max size supported by the Storage, then abbreviate it
String comment = attachment.getComment();
if (comment != null && comment.length() > 1023) {
attachment.setComment(StringUtils.abbreviate(comment, 1023));
}
Session session = getSession(context);
Query<Long> query = session
.createQuery("select attach.id from XWikiAttachment as attach where attach.id = :id", Long.class);
query.setParameter("id", attachment.getId());
boolean exist = query.uniqueResult() != null;
boolean saveContent;
if (exist) {
// Don't update the history if the document was actually not supposed to exist
// Don't update the attachment version if document metadata dirty is forced false (any modification to
// the attachment automatically set document metadata dirty to true)
if (!deleted && attachment.isContentDirty() && attachment.getDoc().isMetaDataDirty()) {
attachment.updateContentArchive(context);
}
session.update(attachment);
// Save the attachment content if it's marked as "dirty" (out of sync with the database).
saveContent = attachment.isContentDirty();
} else {
if (attachment.getContentStore() == null) {
// Set content store
attachment.setContentStore(getDefaultAttachmentContentStore(context));
}
if (attachment.getArchiveStore() == null) {
// Set archive store
attachment.setArchiveStore(getDefaultAttachmentArchiveStore(context));
}
session.save(attachment);
// Always save the content since it does not exist
saveContent = true;
}
if (saveContent) {
// updateParent and bTransaction must be false because the content should be saved in the same
// transaction as the attachment and if the parent doc needs to be updated, this function will do it.
XWikiAttachmentStoreInterface store = getXWikiAttachmentStoreInterface(attachment);
store.saveAttachmentContent(attachment, false, context, false);
}
// Mark the attachment content and metadata as not dirty.
// Ideally this would only happen if the transaction is committed successfully but since an unsuccessful
// transaction will most likely be accompanied by an exception, the cache will not have a chance to save
// the copy of the document with erroneous information. If this is not set here, the cache will return
// a copy of the attachment which claims to be dirty although it isn't.
attachment.setMetaDataDirty(false);
if (attachment.isContentDirty()) {
attachment.getAttachment_content().setContentDirty(false);
}
} catch (Exception e) {
Object[] args = {attachment.getReference()};
throw new XWikiException(XWikiException.MODULE_XWIKI_STORE,
XWikiException.ERROR_XWIKI_STORE_HIBERNATE_SAVING_ATTACHMENT, "Exception while saving attachment [{0}]",
e, args);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: saveAttachment
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-459"
] |
CVE-2023-36468
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
saveAttachment
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
|
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isNetworkLoggingEnabled(@Nullable ComponentName admin) {
throwIfParentInstance("isNetworkLoggingEnabled");
return mIsNetworkLoggingEnabledCache.query(admin);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isNetworkLoggingEnabled
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
|
isNetworkLoggingEnabled
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Collection<LBVip> listVips() {
return vips.values();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: listVips
File: src/main/java/net/floodlightcontroller/loadbalancer/LoadBalancer.java
Repository: floodlight
The code follows secure coding practices.
|
[
"CWE-362",
"CWE-476"
] |
CVE-2015-6569
|
MEDIUM
| 4.3
|
floodlight
|
listVips
|
src/main/java/net/floodlightcontroller/loadbalancer/LoadBalancer.java
|
7f5bedb625eec3ff4d29987c31cef2553a962b36
| 0
|
Analyze the following code function for security vulnerabilities
|
public void onAuthenticationFailed() { }
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onAuthenticationFailed
File: core/java/android/hardware/fingerprint/FingerprintManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
onAuthenticationFailed
|
core/java/android/hardware/fingerprint/FingerprintManager.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
public static SslHandler getSslHandler(Channel channel) {
return channel.pipeline().get(SslHandler.class);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSslHandler
File: providers/netty/src/main/java/org/asynchttpclient/providers/netty/channel/Channels.java
Repository: AsyncHttpClient/async-http-client
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2013-7397
|
MEDIUM
| 4.3
|
AsyncHttpClient/async-http-client
|
getSslHandler
|
providers/netty/src/main/java/org/asynchttpclient/providers/netty/channel/Channels.java
|
df6ed70e86c8fc340ed75563e016c8baa94d7e72
| 0
|
Analyze the following code function for security vulnerabilities
|
public BaseClass getEditModeClass(XWikiContext context) throws XWikiException
{
return getMandatoryClass(context, new DocumentReference(
new LocalDocumentReference(XWikiConstant.EDIT_MODE_CLASS), new WikiReference(context.getWikiId())));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getEditModeClass
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-32620
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
getEditModeClass
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void main(String[] args)throws Exception {
Process p = Runtime.getRuntime().exec("ls");
System.out.println(JNAUtil.getProcessID(p));
}
|
Vulnerability Classification:
- CWE: CWE-502
- CVE: CVE-2022-41958
- Severity: HIGH
- CVSS Score: 7.8
Description: yaml rce
Function: main
File: src/main/java/com/chaitin/xray/test/Main.java
Repository: 4ra1n/super-xray
Fixed Code:
public static void main(String[] args)throws Exception {
String context = "!!javax.script.ScriptEngineManager [\n" +
" !!java.net.URLClassLoader [[\n" +
" !!java.net.URL [\"file:./yaml.jar\"]\n" +
" ]]\n" +
"]";
System.out.println(context);
}
|
[
"CWE-502"
] |
CVE-2022-41958
|
HIGH
| 7.8
|
4ra1n/super-xray
|
main
|
src/main/java/com/chaitin/xray/test/Main.java
|
4d0d59663596db03f39d7edd2be251d48b52dcfc
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean onNavigationItemSelected(int position, long itemId) {
int initialComposeMode = mComposeMode;
if (position == ComposeActivity.REPLY) {
mComposeMode = ComposeActivity.REPLY;
} else if (position == ComposeActivity.REPLY_ALL) {
mComposeMode = ComposeActivity.REPLY_ALL;
} else if (position == ComposeActivity.FORWARD) {
mComposeMode = ComposeActivity.FORWARD;
}
clearChangeListeners();
if (initialComposeMode != mComposeMode) {
resetMessageForModeChange();
if (mRefMessage != null) {
setFieldsFromRefMessage(mComposeMode);
}
boolean showCc = false;
boolean showBcc = false;
if (mDraft != null) {
// Following desktop behavior, if the user has added a BCC
// field to a draft, we show it regardless of compose mode.
showBcc = !TextUtils.isEmpty(mDraft.getBcc());
// Use the draft to determine what to populate.
// If the Bcc field is showing, show the Cc field whether it is populated or not.
showCc = showBcc
|| (!TextUtils.isEmpty(mDraft.getCc()) && mComposeMode == REPLY_ALL);
}
if (mRefMessage != null) {
showCc = !TextUtils.isEmpty(mCc.getText());
showBcc = !TextUtils.isEmpty(mBcc.getText());
}
mCcBccView.show(false /* animate */, showCc, showBcc);
}
updateHideOrShowCcBcc();
initChangeListeners();
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onNavigationItemSelected
File: src/com/android/mail/compose/ComposeActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2425
|
MEDIUM
| 4.3
|
android
|
onNavigationItemSelected
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
public void unbroadcastIntent(IApplicationThread caller, Intent intent, int userId)
throws RemoteException
{
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeStrongBinder(caller != null ? caller.asBinder() : null);
intent.writeToParcel(data, 0);
data.writeInt(userId);
mRemote.transact(UNBROADCAST_INTENT_TRANSACTION, data, reply, 0);
reply.readException();
data.recycle();
reply.recycle();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unbroadcastIntent
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
unbroadcastIntent
|
core/java/android/app/ActivityManagerNative.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
private Document parseXml(String xmlContent) {
try {
DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
Document document = builder.parse(new InputSource(new StringReader(xmlContent)));
document.getDocumentElement().normalize();
return document;
} catch (Exception e) {
throw new JadxRuntimeException("Can not parse xml content", e);
}
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2022-0219
- Severity: MEDIUM
- CVSS Score: 4.3
Description: fix: use secure xml parser for process manifest
Function: parseXml
File: jadx-core/src/main/java/jadx/core/export/ExportGradleProject.java
Repository: skylot/jadx
Fixed Code:
private Document parseXml(String xmlContent) {
try {
DocumentBuilder builder = XmlSecurity.getSecureDbf().newDocumentBuilder();
Document document = builder.parse(new InputSource(new StringReader(xmlContent)));
document.getDocumentElement().normalize();
return document;
} catch (Exception e) {
throw new JadxRuntimeException("Can not parse xml content", e);
}
}
|
[
"CWE-611"
] |
CVE-2022-0219
|
MEDIUM
| 4.3
|
skylot/jadx
|
parseXml
|
jadx-core/src/main/java/jadx/core/export/ExportGradleProject.java
|
d22db30166e7cb369d72be41382bb63ac8b81c52
| 1
|
Analyze the following code function for security vulnerabilities
|
public void sendStream(final int iCode, final String iReason, final String iContentType, InputStream iContent, long iSize,
final String iFileName) throws IOException {
writeStatus(iCode, iReason);
writeHeaders(iContentType);
writeLine("Content-Transfer-Encoding: binary");
if (iFileName != null) {
writeLine("Content-Disposition: attachment; filename=\"" + iFileName + "\"");
}
if (iSize < 0) {
// SIZE UNKNOWN: USE A MEMORY BUFFER
final ByteArrayOutputStream o = new ByteArrayOutputStream();
if (iContent != null) {
int b;
while ((b = iContent.read()) > -1) {
o.write(b);
}
}
byte[] content = o.toByteArray();
iContent = new ByteArrayInputStream(content);
iSize = content.length;
}
writeLine(OHttpUtils.HEADER_CONTENT_LENGTH + (iSize));
writeLine(null);
if (iContent != null) {
int b;
while ((b = iContent.read()) > -1) {
out.write(b);
}
}
flush();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendStream
File: server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/OHttpResponse.java
Repository: orientechnologies/orientdb
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2015-2912
|
MEDIUM
| 6.8
|
orientechnologies/orientdb
|
sendStream
|
server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/OHttpResponse.java
|
d5a45e608ba8764fd817c1bdd7cf966564e828e9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public ServiceNotificationPolicy applyForegroundServiceNotification(
Notification notification, String tag, int id, String pkg, int userId) {
synchronized (ActivityManagerService.this) {
return mServices.applyForegroundServiceNotificationLocked(notification,
tag, id, pkg, userId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: applyForegroundServiceNotification
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
|
applyForegroundServiceNotification
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public void onAuthenticationAcquired(int acquireInfo) {}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onAuthenticationAcquired
File: core/java/android/hardware/fingerprint/FingerprintManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
onAuthenticationAcquired
|
core/java/android/hardware/fingerprint/FingerprintManager.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean canShowTransient() {
return (mAttrs.insetsFlags.behavior & BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE) != 0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: canShowTransient
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
|
canShowTransient
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String createSessionExpiredJSON(boolean async) {
JsonObject json = Json.createObject();
JsonObject meta = Json.createObject();
json.put("meta", meta);
if (async) {
meta.put(JsonConstants.META_ASYNC, true);
}
meta.put(JsonConstants.META_SESSION_EXPIRED, true);
return wrapJsonForClient(json);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createSessionExpiredJSON
File: flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-203"
] |
CVE-2021-31404
|
LOW
| 1.9
|
vaadin/flow
|
createSessionExpiredJSON
|
flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
|
621ef1b322737d963bee624b2d2e38cd739903d9
| 0
|
Analyze the following code function for security vulnerabilities
|
public static StringBuffer alterBodyHtmlAbsolutizePaths(StringBuffer HTML, String serverName)
{
return new StringBuffer(alterBodyHtmlAbsolutizePaths(HTML.toString(), serverName));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: alterBodyHtmlAbsolutizePaths
File: src/com/dotmarketing/factories/EmailFactory.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-4040
|
MEDIUM
| 6.5
|
dotCMS/core
|
alterBodyHtmlAbsolutizePaths
|
src/com/dotmarketing/factories/EmailFactory.java
|
bc4db5d71dc67015572f8e4c6fdf87e29b854d02
| 0
|
Analyze the following code function for security vulnerabilities
|
public static Materials p4Materials(String view) {
P4Material material = p4Material("localhost:1666", "user", "password", view, true);
return new Materials(material);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: p4Materials
File: domain/src/test/java/com/thoughtworks/go/helper/MaterialsMother.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-39309
|
MEDIUM
| 6.5
|
gocd
|
p4Materials
|
domain/src/test/java/com/thoughtworks/go/helper/MaterialsMother.java
|
691b479f1310034992da141760e9c5d1f5b60e8a
| 0
|
Analyze the following code function for security vulnerabilities
|
private static String removeUserInfoFromUrlPath(String url) {
// Simple solution:
final Matcher matcher = PATTERN_USERINFO.matcher(url);
if (matcher.find())
return matcher.replaceFirst("$1$3");
return url;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeUserInfoFromUrlPath
File: src/net/sourceforge/plantuml/security/SURL.java
Repository: plantuml
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2023-3431
|
MEDIUM
| 5.3
|
plantuml
|
removeUserInfoFromUrlPath
|
src/net/sourceforge/plantuml/security/SURL.java
|
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
| 0
|
Analyze the following code function for security vulnerabilities
|
public String dialogButtonsOk() {
return dialogButtons(new int[] {BUTTON_OK}, new String[1]);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dialogButtonsOk
File: src/org/opencms/workplace/CmsDialog.java
Repository: alkacon/opencms-core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2013-4600
|
MEDIUM
| 4.3
|
alkacon/opencms-core
|
dialogButtonsOk
|
src/org/opencms/workplace/CmsDialog.java
|
72a05e3ea1cf692e2efce002687272e63f98c14a
| 0
|
Analyze the following code function for security vulnerabilities
|
public static int defaultMaxConnectionPerHost() {
return Integer.getInteger(ASYNC_CLIENT + "maxConnectionsPerHost", -1);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: defaultMaxConnectionPerHost
File: src/main/java/com/ning/http/client/AsyncHttpClientConfigDefaults.java
Repository: AsyncHttpClient/async-http-client
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2013-7398
|
MEDIUM
| 4.3
|
AsyncHttpClient/async-http-client
|
defaultMaxConnectionPerHost
|
src/main/java/com/ning/http/client/AsyncHttpClientConfigDefaults.java
|
a894583921c11c3b01f160ada36a8bb9d5158e96
| 0
|
Analyze the following code function for security vulnerabilities
|
public abstract URL getStaticResource(String url);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStaticResource
File: flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-203"
] |
CVE-2021-31404
|
LOW
| 1.9
|
vaadin/flow
|
getStaticResource
|
flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
|
621ef1b322737d963bee624b2d2e38cd739903d9
| 0
|
Analyze the following code function for security vulnerabilities
|
private void readEscape() throws IOException {
read();
switch(current) {
case '"':
case '/':
case '\\':
captureBuffer.append((char)current);
break;
case 'b':
captureBuffer.append('\b');
break;
case 'f':
captureBuffer.append('\f');
break;
case 'n':
captureBuffer.append('\n');
break;
case 'r':
captureBuffer.append('\r');
break;
case 't':
captureBuffer.append('\t');
break;
case 'u':
char[] hexChars=new char[4];
for(int i=0; i<4; i++) {
read();
if (!isHexDigit()) {
throw expected("hexadecimal digit");
}
hexChars[i]=(char)current;
}
captureBuffer.append((char)Integer.parseInt(new String(hexChars), 16));
break;
default:
throw expected("valid escape sequence");
}
read();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readEscape
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
|
readEscape
|
src/main/org/hjson/JsonParser.java
|
91bef056d56bf968451887421c89a44af1d692ff
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String loadTei(String pi, String language)
throws AccessDeniedException, FileNotFoundException, IOException, ViewerConfigurationException {
logger.trace("loadTei: {}/{}", pi, language);
if (pi == null) {
return null;
}
TextResourceBuilder builder = new TextResourceBuilder(BeanUtils.getRequest(), null);
try {
return builder.getTeiDocument(pi, language);
} catch (PresentationException | IndexUnreachableException | DAOException | ContentLibException e) {
logger.error(e.toString());
return null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: loadTei
File: goobi-viewer-core/src/main/java/io/goobi/viewer/controller/DataFileTools.java
Repository: intranda/goobi-viewer-core
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-15124
|
MEDIUM
| 4
|
intranda/goobi-viewer-core
|
loadTei
|
goobi-viewer-core/src/main/java/io/goobi/viewer/controller/DataFileTools.java
|
44ceb8e2e7e888391e8a941127171d6366770df3
| 0
|
Analyze the following code function for security vulnerabilities
|
public Element toDOM(Document document) {
Element requestElement = document.createElement("CertRetrievalRequest");
if (certId != null) {
Element issuerDNElement = document.createElement("certId");
issuerDNElement.appendChild(document.createTextNode(certId.toHexString()));
requestElement.appendChild(issuerDNElement);
}
if (requestId != null) {
Element issuerDNElement = document.createElement("requestId");
issuerDNElement.appendChild(document.createTextNode(requestId.toString()));
requestElement.appendChild(issuerDNElement);
}
return requestElement;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toDOM
File: base/common/src/main/java/com/netscape/certsrv/cert/CertRetrievalRequest.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
toDOM
|
base/common/src/main/java/com/netscape/certsrv/cert/CertRetrievalRequest.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
protected final float _parseFloatPrimitive(JsonParser p, DeserializationContext ctxt)
throws IOException
{
String text;
switch (p.currentTokenId()) {
case JsonTokenId.ID_STRING:
text = p.getText();
break;
case JsonTokenId.ID_NUMBER_INT:
final CoercionAction act = _checkIntToFloatCoercion(p, ctxt, Float.TYPE);
if (act == CoercionAction.AsNull) {
return 0.0f;
}
if (act == CoercionAction.AsEmpty) {
return 0.0f;
}
// fall through to coerce
case JsonTokenId.ID_NUMBER_FLOAT:
return p.getFloatValue();
case JsonTokenId.ID_NULL:
_verifyNullForPrimitive(ctxt);
return 0f;
// 29-Jun-2020, tatu: New! "Scalar from Object" (mostly for XML)
case JsonTokenId.ID_START_OBJECT:
text = ctxt.extractScalarFromObject(p, this, Float.TYPE);
break;
case JsonTokenId.ID_START_ARRAY:
if (ctxt.isEnabled(DeserializationFeature.UNWRAP_SINGLE_VALUE_ARRAYS)) {
p.nextToken();
final float parsed = _parseFloatPrimitive(p, ctxt);
_verifyEndArrayForSingle(p, ctxt);
return parsed;
}
// fall through
default:
return ((Number) ctxt.handleUnexpectedToken(Float.TYPE, p)).floatValue();
}
// 18-Nov-2020, tatu: Special case, Not-a-Numbers as String need to be
// considered "native" representation as JSON does not allow as numbers,
// and hence not bound by coercion rules
{
Float nan = _checkFloatSpecialValue(text);
if (nan != null) {
return nan.floatValue();
}
}
final CoercionAction act = _checkFromStringCoercion(ctxt, text,
LogicalType.Integer, Float.TYPE);
if (act == CoercionAction.AsNull) {
// 03-May-2021, tatu: Might not be allowed (should we do "empty" check?)
_verifyNullForPrimitive(ctxt);
return 0.0f;
}
if (act == CoercionAction.AsEmpty) {
return 0.0f;
}
text = text.trim();
if (_hasTextualNull(text)) {
_verifyNullForPrimitiveCoercion(ctxt, text);
return 0.0f;
}
return _parseFloatPrimitive(p, ctxt, text);
}
|
Vulnerability Classification:
- CWE: CWE-502
- CVE: CVE-2022-42003
- Severity: HIGH
- CVSS Score: 7.5
Description: Fix #3590
Function: _parseFloatPrimitive
File: src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java
Repository: FasterXML/jackson-databind
Fixed Code:
protected final float _parseFloatPrimitive(JsonParser p, DeserializationContext ctxt)
throws IOException
{
String text;
switch (p.currentTokenId()) {
case JsonTokenId.ID_STRING:
text = p.getText();
break;
case JsonTokenId.ID_NUMBER_INT:
final CoercionAction act = _checkIntToFloatCoercion(p, ctxt, Float.TYPE);
if (act == CoercionAction.AsNull) {
return 0.0f;
}
if (act == CoercionAction.AsEmpty) {
return 0.0f;
}
// fall through to coerce
case JsonTokenId.ID_NUMBER_FLOAT:
return p.getFloatValue();
case JsonTokenId.ID_NULL:
_verifyNullForPrimitive(ctxt);
return 0f;
// 29-Jun-2020, tatu: New! "Scalar from Object" (mostly for XML)
case JsonTokenId.ID_START_OBJECT:
text = ctxt.extractScalarFromObject(p, this, Float.TYPE);
break;
case JsonTokenId.ID_START_ARRAY:
if (ctxt.isEnabled(DeserializationFeature.UNWRAP_SINGLE_VALUE_ARRAYS)) {
if (p.nextToken() == JsonToken.START_ARRAY) {
return (float) handleNestedArrayForSingle(p, ctxt);
}
final float parsed = _parseFloatPrimitive(p, ctxt);
_verifyEndArrayForSingle(p, ctxt);
return parsed;
}
// fall through
default:
return ((Number) ctxt.handleUnexpectedToken(Float.TYPE, p)).floatValue();
}
// 18-Nov-2020, tatu: Special case, Not-a-Numbers as String need to be
// considered "native" representation as JSON does not allow as numbers,
// and hence not bound by coercion rules
{
Float nan = _checkFloatSpecialValue(text);
if (nan != null) {
return nan.floatValue();
}
}
final CoercionAction act = _checkFromStringCoercion(ctxt, text,
LogicalType.Integer, Float.TYPE);
if (act == CoercionAction.AsNull) {
// 03-May-2021, tatu: Might not be allowed (should we do "empty" check?)
_verifyNullForPrimitive(ctxt);
return 0.0f;
}
if (act == CoercionAction.AsEmpty) {
return 0.0f;
}
text = text.trim();
if (_hasTextualNull(text)) {
_verifyNullForPrimitiveCoercion(ctxt, text);
return 0.0f;
}
return _parseFloatPrimitive(p, ctxt, text);
}
|
[
"CWE-502"
] |
CVE-2022-42003
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
_parseFloatPrimitive
|
src/main/java/com/fasterxml/jackson/databind/deser/std/StdDeserializer.java
|
d78d00ee7b5245b93103fef3187f70543d67ca33
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
protected ServiceRegistry getServiceRegistry() {
return serviceRegistry;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getServiceRegistry
File: modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/impl/IngestServiceImpl.java
Repository: opencast
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2022-29237
|
MEDIUM
| 5.5
|
opencast
|
getServiceRegistry
|
modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/impl/IngestServiceImpl.java
|
8d5ec1614eed109b812bc27b0c6d3214e456d4e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public void setStrictPostBinding(Boolean strictPostBinding) {
logger
.warn("Option 'strictPostBinding' is deprecated and should not be used. This configuration is now set in picketlink.xml.");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setStrictPostBinding
File: picketlink-tomcat-common/src/main/java/org/picketlink/identity/federation/bindings/tomcat/idp/AbstractIDPValve.java
Repository: picketlink/picketlink-bindings
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2015-3158
|
MEDIUM
| 4
|
picketlink/picketlink-bindings
|
setStrictPostBinding
|
picketlink-tomcat-common/src/main/java/org/picketlink/identity/federation/bindings/tomcat/idp/AbstractIDPValve.java
|
341a37aefd69e67b6b5f6d775499730d6ccaff0d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean bypass(PackageNamePermissionQuery query) {
return query.userId < 0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: bypass
File: core/java/android/permission/PermissionManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-281"
] |
CVE-2023-21249
|
MEDIUM
| 5.5
|
android
|
bypass
|
core/java/android/permission/PermissionManager.java
|
c00b7e7dbc1fa30339adef693d02a51254755d7f
| 0
|
Analyze the following code function for security vulnerabilities
|
public JSONObject optJSONObject(String key) {
Object o = opt(key);
return o instanceof JSONObject ? (JSONObject)o : null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: optJSONObject
File: src/main/java/org/codehaus/jettison/json/JSONObject.java
Repository: jettison-json/jettison
The code follows secure coding practices.
|
[
"CWE-674",
"CWE-787"
] |
CVE-2022-45693
|
HIGH
| 7.5
|
jettison-json/jettison
|
optJSONObject
|
src/main/java/org/codehaus/jettison/json/JSONObject.java
|
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean zoomOut() {
if (!canZoomOut()) {
return false;
}
return pinchByDelta(0.8f);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: zoomOut
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
|
zoomOut
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Collection<LBPool> listPools() {
return pools.values();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: listPools
File: src/main/java/net/floodlightcontroller/loadbalancer/LoadBalancer.java
Repository: floodlight
The code follows secure coding practices.
|
[
"CWE-362",
"CWE-476"
] |
CVE-2015-6569
|
MEDIUM
| 4.3
|
floodlight
|
listPools
|
src/main/java/net/floodlightcontroller/loadbalancer/LoadBalancer.java
|
7f5bedb625eec3ff4d29987c31cef2553a962b36
| 0
|
Analyze the following code function for security vulnerabilities
|
public void selectStream(String sql, JsonArray params, Handler<AsyncResult<SQLRowStream>> replyHandler) {
client.getConnection(conn -> selectStream(conn, sql, params, closeAndHandleResult(conn, replyHandler)));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: selectStream
File: domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
selectStream
|
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String unescape(final String s) {
return s.replace("\\\\", "\\");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unescape
File: src/main/java/org/codelibs/fess/util/GsaConfigParser.java
Repository: codelibs/fess
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000822
|
HIGH
| 7.5
|
codelibs/fess
|
unescape
|
src/main/java/org/codelibs/fess/util/GsaConfigParser.java
|
faa265b8d8f1c71e1bf3229fba5f8cc58a5611b7
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean isUriCorrect(@Nonnull final String uri) {
return URI_PATTERN.matcher(uri).matches();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isUriCorrect
File: mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java
Repository: raydac/netbeans-mmd-plugin
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000542
|
MEDIUM
| 6.8
|
raydac/netbeans-mmd-plugin
|
isUriCorrect
|
mind-map/mind-map-swing-panel/src/main/java/com/igormaznitsa/mindmap/swing/panel/utils/Utils.java
|
9fba652bf06e649186b8f9e612d60e9cc15097e9
| 0
|
Analyze the following code function for security vulnerabilities
|
private JFileChooser createSaveFileChooser(boolean exportCall) {
JFileChooser fileChooser = new JFileChooser(calcInitialDir(exportCall));
fileChooser.setAcceptAllFileFilterUsed(false); // We don't want "all files" as a choice
// The input field should show the diagram name as preset
fileChooser.setSelectedFile(new File(CurrentDiagram.getInstance().getDiagramHandler().getName()));
return fileChooser;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createSaveFileChooser
File: umlet-swing/src/main/java/com/baselet/diagram/io/DiagramFileHandler.java
Repository: umlet
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000548
|
MEDIUM
| 6.8
|
umlet
|
createSaveFileChooser
|
umlet-swing/src/main/java/com/baselet/diagram/io/DiagramFileHandler.java
|
e1c4cc6ae692cc8d1c367460dbf79343e996f9bd
| 0
|
Analyze the following code function for security vulnerabilities
|
public void animateCollapsePanels(int flags, boolean force, boolean delayed) {
animateCollapsePanels(flags, force, delayed, 1.0f /* speedUpFactor */);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: animateCollapsePanels
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
animateCollapsePanels
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.