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
|
boolean containsDismissKeyguardWindow() {
// Window state is transient during relaunch. We are not guaranteed to be frozen during the
// entirety of the relaunch.
if (isRelaunching()) {
return mLastContainsDismissKeyguardWindow;
}
for (int i = mChildren.size() - 1; i >= 0; i--) {
if ((mChildren.get(i).mAttrs.flags & FLAG_DISMISS_KEYGUARD) != 0) {
return true;
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: containsDismissKeyguardWindow
File: services/core/java/com/android/server/wm/ActivityRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21145
|
HIGH
| 7.8
|
android
|
containsDismissKeyguardWindow
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
public void post() {
remove();
mListView.postDelayed(this, SEARCH_RESULT_ANNOUNCEMENT_DELAY);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: post
File: services/autofill/java/com/android/server/autofill/ui/DialogFillUi.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-610"
] |
CVE-2023-40133
|
MEDIUM
| 5.5
|
android
|
post
|
services/autofill/java/com/android/server/autofill/ui/DialogFillUi.java
|
08becc8c600f14c5529115cc1a1e0c97cd503f33
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getEndLineNumber() {
return endLineNumber_;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getEndLineNumber
File: src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
Repository: HtmlUnit/htmlunit
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-2798
|
HIGH
| 7.5
|
HtmlUnit/htmlunit
|
getEndLineNumber
|
src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
|
940dc7fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public String deleteRecordAction(boolean keepTraceDocument) throws IOException, IndexUnreachableException {
try {
if (viewManager == null) {
return "";
}
if (IndexerTools.deleteRecord(viewManager.getPi(), keepTraceDocument,
Paths.get(DataManager.getInstance().getConfiguration().getHotfolder()))) {
Messages.info("deleteRecord_success");
return "pretty:index";
}
Messages.error("deleteRecord_failure");
} finally {
deleteRecordKeepTrace = null;
}
return "";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deleteRecordAction
File: goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java
Repository: intranda/goobi-viewer-core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-29014
|
MEDIUM
| 6.1
|
intranda/goobi-viewer-core
|
deleteRecordAction
|
goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java
|
c29efe60e745a94d03debc17681c4950f3917455
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
public void setMnemonic(List<String> keyWords) {
this.keyWords = keyWords;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setMnemonic
File: src/main/java/com/owncloud/android/ui/dialog/SetupEncryptionDialogFragment.java
Repository: nextcloud/android
The code follows secure coding practices.
|
[
"CWE-212"
] |
CVE-2021-32658
|
LOW
| 2.1
|
nextcloud/android
|
setMnemonic
|
src/main/java/com/owncloud/android/ui/dialog/SetupEncryptionDialogFragment.java
|
355f3c745b464b741b20a3b96597303490c26333
| 0
|
Analyze the following code function for security vulnerabilities
|
private void parsePlayerRepair(final List<Element> elements) throws GameParseException {
for (final Element current : elements) {
final PlayerId player = getPlayerId(current, "player", true);
final RepairFrontier repairFrontier = getRepairFrontier(current, "frontier", true);
player.setRepairFrontier(repairFrontier);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parsePlayerRepair
File: game-core/src/main/java/games/strategy/engine/data/GameParser.java
Repository: triplea-game/triplea
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000546
|
MEDIUM
| 6.8
|
triplea-game/triplea
|
parsePlayerRepair
|
game-core/src/main/java/games/strategy/engine/data/GameParser.java
|
0f23875a4c6e166218859a63c884995f15c53895
| 0
|
Analyze the following code function for security vulnerabilities
|
public void toDOM(Document document, Element infoElement) {
if (requestID != null) {
Element requestTypeElement = document.createElement("requestID");
requestTypeElement.appendChild(document.createTextNode(requestID.toHexString()));
infoElement.appendChild(requestTypeElement);
}
if (requestType != null) {
Element requestTypeElement = document.createElement("requestType");
requestTypeElement.appendChild(document.createTextNode(requestType));
infoElement.appendChild(requestTypeElement);
}
if (requestStatus != null) {
Element requestStatusElement = document.createElement("requestStatus");
requestStatusElement.appendChild(document.createTextNode(requestStatus.toString()));
infoElement.appendChild(requestStatusElement);
}
if (requestURL != null) {
Element requestURLElement = document.createElement("requestURL");
requestURLElement.appendChild(document.createTextNode(requestURL));
infoElement.appendChild(requestURLElement);
}
if (realm != null) {
Element realmElement = document.createElement("realm");
realmElement.appendChild(document.createTextNode(realm));
infoElement.appendChild(realmElement);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toDOM
File: base/common/src/main/java/com/netscape/certsrv/request/CMSRequestInfo.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
toDOM
|
base/common/src/main/java/com/netscape/certsrv/request/CMSRequestInfo.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
private void initExecutorService() {
scheduledExecutorService = new ScheduledThreadPoolExecutor(1, r -> {
Thread thread = new Thread(r);
thread.setName("update-version-plugin-thread");
return thread;
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initExecutorService
File: web/src/main/java/com/zrlog/web/plugin/UpdateVersionPlugin.java
Repository: 94fzb/zrlog
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-16643
|
LOW
| 3.5
|
94fzb/zrlog
|
initExecutorService
|
web/src/main/java/com/zrlog/web/plugin/UpdateVersionPlugin.java
|
4a91c83af669e31a22297c14f089d8911d353fa1
| 0
|
Analyze the following code function for security vulnerabilities
|
private int waitResultIfNeeded(WaitResult waitResult, ActivityRecord r,
LaunchingState launchingState) {
final int res = waitResult.result;
if (res == START_DELIVERED_TO_TOP
|| (res == START_TASK_TO_FRONT && r.nowVisible && r.isState(RESUMED))) {
// The activity should already be visible, so nothing to wait.
waitResult.timeout = false;
waitResult.who = r.mActivityComponent;
waitResult.totalTime = 0;
return res;
}
mSupervisor.waitActivityVisibleOrLaunched(waitResult, r, launchingState);
if (res == START_SUCCESS && waitResult.result == START_TASK_TO_FRONT) {
// A trampoline activity is launched and it brings another existing activity to front.
return START_TASK_TO_FRONT;
}
return res;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: waitResultIfNeeded
File: services/core/java/com/android/server/wm/ActivityStarter.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-269"
] |
CVE-2023-21269
|
HIGH
| 7.8
|
android
|
waitResultIfNeeded
|
services/core/java/com/android/server/wm/ActivityStarter.java
|
70ec64dc5a2a816d6aa324190a726a85fd749b30
| 0
|
Analyze the following code function for security vulnerabilities
|
@DeprecatedAt("2022-08-31")
@Deprecated
public Document parseDocument(Reader reader, ParserOptions parserOptions) throws InvalidSyntaxException {
ParserEnvironment parserEnvironment = ParserEnvironment.newParserEnvironment()
.document(reader)
.parserOptions(parserOptions)
.build();
return parseDocumentImpl(parserEnvironment);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseDocument
File: src/main/java/graphql/parser/Parser.java
Repository: graphql-java
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2023-28867
|
HIGH
| 7.5
|
graphql-java
|
parseDocument
|
src/main/java/graphql/parser/Parser.java
|
8a1c884c81c0b656db201cfd95881feb0f430a55
| 0
|
Analyze the following code function for security vulnerabilities
|
private OnDemandDocumentTranslationBundle createOnDemandDocumentBundle(DocumentReference documentReference,
String uid) throws TranslationBundleDoesNotExistsException
{
XWikiContext context = this.xcontextProvider.get();
XWikiDocument document;
try {
document = context.getWiki().getDocument(documentReference, context);
} catch (XWikiException e) {
throw new TranslationBundleDoesNotExistsException("Failed to get translation document", e);
}
if (document.isNew()) {
throw new TranslationBundleDoesNotExistsException(String.format("Document [%s] does not exists",
documentReference));
}
OnDemandDocumentTranslationBundle documentBundle;
try {
documentBundle =
new OnDemandDocumentTranslationBundle(ID_PREFIX, document.getDocumentReference(),
this.componentManagerProvider.get(), this.translationParser, this, uid);
} catch (ComponentLookupException e) {
throw new TranslationBundleDoesNotExistsException("Failed to create document bundle", e);
}
return documentBundle;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createOnDemandDocumentBundle
File: xwiki-platform-core/xwiki-platform-localization/xwiki-platform-localization-sources/xwiki-platform-localization-source-wiki/src/main/java/org/xwiki/localization/wiki/internal/DocumentTranslationBundleFactory.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2023-29510
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
createOnDemandDocumentBundle
|
xwiki-platform-core/xwiki-platform-localization/xwiki-platform-localization-sources/xwiki-platform-localization-source-wiki/src/main/java/org/xwiki/localization/wiki/internal/DocumentTranslationBundleFactory.java
|
d06ff8a58480abc7f63eb1d4b8b366024d990643
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setSerialNumberRangeInUse(boolean serialNumberRangeInUse) {
this.serialNumberRangeInUse = serialNumberRangeInUse;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSerialNumberRangeInUse
File: base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
setSerialNumberRangeInUse
|
base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean defaultUseProxyProperties() {
return Boolean.getBoolean(ASYNC_CLIENT + "useProxyProperties");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: defaultUseProxyProperties
File: src/main/java/com/ning/http/client/AsyncHttpClientConfigDefaults.java
Repository: AsyncHttpClient/async-http-client
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2013-7398
|
MEDIUM
| 4.3
|
AsyncHttpClient/async-http-client
|
defaultUseProxyProperties
|
src/main/java/com/ning/http/client/AsyncHttpClientConfigDefaults.java
|
a894583921c11c3b01f160ada36a8bb9d5158e96
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean removeExcessNetworks() {
final int maxNumConfigs = mContext.getResources().getInteger(
R.integer.config_wifiMaxNumWifiConfigurations);
if (maxNumConfigs < 0) {
// Max number of saved networks not specified.
return false;
}
List<WifiConfiguration> savedNetworks = getSavedNetworks(Process.WIFI_UID);
final int numExcessNetworks = savedNetworks.size() - maxNumConfigs;
if (numExcessNetworks <= 0) {
return false;
}
List<WifiConfiguration> configsToDelete = savedNetworks
.stream()
.sorted(Comparator.comparing((WifiConfiguration config) -> config.carrierId
== TelephonyManager.UNKNOWN_CARRIER_ID)
.thenComparing((WifiConfiguration config) -> config.status
== WifiConfiguration.Status.CURRENT)
.thenComparing((WifiConfiguration config) -> config.getDeletionPriority())
.thenComparing((WifiConfiguration config) -> -config.numRebootsSinceLastUse)
.thenComparing((WifiConfiguration config) ->
Math.max(config.lastConnected, config.lastUpdated))
.thenComparing((WifiConfiguration config) -> {
try {
int authType = config.getAuthType();
return !(authType == WifiConfiguration.KeyMgmt.NONE
|| authType == WifiConfiguration.KeyMgmt.OWE);
} catch (IllegalStateException e) {
// An invalid keymgmt configuration should be pruned first.
return false;
}
})
.thenComparing((WifiConfiguration config) -> config.numAssociation))
.limit(numExcessNetworks)
.collect(Collectors.toList());
for (WifiConfiguration config : configsToDelete) {
mConfiguredNetworks.remove(config.networkId);
localLog("removeExcessNetworks: removed config."
+ " netId=" + config.networkId
+ " configKey=" + config.getProfileKey());
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeExcessNetworks
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
|
removeExcessNetworks
|
service/java/com/android/server/wifi/WifiConfigManager.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected boolean isFilterStopped(PackageParser.ActivityIntentInfo filter, int userId) {
if (!sUserManager.exists(userId)) return true;
PackageParser.Package p = filter.activity.owner;
if (p != null) {
PackageSetting ps = (PackageSetting)p.mExtras;
if (ps != null) {
// System apps are never considered stopped for purposes of
// filtering, because there may be no way for the user to
// actually re-launch them.
return (ps.pkgFlags&ApplicationInfo.FLAG_SYSTEM) == 0
&& ps.getStopped(userId);
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isFilterStopped
File: services/core/java/com/android/server/pm/PackageManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2016-2497
|
HIGH
| 7.5
|
android
|
isFilterStopped
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
private void resetGlobalSetting(int requestingUserId, int mode, String tag) {
if (DEBUG) {
Slog.v(LOG_TAG, "resetGlobalSetting(" + requestingUserId + ", "
+ mode + ", " + tag + ")");
}
mutateGlobalSetting(null, null, tag, false, requestingUserId,
MUTATION_OPERATION_RESET, false, mode);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resetGlobalSetting
File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40117
|
HIGH
| 7.8
|
android
|
resetGlobalSetting
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
ff86ff28cf82124f8e65833a2dd8c319aea08945
| 0
|
Analyze the following code function for security vulnerabilities
|
@Id
@GeneratedValue(generator = "cmsGenerator")
@GenericGenerator(name = "cmsGenerator", strategy = CmsUpgrader.IDENTIFIER_GENERATOR)
@Column(name = "id", unique = true, nullable = false)
public Long getId() {
return this.id;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getId
File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/log/LogLogin.java
Repository: sanluan/PublicCMS
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-21333
|
LOW
| 3.5
|
sanluan/PublicCMS
|
getId
|
publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/log/LogLogin.java
|
b4d5956e65b14347b162424abb197a180229b3db
| 0
|
Analyze the following code function for security vulnerabilities
|
private void instantExpandNotificationsPanel() {
// Make our window larger and the panel expanded.
makeExpandedVisible(true);
mNotificationPanel.expand(false /* animate */);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: instantExpandNotificationsPanel
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
instantExpandNotificationsPanel
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public Builder setTimeout(long durationMs) {
mN.mTimeout = durationMs;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setTimeout
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
setTimeout
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean doStartWebpack(ApplicationConfiguration config,
Pair<File, File> webPackFiles, long start) {
ProcessBuilder processBuilder = new ProcessBuilder()
.directory(npmFolder);
boolean useHomeNodeExec = config.getBooleanProperty(
InitParameters.REQUIRE_HOME_NODE_EXECUTABLE, false);
FrontendTools tools = new FrontendTools(npmFolder.getAbsolutePath(),
() -> FrontendUtils.getVaadinHomeDirectory().getAbsolutePath(),
useHomeNodeExec);
tools.validateNodeAndNpmVersion();
String nodeExec = null;
if (useHomeNodeExec) {
nodeExec = tools.forceAlternativeNodeExecutable();
} else {
nodeExec = tools.getNodeExecutable();
}
List<String> command = makeCommands(config, webPackFiles.getFirst(),
webPackFiles.getSecond(), nodeExec);
console(GREEN, START);
if (getLogger().isDebugEnabled()) {
getLogger().debug(
commandToString(npmFolder.getAbsolutePath(), command));
}
processBuilder.command(command);
try {
webpackProcess.set(
processBuilder.redirectError(ProcessBuilder.Redirect.PIPE)
.redirectErrorStream(true).start());
// We only can save the webpackProcess reference the first time that
// the DevModeHandler is created. There is no way to store
// it in the servlet container, and we do not want to save it in the
// global JVM.
// We instruct the JVM to stop the webpack-dev-server daemon when
// the JVM stops, to avoid leaving daemons running in the system.
// NOTE: that in the corner case that the JVM crashes or it is
// killed
// the daemon will be kept running. But anyways it will also happens
// if the system was configured to be stop the daemon when the
// servlet context is destroyed.
Runtime.getRuntime().addShutdownHook(new Thread(this::stop));
Pattern succeed = Pattern.compile(config.getStringProperty(
SERVLET_PARAMETER_DEVMODE_WEBPACK_SUCCESS_PATTERN,
DEFAULT_OUTPUT_PATTERN));
Pattern failure = Pattern.compile(config.getStringProperty(
SERVLET_PARAMETER_DEVMODE_WEBPACK_ERROR_PATTERN,
DEFAULT_ERROR_PATTERN));
logStream(webpackProcess.get().getInputStream(), succeed, failure);
getLogger().info(LOG_START);
synchronized (this) {
this.wait(Integer.parseInt(config.getStringProperty( // NOSONAR
SERVLET_PARAMETER_DEVMODE_WEBPACK_TIMEOUT,
DEFAULT_TIMEOUT_FOR_PATTERN)));
}
if (!webpackProcess.get().isAlive()) {
throw new IllegalStateException("Webpack exited prematurely");
}
long ms = (System.nanoTime() - start) / 1000000;
getLogger().info(LOG_END, ms);
return true;
} catch (IOException e) {
getLogger().error("Failed to start the webpack process", e);
} catch (InterruptedException e) {
getLogger().debug("Webpack process start has been interrupted", e);
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doStartWebpack
File: vaadin-dev-server/src/main/java/com/vaadin/base/devserver/DevModeHandlerImpl.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-172"
] |
CVE-2021-33604
|
LOW
| 1.2
|
vaadin/flow
|
doStartWebpack
|
vaadin-dev-server/src/main/java/com/vaadin/base/devserver/DevModeHandlerImpl.java
|
2a801c42b406a00c44f4a85b4b4e4a4c5bf89adc
| 0
|
Analyze the following code function for security vulnerabilities
|
public Builder addLoader(ResourcesLoader loader) {
mLoaders.add(loader);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addLoader
File: core/java/android/content/res/AssetManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-415"
] |
CVE-2023-40103
|
HIGH
| 7.8
|
android
|
addLoader
|
core/java/android/content/res/AssetManager.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
Field getReflectionField(ObjectStreamField osf) {
synchronized (reflectionFields) {
Field field = reflectionFields.get(osf);
if (field != null) {
return field;
}
}
try {
Class<?> declaringClass = forClass();
Field field = declaringClass.getDeclaredField(osf.getName());
field.setAccessible(true);
synchronized (reflectionFields) {
reflectionFields.put(osf, field);
}
return reflectionFields.get(osf);
} catch (NoSuchFieldException ex) {
// The caller messed up. We'll return null and won't try to resolve this again.
return null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getReflectionField
File: luni/src/main/java/java/io/ObjectStreamClass.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-7911
|
HIGH
| 7.2
|
android
|
getReflectionField
|
luni/src/main/java/java/io/ObjectStreamClass.java
|
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setDark(boolean dark, boolean animate) {
float darkAmount = dark ? 1 : 0;
if (mDarkAmount == darkAmount) {
return;
}
if (mDarkAnimator != null && mDarkAnimator.isRunning()) {
mDarkAnimator.cancel();
}
if (animate) {
mDarkAnimator = ObjectAnimator.ofFloat(this, SET_DARK_AMOUNT_PROPERTY, darkAmount);
mDarkAnimator.setInterpolator(Interpolators.LINEAR_OUT_SLOW_IN);
mDarkAnimator.setDuration(StackStateAnimator.ANIMATION_DURATION_WAKEUP);
mDarkAnimator.start();
} else {
setDarkAmount(darkAmount);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDark
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
|
setDark
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setRingbackRequested(String callId, boolean ringback,
Session.Info sessionInfo) {
Log.startSession(sessionInfo, "CSW.SRR", mPackageAbbreviation);
long token = Binder.clearCallingIdentity();
try {
synchronized (mLock) {
logIncoming("setRingbackRequested %s %b", callId, ringback);
Call call = mCallIdMapper.getCall(callId);
if (call != null) {
call.setRingbackRequested(ringback);
} else {
// Log.w(this, "setRingback, unknown call id: %s", args.arg1);
}
}
} catch (Throwable t) {
Log.e(ConnectionServiceWrapper.this, t, "");
throw t;
} finally {
Binder.restoreCallingIdentity(token);
Log.endSession();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setRingbackRequested
File: src/com/android/server/telecom/ConnectionServiceWrapper.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
setRingbackRequested
|
src/com/android/server/telecom/ConnectionServiceWrapper.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getVersion() {
return ((Long) DatabaseUtils.longForQuery(this, "PRAGMA user_version;", null)).intValue();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getVersion
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
|
getVersion
|
core/java/android/database/sqlite/SQLiteDatabase.java
|
ebc250d16c747f4161167b5ff58b3aea88b37acf
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isDeviceOwnerApp(String packageName) {
throwIfParentInstance("isDeviceOwnerApp");
return isDeviceOwnerAppOnCallingUser(packageName);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isDeviceOwnerApp
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
|
isDeviceOwnerApp
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<ApiMethodUrlDTO> parseUrl(ApiScenarioWithBLOBs scenario) {
List<ApiMethodUrlDTO> urlList = new ArrayList<>();
try {
String scenarioDefinition = scenario.getScenarioDefinition();
JSONObject scenarioObj = JSONObject.parseObject(scenarioDefinition);
List<ApiMethodUrlDTO> stepUrlList = this.getMethodUrlDTOByHashTreeJsonObj(scenarioObj);
if (CollectionUtils.isNotEmpty(stepUrlList)) {
Collection unionList = CollectionUtils.union(urlList, stepUrlList);
urlList = new ArrayList<>(unionList);
}
} catch (Exception e) {
LogUtil.error(e);
}
return urlList;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseUrl
File: backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2021-45789
|
MEDIUM
| 6.5
|
metersphere
|
parseUrl
|
backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java
|
d74e02cdff47cdf7524d305d098db6ffb7f61b47
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean getLockTaskMode() {
return mLockTaskMode;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLockTaskMode
File: core/java/android/app/ActivityOptions.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-20918
|
CRITICAL
| 9.8
|
android
|
getLockTaskMode
|
core/java/android/app/ActivityOptions.java
|
51051de4eb40bb502db448084a83fd6cbfb7d3cf
| 0
|
Analyze the following code function for security vulnerabilities
|
@JRubyMethod(name = "replace_entities")
public IRubyObject
get_replace_entities(ThreadContext context)
{
return context.runtime.newBoolean(replaceEntities);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: get_replace_entities
File: ext/java/nokogiri/XmlSaxParserContext.java
Repository: sparklemotion/nokogiri
The code follows secure coding practices.
|
[
"CWE-241"
] |
CVE-2022-29181
|
MEDIUM
| 6.4
|
sparklemotion/nokogiri
|
get_replace_entities
|
ext/java/nokogiri/XmlSaxParserContext.java
|
db05ba9a1bd4b90aa6c76742cf6102a7c7297267
| 0
|
Analyze the following code function for security vulnerabilities
|
public Column<T, V> setWidth(double pixelWidth)
throws IllegalStateException, IllegalArgumentException {
checkColumnIsAttached();
if (pixelWidth < 0) {
throw new IllegalArgumentException(
"Pixel width should be greated than 0 (in " + toString()
+ ")");
}
if (pixelWidth != getWidth()) {
getState().width = pixelWidth;
getGrid().markAsDirty();
getGrid().fireColumnResizeEvent(this, false);
}
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setWidth
File: server/src/main/java/com/vaadin/ui/Grid.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-25028
|
MEDIUM
| 4.3
|
vaadin/framework
|
setWidth
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
public String dialogButtonsOk(String okAttribute) {
return dialogButtons(new int[] {BUTTON_OK}, new String[] {okAttribute});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dialogButtonsOk
File: src/org/opencms/workplace/CmsDialog.java
Repository: alkacon/opencms-core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2013-4600
|
MEDIUM
| 4.3
|
alkacon/opencms-core
|
dialogButtonsOk
|
src/org/opencms/workplace/CmsDialog.java
|
72a05e3ea1cf692e2efce002687272e63f98c14a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void getNewInstanceTenant(TestContext context) {
Async async = context.async();
PostgresClient c1 = PostgresClient.getInstance(vertx, TENANT);
c1.closeClient(a -> {
assertSuccess(context, a);
PostgresClient c2 = PostgresClient.getInstance(vertx, TENANT);
context.assertNotEquals(c1, c2, "different instance");
c2.closeClient(context.asyncAssertSuccess());
async.complete();
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNewInstanceTenant
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
|
getNewInstanceTenant
|
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
static public AsymmetricKeyParameter generatePublicKeyParameter(
PublicKey key)
throws InvalidKeyException
{
if (key instanceof DHPublicKey)
{
DHPublicKey k = (DHPublicKey)key;
return new DHPublicKeyParameters(k.getY(),
new DHParameters(k.getParams().getP(), k.getParams().getG(), null, k.getParams().getL()));
}
throw new InvalidKeyException("can't identify DH public key.");
}
|
Vulnerability Classification:
- CWE: CWE-310
- CVE: CVE-2016-1000339
- Severity: MEDIUM
- CVSS Score: 5.0
Description: added better support for DH domain parameters
added s box allocation to AESEngine
reduced use of AESFastEngine.
Function: generatePublicKeyParameter
File: prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/util/DHUtil.java
Repository: bcgit/bc-java
Fixed Code:
static public AsymmetricKeyParameter generatePublicKeyParameter(
PublicKey key)
throws InvalidKeyException
{
if (key instanceof BCDHPublicKey)
{
return ((BCDHPublicKey)key).engineGetKeyParameters();
}
if (key instanceof DHPublicKey)
{
DHPublicKey k = (DHPublicKey)key;
return new DHPublicKeyParameters(k.getY(),
new DHParameters(k.getParams().getP(), k.getParams().getG(), null, k.getParams().getL()));
}
throw new InvalidKeyException("can't identify DH public key.");
}
|
[
"CWE-310"
] |
CVE-2016-1000339
|
MEDIUM
| 5
|
bcgit/bc-java
|
generatePublicKeyParameter
|
prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/util/DHUtil.java
|
413b42f4d770456508585c830cfcde95f9b0e93b
| 1
|
Analyze the following code function for security vulnerabilities
|
public static StringBuilder makePage(final String title,
final String subtitle,
final String body) {
return makePage(null, title, subtitle, body);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: makePage
File: src/tsd/HttpQuery.java
Repository: OpenTSDB/opentsdb
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-25827
|
MEDIUM
| 6.1
|
OpenTSDB/opentsdb
|
makePage
|
src/tsd/HttpQuery.java
|
ff02c1e95e60528275f69b31bcbf7b2ac625cea8
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void addToZip(final ZipOutputStream out, final Path root, final Path file) throws IOException {
if (Files.isDirectory(file)) {
addDirToZip(out, root, file);
} else {
addFileToZip(out, Paths.get(""), file);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addToZip
File: modules/common/app/utils/common/ZipUtil.java
Repository: JATOS
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-4878
|
MEDIUM
| 5.2
|
JATOS
|
addToZip
|
modules/common/app/utils/common/ZipUtil.java
|
2b42519f309d8164e8811392770ce604cdabb5da
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean cancelPendingTitleUpdate() {
if (pendingTitleUpdateCanceler == null) {
return false;
}
boolean result = pendingTitleUpdateCanceler.cancelExecution();
pendingTitleUpdateCanceler = null;
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cancelPendingTitleUpdate
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
|
cancelPendingTitleUpdate
|
flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
|
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
| 0
|
Analyze the following code function for security vulnerabilities
|
public static native String getAssetAllocations();
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAssetAllocations
File: core/java/android/content/res/AssetManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-415"
] |
CVE-2023-40103
|
HIGH
| 7.8
|
android
|
getAssetAllocations
|
core/java/android/content/res/AssetManager.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setRecordingStatusDir(String dir) {
recordStatusDir = dir;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setRecordingStatusDir
File: bbb-common-web/src/main/java/org/bigbluebutton/api/RecordingService.java
Repository: bigbluebutton
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-12443
|
HIGH
| 7.5
|
bigbluebutton
|
setRecordingStatusDir
|
bbb-common-web/src/main/java/org/bigbluebutton/api/RecordingService.java
|
b21ca8355a57286a1e6df96984b3a4c57679a463
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean hasAttachmentVersioning(XWikiContext context)
{
return getStoreConfiguration().isAttachmentVersioningEnabled();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasAttachmentVersioning
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-32620
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
hasAttachmentVersioning
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
private void getAssociatedUserIds(Set<String> result) {
synchronized (_uid2Location) {
for (Map.Entry<String, Set<Location>> entry : _uid2Location.entrySet()) {
for (Location location : entry.getValue()) {
if (location instanceof LocalLocation) {
result.add(entry.getKey());
break;
}
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAssociatedUserIds
File: cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Seti.java
Repository: cometd
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-24721
|
MEDIUM
| 5.5
|
cometd
|
getAssociatedUserIds
|
cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Seti.java
|
bb445a143fbf320f17c62e340455cd74acfb5929
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setHasTopUi(boolean hasTopUi) throws RemoteException {
if (checkCallingPermission(permission.INTERNAL_SYSTEM_WINDOW) != PERMISSION_GRANTED) {
String msg = "Permission Denial: setHasTopUi() from pid="
+ Binder.getCallingPid()
+ ", uid=" + Binder.getCallingUid()
+ " requires " + permission.INTERNAL_SYSTEM_WINDOW;
Slog.w(TAG, msg);
throw new SecurityException(msg);
}
final int pid = Binder.getCallingPid();
final long origId = Binder.clearCallingIdentity();
try {
synchronized (this) {
boolean changed = false;
ProcessRecord pr;
synchronized (mPidsSelfLocked) {
pr = mPidsSelfLocked.get(pid);
if (pr == null) {
Slog.w(TAG, "setHasTopUi called on unknown pid: " + pid);
return;
}
if (pr.hasTopUi != hasTopUi) {
if (DEBUG_OOM_ADJ) {
Slog.d(TAG, "Setting hasTopUi=" + hasTopUi + " for pid=" + pid);
}
pr.hasTopUi = hasTopUi;
changed = true;
}
}
if (changed) {
updateOomAdjLocked(pr, true);
}
}
} finally {
Binder.restoreCallingIdentity(origId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setHasTopUi
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
|
setHasTopUi
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getEscapedContent(XWikiContext context) throws XWikiException
{
return XMLUtils.escape(getTranslatedContent(context));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getEscapedContent
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-26470
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
getEscapedContent
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void sendRedirect(String redirect) throws IOException
{
if (StringUtils.isBlank(redirect)) {
// Nowhere to go to
return;
}
if (StringUtils.containsAny(redirect, '\r', '\n')) {
LOGGER.warn("Possible HTTP Response Splitting attack, attempting to redirect to [{}]", redirect);
return;
}
// check for trusted domains, only if the given location is an absolute URL.
if (ABSOLUTE_URL_PATTERN.matcher(redirect).matches()) {
if (!getURLSecurityManager().isDomainTrusted(new URL(redirect))) {
LOGGER.warn(
"Possible phishing attack, attempting to redirect to [{}], this request has been blocked. "
+ "If the request was legitimate, add the domain related to this request in the list "
+ "of trusted domains in the configuration: it can be configured in xwiki.properties in "
+ "url.trustedDomains.", redirect);
return;
}
}
this.response.sendRedirect(redirect);
}
|
Vulnerability Classification:
- CWE: CWE-601
- CVE: CVE-2023-29204
- Severity: MEDIUM
- CVSS Score: 6.1
Description: XWIKI-19994: False positive redirect checking
Function: sendRedirect
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiServletResponse.java
Repository: xwiki/xwiki-platform
Fixed Code:
@Override
public void sendRedirect(String redirect) throws IOException
{
if (StringUtils.isBlank(redirect)) {
// Nowhere to go to
return;
}
if (StringUtils.containsAny(redirect, '\r', '\n')) {
LOGGER.warn("Possible HTTP Response Splitting attack, attempting to redirect to [{}]", redirect);
return;
}
if (StringUtils.startsWith(redirect, "//")) {
LOGGER.warn("Possible phishing attack, attempting to redirect to [{}]. If this request is legitimate, "
+ "use an actual absolute URL and pay attention to configure properly url.trustedDomains in "
+ "xwiki.properties", redirect);
return;
}
// check for trusted domains, only if the given location is an absolute URL.
if (ABSOLUTE_URL_PATTERN.matcher(redirect).matches()) {
if (!getURLSecurityManager().isDomainTrusted(new URL(redirect))) {
LOGGER.warn(
"Possible phishing attack, attempting to redirect to [{}], this request has been blocked. "
+ "If the request was legitimate, add the domain related to this request in the list "
+ "of trusted domains in the configuration: it can be configured in xwiki.properties in "
+ "url.trustedDomains.", redirect);
return;
}
}
this.response.sendRedirect(redirect);
}
|
[
"CWE-601"
] |
CVE-2023-29204
|
MEDIUM
| 6.1
|
xwiki/xwiki-platform
|
sendRedirect
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiServletResponse.java
|
e4f7f68e93cb08c25632c126356d218abf192d1e
| 1
|
Analyze the following code function for security vulnerabilities
|
native boolean configHciSnoopLogNative(boolean enable);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: configHciSnoopLogNative
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
|
configHciSnoopLogNative
|
src/com/android/bluetooth/btservice/AdapterService.java
|
122feb9a0b04290f55183ff2f0384c6c53756bd8
| 0
|
Analyze the following code function for security vulnerabilities
|
public SVNRepository openRepository(AbstractProject context) throws SVNException {
return Hudson.getInstance().getDescriptorByType(DescriptorImpl.class).getRepository(context,getSVNURL());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: openRepository
File: src/main/java/hudson/scm/SubversionSCM.java
Repository: jenkinsci/subversion-plugin
The code follows secure coding practices.
|
[
"CWE-255"
] |
CVE-2013-6372
|
LOW
| 2.1
|
jenkinsci/subversion-plugin
|
openRepository
|
src/main/java/hudson/scm/SubversionSCM.java
|
7d4562d6f7e40de04bbe29577b51c79f07d05ba6
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getGlobalPrivateDnsMode(@NonNull ComponentName admin) {
throwIfParentInstance("setGlobalPrivateDns");
if (mService == null) {
return PRIVATE_DNS_MODE_UNKNOWN;
}
try {
return mService.getGlobalPrivateDnsMode(admin);
} catch (RemoteException re) {
throw re.rethrowFromSystemServer();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getGlobalPrivateDnsMode
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
|
getGlobalPrivateDnsMode
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequestMapping("counter")
public void count(@RequestAttribute SysSite site, Long id, HttpServletRequest request) {
statisticsComponent.contentClicks(site, id);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: count
File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/controller/web/cms/ContentController.java
Repository: sanluan/PublicCMS
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-21333
|
LOW
| 3.5
|
sanluan/PublicCMS
|
count
|
publiccms-parent/publiccms-core/src/main/java/com/publiccms/controller/web/cms/ContentController.java
|
b4d5956e65b14347b162424abb197a180229b3db
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean supports(AuthenticationToken token) {
return token instanceof JSONWebToken || super.supports(token);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: supports
File: portofino-core/src/main/java/com/manydesigns/portofino/shiro/AbstractPortofinoRealm.java
Repository: ManyDesigns/Portofino
The code follows secure coding practices.
|
[
"CWE-347"
] |
CVE-2021-29451
|
MEDIUM
| 6.4
|
ManyDesigns/Portofino
|
supports
|
portofino-core/src/main/java/com/manydesigns/portofino/shiro/AbstractPortofinoRealm.java
|
8c754a0ad234555e813dcbf9e57d637f9f23d8fb
| 0
|
Analyze the following code function for security vulnerabilities
|
private void highlightList(Map<String, Object> options, List<Object> collection, int width) {
highlightList(options, collection, width, 0);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: highlightList
File: console/src/main/java/org/jline/console/impl/DefaultPrinter.java
Repository: jline/jline3
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-50572
|
MEDIUM
| 5.5
|
jline/jline3
|
highlightList
|
console/src/main/java/org/jline/console/impl/DefaultPrinter.java
|
f3c60a3e6255e8e0c20d5043a4fe248446f292bb
| 0
|
Analyze the following code function for security vulnerabilities
|
public static CiphertextHeaderV2 decode(final InputStream input, final Function<String, SecretKey> keyLookup)
throws EncodingException, StreamException
{
return decodeInternal(
input, keyLookup, ByteUtil::readInt, CiphertextHeaderV2::readByte, CiphertextHeaderV2::readInto);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: decode
File: src/main/java/org/cryptacular/CiphertextHeaderV2.java
Repository: vt-middleware/cryptacular
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2020-7226
|
MEDIUM
| 5
|
vt-middleware/cryptacular
|
decode
|
src/main/java/org/cryptacular/CiphertextHeaderV2.java
|
00395c232cdc62d4292ce27999c026fc1f076b1d
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean isVisibleNow() {
return (mToken.isVisible() || mAttrs.type == TYPE_APPLICATION_STARTING)
&& isVisible();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isVisibleNow
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
|
isVisibleNow
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public boolean exists(String fullname, XWikiContext context)
{
return exists(getCurrentMixedDocumentReferenceResolver().resolve(fullname), context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: exists
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-32620
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
exists
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
@PUT
@Path("threads")
@Operation(summary = "Put threads",
description = "Creates a new thread in the forum of the course node.")
@ApiResponse(responseCode = "200", description = "Ok.",
content = {
@Content(mediaType = "application/json", schema = @Schema(implementation = MessageVO.class)),
@Content(mediaType = "application/xml", schema = @Schema(implementation = MessageVO.class))
})
@ApiResponse(responseCode = "401", description = "The roles of the authenticated user are not sufficient.")
@ApiResponse(responseCode = "404", description = "The author, forum or message not found.")
@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
@Consumes({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
public Response newThreadToForum(@QueryParam("title") @Parameter(description = "The title for the first post in the thread") String title,
@QueryParam("body") String body, @QueryParam("authorKey") @Parameter(description = "The author user key (optional)") Long authorKey,
@Context HttpServletRequest httpRequest) {
Identity author = getMessageAuthor(authorKey, httpRequest);
// creating the thread (a message without a parent message)
Message newThread = fom.createMessage(forum, author, false);
newThread.setTitle(title);
newThread.setBody(body);
// open a new thread
fom.addTopMessage(newThread);
MessageVO vo = new MessageVO(newThread);
return Response.ok(vo).build();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: newThreadToForum
File: src/main/java/org/olat/modules/fo/restapi/ForumWebService.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-41242
|
HIGH
| 7.9
|
OpenOLAT
|
newThreadToForum
|
src/main/java/org/olat/modules/fo/restapi/ForumWebService.java
|
c450df7d7ffe6afde39ebca6da9136f1caa16ec4
| 0
|
Analyze the following code function for security vulnerabilities
|
public static SvnClientManager createClientManager(ISVNAuthenticationProvider authProvider) {
ISVNAuthenticationManager sam = createSvnAuthenticationManager(authProvider);
return new SvnClientManager(SVNClientManager.newInstance(createDefaultSVNOptions(), sam));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createClientManager
File: src/main/java/hudson/scm/SubversionSCM.java
Repository: jenkinsci/subversion-plugin
The code follows secure coding practices.
|
[
"CWE-255"
] |
CVE-2013-6372
|
LOW
| 2.1
|
jenkinsci/subversion-plugin
|
createClientManager
|
src/main/java/hudson/scm/SubversionSCM.java
|
7d4562d6f7e40de04bbe29577b51c79f07d05ba6
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isAccountManagedByCaller(String accountType, int callingUid, int userId) {
if (accountType == null) {
return false;
} else {
return getTypesManagedByCaller(callingUid, userId).contains(accountType);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isAccountManagedByCaller
File: services/core/java/com/android/server/accounts/AccountManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-502"
] |
CVE-2023-45777
|
HIGH
| 7.8
|
android
|
isAccountManagedByCaller
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
public static HostnameVerifier defaultHostnameVerifier() {
return new AllowAllHostnameVerifier();
}
|
Vulnerability Classification:
- CWE: CWE-345
- CVE: CVE-2013-7398
- Severity: MEDIUM
- CVSS Score: 4.3
Description: Use a hostname verifier that does hostname verification, backport #510, close #197
Function: defaultHostnameVerifier
File: src/main/java/com/ning/http/client/AsyncHttpClientConfigDefaults.java
Repository: AsyncHttpClient/async-http-client
Fixed Code:
public static HostnameVerifier defaultHostnameVerifier() {
return new DefaultHostnameVerifier();
}
|
[
"CWE-345"
] |
CVE-2013-7398
|
MEDIUM
| 4.3
|
AsyncHttpClient/async-http-client
|
defaultHostnameVerifier
|
src/main/java/com/ning/http/client/AsyncHttpClientConfigDefaults.java
|
a894583921c11c3b01f160ada36a8bb9d5158e96
| 1
|
Analyze the following code function for security vulnerabilities
|
public boolean isGroup() {
return group;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isGroup
File: goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java
Repository: intranda/goobi-viewer-core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-29014
|
MEDIUM
| 6.1
|
intranda/goobi-viewer-core
|
isGroup
|
goobi-viewer-core/src/main/java/io/goobi/viewer/managedbeans/ActiveDocumentBean.java
|
c29efe60e745a94d03debc17681c4950f3917455
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public PauseRequest pauseAsync() {
final PauseRequest out = new PauseRequest();
out.ready(new SuccessCallback<AsyncMedia>() {
@Override
public void onSucess(AsyncMedia value) {
if (out == pendingPauseRequest) {
pendingPauseRequest = null;
}
}
}).except(new SuccessCallback<Throwable>() {
@Override
public void onSucess(Throwable value) {
if (out == pendingPauseRequest) {
pendingPauseRequest = null;
}
}
});
;
if (pendingPauseRequest != null) {
pendingPauseRequest.ready(new SuccessCallback<AsyncMedia>() {
@Override
public void onSucess(AsyncMedia value) {
if (!out.isDone()) {
out.complete(value);
}
}
}).except(new SuccessCallback<Throwable>() {
@Override
public void onSucess(Throwable value) {
if (!out.isDone()) {
out.error(value);
}
}
});
return out;
} else {
pendingPauseRequest = out;
}
ActionListener<MediaStateChangeEvent> onStateChange = new ActionListener<MediaStateChangeEvent>() {
@Override
public void actionPerformed(MediaStateChangeEvent evt) {
stateChangeListeners.removeListener(this);
if (!out.isDone()) {
if (evt.getNewState() == State.Paused) {
out.complete(Video.this);
}
}
}
};
stateChangeListeners.addListener(onStateChange);
play();
return out;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: pauseAsync
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
|
pauseAsync
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isEmpty() {
return chunks.isEmpty() && submissions.isEmpty();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isEmpty
File: worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/SingleThreadQueueExtent.java
Repository: IntellectualSites/FastAsyncWorldEdit
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-35925
|
MEDIUM
| 5.5
|
IntellectualSites/FastAsyncWorldEdit
|
isEmpty
|
worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/SingleThreadQueueExtent.java
|
3a8dfb4f7b858a439c35f7af1d56d21f796f61f5
| 0
|
Analyze the following code function for security vulnerabilities
|
private void validate(final String uri,
final String localName,
final Handler handler) throws SAXParseException {
boolean validParent = false;
boolean validPeer = false;
boolean invalidNesting = false;
final Set validParents = handler.getValidParents();
final Set validPeers = handler.getValidPeers();
boolean allowNesting = handler.allowNesting();
if ( validParents == null || validPeers == null ) {
return;
}
// get parent
Object parent;
if ( this.parents.size() != 0 ) {
parent = this.parents.getLast();
} else {
parent = null;
}
// check valid parents
// null parent means localname is rule-set
// dont process if elements are the same
// instead check for allowed nesting
final Class nodeClass = getHandler( uri,
localName ).generateNodeFor();
if ( nodeClass != null && !nodeClass.isInstance( parent ) ) {
Object allowedParent;
final Iterator it = validParents.iterator();
while ( !validParent && it.hasNext() ) {
allowedParent = it.next();
if ( parent == null && allowedParent == null ) {
validParent = true;
} else if ( allowedParent != null && ((Class) allowedParent).isInstance( parent ) ) {
validParent = true;
}
}
if ( !validParent ) {
throw new SAXParseException( "<" + localName + "> has an invalid parent element [" + parent + "]",
getLocator() );
}
}
// check valid peers
// null peer means localname is rule-set
final Object peer = this.peer;
Object allowedPeer;
Iterator it = validPeers.iterator();
while ( !validPeer && it.hasNext() ) {
allowedPeer = it.next();
if ( peer == null && allowedPeer == null ) {
validPeer = true;
} else if ( allowedPeer != null && ((Class) allowedPeer).isInstance( peer ) ) {
validPeer = true;
}
}
if ( !validPeer ) {
throw new SAXParseException( "<" + localName + "> is after an invalid element: " + Handler.class.getName(),
getLocator() );
}
if ( nodeClass != null && !allowNesting ) {
it = this.parents.iterator();
while ( !invalidNesting && it.hasNext() ) {
if ( nodeClass.isInstance( it.next() ) ) {
invalidNesting = true;
}
}
}
if ( invalidNesting ) {
throw new SAXParseException( "<" + localName + "> may not be nested",
getLocator() );
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: validate
File: drools-core/src/main/java/org/drools/core/xml/ExtensibleXmlParser.java
Repository: apache/incubator-kie-drools
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2014-8125
|
HIGH
| 7.5
|
apache/incubator-kie-drools
|
validate
|
drools-core/src/main/java/org/drools/core/xml/ExtensibleXmlParser.java
|
c48464c3b246e6ef0d4cd0dbf67e83ccd532c6d3
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getIssuerDN() {
return issuerDN;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getIssuerDN
File: base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
getIssuerDN
|
base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void testDELETEAttachment() throws Exception
{
String attachmentName = String.format("%d.txt", System.currentTimeMillis());
String attachmentURI = buildURIForThisPage(AttachmentResource.class, attachmentName);
String content = "ATTACHMENT CONTENT";
PutMethod putMethod = executePut(attachmentURI, content, MediaType.TEXT_PLAIN,
TestUtils.SUPER_ADMIN_CREDENTIALS.getUserName(), TestUtils.SUPER_ADMIN_CREDENTIALS.getPassword());
Assert.assertEquals(getHttpMethodInfo(putMethod), HttpStatus.SC_CREATED, putMethod.getStatusCode());
GetMethod getMethod = executeGet(attachmentURI);
Assert.assertEquals(getHttpMethodInfo(getMethod), HttpStatus.SC_OK, getMethod.getStatusCode());
DeleteMethod deleteMethod = executeDelete(attachmentURI, TestUtils.SUPER_ADMIN_CREDENTIALS.getUserName(),
TestUtils.SUPER_ADMIN_CREDENTIALS.getPassword());
Assert.assertEquals(getHttpMethodInfo(deleteMethod), HttpStatus.SC_NO_CONTENT, deleteMethod.getStatusCode());
getMethod = executeGet(attachmentURI);
Assert.assertEquals(getHttpMethodInfo(getMethod), HttpStatus.SC_NOT_FOUND, getMethod.getStatusCode());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: testDELETEAttachment
File: xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-test/xwiki-platform-rest-test-tests/src/test/it/org/xwiki/rest/test/AttachmentsResourceIT.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2023-37277
|
CRITICAL
| 9.6
|
xwiki/xwiki-platform
|
testDELETEAttachment
|
xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-test/xwiki-platform-rest-test-tests/src/test/it/org/xwiki/rest/test/AttachmentsResourceIT.java
|
4c175405faa0e62437df397811c7526dfc0fbae7
| 0
|
Analyze the following code function for security vulnerabilities
|
void notifyTaskStackChangedLocked() {
mHandler.sendEmptyMessage(LOG_STACK_STATE);
mHandler.removeMessages(NOTIFY_TASK_STACK_CHANGE_LISTENERS_MSG);
Message nmsg = mHandler.obtainMessage(NOTIFY_TASK_STACK_CHANGE_LISTENERS_MSG);
mHandler.sendMessageDelayed(nmsg, NOTIFY_TASK_STACK_CHANGE_LISTENERS_DELAY);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: notifyTaskStackChangedLocked
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
|
notifyTaskStackChangedLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
private int getTargetSdk(String packageName, int userId) {
final ApplicationInfo ai;
try {
ai = mIPackageManager.getApplicationInfo(packageName, 0, userId);
return ai == null ? 0 : ai.targetSdkVersion;
} catch (RemoteException e) {
// Shouldn't happen
return 0;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTargetSdk
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
|
getTargetSdk
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
private void convertSyntax(XWikiDocument doc, String targetSyntaxId, XWikiContext xcontext) throws XWikiException
{
// Convert the syntax without saving. The syntax conversion will be saved later along with the other changes.
doc.convertSyntax(targetSyntaxId, xcontext);
for (Locale locale : doc.getTranslationLocales(xcontext)) {
// Skip the edited translation because we handle it separately.
if (!Objects.equals(locale, doc.getLocale())) {
XWikiDocument tdoc = doc.getTranslatedDocument(locale, xcontext);
// Double check if the syntax has changed because each document translation can have a different syntax.
if (!tdoc.getSyntax().toIdString().equals(targetSyntaxId)) {
// Convert the syntax and save the changes.
tdoc.convertSyntax(targetSyntaxId, xcontext);
xcontext.getWiki().saveDocument(tdoc,
String.format("Document converted from syntax %s to syntax %s", tdoc.getSyntax().toIdString(),
targetSyntaxId),
xcontext);
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: convertSyntax
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/SaveAction.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2022-23617
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
convertSyntax
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/SaveAction.java
|
30c52b01559b8ef5ed1035dac7c34aaf805764d5
| 0
|
Analyze the following code function for security vulnerabilities
|
public Column<T, V> setStyleGenerator(
StyleGenerator<T> cellStyleGenerator) {
Objects.requireNonNull(cellStyleGenerator,
"Cell style generator must not be null");
this.styleGenerator = cellStyleGenerator;
getGrid().getDataCommunicator().reset();
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setStyleGenerator
File: server/src/main/java/com/vaadin/ui/Grid.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-25028
|
MEDIUM
| 4.3
|
vaadin/framework
|
setStyleGenerator
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
public File prepareDownloadFile(Response response) throws IOException {
String filename = null;
String contentDisposition = (String) response.getHeaders().getFirst("Content-Disposition");
if (contentDisposition != null && !"".equals(contentDisposition)) {
// Get filename from the Content-Disposition header.
Pattern pattern = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?");
Matcher matcher = pattern.matcher(contentDisposition);
if (matcher.find())
filename = matcher.group(1);
}
String prefix;
String suffix = null;
if (filename == null) {
prefix = "download-";
suffix = "";
} else {
int pos = filename.lastIndexOf('.');
if (pos == -1) {
prefix = filename + "-";
} else {
prefix = filename.substring(0, pos) + "-";
suffix = filename.substring(pos);
}
// File.createTempFile requires the prefix to be at least three characters long
if (prefix.length() < 3)
prefix = "download-";
}
if (tempFolderPath == null)
return File.createTempFile(prefix, suffix);
else
return File.createTempFile(prefix, suffix, new File(tempFolderPath));
}
|
Vulnerability Classification:
- CWE: CWE-668
- CVE: CVE-2021-21430
- Severity: LOW
- CVSS Score: 2.1
Description: use Files.createTempFile
Function: prepareDownloadFile
File: samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
Fixed Code:
public File prepareDownloadFile(Response response) throws IOException {
String filename = null;
String contentDisposition = (String) response.getHeaders().getFirst("Content-Disposition");
if (contentDisposition != null && !"".equals(contentDisposition)) {
// Get filename from the Content-Disposition header.
Pattern pattern = Pattern.compile("filename=['\"]?([^'\"\\s]+)['\"]?");
Matcher matcher = pattern.matcher(contentDisposition);
if (matcher.find())
filename = matcher.group(1);
}
String prefix;
String suffix = null;
if (filename == null) {
prefix = "download-";
suffix = "";
} else {
int pos = filename.lastIndexOf('.');
if (pos == -1) {
prefix = filename + "-";
} else {
prefix = filename.substring(0, pos) + "-";
suffix = filename.substring(pos);
}
// Files.createTempFile requires the prefix to be at least three characters long
if (prefix.length() < 3)
prefix = "download-";
}
if (tempFolderPath == null)
return Files.createTempFile(prefix, suffix).toFile();
else
return Files.createTempFile(Paths.get(tempFolderPath), prefix, suffix).toFile();
}
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
prepareDownloadFile
|
samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 1
|
Analyze the following code function for security vulnerabilities
|
@JRubyMethod(name = "recovery")
public IRubyObject
get_recovery(ThreadContext context)
{
return context.runtime.newBoolean(recovery);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: get_recovery
File: ext/java/nokogiri/XmlSaxParserContext.java
Repository: sparklemotion/nokogiri
The code follows secure coding practices.
|
[
"CWE-241"
] |
CVE-2022-29181
|
MEDIUM
| 6.4
|
sparklemotion/nokogiri
|
get_recovery
|
ext/java/nokogiri/XmlSaxParserContext.java
|
db05ba9a1bd4b90aa6c76742cf6102a7c7297267
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<ActivityManager.ProcessErrorStateInfo> getProcessesInErrorState() {
enforceNotIsolatedCaller("getProcessesInErrorState");
// assume our apps are happy - lazy create the list
List<ActivityManager.ProcessErrorStateInfo> errList = null;
final boolean allUsers = ActivityManager.checkUidPermission(INTERACT_ACROSS_USERS_FULL,
Binder.getCallingUid()) == PackageManager.PERMISSION_GRANTED;
int userId = UserHandle.getUserId(Binder.getCallingUid());
synchronized (this) {
// iterate across all processes
for (int i=mLruProcesses.size()-1; i>=0; i--) {
ProcessRecord app = mLruProcesses.get(i);
if (!allUsers && app.userId != userId) {
continue;
}
if ((app.thread != null) && (app.crashing || app.notResponding)) {
// This one's in trouble, so we'll generate a report for it
// crashes are higher priority (in case there's a crash *and* an anr)
ActivityManager.ProcessErrorStateInfo report = null;
if (app.crashing) {
report = app.crashingReport;
} else if (app.notResponding) {
report = app.notRespondingReport;
}
if (report != null) {
if (errList == null) {
errList = new ArrayList<ActivityManager.ProcessErrorStateInfo>(1);
}
errList.add(report);
} else {
Slog.w(TAG, "Missing app error report, app = " + app.processName +
" crashing = " + app.crashing +
" notResponding = " + app.notResponding);
}
}
}
}
return errList;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProcessesInErrorState
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
|
getProcessesInErrorState
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
9878bb99b77c3681f0fda116e2964bac26f349c3
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void addPermission(Permission p) {
runtimePermissions.add(p);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addPermission
File: core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
Repository: AdoptOpenJDK/IcedTea-Web
The code follows secure coding practices.
|
[
"CWE-345",
"CWE-94",
"CWE-22"
] |
CVE-2019-10182
|
MEDIUM
| 5.8
|
AdoptOpenJDK/IcedTea-Web
|
addPermission
|
core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
|
e0818f521a0711aeec4b913b49b5fc6a52815662
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void resetConnectionTime(String callId, Session.Info sessionInfo) {
Log.startSession(sessionInfo, "CSW.rCCT", mPackageAbbreviation);
long token = Binder.clearCallingIdentity();
try {
synchronized (mLock) {
logIncoming("resetConnectionTime %s", callId);
Call call = mCallIdMapper.getCall(callId);
if (call != null) {
mCallsManager.resetConnectionTime(call);
} else {
// Log.w(this, "resetConnectionTime, unknown call id: %s", msg.obj);
}
}
} finally {
Binder.restoreCallingIdentity(token);
Log.endSession();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resetConnectionTime
File: src/com/android/server/telecom/ConnectionServiceWrapper.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
resetConnectionTime
|
src/com/android/server/telecom/ConnectionServiceWrapper.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
final void addBroadcastStatLocked(String action, String srcPackage, int receiveCount,
int skipCount, long dispatchTime) {
rotateBroadcastStatsIfNeededLocked();
mCurBroadcastStats.addBroadcast(action, srcPackage, receiveCount, skipCount, dispatchTime);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addBroadcastStatLocked
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
|
addBroadcastStatLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getHeader(String s)
{
return this.response.getHeader(s);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getHeader
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiServletResponse.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-601"
] |
CVE-2022-23618
|
MEDIUM
| 5.8
|
xwiki/xwiki-platform
|
getHeader
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiServletResponse.java
|
5251c02080466bf9fb55288f04a37671108f8096
| 0
|
Analyze the following code function for security vulnerabilities
|
public HttpURLConnection createConnection(TLSClientParameters tlsClientParameters,
Proxy proxy, URL url) throws IOException {
HttpURLConnection connection =
(HttpURLConnection) (proxy != null
? url.openConnection(proxy)
: url.openConnection());
if (HTTPS_URL_PROTOCOL_ID.equals(url.getProtocol())) {
if (tlsClientParameters == null) {
tlsClientParameters = new TLSClientParameters();
}
try {
decorateWithTLS(tlsClientParameters, connection);
} catch (Throwable ex) {
if (ex instanceof IOException) {
throw (IOException) ex;
}
IOException ioException = new IOException("Error while initializing secure socket", ex);
throw ioException;
}
}
return connection;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createConnection
File: rt/transports/http/src/main/java/org/apache/cxf/transport/https/HttpsURLConnectionFactory.java
Repository: apache/cxf
The code follows secure coding practices.
|
[
"CWE-755"
] |
CVE-2018-8039
|
MEDIUM
| 6.8
|
apache/cxf
|
createConnection
|
rt/transports/http/src/main/java/org/apache/cxf/transport/https/HttpsURLConnectionFactory.java
|
fae6fabf9bd7647f5e9cb68897a7d72b545b741b
| 0
|
Analyze the following code function for security vulnerabilities
|
public static final native boolean readProcFile(String file, int[] format,
String[] outStrings, long[] outLongs, float[] outFloats);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readProcFile
File: core/java/android/os/Process.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3911
|
HIGH
| 9.3
|
android
|
readProcFile
|
core/java/android/os/Process.java
|
2c7008421cb67f5d89f16911bdbe36f6c35311ad
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onRequestContinued() {
mNumRequestContinued++;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onRequestContinued
File: services/core/java/com/android/server/accounts/AccountManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-502"
] |
CVE-2023-45777
|
HIGH
| 7.8
|
android
|
onRequestContinued
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
@SysUISingleton
@Provides
static NotificationLogger provideNotificationLogger(
NotificationListener notificationListener,
@UiBackground Executor uiBgExecutor,
NotifPipelineFlags notifPipelineFlags,
NotifLiveDataStore notifLiveDataStore,
NotificationVisibilityProvider visibilityProvider,
NotificationEntryManager entryManager,
NotifPipeline notifPipeline,
StatusBarStateController statusBarStateController,
NotificationLogger.ExpansionStateLogger expansionStateLogger,
NotificationPanelLogger notificationPanelLogger) {
return new NotificationLogger(
notificationListener,
uiBgExecutor,
notifPipelineFlags,
notifLiveDataStore,
visibilityProvider,
entryManager,
notifPipeline,
statusBarStateController,
expansionStateLogger,
notificationPanelLogger);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: provideNotificationLogger
File: packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40098
|
MEDIUM
| 5.5
|
android
|
provideNotificationLogger
|
packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java
|
d21ffbe8a2eeb2a5e6da7efbb1a0430ba6b022e0
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public long getConnectionStateTimestamp() {
return (mState == ConnectionState.ONLINE) ? mLastOnline : mLastOffline;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getConnectionStateTimestamp
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
|
getConnectionStateTimestamp
|
src/org/yaxim/androidclient/service/SmackableImp.java
|
65a38dc77545d9568732189e86089390f0ceaf9f
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("resource")
protected Object deserializeWithUnwrapped(JsonParser p, DeserializationContext ctxt,
Object bean)
throws IOException
{
JsonToken t = p.currentToken();
if (t == JsonToken.START_OBJECT) {
t = p.nextToken();
}
TokenBuffer tokens = ctxt.bufferForInputBuffering(p);
tokens.writeStartObject();
final Class<?> activeView = _needViewProcesing ? ctxt.getActiveView() : null;
for (; t == JsonToken.FIELD_NAME; t = p.nextToken()) {
String propName = p.currentName();
SettableBeanProperty prop = _beanProperties.find(propName);
p.nextToken();
if (prop != null) { // normal case
if (activeView != null && !prop.visibleInView(activeView)) {
p.skipChildren();
continue;
}
try {
prop.deserializeAndSet(p, ctxt, bean);
} catch (Exception e) {
wrapAndThrow(e, bean, propName, ctxt);
}
continue;
}
if (IgnorePropertiesUtil.shouldIgnore(propName, _ignorableProps, _includableProps)) {
handleIgnoredProperty(p, ctxt, bean, propName);
continue;
}
// 29-Nov-2016, tatu: probably should try to avoid sending content
// both to any setter AND buffer... but, for now, the only thing
// we can do.
// how about any setter? We'll get copies but...
if (_anySetter == null) {
// but... others should be passed to unwrapped property deserializers
tokens.writeFieldName(propName);
tokens.copyCurrentStructure(p);
} else {
// Need to copy to a separate buffer first
TokenBuffer b2 = ctxt.bufferAsCopyOfValue(p);
tokens.writeFieldName(propName);
tokens.append(b2);
try {
_anySetter.deserializeAndSet(b2.asParserOnFirstToken(), ctxt, bean, propName);
} catch (Exception e) {
wrapAndThrow(e, bean, propName, ctxt);
}
continue;
}
}
tokens.writeEndObject();
_unwrappedPropertyHandler.processUnwrapped(p, ctxt, bean, tokens);
return bean;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deserializeWithUnwrapped
File: src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializer.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2022-42004
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
deserializeWithUnwrapped
|
src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializer.java
|
063183589218fec19a9293ed2f17ec53ea80ba88
| 0
|
Analyze the following code function for security vulnerabilities
|
public void onSettingsClick(String key);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onSettingsClick
File: packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationGutsManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40098
|
MEDIUM
| 5.5
|
android
|
onSettingsClick
|
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationGutsManager.java
|
d21ffbe8a2eeb2a5e6da7efbb1a0430ba6b022e0
| 0
|
Analyze the following code function for security vulnerabilities
|
public void browserBack(PeerComponent browserPeer) {
((AndroidImplementation.AndroidBrowserComponent) browserPeer).back();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: browserBack
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
|
browserBack
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean checkAndHandleLinkedNetworkRoaming(String associatedBssid) {
if (!mContext.getResources().getBoolean(R.bool.config_wifiEnableLinkedNetworkRoaming)) {
return false;
}
ScanResult scanResult = mScanRequestProxy.getScanResult(associatedBssid);
if (scanResult == null) {
return false;
}
WifiConfiguration config = mWifiConfigManager
.getSavedNetworkForScanResult(scanResult);
if (config == null || !config.allowedKeyManagement.get(WifiConfiguration.KeyMgmt.WPA_PSK)
|| mLastNetworkId == config.networkId) {
return false;
}
mIsLinkedNetworkRoaming = true;
setTargetBssid(config, associatedBssid);
mTargetNetworkId = config.networkId;
mTargetWifiConfiguration = config;
mLastNetworkId = WifiConfiguration.INVALID_NETWORK_ID;
sendNetworkChangeBroadcast(DetailedState.CONNECTING);
mWifiInfo.setFrequency(scanResult.frequency);
mWifiInfo.setBSSID(associatedBssid);
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkAndHandleLinkedNetworkRoaming
File: service/java/com/android/server/wifi/ClientModeImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
checkAndHandleLinkedNetworkRoaming
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void parseQueryMTypeWWildcardFilterImplicit() throws Exception {
HttpQuery query = NettyMocks.getQuery(tsdb,
"/api/query?start=1h-ago&m=sum:sys.cpu.0{}{host=*quirm}");
TSQuery tsq = (TSQuery) parseQuery.invoke(rpc, tsdb, query, expressions);
TSSubQuery sub = tsq.getQueries().get(0);
sub.validateAndSetQuery();
assertEquals(1, sub.getFilters().size());
assertTrue(sub.getFilters().get(0) instanceof TagVWildcardFilter);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseQueryMTypeWWildcardFilterImplicit
File: test/tsd/TestQueryRpc.java
Repository: OpenTSDB/opentsdb
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-25827
|
MEDIUM
| 6.1
|
OpenTSDB/opentsdb
|
parseQueryMTypeWWildcardFilterImplicit
|
test/tsd/TestQueryRpc.java
|
ff02c1e95e60528275f69b31bcbf7b2ac625cea8
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setMinHomeDownlinkBandwidth(long minHomeDownlinkBandwidth) {
mMinHomeDownlinkBandwidth = minHomeDownlinkBandwidth;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setMinHomeDownlinkBandwidth
File: framework/java/android/net/wifi/hotspot2/pps/Policy.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21240
|
MEDIUM
| 5.5
|
android
|
setMinHomeDownlinkBandwidth
|
framework/java/android/net/wifi/hotspot2/pps/Policy.java
|
69119d1d3102e27b6473c785125696881bce9563
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test (expected = BadRequestException.class)
public void parseQueryStartMissing() throws Exception {
HttpQuery query = NettyMocks.getQuery(tsdb,
"/api/query?end=1h-ago&m=sum:sys.cpu.0");
parseQuery.invoke(rpc, tsdb, query, expressions);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseQueryStartMissing
File: test/tsd/TestQueryRpc.java
Repository: OpenTSDB/opentsdb
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-25827
|
MEDIUM
| 6.1
|
OpenTSDB/opentsdb
|
parseQueryStartMissing
|
test/tsd/TestQueryRpc.java
|
ff02c1e95e60528275f69b31bcbf7b2ac625cea8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onSimStateChanged(int subId, int slotId, State simState) {
updateEmergencyCallButton();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onSimStateChanged
File: packages/Keyguard/src/com/android/keyguard/EmergencyButton.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3838
|
MEDIUM
| 4.3
|
android
|
onSimStateChanged
|
packages/Keyguard/src/com/android/keyguard/EmergencyButton.java
|
468651c86a8adb7aa56c708d2348e99022088af3
| 0
|
Analyze the following code function for security vulnerabilities
|
private T buildFromConnection(Http2Connection connection) {
Long maxHeaderListSize = initialSettings.maxHeaderListSize();
Http2FrameReader reader = new DefaultHttp2FrameReader(new DefaultHttp2HeadersDecoder(isValidateHeaders(),
maxHeaderListSize == null ? DEFAULT_HEADER_LIST_SIZE : maxHeaderListSize,
/* initialHuffmanDecodeCapacity= */ -1));
Http2FrameWriter writer = encoderIgnoreMaxHeaderListSize == null ?
new DefaultHttp2FrameWriter(headerSensitivityDetector()) :
new DefaultHttp2FrameWriter(headerSensitivityDetector(), encoderIgnoreMaxHeaderListSize);
if (frameLogger != null) {
reader = new Http2InboundFrameLogger(reader, frameLogger);
writer = new Http2OutboundFrameLogger(writer, frameLogger);
}
Http2ConnectionEncoder encoder = new DefaultHttp2ConnectionEncoder(connection, writer);
boolean encoderEnforceMaxConcurrentStreams = encoderEnforceMaxConcurrentStreams();
if (maxQueuedControlFrames != 0) {
encoder = new Http2ControlFrameLimitEncoder(encoder, maxQueuedControlFrames);
}
if (encoderEnforceMaxConcurrentStreams) {
if (connection.isServer()) {
encoder.close();
reader.close();
throw new IllegalArgumentException(
"encoderEnforceMaxConcurrentStreams: " + encoderEnforceMaxConcurrentStreams +
" not supported for server");
}
encoder = new StreamBufferingEncoder(encoder);
}
DefaultHttp2ConnectionDecoder decoder = new DefaultHttp2ConnectionDecoder(connection, encoder, reader,
promisedRequestVerifier(), isAutoAckSettingsFrame(), isAutoAckPingFrame());
return buildFromCodec(decoder, encoder);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: buildFromConnection
File: codec-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2ConnectionHandlerBuilder.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-44487
|
HIGH
| 7.5
|
netty
|
buildFromConnection
|
codec-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2ConnectionHandlerBuilder.java
|
58f75f665aa81a8cbcf6ffa74820042a285c5e61
| 0
|
Analyze the following code function for security vulnerabilities
|
public int[] getGlobalGids() {
return mGlobalGids;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getGlobalGids
File: services/core/java/com/android/server/SystemConfig.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3759
|
MEDIUM
| 5
|
android
|
getGlobalGids
|
services/core/java/com/android/server/SystemConfig.java
|
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String replaceMatchAnyChar(@NonNull String arg) {
return arg.replace('*', '%');
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: replaceMatchAnyChar
File: src/com/android/providers/media/util/DatabaseUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2023-35683
|
MEDIUM
| 5.5
|
android
|
replaceMatchAnyChar
|
src/com/android/providers/media/util/DatabaseUtils.java
|
23d156ed1bed6d2c2b325f0be540d0afca510c49
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean checkWebpackConnection() {
try {
readManifestPaths();
return true;
} catch (IOException e) {
getLogger().debug("Error checking webpack dev server connection",
e);
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkWebpackConnection
File: vaadin-dev-server/src/main/java/com/vaadin/base/devserver/DevModeHandlerImpl.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-172"
] |
CVE-2021-33604
|
LOW
| 1.2
|
vaadin/flow
|
checkWebpackConnection
|
vaadin-dev-server/src/main/java/com/vaadin/base/devserver/DevModeHandlerImpl.java
|
2a801c42b406a00c44f4a85b4b4e4a4c5bf89adc
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isProfileOwnerOfOrganizationOwnedDevice(ComponentName who, int userId) {
return isProfileOwner(who, userId) && isProfileOwnerOfOrganizationOwnedDevice(userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isProfileOwnerOfOrganizationOwnedDevice
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
|
isProfileOwnerOfOrganizationOwnedDevice
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean showsChronometer() {
return when != 0 && extras.getBoolean(EXTRA_SHOW_CHRONOMETER);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: showsChronometer
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
showsChronometer
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
public static int defaultMaxTotalConnections() {
return Integer.getInteger(ASYNC_CLIENT + "maxTotalConnections", -1);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: defaultMaxTotalConnections
File: src/main/java/com/ning/http/client/AsyncHttpClientConfigDefaults.java
Repository: AsyncHttpClient/async-http-client
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2013-7398
|
MEDIUM
| 4.3
|
AsyncHttpClient/async-http-client
|
defaultMaxTotalConnections
|
src/main/java/com/ning/http/client/AsyncHttpClientConfigDefaults.java
|
a894583921c11c3b01f160ada36a8bb9d5158e96
| 0
|
Analyze the following code function for security vulnerabilities
|
@Provides
@SysUISingleton
static OnUserInteractionCallback provideOnUserInteractionCallback(
NotifPipelineFlags notifPipelineFlags,
HeadsUpManager headsUpManager,
StatusBarStateController statusBarStateController,
Lazy<NotifCollection> notifCollection,
Lazy<NotificationVisibilityProvider> visibilityProvider,
Lazy<VisualStabilityCoordinator> visualStabilityCoordinator,
NotificationEntryManager entryManager,
VisualStabilityManager visualStabilityManager,
Lazy<GroupMembershipManager> groupMembershipManagerLazy) {
return notifPipelineFlags.isNewPipelineEnabled()
? new OnUserInteractionCallbackImpl(
visibilityProvider.get(),
notifCollection.get(),
headsUpManager,
statusBarStateController,
visualStabilityCoordinator.get())
: new OnUserInteractionCallbackImplLegacy(
entryManager,
visibilityProvider.get(),
headsUpManager,
statusBarStateController,
visualStabilityManager,
groupMembershipManagerLazy.get());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: provideOnUserInteractionCallback
File: packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40098
|
MEDIUM
| 5.5
|
android
|
provideOnUserInteractionCallback
|
packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java
|
d21ffbe8a2eeb2a5e6da7efbb1a0430ba6b022e0
| 0
|
Analyze the following code function for security vulnerabilities
|
@GuardedBy(anyOf = {"this", "mProcLock"})
private void updateApplicationInfoLOSP(@NonNull List<String> packagesToUpdate,
boolean updateFrameworkRes, int userId) {
if (updateFrameworkRes) {
ParsingPackageUtils.readConfigUseRoundIcon(null);
}
mProcessList.updateApplicationInfoLOSP(packagesToUpdate, userId, updateFrameworkRes);
if (updateFrameworkRes) {
// Update system server components that need to know about changed overlays. Because the
// overlay is applied in ActivityThread, we need to serialize through its thread too.
final Executor executor = ActivityThread.currentActivityThread().getExecutor();
final DisplayManagerInternal display =
LocalServices.getService(DisplayManagerInternal.class);
if (display != null) {
executor.execute(display::onOverlayChanged);
}
if (mWindowManager != null) {
executor.execute(mWindowManager::onOverlayChanged);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateApplicationInfoLOSP
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
|
updateApplicationInfoLOSP
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
boolean shouldMagnify() {
if (mAttrs.type == TYPE_ACCESSIBILITY_MAGNIFICATION_OVERLAY
|| mAttrs.type == TYPE_INPUT_METHOD
|| mAttrs.type == TYPE_INPUT_METHOD_DIALOG
|| mAttrs.type == TYPE_MAGNIFICATION_OVERLAY
|| mAttrs.type == TYPE_NAVIGATION_BAR
// It's tempting to wonder: Have we forgotten the rounded corners overlay?
// worry not: it's a fake TYPE_NAVIGATION_BAR_PANEL
|| mAttrs.type == TYPE_NAVIGATION_BAR_PANEL) {
return false;
}
if ((mAttrs.privateFlags & PRIVATE_FLAG_NOT_MAGNIFIABLE) != 0) {
return false;
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: shouldMagnify
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
|
shouldMagnify
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void annotateInjectorExceptions(Collection<Message> messages) {
super.annotateInjectorExceptions(messages);
for (Message message : messages) {
if (message.getCause() instanceof MongoException) {
MongoException e = (MongoException) message.getCause();
LOG.error(UI.wallString("Unable to connect to MongoDB. Is it running and the configuration correct?\n" +
"Details: " + e.getMessage()));
System.exit(-1);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: annotateInjectorExceptions
File: graylog2-server/src/main/java/org/graylog2/commands/Server.java
Repository: Graylog2/graylog2-server
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2023-41045
|
MEDIUM
| 5.3
|
Graylog2/graylog2-server
|
annotateInjectorExceptions
|
graylog2-server/src/main/java/org/graylog2/commands/Server.java
|
466af814523cffae9fbc7e77bab7472988f03c3e
| 0
|
Analyze the following code function for security vulnerabilities
|
protected PublicKey engineGeneratePublic(
KeySpec keySpec)
throws InvalidKeySpecException
{
if (keySpec instanceof DHPublicKeySpec)
{
return new BCDHPublicKey((DHPublicKeySpec)keySpec);
}
return super.engineGeneratePublic(keySpec);
}
|
Vulnerability Classification:
- CWE: CWE-310
- CVE: CVE-2016-1000339
- Severity: MEDIUM
- CVSS Score: 5.0
Description: added better support for DH domain parameters
added s box allocation to AESEngine
reduced use of AESFastEngine.
Function: engineGeneratePublic
File: prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dh/KeyFactorySpi.java
Repository: bcgit/bc-java
Fixed Code:
protected PublicKey engineGeneratePublic(
KeySpec keySpec)
throws InvalidKeySpecException
{
if (keySpec instanceof DHPublicKeySpec)
{
try
{
return new BCDHPublicKey((DHPublicKeySpec)keySpec);
}
catch (IllegalArgumentException e)
{
throw new InvalidKeySpecException(e.getMessage(), e);
}
}
return super.engineGeneratePublic(keySpec);
}
|
[
"CWE-310"
] |
CVE-2016-1000339
|
MEDIUM
| 5
|
bcgit/bc-java
|
engineGeneratePublic
|
prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dh/KeyFactorySpi.java
|
413b42f4d770456508585c830cfcde95f9b0e93b
| 1
|
Analyze the following code function for security vulnerabilities
|
public void broadcastWpsSuccessEvent(String iface) {
sendMessage(iface, WPS_SUCCESS_EVENT);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: broadcastWpsSuccessEvent
File: service/java/com/android/server/wifi/WifiMonitor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
broadcastWpsSuccessEvent
|
service/java/com/android/server/wifi/WifiMonitor.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
protected static void copyAttributes(RMQMessage rmqMessage, Message message) throws JMSException {
try {
rmqMessage.setJMSCorrelationID(message.getJMSCorrelationID());
rmqMessage.setJMSType(message.getJMSType());
// NOTE: all other JMS header values are set when the message is sent; except for ReplyTo which is ignored on
// a foreign message.
copyProperties(rmqMessage, message);
} catch (Exception e) {
throw new RMQJMSException("Error converting Message to RMQMessage.", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: copyAttributes
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
|
copyAttributes
|
src/main/java/com/rabbitmq/jms/client/RMQMessage.java
|
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.