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
|
public ViewPage createPageWithAttachment(String space, String page, String content, String title, String syntaxId,
String parentFullPageName, String attachmentName, InputStream attachmentData) throws Exception
{
return createPageWithAttachment(space, page, content, title, syntaxId, parentFullPageName, attachmentName,
attachmentData, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createPageWithAttachment
File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2023-35166
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
createPageWithAttachment
|
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
|
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
| 0
|
Analyze the following code function for security vulnerabilities
|
private OsInfo getBaselineOsInfo(Collection<NodeSelectorEntry> nodeSelector, TaskLogger jobLogger) {
Commandline kubectl = newKubeCtl();
kubectl.addArgs("get", "nodes", "-o", "jsonpath={range .items[*]}{.status.nodeInfo.operatingSystem} {.status.nodeInfo.kernelVersion} {.status.nodeInfo.architecture} {.spec.unschedulable}{'|'}{end}");
for (NodeSelectorEntry entry: nodeSelector)
kubectl.addArgs("-l", entry.getLabelName() + "=" + entry.getLabelValue());
Collection<OsInfo> osInfos = new ArrayList<>();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
kubectl.execute(baos, new LineConsumer() {
@Override
public void consume(String line) {
jobLogger.error("Kubernetes: " + line);
}
}).checkReturnCode();
for (String osInfoString: Splitter.on('|').trimResults().omitEmptyStrings().splitToList(baos.toString())) {
osInfoString = osInfoString.replace('\n', ' ').replace('\r', ' ');
List<String> fields = Splitter.on(' ').omitEmptyStrings().trimResults().splitToList(osInfoString);
if (fields.size() == 3 || fields.get(3).equals("false")) {
String osName = WordUtils.capitalize(fields.get(0));
String osVersion = fields.get(1);
if (osName.equals("Windows"))
osVersion = StringUtils.substringBeforeLast(osVersion, ".");
osInfos.add(new OsInfo(osName, osVersion, fields.get(2)));
}
}
if (!osInfos.isEmpty()) {
return OsInfo.getBaseline(osInfos);
} else {
throw new ExplicitException("No applicable working nodes found");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getBaselineOsInfo
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
|
getBaselineOsInfo
|
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
|
private List<ParameterValue> getDefaultParametersValues() {
ParametersDefinitionProperty paramDefProp = getProperty(ParametersDefinitionProperty.class);
ArrayList<ParameterValue> defValues = new ArrayList<ParameterValue>();
/*
* This check is made ONLY if someone will call this method even if isParametrized() is false.
*/
if(paramDefProp == null)
return defValues;
/* Scan for all parameter with an associated default values */
for(ParameterDefinition paramDefinition : paramDefProp.getParameterDefinitions())
{
ParameterValue defaultValue = paramDefinition.getDefaultParameterValue();
if(defaultValue != null)
defValues.add(defaultValue);
}
return defValues;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDefaultParametersValues
File: core/src/main/java/hudson/model/AbstractProject.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
getDefaultParametersValues
|
core/src/main/java/hudson/model/AbstractProject.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
public void appendMethods(StringBuffer buffer, int index, String type,
@Nullable Serializable choiceProvider, @Nullable Serializable defaultValueProvider) {
String literalBytes = getLiteral(SerializationUtils.serialize(defaultValueProvider));
buffer.append(" public " + type + " getInput" + index + "() {\n");
buffer.append(" if (input" + index + "!=null) {\n");
buffer.append(" return input" + index + ".orNull();\n");
buffer.append(" } else {\n");
if (defaultValueProvider != null) {
wrapWithChildContext(buffer, index, "return SerializationUtils.deserialize(" + literalBytes + ").getDefaultValue();");
} else {
buffer.append(" return null;\n");
}
buffer.append(" }\n");
buffer.append(" }\n");
buffer.append("\n");
buffer.append(" public void setInput" + index + "(" + type + " value) {\n");
buffer.append(" this.input" + index + "=Optional.fromNullable(value);\n");
buffer.append(" }\n");
buffer.append("\n");
if (showCondition != null) {
buffer.append(" private static boolean isInput" + index + "Visible() {\n");
literalBytes = getLiteral(SerializationUtils.serialize(showCondition));
buffer.append(" return SerializationUtils.deserialize(" + literalBytes + ").isVisible();\n");
buffer.append(" }\n");
buffer.append("\n");
}
if (choiceProvider != null) {
buffer.append(" private static List getInput" + index + "Choices() {\n");
literalBytes = getLiteral(SerializationUtils.serialize(choiceProvider));
if (choiceProvider instanceof io.onedev.server.model.support.inputspec.choiceinput.choiceprovider.ChoiceProvider) {
buffer.append(" return new ArrayList(SerializationUtils.deserialize(" + literalBytes + ").getChoices(false).keySet());\n");
} else {
buffer.append(" return SerializationUtils.deserialize(" + literalBytes + ").getChoices(false);\n");
}
buffer.append(" }\n");
buffer.append("\n");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: appendMethods
File: server-core/src/main/java/io/onedev/server/model/support/inputspec/InputSpec.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2021-21248
|
MEDIUM
| 6.5
|
theonedev/onedev
|
appendMethods
|
server-core/src/main/java/io/onedev/server/model/support/inputspec/InputSpec.java
|
39d95ab8122c5d9ed18e69dc024870cae08d2d60
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean launchAssistIntent(Intent intent, int requestType, String hint, int userHandle,
Bundle args) {
return enqueueAssistContext(requestType, intent, hint, null, null, null,
true /* focused */, true /* newSessionId */,
userHandle, args, PENDING_ASSIST_EXTRAS_TIMEOUT) != null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: launchAssistIntent
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3912
|
HIGH
| 9.3
|
android
|
launchAssistIntent
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Collection<XWikiAttachment> getUploadedAttachments(DocumentReference documentReference)
{
TemporaryAttachmentSession temporaryAttachmentSession = getOrCreateSession();
return temporaryAttachmentSession.getAttachments(documentReference);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUploadedAttachments
File: xwiki-platform-core/xwiki-platform-store/xwiki-platform-store-filesystem-oldcore/src/main/java/org/xwiki/store/filesystem/internal/DefaultTemporaryAttachmentSessionsManager.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-749"
] |
CVE-2023-26478
|
HIGH
| 8.1
|
xwiki/xwiki-platform
|
getUploadedAttachments
|
xwiki-platform-core/xwiki-platform-store/xwiki-platform-store-filesystem-oldcore/src/main/java/org/xwiki/store/filesystem/internal/DefaultTemporaryAttachmentSessionsManager.java
|
3c73c59e39b6436b1074d8834cf276916010014d
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequiresFeature(PackageManager.FEATURE_SECURE_LOCK_SCREEN)
public int getProfileWithMinimumFailedPasswordsForWipe(int userHandle) {
if (mService != null) {
try {
return mService.getProfileWithMinimumFailedPasswordsForWipe(
userHandle, mParentInstance);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
return UserHandle.USER_NULL;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProfileWithMinimumFailedPasswordsForWipe
File: core/java/android/app/admin/DevicePolicyManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
getProfileWithMinimumFailedPasswordsForWipe
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public FormValidation doCheckExcludedCommitMessages(@QueryParameter String value) throws IOException, ServletException {
for (String message : Util.fixNull(value).trim().split("[\\r\\n]+")) {
try {
Pattern.compile(message);
} catch (PatternSyntaxException e) {
return FormValidation.error("Invalid regular expression. " + e.getMessage());
}
}
return FormValidation.ok();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doCheckExcludedCommitMessages
File: src/main/java/hudson/scm/SubversionSCM.java
Repository: jenkinsci/subversion-plugin
The code follows secure coding practices.
|
[
"CWE-255"
] |
CVE-2013-6372
|
LOW
| 2.1
|
jenkinsci/subversion-plugin
|
doCheckExcludedCommitMessages
|
src/main/java/hudson/scm/SubversionSCM.java
|
7d4562d6f7e40de04bbe29577b51c79f07d05ba6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated(since = "2.3M1")
public void setSyntaxId(String syntaxId)
{
Syntax syntax;
// In order to preserve backward-compatibility with previous versions of XWiki in which the notion of Syntax Id
// did not exist, we check the passed syntaxId parameter. Since this parameter comes from the database (it's
// called automatically by Hibernate) it can be NULL or empty. In this case we consider the document is in
// syntax/1.0 syntax.
if (StringUtils.isBlank(syntaxId)) {
syntax = Syntax.XWIKI_1_0;
} else {
syntax = resolveSyntax(syntaxId);
}
setSyntax(syntax);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSyntaxId
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
|
setSyntaxId
|
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
|
private FlowNode getFlowNode(Definitions def, String nodeId) {
List<RootElement> rootElements = def.getRootElements();
for(RootElement root : rootElements) {
if(root instanceof Process) {
Process process = (Process) root;
List<FlowElement> flowElements = process.getFlowElements();
for(FlowElement fe : flowElements) {
if(fe instanceof FlowNode) {
if(fe.getId().equals(nodeId)) {
return (FlowNode) fe;
}
}
}
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFlowNode
File: jbpm-designer-backend/src/main/java/org/jbpm/designer/web/server/TransformerServlet.java
Repository: kiegroup/jbpm-designer
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2017-7545
|
MEDIUM
| 4
|
kiegroup/jbpm-designer
|
getFlowNode
|
jbpm-designer-backend/src/main/java/org/jbpm/designer/web/server/TransformerServlet.java
|
a143f3b92a6a5a527d929d68c02a0c5d914ab81d
| 0
|
Analyze the following code function for security vulnerabilities
|
private UserInfo getProfileParent(int userId) {
final long identity = Binder.clearCallingIdentity();
try {
return sUserManager.getProfileParent(userId);
} finally {
Binder.restoreCallingIdentity(identity);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProfileParent
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
|
getProfileParent
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
public CharSequence getSender() {
return mSender == null ? null : mSender.getName();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSender
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
getSender
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String xmlToJavaName(final String name) {
String javaRefName = xmlRefToJavaName(name);
if (javaRefName != null) {
return javaRefName;
}
final StringBuilder builder = new StringBuilder();
final char[] charArray = name.toCharArray();
boolean dash = false;
final StringBuilder token = new StringBuilder();
for (char aCharArray : charArray) {
if (aCharArray == '-') {
appendToken(builder, token);
dash = true;
continue;
}
token.append(dash ? Character.toUpperCase(aCharArray) : aCharArray);
dash = false;
}
appendToken(builder, token);
return builder.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: xmlToJavaName
File: hazelcast/src/main/java/com/hazelcast/config/AbstractXmlConfigHelper.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
xmlToJavaName
|
hazelcast/src/main/java/com/hazelcast/config/AbstractXmlConfigHelper.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String shortClassName(Object ov) {
String cnm = ov.getClass().getName();
cnm = cnm.substring(cnm.lastIndexOf(".") + 1, cnm.length());
return cnm;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: shortClassName
File: src/main/java/org/lemsml/jlems/io/util/JUtil.java
Repository: LEMS/jLEMS
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-4583
|
HIGH
| 8.8
|
LEMS/jLEMS
|
shortClassName
|
src/main/java/org/lemsml/jlems/io/util/JUtil.java
|
8c224637d7d561076364a9e3c2c375daeaf463dc
| 0
|
Analyze the following code function for security vulnerabilities
|
public void addViolation(String propertyName, String key, String message) {
violationOccurred = true;
String messageTemplate = escapeEl(message);
context.buildConstraintViolationWithTemplate(messageTemplate)
.addPropertyNode(propertyName)
.addBeanNode().inIterable().atKey(key)
.addConstraintViolation();
}
|
Vulnerability Classification:
- CWE: CWE-74
- CVE: CVE-2020-11002
- Severity: HIGH
- CVSS Score: 9.0
Description: Disable message interpolation in ConstraintViolations by default (#3208)
Disable message interpolation in ConstraintViolations by default but allow enabling it explicitly with `SelfValidating#escapeExpressions()`.
Additionally, `ConstraintViolations` now provides a set of methods which take a map of message parameters for interpolation.
The message parameters will be escaped by default.
Refs #3153
Refs #3157
Function: addViolation
File: dropwizard-validation/src/main/java/io/dropwizard/validation/selfvalidating/ViolationCollector.java
Repository: dropwizard
Fixed Code:
public void addViolation(String propertyName, String key, String message) {
addViolation(propertyName, key, message, Collections.emptyMap());
}
|
[
"CWE-74"
] |
CVE-2020-11002
|
HIGH
| 9
|
dropwizard
|
addViolation
|
dropwizard-validation/src/main/java/io/dropwizard/validation/selfvalidating/ViolationCollector.java
|
d5a512f7abf965275f2a6b913ac4fe778e424242
| 1
|
Analyze the following code function for security vulnerabilities
|
public Map<String, ?> toQueryParameters(String className, Integer objectNumber, Object... properties)
{
Map<String, Object> queryParameters = new HashMap<String, Object>();
queryParameters.put("classname", className);
for (int i = 0; i < properties.length; i += 2) {
int nextIndex = i + 1;
queryParameters.put(toQueryParameterKey(className, objectNumber, (String) properties[i]),
nextIndex < properties.length ? properties[nextIndex] : null);
}
return queryParameters;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toQueryParameters
File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2023-35166
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
toQueryParameters
|
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
|
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String escapeForLike(@NonNull String arg) {
// Shamelessly borrowed from com.android.providers.media.util.DatabaseUtils
final StringBuilder sb = new StringBuilder();
for (int i = 0; i < arg.length(); i++) {
final char c = arg.charAt(i);
switch (c) {
case '%': sb.append('\\');
break;
case '_': sb.append('\\');
break;
}
sb.append(c);
}
return sb.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: escapeForLike
File: core/java/android/database/DatabaseUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2023-40121
|
MEDIUM
| 5.5
|
android
|
escapeForLike
|
core/java/android/database/DatabaseUtils.java
|
3287ac2d2565dc96bf6177967f8e3aed33954253
| 0
|
Analyze the following code function for security vulnerabilities
|
private void logPasswordComplexityRequiredIfSecurityLogEnabled(ComponentName who, int userId,
boolean parent, int complexity) {
if (SecurityLog.isLoggingEnabled()) {
final int affectedUserId = parent ? getProfileParentId(userId) : userId;
SecurityLog.writeEvent(SecurityLog.TAG_PASSWORD_COMPLEXITY_REQUIRED,
who.getPackageName(), userId, affectedUserId, complexity);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: logPasswordComplexityRequiredIfSecurityLogEnabled
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
|
logPasswordComplexityRequiredIfSecurityLogEnabled
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void setupSecurity() {
if (securityMapper == null) {
return;
}
addPermission(AnyTypePermission.ANY);
denyTypes(new String[]{"java.beans.EventHandler"});
denyTypesByRegExp(new Pattern[]{LAZY_ITERATORS, JAVAX_CRYPTO});
allowTypeHierarchy(Exception.class);
securityInitialized = false;
}
|
Vulnerability Classification:
- CWE: CWE-78
- CVE: CVE-2020-26217
- Severity: HIGH
- CVSS Score: 9.3
Description: Fix for CVE-2017-9805.
Function: setupSecurity
File: xstream/src/java/com/thoughtworks/xstream/XStream.java
Repository: x-stream/xstream
Fixed Code:
protected void setupSecurity() {
if (securityMapper == null) {
return;
}
addPermission(AnyTypePermission.ANY);
denyTypes(new String[]{"java.beans.EventHandler", "javax.imageio.ImageIO$ContainsFilter"});
denyTypesByRegExp(new Pattern[]{LAZY_ITERATORS, JAVAX_CRYPTO});
allowTypeHierarchy(Exception.class);
securityInitialized = false;
}
|
[
"CWE-78"
] |
CVE-2020-26217
|
HIGH
| 9.3
|
x-stream/xstream
|
setupSecurity
|
xstream/src/java/com/thoughtworks/xstream/XStream.java
|
0fec095d534126931c99fd38e9c6d41f5c685c1a
| 1
|
Analyze the following code function for security vulnerabilities
|
public static ProfileAttribute fromXML(String xml) throws Exception {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.parse(new InputSource(new StringReader(xml)));
Element accountElement = document.getDocumentElement();
return fromDOM(accountElement);
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2022-2414
- Severity: HIGH
- CVSS Score: 7.5
Description: Disable access to external entities when parsing XML
This reduces the vulnerability of XML parsers to XXE (XML external
entity) injection.
The best way to prevent XXE is to stop using XML altogether, which we do
plan to do. Until that happens I consider it worthwhile to tighten the
security here though.
Function: fromXML
File: base/common/src/main/java/com/netscape/certsrv/profile/ProfileAttribute.java
Repository: dogtagpki/pki
Fixed Code:
public static ProfileAttribute fromXML(String xml) throws Exception {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.parse(new InputSource(new StringReader(xml)));
Element accountElement = document.getDocumentElement();
return fromDOM(accountElement);
}
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
fromXML
|
base/common/src/main/java/com/netscape/certsrv/profile/ProfileAttribute.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 1
|
Analyze the following code function for security vulnerabilities
|
private void intsAsString(SQLRowStream sqlRowStream, Handler<AsyncResult<String>> replyHandler) {
StringBuilder s = new StringBuilder();
sqlRowStream.handler(row -> {
if (s.length() > 0) {
s.append(", ");
}
s.append(row.getInteger(0));
}).exceptionHandler(e -> {
replyHandler.handle(Future.failedFuture(e));
}).close(close -> {
replyHandler.handle(Future.succeededFuture(s.toString()));
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: intsAsString
File: domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
intsAsString
|
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
private static String sanitizeInput(String theString) {
String retVal = theString;
if (retVal != null) {
for (int i = 0; i < retVal.length(); i++) {
char nextChar = retVal.charAt(i);
switch (nextChar) {
case '\'':
case '"':
case '<':
case '>':
case '&':
case '/':
retVal = retVal.replace(nextChar, '_');
}
}
}
return retVal;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sanitizeInput
File: hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/BaseController.java
Repository: hapifhir/hapi-fhir
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-24301
|
MEDIUM
| 4.3
|
hapifhir/hapi-fhir
|
sanitizeInput
|
hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/BaseController.java
|
adb3734fcbbf9a9165445e9ee5eef168dbcaedaf
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getMD5Hex() {
return SignatureUtils.getMD5Hex(svg);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMD5Hex
File: src/net/sourceforge/plantuml/ugraphic/UImageSvg.java
Repository: plantuml
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-1231
|
MEDIUM
| 4.3
|
plantuml
|
getMD5Hex
|
src/net/sourceforge/plantuml/ugraphic/UImageSvg.java
|
c9137be051ce98b3e3e27f65f54ec7d9f8886903
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("javadoc")
public int computeVerticalScrollExtent() {
return mRenderCoordinates.getLastFrameViewportHeightPixInt();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: computeVerticalScrollExtent
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
computeVerticalScrollExtent
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
public DefaultRequest toJobRequest(JobRequest restJobRequest)
{
DefaultRequest request = new DefaultRequest();
if (restJobRequest.getId() != null) {
request.setId(restJobRequest.getId().getElements());
}
request.setInteractive(restJobRequest.isInteractive());
request.setVerbose(restJobRequest.isVerbose());
request.setStatusSerialized(restJobRequest.isStatusSerialized());
request.setStatusLogIsolated(restJobRequest.isStatusLogIsolated());
for (MapEntry restEntry : restJobRequest.getProperties()) {
request.setProperty(restEntry.getKey(), this.jaxbConverter.unserializeAny(restEntry.getValue()));
}
return request;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toJobRequest
File: xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-server/src/main/java/org/xwiki/rest/internal/ModelFactory.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2023-35151
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
toJobRequest
|
xwiki-platform-core/xwiki-platform-rest/xwiki-platform-rest-server/src/main/java/org/xwiki/rest/internal/ModelFactory.java
|
824cd742ecf5439971247da11bfe7e0ad2b10ede
| 0
|
Analyze the following code function for security vulnerabilities
|
private static int hashCodeAsciiSanitizeShort(CharSequence value, int offset) {
if (BIG_ENDIAN_NATIVE_ORDER) {
// mimic a unsafe.getShort call on a big endian machine
return (value.charAt(offset + 1) & 0x1f) |
(value.charAt(offset) & 0x1f) << 8;
}
return (value.charAt(offset + 1) & 0x1f) << 8 |
(value.charAt(offset) & 0x1f);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hashCodeAsciiSanitizeShort
File: common/src/main/java/io/netty/util/internal/PlatformDependent.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-668",
"CWE-378",
"CWE-379"
] |
CVE-2022-24823
|
LOW
| 1.9
|
netty
|
hashCodeAsciiSanitizeShort
|
common/src/main/java/io/netty/util/internal/PlatformDependent.java
|
185f8b2756a36aaa4f973f1a2a025e7d981823f1
| 0
|
Analyze the following code function for security vulnerabilities
|
private MergeManager getMergeManager()
{
if (this.mergeManager == null) {
this.mergeManager = Utils.getComponent(MergeManager.class);
}
return this.mergeManager;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMergeManager
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/SaveAction.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2022-23617
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
getMergeManager
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/SaveAction.java
|
30c52b01559b8ef5ed1035dac7c34aaf805764d5
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setToLong(long n) {
setBcdToZero();
flags = 0;
if (n < 0) {
flags |= NEGATIVE_FLAG;
n = -n;
}
if (n != 0) {
_setToLong(n);
compact();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setToLong
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
|
setToLong
|
icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_AbstractBCD.java
|
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
| 0
|
Analyze the following code function for security vulnerabilities
|
public void writeBool(boolean b) throws TException {
if (booleanField_ != null) {
// we haven't written the field header yet
writeFieldBeginInternal(booleanField_, b ? Types.BOOLEAN_TRUE : Types.BOOLEAN_FALSE);
booleanField_ = null;
} else {
// we're not part of a field, so just write the value.
writeByteDirect(b ? Types.BOOLEAN_TRUE : Types.BOOLEAN_FALSE);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeBool
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
|
writeBool
|
thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java
|
08c2d412adb214c40bb03be7587057b25d053030
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String getMockData(String path) throws IOException {
try (InputStream resourceAsStream = PostgresClientIT.class.getClassLoader().getResourceAsStream(path)) {
if (resourceAsStream != null) {
return IOUtils.toString(resourceAsStream, StandardCharsets.UTF_8);
} else {
StringBuilder sb = new StringBuilder();
try (Stream<String> lines = Files.lines(Paths.get(path))) {
lines.forEach(sb::append);
}
return sb.toString();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMockData
File: domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
getMockData
|
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean isInRootTaskLocked() {
final Task rootTask = getRootTask();
return rootTask != null && rootTask.isInTask(this) != null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isInRootTaskLocked
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
|
isInRootTaskLocked
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void installNotificationActionCategories(PushActionsProvider provider) throws IOException {
// Assume that CN1 is running... this will run when the app starts
// up
Context context = getContext();
boolean requiresUpdate = false;
File categoriesFile = new File(activity.getFilesDir().getAbsolutePath() + "/" + FILE_NAME_NOTIFICATION_CATEGORIES);
if (!categoriesFile.exists()) {
requiresUpdate = true;
}
if (!requiresUpdate) {
try {
PackageInfo packageInfo = context.getPackageManager().getPackageInfo(context.getApplicationContext().getPackageName(), PackageManager.GET_PERMISSIONS);
if (packageInfo.lastUpdateTime > categoriesFile.lastModified()) {
requiresUpdate = true;
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
if (!requiresUpdate) {
return;
}
OutputStream os = getContext().openFileOutput(FILE_NAME_NOTIFICATION_CATEGORIES, 0);
PushActionCategory[] categories = provider.getPushActionCategories();
javax.xml.parsers.DocumentBuilderFactory docFactory = javax.xml.parsers.DocumentBuilderFactory.newInstance();
javax.xml.parsers.DocumentBuilder docBuilder;
try {
docBuilder = docFactory.newDocumentBuilder();
} catch (ParserConfigurationException ex) {
Logger.getLogger(AndroidImplementation.class.getName()).log(Level.SEVERE, null, ex);
throw new IOException("Faield to create document builder for creating notification categories XML document", ex);
}
// root elements
org.w3c.dom.Document doc = docBuilder.newDocument();
org.w3c.dom.Element root = (org.w3c.dom.Element)doc.createElement("categories");
doc.appendChild(root);
for (PushActionCategory category : categories) {
org.w3c.dom.Element categoryEl = (org.w3c.dom.Element)doc.createElement("category");
org.w3c.dom.Attr idAttr = doc.createAttribute("id");
idAttr.setValue(category.getId());
categoryEl.setAttributeNode(idAttr);
for (PushAction action : category.getActions()) {
org.w3c.dom.Element actionEl = (org.w3c.dom.Element)doc.createElement("action");
org.w3c.dom.Attr actionIdAttr = doc.createAttribute("id");
actionIdAttr.setValue(action.getId());
actionEl.setAttributeNode(actionIdAttr);
org.w3c.dom.Attr actionTitleAttr = doc.createAttribute("title");
if (action.getTitle() != null) {
actionTitleAttr.setValue(action.getTitle());
} else {
actionTitleAttr.setValue(action.getId());
}
actionEl.setAttributeNode(actionTitleAttr);
if (action.getIcon() != null) {
org.w3c.dom.Attr actionIconAttr = doc.createAttribute("icon");
String iconVal = action.getIcon();
try {
// We'll store the resource IDs for the icon
// rather than the icon name because that is what
// the push notifications require.
iconVal = ""+context.getResources().getIdentifier(iconVal, "drawable", context.getPackageName());
actionIconAttr.setValue(iconVal);
actionEl.setAttributeNode(actionIconAttr);
} catch (Exception ex) {
ex.printStackTrace();
}
}
if (action.getTextInputPlaceholder() != null) {
org.w3c.dom.Attr textInputPlaceholderAttr = doc.createAttribute("textInputPlaceholder");
textInputPlaceholderAttr.setValue(action.getTextInputPlaceholder());
actionEl.setAttributeNode(textInputPlaceholderAttr);
}
if (action.getTextInputButtonText() != null) {
org.w3c.dom.Attr textInputButtonTextAttr = doc.createAttribute("textInputButtonText");
textInputButtonTextAttr.setValue(action.getTextInputButtonText());
actionEl.setAttributeNode(textInputButtonTextAttr);
}
categoryEl.appendChild(actionEl);
}
root.appendChild(categoryEl);
}
try {
javax.xml.transform.TransformerFactory transformerFactory = javax.xml.transform.TransformerFactory.newInstance();
javax.xml.transform.Transformer transformer = transformerFactory.newTransformer();
javax.xml.transform.dom.DOMSource source = new javax.xml.transform.dom.DOMSource(doc);
javax.xml.transform.stream.StreamResult result = new javax.xml.transform.stream.StreamResult(os);
transformer.transform(source, result);
} catch (Exception ex) {
throw new IOException("Failed to save notification categories as XML.", ex);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: installNotificationActionCategories
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
|
installNotificationActionCategories
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<com.sk89q.worldedit.entity.Entity> getEntities() {
List<com.sk89q.worldedit.entity.Entity> list = new ArrayList<>();
List<Entity> ents = TaskManager.taskManager().sync(getWorld()::getEntities);
for (Entity entity : ents) {
list.add(BukkitAdapter.adapt(entity));
}
return list;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getEntities
File: worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java
Repository: IntellectualSites/FastAsyncWorldEdit
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-35925
|
MEDIUM
| 5.5
|
IntellectualSites/FastAsyncWorldEdit
|
getEntities
|
worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitWorld.java
|
3a8dfb4f7b858a439c35f7af1d56d21f796f61f5
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean tryBindTransport(ServiceInfo info) {
try {
PackageInfo packInfo = mPackageManager.getPackageInfo(info.packageName, 0);
if ((packInfo.applicationInfo.privateFlags & ApplicationInfo.PRIVATE_FLAG_PRIVILEGED)
!= 0) {
return bindTransport(info);
} else {
Slog.w(TAG, "Transport package " + info.packageName + " not privileged");
}
} catch (NameNotFoundException e) {
Slog.w(TAG, "Problem resolving transport package " + info.packageName);
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: tryBindTransport
File: services/backup/java/com/android/server/backup/BackupManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3759
|
MEDIUM
| 5
|
android
|
tryBindTransport
|
services/backup/java/com/android/server/backup/BackupManagerService.java
|
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void removePacketSendingListener(StanzaListener packetListener) {
synchronized (sendListeners) {
sendListeners.remove(packetListener);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removePacketSendingListener
File: smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
Repository: igniterealtime/Smack
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2016-10027
|
MEDIUM
| 4.3
|
igniterealtime/Smack
|
removePacketSendingListener
|
smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
|
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
| 0
|
Analyze the following code function for security vulnerabilities
|
public Sysprop buildSpaceObject(String space) {
space = Utils.abbreviate(space, 255);
space = space.replaceAll(Para.getConfig().separator(), "");
String spaceId = getSpaceId(Utils.noSpaces(Utils.stripAndTrim(space, " "), "-"));
Sysprop s = new Sysprop(spaceId);
s.setType("scooldspace");
s.setName(space);
return s;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: buildSpaceObject
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
|
buildSpaceObject
|
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions,
@NonNull int[] grantResults) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
EffortlessPermissions.onRequestPermissionsResult(requestCode, permissions, grantResults,
this);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onRequestPermissionsResult
File: app/src/main/java/com/nextcloud/talk/activities/CallActivity.java
Repository: nextcloud/talk-android
The code follows secure coding practices.
|
[
"CWE-732",
"CWE-200"
] |
CVE-2022-41926
|
MEDIUM
| 5.5
|
nextcloud/talk-android
|
onRequestPermissionsResult
|
app/src/main/java/com/nextcloud/talk/activities/CallActivity.java
|
bb7e82fbcbd8c10d0d0128d736c41cec0f79e7d0
| 0
|
Analyze the following code function for security vulnerabilities
|
public static File createTempDir() throws IOException {
File tmpFile = File.createTempFile("okm", null);
if (!tmpFile.delete())
throw new IOException();
if (!tmpFile.mkdir())
throw new IOException();
return tmpFile;
}
|
Vulnerability Classification:
- CWE: CWE-377
- CVE: CVE-2022-3969
- Severity: MEDIUM
- CVSS Score: 5.5
Description: Fix Temporary Directory Hijacking or Information Disclosure Vulnerability
fix #332
Function: createTempDir
File: src/main/java/com/openkm/util/FileUtils.java
Repository: openkm/document-management-system
Fixed Code:
public static File createTempDir() throws IOException {
return Files.createTempDirectory("okm").toFile();
}
|
[
"CWE-377"
] |
CVE-2022-3969
|
MEDIUM
| 5.5
|
openkm/document-management-system
|
createTempDir
|
src/main/java/com/openkm/util/FileUtils.java
|
c069e4d73ab8864345c25119d8459495f45453e1
| 1
|
Analyze the following code function for security vulnerabilities
|
public String toXMLString() throws TransformerConfigurationException, TransformerException {
TransformerFactory tranFactory = TransformerFactory.newInstance();
Transformer transformer = tranFactory.newTransformer();
Source src = new DOMSource(mDoc);
StreamResult dest = new StreamResult(new StringWriter());
transformer.transform(src, dest);
String xmlString = dest.getWriter().toString();
return xmlString;
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2022-2414
- Severity: HIGH
- CVSS Score: 7.5
Description: Disable access to external entities when parsing XML
This reduces the vulnerability of XML parsers to XXE (XML external
entity) injection.
The best way to prevent XXE is to stop using XML altogether, which we do
plan to do. Until that happens I consider it worthwhile to tighten the
security here though.
Function: toXMLString
File: base/util/src/main/java/com/netscape/cmsutil/xml/XMLObject.java
Repository: dogtagpki/pki
Fixed Code:
public String toXMLString() throws TransformerConfigurationException, TransformerException {
TransformerFactory tranFactory = TransformerFactory.newInstance();
tranFactory.setAttribute(XMLConstants.ACCESS_EXTERNAL_DTD, "");
tranFactory.setAttribute(XMLConstants.ACCESS_EXTERNAL_STYLESHEET, "");
Transformer transformer = tranFactory.newTransformer();
Source src = new DOMSource(mDoc);
StreamResult dest = new StreamResult(new StringWriter());
transformer.transform(src, dest);
String xmlString = dest.getWriter().toString();
return xmlString;
}
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
toXMLString
|
base/util/src/main/java/com/netscape/cmsutil/xml/XMLObject.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public Date getDate()
{
if (this.updateDate == null) {
return new Date();
} else {
return this.updateDate;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDate
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
|
getDate
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
public UpdateRecordResponse delete(Object logId) {
if (logId != null) {
Log log = new Log().adminFindLogByLogId(logId);
if (log != null && StringUtils.isNotEmpty(log.get("keywords"))) {
new Tag().refreshTag();
}
new Log().deleteById(logId);
}
return new UpdateRecordResponse();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: delete
File: service/src/main/java/com/zrlog/service/ArticleService.java
Repository: 94fzb/zrlog
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-16643
|
LOW
| 3.5
|
94fzb/zrlog
|
delete
|
service/src/main/java/com/zrlog/service/ArticleService.java
|
4a91c83af669e31a22297c14f089d8911d353fa1
| 0
|
Analyze the following code function for security vulnerabilities
|
static boolean scanForSystemHints(final Map<RenderingHints.Key, Object> hints) {
boolean changed = false;
for (final Map.Entry<String, RenderingHints.Key> entry : BINDINGS.entrySet()) {
final String propertyKey = entry.getKey();
final String property;
try {
property = System.getProperty(propertyKey);
if (property == null) {
continue;
}
} catch (SecurityException e) {
unexpectedException(e);
continue;
}
/*
* Converts the system property value from String to Object (java.lang.Boolean
* or java.lang.Number). We perform this conversion only if the key is exactly
* of kind Hints.Key, not a subclass like ClassKey, in order to avoid useless
* class loading on 'getValueClass()' method invocation (ClassKey don't make
* sense for Boolean and Number, which are the only types that we convert here).
*/
Object value = property;
final RenderingHints.Key hintKey = entry.getValue();
if (hintKey.getClass().equals(Hints.Key.class)) {
final Class<?> type = ((Hints.Key) hintKey).getValueClass();
if (type.equals(Boolean.class)) {
value = Boolean.valueOf(property);
} else if (Number.class.isAssignableFrom(type))
try {
value = Classes.valueOf(type, property);
} catch (NumberFormatException e) {
unexpectedException(e);
continue;
}
}
final Object old;
try {
old = hints.put(hintKey, value);
} catch (IllegalArgumentException e) {
// The property value is illegal for this hint.
unexpectedException(e);
continue;
}
changed = changed || !Utilities.equals(old, value);
}
return changed;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: scanForSystemHints
File: modules/library/metadata/src/main/java/org/geotools/util/factory/GeoTools.java
Repository: geotools
The code follows secure coding practices.
|
[
"CWE-917"
] |
CVE-2022-24818
|
HIGH
| 7.5
|
geotools
|
scanForSystemHints
|
modules/library/metadata/src/main/java/org/geotools/util/factory/GeoTools.java
|
4f70fa3234391dd0cda883a20ab0ec75688cba49
| 0
|
Analyze the following code function for security vulnerabilities
|
private void updateAssociationForApp(ApplicationInfo appInfo) {
ensureAllowedAssociations();
PackageAssociationInfo pai = mAllowedAssociations.get(appInfo.packageName);
if (pai != null) {
pai.setDebuggable((appInfo.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateAssociationForApp
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
|
updateAssociationForApp
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void handleNightlyBuild(boolean isNightlyBuild, Path baloCacheWithModulePath) {
if (isNightlyBuild) {
// If its a nightly build tag the file as a module from nightly
Path nightlyBuildMetaFile = Paths.get(baloCacheWithModulePath.toString(), "nightly.build");
if (!nightlyBuildMetaFile.toFile().exists()) {
createNightlyBuildMetaFile(nightlyBuildMetaFile);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleNightlyBuild
File: cli/ballerina-cli-module/src/main/java/org/ballerinalang/cli/module/Pull.java
Repository: ballerina-platform/ballerina-lang
The code follows secure coding practices.
|
[
"CWE-306"
] |
CVE-2021-32700
|
MEDIUM
| 5.8
|
ballerina-platform/ballerina-lang
|
handleNightlyBuild
|
cli/ballerina-cli-module/src/main/java/org/ballerinalang/cli/module/Pull.java
|
4609ffee1744ecd16aac09303b1783bf0a525816
| 0
|
Analyze the following code function for security vulnerabilities
|
@Binds
StackScrollAlgorithm.BypassController bindBypassController(
KeyguardBypassController impl);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: bindBypassController
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
|
bindBypassController
|
packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java
|
d21ffbe8a2eeb2a5e6da7efbb1a0430ba6b022e0
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void addPermissions(final PermissionCollection perms) {
Enumeration<Permission> e = perms.elements();
while (e.hasMoreElements()) {
addPermission(e.nextElement());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addPermissions
File: core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
Repository: AdoptOpenJDK/IcedTea-Web
The code follows secure coding practices.
|
[
"CWE-345",
"CWE-94",
"CWE-22"
] |
CVE-2019-10182
|
MEDIUM
| 5.8
|
AdoptOpenJDK/IcedTea-Web
|
addPermissions
|
core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
|
e0818f521a0711aeec4b913b49b5fc6a52815662
| 0
|
Analyze the following code function for security vulnerabilities
|
public XmlGenerator close() {
appendCloseNode(xml, openNodes.pollLast());
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: close
File: hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-522"
] |
CVE-2023-33264
|
MEDIUM
| 4.3
|
hazelcast
|
close
|
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
|
80a502d53cc48bf895711ab55f95e3a51e344ac1
| 0
|
Analyze the following code function for security vulnerabilities
|
public PyTorchJobSpec getSpec() {
return spec;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSpec
File: submarine-server/server-submitter/submitter-k8s/src/main/java/org/apache/submarine/server/submitter/k8s/model/pytorchjob/PyTorchJob.java
Repository: apache/submarine
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2023-46302
|
CRITICAL
| 9.8
|
apache/submarine
|
getSpec
|
submarine-server/server-submitter/submitter-k8s/src/main/java/org/apache/submarine/server/submitter/k8s/model/pytorchjob/PyTorchJob.java
|
ed5ad3b824ba388259e0d1ea137d7fca5f0c288e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onCreate(SQLiteDatabase db) {
if (LOCAL_LOGV) Log.v(LOG_TAG, "db onCreate.");
String sql = "CREATE TABLE " + APPID_TABLE_NAME + " ("
+ "id INTEGER PRIMARY KEY, "
+ "x_wap_application TEXT, "
+ "content_type TEXT, "
+ "package_name TEXT, "
+ "class_name TEXT, "
+ "app_type INTEGER, "
+ "need_signature INTEGER, "
+ "further_processing INTEGER, "
+ "install_order INTEGER "
+ ")";
if (DEBUG_SQL) Log.v(LOG_TAG, "sql: " + sql);
db.execSQL(sql);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onCreate
File: packages/WAPPushManager/src/com/android/smspush/WapPushManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2014-8507
|
HIGH
| 7.5
|
android
|
onCreate
|
packages/WAPPushManager/src/com/android/smspush/WapPushManager.java
|
48ed835468c6235905459e6ef7df032baf3e4df6
| 0
|
Analyze the following code function for security vulnerabilities
|
public static final String getClusterId() {
return clusterId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getClusterId
File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/common/constants/CmsVersion.java
Repository: sanluan/PublicCMS
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2022-29784
|
MEDIUM
| 5
|
sanluan/PublicCMS
|
getClusterId
|
publiccms-parent/publiccms-core/src/main/java/com/publiccms/common/constants/CmsVersion.java
|
d8d7626cf51e4968fb384e1637a3c0c9921f33e9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public <A extends Output<E>, E extends Exception> void append(A a, int i) throws E {
a.append(i);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: append
File: api/jstachio/src/main/java/io/jstach/jstachio/escapers/HtmlEscaper.java
Repository: jstachio
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-33962
|
MEDIUM
| 6.1
|
jstachio
|
append
|
api/jstachio/src/main/java/io/jstach/jstachio/escapers/HtmlEscaper.java
|
7b2f78377d1284df14c580be762a25af5f8dcd66
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getString(final String key) {
final List<Object> list = propertyValues.get(key);
if (list == null || list.size() != 1) {
return null;
}
return list.get(0).toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getString
File: stroom-core-server/src/main/java/stroom/importexport/server/Config.java
Repository: gchq/stroom
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000651
|
HIGH
| 7.5
|
gchq/stroom
|
getString
|
stroom-core-server/src/main/java/stroom/importexport/server/Config.java
|
ba30ffd415bd7d32ee40ba4b04035267ce80b499
| 0
|
Analyze the following code function for security vulnerabilities
|
void getBoundsByRotation(Rect outBounds, int rotation) {
final boolean rotated = (rotation == ROTATION_90 || rotation == ROTATION_270);
final int dw = rotated ? mHeight : mWidth;
final int dh = rotated ? mWidth : mHeight;
outBounds.set(0, 0, dw, dh);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getBoundsByRotation
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
|
getBoundsByRotation
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
public void updateChannel(String pkg, int uid, NotificationChannel channel) {
try {
sINM.updateNotificationChannelForPackage(pkg, uid, channel);
} catch (Exception e) {
Log.w(TAG, "Error calling NoMan", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateChannel
File: src/com/android/settings/notification/NotificationBackend.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35667
|
HIGH
| 7.8
|
android
|
updateChannel
|
src/com/android/settings/notification/NotificationBackend.java
|
d8355ac47e068ad20c6a7b1602e72f0585ec0085
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onPackageInstalled(@NonNull AndroidPackage pkg, int previousAppId,
@NonNull PackageInstalledParams params, @UserIdInt int rawUserId) {
Objects.requireNonNull(pkg, "pkg");
Objects.requireNonNull(params, "params");
Preconditions.checkArgument(rawUserId >= UserHandle.USER_SYSTEM
|| rawUserId == UserHandle.USER_ALL, "userId");
mPermissionManagerServiceImpl.onPackageInstalled(pkg, previousAppId, params, rawUserId);
final int[] userIds = rawUserId == UserHandle.USER_ALL ? getAllUserIds()
: new int[] { rawUserId };
for (final int userId : userIds) {
final int autoRevokePermissionsMode = params.getAutoRevokePermissionsMode();
if (autoRevokePermissionsMode == AppOpsManager.MODE_ALLOWED
|| autoRevokePermissionsMode == AppOpsManager.MODE_IGNORED) {
setAutoRevokeExemptedInternal(pkg,
autoRevokePermissionsMode == AppOpsManager.MODE_IGNORED, userId);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onPackageInstalled
File: services/core/java/com/android/server/pm/permission/PermissionManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-281"
] |
CVE-2023-21249
|
MEDIUM
| 5.5
|
android
|
onPackageInstalled
|
services/core/java/com/android/server/pm/permission/PermissionManagerService.java
|
c00b7e7dbc1fa30339adef693d02a51254755d7f
| 0
|
Analyze the following code function for security vulnerabilities
|
private JAXBContext createJaxbContextFromContextPath() throws JAXBException {
if (logger.isInfoEnabled()) {
logger.info("Creating JAXBContext with context path [" + this.contextPath + "]");
}
if (this.jaxbContextProperties != null) {
if (this.beanClassLoader != null) {
return JAXBContext.newInstance(this.contextPath, this.beanClassLoader, this.jaxbContextProperties);
}
else {
// analogous to the JAXBContext.newInstance(String) implementation
return JAXBContext.newInstance(this.contextPath, Thread.currentThread().getContextClassLoader(),
this.jaxbContextProperties);
}
}
else {
if (this.beanClassLoader != null) {
return JAXBContext.newInstance(this.contextPath, this.beanClassLoader);
}
else {
return JAXBContext.newInstance(this.contextPath);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createJaxbContextFromContextPath
File: spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java
Repository: spring-projects/spring-framework
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-4152
|
MEDIUM
| 6.8
|
spring-projects/spring-framework
|
createJaxbContextFromContextPath
|
spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java
|
2843b7d2ee12e3f9c458f6f816befd21b402e3b9
| 0
|
Analyze the following code function for security vulnerabilities
|
public void set(String fieldname, java.lang.Object value, Object obj)
{
if (obj == null) {
return;
}
obj.set(fieldname, value);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: set
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
|
set
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
|
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean parseBoolean(@Nullable Object value, boolean def) {
if (value instanceof Boolean) {
return (Boolean) value;
} else if (value instanceof Number) {
return ((Number) value).intValue() != 0;
} else if (value instanceof String) {
final String stringValue = ((String) value).toLowerCase(Locale.ROOT);
return (!"false".equals(stringValue) && !"0".equals(stringValue));
} else {
return def;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseBoolean
File: src/com/android/providers/media/util/DatabaseUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2023-35683
|
MEDIUM
| 5.5
|
android
|
parseBoolean
|
src/com/android/providers/media/util/DatabaseUtils.java
|
23d156ed1bed6d2c2b325f0be540d0afca510c49
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean setPasskey(BluetoothDevice device, boolean accept, int len, byte[] passkey) {
enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission");
DeviceProperties deviceProp = mRemoteDevices.getDeviceProperties(device);
if (deviceProp == null || deviceProp.getBondState() != BluetoothDevice.BOND_BONDING) {
return false;
}
byte[] addr = Utils.getBytesFromAddress(device.getAddress());
return sspReplyNative(addr, AbstractionLayer.BT_SSP_VARIANT_PASSKEY_ENTRY, accept,
Utils.byteArrayToInt(passkey));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setPasskey
File: src/com/android/bluetooth/btservice/AdapterService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-362",
"CWE-20"
] |
CVE-2016-3760
|
MEDIUM
| 5.4
|
android
|
setPasskey
|
src/com/android/bluetooth/btservice/AdapterService.java
|
122feb9a0b04290f55183ff2f0384c6c53756bd8
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<IAppTask> getAppTasks(String callingPackage) throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeString(callingPackage);
mRemote.transact(GET_APP_TASKS_TRANSACTION, data, reply, 0);
reply.readException();
ArrayList<IAppTask> list = null;
int N = reply.readInt();
if (N >= 0) {
list = new ArrayList<>();
while (N > 0) {
IAppTask task = IAppTask.Stub.asInterface(reply.readStrongBinder());
list.add(task);
N--;
}
}
data.recycle();
reply.recycle();
return list;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAppTasks
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
getAppTasks
|
core/java/android/app/ActivityManagerNative.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getUserName(String user, String format, boolean link)
{
return this.xwiki.getUserName(user, format, link, getXWikiContext());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserName
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2023-37911
|
MEDIUM
| 6.5
|
xwiki/xwiki-platform
|
getUserName
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
|
f471f2a392aeeb9e51d59fdfe1d76fccf532523f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Restricted(NoExternalUse.class)
public static String validateIconSize(String iconSize) throws SecurityException {
if (!ICON_SIZE.matcher(iconSize).matches()) {
throw new SecurityException("invalid iconSize");
}
return iconSize;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: validateIconSize
File: core/src/main/java/hudson/Functions.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-310"
] |
CVE-2014-2061
|
MEDIUM
| 5
|
jenkinsci/jenkins
|
validateIconSize
|
core/src/main/java/hudson/Functions.java
|
bf539198564a1108b7b71a973bf7de963a6213ef
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public XMLBuilder2 up() {
return up(1);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: up
File: src/main/java/com/jamesmurty/utils/XMLBuilder2.java
Repository: jmurty/java-xmlbuilder
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2014-125087
|
MEDIUM
| 5.2
|
jmurty/java-xmlbuilder
|
up
|
src/main/java/com/jamesmurty/utils/XMLBuilder2.java
|
e6fddca201790abab4f2c274341c0bb8835c3e73
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isSocketConnected(Object socket) {
return ((SocketImpl)socket).isConnected();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isSocketConnected
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
|
isSocketConnected
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
private RootPathToken readContextToken() {
readWhitespace();
if (!isPathContext(path.currentChar())) {
throw new InvalidPathException("Path must start with '$' or '@'");
}
RootPathToken pathToken = PathTokenFactory.createRootPathToken(path.currentChar());
if (path.currentIsTail()) {
return pathToken;
}
path.incrementPosition(1);
if(path.currentChar() != PERIOD && path.currentChar() != OPEN_SQUARE_BRACKET){
fail("Illegal character at position " + path.position() + " expected '.' or '['");
}
PathTokenAppender appender = pathToken.getPathTokenAppender();
readNextToken(appender);
return pathToken;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readContextToken
File: json-path/src/main/java/com/jayway/jsonpath/internal/path/PathCompiler.java
Repository: json-path/JsonPath
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-51074
|
MEDIUM
| 5.3
|
json-path/JsonPath
|
readContextToken
|
json-path/src/main/java/com/jayway/jsonpath/internal/path/PathCompiler.java
|
f49ff25e3bad8c8a0c853058181f2c00b5beb305
| 0
|
Analyze the following code function for security vulnerabilities
|
private void switchToPreviousVoicemailProvider() {
if (DBG) log("switchToPreviousVoicemailProvider " + mPreviousVMProviderKey);
if (mPreviousVMProviderKey == null) {
return;
}
if (mVMChangeCompletedSuccessfully || mFwdChangesRequireRollback) {
showDialogIfForeground(VoicemailDialogUtil.VM_REVERTING_DIALOG);
final VoicemailProviderSettings prevSettings =
VoicemailProviderSettingsUtil.load(this, mPreviousVMProviderKey);
if (prevSettings == null) {
Log.e(LOG_TAG, "VoicemailProviderSettings for the key \""
+ mPreviousVMProviderKey + "\" is null but should be loaded.");
return;
}
if (mVMChangeCompletedSuccessfully) {
mNewVMNumber = prevSettings.getVoicemailNumber();
Log.i(LOG_TAG, "VM change is already completed successfully."
+ "Have to revert VM back to " + mNewVMNumber + " again.");
mPhone.setVoiceMailNumber(
mPhone.getVoiceMailAlphaTag().toString(),
mNewVMNumber,
Message.obtain(mRevertOptionComplete, EVENT_VOICEMAIL_CHANGED));
}
if (mFwdChangesRequireRollback) {
Log.i(LOG_TAG, "Requested to rollback forwarding changes.");
final CallForwardInfo[] prevFwdSettings = prevSettings.getForwardingSettings();
if (prevFwdSettings != null) {
Map<Integer, AsyncResult> results = mForwardingChangeResults;
resetForwardingChangeState();
for (int i = 0; i < prevFwdSettings.length; i++) {
CallForwardInfo fi = prevFwdSettings[i];
if (DBG) log("Reverting fwd #: " + i + ": " + fi.toString());
// Only revert the settings for which the update succeeded.
AsyncResult result = results.get(fi.reason);
if (result != null && result.exception == null) {
mExpectedChangeResultReasons.add(fi.reason);
CallForwardInfoUtil.setCallForwardingOption(mPhone, fi,
mRevertOptionComplete.obtainMessage(
EVENT_FORWARDING_CHANGED, i, 0));
}
}
}
}
} else {
if (DBG) log("No need to revert");
onRevertDone();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: switchToPreviousVoicemailProvider
File: src/com/android/phone/settings/VoicemailSettingsActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-862"
] |
CVE-2023-35665
|
HIGH
| 7.8
|
android
|
switchToPreviousVoicemailProvider
|
src/com/android/phone/settings/VoicemailSettingsActivity.java
|
674039e70e1c5bf29b808899ac80c709acc82290
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void onLockedRemoteInput(ExpandableNotificationRow row, View clicked) {
mLeaveOpenOnKeyguardHide = true;
showBouncer();
mPendingRemoteInputView = clicked;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onLockedRemoteInput
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
|
onLockedRemoteInput
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public byte readByte() throws JMSException {
return (Byte)this.readPrimitiveType(Byte.class);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readByte
File: src/main/java/com/rabbitmq/jms/client/message/RMQStreamMessage.java
Repository: rabbitmq/rabbitmq-jms-client
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2020-36282
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-jms-client
|
readByte
|
src/main/java/com/rabbitmq/jms/client/message/RMQStreamMessage.java
|
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
| 0
|
Analyze the following code function for security vulnerabilities
|
public int bindService(IApplicationThread caller, IBinder token, Intent service,
String resolvedType, IServiceConnection connection, int flags,
String callingPackage, int userId) throws TransactionTooLargeException {
return bindServiceInstance(caller, token, service, resolvedType, connection, flags,
null, callingPackage, userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: bindService
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
|
bindService
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public static byte[] uncompress(byte[] input)
throws IOException
{
byte[] result = new byte[Snappy.uncompressedLength(input)];
Snappy.uncompress(input, 0, input.length, result, 0);
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: uncompress
File: src/main/java/org/xerial/snappy/Snappy.java
Repository: xerial/snappy-java
The code follows secure coding practices.
|
[
"CWE-190"
] |
CVE-2023-34454
|
HIGH
| 7.5
|
xerial/snappy-java
|
uncompress
|
src/main/java/org/xerial/snappy/Snappy.java
|
d0042551e4a3509a725038eb9b2ad1f683674d94
| 0
|
Analyze the following code function for security vulnerabilities
|
private MaterialRevision filterUnsaved(MaterialRevision materialRevision) {
ArrayList<Modification> unsavedModifications = new ArrayList<>();
for (Modification modification : materialRevision.getModifications()) {
if (!modification.hasId()) {
unsavedModifications.add(modification);
}
}
return new MaterialRevision(materialRevision.getMaterial(), unsavedModifications);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: filterUnsaved
File: server/src/test-shared/java/com/thoughtworks/go/server/dao/DatabaseAccessHelper.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-697"
] |
CVE-2022-39308
|
MEDIUM
| 5.9
|
gocd
|
filterUnsaved
|
server/src/test-shared/java/com/thoughtworks/go/server/dao/DatabaseAccessHelper.java
|
236d4baf92e6607f2841c151c855adcc477238b8
| 0
|
Analyze the following code function for security vulnerabilities
|
public Column<T, V> setSortable(boolean sortable) {
if (this.sortable != sortable) {
this.sortable = sortable;
updateSortable();
}
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSortable
File: server/src/main/java/com/vaadin/ui/Grid.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-25028
|
MEDIUM
| 4.3
|
vaadin/framework
|
setSortable
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
private UIComponent createComponentFromScriptResource(FacesContext context, Resource scriptComponentResource, Resource componentResource) {
UIComponent result = null;
String className = scriptComponentResource.getResourceName();
int lastDot = className.lastIndexOf('.');
className = className.substring(0, lastDot);
try {
Class<?> componentClass = (Class<?>) componentMap.get(className);
if (componentClass == null) {
componentClass = Util.loadClass(className, this);
}
if (!associate.isDevModeEnabled()) {
componentMap.put(className, componentClass);
}
result = (UIComponent) componentClass.newInstance();
} catch (IllegalAccessException | InstantiationException | ClassNotFoundException ex) {
if (LOGGER.isLoggable(Level.SEVERE)) {
LOGGER.log(Level.SEVERE, null, ex);
}
}
if (result != null) {
// Make sure the resource is there for the annotation processor.
result.getAttributes().put(Resource.COMPONENT_RESOURCE_KEY, componentResource);
// In case there are any "this" references,
// make sure they can be resolved.
context.getAttributes().put(THIS_LIBRARY, componentResource.getLibraryName());
try {
associate.getAnnotationManager().applyComponentAnnotations(context, result);
} finally {
context.getAttributes().remove(THIS_LIBRARY);
}
}
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createComponentFromScriptResource
File: impl/src/main/java/com/sun/faces/application/applicationimpl/InstanceFactory.java
Repository: eclipse-ee4j/mojarra
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-14371
|
MEDIUM
| 5
|
eclipse-ee4j/mojarra
|
createComponentFromScriptResource
|
impl/src/main/java/com/sun/faces/application/applicationimpl/InstanceFactory.java
|
1b434748d9239f42eae8aa7d37d7a0930c061e24
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void destroy() {
applicationEventPublisher.unregisterListener();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: destroy
File: spring/spring5/spring5-common/src/main/java/org/infinispan/spring/common/session/AbstractInfinispanSessionRepository.java
Repository: infinispan
The code follows secure coding practices.
|
[
"CWE-384"
] |
CVE-2019-10158
|
HIGH
| 7.5
|
infinispan
|
destroy
|
spring/spring5/spring5-common/src/main/java/org/infinispan/spring/common/session/AbstractInfinispanSessionRepository.java
|
f3efef8de7fec4108dd5ab725cea6ae09f14815d
| 0
|
Analyze the following code function for security vulnerabilities
|
protected B headerSensitivityDetector(SensitivityDetector headerSensitivityDetector) {
enforceNonCodecConstraints("headerSensitivityDetector");
this.headerSensitivityDetector = checkNotNull(headerSensitivityDetector, "headerSensitivityDetector");
return self();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: headerSensitivityDetector
File: codec-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2ConnectionHandlerBuilder.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-44487
|
HIGH
| 7.5
|
netty
|
headerSensitivityDetector
|
codec-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2ConnectionHandlerBuilder.java
|
58f75f665aa81a8cbcf6ffa74820042a285c5e61
| 0
|
Analyze the following code function for security vulnerabilities
|
public File getRootDirFor(TopLevelItem child) {
return getRootDirFor(child.getName());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRootDirFor
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
|
getRootDirFor
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
protected boolean readFromTemplate(XWikiDocument document, String template, XWikiContext context)
throws XWikiException
{
DocumentReference templateReference = resolveTemplate(template);
if (templateReference != null) {
document.readFromTemplate(templateReference, context);
return true;
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readFromTemplate
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiAction.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-35157
|
MEDIUM
| 4.8
|
xwiki/xwiki-platform
|
readFromTemplate
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/XWikiAction.java
|
35e9073ffec567861e0abeea072bd97921a3decf
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getNegotiatedKexParameter(KexProposalOption paramType) {
if (paramType == null) {
return null;
}
synchronized (negotiationResult) {
return negotiationResult.get(paramType);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNegotiatedKexParameter
File: sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
Repository: apache/mina-sshd
The code follows secure coding practices.
|
[
"CWE-354"
] |
CVE-2023-48795
|
MEDIUM
| 5.9
|
apache/mina-sshd
|
getNegotiatedKexParameter
|
sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
|
6b0fd46f64bcb75eeeee31d65f10242660aad7c1
| 0
|
Analyze the following code function for security vulnerabilities
|
private void enforceCallerIsDream(String callerPackageName) {
final long origId = Binder.clearCallingIdentity();
try {
if (!canLaunchDreamActivity(callerPackageName)) {
throw new SecurityException("The dream activity can be started only when the device"
+ " is dreaming and only by the active dream package.");
}
} finally {
Binder.restoreCallingIdentity(origId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: enforceCallerIsDream
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
|
enforceCallerIsDream
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isPerspectiveTransformSupported(Object graphics){
return android.os.Build.VERSION.SDK_INT >= 14;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isPerspectiveTransformSupported
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
|
isPerspectiveTransformSupported
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@ApiOperation(value = "Clear Composite Solution Operation")
@RequestMapping(value = "/clearCompositeSolution", method = RequestMethod.POST)
@ResponseBody
public String clearCompositeSolution(@RequestParam(value = "userId", required = true) String userId,
@RequestParam(value = "solutionId", required = false) String solutionId,
@RequestParam(value = "solutionVersion", required = false) String solutionVersion,
@RequestParam(value = "cid", required = false) String cid) {
logger.debug(EELFLoggerDelegator.debugLogger, " clearCompositeSolution(): Begin ");
String result = "";
try {
result = compositeServiceImpl.clearCompositeSolution(userId, solutionId, solutionVersion, cid);
} catch (Exception e) {
logger.error(EELFLoggerDelegator.errorLogger, " Exception in clearCompositeSolution() ", e);
}
logger.debug(EELFLoggerDelegator.debugLogger, " clearCompositeSolution(): End ");
return result;
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2018-25097
- Severity: MEDIUM
- CVSS Score: 4.0
Description: Senitization for CSS Vulnerability
Issue-Id : ACUMOS-1650
Description : Senitization for CSS Vulnerability - Design Studio
Change-Id: If8fd4b9b06f884219d93881f7922421870de8e3d
Signed-off-by: Ramanaiah Pirla <RP00490596@techmahindra.com>
Function: clearCompositeSolution
File: ds-compositionengine/src/main/java/org/acumos/designstudio/ce/controller/SolutionController.java
Repository: acumos/design-studio
Fixed Code:
@ApiOperation(value = "Clear Composite Solution Operation")
@RequestMapping(value = "/clearCompositeSolution", method = RequestMethod.POST)
@ResponseBody
public String clearCompositeSolution(@RequestParam(value = "userId", required = true) String userId,
@RequestParam(value = "solutionId", required = false) String solutionId,
@RequestParam(value = "solutionVersion", required = false) String solutionVersion,
@RequestParam(value = "cid", required = false) String cid) {
logger.debug(EELFLoggerDelegator.debugLogger, " clearCompositeSolution(): Begin ");
String result = "";
try {
result = compositeServiceImpl.clearCompositeSolution(userId, SanitizeUtils.sanitize(solutionId), solutionVersion, cid);
} catch (Exception e) {
logger.error(EELFLoggerDelegator.errorLogger, " Exception in clearCompositeSolution() ", e);
}
logger.debug(EELFLoggerDelegator.debugLogger, " clearCompositeSolution(): End ");
return result;
}
|
[
"CWE-79"
] |
CVE-2018-25097
|
MEDIUM
| 4
|
acumos/design-studio
|
clearCompositeSolution
|
ds-compositionengine/src/main/java/org/acumos/designstudio/ce/controller/SolutionController.java
|
0df8a5e8722188744973168648e4c74c69ce67fd
| 1
|
Analyze the following code function for security vulnerabilities
|
public static Config exportConf(final Jooby app) {
AtomicReference<Config> conf = new AtomicReference<>(ConfigFactory.empty());
app.on("*", c -> {
conf.set(c);
});
exportRoutes(app);
return conf.get();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: exportConf
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
|
exportConf
|
jooby/src/main/java/org/jooby/Jooby.java
|
34f526028e6cd0652125baa33936ffb6a8a4a009
| 0
|
Analyze the following code function for security vulnerabilities
|
void dumpDebug(ProtoOutputStream proto) {
if (mPaymentServiceBound) {
mPaymentServiceName.dumpDebug(proto, HostEmulationManagerProto.PAYMENT_SERVICE_NAME);
}
if (mServiceBound) {
mServiceName.dumpDebug(proto, HostEmulationManagerProto.SERVICE_NAME);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpDebug
File: src/com/android/nfc/cardemulation/HostEmulationManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-35671
|
MEDIUM
| 5.5
|
android
|
dumpDebug
|
src/com/android/nfc/cardemulation/HostEmulationManager.java
|
745632835f3d97513a9c2a96e56e1dc06c4e4176
| 0
|
Analyze the following code function for security vulnerabilities
|
public ArtemisSecurityConfigurationBuilder addWhitelistedClassNames(Collection<String> classNames) {
whitelistedClassNames.addAll(classNames);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addWhitelistedClassNames
File: src/main/java/de/tum/in/test/api/security/ArtemisSecurityConfigurationBuilder.java
Repository: ls1intum/Ares
The code follows secure coding practices.
|
[
"CWE-501",
"CWE-653"
] |
CVE-2024-23682
|
HIGH
| 8.2
|
ls1intum/Ares
|
addWhitelistedClassNames
|
src/main/java/de/tum/in/test/api/security/ArtemisSecurityConfigurationBuilder.java
|
4c146ff85a0fa6022087fb0cffa6b8021d51101f
| 0
|
Analyze the following code function for security vulnerabilities
|
private void onDeferred(final Map<Object, Object> scope, final NativeRequest request,
final RequestImpl req, final ResponseImpl rsp, final Deferred deferred) {
/** Deferred executor. */
Key<Executor> execKey = deferred.executor()
.map(it -> Key.get(Executor.class, Names.named(it)))
.orElse(gexec);
/** Get executor. */
Executor executor = injector.getInstance(execKey);
request.startAsync(executor, () -> {
try {
deferred.handler(req, (success, x) -> {
boolean close = false;
Optional<Throwable> failure = Optional.ofNullable(x);
try {
requestScope.enter(scope);
if (success != null) {
close = true;
rsp.send(success);
}
} catch (Throwable exerr) {
failure = Optional.of(failure.orElse(exerr));
} finally {
Throwable cause = failure.orElse(null);
if (cause != null) {
close = true;
}
cleanup(req, rsp, close, cause, true);
}
});
} catch (Exception ex) {
handleErr(req, rsp, ex);
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onDeferred
File: jooby/src/main/java/org/jooby/internal/HttpHandlerImpl.java
Repository: jooby-project/jooby
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-15477
|
MEDIUM
| 4.3
|
jooby-project/jooby
|
onDeferred
|
jooby/src/main/java/org/jooby/internal/HttpHandlerImpl.java
|
34856a738829d8fedca4ed27bd6ff413af87186f
| 0
|
Analyze the following code function for security vulnerabilities
|
private void addUserControlDisabledPackages(CallerIdentity caller,
EnforcingAdmin enforcingAdmin, Set<String> packages) {
if (isDeviceOwner(caller)) {
mDevicePolicyEngine.setGlobalPolicy(
PolicyDefinition.USER_CONTROLLED_DISABLED_PACKAGES,
enforcingAdmin,
new StringSetPolicyValue(packages));
} else {
mDevicePolicyEngine.setLocalPolicy(
PolicyDefinition.USER_CONTROLLED_DISABLED_PACKAGES,
enforcingAdmin,
new StringSetPolicyValue(packages),
caller.getUserId());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addUserControlDisabledPackages
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
addUserControlDisabledPackages
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onImage(WikiReference reference)
{
// We need to handle 2 cases:
// - when the passed reference is an instance of XWikiWikiReference, i.e. when a XHTML comment defining a XWiki
// image has been specified
// - when the passed reference is not an instance of XWikiWikiReference which will happen if there's no special
// XHTML comment defining a XWiki image
if (!(reference instanceof XWikiWikiReference)) {
super.onImage(reference);
} else {
XWikiWikiReference xwikiReference = (XWikiWikiReference) reference;
ResourceReference resourceReference = xwikiReference.getReference();
flushFormat();
onImage(resourceReference, xwikiReference.isFreeStanding(),
convertParameters(xwikiReference.getParameters()));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onImage
File: xwiki-rendering-syntaxes/xwiki-rendering-syntax-xhtml/src/main/java/org/xwiki/rendering/internal/parser/xhtml/wikimodel/XHTMLXWikiGeneratorListener.java
Repository: xwiki/xwiki-rendering
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-32070
|
MEDIUM
| 6.1
|
xwiki/xwiki-rendering
|
onImage
|
xwiki-rendering-syntaxes/xwiki-rendering-syntax-xhtml/src/main/java/org/xwiki/rendering/internal/parser/xhtml/wikimodel/XHTMLXWikiGeneratorListener.java
|
c40e2f5f9482ec6c3e71dbf1fff5ba8a5e44cdc1
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean closeAfterRequest() {
String inKeepAliveHeader = this.reqKeepAliveHeader;
String outKeepAliveHeader = getHeader(KEEP_ALIVE_HEADER);
boolean hasContentLength = (getHeader(CONTENT_LENGTH_HEADER) != null);
if (this.protocol.startsWith("HTTP/0"))
return true;
else if ((inKeepAliveHeader == null) && (outKeepAliveHeader == null))
return this.protocol.equals("HTTP/1.0") ? true : !hasContentLength;
else if (outKeepAliveHeader != null)
return outKeepAliveHeader.equalsIgnoreCase(KEEP_ALIVE_CLOSE) || !hasContentLength;
else if (inKeepAliveHeader != null)
return inKeepAliveHeader.equalsIgnoreCase(KEEP_ALIVE_CLOSE) || !hasContentLength;
else
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: closeAfterRequest
File: src/java/winstone/WinstoneResponse.java
Repository: jenkinsci/winstone
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2011-4344
|
LOW
| 2.6
|
jenkinsci/winstone
|
closeAfterRequest
|
src/java/winstone/WinstoneResponse.java
|
410ed3001d51c689cf59085b7417466caa2ded7b
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isCallerBindAppWidgetWhiteListedLocked(String packageName) {
final int userId = UserHandle.getCallingUserId();
final int packageUid = getUidForPackage(packageName, userId);
if (packageUid < 0) {
throw new IllegalArgumentException("No package " + packageName
+ " for user " + userId);
}
synchronized (mLock) {
ensureGroupStateLoadedLocked(userId);
Pair<Integer, String> packageId = Pair.create(userId, packageName);
if (mPackagesWithBindWidgetPermission.contains(packageId)) {
return true;
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isCallerBindAppWidgetWhiteListedLocked
File: services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-1541
|
MEDIUM
| 4.3
|
android
|
isCallerBindAppWidgetWhiteListedLocked
|
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
|
0b98d304c467184602b4c6bce76fda0b0274bc07
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean moveHomeStackTaskToTop(int homeStackTaskType, String reason) {
if (homeStackTaskType == RECENTS_ACTIVITY_TYPE) {
mWindowManager.showRecentApps();
return false;
}
mHomeStack.moveHomeStackTaskToTop(homeStackTaskType);
final ActivityRecord top = getHomeActivity();
if (top == null) {
return false;
}
mService.setFocusedActivityLocked(top, reason);
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: moveHomeStackTaskToTop
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
|
moveHomeStackTaskToTop
|
services/core/java/com/android/server/am/ActivityStackSupervisor.java
|
468651c86a8adb7aa56c708d2348e99022088af3
| 0
|
Analyze the following code function for security vulnerabilities
|
public DropdownChipLayouter getDropdownChipLayouter() {
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDropdownChipLayouter
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
|
getDropdownChipLayouter
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getMacroList()
{
return this.xwiki.getMacroList(getXWikiContext());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMacroList
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2023-37911
|
MEDIUM
| 6.5
|
xwiki/xwiki-platform
|
getMacroList
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
|
f471f2a392aeeb9e51d59fdfe1d76fccf532523f
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getTo() {
return to;
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2022-41967
- Severity: HIGH
- CVSS Score: 7.5
Description: fix: CVE-2022-41967
Dragonfly v0.3.0-SNAPSHOT fails to properly configure the
DocumentBuilderFactory to prevent XML enternal entity (XXE) attacks when
parsing maven-metadata.xml files provided by external Maven repositories
during "SNAPSHOT" version resolution.
This patches CVE-2022-41967 by disabling features which may lead to XXE.
If you are currently using v0.3.0-SNAPSHOT it is STRONGLY advised to
update Dragonfly to v0.3.1-SNAPSHOT just to be safe.
Function: getTo
File: src/main/java/dev/hypera/dragonfly/relocation/Relocation.java
Repository: HyperaDev/Dragonfly
Fixed Code:
public @NotNull String getTo() {
return to;
}
|
[
"CWE-611"
] |
CVE-2022-41967
|
HIGH
| 7.5
|
HyperaDev/Dragonfly
|
getTo
|
src/main/java/dev/hypera/dragonfly/relocation/Relocation.java
|
9661375e1135127ca6cdb5712e978bec33cc06b3
| 1
|
Analyze the following code function for security vulnerabilities
|
private AbstractRegistrationPage setUp(TestUtils testUtils, boolean useLiveValidation, boolean isModal)
throws Exception
{
// We create the admin user because it is expected to exist when testing the registration of an existing user.
testUtils.loginAsSuperAdmin();
testUtils.createAdminUser();
deleteJohnSmith(testUtils);
testUtils.updateObject("XWiki", "RegistrationConfig", "XWiki.Registration", 0, "liveValidation_enabled",
useLiveValidation);
switchUser(testUtils, isModal);
testUtils.recacheSecretToken();
AbstractRegistrationPage registrationPage = this.getRegistrationPage(isModal);
// The prepareName javascript function is the cause of endless flickering since it tries to suggest a username
// every time the field is focused.
testUtils.getDriver().executeJavascript("document.getElementById('xwikiname').onfocus = null;");
registrationPage.fillInJohnSmithValues();
return registrationPage;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUp
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
|
setUp
|
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
|
public Builder replica(Integer num) {
if (num != null) {
options.put(PARAM_REPLICA_NUM, num.toString());
} else {
options.remove(PARAM_REPLICA_NUM);
}
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: replica
File: clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNode.java
Repository: ClickHouse/clickhouse-java
The code follows secure coding practices.
|
[
"CWE-209"
] |
CVE-2024-23689
|
HIGH
| 8.8
|
ClickHouse/clickhouse-java
|
replica
|
clickhouse-client/src/main/java/com/clickhouse/client/ClickHouseNode.java
|
4f8d9303eb991b39ec7e7e34825241efa082238a
| 0
|
Analyze the following code function for security vulnerabilities
|
private V fromBoolean(K name, boolean value) {
try {
return valueConverter.convertBoolean(value);
} catch (IllegalArgumentException e) {
throw new IllegalArgumentException("Failed to convert boolean value for header '" + name + '\'', e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fromBoolean
File: codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-436",
"CWE-113"
] |
CVE-2022-41915
|
MEDIUM
| 6.5
|
netty
|
fromBoolean
|
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
|
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean isPotentialDragTarget(boolean targetInterceptsGlobalDrag) {
return (targetInterceptsGlobalDrag || isVisibleNow()) && !mRemoved
&& mInputChannel != null && mInputWindowHandle != null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isPotentialDragTarget
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
|
isPotentialDragTarget
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getFailedUnlockAttempts(int userId) {
return mFailedAttempts.get(userId, 0);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFailedUnlockAttempts
File: packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
getFailedUnlockAttempts
|
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
private JournaledFile makeJournaledFile(@UserIdInt int userId, String fileName) {
final String base = new File(getPolicyFileDirectory(userId), fileName)
.getAbsolutePath();
if (VERBOSE_LOG) Slogf.v(LOG_TAG, "Opening %s", base);
return new JournaledFile(new File(base), new File(base + ".tmp"));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: makeJournaledFile
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
|
makeJournaledFile
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
private void verifyAndInit(ObjectStreamClass loadedStreamClass)
throws InvalidClassException {
Class<?> localClass = loadedStreamClass.forClass();
ObjectStreamClass localStreamClass = ObjectStreamClass
.lookupStreamClass(localClass);
if (loadedStreamClass.getSerialVersionUID() != localStreamClass
.getSerialVersionUID()) {
throw new InvalidClassException(loadedStreamClass.getName(),
"Incompatible class (SUID): " + loadedStreamClass +
" but expected " + localStreamClass);
}
String loadedClassBaseName = getBaseName(loadedStreamClass.getName());
String localClassBaseName = getBaseName(localStreamClass.getName());
if (!loadedClassBaseName.equals(localClassBaseName)) {
throw new InvalidClassException(loadedStreamClass.getName(),
String.format("Incompatible class (base name): %s but expected %s",
loadedClassBaseName, localClassBaseName));
}
loadedStreamClass.initPrivateFields(localStreamClass);
}
|
Vulnerability Classification:
- CWE: CWE-264
- CVE: CVE-2014-7911
- Severity: HIGH
- CVSS Score: 7.2
Description: Add additional checks in ObjectInputStream
Thanks to Jann Horn for reporting a bug in ObjectInputStream
and sending the initial patch.
Add some checks that the class of an object
being deserialized still conforms to the requirements
for serialization.
Add some checks that the class being deserialized matches
the type information (enum, serializable, externalizable)
held in the stream.
Delayed static initialization of classes until the
type of the class has been validated against the stream
content in some cases.
Added more tests.
Bug: 15874291
Change-Id: I0f0fe68e0d21e041c5160482113ae847c357b8f5
Function: verifyAndInit
File: luni/src/main/java/java/io/ObjectInputStream.java
Repository: android
Fixed Code:
private void verifyAndInit(ObjectStreamClass loadedStreamClass)
throws InvalidClassException {
Class<?> localClass = loadedStreamClass.forClass();
ObjectStreamClass localStreamClass = ObjectStreamClass.lookupStreamClass(localClass);
if (loadedStreamClass.getSerialVersionUID() != localStreamClass
.getSerialVersionUID()) {
throw new InvalidClassException(loadedStreamClass.getName(),
"Incompatible class (SUID): " + loadedStreamClass +
" but expected " + localStreamClass);
}
String loadedClassBaseName = getBaseName(loadedStreamClass.getName());
String localClassBaseName = getBaseName(localStreamClass.getName());
if (!loadedClassBaseName.equals(localClassBaseName)) {
throw new InvalidClassException(loadedStreamClass.getName(),
String.format("Incompatible class (base name): %s but expected %s",
loadedClassBaseName, localClassBaseName));
}
loadedStreamClass.initPrivateFields(localStreamClass);
}
|
[
"CWE-264"
] |
CVE-2014-7911
|
HIGH
| 7.2
|
android
|
verifyAndInit
|
luni/src/main/java/java/io/ObjectInputStream.java
|
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
| 1
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.