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 static String getPayloadDisplayString(final IBaseDataObject payload) {
final StringBuilder sb = new StringBuilder();
final List<String> th = payload.transformHistory();
final String fileName = payload.getFilename();
final List<String> currentForms = payload.getAllCurrentForms();
final Date creationTimestamp = payload.getCreationTimestamp();
sb.append("\n").append("filename: ").append(fileName).append("\n").append(" creationTimestamp: ").append(creationTimestamp).append("\n")
.append(" currentForms: ").append(currentForms).append("\n").append(" filetype: ").append(payload.getFileType()).append("\n")
.append(" transform history (").append(th.size()).append(") :").append("\n");
for (final String h : th) {
sb.append(" ").append(h).append("\n");
}
return sb.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPayloadDisplayString
File: src/main/java/emissary/util/PayloadUtil.java
Repository: NationalSecurityAgency/emissary
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2021-32634
|
MEDIUM
| 6.5
|
NationalSecurityAgency/emissary
|
getPayloadDisplayString
|
src/main/java/emissary/util/PayloadUtil.java
|
40260b1ec1f76cc92361702cc14fa1e4388e19d7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getCurrentFailedPasswordAttempts(int userHandle, boolean parent) {
if (!mLockPatternUtils.hasSecureLockScreen()) {
return 0;
}
Preconditions.checkArgumentNonnegative(userHandle, "Invalid userId");
final CallerIdentity caller = getCallerIdentity();
Preconditions.checkCallAuthorization(hasFullCrossUsersPermission(caller, userHandle));
synchronized (getLockObject()) {
if (!isSystemUid(caller)) {
// This API can be called by an active device admin or by keyguard code.
if (!hasCallingPermission(permission.ACCESS_KEYGUARD_SECURE_STORAGE)) {
getActiveAdminForCallerLocked(
null, DeviceAdminInfo.USES_POLICY_WATCH_LOGIN, parent);
}
}
DevicePolicyData policy = getUserDataUnchecked(getCredentialOwner(userHandle, parent));
return policy.mFailedPasswordAttempts;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCurrentFailedPasswordAttempts
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
|
getCurrentFailedPasswordAttempts
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
void maybeDisconnectTarget() {
if (!isNfcEnabledOrShuttingDown()) {
return;
}
Object[] objectsToDisconnect;
synchronized (this) {
Object[] objectValues = mObjectMap.values().toArray();
// Copy the array before we clear mObjectMap,
// just in case the HashMap values are backed by the same array
objectsToDisconnect = Arrays.copyOf(objectValues, objectValues.length);
mObjectMap.clear();
}
for (Object o : objectsToDisconnect) {
if (DBG) Log.d(TAG, "disconnecting " + o.getClass().getName());
if (o instanceof TagEndpoint) {
// Disconnect from tags
TagEndpoint tag = (TagEndpoint) o;
tag.disconnect();
} else if (o instanceof NfcDepEndpoint) {
// Disconnect from P2P devices
NfcDepEndpoint device = (NfcDepEndpoint) o;
if (device.getMode() == NfcDepEndpoint.MODE_P2P_TARGET) {
// Remote peer is target, request disconnection
device.disconnect();
} else {
// Remote peer is initiator, we cannot disconnect
// Just wait for field removal
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: maybeDisconnectTarget
File: src/com/android/nfc/NfcService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3761
|
LOW
| 2.1
|
android
|
maybeDisconnectTarget
|
src/com/android/nfc/NfcService.java
|
9ea802b5456a36f1115549b645b65c791eff3c2c
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isDumping(int type) {
if (mTypes == 0 && type != DUMP_PREFERRED_XML) {
return true;
}
return (mTypes & type) != 0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isDumping
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
|
isDumping
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
private void notifyTrustedChangedLocked(boolean trusted) {
int size = mKeyguardStateCallbacks.size();
for (int i = size - 1; i >= 0; i--) {
try {
mKeyguardStateCallbacks.get(i).onTrustedChanged(trusted);
} catch (RemoteException e) {
Slog.w(TAG, "Failed to call notifyTrustedChangedLocked", e);
if (e instanceof DeadObjectException) {
mKeyguardStateCallbacks.remove(i);
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: notifyTrustedChangedLocked
File: packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21267
|
MEDIUM
| 5.5
|
android
|
notifyTrustedChangedLocked
|
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
|
d18d8b350756b0e89e051736c1f28744ed31e93a
| 0
|
Analyze the following code function for security vulnerabilities
|
private void addCompileSourceRootIfConfigured() throws MojoExecutionException {
if (addCompileSourceRoot) {
if (addTestCompileSourceRoot) {
throw new MojoExecutionException("Either 'addCompileSourceRoot' or 'addTestCompileSourceRoot' may be active, not both.");
}
project.addCompileSourceRoot(getCompileSourceRoot());
} else if (addTestCompileSourceRoot) {
project.addTestCompileSourceRoot(getCompileSourceRoot());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addCompileSourceRootIfConfigured
File: modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-552"
] |
CVE-2021-21429
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
addCompileSourceRootIfConfigured
|
modules/openapi-generator-maven-plugin/src/main/java/org/openapitools/codegen/plugin/CodeGenMojo.java
|
6445ea6511a6ddab64c86ae263937dc90650c98c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public TtyExecable<String, ExecWatch> readingErrorChannel(PipedInputStream errChannelPipe) {
return new PodOperationsImpl(getContext().withErrChannelPipe(errChannelPipe));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readingErrorChannel
File: kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/PodOperationsImpl.java
Repository: fabric8io/kubernetes-client
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-20218
|
MEDIUM
| 5.8
|
fabric8io/kubernetes-client
|
readingErrorChannel
|
kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/PodOperationsImpl.java
|
325d67cc80b73f049a5d0cea4917c1f2709a8d86
| 0
|
Analyze the following code function for security vulnerabilities
|
private void reset() {
final int lastBufSize = lastGlobalMessageSize;
if (buf == null) {
buf = new byte[lastBufSize];
} else if (bufCount > 0 && bufCount != lastBufSize) {
lastGlobalMessageSize = bufCount;
if (buf.length != bufCount) {
buf = new byte[bufCount];
}
}
bufCount = 0;
}
|
Vulnerability Classification:
- CWE: CWE-264
- CVE: CVE-2016-2461
- Severity: HIGH
- CVSS Score: 7.6
Description: OpenSSLCipher: reset AAD when necessary
AAD was not being reset correctly during init or doFinal calls thus
leading to incorrect output.
(cherry picked from commit 0bab7f3b89ea13eb0d0c39d9c7b60c6112f0d6a8)
Bug: 27324690
Change-Id: If7806a9d7847814b60719637abceb94d8fbc8831
Function: reset
File: src/main/java/org/conscrypt/OpenSSLCipher.java
Repository: android
Fixed Code:
private void reset() {
aad = null;
final int lastBufSize = lastGlobalMessageSize;
if (buf == null) {
buf = new byte[lastBufSize];
} else if (bufCount > 0 && bufCount != lastBufSize) {
lastGlobalMessageSize = bufCount;
if (buf.length != bufCount) {
buf = new byte[bufCount];
}
}
bufCount = 0;
}
|
[
"CWE-264"
] |
CVE-2016-2461
|
HIGH
| 7.6
|
android
|
reset
|
src/main/java/org/conscrypt/OpenSSLCipher.java
|
50d0447566db4a77d78d592f1c1b5d31096fac8f
| 1
|
Analyze the following code function for security vulnerabilities
|
private void updateMessageState(Context context, int messageType, int errorCode) {
if (mMessageUri == null) {
return;
}
final ContentValues values = new ContentValues(2);
values.put(Sms.TYPE, messageType);
values.put(Sms.ERROR_CODE, errorCode);
final long identity = Binder.clearCallingIdentity();
try {
if (SqliteWrapper.update(context, context.getContentResolver(), mMessageUri, values,
null/*where*/, null/*selectionArgs*/) != 1) {
Rlog.e(TAG, "Failed to move message to " + messageType);
}
} finally {
Binder.restoreCallingIdentity(identity);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateMessageState
File: src/java/com/android/internal/telephony/SMSDispatcher.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2015-3858
|
HIGH
| 9.3
|
android
|
updateMessageState
|
src/java/com/android/internal/telephony/SMSDispatcher.java
|
df31d37d285dde9911b699837c351aed2320b586
| 0
|
Analyze the following code function for security vulnerabilities
|
public Api getPlugin(String name)
{
return this.xwiki != null ? this.xwiki.getPluginApi(name, getXWikiContext()) : null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPlugin
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
|
getPlugin
|
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
|
@Override
public void cancelTaskWindowTransition(int taskId) {
enforceTaskPermission("cancelTaskWindowTransition()");
final long ident = Binder.clearCallingIdentity();
try {
synchronized (mGlobalLock) {
final Task task = mRootWindowContainer.anyTaskForId(taskId,
MATCH_ATTACHED_TASK_ONLY);
if (task == null) {
Slog.w(TAG, "cancelTaskWindowTransition: taskId=" + taskId + " not found");
return;
}
task.cancelTaskWindowTransition();
}
} finally {
Binder.restoreCallingIdentity(ident);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cancelTaskWindowTransition
File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40094
|
HIGH
| 7.8
|
android
|
cancelTaskWindowTransition
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void emailContent(StringBuilder content, Modification modification) {
content.append(getTypeForDisplay() + ": " + getLocation()).append('\n').append(
String.format("revision: %s, modified by %s on %s", modification.getRevision(),
modification.getUserName(), modification.getModifiedTime()))
.append('\n')
.append(Optional.ofNullable(modification.getComment()).orElse(""));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: emailContent
File: domain/src/main/java/com/thoughtworks/go/config/materials/ScmMaterial.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-39309
|
MEDIUM
| 6.5
|
gocd
|
emailContent
|
domain/src/main/java/com/thoughtworks/go/config/materials/ScmMaterial.java
|
691b479f1310034992da141760e9c5d1f5b60e8a
| 0
|
Analyze the following code function for security vulnerabilities
|
public static int uncompressedLength(byte[] input)
throws IOException
{
return impl.uncompressedLength(input, 0, input.length);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: uncompressedLength
File: src/main/java/org/xerial/snappy/Snappy.java
Repository: xerial/snappy-java
The code follows secure coding practices.
|
[
"CWE-190"
] |
CVE-2023-34454
|
HIGH
| 7.5
|
xerial/snappy-java
|
uncompressedLength
|
src/main/java/org/xerial/snappy/Snappy.java
|
d0042551e4a3509a725038eb9b2ad1f683674d94
| 0
|
Analyze the following code function for security vulnerabilities
|
final void scheduleAppGcLocked(ProcessRecord app) {
long now = SystemClock.uptimeMillis();
if ((app.lastRequestedGc+mConstants.GC_MIN_INTERVAL) > now) {
return;
}
if (!mProcessesToGc.contains(app)) {
addProcessToGcListLocked(app);
scheduleAppGcsLocked();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: scheduleAppGcLocked
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
|
scheduleAppGcLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Entry other = (Entry) obj;
return Objects.equals(key, other.key) && Objects.equals(value, other.value);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: equals
File: src/main/java/com/gitblit/StoredUserConfig.java
Repository: gitblit-org/gitblit
The code follows secure coding practices.
|
[
"CWE-269"
] |
CVE-2022-31267
|
HIGH
| 7.5
|
gitblit-org/gitblit
|
equals
|
src/main/java/com/gitblit/StoredUserConfig.java
|
9b4afad6f4be212474809533ec2c280cce86501a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setSslContextFactory(SslContextFactory sslContextFactory) {
this.sslContextFactory = sslContextFactory;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSslContextFactory
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
|
setSslContextFactory
|
src/main/java/com/rabbitmq/client/ConnectionFactory.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean convertFromTranslucent(IBinder token)
throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeStrongBinder(token);
mRemote.transact(CONVERT_FROM_TRANSLUCENT_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: convertFromTranslucent
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
convertFromTranslucent
|
core/java/android/app/ActivityManagerNative.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public PullRequest getPullRequest() {
if (state.requestId != null)
return OneDev.getInstance(PullRequestManager.class).load(state.requestId);
else
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPullRequest
File: server-core/src/main/java/io/onedev/server/web/page/project/blob/ProjectBlobPage.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-434"
] |
CVE-2021-21245
|
HIGH
| 7.5
|
theonedev/onedev
|
getPullRequest
|
server-core/src/main/java/io/onedev/server/web/page/project/blob/ProjectBlobPage.java
|
0c060153fb97c0288a1917efdb17cc426934dacb
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getFilename() {
return filename;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFilename
File: src/main/java/org/olat/restapi/support/MultipartReader.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-41242
|
HIGH
| 7.9
|
OpenOLAT
|
getFilename
|
src/main/java/org/olat/restapi/support/MultipartReader.java
|
c450df7d7ffe6afde39ebca6da9136f1caa16ec4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public List<String> getSpaceDocsName(String spaceReference, XWikiContext context) throws XWikiException
{
try {
return getStore().getQueryManager().getNamedQuery("getSpaceDocsName")
.addFilter(Utils.<QueryFilter>getComponent(QueryFilter.class, "hidden"))
.bindValue("space", spaceReference).execute();
} catch (QueryException ex) {
throw new XWikiException(0, 0, ex.getMessage(), ex);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSpaceDocsName
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
|
getSpaceDocsName
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onDestroy() {
AndroidImplementation.stopPollingLoop();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onDestroy
File: Ports/Android/src/com/codename1/impl/android/PushNotificationService.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
onDestroy
|
Ports/Android/src/com/codename1/impl/android/PushNotificationService.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public void changeRecvCipher(BlockCipher bc, MAC mac)
{
tc.changeRecvCipher(bc, mac);
}
|
Vulnerability Classification:
- CWE: CWE-354
- CVE: CVE-2023-48795
- Severity: MEDIUM
- CVSS Score: 5.9
Description: Implement kex-strict from OpenSSH
Implement's OpenSSH's mitigation for the Terrapin attack.
Function: changeRecvCipher
File: src/main/java/com/trilead/ssh2/transport/TransportManager.java
Repository: connectbot/sshlib
Fixed Code:
public void changeRecvCipher(BlockCipher bc, MAC mac)
{
tc.changeRecvCipher(bc, mac);
if (km.isStrictKex())
tc.resetReceiveSequenceNumber();
}
|
[
"CWE-354"
] |
CVE-2023-48795
|
MEDIUM
| 5.9
|
connectbot/sshlib
|
changeRecvCipher
|
src/main/java/com/trilead/ssh2/transport/TransportManager.java
|
5c8b534f6e97db7ac0e0e579331213aa25c173ab
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getJsCssLib(Map<String, Object> data) {
String path = data.get("context_path") + "/" + getPathName();
String jsCssLink = "";
jsCssLink += "<link href=\"" + data.get("context_path") + "/wro/" + getPathName() + ".preload.min.css" + "\" rel=\"stylesheet\" />\n";
jsCssLink += "<link rel=\"preload\" href=\"" + data.get("context_path") + "/js/fontawesome5/fonts/fontawesome-webfont.woff2?v=4.6.1\" as=\"font\" crossorigin />\n";
jsCssLink += "<link rel=\"preload\" href=\"" + data.get("context_path") + "/js/fontawesome5/webfonts/fa-brands-400.woff2\" as=\"font\" crossorigin />\n";
jsCssLink += "<link rel=\"preload\" href=\"" + data.get("context_path") + "/js/fontawesome5/webfonts/fa-solid-900.woff2\" as=\"font\" crossorigin />\n";
jsCssLink += "<link rel=\"preload\" href=\"" + data.get("context_path") + "/universal/lib/material-design-iconic-font/fonts/Material-Design-Iconic-Font.woff2?v=2.2.0\" as=\"font\" crossorigin />\n";
jsCssLink += "<script>loadCSS(\"" + data.get("context_path") + "/wro/" + getPathName() + ".min.css" + "\")</script>\n";
jsCssLink += "<style>" + generateLessCss() + "</style>";
jsCssLink += "<script src=\"" + data.get("context_path") + "/wro/" + getPathName() + ".min.js\" async></script>\n";
if (enableResponsiveSwitch()) {
jsCssLink += "<script src=\"" + data.get("context_path") + "/" + getPathName() +"/lib/responsive-switch.min.js\" defer></script>\n";
}
jsCssLink += "<script>var _enableResponsiveTable = true;</script>\n";
jsCssLink += getInternalJsCssLib(data);
return jsCssLink;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getJsCssLib
File: wflow-core/src/main/java/org/joget/plugin/enterprise/UniversalTheme.java
Repository: jogetworkflow/jw-community
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-4560
|
MEDIUM
| 6.1
|
jogetworkflow/jw-community
|
getJsCssLib
|
wflow-core/src/main/java/org/joget/plugin/enterprise/UniversalTheme.java
|
ecf8be8f6f0cb725c18536ddc726d42a11bdaa1b
| 0
|
Analyze the following code function for security vulnerabilities
|
protected FhirContext getContext(HomeRequest theRequest) {
FhirVersionEnum version = theRequest.getFhirVersion(myConfig);
FhirContext retVal = myContexts.get(version);
if (retVal == null) {
retVal = newContext(version);
myContexts.put(version, retVal);
}
return retVal;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getContext
File: hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/BaseController.java
Repository: hapifhir/hapi-fhir
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-24301
|
MEDIUM
| 4.3
|
hapifhir/hapi-fhir
|
getContext
|
hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/BaseController.java
|
adb3734fcbbf9a9165445e9ee5eef168dbcaedaf
| 0
|
Analyze the following code function for security vulnerabilities
|
public static int getInt(Object object, long fieldOffset) {
return PlatformDependent0.getInt(object, fieldOffset);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInt
File: common/src/main/java/io/netty/util/internal/PlatformDependent.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-668",
"CWE-378",
"CWE-379"
] |
CVE-2022-24823
|
LOW
| 1.9
|
netty
|
getInt
|
common/src/main/java/io/netty/util/internal/PlatformDependent.java
|
185f8b2756a36aaa4f973f1a2a025e7d981823f1
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequiresPermission(anyOf = {SET_TIME, QUERY_ADMIN_POLICY}, conditional = true)
public boolean getAutoTimeEnabled(@Nullable ComponentName admin) {
throwIfParentInstance("getAutoTimeEnabled");
if (mService != null) {
try {
return mService.getAutoTimeEnabled(admin, mContext.getPackageName());
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAutoTimeEnabled
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
|
getAutoTimeEnabled
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public static long getInputDispatchingTimeoutLocked(ActivityRecord r) {
return r != null ? getInputDispatchingTimeoutLocked(r.app) : KEY_DISPATCHING_TIMEOUT;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInputDispatchingTimeoutLocked
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
|
getInputDispatchingTimeoutLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isFocused() {
final WindowState outer = mOuter.get();
if (outer != null) {
synchronized (outer.mWmService.mGlobalLock) {
return outer.isFocused();
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isFocused
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
|
isFocused
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
ActivityStarter setUserId(int userId) {
mRequest.userId = userId;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUserId
File: services/core/java/com/android/server/wm/ActivityStarter.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-269"
] |
CVE-2023-21269
|
HIGH
| 7.8
|
android
|
setUserId
|
services/core/java/com/android/server/wm/ActivityStarter.java
|
70ec64dc5a2a816d6aa324190a726a85fd749b30
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void openPendingMessage(Activity activity) {
ConversationFragment fragment = findConversationFragment(activity);
if (fragment != null) {
Message message = fragment.pendingMessage.pop();
if (message != null) {
fragment.messageListAdapter.openDownloadable(message);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: openPendingMessage
File: src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
openPendingMessage
|
src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void performAdditionalSendOrSaveSanityChecks(
final boolean save, final boolean showToast, ArrayList<String> recipients) {
sendOrSave(save, showToast);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: performAdditionalSendOrSaveSanityChecks
File: src/com/android/mail/compose/ComposeActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2425
|
MEDIUM
| 4.3
|
android
|
performAdditionalSendOrSaveSanityChecks
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String pageHtml(int segment, String helpUrl) {
return pageHtml(segment, helpUrl, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: pageHtml
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
|
pageHtml
|
src/org/opencms/workplace/CmsDialog.java
|
72a05e3ea1cf692e2efce002687272e63f98c14a
| 0
|
Analyze the following code function for security vulnerabilities
|
private void onQsTouch(MotionEvent event) {
int pointerIndex = event.findPointerIndex(mTrackingPointer);
if (pointerIndex < 0) {
pointerIndex = 0;
mTrackingPointer = event.getPointerId(pointerIndex);
}
final float y = event.getY(pointerIndex);
final float x = event.getX(pointerIndex);
final float h = y - mInitialTouchY;
switch (event.getActionMasked()) {
case MotionEvent.ACTION_DOWN:
mQsTracking = true;
mInitialTouchY = y;
mInitialTouchX = x;
onQsExpansionStarted();
mInitialHeightOnTouch = mQsExpansionHeight;
initVelocityTracker();
trackMovement(event);
break;
case MotionEvent.ACTION_POINTER_UP:
final int upPointer = event.getPointerId(event.getActionIndex());
if (mTrackingPointer == upPointer) {
// gesture is ongoing, find a new pointer to track
final int newIndex = event.getPointerId(0) != upPointer ? 0 : 1;
final float newY = event.getY(newIndex);
final float newX = event.getX(newIndex);
mTrackingPointer = event.getPointerId(newIndex);
mInitialHeightOnTouch = mQsExpansionHeight;
mInitialTouchY = newY;
mInitialTouchX = newX;
}
break;
case MotionEvent.ACTION_MOVE:
setQsExpansion(h + mInitialHeightOnTouch);
if (h >= getFalsingThreshold()) {
mQsTouchAboveFalsingThreshold = true;
}
trackMovement(event);
break;
case MotionEvent.ACTION_UP:
case MotionEvent.ACTION_CANCEL:
mQsTracking = false;
mTrackingPointer = -1;
trackMovement(event);
float fraction = getQsExpansionFraction();
if (fraction != 0f || y >= mInitialTouchY) {
flingQsWithCurrentVelocity(y,
event.getActionMasked() == MotionEvent.ACTION_CANCEL);
}
if (mQsVelocityTracker != null) {
mQsVelocityTracker.recycle();
mQsVelocityTracker = null;
}
break;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onQsTouch
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
|
onQsTouch
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean areNotificationsVisiblyDifferent(Style other) {
if (other == null || getClass() != other.getClass()) {
return true;
}
// Comparison done for all custom RemoteViews, independent of style
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: areNotificationsVisiblyDifferent
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
areNotificationsVisiblyDifferent
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
protected Class<?> resolveProxyClass(String[] interfaceNames)
throws IOException, ClassNotFoundException {
ClassLoader loader = callerClassLoader;
Class<?>[] interfaces = new Class<?>[interfaceNames.length];
for (int i = 0; i < interfaceNames.length; i++) {
interfaces[i] = Class.forName(interfaceNames[i], false, loader);
}
try {
return Proxy.getProxyClass(loader, interfaces);
} catch (IllegalArgumentException e) {
throw new ClassNotFoundException(e.toString(), e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resolveProxyClass
File: luni/src/main/java/java/io/ObjectInputStream.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-7911
|
HIGH
| 7.2
|
android
|
resolveProxyClass
|
luni/src/main/java/java/io/ObjectInputStream.java
|
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
| 0
|
Analyze the following code function for security vulnerabilities
|
private static final boolean isIdentifierChar(char c) {
return c == '_' ||
(c >= 'A' && c <= 'Z') ||
(c >= 'a' && c <= 'z') ||
(c >= '0' && c <= '9');
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isIdentifierChar
File: src/com/android/providers/downloads/Helpers.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2016-0848
|
HIGH
| 7.2
|
android
|
isIdentifierChar
|
src/com/android/providers/downloads/Helpers.java
|
bdc831357e7a116bc561d51bf2ddc85ff11c01a9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int findLongestMatch(List<String> pathSegments) {
cacheLock.readLock().lock();
try {
return findLongestMatch(null, pathSegments);
} finally {
cacheLock.readLock().unlock();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findLongestMatch
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
|
findLongestMatch
|
server-core/src/main/java/io/onedev/server/entitymanager/impl/DefaultProjectManager.java
|
f1e97688e4e19d6de1dfa1d00e04655209d39f8e
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setVerifier(Verifier verifier) {
this.verifier = verifier;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setVerifier
File: ext/java/nokogiri/XmlRelaxng.java
Repository: sparklemotion/nokogiri
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2020-26247
|
MEDIUM
| 4
|
sparklemotion/nokogiri
|
setVerifier
|
ext/java/nokogiri/XmlRelaxng.java
|
9c87439d9afa14a365ff13e73adc809cb2c3d97b
| 0
|
Analyze the following code function for security vulnerabilities
|
public long optLong(int index, long defaultValue) {
try {
return getLong(index);
} catch (Exception e) {
return defaultValue;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: optLong
File: src/main/java/org/codehaus/jettison/json/JSONArray.java
Repository: jettison-json/jettison
The code follows secure coding practices.
|
[
"CWE-674",
"CWE-787"
] |
CVE-2022-45693
|
HIGH
| 7.5
|
jettison-json/jettison
|
optLong
|
src/main/java/org/codehaus/jettison/json/JSONArray.java
|
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<FileHeader> getFileHeaders() {
List<FileHeader> list = new ArrayList<FileHeader>();
for (BaseBlock block : headers) {
if (block.getHeaderType().equals(UnrarHeadertype.FileHeader)) {
list.add((FileHeader) block);
}
}
return list;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFileHeaders
File: src/main/java/com/github/junrar/Archive.java
Repository: junrar
The code follows secure coding practices.
|
[
"CWE-835"
] |
CVE-2018-12418
|
MEDIUM
| 4.3
|
junrar
|
getFileHeaders
|
src/main/java/com/github/junrar/Archive.java
|
ad8d0ba8e155630da8a1215cee3f253e0af45817
| 0
|
Analyze the following code function for security vulnerabilities
|
public void removePresenceListener(PresenceListener listener) {
_presenceListeners.remove(listener);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removePresenceListener
File: cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Seti.java
Repository: cometd
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-24721
|
MEDIUM
| 5.5
|
cometd
|
removePresenceListener
|
cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Seti.java
|
bb445a143fbf320f17c62e340455cd74acfb5929
| 0
|
Analyze the following code function for security vulnerabilities
|
@JsonIgnore
public boolean isOutdated() {
return appliedRevision() < TERMINATION_REVISION;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isOutdated
File: graylog2-server/src/main/java/org/graylog2/security/UserSessionTerminationService.java
Repository: Graylog2/graylog2-server
The code follows secure coding practices.
|
[
"CWE-613"
] |
CVE-2023-41041
|
LOW
| 3.1
|
Graylog2/graylog2-server
|
isOutdated
|
graylog2-server/src/main/java/org/graylog2/security/UserSessionTerminationService.java
|
bb88f3d0b2b0351669ab32c60b595ab7242a3fe3
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void inspectCircuitNodes(Element root, String attrType,
List<String> attrValuesList) throws IllegalArgumentException {
assert (root != null);
assert (attrType != null);
assert (attrValuesList != null);
assert (attrValuesList.isEmpty());
// Circuits are top-level in the XML file
switch (attrType) {
case "name":
for (Element circElt : XmlIterator
.forChildElements(root, "circuit")) {
// Circuit's name is directly available as an attribute
String name = circElt.getAttribute("name");
attrValuesList.add(name);
}
break;
case "label":
for (Element circElt : XmlIterator
.forChildElements(root, "circuit")) {
// label is available through its a child node
for (Element attrElt : XmlIterator.forChildElements(circElt,
"a")) {
if (attrElt.hasAttribute("name")) {
String aName = attrElt.getAttribute("name");
if (aName.equals("label")) {
String label = attrElt.getAttribute("val");
if (label.length() > 0) {
attrValuesList.add(label);
}
}
}
}
}
break;
default:
throw new IllegalArgumentException(
"Invalid attribute type requested: " + attrType
+ " for node type: circuit");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: inspectCircuitNodes
File: src/com/cburch/logisim/file/XmlReader.java
Repository: logisim-evolution
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000889
|
MEDIUM
| 6.8
|
logisim-evolution
|
inspectCircuitNodes
|
src/com/cburch/logisim/file/XmlReader.java
|
90aee8f8ceef463884cc400af4f6d1f109fb0972
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void initialize(AMQConnection connection) {
connection.startMainLoop();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initialize
File: src/main/java/com/rabbitmq/client/impl/SocketFrameHandler.java
Repository: rabbitmq/rabbitmq-java-client
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-46120
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-java-client
|
initialize
|
src/main/java/com/rabbitmq/client/impl/SocketFrameHandler.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void initJaxbMarshaller(Marshaller marshaller) throws JAXBException {
if (this.marshallerProperties != null) {
for (String name : this.marshallerProperties.keySet()) {
marshaller.setProperty(name, this.marshallerProperties.get(name));
}
}
if (this.marshallerListener != null) {
marshaller.setListener(this.marshallerListener);
}
if (this.validationEventHandler != null) {
marshaller.setEventHandler(this.validationEventHandler);
}
if (this.adapters != null) {
for (XmlAdapter<?, ?> adapter : this.adapters) {
marshaller.setAdapter(adapter);
}
}
if (this.schema != null) {
marshaller.setSchema(this.schema);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initJaxbMarshaller
File: spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java
Repository: spring-projects/spring-framework
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-4152
|
MEDIUM
| 6.8
|
spring-projects/spring-framework
|
initJaxbMarshaller
|
spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java
|
2843b7d2ee12e3f9c458f6f816befd21b402e3b9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public final void close() throws IOException {
if (mAssetNativePtr != 0) {
nativeAssetDestroy(mAssetNativePtr);
mAssetNativePtr = 0;
synchronized (AssetManager.this) {
decRefsLocked(hashCode());
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: close
File: core/java/android/content/res/AssetManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-415"
] |
CVE-2023-40103
|
HIGH
| 7.8
|
android
|
close
|
core/java/android/content/res/AssetManager.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
public JSONObject getInfo() {
this.item = new HashMap<String, Object>();
this.item.put("properties", this.properties);
this.getFileInfo("");
JSONObject array = new JSONObject();
try {
array.put("Path", this.get.get("path"));
array.put("Filename", this.item.get("filename"));
array.put("File Type", this.item.get("filetype"));
array.put("Preview", this.item.get("preview"));
array.put("Properties", this.item.get("properties"));
// TODO 文件权限
array.put("Protected", 0);
array.put("Error", "");
array.put("Code", 0);
} catch (JSONException e) {
this.error("JSONObject error");
}
return array;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInfo
File: src/main/java/com/jflyfox/modules/filemanager/FileManager.java
Repository: jflyfox/jfinal_cms
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2021-37262
|
MEDIUM
| 5
|
jflyfox/jfinal_cms
|
getInfo
|
src/main/java/com/jflyfox/modules/filemanager/FileManager.java
|
e7fd0fe9362464c4d2bd308318eecc89a847b116
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isAbsolute() {
return internal != null && internal.isAbsolute();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isAbsolute
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
|
isAbsolute
|
src/net/sourceforge/plantuml/security/SFile.java
|
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
| 0
|
Analyze the following code function for security vulnerabilities
|
public T get() {
return this.get(this.lang);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: get
File: web/play-java-forms/src/main/java/play/data/Form.java
Repository: playframework
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-31018
|
MEDIUM
| 5
|
playframework
|
get
|
web/play-java-forms/src/main/java/play/data/Form.java
|
15393b736df939e35e275af2347155f296c684f2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setFocusedStack(int stackId) {
enforceCallingPermission(MANAGE_ACTIVITY_STACKS, "setFocusedStack()");
if (DEBUG_FOCUS) Slog.d(TAG_FOCUS, "setFocusedStack: stackId=" + stackId);
final long callingId = Binder.clearCallingIdentity();
try {
synchronized (this) {
final ActivityStack stack = mStackSupervisor.getStack(stackId);
if (stack == null) {
return;
}
final ActivityRecord r = stack.topRunningActivityLocked();
if (setFocusedActivityLocked(r, "setFocusedStack")) {
mStackSupervisor.resumeFocusedStackTopActivityLocked();
}
}
} finally {
Binder.restoreCallingIdentity(callingId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setFocusedStack
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3912
|
HIGH
| 9.3
|
android
|
setFocusedStack
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
protected synchronized List<TransportConnectionState> listConnectionStates() {
return connectionStateRegister.listConnectionStates();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: listConnectionStates
File: activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
Repository: apache/activemq
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-3576
|
MEDIUM
| 5
|
apache/activemq
|
listConnectionStates
|
activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
|
00921f2
| 0
|
Analyze the following code function for security vulnerabilities
|
private String validatePropertyName(Object property) {
String propertyName = transformPropertyName(property);
if (RESTRICTED_PROPERTIES.contains(propertyName)) {
return null;
}
return propertyName;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: validatePropertyName
File: src/main/java/com/hubspot/jinjava/el/ext/JinjavaBeanELResolver.java
Repository: HubSpot/jinjava
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2020-12668
|
MEDIUM
| 6.8
|
HubSpot/jinjava
|
validatePropertyName
|
src/main/java/com/hubspot/jinjava/el/ext/JinjavaBeanELResolver.java
|
5dfa5b87318744a4d020b66d5f7747acc36b213b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void clearPassword(Account account) {
final int callingUid = Binder.getCallingUid();
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.v(TAG, "clearPassword: " + account
+ ", caller's uid " + callingUid
+ ", pid " + Binder.getCallingPid());
}
Objects.requireNonNull(account, "account cannot be null");
int userId = UserHandle.getCallingUserId();
if (!isAccountManagedByCaller(account.type, callingUid, userId)) {
String msg = String.format(
"uid %s cannot clear passwords for accounts of type: %s",
callingUid,
account.type);
throw new SecurityException(msg);
}
final long identityToken = clearCallingIdentity();
try {
UserAccounts accounts = getUserAccounts(userId);
setPasswordInternal(accounts, account, null, callingUid);
} finally {
restoreCallingIdentity(identityToken);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearPassword
File: services/core/java/com/android/server/accounts/AccountManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-502"
] |
CVE-2023-45777
|
HIGH
| 7.8
|
android
|
clearPassword
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
ActivityStack getStack(int stackId) {
ActivityContainer activityContainer = mActivityContainers.get(stackId);
if (activityContainer != null) {
return activityContainer.mStack;
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStack
File: services/core/java/com/android/server/am/ActivityStackSupervisor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3838
|
MEDIUM
| 4.3
|
android
|
getStack
|
services/core/java/com/android/server/am/ActivityStackSupervisor.java
|
468651c86a8adb7aa56c708d2348e99022088af3
| 0
|
Analyze the following code function for security vulnerabilities
|
public Material getByFingerPrint(String fingerPrint) {
for (Material material : this) {
if (material.getPipelineUniqueFingerprint().equals(fingerPrint)) {
return material;
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getByFingerPrint
File: domain/src/main/java/com/thoughtworks/go/config/materials/Materials.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-39309
|
MEDIUM
| 6.5
|
gocd
|
getByFingerPrint
|
domain/src/main/java/com/thoughtworks/go/config/materials/Materials.java
|
691b479f1310034992da141760e9c5d1f5b60e8a
| 0
|
Analyze the following code function for security vulnerabilities
|
protected CompletableFuture<Void> internalRemoveSubscribeRate() {
return getTopicPoliciesAsyncWithRetry(topicName)
.thenCompose(op -> {
if (!op.isPresent()) {
return CompletableFuture.completedFuture(null);
}
op.get().setSubscribeRate(null);
return pulsar().getTopicPoliciesService().updateTopicPoliciesAsync(topicName, op.get());
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: internalRemoveSubscribeRate
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
|
internalRemoveSubscribeRate
|
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
|
5b35bb81c31f1bc2ad98c9fde5b39ec68110ca52
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void addPacketInterceptor(StanzaListener packetInterceptor,
StanzaFilter packetFilter) {
if (packetInterceptor == null) {
throw new NullPointerException("Packet interceptor is null.");
}
InterceptorWrapper interceptorWrapper = new InterceptorWrapper(packetInterceptor, packetFilter);
synchronized (interceptors) {
interceptors.put(packetInterceptor, interceptorWrapper);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addPacketInterceptor
File: smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
Repository: igniterealtime/Smack
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2016-10027
|
MEDIUM
| 4.3
|
igniterealtime/Smack
|
addPacketInterceptor
|
smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
|
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String getAttributeValue(Attribute attribute) {
String str = trim(attribute.getValue());
str = StringUtil.getSystemPropertyAsString(str);
return str;
}
|
Vulnerability Classification:
- CWE: CWE-200
- CVE: CVE-2017-2582
- Severity: MEDIUM
- CVSS Score: 4.0
Description: KEYCLOAK-4160
Function: getAttributeValue
File: saml-core/src/main/java/org/keycloak/saml/common/util/StaxParserUtil.java
Repository: keycloak
Fixed Code:
public static String getAttributeValue(Attribute attribute) {
String str = trim(attribute.getValue());
return str;
}
|
[
"CWE-200"
] |
CVE-2017-2582
|
MEDIUM
| 4
|
keycloak
|
getAttributeValue
|
saml-core/src/main/java/org/keycloak/saml/common/util/StaxParserUtil.java
|
0cb5ba0f6e83162d221681f47b470c3042eef237
| 1
|
Analyze the following code function for security vulnerabilities
|
private void doMove(UserRequest ureq) {
FolderTreeModel ftm = (FolderTreeModel) selTree.getTreeModel();
String selectedPath = ftm.getSelectedPath(selTree.getSelectedNode());
if (selectedPath == null) {
abortFailed(ureq, "failed");
return;
}
VFSStatus vfsStatus = VFSConstants.SUCCESS;
VFSContainer rootContainer = folderComponent.getRootContainer();
VFSItem vfsItem = rootContainer.resolve(selectedPath);
if (vfsItem == null || (vfsItem.canWrite() != VFSConstants.YES)) {
abortFailed(ureq, "failed");
return;
}
// copy the files
VFSContainer target = (VFSContainer)vfsItem;
List<VFSItem> sources = getSanityCheckedSourceItems(target, ureq);
if (sources == null) return;
for (VFSItem vfsSource:sources) {
VFSItem targetFile = target.resolve(vfsSource.getName());
if(vfsSource instanceof VFSLeaf && targetFile != null && targetFile.canVersion() == VFSConstants.YES) {
//add a new version to the file
VFSLeaf sourceLeaf = (VFSLeaf)vfsSource;
vfsRepositoryService.addVersion(sourceLeaf, ureq.getIdentity(), false, "", sourceLeaf.getInputStream());
} else {
vfsStatus = target.copyFrom(vfsSource, ureq.getIdentity());
}
if (vfsStatus != VFSConstants.SUCCESS) {
String errorKey = "failed";
if (vfsStatus == VFSConstants.ERROR_QUOTA_EXCEEDED)
errorKey = "QuotaExceeded";
abortFailed(ureq, errorKey);
return;
}
if (move) {
// if move, delete the source. Note that meta source
// has already been delete (i.e. moved)
vfsSource.delete();
}
}
// after a copy or a move, notify the subscribers
VFSSecurityCallback secCallback = VFSManager.findInheritedSecurityCallback(folderComponent.getCurrentContainer());
if (secCallback != null) {
SubscriptionContext subsContext = secCallback.getSubscriptionContext();
if (subsContext != null) {
notificationsManager.markPublisherNews(subsContext, ureq.getIdentity(), true);
}
}
fireEvent(ureq, new FolderEvent(move ? FolderEvent.MOVE_EVENT : FolderEvent.COPY_EVENT, fileSelection.renderAsHtml()));
notifyFinished(ureq);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doMove
File: src/main/java/org/olat/core/commons/modules/bc/commands/CmdMoveCopy.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-41152
|
MEDIUM
| 4
|
OpenOLAT
|
doMove
|
src/main/java/org/olat/core/commons/modules/bc/commands/CmdMoveCopy.java
|
418bb509ffcb0e25ab4390563c6c47f0458583eb
| 0
|
Analyze the following code function for security vulnerabilities
|
protected synchronized RequestProcessor getRequestProcessor(ModuleConfig config)
throws ServletException {
// :FIXME: Document UnavailableException?
RequestProcessor processor = this.getProcessorForModule(config);
if (processor == null) {
try {
processor =
(RequestProcessor) RequestUtils.applicationInstance(
config.getControllerConfig().getProcessorClass());
} catch (Exception e) {
throw new UnavailableException(
"Cannot initialize RequestProcessor of class "
+ config.getControllerConfig().getProcessorClass()
+ ": "
+ e);
}
processor.init(this, config);
String key = Globals.REQUEST_PROCESSOR_KEY + config.getPrefix();
getServletContext().setAttribute(key, processor);
}
return (processor);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRequestProcessor
File: src/share/org/apache/struts/action/ActionServlet.java
Repository: kawasima/struts1-forever
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-20"
] |
CVE-2016-1181
|
MEDIUM
| 6.8
|
kawasima/struts1-forever
|
getRequestProcessor
|
src/share/org/apache/struts/action/ActionServlet.java
|
eda3a79907ed8fcb0387a0496d0cb14332f250e8
| 0
|
Analyze the following code function for security vulnerabilities
|
private void handleAirplaneModeChanged() {
for (int j = 0; j < mCallbacks.size(); j++) {
KeyguardUpdateMonitorCallback cb = mCallbacks.get(j).get();
if (cb != null) {
cb.onRefreshCarrierInfo();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleAirplaneModeChanged
File: packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
handleAirplaneModeChanged
|
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean onLongClick(View v) {
RecordUserAction.record("MobileOmniboxDeleteGesture");
if (!mSuggestion.isDeletable()) return true;
AlertDialog.Builder b =
new AlertDialog.Builder(getContext(), R.style.AlertDialogTheme);
b.setTitle(mSuggestion.getDisplayText());
b.setMessage(R.string.omnibox_confirm_delete);
DialogInterface.OnClickListener okListener =
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
RecordUserAction.record("MobileOmniboxDeleteRequested");
mSuggestionDelegate.onDeleteSuggestion(mPosition);
}
};
b.setPositiveButton(android.R.string.ok, okListener);
DialogInterface.OnClickListener cancelListener =
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.cancel();
}
};
b.setNegativeButton(android.R.string.cancel, cancelListener);
AlertDialog dialog = b.create();
dialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialog) {
mSuggestionDelegate.onHideModal();
}
});
mSuggestionDelegate.onShowModal();
dialog.show();
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onLongClick
File: chrome/android/java/src/org/chromium/chrome/browser/omnibox/SuggestionView.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-254"
] |
CVE-2016-5163
|
MEDIUM
| 4.3
|
chromium
|
onLongClick
|
chrome/android/java/src/org/chromium/chrome/browser/omnibox/SuggestionView.java
|
3bd33fee094e863e5496ac24714c558bd58d28ef
| 0
|
Analyze the following code function for security vulnerabilities
|
public abstract Class getStubClass();
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStubClass
File: Ports/Android/src/com/codename1/impl/android/PushNotificationService.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
getStubClass
|
Ports/Android/src/com/codename1/impl/android/PushNotificationService.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean allIpAddressesValid(String ipAddresses) {
if (!Strings.isNullOrEmpty(ipAddresses)) {
return Lists.newArrayList(Splitter.on(",")
.trimResults()
.omitEmptyStrings()
.split(ipAddresses)).stream()
.map(hostAndPort -> HostAndPort.fromString(hostAndPort).withDefaultPort(DnsClient.DEFAULT_DNS_PORT))
.allMatch(hostAndPort -> isValidIpAddress(hostAndPort.getHost()));
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: allIpAddressesValid
File: graylog2-server/src/main/java/org/graylog2/lookup/adapters/dnslookup/DnsClient.java
Repository: Graylog2/graylog2-server
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2023-41045
|
MEDIUM
| 5.3
|
Graylog2/graylog2-server
|
allIpAddressesValid
|
graylog2-server/src/main/java/org/graylog2/lookup/adapters/dnslookup/DnsClient.java
|
466af814523cffae9fbc7e77bab7472988f03c3e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getRequestHost() {
return request.host();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRequestHost
File: independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/VertxResteasyReactiveRequestContext.java
Repository: quarkusio/quarkus
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-0981
|
MEDIUM
| 6.5
|
quarkusio/quarkus
|
getRequestHost
|
independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/VertxResteasyReactiveRequestContext.java
|
96c64fd8f09c02a497e2db366c64dd9196582442
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean isCrossUserEnabled() {
return PROP_CROSS_USER_ALLOWED || SdkLevel.isAtLeastS();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isCrossUserEnabled
File: src/com/android/providers/media/util/FileUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2023-35670
|
HIGH
| 7.8
|
android
|
isCrossUserEnabled
|
src/com/android/providers/media/util/FileUtils.java
|
db3c69afcb0a45c8aa2f333fcde36217889899fe
| 0
|
Analyze the following code function for security vulnerabilities
|
int getRemoteClass(BluetoothDevice device) {
enforceCallingOrSelfPermission(BLUETOOTH_PERM, "Need BLUETOOTH permission");
DeviceProperties deviceProp = mRemoteDevices.getDeviceProperties(device);
if (deviceProp == null) return 0;
return deviceProp.getBluetoothClass();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRemoteClass
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
|
getRemoteClass
|
src/com/android/bluetooth/btservice/AdapterService.java
|
122feb9a0b04290f55183ff2f0384c6c53756bd8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void startLockTaskModeOnCurrent() throws RemoteException {
enforceCallingPermission(android.Manifest.permission.MANAGE_ACTIVITY_STACKS,
"startLockTaskModeOnCurrent");
long ident = Binder.clearCallingIdentity();
try {
ActivityRecord r = null;
synchronized (this) {
r = mStackSupervisor.topRunningActivityLocked();
}
startLockTaskMode(r.task);
} finally {
Binder.restoreCallingIdentity(ident);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startLockTaskModeOnCurrent
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3833
|
MEDIUM
| 4.3
|
android
|
startLockTaskModeOnCurrent
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void setOCEventDataAuditLogs(StudyBean study, OdmClinicalDataBean data, String studySubjectOids, HashMap<String, String> evnOidPoses) {
this.setOCEventDataAuditsTypesExpected();
logger.debug("Begin to execute GetOCEventDataAuditsSql");
logger.debug("getOCEventDataAuditsSql= " + this.getOCEventDataAuditsSql(studySubjectOids));
ArrayList rows = select(this.getOCEventDataAuditsSql(studySubjectOids));
Iterator iter = rows.iterator();
while (iter.hasNext()) {
HashMap row = (HashMap) iter.next();
String studySubjectLabel = (String) row.get("study_subject_oid");
String sedOid = (String) row.get("definition_oid");
Integer auditId = (Integer) row.get("audit_id");
String type = (String) row.get("name");
Integer userId = (Integer) row.get("user_id");
Date auditDate = (Date) row.get("audit_date");
String auditReason = (String) row.get("reason_for_change");
String oldValue = (String) row.get("old_value");
String newValue = (String) row.get("new_value");
Integer typeId = (Integer) row.get("audit_log_event_type_id");
if (evnOidPoses.containsKey(studySubjectLabel + sedOid)) {
String[] poses = evnOidPoses.get(studySubjectLabel + sedOid).split("---");
ExportStudyEventDataBean se =
data.getExportSubjectData().get(Integer.parseInt(poses[0])).getExportStudyEventData().get(Integer.parseInt(poses[1]));
AuditLogBean auditLog = new AuditLogBean();
auditLog.setOid("AL_" + auditId);
auditLog.setUserId("USR_" + userId);
auditLog.setDatetimeStamp(auditDate);
auditLog.setType(type);
auditLog.setReasonForChange(auditReason);
if (typeId == 17 || typeId == 18 || typeId == 19 || typeId == 20 || typeId == 21 || typeId == 22 || typeId == 23 || typeId == 31) {
if ("0".equals(newValue)) {
auditLog.setOldValue(SubjectEventStatus.INVALID.getName());
} else {
auditLog.setNewValue(SubjectEventStatus.getFromMap(Integer.parseInt(newValue)).getName());
}
if ("0".equals(oldValue)) {
auditLog.setOldValue(SubjectEventStatus.INVALID.getName());
} else {
auditLog.setOldValue(SubjectEventStatus.getFromMap(Integer.parseInt(oldValue)).getName());
}
} else {
auditLog.setNewValue(newValue);
auditLog.setOldValue(oldValue);
}
AuditLogsBean logs = se.getAuditLogs();
if (logs.getEntityID() == null || logs.getEntityID().length() <= 0) {
logs.setEntityID(se.getStudyEventOID());
}
logs.getAuditLogs().add(auditLog);
se.setAuditLogs(logs);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setOCEventDataAuditLogs
File: core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
Repository: OpenClinica
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-24831
|
HIGH
| 7.5
|
OpenClinica
|
setOCEventDataAuditLogs
|
core/src/main/java/org/akaza/openclinica/dao/extract/OdmExtractDAO.java
|
b152cc63019230c9973965a98e4386ea5322c18f
| 0
|
Analyze the following code function for security vulnerabilities
|
private static boolean isValidBssid(String bssidStr) {
try {
MacAddress bssid = MacAddress.fromString(bssidStr);
return !Objects.equals(bssid, WifiManager.ALL_ZEROS_MAC_ADDRESS);
} catch (IllegalArgumentException e) {
return false;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isValidBssid
File: service/java/com/android/server/wifi/ClientModeImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
isValidBssid
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void testDeserializationAsInt03Nanoseconds() throws Exception
{
Instant date = Instant.now();
date = date.minus(date.getNano(), ChronoUnit.NANOS);
Instant value = MAPPER.readerFor(Instant.class)
.with(DeserializationFeature.READ_DATE_TIMESTAMPS_AS_NANOSECONDS)
.readValue(Long.toString(date.getEpochSecond()));
assertEquals("The value is not correct.", date, value);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: testDeserializationAsInt03Nanoseconds
File: datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestInstantSerialization.java
Repository: FasterXML/jackson-modules-java8
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2018-1000873
|
MEDIUM
| 4.3
|
FasterXML/jackson-modules-java8
|
testDeserializationAsInt03Nanoseconds
|
datetime/src/test/java/com/fasterxml/jackson/datatype/jsr310/TestInstantSerialization.java
|
ba27ce5909dfb49bcaf753ad3e04ecb980010b0b
| 0
|
Analyze the following code function for security vulnerabilities
|
private void broadcastCardStateAndIccRefreshResp(CardState cardState,
IccRefreshResponse iccRefreshState) {
Intent intent = new Intent(AppInterface.CAT_ICC_STATUS_CHANGE);
boolean cardPresent = (cardState == CardState.CARDSTATE_PRESENT);
if (iccRefreshState != null) {
//This case is when MSG_ID_ICC_REFRESH is received.
intent.putExtra(AppInterface.REFRESH_RESULT, iccRefreshState.refreshResult);
CatLog.d(this, "Sending IccResult with Result: "
+ iccRefreshState.refreshResult);
}
// This sends an intent with CARD_ABSENT (0 - false) /CARD_PRESENT (1 - true).
intent.putExtra(AppInterface.CARD_STATUS, cardPresent);
CatLog.d(this, "Sending Card Status: "
+ cardState + " " + "cardPresent: " + cardPresent);
mContext.sendBroadcast(intent);
}
|
Vulnerability Classification:
- CWE: CWE-264
- CVE: CVE-2015-3843
- Severity: HIGH
- CVSS Score: 9.3
Description: DO NOT MERGE Change to add STK_PERMISSION for stk related commands.
And make stk commands protected.
Bug: 21697171
Change-Id: I7649c7341428194963ac74e9ae622dfa76ea738b
Function: broadcastCardStateAndIccRefreshResp
File: src/java/com/android/internal/telephony/cat/CatService.java
Repository: android
Fixed Code:
private void broadcastCardStateAndIccRefreshResp(CardState cardState,
IccRefreshResponse iccRefreshState) {
Intent intent = new Intent(AppInterface.CAT_ICC_STATUS_CHANGE);
boolean cardPresent = (cardState == CardState.CARDSTATE_PRESENT);
if (iccRefreshState != null) {
//This case is when MSG_ID_ICC_REFRESH is received.
intent.putExtra(AppInterface.REFRESH_RESULT, iccRefreshState.refreshResult);
CatLog.d(this, "Sending IccResult with Result: "
+ iccRefreshState.refreshResult);
}
// This sends an intent with CARD_ABSENT (0 - false) /CARD_PRESENT (1 - true).
intent.putExtra(AppInterface.CARD_STATUS, cardPresent);
CatLog.d(this, "Sending Card Status: "
+ cardState + " " + "cardPresent: " + cardPresent);
mContext.sendBroadcast(intent, AppInterface.STK_PERMISSION);
}
|
[
"CWE-264"
] |
CVE-2015-3843
|
HIGH
| 9.3
|
android
|
broadcastCardStateAndIccRefreshResp
|
src/java/com/android/internal/telephony/cat/CatService.java
|
b48581401259439dc5ef6dcf8b0f303e4cbefbe9
| 1
|
Analyze the following code function for security vulnerabilities
|
private <T> T removeSessionAttribute(String name)
{
HttpSession session = getHttpSession();
if (session != null) {
try {
return (T) session.getAttribute(name);
} finally {
session.removeAttribute(name);
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeSessionAttribute
File: oidc-authenticator/src/main/java/org/xwiki/contrib/oidc/auth/internal/OIDCClientConfiguration.java
Repository: xwiki-contrib/oidc
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2022-39387
|
HIGH
| 7.5
|
xwiki-contrib/oidc
|
removeSessionAttribute
|
oidc-authenticator/src/main/java/org/xwiki/contrib/oidc/auth/internal/OIDCClientConfiguration.java
|
0247af1417925b9734ab106ad7cd934ee870ac89
| 0
|
Analyze the following code function for security vulnerabilities
|
private void handleBinderHeavyHitterAutoSamplerTimeOut() {
synchronized (mProcLock) {
if (mConstants.BINDER_HEAVY_HITTER_WATCHER_ENABLED) {
// The default watcher is ON, don't bother to stop it.
return;
}
}
Binder.setHeavyHitterWatcherConfig(false, 0, 0.0f, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleBinderHeavyHitterAutoSamplerTimeOut
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
|
handleBinderHeavyHitterAutoSamplerTimeOut
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public CodeChallengeMethod getPkceMethod() {
return pkceMethod;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPkceMethod
File: pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java
Repository: pac4j
The code follows secure coding practices.
|
[
"CWE-347"
] |
CVE-2021-44878
|
MEDIUM
| 5
|
pac4j
|
getPkceMethod
|
pac4j-oidc/src/main/java/org/pac4j/oidc/config/OidcConfiguration.java
|
22b82ffd702a132d9f09da60362fc6264fc281ae
| 0
|
Analyze the following code function for security vulnerabilities
|
public Executor getExecutor() {
return executor;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getExecutor
File: websockets-jsr/src/main/java/io/undertow/websockets/jsr/FrameHandler.java
Repository: undertow-io/undertow
The code follows secure coding practices.
|
[
"CWE-401"
] |
CVE-2021-3690
|
HIGH
| 7.5
|
undertow-io/undertow
|
getExecutor
|
websockets-jsr/src/main/java/io/undertow/websockets/jsr/FrameHandler.java
|
c7e84a0b7efced38506d7d1dfea5902366973877
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void parsePolicy(Element topLevelElement, ParseContext parseContext)
throws PolicyException {
if (topLevelElement == null) return;
parseContext.resetParamsWhereLastConfigWins();
parseCommonRegExps(getFirstChild(topLevelElement, "common-regexps"), parseContext.commonRegularExpressions);
parseDirectives(getFirstChild(topLevelElement, "directives"), parseContext.directives);
parseCommonAttributes(getFirstChild(topLevelElement, "common-attributes"), parseContext.commonAttributes, parseContext.commonRegularExpressions);
parseGlobalAttributes(getFirstChild(topLevelElement, "global-tag-attributes"), parseContext.globalAttributes, parseContext.commonAttributes);
parseDynamicAttributes(getFirstChild(topLevelElement, "dynamic-tag-attributes"), parseContext.dynamicAttributes, parseContext.commonAttributes);
parseTagRules(getFirstChild(topLevelElement, "tag-rules"), parseContext.commonAttributes, parseContext.commonRegularExpressions, parseContext.tagRules);
parseCSSRules(getFirstChild(topLevelElement, "css-rules"), parseContext.cssRules, parseContext.commonRegularExpressions);
parseAllowedEmptyTags(getFirstChild(topLevelElement, "allowed-empty-tags"), parseContext.allowedEmptyTags);
parseRequiresClosingTags(getFirstChild(topLevelElement, "require-closing-tags"), parseContext.requireClosingTags);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parsePolicy
File: src/main/java/org/owasp/validator/html/Policy.java
Repository: nahsra/antisamy
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2017-14735
|
MEDIUM
| 4.3
|
nahsra/antisamy
|
parsePolicy
|
src/main/java/org/owasp/validator/html/Policy.java
|
82da009e733a989a57190cd6aa1b6824724f6d36
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public XMLBuilder2 d(byte[] data) {
return cdata(data);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: d
File: src/main/java/com/jamesmurty/utils/XMLBuilder2.java
Repository: jmurty/java-xmlbuilder
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2014-125087
|
MEDIUM
| 5.2
|
jmurty/java-xmlbuilder
|
d
|
src/main/java/com/jamesmurty/utils/XMLBuilder2.java
|
e6fddca201790abab4f2c274341c0bb8835c3e73
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void restoreAccountAccessPermissions(byte[] data, int userId) {
synchronized (mLock) {
if (mBackupHelper == null) {
mBackupHelper = new AccountManagerBackupHelper(
AccountManagerService.this, this);
}
mBackupHelper.restoreAccountAccessPermissions(data, userId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: restoreAccountAccessPermissions
File: services/core/java/com/android/server/accounts/AccountManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-502"
] |
CVE-2023-45777
|
HIGH
| 7.8
|
android
|
restoreAccountAccessPermissions
|
services/core/java/com/android/server/accounts/AccountManagerService.java
|
f810d81839af38ee121c446105ca67cb12992fc6
| 0
|
Analyze the following code function for security vulnerabilities
|
private void internalDeleteSubscriptionForNonPartitionedTopicForcefully(AsyncResponse asyncResponse,
String subName, boolean authoritative) {
try {
validateTopicOwnership(topicName, authoritative);
validateTopicOperation(topicName, TopicOperation.UNSUBSCRIBE);
Topic topic = getTopicReference(topicName);
Subscription sub = topic.getSubscription(subName);
if (sub == null) {
asyncResponse.resume(new RestException(Status.NOT_FOUND, "Subscription not found"));
return;
}
sub.deleteForcefully().get();
log.info("[{}][{}] Deleted subscription forcefully {}", clientAppId(), topicName, subName);
asyncResponse.resume(Response.noContent().build());
} catch (Exception e) {
if (e instanceof WebApplicationException) {
if (log.isDebugEnabled()) {
log.debug("[{}] Failed to delete subscription forcefully from topic {},"
+ " redirecting to other brokers.",
clientAppId(), topicName, e);
}
asyncResponse.resume(e);
} else {
log.error("[{}] Failed to delete subscription forcefully {} {}",
clientAppId(), topicName, subName, e);
asyncResponse.resume(new RestException(e));
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: internalDeleteSubscriptionForNonPartitionedTopicForcefully
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
|
internalDeleteSubscriptionForNonPartitionedTopicForcefully
|
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 copyFilesFromJarTrimmingBasePath(File jar,
String jarDirectoryToCopyFrom, File outputDirectory,
String... wildcardPathExclusions) {
requireFileExistence(jar);
if (!Objects.requireNonNull(outputDirectory).isDirectory()) {
throw new IllegalArgumentException(
String.format("Expect '%s' to be an existing directory",
outputDirectory));
}
String basePath = normalizeJarBasePath(jarDirectoryToCopyFrom);
try (JarFile jarFile = new JarFile(jar, false)) {
jarFile.stream().filter(file -> !file.isDirectory())
.filter(file -> file.getName().toLowerCase(Locale.ENGLISH)
.startsWith(basePath.toLowerCase(Locale.ENGLISH)))
.filter(file -> isFileIncluded(file,
wildcardPathExclusions))
.forEach(jarEntry -> copyJarEntryTrimmingBasePath(jarFile,
jarEntry, basePath, outputDirectory));
} catch (IOException e) {
throw new UncheckedIOException(String.format(
"Failed to extract files from jarFile '%s' to directory '%s'",
jar, outputDirectory), e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: copyFilesFromJarTrimmingBasePath
File: flow-server/src/main/java/com/vaadin/flow/server/frontend/JarContentsManager.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-379"
] |
CVE-2021-31411
|
MEDIUM
| 4.6
|
vaadin/flow
|
copyFilesFromJarTrimmingBasePath
|
flow-server/src/main/java/com/vaadin/flow/server/frontend/JarContentsManager.java
|
82cea56045b8430f7a26f037c01486b1feffa51d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setScreenCaptureDisabled(ComponentName who, boolean disabled, boolean parent) {
if (!mHasFeature) {
return;
}
Objects.requireNonNull(who, "ComponentName is null");
final CallerIdentity caller = getCallerIdentity(who);
if (parent) {
Preconditions.checkCallAuthorization(isProfileOwnerOfOrganizationOwnedDevice(caller));
}
synchronized (getLockObject()) {
ActiveAdmin ap = getParentOfAdminIfRequired(getProfileOwnerOrDeviceOwnerLocked(caller),
parent);
if (ap.disableScreenCapture != disabled) {
ap.disableScreenCapture = disabled;
saveSettingsLocked(caller.getUserId());
pushScreenCapturePolicy(caller.getUserId());
}
}
DevicePolicyEventLogger
.createEvent(DevicePolicyEnums.SET_SCREEN_CAPTURE_DISABLED)
.setAdmin(caller.getComponentName())
.setBoolean(disabled)
.write();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setScreenCaptureDisabled
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
|
setScreenCaptureDisabled
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getUserAgent(){
return userAgent;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserAgent
File: samples/client/petstore/java/retrofit2-play26/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
|
getUserAgent
|
samples/client/petstore/java/retrofit2-play26/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
public static VersionNumber getVersion() {
try {
return new VersionNumber(VERSION);
} catch (NumberFormatException e) {
try {
// for non-released version of Hudson, this looks like "1.345 (private-foobar), so try to approximate.
int idx = VERSION.indexOf(' ');
if (idx>0)
return new VersionNumber(VERSION.substring(0,idx));
} catch (NumberFormatException _) {
// fall through
}
// totally unparseable
return null;
} catch (IllegalArgumentException e) {
// totally unparseable
return null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getVersion
File: core/src/main/java/jenkins/model/Jenkins.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-2065
|
MEDIUM
| 4.3
|
jenkinsci/jenkins
|
getVersion
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Bundle getSessionInfo() {
return mSessionInfo;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSessionInfo
File: services/core/java/com/android/server/media/MediaSessionRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21280
|
MEDIUM
| 5.5
|
android
|
getSessionInfo
|
services/core/java/com/android/server/media/MediaSessionRecord.java
|
06e772e05514af4aa427641784c5eec39a892ed3
| 0
|
Analyze the following code function for security vulnerabilities
|
private void doActionCreateOrValidate(HttpServletRequest theReq, HomeRequest theRequest, BindingResult theBindingResult, ModelMap theModel, String theMethod) {
boolean validate = "validate".equals(theMethod);
addCommonParams(theReq, theRequest, theModel);
CaptureInterceptor interceptor = new CaptureInterceptor();
GenericClient client = theRequest.newClient(theReq, getContext(theRequest), myConfig, interceptor);
client.setPrettyPrint(true);
Class<? extends IBaseResource> type = null; // def.getImplementingClass();
if ("history-type".equals(theMethod)) {
RuntimeResourceDefinition def = getContext(theRequest).getResourceDefinition(theRequest.getResource());
type = def.getImplementingClass();
}
String body = validate ? theReq.getParameter("resource-validate-body") : theReq.getParameter("resource-create-body");
if (isBlank(body)) {
theModel.put("errorMsg", toDisplayError("No message body specified", null));
return;
}
body = preProcessMessageBody(body);
IBaseResource resource;
try {
if (body.startsWith("{")) {
resource = getContext(theRequest).newJsonParser().parseResource(type, body);
client.setEncoding(EncodingEnum.JSON);
} else if (body.startsWith("<")) {
resource = getContext(theRequest).newXmlParser().parseResource(type, body);
client.setEncoding(EncodingEnum.XML);
} else {
theModel.put("errorMsg",
toDisplayError("Message body does not appear to be a valid FHIR resource instance document. Body should start with '<' (for XML encoding) or '{' (for JSON encoding).", null));
return;
}
} catch (DataFormatException e) {
ourLog.warn("Failed to parse resource", e);
theModel.put("errorMsg", toDisplayError("Failed to parse message body. Error was: " + e.getMessage(), e));
return;
}
String outcomeDescription;
long start = System.currentTimeMillis();
ResultType returnsResource = ResultType.RESOURCE;
outcomeDescription = "";
boolean update = false;
try {
if (validate) {
outcomeDescription = "Validate Resource";
client.validate().resource(resource).prettyPrint().execute();
} else {
String id = theReq.getParameter("resource-create-id");
if ("update".equals(theMethod)) {
outcomeDescription = "Update Resource";
client.update(id, resource);
update = true;
} else {
outcomeDescription = "Create Resource";
ICreateTyped create = client.create().resource(body);
create.execute();
}
}
} catch (Exception e) {
returnsResource = handleClientException(client, e, theModel);
}
long delay = System.currentTimeMillis() - start;
processAndAddLastClientInvocation(client, returnsResource, theModel, delay, outcomeDescription, interceptor, theRequest);
try {
if (validate) {
ourLog.info(logPrefix(theModel) + "Validated resource of type " + getResourceType(theRequest, theReq).getName());
} else if (update) {
ourLog.info(logPrefix(theModel) + "Updated resource of type " + getResourceType(theRequest, theReq).getName());
} else {
ourLog.info(logPrefix(theModel) + "Created resource of type " + getResourceType(theRequest, theReq).getName());
}
} catch (Exception e) {
ourLog.warn("Failed to determine resource type from request", e);
}
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2020-24301
- Severity: MEDIUM
- CVSS Score: 4.3
Description: Resolve XSS vulnerability
Function: doActionCreateOrValidate
File: hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/Controller.java
Repository: hapifhir/hapi-fhir
Fixed Code:
private void doActionCreateOrValidate(HttpServletRequest theReq, HomeRequest theRequest, BindingResult theBindingResult, ModelMap theModel, String theMethod) {
boolean validate = "validate".equals(theMethod);
addCommonParams(theReq, theRequest, theModel);
CaptureInterceptor interceptor = new CaptureInterceptor();
GenericClient client = theRequest.newClient(theReq, getContext(theRequest), myConfig, interceptor);
client.setPrettyPrint(true);
Class<? extends IBaseResource> type = null; // def.getImplementingClass();
if ("history-type".equals(theMethod)) {
RuntimeResourceDefinition def = getContext(theRequest).getResourceDefinition(theRequest.getResource());
type = def.getImplementingClass();
}
// Don't sanitize this param, it's a raw resource body and may well be XML
String body = validate ? theReq.getParameter("resource-validate-body") : theReq.getParameter("resource-create-body");
if (isBlank(body)) {
theModel.put("errorMsg", toDisplayError("No message body specified", null));
return;
}
body = preProcessMessageBody(body);
IBaseResource resource;
try {
if (body.startsWith("{")) {
resource = getContext(theRequest).newJsonParser().parseResource(type, body);
client.setEncoding(EncodingEnum.JSON);
} else if (body.startsWith("<")) {
resource = getContext(theRequest).newXmlParser().parseResource(type, body);
client.setEncoding(EncodingEnum.XML);
} else {
theModel.put("errorMsg",
toDisplayError("Message body does not appear to be a valid FHIR resource instance document. Body should start with '<' (for XML encoding) or '{' (for JSON encoding).", null));
return;
}
} catch (DataFormatException e) {
ourLog.warn("Failed to parse resource", e);
theModel.put("errorMsg", toDisplayError("Failed to parse message body. Error was: " + e.getMessage(), e));
return;
}
String outcomeDescription;
long start = System.currentTimeMillis();
ResultType returnsResource = ResultType.RESOURCE;
outcomeDescription = "";
boolean update = false;
try {
if (validate) {
outcomeDescription = "Validate Resource";
client.validate().resource(resource).prettyPrint().execute();
} else {
String id = sanitizeUrlPart(theReq.getParameter("resource-create-id"));
if ("update".equals(theMethod)) {
outcomeDescription = "Update Resource";
client.update(id, resource);
update = true;
} else {
outcomeDescription = "Create Resource";
ICreateTyped create = client.create().resource(body);
create.execute();
}
}
} catch (Exception e) {
returnsResource = handleClientException(client, e, theModel);
}
long delay = System.currentTimeMillis() - start;
processAndAddLastClientInvocation(client, returnsResource, theModel, delay, outcomeDescription, interceptor, theRequest);
try {
if (validate) {
ourLog.info(logPrefix(theModel) + "Validated resource of type " + getResourceType(theRequest, theReq).getName());
} else if (update) {
ourLog.info(logPrefix(theModel) + "Updated resource of type " + getResourceType(theRequest, theReq).getName());
} else {
ourLog.info(logPrefix(theModel) + "Created resource of type " + getResourceType(theRequest, theReq).getName());
}
} catch (Exception e) {
ourLog.warn("Failed to determine resource type from request", e);
}
}
|
[
"CWE-79"
] |
CVE-2020-24301
|
MEDIUM
| 4.3
|
hapifhir/hapi-fhir
|
doActionCreateOrValidate
|
hapi-fhir-testpage-overlay/src/main/java/ca/uhn/fhir/to/Controller.java
|
adb3734fcbbf9a9165445e9ee5eef168dbcaedaf
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getPicture(String fileIds, String code) {
if (StringUtils.isEmpty(code)) {
code = Constants.SYMBOL_COMMA;
}
if (StringUtils.isEmpty(fileIds)) {
log.error(MessageConf.PICTURE_UID_IS_NULL);
return ResultUtil.result(SysConf.ERROR, MessageConf.PICTURE_UID_IS_NULL);
} else {
List<Map<String, Object>> list = new ArrayList<>();
List<String> changeStringToString = StringUtils.changeStringToString(fileIds, code);
QueryWrapper<com.moxi.mogublog.commons.entity.File> queryWrapper = new QueryWrapper<>();
queryWrapper.in(SQLConf.UID, changeStringToString);
List<com.moxi.mogublog.commons.entity.File> fileList = fileService.list(queryWrapper);
if (fileList.size() > 0) {
for (com.moxi.mogublog.commons.entity.File file : fileList) {
if (file != null) {
Map<String, Object> remap = new HashMap<>();
// 获取七牛云地址
remap.put(SysConf.QI_NIU_URL, file.getQiNiuUrl());
// 获取Minio对象存储地址
remap.put(SysConf.MINIO_URL, file.getMinioUrl());
// 获取本地地址
remap.put(SysConf.URL, file.getPicUrl());
// 后缀名,也就是类型
remap.put(SysConf.EXPANDED_NAME, file.getPicExpandedName());
remap.put(SysConf.FILE_OLD_NAME, file.getFileOldName());
//名称
remap.put(SysConf.NAME, file.getPicName());
remap.put(SysConf.UID, file.getUid());
remap.put(SQLConf.FILE_OLD_NAME, file.getFileOldName());
list.add(remap);
}
}
}
return ResultUtil.result(SysConf.SUCCESS, list);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPicture
File: mogu_picture/src/main/java/com/moxi/mogublog/picture/service/impl/FileServiceImpl.java
Repository: moxi624/mogu_blog_v2
The code follows secure coding practices.
|
[
"CWE-434"
] |
CVE-2022-27047
|
HIGH
| 7.5
|
moxi624/mogu_blog_v2
|
getPicture
|
mogu_picture/src/main/java/com/moxi/mogublog/picture/service/impl/FileServiceImpl.java
|
2d9eb941cda8fd168f9447cd6b4262f31f074d92
| 0
|
Analyze the following code function for security vulnerabilities
|
private int resolveOwningUserIdForSystemSettingLocked(int userId, String setting) {
return resolveOwningUserIdLocked(userId, sSystemCloneToManagedSettings, setting);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resolveOwningUserIdForSystemSettingLocked
File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3876
|
HIGH
| 7.2
|
android
|
resolveOwningUserIdForSystemSettingLocked
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
91fc934bb2e5ea59929bb2f574de6db9b5100745
| 0
|
Analyze the following code function for security vulnerabilities
|
public ConsoleResult workingRepositoryUrl() {
CommandLine hg = hg("showconfig", "paths.default");
final ConsoleResult result = execute(hg);
LOGGER.trace("Current repository url of [{}]: {}", workingDir, result.outputForDisplayAsString());
LOGGER.trace("Target repository url: {}", url);
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: workingRepositoryUrl
File: domain/src/main/java/com/thoughtworks/go/domain/materials/mercurial/HgCommand.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-77"
] |
CVE-2022-29184
|
MEDIUM
| 6.5
|
gocd
|
workingRepositoryUrl
|
domain/src/main/java/com/thoughtworks/go/domain/materials/mercurial/HgCommand.java
|
37d35115db2ada2190173f9413cfe1bc6c295ecb
| 0
|
Analyze the following code function for security vulnerabilities
|
public HttpRequest acceptJson() {
return accept(MimeTypes.MIME_APPLICATION_JSON);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: acceptJson
File: src/main/java/jodd/http/HttpRequest.java
Repository: oblac/jodd-http
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2022-29631
|
MEDIUM
| 5
|
oblac/jodd-http
|
acceptJson
|
src/main/java/jodd/http/HttpRequest.java
|
e50f573c8f6a39212ade68c6eb1256b2889fa8a6
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setName(String name) {
this.name = name;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setName
File: base/common/src/main/java/org/dogtagpki/common/Info.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
setName
|
base/common/src/main/java/org/dogtagpki/common/Info.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public void init() throws ServiceException {
instantiator = createInstantiator();
// init the router now so that registry will be available for
// modifications
router = new Router(getRouteRegistry());
List<RequestHandler> handlers = createRequestHandlers();
ServiceInitEvent event = new ServiceInitEvent(this);
// allow service init listeners and DI to use thread local access to
// e.g. application scoped route registry
runWithServiceContext(() -> {
instantiator.getServiceInitListeners()
.forEach(listener -> listener.serviceInit(event));
event.getAddedRequestHandlers().forEach(handlers::add);
Collections.reverse(handlers);
requestHandlers = Collections.unmodifiableCollection(handlers);
dependencyFilters = Collections.unmodifiableCollection(instantiator
.getDependencyFilters(event.getAddedDependencyFilters())
.collect(Collectors.toList()));
bootstrapListeners = instantiator
.getBootstrapListeners(event.getAddedBootstrapListeners())
.collect(Collectors.toList());
indexHtmlRequestListeners = instantiator
.getIndexHtmlRequestListeners(
event.getAddedIndexHtmlRequestListeners())
.collect(Collectors.toList());
});
DeploymentConfiguration configuration = getDeploymentConfiguration();
if (!configuration.isProductionMode()) {
Logger logger = getLogger();
logger.debug("The application has the following routes: ");
List<RouteData> routeDataList = getRouteRegistry()
.getRegisteredRoutes();
if (!routeDataList.isEmpty()) {
addRouterUsageStatistics();
}
routeDataList.stream().map(Object::toString).forEach(logger::debug);
}
if (getDeploymentConfiguration().isPnpmEnabled()) {
UsageStatistics.markAsUsed("flow/pnpm", null);
}
initialized = true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: init
File: flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-203"
] |
CVE-2021-31404
|
LOW
| 1.9
|
vaadin/flow
|
init
|
flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
|
621ef1b322737d963bee624b2d2e38cd739903d9
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isClient() {
return streamIdCounter % 2 == 1;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isClient
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
|
isClient
|
core/src/main/java/io/undertow/protocols/http2/Http2Channel.java
|
e43f0ada3f4da6e8579e0020cec3cb1a81e487c2
| 0
|
Analyze the following code function for security vulnerabilities
|
@JsonProperty("Attributes")
public AttributeList getAttributeList() {
AttributeList list = new AttributeList();
for (Map.Entry<String, String> entry : attributes.entrySet()) {
Attribute attribute = new Attribute();
attribute.name = entry.getKey();
attribute.value = entry.getValue();
list.attrs.add(attribute);
}
return list;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAttributeList
File: base/common/src/main/java/com/netscape/certsrv/base/RESTMessage.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
getAttributeList
|
base/common/src/main/java/com/netscape/certsrv/base/RESTMessage.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void sendErrorResponseToSP(String referrer, Response response, String relayState, IDPWebRequestUtil webRequestUtil)
throws ServletException, IOException, ConfigurationException {
logger.trace("About to send error response to SP:" + referrer);
String contextPath = getContextPath();
IDPType idpConfiguration = getIdpConfiguration();
Document samlResponse = webRequestUtil.getErrorResponse(referrer, JBossSAMLURIConstants.STATUS_RESPONDER.get(),
getIdentityURL(), idpConfiguration.isSupportsSignature());
try {
WebRequestUtilHolder holder = webRequestUtil.getHolder();
holder.setResponseDoc(samlResponse).setDestination(referrer).setRelayState(relayState)
.setAreWeSendingRequest(false).setPrivateKey(null).setSupportSignature(false).setServletResponse(response);
holder.setPostBindingRequested(webRequestUtil.hasSAMLRequestInPostProfile());
if (idpConfiguration.isSupportsSignature()) {
holder.setPrivateKey(keyManager.getSigningKey()).setSupportSignature(true);
}
holder.setStrictPostBinding(idpConfiguration.isStrictPostBinding());
if (holder.isPostBinding()) {
recycle(response);
}
if (isEnableAudit()) {
PicketLinkAuditEvent auditEvent = new PicketLinkAuditEvent(AuditLevel.INFO);
auditEvent.setType(PicketLinkAuditEventType.ERROR_RESPONSE_TO_SP);
auditEvent.setWhoIsAuditing(contextPath);
auditEvent.setDestination(referrer);
auditHelper.audit(auditEvent);
}
webRequestUtil.send(holder);
} catch (ParsingException e1) {
throw new ServletException(e1);
} catch (GeneralSecurityException e) {
throw new ServletException(e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendErrorResponseToSP
File: picketlink-tomcat-common/src/main/java/org/picketlink/identity/federation/bindings/tomcat/idp/AbstractIDPValve.java
Repository: picketlink/picketlink-bindings
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2015-3158
|
MEDIUM
| 4
|
picketlink/picketlink-bindings
|
sendErrorResponseToSP
|
picketlink-tomcat-common/src/main/java/org/picketlink/identity/federation/bindings/tomcat/idp/AbstractIDPValve.java
|
341a37aefd69e67b6b5f6d775499730d6ccaff0d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public EntityReference createEntityReference(String name) throws DOMException {
return doc.createEntityReference(name);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createEntityReference
File: HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java
Repository: LoboEvolution
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000540
|
MEDIUM
| 6.8
|
LoboEvolution
|
createEntityReference
|
HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java
|
9b75694cedfa4825d4a2330abf2719d470c654cd
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean optBoolean(String key) {
return optBoolean(key, false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: optBoolean
File: src/main/java/org/codehaus/jettison/json/JSONObject.java
Repository: jettison-json/jettison
The code follows secure coding practices.
|
[
"CWE-674",
"CWE-787"
] |
CVE-2022-45693
|
HIGH
| 7.5
|
jettison-json/jettison
|
optBoolean
|
src/main/java/org/codehaus/jettison/json/JSONObject.java
|
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
| 0
|
Analyze the following code function for security vulnerabilities
|
@ParameterizedTest
@MethodSource("testsParameters")
@Order(6)
void registerEmptyUserName(boolean useLiveValidation, boolean isModal, TestUtils testUtils) throws Exception
{
AbstractRegistrationPage registrationPage = setUp(testUtils, useLiveValidation, isModal);
// A piece of javascript fills in the username with the first and last names so we will empty them.
registrationPage.fillRegisterForm("", "", "", null, null, null);
assertFalse(validateAndRegister(testUtils, useLiveValidation, isModal, registrationPage));
assertTrue(registrationPage.validationFailureMessagesInclude("This field is required."));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: registerEmptyUserName
File: xwiki-platform-core/xwiki-platform-administration/xwiki-platform-administration-test/xwiki-platform-administration-test-docker/src/test/it/org/xwiki/administration/test/ui/RegisterIT.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2024-21650
|
CRITICAL
| 9.8
|
xwiki/xwiki-platform
|
registerEmptyUserName
|
xwiki-platform-core/xwiki-platform-administration/xwiki-platform-administration-test/xwiki-platform-administration-test-docker/src/test/it/org/xwiki/administration/test/ui/RegisterIT.java
|
b290bfd573c6f7db6cc15a88dd4111d9fcad0d31
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
@InlineMe(
replacement = "Files.asCharSource(from, charset).copyTo(to)",
imports = "com.google.common.io.Files")
public
static void copy(File from, Charset charset, Appendable to) throws IOException {
asCharSource(from, charset).copyTo(to);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: copy
File: guava/src/com/google/common/io/Files.java
Repository: google/guava
The code follows secure coding practices.
|
[
"CWE-552"
] |
CVE-2023-2976
|
HIGH
| 7.1
|
google/guava
|
copy
|
guava/src/com/google/common/io/Files.java
|
feb83a1c8fd2e7670b244d5afd23cba5aca43284
| 0
|
Analyze the following code function for security vulnerabilities
|
private void recycleAllVisibilityObjects(ArraySet<NotificationVisibility> array) {
final int N = array.size();
for (int i = 0 ; i < N; i++) {
array.valueAt(i).recycle();
}
array.clear();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: recycleAllVisibilityObjects
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
|
recycleAllVisibilityObjects
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.