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
@GetMapping("{journalId:\\d+}/comments/top_view") public Page<CommentWithHasChildrenVO> listTopComments(@PathVariable("journalId") Integer journalId, @RequestParam(name = "page", required = false, defaultValue = "0") int page, @SortDefault(sort = "createTime", direction = DESC) Sort sort) { Page<CommentWithHasChildrenVO> result = journalCommentService.pageTopCommentsBy(journalId, CommentStatus.PUBLISHED, PageRequest.of(page, optionService.getCommentPageSize(), sort)); return journalCommentService.filterIpAddress(result); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: listTopComments File: src/main/java/run/halo/app/controller/content/api/JournalController.java Repository: halo-dev/halo The code follows secure coding practices.
[ "CWE-79" ]
CVE-2020-19007
LOW
3.5
halo-dev/halo
listTopComments
src/main/java/run/halo/app/controller/content/api/JournalController.java
d6b3d6cb5d681c7d8d64fd48de6c7c99b696bb8b
0
Analyze the following code function for security vulnerabilities
@NonNull public Builder setOpenFlags(@DatabaseOpenFlags int openFlags) { mOpenFlags = openFlags; return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setOpenFlags File: core/java/android/database/sqlite/SQLiteDatabase.java Repository: android The code follows secure coding practices.
[ "CWE-89" ]
CVE-2018-9493
LOW
2.1
android
setOpenFlags
core/java/android/database/sqlite/SQLiteDatabase.java
ebc250d16c747f4161167b5ff58b3aea88b37acf
0
Analyze the following code function for security vulnerabilities
@Override public void dump(FileDescriptor fd, PrintWriter writer, String[] args) { final IndentingPrintWriter pw = new IndentingPrintWriter(writer, " ", 120); pw.println("Downloads updated in last hour:"); pw.increaseIndent(); final SQLiteDatabase db = mOpenHelper.getReadableDatabase(); final long modifiedAfter = mSystemFacade.currentTimeMillis() - DateUtils.HOUR_IN_MILLIS; final Cursor cursor = db.query(DB_TABLE, null, Downloads.Impl.COLUMN_LAST_MODIFICATION + ">" + modifiedAfter, null, null, null, Downloads.Impl._ID + " ASC"); try { final String[] cols = cursor.getColumnNames(); final int idCol = cursor.getColumnIndex(BaseColumns._ID); while (cursor.moveToNext()) { pw.println("Download #" + cursor.getInt(idCol) + ":"); pw.increaseIndent(); for (int i = 0; i < cols.length; i++) { // Omit sensitive data when dumping if (Downloads.Impl.COLUMN_COOKIE_DATA.equals(cols[i])) { continue; } pw.printPair(cols[i], cursor.getString(i)); } pw.println(); pw.decreaseIndent(); } } finally { cursor.close(); } pw.decreaseIndent(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: dump File: src/com/android/providers/downloads/DownloadProvider.java Repository: android The code follows secure coding practices.
[ "CWE-362" ]
CVE-2016-0848
HIGH
7.2
android
dump
src/com/android/providers/downloads/DownloadProvider.java
bdc831357e7a116bc561d51bf2ddc85ff11c01a9
0
Analyze the following code function for security vulnerabilities
public Authentication getAuthentication(String authName) { return authentications.get(authName); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAuthentication File: samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java Repository: OpenAPITools/openapi-generator The code follows secure coding practices.
[ "CWE-668" ]
CVE-2021-21430
LOW
2.1
OpenAPITools/openapi-generator
getAuthentication
samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java
2c576483f26f85b3979c6948a131f585c237109a
0
Analyze the following code function for security vulnerabilities
public void postAnimateCollapsePanels() { mHandler.post(mAnimateCollapsePanels); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: postAnimateCollapsePanels 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
postAnimateCollapsePanels
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
@Override protected void onStart() { super.onStart(); Analytics.getInstance().activityStart(this); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onStart 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
onStart
src/com/android/mail/compose/ComposeActivity.java
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
0
Analyze the following code function for security vulnerabilities
public boolean createCategoryFile(SysSite site, CmsCategory entity, Integer pageIndex, Integer totalPage) { if (entity.isOnlyUrl()) { categoryService.updateUrl(entity.getId(), entity.getPath(), false); } else if (CommonUtils.notEmpty(entity.getPath())) { try { if (site.isUseStatic() && CommonUtils.notEmpty(entity.getTemplatePath())) { String url = site.getSitePath() + createCategoryFile(site, entity, entity.getTemplatePath(), entity.getPath(), pageIndex, totalPage); categoryService.updateUrl(entity.getId(), url, true); } else { Map<String, Object> model = new HashMap<>(); initCategoryUrl(site, entity); model.put("category", entity); model.put(AbstractFreemarkerView.CONTEXT_SITE, site); String filePath = FreeMarkerUtils.generateStringByString(entity.getPath(), webConfiguration, model); String url; if (filePath.contains("://") || filePath.startsWith("//")) { url = filePath; } else { url = site.getDynamicPath() + filePath; } categoryService.updateUrl(entity.getId(), url, false); } } catch (IOException | TemplateException e) { log.error(e.getMessage(), e); return false; } return true; } return false; }
Vulnerability Classification: - CWE: CWE-89 - CVE: CVE-2020-20914 - Severity: CRITICAL - CVSS Score: 9.8 Description: https://github.com/sanluan/PublicCMS/issues/29 Function: createCategoryFile File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/logic/component/template/TemplateComponent.java Repository: sanluan/PublicCMS Fixed Code: public boolean createCategoryFile(SysSite site, CmsCategory entity, Integer pageIndex, Integer totalPage) { if (entity.isOnlyUrl()) { categoryService.updateUrl(entity.getId(), entity.getPath(), false); } else if (CommonUtils.notEmpty(entity.getPath())) { try { if (site.isUseStatic() && CommonUtils.notEmpty(entity.getTemplatePath())) { String filePath = createCategoryFile(site, entity, entity.getTemplatePath(), entity.getPath(), pageIndex, totalPage); categoryService.updateUrl(entity.getId(), filePath, true); } else { Map<String, Object> model = new HashMap<>(); initCategoryUrl(site, entity); model.put("category", entity); model.put(AbstractFreemarkerView.CONTEXT_SITE, site); String filePath = FreeMarkerUtils.generateStringByString(entity.getPath(), webConfiguration, model); categoryService.updateUrl(entity.getId(), filePath, false); } } catch (IOException | TemplateException e) { log.error(e.getMessage(), e); return false; } return true; } return false; }
[ "CWE-89" ]
CVE-2020-20914
CRITICAL
9.8
sanluan/PublicCMS
createCategoryFile
publiccms-parent/publiccms-core/src/main/java/com/publiccms/logic/component/template/TemplateComponent.java
bf24c5dd9177cb2da30d0f0a62cf8e130003c2ae
1
Analyze the following code function for security vulnerabilities
public synchronized void updateBigDecimal(@Positive int columnIndex, java.math.@Nullable BigDecimal x) throws SQLException { updateValue(columnIndex, x); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateBigDecimal 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
updateBigDecimal
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
739e599d52ad80f8dcd6efedc6157859b1a9d637
0
Analyze the following code function for security vulnerabilities
@Override @SuppressWarnings("serial") protected void init() { add(createFeedbackPanel()); final GridBuilder gridBuilder = newGridBuilder(this, "flowform"); gridBuilder.newFormHeading(getString("administration.setup.heading")); final DivPanel panel = gridBuilder.getPanel(); panel.add(new ParTextPanel(panel.newChildId(), getString("administration.setup.heading.subtitle"))); { // RadioChoice mode final FieldsetPanel fs = gridBuilder.newFieldset(getString("administration.setup.target")); final DivPanel radioPanel = new DivPanel(fs.newChildId(), DivType.RADIOBOX); fs.add(radioPanel); fs.setLabelFor(radioPanel); final RadioGroupPanel<SetupTarget> radioGroup = new RadioGroupPanel<SetupTarget>(radioPanel.newChildId(), "setuptarget", new PropertyModel<SetupTarget>(this, "setupMode")); radioPanel.add(radioGroup); for (final SetupTarget target : SetupTarget.values()) { radioGroup.add(new Model<SetupTarget>(target), getString(target.getI18nKey()), getString(target.getI18nKey() + ".tooltip")); } } // final RequiredMaxLengthTextField organizationField = new RequiredMaxLengthTextField(this, "organization", getString("organization"), // new PropertyModel<String>(this, "organization"), 100); // add(organizationField); { // User name final FieldsetPanel fs = gridBuilder.newFieldset(getString("username")); fs.add(new RequiredMaxLengthTextField(InputPanel.WICKET_ID, new PropertyModel<String>(this, "adminUsername"), 100)); } final PasswordTextField passwordField = new PasswordTextField(PasswordPanel.WICKET_ID, new PropertyModel<String>(this, "password")) { @Override protected void onComponentTag(final ComponentTag tag) { super.onComponentTag(tag); if (encryptedPassword == null) { tag.put("value", ""); } else if (StringUtils.isEmpty(getConvertedInput()) == false) { tag.put("value", MAGIC_PASSWORD); } } }; { // Password final FieldsetPanel fs = gridBuilder.newFieldset(getString("password")); passwordField.setRequired(true); // No setReset(true), otherwise uploading and re-entering passwords is a real pain. fs.add(passwordField); WicketUtils.setFocus(passwordField); } { // Password repeat final FieldsetPanel fs = gridBuilder.newFieldset(getString("passwordRepeat")); final PasswordTextField passwordRepeatField = new PasswordTextField(PasswordPanel.WICKET_ID, new PropertyModel<String>(this, "passwordRepeat")) { @Override protected void onComponentTag(final ComponentTag tag) { super.onComponentTag(tag); if (encryptedPassword == null) { tag.put("value", ""); } else if (StringUtils.isEmpty(getConvertedInput()) == false) { tag.put("value", MAGIC_PASSWORD); } } }; passwordRepeatField.setRequired(true); // No setReset(true), otherwise uploading and re-entering passwords is a real pain. passwordRepeatField.add(new IValidator<String>() { @Override public void validate(final IValidatable<String> validatable) { final String input = validatable.getValue(); final String passwordInput = passwordField.getConvertedInput(); if (StringUtils.equals(input, passwordInput) == false) { passwordRepeatField.error(getString("user.error.passwordAndRepeatDoesNotMatch")); encryptedPassword = null; return; } if (MAGIC_PASSWORD.equals(passwordInput) == false || encryptedPassword == null) { final String errorMsgKey = userDao.checkPasswordQuality(passwordInput); if (errorMsgKey != null) { encryptedPassword = null; passwordField.error(getString(errorMsgKey)); } else { encryptedPassword = userDao.encryptPassword(passwordInput); } } } }); fs.add(passwordRepeatField); } { // Time zone final FieldsetPanel fs = gridBuilder.newFieldset(getString("administration.configuration.param.timezone")); final TimeZonePanel timeZone = new TimeZonePanel(fs.newChildId(), new PropertyModel<TimeZone>(this, "timeZone")); fs.setLabelFor(timeZone); fs.add(timeZone); fs.addHelpIcon(getString("administration.configuration.param.timezone.description")); } { // Calendar domain final FieldsetPanel fs = gridBuilder.newFieldset(getString("administration.configuration.param.calendarDomain")); final RequiredMaxLengthTextField textField = new RequiredMaxLengthTextField(InputPanel.WICKET_ID, new PropertyModel<String>(this, "calendarDomain"), ConfigurationDO.PARAM_LENGTH); fs.add(textField); textField.add(new IValidator<String>() { @Override public void validate(final IValidatable<String> validatable) { if (Configuration.isDomainValid(validatable.getValue()) == false) { textField.error(getString("validation.error.generic")); } } }); fs.addHelpIcon(getString("administration.configuration.param.calendarDomain.description")); } { // E-Mail sysops final FieldsetPanel fs = gridBuilder.newFieldset(getString("administration.configuration.param.systemAdministratorEMail.label"), getString("email")); fs.add(new MaxLengthTextField(InputPanel.WICKET_ID, new PropertyModel<String>(this, "sysopEMail"), ConfigurationDO.PARAM_LENGTH)); fs.addHelpIcon(getString("administration.configuration.param.systemAdministratorEMail.description")); } { // E-Mail sysops final FieldsetPanel fs = gridBuilder.newFieldset(getString("administration.configuration.param.feedbackEMail.label"), getString("email")); fs.add(new MaxLengthTextField(InputPanel.WICKET_ID, new PropertyModel<String>(this, "feedbackEMail"), ConfigurationDO.PARAM_LENGTH)); fs.addHelpIcon(getString("administration.configuration.param.feedbackEMail.description")); } final RepeatingView actionButtons = new RepeatingView("buttons"); add(actionButtons); { final Button finishButton = new Button(SingleButtonPanel.WICKET_ID, new Model<String>("finish")) { @Override public final void onSubmit() { parentPage.finishSetup(); } }; final SingleButtonPanel finishButtonPanel = new SingleButtonPanel(actionButtons.newChildId(), finishButton, getString("administration.setup.finish"), SingleButtonPanel.DEFAULT_SUBMIT); actionButtons.add(finishButtonPanel); setDefaultButton(finishButton); } }
Vulnerability Classification: - CWE: CWE-352 - CVE: CVE-2013-7251 - Severity: MEDIUM - CVSS Score: 6.8 Description: CSRF protection. Function: init File: src/main/java/org/projectforge/web/admin/SetupForm.java Repository: micromata/projectforge-webapp Fixed Code: @Override @SuppressWarnings("serial") protected void init() { add(createFeedbackPanel()); final GridBuilder gridBuilder = newGridBuilder(this, "flowform"); gridBuilder.newFormHeading(getString("administration.setup.heading")); final DivPanel panel = gridBuilder.getPanel(); panel.add(new ParTextPanel(panel.newChildId(), getString("administration.setup.heading.subtitle"))); { // RadioChoice mode final FieldsetPanel fs = gridBuilder.newFieldset(getString("administration.setup.target")); final DivPanel radioPanel = new DivPanel(fs.newChildId(), DivType.RADIOBOX); fs.add(radioPanel); fs.setLabelFor(radioPanel); final RadioGroupPanel<SetupTarget> radioGroup = new RadioGroupPanel<SetupTarget>(radioPanel.newChildId(), "setuptarget", new PropertyModel<SetupTarget>(this, "setupMode")); radioPanel.add(radioGroup); for (final SetupTarget target : SetupTarget.values()) { radioGroup.add(new Model<SetupTarget>(target), getString(target.getI18nKey()), getString(target.getI18nKey() + ".tooltip")); } } // final RequiredMaxLengthTextField organizationField = new RequiredMaxLengthTextField(this, "organization", getString("organization"), // new PropertyModel<String>(this, "organization"), 100); // add(organizationField); { // User name final FieldsetPanel fs = gridBuilder.newFieldset(getString("username")); fs.add(new RequiredMaxLengthTextField(InputPanel.WICKET_ID, new PropertyModel<String>(this, "adminUsername"), 100)); } final PasswordTextField passwordField = new PasswordTextField(PasswordPanel.WICKET_ID, new PropertyModel<String>(this, "password")) { @Override protected void onComponentTag(final ComponentTag tag) { super.onComponentTag(tag); if (encryptedPassword == null) { tag.put("value", ""); } else if (StringUtils.isEmpty(getConvertedInput()) == false) { tag.put("value", MAGIC_PASSWORD); } } }; { // Password final FieldsetPanel fs = gridBuilder.newFieldset(getString("password")); passwordField.setRequired(true); // No setReset(true), otherwise uploading and re-entering passwords is a real pain. fs.add(passwordField); WicketUtils.setFocus(passwordField); } { // Password repeat final FieldsetPanel fs = gridBuilder.newFieldset(getString("passwordRepeat")); final PasswordTextField passwordRepeatField = new PasswordTextField(PasswordPanel.WICKET_ID, new PropertyModel<String>(this, "passwordRepeat")) { @Override protected void onComponentTag(final ComponentTag tag) { super.onComponentTag(tag); if (encryptedPassword == null) { tag.put("value", ""); } else if (StringUtils.isEmpty(getConvertedInput()) == false) { tag.put("value", MAGIC_PASSWORD); } } }; passwordRepeatField.setRequired(true); // No setReset(true), otherwise uploading and re-entering passwords is a real pain. passwordRepeatField.add(new IValidator<String>() { @Override public void validate(final IValidatable<String> validatable) { final String input = validatable.getValue(); final String passwordInput = passwordField.getConvertedInput(); if (StringUtils.equals(input, passwordInput) == false) { passwordRepeatField.error(getString("user.error.passwordAndRepeatDoesNotMatch")); encryptedPassword = null; return; } if (MAGIC_PASSWORD.equals(passwordInput) == false || encryptedPassword == null) { final String errorMsgKey = userDao.checkPasswordQuality(passwordInput); if (errorMsgKey != null) { encryptedPassword = null; passwordField.error(getString(errorMsgKey)); } else { encryptedPassword = userDao.encryptPassword(passwordInput); } } } }); fs.add(passwordRepeatField); } { // Time zone final FieldsetPanel fs = gridBuilder.newFieldset(getString("administration.configuration.param.timezone")); final TimeZonePanel timeZone = new TimeZonePanel(fs.newChildId(), new PropertyModel<TimeZone>(this, "timeZone")); fs.setLabelFor(timeZone); fs.add(timeZone); fs.addHelpIcon(getString("administration.configuration.param.timezone.description")); } { // Calendar domain final FieldsetPanel fs = gridBuilder.newFieldset(getString("administration.configuration.param.calendarDomain")); final RequiredMaxLengthTextField textField = new RequiredMaxLengthTextField(InputPanel.WICKET_ID, new PropertyModel<String>(this, "calendarDomain"), ConfigurationDO.PARAM_LENGTH); fs.add(textField); textField.add(new IValidator<String>() { @Override public void validate(final IValidatable<String> validatable) { if (Configuration.isDomainValid(validatable.getValue()) == false) { textField.error(getString("validation.error.generic")); } } }); fs.addHelpIcon(getString("administration.configuration.param.calendarDomain.description")); } { // E-Mail sysops final FieldsetPanel fs = gridBuilder.newFieldset(getString("administration.configuration.param.systemAdministratorEMail.label"), getString("email")); fs.add(new MaxLengthTextField(InputPanel.WICKET_ID, new PropertyModel<String>(this, "sysopEMail"), ConfigurationDO.PARAM_LENGTH)); fs.addHelpIcon(getString("administration.configuration.param.systemAdministratorEMail.description")); } { // E-Mail sysops final FieldsetPanel fs = gridBuilder.newFieldset(getString("administration.configuration.param.feedbackEMail.label"), getString("email")); fs.add(new MaxLengthTextField(InputPanel.WICKET_ID, new PropertyModel<String>(this, "feedbackEMail"), ConfigurationDO.PARAM_LENGTH)); fs.addHelpIcon(getString("administration.configuration.param.feedbackEMail.description")); } final RepeatingView actionButtons = new RepeatingView("buttons"); add(actionButtons); { final Button finishButton = new Button(SingleButtonPanel.WICKET_ID, new Model<String>("finish")) { @Override public final void onSubmit() { csrfTokenHandler.onSubmit(); parentPage.finishSetup(); } }; final SingleButtonPanel finishButtonPanel = new SingleButtonPanel(actionButtons.newChildId(), finishButton, getString("administration.setup.finish"), SingleButtonPanel.DEFAULT_SUBMIT); actionButtons.add(finishButtonPanel); setDefaultButton(finishButton); } }
[ "CWE-352" ]
CVE-2013-7251
MEDIUM
6.8
micromata/projectforge-webapp
init
src/main/java/org/projectforge/web/admin/SetupForm.java
422de35e3c3141e418a73bfb39b430d5fd74077e
1
Analyze the following code function for security vulnerabilities
public static void uploadUpdateFile( Context context, User user, OCFile existingFile, Integer behaviour, NameCollisionPolicy nameCollisionPolicy ) { uploadUpdateFile(context, user, new OCFile[]{existingFile}, behaviour, nameCollisionPolicy, true); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: uploadUpdateFile 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
uploadUpdateFile
app/src/main/java/com/owncloud/android/files/services/FileUploader.java
cd3bd0845a97e1d43daa0607a122b66b0068c751
0
Analyze the following code function for security vulnerabilities
@Override public void systemReady() { mKeyguardDelegate = new KeyguardServiceDelegate(mContext); mKeyguardDelegate.onSystemReady(); readCameraLensCoverState(); updateUiMode(); synchronized (mLock) { updateOrientationListenerLp(); mSystemReady = true; mHandler.post(new Runnable() { @Override public void run() { updateSettings(); } }); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: systemReady 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
systemReady
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
84669ca8de55d38073a0dcb01074233b0a417541
0
Analyze the following code function for security vulnerabilities
private boolean mayFreezeScreenLocked(WindowProcessController app) { // Only freeze the screen if this activity is currently attached to // an application, and that application is not blocked or unresponding. // In any other case, we can't count on getting the screen unfrozen, // so it is best to leave as-is. return hasProcess() && !app.isCrashing() && !app.isNotResponding(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: mayFreezeScreenLocked 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
mayFreezeScreenLocked
services/core/java/com/android/server/wm/ActivityRecord.java
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
0
Analyze the following code function for security vulnerabilities
public String getSpace() { return this.doc.getSpace(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSpace File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2022-23615
MEDIUM
5.5
xwiki/xwiki-platform
getSpace
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
0
Analyze the following code function for security vulnerabilities
public final void addObserver(TabObserver observer) { mObservers.addObserver(observer); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addObserver File: chrome/android/java/src/org/chromium/chrome/browser/Tab.java Repository: chromium The code follows secure coding practices.
[ "CWE-20" ]
CVE-2014-3159
MEDIUM
6.4
chromium
addObserver
chrome/android/java/src/org/chromium/chrome/browser/Tab.java
98a50b76141f0b14f292f49ce376e6554142d5e2
0
Analyze the following code function for security vulnerabilities
public String addTooltip(String html, String message) { return this.xwiki.addTooltip(html, message, getXWikiContext()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addTooltip 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
addTooltip
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 BigDecimal getBigDecimal(String key) throws JSONException { Object object = this.get(key); BigDecimal ret = objectToBigDecimal(object, null); if (ret != null) { return ret; } throw wrongValueFormatException(key, "BigDecimal", object, null); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getBigDecimal File: src/main/java/org/json/JSONObject.java Repository: stleary/JSON-java The code follows secure coding practices.
[ "CWE-770" ]
CVE-2023-5072
HIGH
7.5
stleary/JSON-java
getBigDecimal
src/main/java/org/json/JSONObject.java
661114c50dcfd53bb041aab66f14bb91e0a87c8a
0
Analyze the following code function for security vulnerabilities
@Override public Object makeTransformTranslation(float translateX, float translateY, float translateZ) { return CN1Matrix4f.makeTranslation(translateX, translateY, translateZ); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: makeTransformTranslation File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java Repository: codenameone/CodenameOne The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-4903
MEDIUM
5.1
codenameone/CodenameOne
makeTransformTranslation
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
public synchronized void updateFloat(String columnName, float x) throws SQLException { updateFloat(findColumn(columnName), x); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateFloat 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
updateFloat
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
739e599d52ad80f8dcd6efedc6157859b1a9d637
0
Analyze the following code function for security vulnerabilities
@Override protected TooLongFrameException newException(int maxLength) { return new TooLongFrameException("An HTTP line is larger than " + maxLength + " bytes."); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: newException 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
newException
codec-http/src/main/java/io/netty/handler/codec/http/HttpObjectDecoder.java
39cafcb05c99f2aa9fce7e6597664c9ed6a63a95
0
Analyze the following code function for security vulnerabilities
@Deprecated @InlineMe( replacement = "Files.asCharSource(file, charset).readFirstLine()", imports = "com.google.common.io.Files") @CheckForNull public static String readFirstLine(File file, Charset charset) throws IOException { return asCharSource(file, charset).readFirstLine(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: readFirstLine File: android/guava/src/com/google/common/io/Files.java Repository: google/guava The code follows secure coding practices.
[ "CWE-552" ]
CVE-2023-2976
HIGH
7.1
google/guava
readFirstLine
android/guava/src/com/google/common/io/Files.java
feb83a1c8fd2e7670b244d5afd23cba5aca43284
0
Analyze the following code function for security vulnerabilities
public Integer getAuthorId() { return authorId; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAuthorId File: src/main/java/cn/luischen/model/ContentDomain.java Repository: WinterChenS/my-site The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-29638
MEDIUM
5.4
WinterChenS/my-site
getAuthorId
src/main/java/cn/luischen/model/ContentDomain.java
d104f38aaae2f1b76c33fadfcf6b1ef1c6c340ed
0
Analyze the following code function for security vulnerabilities
public boolean canDelete() { try { XWikiDocument doc = new XWikiDocument(); doc.setFullName(getFullName(), this.context); if (!hasAccessLevel("delete", getFullName())) { return false; } String waitdays; if (hasAccessLevel(ADMIN_RIGHT, getFullName())) { waitdays = getXWikiContext().getWiki().Param("xwiki.store.recyclebin.adminWaitDays", "0"); } else { waitdays = getXWikiContext().getWiki().Param("xwiki.store.recyclebin.waitDays", "7"); } int seconds = (int) (Double.parseDouble(waitdays) * 24 * 60 * 60 + 0.5); Calendar cal = Calendar.getInstance(); cal.setTime(getDate()); cal.add(Calendar.SECOND, seconds); return cal.before(Calendar.getInstance()); } catch (Exception ex) { // Public APIs should not throw exceptions LOGGER.warn("Exception while checking if entry [{}] can be removed from the recycle bin", getId(), ex); return false; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: canDelete File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/DeletedDocument.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-668" ]
CVE-2023-29208
HIGH
7.5
xwiki/xwiki-platform
canDelete
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/DeletedDocument.java
d9e947559077e947315bf700c5703dfc7dd8a8d7
0
Analyze the following code function for security vulnerabilities
protected AbstractSAXParser createParser() throws SAXException { XmlSaxParser parser = new XmlSaxParser(); parser.setFeature(FEATURE_NAMESPACE_PREFIXES, true); parser.setFeature(FEATURE_LOAD_EXTERNAL_DTD, false); return parser; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createParser File: ext/java/nokogiri/XmlSaxParserContext.java Repository: sparklemotion/nokogiri The code follows secure coding practices.
[ "CWE-241" ]
CVE-2022-29181
MEDIUM
6.4
sparklemotion/nokogiri
createParser
ext/java/nokogiri/XmlSaxParserContext.java
db05ba9a1bd4b90aa6c76742cf6102a7c7297267
0
Analyze the following code function for security vulnerabilities
public static JsonNode readYamlTree(String contents) { org.yaml.snakeyaml.Yaml yaml = new org.yaml.snakeyaml.Yaml(); return Json.mapper().convertValue(yaml.load(contents), JsonNode.class); }
Vulnerability Classification: - CWE: CWE-502 - CVE: CVE-2017-1000207 - Severity: MEDIUM - CVSS Score: 6.8 Description: parser change. Function: readYamlTree File: modules/swagger-parser/src/main/java/io/swagger/parser/util/DeserializationUtils.java Repository: swagger-api/swagger-parser Fixed Code: public static JsonNode readYamlTree(String contents) { org.yaml.snakeyaml.Yaml yaml = new org.yaml.snakeyaml.Yaml(new SafeConstructor()); return Json.mapper().convertValue(yaml.load(contents), JsonNode.class); }
[ "CWE-502" ]
CVE-2017-1000207
MEDIUM
6.8
swagger-api/swagger-parser
readYamlTree
modules/swagger-parser/src/main/java/io/swagger/parser/util/DeserializationUtils.java
4c6584306b40de9b2dfa9065c3a438cd918534af
1
Analyze the following code function for security vulnerabilities
public void getODMMetadata(int parentStudyId,int crfVersionOID,MetaDataVersionBean metadata){ }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getODMMetadata File: core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java Repository: OpenClinica The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-24831
HIGH
7.5
OpenClinica
getODMMetadata
core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
b152cc63019230c9973965a98e4386ea5322c18f
0
Analyze the following code function for security vulnerabilities
static Field fieldSerialPersistentFields(Class<?> cl) { try { Field f = cl.getDeclaredField("serialPersistentFields"); int modifiers = f.getModifiers(); if (Modifier.isStatic(modifiers) && Modifier.isPrivate(modifiers) && Modifier.isFinal(modifiers)) { if (f.getType() == ARRAY_OF_FIELDS) { return f; } } } catch (NoSuchFieldException nsm) { // Ignored } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: fieldSerialPersistentFields File: luni/src/main/java/java/io/ObjectStreamClass.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2014-7911
HIGH
7.2
android
fieldSerialPersistentFields
luni/src/main/java/java/io/ObjectStreamClass.java
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
0
Analyze the following code function for security vulnerabilities
NotificationManager getNotificationManager() { return mContext.getSystemService(NotificationManager.class); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getNotificationManager 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
getNotificationManager
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
public static @Nullable String extractFileExtension(@Nullable String data) { if (data == null) return null; data = extractDisplayName(data); final int lastDot = data.lastIndexOf('.'); if (lastDot == -1) { return null; } else { return data.substring(lastDot + 1); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: extractFileExtension File: src/com/android/providers/media/util/FileUtils.java Repository: android The code follows secure coding practices.
[ "CWE-22" ]
CVE-2023-35670
HIGH
7.8
android
extractFileExtension
src/com/android/providers/media/util/FileUtils.java
db3c69afcb0a45c8aa2f333fcde36217889899fe
0
Analyze the following code function for security vulnerabilities
public String getDataMimeType() { return mDataMimeType; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDataMimeType File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
getDataMimeType
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
public String evaluateStringPropertyAsTemplate(String property, AmwTemplateModel model) throws IOException, TemplateException { Configuration cfg = getConfiguration(model.getAmwModelPreprocessExceptionHandler()); StringTemplateLoader loader = new StringTemplateLoader(); String tempTemplateName = "_propertyEvaluation_"; loader.putTemplate(tempTemplateName, property); addGlobalFunctionTemplates(model.getGlobalFunctionTemplates(), loader); cfg.setTemplateLoader(loader); Writer fileContentWriter = new StringWriter(); freemarker.template.Template fileContentTemplate = cfg.getTemplate(tempTemplateName); fileContentTemplate.process(model, fileContentWriter); fileContentWriter.flush(); String result = fileContentWriter.toString(); cfg.clearTemplateCache(); return result; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: evaluateStringPropertyAsTemplate File: AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/generator/control/extracted/templates/BaseTemplateProcessor.java Repository: liimaorg/liima The code follows secure coding practices.
[ "CWE-917" ]
CVE-2023-26092
CRITICAL
9.8
liimaorg/liima
evaluateStringPropertyAsTemplate
AMW_business/src/main/java/ch/puzzle/itc/mobiliar/business/generator/control/extracted/templates/BaseTemplateProcessor.java
78ba2e198c615dc8858e56eee3290989f0362686
0
Analyze the following code function for security vulnerabilities
public boolean isShortcutExistsAndInvisibleToPublisher(String id) { ShortcutInfo si = findShortcutById(id); return si != null && !si.isVisibleToPublisher(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isShortcutExistsAndInvisibleToPublisher File: services/core/java/com/android/server/pm/ShortcutPackage.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40075
MEDIUM
5.5
android
isShortcutExistsAndInvisibleToPublisher
services/core/java/com/android/server/pm/ShortcutPackage.java
ae768fbb9975fdab267f525831cb52f485ab0ecc
0
Analyze the following code function for security vulnerabilities
@SystemApi @RequiresPermission(android.Manifest.permission.NOTIFY_PENDING_SYSTEM_UPDATE) public void notifyPendingSystemUpdate(long updateReceivedTime) { throwIfParentInstance("notifyPendingSystemUpdate"); if (mService != null) { try { mService.notifyPendingSystemUpdate(SystemUpdateInfo.of(updateReceivedTime)); } catch (RemoteException re) { throw re.rethrowFromSystemServer(); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: notifyPendingSystemUpdate 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
notifyPendingSystemUpdate
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
boolean onMediaButton(int type) { if (hasAnyCalls()) { if (HeadsetMediaButton.SHORT_PRESS == type) { Call ringingCall = getFirstCallWithState(CallState.RINGING); if (ringingCall == null) { mCallAudioManager.toggleMute(); return true; } else { ringingCall.answer(ringingCall.getVideoState()); return true; } } else if (HeadsetMediaButton.LONG_PRESS == type) { Log.d(this, "handleHeadsetHook: longpress -> hangup"); Call callToHangup = getFirstCallWithState( CallState.RINGING, CallState.DIALING, CallState.ACTIVE, CallState.ON_HOLD); if (callToHangup != null) { callToHangup.disconnect(); return true; } } } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onMediaButton File: src/com/android/server/telecom/CallsManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-2423
MEDIUM
6.6
android
onMediaButton
src/com/android/server/telecom/CallsManager.java
a06c9a4aef69ae27b951523cf72bf72412bf48fa
0
Analyze the following code function for security vulnerabilities
@Override public boolean isPermissionRevokedByPolicy(String packageName, String permissionName, int userId) { return mPermissionManagerServiceImpl .isPermissionRevokedByPolicy(packageName, permissionName, userId); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isPermissionRevokedByPolicy File: services/core/java/com/android/server/pm/permission/PermissionManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-281" ]
CVE-2023-21249
MEDIUM
5.5
android
isPermissionRevokedByPolicy
services/core/java/com/android/server/pm/permission/PermissionManagerService.java
c00b7e7dbc1fa30339adef693d02a51254755d7f
0
Analyze the following code function for security vulnerabilities
public Field sub(String key, Lang lang) { String subKey; if (key.startsWith("[")) { subKey = name + key; } else { subKey = name + "." + key; } return form.field(subKey, lang); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sub File: web/play-java-forms/src/main/java/play/data/Form.java Repository: playframework The code follows secure coding practices.
[ "CWE-400" ]
CVE-2022-31018
MEDIUM
5
playframework
sub
web/play-java-forms/src/main/java/play/data/Form.java
15393b736df939e35e275af2347155f296c684f2
0
Analyze the following code function for security vulnerabilities
@Override protected void onServiceReady(ICarrierMessagingService carrierMessagingService) { try { carrierMessagingService.sendMultipartTextSms( mParts, getSubId(), mTrackers[0].mDestAddress, mSenderCallback); } catch (RemoteException e) { Rlog.e(TAG, "Exception sending the SMS: " + e); mSenderCallback.onSendMultipartSmsComplete( CarrierMessagingService.SEND_STATUS_RETRY_ON_CARRIER_NETWORK, null /* smsResponse */); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onServiceReady File: src/java/com/android/internal/telephony/SMSDispatcher.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2015-3858
HIGH
9.3
android
onServiceReady
src/java/com/android/internal/telephony/SMSDispatcher.java
df31d37d285dde9911b699837c351aed2320b586
0
Analyze the following code function for security vulnerabilities
private boolean updateGlobalSetting(String name, String value, int requestingUserId, boolean forceNotify) { if (DEBUG) { Slog.v(LOG_TAG, "updateGlobalSetting(" + name + ", " + value + ")"); } return mutateGlobalSetting(name, value, requestingUserId, MUTATION_OPERATION_UPDATE, forceNotify); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: updateGlobalSetting File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3876
HIGH
7.2
android
updateGlobalSetting
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
91fc934bb2e5ea59929bb2f574de6db9b5100745
0
Analyze the following code function for security vulnerabilities
public static void startStopPending(Activity activity) { ConversationFragment fragment = findConversationFragment(activity); if (fragment != null) { fragment.messageListAdapter.startStopPending(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: startStopPending 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
startStopPending
src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
7177c523a1b31988666b9337249a4f1d0c36f479
0
Analyze the following code function for security vulnerabilities
public final Date getGenerationDate() { return new Date(generationDate); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getGenerationDate File: src/net/sourceforge/plantuml/version/LicenseInfo.java Repository: plantuml The code follows secure coding practices.
[ "CWE-284" ]
CVE-2023-3431
MEDIUM
5.3
plantuml
getGenerationDate
src/net/sourceforge/plantuml/version/LicenseInfo.java
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
0
Analyze the following code function for security vulnerabilities
@Override public void onNotificationActionClick(int callingUid, int callingPid, String key, int actionIndex) { synchronized (mNotificationList) { NotificationRecord r = mNotificationsByKey.get(key); if (r == null) { Log.w(TAG, "No notification with key: " + key); return; } final long now = System.currentTimeMillis(); EventLogTags.writeNotificationActionClicked(key, actionIndex, r.getLifespanMs(now), r.getFreshnessMs(now), r.getExposureMs(now)); // TODO: Log action click via UsageStats. } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onNotificationActionClick File: services/core/java/com/android/server/notification/NotificationManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2016-3884
MEDIUM
4.3
android
onNotificationActionClick
services/core/java/com/android/server/notification/NotificationManagerService.java
61e9103b5725965568e46657f4781dd8f2e5b623
0
Analyze the following code function for security vulnerabilities
public void clearCache(){ //clear the cache for (String cacheGroup : getGroups()) { cache.flushGroup(cacheGroup); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: clearCache File: src/com/dotmarketing/cache/ContentTypeCacheImpl.java Repository: dotCMS/core The code follows secure coding practices.
[ "CWE-89" ]
CVE-2016-2355
HIGH
7.5
dotCMS/core
clearCache
src/com/dotmarketing/cache/ContentTypeCacheImpl.java
897f3632d7e471b7a73aabed5b19f6f53d4e5562
0
Analyze the following code function for security vulnerabilities
public AccessibilityNodeProvider getAccessibilityNodeProvider() { if (mBrowserAccessibilityManager != null) { return mBrowserAccessibilityManager.getAccessibilityNodeProvider(); } if (mNativeAccessibilityAllowed && !mNativeAccessibilityEnabled && mNativeContentViewCore != 0 && Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { mNativeAccessibilityEnabled = true; nativeSetAccessibilityEnabled(mNativeContentViewCore, true); } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAccessibilityNodeProvider 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
getAccessibilityNodeProvider
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
98a50b76141f0b14f292f49ce376e6554142d5e2
0
Analyze the following code function for security vulnerabilities
public static String getSourceFilePath(String fileName, String format) throws PresentationException, IndexUnreachableException { String pi = FilenameUtils.getBaseName(fileName); String dataRepository = DataManager.getInstance().getSearchIndex().findDataRepositoryName(pi); return getSourceFilePath(fileName, dataRepository, format); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSourceFilePath 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
getSourceFilePath
goobi-viewer-core/src/main/java/io/goobi/viewer/controller/DataFileTools.java
44ceb8e2e7e888391e8a941127171d6366770df3
0
Analyze the following code function for security vulnerabilities
@Override public ServerBuilder tls(InputStream keyCertChainInputStream, InputStream keyInputStream) { return (ServerBuilder) TlsSetters.super.tls(keyCertChainInputStream, keyInputStream); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: tls File: core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java Repository: line/armeria The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-44487
HIGH
7.5
line/armeria
tls
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
df7f85824a62e997b910b5d6194a3335841065fd
0
Analyze the following code function for security vulnerabilities
private void addPackageParticipantsLockedInner(String packageName, List<PackageInfo> targetPkgs) { if (MORE_DEBUG) { Slog.v(TAG, "Examining " + packageName + " for backup agent"); } for (PackageInfo pkg : targetPkgs) { if (packageName == null || pkg.packageName.equals(packageName)) { int uid = pkg.applicationInfo.uid; HashSet<String> set = mBackupParticipants.get(uid); if (set == null) { set = new HashSet<String>(); mBackupParticipants.put(uid, set); } set.add(pkg.packageName); if (MORE_DEBUG) Slog.v(TAG, "Agent found; added"); // Schedule a backup for it on general principles if (MORE_DEBUG) Slog.i(TAG, "Scheduling backup for new app " + pkg.packageName); dataChangedImpl(pkg.packageName); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addPackageParticipantsLockedInner 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
addPackageParticipantsLockedInner
services/backup/java/com/android/server/backup/BackupManagerService.java
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
0
Analyze the following code function for security vulnerabilities
private void sendConnectedState() { mNetworkAgent.markConnected(); sendNetworkChangeBroadcast(DetailedState.CONNECTED); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: sendConnectedState File: service/java/com/android/server/wifi/ClientModeImpl.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21242
CRITICAL
9.8
android
sendConnectedState
service/java/com/android/server/wifi/ClientModeImpl.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
@Override public AuthenticatorDescription[] getAuthenticatorTypes(int userId) { int callingUid = Binder.getCallingUid(); if (Log.isLoggable(TAG, Log.VERBOSE)) { Log.v(TAG, "getAuthenticatorTypes: " + "for user id " + userId + " caller's uid " + callingUid + ", pid " + Binder.getCallingPid()); } // Only allow the system process to read accounts of other users if (isCrossUser(callingUid, userId)) { throw new SecurityException( String.format( "User %s tying to get authenticator types for %s" , UserHandle.getCallingUserId(), userId)); } final long identityToken = clearCallingIdentity(); try { return getAuthenticatorTypesInternal(userId); } finally { restoreCallingIdentity(identityToken); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAuthenticatorTypes File: services/core/java/com/android/server/accounts/AccountManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-Other", "CWE-502" ]
CVE-2023-45777
HIGH
7.8
android
getAuthenticatorTypes
services/core/java/com/android/server/accounts/AccountManagerService.java
f810d81839af38ee121c446105ca67cb12992fc6
0
Analyze the following code function for security vulnerabilities
void handleStartUser(int userId) { synchronized (getLockObject()) { pushScreenCapturePolicy(userId); if (!isPolicyEngineForFinanceFlagEnabled()) { pushUserControlDisabledPackagesLocked(userId); } } pushUserRestrictions(userId); // When system user is started (device boot), load cache for all users. // This is to mitigate the potential race between loading the cache and keyguard // reading the value during user switch, due to onStartUser() being asynchronous. updatePasswordQualityCacheForUserGroup( userId == UserHandle.USER_SYSTEM ? UserHandle.USER_ALL : userId); updatePermissionPolicyCache(userId); updateAdminCanGrantSensorsPermissionCache(userId); final List<PreferentialNetworkServiceConfig> preferentialNetworkServiceConfigs; synchronized (getLockObject()) { ActiveAdmin owner = getDeviceOrProfileOwnerAdminLocked(userId); preferentialNetworkServiceConfigs = owner != null ? owner.mPreferentialNetworkServiceConfigs : List.of(PreferentialNetworkServiceConfig.DEFAULT); } updateNetworkPreferenceForUser(userId, preferentialNetworkServiceConfigs); if (isProfileOwnerOfOrganizationOwnedDevice(userId) && getManagedSubscriptionsPolicy().getPolicyType() == ManagedSubscriptionsPolicy.TYPE_ALL_MANAGED_SUBSCRIPTIONS) { updateDialerAndSmsManagedShortcutsOverrideCache(); } startOwnerService(userId, "start-user"); if (isPermissionCheckFlagEnabled() || isPolicyEngineForFinanceFlagEnabled()) { mDevicePolicyEngine.handleStartUser(userId); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handleStartUser File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40089
HIGH
7.8
android
handleStartUser
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
@Beta public static MappedByteBuffer map(File file, MapMode mode) throws IOException { return mapInternal(file, mode, -1); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: map File: guava/src/com/google/common/io/Files.java Repository: google/guava The code follows secure coding practices.
[ "CWE-732" ]
CVE-2020-8908
LOW
2.1
google/guava
map
guava/src/com/google/common/io/Files.java
fec0dbc4634006a6162cfd4d0d09c962073ddf40
0
Analyze the following code function for security vulnerabilities
@Override public String toString() { return " at " + this.index + " [character " + this.character + " line " + this.line + "]"; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toString File: src/main/java/org/json/JSONTokener.java Repository: stleary/JSON-java The code follows secure coding practices.
[ "CWE-787" ]
CVE-2022-45690
HIGH
7.5
stleary/JSON-java
toString
src/main/java/org/json/JSONTokener.java
7a124d857dc8da1165c87fa788e53359a317d0f7
0
Analyze the following code function for security vulnerabilities
@Override public int broadcastIntent(Intent intent, IIntentReceiver resultTo, String[] requiredPermissions, boolean serialized, int userId, int[] appIdAllowList, @Nullable Bundle bOptions) { synchronized (ActivityManagerService.this) { intent = verifyBroadcastLocked(intent); final int callingPid = Binder.getCallingPid(); final int callingUid = Binder.getCallingUid(); final long origId = Binder.clearCallingIdentity(); try { return ActivityManagerService.this.broadcastIntentLocked(null /*callerApp*/, null /*callerPackage*/, null /*callingFeatureId*/, intent, null /*resolvedType*/, resultTo, 0 /*resultCode*/, null /*resultData*/, null /*resultExtras*/, requiredPermissions, null /*excludedPermissions*/, null /*excludedPackages*/, AppOpsManager.OP_NONE, bOptions /*options*/, serialized, false /*sticky*/, callingPid, callingUid, callingUid, callingPid, userId, false /*allowBackgroundStarts*/, null /*tokenNeededForBackgroundActivityStarts*/, appIdAllowList); } finally { Binder.restoreCallingIdentity(origId); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: broadcastIntent 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
broadcastIntent
services/core/java/com/android/server/am/ActivityManagerService.java
d10b27e539f7bc91c2360d429b9d05f05274670d
0
Analyze the following code function for security vulnerabilities
public void onScreenAwakeChanged(boolean isAwake) { mH.post(() -> { for (int i = mScreenObservers.size() - 1; i >= 0; i--) { mScreenObservers.get(i).onAwakeStateChanged(isAwake); } }); if (isAwake) { return; } // If the device is going to sleep, keep a higher priority temporarily for potential // animation of system UI. Even if AOD is not enabled, it should be no harm. final WindowProcessController proc; synchronized (mGlobalLockWithoutBoost) { final WindowState notificationShade = mRootWindowContainer.getDefaultDisplay() .getDisplayPolicy().getNotificationShade(); proc = notificationShade != null ? mProcessMap.getProcess(notificationShade.mSession.mPid) : null; } if (proc == null) { return; } // Set to activity manager directly to make sure the state can be seen by the subsequent // update of scheduling group. proc.setRunningAnimationUnsafe(); mH.removeMessages(H.UPDATE_PROCESS_ANIMATING_STATE, proc); mH.sendMessageDelayed(mH.obtainMessage(H.UPDATE_PROCESS_ANIMATING_STATE, proc), DOZE_ANIMATING_STATE_RETAIN_TIME_MS); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onScreenAwakeChanged File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40094
HIGH
7.8
android
onScreenAwakeChanged
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
1120bc7e511710b1b774adf29ba47106292365e7
0
Analyze the following code function for security vulnerabilities
Collection<Call> getCalls() { return Collections.unmodifiableCollection(mCalls); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCalls File: src/com/android/server/telecom/CallsManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-2423
MEDIUM
6.6
android
getCalls
src/com/android/server/telecom/CallsManager.java
a06c9a4aef69ae27b951523cf72bf72412bf48fa
0
Analyze the following code function for security vulnerabilities
private final void performLayoutAndPlaceSurfacesLocked() { int loopCount = 6; do { mTraversalScheduled = false; performLayoutAndPlaceSurfacesLockedLoop(); mH.removeMessages(H.DO_TRAVERSAL); loopCount--; } while (mTraversalScheduled && loopCount > 0); mInnerFields.mWallpaperActionPending = false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: performLayoutAndPlaceSurfacesLocked File: services/core/java/com/android/server/wm/WindowManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3875
HIGH
7.2
android
performLayoutAndPlaceSurfacesLocked
services/core/java/com/android/server/wm/WindowManagerService.java
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
0
Analyze the following code function for security vulnerabilities
@Nullable protected AttachmentSupport getAttachmentSupport() { return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAttachmentSupport File: server-core/src/main/java/io/onedev/server/web/component/markdown/MarkdownEditor.java Repository: theonedev/onedev The code follows secure coding practices.
[ "CWE-502" ]
CVE-2021-21242
HIGH
7.5
theonedev/onedev
getAttachmentSupport
server-core/src/main/java/io/onedev/server/web/component/markdown/MarkdownEditor.java
f864053176c08f59ef2d97fea192ceca46a4d9be
0
Analyze the following code function for security vulnerabilities
public void onAffordanceLaunchEnded() { mLaunchingAffordance = false; setLaunchingAffordance(false); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onAffordanceLaunchEnded File: packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2017-0822
HIGH
7.5
android
onAffordanceLaunchEnded
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
public boolean isSimPinSecure() { // True if any SIM is pin secure for (SubscriptionInfo info : getSubscriptionInfo(false /* forceReload */)) { if (isSimPinSecure(getSimState(info.getSubscriptionId()))) return true; } return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isSimPinSecure File: packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3917
HIGH
7.2
android
isSimPinSecure
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
f5334952131afa835dd3f08601fb3bced7b781cd
0
Analyze the following code function for security vulnerabilities
private void skipWhiteSpace() throws IOException { while (!isEndOfText()) { while (isWhiteSpace()) read(); if (current=='#' || current=='/' && peek()=='/') { do { read(); } while (current>=0 && current!='\n'); } else if (current=='/' && peek()=='*') { read(); do { read(); } while (current>=0 && !(current=='*' && peek()=='/')); read(); read(); } else break; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: skipWhiteSpace File: src/main/org/hjson/HjsonParser.java Repository: hjson/hjson-java The code follows secure coding practices.
[ "CWE-787" ]
CVE-2023-34620
HIGH
7.5
hjson/hjson-java
skipWhiteSpace
src/main/org/hjson/HjsonParser.java
00e3b1325cb6c2b80b347dbec9181fd17ce0a599
0
Analyze the following code function for security vulnerabilities
private TemporaryAttachmentSessionsManager getTemporaryAttachmentManager() { return Utils.getComponent(TemporaryAttachmentSessionsManager.class); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTemporaryAttachmentManager File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-74" ]
CVE-2023-29523
HIGH
8.8
xwiki/xwiki-platform
getTemporaryAttachmentManager
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
0d547181389f7941e53291af940966413823f61c
0
Analyze the following code function for security vulnerabilities
@Override public String getDateParameterSQL(Date param) { // timestamp '2015-08-24 13:14:36.615' return "TIMESTAMP '" + dateFormat.format(param) + "'"; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getDateParameterSQL File: dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java Repository: dashbuilder The code follows secure coding practices.
[ "CWE-89" ]
CVE-2016-4999
HIGH
7.5
dashbuilder
getDateParameterSQL
dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java
8574899e3b6455547b534f570b2330ff772e524b
0
Analyze the following code function for security vulnerabilities
@Override public int getAllPhoneAccountsCount() { synchronized (mLock) { try { // This list is pre-filtered for the calling user. return getAllPhoneAccounts().size(); } catch (Exception e) { Log.e(this, e, "getAllPhoneAccountsCount"); throw e; } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAllPhoneAccountsCount File: src/com/android/server/telecom/TelecomServiceImpl.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-0847
HIGH
7.2
android
getAllPhoneAccountsCount
src/com/android/server/telecom/TelecomServiceImpl.java
2750faaa1ec819eed9acffea7bd3daf867fda444
0
Analyze the following code function for security vulnerabilities
@Override public Syntax getTargetSyntax() { return this.parameters.getTargetSyntax(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTargetSyntax File: xwiki-platform-core/xwiki-platform-display/xwiki-platform-display-api/src/main/java/org/xwiki/display/internal/DocumentContentAsyncRenderer.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-459" ]
CVE-2023-36468
HIGH
8.8
xwiki/xwiki-platform
getTargetSyntax
xwiki-platform-core/xwiki-platform-display/xwiki-platform-display-api/src/main/java/org/xwiki/display/internal/DocumentContentAsyncRenderer.java
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
0
Analyze the following code function for security vulnerabilities
private static int computeMaxAge(final HttpQuery query, final long start_time, final long end_time, final long now) { // If the end time is in the future (1), make the graph uncacheable. // Otherwise, if the end time is far enough in the past (2) such that // no TSD can still be writing to rows for that time span and it's not // specified in a relative fashion (3) (e.g. "1d-ago"), make the graph // cacheable for a day since it's very unlikely that any data will change // for this time span. // Otherwise (4), allow the client to cache the graph for ~0.1% of the // time span covered by the request e.g., for 1h of data, it's OK to // serve something 3s stale, for 1d of data, 84s stale. if (end_time > now) { // (1) return 0; } else if (end_time < now - Const.MAX_TIMESPAN // (2) && !DateTime.isRelativeDate( query.getQueryStringParam("start")) // (3) && !DateTime.isRelativeDate( query.getQueryStringParam("end"))) { return 86400; } else { // (4) return (int) (end_time - start_time) >> 10; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: computeMaxAge File: src/tsd/GraphHandler.java Repository: OpenTSDB/opentsdb The code follows secure coding practices.
[ "CWE-78" ]
CVE-2023-25826
CRITICAL
9.8
OpenTSDB/opentsdb
computeMaxAge
src/tsd/GraphHandler.java
26be40a5e5b6ce8b0b1e4686c4b0d7911e5d8a25
0
Analyze the following code function for security vulnerabilities
public static Person getPerson(String id) { Person person = null; if (id != null) { id = id.trim(); // see if this is parseable int; if so, try looking up by id try { //handle integer: id int personId = Integer.parseInt(id); person = Context.getPersonService().getPerson(personId); if (person != null) { return person; } } catch (Exception ex) { //do nothing } // handle uuid id: "a3e1302b-74bf-11df-9768-17cfc9833272", if id matches uuid format if (isValidUuidFormat(id)) { person = Context.getPersonService().getPersonByUuid(id); if (person != null) { return person; } } // handle username User personByUsername = Context.getUserService().getUserByUsername(id); if (personByUsername != null) { return personByUsername.getPerson(); } // try the "5090 - Bob Jones" case if (id.contains(" ")) { String[] values = id.split(" "); try { int personId = Integer.parseInt(values[0]); person = Context.getPersonService().getPerson(personId); if (person != null) { return person; } } catch (Exception ex) { //do nothing } } } // no match found, so return null return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPerson 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
getPerson
api/src/main/java/org/openmrs/module/htmlformentry/HtmlFormEntryUtil.java
9dcd304688e65c31cac5532fe501b9816ed975ae
0
Analyze the following code function for security vulnerabilities
@Override public void keepScreenOnStoppedLw() { if (isKeyguardShowingAndNotOccluded()) { mPowerManager.userActivity(SystemClock.uptimeMillis(), false); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: keepScreenOnStoppedLw 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
keepScreenOnStoppedLw
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
84669ca8de55d38073a0dcb01074233b0a417541
0
Analyze the following code function for security vulnerabilities
void killAppAtUsersRequest(ProcessRecord app, Dialog fromDialog) { synchronized (this) { app.crashing = false; app.crashingReport = null; app.notResponding = false; app.notRespondingReport = null; if (app.anrDialog == fromDialog) { app.anrDialog = null; } if (app.waitDialog == fromDialog) { app.waitDialog = null; } if (app.pid > 0 && app.pid != MY_PID) { handleAppCrashLocked(app, null, null, null); app.kill("user request after error", true); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: killAppAtUsersRequest 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
killAppAtUsersRequest
services/core/java/com/android/server/am/ActivityManagerService.java
aaa0fee0d7a8da347a0c47cef5249c70efee209e
0
Analyze the following code function for security vulnerabilities
public boolean isDevModeRequest(HttpServletRequest request) { String pathInfo = request.getPathInfo(); return pathInfo != null && pathInfo.startsWith("/" + VAADIN_MAPPING) && !pathInfo .startsWith("/" + StreamRequestHandler.DYN_RES_PREFIX); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isDevModeRequest File: flow-server/src/main/java/com/vaadin/flow/server/DevModeHandler.java Repository: vaadin/flow The code follows secure coding practices.
[ "CWE-22" ]
CVE-2020-36321
MEDIUM
5
vaadin/flow
isDevModeRequest
flow-server/src/main/java/com/vaadin/flow/server/DevModeHandler.java
6ae6460ca4f3a9b50bd46fbf49c807fe67718307
0
Analyze the following code function for security vulnerabilities
private void reportDeviceConfigAccess(@Nullable String prefix) { if (prefix == null) { return; } String callingPackage = resolveCallingPackage(); String namespace = prefix.replace("/", ""); if (DeviceConfig.getPublicNamespaces().contains(namespace)) { return; } synchronized (mLock) { if (mConfigMonitorCallback != null) { Bundle callbackResult = new Bundle(); callbackResult.putString(Settings.EXTRA_MONITOR_CALLBACK_TYPE, Settings.EXTRA_ACCESS_CALLBACK); callbackResult.putString(Settings.EXTRA_CALLING_PACKAGE, callingPackage); callbackResult.putString(Settings.EXTRA_NAMESPACE, namespace); mConfigMonitorCallback.sendResult(callbackResult); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: reportDeviceConfigAccess File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-40117
HIGH
7.8
android
reportDeviceConfigAccess
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
ff86ff28cf82124f8e65833a2dd8c319aea08945
0
Analyze the following code function for security vulnerabilities
public boolean startNextMatchingActivity(IBinder callingActivity, Intent intent, Bundle options) throws RemoteException;
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: startNextMatchingActivity File: core/java/android/app/IActivityManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
startNextMatchingActivity
core/java/android/app/IActivityManager.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
protected CompletableFuture<InactiveTopicPolicies> internalGetInactiveTopicPolicies(boolean applied) { return getTopicPoliciesAsyncWithRetry(topicName) .thenApply(op -> op.map(TopicPolicies::getInactiveTopicPolicies) .orElseGet(() -> { if (applied) { InactiveTopicPolicies policies = getNamespacePolicies(namespaceName).inactive_topic_policies; return policies == null ? new InactiveTopicPolicies( config().getBrokerDeleteInactiveTopicsMode(), config().getBrokerDeleteInactiveTopicsMaxInactiveDurationSeconds(), config().isBrokerDeleteInactiveTopicsEnabled()) : policies; } return null; })); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: internalGetInactiveTopicPolicies File: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java Repository: apache/pulsar The code follows secure coding practices.
[ "CWE-863" ]
CVE-2021-41571
MEDIUM
4
apache/pulsar
internalGetInactiveTopicPolicies
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
5b35bb81c31f1bc2ad98c9fde5b39ec68110ca52
0
Analyze the following code function for security vulnerabilities
public void deleteBodyFile(String scenarioDefinition) { MsTestElement msTestElement = GenerateHashTreeUtil.parseScenarioDefinition(scenarioDefinition); List<MsHTTPSamplerProxy> httpSampleFromHashTree = MsHTTPSamplerProxy.findHttpSampleFromHashTree(msTestElement); httpSampleFromHashTree.forEach((httpSamplerProxy) -> { if (httpSamplerProxy.isCustomizeReq()) { FileUtils.deleteBodyFiles(httpSamplerProxy.getId()); } }); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: deleteBodyFile File: backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java Repository: metersphere The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2021-45789
MEDIUM
6.5
metersphere
deleteBodyFile
backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java
d74e02cdff47cdf7524d305d098db6ffb7f61b47
0
Analyze the following code function for security vulnerabilities
@Override public OnGoingLogicalCondition gte(ComparableFunction<T> value) { Condition conditionLocal = new GteCondition<T>(selector, selector.generateParameter(value)); return getOnGoingLogicalCondition(conditionLocal); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: gte File: src/main/java/org/torpedoquery/jpa/internal/conditions/ConditionBuilder.java Repository: xjodoin/torpedoquery The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2019-11343
HIGH
7.5
xjodoin/torpedoquery
gte
src/main/java/org/torpedoquery/jpa/internal/conditions/ConditionBuilder.java
3c20b874fba9cc2a78b9ace10208de1602b56c3f
0
Analyze the following code function for security vulnerabilities
public void saveEditor() throws CommitException { try { editorSaving = true; editorFieldGroup.commit(); } finally { editorSaving = false; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: saveEditor File: server/src/main/java/com/vaadin/ui/Grid.java Repository: vaadin/framework The code follows secure coding practices.
[ "CWE-79" ]
CVE-2019-25028
MEDIUM
4.3
vaadin/framework
saveEditor
server/src/main/java/com/vaadin/ui/Grid.java
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
0
Analyze the following code function for security vulnerabilities
public boolean hasExpired() { return owner != null && System.currentTimeMillis() > this.expirationDate; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hasExpired File: src/net/sourceforge/plantuml/version/LicenseInfo.java Repository: plantuml The code follows secure coding practices.
[ "CWE-284" ]
CVE-2023-3431
MEDIUM
5.3
plantuml
hasExpired
src/net/sourceforge/plantuml/version/LicenseInfo.java
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
0
Analyze the following code function for security vulnerabilities
@Override public int getMaxShortcutCountPerActivity(String packageName, @UserIdInt int userId) throws RemoteException { verifyCaller(packageName, userId); return mMaxShortcuts; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getMaxShortcutCountPerActivity 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
getMaxShortcutCountPerActivity
services/core/java/com/android/server/pm/ShortcutService.java
96e0524c48c6e58af7d15a2caf35082186fc8de2
0
Analyze the following code function for security vulnerabilities
@Override public Set<String> getSelfReferencingDataPaths() { return Set.of("pluginSpecifiedTemplates[" + PAGINATION_DATA_INDEX + "].value.limitBased.limit.value", "pluginSpecifiedTemplates[" + PAGINATION_DATA_INDEX + "].value.limitBased.offset.value", "pluginSpecifiedTemplates[" + PAGINATION_DATA_INDEX + "].value.cursorBased.next.limit.value", "pluginSpecifiedTemplates[" + PAGINATION_DATA_INDEX + "].value.cursorBased.next.cursor.value", "pluginSpecifiedTemplates[" + PAGINATION_DATA_INDEX + "].value.cursorBased.previous.limit.value", "pluginSpecifiedTemplates[" + PAGINATION_DATA_INDEX + "].value.cursorBased.previous.cursor.value"); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getSelfReferencingDataPaths File: app/server/appsmith-plugins/graphqlPlugin/src/main/java/com/external/plugins/GraphQLPlugin.java Repository: appsmithorg/appsmith The code follows secure coding practices.
[ "CWE-918" ]
CVE-2022-4096
MEDIUM
6.5
appsmithorg/appsmith
getSelfReferencingDataPaths
app/server/appsmith-plugins/graphqlPlugin/src/main/java/com/external/plugins/GraphQLPlugin.java
769719ccfe667f059fe0b107a19ec9feb90f2e40
0
Analyze the following code function for security vulnerabilities
public void encryptTextMessage(Message message) { activity.xmppConnectionService.getPgpEngine().encrypt(message, new UiCallback<Message>() { @Override public void userInputRequried(PendingIntent pi, Message message) { startPendingIntent(pi, REQUEST_SEND_MESSAGE); } @Override public void success(Message message) { //TODO the following two call can be made before the callback getActivity().runOnUiThread(() -> messageSent()); } @Override public void error(final int error, Message message) { getActivity().runOnUiThread(() -> { doneSendingPgpMessage(); Toast.makeText(getActivity(), R.string.unable_to_connect_to_keychain, Toast.LENGTH_SHORT).show(); }); } }); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: encryptTextMessage 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
encryptTextMessage
src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
7177c523a1b31988666b9337249a4f1d0c36f479
0
Analyze the following code function for security vulnerabilities
public static ResourceEvaluation evaluate(File file, String filename) { ResourceEvaluation eval = new ResourceEvaluation(); try { ImsManifestFileFilter visitor = new ImsManifestFileFilter(); Path fPath = PathUtils.visit(file, filename, visitor); if(visitor.isValid()) { Path realManifestPath = visitor.getManifestPath(); Path manifestPath = fPath.resolve(realManifestPath); RootSearcher rootSearcher = new RootSearcher(); Files.walkFileTree(fPath, rootSearcher); if(rootSearcher.foundRoot()) { manifestPath = rootSearcher.getRoot().resolve(IMS_MANIFEST); } else { manifestPath = fPath.resolve(IMS_MANIFEST); } QTI21ContentPackage cp = new QTI21ContentPackage(manifestPath); if(validateImsManifest(cp, new PathResourceLocator(manifestPath.getParent()))) { eval.setValid(true); } else { eval.setValid(false); } } else { eval.setValid(false); } PathUtils.closeSubsequentFS(fPath); } catch (IOException | IllegalArgumentException e) { log.error("", e); eval.setValid(false); } return eval; }
Vulnerability Classification: - CWE: CWE-22 - CVE: CVE-2021-39180 - Severity: HIGH - CVSS Score: 9.0 Description: OO-5549: fix the wiki import and add some unit tests Function: evaluate File: src/main/java/org/olat/fileresource/types/ImsQTI21Resource.java Repository: OpenOLAT Fixed Code: public static ResourceEvaluation evaluate(File file, String filename) { ResourceEvaluation eval = new ResourceEvaluation(); try { ImsManifestFileFilter visitor = new ImsManifestFileFilter(); Path fPath = PathUtils.visit(file, filename, visitor); if(visitor.isValid()) { Path realManifestPath = visitor.getManifestPath(); Path manifestPath = fPath.resolve(realManifestPath); RootSearcher rootSearcher = new RootSearcher(); Files.walkFileTree(fPath, EnumSet.noneOf(FileVisitOption.class), 16, rootSearcher); if(rootSearcher.foundRoot()) { manifestPath = rootSearcher.getRoot().resolve(IMS_MANIFEST); } else { manifestPath = fPath.resolve(IMS_MANIFEST); } QTI21ContentPackage cp = new QTI21ContentPackage(manifestPath); if(validateImsManifest(cp, new PathResourceLocator(manifestPath.getParent()))) { eval.setValid(true); } else { eval.setValid(false); } } else { eval.setValid(false); } PathUtils.closeSubsequentFS(fPath); } catch (IOException | IllegalArgumentException e) { log.error("", e); eval.setValid(false); } return eval; }
[ "CWE-22" ]
CVE-2021-39180
HIGH
9
OpenOLAT
evaluate
src/main/java/org/olat/fileresource/types/ImsQTI21Resource.java
699490be8e931af0ef1f135c55384db1f4232637
1
Analyze the following code function for security vulnerabilities
@Override public MergeTarget newEmptyTargetForField( Descriptors.FieldDescriptor field, Message defaultInstance) { Message.Builder subBuilder; if (defaultInstance != null) { subBuilder = defaultInstance.newBuilderForType(); } else { subBuilder = builder.newBuilderForField(field); } return new BuilderAdapter(subBuilder); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: newEmptyTargetForField File: java/core/src/main/java/com/google/protobuf/MessageReflection.java Repository: protocolbuffers/protobuf The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2022-3509
HIGH
7.5
protocolbuffers/protobuf
newEmptyTargetForField
java/core/src/main/java/com/google/protobuf/MessageReflection.java
a3888f53317a8018e7a439bac4abeb8f3425d5e9
0
Analyze the following code function for security vulnerabilities
@Override public final int size() { return size; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: size File: core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java Repository: line/armeria The code follows secure coding practices.
[ "CWE-74" ]
CVE-2019-16771
MEDIUM
5
line/armeria
size
core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
b597f7a865a527a84ee3d6937075cfbb4470ed20
0
Analyze the following code function for security vulnerabilities
private static native @AnyRes int nativeGetResourceIdentifier(long ptr, @NonNull String name, @Nullable String defType, @Nullable String defPackage);
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: nativeGetResourceIdentifier File: core/java/android/content/res/AssetManager.java Repository: android The code follows secure coding practices.
[ "CWE-415" ]
CVE-2023-40103
HIGH
7.8
android
nativeGetResourceIdentifier
core/java/android/content/res/AssetManager.java
c3bc12c484ef3bbca4cec19234437c45af5e584d
0
Analyze the following code function for security vulnerabilities
public String generateRandomString(int size) { return RandomStringUtils.randomAlphanumeric(size); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: generateRandomString 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
generateRandomString
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
f9a677408ffb06f309be46ef9d8df1915d9099a4
0
Analyze the following code function for security vulnerabilities
private boolean doesSignatureMatchForPermissions(@NonNull String sourcePackageName, @NonNull ParsedPackage parsedPackage, int scanFlags) { // If the defining package is signed with our cert, it's okay. This // also includes the "updating the same package" case, of course. // "updating same package" could also involve key-rotation. final PackageSetting sourcePackageSetting; final KeySetManagerService ksms; final SharedUserSetting sharedUserSetting; synchronized (mPm.mLock) { sourcePackageSetting = mPm.mSettings.getPackageLPr(sourcePackageName); ksms = mPm.mSettings.getKeySetManagerService(); sharedUserSetting = mPm.mSettings.getSharedUserSettingLPr(sourcePackageSetting); } final SigningDetails sourceSigningDetails = (sourcePackageSetting == null ? SigningDetails.UNKNOWN : sourcePackageSetting.getSigningDetails()); if (sourcePackageName.equals(parsedPackage.getPackageName()) && (ksms.shouldCheckUpgradeKeySetLocked( sourcePackageSetting, sharedUserSetting, scanFlags))) { return ksms.checkUpgradeKeySetLocked(sourcePackageSetting, parsedPackage); } else { // in the event of signing certificate rotation, we need to see if the // package's certificate has rotated from the current one, or if it is an // older certificate with which the current is ok with sharing permissions if (sourceSigningDetails.checkCapability( parsedPackage.getSigningDetails(), SigningDetails.CertCapabilities.PERMISSION)) { return true; } else if (parsedPackage.getSigningDetails().checkCapability( sourceSigningDetails, SigningDetails.CertCapabilities.PERMISSION)) { // the scanned package checks out, has signing certificate rotation // history, and is newer; bring it over synchronized (mPm.mLock) { sourcePackageSetting.setSigningDetails(parsedPackage.getSigningDetails()); } return true; } else { return false; } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: doesSignatureMatchForPermissions File: services/core/java/com/android/server/pm/InstallPackageHelper.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21257
HIGH
7.8
android
doesSignatureMatchForPermissions
services/core/java/com/android/server/pm/InstallPackageHelper.java
1aec7feaf07e6d4568ca75d18158445dbeac10f6
0
Analyze the following code function for security vulnerabilities
private void doPreDeleteChecks(String applicationName, String tenantDomain, String username) throws IdentityApplicationManagementException { if (!ApplicationMgtUtil.isUserAuthorized(applicationName, username)) { String message = "Illegal Access! User " + username + " does not have access to delete the application: '" + applicationName + "' of tenantDomain: " + tenantDomain; log.warn(message); throw buildClientException(OPERATION_FORBIDDEN, message); } if (StringUtils.equals(applicationName, ApplicationConstants.LOCAL_SP)) { String msg = "Cannot delete tenant resident service provider: " + ApplicationConstants.LOCAL_SP; throw buildClientException(OPERATION_FORBIDDEN, msg); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: doPreDeleteChecks File: components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java Repository: wso2/carbon-identity-framework The code follows secure coding practices.
[ "CWE-611" ]
CVE-2021-42646
MEDIUM
6.4
wso2/carbon-identity-framework
doPreDeleteChecks
components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
e9119883ee02a884f3c76c7bbc4022a4f4c58fc0
0
Analyze the following code function for security vulnerabilities
TelecomManager getTelecommService() { return (TelecomManager) mContext.getSystemService(Context.TELECOM_SERVICE); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTelecommService 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
getTelecommService
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
84669ca8de55d38073a0dcb01074233b0a417541
0
Analyze the following code function for security vulnerabilities
private void setKeepProfileRunningEnabledUnchecked(boolean keepProfileRunning) { synchronized (getLockObject()) { DevicePolicyData policyData = getUserDataUnchecked(UserHandle.USER_SYSTEM); if (policyData.mEffectiveKeepProfilesRunning == keepProfileRunning) { return; } policyData.mEffectiveKeepProfilesRunning = keepProfileRunning; saveSettingsLocked(UserHandle.USER_SYSTEM); } suspendAppsForQuietProfiles(keepProfileRunning); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setKeepProfileRunningEnabledUnchecked File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40089
HIGH
7.8
android
setKeepProfileRunningEnabledUnchecked
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
private void putEntry(XarEntry entry) { this.entries.put(entry, entry); this.packageFiles.put(entry, entry); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: putEntry File: xwiki-platform-core/xwiki-platform-xar/xwiki-platform-xar-model/src/main/java/org/xwiki/xar/XarPackage.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-611" ]
CVE-2023-27480
HIGH
7.7
xwiki/xwiki-platform
putEntry
xwiki-platform-core/xwiki-platform-xar/xwiki-platform-xar-model/src/main/java/org/xwiki/xar/XarPackage.java
e3527b98fdd8dc8179c24dc55e662b2c55199434
0
Analyze the following code function for security vulnerabilities
public boolean validate(String[] classNames) throws XWikiException { return this.doc.validate(classNames, getXWikiContext()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: validate File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java Repository: xwiki/xwiki-platform The code follows secure coding practices.
[ "CWE-863" ]
CVE-2022-23615
MEDIUM
5.5
xwiki/xwiki-platform
validate
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
0
Analyze the following code function for security vulnerabilities
private void logMissingFeatureAction(String message) { Slogf.w(LOG_TAG, message + " because device does not have the " + PackageManager.FEATURE_DEVICE_ADMIN + " feature."); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: logMissingFeatureAction 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
logMissingFeatureAction
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
private void marshalResponse(List<SubscriptionRequest> requests, OutputStream out) throws IOException { out.write(ENVELOPE_TAG_OPEN); out.write(BODY_TAG_OPEN); for (SubscriptionRequest req : requests) { req.marshal(out); } out.write(BODY_TAG_CLOSE); out.write(ENVELOPE_TAG_CLOSE); out.flush(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: marshalResponse File: jboss-seam-remoting/src/main/java/org/jboss/seam/remoting/SubscriptionHandler.java Repository: seam2/jboss-seam The code follows secure coding practices.
[ "CWE-264", "CWE-200" ]
CVE-2013-6447
MEDIUM
5
seam2/jboss-seam
marshalResponse
jboss-seam-remoting/src/main/java/org/jboss/seam/remoting/SubscriptionHandler.java
090aa6252affc978a96c388e3fc2c1c2688d9bb5
0
Analyze the following code function for security vulnerabilities
private void initializeMandatoryDocument(String wiki, MandatoryDocumentInitializer initializer, XWikiContext context) { String currentWiki = context.getWikiId(); try { context.setWikiId(wiki); initializeMandatoryDocument(initializer, context); } finally { context.setWikiId(currentWiki); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: initializeMandatoryDocument 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
initializeMandatoryDocument
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 String getRawBuildsDir() { return buildsDir; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRawBuildsDir 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
getRawBuildsDir
core/src/main/java/jenkins/model/Jenkins.java
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
0
Analyze the following code function for security vulnerabilities
@Override public abstract String getUriForDisplay();
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getUriForDisplay File: config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java Repository: gocd The code follows secure coding practices.
[ "CWE-77" ]
CVE-2021-43286
MEDIUM
6.5
gocd
getUriForDisplay
config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
0
Analyze the following code function for security vulnerabilities
@Override public Location getCurrentLocation() throws IOException { Location l = getLastKnownLocation(); if (l == null) { throw new IOException("cannot retrieve location try later"); } return l; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCurrentLocation File: Ports/Android/src/com/codename1/location/AndroidLocationPlayServiceManager.java Repository: codenameone/CodenameOne The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-4903
MEDIUM
5.1
codenameone/CodenameOne
getCurrentLocation
Ports/Android/src/com/codename1/location/AndroidLocationPlayServiceManager.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
@Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { handle(httpGetHandler, req, resp); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: doGet File: agent/core/src/main/java/org/jolokia/http/AgentServlet.java Repository: jolokia The code follows secure coding practices.
[ "CWE-79" ]
CVE-2018-1000129
MEDIUM
4.3
jolokia
doGet
agent/core/src/main/java/org/jolokia/http/AgentServlet.java
5895d5c137c335e6b473e9dcb9baf748851bbc5f
0
Analyze the following code function for security vulnerabilities
@Exported public long getTimestamp() { return timestamp; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTimestamp File: core/src/main/java/hudson/slaves/OfflineCause.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-200" ]
CVE-2017-2603
LOW
3.5
jenkinsci/jenkins
getTimestamp
core/src/main/java/hudson/slaves/OfflineCause.java
3cd946cbef82c6da5ccccf3890d0ae4e091c4265
0
Analyze the following code function for security vulnerabilities
@Override protected InputSource getInputSource(final InputSource inputSource) throws IOException { return inputSource; }
Vulnerability Classification: - CWE: CWE-611 - CVE: CVE-2018-1000651 - Severity: HIGH - CVSS Score: 7.5 Description: gh-813 Turn on secure processing feature for XML parsers etc Function: getInputSource File: stroom-pipeline/src/main/java/stroom/pipeline/server/parser/XMLFragmentParser.java Repository: gchq/stroom Fixed Code: @Override protected InputSource getInputSource(final InputSource inputSource) { return inputSource; }
[ "CWE-611" ]
CVE-2018-1000651
HIGH
7.5
gchq/stroom
getInputSource
stroom-pipeline/src/main/java/stroom/pipeline/server/parser/XMLFragmentParser.java
ba30ffd415bd7d32ee40ba4b04035267ce80b499
1
Analyze the following code function for security vulnerabilities
@Test public void selectParamTrans(TestContext context) { postgresClient = createNumbers(context, 11, 12, 13); postgresClient.startTx(asyncAssertTx(context, trans -> { postgresClient.select(trans, "SELECT i FROM numbers WHERE i IN (?, ?, ?) ORDER BY i", new JsonArray().add(11).add(13).add(15), context.asyncAssertSuccess(select -> { postgresClient.endTx(trans, context.asyncAssertSuccess()); context.assertEquals("11, 13", intsAsString(select)); })); })); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: selectParamTrans File: domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java Repository: folio-org/raml-module-builder The code follows secure coding practices.
[ "CWE-89" ]
CVE-2019-15534
HIGH
7.5
folio-org/raml-module-builder
selectParamTrans
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
b7ef741133e57add40aa4cb19430a0065f378a94
0
Analyze the following code function for security vulnerabilities
void injectPostToHandlerDebounced(@NonNull final Object token, @NonNull final Runnable r) { Objects.requireNonNull(token); Objects.requireNonNull(r); synchronized (mLock) { mHandler.removeCallbacksAndMessages(token); mHandler.postDelayed(r, token, CALLBACK_DELAY); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: injectPostToHandlerDebounced 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
injectPostToHandlerDebounced
services/core/java/com/android/server/pm/ShortcutService.java
96e0524c48c6e58af7d15a2caf35082186fc8de2
0
Analyze the following code function for security vulnerabilities
public JSONObject handleThrowable(Throwable pThrowable) { if (pThrowable instanceof IllegalArgumentException) { return getErrorJSON(400,pThrowable, null); } else if (pThrowable instanceof SecurityException) { // Wipe out stacktrace return getErrorJSON(403,new Exception(pThrowable.getMessage()), null); } else { return getErrorJSON(500,pThrowable, null); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handleThrowable File: agent/core/src/main/java/org/jolokia/http/HttpRequestHandler.java Repository: jolokia The code follows secure coding practices.
[ "CWE-352" ]
CVE-2014-0168
MEDIUM
6.8
jolokia
handleThrowable
agent/core/src/main/java/org/jolokia/http/HttpRequestHandler.java
2d9b168cfbbf5a6d16fa6e8a5b34503e3dc42364
0