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 synchronized void stopMonitoring(String iface) {
if (mVerboseLoggingEnabled) Log.d(TAG, "stopMonitoring(" + iface + ")");
setMonitoring(iface, true);
setMonitoring(iface, false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: stopMonitoring
File: service/java/com/android/server/wifi/WifiMonitor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
stopMonitoring
|
service/java/com/android/server/wifi/WifiMonitor.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
void onHomepageLoaded();
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onHomepageLoaded
File: src/com/android/settings/homepage/SettingsHomepageActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21256
|
HIGH
| 7.8
|
android
|
onHomepageLoaded
|
src/com/android/settings/homepage/SettingsHomepageActivity.java
|
62fc1d269f5e754fc8f00b6167d79c3933b4c1f4
| 0
|
Analyze the following code function for security vulnerabilities
|
private native void alarmFiredNative();
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: alarmFiredNative
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
|
alarmFiredNative
|
src/com/android/bluetooth/btservice/AdapterService.java
|
122feb9a0b04290f55183ff2f0384c6c53756bd8
| 0
|
Analyze the following code function for security vulnerabilities
|
public Document parseDocument(String input) throws InvalidSyntaxException {
return parseDocument(input, (ParserOptions) null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseDocument
File: src/main/java/graphql/parser/Parser.java
Repository: graphql-java
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2023-28867
|
HIGH
| 7.5
|
graphql-java
|
parseDocument
|
src/main/java/graphql/parser/Parser.java
|
8a1c884c81c0b656db201cfd95881feb0f430a55
| 0
|
Analyze the following code function for security vulnerabilities
|
private void onResolvedRevisionChange(AjaxRequestTarget target) {
/*
* A hack to reset resolved revision to null to disable getObjectIdCache()
* temporarily as otherwise getObjectId() method below will always
* resolved to existing value of resolvedRevision
*/
resolvedRevision = null;
resolvedRevision = getProject().getRevCommit(state.blobIdent.revision, true).copy();
OneDev.getInstance(WebSocketManager.class).observe(this);
newRevisionPicker(target);
newCommitStatus(target);
target.add(revisionIndexing);
newBlobNavigator(target);
newBlobOperations(target);
newBuildSupportNote(target);
newBlobContent(target);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onResolvedRevisionChange
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
|
onResolvedRevisionChange
|
server-core/src/main/java/io/onedev/server/web/page/project/blob/ProjectBlobPage.java
|
0c060153fb97c0288a1917efdb17cc426934dacb
| 0
|
Analyze the following code function for security vulnerabilities
|
@GuardedBy("this")
private boolean startProcessLocked(String hostingType, String hostingNameStr, String entryPoint,
ProcessRecord app, int uid, int[] gids, int runtimeFlags, int mountExternal,
String seInfo, String requiredAbi, String instructionSet, String invokeWith,
long startTime) {
app.pendingStart = true;
app.killedByAm = false;
app.removed = false;
app.killed = false;
final long startSeq = app.startSeq = ++mProcStartSeqCounter;
app.setStartParams(uid, hostingType, hostingNameStr, seInfo, startTime);
if (mConstants.FLAG_PROCESS_START_ASYNC) {
if (DEBUG_PROCESSES) Slog.i(TAG_PROCESSES,
"Posting procStart msg for " + app.toShortString());
mProcStartHandler.post(() -> {
try {
synchronized (ActivityManagerService.this) {
final String reason = isProcStartValidLocked(app, startSeq);
if (reason != null) {
Slog.w(TAG_PROCESSES, app + " not valid anymore,"
+ " don't start process, " + reason);
app.pendingStart = false;
return;
}
app.usingWrapper = invokeWith != null
|| SystemProperties.get("wrap." + app.processName) != null;
mPendingStarts.put(startSeq, app);
}
final ProcessStartResult startResult = startProcess(app.hostingType, entryPoint,
app, app.startUid, gids, runtimeFlags, mountExternal, app.seInfo,
requiredAbi, instructionSet, invokeWith, app.startTime);
synchronized (ActivityManagerService.this) {
handleProcessStartedLocked(app, startResult, startSeq);
}
} catch (RuntimeException e) {
synchronized (ActivityManagerService.this) {
Slog.e(TAG, "Failure starting process " + app.processName, e);
mPendingStarts.remove(startSeq);
app.pendingStart = false;
forceStopPackageLocked(app.info.packageName, UserHandle.getAppId(app.uid),
false, false, true, false, false,
UserHandle.getUserId(app.userId), "start failure");
}
}
});
return true;
} else {
try {
final ProcessStartResult startResult = startProcess(hostingType, entryPoint, app,
uid, gids, runtimeFlags, mountExternal, seInfo, requiredAbi, instructionSet,
invokeWith, startTime);
handleProcessStartedLocked(app, startResult.pid, startResult.usingWrapper,
startSeq, false);
} catch (RuntimeException e) {
Slog.e(TAG, "Failure starting process " + app.processName, e);
app.pendingStart = false;
forceStopPackageLocked(app.info.packageName, UserHandle.getAppId(app.uid),
false, false, true, false, false,
UserHandle.getUserId(app.userId), "start failure");
}
return app.pid > 0;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startProcessLocked
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
|
startProcessLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getAdClientId(XWikiContext context)
{
final String defaultadclientid = "pub-2778691407285481";
String adclientid = "";
XWikiDocument wikiServer = context.getWikiServer();
if (wikiServer != null) {
adclientid = wikiServer.getStringValue(VIRTUAL_WIKI_DEFINITION_CLASS_REFERENCE, "adclientid");
}
if (adclientid.equals("")) {
adclientid = getConfiguration().getProperty("xwiki.ad.clientid", "");
}
if (adclientid.equals("")) {
adclientid = defaultadclientid;
}
return adclientid;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAdClientId
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
|
getAdClientId
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
private Attributes getAttributesFromReferralEntity(SearchResult sr) throws NamingException
{
Attributes result = sr.getAttributes();
boolean chkSuccessful = false;
if (referralUserAttributeIDToCheck != null)
{
Attribute usersToCheck = result.get(referralUserAttributeIDToCheck);
for (int i = 0; usersToCheck != null && i < usersToCheck.size(); i++)
{
String userDNToCheck = (String) usersToCheck.get(i);
if (userDNToCheck.equals(referralUserDNToCheck))
{
chkSuccessful = true;
break;
}
if (userDNToCheck.equals(getIdentity().getName()))
{
chkSuccessful = true;
break;
}
}
}
return (chkSuccessful ? result : null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAttributesFromReferralEntity
File: jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/AdvancedLdapLoginModule.java
Repository: wildfly-security/jboss-negotiation
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2015-1849
|
MEDIUM
| 4.3
|
wildfly-security/jboss-negotiation
|
getAttributesFromReferralEntity
|
jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/AdvancedLdapLoginModule.java
|
0dc9d191b6eb1d13b8f0189c5b02ba6576f4722e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public File provide() throws IOException
{
File f = File.createTempFile(_prefix, _suffix);
f.deleteOnExit();
return f;
}
|
Vulnerability Classification:
- CWE: CWE-668
- CVE: CVE-2022-24913
- Severity: MEDIUM
- CVSS Score: 5.5
Description: vuln-fix: Temporary File Information Disclosure
This fixes temporary file information disclosure vulnerability due to the use
of the vulnerable `File.createTempFile()` method. The vulnerability is fixed by
using the `Files.createTempFile()` method which sets the correct posix permissions.
Weakness: CWE-377: Insecure Temporary File
Severity: Medium
CVSSS: 5.5
Detection: CodeQL & OpenRewrite (https://public.moderne.io/recipes/org.openrewrite.java.security.SecureTempFileCreation)
Reported-by: Jonathan Leitschuh <Jonathan.Leitschuh@gmail.com>
Signed-off-by: Jonathan Leitschuh <Jonathan.Leitschuh@gmail.com>
Bug-tracker: https://github.com/JLLeitschuh/security-research/issues/18
Co-authored-by: Moderne <team@moderne.io>
Function: provide
File: src/main/java/com/fasterxml/sort/std/StdTempFileProvider.java
Repository: cowtowncoder/java-merge-sort
Fixed Code:
@Override
public File provide() throws IOException
{
File f = Files.createTempFile(_prefix, _suffix).toFile();
f.deleteOnExit();
return f;
}
|
[
"CWE-668"
] |
CVE-2022-24913
|
MEDIUM
| 5.5
|
cowtowncoder/java-merge-sort
|
provide
|
src/main/java/com/fasterxml/sort/std/StdTempFileProvider.java
|
450fdee70b5f181c2afc5d817f293efa1a543902
| 1
|
Analyze the following code function for security vulnerabilities
|
public void deleteBodyFileByScenarioIds(List<String> ids) {
ApiScenarioExample example = new ApiScenarioExample();
example.createCriteria().andIdIn(ids);
List<ApiScenarioWithBLOBs> apiScenarios = apiScenarioMapper.selectByExampleWithBLOBs(example);
apiScenarios.forEach((item) -> {
deleteBodyFile(item.getScenarioDefinition());
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deleteBodyFileByScenarioIds
File: backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2021-45789
|
MEDIUM
| 6.5
|
metersphere
|
deleteBodyFileByScenarioIds
|
backend/src/main/java/io/metersphere/api/service/ApiAutomationService.java
|
d74e02cdff47cdf7524d305d098db6ffb7f61b47
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
@Nullable
public String getPackageNameByPid(int pid) {
synchronized (mPidsSelfLocked) {
final ProcessRecord app = mPidsSelfLocked.get(pid);
if (app != null && app.info != null) {
return app.info.packageName;
}
return null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPackageNameByPid
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
|
getPackageNameByPid
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public <A extends Output<E>, E extends Exception> void append(A a, double d) throws E {
a.append(d);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: append
File: api/jstachio/src/main/java/io/jstach/jstachio/escapers/HtmlEscaper.java
Repository: jstachio
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-33962
|
MEDIUM
| 6.1
|
jstachio
|
append
|
api/jstachio/src/main/java/io/jstach/jstachio/escapers/HtmlEscaper.java
|
7b2f78377d1284df14c580be762a25af5f8dcd66
| 0
|
Analyze the following code function for security vulnerabilities
|
private int fromByteArray(byte[] bytes, int start)
{
return ((bytes[start + 3] & 0xFF) << 24) |
((bytes[start + 2] & 0xFF) << 16) |
((bytes[start + 1] & 0xFF) << 8 ) |
((bytes[start] & 0xFF) << 0 );
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fromByteArray
File: src/main/java/com/mxgraph/online/ConverterServlet.java
Repository: jgraph/drawio
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-3398
|
HIGH
| 7.5
|
jgraph/drawio
|
fromByteArray
|
src/main/java/com/mxgraph/online/ConverterServlet.java
|
064729fec4262f9373d9fdcafda0be47cd18dd50
| 0
|
Analyze the following code function for security vulnerabilities
|
public void unbindBackupAgent(ApplicationInfo appInfo) {
if (DEBUG_BACKUP) Slog.v(TAG_BACKUP, "unbindBackupAgent: " + appInfo);
if (appInfo == null) {
Slog.w(TAG, "unbind backup agent for null app");
return;
}
int oldBackupUid;
synchronized(this) {
try {
if (mBackupAppName == null) {
Slog.w(TAG, "Unbinding backup agent with no active backup");
return;
}
if (!mBackupAppName.equals(appInfo.packageName)) {
Slog.e(TAG, "Unbind of " + appInfo + " but is not the current backup target");
return;
}
// Not backing this app up any more; reset its OOM adjustment
final ProcessRecord proc = mBackupTarget.app;
updateOomAdjLocked(proc, true);
proc.inFullBackup = false;
oldBackupUid = mBackupTarget != null ? mBackupTarget.appInfo.uid : -1;
// If the app crashed during backup, 'thread' will be null here
if (proc.thread != null) {
try {
proc.thread.scheduleDestroyBackupAgent(appInfo,
compatibilityInfoForPackageLocked(appInfo));
} catch (Exception e) {
Slog.e(TAG, "Exception when unbinding backup agent:");
e.printStackTrace();
}
}
} finally {
mBackupTarget = null;
mBackupAppName = null;
}
}
if (oldBackupUid != -1) {
JobSchedulerInternal js = LocalServices.getService(JobSchedulerInternal.class);
js.removeBackingUpUid(oldBackupUid);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unbindBackupAgent
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
|
unbindBackupAgent
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean more() {
return this.myIndex < this.mySource.length();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: more
File: src/main/java/org/codehaus/jettison/json/JSONTokener.java
Repository: jettison-json/jettison
The code follows secure coding practices.
|
[
"CWE-674",
"CWE-787"
] |
CVE-2022-45693
|
HIGH
| 7.5
|
jettison-json/jettison
|
more
|
src/main/java/org/codehaus/jettison/json/JSONTokener.java
|
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
| 0
|
Analyze the following code function for security vulnerabilities
|
private void removeContentProviderExternalUnchecked(String name, IBinder token, int userId) {
synchronized (this) {
ContentProviderRecord cpr = mProviderMap.getProviderByName(name, userId);
if(cpr == null) {
//remove from mProvidersByClass
if(DEBUG_ALL) Slog.v(TAG, name+" content provider not found in providers list");
return;
}
//update content provider record entry info
ComponentName comp = new ComponentName(cpr.info.packageName, cpr.info.name);
ContentProviderRecord localCpr = mProviderMap.getProviderByClass(comp, userId);
if (localCpr.hasExternalProcessHandles()) {
if (localCpr.removeExternalProcessHandleLocked(token)) {
updateOomAdjLocked();
} else {
Slog.e(TAG, "Attmpt to remove content provider " + localCpr
+ " with no external reference for token: "
+ token + ".");
}
} else {
Slog.e(TAG, "Attmpt to remove content provider: " + localCpr
+ " with no external references.");
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeContentProviderExternalUnchecked
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
|
removeContentProviderExternalUnchecked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
private @UserIdInt int getSecurityLoggingEnabledUser() {
synchronized (getLockObject()) {
if (mOwners.hasDeviceOwner()) {
return UserHandle.USER_ALL;
}
}
// TODO: Add check for permission-based
return getOrganizationOwnedProfileUserId();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSecurityLoggingEnabledUser
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
getSecurityLoggingEnabledUser
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isConnected() {
return mSocketState == SocketState.CONNECTED;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isConnected
File: core/java/android/bluetooth/BluetoothSocket.java
Repository: Genymobile/f2ut_platform_frameworks_base
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2014-9908
|
LOW
| 3.3
|
Genymobile/f2ut_platform_frameworks_base
|
isConnected
|
core/java/android/bluetooth/BluetoothSocket.java
|
f24cec326f5f65c693544fb0b92c37f633bacda2
| 0
|
Analyze the following code function for security vulnerabilities
|
static SURL createWithoutUser(URL url) throws MalformedURLException {
return new SURL(removeUserInfo(url), WITHOUT_AUTHENTICATION);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createWithoutUser
File: src/net/sourceforge/plantuml/security/SURL.java
Repository: plantuml
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2023-3431
|
MEDIUM
| 5.3
|
plantuml
|
createWithoutUser
|
src/net/sourceforge/plantuml/security/SURL.java
|
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setNodeValue(String nodeValue) throws DOMException {
doc.setNodeValue(nodeValue);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setNodeValue
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
|
setNodeValue
|
HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java
|
9b75694cedfa4825d4a2330abf2719d470c654cd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void dispatchSync(Command message) {
try {
processDispatch(message);
} catch (IOException e) {
serviceExceptionAsync(e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dispatchSync
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
|
dispatchSync
|
activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
|
00921f2
| 0
|
Analyze the following code function for security vulnerabilities
|
public void startPrefixMapping(final String prefix,
final String uri) throws SAXException {
super.startPrefixMapping( prefix,
uri );
this.namespaces.put( prefix,
uri );
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startPrefixMapping
File: drools-core/src/main/java/org/drools/core/xml/ExtensibleXmlParser.java
Repository: apache/incubator-kie-drools
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2014-8125
|
HIGH
| 7.5
|
apache/incubator-kie-drools
|
startPrefixMapping
|
drools-core/src/main/java/org/drools/core/xml/ExtensibleXmlParser.java
|
c48464c3b246e6ef0d4cd0dbf67e83ccd532c6d3
| 0
|
Analyze the following code function for security vulnerabilities
|
public static NativeArray jsFunction_getAllDocumentation(Context cx, Scriptable thisObj, Object[] args, Function funObj)
throws ScriptException, APIManagementException {
if (args == null || args.length == 0) {
handleException("Invalid number of parameters.");
}
boolean isTenantFlowStarted = false;
List<Documentation> doclist = null;
String providerName = APIUtil.replaceEmailDomain((String) args[0]);
String apiName = (String) args[1];
String version = (String) args[2];
String username = (String) args[3];
APIConsumer apiConsumer = getAPIConsumer(thisObj);
NativeArray myn = new NativeArray(0);
try {
String tenantDomain = MultitenantUtils.getTenantDomain(APIUtil.replaceEmailDomainBack(providerName));
if (tenantDomain != null && !org.wso2.carbon.utils.multitenancy.MultitenantConstants
.SUPER_TENANT_DOMAIN_NAME.equals(tenantDomain)) {
isTenantFlowStarted = true;
PrivilegedCarbonContext.startTenantFlow();
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(tenantDomain, true);
}
APIIdentifier apiIdentifier = new APIIdentifier(providerName, apiName, version);
doclist = apiConsumer.getAllDocumentation(apiIdentifier, username);
if (doclist != null) {
Iterator it = doclist.iterator();
int i = 0;
while (it.hasNext()) {
NativeObject row = new NativeObject();
Object docObject = it.next();
Documentation documentation = (Documentation) docObject;
Object objectSourceType = documentation.getSourceType();
String strSourceType = objectSourceType.toString();
row.put("name", row, documentation.getName());
row.put("sourceType", row, strSourceType);
row.put("summary", row, documentation.getSummary());
String content;
if (strSourceType.equals("INLINE")) {
content = apiConsumer.getDocumentationContent(apiIdentifier, documentation.getName());
row.put("content", row, content);
}
row.put("sourceUrl", row, documentation.getSourceUrl());
row.put("filePath", row, documentation.getFilePath());
DocumentationType documentationType = documentation.getType();
row.put("type", row, documentationType.getType());
if (documentationType == DocumentationType.OTHER) {
row.put("otherTypeName", row, documentation.getOtherTypeName());
}
myn.put(i, myn, row);
i++;
}
}
} catch (APIManagementException e) {
handleException("Error from Registry API while getting All Documentation on " + apiName, e);
} catch (Exception e) {
handleException("Error while getting All Documentation " + apiName, e);
} finally {
if (isTenantFlowStarted) {
PrivilegedCarbonContext.endTenantFlow();
}
}
return myn;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: jsFunction_getAllDocumentation
File: components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
Repository: wso2/carbon-apimgt
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2018-20736
|
LOW
| 3.5
|
wso2/carbon-apimgt
|
jsFunction_getAllDocumentation
|
components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
|
490f2860822f89d745b7c04fa9570bd86bef4236
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setProfileId(String profileId) {
this.profileId = profileId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setProfileId
File: base/common/src/main/java/com/netscape/certsrv/profile/ProfileDataInfo.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
setProfileId
|
base/common/src/main/java/com/netscape/certsrv/profile/ProfileDataInfo.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public XWikiDocument getDocument(XWikiDocument doc, XWikiContext context) throws XWikiException
{
String currentWiki = context.getWikiId();
try {
context.setWikiId(doc.getDocumentReference().getWikiReference().getName());
try {
// Indicate the the async context manipulated documents
getAsyncContext().useEntity(doc.getDocumentReferenceWithLocale());
} catch (Exception e) {
// If the AsyncContext component does not work then we are not in an asynchronous context anyway
LOGGER.debug("Failed to register the document in the asynchronous context", e);
}
return getStore().loadXWikiDoc(doc, context);
} finally {
context.setWikiId(currentWiki);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDocument
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
|
getDocument
|
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 boolean isAnimatingLw() {
return isAnimating(TRANSITION | PARENTS);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isAnimatingLw
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
|
isAnimatingLw
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void checkListen(int port) {
try {
if (enterPublicInterface())
return;
if (isConnectionAllowed(LOCALHOST, port))
return;
throw new SecurityException(formatLocalized("security.error_network_listen", port)); //$NON-NLS-1$
} finally {
exitPublicInterface();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkListen
File: src/main/java/de/tum/in/test/api/security/ArtemisSecurityManager.java
Repository: ls1intum/Ares
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2024-23683
|
HIGH
| 8.2
|
ls1intum/Ares
|
checkListen
|
src/main/java/de/tum/in/test/api/security/ArtemisSecurityManager.java
|
af4f28a56e2fe600d8750b3b415352a0a3217392
| 0
|
Analyze the following code function for security vulnerabilities
|
@Column(name = "amount", nullable = false, precision = 10)
public BigDecimal getAmount() {
return this.amount;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAmount
File: publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/trade/TradeOrder.java
Repository: sanluan/PublicCMS
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-21333
|
LOW
| 3.5
|
sanluan/PublicCMS
|
getAmount
|
publiccms-parent/publiccms-core/src/main/java/com/publiccms/entities/trade/TradeOrder.java
|
b4d5956e65b14347b162424abb197a180229b3db
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean isZero(byte[] bytes, int startPos, int length) {
return !hasUnsafe() || !unalignedAccess() ?
isZeroSafe(bytes, startPos, length) :
PlatformDependent0.isZero(bytes, startPos, length);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isZero
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
|
isZero
|
common/src/main/java/io/netty/util/internal/PlatformDependent.java
|
185f8b2756a36aaa4f973f1a2a025e7d981823f1
| 0
|
Analyze the following code function for security vulnerabilities
|
@SystemApi
@RequiresPermission(android.Manifest.permission.MANAGE_PROFILE_AND_DEVICE_OWNERS)
@ProvisioningPrecondition
public int checkProvisioningPrecondition(
@NonNull String action, @NonNull String packageName) {
try {
return mService.checkProvisioningPrecondition(action, packageName);
} catch (RemoteException re) {
throw re.rethrowFromSystemServer();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkProvisioningPrecondition
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
|
checkProvisioningPrecondition
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
private void watchForDeviceProvisioning() {
mDeviceProvisionedObserver = new ContentObserver(mHandler) {
@Override
public void onChange(boolean selfChange) {
super.onChange(selfChange);
mDeviceProvisioned = isDeviceProvisionedInSettingsDb();
if (mDeviceProvisioned) {
mHandler.sendEmptyMessage(MSG_DEVICE_PROVISIONED);
}
if (DEBUG) Log.d(TAG, "DEVICE_PROVISIONED state = " + mDeviceProvisioned);
}
};
mContext.getContentResolver().registerContentObserver(
Settings.Global.getUriFor(Settings.Global.DEVICE_PROVISIONED),
false, mDeviceProvisionedObserver);
// prevent a race condition between where we check the flag and where we register the
// observer by grabbing the value once again...
boolean provisioned = isDeviceProvisionedInSettingsDb();
if (provisioned != mDeviceProvisioned) {
mDeviceProvisioned = provisioned;
if (mDeviceProvisioned) {
mHandler.sendEmptyMessage(MSG_DEVICE_PROVISIONED);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: watchForDeviceProvisioning
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
|
watchForDeviceProvisioning
|
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
private BroadcastQueue isReceivingBroadcast(ProcessRecord app) {
BroadcastRecord r = app.curReceiver;
if (r != null) {
return r.queue;
}
// It's not the current receiver, but it might be starting up to become one
synchronized (this) {
for (BroadcastQueue queue : mBroadcastQueues) {
r = queue.mPendingBroadcast;
if (r != null && r.curApp == app) {
// found it; report which queue it's in
return queue;
}
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isReceivingBroadcast
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
|
isReceivingBroadcast
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
private DataBinder dataBinder(String... allowedFields) {
DataBinder dataBinder;
if (rootName == null) {
dataBinder = new DataBinder(blankInstance());
} else {
dataBinder = new DataBinder(blankInstance(), rootName);
}
if (allowedFields.length > 0) {
dataBinder.setAllowedFields(allowedFields);
}
SpringValidatorAdapter validator =
new SpringValidatorAdapter(this.validatorFactory.getValidator());
dataBinder.setValidator(validator);
dataBinder.setConversionService(formatters.conversion);
dataBinder.setAutoGrowNestedPaths(true);
if (this.directFieldAccess) {
// FYI: initBeanPropertyAccess() is the default, let's switch to direct field access instead
dataBinder
.initDirectFieldAccess(); // this should happen last, when everything else was set on the
// dataBinder already
}
return dataBinder;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dataBinder
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
|
dataBinder
|
web/play-java-forms/src/main/java/play/data/Form.java
|
15393b736df939e35e275af2347155f296c684f2
| 0
|
Analyze the following code function for security vulnerabilities
|
private Bundle getUserRestrictionsFromPolicyEngine(EnforcingAdmin admin, int userId) {
Set<UserRestrictionPolicyKey> restrictionKeys =
mDevicePolicyEngine.getUserRestrictionPolicyKeysForAdmin(
admin,
userId);
Bundle restrictions = new Bundle();
for (UserRestrictionPolicyKey key : restrictionKeys) {
restrictions.putBoolean(key.getRestriction(), true);
}
return restrictions;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserRestrictionsFromPolicyEngine
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
getUserRestrictionsFromPolicyEngine
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void syncAsUser(SyncRequest request, int userId) {
enforceCrossUserPermission(userId, "no permission to request sync as user: " + userId);
int callerUid = Binder.getCallingUid();
// This makes it so that future permission checks will be in the context of this
// process rather than the caller's process. We will restore this before returning.
long identityToken = clearCallingIdentity();
try {
SyncManager syncManager = getSyncManager();
if (syncManager == null) {
return;
}
Bundle extras = request.getBundle();
long flextime = request.getSyncFlexTime();
long runAtTime = request.getSyncRunTime();
if (request.isPeriodic()) {
mContext.enforceCallingOrSelfPermission(
Manifest.permission.WRITE_SYNC_SETTINGS,
"no permission to write the sync settings");
SyncStorageEngine.EndPoint info;
info = new SyncStorageEngine.EndPoint(
request.getAccount(), request.getProvider(), userId);
if (runAtTime < 60) {
Slog.w(TAG, "Requested poll frequency of " + runAtTime
+ " seconds being rounded up to 60 seconds.");
runAtTime = 60;
}
// Schedule periodic sync.
getSyncManager().getSyncStorageEngine()
.updateOrAddPeriodicSync(info, runAtTime, flextime, extras);
} else {
long beforeRuntimeMillis = (flextime) * 1000;
long runtimeMillis = runAtTime * 1000;
syncManager.scheduleSync(
request.getAccount(), userId, callerUid, request.getProvider(), extras,
beforeRuntimeMillis, runtimeMillis,
false /* onlyThoseWithUnknownSyncableState */);
}
} finally {
restoreCallingIdentity(identityToken);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: syncAsUser
File: services/core/java/com/android/server/content/ContentService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2426
|
MEDIUM
| 4.3
|
android
|
syncAsUser
|
services/core/java/com/android/server/content/ContentService.java
|
63363af721650e426db5b0bdfb8b2d4fe36abdb0
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void setObjectContent(SolrInputDocument solrDocument, BaseObject object, Locale locale)
{
if (object == null) {
// Yes, the platform can return null objects.
return;
}
BaseClass xClass = object.getXClass(this.xcontextProvider.get());
for (Object field : object.getFieldList()) {
@SuppressWarnings("unchecked")
BaseProperty<EntityReference> property = (BaseProperty<EntityReference>) field;
// Avoid indexing empty properties.
if (property.getValue() != null) {
PropertyClass propertyClass = (PropertyClass) xClass.get(property.getName());
setPropertyValue(solrDocument, property, propertyClass, locale);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setObjectContent
File: xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/internal/metadata/AbstractSolrMetadataExtractor.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-312",
"CWE-200"
] |
CVE-2023-50719
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
setObjectContent
|
xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/java/org/xwiki/search/solr/internal/metadata/AbstractSolrMetadataExtractor.java
|
3e5272f2ef0dff06a8f4db10afd1949b2f9e6eea
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public InetAddress getLocalAddress() {
return _socket.getLocalAddress();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLocalAddress
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
|
getLocalAddress
|
src/main/java/com/rabbitmq/client/impl/SocketFrameHandler.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
private String convertAddr(final byte[] addr) {
return String.format(Locale.US, "%02X:%02X:%02X:%02X:%02X:%02X",
addr[0] , addr[1], addr[2], addr[3] , addr[4], addr[5]);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: convertAddr
File: core/java/android/bluetooth/BluetoothSocket.java
Repository: Genymobile/f2ut_platform_frameworks_base
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2014-9908
|
LOW
| 3.3
|
Genymobile/f2ut_platform_frameworks_base
|
convertAddr
|
core/java/android/bluetooth/BluetoothSocket.java
|
f24cec326f5f65c693544fb0b92c37f633bacda2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable
private Integer gatherAndStartNewUploads(
Intent intent,
User user,
List<String> requestedUploads,
boolean onWifiOnly,
boolean whileChargingOnly
) {
String[] localPaths = null;
String[] remotePaths = null;
String[] mimeTypes = null;
OCFile[] files = null;
if (intent.hasExtra(KEY_FILE)) {
Parcelable[] files_temp = intent.getParcelableArrayExtra(KEY_FILE);
files = new OCFile[files_temp.length];
System.arraycopy(files_temp, 0, files, 0, files_temp.length);
} else {
localPaths = intent.getStringArrayExtra(KEY_LOCAL_FILE);
remotePaths = intent.getStringArrayExtra(KEY_REMOTE_FILE);
mimeTypes = intent.getStringArrayExtra(KEY_MIME_TYPE);
}
if (intent.hasExtra(KEY_FILE) && files == null) {
Log_OC.e(TAG, "Incorrect array for OCFiles provided in upload intent");
return Service.START_NOT_STICKY;
} else if (!intent.hasExtra(KEY_FILE)) {
if (localPaths == null) {
Log_OC.e(TAG, "Incorrect array for local paths provided in upload intent");
return Service.START_NOT_STICKY;
}
if (remotePaths == null) {
Log_OC.e(TAG, "Incorrect array for remote paths provided in upload intent");
return Service.START_NOT_STICKY;
}
if (localPaths.length != remotePaths.length) {
Log_OC.e(TAG, "Different number of remote paths and local paths!");
return Service.START_NOT_STICKY;
}
files = new OCFile[localPaths.length];
for (int i = 0; i < localPaths.length; i++) {
files[i] = UploadFileOperation.obtainNewOCFileToUpload(
remotePaths[i],
localPaths[i],
mimeTypes != null ? mimeTypes[i] : null
);
if (files[i] == null) {
Log_OC.e(TAG, "obtainNewOCFileToUpload() returned null for remotePaths[i]:" + remotePaths[i]
+ " and localPaths[i]:" + localPaths[i]);
return Service.START_NOT_STICKY;
}
}
}
// at this point variable "OCFile[] files" is loaded correctly.
NameCollisionPolicy nameCollisionPolicy = (NameCollisionPolicy) intent.getSerializableExtra(KEY_NAME_COLLISION_POLICY);
if (nameCollisionPolicy == null) {
nameCollisionPolicy = NameCollisionPolicy.DEFAULT;
}
int localAction = intent.getIntExtra(KEY_LOCAL_BEHAVIOUR, LOCAL_BEHAVIOUR_FORGET);
boolean isCreateRemoteFolder = intent.getBooleanExtra(KEY_CREATE_REMOTE_FOLDER, false);
int createdBy = intent.getIntExtra(KEY_CREATED_BY, UploadFileOperation.CREATED_BY_USER);
boolean disableRetries = intent.getBooleanExtra(KEY_DISABLE_RETRIES, true);
try {
for (OCFile file : files) {
startNewUpload(
user,
requestedUploads,
onWifiOnly,
whileChargingOnly,
nameCollisionPolicy,
localAction,
isCreateRemoteFolder,
createdBy,
file,
disableRetries
);
}
} catch (IllegalArgumentException e) {
Log_OC.e(TAG, "Not enough information provided in intent: " + e.getMessage());
return START_NOT_STICKY;
} catch (IllegalStateException e) {
Log_OC.e(TAG, "Bad information provided in intent: " + e.getMessage());
return START_NOT_STICKY;
} catch (Exception e) {
Log_OC.e(TAG, "Unexpected exception while processing upload intent", e);
return START_NOT_STICKY;
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: gatherAndStartNewUploads
File: src/main/java/com/owncloud/android/files/services/FileUploader.java
Repository: nextcloud/android
The code follows secure coding practices.
|
[
"CWE-732"
] |
CVE-2022-24886
|
LOW
| 2.1
|
nextcloud/android
|
gatherAndStartNewUploads
|
src/main/java/com/owncloud/android/files/services/FileUploader.java
|
c01fa0b17050cdcf77a468cc22f4071eae29d464
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String getHomeOperatorNumeric() {
String numeric = ((TelephonyManager) mPhone.getContext().
getSystemService(Context.TELEPHONY_SERVICE)).
getSimOperatorNumericForPhone(mPhoneBase.getPhoneId());
if (TextUtils.isEmpty(numeric)) {
numeric = SystemProperties.get(CDMAPhone.PROPERTY_CDMA_HOME_OPERATOR_NUMERIC, "");
}
return numeric;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getHomeOperatorNumeric
File: src/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2016-3831
|
MEDIUM
| 5
|
android
|
getHomeOperatorNumeric
|
src/java/com/android/internal/telephony/cdma/CdmaServiceStateTracker.java
|
f47bc301ccbc5e6d8110afab5a1e9bac1d4ef058
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isAllowEmpty() {
return allowEmpty;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isAllowEmpty
File: server-core/src/main/java/io/onedev/server/model/support/inputspec/InputSpec.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2021-21248
|
MEDIUM
| 6.5
|
theonedev/onedev
|
isAllowEmpty
|
server-core/src/main/java/io/onedev/server/model/support/inputspec/InputSpec.java
|
39d95ab8122c5d9ed18e69dc024870cae08d2d60
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Object createImage(InputStream i) throws IOException {
BitmapFactory.Options opts = new BitmapFactory.Options();
opts.inPreferredConfig = Bitmap.Config.ARGB_8888;
return BitmapFactory.decodeStream(i, null, opts);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createImage
File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
createImage
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void initialize() throws InitializationException
{
initialize(this.attachmentFilter, this.classFilter, this.objectFilter);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initialize
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/filter/output/XWikiDocumentOutputFilterStream.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-459"
] |
CVE-2023-36468
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
initialize
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/internal/filter/output/XWikiDocumentOutputFilterStream.java
|
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void addLogLinesToResponse(Map<String, Object> result) {
MemoryAppender appender = OpenmrsUtil.getMemoryAppender();
if (appender != null) {
List<String> logLines = appender.getLogLines();
// truncate the list to the last five so we don't overwhelm jquery
if (logLines.size() > 5) {
logLines = logLines.subList(logLines.size() - 5, logLines.size());
}
result.put("logLines", logLines);
} else {
result.put("logLines", Collections.emptyList());
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addLogLinesToResponse
File: web/src/main/java/org/openmrs/web/filter/StartupFilter.java
Repository: openmrs/openmrs-core
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-23612
|
MEDIUM
| 5
|
openmrs/openmrs-core
|
addLogLinesToResponse
|
web/src/main/java/org/openmrs/web/filter/StartupFilter.java
|
db8454bf19a092a78d53ee4dba2af628b730a6e7
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isHomeIntent(Intent intent) {
return ACTION_MAIN.equals(intent.getAction())
&& (intent.hasCategory(CATEGORY_HOME)
|| intent.hasCategory(CATEGORY_SECONDARY_HOME))
&& intent.getCategories().size() == 1
&& intent.getData() == null
&& intent.getType() == null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isHomeIntent
File: services/core/java/com/android/server/wm/ActivityRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21145
|
HIGH
| 7.8
|
android
|
isHomeIntent
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean checkCellGroupAndOrder(List<String> columnOrder,
Set<String> cellGroup) {
if (!columnOrder.containsAll(cellGroup)) {
return false;
}
for (int i = 0; i < columnOrder.size(); ++i) {
if (!cellGroup.contains(columnOrder.get(i))) {
continue;
}
for (int j = 1; j < cellGroup.size(); ++j) {
if (!cellGroup.contains(columnOrder.get(i + j))) {
return false;
}
}
return true;
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkCellGroupAndOrder
File: server/src/main/java/com/vaadin/ui/Grid.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-25028
|
MEDIUM
| 4.3
|
vaadin/framework
|
checkCellGroupAndOrder
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setCustomClass(String customClass)
{
this.customClass = customClass;
setMetaDataDirty(true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setCustomClass
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-26470
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
setCustomClass
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String getInbox(Map<String, Object> data) {
String html = "";
if (!getPropertyString("inbox").isEmpty()) {
String url = data.get("context_path") + "/web/json/plugin/" + getClassName() + "/service?_a=getAssignment";
if ("current".equals(getPropertyString("inbox"))) {
try {
url += "&appId=" + URLEncoder.encode(userview.getParamString("appId"), "UTF-8");
} catch (UnsupportedEncodingException e){}
}
html += "<li class=\"inbox-notification dropdown\" data-url=\"" + url + "\">\n"
+ " <a data-toggle=\"dropdown\" class=\"btn dropdown-toggle\">\n"
+ " <i class=\"fa fa-tasks white\"></i><span class=\"badge red\">0</span>\n"
+ " </a>\n"
+ " <ul class=\"dropdown-menu notifications\">\n"
+ " <li class=\"dropdown-menu-title\"><span>" + ResourceBundleUtil.getMessage("theme.universal.inboxTaskMessage") + "</span><a href=\"#\" class=\"refresh\"><i class=\"fa fa-refresh\"></i></a></li>"
+ " <li class=\"loading\"><a><span><i class=\"fa fa-spinner fa-spin fa-3x\"></i></span></a></li>\n"
+ " <li><a href=\"" + data.get("base_link") + INBOX + "\" class=\"dropdown-menu-sub-footer\">" + ResourceBundleUtil.getMessage("theme.universal.viewAllTask") + "</a></li>\n"
+ " </ul>\n"
+ "<li>";
}
return html;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInbox
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
|
getInbox
|
wflow-core/src/main/java/org/joget/plugin/enterprise/UniversalTheme.java
|
ecf8be8f6f0cb725c18536ddc726d42a11bdaa1b
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean isOtherSessionLocked(VaadinSession session) {
VaadinSession otherSession = VaadinSession.getCurrent();
if (otherSession == null || otherSession == session) {
return false;
}
return otherSession.hasLock();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isOtherSessionLocked
File: server/src/main/java/com/vaadin/server/VaadinService.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-203"
] |
CVE-2021-31403
|
LOW
| 1.9
|
vaadin/framework
|
isOtherSessionLocked
|
server/src/main/java/com/vaadin/server/VaadinService.java
|
d852126ab6f0c43f937239305bd0e9594834fe34
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String signature(String timestamp, String pathWithQuery, String secret) {
String stringToSign = timestamp + DELIMITER + pathWithQuery;
return HmacSha1Utils.signString(stringToSign, secret);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: signature
File: apollo-core/src/main/java/com/ctrip/framework/apollo/core/signature/Signature.java
Repository: apolloconfig/apollo
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2020-15170
|
MEDIUM
| 6.8
|
apolloconfig/apollo
|
signature
|
apollo-core/src/main/java/com/ctrip/framework/apollo/core/signature/Signature.java
|
ae9ba6cfd32ed80469f162e5e3583e2477862ddf
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected String getValidationQuery() {
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getValidationQuery
File: modules/library/jdbc/src/main/java/org/geotools/jdbc/JDBCJNDIDataStoreFactory.java
Repository: geotools
The code follows secure coding practices.
|
[
"CWE-917"
] |
CVE-2022-24818
|
HIGH
| 7.5
|
geotools
|
getValidationQuery
|
modules/library/jdbc/src/main/java/org/geotools/jdbc/JDBCJNDIDataStoreFactory.java
|
4f70fa3234391dd0cda883a20ab0ec75688cba49
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override // Binder call
public void resetTimeout(byte [] token) {
checkPermission(RESET_FINGERPRINT_LOCKOUT);
// TODO: confirm security token when we move timeout management into the HAL layer.
mHandler.post(mResetFailedAttemptsRunnable);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resetTimeout
File: services/core/java/com/android/server/fingerprint/FingerprintService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
resetTimeout
|
services/core/java/com/android/server/fingerprint/FingerprintService.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected boolean isFilterStopped(PackageParser.ServiceIntentInfo filter, int userId) {
if (!sUserManager.exists(userId)) return true;
PackageParser.Package p = filter.service.owner;
if (p != null) {
PackageSetting ps = (PackageSetting)p.mExtras;
if (ps != null) {
// System apps are never considered stopped for purposes of
// filtering, because there may be no way for the user to
// actually re-launch them.
return (ps.pkgFlags & ApplicationInfo.FLAG_SYSTEM) == 0
&& ps.getStopped(userId);
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isFilterStopped
File: services/core/java/com/android/server/pm/PackageManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-119"
] |
CVE-2016-2497
|
HIGH
| 7.5
|
android
|
isFilterStopped
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void updateVisibleToUser() {
boolean oldVisibleToUser = mVisibleToUser;
mVisibleToUser = mVisible && mDeviceInteractive;
if (oldVisibleToUser != mVisibleToUser) {
handleVisibleToUserChanged(mVisibleToUser);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateVisibleToUser
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
|
updateVisibleToUser
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onPostDialContinue(String callId, boolean proceed,
Session.Info info) throws RemoteException { }
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onPostDialContinue
File: tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21283
|
MEDIUM
| 5.5
|
android
|
onPostDialContinue
|
tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
Class<ItemDataFlag> domainClass() {
// TODO Auto-generated method stub
return ItemDataFlag.class;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: domainClass
File: core/src/main/java/org/akaza/openclinica/dao/hibernate/ItemDataFlagDao.java
Repository: OpenClinica
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-24831
|
HIGH
| 7.5
|
OpenClinica
|
domainClass
|
core/src/main/java/org/akaza/openclinica/dao/hibernate/ItemDataFlagDao.java
|
b152cc63019230c9973965a98e4386ea5322c18f
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean containsTimeMillis(K name, long value) {
return contains(name, fromTimeMillis(name, value));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: containsTimeMillis
File: codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-436",
"CWE-113"
] |
CVE-2022-41915
|
MEDIUM
| 6.5
|
netty
|
containsTimeMillis
|
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
|
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
| 0
|
Analyze the following code function for security vulnerabilities
|
private ComponentDescriptor<TranslationBundle> createComponentDescriptor(DocumentReference documentReference)
{
DefaultComponentDescriptor<TranslationBundle> descriptor = new DefaultComponentDescriptor<TranslationBundle>();
descriptor.setImplementation(ComponentDocumentTranslationBundle.class);
descriptor.setInstantiationStrategy(ComponentInstantiationStrategy.SINGLETON);
descriptor.setRoleHint(ID_PREFIX + this.serializer.serialize(documentReference));
descriptor.setRoleType(TranslationBundle.class);
return descriptor;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createComponentDescriptor
File: xwiki-platform-core/xwiki-platform-localization/xwiki-platform-localization-sources/xwiki-platform-localization-source-wiki/src/main/java/org/xwiki/localization/wiki/internal/DocumentTranslationBundleFactory.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2023-29510
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
createComponentDescriptor
|
xwiki-platform-core/xwiki-platform-localization/xwiki-platform-localization-sources/xwiki-platform-localization-source-wiki/src/main/java/org/xwiki/localization/wiki/internal/DocumentTranslationBundleFactory.java
|
d06ff8a58480abc7f63eb1d4b8b366024d990643
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public byte[] getBackupPayload(int user) {
if (DBG) Slog.d(TAG, "getBackupPayload u=" + user);
//TODO: http://b/22388012
if (user != UserHandle.USER_SYSTEM) {
Slog.w(TAG, "getBackupPayload: cannot backup policy for user " + user);
return null;
}
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
try {
writePolicyXml(baos, true /*forBackup*/);
return baos.toByteArray();
} catch (IOException e) {
Slog.w(TAG, "getBackupPayload: error writing payload for user " + user, e);
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getBackupPayload
File: services/core/java/com/android/server/notification/NotificationManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3884
|
MEDIUM
| 4.3
|
android
|
getBackupPayload
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public CharSequence getExtendedInfo() {
// ChooserTargets have badge icons, so we won't show the extended info to disambiguate.
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getExtendedInfo
File: core/java/com/android/internal/app/ChooserActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-254",
"CWE-19"
] |
CVE-2016-3752
|
HIGH
| 7.5
|
android
|
getExtendedInfo
|
core/java/com/android/internal/app/ChooserActivity.java
|
ddbf2db5b946be8fdc45c7b0327bf560b2a06988
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void cleanCache() {
CacheLRUWrapper lruHandler = CacheLRUWrapper.getInstance();
if (okToClearCache()) {
// First we want to figure out which stuff we need to delete.
HashSet<String> keep = new HashSet<>();
HashSet<String> remove = new HashSet<>();
synchronized (lruHandler) {
try {
lruHandler.lock();
lruHandler.load();
long maxSize = -1; // Default
try {
maxSize = Long.parseLong(JNLPRuntime.getConfiguration().getProperty(ConfigurationConstants.KEY_CACHE_MAX_SIZE));
} catch (NumberFormatException nfe) {
}
maxSize = maxSize << 20; // Convert from megabyte to byte (Negative values will be considered unlimited.)
long curSize = 0;
for (Entry<String, String> e : lruHandler.getLRUSortedEntries()) {
// Check if the item is contained in cacheOrder.
final String key = e.getKey();
final String path = e.getValue();
File file = new File(path);
PropertiesFile pf = new PropertiesFile(new File(path + CacheDirectory.INFO_SUFFIX));
boolean delete = Boolean.parseBoolean(pf.getProperty("delete"));
/*
* This will get me the root directory specific to this cache item.
* Example:
* cacheDir = /home/user1/.icedtea/cache
* file.getPath() = /home/user1/.icedtea/cache/0/http/www.example.com/subdir/a.jar
* rStr first becomes: /0/http/www.example.com/subdir/a.jar
* then rstr becomes: /home/user1/.icedtea/cache/0
*/
String rStr = file.getPath().substring(lruHandler.getCacheDir().getFullPath().length());
rStr = lruHandler.getCacheDir().getFullPath() + rStr.substring(0, rStr.indexOf(File.separatorChar, 1));
long len = file.length();
if (keep.contains(file.getPath().substring(rStr.length()))) {
lruHandler.removeEntry(key);
continue;
}
/*
* we remove entries from our lru if any of the following condition is met.
* Conditions:
* - delete: file has been marked for deletion.
* - !file.isFile(): if someone tampered with the directory, file doesn't exist.
* - maxSize >= 0 && curSize + len > maxSize: If a limit was set and the new size
* on disk would exceed the maximum size.
*/
if (delete || !file.isFile() || (maxSize >= 0 && curSize + len > maxSize)) {
lruHandler.removeEntry(key);
remove.add(rStr);
continue;
}
curSize += len;
keep.add(file.getPath().substring(rStr.length()));
for (File f : file.getParentFile().listFiles()) {
if (!(f.equals(file) || f.equals(pf.getStoreFile()))) {
try {
FileUtils.recursiveDelete(f, f);
} catch (IOException e1) {
LOG.error(IcedTeaWebConstants.DEFAULT_ERROR_MESSAGE, e1);
}
}
}
}
lruHandler.store();
} finally {
lruHandler.unlock();
}
removeSetOfDirectories(remove);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cleanCache
File: core/src/main/java/net/sourceforge/jnlp/cache/CacheUtil.java
Repository: AdoptOpenJDK/IcedTea-Web
The code follows secure coding practices.
|
[
"CWE-345",
"CWE-94",
"CWE-22"
] |
CVE-2019-10182
|
MEDIUM
| 5.8
|
AdoptOpenJDK/IcedTea-Web
|
cleanCache
|
core/src/main/java/net/sourceforge/jnlp/cache/CacheUtil.java
|
2ab070cdac087bd208f64fa8138bb709f8d7680c
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setAllowJavascriptInterfacesInspection(boolean allow) {
nativeSetAllowJavascriptInterfacesInspection(mNativeContentViewCore, allow);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAllowJavascriptInterfacesInspection
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
setAllowJavascriptInterfacesInspection
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Properties getMessages(Locale locale) throws IOException {
return getMessages("messages", locale);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMessages
File: services/src/main/java/org/keycloak/theme/ClassLoaderTheme.java
Repository: keycloak
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-3856
|
MEDIUM
| 4.3
|
keycloak
|
getMessages
|
services/src/main/java/org/keycloak/theme/ClassLoaderTheme.java
|
73f0474008e1bebd0733e62a22aceda9e5de6743
| 0
|
Analyze the following code function for security vulnerabilities
|
private void checkAndRecord(AbstractProject that, TreeMap<Integer, RangeSet> r, Collection<R> builds) {
for (R build : builds) {
RangeSet rs = build.getDownstreamRelationship(that);
if(rs==null || rs.isEmpty())
continue;
int n = build.getNumber();
RangeSet value = r.get(n);
if(value==null)
r.put(n,rs);
else
value.add(rs);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkAndRecord
File: core/src/main/java/hudson/model/AbstractProject.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
checkAndRecord
|
core/src/main/java/hudson/model/AbstractProject.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
final void addObject(CharSequence name, Object value) {
requireNonNull(value, "value");
add(name, fromObject(value));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addObject
File: core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2019-16771
|
MEDIUM
| 5
|
line/armeria
|
addObject
|
core/src/main/java/com/linecorp/armeria/common/HttpHeadersBase.java
|
b597f7a865a527a84ee3d6937075cfbb4470ed20
| 0
|
Analyze the following code function for security vulnerabilities
|
private void maybeMigrateAccount(
@UserIdInt int targetUserId, @UserIdInt int sourceUserId, Account accountToMigrate,
boolean keepAccountMigrated, String callerPackage) {
final UserHandle sourceUser = UserHandle.of(sourceUserId);
final UserHandle targetUser = UserHandle.of(targetUserId);
if (accountToMigrate == null) {
Slogf.d(LOG_TAG, "No account to migrate.");
return;
}
if (sourceUser.equals(targetUser)) {
Slogf.w(LOG_TAG, "sourceUser and targetUser are the same, won't migrate account.");
return;
}
copyAccount(targetUser, sourceUser, accountToMigrate, callerPackage);
if (!keepAccountMigrated) {
removeAccount(accountToMigrate, sourceUserId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: maybeMigrateAccount
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
maybeMigrateAccount
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected int typeMinimumSize(byte type) {
switch (type & 0x0f) {
case TType.BOOL:
case TType.BYTE:
case TType.I16: // because of variable length encoding
case TType.I32: // because of variable length encoding
case TType.I64: // because of variable length encoding
return 1;
case TType.FLOAT:
return 4;
case TType.DOUBLE:
return 8;
case TType.STRING:
case TType.STRUCT:
case TType.MAP:
case TType.SET:
case TType.LIST:
case TType.ENUM:
return 1;
default:
throw new TProtocolException(
TProtocolException.INVALID_DATA, "Unexpected data type " + (byte) (type & 0x0f));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: typeMinimumSize
File: thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java
Repository: facebook/fbthrift
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2019-11938
|
MEDIUM
| 5
|
facebook/fbthrift
|
typeMinimumSize
|
thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java
|
08c2d412adb214c40bb03be7587057b25d053030
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setPopulateIdentifierInAutoCreatedPlaceholderReferenceTargets(boolean thePopulateIdentifierInAutoCreatedPlaceholderReferenceTargets) {
myPopulateIdentifierInAutoCreatedPlaceholderReferenceTargets = thePopulateIdentifierInAutoCreatedPlaceholderReferenceTargets;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setPopulateIdentifierInAutoCreatedPlaceholderReferenceTargets
File: hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
Repository: hapifhir/hapi-fhir
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-32053
|
MEDIUM
| 5
|
hapifhir/hapi-fhir
|
setPopulateIdentifierInAutoCreatedPlaceholderReferenceTargets
|
hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
|
f2934b229c491235ab0e7782dea86b324521082a
| 0
|
Analyze the following code function for security vulnerabilities
|
private byte[] getImage(String host, byte[] defaultImage) {
// If we've already attempted to get the favicon twice and failed,
// return the default image.
if (missesCache.get(host) != null && missesCache.get(host) > 1) {
// Domain does not have a favicon so return default icon
return defaultImage;
}
// See if we've cached the favicon.
if (hitsCache.containsKey(host)) {
return hitsCache.get(host);
}
byte[] bytes = getImage("http://" + host + "/favicon.ico");
if (bytes == null) {
// Cache that the requested domain does not have a favicon. Check if this
// is the first cache miss or the second.
if (missesCache.get(host) != null) {
missesCache.put(host, 2);
}
else {
missesCache.put(host, 1);
}
// Return byte of default icon
bytes = defaultImage;
}
// Cache the favicon.
else {
hitsCache.put(host, bytes);
}
return bytes;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getImage
File: xmppserver/src/main/java/org/jivesoftware/util/FaviconServlet.java
Repository: igniterealtime/Openfire
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2019-18394
|
HIGH
| 7.5
|
igniterealtime/Openfire
|
getImage
|
xmppserver/src/main/java/org/jivesoftware/util/FaviconServlet.java
|
c2ccb38250910587498597955d0bbee8b58e46df
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean testIsSystemReady()
{
/* this base class version is never called */
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: testIsSystemReady
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
testIsSystemReady
|
core/java/android/app/ActivityManagerNative.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public FromMode getFromMode() {
return this.fromMode;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFromMode
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
|
getFromMode
|
smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
|
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void startActivityForResult(Intent intent, int requestCode) {
final Activity activity = getActivity();
if (activity instanceof ConversationsActivity) {
((ConversationsActivity) activity).clearPendingViewIntent();
}
super.startActivityForResult(intent, requestCode);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startActivityForResult
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
|
startActivityForResult
|
src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
public MediaStyle setMediaSession(MediaSession.Token token) {
mToken = token;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setMediaSession
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
setMediaSession
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void waitForResources(ApplicationInstance app, ResourceTracker tracker, URL resources[], String title) {
DownloadIndicator indicator = JNLPRuntime.getDefaultDownloadIndicator();
DownloadServiceListener listener = null;
try {
if (indicator == null) {
tracker.waitForResources(resources, 0);
return;
}
// see if resources can be downloaded very quickly; avoids
// overhead of creating display components for the resources
if (tracker.waitForResources(resources, indicator.getInitialDelay()))
return;
// only resources not starting out downloaded are displayed
List<URL> urlList = new ArrayList<>();
for (URL url : resources) {
if (!tracker.checkResource(url))
urlList.add(url);
}
URL undownloaded[] = urlList.toArray(new URL[urlList.size()]);
listener = indicator.getListener(title, undownloaded);
do {
long read = 0;
long total = 0;
for (URL url : undownloaded) {
// add in any -1's; they're insignificant
total += tracker.getTotalSize(url);
read += tracker.getAmountRead(url);
}
int percent = (int) ((100 * read) / Math.max(1, total));
for (URL url : undownloaded) {
listener.progress(url, "version",
tracker.getAmountRead(url),
tracker.getTotalSize(url),
percent);
}
} while (!tracker.waitForResources(resources, indicator.getUpdateRate()));
// make sure they read 100% until indicator closes
for (URL url : undownloaded) {
listener.progress(url, "version",
tracker.getTotalSize(url),
tracker.getTotalSize(url),
100);
}
} catch (InterruptedException ex) {
LOG.error(IcedTeaWebConstants.DEFAULT_ERROR_MESSAGE, ex);
} finally {
if (listener != null)
indicator.disposeListener(listener);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: waitForResources
File: core/src/main/java/net/sourceforge/jnlp/cache/CacheUtil.java
Repository: AdoptOpenJDK/IcedTea-Web
The code follows secure coding practices.
|
[
"CWE-345",
"CWE-94",
"CWE-22"
] |
CVE-2019-10182
|
MEDIUM
| 5.8
|
AdoptOpenJDK/IcedTea-Web
|
waitForResources
|
core/src/main/java/net/sourceforge/jnlp/cache/CacheUtil.java
|
2ab070cdac087bd208f64fa8138bb709f8d7680c
| 0
|
Analyze the following code function for security vulnerabilities
|
@AppSwitchState int getBalAppSwitchesState() {
return mAppSwitchesState;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getBalAppSwitchesState
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
|
getBalAppSwitchesState
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequiresFeature(PackageManager.FEATURE_SECURE_LOCK_SCREEN)
@RequiresPermission(value = MANAGE_DEVICE_POLICY_LOCK_CREDENTIALS, conditional = true)
public void setRequiredStrongAuthTimeout(@Nullable ComponentName admin,
long timeoutMs) {
if (mService != null) {
try {
mService.setRequiredStrongAuthTimeout(
admin, mContext.getPackageName(), timeoutMs, mParentInstance);
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setRequiredStrongAuthTimeout
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
|
setRequiredStrongAuthTimeout
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
TaskRecord getLockedTaskLocked() {
final int top = mLockTaskModeTasks.size() - 1;
if (top >= 0) {
return mLockTaskModeTasks.get(top);
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLockedTaskLocked
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
|
getLockedTaskLocked
|
services/core/java/com/android/server/am/ActivityStackSupervisor.java
|
468651c86a8adb7aa56c708d2348e99022088af3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onUnlockUser(int userHandle) {
mLockSettingsService.onUnlockUser(userHandle);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onUnlockUser
File: services/core/java/com/android/server/LockSettingsService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3908
|
MEDIUM
| 4.3
|
android
|
onUnlockUser
|
services/core/java/com/android/server/LockSettingsService.java
|
96daf7d4893f614714761af2d53dfb93214a32e4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setWifiSsidPolicy(WifiSsidPolicy policy) {
final CallerIdentity caller = getCallerIdentity();
Preconditions.checkCallAuthorization(
isDefaultDeviceOwner(caller) || isProfileOwnerOfOrganizationOwnedDevice(caller),
"SSID denylist can only be controlled by a device owner or "
+ "a profile owner on an organization-owned device.");
boolean changed = false;
synchronized (getLockObject()) {
final ActiveAdmin admin = getProfileOwnerOrDeviceOwnerLocked(caller);
if (!Objects.equals(policy, admin.mWifiSsidPolicy)) {
admin.mWifiSsidPolicy = policy;
changed = true;
}
if (changed) saveSettingsLocked(caller.getUserId());
}
if (changed) {
notifyWifiSsidPolicyChanged(policy);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setWifiSsidPolicy
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
|
setWifiSsidPolicy
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getTaskForActivity(IBinder token, boolean onlyRoot) {
return ActivityClient.getInstance().getTaskForActivity(token, onlyRoot);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTaskForActivity
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
|
getTaskForActivity
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public void onDestroy() {
debugLog("onDestroy()");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onDestroy
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
|
onDestroy
|
src/com/android/bluetooth/btservice/AdapterService.java
|
122feb9a0b04290f55183ff2f0384c6c53756bd8
| 0
|
Analyze the following code function for security vulnerabilities
|
private static boolean isCompatibleLoginModule(List<LoginModuleConfig> c1, List<LoginModuleConfig> c2) {
if (c1 == c2) {
return true;
}
if (c1 == null || c2 == null || c1.size() != c2.size()) {
return false;
}
Map<String, LoginModuleConfig> config1 = new HashMap<String, LoginModuleConfig>();
Map<String, LoginModuleConfig> config2 = new HashMap<String, LoginModuleConfig>();
for (LoginModuleConfig loginModuleConfig : c1) {
config1.put(loginModuleConfig.getClassName(), loginModuleConfig);
}
for (LoginModuleConfig loginModuleConfig : c2) {
config2.put(loginModuleConfig.getClassName(), loginModuleConfig);
}
if (!config1.keySet().equals(config2.keySet())) {
return false;
}
for (LoginModuleConfig a : c1) {
LoginModuleConfig b = config2.get(a.getClassName());
if (!(a == b || (nullSafeEqual(a.getProperties(), b.getProperties())
&& nullSafeEqual(a.getUsage(), b.getUsage())))) {
return false;
}
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isCompatibleLoginModule
File: hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
isCompatibleLoginModule
|
hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
protected Map<String, Object> newOortHandshakeFields(String cometURL, String oortAliasURL) {
Map<String, Object> fields = new HashMap<>(1);
Map<String, Object> ext = new HashMap<>(1);
fields.put(Message.EXT_FIELD, ext);
Map<String, Object> oortExt = new HashMap<>(4);
ext.put(EXT_OORT_FIELD, oortExt);
oortExt.put(EXT_OORT_URL_FIELD, getURL());
oortExt.put(EXT_OORT_ID_FIELD, getId());
String b64Secret = encodeSecret(getSecret());
oortExt.put(EXT_OORT_SECRET_FIELD, b64Secret);
oortExt.put(EXT_COMET_URL_FIELD, cometURL);
if (oortAliasURL != null) {
oortExt.put(EXT_OORT_ALIAS_URL_FIELD, oortAliasURL);
}
return fields;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: newOortHandshakeFields
File: cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Oort.java
Repository: cometd
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-24721
|
MEDIUM
| 5.5
|
cometd
|
newOortHandshakeFields
|
cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Oort.java
|
bb445a143fbf320f17c62e340455cd74acfb5929
| 0
|
Analyze the following code function for security vulnerabilities
|
private Set<String> getConfigurableDefaultCrossProfilePackages(@UserIdInt int userId) {
List<String> defaultPackages = getDefaultCrossProfilePackages();
return defaultPackages.stream().filter(
mInjector.getCrossProfileApps(userId)::canConfigureInteractAcrossProfiles).collect(
Collectors.toSet());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getConfigurableDefaultCrossProfilePackages
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
getConfigurableDefaultCrossProfilePackages
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isEnabledSelf() {
return enabled;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isEnabledSelf
File: flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2023-25499
|
MEDIUM
| 6.5
|
vaadin/flow
|
isEnabledSelf
|
flow-server/src/main/java/com/vaadin/flow/internal/StateNode.java
|
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
| 0
|
Analyze the following code function for security vulnerabilities
|
public static int getMaxContentLength() {
return maxContentLength;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMaxContentLength
File: openam-federation/openam-federation-library/src/main/java/com/sun/identity/saml/common/SAMLUtils.java
Repository: OpenIdentityPlatform/OpenAM
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2023-37471
|
CRITICAL
| 9.8
|
OpenIdentityPlatform/OpenAM
|
getMaxContentLength
|
openam-federation/openam-federation-library/src/main/java/com/sun/identity/saml/common/SAMLUtils.java
|
7c18543d126e8a567b83bb4535631825aaa9d742
| 0
|
Analyze the following code function for security vulnerabilities
|
public String dialogWhiteBoxStart() {
return dialogWhiteBox(HTML_START);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dialogWhiteBoxStart
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
|
dialogWhiteBoxStart
|
src/org/opencms/workplace/CmsDialog.java
|
72a05e3ea1cf692e2efce002687272e63f98c14a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public WindowInsets onApplyWindowInsets(WindowInsets insets) {
mNavigationBarBottomHeight = insets.getStableInsetBottom();
updateMaxHeadsUpTranslation();
return insets;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onApplyWindowInsets
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
|
onApplyWindowInsets
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean bindDeviceAdminServiceAsUser(@NonNull ComponentName admin,
@NonNull Intent serviceIntent, @NonNull ServiceConnection conn,
@Context.BindServiceFlagsBits int flags, @NonNull UserHandle targetUser) {
throwIfParentInstance("bindDeviceAdminServiceAsUser");
// Keep this in sync with ContextImpl.bindServiceCommon.
try {
final IServiceConnection sd = mContext.getServiceDispatcher(
conn, mContext.getMainThreadHandler(), Integer.toUnsignedLong(flags));
serviceIntent.prepareToLeaveProcess(mContext);
return mService.bindDeviceAdminServiceAsUser(admin,
mContext.getIApplicationThread(), mContext.getActivityToken(), serviceIntent,
sd, Integer.toUnsignedLong(flags), targetUser.getIdentifier());
} catch (RemoteException re) {
throw re.rethrowFromSystemServer();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: bindDeviceAdminServiceAsUser
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
|
bindDeviceAdminServiceAsUser
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public static @NonNull Collection<File> getVolumeScanPaths(@NonNull Context context,
@NonNull String volumeName) throws FileNotFoundException {
final ArrayList<File> res = new ArrayList<>();
switch (volumeName) {
case MediaStore.VOLUME_INTERNAL: {
res.addAll(Environment.getInternalMediaDirectories());
break;
}
case MediaStore.VOLUME_EXTERNAL: {
for (String resolvedVolumeName : MediaStore.getExternalVolumeNames(context)) {
res.add(getVolumePath(context, resolvedVolumeName));
}
break;
}
default: {
res.add(getVolumePath(context, volumeName));
}
}
return res;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getVolumeScanPaths
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
|
getVolumeScanPaths
|
src/com/android/providers/media/util/FileUtils.java
|
db3c69afcb0a45c8aa2f333fcde36217889899fe
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int startIsolatedProcess(String entryPoint, String[] entryPointArgs,
String processName, String abiOverride, int uid, Runnable crashHandler) {
return ActivityManagerService.this.startIsolatedProcess(entryPoint, entryPointArgs,
processName, abiOverride, uid, crashHandler);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startIsolatedProcess
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
|
startIsolatedProcess
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
public String nextString(char quote) throws JSONException {
char c;
StringBuilder sb = new StringBuilder();
for (;;) {
c = this.next();
switch (c) {
case 0:
case '\n':
case '\r':
throw this.syntaxError("Unterminated string");
case '\\':
c = this.next();
switch (c) {
case 'b':
sb.append('\b');
break;
case 't':
sb.append('\t');
break;
case 'n':
sb.append('\n');
break;
case 'f':
sb.append('\f');
break;
case 'r':
sb.append('\r');
break;
case 'u':
try {
sb.append((char)Integer.parseInt(this.next(4), 16));
} catch (NumberFormatException e) {
throw this.syntaxError("Illegal escape.", e);
}
break;
case '"':
case '\'':
case '\\':
case '/':
sb.append(c);
break;
default:
throw this.syntaxError("Illegal escape.");
}
break;
default:
if (c == quote) {
return sb.toString();
}
sb.append(c);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nextString
File: src/main/java/org/json/JSONTokener.java
Repository: stleary/JSON-java
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2022-45690
|
HIGH
| 7.5
|
stleary/JSON-java
|
nextString
|
src/main/java/org/json/JSONTokener.java
|
7a124d857dc8da1165c87fa788e53359a317d0f7
| 0
|
Analyze the following code function for security vulnerabilities
|
private String stripNonValidXMLCharacters(String in, Matcher invalidXmlCharsMatcher) {
if (in == null || ("".equals(in))) {
return ""; // vacancy test.
}
invalidXmlCharsMatcher.reset(in);
return invalidXmlCharsMatcher.matches() ? invalidXmlCharsMatcher.replaceAll("") : in;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: stripNonValidXMLCharacters
File: src/main/java/org/owasp/validator/html/scan/AntiSamyDOMScanner.java
Repository: nahsra/antisamy
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-28367
|
MEDIUM
| 4.3
|
nahsra/antisamy
|
stripNonValidXMLCharacters
|
src/main/java/org/owasp/validator/html/scan/AntiSamyDOMScanner.java
|
0199e7e194dba5e7d7197703f43ebe22401e61ae
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isDefaultNamespace(String namespaceURI) {
return doc.isDefaultNamespace(namespaceURI);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isDefaultNamespace
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
|
isDefaultNamespace
|
HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java
|
9b75694cedfa4825d4a2330abf2719d470c654cd
| 0
|
Analyze the following code function for security vulnerabilities
|
private void removeComponent(Component c) {
extensionComponents.remove(c);
c.setParent(null);
markAsDirty();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeComponent
File: server/src/main/java/com/vaadin/ui/Grid.java
Repository: vaadin/framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-25028
|
MEDIUM
| 4.3
|
vaadin/framework
|
removeComponent
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
private static ReentrantLock getUniqueKeyLock(String uniqueKey) {
synchronized (uniqueKeyToLock) {
ReentrantLock storedLock = uniqueKeyToLock.get(uniqueKey);
if (storedLock == null) {
storedLock = new ReentrantLock();
uniqueKeyToLock.put(uniqueKey, storedLock);
}
return storedLock;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUniqueKeyLock
File: core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
Repository: AdoptOpenJDK/IcedTea-Web
The code follows secure coding practices.
|
[
"CWE-345",
"CWE-94",
"CWE-22"
] |
CVE-2019-10182
|
MEDIUM
| 5.8
|
AdoptOpenJDK/IcedTea-Web
|
getUniqueKeyLock
|
core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
|
e0818f521a0711aeec4b913b49b5fc6a52815662
| 0
|
Analyze the following code function for security vulnerabilities
|
protected List<JobDetail> getLoadedJobs() {
return Collections.unmodifiableList(loadedJobs);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLoadedJobs
File: quartz-core/src/main/java/org/quartz/xml/XMLSchedulingDataProcessor.java
Repository: quartz-scheduler/quartz
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2019-13990
|
HIGH
| 7.5
|
quartz-scheduler/quartz
|
getLoadedJobs
|
quartz-core/src/main/java/org/quartz/xml/XMLSchedulingDataProcessor.java
|
a1395ba118df306c7fe67c24fb0c9a95a4473140
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getTableSQL(SQLStatement<?> stmt) {
Table table = stmt.getTable();
String name = getTableNameSQL(table.getName());
if (StringUtils.isBlank(table.getSchema())) {
return name;
} else{
return getSchemaNameSQL(table.getSchema()) + "." + name;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTableSQL
File: dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java
Repository: dashbuilder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-4999
|
HIGH
| 7.5
|
dashbuilder
|
getTableSQL
|
dashbuilder-backend/dashbuilder-dataset-sql/src/main/java/org/dashbuilder/dataprovider/sql/dialect/DefaultDialect.java
|
8574899e3b6455547b534f570b2330ff772e524b
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String getArgumentEscapePattern() {
return argumentEscapePattern;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getArgumentEscapePattern
File: src/main/java/org/codehaus/plexus/util/cli/shell/Shell.java
Repository: codehaus-plexus/plexus-utils
The code follows secure coding practices.
|
[
"CWE-78"
] |
CVE-2017-1000487
|
HIGH
| 7.5
|
codehaus-plexus/plexus-utils
|
getArgumentEscapePattern
|
src/main/java/org/codehaus/plexus/util/cli/shell/Shell.java
|
b38a1b3a4352303e4312b2bb601a0d7ec6e28f41
| 0
|
Analyze the following code function for security vulnerabilities
|
private static boolean isResizeOnlyChange(int change) {
return (change & ~(CONFIG_SCREEN_SIZE | CONFIG_SMALLEST_SCREEN_SIZE | CONFIG_ORIENTATION
| CONFIG_SCREEN_LAYOUT)) == 0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isResizeOnlyChange
File: services/core/java/com/android/server/wm/ActivityRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21145
|
HIGH
| 7.8
|
android
|
isResizeOnlyChange
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.