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
|
protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
doPost(request, response);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doGet
File: dotCMS/src/main/java/com/dotmarketing/servlets/AjaxFileUploadServlet.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-434"
] |
CVE-2017-11466
|
HIGH
| 9
|
dotCMS/core
|
doGet
|
dotCMS/src/main/java/com/dotmarketing/servlets/AjaxFileUploadServlet.java
|
ab2bb2e00b841d131b8734227f9106e3ac31bb99
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getChannelId() {
return mChannelId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getChannelId
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
getChannelId
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setPolicyUpdate(UpdateParameter policyUpdate) {
mPolicyUpdate = policyUpdate;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setPolicyUpdate
File: framework/java/android/net/wifi/hotspot2/pps/Policy.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21240
|
MEDIUM
| 5.5
|
android
|
setPolicyUpdate
|
framework/java/android/net/wifi/hotspot2/pps/Policy.java
|
69119d1d3102e27b6473c785125696881bce9563
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public AttachmentVersioningStore getAttachmentVersioningStore()
{
return getDefaultAttachmentArchiveStore();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAttachmentVersioningStore
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
|
getAttachmentVersioningStore
|
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 void index(Set<TrustAnchor> anchors) {
for (TrustAnchor anchor : anchors) {
index(anchor);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: index
File: src/platform/java/org/conscrypt/TrustedCertificateIndex.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-254",
"CWE-345"
] |
CVE-2016-0818
|
MEDIUM
| 4.3
|
android
|
index
|
src/platform/java/org/conscrypt/TrustedCertificateIndex.java
|
4c9f9c2201116acf790fca25af43995d29980ee0
| 0
|
Analyze the following code function for security vulnerabilities
|
private void updateResizingWindows(final WindowState w) {
final WindowStateAnimator winAnimator = w.mWinAnimator;
if (w.mHasSurface && w.mLayoutSeq == mLayoutSeq) {
w.setInsetsChanged();
boolean configChanged = w.isConfigChanged();
if (DEBUG_CONFIGURATION && configChanged) {
Slog.v(TAG, "Win " + w + " config changed: "
+ mCurConfiguration);
}
if (localLOGV) Slog.v(TAG, "Resizing " + w
+ ": configChanged=" + configChanged
+ " last=" + w.mLastFrame + " frame=" + w.mFrame);
w.mLastFrame.set(w.mFrame);
if (w.mContentInsetsChanged
|| w.mVisibleInsetsChanged
|| winAnimator.mSurfaceResized
|| w.mOutsetsChanged
|| configChanged) {
if (DEBUG_RESIZE || DEBUG_ORIENTATION) {
Slog.v(TAG, "Resize reasons for w=" + w + ": "
+ " contentInsetsChanged=" + w.mContentInsetsChanged
+ " " + w.mContentInsets.toShortString()
+ " visibleInsetsChanged=" + w.mVisibleInsetsChanged
+ " " + w.mVisibleInsets.toShortString()
+ " stableInsetsChanged=" + w.mStableInsetsChanged
+ " " + w.mStableInsets.toShortString()
+ " outsetsChanged=" + w.mOutsetsChanged
+ " " + w.mOutsets.toShortString()
+ " surfaceResized=" + winAnimator.mSurfaceResized
+ " configChanged=" + configChanged);
}
w.mLastOverscanInsets.set(w.mOverscanInsets);
w.mLastContentInsets.set(w.mContentInsets);
w.mLastVisibleInsets.set(w.mVisibleInsets);
w.mLastStableInsets.set(w.mStableInsets);
w.mLastOutsets.set(w.mOutsets);
makeWindowFreezingScreenIfNeededLocked(w);
// If the orientation is changing, then we need to
// hold off on unfreezing the display until this
// window has been redrawn; to do that, we need
// to go through the process of getting informed
// by the application when it has finished drawing.
if (w.mOrientationChanging) {
if (DEBUG_SURFACE_TRACE || DEBUG_ANIM || DEBUG_ORIENTATION) Slog.v(TAG,
"Orientation start waiting for draw mDrawState=DRAW_PENDING in "
+ w + ", surface " + winAnimator.mSurfaceControl);
winAnimator.mDrawState = WindowStateAnimator.DRAW_PENDING;
if (w.mAppToken != null) {
w.mAppToken.allDrawn = false;
w.mAppToken.deferClearAllDrawn = false;
}
}
if (!mResizingWindows.contains(w)) {
if (DEBUG_RESIZE || DEBUG_ORIENTATION) Slog.v(TAG,
"Resizing window " + w + " to " + winAnimator.mSurfaceW
+ "x" + winAnimator.mSurfaceH);
mResizingWindows.add(w);
}
} else if (w.mOrientationChanging) {
if (w.isDrawnLw()) {
if (DEBUG_ORIENTATION) Slog.v(TAG,
"Orientation not waiting for draw in "
+ w + ", surface " + winAnimator.mSurfaceControl);
w.mOrientationChanging = false;
w.mLastFreezeDuration = (int)(SystemClock.elapsedRealtime()
- mDisplayFreezeTime);
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateResizingWindows
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
|
updateResizingWindows
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
public Builder setClientAuthentication(HttpExecuteInterceptor clientAuthentication) {
this.clientAuthentication = clientAuthentication;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setClientAuthentication
File: google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/AuthorizationCodeFlow.java
Repository: googleapis/google-oauth-java-client
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2020-7692
|
MEDIUM
| 6.4
|
googleapis/google-oauth-java-client
|
setClientAuthentication
|
google-oauth-client/src/main/java/com/google/api/client/auth/oauth2/AuthorizationCodeFlow.java
|
13433cd7dd06267fc261f0b1d4764f8e3432c824
| 0
|
Analyze the following code function for security vulnerabilities
|
protected Object getItemId(String rowKey) {
return getParentGrid().getKeyMapper().get(rowKey);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getItemId
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
|
getItemId
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
public static JSONObject toJSONObject(String string, boolean keepStrings) throws JSONException {
return toJSONObject(new StringReader(string), keepStrings);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toJSONObject
File: src/main/java/org/json/XML.java
Repository: stleary/JSON-java
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2022-45688
|
HIGH
| 7.5
|
stleary/JSON-java
|
toJSONObject
|
src/main/java/org/json/XML.java
|
f566a1d9ee1f8139357017dc6c7def1da19cd8d4
| 0
|
Analyze the following code function for security vulnerabilities
|
@HotPath(caller = HotPath.PROCESS_CHANGE)
@Override
public void handleAppDied(WindowProcessController wpc, boolean restarting,
Runnable finishInstrumentationCallback) {
synchronized (mGlobalLockWithoutBoost) {
mTaskSupervisor.beginDeferResume();
final boolean hasVisibleActivities;
try {
// Remove this application's activities from active lists.
hasVisibleActivities = wpc.handleAppDied();
} finally {
mTaskSupervisor.endDeferResume();
}
if (!restarting && hasVisibleActivities) {
deferWindowLayout();
try {
if (!mRootWindowContainer.resumeFocusedTasksTopActivities()) {
// If there was nothing to resume, and we are not already restarting
// this process, but there is a visible activity that is hosted by the
// process...then make sure all visible activities are running, taking
// care of restarting this process.
mRootWindowContainer.ensureActivitiesVisible(null, 0,
!PRESERVE_WINDOWS);
}
} finally {
continueWindowLayout();
}
}
}
if (wpc.isInstrumenting()) {
finishInstrumentationCallback.run();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleAppDied
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
|
handleAppDied
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
public static int countFiles(File dir) {
File[] found = dir.listFiles();
int ret = 0;
if (found != null) {
for (int i = 0; i < found.length; i++) {
if (found[i].isDirectory()) {
ret += countFiles(found[i]);
}
ret++;
}
}
return ret;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: countFiles
File: src/main/java/com/openkm/util/FileUtils.java
Repository: openkm/document-management-system
The code follows secure coding practices.
|
[
"CWE-377"
] |
CVE-2022-3969
|
MEDIUM
| 5.5
|
openkm/document-management-system
|
countFiles
|
src/main/java/com/openkm/util/FileUtils.java
|
c069e4d73ab8864345c25119d8459495f45453e1
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void dumpHeapFinished(String path) {
synchronized (this) {
if (Binder.getCallingPid() != mMemWatchDumpPid) {
Slog.w(TAG, "dumpHeapFinished: Calling pid " + Binder.getCallingPid()
+ " does not match last pid " + mMemWatchDumpPid);
return;
}
if (mMemWatchDumpFile == null || !mMemWatchDumpFile.equals(path)) {
Slog.w(TAG, "dumpHeapFinished: Calling path " + path
+ " does not match last path " + mMemWatchDumpFile);
return;
}
if (DEBUG_PSS) Slog.d(TAG_PSS, "Dump heap finished for " + path);
mHandler.sendEmptyMessage(POST_DUMP_HEAP_NOTIFICATION_MSG);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpHeapFinished
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2500
|
MEDIUM
| 4.3
|
android
|
dumpHeapFinished
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
9878bb99b77c3681f0fda116e2964bac26f349c3
| 0
|
Analyze the following code function for security vulnerabilities
|
public void createAdminUser()
{
createAdminUser(false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createAdminUser
File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-35157
|
MEDIUM
| 4.8
|
xwiki/xwiki-platform
|
createAdminUser
|
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
|
35e9073ffec567861e0abeea072bd97921a3decf
| 0
|
Analyze the following code function for security vulnerabilities
|
public PrintStream createPrintStream(Charset charset) throws FileNotFoundException, UnsupportedEncodingException {
return new PrintStream(internal, charset.name());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createPrintStream
File: src/net/sourceforge/plantuml/security/SFile.java
Repository: plantuml
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2023-3431
|
MEDIUM
| 5.3
|
plantuml
|
createPrintStream
|
src/net/sourceforge/plantuml/security/SFile.java
|
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void join(JoinBy from, JoinBy to, String operation, String joinType, String cr,
Handler<AsyncResult<ResultSet>> replyHandler) {
Function<TotaledResults, ResultSet> resultSetMapper = totaledResults -> totaledResults.set;
join(from, to, operation, joinType, cr, resultSetMapper, replyHandler);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: join
File: domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
join
|
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setResourceMetaCountHardLimit(Integer theResourceMetaCountHardLimit) {
myResourceMetaCountHardLimit = theResourceMetaCountHardLimit;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setResourceMetaCountHardLimit
File: hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
Repository: hapifhir/hapi-fhir
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-32053
|
MEDIUM
| 5
|
hapifhir/hapi-fhir
|
setResourceMetaCountHardLimit
|
hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
|
f2934b229c491235ab0e7782dea86b324521082a
| 0
|
Analyze the following code function for security vulnerabilities
|
List<UserReference> getLikers(EntityReference target, int offset, int limit) throws LikeException;
|
Vulnerability Classification:
- CWE: CWE-94
- CVE: CVE-2023-35152
- Severity: HIGH
- CVSS Score: 8.8
Description: XWIKI-17733: Use a LiveTable to display the page liked in user profile
XWIKI-17724: Display Likers in a LiveTable
* Use livetables in Likes UI
* Add a new missing method to count user likes globally for allowing
pagination
Function: getLikers
File: xwiki-platform-core/xwiki-platform-like/xwiki-platform-like-api/src/main/java/org/xwiki/like/LikeManager.java
Repository: xwiki/xwiki-platform
Fixed Code:
@Unstable
List<UserReference> getLikers(EntityReference target, int offset, int limit) throws LikeException;
|
[
"CWE-94"
] |
CVE-2023-35152
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
getLikers
|
xwiki-platform-core/xwiki-platform-like/xwiki-platform-like-api/src/main/java/org/xwiki/like/LikeManager.java
|
0993a7ab3c102f9ac37ffe361a83a3dc302c0e45
| 1
|
Analyze the following code function for security vulnerabilities
|
public static void recursiveDelete(File file, File base) throws IOException {
LOG.debug("Deleting: {}", file);
if (!(file.getCanonicalPath().startsWith(base.getCanonicalPath()))) {
throw new IOException("Trying to delete a file outside Netx's basedir: "
+ file.getCanonicalPath());
}
if (file.isDirectory()) {
File[] children = file.listFiles();
for (File children1 : children) {
recursiveDelete(children1, base);
}
}
if (!file.delete()) {
throw new IOException("Unable to delete file: " + file);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: recursiveDelete
File: core/src/main/java/net/sourceforge/jnlp/util/FileUtils.java
Repository: AdoptOpenJDK/IcedTea-Web
The code follows secure coding practices.
|
[
"CWE-345",
"CWE-94",
"CWE-22"
] |
CVE-2019-10182
|
MEDIUM
| 5.8
|
AdoptOpenJDK/IcedTea-Web
|
recursiveDelete
|
core/src/main/java/net/sourceforge/jnlp/util/FileUtils.java
|
2ab070cdac087bd208f64fa8138bb709f8d7680c
| 0
|
Analyze the following code function for security vulnerabilities
|
public Token getSessionToken(HttpServletRequest request) {
return getTokenInSession(SESSION_TOKEN_KEY, request, false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSessionToken
File: core-rs/src/main/java/org/silverpeas/core/web/token/SynchronizerTokenService.java
Repository: Silverpeas/Silverpeas-Core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-47324
|
MEDIUM
| 5.4
|
Silverpeas/Silverpeas-Core
|
getSessionToken
|
core-rs/src/main/java/org/silverpeas/core/web/token/SynchronizerTokenService.java
|
9a55728729a3b431847045c674b3e883507d1e1a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void sendError(int i) throws IOException
{
this.response.sendError(i);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendError
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiServletResponse.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-601"
] |
CVE-2022-23618
|
MEDIUM
| 5.8
|
xwiki/xwiki-platform
|
sendError
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiServletResponse.java
|
5251c02080466bf9fb55288f04a37671108f8096
| 0
|
Analyze the following code function for security vulnerabilities
|
public ArrayList<SyncStatusInfo> getSyncStatus() {
synchronized (mAuthorities) {
final int N = mSyncStatus.size();
ArrayList<SyncStatusInfo> ops = new ArrayList<SyncStatusInfo>(N);
for (int i=0; i<N; i++) {
ops.add(mSyncStatus.valueAt(i));
}
return ops;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSyncStatus
File: services/core/java/com/android/server/content/SyncStorageEngine.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2016-2424
|
HIGH
| 7.1
|
android
|
getSyncStatus
|
services/core/java/com/android/server/content/SyncStorageEngine.java
|
d3383d5bfab296ba3adbc121ff8a7b542bde4afb
| 0
|
Analyze the following code function for security vulnerabilities
|
@CalledByNative
public int getViewportWidthPix() { return mViewportWidthPix; }
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getViewportWidthPix
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
|
getViewportWidthPix
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
private final boolean isParentInstance() {
return mParentInstance;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isParentInstance
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
|
isParentInstance
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public static int countImportFiles(File dir) {
File[] found = dir.listFiles(new RepositoryImporter.NoVersionFilenameFilter());
int ret = 0;
if (found != null) {
for (int i = 0; i < found.length; i++) {
//log.info("File: {}", found[i].getPath());
if (found[i].isDirectory()) {
ret += countImportFiles(found[i]);
}
// NAND
if (!(found[i].isFile() && found[i].getName().toLowerCase().endsWith(Config.EXPORT_METADATA_EXT))) {
ret++;
}
}
}
return ret;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: countImportFiles
File: src/main/java/com/openkm/util/FileUtils.java
Repository: openkm/document-management-system
The code follows secure coding practices.
|
[
"CWE-377"
] |
CVE-2022-3969
|
MEDIUM
| 5.5
|
openkm/document-management-system
|
countImportFiles
|
src/main/java/com/openkm/util/FileUtils.java
|
c069e4d73ab8864345c25119d8459495f45453e1
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Mono<APIConnection> datasourceCreate(DatasourceConfiguration datasourceConfiguration) {
return APIConnectionFactory.createConnection(datasourceConfiguration);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: datasourceCreate
File: app/server/appsmith-plugins/restApiPlugin/src/main/java/com/external/plugins/RestApiPlugin.java
Repository: appsmithorg/appsmith
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2022-38298
|
HIGH
| 8.8
|
appsmithorg/appsmith
|
datasourceCreate
|
app/server/appsmith-plugins/restApiPlugin/src/main/java/com/external/plugins/RestApiPlugin.java
|
c59351ef94f9780c2a1ffc991e29b9272ab9fe64
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean shouldEmphasizeHttpsScheme();
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: shouldEmphasizeHttpsScheme
File: chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-254"
] |
CVE-2016-5163
|
MEDIUM
| 4.3
|
chromium
|
shouldEmphasizeHttpsScheme
|
chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java
|
3bd33fee094e863e5496ac24714c558bd58d28ef
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onFinished(Preference preference, boolean reading) {
if (mInitIndex < mPreferences.size()-1 && !isFinishing()) {
mInitIndex++;
CallForwardEditPreference pref = mPreferences.get(mInitIndex);
pref.init(this, mPhone, mReplaceInvalidCFNumbers, mCallForwardByUssd);
pref.startCallForwardOptionsQuery();
}
super.onFinished(preference, reading);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onFinished
File: src/com/android/phone/CdmaCallForwardOptions.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-862"
] |
CVE-2023-35665
|
HIGH
| 7.8
|
android
|
onFinished
|
src/com/android/phone/CdmaCallForwardOptions.java
|
674039e70e1c5bf29b808899ac80c709acc82290
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<Delta> getRenderedContentDiff(String fromRev, XWikiContext context)
throws XWikiException, DifferentiationFailedException
{
XWikiDocument revdoc = context.getWiki().getDocument(this, fromRev, context);
return getRenderedContentDiff(revdoc, this, context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRenderedContentDiff
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-26470
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
getRenderedContentDiff
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
public void addSubscription(Subscription subscription) {
subscriptions.put(subscription.getId(), subscription);
server.getEventBus().post(new SubscriptionCreatedEvent(subscription));
subscription.setStateListener((s, ps, cs) -> {
if (cs == State.Closing) {
subscriptions.remove(s.getId());
server.getSubscriptions().remove(s.getId());
server.getEventBus().post(new SubscriptionDeletedEvent(s));
/*
* Notify AddressSpaces the items for this subscription are deleted.
*/
Map<UInteger, BaseMonitoredItem<?>> monitoredItems = s.getMonitoredItems();
byMonitoredItemType(
monitoredItems.values(),
dataItems -> server.getAddressSpaceManager().onDataItemsDeleted(dataItems),
eventItems -> server.getAddressSpaceManager().onEventItemsDeleted(eventItems)
);
server.getMonitoredItemCount().getAndUpdate(count -> count - monitoredItems.size());
monitoredItems.clear();
}
});
}
|
Vulnerability Classification:
- CWE: CWE-770
- CVE: CVE-2022-25897
- Severity: HIGH
- CVSS Score: 7.5
Description: Allow max MonitoredItems per session to be configured via OpcUaServerConfigLimits
Function: addSubscription
File: opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/subscriptions/SubscriptionManager.java
Repository: eclipse/milo
Fixed Code:
public void addSubscription(Subscription subscription) {
subscriptions.put(subscription.getId(), subscription);
server.getEventBus().post(new SubscriptionCreatedEvent(subscription));
subscription.setStateListener((s, ps, cs) -> {
if (cs == State.Closing) {
subscriptions.remove(s.getId());
server.getSubscriptions().remove(s.getId());
server.getEventBus().post(new SubscriptionDeletedEvent(s));
/*
* Notify AddressSpaces the items for this subscription are deleted.
*/
Map<UInteger, BaseMonitoredItem<?>> monitoredItems = s.getMonitoredItems();
byMonitoredItemType(
monitoredItems.values(),
dataItems -> server.getAddressSpaceManager().onDataItemsDeleted(dataItems),
eventItems -> server.getAddressSpaceManager().onEventItemsDeleted(eventItems)
);
monitoredItemCount.getAndUpdate(count -> count - monitoredItems.size());
server.getMonitoredItemCount().getAndUpdate(count -> count - monitoredItems.size());
monitoredItems.clear();
}
});
}
|
[
"CWE-770"
] |
CVE-2022-25897
|
HIGH
| 7.5
|
eclipse/milo
|
addSubscription
|
opc-ua-sdk/sdk-server/src/main/java/org/eclipse/milo/opcua/sdk/server/subscriptions/SubscriptionManager.java
|
4534381760d7d9f0bf00cbf6a8449bb0d13c6ce5
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public void visit(Modification modification) {
modifiedFilesJson = new ArrayList();
Map<String, Object> jsonMap = new LinkedHashMap<>();
jsonMap.put("user", modification.getUserDisplayName());
jsonMap.put("revision", modification.getRevision());
jsonMap.put("date", formatISO8601(modification.getModifiedTime()));
String comment = modification.getComment();
if (!revision.getMaterial().getMaterialType().equals(TYPE)) {
comment = commentRenderer.render(comment);
}
jsonMap.put("comment", comment);
jsonMap.put("modifiedFiles", modifiedFilesJson);
modificationsJson.add(jsonMap);
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2023-28629
- Severity: MEDIUM
- CVSS Score: 5.4
Description: Improve escaping on legacy Freemarker templates
Function: visit
File: server/src/main/java/com/thoughtworks/go/server/presentation/models/MaterialRevisionsJsonBuilder.java
Repository: gocd
Fixed Code:
@Override
public void visit(Modification modification) {
modifiedFilesJson = new ArrayList<>();
Map<String, Object> jsonMap = new LinkedHashMap<>();
jsonMap.put("user", modification.getUserDisplayName());
jsonMap.put("revision", modification.getRevision());
jsonMap.put("date", formatISO8601(modification.getModifiedTime()));
String comment = modification.getComment();
if (!revision.getMaterial().getMaterialType().equals(TYPE)) {
comment = commentRenderer.render(comment);
}
jsonMap.put("comment", comment);
jsonMap.put("modifiedFiles", modifiedFilesJson);
modificationsJson.add(jsonMap);
}
|
[
"CWE-79"
] |
CVE-2023-28629
|
MEDIUM
| 5.4
|
gocd
|
visit
|
server/src/main/java/com/thoughtworks/go/server/presentation/models/MaterialRevisionsJsonBuilder.java
|
95f758229d419411a38577608709d8552cccf193
| 1
|
Analyze the following code function for security vulnerabilities
|
protected void handleServiceAccept(Buffer buffer) throws Exception {
handleServiceAccept(buffer.getString(), buffer);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleServiceAccept
File: sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
Repository: apache/mina-sshd
The code follows secure coding practices.
|
[
"CWE-354"
] |
CVE-2023-48795
|
MEDIUM
| 5.9
|
apache/mina-sshd
|
handleServiceAccept
|
sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
|
6b0fd46f64bcb75eeeee31d65f10242660aad7c1
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void disconnectActivityFromServices(Object connectionHolder) {
// 'connectionHolder' is an untyped ActivityServiceConnectionsHolder
final ActivityServiceConnectionsHolder holder =
(ActivityServiceConnectionsHolder) connectionHolder;
synchronized (ActivityManagerService.this) {
synchronized (mProcLock) {
holder.forEachConnection(cr -> mServices.removeConnectionLocked(
(ConnectionRecord) cr, null /* skipApp */, holder /* skipAct */,
false /* enqueueOomAdj */));
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: disconnectActivityFromServices
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
|
disconnectActivityFromServices
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected boolean canDisposeBackingStore(final AbstractAuthorityFactory backingStore) {
if (backingStore instanceof DirectEpsgFactory) {
return ((DirectEpsgFactory) backingStore).canDispose();
}
return super.canDisposeBackingStore(backingStore);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: canDisposeBackingStore
File: modules/library/referencing/src/main/java/org/geotools/referencing/factory/epsg/ThreadedEpsgFactory.java
Repository: geotools
The code follows secure coding practices.
|
[
"CWE-917"
] |
CVE-2022-24818
|
HIGH
| 7.5
|
geotools
|
canDisposeBackingStore
|
modules/library/referencing/src/main/java/org/geotools/referencing/factory/epsg/ThreadedEpsgFactory.java
|
4f70fa3234391dd0cda883a20ab0ec75688cba49
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean isValidJavaClassName(String className) {
if (CmsStringUtil.isEmpty(className)) {
return false;
}
int length = className.length();
boolean nodot = true;
for (int i = 0; i < length; i++) {
char ch = className.charAt(i);
if (nodot) {
if (ch == '.') {
return false;
} else if (Character.isJavaIdentifierStart(ch)) {
nodot = false;
} else {
return false;
}
} else {
if (ch == '.') {
nodot = true;
} else if (Character.isJavaIdentifierPart(ch)) {
nodot = false;
} else {
return false;
}
}
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isValidJavaClassName
File: src/org/opencms/util/CmsStringUtil.java
Repository: alkacon/opencms-core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2013-4600
|
MEDIUM
| 4.3
|
alkacon/opencms-core
|
isValidJavaClassName
|
src/org/opencms/util/CmsStringUtil.java
|
72a05e3ea1cf692e2efce002687272e63f98c14a
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void metricsConfig(XmlGenerator gen, Config config) {
MetricsConfig metricsConfig = config.getMetricsConfig();
gen.open("metrics", "enabled", metricsConfig.isEnabled())
.open("management-center", "enabled", metricsConfig.getManagementCenterConfig().isEnabled())
.node("retention-seconds", metricsConfig.getManagementCenterConfig().getRetentionSeconds())
.close()
.open("jmx", "enabled", metricsConfig.getJmxConfig().isEnabled())
.close()
.node("collection-frequency-seconds", metricsConfig.getCollectionFrequencySeconds())
.close();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: metricsConfig
File: hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-522"
] |
CVE-2023-33264
|
MEDIUM
| 4.3
|
hazelcast
|
metricsConfig
|
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
|
80a502d53cc48bf895711ab55f95e3a51e344ac1
| 0
|
Analyze the following code function for security vulnerabilities
|
private static boolean canUploadBeRetried(OCUpload upload, boolean gotWifi, boolean isCharging) {
File file = new File(upload.getLocalPath());
boolean needsWifi = upload.isUseWifiOnly();
boolean needsCharging = upload.isWhileChargingOnly();
return file.exists() && (!needsWifi || gotWifi) && (!needsCharging || isCharging);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: canUploadBeRetried
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
|
canUploadBeRetried
|
app/src/main/java/com/owncloud/android/files/services/FileUploader.java
|
cd3bd0845a97e1d43daa0607a122b66b0068c751
| 0
|
Analyze the following code function for security vulnerabilities
|
private String buildXmlAdditionalProperties(S3Type xmlS3) {
FileSetType xmlFileSet = xmlS3.getFileSet();
if(xmlFileSet == null) {
return null;
}
ResourceS3FileSetInfo fileSetInfo = new ResourceS3FileSetInfo();
ResourceS3AdditionalProperties additionalProps = new ResourceS3AdditionalProperties();
additionalProps.setFileSet(fileSetInfo);
List<FileType> xmlFiles = xmlFileSet.getFile();
if(xmlFiles != null) {
for(FileType xmlFile : xmlFiles) {
ResourceS3FileInfo fileInfo = new ResourceS3FileInfo();
fileInfo.setSource(xmlFile.getSource());
fileInfo.setToFile(xmlFile.getToFile());
fileSetInfo.getFiles().add(fileInfo);
}
}
String additionalPropsStr = JsonUtils.toJsonString(additionalProps);
return additionalPropsStr;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: buildXmlAdditionalProperties
File: platform-core/src/main/java/com/webank/wecube/platform/core/service/plugin/PluginArtifactsMgmtService.java
Repository: WeBankPartners/wecube-platform
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-45746
|
MEDIUM
| 5
|
WeBankPartners/wecube-platform
|
buildXmlAdditionalProperties
|
platform-core/src/main/java/com/webank/wecube/platform/core/service/plugin/PluginArtifactsMgmtService.java
|
1164dae43c505f8a0233cc049b2689d6ca6d0c37
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isMarkedCandidate() {
return markedCandidate;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isMarkedCandidate
File: activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
Repository: apache/activemq
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-3576
|
MEDIUM
| 5
|
apache/activemq
|
isMarkedCandidate
|
activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
|
00921f2
| 0
|
Analyze the following code function for security vulnerabilities
|
public TimeFrameUnits getMinTimeFrameUnits() {
return minTimeFrameUnits;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMinTimeFrameUnits
File: api/src/main/java/org/openmrs/module/appointmentscheduling/AppointmentRequest.java
Repository: openmrs/openmrs-module-appointmentscheduling
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-4727
|
MEDIUM
| 6.1
|
openmrs/openmrs-module-appointmentscheduling
|
getMinTimeFrameUnits
|
api/src/main/java/org/openmrs/module/appointmentscheduling/AppointmentRequest.java
|
2ccbe39c020809765de41eeb8ee4c70b5ec49cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
public int hashCode()
{
return y.hashCode() ^ super.hashCode();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hashCode
File: core/src/main/java/org/bouncycastle/crypto/params/DHPublicKeyParameters.java
Repository: bcgit/bc-java
The code follows secure coding practices.
|
[
"CWE-310"
] |
CVE-2016-1000339
|
MEDIUM
| 5
|
bcgit/bc-java
|
hashCode
|
core/src/main/java/org/bouncycastle/crypto/params/DHPublicKeyParameters.java
|
413b42f4d770456508585c830cfcde95f9b0e93b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Log(title = "个人信息", businessType = BusinessType.UPDATE)
@PostMapping("/update")
@ResponseBody
public AjaxResult update(SysUser user)
{
SysUser currentUser = getSysUser();
currentUser.setUserName(user.getUserName());
currentUser.setEmail(user.getEmail());
currentUser.setPhonenumber(user.getPhonenumber());
currentUser.setSex(user.getSex());
if (StringUtils.isNotEmpty(user.getPhonenumber())
&& UserConstants.USER_PHONE_NOT_UNIQUE.equals(userService.checkPhoneUnique(currentUser)))
{
return error("修改用户'" + currentUser.getLoginName() + "'失败,手机号码已存在");
}
else if (StringUtils.isNotEmpty(user.getEmail())
&& UserConstants.USER_EMAIL_NOT_UNIQUE.equals(userService.checkEmailUnique(currentUser)))
{
return error("修改用户'" + currentUser.getLoginName() + "'失败,邮箱账号已存在");
}
if (userService.updateUserInfo(currentUser) > 0)
{
setSysUser(userService.selectUserById(currentUser.getUserId()));
return success();
}
return error();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: update
File: ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java
Repository: yangzongzhuan/RuoYi
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-32065
|
LOW
| 3.5
|
yangzongzhuan/RuoYi
|
update
|
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysProfileController.java
|
d8b2a9a905fb750fa60e2400238cf4750a77c5e6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Id
@Column(name = "id", unique = true, nullable = false, length = 30)
public String getId() {
return this.id;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getId
File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/sys/SysModule.java
Repository: sanluan/PublicCMS
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2018-18927
|
LOW
| 3.5
|
sanluan/PublicCMS
|
getId
|
publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/sys/SysModule.java
|
2b411dc2821c69539138aaf7632b938b659a58fa
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onSimStateChanged(int subId, int slotId, int simState) {
if (DEBUG_SIM_STATES) {
Log.d(TAG, "onSimStateChanged(subId=" + subId + ", slotId=" + slotId
+ ",state=" + simState + ")");
}
int size = mKeyguardStateCallbacks.size();
boolean simPinSecure = mUpdateMonitor.isSimPinSecure();
for (int i = size - 1; i >= 0; i--) {
try {
mKeyguardStateCallbacks.get(i).onSimSecureStateChanged(simPinSecure);
} catch (RemoteException e) {
Slog.w(TAG, "Failed to call onSimSecureStateChanged", e);
if (e instanceof DeadObjectException) {
mKeyguardStateCallbacks.remove(i);
}
}
}
boolean lastSimStateWasLocked;
synchronized (KeyguardViewMediator.this) {
int lastState = mLastSimStates.get(slotId);
lastSimStateWasLocked = (lastState == TelephonyManager.SIM_STATE_PIN_REQUIRED
|| lastState == TelephonyManager.SIM_STATE_PUK_REQUIRED);
mLastSimStates.append(slotId, simState);
}
switch (simState) {
case TelephonyManager.SIM_STATE_NOT_READY:
case TelephonyManager.SIM_STATE_ABSENT:
// only force lock screen in case of missing sim if user hasn't
// gone through setup wizard
synchronized (KeyguardViewMediator.this) {
if (shouldWaitForProvisioning()) {
if (!mShowing) {
if (DEBUG_SIM_STATES) Log.d(TAG, "ICC_ABSENT isn't showing,"
+ " we need to show the keyguard since the "
+ "device isn't provisioned yet.");
doKeyguardLocked(null);
} else {
resetStateLocked();
}
}
if (simState == TelephonyManager.SIM_STATE_ABSENT) {
// MVNO SIMs can become transiently NOT_READY when switching networks,
// so we should only lock when they are ABSENT.
if (lastSimStateWasLocked) {
if (DEBUG_SIM_STATES) Log.d(TAG, "SIM moved to ABSENT when the "
+ "previous state was locked. Reset the state.");
resetStateLocked();
}
mSimWasLocked.append(slotId, false);
}
}
break;
case TelephonyManager.SIM_STATE_PIN_REQUIRED:
case TelephonyManager.SIM_STATE_PUK_REQUIRED:
synchronized (KeyguardViewMediator.this) {
mSimWasLocked.append(slotId, true);
if (!mShowing) {
if (DEBUG_SIM_STATES) Log.d(TAG,
"INTENT_VALUE_ICC_LOCKED and keygaurd isn't "
+ "showing; need to show keyguard so user can enter sim pin");
doKeyguardLocked(null);
} else {
mPendingPinLock = true;
resetStateLocked();
}
}
break;
case TelephonyManager.SIM_STATE_PERM_DISABLED:
synchronized (KeyguardViewMediator.this) {
if (!mShowing) {
if (DEBUG_SIM_STATES) Log.d(TAG, "PERM_DISABLED and "
+ "keygaurd isn't showing.");
doKeyguardLocked(null);
} else {
if (DEBUG_SIM_STATES) Log.d(TAG, "PERM_DISABLED, resetStateLocked to"
+ "show permanently disabled message in lockscreen.");
resetStateLocked();
}
}
break;
case TelephonyManager.SIM_STATE_READY:
synchronized (KeyguardViewMediator.this) {
if (DEBUG_SIM_STATES) Log.d(TAG, "READY, reset state? " + mShowing);
if (mShowing && mSimWasLocked.get(slotId, false)) {
if (DEBUG_SIM_STATES) Log.d(TAG, "SIM moved to READY when the "
+ "previously was locked. Reset the state.");
mSimWasLocked.append(slotId, false);
resetStateLocked();
}
}
break;
default:
if (DEBUG_SIM_STATES) Log.v(TAG, "Unspecific state: " + simState);
break;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onSimStateChanged
File: packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21267
|
MEDIUM
| 5.5
|
android
|
onSimStateChanged
|
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
|
d18d8b350756b0e89e051736c1f28744ed31e93a
| 0
|
Analyze the following code function for security vulnerabilities
|
void onConnectionServiceChanged(
Call call,
ConnectionServiceWrapper oldService,
ConnectionServiceWrapper newService);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onConnectionServiceChanged
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
|
onConnectionServiceChanged
|
src/com/android/server/telecom/CallsManager.java
|
a06c9a4aef69ae27b951523cf72bf72412bf48fa
| 0
|
Analyze the following code function for security vulnerabilities
|
void dump(PrintWriter pw, String prefix) {
pw.print(prefix); pw.print("title: "); pw.println(mTitle);
pw.print(prefix); pw.print("subtitle: "); pw.println(mSubTitle);
pw.print(prefix); pw.print("pendingUi: "); pw.println(mPendingUi);
pw.print(prefix); pw.print("service: "); pw.println(mServicePackageName);
pw.print(prefix); pw.print("app: "); pw.println(mComponentName.toShortString());
pw.print(prefix); pw.print("compat mode: "); pw.println(mCompatMode);
pw.print(prefix); pw.print("theme id: "); pw.print(mThemeId);
switch (mThemeId) {
case THEME_ID_DARK:
pw.println(" (dark)");
break;
case THEME_ID_LIGHT:
pw.println(" (light)");
break;
default:
pw.println("(UNKNOWN_MODE)");
break;
}
final View view = mDialog.getWindow().getDecorView();
final int[] loc = view.getLocationOnScreen();
pw.print(prefix); pw.print("coordinates: ");
pw.print('('); pw.print(loc[0]); pw.print(','); pw.print(loc[1]);pw.print(')');
pw.print('(');
pw.print(loc[0] + view.getWidth()); pw.print(',');
pw.print(loc[1] + view.getHeight());pw.println(')');
pw.print(prefix); pw.print("destroyed: "); pw.println(mDestroyed);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dump
File: services/autofill/java/com/android/server/autofill/ui/SaveUi.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-610"
] |
CVE-2023-40133
|
MEDIUM
| 5.5
|
android
|
dump
|
services/autofill/java/com/android/server/autofill/ui/SaveUi.java
|
08becc8c600f14c5529115cc1a1e0c97cd503f33
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Citation getAuthority() {
final Citation authority = super.getAuthority();
return (authority != null) ? authority : Citations.EPSG;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAuthority
File: modules/library/referencing/src/main/java/org/geotools/referencing/factory/epsg/ThreadedEpsgFactory.java
Repository: geotools
The code follows secure coding practices.
|
[
"CWE-917"
] |
CVE-2022-24818
|
HIGH
| 7.5
|
geotools
|
getAuthority
|
modules/library/referencing/src/main/java/org/geotools/referencing/factory/epsg/ThreadedEpsgFactory.java
|
4f70fa3234391dd0cda883a20ab0ec75688cba49
| 0
|
Analyze the following code function for security vulnerabilities
|
void pendingAssistExtrasTimedOut(PendingAssistExtras pae) {
IAssistDataReceiver receiver;
synchronized (this) {
mPendingAssistExtras.remove(pae);
receiver = pae.receiver;
}
if (receiver != null) {
// Caller wants result sent back to them.
Bundle sendBundle = new Bundle();
// At least return the receiver extras
sendBundle.putBundle(ASSIST_KEY_RECEIVER_EXTRAS, pae.receiverExtras);
try {
pae.receiver.onHandleAssistData(sendBundle);
} catch (RemoteException e) {
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: pendingAssistExtrasTimedOut
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2018-9492
|
HIGH
| 7.2
|
android
|
pendingAssistExtrasTimedOut
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public CertPath getCertPath(CertPath cPath) { // Parameter ignored.
return currentlyUsed;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCertPath
File: core/src/main/java/net/sourceforge/jnlp/tools/JarCertVerifier.java
Repository: AdoptOpenJDK/IcedTea-Web
The code follows secure coding practices.
|
[
"CWE-345",
"CWE-94",
"CWE-22"
] |
CVE-2019-10182
|
MEDIUM
| 5.8
|
AdoptOpenJDK/IcedTea-Web
|
getCertPath
|
core/src/main/java/net/sourceforge/jnlp/tools/JarCertVerifier.java
|
2fd1e4b769911f2c6f7f3902f7ea21568ddc2f99
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void setColorParams() throws Exception {
assertPlotParam("bgcolor", "x000000");
assertPlotParam("bgcolor", "XDEADBE");
assertPlotParam("bgcolor", "%58DEADBE");
assertInvalidPlotParam("bgcolor", "XDEADBEF");
assertInvalidPlotParam("bgcolor", "%5BDEADBE");
assertPlotParam("fgcolor", "x000000");
assertPlotParam("fgcolor", "XDEADBE");
assertPlotParam("fgcolor", "%58DEADBE");
assertInvalidPlotParam("fgcolor", "XDEADBEF");
assertInvalidPlotParam("fgcolor", "%5BDEADBE");
}
|
Vulnerability Classification:
- CWE: CWE-74
- CVE: CVE-2023-36812
- Severity: CRITICAL
- CVSS Score: 9.8
Description: Improved fix for #2261.
Regular expressions wouldn't catch the newlines or possibly other
control characters. Now we'll use the TAG validation code to make
sure the inputs are only plain ASCII printables first.
Fixes CVE-2018-12972, CVE-2020-35476
Function: setColorParams
File: test/tsd/TestGraphHandler.java
Repository: OpenTSDB/opentsdb
Fixed Code:
@Test
public void setColorParams() throws Exception {
assertPlotParam("bgcolor", "x000000");
assertPlotParam("bgcolor", "XDEADBE");
assertPlotParam("bgcolor", "%58DEADBE");
assertInvalidPlotParam("bgcolor", "XDEADBEF");
assertInvalidPlotParam("bgcolor", "%5BDEADBE");
assertInvalidPlotParam("bgcolor", "xBDE%0AAD");
assertPlotParam("fgcolor", "x000000");
assertPlotParam("fgcolor", "XDEADBE");
assertPlotParam("fgcolor", "%58DEADBE");
assertInvalidPlotParam("fgcolor", "XDEADBEF");
assertInvalidPlotParam("fgcolor", "%5BDEADBE");
assertInvalidPlotParam("fgcolor", "xBDE%0AAD");
}
|
[
"CWE-74"
] |
CVE-2023-36812
|
CRITICAL
| 9.8
|
OpenTSDB/opentsdb
|
setColorParams
|
test/tsd/TestGraphHandler.java
|
07c4641471c6f5c2ab5aab615969e97211eb50d9
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isElementAllowed(String elementName)
{
return !this.forbidTags.contains(elementName)
&& (this.extraAllowedTags.contains(elementName) || isElementSafe(elementName));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isElementAllowed
File: xwiki-commons-core/xwiki-commons-xml/src/main/java/org/xwiki/xml/internal/html/SecureHTMLElementSanitizer.java
Repository: xwiki/xwiki-commons
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-31126
|
CRITICAL
| 9.6
|
xwiki/xwiki-commons
|
isElementAllowed
|
xwiki-commons-core/xwiki-commons-xml/src/main/java/org/xwiki/xml/internal/html/SecureHTMLElementSanitizer.java
|
0b8e9c45b7e7457043938f35265b2aa5adc76a68
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getRemotePort() {
return 0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRemotePort
File: h2/src/test/org/h2/test/server/TestWeb.java
Repository: h2database
The code follows secure coding practices.
|
[
"CWE-312"
] |
CVE-2022-45868
|
HIGH
| 7.8
|
h2database
|
getRemotePort
|
h2/src/test/org/h2/test/server/TestWeb.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 0
|
Analyze the following code function for security vulnerabilities
|
@GET
@Path("id/{userId}")
@ApiOperation(value = "Get user details by userId", notes = "The user's permissions are only included if a user asks for his " +
"own account or for users with the necessary permissions to edit permissions.")
@ApiResponses({
@ApiResponse(code = 404, message = "The user could not be found.")
})
public UserSummary getbyId(@ApiParam(name = "userId", value = "The userId to return information for.", required = true)
@PathParam("userId") String userId,
@Context UserContext userContext) {
final User user = loadUserById(userId);
final String username = user.getName();
// If a user has permissions to edit another user's profile, it should be able to see it.
// Reader users always have permissions to edit their own profile.
if (!isPermitted(USERS_EDIT, username)) {
throw new ForbiddenException("Not allowed to view userId " + userId);
}
return returnSummary(userContext, user);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getbyId
File: graylog2-server/src/main/java/org/graylog2/rest/resources/users/UsersResource.java
Repository: Graylog2/graylog2-server
The code follows secure coding practices.
|
[
"CWE-613"
] |
CVE-2023-41041
|
LOW
| 3.1
|
Graylog2/graylog2-server
|
getbyId
|
graylog2-server/src/main/java/org/graylog2/rest/resources/users/UsersResource.java
|
bb88f3d0b2b0351669ab32c60b595ab7242a3fe3
| 0
|
Analyze the following code function for security vulnerabilities
|
Long getId();
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getId
File: service-api/src/main/java/com/nexblocks/authguard/service/model/UserIdentifier.java
Repository: AuthGuard
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2021-45890
|
HIGH
| 7.5
|
AuthGuard
|
getId
|
service-api/src/main/java/com/nexblocks/authguard/service/model/UserIdentifier.java
|
9783b1143da6576028de23e15a1f198b1f937b82
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean getSigning() {
return signing == SigningState.FULL;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSigning
File: core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
Repository: AdoptOpenJDK/IcedTea-Web
The code follows secure coding practices.
|
[
"CWE-345",
"CWE-94",
"CWE-22"
] |
CVE-2019-10182
|
MEDIUM
| 5.8
|
AdoptOpenJDK/IcedTea-Web
|
getSigning
|
core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
|
e0818f521a0711aeec4b913b49b5fc6a52815662
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Loader<Cursor> onCreateLoader(int id, Bundle args) {
switch (id) {
case INIT_DRAFT_USING_REFERENCE_MESSAGE:
return new CursorLoader(this, mRefMessageUri, UIProvider.MESSAGE_PROJECTION, null,
null, null);
case REFERENCE_MESSAGE_LOADER:
return new CursorLoader(this, mRefMessageUri, UIProvider.MESSAGE_PROJECTION, null,
null, null);
case LOADER_ACCOUNT_CURSOR:
return new CursorLoader(this, MailAppProvider.getAccountsUri(),
UIProvider.ACCOUNTS_PROJECTION, null, null, null);
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onCreateLoader
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
|
onCreateLoader
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public OnGoingLogicalCondition notIn(T... values) {
return notIn(Arrays.asList(values));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: notIn
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
|
notIn
|
src/main/java/org/torpedoquery/jpa/internal/conditions/ConditionBuilder.java
|
3c20b874fba9cc2a78b9ace10208de1602b56c3f
| 0
|
Analyze the following code function for security vulnerabilities
|
private void migrate30(File dataDir, Stack<Integer> versions) {
for (File file: dataDir.listFiles()) {
if (file.getName().startsWith("Settings.xml")) {
VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file);
for (Element element: dom.getRootElement().elements()) {
String key = element.elementTextTrim("key");
if (key.equals("JOB_EXECUTORS"))
element.detach();
}
dom.writeToFile(file, false);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: migrate30
File: server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-338"
] |
CVE-2023-24828
|
HIGH
| 8.8
|
theonedev/onedev
|
migrate30
|
server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
|
d67dd9686897fe5e4ab881d749464aa7c06a68e5
| 0
|
Analyze the following code function for security vulnerabilities
|
public String nextTo(String delimiters) throws JSONException {
char c;
StringBuilder sb = new StringBuilder();
for (;;) {
c = this.next();
if (delimiters.indexOf(c) >= 0 || c == 0 ||
c == '\n' || c == '\r') {
if (c != 0) {
this.back();
}
return sb.toString().trim();
}
sb.append(c);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nextTo
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
|
nextTo
|
src/main/java/org/json/JSONTokener.java
|
7a124d857dc8da1165c87fa788e53359a317d0f7
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getStatus() {
return this.statusCode;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStatus
File: src/java/winstone/WinstoneResponse.java
Repository: jenkinsci/winstone
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2011-4344
|
LOW
| 2.6
|
jenkinsci/winstone
|
getStatus
|
src/java/winstone/WinstoneResponse.java
|
410ed3001d51c689cf59085b7417466caa2ded7b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public byte[] getBackupPayload(@UserIdInt int userId) {
enforceSystem();
if (DEBUG) {
Slog.d(TAG, "Backing up user " + userId);
}
synchronized (mLock) {
if (!isUserUnlockedL(userId)) {
wtf("Can't backup: user " + userId + " is locked or not running");
return null;
}
final ShortcutUser user = getUserShortcutsLocked(userId);
if (user == null) {
wtf("Can't backup: user not found: id=" + userId);
return null;
}
// Update the signatures for all packages.
user.forAllPackageItems(spi -> spi.refreshPackageSignatureAndSave());
// Rescan all apps; this will also update the version codes and "allow-backup".
user.forAllPackages(pkg -> pkg.rescanPackageIfNeeded(
/*isNewApp=*/ false, /*forceRescan=*/ true));
// Set the version code for the launchers.
user.forAllLaunchers(launcher -> launcher.ensurePackageInfo());
// Save to the filesystem.
scheduleSaveUser(userId);
saveDirtyInfo();
// Note, in case of backup, we don't have to wait on bitmap saving, because we don't
// back up bitmaps anyway.
// Then create the backup payload.
final ByteArrayOutputStream os = new ByteArrayOutputStream(32 * 1024);
try {
saveUserInternalLocked(userId, os, /* forBackup */ true);
} catch (XmlPullParserException | IOException e) {
// Shouldn't happen.
Slog.w(TAG, "Backup failed.", e);
return null;
}
byte[] payload = os.toByteArray();
mShortcutDumpFiles.save("backup-1-payload.txt", payload);
return payload;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getBackupPayload
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
|
getBackupPayload
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
public synchronized String getResponseHeader(String headerName) {
Map headers = this.responseHeadersMap;
return headers == null ? null : (String) headers.get(headerName);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getResponseHeader
File: Testing/src/main/java/org/loboevolution/html/test/SimpleHttpRequest.java
Repository: LoboEvolution
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000540
|
MEDIUM
| 6.8
|
LoboEvolution
|
getResponseHeader
|
Testing/src/main/java/org/loboevolution/html/test/SimpleHttpRequest.java
|
9b75694cedfa4825d4a2330abf2719d470c654cd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isKeyguardLocked() {
return WindowManagerService.this.isKeyguardLocked();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isKeyguardLocked
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
|
isKeyguardLocked
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
@JsonProperty(FIELD_CACHE_TTL_OVERRIDE_ENABLED)
public abstract Builder cacheTTLOverrideEnabled(boolean cacheTTLOverride);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cacheTTLOverrideEnabled
File: graylog2-server/src/main/java/org/graylog2/lookup/adapters/DnsLookupDataAdapter.java
Repository: Graylog2/graylog2-server
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2023-41045
|
MEDIUM
| 5.3
|
Graylog2/graylog2-server
|
cacheTTLOverrideEnabled
|
graylog2-server/src/main/java/org/graylog2/lookup/adapters/DnsLookupDataAdapter.java
|
466af814523cffae9fbc7e77bab7472988f03c3e
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean unzip(VFSLeaf zipLeaf, VFSContainer targetDir, Identity identity, boolean versioning) {
boolean unzipped = false;
try(InputStream in = zipLeaf.getInputStream()) {
unzipped = unzip(in, targetDir, identity, versioning);
} catch(Exception e) {
handleIOException("", e);
}
return unzipped;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unzip
File: src/main/java/org/olat/core/util/ZipUtil.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-39180
|
HIGH
| 9
|
OpenOLAT
|
unzip
|
src/main/java/org/olat/core/util/ZipUtil.java
|
5668a41ab3f1753102a89757be013487544279d5
| 0
|
Analyze the following code function for security vulnerabilities
|
private void removeRosterEntryFromGroups(RosterEntry rosterEntry)
throws YaximXMPPException {
Collection<RosterGroup> oldGroups = rosterEntry.getGroups();
for (RosterGroup group : oldGroups) {
tryToRemoveUserFromGroup(group, rosterEntry);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeRosterEntryFromGroups
File: src/org/yaxim/androidclient/service/SmackableImp.java
Repository: ge0rg/yaxim
The code follows secure coding practices.
|
[
"CWE-20",
"CWE-346"
] |
CVE-2017-5589
|
MEDIUM
| 4.3
|
ge0rg/yaxim
|
removeRosterEntryFromGroups
|
src/org/yaxim/androidclient/service/SmackableImp.java
|
65a38dc77545d9568732189e86089390f0ceaf9f
| 0
|
Analyze the following code function for security vulnerabilities
|
public static final native int getUidForName(String name);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUidForName
File: core/java/android/os/Process.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3911
|
HIGH
| 9.3
|
android
|
getUidForName
|
core/java/android/os/Process.java
|
2c7008421cb67f5d89f16911bdbe36f6c35311ad
| 0
|
Analyze the following code function for security vulnerabilities
|
private Connection getStandaloneConnection(String newDB, boolean superUser) throws SQLException {
String host = postgreSQLClientConfig.getString(HOST);
int port = postgreSQLClientConfig.getInteger(PORT);
String user = postgreSQLClientConfig.getString(_USERNAME);
String pass = postgreSQLClientConfig.getString(_PASSWORD);
String db = postgreSQLClientConfig.getString(DATABASE);
if(newDB != null){
db = newDB;
if(!superUser){
pass = newDB;
user = newDB;
}
}
return DriverManager.getConnection(
"jdbc:postgresql://"+host+":"+port+"/"+db, user , pass);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStandaloneConnection
File: domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
getStandaloneConnection
|
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean hasLazyResultSet() {
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasLazyResultSet
File: server/src/main/java/io/crate/execution/engine/collect/files/FileReadingIterator.java
Repository: crate
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2024-24565
|
MEDIUM
| 6.5
|
crate
|
hasLazyResultSet
|
server/src/main/java/io/crate/execution/engine/collect/files/FileReadingIterator.java
|
4e857d675683095945dd524d6ba03e692c70ecd6
| 0
|
Analyze the following code function for security vulnerabilities
|
private static byte[] retrieveResponseAsBytes(HttpURLConnection connection) throws IOException {
final int responseCode = connection.getResponseCode();
if (responseCode < HttpURLConnection.HTTP_BAD_REQUEST) {
try (InputStream input = connection.getInputStream()) {
return retrieveData(input);
}
} else {
try (InputStream error = connection.getErrorStream()) {
final byte[] bytes = retrieveData(error);
throw new IOException(
"HTTP error " + responseCode + " with " + new String(bytes, StandardCharsets.UTF_8));
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: retrieveResponseAsBytes
File: src/net/sourceforge/plantuml/security/SURL.java
Repository: plantuml
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2023-3431
|
MEDIUM
| 5.3
|
plantuml
|
retrieveResponseAsBytes
|
src/net/sourceforge/plantuml/security/SURL.java
|
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void onefailAndOnePassedBuildInstances(Stage instance) {
final JobInstance first = instance.getJobInstances().get(0);
final JobInstance second = instance.getJobInstances().get(1);
first.completing(Failed);
second.completing(Failed);
first.completed(new Date());
second.completed(new Date());
jobInstanceDao.updateStateAndResult(first);
jobInstanceDao.updateStateAndResult(second);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onefailAndOnePassedBuildInstances
File: server/src/test-shared/java/com/thoughtworks/go/server/dao/DatabaseAccessHelper.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-697"
] |
CVE-2022-39308
|
MEDIUM
| 5.9
|
gocd
|
onefailAndOnePassedBuildInstances
|
server/src/test-shared/java/com/thoughtworks/go/server/dao/DatabaseAccessHelper.java
|
236d4baf92e6607f2841c151c855adcc477238b8
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getCurrentBranch() {
CommandLine getCurrentBranchCommand = gitWd().withArg("rev-parse").withArg("--abbrev-ref").withArg("HEAD");
ConsoleResult consoleResult = runOrBomb(getCurrentBranchCommand);
return consoleResult.outputAsString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCurrentBranch
File: domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-77"
] |
CVE-2021-43286
|
MEDIUM
| 6.5
|
gocd
|
getCurrentBranch
|
domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java
|
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
| 0
|
Analyze the following code function for security vulnerabilities
|
private void handleAction(String templateName, WikiReference wikiReference) throws ResourceReferenceHandlerException
{
ExecutionContext executionContext = this.execution.getContext();
if (executionContext == null) {
executionContext = new ExecutionContext();
}
WikiReference currentWiki = null;
XWikiContext context = null;
try {
context = this.xWikiContextInitializer.initialize(executionContext);
currentWiki = context.getWikiReference();
context.setWikiReference(wikiReference);
// We are directly relying on Utils#parseTemplate because we want the plugin manager to properly
// handle the javascript placeholders and it avoids duplicating code.
Utils.parseTemplate(templateName, true, context);
} catch (Exception e) {
throw new ResourceReferenceHandlerException(
String.format("Error while rendering template [%s]: [%s].",
templateName, ExceptionUtils.getRootCauseMessage(e)), e);
} finally {
if (currentWiki != null) {
context.setWikiReference(currentWiki);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleAction
File: xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-default/src/main/java/org/xwiki/security/authentication/internal/resource/AuthenticationResourceReferenceHandler.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-29506
|
MEDIUM
| 6.1
|
xwiki/xwiki-platform
|
handleAction
|
xwiki-platform-core/xwiki-platform-security/xwiki-platform-security-authentication/xwiki-platform-security-authentication-default/src/main/java/org/xwiki/security/authentication/internal/resource/AuthenticationResourceReferenceHandler.java
|
1943ea26c967ef868fb5f67c487d98d97cba0380
| 0
|
Analyze the following code function for security vulnerabilities
|
public static long[] uncompressLongArray(byte[] input)
throws IOException
{
return uncompressLongArray(input, 0, input.length);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: uncompressLongArray
File: src/main/java/org/xerial/snappy/Snappy.java
Repository: xerial/snappy-java
The code follows secure coding practices.
|
[
"CWE-190"
] |
CVE-2023-34454
|
HIGH
| 7.5
|
xerial/snappy-java
|
uncompressLongArray
|
src/main/java/org/xerial/snappy/Snappy.java
|
d0042551e4a3509a725038eb9b2ad1f683674d94
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setUsername(@Nullable String username) {
this.username = username;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUsername
File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/DiscordNotifier.java
Repository: codecentric/spring-boot-admin
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2022-46166
|
CRITICAL
| 9.8
|
codecentric/spring-boot-admin
|
setUsername
|
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/DiscordNotifier.java
|
c14c3ec12533f71f84de9ce3ce5ceb7991975f75
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Controller execute(FolderComponent folderComponent, UserRequest ureq, WindowControl wControl, Translator trans) {
VFSContainer currentContainer = folderComponent.getCurrentContainer();
status = FolderCommandHelper.sanityCheck(wControl, folderComponent);
if(status == FolderCommandStatus.STATUS_FAILED) {
return null;
}
FileSelection selection = new FileSelection(ureq, folderComponent.getCurrentContainerPath());
status = FolderCommandHelper.sanityCheck3(wControl, folderComponent, selection);
if(status == FolderCommandStatus.STATUS_FAILED) {
return null;
}
if(selection.getFiles().isEmpty()) {
status = FolderCommandStatus.STATUS_FAILED;
wControl.setWarning(trans.translate("warning.file.selection.empty"));
return null;
}
MediaResource mr = new ZipMediaResource(currentContainer, selection);
ureq.getDispatchResult().setResultingMediaResource(mr);
return null;
}
|
Vulnerability Classification:
- CWE: CWE-22
- CVE: CVE-2021-41152
- Severity: MEDIUM
- CVSS Score: 4.0
Description: OO-5696: validate file selections against current container
Function: execute
File: src/main/java/org/olat/core/commons/modules/bc/commands/CmdDownloadZip.java
Repository: OpenOLAT
Fixed Code:
@Override
public Controller execute(FolderComponent folderComponent, UserRequest ureq, WindowControl wControl, Translator trans) {
VFSContainer currentContainer = folderComponent.getCurrentContainer();
status = FolderCommandHelper.sanityCheck(wControl, folderComponent);
if(status == FolderCommandStatus.STATUS_FAILED) {
return null;
}
FileSelection selection = new FileSelection(ureq, folderComponent.getCurrentContainer(), folderComponent.getCurrentContainerPath());
status = FolderCommandHelper.sanityCheck3(wControl, folderComponent, selection);
if(status == FolderCommandStatus.STATUS_FAILED) {
return null;
}
if(selection.getFiles().isEmpty()) {
status = FolderCommandStatus.STATUS_FAILED;
wControl.setWarning(trans.translate("warning.file.selection.empty22"));
return null;
}
MediaResource mr = new ZipMediaResource(currentContainer, selection);
ureq.getDispatchResult().setResultingMediaResource(mr);
return null;
}
|
[
"CWE-22"
] |
CVE-2021-41152
|
MEDIUM
| 4
|
OpenOLAT
|
execute
|
src/main/java/org/olat/core/commons/modules/bc/commands/CmdDownloadZip.java
|
418bb509ffcb0e25ab4390563c6c47f0458583eb
| 1
|
Analyze the following code function for security vulnerabilities
|
private void startSettingsActivity() {
mActivityStarter.startActivity(new Intent(android.provider.Settings.ACTION_SETTINGS),
true /* dismissShade */);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startSettingsActivity
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStatusBarHeader.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3886
|
HIGH
| 7.2
|
android
|
startSettingsActivity
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/QuickStatusBarHeader.java
|
6ca6cd5a50311d58a1b7bf8fbef3f9aa29eadcd5
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
protected void initAttachments(Message refMessage) {
addAttachments(refMessage.getAttachments());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initAttachments
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
|
initAttachments
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getColumnIndex(String key) {
getStatement(false);
final Integer index = mColumns.get(key);
if (index == null) {
throw new IllegalArgumentException("column '" + key + "' is invalid");
}
return index;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getColumnIndex
File: core/java/android/database/DatabaseUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2023-40121
|
MEDIUM
| 5.5
|
android
|
getColumnIndex
|
core/java/android/database/DatabaseUtils.java
|
3287ac2d2565dc96bf6177967f8e3aed33954253
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isPackageSignedByKeySetExactly(String packageName, KeySet ks) {
if (packageName == null || ks == null) {
return false;
}
synchronized(mPackages) {
final PackageParser.Package pkg = mPackages.get(packageName);
if (pkg == null) {
Slog.w(TAG, "KeySet requested for unknown package:" + packageName);
throw new IllegalArgumentException("Unknown package: " + packageName);
}
IBinder ksh = ks.getToken();
if (ksh instanceof KeySetHandle) {
KeySetManagerService ksms = mSettings.mKeySetManagerService;
return ksms.packageIsSignedByExactlyLPr(packageName, (KeySetHandle) ksh);
}
return false;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isPackageSignedByKeySetExactly
File: services/core/java/com/android/server/pm/PackageManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2016-2497
|
HIGH
| 7.5
|
android
|
isPackageSignedByKeySetExactly
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean accept(VFSItem vfsItem) {
VFSSecurityCallback secCallback = vfsItem.getLocalSecurityCallback();
if(secCallback != null && !secCallback.canWrite()) {
return false;
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: accept
File: src/main/java/org/olat/core/commons/modules/bc/commands/CmdMoveCopy.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-41152
|
MEDIUM
| 4
|
OpenOLAT
|
accept
|
src/main/java/org/olat/core/commons/modules/bc/commands/CmdMoveCopy.java
|
418bb509ffcb0e25ab4390563c6c47f0458583eb
| 0
|
Analyze the following code function for security vulnerabilities
|
private static native @Nullable String[] nativeGetLocales(long ptr, boolean excludeSystem);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nativeGetLocales
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
|
nativeGetLocales
|
core/java/android/content/res/AssetManager.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public InputStream createInputStream() {
if (context.getBody() != null) {
byte[] data = new byte[context.getBody().length()];
context.getBody().getBytes(data);
return new ByteArrayInputStream(data);
}
return new VertxInputStream(context, 10000, this);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createInputStream
File: independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/VertxResteasyReactiveRequestContext.java
Repository: quarkusio/quarkus
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-0981
|
MEDIUM
| 6.5
|
quarkusio/quarkus
|
createInputStream
|
independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/VertxResteasyReactiveRequestContext.java
|
96c64fd8f09c02a497e2db366c64dd9196582442
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isApplicable(Class<? extends AbstractProject> jobType) {
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isApplicable
File: core/src/main/java/hudson/tasks/BuildTrigger.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
isApplicable
|
core/src/main/java/hudson/tasks/BuildTrigger.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
public Writer write(Writer writer) throws JSONException {
try {
int hashMapSize = this.myHashMap.size();
boolean dropObjectKeyName = false;
if (hashMapSize == 1) {
dropObjectKeyName = dropRootElement
|| ignoredElements != null && ignoredElements.contains(keys().next());
}
if (!dropObjectKeyName) {
writer.write('{');
}
boolean b = false;
Iterator keys = keys();
while (keys.hasNext()) {
if (b) {
writer.write(',');
b = false;
}
String k = keys.next().toString();
Object v = this.myHashMap.get(k);
boolean mayBeDropSimpleElement = false;
if (!dropObjectKeyName) {
mayBeDropSimpleElement = hashMapSize > 1
&& ignoredElements != null && ignoredElements.contains(k);
if (!mayBeDropSimpleElement) {
writer.write(quote(k, escapeForwardSlashAlways));
writer.write(':');
}
}
if (v instanceof JSONObject) {
((JSONObject)v).write(writer);
} else if (v instanceof JSONArray) {
((JSONArray)v).write(writer);
} else if (!mayBeDropSimpleElement) {
writer.write(valueToString(v, escapeForwardSlashAlways));
}
if (!mayBeDropSimpleElement) {
b = true;
}
}
if (!dropObjectKeyName) {
writer.write('}');
}
return writer;
} catch (IOException e) {
throw new JSONException(e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: write
File: src/main/java/org/codehaus/jettison/json/JSONObject.java
Repository: jettison-json/jettison
The code follows secure coding practices.
|
[
"CWE-674",
"CWE-787"
] |
CVE-2022-45693
|
HIGH
| 7.5
|
jettison-json/jettison
|
write
|
src/main/java/org/codehaus/jettison/json/JSONObject.java
|
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setOriginalDocument(XWikiDocument originalDocument)
{
this.originalDocument = originalDocument;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setOriginalDocument
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-26470
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
setOriginalDocument
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int removeMember(String memberId) {
LBMember member;
member = members.get(memberId);
if(member != null){
if (member.poolId != null)
pools.get(member.poolId).members.remove(memberId);
members.remove(memberId);
return 0;
} else {
return -1;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeMember
File: src/main/java/net/floodlightcontroller/loadbalancer/LoadBalancer.java
Repository: floodlight
The code follows secure coding practices.
|
[
"CWE-362",
"CWE-476"
] |
CVE-2015-6569
|
MEDIUM
| 4.3
|
floodlight
|
removeMember
|
src/main/java/net/floodlightcontroller/loadbalancer/LoadBalancer.java
|
7f5bedb625eec3ff4d29987c31cef2553a962b36
| 0
|
Analyze the following code function for security vulnerabilities
|
private void uploadAzureCopyAttachment(AttachmentRequest attachmentRequest, String platform, String platformId) {
List<String> attachmentIds = attachmentService.getAttachmentIdsByParam(attachmentRequest);
if (CollectionUtils.isNotEmpty(attachmentIds)) {
attachmentIds.forEach(attachmentId -> {
FileAttachmentMetadata fileAttachmentMetadata = attachmentService.getFileAttachmentMetadataByFileId(attachmentId);
File file = new File(fileAttachmentMetadata.getFilePath() + "/" + fileAttachmentMetadata.getName());
IssuesRequest createRequest = new IssuesRequest();
createRequest.setWorkspaceId(SessionUtils.getCurrentWorkspaceId());
createRequest.setProjectId(SessionUtils.getCurrentProjectId());
IssuesPlatform azurePlatform = Objects.requireNonNull(IssueFactory.createPlatform(platform, createRequest));
IssuesUpdateRequest uploadRequest = new IssuesUpdateRequest();
uploadRequest.setPlatformId(platformId);
azurePlatform.syncIssuesAttachment(uploadRequest, file, AttachmentSyncType.UPLOAD);
});
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: uploadAzureCopyAttachment
File: test-track/backend/src/main/java/io/metersphere/service/IssuesService.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2022-23544
|
MEDIUM
| 6.1
|
metersphere
|
uploadAzureCopyAttachment
|
test-track/backend/src/main/java/io/metersphere/service/IssuesService.java
|
d0f95b50737c941b29d507a4cc3545f2dc6ab121
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void copy(InputStream is, File dest) throws Exception {
OutputStream os = null;
try {
os = new FileOutputStream(dest);
byte[] buffer = new byte[1024];
int length;
while ((length = is.read(buffer)) > 0) {
os.write(buffer, 0, length);
}
} catch (Exception e) {
logger.error("Exception while copying resource. " + e.getMessage());
throw e;
} finally {
if (is != null)
is.close();
if (os != null)
os.close();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: copy
File: src/main/java/widoco/WidocoUtils.java
Repository: dgarijo/Widoco
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-4772
|
HIGH
| 7.8
|
dgarijo/Widoco
|
copy
|
src/main/java/widoco/WidocoUtils.java
|
f2279b76827f32190adfa9bd5229b7d5a147fa92
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public PacketCollector createPacketCollectorAndSend(StanzaFilter packetFilter, Stanza packet)
throws NotConnectedException, InterruptedException {
// Create the packet collector before sending the packet
PacketCollector packetCollector = createPacketCollector(packetFilter);
try {
// Now we can send the packet as the collector has been created
sendStanza(packet);
}
catch (InterruptedException | NotConnectedException | RuntimeException e) {
packetCollector.cancel();
throw e;
}
return packetCollector;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createPacketCollectorAndSend
File: smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
Repository: igniterealtime/Smack
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2016-10027
|
MEDIUM
| 4.3
|
igniterealtime/Smack
|
createPacketCollectorAndSend
|
smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
|
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
| 0
|
Analyze the following code function for security vulnerabilities
|
private SupplicantState handleSupplicantStateChange(StateChangeResult stateChangeResult) {
SupplicantState state = stateChangeResult.state;
mWifiScoreCard.noteSupplicantStateChanging(mWifiInfo, state);
// Supplicant state change
// [31-13] Reserved for future use
// [8 - 0] Supplicant state (as defined in SupplicantState.java)
// 50023 supplicant_state_changed (custom|1|5)
mWifiInfo.setSupplicantState(state);
// Network id and SSID are only valid when we start connecting
if (SupplicantState.isConnecting(state)) {
mWifiInfo.setNetworkId(stateChangeResult.networkId);
mWifiInfo.setBSSID(stateChangeResult.bssid);
mWifiInfo.setSSID(stateChangeResult.wifiSsid);
setMultiLinkInfo(stateChangeResult.bssid);
if (state == SupplicantState.ASSOCIATED) {
updateWifiInfoLinkParamsAfterAssociation();
}
mWifiInfo.setInformationElements(findMatchingInfoElements(stateChangeResult.bssid));
} else {
// Reset parameters according to WifiInfo.reset()
mWifiInfo.setNetworkId(WifiConfiguration.INVALID_NETWORK_ID);
mWifiInfo.setBSSID(null);
mWifiInfo.setSSID(null);
mWifiInfo.setWifiStandard(ScanResult.WIFI_STANDARD_UNKNOWN);
mWifiInfo.setInformationElements(null);
mWifiInfo.clearCurrentSecurityType();
mWifiInfo.resetMultiLinkInfo();
}
updateLayer2Information();
// SSID might have been updated, so call updateCapabilities
updateCapabilities();
WifiConfiguration config = getConnectedWifiConfigurationInternal();
if (config == null) {
// If not connected, this should be non-null.
config = getConnectingWifiConfigurationInternal();
}
if (config != null && config.networkId == mWifiInfo.getNetworkId()) {
updateWifiInfoWhenConnected(config);
// Set meteredHint if scan result says network is expensive
ScanDetailCache scanDetailCache = mWifiConfigManager.getScanDetailCacheForNetwork(
config.networkId);
if (scanDetailCache != null) {
ScanDetail scanDetail = scanDetailCache.getScanDetail(stateChangeResult.bssid);
if (scanDetail != null) {
mWifiInfo.setFrequency(scanDetail.getScanResult().frequency);
NetworkDetail networkDetail = scanDetail.getNetworkDetail();
if (networkDetail != null
&& networkDetail.getAnt() == NetworkDetail.Ant.ChargeablePublic) {
mWifiInfo.setMeteredHint(true);
}
}
}
}
mWifiScoreCard.noteSupplicantStateChanged(mWifiInfo);
return state;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleSupplicantStateChange
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
|
handleSupplicantStateChange
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
public static byte[] marshall(Parcelable parceable) {
Parcel parcel = Parcel.obtain();
parceable.writeToParcel(parcel, 0);
byte[] bytes = parcel.marshall();
parcel.recycle();
return bytes;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: marshall
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
|
marshall
|
Ports/Android/src/com/codename1/location/AndroidLocationPlayServiceManager.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setTimeOut(int timeOutInMilliseconds) {
this.timeOut = timeOutInMilliseconds;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setTimeOut
File: JOpenId/src/org/expressme/openid/OpenIdManager.java
Repository: michaelliao/jopenid
The code follows secure coding practices.
|
[
"CWE-208"
] |
CVE-2010-10006
|
LOW
| 1.4
|
michaelliao/jopenid
|
setTimeOut
|
JOpenId/src/org/expressme/openid/OpenIdManager.java
|
c9baaa976b684637f0d5a50268e91846a7a719ab
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected List<Contentlet> findByStructure(String structureInode, int limit, int offset) throws DotDataException, DotStateException, DotSecurityException {
HibernateUtil hu = new HibernateUtil();
hu.setQuery("select inode from inode in class " + com.dotmarketing.portlets.contentlet.business.Contentlet.class.getName() +
", contentletvi in class "+ContentletVersionInfo.class.getName()+
" where type = 'contentlet' and structure_inode = '" + structureInode + "' " +
" and contentletvi.identifier=inode.identifier and contentletvi.workingInode=inode.inode ");
if(offset > 0)
hu.setFirstResult(offset);
if(limit > 0)
hu.setMaxResults(limit);
List<com.dotmarketing.portlets.contentlet.business.Contentlet> fatties = hu.list();
List<Contentlet> result = new ArrayList<Contentlet>();
for (com.dotmarketing.portlets.contentlet.business.Contentlet fatty : fatties) {
Contentlet content = convertFatContentletToContentlet(fatty);
cc.add(String.valueOf(content.getInode()), content);
// result.add(content);
result.add(convertFatContentletToContentlet(fatty));
}
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findByStructure
File: src/com/dotcms/content/elasticsearch/business/ESContentFactoryImpl.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-2355
|
HIGH
| 7.5
|
dotCMS/core
|
findByStructure
|
src/com/dotcms/content/elasticsearch/business/ESContentFactoryImpl.java
|
897f3632d7e471b7a73aabed5b19f6f53d4e5562
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setSlug(String slug) {
this.slug = slug;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSlug
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
|
setSlug
|
src/main/java/cn/luischen/model/ContentDomain.java
|
d104f38aaae2f1b76c33fadfcf6b1ef1c6c340ed
| 0
|
Analyze the following code function for security vulnerabilities
|
private void forwardHosted(Request request, Response response) throws ServletException, IOException {
logger.trace("SAML 1.1::Proceeding to IDP index page");
RequestDispatcher dispatch = getContext().getServletContext()
.getRequestDispatcher(getIdpConfiguration().getHostedURI());
recycle(response);
try {
includeResource(request, response, dispatch);
} catch (ClassCastException cce) {
// JBAS5.1 and 6 quirkiness
includeResource(request.getRequest(), response, dispatch);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: forwardHosted
File: picketlink-tomcat-common/src/main/java/org/picketlink/identity/federation/bindings/tomcat/idp/AbstractIDPValve.java
Repository: picketlink/picketlink-bindings
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2015-3158
|
MEDIUM
| 4
|
picketlink/picketlink-bindings
|
forwardHosted
|
picketlink-tomcat-common/src/main/java/org/picketlink/identity/federation/bindings/tomcat/idp/AbstractIDPValve.java
|
341a37aefd69e67b6b5f6d775499730d6ccaff0d
| 0
|
Analyze the following code function for security vulnerabilities
|
private void onConfigurationChanged() {
if (DEBUG) {
Slog.i(TAG, "onConfigurationChanged()");
}
Locale revised = Locale.getDefault();
if (revised == null || mLocale == null || !revised.equals(mLocale)) {
mLocale = revised;
synchronized (mLock) {
SparseIntArray changedGroups = null;
// Note: updateProvidersForPackageLocked() may remove providers, so we must copy the
// list of installed providers and skip providers that we don't need to update.
// Also note that remove the provider does not clear the Provider component data.
ArrayList<Provider> installedProviders = new ArrayList<>(mProviders);
HashSet<ProviderId> removedProviders = new HashSet<>();
int N = installedProviders.size();
for (int i = N - 1; i >= 0; i--) {
Provider provider = installedProviders.get(i);
ensureGroupStateLoadedLocked(provider.getUserId());
if (!removedProviders.contains(provider.id)) {
final boolean changed = updateProvidersForPackageLocked(
provider.id.componentName.getPackageName(),
provider.getUserId(), removedProviders);
if (changed) {
if (changedGroups == null) {
changedGroups = new SparseIntArray();
}
final int groupId = mSecurityPolicy.getGroupParent(
provider.getUserId());
changedGroups.put(groupId, groupId);
}
}
}
if (changedGroups != null) {
final int groupCount = changedGroups.size();
for (int i = 0; i < groupCount; i++) {
final int groupId = changedGroups.get(i);
saveGroupStateAsync(groupId);
}
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onConfigurationChanged
File: services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-1541
|
MEDIUM
| 4.3
|
android
|
onConfigurationChanged
|
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
|
0b98d304c467184602b4c6bce76fda0b0274bc07
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void testRoundTripOfInstantAndJavaUtilDate() throws Exception
{
ObjectMapper mapper = newMapper();
mapper.configure(SerializationFeature.WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS, false);
mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
mapper.configure(DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS, false);
Instant givenInstant = LocalDate.of(2016, 1, 1).atStartOfDay().atZone(ZoneOffset.UTC).toInstant();
String json = mapper.writeValueAsString(java.util.Date.from(givenInstant));
Instant actual = mapper.readValue(json, Instant.class);
assertEquals(givenInstant, actual);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: testRoundTripOfInstantAndJavaUtilDate
File: datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestInstantSerialization.java
Repository: FasterXML/jackson-modules-java8
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-1000873
|
MEDIUM
| 4.3
|
FasterXML/jackson-modules-java8
|
testRoundTripOfInstantAndJavaUtilDate
|
datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestInstantSerialization.java
|
ba27ce5909dfb49bcaf753ad3e04ecb980010b0b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable
protected AtWhoReferenceSupport getReferenceSupport() {
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getReferenceSupport
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
|
getReferenceSupport
|
server-core/src/main/java/io/onedev/server/web/component/markdown/MarkdownEditor.java
|
f864053176c08f59ef2d97fea192ceca46a4d9be
| 0
|
Analyze the following code function for security vulnerabilities
|
private int runListInstrumentation() {
int flags = 0; // flags != 0 is only used to request meta-data
boolean showPackage = false;
String targetPackage = null;
try {
String opt;
while ((opt=nextArg()) != null) {
if (opt.equals("-f")) {
showPackage = true;
} else if (opt.charAt(0) != '-') {
targetPackage = opt;
} else {
System.err.println("Error: Unknown option: " + opt);
return 1;
}
}
} catch (RuntimeException ex) {
System.err.println("Error: " + ex.toString());
return 1;
}
try {
List<InstrumentationInfo> list = mPm.queryInstrumentation(targetPackage, flags);
// Sort by target package
Collections.sort(list, new Comparator<InstrumentationInfo>() {
public int compare(InstrumentationInfo o1, InstrumentationInfo o2) {
return o1.targetPackage.compareTo(o2.targetPackage);
}
});
int count = (list != null) ? list.size() : 0;
for (int p = 0; p < count; p++) {
InstrumentationInfo ii = list.get(p);
System.out.print("instrumentation:");
if (showPackage) {
System.out.print(ii.sourceDir);
System.out.print("=");
}
ComponentName cn = new ComponentName(ii.packageName, ii.name);
System.out.print(cn.flattenToShortString());
System.out.print(" (target=");
System.out.print(ii.targetPackage);
System.out.println(")");
}
return 0;
} catch (RemoteException e) {
System.err.println(e.toString());
System.err.println(PM_NOT_RUNNING_ERR);
return 1;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: runListInstrumentation
File: cmds/pm/src/com/android/commands/pm/Pm.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3833
|
HIGH
| 9.3
|
android
|
runListInstrumentation
|
cmds/pm/src/com/android/commands/pm/Pm.java
|
4e4743a354e26467318b437892a9980eb9b8328a
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setAccessToken(String accessToken) {
for (Authentication auth : authentications.values()) {
if (auth instanceof OAuth) {
((OAuth) auth).setAccessToken(accessToken);
return this;
}
}
throw new RuntimeException("No OAuth2 authentication configured!");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAccessToken
File: samples/client/petstore/java/jersey2-java8-localdatetime/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
|
setAccessToken
|
samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.