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
|
private static void setupFramework() throws BundleException {
if (SpotlessEclipseFramework.setup(
plugins -> {
plugins.applyDefault();
//The WST XML formatter
plugins.add(new XMLCorePlugin());
//XSDs/DTDs must be resolved by URI
plugins.add(new URIResolverPlugin());
//Support formatting based on DTD restrictions
plugins.add(new DTDCorePlugin());
//Support formatting based on XSD restrictions
plugins.add(new XSDCorePlugin());
})) {
PREFERENCE_FACTORY = new XmlFormattingPreferencesFactory();
//Register required EMF factories
XSDSchemaBuildingTools.getXSDFactory();
}
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2019-9843
- Severity: MEDIUM
- CVSS Score: 5.1
Description: Implementation draft and testing.
Function: setupFramework
File: _ext/eclipse-wtp/src/main/java/com/diffplug/spotless/extra/eclipse/wtp/EclipseXmlFormatterStepImpl.java
Repository: diffplug/spotless
Fixed Code:
private static void setupFramework(boolean resolveExternalURI) throws BundleException {
if (SpotlessEclipseFramework.setup(
plugins -> {
plugins.applyDefault();
//The WST XML formatter
plugins.add(new XMLCorePlugin());
//XSDs/DTDs must be resolved by URI
plugins.add(new URIResolverPlugin());
//Support formatting based on DTD restrictions
plugins.add(new DTDCorePlugin());
//Support formatting based on XSD restrictions
plugins.add(new XSDCorePlugin());
if(!resolveExternalURI) {
plugins.add(new PreventExternalURIResolverExtension());
}
})) {
PREFERENCE_FACTORY = new XmlFormattingPreferencesFactory();
//Register required EMF factories
XSDSchemaBuildingTools.getXSDFactory();
}
}
|
[
"CWE-611"
] |
CVE-2019-9843
|
MEDIUM
| 5.1
|
diffplug/spotless
|
setupFramework
|
_ext/eclipse-wtp/src/main/java/com/diffplug/spotless/extra/eclipse/wtp/EclipseXmlFormatterStepImpl.java
|
b23ee9ef5ba4b65e7bd0e341c76ed197c06ee83d
| 1
|
Analyze the following code function for security vulnerabilities
|
private static void mapStoreConfigXmlGenerator(XmlGenerator gen, MapConfig m) {
if (m.getMapStoreConfig() != null) {
MapStoreConfig s = m.getMapStoreConfig();
String clazz = s.getImplementation()
!= null ? s.getImplementation().getClass().getName() : s.getClassName();
String factoryClass = s.getFactoryImplementation() != null
? s.getFactoryImplementation().getClass().getName()
: s.getFactoryClassName();
MapStoreConfig.InitialLoadMode initialMode = s.getInitialLoadMode();
gen.open("map-store", "enabled", s.isEnabled(), "initial-mode", initialMode.toString())
.node("class-name", clazz)
.node("factory-class-name", factoryClass)
.node("write-delay-seconds", s.getWriteDelaySeconds())
.node("write-batch-size", s.getWriteBatchSize())
.appendProperties(s.getProperties())
.close();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: mapStoreConfigXmlGenerator
File: hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
mapStoreConfigXmlGenerator
|
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
public BaseObject getXObject(EntityReference classReference, int number, boolean create, XWikiContext xcontext)
throws XWikiException
{
DocumentReference absoluteClassReference = resolveClassReference(classReference);
BaseObject xobject = getXObject(absoluteClassReference, number);
if (xobject == null && create) {
xobject = BaseClass.newCustomClassInstance(absoluteClassReference, xcontext);
setXObject(number, xobject);
}
return xobject;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getXObject
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
|
getXObject
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isInRestrictedBucket(int userId, String packageName, long nowElapsed) {
return UsageStatsManager.STANDBY_BUCKET_RESTRICTED
<= mUsageStatsService.getAppStandbyBucket(packageName, userId, nowElapsed);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isInRestrictedBucket
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
|
isInRestrictedBucket
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public void doHelp(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
String path = req.getRestOfPath();
if(path.contains("..")) throw new ServletException("Illegal path: "+path);
path = path.replace('/','-');
PluginWrapper pw = getPlugin();
if (pw!=null) {
rsp.setHeader("X-Plugin-Short-Name",pw.getShortName());
rsp.setHeader("X-Plugin-Long-Name",pw.getLongName());
rsp.setHeader("X-Plugin-From", Messages.Descriptor_From(
pw.getLongName().replace("Hudson","Jenkins").replace("hudson","jenkins"), pw.getUrl()));
}
for (Klass<?> c= getKlass(); c!=null; c=c.getSuperClass()) {
RequestDispatcher rd = Stapler.getCurrentRequest().getView(c, "help"+path);
if(rd!=null) {// template based help page
rd.forward(req,rsp);
return;
}
URL url = getStaticHelpUrl(c, path);
if(url!=null) {
// TODO: generalize macro expansion and perhaps even support JEXL
rsp.setContentType("text/html;charset=UTF-8");
InputStream in = url.openStream();
try {
String literal = IOUtils.toString(in,"UTF-8");
rsp.getWriter().println(Util.replaceMacro(literal, Collections.singletonMap("rootURL",req.getContextPath())));
} finally {
IOUtils.closeQuietly(in);
}
return;
}
}
rsp.sendError(SC_NOT_FOUND);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doHelp
File: core/src/main/java/hudson/model/Descriptor.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
doHelp
|
core/src/main/java/hudson/model/Descriptor.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean setOccludesParent(boolean occludesParent) {
final boolean changed = occludesParent != mOccludesParent;
mOccludesParent = occludesParent;
setMainWindowOpaque(occludesParent);
mWmService.mWindowPlacerLocked.requestTraversal();
if (changed && task != null && !occludesParent) {
getRootTask().convertActivityToTranslucent(this);
}
// Always ensure visibility if this activity doesn't occlude parent, so the
// {@link #returningOptions} of the activity under this one can be applied in
// {@link #handleAlreadyVisible()}.
if (changed || !occludesParent) {
mRootWindowContainer.ensureActivitiesVisible(null, 0, !PRESERVE_WINDOWS);
}
return changed;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setOccludesParent
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
|
setOccludesParent
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
super.onLayout(changed, left, top, right, bottom);
setIsFullWidth(mNotificationStackScroller.getWidth() == getWidth());
// Update Clock Pivot
mKeyguardStatusView.setPivotX(getWidth() / 2);
mKeyguardStatusView.setPivotY((FONT_HEIGHT - CAP_HEIGHT) / 2048f * mClockView.getTextSize());
// Calculate quick setting heights.
int oldMaxHeight = mQsMaxExpansionHeight;
if (mQs != null) {
mQsMinExpansionHeight = mKeyguardShowing ? 0 : mQs.getQsMinExpansionHeight();
mQsMaxExpansionHeight = mQs.getDesiredHeight();
}
positionClockAndNotifications();
if (mQsExpanded && mQsFullyExpanded) {
mQsExpansionHeight = mQsMaxExpansionHeight;
requestScrollerTopPaddingUpdate(false /* animate */);
requestPanelHeightUpdate();
// Size has changed, start an animation.
if (mQsMaxExpansionHeight != oldMaxHeight) {
startQsSizeChangeAnimation(oldMaxHeight, mQsMaxExpansionHeight);
}
} else if (!mQsExpanded) {
setQsExpansion(mQsMinExpansionHeight + mLastOverscroll);
}
updateExpandedHeight(getExpandedHeight());
updateHeader();
// If we are running a size change animation, the animation takes care of the height of
// the container. However, if we are not animating, we always need to make the QS container
// the desired height so when closing the QS detail, it stays smaller after the size change
// animation is finished but the detail view is still being animated away (this animation
// takes longer than the size change animation).
if (mQsSizeChangeAnimator == null && mQs != null) {
mQs.setHeightOverride(mQs.getDesiredHeight());
}
updateMaxHeadsUpTranslation();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onLayout
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
|
onLayout
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void fatalError(final SAXParseException x) throws SAXParseException {
logger.error( buildPrintMessage( x ) );
throw x;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fatalError
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
|
fatalError
|
drools-core/src/main/java/org/drools/core/xml/ExtensibleXmlParser.java
|
c48464c3b246e6ef0d4cd0dbf67e83ccd532c6d3
| 0
|
Analyze the following code function for security vulnerabilities
|
public void jumpTask(String procInsId, String targetTaskDefinitionKey, Map<String, Object> variables) {
jumpTask(getCurrentTask(procInsId), targetTaskDefinitionKey, variables);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: jumpTask
File: src/main/java/com/thinkgem/jeesite/modules/act/service/ActTaskService.java
Repository: thinkgem/jeesite
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2023-34601
|
CRITICAL
| 9.8
|
thinkgem/jeesite
|
jumpTask
|
src/main/java/com/thinkgem/jeesite/modules/act/service/ActTaskService.java
|
30750011b49f7c8d45d0f3ab13ed3a1a422655bb
| 0
|
Analyze the following code function for security vulnerabilities
|
public String executeJavaScriptAndWaitForResult(final AwContents awContents,
TestAwContentsClient viewClient, final String code) throws Exception {
return JSUtils.executeJavaScriptAndWaitForResult(this, awContents,
viewClient.getOnEvaluateJavaScriptResultHelper(),
code);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: executeJavaScriptAndWaitForResult
File: android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-254"
] |
CVE-2016-5155
|
MEDIUM
| 4.3
|
chromium
|
executeJavaScriptAndWaitForResult
|
android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java
|
b8dcfeb065bbfd777cdc5f5433da9a87f25e6ec6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected boolean shouldGestureIgnoreXTouchSlop(float x, float y) {
return !mAffordanceHelper.isOnAffordanceIcon(x, y);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: shouldGestureIgnoreXTouchSlop
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
|
shouldGestureIgnoreXTouchSlop
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
private Map<String, ContainerError> getContainerErrors(Collection<JsonNode> containerStatusNodes) {
Map<String, ContainerError> containerErrors = new HashMap<>();
for (JsonNode containerStatusNode: containerStatusNodes) {
String containerName = containerStatusNode.get("name").asText();
JsonNode stateNode = containerStatusNode.get("state");
JsonNode waitingNode = stateNode.get("waiting");
if (waitingNode != null) {
String reason = waitingNode.get("reason").asText();
if (reason.equals("ErrImagePull") || reason.equals("InvalidImageName")
|| reason.equals("ImageInspectError") || reason.equals("ErrImageNeverPull")
|| reason.equals("RegistryUnavailable")) {
JsonNode messageNode = waitingNode.get("message");
if (messageNode != null)
containerErrors.put(containerName, new ContainerError(messageNode.asText(), true));
else
containerErrors.put(containerName, new ContainerError(reason, true));
}
}
if (!containerErrors.containsKey(containerName)) {
JsonNode terminatedNode = stateNode.get("terminated");
if (terminatedNode != null) {
String reason;
JsonNode reasonNode = terminatedNode.get("reason");
if (reasonNode != null)
reason = reasonNode.asText();
else
reason = "Unknown reason";
if (!reason.equals("Completed")) {
JsonNode messageNode = terminatedNode.get("message");
if (messageNode != null) {
containerErrors.put(containerName, new ContainerError(messageNode.asText(), true));
} else {
JsonNode exitCodeNode = terminatedNode.get("exitCode");
if (exitCodeNode != null && exitCodeNode.asInt() != 0)
containerErrors.put(containerName, new ContainerError("Command failed with exit code " + exitCodeNode.asText(), false));
else
containerErrors.put(containerName, new ContainerError(reason, true));
}
}
}
}
}
return containerErrors;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getContainerErrors
File: server-plugin/server-plugin-executor-kubernetes/src/main/java/io/onedev/server/plugin/executor/kubernetes/KubernetesExecutor.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-610"
] |
CVE-2022-39206
|
CRITICAL
| 9.9
|
theonedev/onedev
|
getContainerErrors
|
server-plugin/server-plugin-executor-kubernetes/src/main/java/io/onedev/server/plugin/executor/kubernetes/KubernetesExecutor.java
|
0052047a5b5095ac6a6b4a73a522d0272fec3a22
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
String getResourcePath() {
return (resourceFile != null) ? resourceFile.getAbsolutePath() : null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getResourcePath
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
|
getResourcePath
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
private Configuration getProcessGlobalConfiguration() {
return app != null ? app.getConfiguration() : mAtmService.getGlobalConfiguration();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProcessGlobalConfiguration
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
|
getProcessGlobalConfiguration
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
public void writeStructEnd() {}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeStructEnd
File: thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TBinaryProtocol.java
Repository: facebook/fbthrift
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2019-11938
|
MEDIUM
| 5
|
facebook/fbthrift
|
writeStructEnd
|
thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TBinaryProtocol.java
|
08c2d412adb214c40bb03be7587057b25d053030
| 0
|
Analyze the following code function for security vulnerabilities
|
protected boolean isOptimizingBattery() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
final PowerManager pm = (PowerManager) getSystemService(POWER_SERVICE);
return pm != null
&& !pm.isIgnoringBatteryOptimizations(getPackageName());
} else {
return false;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isOptimizingBattery
File: src/main/java/eu/siacs/conversations/ui/XmppActivity.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
isOptimizingBattery
|
src/main/java/eu/siacs/conversations/ui/XmppActivity.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void requestHintsFromListener(INotificationListener token, int hints) {
final long identity = Binder.clearCallingIdentity();
try {
synchronized (mNotificationList) {
final ManagedServiceInfo info = mListeners.checkServiceTokenLocked(token);
final int disableEffectsMask = HINT_HOST_DISABLE_EFFECTS
| HINT_HOST_DISABLE_NOTIFICATION_EFFECTS
| HINT_HOST_DISABLE_CALL_EFFECTS;
final boolean disableEffects = (hints & disableEffectsMask) != 0;
if (disableEffects) {
addDisabledHints(info, hints);
} else {
removeDisabledHints(info, hints);
}
updateListenerHintsLocked();
updateEffectsSuppressorLocked();
}
} finally {
Binder.restoreCallingIdentity(identity);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: requestHintsFromListener
File: services/core/java/com/android/server/notification/NotificationManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3884
|
MEDIUM
| 4.3
|
android
|
requestHintsFromListener
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
private void logValidationErrorMessages(IdentityApplicationManagementValidationException e) {
if (e.getValidationMsg() != null) {
log.error(StringUtils.join(e.getValidationMsg(), "\n"));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: logValidationErrorMessages
File: components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
Repository: wso2/carbon-identity-framework
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-42646
|
MEDIUM
| 6.4
|
wso2/carbon-identity-framework
|
logValidationErrorMessages
|
components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
|
e9119883ee02a884f3c76c7bbc4022a4f4c58fc0
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public CommandData getCommandData() {
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCommandData
File: src/main/java/de/presti/ree6/commands/impl/community/TwitchNotifier.java
Repository: Ree6-Applications/Ree6
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-39302
|
MEDIUM
| 5.4
|
Ree6-Applications/Ree6
|
getCommandData
|
src/main/java/de/presti/ree6/commands/impl/community/TwitchNotifier.java
|
459b5bc24f0ea27e50031f563373926e94b9aa0a
| 0
|
Analyze the following code function for security vulnerabilities
|
PermissionPolicyInternal getPermissionPolicyInternal() {
if (mPermissionPolicyInternal == null) {
mPermissionPolicyInternal = LocalServices.getService(PermissionPolicyInternal.class);
}
return mPermissionPolicyInternal;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPermissionPolicyInternal
File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40094
|
HIGH
| 7.8
|
android
|
getPermissionPolicyInternal
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isDeviceProvisioned() {
final CallerIdentity caller = getCallerIdentity();
Preconditions.checkCallAuthorization(canManageUsers(caller));
synchronized (getLockObject()) {
return getUserDataUnchecked(UserHandle.USER_SYSTEM).mUserSetupComplete;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isDeviceProvisioned
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
|
isDeviceProvisioned
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected byte[] engineGenerateSeed(int numBytes)
{
return secureRandom.generateSeed(numBytes);
}
|
Vulnerability Classification:
- CWE: CWE-310
- CVE: CVE-2016-1000339
- Severity: MEDIUM
- CVSS Score: 5.0
Description: Added table use obfuscation to AESFastEngine
JDK 1.4 compiler updates.
Function: engineGenerateSeed
File: prov/src/main/java/org/bouncycastle/jcajce/provider/drbg/DRBG.java
Repository: bcgit/bc-java
Fixed Code:
protected byte[] engineGenerateSeed(int numBytes)
{
return secureRandom.generateSeed(numBytes);
}
|
[
"CWE-310"
] |
CVE-2016-1000339
|
MEDIUM
| 5
|
bcgit/bc-java
|
engineGenerateSeed
|
prov/src/main/java/org/bouncycastle/jcajce/provider/drbg/DRBG.java
|
8a73f08931450c17c749af067b6a8185abdfd2c0
| 1
|
Analyze the following code function for security vulnerabilities
|
private void createContentTypeWorkflowActionMappingUniqueIndex() throws SQLException {
Logger.info(this, "Creates the table content_type_workflow_action_mapping unique index.");
try {
new DotConnect().executeStatement(getCreateContentTypeWorkflowActionMappingUniqueIndexSQL());
} catch (SQLException e) {
Logger.error(this, "The index for the table 'content_type_workflow_action_mapping' could not be created.", e);
throw e;
}
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2020-17542
- Severity: LOW
- CVSS Score: 3.5
Description: #16890 renaming the content_type_workflow_action_mapping to workflow_action_mappings
Function: createContentTypeWorkflowActionMappingUniqueIndex
File: dotCMS/src/main/java/com/dotmarketing/startup/runonce/Task05165CreateContentTypeWorkflowActionMappingTable.java
Repository: dotCMS/core
Fixed Code:
private void createContentTypeWorkflowActionMappingUniqueIndex() throws SQLException {
Logger.info(this, "Creates the table idx_workflow_action_mappings unique index.");
try {
new DotConnect().executeStatement(getCreateContentTypeWorkflowActionMappingUniqueIndexSQL());
} catch (SQLException e) {
Logger.error(this, "The index for the table 'idx_workflow_action_mappings' could not be created.", e);
throw e;
}
}
|
[
"CWE-79"
] |
CVE-2020-17542
|
LOW
| 3.5
|
dotCMS/core
|
createContentTypeWorkflowActionMappingUniqueIndex
|
dotCMS/src/main/java/com/dotmarketing/startup/runonce/Task05165CreateContentTypeWorkflowActionMappingTable.java
|
782c342b660d359a71e190c8b5110bc651736591
| 1
|
Analyze the following code function for security vulnerabilities
|
public static boolean isTrailerBlacklisted(AsciiString name) {
return HTTP_TRAILER_BLACKLIST.contains(name);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isTrailerBlacklisted
File: core/src/main/java/com/linecorp/armeria/internal/ArmeriaHttpUtil.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2019-16771
|
MEDIUM
| 5
|
line/armeria
|
isTrailerBlacklisted
|
core/src/main/java/com/linecorp/armeria/internal/ArmeriaHttpUtil.java
|
b597f7a865a527a84ee3d6937075cfbb4470ed20
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isInitialized() {
return mNativeTabAndroid != 0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isInitialized
File: chrome/android/java/src/org/chromium/chrome/browser/Tab.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
isInitialized
|
chrome/android/java/src/org/chromium/chrome/browser/Tab.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Collection<String> getHeaders(String s)
{
return this.response.getHeaders(s);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getHeaders
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
|
getHeaders
|
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
|
@Override
protected AbstractDirectory createDirLocal(String name) throws DirectoryException {
File dir = new File(generatePath(name));
//noinspection ResultOfMethodCallIgnored
dir.mkdir();
return new FileDirectory(dir);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createDirLocal
File: brut.j.dir/src/main/java/brut/directory/FileDirectory.java
Repository: iBotPeaches/Apktool
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2024-21633
|
HIGH
| 7.8
|
iBotPeaches/Apktool
|
createDirLocal
|
brut.j.dir/src/main/java/brut/directory/FileDirectory.java
|
d348c43b24a9de350ff6e5bd610545a10c1fc712
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onHeadsUpUnPinned(ExpandableNotificationRow headsUp) {
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onHeadsUpUnPinned
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
|
onHeadsUpUnPinned
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getLastTapY() {
return mLastTapY;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLastTapY
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-1021"
] |
CVE-2015-1241
|
MEDIUM
| 4.3
|
chromium
|
getLastTapY
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
9d343ad2ea6ec395c377a4efa266057155bfa9c1
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean alwaysHideCommentForms() {
return CONF.alwaysHideCommentForms();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: alwaysHideCommentForms
File: src/main/java/com/erudika/scoold/utils/ScooldUtils.java
Repository: Erudika/scoold
The code follows secure coding practices.
|
[
"CWE-130"
] |
CVE-2022-1543
|
MEDIUM
| 6.5
|
Erudika/scoold
|
alwaysHideCommentForms
|
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
private void createBuffers() {
debug("JSSEngine: createBuffers()");
// If the buffers exist, destroy them and then recreate them.
if (read_buf != null) {
Buffer.Free(read_buf);
}
read_buf = Buffer.Create(BUFFER_SIZE);
if (write_buf != null) {
Buffer.Free(write_buf);
}
write_buf = Buffer.Create(BUFFER_SIZE);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createBuffers
File: src/main/java/org/mozilla/jss/ssl/javax/JSSEngineReferenceImpl.java
Repository: dogtagpki/jss
The code follows secure coding practices.
|
[
"CWE-401"
] |
CVE-2021-4213
|
HIGH
| 7.5
|
dogtagpki/jss
|
createBuffers
|
src/main/java/org/mozilla/jss/ssl/javax/JSSEngineReferenceImpl.java
|
5922560a78d0dee61af8a33cc9cfbf4cfa291448
| 0
|
Analyze the following code function for security vulnerabilities
|
private void migrate46(File dataDir, Stack<Integer> versions) {
for (File file: dataDir.listFiles()) {
if (file.getName().startsWith("Settings.xml")) {
VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file);
for (Element element: dom.getRootElement().elements()) {
if (element.elementTextTrim("key").equals("JOB_EXECUTORS")) {
Element valueElement = element.element("value");
for (Element executorElement: valueElement.elements()) {
if (executorElement.getName().contains("KubernetesExecutor")) {
Element serviceAccountElement = executorElement.element("serviceAccount");
if (serviceAccountElement != null)
serviceAccountElement.detach();
}
}
}
}
dom.writeToFile(file, false);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: migrate46
File: server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-338"
] |
CVE-2023-24828
|
HIGH
| 8.8
|
theonedev/onedev
|
migrate46
|
server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
|
d67dd9686897fe5e4ab881d749464aa7c06a68e5
| 0
|
Analyze the following code function for security vulnerabilities
|
public Vector<BaseObject> getComments()
{
return getComments(true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getComments
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
|
getComments
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean hasOverrideTTL() {
return cacheTTLOverride() != null && cacheTTLOverrideUnit() != null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasOverrideTTL
File: graylog2-server/src/main/java/org/graylog2/lookup/adapters/DnsLookupDataAdapter.java
Repository: Graylog2/graylog2-server
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2023-41045
|
MEDIUM
| 5.3
|
Graylog2/graylog2-server
|
hasOverrideTTL
|
graylog2-server/src/main/java/org/graylog2/lookup/adapters/DnsLookupDataAdapter.java
|
466af814523cffae9fbc7e77bab7472988f03c3e
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean finishDrawing(SurfaceControl.Transaction postDrawTransaction, int syncSeqId) {
if (mOrientationChangeRedrawRequestTime > 0) {
final long duration =
SystemClock.elapsedRealtime() - mOrientationChangeRedrawRequestTime;
Slog.i(TAG, "finishDrawing of orientation change: " + this + " " + duration + "ms");
mOrientationChangeRedrawRequestTime = 0;
} else if (mActivityRecord != null && mActivityRecord.mRelaunchStartTime != 0
&& mActivityRecord.findMainWindow() == this) {
final long duration =
SystemClock.elapsedRealtime() - mActivityRecord.mRelaunchStartTime;
Slog.i(TAG, "finishDrawing of relaunch: " + this + " " + duration + "ms");
mActivityRecord.mRelaunchStartTime = 0;
}
if (mActivityRecord != null && mAttrs.type == TYPE_APPLICATION_STARTING) {
mWmService.mAtmService.mTaskSupervisor.getActivityMetricsLogger()
.notifyStartingWindowDrawn(mActivityRecord);
}
final boolean hasSyncHandlers = executeDrawHandlers(postDrawTransaction, syncSeqId);
boolean skipLayout = false;
// Control the timing to switch the appearance of window with different rotations.
final AsyncRotationController asyncRotationController =
mDisplayContent.getAsyncRotationController();
if (asyncRotationController != null
&& asyncRotationController.handleFinishDrawing(this, postDrawTransaction)) {
// Consume the transaction because the controller will apply it with fade animation.
// Layout is not needed because the window will be hidden by the fade leash. Clear
// sync state because its sync transaction doesn't need to be merged to sync group.
postDrawTransaction = null;
skipLayout = true;
clearSyncState();
} else if (onSyncFinishedDrawing() && postDrawTransaction != null) {
mSyncTransaction.merge(postDrawTransaction);
// Consume the transaction because the sync group will merge it.
postDrawTransaction = null;
}
final boolean layoutNeeded =
mWinAnimator.finishDrawingLocked(postDrawTransaction, mClientWasDrawingForSync);
mClientWasDrawingForSync = false;
// We always want to force a traversal after a finish draw for blast sync.
return !skipLayout && (hasSyncHandlers || layoutNeeded);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: finishDrawing
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
|
finishDrawing
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<Gadget> getGadgets(String source, MacroTransformationContext context) throws Exception
{
// use the passed source as a document reference
DocumentReference sourceDocRef = getSourceDocumentReference(source);
if (sourceDocRef == null) {
return new ArrayList<>();
}
// get the current document, read the objects and turn that into gadgets
XWikiContext xContext = getXWikiContext();
XWiki xWiki = xContext.getWiki();
XWikiDocument sourceDoc = xWiki.getDocument(sourceDocRef, xContext);
DocumentReference gadgetsClass = currentReferenceEntityResolver.resolve(GADGET_CLASS);
List<BaseObject> gadgetObjects = sourceDoc.getXObjects(gadgetsClass);
if (gadgetObjects == null || gadgetObjects.isEmpty()) {
return new ArrayList<>();
}
this.progress.startStep(this, "dashboard.progress.prepareGadgets", "Prepare gadgets for document [{}] ({})",
sourceDocRef, gadgetObjects.size());
this.progress.pushLevelProgress(gadgetObjects.size(), this);
try {
return prepareGadgets(gadgetObjects, sourceDoc.getSyntax(), context);
} finally {
this.progress.popLevelProgress(this);
this.progress.endStep(this);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getGadgets
File: xwiki-platform-core/xwiki-platform-dashboard/xwiki-platform-dashboard-macro/src/main/java/org/xwiki/rendering/internal/macro/dashboard/DefaultGadgetSource.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2021-32621
|
MEDIUM
| 6.5
|
xwiki/xwiki-platform
|
getGadgets
|
xwiki-platform-core/xwiki-platform-dashboard/xwiki-platform-dashboard-macro/src/main/java/org/xwiki/rendering/internal/macro/dashboard/DefaultGadgetSource.java
|
bb7068bd911f91e5511f3cfb03276c7ac81100bc
| 0
|
Analyze the following code function for security vulnerabilities
|
public double readDouble() throws TException {
trans_.readAll(buffer, 0, 8);
long value;
if (version_ >= VERSION_DOUBLE_BE) {
value = bytesToLong(buffer);
} else {
value = bytesToLongLE(buffer);
}
return Double.longBitsToDouble(value);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readDouble
File: thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java
Repository: facebook/fbthrift
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2019-11938
|
MEDIUM
| 5
|
facebook/fbthrift
|
readDouble
|
thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java
|
08c2d412adb214c40bb03be7587057b25d053030
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean administrationModalUserCreation(TestUtils testUtils, AbstractRegistrationPage registrationPage)
{
registrationPage.clickRegister();
// Wait until one of the following happens:
testUtils.getDriver().waitUntilElementsAreVisible(new By[] {
// A live validation error message appears.
By.cssSelector("dd > span.LV_validation_message.LV_invalid"),
// The operation fails on the server.
By.cssSelector(".xnotification-error"),
// The operation succeeds.
By.cssSelector(".xnotification-done")
}, false);
try {
// Try to hide the success message by clicking on it.
testUtils.getDriver().findElementWithoutWaiting(
By.xpath("//div[contains(@class,'xnotification-done') and contains(., 'User created')]")).click();
// If we get here it means the registration was successful.
return true;
} catch (NoSuchElementException e) {
return false;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: administrationModalUserCreation
File: xwiki-platform-core/xwiki-platform-administration/xwiki-platform-administration-test/xwiki-platform-administration-test-docker/src/test/it/org/xwiki/administration/test/ui/RegisterIT.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2024-21650
|
CRITICAL
| 9.8
|
xwiki/xwiki-platform
|
administrationModalUserCreation
|
xwiki-platform-core/xwiki-platform-administration/xwiki-platform-administration-test/xwiki-platform-administration-test-docker/src/test/it/org/xwiki/administration/test/ui/RegisterIT.java
|
b290bfd573c6f7db6cc15a88dd4111d9fcad0d31
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Route.Definition patch(final String path, final Route.Handler handler) {
return appendDefinition(PATCH, path, handler);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: patch
File: jooby/src/main/java/org/jooby/Jooby.java
Repository: jooby-project/jooby
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-7647
|
MEDIUM
| 5
|
jooby-project/jooby
|
patch
|
jooby/src/main/java/org/jooby/Jooby.java
|
34f526028e6cd0652125baa33936ffb6a8a4a009
| 0
|
Analyze the following code function for security vulnerabilities
|
public void sendOfflineMessages() {
Cursor cursor = mContentResolver.query(ChatProvider.CONTENT_URI,
SEND_OFFLINE_PROJECTION, SEND_OFFLINE_SELECTION,
null, null);
final int _ID_COL = cursor.getColumnIndexOrThrow(ChatConstants._ID);
final int JID_COL = cursor.getColumnIndexOrThrow(ChatConstants.JID);
final int MSG_COL = cursor.getColumnIndexOrThrow(ChatConstants.MESSAGE);
final int TS_COL = cursor.getColumnIndexOrThrow(ChatConstants.DATE);
final int PACKETID_COL = cursor.getColumnIndexOrThrow(ChatConstants.PACKET_ID);
ContentValues mark_sent = new ContentValues();
mark_sent.put(ChatConstants.DELIVERY_STATUS, ChatConstants.DS_SENT_OR_READ);
while (cursor.moveToNext()) {
int _id = cursor.getInt(_ID_COL);
String toJID = cursor.getString(JID_COL);
String message = cursor.getString(MSG_COL);
String packetID = cursor.getString(PACKETID_COL);
long ts = cursor.getLong(TS_COL);
Log.d(TAG, "sendOfflineMessages: " + toJID + " > " + message);
final Message newMessage = new Message(toJID, Message.Type.chat);
newMessage.setBody(message);
DelayInformation delay = new DelayInformation(new Date(ts));
newMessage.addExtension(delay);
newMessage.addExtension(new DelayInfo(delay));
if (mucJIDs.contains(toJID))
newMessage.setType(Message.Type.groupchat);
else
newMessage.addExtension(new DeliveryReceiptRequest());
if ((packetID != null) && (packetID.length() > 0)) {
newMessage.setPacketID(packetID);
} else {
packetID = newMessage.getPacketID();
}
mark_sent.put(ChatConstants.PACKET_ID, packetID);
Uri rowuri = Uri.parse("content://" + ChatProvider.AUTHORITY
+ "/" + ChatProvider.TABLE_NAME + "/" + _id);
mContentResolver.update(rowuri, mark_sent,
null, null);
mXMPPConnection.sendPacket(newMessage); // must be after marking delivered, otherwise it may override the SendFailListener
}
cursor.close();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendOfflineMessages
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
|
sendOfflineMessages
|
src/org/yaxim/androidclient/service/SmackableImp.java
|
65a38dc77545d9568732189e86089390f0ceaf9f
| 0
|
Analyze the following code function for security vulnerabilities
|
static void boostPriorityForProcLockedSection() {
if (ENABLE_PROC_LOCK) {
sProcThreadPriorityBooster.boost();
} else {
sThreadPriorityBooster.boost();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: boostPriorityForProcLockedSection
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
|
boostPriorityForProcLockedSection
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getAttachmentURL(String filename, String action)
{
return this.doc.getAttachmentURL(filename, action, getXWikiContext());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAttachmentURL
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-23615
|
MEDIUM
| 5.5
|
xwiki/xwiki-platform
|
getAttachmentURL
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
|
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
| 0
|
Analyze the following code function for security vulnerabilities
|
private void fixupAutoTimeRestrictionDuringOrganizationOwnedDeviceMigration() {
for (UserInfo ui : mUserManager.getUsers()) {
final int userId = ui.id;
if (isProfileOwnerOfOrganizationOwnedDevice(userId)) {
final ActiveAdmin parent = getProfileOwnerAdminLocked(userId).parentAdmin;
if (parent != null && parent.requireAutoTime) {
// Remove deprecated requireAutoTime
parent.requireAutoTime = false;
saveSettingsLocked(userId);
// Remove user restrictions set by the device owner before the upgrade to
// Android 11.
mUserManagerInternal.setDevicePolicyUserRestrictions(UserHandle.USER_SYSTEM,
new Bundle(), new RestrictionsSet(), /* isDeviceOwner */ false);
// Apply user restriction to parent active admin instead
parent.ensureUserRestrictions().putBoolean(
UserManager.DISALLOW_CONFIG_DATE_TIME, true);
pushUserRestrictions(userId);
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fixupAutoTimeRestrictionDuringOrganizationOwnedDeviceMigration
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
|
fixupAutoTimeRestrictionDuringOrganizationOwnedDeviceMigration
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void send(final Request req, final Response rsp, final Asset asset) throws Throwable {
rsp.send(asset);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: send
File: jooby/src/main/java/org/jooby/handlers/AssetHandler.java
Repository: jooby-project/jooby
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-7647
|
MEDIUM
| 5
|
jooby-project/jooby
|
send
|
jooby/src/main/java/org/jooby/handlers/AssetHandler.java
|
34f526028e6cd0652125baa33936ffb6a8a4a009
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void killPackageDependents(String packageName, int userId) {
enforceCallingPermission(android.Manifest.permission.KILL_UID, "killPackageDependents()");
if (packageName == null) {
throw new NullPointerException(
"Cannot kill the dependents of a package without its name.");
}
final long callingId = Binder.clearCallingIdentity();
IPackageManager pm = AppGlobals.getPackageManager();
int pkgUid = -1;
try {
pkgUid = pm.getPackageUid(packageName, MATCH_DEBUG_TRIAGED_MISSING, userId);
} catch (RemoteException e) {
}
if (userId != UserHandle.USER_ALL && pkgUid == -1) {
throw new IllegalArgumentException(
"Cannot kill dependents of non-existing package " + packageName);
}
try {
synchronized(this) {
synchronized (mProcLock) {
mProcessList.killPackageProcessesLSP(packageName, UserHandle.getAppId(pkgUid),
userId, ProcessList.FOREGROUND_APP_ADJ,
ApplicationExitInfo.REASON_DEPENDENCY_DIED,
ApplicationExitInfo.SUBREASON_UNKNOWN,
"dep: " + packageName);
}
}
} finally {
Binder.restoreCallingIdentity(callingId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: killPackageDependents
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
|
killPackageDependents
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Bean
public PublicSecurityInterceptor securityInterceptor() {
return new PublicSecurityInterceptor();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: securityInterceptor
File: hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestDstu2Config.java
Repository: hapifhir/hapi-fhir
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-32053
|
MEDIUM
| 5
|
hapifhir/hapi-fhir
|
securityInterceptor
|
hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestDstu2Config.java
|
a5e4f56e1c6f55093ff334cf698ffdeea2f33960
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean showAssistFromActivity(IBinder token, Bundle args) {
long ident = Binder.clearCallingIdentity();
try {
synchronized (this) {
ActivityRecord caller = ActivityRecord.forTokenLocked(token);
ActivityRecord top = getFocusedStack().topActivity();
if (top != caller) {
Slog.w(TAG, "showAssistFromActivity failed: caller " + caller
+ " is not current top " + top);
return false;
}
if (!top.nowVisible) {
Slog.w(TAG, "showAssistFromActivity failed: caller " + caller
+ " is not visible");
return false;
}
}
AssistUtils utils = new AssistUtils(mContext);
return utils.showSessionForActiveService(args,
VoiceInteractionSession.SHOW_SOURCE_APPLICATION, null, token);
} finally {
Binder.restoreCallingIdentity(ident);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: showAssistFromActivity
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
|
showAssistFromActivity
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
9878bb99b77c3681f0fda116e2964bac26f349c3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean setStatusBarDisabled(ComponentName who, boolean disabled) {
final CallerIdentity caller = getCallerIdentity(who);
Preconditions.checkCallAuthorization(
isProfileOwner(caller) || isDefaultDeviceOwner(caller));
int userId = caller.getUserId();
synchronized (getLockObject()) {
Preconditions.checkCallAuthorization(isUserAffiliatedWithDeviceLocked(userId),
"Admin " + who
+ " is neither the device owner or affiliated user's profile owner.");
if (isManagedProfile(userId)) {
throw new SecurityException("Managed profile cannot disable status bar");
}
checkCanExecuteOrThrowUnsafe(DevicePolicyManager.OPERATION_SET_STATUS_BAR_DISABLED);
DevicePolicyData policy = getUserData(userId);
if (policy.mStatusBarDisabled != disabled) {
boolean isLockTaskMode = false;
try {
isLockTaskMode = mInjector.getIActivityTaskManager().getLockTaskModeState()
!= LOCK_TASK_MODE_NONE;
} catch (RemoteException e) {
Slogf.e(LOG_TAG, "Failed to get LockTask mode");
}
if (!isLockTaskMode) {
if (!setStatusBarDisabledInternal(disabled, userId)) {
return false;
}
}
policy.mStatusBarDisabled = disabled;
saveSettingsLocked(userId);
}
}
DevicePolicyEventLogger
.createEvent(DevicePolicyEnums.SET_STATUS_BAR_DISABLED)
.setAdmin(who)
.setBoolean(disabled)
.write();
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setStatusBarDisabled
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
|
setStatusBarDisabled
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
private int getImageResourceForPermission(int permission) {
switch (permission) {
case ContentSettingsType.CONTENT_SETTINGS_TYPE_IMAGES:
return R.drawable.permission_images;
case ContentSettingsType.CONTENT_SETTINGS_TYPE_JAVASCRIPT:
return R.drawable.permission_javascript;
case ContentSettingsType.CONTENT_SETTINGS_TYPE_GEOLOCATION:
return R.drawable.permission_location;
case ContentSettingsType.CONTENT_SETTINGS_TYPE_MEDIASTREAM_CAMERA:
return R.drawable.permission_media;
case ContentSettingsType.CONTENT_SETTINGS_TYPE_MEDIASTREAM_MIC:
return R.drawable.permission_mic;
case ContentSettingsType.CONTENT_SETTINGS_TYPE_NOTIFICATIONS:
return R.drawable.permission_push_notification;
case ContentSettingsType.CONTENT_SETTINGS_TYPE_POPUPS:
return R.drawable.permission_popups;
default:
assert false : "Icon requested for invalid permission: " + permission;
return -1;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getImageResourceForPermission
File: chrome/android/java/src/org/chromium/chrome/browser/WebsiteSettingsPopup.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2015-1261
|
MEDIUM
| 5
|
chromium
|
getImageResourceForPermission
|
chrome/android/java/src/org/chromium/chrome/browser/WebsiteSettingsPopup.java
|
5bf8a2dccf4777c5f065d918d1d9a2bbaa013f9f
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getSpanStart(Object tag) {
return mSpanned.getSpanStart(tag);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSpanStart
File: core/java/android/text/Layout.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-9452
|
MEDIUM
| 4.3
|
android
|
getSpanStart
|
core/java/android/text/Layout.java
|
3b6f84b77c30ec0bab5147b0cffc192c86ba2634
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void unregisterProcessObserver(IProcessObserver observer) {
mProcessList.unregisterProcessObserver(observer);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unregisterProcessObserver
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
|
unregisterProcessObserver
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public void sendReply(final StringBuilder buf) {
sendReply(HttpResponseStatus.OK, buf);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendReply
File: src/tsd/HttpQuery.java
Repository: OpenTSDB/opentsdb
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-25827
|
MEDIUM
| 6.1
|
OpenTSDB/opentsdb
|
sendReply
|
src/tsd/HttpQuery.java
|
ff02c1e95e60528275f69b31bcbf7b2ac625cea8
| 0
|
Analyze the following code function for security vulnerabilities
|
private File getPolicyFileDirectory(@UserIdInt int userId) {
return userId == UserHandle.USER_SYSTEM
? mPathProvider.getDataSystemDirectory()
: mPathProvider.getUserSystemDirectory(userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPolicyFileDirectory
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
|
getPolicyFileDirectory
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void clearPendingBackup(int userId) {
ActivityManagerService.this.clearPendingBackup(userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearPendingBackup
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
|
clearPendingBackup
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void appendSettingToCursor(MatrixCursor cursor, Setting setting) {
if (setting.isNull()) {
return;
}
final int columnCount = cursor.getColumnCount();
String[] values = new String[columnCount];
for (int i = 0; i < columnCount; i++) {
String column = cursor.getColumnName(i);
switch (column) {
case Settings.NameValueTable._ID: {
values[i] = setting.getId();
} break;
case Settings.NameValueTable.NAME: {
values[i] = setting.getName();
} break;
case Settings.NameValueTable.VALUE: {
values[i] = setting.getValue();
} break;
}
}
cursor.addRow(values);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: appendSettingToCursor
File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3876
|
HIGH
| 7.2
|
android
|
appendSettingToCursor
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
91fc934bb2e5ea59929bb2f574de6db9b5100745
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void endFormat(Format format, Map<String, String> parameters)
{
if (!parameters.isEmpty()) {
getXHTMLWikiPrinter().printXMLEndElement(ELEM_SPAN);
}
// Right now, the only difference with the super class is about the "monospace" format
if (format == Format.MONOSPACE) {
if (parameters.isEmpty()) {
// if the parameters are not empty, the span element has already been closed
getXHTMLWikiPrinter().printXMLEndElement(ELEM_SPAN);
}
} else {
// Call the super class, with an empty parameters map to avoid closing the span element twice
super.endFormat(format, new HashMap<String, String>());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: endFormat
File: xwiki-rendering-syntaxes/xwiki-rendering-syntax-html5/src/main/java/org/xwiki/rendering/internal/renderer/html5/HTML5ChainingRenderer.java
Repository: xwiki/xwiki-rendering
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-32070
|
MEDIUM
| 6.1
|
xwiki/xwiki-rendering
|
endFormat
|
xwiki-rendering-syntaxes/xwiki-rendering-syntax-html5/src/main/java/org/xwiki/rendering/internal/renderer/html5/HTML5ChainingRenderer.java
|
c40e2f5f9482ec6c3e71dbf1fff5ba8a5e44cdc1
| 0
|
Analyze the following code function for security vulnerabilities
|
private String normalizedFileSeparator(String pathOrEntry) {
return pathOrEntry.replace("/", File.separator);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: normalizedFileSeparator
File: src/main/java/org/codehaus/plexus/archiver/AbstractUnArchiver.java
Repository: codehaus-plexus/plexus-archiver
The code follows secure coding practices.
|
[
"CWE-22",
"CWE-61"
] |
CVE-2023-37460
|
CRITICAL
| 9.8
|
codehaus-plexus/plexus-archiver
|
normalizedFileSeparator
|
src/main/java/org/codehaus/plexus/archiver/AbstractUnArchiver.java
|
54759839fbdf85caf8442076f001d5fd64e0dcb2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Procedure
@Description("apoc.export.csv.graph(graph,file,config) - exports given graph object as csv to the provided file")
public Stream<ProgressInfo> graph(@Name("graph") Map<String,Object> graph, @Name("file") String fileName, @Name("config") Map<String, Object> config) throws Exception {
Collection<Node> nodes = (Collection<Node>) graph.get("nodes");
Collection<Relationship> rels = (Collection<Relationship>) graph.get("relationships");
String source = String.format("graph: nodes(%d), rels(%d)", nodes.size(), rels.size());
return exportCsv(fileName, source, new NodesAndRelsSubGraph(tx, nodes, rels), new ExportConfig(config));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: graph
File: core/src/main/java/apoc/export/csv/ExportCSV.java
Repository: neo4j-contrib/neo4j-apoc-procedures
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-23532
|
MEDIUM
| 6.5
|
neo4j-contrib/neo4j-apoc-procedures
|
graph
|
core/src/main/java/apoc/export/csv/ExportCSV.java
|
01e63ed2d187cd2a8aa1d78bf831ef0fdd69b522
| 0
|
Analyze the following code function for security vulnerabilities
|
public String selectHeaderContentType(String[] contentTypes) {
if (contentTypes.length == 0) {
return "application/json";
}
for (String contentType : contentTypes) {
if (isJsonMime(contentType)) {
return contentType;
}
}
return contentTypes[0];
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: selectHeaderContentType
File: samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
selectHeaderContentType
|
samples/client/petstore/java/okhttp-gson/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
public SerializationConfig setAllowUnsafe(boolean allowUnsafe) {
this.allowUnsafe = allowUnsafe;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAllowUnsafe
File: hazelcast/src/main/java/com/hazelcast/config/SerializationConfig.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
setAllowUnsafe
|
hazelcast/src/main/java/com/hazelcast/config/SerializationConfig.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setReadTimeout(Object connection, int readTimeout) {
if (connection instanceof URLConnection) {
((URLConnection)connection).setReadTimeout(readTimeout);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setReadTimeout
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
|
setReadTimeout
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
private UserReferenceSerializer<String> getUserReferenceStringSerializer()
{
return Utils.getComponent(UserReferenceSerializer.TYPE_STRING);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserReferenceStringSerializer
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2023-29523
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
getUserReferenceStringSerializer
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
0d547181389f7941e53291af940966413823f61c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getUser() {
return (String) get(PersistenceUnitProperties.JDBC_USER);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUser
File: src/main/java/uk/q3c/krail/jpa/persist/DefaultJpaInstanceConfiguration.java
Repository: KrailOrg/krail-jpa
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-15018
|
MEDIUM
| 5.2
|
KrailOrg/krail-jpa
|
getUser
|
src/main/java/uk/q3c/krail/jpa/persist/DefaultJpaInstanceConfiguration.java
|
c1e848665492e21ef6cc9be443205e36b9a1f6be
| 0
|
Analyze the following code function for security vulnerabilities
|
private void convertToAccurateDouble() {
double n = origDouble;
assert n != 0;
int delta = origDelta;
setBcdToZero();
// Call the slow oracle function (Double.toString in Java, sprintf in C++).
String dstr = Double.toString(n);
if (dstr.indexOf('E') != -1) {
// Case 1: Exponential notation.
assert dstr.indexOf('.') == 1;
int expPos = dstr.indexOf('E');
_setToLong(Long.parseLong(dstr.charAt(0) + dstr.substring(2, expPos)));
scale += Integer.parseInt(dstr.substring(expPos + 1)) - (expPos - 1) + 1;
} else if (dstr.charAt(0) == '0') {
// Case 2: Fraction-only number.
assert dstr.indexOf('.') == 1;
_setToLong(Long.parseLong(dstr.substring(2)));
scale += 2 - dstr.length();
} else if (dstr.charAt(dstr.length() - 1) == '0') {
// Case 3: Integer-only number.
// Note: this path should not normally happen, because integer-only numbers are captured
// before the approximate double logic is performed.
assert dstr.indexOf('.') == dstr.length() - 2;
assert dstr.length() - 2 <= 18;
_setToLong(Long.parseLong(dstr.substring(0, dstr.length() - 2)));
// no need to adjust scale
} else {
// Case 4: Number with both a fraction and an integer.
int decimalPos = dstr.indexOf('.');
_setToLong(Long.parseLong(dstr.substring(0, decimalPos) + dstr.substring(decimalPos + 1)));
scale += decimalPos - dstr.length() + 1;
}
scale += delta;
compact();
explicitExactDouble = true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: convertToAccurateDouble
File: icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_AbstractBCD.java
Repository: unicode-org/icu
The code follows secure coding practices.
|
[
"CWE-190"
] |
CVE-2018-18928
|
HIGH
| 7.5
|
unicode-org/icu
|
convertToAccurateDouble
|
icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_AbstractBCD.java
|
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
| 0
|
Analyze the following code function for security vulnerabilities
|
InputSource createInputSource(byte[] data, String systemId) {
InputSource result = new InputSource(new ByteArrayInputStream(data));
result.setSystemId(systemId);
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createInputSource
File: src/org/opencms/xml/CmsXmlEntityResolver.java
Repository: alkacon/opencms-core
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-3312
|
MEDIUM
| 4
|
alkacon/opencms-core
|
createInputSource
|
src/org/opencms/xml/CmsXmlEntityResolver.java
|
92e035423aa6967822d343e54392d4291648c0ee
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean isBuildDebuggable() {
return Build.IS_DEBUGGABLE;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isBuildDebuggable
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
|
isBuildDebuggable
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean securityLogIsLoggingEnabled() {
return SecurityLog.isLoggingEnabled();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: securityLogIsLoggingEnabled
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
|
securityLogIsLoggingEnabled
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getNumExecutors() {
return numExecutors;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNumExecutors
File: core/src/main/java/jenkins/model/Jenkins.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-2065
|
MEDIUM
| 4.3
|
jenkinsci/jenkins
|
getNumExecutors
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
public abstract BaseXMLBuilder reference(String name);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: reference
File: src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
Repository: jmurty/java-xmlbuilder
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2014-125087
|
MEDIUM
| 5.2
|
jmurty/java-xmlbuilder
|
reference
|
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
|
e6fddca201790abab4f2c274341c0bb8835c3e73
| 0
|
Analyze the following code function for security vulnerabilities
|
private void fillStatistics() {
getRequest().setAttribute("commCount", new Comment().count());
getRequest().setAttribute("toDayCommCount", new Comment().countToDayComment());
getRequest().setAttribute("clickCount", new Log().sumClick());
getRequest().setAttribute("articleCount", new Log().adminCount());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fillStatistics
File: web/src/main/java/com/zrlog/web/controller/admin/page/AdminPageController.java
Repository: 94fzb/zrlog
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-16643
|
LOW
| 3.5
|
94fzb/zrlog
|
fillStatistics
|
web/src/main/java/com/zrlog/web/controller/admin/page/AdminPageController.java
|
4a91c83af669e31a22297c14f089d8911d353fa1
| 0
|
Analyze the following code function for security vulnerabilities
|
ApplicationInfo getAppInfoForUser(ApplicationInfo info, int userId) {
if (info == null) return null;
ApplicationInfo newInfo = new ApplicationInfo(info);
newInfo.uid = applyUserId(info.uid, userId);
newInfo.dataDir = Environment
.getDataUserPackageDirectory(info.volumeUuid, userId, info.packageName)
.getAbsolutePath();
return newInfo;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAppInfoForUser
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
|
getAppInfoForUser
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
9878bb99b77c3681f0fda116e2964bac26f349c3
| 0
|
Analyze the following code function for security vulnerabilities
|
private List<OraclePackage> getAllRealOraclePackage(OBridgeConfiguration c) {
String query = "select object_name from user_objects where object_type = 'PACKAGE' and object_name like '" + c.getPackagesLike() + "'";
return jdbcTemplate.query(query, (resultSet, i) -> {
OraclePackage p = new OraclePackage();
p.setName(resultSet.getString("object_name"));
p.setProcedureList(getAllProcedure(resultSet.getString("object_name"), ""));
return p;
});
}
|
Vulnerability Classification:
- CWE: CWE-89
- CVE: CVE-2018-25075
- Severity: MEDIUM
- CVSS Score: 4.0
Description: sql injection fix.
Function: getAllRealOraclePackage
File: obridge-main/src/main/java/org/obridge/dao/ProcedureDao.java
Repository: karsany/obridge
Fixed Code:
private List<OraclePackage> getAllRealOraclePackage(OBridgeConfiguration c) {
String query = "select object_name from user_objects where object_type = 'PACKAGE' and object_name like ?";
return jdbcTemplate.query(query, (resultSet, i) -> {
OraclePackage p = new OraclePackage();
p.setName(resultSet.getString("object_name"));
p.setProcedureList(getAllProcedure(resultSet.getString("object_name"), ""));
return p;
}, c.getPackagesLike());
}
|
[
"CWE-89"
] |
CVE-2018-25075
|
MEDIUM
| 4
|
karsany/obridge
|
getAllRealOraclePackage
|
obridge-main/src/main/java/org/obridge/dao/ProcedureDao.java
|
52eca4ad05f3c292aed3178b2f58977686ffa376
| 1
|
Analyze the following code function for security vulnerabilities
|
final void doPendingActivityLaunchesLocked(boolean doResume) {
while (!mPendingActivityLaunches.isEmpty()) {
PendingActivityLaunch pal = mPendingActivityLaunches.remove(0);
try {
startActivityUncheckedLocked(pal.r, pal.sourceRecord, null, null, pal.startFlags,
doResume && mPendingActivityLaunches.isEmpty(), null, null);
} catch (Exception e) {
Slog.w(TAG, "Exception during pending activity launch pal=" + pal, e);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doPendingActivityLaunchesLocked
File: services/core/java/com/android/server/am/ActivityStackSupervisor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3838
|
MEDIUM
| 4.3
|
android
|
doPendingActivityLaunchesLocked
|
services/core/java/com/android/server/am/ActivityStackSupervisor.java
|
468651c86a8adb7aa56c708d2348e99022088af3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isBaseOfLockedTask(String packageName) {
synchronized (mGlobalLock) {
return getLockTaskController().isBaseOfLockedTask(packageName);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isBaseOfLockedTask
File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40094
|
HIGH
| 7.8
|
android
|
isBaseOfLockedTask
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public RootTaskInfo getFocusedRootTaskInfo() throws RemoteException {
return mActivityTaskManager.getFocusedRootTaskInfo();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFocusedRootTaskInfo
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
|
getFocusedRootTaskInfo
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public void loadPlatFormPlugins() {
List<PluginWithBLOBs> plugins = basePluginService.getPlugins(PluginScenario.platform.name());
PluginManagerUtil.loadPlugins(getPluginManager(), plugins);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: loadPlatFormPlugins
File: test-track/backend/src/main/java/io/metersphere/service/PlatformPluginService.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2022-23544
|
MEDIUM
| 6.1
|
metersphere
|
loadPlatFormPlugins
|
test-track/backend/src/main/java/io/metersphere/service/PlatformPluginService.java
|
d0f95b50737c941b29d507a4cc3545f2dc6ab121
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int available() throws IOException {
// returns 0 if next data is an object, or N if reading primitive types
checkReadPrimitiveTypes();
return primitiveData.available();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: available
File: luni/src/main/java/java/io/ObjectInputStream.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-7911
|
HIGH
| 7.2
|
android
|
available
|
luni/src/main/java/java/io/ObjectInputStream.java
|
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
| 0
|
Analyze the following code function for security vulnerabilities
|
public String displayPrettyName(String fieldname, BaseObject obj, XWikiContext context)
{
return displayPrettyName(fieldname, false, true, obj, context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: displayPrettyName
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
|
displayPrettyName
|
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 afterJFinalStart() {
FreeMarkerRender.getConfiguration().setClassForTemplateLoading(ZrLogConfig.class, com.zrlog.common.Constants.FTL_VIEW_PATH);
super.afterJFinalStart();
if (isInstalled()) {
initDatabaseVersion();
}
SYSTEM_PROP.setProperty("zrlog.runtime.path", PathKit.getWebRootPath());
SYSTEM_PROP.setProperty("server.info", JFinal.me().getServletContext().getServerInfo());
JFinal.me().getServletContext().setAttribute("system", SYSTEM_PROP);
blogProperties.put("version", BlogBuildInfoUtil.getVersion());
blogProperties.put("buildId", BlogBuildInfoUtil.getBuildId());
blogProperties.put("buildTime", new SimpleDateFormat("yyyy-MM-dd").format(BlogBuildInfoUtil.getTime()));
blogProperties.put("runMode", BlogBuildInfoUtil.getRunMode());
JFinal.me().getServletContext().setAttribute("zrlog", blogProperties);
JFinal.me().getServletContext().setAttribute("config", this);
if (haveSqlUpdated) {
int updatedVersion = ZrLogUtil.getSqlVersion(getUpgradeSqlBasePath());
if (updatedVersion > 0) {
new WebSite().updateByKV(com.zrlog.common.Constants.ZRLOG_SQL_VERSION_KEY, updatedVersion + "");
}
}
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2020-21316
- Severity: MEDIUM
- CVSS Score: 4.3
Description: Fix #55,#56 xxs inject
Function: afterJFinalStart
File: web/src/main/java/com/zrlog/web/config/ZrLogConfig.java
Repository: 94fzb/zrlog
Fixed Code:
@Override
public void afterJFinalStart() {
FreeMarkerRender.getConfiguration().setClassForTemplateLoading(ZrLogConfig.class, com.zrlog.common.Constants.FTL_VIEW_PATH);
try {
BlogFrontendFreeMarkerRender.getConfiguration().setDirectoryForTemplateLoading(new File(PathKit.getWebRootPath()));
BlogFrontendFreeMarkerRender.init(JFinal.me().getServletContext(), Locale.getDefault(), Const.DEFAULT_FREEMARKER_TEMPLATE_UPDATE_DELAY);
} catch (IOException e) {
e.printStackTrace();
}
super.afterJFinalStart();
if (isInstalled()) {
initDatabaseVersion();
}
SYSTEM_PROP.setProperty("zrlog.runtime.path", PathKit.getWebRootPath());
SYSTEM_PROP.setProperty("server.info", JFinal.me().getServletContext().getServerInfo());
JFinal.me().getServletContext().setAttribute("system", SYSTEM_PROP);
blogProperties.put("version", BlogBuildInfoUtil.getVersion());
blogProperties.put("buildId", BlogBuildInfoUtil.getBuildId());
blogProperties.put("buildTime", new SimpleDateFormat("yyyy-MM-dd").format(BlogBuildInfoUtil.getTime()));
blogProperties.put("runMode", BlogBuildInfoUtil.getRunMode());
JFinal.me().getServletContext().setAttribute("zrlog", blogProperties);
JFinal.me().getServletContext().setAttribute("config", this);
if (haveSqlUpdated) {
int updatedVersion = ZrLogUtil.getSqlVersion(getUpgradeSqlBasePath());
if (updatedVersion > 0) {
new WebSite().updateByKV(com.zrlog.common.Constants.ZRLOG_SQL_VERSION_KEY, updatedVersion + "");
}
}
}
|
[
"CWE-79"
] |
CVE-2020-21316
|
MEDIUM
| 4.3
|
94fzb/zrlog
|
afterJFinalStart
|
web/src/main/java/com/zrlog/web/config/ZrLogConfig.java
|
b921c1ae03b8290f438657803eee05226755c941
| 1
|
Analyze the following code function for security vulnerabilities
|
@GuardedBy("mLock")
@NonNull
ShortcutUser getUserShortcutsLocked(@UserIdInt int userId) {
if (!isUserUnlockedL(userId)) {
// Only do wtf once for each user. (until the user is unlocked)
if (userId != mLastLockedUser) {
wtf("User still locked");
mLastLockedUser = userId;
}
} else {
mLastLockedUser = -1;
}
ShortcutUser userPackages = mUsers.get(userId);
if (userPackages == null) {
userPackages = loadUserLocked(userId);
if (userPackages == null) {
userPackages = new ShortcutUser(this, userId);
}
mUsers.put(userId, userPackages);
// Also when a user's data is first accessed, scan all packages.
checkPackageChanges(userId);
}
return userPackages;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserShortcutsLocked
File: services/core/java/com/android/server/pm/ShortcutService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40079
|
HIGH
| 7.8
|
android
|
getUserShortcutsLocked
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String getItemGroupAndItemMetaOC1_3Sql(String crfVersionIds) {
return "select cv.crf_id, cv.crf_version_id,"
+ " ig.item_group_id, item.item_id, rs.response_set_id, cv.oc_oid as crf_version_oid, ig.oc_oid as item_group_oid, item.oc_oid as item_oid,"
+ " ifm.item_header, ifm.subheader, ifm.section_id, ifm.left_item_text, ifm.right_item_text,"
+ " ifm.parent_id, ifm.column_number, ifm.page_number_label, ifm.response_layout, ifm.default_value, item.phi_status, ifm.show_item, "
+ " rs.response_type_id, igm.repeat_number, igm.repeat_max, igm.show_group,orderInForm.item_order,igm.item_group_header from crf_version cv, (select crf_version_id, item_id, response_set_id,"
+ " header as item_header, subheader, section_id, left_item_text, right_item_text,"
+ " parent_id, column_number, page_number_label, response_layout,"
+ " default_value, show_item from item_form_metadata where crf_version_id in (" + crfVersionIds + "))ifm, item, response_set rs,"
+ " (select crf_version_id, item_group_id, item_id, header as item_group_header,"
+ " repeat_number, repeat_max, show_group from item_group_metadata where crf_version_id in ("
+ crfVersionIds + "))igm," + " item_group ig, "
+ this.getOrderInForm(crfVersionIds)
+ this.getItemGroupAndItemMetaConditionalOrderItems(crfVersionIds)
;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getItemGroupAndItemMetaOC1_3Sql
File: core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
Repository: OpenClinica
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-24831
|
HIGH
| 7.5
|
OpenClinica
|
getItemGroupAndItemMetaOC1_3Sql
|
core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
|
b152cc63019230c9973965a98e4386ea5322c18f
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void compose(Context launcher, Account account) {
launch(launcher, account, null, COMPOSE, null, null, null, null, null /* extraValues */);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: compose
File: src/com/android/mail/compose/ComposeActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2425
|
MEDIUM
| 4.3
|
android
|
compose
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<BindingPair<?>> getAdditionalBindings() {
return additionalBindings;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAdditionalBindings
File: src/main/java/uk/q3c/krail/jpa/persist/DefaultJpaInstanceConfiguration.java
Repository: KrailOrg/krail-jpa
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-15018
|
MEDIUM
| 5.2
|
KrailOrg/krail-jpa
|
getAdditionalBindings
|
src/main/java/uk/q3c/krail/jpa/persist/DefaultJpaInstanceConfiguration.java
|
c1e848665492e21ef6cc9be443205e36b9a1f6be
| 0
|
Analyze the following code function for security vulnerabilities
|
private void cancelNotificationLocked(NotificationRecord r, boolean sendDelete, int reason) {
// tell the app
if (sendDelete) {
if (r.getNotification().deleteIntent != null) {
try {
r.getNotification().deleteIntent.send();
} catch (PendingIntent.CanceledException ex) {
// do nothing - there's no relevant way to recover, and
// no reason to let this propagate
Slog.w(TAG, "canceled PendingIntent for " + r.sbn.getPackageName(), ex);
}
}
}
// status bar
if (r.getNotification().getSmallIcon() != null) {
r.isCanceled = true;
mListeners.notifyRemovedLocked(r.sbn);
}
final String canceledKey = r.getKey();
// sound
if (canceledKey.equals(mSoundNotificationKey)) {
mSoundNotificationKey = null;
final long identity = Binder.clearCallingIdentity();
try {
final IRingtonePlayer player = mAudioManager.getRingtonePlayer();
if (player != null) {
player.stopAsync();
}
} catch (RemoteException e) {
} finally {
Binder.restoreCallingIdentity(identity);
}
}
// vibrate
if (canceledKey.equals(mVibrateNotificationKey)) {
mVibrateNotificationKey = null;
long identity = Binder.clearCallingIdentity();
try {
mVibrator.cancel();
}
finally {
Binder.restoreCallingIdentity(identity);
}
}
// light
mLights.remove(canceledKey);
// Record usage stats
// TODO: add unbundling stats?
switch (reason) {
case REASON_DELEGATE_CANCEL:
case REASON_DELEGATE_CANCEL_ALL:
case REASON_LISTENER_CANCEL:
case REASON_LISTENER_CANCEL_ALL:
mUsageStats.registerDismissedByUser(r);
break;
case REASON_APP_CANCEL:
case REASON_APP_CANCEL_ALL:
mUsageStats.registerRemovedByApp(r);
break;
}
mNotificationsByKey.remove(r.sbn.getKey());
String groupKey = r.getGroupKey();
NotificationRecord groupSummary = mSummaryByGroupKey.get(groupKey);
if (groupSummary != null && groupSummary.getKey().equals(r.getKey())) {
mSummaryByGroupKey.remove(groupKey);
}
final ArrayMap<String, String> summaries = mAutobundledSummaries.get(r.sbn.getUserId());
if (summaries != null && r.sbn.getKey().equals(summaries.get(r.sbn.getPackageName()))) {
summaries.remove(r.sbn.getPackageName());
}
// Save it for users of getHistoricalNotifications()
mArchive.record(r.sbn);
final long now = System.currentTimeMillis();
EventLogTags.writeNotificationCanceled(canceledKey, reason,
r.getLifespanMs(now), r.getFreshnessMs(now), r.getExposureMs(now));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cancelNotificationLocked
File: services/core/java/com/android/server/notification/NotificationManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3884
|
MEDIUM
| 4.3
|
android
|
cancelNotificationLocked
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
@SysUISingleton
@Provides
static VisualStabilityManager provideVisualStabilityManager(
NotificationEntryManager notificationEntryManager,
VisualStabilityProvider visualStabilityProvider,
@Main Handler handler,
StatusBarStateController statusBarStateController,
WakefulnessLifecycle wakefulnessLifecycle,
DumpManager dumpManager) {
return new VisualStabilityManager(
notificationEntryManager,
visualStabilityProvider,
handler,
statusBarStateController,
wakefulnessLifecycle,
dumpManager);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: provideVisualStabilityManager
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
|
provideVisualStabilityManager
|
packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java
|
d21ffbe8a2eeb2a5e6da7efbb1a0430ba6b022e0
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void keyguardGoingAway(int flags) {
enforceNotIsolatedCaller("keyguardGoingAway");
final long token = Binder.clearCallingIdentity();
try {
synchronized (mGlobalLock) {
// Keyguard asked us to clear the home task snapshot before going away, so do that.
if ((flags & TRANSIT_FLAG_KEYGUARD_GOING_AWAY_TO_LAUNCHER_CLEAR_SNAPSHOT) != 0) {
mActivityClientController.invalidateHomeTaskSnapshot(null /* token */);
}
mRootWindowContainer.forAllDisplays(displayContent -> {
mKeyguardController.keyguardGoingAway(displayContent.getDisplayId(), flags);
});
}
} finally {
Binder.restoreCallingIdentity(token);
}
}
|
Vulnerability Classification:
- CWE: CWE-862
- CVE: CVE-2023-40094
- Severity: HIGH
- CVSS Score: 7.8
Description: Require permission to unlock keyguard
Bug: 288896339
Test: Manual, verify that the app which can be found on the bug can no longer call
keyguardGoingAway successfully
Require permission to unlock keyguard
Bug: 288896339
Test: Manual, verify that the app which can be found on the bug can no longer call
keyguardGoingAway successfully
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:bd2aa5d309c5bf8e73161975bd5aba7945b25e84)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:d1930b7eacc7b9094c6c31b9df8b5f5ca704b942)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:41bc7c0042f1dd004179f32376f72a8811d83c6e)
Merged-In: I7ba7e56f954c8e6f1f734311f735215918975bc6
Change-Id: I7ba7e56f954c8e6f1f734311f735215918975bc6
Function: keyguardGoingAway
File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java
Repository: android
Fixed Code:
@Override
public void keyguardGoingAway(int flags) {
mAmInternal.enforceCallingPermission(CONTROL_KEYGUARD, "unlock keyguard");
enforceNotIsolatedCaller("keyguardGoingAway");
final long token = Binder.clearCallingIdentity();
try {
synchronized (mGlobalLock) {
// Keyguard asked us to clear the home task snapshot before going away, so do that.
if ((flags & TRANSIT_FLAG_KEYGUARD_GOING_AWAY_TO_LAUNCHER_CLEAR_SNAPSHOT) != 0) {
mActivityClientController.invalidateHomeTaskSnapshot(null /* token */);
}
mRootWindowContainer.forAllDisplays(displayContent -> {
mKeyguardController.keyguardGoingAway(displayContent.getDisplayId(), flags);
});
}
} finally {
Binder.restoreCallingIdentity(token);
}
}
|
[
"CWE-862"
] |
CVE-2023-40094
|
HIGH
| 7.8
|
android
|
keyguardGoingAway
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 1
|
Analyze the following code function for security vulnerabilities
|
private void ensureLegacyDefaultValueAndSystemSetUpdatedLocked(SettingsState settings,
int userId) {
List<String> names = settings.getSettingNamesLocked();
final int nameCount = names.size();
for (int i = 0; i < nameCount; i++) {
String name = names.get(i);
Setting setting = settings.getSettingLocked(name);
// In the upgrade case we pretend the call is made from the app
// that made the last change to the setting to properly determine
// whether the call has been made by a system component.
try {
final boolean systemSet = SettingsState.isSystemPackage(
getContext(), setting.getPackageName());
if (systemSet) {
settings.insertSettingOverrideableByRestoreLocked(name, setting.getValue(),
setting.getTag(), true, setting.getPackageName());
} else if (setting.getDefaultValue() != null && setting.isDefaultFromSystem()) {
// We had a bug where changes by non-system packages were marked
// as system made and as a result set as the default. Therefore, if
// the package changed the setting last is not a system one but the
// setting is marked as its default coming from the system we clear
// the default and clear the system set flag.
settings.resetSettingDefaultValueLocked(name);
}
} catch (IllegalStateException e) {
// If the package goes over its quota during the upgrade, don't
// crash but just log the error as the system does the upgrade.
Slog.e(LOG_TAG, "Error upgrading setting: " + setting.getName(), e);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: ensureLegacyDefaultValueAndSystemSetUpdatedLocked
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
|
ensureLegacyDefaultValueAndSystemSetUpdatedLocked
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
ff86ff28cf82124f8e65833a2dd8c319aea08945
| 0
|
Analyze the following code function for security vulnerabilities
|
public static Locale findLocale(VaadinSession session,
VaadinRequest request) {
if (session == null) {
session = VaadinSession.getCurrent();
}
if (session != null) {
Locale locale = session.getLocale();
if (locale != null) {
return locale;
}
}
if (request == null) {
request = VaadinService.getCurrentRequest();
}
if (request != null) {
Locale locale = request.getLocale();
if (locale != null) {
return locale;
}
}
return Locale.getDefault();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findLocale
File: flow-server/src/main/java/com/vaadin/flow/server/HandlerHelper.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-36321
|
MEDIUM
| 5
|
vaadin/flow
|
findLocale
|
flow-server/src/main/java/com/vaadin/flow/server/HandlerHelper.java
|
e0dcaf86b63dbcab3adbbe107d1c49d490ead8eb
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isNull(String key) {
return JSONObject.NULL.equals(this.opt(key));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isNull
File: src/main/java/org/json/JSONObject.java
Repository: stleary/JSON-java
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2023-5072
|
HIGH
| 7.5
|
stleary/JSON-java
|
isNull
|
src/main/java/org/json/JSONObject.java
|
661114c50dcfd53bb041aab66f14bb91e0a87c8a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public DynamicForm bind(
Lang lang,
TypedMap attrs,
Map<String, String> data,
Map<String, Http.MultipartFormData.FilePart<?>> files,
String... allowedFields) {
Form<Dynamic> form =
super.bind(
lang,
attrs,
data.entrySet().stream()
.collect(Collectors.toMap(e -> asDynamicKey(e.getKey()), e -> e.getValue())),
files.entrySet().stream()
.collect(Collectors.toMap(e -> asDynamicKey(e.getKey()), e -> e.getValue())),
allowedFields);
return new DynamicForm(
form.rawData(),
form.files(),
form.errors(),
form.value(),
messagesApi,
formatters,
validatorFactory,
config,
lang);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: bind
File: web/play-java-forms/src/main/java/play/data/DynamicForm.java
Repository: playframework
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-31018
|
MEDIUM
| 5
|
playframework
|
bind
|
web/play-java-forms/src/main/java/play/data/DynamicForm.java
|
15393b736df939e35e275af2347155f296c684f2
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void sendError(ChannelHandlerContext ctx, HttpResponseStatus status) {
FullHttpResponse response = new DefaultFullHttpResponse(
HttpVersion.HTTP_1_1, status, Unpooled.copiedBuffer("Failure: " + status.toString() + "\r\n", CharsetUtil.UTF_8));
response.headers().set(HttpHeaderConstants.CONTENT_TYPE, HttpHeaderConstants.PLAIN_TEXT_UTF8);
// Close the connection as soon as the error message is sent.
ctx.writeAndFlush(response).addListener(ChannelFutureListener.CLOSE);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendError
File: ratpack-core/src/main/java/ratpack/server/internal/NettyHandlerAdapter.java
Repository: ratpack
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2019-17513
|
MEDIUM
| 5
|
ratpack
|
sendError
|
ratpack-core/src/main/java/ratpack/server/internal/NettyHandlerAdapter.java
|
efb910d38a96494256f36675ef0e5061097dd77d
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String pageProfile(Map<String, Object> data) {
String html = "";
try {
UserProfileMenu profile = new UserProfileMenu();
userview.setProperty("pageNotFoundMenu", profile);
Map<String, Object> props = new HashMap<String, Object>();
props.put("id", PROFILE);
props.put("customId", PROFILE);
props.put("menuId", PROFILE);
props.put("label", ResourceBundleUtil.getMessage("theme.universal.profile"));
profile.setRequestParameters(userview.getParams());
profile.setProperties(props);
profile.setUserview(userview);
profile.setUrl(data.get("base_link") + PROFILE);
profile.setKey(userview.getParamString("key"));
html += UserviewUtil.getUserviewMenuHtml(profile);
} catch (Exception e) {
html += handleContentError(e, data);
}
return html;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: pageProfile
File: wflow-core/src/main/java/org/joget/plugin/enterprise/UniversalTheme.java
Repository: jogetworkflow/jw-community
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-4560
|
MEDIUM
| 6.1
|
jogetworkflow/jw-community
|
pageProfile
|
wflow-core/src/main/java/org/joget/plugin/enterprise/UniversalTheme.java
|
ecf8be8f6f0cb725c18536ddc726d42a11bdaa1b
| 0
|
Analyze the following code function for security vulnerabilities
|
void destroySurfaces() {
destroySurfaces(false /*cleanupOnResume*/);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: destroySurfaces
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
|
destroySurfaces
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequestMapping({"/userview/(*:appId)/(*:userviewId)/(*:key)/cacheUrls"})
public void cacheUrls(ModelMap map, HttpServletRequest request, HttpServletResponse response, @RequestParam("appId") String appId, @RequestParam("userviewId") String userviewId, @RequestParam("key") String userviewKey) throws IOException {
String cacheUrlsJSON = UserviewUtil.getCacheUrls(SecurityUtil.validateStringInput(appId), SecurityUtil.validateStringInput(userviewId), SecurityUtil.validateStringInput(userviewKey), request.getContextPath());
response.setContentType("application/json;charset=UTF-8");
PrintWriter writer = response.getWriter();
writer.println(cacheUrlsJSON);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cacheUrls
File: wflow-consoleweb/src/main/java/org/joget/apps/app/controller/UserviewWebController.java
Repository: jogetworkflow/jw-community
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-4560
|
MEDIUM
| 6.1
|
jogetworkflow/jw-community
|
cacheUrls
|
wflow-consoleweb/src/main/java/org/joget/apps/app/controller/UserviewWebController.java
|
ecf8be8f6f0cb725c18536ddc726d42a11bdaa1b
| 0
|
Analyze the following code function for security vulnerabilities
|
public void onInitPowerManagement() {
synchronized (mGlobalLock) {
mTaskSupervisor.initPowerManagement();
final PowerManager pm = (PowerManager) mContext.getSystemService(Context.POWER_SERVICE);
mPowerManagerInternal = LocalServices.getService(PowerManagerInternal.class);
mVoiceWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "*voice*");
mVoiceWakeLock.setReferenceCounted(false);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onInitPowerManagement
File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40094
|
HIGH
| 7.8
|
android
|
onInitPowerManagement
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int describeContents() {
return 0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: describeContents
File: core/java/android/service/gatekeeper/GateKeeperResponse.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2017-0806
|
HIGH
| 9.3
|
android
|
describeContents
|
core/java/android/service/gatekeeper/GateKeeperResponse.java
|
b87c968e5a41a1a09166199bf54eee12608f3900
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Connector getConnector() {
return connector;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getConnector
File: activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
Repository: apache/activemq
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-3576
|
MEDIUM
| 5
|
apache/activemq
|
getConnector
|
activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
|
00921f2
| 0
|
Analyze the following code function for security vulnerabilities
|
private Object readObject(boolean unshared) throws OptionalDataException,
ClassNotFoundException, IOException {
boolean restoreInput = (primitiveData == input);
if (restoreInput) {
primitiveData = emptyStream;
}
// This is the spec'ed behavior in JDK 1.2. Very bizarre way to allow
// behavior overriding.
if (subclassOverridingImplementation && !unshared) {
return readObjectOverride();
}
// If we still had primitive types to read, should we discard them
// (reset the primitiveTypes stream) or leave as is, so that attempts to
// read primitive types won't read 'past data' ???
Object result;
try {
// We need this so we can tell when we are returning to the
// original/outside caller
if (++nestedLevels == 1) {
// Remember the caller's class loader
callerClassLoader = VMStack.getClosestUserClassLoader(bootstrapLoader, systemLoader);
}
result = readNonPrimitiveContent(unshared);
if (restoreInput) {
primitiveData = input;
}
} finally {
// We need this so we can tell when we are returning to the
// original/outside caller
if (--nestedLevels == 0) {
// We are going to return to the original caller, perform
// cleanups.
// No more need to remember the caller's class loader
callerClassLoader = null;
}
}
// Done reading this object. Is it time to return to the original
// caller? If so we need to perform validations first.
if (nestedLevels == 0 && validations != null) {
// We are going to return to the original caller. If validation is
// enabled we need to run them now and then cleanup the validation
// collection
try {
for (InputValidationDesc element : validations) {
element.validator.validateObject();
}
} finally {
// Validations have to be renewed, since they are only called
// from readObject
validations = null;
}
}
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readObject
File: luni/src/main/java/java/io/ObjectInputStream.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-7911
|
HIGH
| 7.2
|
android
|
readObject
|
luni/src/main/java/java/io/ObjectInputStream.java
|
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean collectionIsAllStrings(Object collection) {
if (collection instanceof Collection) {
return ((Collection<Object>) collection).stream().allMatch(o -> o instanceof String);
} else {
return false;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: collectionIsAllStrings
File: src/main/java/apoc/load/Xml.java
Repository: neo4j-contrib/neo4j-apoc-procedures
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000820
|
HIGH
| 7.5
|
neo4j-contrib/neo4j-apoc-procedures
|
collectionIsAllStrings
|
src/main/java/apoc/load/Xml.java
|
45bc09c8bd7f17283e2a7e85ce3f02cb4be4fd1a
| 0
|
Analyze the following code function for security vulnerabilities
|
protected synchronized void setStarting(boolean starting) {
this.starting = starting;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setStarting
File: activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
Repository: apache/activemq
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-3576
|
MEDIUM
| 5
|
apache/activemq
|
setStarting
|
activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
|
00921f2
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.