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 void setWrappedPrivateData(String wrappedPrivateData) {
attributes.put(WRAPPED_PRIVATE_DATA, wrappedPrivateData);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setWrappedPrivateData
File: base/common/src/main/java/com/netscape/certsrv/key/KeyArchivalRequest.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
setWrappedPrivateData
|
base/common/src/main/java/com/netscape/certsrv/key/KeyArchivalRequest.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
void registerStreamSink(Http2HeadersStreamSinkChannel synResponse) {
StreamHolder existing = currentStreams.get(synResponse.getStreamId());
if(existing == null) {
throw UndertowMessages.MESSAGES.streamNotRegistered();
}
existing.sinkChannel = synResponse;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: registerStreamSink
File: core/src/main/java/io/undertow/protocols/http2/Http2Channel.java
Repository: undertow-io/undertow
The code follows secure coding practices.
|
[
"CWE-214"
] |
CVE-2021-3859
|
HIGH
| 7.5
|
undertow-io/undertow
|
registerStreamSink
|
core/src/main/java/io/undertow/protocols/http2/Http2Channel.java
|
e43f0ada3f4da6e8579e0020cec3cb1a81e487c2
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("unchecked")
private static javax.persistence.criteria.Order toJpaOrder(Order order, Root<?> root, CriteriaBuilder cb) {
PropertyPath property = PropertyPath.from(order.getProperty(), root.getJavaType());
Expression<?> expression = toExpressionRecursively(root, property);
if (order.isIgnoreCase() && String.class.equals(expression.getJavaType())) {
Expression<String> lower = cb.lower((Expression<String>) expression);
return order.isAscending() ? cb.asc(lower) : cb.desc(lower);
} else {
return order.isAscending() ? cb.asc(expression) : cb.desc(expression);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toJpaOrder
File: src/main/java/org/springframework/data/jpa/repository/query/QueryUtils.java
Repository: spring-projects/spring-data-jpa
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-6652
|
MEDIUM
| 6.8
|
spring-projects/spring-data-jpa
|
toJpaOrder
|
src/main/java/org/springframework/data/jpa/repository/query/QueryUtils.java
|
b8e7fe
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected ResourceResponse newResourceResponse(Attributes attributes) {
PageParameters params = attributes.getParameters();
Long projectId = params.get(PARAM_PROJECT).toLong();
Project project = OneDev.getInstance(ProjectManager.class).load(projectId);
Long buildNumber = params.get(PARAM_BUILD).toOptionalLong();
if (buildNumber == null)
throw new IllegalArgumentException("build number has to be specified");
Build build = OneDev.getInstance(BuildManager.class).find(project, buildNumber);
if (build == null) {
String message = String.format("Unable to find build (project: %s, build number: %d)",
project.getPath(), buildNumber);
throw new EntityNotFoundException(message);
}
if (!SecurityUtils.canAccess(build))
throw new UnauthorizedException();
List<String> pathSegments = new ArrayList<>();
for (int i = 0; i < params.getIndexedCount(); i++) {
String pathSegment = params.get(i).toString();
if (pathSegment.length() != 0)
pathSegments.add(pathSegment);
}
if (pathSegments.isEmpty())
throw new ExplicitException("Artifact path has to be specified");
String artifactPath = Joiner.on("/").join(pathSegments);
File artifactsDir = build.getArtifactsDir();
File artifactFile = new File(artifactsDir, artifactPath);
if (!artifactFile.exists() || artifactFile.isDirectory()) {
String message = String.format("Specified artifact path does not exist or is a directory (project: %s, build number: %d, path: %s)",
project.getPath(), build.getNumber(), artifactPath);
throw new ExplicitException(message);
}
ResourceResponse response = new ResourceResponse();
try (InputStream is = new BufferedInputStream(new FileInputStream(artifactFile))) {
response.setContentType(ContentDetector.detectMediaType(is, artifactPath).toString());
} catch (Exception e) {
throw new RuntimeException(e);
}
response.disableCaching();
try {
response.setFileName(URLEncoder.encode(artifactFile.getName(), StandardCharsets.UTF_8.name()));
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
response.setContentLength(artifactFile.length());
response.setWriteCallback(new WriteCallback() {
@Override
public void writeData(Attributes attributes) throws IOException {
LockUtils.read(build.getArtifactsLockKey(), new Callable<Void>() {
@Override
public Void call() throws Exception {
try (InputStream is = new FileInputStream(artifactFile)) {
IOUtils.copy(is, attributes.getResponse().getOutputStream());
}
return null;
}
});
}
});
return response;
}
|
Vulnerability Classification:
- CWE: CWE-79, CWE-732
- CVE: CVE-2022-39207
- Severity: MEDIUM
- CVSS Score: 5.4
Description: Fix XSS attach for published artifacts
Function: newResourceResponse
File: server-core/src/main/java/io/onedev/server/web/resource/ArtifactResource.java
Repository: theonedev/onedev
Fixed Code:
@Override
protected ResourceResponse newResourceResponse(Attributes attributes) {
PageParameters params = attributes.getParameters();
Long projectId = params.get(PARAM_PROJECT).toLong();
Project project = OneDev.getInstance(ProjectManager.class).load(projectId);
Long buildNumber = params.get(PARAM_BUILD).toOptionalLong();
if (buildNumber == null)
throw new IllegalArgumentException("build number has to be specified");
Build build = OneDev.getInstance(BuildManager.class).find(project, buildNumber);
if (build == null) {
String message = String.format("Unable to find build (project: %s, build number: %d)",
project.getPath(), buildNumber);
throw new EntityNotFoundException(message);
}
if (!SecurityUtils.canAccess(build))
throw new UnauthorizedException();
List<String> pathSegments = new ArrayList<>();
for (int i = 0; i < params.getIndexedCount(); i++) {
String pathSegment = params.get(i).toString();
if (pathSegment.length() != 0)
pathSegments.add(pathSegment);
}
if (pathSegments.isEmpty())
throw new ExplicitException("Artifact path has to be specified");
String artifactPath = Joiner.on("/").join(pathSegments);
File artifactsDir = build.getArtifactsDir();
File artifactFile = new File(artifactsDir, artifactPath);
if (!artifactFile.exists() || artifactFile.isDirectory()) {
String message = String.format("Specified artifact path does not exist or is a directory (project: %s, build number: %d, path: %s)",
project.getPath(), build.getNumber(), artifactPath);
throw new ExplicitException(message);
}
ResourceResponse response = new ResourceResponse();
response.getHeaders().addHeader("X-Content-Type-Options", "nosniff");
response.setContentType(MimeTypes.OCTET_STREAM);
response.disableCaching();
try {
response.setFileName(URLEncoder.encode(artifactFile.getName(), StandardCharsets.UTF_8.name()));
} catch (UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
response.setContentLength(artifactFile.length());
response.setWriteCallback(new WriteCallback() {
@Override
public void writeData(Attributes attributes) throws IOException {
LockUtils.read(build.getArtifactsLockKey(), new Callable<Void>() {
@Override
public Void call() throws Exception {
try (InputStream is = new FileInputStream(artifactFile)) {
IOUtils.copy(is, attributes.getResponse().getOutputStream());
}
return null;
}
});
}
});
return response;
}
|
[
"CWE-79",
"CWE-732"
] |
CVE-2022-39207
|
MEDIUM
| 5.4
|
theonedev/onedev
|
newResourceResponse
|
server-core/src/main/java/io/onedev/server/web/resource/ArtifactResource.java
|
adb6e31476621f824fc3227a695232df830d83ab
| 1
|
Analyze the following code function for security vulnerabilities
|
private static synchronized void setAdapterService(AdapterService instance) {
if (instance != null && !instance.mCleaningUp) {
if (DBG) Log.d(TAG, "setAdapterService() - set to: " + sAdapterService);
sAdapterService = instance;
} else {
if (DBG) {
if (sAdapterService == null) {
Log.d(TAG, "setAdapterService() - Service not available");
} else if (sAdapterService.mCleaningUp) {
Log.d(TAG,"setAdapterService() - Service is cleaning up");
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAdapterService
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
|
setAdapterService
|
src/com/android/bluetooth/btservice/AdapterService.java
|
122feb9a0b04290f55183ff2f0384c6c53756bd8
| 0
|
Analyze the following code function for security vulnerabilities
|
public static XMLBuilder create(String name, String namespaceURI)
throws ParserConfigurationException, FactoryConfigurationError
{
return new XMLBuilder(createDocumentImpl(name, namespaceURI));
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2014-125087
- Severity: MEDIUM
- CVSS Score: 5.2
Description: Disable external entities by default to prevent XXE injection attacks, re #6
XML Builder classes now explicitly enable or disable
'external-general-entities' and 'external-parameter-entities' features
of the DocumentBuilderFactory when #create or #parse methods are used.
To prevent XML External Entity (XXE) injection attacks, these features
are disabled by default. They can only be enabled by passing a true
boolean value to new versions of the #create and #parse methods that
accept a flag for this feature.
Function: create
File: src/main/java/com/jamesmurty/utils/XMLBuilder.java
Repository: jmurty/java-xmlbuilder
Fixed Code:
public static XMLBuilder create(String name, String namespaceURI)
throws ParserConfigurationException, FactoryConfigurationError
{
return create(name, namespaceURI, false);
}
|
[
"CWE-611"
] |
CVE-2014-125087
|
MEDIUM
| 5.2
|
jmurty/java-xmlbuilder
|
create
|
src/main/java/com/jamesmurty/utils/XMLBuilder.java
|
e6fddca201790abab4f2c274341c0bb8835c3e73
| 1
|
Analyze the following code function for security vulnerabilities
|
private int getResolvedLongPressOnPowerBehavior() {
if (FactoryTest.isLongPressOnPowerOffEnabled()) {
return LONG_PRESS_POWER_SHUT_OFF_NO_CONFIRM;
}
return mLongPressOnPowerBehavior;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getResolvedLongPressOnPowerBehavior
File: policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-0812
|
MEDIUM
| 6.6
|
android
|
getResolvedLongPressOnPowerBehavior
|
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
|
84669ca8de55d38073a0dcb01074233b0a417541
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<Project> query() {
return query(true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: query
File: server-core/src/main/java/io/onedev/server/entitymanager/impl/DefaultProjectManager.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2022-39205
|
CRITICAL
| 9.8
|
theonedev/onedev
|
query
|
server-core/src/main/java/io/onedev/server/entitymanager/impl/DefaultProjectManager.java
|
f1e97688e4e19d6de1dfa1d00e04655209d39f8e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void removeAllChildren() {
while (getFirstChild() != null) {
getFirstChild().remove();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeAllChildren
File: src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
Repository: HtmlUnit/htmlunit
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-2798
|
HIGH
| 7.5
|
HtmlUnit/htmlunit
|
removeAllChildren
|
src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
|
940dc7fd
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isWorkProfile(int userId) {
UserInfo info = mUserManager.getUserInfo(userId);
return info != null && info.isManagedProfile();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isWorkProfile
File: services/core/java/com/android/server/fingerprint/FingerprintService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
isWorkProfile
|
services/core/java/com/android/server/fingerprint/FingerprintService.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
private List<ADnsAnswer> resolveIpAddresses(String hostName, DnsRecordType dnsRecordType, boolean includeIpVersion)
throws InterruptedException, ExecutionException {
LOG.debug("Attempting to resolve [{}] records for [{}]", dnsRecordType, hostName);
if (isShutdown()) {
throw new DnsClientNotRunningException();
}
validateHostName(hostName);
final DefaultDnsQuestion aRecordDnsQuestion = new DefaultDnsQuestion(hostName, dnsRecordType);
/* The DnsNameResolver.resolveAll(DnsQuestion) method handles all redirects through CNAME records to
* ultimately resolve a list of IP addresses with TTL values. */
try {
return resolver.resolveAll(aRecordDnsQuestion).get(requestTimeout, TimeUnit.MILLISECONDS).stream()
.map(dnsRecord -> decodeDnsRecord(dnsRecord, includeIpVersion))
.filter(Objects::nonNull) // Removes any entries which the IP address could not be extracted for.
.collect(Collectors.toList());
} catch (TimeoutException e) {
throw new ExecutionException("Resolver future didn't return a result in " + requestTimeout + " ms", e);
}
}
|
Vulnerability Classification:
- CWE: CWE-345
- CVE: CVE-2023-41045
- Severity: MEDIUM
- CVSS Score: 5.3
Description: Merge pull request from GHSA-g96c-x7rh-99r3
* Add support for randomizing DNS Lookup source port
* Clarify purpose of lease
* Skip initial refresh
Previously, the pool was being refreshed immediately upon initialization. Now, the refresh waits until the `poolRefreshSeconds` duration has elapsed.
* Ensure thread safety, skip unused poller refreshes
* Add change log
* Restore location of local flag
Function: resolveIpAddresses
File: graylog2-server/src/main/java/org/graylog2/lookup/adapters/dnslookup/DnsClient.java
Repository: Graylog2/graylog2-server
Fixed Code:
private List<ADnsAnswer> resolveIpAddresses(String hostName, DnsRecordType dnsRecordType, boolean includeIpVersion)
throws InterruptedException, ExecutionException {
LOG.debug("Attempting to resolve [{}] records for [{}]", dnsRecordType, hostName);
if (resolverPool.isStopped()) {
throw new DnsClientNotRunningException();
}
validateHostName(hostName);
final DefaultDnsQuestion aRecordDnsQuestion = new DefaultDnsQuestion(hostName, dnsRecordType);
final ResolverLease resolverLease = resolverPool.takeLease();
/* The DnsNameResolver.resolveAll(DnsQuestion) method handles all redirects through CNAME records to
* ultimately resolve a list of IP addresses with TTL values. */
try {
return resolverLease.getResolver().resolveAll(aRecordDnsQuestion).get(requestTimeout, TimeUnit.MILLISECONDS).stream()
.map(dnsRecord -> decodeDnsRecord(dnsRecord, includeIpVersion))
.filter(Objects::nonNull) // Removes any entries which the IP address could not be extracted for.
.collect(Collectors.toList());
} catch (TimeoutException e) {
throw new ExecutionException("Resolver future didn't return a result in " + requestTimeout + " ms", e);
}
finally {
resolverPool.returnLease(resolverLease);
}
}
|
[
"CWE-345"
] |
CVE-2023-41045
|
MEDIUM
| 5.3
|
Graylog2/graylog2-server
|
resolveIpAddresses
|
graylog2-server/src/main/java/org/graylog2/lookup/adapters/dnslookup/DnsClient.java
|
a101f4f12180fd3dfa7d3345188a099877a3c327
| 1
|
Analyze the following code function for security vulnerabilities
|
public BaseObject getXObject(ObjectReference objectReference)
{
BaseObjectReference baseObjectReference = getBaseObjectReference(objectReference);
// If the baseObjectReference has an object number, we return the object with this number,
// otherwise, we consider it should be the first object, as specified by BaseObjectReference#getObjectNumber
return baseObjectReference.getObjectNumber() == null ? this.getXObject(baseObjectReference.getXClassReference())
: getXObject(baseObjectReference.getXClassReference(), baseObjectReference.getObjectNumber());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getXObject
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2023-29523
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
getXObject
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
0d547181389f7941e53291af940966413823f61c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<String> getDisallowedSystemApps(ComponentName admin, int userId,
String provisioningAction) throws RemoteException {
Preconditions.checkCallAuthorization(
hasCallingOrSelfPermission(MANAGE_PROFILE_AND_DEVICE_OWNERS));
return new ArrayList<>(
mOverlayPackagesProvider.getNonRequiredApps(admin, userId, provisioningAction));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDisallowedSystemApps
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
|
getDisallowedSystemApps
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
private String directoryTemplate(Vertx vertx) {
if (directoryTemplate == null) {
directoryTemplate = Utils.readFileToString(vertx, directoryTemplateResource);
}
return directoryTemplate;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: directoryTemplate
File: vertx-web/src/main/java/io/vertx/ext/web/handler/impl/StaticHandlerImpl.java
Repository: vert-x3/vertx-web
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-12542
|
HIGH
| 7.5
|
vert-x3/vertx-web
|
directoryTemplate
|
vertx-web/src/main/java/io/vertx/ext/web/handler/impl/StaticHandlerImpl.java
|
57a65dce6f4c5aa5e3ce7288685e7f3447eb8f3b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int size()
{
return this.size;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: size
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/doc/BaseObjects.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-26470
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
size
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/doc/BaseObjects.java
|
fdfce062642b0ac062da5cda033d25482f4600fa
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void endFigure(Map<String, String> parameters)
{
getXHTMLWikiPrinter().printXMLEndElement(FIGURE_TAG);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: endFigure
File: xwiki-rendering-syntaxes/xwiki-rendering-syntax-html5/src/main/java/org/xwiki/rendering/internal/renderer/html5/HTML5ChainingRenderer.java
Repository: xwiki/xwiki-rendering
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-32070
|
MEDIUM
| 6.1
|
xwiki/xwiki-rendering
|
endFigure
|
xwiki-rendering-syntaxes/xwiki-rendering-syntax-html5/src/main/java/org/xwiki/rendering/internal/renderer/html5/HTML5ChainingRenderer.java
|
c40e2f5f9482ec6c3e71dbf1fff5ba8a5e44cdc1
| 0
|
Analyze the following code function for security vulnerabilities
|
ProcessRecord getRecordForAppLocked(IApplicationThread thread) {
if (thread == null) {
return null;
}
int appIndex = getLRURecordIndexForAppLocked(thread);
if (appIndex >= 0) {
return mLruProcesses.get(appIndex);
}
// Validation: if it isn't in the LRU list, it shouldn't exist, but let's
// double-check that.
final IBinder threadBinder = thread.asBinder();
final ArrayMap<String, SparseArray<ProcessRecord>> pmap = mProcessNames.getMap();
for (int i = pmap.size()-1; i >= 0; i--) {
final SparseArray<ProcessRecord> procs = pmap.valueAt(i);
for (int j = procs.size()-1; j >= 0; j--) {
final ProcessRecord proc = procs.valueAt(j);
if (proc.thread != null && proc.thread.asBinder() == threadBinder) {
Slog.wtf(TAG, "getRecordForApp: exists in name list but not in LRU list: "
+ proc);
return proc;
}
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRecordForAppLocked
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2018-9492
|
HIGH
| 7.2
|
android
|
getRecordForAppLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setTransformAffine(Object nativeTransform, double m00, double m10, double m01, double m11, double m02, double m12) {
((CN1Matrix4f)nativeTransform).setData(new float[]{
(float)m00, (float)m10, 0, 0,
(float)m01, (float)m11, 0, 0,
0, 0, 1, 0,
(float)m02, (float)m12, 0, 1
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setTransformAffine
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
|
setTransformAffine
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void startActivity(Intent intent, boolean dismissShade, Callback callback) {
startActivityDismissingKeyguard(intent, false, dismissShade, callback);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startActivity
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
|
startActivity
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
private void adjustRegionInFreefromWindowMode(Rect inOutRect) {
if (!inFreeformWindowingMode()) {
return;
}
// For freeform windows, we need the touch region to include the whole
// surface for the shadows.
final DisplayMetrics displayMetrics = getDisplayContent().getDisplayMetrics();
final int delta = WindowManagerService.dipToPixel(
RESIZE_HANDLE_WIDTH_IN_DP, displayMetrics);
inOutRect.inset(-delta, -delta);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: adjustRegionInFreefromWindowMode
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
|
adjustRegionInFreefromWindowMode
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override public void onOpChanged(int op, String packageName) {
updateAppOpsState();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onOpChanged
File: services/core/java/com/android/server/wm/WindowManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3875
|
HIGH
| 7.2
|
android
|
onOpChanged
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isUnderflowHandlingEnabled() {
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isUnderflowHandlingEnabled
File: src/main/java/com/rabbitmq/client/impl/nio/FrameBuilder.java
Repository: rabbitmq/rabbitmq-java-client
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-46120
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-java-client
|
isUnderflowHandlingEnabled
|
src/main/java/com/rabbitmq/client/impl/nio/FrameBuilder.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
protected CompletableFuture<Void> internalSetPersistence(PersistencePolicies persistencePolicies) {
validatePersistencePolicies(persistencePolicies);
return getTopicPoliciesAsyncWithRetry(topicName)
.thenCompose(op -> {
TopicPolicies topicPolicies = op.orElseGet(TopicPolicies::new);
topicPolicies.setPersistence(persistencePolicies);
return pulsar().getTopicPoliciesService().updateTopicPoliciesAsync(topicName, topicPolicies);
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: internalSetPersistence
File: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
Repository: apache/pulsar
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-41571
|
MEDIUM
| 4
|
apache/pulsar
|
internalSetPersistence
|
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
|
5b35bb81c31f1bc2ad98c9fde5b39ec68110ca52
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setRecycleBinStore(XWikiRecycleBinStoreInterface recycleBinStore)
{
this.recycleBinStore = recycleBinStore;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setRecycleBinStore
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-32620
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
setRecycleBinStore
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
@TestApi
@RequiresPermission(android.Manifest.permission.MANAGE_PROFILE_AND_DEVICE_OWNERS)
public boolean setDeviceOwner(@NonNull ComponentName who, @UserIdInt int userId) {
if (mService != null) {
try {
return mService.setDeviceOwner(who, userId,
/* setProfileOwnerOnCurrentUserIfNecessary= */ true);
} catch (RemoteException re) {
throw re.rethrowFromSystemServer();
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDeviceOwner
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
|
setDeviceOwner
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getPageSize() {
return pageSize;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPageSize
File: src/main/java/com/github/pagehelper/Page.java
Repository: pagehelper/Mybatis-PageHelper
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-28111
|
HIGH
| 7.5
|
pagehelper/Mybatis-PageHelper
|
getPageSize
|
src/main/java/com/github/pagehelper/Page.java
|
554a524af2d2b30d09505516adc412468a84d8fa
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String controllerBasePath() {
return Routes.BackupConfig.BASE;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: controllerBasePath
File: api/api-backup-config-v1/src/main/java/com/thoughtworks/go/apiv1/backupconfig/BackupConfigControllerV1.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2021-25924
|
HIGH
| 9.3
|
gocd
|
controllerBasePath
|
api/api-backup-config-v1/src/main/java/com/thoughtworks/go/apiv1/backupconfig/BackupConfigControllerV1.java
|
7d0baab0d361c377af84994f95ba76c280048548
| 0
|
Analyze the following code function for security vulnerabilities
|
private int read32(InputStream is) throws IOException {
return (is.read() << 0) + (is.read() << 8) + (is.read() << 16) + (is.read() << 24);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: read32
File: src/net/sourceforge/plantuml/security/SFile.java
Repository: plantuml
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2023-3431
|
MEDIUM
| 5.3
|
plantuml
|
read32
|
src/net/sourceforge/plantuml/security/SFile.java
|
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
| 0
|
Analyze the following code function for security vulnerabilities
|
public Map<String, String> getServerVariables() {
return serverVariables;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getServerVariables
File: samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
getServerVariables
|
samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Bundle getUserRestrictions(ComponentName who, boolean parent) {
if (!mHasFeature) {
return null;
}
Objects.requireNonNull(who, "ComponentName is null");
final CallerIdentity caller = getCallerIdentity(who);
Preconditions.checkCallAuthorization(isDefaultDeviceOwner(caller)
|| isFinancedDeviceOwner(caller)
|| isProfileOwner(caller)
|| (parent && isProfileOwnerOfOrganizationOwnedDevice(caller)));
synchronized (getLockObject()) {
final ActiveAdmin activeAdmin = getParentOfAdminIfRequired(
getProfileOwnerOrDeviceOwnerLocked(caller), parent);
return activeAdmin.userRestrictions;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserRestrictions
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
|
getUserRestrictions
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean unbindService(IServiceConnection connection) throws RemoteException
{
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeStrongBinder(connection.asBinder());
mRemote.transact(UNBIND_SERVICE_TRANSACTION, data, reply, 0);
reply.readException();
boolean res = reply.readInt() != 0;
data.recycle();
reply.recycle();
return res;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unbindService
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
unbindService
|
core/java/android/app/ActivityManagerNative.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
public void removeAllColumns() {
for (Column<T, ?> column : getColumns()) {
removeColumn(column);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeAllColumns
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
|
removeAllColumns
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
public DelayedExecutor.Resolver<Connection> getResolver() {
return resolver;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getResolver
File: providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java
Repository: AsyncHttpClient/async-http-client
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2013-7397
|
MEDIUM
| 4.3
|
AsyncHttpClient/async-http-client
|
getResolver
|
providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java
|
df6ed70e86c8fc340ed75563e016c8baa94d7e72
| 0
|
Analyze the following code function for security vulnerabilities
|
@GuardedBy(anyOf = {"this", "mProcLock"})
int getAppStartModeLOSP(int uid, String packageName, int packageTargetSdk,
int callingPid, boolean alwaysRestrict, boolean disabledOnly, boolean forcedStandby) {
if (mInternal.isPendingTopUid(uid)) {
return ActivityManager.APP_START_MODE_NORMAL;
}
UidRecord uidRec = mProcessList.getUidRecordLOSP(uid);
if (DEBUG_BACKGROUND_CHECK) Slog.d(TAG, "checkAllowBackground: uid=" + uid + " pkg="
+ packageName + " rec=" + uidRec + " always=" + alwaysRestrict + " idle="
+ (uidRec != null ? uidRec.isIdle() : false));
if (uidRec == null || alwaysRestrict || forcedStandby || uidRec.isIdle()) {
boolean ephemeral;
if (uidRec == null) {
ephemeral = getPackageManagerInternal().isPackageEphemeral(
UserHandle.getUserId(uid), packageName);
} else {
ephemeral = uidRec.isEphemeral();
}
if (ephemeral) {
// We are hard-core about ephemeral apps not running in the background.
return ActivityManager.APP_START_MODE_DISABLED;
} else {
if (disabledOnly) {
// The caller is only interested in whether app starts are completely
// disabled for the given package (that is, it is an instant app). So
// we don't need to go further, which is all just seeing if we should
// apply a "delayed" mode for a regular app.
return ActivityManager.APP_START_MODE_NORMAL;
}
final int startMode = (alwaysRestrict)
? appRestrictedInBackgroundLOSP(uid, packageName, packageTargetSdk)
: appServicesRestrictedInBackgroundLOSP(uid, packageName,
packageTargetSdk);
if (DEBUG_BACKGROUND_CHECK) {
Slog.d(TAG, "checkAllowBackground: uid=" + uid
+ " pkg=" + packageName + " startMode=" + startMode
+ " onallowlist=" + isOnDeviceIdleAllowlistLOSP(uid, false)
+ " onallowlist(ei)=" + isOnDeviceIdleAllowlistLOSP(uid, true));
}
if (startMode == ActivityManager.APP_START_MODE_DELAYED) {
// This is an old app that has been forced into a "compatible as possible"
// mode of background check. To increase compatibility, we will allow other
// foreground apps to cause its services to start.
if (callingPid >= 0) {
ProcessRecord proc;
synchronized (mPidsSelfLocked) {
proc = mPidsSelfLocked.get(callingPid);
}
if (proc != null && !ActivityManager.isProcStateBackground(
proc.mState.getCurProcState())) {
// Whoever is instigating this is in the foreground, so we will allow it
// to go through.
return ActivityManager.APP_START_MODE_NORMAL;
}
}
}
return startMode;
}
}
return ActivityManager.APP_START_MODE_NORMAL;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAppStartModeLOSP
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
|
getAppStartModeLOSP
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isReadOnly() {
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isReadOnly
File: src/com/facebook/buck/cli/ParserCacheCommand.java
Repository: facebook/buck
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2018-6331
|
HIGH
| 7.5
|
facebook/buck
|
isReadOnly
|
src/com/facebook/buck/cli/ParserCacheCommand.java
|
8c5500981812564877bd122c0f8fab48d3528ddf
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setNioParams(NioParams nioParams) {
this.nioParams = nioParams;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setNioParams
File: src/main/java/com/rabbitmq/client/ConnectionFactory.java
Repository: rabbitmq/rabbitmq-java-client
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-46120
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-java-client
|
setNioParams
|
src/main/java/com/rabbitmq/client/ConnectionFactory.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
public FF4jConfiguration parseSystemConfiguration() {
return parseConfiguration(System.getProperties());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseSystemConfiguration
File: ff4j-config-properties/src/main/java/org/ff4j/parser/properties/PropertiesParser.java
Repository: ff4j
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2022-44262
|
CRITICAL
| 9.8
|
ff4j
|
parseSystemConfiguration
|
ff4j-config-properties/src/main/java/org/ff4j/parser/properties/PropertiesParser.java
|
991df72725f78adbc413d9b0fbb676201f1882e0
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequestMapping(value = { "/update" })
public String actionUpdate(final HttpServletRequest theReq, final HomeRequest theRequest, final BindingResult theBindingResult, final ModelMap theModel) {
doActionCreateOrValidate(theReq, theRequest, theBindingResult, theModel, "update");
return "result";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: actionUpdate
File: hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/Controller.java
Repository: hapifhir/hapi-fhir
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-24301
|
MEDIUM
| 4.3
|
hapifhir/hapi-fhir
|
actionUpdate
|
hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/Controller.java
|
adb3734fcbbf9a9165445e9ee5eef168dbcaedaf
| 0
|
Analyze the following code function for security vulnerabilities
|
public String dialogButtonsOkCancel() {
return dialogButtons(new int[] {BUTTON_OK, BUTTON_CANCEL}, new String[2]);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dialogButtonsOkCancel
File: src/org/opencms/workplace/CmsDialog.java
Repository: alkacon/opencms-core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2013-4600
|
MEDIUM
| 4.3
|
alkacon/opencms-core
|
dialogButtonsOkCancel
|
src/org/opencms/workplace/CmsDialog.java
|
72a05e3ea1cf692e2efce002687272e63f98c14a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void notifyWarnings(Warnings warnings) {
style.addWarnings(warnings);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: notifyWarnings
File: org/w3c/css/css/StyleSheetParser.java
Repository: w3c/css-validator
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-4070
|
LOW
| 3.5
|
w3c/css-validator
|
notifyWarnings
|
org/w3c/css/css/StyleSheetParser.java
|
e5c09a9119167d3064db786d5f00d730b584a53b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void save6noUpsert(TestContext context) {
String id = randomUuid();
PostgresClient postgresClient = createFoo(context);
postgresClient.save(FOO, id, xPojo, /* returnId */ true, /* upsert */ false, context.asyncAssertSuccess(save -> {
context.assertEquals(id, save);
postgresClient.getById(FOO, id, context.asyncAssertSuccess(get -> {
context.assertEquals("x", get.getString("key"));
postgresClient.save(FOO, id, singleQuotePojo, /* returnId */ true, /* upsert */ false, context.asyncAssertFailure(update -> {
context.assertTrue(update.getMessage().contains("duplicate key"), update.getMessage());
postgresClient.getById(FOO, id, context.asyncAssertSuccess(get2 -> {
context.assertEquals("x", get2.getString("key"));
}));
}));
}));
}));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: save6noUpsert
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
|
save6noUpsert
|
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
public @NonNull Bundle getUserRestrictionsGlobally() {
throwIfParentInstance("createAdminSupportIntent");
Bundle ret = null;
if (mService != null) {
try {
ret = mService.getUserRestrictionsGlobally(mContext.getPackageName());
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
return ret == null ? new Bundle() : ret;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserRestrictionsGlobally
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
|
getUserRestrictionsGlobally
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getPriority() {
return mPriority;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPriority
File: framework/java/android/net/wifi/hotspot2/pps/Policy.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21240
|
MEDIUM
| 5.5
|
android
|
getPriority
|
framework/java/android/net/wifi/hotspot2/pps/Policy.java
|
69119d1d3102e27b6473c785125696881bce9563
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getStyleAttribute() {
final int styleAttributeId = nativeGetStyleAttribute(mParseState);
if (styleAttributeId == ERROR_NULL_DOCUMENT) {
throw new NullPointerException("Null document");
}
return styleAttributeId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStyleAttribute
File: core/java/android/content/res/XmlBlock.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-415"
] |
CVE-2023-40103
|
HIGH
| 7.8
|
android
|
getStyleAttribute
|
core/java/android/content/res/XmlBlock.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable
final PackageInfo getPackageInfo(String packageName, @UserIdInt int userId) {
return getPackageInfo(packageName, userId, false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPackageInfo
File: services/core/java/com/android/server/pm/ShortcutService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40079
|
HIGH
| 7.8
|
android
|
getPackageInfo
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getOrMaskValue(String value) {
return maskSensitiveFields ? MASK_FOR_SENSITIVE_DATA : value;
}
|
Vulnerability Classification:
- CWE: CWE-522
- CVE: CVE-2023-33264
- Severity: MEDIUM
- CVSS Score: 4.3
Description: Extend set of masked fields in ConfigXmlGenerator
Function: getOrMaskValue
File: hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
Repository: hazelcast
Fixed Code:
private String getOrMaskValue(String value) {
if (value == null) {
return null;
}
return maskSensitiveFields ? MASK_FOR_SENSITIVE_DATA : value;
}
|
[
"CWE-522"
] |
CVE-2023-33264
|
MEDIUM
| 4.3
|
hazelcast
|
getOrMaskValue
|
hazelcast/src/main/java/com/hazelcast/config/ConfigXmlGenerator.java
|
80a502d53cc48bf895711ab55f95e3a51e344ac1
| 1
|
Analyze the following code function for security vulnerabilities
|
private static void initRoute() {
// 添加浏览者能访问Control 路由
currentRoutes.add("/api/v1/" + com.zrlog.common.Constants.getArticleRoute(), ApiArticleController.class);
if (!"".equals(com.zrlog.common.Constants.getArticleRoute())) {
currentRoutes.add("/" + com.zrlog.common.Constants.getArticleRoute(), ArticleController.class);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initRoute
File: web/src/main/java/com/zrlog/web/config/ZrLogConfig.java
Repository: 94fzb/zrlog
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-16643
|
LOW
| 3.5
|
94fzb/zrlog
|
initRoute
|
web/src/main/java/com/zrlog/web/config/ZrLogConfig.java
|
4a91c83af669e31a22297c14f089d8911d353fa1
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("javadoc")
@SuppressLint("MissingSuperCall")
public void onDetachedFromWindow() {
setInjectedAccessibility(false);
hidePopups();
mZoomControlsDelegate.dismissZoomPicker();
unregisterAccessibilityContentObserver();
ScreenOrientationListener.getInstance().removeObserver(this);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onDetachedFromWindow
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
|
onDetachedFromWindow
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("unchecked")
private void parseFeatures(FF4jConfiguration ff4jConfig, List<Map<String, Object>> features) {
if (null != features) {
features.forEach(feature -> {
String name = (String) feature.get(FEATURE_ATT_UID);
if (null == name) throw new IllegalArgumentException("Invalid YAML File: 'uid' is expected for feature");
Feature f = new Feature(name);
// Enabled
Boolean enabled = (Boolean) feature.get(FEATURE_ATT_ENABLE);
if (null != enabled) f.setEnable(enabled);
// Description
String description = (String) feature.get(FEATURE_ATT_DESC);
if (null != description) f.setDescription(description);
// Group
String groupName = (String) feature.get(FEATURE_ATT_GROUP);
if (null != groupName) f.setGroup(groupName);
// Permissions
List<String> customPermissons = (List<String>) feature.get(FEATURE_ATT_PERMISSIONS);
if (customPermissons != null) {
f.setPermissions(new HashSet<>(customPermissons));
}
// Toggle Strategies
Map<String, Object> mapFlipStrategy = (Map<String, Object>) feature.get(TOGGLE_STRATEGY_TAG);
if (null != mapFlipStrategy) {
f.setFlippingStrategy(parseFlipStrategy(f, mapFlipStrategy));
}
// Custom Properties
List<Map<String, Object>> customProperties = (List<Map<String, Object>>) feature.get(FEATURE_ATT_PROPERTIES);
if (customProperties != null) {
f.setCustomProperties(parseProperties(customProperties));
}
ff4jConfig.getFeatures().put(f.getUid(), f);
});
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseFeatures
File: ff4j-config-yaml/src/main/java/org/ff4j/parser/yaml/YamlParser.java
Repository: ff4j
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2022-44262
|
CRITICAL
| 9.8
|
ff4j
|
parseFeatures
|
ff4j-config-yaml/src/main/java/org/ff4j/parser/yaml/YamlParser.java
|
991df72725f78adbc413d9b0fbb676201f1882e0
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Project findByPath(String path) {
cacheLock.readLock().lock();
try {
Long projectId = findProjectId(path);
if (projectId != null)
return load(projectId);
else
return null;
} finally {
cacheLock.readLock().unlock();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findByPath
File: server-core/src/main/java/io/onedev/server/entitymanager/impl/DefaultProjectManager.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2022-39205
|
CRITICAL
| 9.8
|
theonedev/onedev
|
findByPath
|
server-core/src/main/java/io/onedev/server/entitymanager/impl/DefaultProjectManager.java
|
f1e97688e4e19d6de1dfa1d00e04655209d39f8e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void removeAll(Channel channel) {
channelPool.removeAll(channel);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeAll
File: providers/netty/src/main/java/org/asynchttpclient/providers/netty/channel/Channels.java
Repository: AsyncHttpClient/async-http-client
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2013-7397
|
MEDIUM
| 4.3
|
AsyncHttpClient/async-http-client
|
removeAll
|
providers/netty/src/main/java/org/asynchttpclient/providers/netty/channel/Channels.java
|
df6ed70e86c8fc340ed75563e016c8baa94d7e72
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public ServerBuilder decorator(
String pathPattern, Function<? super HttpService, ? extends HttpService> decorator) {
virtualHostTemplate.decorator(pathPattern, decorator);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: decorator
File: core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-44487
|
HIGH
| 7.5
|
line/armeria
|
decorator
|
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
|
df7f85824a62e997b910b5d6194a3335841065fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getJobQueueSize() {
return getIntProperty(TS_JOB_QUEUE_SIZE, 100);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getJobQueueSize
File: frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java
Repository: pytorch/serve
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2023-43654
|
CRITICAL
| 9.8
|
pytorch/serve
|
getJobQueueSize
|
frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java
|
391bdec3348e30de173fbb7c7277970e0b53c8ad
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void beginRequest() {
CACHE.set(new LinkedList<RequestScopedItem>());
}
|
Vulnerability Classification:
- CWE: CWE-362
- CVE: CVE-2014-8122
- Severity: MEDIUM
- CVSS Score: 4.3
Description: WELD-1802 RequestScopedCache - Make sure each request is ended before a new one is started
Function: beginRequest
File: impl/src/main/java/org/jboss/weld/context/cache/RequestScopedCache.java
Repository: weld/core
Fixed Code:
public static void beginRequest() {
// if the previous request was not ended properly for some reason, make sure it is ended now
endRequest();
CACHE.set(new LinkedList<RequestScopedItem>());
}
|
[
"CWE-362"
] |
CVE-2014-8122
|
MEDIUM
| 4.3
|
weld/core
|
beginRequest
|
impl/src/main/java/org/jboss/weld/context/cache/RequestScopedCache.java
|
6808b11cd6d97c71a2eed754ed4f955acd789086
| 1
|
Analyze the following code function for security vulnerabilities
|
public void setIp(String ip) {
this.ip = ip;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setIp
File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/log/LogLogin.java
Repository: sanluan/PublicCMS
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-21333
|
LOW
| 3.5
|
sanluan/PublicCMS
|
setIp
|
publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/log/LogLogin.java
|
b4d5956e65b14347b162424abb197a180229b3db
| 0
|
Analyze the following code function for security vulnerabilities
|
private void configureGit() {
contribute(ObjectMapperConfigurator.class, GitObjectMapperConfigurator.class);
bind(GitConfig.class).toProvider(GitConfigProvider.class);
bind(GitFilter.class);
bind(GitPreReceiveCallback.class);
bind(GitPostReceiveCallback.class);
contribute(SshCommandCreator.class, GitSshCommandCreator.class);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: configureGit
File: server-core/src/main/java/io/onedev/server/CoreModule.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2021-21242
|
HIGH
| 7.5
|
theonedev/onedev
|
configureGit
|
server-core/src/main/java/io/onedev/server/CoreModule.java
|
f864053176c08f59ef2d97fea192ceca46a4d9be
| 0
|
Analyze the following code function for security vulnerabilities
|
protected abstract void setDigitPos(int position, byte value);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDigitPos
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
|
setDigitPos
|
icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_AbstractBCD.java
|
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getEditorPreference()
{
return this.xwiki.getEditorPreference(getXWikiContext());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getEditorPreference
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
|
getEditorPreference
|
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
|
@NeverCompile // Avoid size overhead of debugging code.
final void dumpApplicationMemoryUsage(FileDescriptor fd, PrintWriter pw, String prefix,
String[] args, boolean brief, PrintWriter categoryPw, boolean asProto) {
MemoryUsageDumpOptions opts = new MemoryUsageDumpOptions();
opts.dumpDetails = false;
opts.dumpFullDetails = false;
opts.dumpDalvik = false;
opts.dumpSummaryOnly = false;
opts.dumpUnreachable = false;
opts.oomOnly = false;
opts.isCompact = false;
opts.localOnly = false;
opts.packages = false;
opts.isCheckinRequest = false;
opts.dumpSwapPss = false;
opts.dumpProto = asProto;
int opti = 0;
while (opti < args.length) {
String opt = args[opti];
if (opt == null || opt.length() <= 0 || opt.charAt(0) != '-') {
break;
}
opti++;
if ("-a".equals(opt)) {
opts.dumpDetails = true;
opts.dumpFullDetails = true;
opts.dumpDalvik = true;
opts.dumpSwapPss = true;
} else if ("-d".equals(opt)) {
opts.dumpDalvik = true;
} else if ("-c".equals(opt)) {
opts.isCompact = true;
} else if ("-s".equals(opt)) {
opts.dumpDetails = true;
opts.dumpSummaryOnly = true;
} else if ("-S".equals(opt)) {
opts.dumpSwapPss = true;
} else if ("--unreachable".equals(opt)) {
opts.dumpUnreachable = true;
} else if ("--oom".equals(opt)) {
opts.oomOnly = true;
} else if ("--local".equals(opt)) {
opts.localOnly = true;
} else if ("--package".equals(opt)) {
opts.packages = true;
} else if ("--checkin".equals(opt)) {
opts.isCheckinRequest = true;
} else if ("--proto".equals(opt)) {
opts.dumpProto = true;
} else if ("-h".equals(opt)) {
pw.println("meminfo dump options: [-a] [-d] [-c] [-s] [--oom] [process]");
pw.println(" -a: include all available information for each process.");
pw.println(" -d: include dalvik details.");
pw.println(" -c: dump in a compact machine-parseable representation.");
pw.println(" -s: dump only summary of application memory usage.");
pw.println(" -S: dump also SwapPss.");
pw.println(" --oom: only show processes organized by oom adj.");
pw.println(" --local: only collect details locally, don't call process.");
pw.println(" --package: interpret process arg as package, dumping all");
pw.println(" processes that have loaded that package.");
pw.println(" --checkin: dump data for a checkin");
pw.println(" --proto: dump data to proto");
pw.println("If [process] is specified it can be the name or ");
pw.println("pid of a specific process to dump.");
return;
} else {
pw.println("Unknown argument: " + opt + "; use -h for help");
}
}
String[] innerArgs = new String[args.length-opti];
System.arraycopy(args, opti, innerArgs, 0, args.length-opti);
ArrayList<ProcessRecord> procs = collectProcesses(pw, opti, opts.packages, args);
if (opts.dumpProto) {
dumpApplicationMemoryUsage(fd, opts, innerArgs, brief, procs);
} else {
dumpApplicationMemoryUsage(fd, pw, prefix, opts, innerArgs, brief, procs, categoryPw);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpApplicationMemoryUsage
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
|
dumpApplicationMemoryUsage
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
private native void interopDatabaseAddNative(int feature, byte[] address, int length);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: interopDatabaseAddNative
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
|
interopDatabaseAddNative
|
src/com/android/bluetooth/btservice/AdapterService.java
|
122feb9a0b04290f55183ff2f0384c6c53756bd8
| 0
|
Analyze the following code function for security vulnerabilities
|
public JWT decode(String encodedJWT, Map<String, Verifier> verifiers) {
return decode(encodedJWT, verifiers, h -> h.get("kid"));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: decode
File: src/main/java/org/primeframework/jwt/JWTDecoder.java
Repository: FusionAuth/fusionauth-jwt
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-1000125
|
HIGH
| 7.5
|
FusionAuth/fusionauth-jwt
|
decode
|
src/main/java/org/primeframework/jwt/JWTDecoder.java
|
0d94dcef0133d699f21d217e922564adbb83a227
| 0
|
Analyze the following code function for security vulnerabilities
|
public void broadcastNetworkIdentityRequestEvent(String iface, int networkId, String ssid) {
sendMessage(iface, SUP_REQUEST_IDENTITY, 0, networkId, ssid);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: broadcastNetworkIdentityRequestEvent
File: service/java/com/android/server/wifi/WifiMonitor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
broadcastNetworkIdentityRequestEvent
|
service/java/com/android/server/wifi/WifiMonitor.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void writeDesign(Element design,
DesignContext designContext) {
Attributes attributes = design.attributes();
GridColumnState def = new GridColumnState();
DesignAttributeHandler.writeAttribute("property-id", attributes,
getPropertyId(), null, Object.class);
// Sortable is a special attribute that depends on the container.
DesignAttributeHandler.writeAttribute("sortable", attributes,
isSortable(), null, boolean.class);
DesignAttributeHandler.writeAttribute("editable", attributes,
isEditable(), def.editable, boolean.class);
DesignAttributeHandler.writeAttribute("resizable", attributes,
isResizable(), def.resizable, boolean.class);
DesignAttributeHandler.writeAttribute("hidable", attributes,
isHidable(), def.hidable, boolean.class);
DesignAttributeHandler.writeAttribute("hidden", attributes,
isHidden(), def.hidden, boolean.class);
DesignAttributeHandler.writeAttribute("hiding-toggle-caption",
attributes, getHidingToggleCaption(), null, String.class);
DesignAttributeHandler.writeAttribute("width", attributes,
getWidth(), def.width, Double.class);
DesignAttributeHandler.writeAttribute("min-width", attributes,
getMinimumWidth(), def.minWidth, Double.class);
DesignAttributeHandler.writeAttribute("max-width", attributes,
getMaximumWidth(), def.maxWidth, Double.class);
DesignAttributeHandler.writeAttribute("expand", attributes,
getExpandRatio(), def.expandRatio, Integer.class);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeDesign
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
|
writeDesign
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isCallerActiveAdminOrDelegate(
CallerIdentity caller, @Nullable String delegateScope) {
return mInjector.binderWithCleanCallingIdentity(() -> {
List<ComponentName> activeAdmins = getActiveAdmins(caller.getUserId());
if (activeAdmins != null) {
for (ComponentName admin : activeAdmins) {
if (admin.getPackageName().equals(caller.getPackageName())) {
return true;
}
}
}
return delegateScope != null && isCallerDelegate(caller, delegateScope);
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isCallerActiveAdminOrDelegate
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
|
isCallerActiveAdminOrDelegate
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void onWorkChallengeChanged() {
updatePublicMode();
updateNotifications();
if (mPendingWorkRemoteInputView != null && !isAnyProfilePublicMode()) {
// Expand notification panel and the notification row, then click on remote input view
final Runnable clickPendingViewRunnable = new Runnable() {
@Override
public void run() {
final View pendingWorkRemoteInputView = mPendingWorkRemoteInputView;
if (pendingWorkRemoteInputView == null) {
return;
}
// Climb up the hierarchy until we get to the container for this row.
ViewParent p = pendingWorkRemoteInputView.getParent();
while (!(p instanceof ExpandableNotificationRow)) {
if (p == null) {
return;
}
p = p.getParent();
}
final ExpandableNotificationRow row = (ExpandableNotificationRow) p;
ViewParent viewParent = row.getParent();
if (viewParent instanceof NotificationStackScrollLayout) {
final NotificationStackScrollLayout scrollLayout =
(NotificationStackScrollLayout) viewParent;
row.makeActionsVisibile();
row.post(new Runnable() {
@Override
public void run() {
final Runnable finishScrollingCallback = new Runnable() {
@Override
public void run() {
mPendingWorkRemoteInputView.callOnClick();
mPendingWorkRemoteInputView = null;
scrollLayout.setFinishScrollingCallback(null);
}
};
if (scrollLayout.scrollTo(row)) {
// It scrolls! So call it when it's finished.
scrollLayout.setFinishScrollingCallback(
finishScrollingCallback);
} else {
// It does not scroll, so call it now!
finishScrollingCallback.run();
}
}
});
}
}
};
mNotificationPanel.getViewTreeObserver().addOnGlobalLayoutListener(
new ViewTreeObserver.OnGlobalLayoutListener() {
@Override
public void onGlobalLayout() {
if (mNotificationPanel.mStatusBar.getStatusBarWindow()
.getHeight() != mNotificationPanel.mStatusBar
.getStatusBarHeight()) {
mNotificationPanel.getViewTreeObserver()
.removeOnGlobalLayoutListener(this);
mNotificationPanel.post(clickPendingViewRunnable);
}
}
});
instantExpandNotificationsPanel();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onWorkChallengeChanged
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
|
onWorkChallengeChanged
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int startVoiceActivity(String callingPackage, int callingPid, int callingUid,
Intent intent, String resolvedType, IVoiceInteractionSession session,
IVoiceInteractor interactor, int startFlags, ProfilerInfo profilerInfo,
Bundle options, int userId) {
if (checkCallingPermission(Manifest.permission.BIND_VOICE_INTERACTION)
!= PackageManager.PERMISSION_GRANTED) {
String msg = "Permission Denial: startVoiceActivity() from pid="
+ Binder.getCallingPid()
+ ", uid=" + Binder.getCallingUid()
+ " requires " + android.Manifest.permission.BIND_VOICE_INTERACTION;
Slog.w(TAG, msg);
throw new SecurityException(msg);
}
if (session == null || interactor == null) {
throw new NullPointerException("null session or interactor");
}
userId = handleIncomingUser(callingPid, callingUid, userId,
false, ALLOW_FULL_ONLY, "startVoiceActivity", null);
// TODO: Switch to user app stacks here.
return mStackSupervisor.startActivityMayWait(null, callingUid, callingPackage, intent,
resolvedType, session, interactor, null, null, 0, startFlags, profilerInfo, null,
null, options, false, userId, null, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startVoiceActivity
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2500
|
MEDIUM
| 4.3
|
android
|
startVoiceActivity
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
9878bb99b77c3681f0fda116e2964bac26f349c3
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getLineBounds(int line, Rect bounds) {
if (bounds != null) {
bounds.left = 0; // ???
bounds.top = getLineTop(line);
bounds.right = mWidth; // ???
bounds.bottom = getLineTop(line + 1);
}
return getLineBaseline(line);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLineBounds
File: core/java/android/text/Layout.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-9452
|
MEDIUM
| 4.3
|
android
|
getLineBounds
|
core/java/android/text/Layout.java
|
3b6f84b77c30ec0bab5147b0cffc192c86ba2634
| 0
|
Analyze the following code function for security vulnerabilities
|
private XDOM displayTitle(DocumentModelBridge document, DocumentDisplayerParameters parameters)
{
// 1. Try to use the title provided by the user.
String rawTitle = document.getTitle();
if (!StringUtils.isEmpty(rawTitle)) {
try {
String title = rawTitle;
// Evaluate the title only if the document has script rights, otherwise use the raw title.
if (authorizationManager.hasAccess(Right.SCRIPT, document.getContentAuthorReference(),
document.getDocumentReference())) {
title = evaluateTitle(rawTitle, document.getDocumentReference(), parameters);
}
return parseTitle(title);
} catch (Exception e) {
logger.warn("Failed to interpret title of document [{}].", document.getDocumentReference(), e);
}
}
// 2. Try to extract the title from the document content.
if ("1".equals(this.xwikicfg.getProperty("xwiki.title.compatibility", "0"))) {
try {
XDOM title = extractTitleFromContent(document, parameters);
if (title != null) {
return title;
}
} catch (Exception e) {
logger.warn("Failed to extract title from content of document [{}].", document.getDocumentReference(),
e);
}
}
// 3. The title was not specified or its evaluation failed. Use the document name as a fall-back.
return getStaticTitle(document);
}
|
Vulnerability Classification:
- CWE: CWE-863
- CVE: CVE-2023-46244
- Severity: HIGH
- CVSS Score: 8.8
Description: XWIKI-20624: Improve title display for modified documents
Function: displayTitle
File: xwiki-platform-core/xwiki-platform-display/xwiki-platform-display-api/src/main/java/org/xwiki/display/internal/AbstractDocumentTitleDisplayer.java
Repository: xwiki/xwiki-platform
Fixed Code:
private XDOM displayTitle(DocumentModelBridge document, DocumentDisplayerParameters parameters)
{
// 1. Try to use the title provided by the user.
String rawTitle = document.getTitle();
if (!StringUtils.isEmpty(rawTitle)) {
try {
String title = rawTitle;
// Evaluate the title only if the document has script rights, otherwise use the raw title.
if (authorizationManager.hasAccess(Right.SCRIPT, document.getContentAuthorReference(),
document.getDocumentReference())) {
title = evaluateTitle(rawTitle, document, parameters);
}
return parseTitle(title);
} catch (Exception e) {
logger.warn("Failed to interpret title of document [{}].", document.getDocumentReference(), e);
}
}
// 2. Try to extract the title from the document content.
if ("1".equals(this.xwikicfg.getProperty("xwiki.title.compatibility", "0"))) {
try {
XDOM title = extractTitleFromContent(document, parameters);
if (title != null) {
return title;
}
} catch (Exception e) {
logger.warn("Failed to extract title from content of document [{}].", document.getDocumentReference(),
e);
}
}
// 3. The title was not specified or its evaluation failed. Use the document name as a fall-back.
return getStaticTitle(document);
}
|
[
"CWE-863"
] |
CVE-2023-46244
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
displayTitle
|
xwiki-platform-core/xwiki-platform-display/xwiki-platform-display-api/src/main/java/org/xwiki/display/internal/AbstractDocumentTitleDisplayer.java
|
11a9170dfe63e59f4066db67f84dbfce4ed619c6
| 1
|
Analyze the following code function for security vulnerabilities
|
public String getEncoded() {
return encoded;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getEncoded
File: base/common/src/main/java/com/netscape/certsrv/cert/CertRevokeRequest.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
getEncoded
|
base/common/src/main/java/com/netscape/certsrv/cert/CertRevokeRequest.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
protected boolean skipSpaces() throws IOException {
if (DEBUG_BUFFER) {
fCurrentEntity.debugBufferIfNeeded("(skipSpaces: ");
}
boolean spaces = false;
while (true) {
if (fCurrentEntity.offset == fCurrentEntity.length) {
if (fCurrentEntity.load(0) == -1) {
break;
}
}
char c = fCurrentEntity.getNextChar();
if (!Character.isWhitespace(c)) {
fCurrentEntity.rewind();
break;
}
spaces = true;
if (c == '\r' || c == '\n') {
fCurrentEntity.rewind();
skipNewlines();
continue;
}
}
if (DEBUG_BUFFER) {
fCurrentEntity.debugBufferIfNeeded(")skipSpaces: ", " -> " + spaces);
}
return spaces;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: skipSpaces
File: src/org/cyberneko/html/HTMLScanner.java
Repository: sparklemotion/nekohtml
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-24839
|
MEDIUM
| 5
|
sparklemotion/nekohtml
|
skipSpaces
|
src/org/cyberneko/html/HTMLScanner.java
|
a800fce3b079def130ed42a408ff1d09f89e773d
| 0
|
Analyze the following code function for security vulnerabilities
|
protected IBaseResource addCommonParams(HttpServletRequest theServletRequest, final HomeRequest theRequest, final ModelMap theModel) {
final String serverId = theRequest.getServerIdWithDefault(myConfig);
final String serverBase = theRequest.getServerBase(theServletRequest, myConfig);
final String serverName = theRequest.getServerName(myConfig);
final String apiKey = theRequest.getApiKey(theServletRequest, myConfig);
theModel.put("serverId", serverId);
theModel.put("base", serverBase);
theModel.put("baseName", serverName);
theModel.put("apiKey", apiKey);
theModel.put("resourceName", defaultString(theRequest.getResource()));
theModel.put("encoding", theRequest.getEncoding());
theModel.put("pretty", theRequest.getPretty());
theModel.put("_summary", theRequest.get_summary());
theModel.put("serverEntries", myConfig.getIdToServerName());
return loadAndAddConf(theServletRequest, theRequest, theModel);
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2019-12741
- Severity: MEDIUM
- CVSS Score: 4.3
Description: Fix a potential security vulneability in the testpage overlay
Function: addCommonParams
File: hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/BaseController.java
Repository: hapifhir/hapi-fhir
Fixed Code:
protected IBaseResource addCommonParams(HttpServletRequest theServletRequest, final HomeRequest theRequest, final ModelMap theModel) {
final String serverId = theRequest.getServerIdWithDefault(myConfig);
final String serverBase = theRequest.getServerBase(theServletRequest, myConfig);
final String serverName = theRequest.getServerName(myConfig);
final String apiKey = theRequest.getApiKey(theServletRequest, myConfig);
theModel.put("serverId", sanitizeInput(serverId));
theModel.put("base", sanitizeInput(serverBase));
theModel.put("baseName", sanitizeInput(serverName));
theModel.put("apiKey", sanitizeInput(apiKey));
theModel.put("resourceName", sanitizeInput(defaultString(theRequest.getResource())));
theModel.put("encoding", sanitizeInput(theRequest.getEncoding()));
theModel.put("pretty", sanitizeInput(theRequest.getPretty()));
theModel.put("_summary", sanitizeInput(theRequest.get_summary()));
theModel.put("serverEntries", myConfig.getIdToServerName());
return loadAndAddConf(theServletRequest, theRequest, theModel);
}
|
[
"CWE-79"
] |
CVE-2019-12741
|
MEDIUM
| 4.3
|
hapifhir/hapi-fhir
|
addCommonParams
|
hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/BaseController.java
|
8f41159eb147eeb964cad68b28eff97acac6ea9a
| 1
|
Analyze the following code function for security vulnerabilities
|
public InputStream exportAll(XmlConfig conf) throws IOException {
return exportAll(conf.getFeatures(), conf.getProperties());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: exportAll
File: ff4j-core/src/main/java/org/ff4j/conf/XmlParser.java
Repository: ff4j
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2022-44262
|
CRITICAL
| 9.8
|
ff4j
|
exportAll
|
ff4j-core/src/main/java/org/ff4j/conf/XmlParser.java
|
991df72725f78adbc413d9b0fbb676201f1882e0
| 0
|
Analyze the following code function for security vulnerabilities
|
public NotificationStackScrollLayout getNotificationScrollLayout() {
return mStackScroller;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNotificationScrollLayout
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
|
getNotificationScrollLayout
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public Entity<?> serialize(Object obj, Map<String, Object> formParams, String contentType, boolean isBodyNullable) throws ApiException {
Entity<?> entity;
if (contentType.startsWith("multipart/form-data")) {
MultiPart multiPart = new MultiPart();
for (Entry<String, Object> param: formParams.entrySet()) {
if (param.getValue() instanceof File) {
File file = (File) param.getValue();
FormDataContentDisposition contentDisp = FormDataContentDisposition.name(param.getKey())
.fileName(file.getName()).size(file.length()).build();
multiPart.bodyPart(new FormDataBodyPart(contentDisp, file, MediaType.APPLICATION_OCTET_STREAM_TYPE));
} else {
FormDataContentDisposition contentDisp = FormDataContentDisposition.name(param.getKey()).build();
multiPart.bodyPart(new FormDataBodyPart(contentDisp, parameterToString(param.getValue())));
}
}
entity = Entity.entity(multiPart, MediaType.MULTIPART_FORM_DATA_TYPE);
} else if (contentType.startsWith("application/x-www-form-urlencoded")) {
Form form = new Form();
for (Entry<String, Object> param: formParams.entrySet()) {
form.param(param.getKey(), parameterToString(param.getValue()));
}
entity = Entity.entity(form, MediaType.APPLICATION_FORM_URLENCODED_TYPE);
} else {
// We let jersey handle the serialization
if (isBodyNullable) { // payload is nullable
if (obj instanceof String) {
entity = Entity.entity(obj == null ? "null" : "\"" + ((String)obj).replaceAll("\"", Matcher.quoteReplacement("\\\"")) + "\"", contentType);
} else {
entity = Entity.entity(obj == null ? "null" : obj, contentType);
}
} else {
if (obj instanceof String) {
entity = Entity.entity(obj == null ? "" : "\"" + ((String)obj).replaceAll("\"", Matcher.quoteReplacement("\\\"")) + "\"", contentType);
} else {
entity = Entity.entity(obj == null ? "" : obj, contentType);
}
}
}
return entity;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: serialize
File: samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
serialize
|
samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
default void onNetworkEnabled(@NonNull WifiConfiguration config) { }
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onNetworkEnabled
File: service/java/com/android/server/wifi/WifiConfigManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
onNetworkEnabled
|
service/java/com/android/server/wifi/WifiConfigManager.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
private static native void write(int fd, byte[] b, int offset, int length)
throws IOException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: write
File: classpath/java/io/FileOutputStream.java
Repository: ReadyTalk/avian
The code follows secure coding practices.
|
[
"CWE-190",
"CWE-787"
] |
CVE-2020-28371
|
HIGH
| 7.5
|
ReadyTalk/avian
|
write
|
classpath/java/io/FileOutputStream.java
|
0871979b298add320ca63f65060acb7532c8a0dd
| 0
|
Analyze the following code function for security vulnerabilities
|
Endpoint requestEndpoint(String url, String alias) {
Map<String, Object> map = Utils.httpRequest(
url,
"GET",
"application/xrds+xml",
null,
timeOut
);
try {
String content = Utils.getContent(map);
return new Endpoint(Utils.mid(content, "<URI>", "</URI>"), alias, Utils.getMaxAge(map));
}
catch(UnsupportedEncodingException e) {
throw new OpenIdException(e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: requestEndpoint
File: JOpenId/src/org/expressme/openid/OpenIdManager.java
Repository: michaelliao/jopenid
The code follows secure coding practices.
|
[
"CWE-208"
] |
CVE-2010-10006
|
LOW
| 1.4
|
michaelliao/jopenid
|
requestEndpoint
|
JOpenId/src/org/expressme/openid/OpenIdManager.java
|
c9baaa976b684637f0d5a50268e91846a7a719ab
| 0
|
Analyze the following code function for security vulnerabilities
|
private void enforceUsageStatsPermission(String callingPackage,
int callingUid, int callingPid, String operation) {
if (!hasUsageStatsPermission(callingPackage, callingUid, callingPid)) {
final String errorMsg = "Permission denial for <" + operation + "> from pid="
+ Binder.getCallingPid() + ", uid=" + Binder.getCallingUid()
+ " which requires PACKAGE_USAGE_STATS permission";
throw new SecurityException(errorMsg);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: enforceUsageStatsPermission
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
|
enforceUsageStatsPermission
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean superOnClickHandler(View view, PendingIntent pendingIntent,
Intent fillInIntent) {
return super.onClickHandler(view, pendingIntent, fillInIntent,
StackId.FULLSCREEN_WORKSPACE_STACK_ID);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: superOnClickHandler
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
|
superOnClickHandler
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected ResolveInfo newResult(PackageParser.ProviderIntentInfo filter,
int match, int userId) {
if (!sUserManager.exists(userId))
return null;
final PackageParser.ProviderIntentInfo info = filter;
if (!mSettings.isEnabledLPr(info.provider.info, mFlags, userId)) {
return null;
}
final PackageParser.Provider provider = info.provider;
if (mSafeMode && (provider.info.applicationInfo.flags
& ApplicationInfo.FLAG_SYSTEM) == 0) {
return null;
}
PackageSetting ps = (PackageSetting) provider.owner.mExtras;
if (ps == null) {
return null;
}
ProviderInfo pi = PackageParser.generateProviderInfo(provider, mFlags,
ps.readUserState(userId), userId);
if (pi == null) {
return null;
}
final ResolveInfo res = new ResolveInfo();
res.providerInfo = pi;
if ((mFlags & PackageManager.GET_RESOLVED_FILTER) != 0) {
res.filter = filter;
}
res.priority = info.getPriority();
res.preferredOrder = provider.owner.mPreferredOrder;
res.match = match;
res.isDefault = info.hasDefault;
res.labelRes = info.labelRes;
res.nonLocalizedLabel = info.nonLocalizedLabel;
res.icon = info.icon;
res.system = res.providerInfo.applicationInfo.isSystemApp();
return res;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: newResult
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
|
newResult
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean canWrite() {
return internal.canWrite();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: canWrite
File: src/net/sourceforge/plantuml/security/SFile.java
Repository: plantuml
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2023-3431
|
MEDIUM
| 5.3
|
plantuml
|
canWrite
|
src/net/sourceforge/plantuml/security/SFile.java
|
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
| 0
|
Analyze the following code function for security vulnerabilities
|
public Registration addDetachListener(Command detachListener) {
assert detachListener != null;
if (detachListeners == null) {
detachListeners = new ArrayList<>(1);
}
detachListeners.add(detachListener);
return () -> removeDetachListener(detachListener);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addDetachListener
File: flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2023-25499
|
MEDIUM
| 6.5
|
vaadin/flow
|
addDetachListener
|
flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java
|
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
| 0
|
Analyze the following code function for security vulnerabilities
|
private void updateTaskDataInputs(FlowElementsContainer container, Definitions def) {
List<FlowElement> flowElements = container.getFlowElements();
for(FlowElement fe : flowElements) {
if(fe instanceof Task && !(fe instanceof UserTask)) {
Task task = (Task) fe;
boolean foundReadOnlyServiceTask = false;
Iterator<FeatureMap.Entry> iter = task.getAnyAttribute().iterator();
while(iter.hasNext()) {
FeatureMap.Entry entry = iter.next();
if(entry.getEStructuralFeature().getName().equals("taskName")) {
if(entry.getValue().equals("ReadOnlyService")) {
foundReadOnlyServiceTask = true;
}
}
}
if(foundReadOnlyServiceTask) {
if(task.getDataInputAssociations() != null) {
List<DataInputAssociation> dataInputAssociations = task.getDataInputAssociations();
for(DataInputAssociation dia : dataInputAssociations) {
if(dia.getTargetRef().getId().endsWith("TaskNameInput")) {
((FormalExpression) dia.getAssignment().get(0).getFrom()).setBody("ReadOnlyService");
}
}
}
}
} else if(fe instanceof FlowElementsContainer) {
updateTaskDataInputs((FlowElementsContainer) fe, def);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateTaskDataInputs
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
|
updateTaskDataInputs
|
jbpm-designer-backend/src/main/java/org/jbpm/designer/web/server/TransformerServlet.java
|
a143f3b92a6a5a527d929d68c02a0c5d914ab81d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public CharSequence getInProgressLabel() {
return mInProgressLabel;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInProgressLabel
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
getInProgressLabel
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
public static C3P0Config extractXmlConfigFromDefaultResource() throws Exception
{
InputStream is = null;
try
{
is = C3P0ConfigUtils.class.getResourceAsStream(XML_CONFIG_RSRC_PATH);
if ( is == null )
{
warnCommonXmlConfigResourceMisspellings();
return null;
}
else
return extractXmlConfigFromInputStream( is );
}
finally
{
try { if (is != null) is.close(); }
catch (Exception e)
{
if ( logger.isLoggable( MLevel.FINE ) )
logger.log(MLevel.FINE,"Exception on resource InputStream close.", e);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: extractXmlConfigFromDefaultResource
File: src/java/com/mchange/v2/c3p0/cfg/C3P0ConfigXmlUtils.java
Repository: zhutougg/c3p0
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-20433
|
HIGH
| 7.5
|
zhutougg/c3p0
|
extractXmlConfigFromDefaultResource
|
src/java/com/mchange/v2/c3p0/cfg/C3P0ConfigXmlUtils.java
|
2eb0ea97f745740b18dd45e4a909112d4685f87b
| 0
|
Analyze the following code function for security vulnerabilities
|
@GetMapping("tree-entity")
public JSON listEntity(HttpServletRequest request) {
final ID user = getRequestUser(request);
JSONArray ret = new JSONArray();
for (int entity : getAllowEntities(user, false)) {
ret.add(formatEntityJson(MetadataHelper.getEntity(entity)));
}
return ret;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: listEntity
File: src/main/java/com/rebuild/web/files/FileListController.java
Repository: getrebuild/rebuild
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2023-1495
|
MEDIUM
| 6.5
|
getrebuild/rebuild
|
listEntity
|
src/main/java/com/rebuild/web/files/FileListController.java
|
c9474f84e5f376dd2ade2078e3039961a9425da7
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setUserRoles(@Nullable List<String> roles, User user) {
if (roles != null) {
try {
final Map<String, Role> nameMap = roleService.loadAllLowercaseNameMap();
List<String> unknownRoles = new ArrayList<>();
roles.forEach(roleName -> {
if (!nameMap.containsKey(roleName.toLowerCase(Locale.US))) {
unknownRoles.add(roleName);
}
});
if (!unknownRoles.isEmpty()) {
throw new BadRequestException(
String.format(Locale.ENGLISH,"Invalid role names: %s", StringUtils.join(unknownRoles, ", "))
);
}
final Iterable<String> roleIds = Iterables.transform(roles, Roles.roleNameToIdFunction(nameMap));
user.setRoleIds(Sets.newHashSet(roleIds));
} catch (org.graylog2.database.NotFoundException e) {
throw new InternalServerErrorException(e);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUserRoles
File: graylog2-server/src/main/java/org/graylog2/rest/resources/users/UsersResource.java
Repository: Graylog2/graylog2-server
The code follows secure coding practices.
|
[
"CWE-613"
] |
CVE-2023-41041
|
LOW
| 3.1
|
Graylog2/graylog2-server
|
setUserRoles
|
graylog2-server/src/main/java/org/graylog2/rest/resources/users/UsersResource.java
|
bb88f3d0b2b0351669ab32c60b595ab7242a3fe3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception {
try {
if (evt instanceof IdleStateEvent) {
IdleStateEvent idleStateEvent = (IdleStateEvent) evt;
IdleState state = idleStateEvent.state();
if (state == IdleState.ALL_IDLE) {
ctx.close();
}
}
} finally {
super.userEventTriggered(ctx, evt);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: userEventTriggered
File: http-server-netty/src/main/java/io/micronaut/http/server/netty/RoutingInBoundHandler.java
Repository: micronaut-projects/micronaut-core
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-21700
|
MEDIUM
| 5
|
micronaut-projects/micronaut-core
|
userEventTriggered
|
http-server-netty/src/main/java/io/micronaut/http/server/netty/RoutingInBoundHandler.java
|
b8ec32c311689667c69ae7d9f9c3b3a8abc96fe3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ParentAndChildPair that = (ParentAndChildPair) o;
return parent.equals(that.parent);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: equals
File: src/main/java/apoc/load/Xml.java
Repository: neo4j-contrib/neo4j-apoc-procedures
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000820
|
HIGH
| 7.5
|
neo4j-contrib/neo4j-apoc-procedures
|
equals
|
src/main/java/apoc/load/Xml.java
|
45bc09c8bd7f17283e2a7e85ce3f02cb4be4fd1a
| 0
|
Analyze the following code function for security vulnerabilities
|
private SSLException shutdownWithError(String operations) {
String err = SSL.getLastError();
return shutdownWithError(operations, err);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: shutdownWithError
File: handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-835"
] |
CVE-2016-4970
|
HIGH
| 7.8
|
netty
|
shutdownWithError
|
handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java
|
bc8291c80912a39fbd2303e18476d15751af0bf1
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setSecurityHeaders(String nonce, HttpServletRequest request, HttpServletResponse response) {
// CSP Header
if (CONF.cspHeaderEnabled()) {
response.setHeader("Content-Security-Policy",
(request.isSecure() ? "upgrade-insecure-requests; " : "") + CONF.cspHeader(nonce));
}
// HSTS Header
if (CONF.hstsHeaderEnabled()) {
response.setHeader("Strict-Transport-Security", "max-age=31536000; includeSubDomains");
}
// Frame Options Header
if (CONF.framingHeaderEnabled()) {
response.setHeader("X-Frame-Options", "SAMEORIGIN");
}
// XSS Header
if (CONF.xssHeaderEnabled()) {
response.setHeader("X-XSS-Protection", "1; mode=block");
}
// Content Type Header
if (CONF.contentTypeHeaderEnabled()) {
response.setHeader("X-Content-Type-Options", "nosniff");
}
// Referrer Header
if (CONF.referrerHeaderEnabled()) {
response.setHeader("Referrer-Policy", "strict-origin");
}
// Permissions Policy Header
if (CONF.permissionsHeaderEnabled()) {
response.setHeader("Permissions-Policy", "geolocation=()");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSecurityHeaders
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
|
setSecurityHeaders
|
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
public Intent getConfigurationIntent(String transportName) {
mContext.enforceCallingOrSelfPermission(android.Manifest.permission.BACKUP,
"getConfigurationIntent");
synchronized (mTransports) {
final IBackupTransport transport = mTransports.get(transportName);
if (transport != null) {
try {
final Intent intent = transport.configurationIntent();
if (MORE_DEBUG) Slog.d(TAG, "getConfigurationIntent() returning config intent "
+ intent);
return intent;
} catch (RemoteException e) {
/* fall through to return null */
}
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getConfigurationIntent
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
|
getConfigurationIntent
|
services/backup/java/com/android/server/backup/BackupManagerService.java
|
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
| 0
|
Analyze the following code function for security vulnerabilities
|
private void updateFullyVisibleState(boolean forceNotFullyVisible) {
mNotificationStackScroller.setParentNotFullyVisible(forceNotFullyVisible
|| getAlpha() != 1.0f
|| getVisibility() != VISIBLE);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateFullyVisibleState
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
updateFullyVisibleState
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Subscribe(threadMode = ThreadMode.MAIN)
public void onMessageEvent(ConfigurationChangeEvent configurationChangeEvent) {
powerManagerUtils.setOrientation(Objects.requireNonNull(getResources()).getConfiguration().orientation);
initGridAdapter();
updateSelfVideoViewPosition();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onMessageEvent
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
|
onMessageEvent
|
app/src/main/java/com/nextcloud/talk/activities/CallActivity.java
|
bb7e82fbcbd8c10d0d0128d736c41cec0f79e7d0
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getString(String baseURL, String path, Map<String, ?> queryParams) throws Exception
{
try (InputStream inputStream = getInputStream(baseURL, path, queryParams)) {
return IOUtils.toString(inputStream);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getString
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
|
getString
|
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 BigInteger[] derDecode(
byte[] encoding)
throws IOException
{
ASN1Sequence s = (ASN1Sequence)ASN1Primitive.fromByteArray(encoding);
if (s.size() != 2)
{
throw new IOException("malformed signature");
}
return new BigInteger[]{
((ASN1Integer)s.getObjectAt(0)).getValue(),
((ASN1Integer)s.getObjectAt(1)).getValue()
};
}
|
Vulnerability Classification:
- CWE: CWE-347
- CVE: CVE-2016-1000342
- Severity: MEDIUM
- CVSS Score: 5.0
Description: Added header validation for INTEGER/ENUMERATED
Added additional validations for DSA/ECDSA signature parsing.
Function: derDecode
File: prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dsa/DSASigner.java
Repository: bcgit/bc-java
Fixed Code:
private BigInteger[] derDecode(
byte[] encoding)
throws IOException
{
ASN1Sequence s = (ASN1Sequence)ASN1Primitive.fromByteArray(encoding);
if (s.size() != 2)
{
throw new IOException("malformed signature");
}
if (!Arrays.areEqual(encoding, s.getEncoded(ASN1Encoding.DER)))
{
throw new IOException("malformed signature");
}
return new BigInteger[]{
((ASN1Integer)s.getObjectAt(0)).getValue(),
((ASN1Integer)s.getObjectAt(1)).getValue()
};
}
|
[
"CWE-347"
] |
CVE-2016-1000342
|
MEDIUM
| 5
|
bcgit/bc-java
|
derDecode
|
prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dsa/DSASigner.java
|
843c2e60f67d71faf81d236f448ebbe56c62c647
| 1
|
Analyze the following code function for security vulnerabilities
|
public int getTotalCount() {
return totalCount;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTotalCount
File: src/com/dotmarketing/portlets/workflows/model/WorkflowSearcher.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-4040
|
MEDIUM
| 6.5
|
dotCMS/core
|
getTotalCount
|
src/com/dotmarketing/portlets/workflows/model/WorkflowSearcher.java
|
bc4db5d71dc67015572f8e4c6fdf87e29b854d02
| 0
|
Analyze the following code function for security vulnerabilities
|
private void enforceRegisterMultiUser() {
if (!isCallerSystemApp()) {
throw new SecurityException("CAPABILITY_MULTI_USER is only available to system apps.");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: enforceRegisterMultiUser
File: src/com/android/server/telecom/TelecomServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-0847
|
HIGH
| 7.2
|
android
|
enforceRegisterMultiUser
|
src/com/android/server/telecom/TelecomServiceImpl.java
|
2750faaa1ec819eed9acffea7bd3daf867fda444
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean validate(WifiConfiguration config, long supportedFeatureSet,
boolean isAdd) {
if (!validateSsid(config.SSID, isAdd)) {
return false;
}
if (!validateBssid(config.BSSID)) {
return false;
}
if (!validateBitSets(config)) {
return false;
}
if (!validateKeyMgmt(config.allowedKeyManagement)) {
return false;
}
if (config.isSecurityType(WifiConfiguration.SECURITY_TYPE_WEP)
&& config.wepKeys != null
&& !validateWepKeys(config.wepKeys, config.wepTxKeyIndex, isAdd)) {
return false;
}
if (config.isSecurityType(WifiConfiguration.SECURITY_TYPE_PSK)
&& !validatePassword(config.preSharedKey, isAdd, false)) {
return false;
}
if (config.isSecurityType(WifiConfiguration.SECURITY_TYPE_SAE)
&& !validatePassword(config.preSharedKey, isAdd, true)) {
return false;
}
if (config.isSecurityType(WifiConfiguration.SECURITY_TYPE_WAPI_PSK)
&& !validatePassword(config.preSharedKey, isAdd, false)) {
return false;
}
if (config.isSecurityType(WifiConfiguration.SECURITY_TYPE_DPP)
&& (supportedFeatureSet & WifiManager.WIFI_FEATURE_DPP_AKM) == 0) {
Log.e(TAG, "DPP AKM is not supported");
return false;
}
if (!validateEnterpriseConfig(config, isAdd)) {
return false;
}
// b/153435438: Added to deal with badly formed WifiConfiguration from apps.
if (config.preSharedKey != null && !config.needsPreSharedKey()) {
Log.e(TAG, "preSharedKey set with an invalid KeyMgmt, resetting KeyMgmt to WPA_PSK");
config.setSecurityParams(WifiConfiguration.SECURITY_TYPE_PSK);
}
if (!validateIpConfiguration(config.getIpConfiguration())) {
return false;
}
// TBD: Validate some enterprise params as well in the future here.
return true;
}
|
Vulnerability Classification:
- CWE: CWE-Other
- CVE: CVE-2023-21252
- Severity: MEDIUM
- CVSS Score: 5.5
Description: Update password check for WAPI
Do not allow arbitrarily large passwords.
Bug: 275339978
Test: compile
(cherry picked from commit 38707fb4ff1405663cc24affc95244f4cc830499)
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:36deae20de1a8905e6cc72764e449b2d6e469f9e)
Merged-In: I15f3aff373af56c253a50c308d886a7acf661e59
Change-Id: I15f3aff373af56c253a50c308d886a7acf661e59
Function: validate
File: service/java/com/android/server/wifi/WifiConfigurationUtil.java
Repository: android
Fixed Code:
public static boolean validate(WifiConfiguration config, long supportedFeatureSet,
boolean isAdd) {
if (!validateSsid(config.SSID, isAdd)) {
return false;
}
if (!validateBssid(config.BSSID)) {
return false;
}
if (!validateBitSets(config)) {
return false;
}
if (!validateKeyMgmt(config.allowedKeyManagement)) {
return false;
}
if (config.isSecurityType(WifiConfiguration.SECURITY_TYPE_WEP)
&& config.wepKeys != null
&& !validateWepKeys(config.wepKeys, config.wepTxKeyIndex, isAdd)) {
return false;
}
if (config.isSecurityType(WifiConfiguration.SECURITY_TYPE_PSK)
&& !validatePassword(config.preSharedKey, isAdd, false, false)) {
return false;
}
if (config.isSecurityType(WifiConfiguration.SECURITY_TYPE_SAE)
&& !validatePassword(config.preSharedKey, isAdd, true, false)) {
return false;
}
if (config.isSecurityType(WifiConfiguration.SECURITY_TYPE_WAPI_PSK)
&& !validatePassword(config.preSharedKey, isAdd, false, true)) {
return false;
}
if (config.isSecurityType(WifiConfiguration.SECURITY_TYPE_DPP)
&& (supportedFeatureSet & WifiManager.WIFI_FEATURE_DPP_AKM) == 0) {
Log.e(TAG, "DPP AKM is not supported");
return false;
}
if (!validateEnterpriseConfig(config, isAdd)) {
return false;
}
// b/153435438: Added to deal with badly formed WifiConfiguration from apps.
if (config.preSharedKey != null && !config.needsPreSharedKey()) {
Log.e(TAG, "preSharedKey set with an invalid KeyMgmt, resetting KeyMgmt to WPA_PSK");
config.setSecurityParams(WifiConfiguration.SECURITY_TYPE_PSK);
}
if (!validateIpConfiguration(config.getIpConfiguration())) {
return false;
}
// TBD: Validate some enterprise params as well in the future here.
return true;
}
|
[
"CWE-Other"
] |
CVE-2023-21252
|
MEDIUM
| 5.5
|
android
|
validate
|
service/java/com/android/server/wifi/WifiConfigurationUtil.java
|
50b08ee30e04d185e5ae97a5f717d436fd5a90f3
| 1
|
Analyze the following code function for security vulnerabilities
|
public Map<String, Map<Integer, List<ScanResult>>>
getAllMatchingPasspointProfilesForScanResults(List<ScanResult> scanResults) {
if (scanResults == null) {
Log.e(TAG, "Attempt to get matching config for a null ScanResults");
return new HashMap<>();
}
Map<String, Map<Integer, List<ScanResult>>> configs = new HashMap<>();
for (ScanResult scanResult : scanResults) {
if (!scanResult.isPasspointNetwork()) continue;
List<Pair<PasspointProvider, PasspointMatch>> matchedProviders = getAllMatchedProviders(
scanResult);
for (Pair<PasspointProvider, PasspointMatch> matchedProvider : matchedProviders) {
WifiConfiguration config = matchedProvider.first.getWifiConfig();
int type = WifiManager.PASSPOINT_HOME_NETWORK;
if (!config.isHomeProviderNetwork) {
type = WifiManager.PASSPOINT_ROAMING_NETWORK;
}
Map<Integer, List<ScanResult>> scanResultsPerNetworkType =
configs.computeIfAbsent(config.getProfileKey(),
k -> new HashMap<>());
List<ScanResult> matchingScanResults = scanResultsPerNetworkType.computeIfAbsent(
type, k -> new ArrayList<>());
matchingScanResults.add(scanResult);
}
}
return configs;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAllMatchingPasspointProfilesForScanResults
File: service/java/com/android/server/wifi/hotspot2/PasspointManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-120"
] |
CVE-2023-21243
|
MEDIUM
| 5.5
|
android
|
getAllMatchingPasspointProfilesForScanResults
|
service/java/com/android/server/wifi/hotspot2/PasspointManager.java
|
5b49b8711efaadadf5052ba85288860c2d7ca7a6
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.