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
|
@Override
public History getModifications(String wikiName, Integer start, Integer number, String order, Long ts,
Boolean withPrettyNames) throws XWikiRestException
{
try {
History history = new History();
String query = String.format("select doc.space, doc.name, doc.language, rcs.id, rcs.date, rcs.author,"
+ " rcs.comment from XWikiRCSNodeInfo as rcs, XWikiDocument as doc where rcs.id.docId = doc.id and"
+ " rcs.date > :date order by rcs.date %s, rcs.id.version1 %s, rcs.id.version2 %s",
order, order, order);
List<Object> queryResult = null;
queryResult = queryManager.createQuery(query, Query.XWQL).bindValue("date", new Date(ts)).setLimit(number)
.setOffset(start).setWiki(wikiName).execute();
for (Object object : queryResult) {
Object[] fields = (Object[]) object;
String spaceId = (String) fields[0];
List<String> spaces = Utils.getSpacesFromSpaceId(spaceId);
String pageName = (String) fields[1];
String language = (String) fields[2];
if (language.equals("")) {
language = null;
}
XWikiRCSNodeId nodeId = (XWikiRCSNodeId) fields[3];
Timestamp timestamp = (Timestamp) fields[4];
Date modified = new Date(timestamp.getTime());
String modifier = (String) fields[5];
String comment = (String) fields[6];
HistorySummary historySummary = DomainObjectFactory.createHistorySummary(objectFactory,
uriInfo.getBaseUri(), wikiName, spaces, pageName, language, nodeId.getVersion(), modifier,
modified, comment, Utils.getXWikiApi(componentManager), withPrettyNames);
history.getHistorySummaries().add(historySummary);
}
return history;
} catch (QueryException e) {
throw new XWikiRestException(e);
}
}
|
Vulnerability Classification:
- CWE: CWE-359
- CVE: CVE-2022-41936
- Severity: HIGH
- CVSS Score: 7.5
Description: XWIKI-19997: Improved modifications rest endpoint history summary filtering
Function: getModifications
File: xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-server/src/main/java/org/xwiki/rest/internal/resources/ModificationsResourceImpl.java
Repository: xwiki/xwiki-platform
Fixed Code:
@Override
public History getModifications(String wikiName, Integer start, Integer number, String order, Long ts,
Boolean withPrettyNames) throws XWikiRestException
{
try {
History history = new History();
String query = String.format("select doc.space, doc.name, doc.language, rcs.id, rcs.date, rcs.author,"
+ " rcs.comment from XWikiRCSNodeInfo as rcs, XWikiDocument as doc where rcs.id.docId = doc.id and"
+ " rcs.date > :date order by rcs.date %s, rcs.id.version1 %s, rcs.id.version2 %s",
order, order, order);
List<Object> queryResult = null;
queryResult = queryManager.createQuery(query, Query.XWQL).bindValue("date", new Date(ts)).setLimit(number)
.setOffset(start).setWiki(wikiName).execute();
for (Object object : queryResult) {
Object[] fields = (Object[]) object;
String spaceId = (String) fields[0];
List<String> spaces = Utils.getSpacesFromSpaceId(spaceId);
String pageName = (String) fields[1];
DocumentReference documentReference =
this.resolver.resolve(Utils.getPageId(wikiName, spaces, pageName));
if (this.authorizationManager.hasAccess(VIEW, documentReference)) {
String language = (String) fields[2];
if (language.equals("")) {
language = null;
}
XWikiRCSNodeId nodeId = (XWikiRCSNodeId) fields[3];
Timestamp timestamp = (Timestamp) fields[4];
Date modified = new Date(timestamp.getTime());
String modifier = (String) fields[5];
String comment = (String) fields[6];
HistorySummary historySummary =
DomainObjectFactory.createHistorySummary(this.objectFactory, this.uriInfo.getBaseUri(),
wikiName, spaces, pageName, language, nodeId.getVersion(), modifier, modified, comment,
Utils.getXWikiApi(this.componentManager), withPrettyNames);
history.getHistorySummaries().add(historySummary);
}
}
return history;
} catch (QueryException e) {
throw new XWikiRestException(e);
}
}
|
[
"CWE-359"
] |
CVE-2022-41936
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
getModifications
|
xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-server/src/main/java/org/xwiki/rest/internal/resources/ModificationsResourceImpl.java
|
38dc1aa1a4435f24d58f5b8e4566cbcb0971f8ff
| 1
|
Analyze the following code function for security vulnerabilities
|
public static SQLiteDatabase openOrCreateDatabase(@NonNull String path,
@Nullable CursorFactory factory, @Nullable DatabaseErrorHandler errorHandler) {
return openDatabase(path, factory, CREATE_IF_NECESSARY, errorHandler);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: openOrCreateDatabase
File: core/java/android/database/sqlite/SQLiteDatabase.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2018-9493
|
LOW
| 2.1
|
android
|
openOrCreateDatabase
|
core/java/android/database/sqlite/SQLiteDatabase.java
|
ebc250d16c747f4161167b5ff58b3aea88b37acf
| 0
|
Analyze the following code function for security vulnerabilities
|
public Lifecycle getLifecycle() {
return Lifecycle.get();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLifecycle
File: core/src/main/java/jenkins/model/Jenkins.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-2065
|
MEDIUM
| 4.3
|
jenkinsci/jenkins
|
getLifecycle
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
private native boolean nativeOnTouchEvent(
long nativeContentViewCoreImpl, MotionEvent event,
long timeMs, int action, int pointerCount, int historySize, int actionIndex,
float x0, float y0, float x1, float y1,
int pointerId0, int pointerId1,
float touchMajor0, float touchMajor1);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nativeOnTouchEvent
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
|
nativeOnTouchEvent
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
private SyncManager getSyncManager() {
if (SystemProperties.getBoolean("config.disable_network", false)) {
return null;
}
synchronized(mSyncManagerLock) {
try {
// Try to create the SyncManager, return null if it fails (e.g. the disk is full).
if (mSyncManager == null) mSyncManager = new SyncManager(mContext, mFactoryTest);
} catch (SQLiteException e) {
Log.e(TAG, "Can't create SyncManager", e);
}
return mSyncManager;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSyncManager
File: services/core/java/com/android/server/content/ContentService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2426
|
MEDIUM
| 4.3
|
android
|
getSyncManager
|
services/core/java/com/android/server/content/ContentService.java
|
63363af721650e426db5b0bdfb8b2d4fe36abdb0
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getContentType() {
return contentType;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getContentType
File: src/main/java/org/bedework/webdav/servlet/common/PostRequestPars.java
Repository: Bedework/bw-webdav
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-20000
|
MEDIUM
| 5
|
Bedework/bw-webdav
|
getContentType
|
src/main/java/org/bedework/webdav/servlet/common/PostRequestPars.java
|
67283fb8b9609acdb1a8d2e7fefe195b4a261062
| 0
|
Analyze the following code function for security vulnerabilities
|
void readTranslations(WebSession session, String language) {
Properties text = new Properties();
try {
trace("translation: "+language);
byte[] trans = getFile("_text_"+language+".prop");
String s = new String(trans, StandardCharsets.UTF_8);
trace(" " + s);
text = SortedProperties.fromLines(s);
// remove starting # (if not translated yet)
for (Entry<Object, Object> entry : text.entrySet()) {
String value = (String) entry.getValue();
if (value.startsWith("#")) {
entry.setValue(value.substring(1));
}
}
} catch (IOException e) {
DbException.traceThrowable(e);
}
session.put("text", new HashMap<>(text));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readTranslations
File: h2/src/main/org/h2/server/web/WebServer.java
Repository: h2database
The code follows secure coding practices.
|
[
"CWE-312"
] |
CVE-2022-45868
|
HIGH
| 7.8
|
h2database
|
readTranslations
|
h2/src/main/org/h2/server/web/WebServer.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 0
|
Analyze the following code function for security vulnerabilities
|
private Flowable<? extends MutableHttpResponse<?>> filterPublisher(
AtomicReference<HttpRequest<?>> requestReference,
Publisher<MutableHttpResponse<?>> routePublisher,
ExecutorService executor,
boolean skipOncePerRequest) {
Publisher<? extends io.micronaut.http.MutableHttpResponse<?>> finalPublisher;
List<HttpFilter> filters = new ArrayList<>(router.findFilters(requestReference.get()));
if (skipOncePerRequest) {
filters.removeIf(filter -> filter instanceof OncePerRequestHttpServerFilter);
}
if (!filters.isEmpty()) {
// make the action executor the last filter in the chain
filters.add((HttpServerFilter) (req, chain) -> routePublisher);
AtomicInteger integer = new AtomicInteger();
int len = filters.size();
ServerFilterChain filterChain = new ServerFilterChain() {
@SuppressWarnings("unchecked")
@Override
public Publisher<MutableHttpResponse<?>> proceed(io.micronaut.http.HttpRequest<?> request) {
int pos = integer.incrementAndGet();
if (pos > len) {
throw new IllegalStateException("The FilterChain.proceed(..) method should be invoked exactly once per filter execution. The method has instead been invoked multiple times by an erroneous filter definition.");
}
HttpFilter httpFilter = filters.get(pos);
return (Publisher<MutableHttpResponse<?>>) httpFilter.doFilter(requestReference.getAndSet(request), this);
}
};
HttpFilter httpFilter = filters.get(0);
Publisher<? extends HttpResponse<?>> resultingPublisher = httpFilter.doFilter(requestReference.get(), filterChain);
finalPublisher = (Publisher<? extends MutableHttpResponse<?>>) resultingPublisher;
} else {
finalPublisher = routePublisher;
}
// Handle the scheduler to subscribe on
if (finalPublisher instanceof Flowable) {
return ((Flowable<MutableHttpResponse<?>>) finalPublisher)
.subscribeOn(Schedulers.from(executor));
} else {
return Flowable.fromPublisher(finalPublisher)
.subscribeOn(Schedulers.from(executor));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: filterPublisher
File: http-server-netty/src/main/java/io/micronaut/http/server/netty/RoutingInBoundHandler.java
Repository: micronaut-projects/micronaut-core
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-21700
|
MEDIUM
| 5
|
micronaut-projects/micronaut-core
|
filterPublisher
|
http-server-netty/src/main/java/io/micronaut/http/server/netty/RoutingInBoundHandler.java
|
b8ec32c311689667c69ae7d9f9c3b3a8abc96fe3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onRemoteFieldDeactivated() {
sendMessage(NfcService.MSG_RF_FIELD_DEACTIVATED, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onRemoteFieldDeactivated
File: src/com/android/nfc/NfcService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3761
|
LOW
| 2.1
|
android
|
onRemoteFieldDeactivated
|
src/com/android/nfc/NfcService.java
|
9ea802b5456a36f1115549b645b65c791eff3c2c
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("unchecked")
private <A> Http.MultipartFormData.FilePart<A> fieldFile(String key, Field field) {
return field
.<A>file()
.orElse(
(Http.MultipartFormData.FilePart<A>)
value(key).filter(v -> v instanceof Http.MultipartFormData.FilePart).orElse(null));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fieldFile
File: web/play-java-forms/src/main/java/play/data/DynamicForm.java
Repository: playframework
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-31018
|
MEDIUM
| 5
|
playframework
|
fieldFile
|
web/play-java-forms/src/main/java/play/data/DynamicForm.java
|
15393b736df939e35e275af2347155f296c684f2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Exported
public SCM getScm() {
return scm;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getScm
File: core/src/main/java/hudson/model/AbstractProject.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
getScm
|
core/src/main/java/hudson/model/AbstractProject.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getAggregatedPasswordComplexityForUser(int userId, boolean deviceWideOnly) {
if (!mHasFeature) {
return PASSWORD_COMPLEXITY_NONE;
}
final CallerIdentity caller = getCallerIdentity();
Preconditions.checkCallAuthorization(hasFullCrossUsersPermission(caller, userId));
synchronized (getLockObject()) {
return getAggregatedPasswordComplexityLocked(userId, deviceWideOnly);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAggregatedPasswordComplexityForUser
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2023-21284
|
MEDIUM
| 5.5
|
android
|
getAggregatedPasswordComplexityForUser
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void addAPIObj(SubscribedAPI subscribedAPI, NativeArray apisArray,
Scriptable thisObj, Application appObject) throws APIManagementException {
NativeObject apiObj = new NativeObject();
APIConsumer apiConsumer = getAPIConsumer(thisObj);
// ApiMgtDAO apiMgtDAO = new ApiMgtDAO();
try {
API api = apiConsumer.getLightweightAPI(subscribedAPI.getApiId());
apiObj.put("name", apiObj, subscribedAPI.getApiId().getApiName());
apiObj.put("provider", apiObj, APIUtil.replaceEmailDomainBack(subscribedAPI.getApiId().getProviderName()));
apiObj.put("version", apiObj, subscribedAPI.getApiId().getVersion());
apiObj.put("status", apiObj, api.getStatus());
apiObj.put("tier", apiObj, subscribedAPI.getTier().getDisplayName());
apiObj.put("subStatus", apiObj, subscribedAPI.getSubStatus());
apiObj.put("thumburl", apiObj, APIUtil.prependWebContextRoot(api.getThumbnailUrl()));
apiObj.put("context", apiObj, api.getContext());
apiObj.put(APIConstants.API_DATA_BUSINESS_OWNER,
apiObj,
APIUtil.replaceEmailDomainBack(api.getBusinessOwner()));
//Read key from the appObject
APIKey prodKey = getAppKey(appObject, APIConstants.API_KEY_TYPE_PRODUCTION);
if (prodKey != null) {
apiObj.put("prodKey", apiObj, prodKey.getAccessToken());
apiObj.put("prodConsumerKey", apiObj, prodKey.getConsumerKey());
apiObj.put("prodConsumerSecret", apiObj, prodKey.getConsumerSecret());
//apiObj.put("prodAuthorizedDomains", apiObj, prodKey.getAuthorizedDomains());
if (isApplicationAccessTokenNeverExpire(prodKey.getValidityPeriod())) {
apiObj.put("prodValidityTime", apiObj, -1);
} else {
apiObj.put("prodValidityTime", apiObj, prodKey.getValidityPeriod());
}
} else {
apiObj.put("prodKey", apiObj, null);
apiObj.put("prodConsumerKey", apiObj, null);
apiObj.put("prodConsumerSecret", apiObj, null);
apiObj.put("prodAuthorizedDomains", apiObj, null);
if (isApplicationAccessTokenNeverExpire(getApplicationAccessTokenValidityPeriodInSeconds())) {
apiObj.put("prodValidityTime", apiObj, -1);
} else {
apiObj.put("prodValidityTime", apiObj, getApplicationAccessTokenValidityPeriodInSeconds() * 1000);
}
}
APIKey sandboxKey = getAppKey(appObject, APIConstants.API_KEY_TYPE_SANDBOX);
if (sandboxKey != null) {
apiObj.put("sandboxKey", apiObj, sandboxKey.getAccessToken());
apiObj.put("sandboxConsumerKey", apiObj, sandboxKey.getConsumerKey());
apiObj.put("sandboxConsumerSecret", apiObj, sandboxKey.getConsumerSecret());
//apiObj.put("sandAuthorizedDomains", apiObj, sandboxKey.getAuthorizedDomains());
if (isApplicationAccessTokenNeverExpire(sandboxKey.getValidityPeriod())) {
apiObj.put("sandValidityTime", apiObj, -1);
} else {
apiObj.put("sandValidityTime", apiObj, sandboxKey.getValidityPeriod());
}
} else {
apiObj.put("sandboxKey", apiObj, null);
apiObj.put("sandboxConsumerKey", apiObj, null);
apiObj.put("sandboxConsumerSecret", apiObj, null);
apiObj.put("sandAuthorizedDomains", apiObj, null);
if (getApplicationAccessTokenValidityPeriodInSeconds() < 0) {
apiObj.put("sandValidityTime", apiObj, -1);
} else {
apiObj.put("sandValidityTime", apiObj, getApplicationAccessTokenValidityPeriodInSeconds() * 1000);
}
}
apiObj.put("hasMultipleEndpoints", apiObj, String.valueOf(api.getSandboxUrl() != null));
apisArray.put(apisArray.getIds().length, apisArray, apiObj);
} catch (APIManagementException e) {
if (APIUtil.isDueToAuthorizationFailure(e)) {
String message =
"Failed to access the API " + subscribedAPI.getApiId() + " due to an authorization failure";
log.info(message);
} else {
// we didn't throw this exception if registry corruption occured as mentioned in https://wso2.org/jira/browse/APIMANAGER-2046
log.error("Error while retrieving API " + subscribedAPI.getApiId(), e);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addAPIObj
File: components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
Repository: wso2/carbon-apimgt
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2018-20736
|
LOW
| 3.5
|
wso2/carbon-apimgt
|
addAPIObj
|
components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
|
490f2860822f89d745b7c04fa9570bd86bef4236
| 0
|
Analyze the following code function for security vulnerabilities
|
@Beta
public static String getFileExtension(String fullName) {
checkNotNull(fullName);
String fileName = new File(fullName).getName();
int dotIndex = fileName.lastIndexOf('.');
return (dotIndex == -1) ? "" : fileName.substring(dotIndex + 1);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFileExtension
File: guava/src/com/google/common/io/Files.java
Repository: google/guava
The code follows secure coding practices.
|
[
"CWE-732"
] |
CVE-2020-8908
|
LOW
| 2.1
|
google/guava
|
getFileExtension
|
guava/src/com/google/common/io/Files.java
|
fec0dbc4634006a6162cfd4d0d09c962073ddf40
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void run() {
FaweTimer timer = Fawe.instance().getTimer();
if (cancelled.get()) {
return;
}
if (update.isEmpty()) {
TaskManager.taskManager().laterAsync(this, 1);
return;
}
Iterator<Map.Entry<UUID, MutablePair<World, Set<BlockVector2>>>> plrIter = update.entrySet().iterator();
while (timer.getTPS() > 18 && plrIter.hasNext()) {
if (cancelled.get()) {
return;
}
Map.Entry<UUID, MutablePair<World, Set<BlockVector2>>> entry = plrIter.next();
MutablePair<World, Set<BlockVector2>> pair = entry.getValue();
World world = pair.getKey();
Set<BlockVector2> chunks = pair.getValue();
if (chunks != null) {
Iterator<BlockVector2> chunksIter = chunks.iterator();
while (chunksIter.hasNext() && pair.getValue() == chunks) { // Ensure the queued load is still valid
BlockVector2 chunk = chunksIter.next();
queueLoad(world, chunk);
}
}
plrIter.remove();
}
if (cancelled.get()) {
return;
}
TaskManager.taskManager().laterAsync(this, 20);
}
|
Vulnerability Classification:
- CWE: CWE-400
- CVE: CVE-2023-35925
- Severity: MEDIUM
- CVSS Score: 5.5
Description: feat: prevent edits outside +/- 30,000,000 blocks
Function: run
File: worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/preloader/AsyncPreloader.java
Repository: IntellectualSites/FastAsyncWorldEdit
Fixed Code:
@Override
public void run() {
FaweTimer timer = Fawe.instance().getTimer();
if (cancelled.get()) {
return;
}
if (update.isEmpty()) {
TaskManager.taskManager().laterAsync(this, 1);
return;
}
Iterator<Map.Entry<UUID, MutablePair<World, Set<BlockVector2>>>> plrIter = update.entrySet().iterator();
while (timer.getTPS() > 18 && plrIter.hasNext()) {
if (cancelled.get()) {
return;
}
Map.Entry<UUID, MutablePair<World, Set<BlockVector2>>> entry = plrIter.next();
MutablePair<World, Set<BlockVector2>> pair = entry.getValue();
World world = pair.getKey();
Set<BlockVector2> chunks = pair.getValue();
if (chunks != null) {
Iterator<BlockVector2> chunksIter = chunks.iterator();
while (chunksIter.hasNext() && pair.getValue() == chunks) { // Ensure the queued load is still valid
BlockVector2 chunk = chunksIter.next();
if (Settings.settings().REGION_RESTRICTIONS_OPTIONS.RESTRICT_TO_SAFE_RANGE) {
int x = chunk.getX();
int z = chunk.getZ();
// if any chunk coord is outside 30 million blocks
if (x > 1875000 || z > 1875000 || x < -1875000 || z < -1875000) {
continue;
}
}
queueLoad(world, chunk);
}
}
plrIter.remove();
}
if (cancelled.get()) {
return;
}
TaskManager.taskManager().laterAsync(this, 20);
}
|
[
"CWE-400"
] |
CVE-2023-35925
|
MEDIUM
| 5.5
|
IntellectualSites/FastAsyncWorldEdit
|
run
|
worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/preloader/AsyncPreloader.java
|
3a8dfb4f7b858a439c35f7af1d56d21f796f61f5
| 1
|
Analyze the following code function for security vulnerabilities
|
private static boolean scanArgs(String[] args, String value) {
if (args != null) {
for (String arg : args) {
if (value.equals(arg)) {
return true;
}
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: scanArgs
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
|
scanArgs
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
// When it's large screen 2-pane and Settings app is in the background, receiving an Intent
// will not recreate this activity. Update the intent for this case.
setIntent(intent);
reloadHighlightMenuKey();
if (isFinishing()) {
return;
}
// Launch the intent from deep link for large screen devices.
launchDeepLinkIntentToRight();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onNewIntent
File: src/com/android/settings/homepage/SettingsHomepageActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21256
|
HIGH
| 7.8
|
android
|
onNewIntent
|
src/com/android/settings/homepage/SettingsHomepageActivity.java
|
62fc1d269f5e754fc8f00b6167d79c3933b4c1f4
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
public IPackageManager getPackageManager() {
return AppGlobals.getPackageManager();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPackageManager
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
|
getPackageManager
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void addLockoutResetCallback(final IFingerprintServiceLockoutResetCallback callback)
throws RemoteException {
mHandler.post(new Runnable() {
@Override
public void run() {
addLockoutResetMonitor(
new FingerprintServiceLockoutResetMonitor(callback));
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addLockoutResetCallback
File: services/core/java/com/android/server/fingerprint/FingerprintService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
addLockoutResetCallback
|
services/core/java/com/android/server/fingerprint/FingerprintService.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
void startRecentsActivity() {
// Check if the top task is in the home stack, and start the recents activity
ActivityManager.RunningTaskInfo topTask = mSystemServicesProxy.getTopMostTask();
AtomicBoolean isTopTaskHome = new AtomicBoolean(true);
if (topTask == null || !mSystemServicesProxy.isRecentsTopMost(topTask, isTopTaskHome)) {
startRecentsActivity(topTask, isTopTaskHome.get());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startRecentsActivity
File: packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-0813
|
MEDIUM
| 6.6
|
android
|
startRecentsActivity
|
packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java
|
16a76dadcc23a13223e9c2216dad1fe5cad7d6e1
| 0
|
Analyze the following code function for security vulnerabilities
|
public String lang(String key) {
String text = "";
try {
text = language.getString(key);
} catch (Exception e) {
}
if (text == null || text == "")
text = "Language string error on " + key;
return text;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: lang
File: src/main/java/com/jflyfox/modules/filemanager/FileManager.java
Repository: jflyfox/jfinal_cms
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2021-37262
|
MEDIUM
| 5
|
jflyfox/jfinal_cms
|
lang
|
src/main/java/com/jflyfox/modules/filemanager/FileManager.java
|
e7fd0fe9362464c4d2bd308318eecc89a847b116
| 0
|
Analyze the following code function for security vulnerabilities
|
private void tryToLoginAsJohnSmith(TestUtils testUtils, AbstractRegistrationPage registrationPage)
{
// Fast logout.
testUtils.forceGuestUser();
testUtils.getDriver().get(testUtils.getURLToLoginAs("JohnSmith", "WeakPassword"));
assertTrue(registrationPage.isAuthenticated());
testUtils.recacheSecretToken();
testUtils.setDefaultCredentials("JohnSmith", "WeakPassword");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: tryToLoginAsJohnSmith
File: xwiki-platform-core/xwiki-platform-administration/xwiki-platform-administration-test/xwiki-platform-administration-test-docker/src/test/it/org/xwiki/administration/test/ui/RegisterIT.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2024-21650
|
CRITICAL
| 9.8
|
xwiki/xwiki-platform
|
tryToLoginAsJohnSmith
|
xwiki-platform-core/xwiki-platform-administration/xwiki-platform-administration-test/xwiki-platform-administration-test-docker/src/test/it/org/xwiki/administration/test/ui/RegisterIT.java
|
b290bfd573c6f7db6cc15a88dd4111d9fcad0d31
| 0
|
Analyze the following code function for security vulnerabilities
|
protected Object unmarshalStaxSource(Unmarshaller jaxbUnmarshaller, Source staxSource) throws JAXBException {
XMLStreamReader streamReader = StaxUtils.getXMLStreamReader(staxSource);
if (streamReader != null) {
return (this.mappedClass != null ?
jaxbUnmarshaller.unmarshal(streamReader, this.mappedClass).getValue() :
jaxbUnmarshaller.unmarshal(streamReader));
}
else {
XMLEventReader eventReader = StaxUtils.getXMLEventReader(staxSource);
if (eventReader != null) {
return (this.mappedClass != null ?
jaxbUnmarshaller.unmarshal(eventReader, this.mappedClass).getValue() :
jaxbUnmarshaller.unmarshal(eventReader));
}
else {
throw new IllegalArgumentException("StaxSource contains neither XMLStreamReader nor XMLEventReader");
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unmarshalStaxSource
File: spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java
Repository: spring-projects/spring-framework
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-4152
|
MEDIUM
| 6.8
|
spring-projects/spring-framework
|
unmarshalStaxSource
|
spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java
|
2843b7d2ee12e3f9c458f6f816befd21b402e3b9
| 0
|
Analyze the following code function for security vulnerabilities
|
void onShowModeChanged(@NonNull SoftKeyboardController controller,
@SoftKeyboardShowMode int showMode);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onShowModeChanged
File: core/java/android/accessibilityservice/AccessibilityService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3923
|
MEDIUM
| 4.3
|
android
|
onShowModeChanged
|
core/java/android/accessibilityservice/AccessibilityService.java
|
5f256310187b4ff2f13a7abb9afed9126facd7bc
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public SleepToken acquireSleepToken(String tag) {
Preconditions.checkNotNull(tag);
synchronized (ActivityManagerService.this) {
SleepTokenImpl token = new SleepTokenImpl(tag);
mSleepTokens.add(token);
updateSleepIfNeededLocked();
return token;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: acquireSleepToken
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
|
acquireSleepToken
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
9878bb99b77c3681f0fda116e2964bac26f349c3
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getMostRecentProgress() {
return mMostRecentProgress;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMostRecentProgress
File: components/web_contents_delegate_android/android/java/src/org/chromium/components/web_contents_delegate_android/WebContentsDelegateAndroid.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
getMostRecentProgress
|
components/web_contents_delegate_android/android/java/src/org/chromium/components/web_contents_delegate_android/WebContentsDelegateAndroid.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
public @Nullable ComponentName getProfileOwnerOrDeviceOwnerSupervisionComponent(
@NonNull UserHandle user) {
if (mService != null) {
return mGetProfileOwnerOrDeviceOwnerSupervisionComponentCache.query(user);
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProfileOwnerOrDeviceOwnerSupervisionComponent
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
|
getProfileOwnerOrDeviceOwnerSupervisionComponent
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void tarDir(String relative, File dir, TarArchiveOutputStream tos) throws IOException {
File[] files = dir.listFiles();
if (files == null) return;
for (File file : files) {
if (file == null) continue;
if (!file.isHidden()) {
String path = relative + file.getName();
if (file.isDirectory()) {
tarDir(path + File.separator, file, tos);
} else {
TarArchiveEntry entry = new TarArchiveEntry(path);
entry.setMode(TarArchiveEntry.DEFAULT_FILE_MODE);
entry.setSize(file.length());
entry.setModTime(file.lastModified());
tos.putArchiveEntry(entry);
copyFile(file, tos);
tos.closeArchiveEntry();
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: tarDir
File: main/src/com/google/refine/io/FileProjectManager.java
Repository: OpenRefine
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2023-37476
|
HIGH
| 7.8
|
OpenRefine
|
tarDir
|
main/src/com/google/refine/io/FileProjectManager.java
|
e9c1e65d58b47aec8cd676bd5c07d97b002f205e
| 0
|
Analyze the following code function for security vulnerabilities
|
static String stringifyKBSize(long size) {
return stringifySize(size * 1024, 1024);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: stringifyKBSize
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
|
stringifyKBSize
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
static public Reader getReaderFromStream(InputStream inputStream, ObjectNode fileRecord, String commonEncoding) {
String encoding = getEncoding(fileRecord);
if (encoding == null) {
encoding = commonEncoding;
}
if (encoding != null) {
try {
return new InputStreamReader(inputStream, encoding);
} catch (UnsupportedEncodingException e) {
// Ignore and fall through
}
}
return new InputStreamReader(inputStream);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getReaderFromStream
File: main/src/com/google/refine/importing/ImportingUtilities.java
Repository: OpenRefine
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-19859
|
MEDIUM
| 4
|
OpenRefine
|
getReaderFromStream
|
main/src/com/google/refine/importing/ImportingUtilities.java
|
e243e73e4064de87a913946bd320fbbe246da656
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getCallingPackage(IBinder token) throws RemoteException
{
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeStrongBinder(token);
mRemote.transact(GET_CALLING_PACKAGE_TRANSACTION, data, reply, 0);
reply.readException();
String res = reply.readString();
data.recycle();
reply.recycle();
return res;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCallingPackage
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
getCallingPackage
|
core/java/android/app/ActivityManagerNative.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setConnectTimeout(int connectionTimeout) {
this.connectionTimeout = connectionTimeout;
httpClient.property(ClientProperties.CONNECT_TIMEOUT, connectionTimeout);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setConnectTimeout
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
|
setConnectTimeout
|
samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<Entry<P>> getRawPrimitives() {
return getPrimitive(CryptoFormat.RAW_PREFIX);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRawPrimitives
File: java_src/src/main/java/com/google/crypto/tink/PrimitiveSet.java
Repository: tink-crypto/tink
The code follows secure coding practices.
|
[
"CWE-176"
] |
CVE-2020-8929
|
MEDIUM
| 5
|
tink-crypto/tink
|
getRawPrimitives
|
java_src/src/main/java/com/google/crypto/tink/PrimitiveSet.java
|
93d839a5865b9d950dffdc9d0bc99b71280a8899
| 0
|
Analyze the following code function for security vulnerabilities
|
public void requestStart(VaadinRequest request, VaadinResponse response) {
if (!initialized) {
throw new IllegalStateException(
"Can not process requests before init() has been called");
}
setCurrentInstances(request, response);
request.setAttribute(REQUEST_START_TIME_ATTRIBUTE, System.nanoTime());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: requestStart
File: server/src/main/java/com/vaadin/server/VaadinService.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-203"
] |
CVE-2021-31403
|
LOW
| 1.9
|
vaadin/framework
|
requestStart
|
server/src/main/java/com/vaadin/server/VaadinService.java
|
d852126ab6f0c43f937239305bd0e9594834fe34
| 0
|
Analyze the following code function for security vulnerabilities
|
private void assertPackageWithSharedUserIdIsPrivileged(AndroidPackage pkg)
throws PackageManagerException {
if (!pkg.isPrivileged() && (pkg.getSharedUserId() != null)) {
SharedUserSetting sharedUserSetting = null;
try {
sharedUserSetting = mPm.mSettings.getSharedUserLPw(pkg.getSharedUserId(),
0, 0, false);
} catch (PackageManagerException ignore) {
}
if (sharedUserSetting != null && sharedUserSetting.isPrivileged()) {
// Exempt SharedUsers signed with the platform key.
PackageSetting platformPkgSetting = mPm.mSettings.getPackageLPr("android");
if (!comparePackageSignatures(platformPkgSetting,
pkg.getSigningDetails().getSignatures())) {
throw new PackageManagerException("Apps that share a user with a "
+ "privileged app must themselves be marked as privileged. "
+ pkg.getPackageName() + " shares privileged user "
+ pkg.getSharedUserId() + ".");
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: assertPackageWithSharedUserIdIsPrivileged
File: services/core/java/com/android/server/pm/InstallPackageHelper.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21257
|
HIGH
| 7.8
|
android
|
assertPackageWithSharedUserIdIsPrivileged
|
services/core/java/com/android/server/pm/InstallPackageHelper.java
|
1aec7feaf07e6d4568ca75d18158445dbeac10f6
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setServiceKey(@Nullable String serviceKey) {
this.serviceKey = serviceKey;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setServiceKey
File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/PagerdutyNotifier.java
Repository: codecentric/spring-boot-admin
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2022-46166
|
CRITICAL
| 9.8
|
codecentric/spring-boot-admin
|
setServiceKey
|
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/PagerdutyNotifier.java
|
c14c3ec12533f71f84de9ce3ce5ceb7991975f75
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isDeleteExpungeEnabled() {
return myDeleteExpungeEnabled;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isDeleteExpungeEnabled
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
|
isDeleteExpungeEnabled
|
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
|
public String escapeString(String str) {
try {
return URLEncoder.encode(str, "utf8").replaceAll("\\+", "%20");
} catch (UnsupportedEncodingException e) {
return str;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: escapeString
File: samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
escapeString
|
samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Editable(name="Kubectl Config File", order=26000, group="More Settings",
placeholder="Use default", description="Specify absolute path to the config file "
+ "used by kubectl to access the cluster. Leave empty to have kubectl "
+ "determining cluster access information automatically")
public String getConfigFile() {
return configFile;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getConfigFile
File: server-plugin/server-plugin-executor-kubernetes/src/main/java/io/onedev/server/plugin/executor/kubernetes/KubernetesExecutor.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-610"
] |
CVE-2022-39206
|
CRITICAL
| 9.9
|
theonedev/onedev
|
getConfigFile
|
server-plugin/server-plugin-executor-kubernetes/src/main/java/io/onedev/server/plugin/executor/kubernetes/KubernetesExecutor.java
|
0052047a5b5095ac6a6b4a73a522d0272fec3a22
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean hasConstructorExpression(String query) {
Assert.hasText(query, "Query must not be null or empty!");
return CONSTRUCTOR_EXPRESSION.matcher(query).find();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasConstructorExpression
File: src/main/java/org/springframework/data/jpa/repository/query/QueryUtils.java
Repository: spring-projects/spring-data-jpa
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-6652
|
MEDIUM
| 6.8
|
spring-projects/spring-data-jpa
|
hasConstructorExpression
|
src/main/java/org/springframework/data/jpa/repository/query/QueryUtils.java
|
b8e7fe
| 0
|
Analyze the following code function for security vulnerabilities
|
@GuardedBy("mLock")
private void loadBaseStateLocked() {
mRawLastResetTime = 0;
final AtomicFile file = getBaseStateFile();
if (DEBUG || DEBUG_REBOOT) {
Slog.d(TAG, "Loading from " + file.getBaseFile());
}
try (FileInputStream in = file.openRead()) {
TypedXmlPullParser parser = Xml.resolvePullParser(in);
int type;
while ((type = parser.next()) != XmlPullParser.END_DOCUMENT) {
if (type != XmlPullParser.START_TAG) {
continue;
}
final int depth = parser.getDepth();
// Check the root tag
final String tag = parser.getName();
if (depth == 1) {
if (!TAG_ROOT.equals(tag)) {
Slog.e(TAG, "Invalid root tag: " + tag);
return;
}
continue;
}
// Assume depth == 2
switch (tag) {
case TAG_LAST_RESET_TIME:
mRawLastResetTime = parseLongAttribute(parser, ATTR_VALUE);
break;
default:
Slog.e(TAG, "Invalid tag: " + tag);
break;
}
}
} catch (FileNotFoundException e) {
// Use the default
} catch (IOException | XmlPullParserException e) {
Slog.e(TAG, "Failed to read file " + file.getBaseFile(), e);
mRawLastResetTime = 0;
}
// Adjust the last reset time.
getLastResetTimeLocked();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: loadBaseStateLocked
File: services/core/java/com/android/server/pm/ShortcutService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40092
|
MEDIUM
| 5.5
|
android
|
loadBaseStateLocked
|
services/core/java/com/android/server/pm/ShortcutService.java
|
a5e55363e69b3c84d3f4011c7b428edb1a25752c
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean allResumedActivitiesComplete() {
for (int displayNdx = mActivityDisplays.size() - 1; displayNdx >= 0; --displayNdx) {
ArrayList<ActivityStack> stacks = mActivityDisplays.valueAt(displayNdx).mStacks;
for (int stackNdx = stacks.size() - 1; stackNdx >= 0; --stackNdx) {
final ActivityStack stack = stacks.get(stackNdx);
if (isFrontStack(stack)) {
final ActivityRecord r = stack.mResumedActivity;
if (r != null && r.state != RESUMED) {
return false;
}
}
}
}
// TODO: Not sure if this should check if all Paused are complete too.
if (DEBUG_STACK) Slog.d(TAG_STACK,
"allResumedActivitiesComplete: mLastFocusedStack changing from=" +
mLastFocusedStack + " to=" + mFocusedStack);
mLastFocusedStack = mFocusedStack;
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: allResumedActivitiesComplete
File: services/core/java/com/android/server/am/ActivityStackSupervisor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3838
|
MEDIUM
| 4.3
|
android
|
allResumedActivitiesComplete
|
services/core/java/com/android/server/am/ActivityStackSupervisor.java
|
468651c86a8adb7aa56c708d2348e99022088af3
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void touch(File file) {
FileOutputStream fos = null;
try {
if (!file.exists()) {
fos = new FileOutputStream(file);
}
if (!file.setLastModified(System.currentTimeMillis())) {
throw new HazelcastException("Could not touch file " + file.getAbsolutePath());
}
} catch (IOException e) {
throw rethrow(e);
} finally {
closeResource(fos);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: touch
File: hazelcast/src/main/java/com/hazelcast/nio/IOUtil.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
touch
|
hazelcast/src/main/java/com/hazelcast/nio/IOUtil.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public SyncAdapterType[] getSyncAdapterTypesAsUser(int userId) {
enforceCrossUserPermission(userId,
"no permission to read sync settings for user " + userId);
// This makes it so that future permission checks will be in the context of this
// process rather than the caller's process. We will restore this before returning.
final long identityToken = clearCallingIdentity();
try {
SyncManager syncManager = getSyncManager();
return syncManager.getSyncAdapterTypes(userId);
} finally {
restoreCallingIdentity(identityToken);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSyncAdapterTypesAsUser
File: services/core/java/com/android/server/content/ContentService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2426
|
MEDIUM
| 4.3
|
android
|
getSyncAdapterTypesAsUser
|
services/core/java/com/android/server/content/ContentService.java
|
63363af721650e426db5b0bdfb8b2d4fe36abdb0
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Enumeration<?> getPropertyNames() throws JMSException {
return new IteratorEnum<String>(this.userJmsProperties.keySet().iterator());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPropertyNames
File: src/main/java/com/rabbitmq/jms/client/RMQMessage.java
Repository: rabbitmq/rabbitmq-jms-client
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2020-36282
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-jms-client
|
getPropertyNames
|
src/main/java/com/rabbitmq/jms/client/RMQMessage.java
|
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getEditURL(String action, String mode) throws XWikiException
{
return this.doc.getEditURL(action, mode, getXWikiContext());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getEditURL
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-23615
|
MEDIUM
| 5.5
|
xwiki/xwiki-platform
|
getEditURL
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
|
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
| 0
|
Analyze the following code function for security vulnerabilities
|
public static final int getUidForPid(int pid) {
String[] procStatusLabels = { "Uid:" };
long[] procStatusValues = new long[1];
procStatusValues[0] = -1;
Process.readProcLines("/proc/" + pid + "/status", procStatusLabels, procStatusValues);
return (int) procStatusValues[0];
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUidForPid
File: core/java/android/os/Process.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3911
|
HIGH
| 9.3
|
android
|
getUidForPid
|
core/java/android/os/Process.java
|
2c7008421cb67f5d89f16911bdbe36f6c35311ad
| 0
|
Analyze the following code function for security vulnerabilities
|
protected ChannelContinuationTimeoutException wrapTimeoutException(final Method m, final TimeoutException e) {
cleanRpcChannelState();
return new ChannelContinuationTimeoutException(e, this, this._channelNumber, m);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: wrapTimeoutException
File: src/main/java/com/rabbitmq/client/impl/AMQChannel.java
Repository: rabbitmq/rabbitmq-java-client
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-46120
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-java-client
|
wrapTimeoutException
|
src/main/java/com/rabbitmq/client/impl/AMQChannel.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getAttachmentURL(String filename)
{
return this.doc.getAttachmentURL(filename, getXWikiContext());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAttachmentURL
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-23615
|
MEDIUM
| 5.5
|
xwiki/xwiki-platform
|
getAttachmentURL
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
|
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setPKIArchiveOptions(String pkiArchiveOptions) {
attributes.put(PKI_ARCHIVE_OPTIONS, pkiArchiveOptions);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setPKIArchiveOptions
File: base/common/src/main/java/com/netscape/certsrv/key/KeyArchivalRequest.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
setPKIArchiveOptions
|
base/common/src/main/java/com/netscape/certsrv/key/KeyArchivalRequest.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public final boolean contains(CharSequence name, String value) {
requireNonNull(name, "name");
requireNonNull(value, "value");
final int h = AsciiString.hashCode(name);
final int i = index(h);
HeaderEntry e = entries[i];
while (e != null) {
if (e.hash == h && keyEquals(e.key, name) &&
AsciiString.contentEquals(e.value, value)) {
return true;
}
e = e.next;
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: contains
File: core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2019-16771
|
MEDIUM
| 5
|
line/armeria
|
contains
|
core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
|
b597f7a865a527a84ee3d6937075cfbb4470ed20
| 0
|
Analyze the following code function for security vulnerabilities
|
public final FilePath getSomeWorkspace() {
R b = getSomeBuildWithWorkspace();
if (b!=null) return b.getWorkspace();
for (WorkspaceBrowser browser : Jenkins.getInstance().getExtensionList(WorkspaceBrowser.class)) {
FilePath f = browser.getWorkspace(this);
if (f != null) return f;
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSomeWorkspace
File: core/src/main/java/hudson/model/AbstractProject.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
getSomeWorkspace
|
core/src/main/java/hudson/model/AbstractProject.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getEmail() {
return email;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getEmail
File: base/common/src/main/java/com/netscape/certsrv/account/Account.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
getEmail
|
base/common/src/main/java/com/netscape/certsrv/account/Account.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void pollState() {
mPollingContext = new int[1];
mPollingContext[0] = 0;
switch (mCi.getRadioState()) {
case RADIO_UNAVAILABLE:
mNewSS.setStateOutOfService();
mNewCellLoc.setStateInvalid();
setSignalStrengthDefaultValues();
mGotCountryCode = false;
pollStateDone();
break;
case RADIO_OFF:
mNewSS.setStateOff();
mNewCellLoc.setStateInvalid();
setSignalStrengthDefaultValues();
mGotCountryCode = false;
if (ServiceState.RIL_RADIO_TECHNOLOGY_IWLAN
!= mSS.getRilDataRadioTechnology()) {
pollStateDone();
}
default:
// Issue all poll-related commands at once, then count
// down the responses which are allowed to arrive
// out-of-order.
mPollingContext[0]++;
// RIL_REQUEST_OPERATOR is necessary for CDMA
mCi.getOperator(
obtainMessage(EVENT_POLL_STATE_OPERATOR_CDMA, mPollingContext));
mPollingContext[0]++;
// RIL_REQUEST_VOICE_REGISTRATION_STATE is necessary for CDMA
mCi.getVoiceRegistrationState(
obtainMessage(EVENT_POLL_STATE_REGISTRATION_CDMA, mPollingContext));
mPollingContext[0]++;
// RIL_REQUEST_DATA_REGISTRATION_STATE
mCi.getDataRegistrationState(obtainMessage(EVENT_POLL_STATE_GPRS,
mPollingContext));
break;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: pollState
File: src/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2016-3831
|
MEDIUM
| 5
|
android
|
pollState
|
src/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
|
f47bc301ccbc5e6d8110afab5a1e9bac1d4ef058
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setMaximumTimeToLock(ComponentName who, String callerPackageName,
long timeMs, boolean parent) {
if (!mHasFeature) {
return;
}
if (!isPermissionCheckFlagEnabled()) {
Objects.requireNonNull(who, "ComponentName is null");
}
int userHandle = mInjector.userHandleGetCallingUserId();
int affectedUserId = parent ? getProfileParentId(userHandle) : userHandle;
synchronized (getLockObject()) {
ActiveAdmin ap;
if (isPermissionCheckFlagEnabled()) {
CallerIdentity caller = getCallerIdentity(who, callerPackageName);
ap = enforcePermissionAndGetEnforcingAdmin(
who,
/*permission=*/ MANAGE_DEVICE_POLICY_LOCK,
/*AdminPolicy=*/DeviceAdminInfo.USES_POLICY_FORCE_LOCK,
caller.getPackageName(),
affectedUserId).getActiveAdmin();
} else {
ap = getActiveAdminForCallerLocked(
who, DeviceAdminInfo.USES_POLICY_FORCE_LOCK, parent);
}
if (ap.maximumTimeToUnlock != timeMs) {
ap.maximumTimeToUnlock = timeMs;
saveSettingsLocked(userHandle);
updateMaximumTimeToLockLocked(userHandle);
}
}
if (SecurityLog.isLoggingEnabled()) {
SecurityLog.writeEvent(SecurityLog.TAG_MAX_SCREEN_LOCK_TIMEOUT_SET,
callerPackageName, userHandle, affectedUserId, timeMs);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setMaximumTimeToLock
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
setMaximumTimeToLock
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@DELETE
@Path("{userCriteria}")
public Response deleteUser(@Context final SecurityContext securityContext, @PathParam("userCriteria") final String userCriteria) {
writeLock();
try {
if (!hasEditRights(securityContext)) {
throw getException(Status.BAD_REQUEST, "User {} does not have write access to users!", securityContext.getUserPrincipal().getName());
}
final OnmsUser user = getOnmsUser(userCriteria);
LOG.debug("deleteUser: deleting user {}", user);
try {
m_userManager.deleteUser(user.getUsername());
} catch (final Throwable t) {
throw getException(Status.INTERNAL_SERVER_ERROR, t);
}
return Response.noContent().build();
} finally {
writeUnlock();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deleteUser
File: opennms-webapp-rest/src/main/java/org/opennms/web/rest/v1/UserRestService.java
Repository: OpenNMS/opennms
The code follows secure coding practices.
|
[
"CWE-269"
] |
CVE-2023-0872
|
HIGH
| 8
|
OpenNMS/opennms
|
deleteUser
|
opennms-webapp-rest/src/main/java/org/opennms/web/rest/v1/UserRestService.java
|
34ab169a74b2bc489ab06d0dbf33fee1ed94c93c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void exceptionCaught(ChannelHandlerContext ctx, ExceptionEvent e)
throws Exception {
Throwable cause = e.getCause();
if (cause instanceof IOException) {
if (cause instanceof ClosedChannelException) {
synchronized (ignoreClosedChannelExceptionLock) {
if (ignoreClosedChannelException > 0) {
ignoreClosedChannelException --;
if (logger.isDebugEnabled()) {
logger.debug(
"Swallowing an exception raised while " +
"writing non-app data", cause);
}
return;
}
}
} else {
if (ignoreException(cause)) {
return;
}
}
}
ctx.sendUpstream(e);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: exceptionCaught
File: src/main/java/org/jboss/netty/handler/ssl/SslHandler.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2014-3488
|
MEDIUM
| 5
|
netty
|
exceptionCaught
|
src/main/java/org/jboss/netty/handler/ssl/SslHandler.java
|
2fa9400a59d0563a66908aba55c41e7285a04994
| 0
|
Analyze the following code function for security vulnerabilities
|
public static int getStaticTypeId() {
return m_staticTypeId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStaticTypeId
File: src/org/opencms/file/types/CmsResourceTypeImage.java
Repository: alkacon/opencms-core
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-3312
|
MEDIUM
| 4
|
alkacon/opencms-core
|
getStaticTypeId
|
src/org/opencms/file/types/CmsResourceTypeImage.java
|
92e035423aa6967822d343e54392d4291648c0ee
| 0
|
Analyze the following code function for security vulnerabilities
|
public Map<String, String> getDefaultValidatorInfo() {
if (defaultValidatorInfo == null) {
synchronized (this) {
if (defaultValidatorInfo == null) {
defaultValidatorInfo = new LinkedHashMap<>();
if (!defaultValidatorIds.isEmpty()) {
for (String id : defaultValidatorIds) {
String validatorClass;
Object result = validatorMap.get(id);
if (null != result) {
if (result instanceof Class) {
validatorClass = ((Class) result).getName();
} else {
validatorClass = result.toString();
}
defaultValidatorInfo.put(id, validatorClass);
}
}
}
}
}
defaultValidatorInfo = unmodifiableMap(defaultValidatorInfo);
}
return defaultValidatorInfo;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDefaultValidatorInfo
File: impl/src/main/java/com/sun/faces/application/applicationimpl/InstanceFactory.java
Repository: eclipse-ee4j/mojarra
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-14371
|
MEDIUM
| 5
|
eclipse-ee4j/mojarra
|
getDefaultValidatorInfo
|
impl/src/main/java/com/sun/faces/application/applicationimpl/InstanceFactory.java
|
1b434748d9239f42eae8aa7d37d7a0930c061e24
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setOCItemDataAuditsTypesExpected() {
this.unsetTypeExpected();
int i = 1;
this.setTypeExpected(i, TypeNames.INT); // item_data_id
++i;
this.setTypeExpected(i, TypeNames.INT); // audit_id
++i;
this.setTypeExpected(i, TypeNames.STRING); // name
++i;
this.setTypeExpected(i, TypeNames.INT); // user_id
++i;
this.setTypeExpected(i, TypeNames.TIMESTAMP); // audit_date
++i;
this.setTypeExpected(i, TypeNames.STRING); // reason_for_change
++i;
this.setTypeExpected(i, TypeNames.STRING); // old_value
++i;
this.setTypeExpected(i, TypeNames.STRING); // new_value
++i;
this.setTypeExpected(i, TypeNames.INT); // audit_log_event_type_id
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setOCItemDataAuditsTypesExpected
File: core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
Repository: OpenClinica
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-24831
|
HIGH
| 7.5
|
OpenClinica
|
setOCItemDataAuditsTypesExpected
|
core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
|
b152cc63019230c9973965a98e4386ea5322c18f
| 0
|
Analyze the following code function for security vulnerabilities
|
private void upsertRoster(final ContentValues values, String jid) {
if (mContentResolver.update(RosterProvider.CONTENT_URI, values,
RosterConstants.JID + " = ?", new String[] { jid }) == 0) {
mContentResolver.insert(RosterProvider.CONTENT_URI, values);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: upsertRoster
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
|
upsertRoster
|
src/org/yaxim/androidclient/service/SmackableImp.java
|
65a38dc77545d9568732189e86089390f0ceaf9f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void endElement(final String uri, final String localName, final String qName) throws SAXException {
if (logger.isDebugEnabled()) {
logger.debug("End Element: " + qName);
}
if (GOOD_URLS.equalsIgnoreCase(qName)) {
if (labelType != null) {
labelType.setIncludedPaths(parseFilterPaths(textBuf.toString(), true, true));
} else if (GLOBALPARAMS.equalsIgnoreCase(tagQueue.get(tagQueue.size() - 2))) {
globalParams.put(GOOD_URLS, textBuf.toString());
}
} else if (BAD_URLS.equalsIgnoreCase(qName)) {
if (labelType != null) {
labelType.setExcludedPaths(parseFilterPaths(textBuf.toString(), true, true));
} else if (GLOBALPARAMS.equalsIgnoreCase(tagQueue.get(tagQueue.size() - 2))) {
globalParams.put(BAD_URLS, textBuf.toString());
}
} else if (START_URLS.equalsIgnoreCase(qName) && GLOBALPARAMS.equalsIgnoreCase(tagQueue.get(tagQueue.size() - 2))) {
globalParams.put(START_URLS, textBuf.toString());
} else if (labelType != null && COLLECTION.equalsIgnoreCase(qName)) {
labelList.add(labelType);
labelType = null;
} else if (GLOBALPARAMS.equalsIgnoreCase(qName)) {
final Object startUrls = globalParams.get(START_URLS);
if (startUrls != null) {
final long now = System.currentTimeMillis();
final List<String> urlList =
split(startUrls.toString(), "\n").get(
stream -> stream.map(String::trim).filter(StringUtil::isNotBlank).collect(Collectors.toList()));
final String webUrls =
urlList.stream().filter(s -> Arrays.stream(webProtocols).anyMatch(p -> s.startsWith(p)))
.collect(Collectors.joining("\n"));
if (StringUtil.isNotBlank(webUrls)) {
webConfig = new WebConfig();
webConfig.setName("Default");
webConfig.setAvailable(true);
webConfig.setBoost(1.0f);
webConfig.setConfigParameter(StringUtil.EMPTY);
webConfig.setIntervalTime(1000);
webConfig.setNumOfThread(3);
webConfig.setSortOrder(1);
webConfig.setUrls(webUrls);
webConfig.setIncludedUrls(parseFilterPaths(globalParams.get(GOOD_URLS), true, false));
webConfig.setIncludedDocUrls(StringUtil.EMPTY);
webConfig.setExcludedUrls(parseFilterPaths(globalParams.get(BAD_URLS), true, false));
webConfig.setExcludedDocUrls(StringUtil.EMPTY);
webConfig.setUserAgent(userAgent);
webConfig.setPermissions(new String[] { "Rguest" });
webConfig.setCreatedBy(Constants.SYSTEM_USER);
webConfig.setCreatedTime(now);
webConfig.setUpdatedBy(Constants.SYSTEM_USER);
webConfig.setUpdatedTime(now);
}
final String fileUrls =
urlList.stream().filter(s -> Arrays.stream(fileProtocols).anyMatch(p -> s.startsWith(p)))
.collect(Collectors.joining("\n"));
if (StringUtil.isNotBlank(fileUrls)) {
fileConfig = new FileConfig();
fileConfig.setName("Default");
fileConfig.setAvailable(true);
fileConfig.setBoost(1.0f);
fileConfig.setConfigParameter(StringUtil.EMPTY);
fileConfig.setIntervalTime(0);
fileConfig.setNumOfThread(5);
fileConfig.setSortOrder(2);
fileConfig.setPaths(fileUrls);
fileConfig.setIncludedPaths(parseFilterPaths(globalParams.get(GOOD_URLS), false, true));
fileConfig.setIncludedDocPaths(StringUtil.EMPTY);
fileConfig.setExcludedPaths(parseFilterPaths(globalParams.get(BAD_URLS), false, true));
fileConfig.setExcludedDocPaths(StringUtil.EMPTY);
fileConfig.setPermissions(new String[] { "Rguest" });
fileConfig.setCreatedBy(Constants.SYSTEM_USER);
fileConfig.setCreatedTime(now);
fileConfig.setUpdatedBy(Constants.SYSTEM_USER);
fileConfig.setUpdatedTime(now);
}
}
} else if ("user_agent".equalsIgnoreCase(qName) && GLOBALPARAMS.equalsIgnoreCase(tagQueue.get(tagQueue.size() - 2))) {
userAgent = textBuf.toString().trim();
}
tagQueue.pollLast();
textBuf.setLength(0);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: endElement
File: src/main/java/org/codelibs/fess/util/GsaConfigParser.java
Repository: codelibs/fess
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000822
|
HIGH
| 7.5
|
codelibs/fess
|
endElement
|
src/main/java/org/codelibs/fess/util/GsaConfigParser.java
|
faa265b8d8f1c71e1bf3229fba5f8cc58a5611b7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void uncaughtException(Thread t, Throwable e) {
if(com.codename1.io.Log.isCrashBound()) {
com.codename1.io.Log.p("Uncaught exception in thread " + t.getName());
com.codename1.io.Log.e(e);
com.codename1.io.Log.sendLog();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: uncaughtException
File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
uncaughtException
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
private void pauseScreenLock() {
if (fingerprintCancellationSignal != null) {
fingerprintCancellationSignal.cancel();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: pauseScreenLock
File: app/src/main/java/org/thoughtcrime/securesms/PassphrasePromptActivity.java
Repository: oxen-io/session-android
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2022-1955
|
LOW
| 2.1
|
oxen-io/session-android
|
pauseScreenLock
|
app/src/main/java/org/thoughtcrime/securesms/PassphrasePromptActivity.java
|
c69b49e676dd8f619418cf296d6fdad9ce5a9510
| 0
|
Analyze the following code function for security vulnerabilities
|
private void adjustOtherHeadsetPriorities(HeadsetService hsService,
List<BluetoothDevice> connectedDeviceList) {
for (BluetoothDevice device : getBondedDevices()) {
if (hsService.getPriority(device) >= BluetoothProfile.PRIORITY_AUTO_CONNECT &&
!connectedDeviceList.contains(device)) {
hsService.setPriority(device, BluetoothProfile.PRIORITY_ON);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: adjustOtherHeadsetPriorities
File: src/com/android/bluetooth/btservice/AdapterService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-362",
"CWE-20"
] |
CVE-2016-3760
|
MEDIUM
| 5.4
|
android
|
adjustOtherHeadsetPriorities
|
src/com/android/bluetooth/btservice/AdapterService.java
|
122feb9a0b04290f55183ff2f0384c6c53756bd8
| 0
|
Analyze the following code function for security vulnerabilities
|
public void updateBinaryStream(@Positive int columnIndex,
@Nullable InputStream inputStream, long length)
throws SQLException {
throw org.postgresql.Driver.notImplemented(this.getClass(),
"updateBinaryStream(int, InputStream, long)");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateBinaryStream
File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
Repository: pgjdbc
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-31197
|
HIGH
| 8
|
pgjdbc
|
updateBinaryStream
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
private void startAnimation(Transaction t, AnimationAdapter adapter) {
startAnimation(t, adapter, mWinAnimator.mLastHidden, ANIMATION_TYPE_WINDOW_ANIMATION);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startAnimation
File: services/core/java/com/android/server/wm/WindowState.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35674
|
HIGH
| 7.8
|
android
|
startAnimation
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
public static SendConfirmDialogFragment newInstance(final int messageId,
final boolean showToast, final ArrayList<String> recipients) {
final SendConfirmDialogFragment frag = new SendConfirmDialogFragment();
final Bundle args = new Bundle(3);
args.putInt(MESSAGE_ID, messageId);
args.putBoolean(SHOW_TOAST, showToast);
args.putStringArrayList(RECIPIENTS, recipients);
frag.setArguments(args);
return frag;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: newInstance
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
|
newInstance
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
public void validateMetadata(String type, Owner owner, File meta,
ConflictOverrides forcedConflicts)
throws IOException, ImporterException {
Meta m = mapper.readValue(meta, Meta.class);
if (type == null) {
throw new ImporterException(i18n.tr("Wrong metadata type"));
}
ExporterMetadata lastrun = null;
if (ExporterMetadata.TYPE_SYSTEM.equals(type)) {
lastrun = expMetaCurator.lookupByType(type);
}
else if (ExporterMetadata.TYPE_PER_USER.equals(type)) {
if (owner == null) {
throw new ImporterException(i18n.tr("Invalid owner"));
}
lastrun = expMetaCurator.lookupByTypeAndOwner(type, owner);
}
if (lastrun == null) {
// this is our first import, let's create a new entry
lastrun = new ExporterMetadata(type, m.getCreated(), owner);
lastrun = expMetaCurator.create(lastrun);
}
else {
if (lastrun.getExported().compareTo(m.getCreated()) > 0) {
if (!forcedConflicts.isForced(Importer.Conflict.MANIFEST_OLD)) {
throw new ImportConflictException(i18n.tr(
"Import is older than existing data"),
Importer.Conflict.MANIFEST_OLD);
}
else {
log.warn("Manifest older than existing data.");
}
}
else if (lastrun.getExported().compareTo(m.getCreated()) == 0) {
if (!forcedConflicts.isForced(Importer.Conflict.MANIFEST_SAME)) {
throw new ImportConflictException(i18n.tr(
"Import is the same as existing data"),
Importer.Conflict.MANIFEST_SAME);
}
else {
log.warn("Manifest same as existing data.");
}
}
lastrun.setExported(m.getCreated());
expMetaCurator.merge(lastrun);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: validateMetadata
File: src/main/java/org/candlepin/sync/Importer.java
Repository: candlepin
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2012-6119
|
LOW
| 2.1
|
candlepin
|
validateMetadata
|
src/main/java/org/candlepin/sync/Importer.java
|
f4d93230e58b969c506b4c9778e04482a059b08c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isUidActive(int uid, String callingPackage) {
if (!hasUsageStatsPermission(callingPackage)) {
enforceCallingPermission(android.Manifest.permission.PACKAGE_USAGE_STATS,
"isUidActive");
}
synchronized (this) {
return isUidActiveLocked(uid);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isUidActive
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
|
isUidActive
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs)
throws IOException {
Path relativeDir = source.relativize(dir);
final Path dirToCreate = Paths.get(destDir.toString(), relativeDir.toString());
if(Files.notExists(dirToCreate)){
Files.createDirectory(dirToCreate);
}
return FileVisitResult.CONTINUE;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: preVisitDirectory
File: src/main/java/org/olat/core/util/PathUtils.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-39180
|
HIGH
| 9
|
OpenOLAT
|
preVisitDirectory
|
src/main/java/org/olat/core/util/PathUtils.java
|
699490be8e931af0ef1f135c55384db1f4232637
| 0
|
Analyze the following code function for security vulnerabilities
|
protected boolean isResultSetClosed() {
return rows == null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isResultSetClosed
File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
Repository: pgjdbc
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-31197
|
HIGH
| 8
|
pgjdbc
|
isResultSetClosed
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
public void closeClient(Handler<AsyncResult<Void>> whenDone) {
if (client == null) {
whenDone.handle(Future.succeededFuture());
return;
}
AsyncSQLClient clientToClose = client;
client = null;
connectionPool.removeMultiKey(vertx, tenantId); // remove (vertx, tenantId, this) entry
clientToClose.close(whenDone);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: closeClient
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
|
closeClient
|
domain-models-runtime/src/main/java/org/folio/rest/persist/PostgresClient.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
public void cancel(Account account, OCFile file) {
Pair<DownloadFileOperation, String> removeResult =
mPendingDownloads.remove(account.name, file.getRemotePath());
DownloadFileOperation download = removeResult.first;
if (download != null) {
download.cancel();
} else {
if (mCurrentDownload != null && currentUser.isPresent() &&
mCurrentDownload.getRemotePath().startsWith(file.getRemotePath()) &&
account.name.equals(currentUser.get().getAccountName())) {
mCurrentDownload.cancel();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cancel
File: src/main/java/com/owncloud/android/files/services/FileDownloader.java
Repository: nextcloud/android
The code follows secure coding practices.
|
[
"CWE-732"
] |
CVE-2022-24886
|
LOW
| 2.1
|
nextcloud/android
|
cancel
|
src/main/java/com/owncloud/android/files/services/FileDownloader.java
|
27559efb79d45782e000b762860658d49e9c35e9
| 0
|
Analyze the following code function for security vulnerabilities
|
public void removeSpace(String space) {
String sid = ScooldUtils.getInstance().getSpaceId(space);
Iterator<String> it = getSpaces().iterator();
while (it.hasNext()) {
if (it.next().startsWith(sid + Para.getConfig().separator())) {
it.remove();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeSpace
File: src/main/java/com/erudika/scoold/core/Profile.java
Repository: Erudika/scoold
The code follows secure coding practices.
|
[
"CWE-130"
] |
CVE-2022-1543
|
MEDIUM
| 6.5
|
Erudika/scoold
|
removeSpace
|
src/main/java/com/erudika/scoold/core/Profile.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
protected byte[] getServerKexData() {
synchronized (kexState) {
return (serverKexData == null) ? null : serverKexData.clone();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getServerKexData
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
|
getServerKexData
|
sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
|
6b0fd46f64bcb75eeeee31d65f10242660aad7c1
| 0
|
Analyze the following code function for security vulnerabilities
|
private ParseException error(String message) {
int absIndex=bufferOffset+index;
int column=absIndex-lineOffset;
int offset=isEndOfText() ? absIndex : absIndex-1;
return new ParseException(message, offset, line, column-1);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: error
File: src/main/org/hjson/JsonParser.java
Repository: hjson/hjson-java
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-34620
|
HIGH
| 7.5
|
hjson/hjson-java
|
error
|
src/main/org/hjson/JsonParser.java
|
91bef056d56bf968451887421c89a44af1d692ff
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean readDotToken(PathTokenAppender appender) {
if (path.currentCharIs(PERIOD) && path.nextCharIs(PERIOD)) {
appender.appendPathToken(PathTokenFactory.crateScanToken());
path.incrementPosition(2);
} else if (!path.hasMoreCharacters()) {
throw new InvalidPathException("Path must not end with a '.");
} else {
path.incrementPosition(1);
}
if(path.currentCharIs(PERIOD)){
throw new InvalidPathException("Character '.' on position " + path.position() + " is not valid.");
}
return readNextToken(appender);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readDotToken
File: json-path/src/main/java/com/jayway/jsonpath/internal/path/PathCompiler.java
Repository: json-path/JsonPath
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-51074
|
MEDIUM
| 5.3
|
json-path/JsonPath
|
readDotToken
|
json-path/src/main/java/com/jayway/jsonpath/internal/path/PathCompiler.java
|
f49ff25e3bad8c8a0c853058181f2c00b5beb305
| 0
|
Analyze the following code function for security vulnerabilities
|
void orElse(Consumer<Config> callback);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: orElse
File: jooby/src/main/java/org/jooby/Jooby.java
Repository: jooby-project/jooby
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-7647
|
MEDIUM
| 5
|
jooby-project/jooby
|
orElse
|
jooby/src/main/java/org/jooby/Jooby.java
|
34f526028e6cd0652125baa33936ffb6a8a4a009
| 0
|
Analyze the following code function for security vulnerabilities
|
public Map<String, WifiConfiguration> getLinkedNetworksWithoutMasking(int networkId) {
WifiConfiguration internalConfig = getInternalConfiguredNetwork(networkId);
if (internalConfig == null) {
return null;
}
Map<String, WifiConfiguration> linkedNetworks = new HashMap<>();
Map<String, Integer> linkedConfigurations = internalConfig.linkedConfigurations;
if (linkedConfigurations == null) {
return null;
}
for (String configKey : linkedConfigurations.keySet()) {
WifiConfiguration linkConfig = getConfiguredNetworkWithoutMasking(configKey);
if (linkConfig == null
|| !linkConfig.isSecurityType(WifiConfiguration.SECURITY_TYPE_PSK)) {
continue;
}
linkConfig.getNetworkSelectionStatus().setCandidateSecurityParams(
SecurityParams.createSecurityParamsBySecurityType(
WifiConfiguration.SECURITY_TYPE_PSK));
linkedNetworks.put(configKey, linkConfig);
}
return linkedNetworks;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLinkedNetworksWithoutMasking
File: service/java/com/android/server/wifi/WifiConfigManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
getLinkedNetworksWithoutMasking
|
service/java/com/android/server/wifi/WifiConfigManager.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
final int startActivityInPackage(int uid, String callingPackage,
Intent intent, String resolvedType, IBinder resultTo,
String resultWho, int requestCode, int startFlags, Bundle options, int userId,
IActivityContainer container, TaskRecord inTask) {
userId = handleIncomingUser(Binder.getCallingPid(), Binder.getCallingUid(), userId,
false, ALLOW_FULL_ONLY, "startActivityInPackage", null);
// TODO: Switch to user app stacks here.
int ret = mStackSupervisor.startActivityMayWait(null, uid, callingPackage, intent,
resolvedType, null, null, resultTo, resultWho, requestCode, startFlags,
null, null, null, options, false, userId, container, inTask);
return ret;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startActivityInPackage
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
|
startActivityInPackage
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
9878bb99b77c3681f0fda116e2964bac26f349c3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void addChannelListener(ChannelListener listener) {
ChannelListener.validateListener(listener);
// avoid race conditions on notifications while session is being closed
if (!isOpen()) {
log.warn("addChannelListener({})[{}] ignore registration while session is closing", this, listener);
return;
}
if (this.channelListeners.add(listener)) {
if (log.isTraceEnabled()) {
log.trace("addChannelListener({})[{}] registered", this, listener);
}
} else {
if (log.isTraceEnabled()) {
log.trace("addChannelListener({})[{}] ignored duplicate", this, listener);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addChannelListener
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
|
addChannelListener
|
sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
|
6b0fd46f64bcb75eeeee31d65f10242660aad7c1
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setText(String text) {
this.text = text;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setText
File: base/common/src/main/java/com/netscape/certsrv/profile/PolicyDefault.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
setText
|
base/common/src/main/java/com/netscape/certsrv/profile/PolicyDefault.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setMediaButtonBroadcastReceiver(ComponentName receiver) throws RemoteException {
final long token = Binder.clearCallingIdentity();
try {
//mPackageName has been verified in MediaSessionService.enforcePackageName().
if (receiver != null && !TextUtils.equals(
mPackageName, receiver.getPackageName())) {
EventLog.writeEvent(0x534e4554, "238177121", -1, ""); // SafetyNet logging.
throw new IllegalArgumentException("receiver does not belong to "
+ "package name provided to MediaSessionRecord. Pkg = " + mPackageName
+ ", Receiver Pkg = " + receiver.getPackageName());
}
if ((mPolicies & MediaSessionPolicyProvider.SESSION_POLICY_IGNORE_BUTTON_RECEIVER)
!= 0) {
return;
}
mMediaButtonReceiverHolder = MediaButtonReceiverHolder.create(mUserId, receiver);
mService.onMediaButtonReceiverChanged(MediaSessionRecord.this);
} finally {
Binder.restoreCallingIdentity(token);
}
}
|
Vulnerability Classification:
- CWE: CWE-400
- CVE: CVE-2023-21280
- Severity: MEDIUM
- CVSS Score: 5.5
Description: Validate ComponentName for MediaButtonBroadcastReceiver
This is a security fix for b/270049379.
Bug: 270049379
Test: atest CtsMediaMiscTestCases
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:c573c83a2aa36ca022302f675d705518dd723a3c)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:ba546a306217389a8ff9e5e948612651fd496081)
Merged-In: I05626f7abf1efef86c9e01ee3f077d7177d7f662
Change-Id: I05626f7abf1efef86c9e01ee3f077d7177d7f662
Function: setMediaButtonBroadcastReceiver
File: services/core/java/com/android/server/media/MediaSessionRecord.java
Repository: android
Fixed Code:
@Override
@RequiresPermission(Manifest.permission.INTERACT_ACROSS_USERS)
public void setMediaButtonBroadcastReceiver(ComponentName receiver) throws RemoteException {
final long token = Binder.clearCallingIdentity();
try {
//mPackageName has been verified in MediaSessionService.enforcePackageName().
if (receiver != null && !TextUtils.equals(
mPackageName, receiver.getPackageName())) {
EventLog.writeEvent(0x534e4554, "238177121", -1, ""); // SafetyNet logging.
throw new IllegalArgumentException("receiver does not belong to "
+ "package name provided to MediaSessionRecord. Pkg = " + mPackageName
+ ", Receiver Pkg = " + receiver.getPackageName());
}
if ((mPolicies & MediaSessionPolicyProvider.SESSION_POLICY_IGNORE_BUTTON_RECEIVER)
!= 0) {
return;
}
if (!componentNameExists(receiver, mContext, mUserId)) {
Log.w(
TAG,
"setMediaButtonBroadcastReceiver(): "
+ "Ignoring invalid component name="
+ receiver);
return;
}
mMediaButtonReceiverHolder = MediaButtonReceiverHolder.create(mUserId, receiver);
mService.onMediaButtonReceiverChanged(MediaSessionRecord.this);
} finally {
Binder.restoreCallingIdentity(token);
}
}
|
[
"CWE-400"
] |
CVE-2023-21280
|
MEDIUM
| 5.5
|
android
|
setMediaButtonBroadcastReceiver
|
services/core/java/com/android/server/media/MediaSessionRecord.java
|
06e772e05514af4aa427641784c5eec39a892ed3
| 1
|
Analyze the following code function for security vulnerabilities
|
public Hierarchy toRestHierarchy(EntityReference targetEntityReference, Boolean withPrettyNames)
{
XWikiContext xcontext = this.xcontextProvider.get();
XWiki xwiki = xcontext.getWiki();
Hierarchy hierarchy = new Hierarchy();
for (EntityReference entityReference : targetEntityReference.getReversedReferenceChain()) {
HierarchyItem hierarchyItem = new HierarchyItem();
hierarchyItem.setName(entityReference.getName());
hierarchyItem.setLabel(entityReference.getName());
hierarchyItem.setType(entityReference.getType().getLowerCase());
hierarchyItem.setUrl(xwiki.getURL(entityReference, xcontext));
if (withPrettyNames) {
try {
if (entityReference.getType() == EntityType.SPACE
|| entityReference.getType() == EntityType.DOCUMENT) {
XWikiDocument document =
xwiki.getDocument(entityReference, xcontext).getTranslatedDocument(xcontext);
hierarchyItem.setLabel(document.getRenderedTitle(Syntax.PLAIN_1_0, xcontext));
hierarchyItem.setUrl(xwiki.getURL(document.getDocumentReferenceWithLocale(), xcontext));
} else if (entityReference.getType() == EntityType.WIKI) {
WikiDescriptor wikiDescriptor = this.wikiDescriptorManager.getById(entityReference.getName());
if (wikiDescriptor != null) {
hierarchyItem.setLabel(wikiDescriptor.getPrettyName());
}
}
} catch (Exception e) {
this.logger.warn(
"Failed to get the pretty name of entity [{}]. Continue using the entity name. Root cause is [{}].",
entityReference, ExceptionUtils.getRootCauseMessage(e));
}
}
hierarchy.withItems(hierarchyItem);
}
return hierarchy;
}
|
Vulnerability Classification:
- CWE: CWE-668
- CVE: CVE-2023-35151
- Severity: HIGH
- CVSS Score: 7.5
Description: XWIKI-16138: Improved REST properties cleanup
Function: toRestHierarchy
File: xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-server/src/main/java/org/xwiki/rest/internal/ModelFactory.java
Repository: xwiki/xwiki-platform
Fixed Code:
public Hierarchy toRestHierarchy(EntityReference targetEntityReference, Boolean withPrettyNames)
{
XWikiContext xcontext = this.xcontextProvider.get();
XWiki xwiki = xcontext.getWiki();
Hierarchy hierarchy = new Hierarchy();
for (EntityReference entityReference : targetEntityReference.getReversedReferenceChain()) {
HierarchyItem hierarchyItem = new HierarchyItem();
hierarchyItem.setName(entityReference.getName());
hierarchyItem.setLabel(entityReference.getName());
hierarchyItem.setType(entityReference.getType().getLowerCase());
hierarchyItem.setUrl(xwiki.getURL(entityReference, xcontext));
if (withPrettyNames) {
try {
if (entityReference.getType() == EntityType.SPACE
|| entityReference.getType() == EntityType.DOCUMENT) {
XWikiDocument document =
xwiki.getDocument(entityReference, xcontext).getTranslatedDocument(xcontext);
hierarchyItem.setLabel(document.getRenderedTitle(Syntax.PLAIN_1_0, xcontext));
hierarchyItem.setUrl(xwiki.getURL(document.getDocumentReferenceWithLocale(), xcontext));
} else if (entityReference.getType() == EntityType.WIKI) {
WikiDescriptor wikiDescriptor = this.wikiDescriptorManager.getById(entityReference.getName());
if (wikiDescriptor != null) {
hierarchyItem.setLabel(wikiDescriptor.getPrettyName());
}
}
} catch (Exception e) {
this.logger.warn(
"Failed to get the pretty name of entity [{}]. Continue using the entity name. Root cause is [{}].",
entityReference, getRootCauseMessage(e));
}
}
hierarchy.withItems(hierarchyItem);
}
return hierarchy;
}
|
[
"CWE-668"
] |
CVE-2023-35151
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
toRestHierarchy
|
xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-server/src/main/java/org/xwiki/rest/internal/ModelFactory.java
|
824cd742ecf5439971247da11bfe7e0ad2b10ede
| 1
|
Analyze the following code function for security vulnerabilities
|
private String getCsrfSessionToken()
{
final MySession session = (MySession) Session.get();
return session.getCsrfToken();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCsrfSessionToken
File: src/main/java/org/projectforge/web/wicket/CsrfTokenHandler.java
Repository: micromata/projectforge-webapp
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2013-7251
|
MEDIUM
| 6.8
|
micromata/projectforge-webapp
|
getCsrfSessionToken
|
src/main/java/org/projectforge/web/wicket/CsrfTokenHandler.java
|
422de35e3c3141e418a73bfb39b430d5fd74077e
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean zip(Set<String> files, File root, File target, boolean withMetadata) {
return zip(files, root, target, VFSAllItemsFilter.ACCEPT_ALL, withMetadata);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: zip
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
|
zip
|
src/main/java/org/olat/core/util/ZipUtil.java
|
5668a41ab3f1753102a89757be013487544279d5
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void getDistinctOn(TestContext context) throws IOException {
Async async = context.async();
final String tableDefiniton = "id UUID PRIMARY KEY , jsonb JSONB NOT NULL, distinct_test_field TEXT";
postgresClient = createTableWithPoLines(context, MOCK_POLINES_TABLE, tableDefiniton);
String distinctOn = "jsonb->>'order_format'";
postgresClient.get(MOCK_POLINES_TABLE, Object.class, "*", "", false, false,
false, null, distinctOn, handler -> {
ResultInfo resultInfo = handler.result().getResultInfo();
context.assertEquals(4, resultInfo.getTotalRecords());
async.complete();
});
async.awaitSuccess();
String whereClause = "WHERE jsonb->>'order_format' = 'Other'";
Async async2 = context.async();
postgresClient.get(MOCK_POLINES_TABLE, Object.class, "*", whereClause, false, false,
false, null, distinctOn, handler -> {
ResultInfo resultInfo = handler.result().getResultInfo();
context.assertEquals(1, resultInfo.getTotalRecords());
async2.complete();
});
async2.awaitSuccess();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDistinctOn
File: domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
getDistinctOn
|
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setProfilerInfo(ProfilerInfo profilerInfo) {
synchronized (mGlobalLock) {
mProfilerInfo = profilerInfo;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setProfilerInfo
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
|
setProfilerInfo
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
static final void dumpMemItems(PrintWriter pw, String prefix, String tag,
ArrayList<MemItem> items, boolean sort, boolean isCompact, boolean dumpSwapPss) {
if (sort && !isCompact) {
Collections.sort(items, new Comparator<MemItem>() {
@Override
public int compare(MemItem lhs, MemItem rhs) {
if (lhs.pss < rhs.pss) {
return 1;
} else if (lhs.pss > rhs.pss) {
return -1;
}
return 0;
}
});
}
for (int i=0; i<items.size(); i++) {
MemItem mi = items.get(i);
if (!isCompact) {
if (dumpSwapPss) {
pw.printf("%s%s: %-60s (%s in swap)\n", prefix, stringifyKBSize(mi.pss),
mi.label, stringifyKBSize(mi.swapPss));
} else {
pw.printf("%s%s: %s\n", prefix, stringifyKBSize(mi.pss), mi.label);
}
} else if (mi.isProc) {
pw.print("proc,"); pw.print(tag); pw.print(","); pw.print(mi.shortLabel);
pw.print(","); pw.print(mi.id); pw.print(","); pw.print(mi.pss); pw.print(",");
pw.print(dumpSwapPss ? mi.swapPss : "N/A");
pw.println(mi.hasActivities ? ",a" : ",e");
} else {
pw.print(tag); pw.print(","); pw.print(mi.shortLabel); pw.print(",");
pw.print(mi.pss); pw.print(","); pw.println(dumpSwapPss ? mi.swapPss : "N/A");
}
if (mi.subitems != null) {
dumpMemItems(pw, prefix + " ", mi.shortLabel, mi.subitems,
true, isCompact, dumpSwapPss);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpMemItems
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3912
|
HIGH
| 9.3
|
android
|
dumpMemItems
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
static int hashCodeAsciiSafe(byte[] bytes, int startPos, int length) {
int hash = HASH_CODE_ASCII_SEED;
final int remainingBytes = length & 7;
final int end = startPos + remainingBytes;
for (int i = startPos - 8 + length; i >= end; i -= 8) {
hash = PlatformDependent0.hashCodeAsciiCompute(getLongSafe(bytes, i), hash);
}
switch(remainingBytes) {
case 7:
return ((hash * HASH_CODE_C1 + hashCodeAsciiSanitize(bytes[startPos]))
* HASH_CODE_C2 + hashCodeAsciiSanitize(getShortSafe(bytes, startPos + 1)))
* HASH_CODE_C1 + hashCodeAsciiSanitize(getIntSafe(bytes, startPos + 3));
case 6:
return (hash * HASH_CODE_C1 + hashCodeAsciiSanitize(getShortSafe(bytes, startPos)))
* HASH_CODE_C2 + hashCodeAsciiSanitize(getIntSafe(bytes, startPos + 2));
case 5:
return (hash * HASH_CODE_C1 + hashCodeAsciiSanitize(bytes[startPos]))
* HASH_CODE_C2 + hashCodeAsciiSanitize(getIntSafe(bytes, startPos + 1));
case 4:
return hash * HASH_CODE_C1 + hashCodeAsciiSanitize(getIntSafe(bytes, startPos));
case 3:
return (hash * HASH_CODE_C1 + hashCodeAsciiSanitize(bytes[startPos]))
* HASH_CODE_C2 + hashCodeAsciiSanitize(getShortSafe(bytes, startPos + 1));
case 2:
return hash * HASH_CODE_C1 + hashCodeAsciiSanitize(getShortSafe(bytes, startPos));
case 1:
return hash * HASH_CODE_C1 + hashCodeAsciiSanitize(bytes[startPos]);
default:
return hash;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hashCodeAsciiSafe
File: common/src/main/java/io/netty/util/internal/PlatformDependent.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-668",
"CWE-378",
"CWE-379"
] |
CVE-2022-24823
|
LOW
| 1.9
|
netty
|
hashCodeAsciiSafe
|
common/src/main/java/io/netty/util/internal/PlatformDependent.java
|
185f8b2756a36aaa4f973f1a2a025e7d981823f1
| 0
|
Analyze the following code function for security vulnerabilities
|
IIpConnectivityMetrics getIIpConnectivityMetrics() {
return (IIpConnectivityMetrics) IIpConnectivityMetrics.Stub.asInterface(
ServiceManager.getService(IpConnectivityLog.SERVICE_NAME));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getIIpConnectivityMetrics
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2023-21284
|
MEDIUM
| 5.5
|
android
|
getIIpConnectivityMetrics
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String asString() {
try {
return super.asString();
} catch (TransformerException e) {
throw wrapExceptionAsRuntimeException(e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: asString
File: src/main/java/com/jamesmurty/utils/XMLBuilder2.java
Repository: jmurty/java-xmlbuilder
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2014-125087
|
MEDIUM
| 5.2
|
jmurty/java-xmlbuilder
|
asString
|
src/main/java/com/jamesmurty/utils/XMLBuilder2.java
|
e6fddca201790abab4f2c274341c0bb8835c3e73
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void dispatchDraw(Canvas canvas) {
super.dispatchDraw(canvas);
if (DEBUG) {
Paint p = new Paint();
p.setColor(Color.RED);
p.setStrokeWidth(2);
p.setStyle(Paint.Style.STROKE);
canvas.drawLine(0, getMaxPanelHeight(), getWidth(), getMaxPanelHeight(), p);
p.setColor(Color.BLUE);
canvas.drawLine(0, getExpandedHeight(), getWidth(), getExpandedHeight(), p);
p.setColor(Color.GREEN);
canvas.drawLine(0, calculatePanelHeightQsExpanded(), getWidth(),
calculatePanelHeightQsExpanded(), p);
p.setColor(Color.YELLOW);
canvas.drawLine(0, calculatePanelHeightShade(), getWidth(),
calculatePanelHeightShade(), p);
p.setColor(Color.MAGENTA);
canvas.drawLine(0, calculateQsTopPadding(), getWidth(),
calculateQsTopPadding(), p);
p.setColor(Color.CYAN);
canvas.drawLine(0, mNotificationStackScroller.getTopPadding(), getWidth(),
mNotificationStackScroller.getTopPadding(), p);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dispatchDraw
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
dispatchDraw
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getCaptcha() {
return captcha;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCaptcha
File: src/com/dotmarketing/cms/comment/struts/CommentsForm.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-254",
"CWE-264"
] |
CVE-2016-8600
|
MEDIUM
| 5
|
dotCMS/core
|
getCaptcha
|
src/com/dotmarketing/cms/comment/struts/CommentsForm.java
|
cb84b130065c9eed1d1df9e4770ffa5d4bd30569
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public long getRemainingWeatherDuration() {
return getWorld().getWeatherDuration();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRemainingWeatherDuration
File: worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java
Repository: IntellectualSites/FastAsyncWorldEdit
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-35925
|
MEDIUM
| 5.5
|
IntellectualSites/FastAsyncWorldEdit
|
getRemainingWeatherDuration
|
worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java
|
3a8dfb4f7b858a439c35f7af1d56d21f796f61f5
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean getLaunchTaskBehind() {
return mAnimationType == ANIM_LAUNCH_TASK_BEHIND;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLaunchTaskBehind
File: core/java/android/app/ActivityOptions.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-20918
|
CRITICAL
| 9.8
|
android
|
getLaunchTaskBehind
|
core/java/android/app/ActivityOptions.java
|
51051de4eb40bb502db448084a83fd6cbfb7d3cf
| 0
|
Analyze the following code function for security vulnerabilities
|
public long optLong(String key) {
return this.optLong(key, 0);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: optLong
File: src/main/java/org/json/JSONObject.java
Repository: stleary/JSON-java
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2023-5072
|
HIGH
| 7.5
|
stleary/JSON-java
|
optLong
|
src/main/java/org/json/JSONObject.java
|
661114c50dcfd53bb041aab66f14bb91e0a87c8a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public ParceledListSlice<PhoneAccountHandle> getAllPhoneAccountHandles() {
try {
Log.startSession("TSI.gAPAH");
try {
enforceModifyPermission(
"getAllPhoneAccountHandles requires MODIFY_PHONE_STATE permission.");
} catch (SecurityException e) {
EventLog.writeEvent(0x534e4554, "62347125", Binder.getCallingUid(),
"getAllPhoneAccountHandles");
throw e;
}
synchronized (mLock) {
final UserHandle callingUserHandle = Binder.getCallingUserHandle();
long token = Binder.clearCallingIdentity();
try {
return new ParceledListSlice<>(mPhoneAccountRegistrar
.getAllPhoneAccountHandles(callingUserHandle));
} catch (Exception e) {
Log.e(this, e, "getAllPhoneAccounts");
throw e;
} finally {
Binder.restoreCallingIdentity(token);
}
}
} finally {
Log.endSession();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAllPhoneAccountHandles
File: src/com/android/server/telecom/TelecomServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21394
|
MEDIUM
| 5.5
|
android
|
getAllPhoneAccountHandles
|
src/com/android/server/telecom/TelecomServiceImpl.java
|
68dca62035c49e14ad26a54f614199cb29a3393f
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setSession(VaadinSession session) {
if (session == null && this.session == null) {
throw new IllegalStateException(
"Session should never be set to null when UI.session is already null");
} else if (session != null && this.session != null) {
throw new IllegalStateException(
"Session has already been set. Old session: "
+ getSessionDetails(this.session)
+ ". New session: " + getSessionDetails(session)
+ ".");
} else {
if (session == null) {
ui.getElement().getNode().setParent(null);
// Disable push when the UI is detached. Otherwise the
// push connection and possibly VaadinSession will live on.
ui.getPushConfiguration().setPushMode(PushMode.DISABLED);
setPushConnection(null);
}
this.session = session;
}
if (session != null) {
ComponentUtil.onComponentAttach(ui, true);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSession
File: flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2023-25499
|
MEDIUM
| 6.5
|
vaadin/flow
|
setSession
|
flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
|
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.