instruction
string | input
string | output
string | cwe_ids
list | cve_id
string | severity
string | cvss_score
float64 | repo_name
string | func_name
string | file_path
string | commit_hash
string | is_vulnerable
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Analyze the following code function for security vulnerabilities
|
public static void setRequestMethod(HttpURLConnection conn, RequestMethod method) {
try {
conn.setRequestMethod(getRequestMethodAsString(method));
} catch (ProtocolException e) {
throw ErrorUtil.createCommandException(e.getMessage());
}
}
|
Vulnerability Classification:
- CWE: CWE-306
- CVE: CVE-2021-32700
- Severity: MEDIUM
- CVSS Score: 5.8
Description: Fix central connection
Function: setRequestMethod
File: cli/ballerina-cli-module/src/main/java/org/ballerinalang/cli/module/util/Utils.java
Repository: ballerina-platform/ballerina-lang
Fixed Code:
public static void setRequestMethod(HttpsURLConnection conn, RequestMethod method) {
try {
conn.setRequestMethod(getRequestMethodAsString(method));
} catch (ProtocolException e) {
throw ErrorUtil.createCommandException(e.getMessage());
}
}
|
[
"CWE-306"
] |
CVE-2021-32700
|
MEDIUM
| 5.8
|
ballerina-platform/ballerina-lang
|
setRequestMethod
|
cli/ballerina-cli-module/src/main/java/org/ballerinalang/cli/module/util/Utils.java
|
4609ffee1744ecd16aac09303b1783bf0a525816
| 1
|
Analyze the following code function for security vulnerabilities
|
public abstract BaseXMLBuilder c(String comment);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: c
File: src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
Repository: jmurty/java-xmlbuilder
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2014-125087
|
MEDIUM
| 5.2
|
jmurty/java-xmlbuilder
|
c
|
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
|
e6fddca201790abab4f2c274341c0bb8835c3e73
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getCurrentContentSyntaxId()
{
return this.xwiki.getCurrentContentSyntaxId(getXWikiContext());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCurrentContentSyntaxId
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2023-37911
|
MEDIUM
| 6.5
|
xwiki/xwiki-platform
|
getCurrentContentSyntaxId
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
|
f471f2a392aeeb9e51d59fdfe1d76fccf532523f
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<ShortcutInfo> deleteAllDynamicShortcuts() {
final long now = mShortcutUser.mService.injectCurrentTimeMillis();
boolean changed = false;
synchronized (mLock) {
for (int i = mShortcuts.size() - 1; i >= 0; i--) {
ShortcutInfo si = mShortcuts.valueAt(i);
if (si.isDynamic() && si.isVisibleToPublisher()) {
changed = true;
si.setTimestamp(now);
si.clearFlags(ShortcutInfo.FLAG_DYNAMIC);
si.setRank(0); // It may still be pinned, so clear the rank.
}
}
}
removeAllShortcutsAsync();
if (changed) {
return removeOrphans();
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deleteAllDynamicShortcuts
File: services/core/java/com/android/server/pm/ShortcutPackage.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40075
|
MEDIUM
| 5.5
|
android
|
deleteAllDynamicShortcuts
|
services/core/java/com/android/server/pm/ShortcutPackage.java
|
ae768fbb9975fdab267f525831cb52f485ab0ecc
| 0
|
Analyze the following code function for security vulnerabilities
|
@Pure
@Override
public double getDouble(@Positive int columnIndex) throws SQLException {
connection.getLogger().log(Level.FINEST, " getDouble columnIndex: {0}", columnIndex);
byte[] value = getRawValue(columnIndex);
if (value == null) {
return 0; // SQL NULL
}
if (isBinary(columnIndex)) {
int col = columnIndex - 1;
int oid = fields[col].getOID();
if (oid == Oid.FLOAT8) {
return ByteConverter.float8(value, 0);
}
return readDoubleValue(value, oid, "double");
}
return toDouble(getFixedString(columnIndex));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDouble
File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
Repository: pgjdbc
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-31197
|
HIGH
| 8
|
pgjdbc
|
getDouble
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void registerBitstream(Context c, Item i, int assetstore,
String bitstreamPath, String bundleName, String description )
throws SQLException, IOException, AuthorizeException
{
// TODO validate assetstore number
// TODO make sure the bitstream is there
Bitstream bs = null;
String newBundleName = bundleName;
if (StringUtils.isBlank(bundleName))
{
// is it license.txt?
if (bitstreamPath.endsWith("license.txt"))
{
newBundleName = "LICENSE";
}
else
{
// call it ORIGINAL
newBundleName = "ORIGINAL";
}
}
if(!isTest)
{
// find the bundle
List<Bundle> bundles = itemService.getBundles(i, newBundleName);
Bundle targetBundle = null;
if( bundles.size() < 1 )
{
// not found, create a new one
targetBundle = bundleService.create(c, i, newBundleName);
}
else
{
// put bitstreams into first bundle
targetBundle = bundles.iterator().next();
}
// now add the bitstream
bs = bitstreamService.register(c, targetBundle, assetstore, bitstreamPath);
// set the name to just the filename
int iLastSlash = bitstreamPath.lastIndexOf('/');
bs.setName(c, bitstreamPath.substring(iLastSlash + 1));
// Identify the format
// FIXME - guessing format guesses license.txt incorrectly as a text file format!
BitstreamFormat bf = bitstreamFormatService.guessFormat(c, bs);
bitstreamService.setFormat(c, bs, bf);
bs.setDescription(c, description);
bitstreamService.update(c, bs);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: registerBitstream
File: dspace-api/src/main/java/org/dspace/app/itemimport/ItemImportServiceImpl.java
Repository: DSpace
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-31195
|
HIGH
| 7.2
|
DSpace
|
registerBitstream
|
dspace-api/src/main/java/org/dspace/app/itemimport/ItemImportServiceImpl.java
|
7af52a0883a9dbc475cf3001f04ed11b24c8a4c0
| 0
|
Analyze the following code function for security vulnerabilities
|
@Binds
StackScrollAlgorithm.SectionProvider bindSectionProvider(
NotificationSectionsManager impl);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: bindSectionProvider
File: packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40098
|
MEDIUM
| 5.5
|
android
|
bindSectionProvider
|
packages/SystemUI/src/com/android/systemui/statusbar/notification/dagger/NotificationsModule.java
|
d21ffbe8a2eeb2a5e6da7efbb1a0430ba6b022e0
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isInjectingAccessibilityScript() {
return mAccessibilityInjector.accessibilityIsAvailable();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isInjectingAccessibilityScript
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
|
isInjectingAccessibilityScript
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations, MediaType mediaType) {
return File.class == type;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isReadable
File: independent-projects/resteasy-reactive/common/runtime/src/main/java/org/jboss/resteasy/reactive/common/providers/serialisers/FileBodyHandler.java
Repository: quarkusio/quarkus
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2023-0481
|
LOW
| 3.3
|
quarkusio/quarkus
|
isReadable
|
independent-projects/resteasy-reactive/common/runtime/src/main/java/org/jboss/resteasy/reactive/common/providers/serialisers/FileBodyHandler.java
|
95d5904f7cf18c8165b97d8ca03b203d7f69c17e
| 0
|
Analyze the following code function for security vulnerabilities
|
protected int addFileNames(List<String> list) { // This appears to only be used by unit tests and the copy
// constructor
for (String file : list) {
workUnitList.add(new WorkUnit(file));
}
return size();
}
|
Vulnerability Classification:
- CWE: CWE-502
- CVE: CVE-2021-32634
- Severity: MEDIUM
- CVSS Score: 6.5
Description: Merge pull request from GHSA-m5qf-gfmp-7638
* Remove unsafe serialization from PayloadUtil
* This code will likely be removed wholesale, but this change
should be used as a departure point for future development
if we end up re-implementing moveTo and friends.
* Removed vestigial MoveTo related code.
* Remove unsafe serialization in WorkSpace infra.
* Favor DataInput/DataOutputStream over ObjectInput/ObjectOutputStream
* Implement lightweight serialization in WorkBundle/WorkUnit
* Updates to WorkBundle serDe, added tests.
- set limit on number of WorkUnits per bundle. In practice these are
commonly less than 1024.
- added null handling for WorkBundle/WorkUnit string fields.
- confirmed readUTF/writeUTF has a limit ensuring strings will
be 65535 characters or less.
* Minor cleanup to WorkBundleTest
* Minor Change to WorkBundleTest
* Formatting updates
Function: addFileNames
File: src/main/java/emissary/pickup/WorkBundle.java
Repository: NationalSecurityAgency/emissary
Fixed Code:
protected int addFileNames(List<String> list) { // This appears to only be used by unit tests and the copy
// constructor
for (String file : list) {
addWorkUnit(new WorkUnit(file));
}
return size();
}
|
[
"CWE-502"
] |
CVE-2021-32634
|
MEDIUM
| 6.5
|
NationalSecurityAgency/emissary
|
addFileNames
|
src/main/java/emissary/pickup/WorkBundle.java
|
40260b1ec1f76cc92361702cc14fa1e4388e19d7
| 1
|
Analyze the following code function for security vulnerabilities
|
public List<Cliente> buscarClienteCPF(String cpf) throws SQLException, ClassNotFoundException {
Connection con = null;
PreparedStatement stmt = null;
ResultSet rs = null;
try {
con = ConnectionFactory.getConnection();
stmt = con.prepareStatement(stmtBuscarCPF + "'%" + cpf + "%' and perfil = 1 and inativo=false order by nome");
rs = stmt.executeQuery();
return montaListaClientes(rs);
} catch (SQLException e) {
throw new RuntimeException(e);
} finally {
try {
rs.close();
} catch (Exception ex) {
System.out.println("Erro ao fechar result set.Erro: " + ex.getMessage());
}
try {
stmt.close();
} catch (SQLException ex) {
System.out.println("Erro ao fechar statement. Ex = " + ex.getMessage());
}
try {
con.close();
} catch (SQLException ex) {
System.out.println("Erro ao fechar a conexao. Ex = " + ex.getMessage());
}
}
}
|
Vulnerability Classification:
- CWE: CWE-89
- CVE: CVE-2015-10061
- Severity: MEDIUM
- CVSS Score: 5.2
Description: ClienteDAO - alterados statements para utilizar o metodo setString do PreparedStatement para evitar SQL Injection
- alterados statements para utilizar ilike ao inves de like para pesquisar sem case sensitivity
BancoDeDados - colocado ponto e virgula apos todas as queries.
Function: buscarClienteCPF
File: src/java/br/com/magazine/dao/ClienteDAO.java
Repository: evandro-machado/Trabalho-Web2
Fixed Code:
public List<Cliente> buscarClienteCPF(String cpf) throws SQLException, ClassNotFoundException {
Connection con = null;
PreparedStatement stmt = null;
ResultSet rs = null;
try {
con = ConnectionFactory.getConnection();
cpf = "%"+cpf+"%";
stmt = con.prepareStatement(stmtBuscarCPFCliente);
stmt.setString(1, cpf);
rs = stmt.executeQuery();
return montaListaClientes(rs);
} catch (SQLException e) {
throw new RuntimeException(e);
} finally {
try {
rs.close();
} catch (Exception ex) {
System.out.println("Erro ao fechar result set.Erro: " + ex.getMessage());
}
try {
stmt.close();
} catch (SQLException ex) {
System.out.println("Erro ao fechar statement. Ex = " + ex.getMessage());
}
try {
con.close();
} catch (SQLException ex) {
System.out.println("Erro ao fechar a conexao. Ex = " + ex.getMessage());
}
}
}
|
[
"CWE-89"
] |
CVE-2015-10061
|
MEDIUM
| 5.2
|
evandro-machado/Trabalho-Web2
|
buscarClienteCPF
|
src/java/br/com/magazine/dao/ClienteDAO.java
|
f59ac954625d0a4f6d34f069a2e26686a7a20aeb
| 1
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
public NewsReaderListFragment getSlidingListFragment() {
return ((NewsReaderListFragment) getSupportFragmentManager().findFragmentById(R.id.left_drawer));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSlidingListFragment
File: News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java
Repository: nextcloud/news-android
The code follows secure coding practices.
|
[
"CWE-829"
] |
CVE-2021-41256
|
MEDIUM
| 5.8
|
nextcloud/news-android
|
getSlidingListFragment
|
News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/NewsReaderListActivity.java
|
05449cb666059af7de2302df9d5c02997a23df85
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setIsSyncable(Account account, int userId, String providerName, int syncable) {
setSyncableStateForEndPoint(new EndPoint(account, providerName, userId), syncable);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setIsSyncable
File: services/core/java/com/android/server/content/SyncStorageEngine.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2016-2424
|
HIGH
| 7.1
|
android
|
setIsSyncable
|
services/core/java/com/android/server/content/SyncStorageEngine.java
|
d3383d5bfab296ba3adbc121ff8a7b542bde4afb
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void normalizeDocument() {
doc.normalizeDocument();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: normalizeDocument
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
|
normalizeDocument
|
HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java
|
9b75694cedfa4825d4a2330abf2719d470c654cd
| 0
|
Analyze the following code function for security vulnerabilities
|
private static CloseableHttpClient createHttpClient() {
RequestConfig config = RequestConfig.custom()
.setConnectTimeout(TIMEOUT_MILLISECONDS)
.setConnectionRequestTimeout(TIMEOUT_MILLISECONDS)
.setSocketTimeout(SOCKET_TIMEOUT_MILLISECONDS)
.build();
PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager();
connectionManager.setMaxTotal(MAX_CONNECTIONS);
connectionManager.setDefaultMaxPerRoute(MAX_CONNECTIONS_PER_ROUTE);
return HttpClientBuilder.create()
.setDefaultRequestConfig(config)
.setConnectionManager(connectionManager)
.setRetryHandler(new DefaultHttpRequestRetryHandler())
.useSystemProperties()
.build();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createHttpClient
File: notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/client/DestinationHttpClient.java
Repository: opendistro-for-elasticsearch/alerting
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2021-31828
|
MEDIUM
| 5.5
|
opendistro-for-elasticsearch/alerting
|
createHttpClient
|
notification/src/main/java/com/amazon/opendistroforelasticsearch/alerting/destination/client/DestinationHttpClient.java
|
49cc584dd6bd38ca26129eeaca5cd04e40a27f25
| 0
|
Analyze the following code function for security vulnerabilities
|
@LogMessage(level = Level.TRACE)
@Message(id = 709, value = "Destroying request {0}", format = Format.MESSAGE_FORMAT)
void requestDestroyed(Object param1);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: requestDestroyed
File: impl/src/main/java/org/jboss/weld/logging/ServletLogger.java
Repository: weld/core
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2014-8122
|
MEDIUM
| 4.3
|
weld/core
|
requestDestroyed
|
impl/src/main/java/org/jboss/weld/logging/ServletLogger.java
|
8e413202fa1af08c09c580f444e4fd16874f9c65
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable
@JsonProperty(FIELD_CACHE_TTL_OVERRIDE_UNIT)
public abstract TimeUnit cacheTTLOverrideUnit();
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cacheTTLOverrideUnit
File: graylog2-server/src/main/java/org/graylog2/lookup/adapters/DnsLookupDataAdapter.java
Repository: Graylog2/graylog2-server
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2023-41045
|
MEDIUM
| 5.3
|
Graylog2/graylog2-server
|
cacheTTLOverrideUnit
|
graylog2-server/src/main/java/org/graylog2/lookup/adapters/DnsLookupDataAdapter.java
|
466af814523cffae9fbc7e77bab7472988f03c3e
| 0
|
Analyze the following code function for security vulnerabilities
|
void onUserStoppedLocked(int userId) {
mRecentTasks.unloadUserDataFromMemoryLocked(userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onUserStoppedLocked
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3912
|
HIGH
| 9.3
|
android
|
onUserStoppedLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void internalTriggerOffload(boolean authoritative, MessageIdImpl messageId) {
validateTopicOwnership(topicName, authoritative);
validateTopicOperation(topicName, TopicOperation.OFFLOAD);
PersistentTopic topic = (PersistentTopic) getTopicReference(topicName);
try {
topic.triggerOffload(messageId);
} catch (AlreadyRunningException e) {
throw new RestException(Status.CONFLICT, e.getMessage());
} catch (Exception e) {
log.warn("Unexpected error triggering offload", e);
throw new RestException(e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: internalTriggerOffload
File: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
Repository: apache/pulsar
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-41571
|
MEDIUM
| 4
|
apache/pulsar
|
internalTriggerOffload
|
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
|
5b35bb81c31f1bc2ad98c9fde5b39ec68110ca52
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void fillLinearGradient(Object graphics, int startColor, int endColor, int x, int y, int width, int height, boolean horizontal) {
if(!asyncView) {
super.fillLinearGradient(graphics, startColor, endColor, x, y, width, height, horizontal);
return;
}
((AndroidGraphics)graphics).fillLinearGradient(startColor, endColor, x, y, width, height, horizontal);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fillLinearGradient
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
|
fillLinearGradient
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@Unstable
public boolean hasAccess(Right right)
{
return hasAccess(right, getXWikiContext().getUserReference());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasAccess
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2023-37911
|
MEDIUM
| 6.5
|
xwiki/xwiki-platform
|
hasAccess
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
|
f471f2a392aeeb9e51d59fdfe1d76fccf532523f
| 0
|
Analyze the following code function for security vulnerabilities
|
public NotificationGuts getExposedGuts() {
return mNotificationGutsExposed;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getExposedGuts
File: packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationGutsManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40098
|
MEDIUM
| 5.5
|
android
|
getExposedGuts
|
packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationGutsManager.java
|
d21ffbe8a2eeb2a5e6da7efbb1a0430ba6b022e0
| 0
|
Analyze the following code function for security vulnerabilities
|
void syncAllIssues(Project project, IssueSyncRequest syncRequest);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: syncAllIssues
File: framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/track/issue/IssuesPlatform.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2022-23544
|
MEDIUM
| 6.1
|
metersphere
|
syncAllIssues
|
framework/sdk-parent/xpack-interface/src/main/java/io/metersphere/xpack/track/issue/IssuesPlatform.java
|
d0f95b50737c941b29d507a4cc3545f2dc6ab121
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean surfaceInsetsChanging() {
return !mLastSurfaceInsets.equals(mAttrs.surfaceInsets);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: surfaceInsetsChanging
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
|
surfaceInsetsChanging
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Procedure
@Description("apoc.export.csv.data(nodes,rels,file,config) - exports given nodes and relationships as csv to the provided file")
public Stream<ProgressInfo> data(@Name("nodes") List<Node> nodes, @Name("rels") List<Relationship> rels, @Name("file") String fileName, @Name("config") Map<String, Object> config) throws Exception {
ExportConfig exportConfig = new ExportConfig(config);
preventBulkImport(exportConfig);
String source = String.format("data: nodes(%d), rels(%d)", nodes.size(), rels.size());
return exportCsv(fileName, source, new NodesAndRelsSubGraph(tx, nodes, rels), exportConfig);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: data
File: core/src/main/java/apoc/export/csv/ExportCSV.java
Repository: neo4j-contrib/neo4j-apoc-procedures
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-23532
|
MEDIUM
| 6.5
|
neo4j-contrib/neo4j-apoc-procedures
|
data
|
core/src/main/java/apoc/export/csv/ExportCSV.java
|
01e63ed2d187cd2a8aa1d78bf831ef0fdd69b522
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setUserIsMonkey(boolean monkey) throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUserIsMonkey
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
setUserIsMonkey
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
void clearOtherAppTimeTrackers(AppTimeTracker except) {
for (int displayNdx = mActivityDisplays.size() - 1; displayNdx >= 0; --displayNdx) {
final ArrayList<ActivityStack> stacks = mActivityDisplays.valueAt(displayNdx).mStacks;
final int topStackNdx = stacks.size() - 1;
for (int stackNdx = topStackNdx; stackNdx >= 0; --stackNdx) {
final ActivityStack stack = stacks.get(stackNdx);
stack.clearOtherAppTimeTrackers(except);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearOtherAppTimeTrackers
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
|
clearOtherAppTimeTrackers
|
services/core/java/com/android/server/am/ActivityStackSupervisor.java
|
468651c86a8adb7aa56c708d2348e99022088af3
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean checkForPermission(String permission, String description){
return checkForPermission(permission, description, false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkForPermission
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
|
checkForPermission
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void columnResized(String internalId, double pixels) {
final Column<T, ?> column = getColumnByInternalId(internalId);
if (column != null && column.isResizable()) {
column.getState().width = pixels;
fireColumnResizeEvent(column, true);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: columnResized
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
|
columnResized
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
final boolean startCopy() {
boolean res;
try {
if (DEBUG_INSTALL) Slog.i(TAG, "startCopy " + mUser + ": " + this);
if (++mRetries > MAX_RETRIES) {
Slog.w(TAG, "Failed to invoke remote methods on default container service. Giving up");
mHandler.sendEmptyMessage(MCS_GIVE_UP);
handleServiceError();
return false;
} else {
handleStartCopy();
res = true;
}
} catch (RemoteException e) {
if (DEBUG_INSTALL) Slog.i(TAG, "Posting install MCS_RECONNECT");
mHandler.sendEmptyMessage(MCS_RECONNECT);
res = false;
}
handleReturnCode();
return res;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startCopy
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
|
startCopy
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<String> getClassList() throws XWikiException
{
return this.xwiki.getClassList(getXWikiContext());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getClassList
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2023-37911
|
MEDIUM
| 6.5
|
xwiki/xwiki-platform
|
getClassList
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
|
f471f2a392aeeb9e51d59fdfe1d76fccf532523f
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getShortcutIconUriInternal(int launcherUserId,
@NonNull String launcherPackage, @NonNull String packageName,
@NonNull ShortcutInfo shortcutInfo, int userId) {
if (!shortcutInfo.hasIconUri()) {
return null;
}
String uri = shortcutInfo.getIconUri();
if (uri == null) {
Slog.w(TAG, "null uri detected in getShortcutIconUri()");
return null;
}
final long token = Binder.clearCallingIdentity();
try {
int packageUid = mPackageManagerInternal.getPackageUid(packageName,
PackageManager.MATCH_DIRECT_BOOT_AUTO, userId);
// Grant read uri permission to the caller on behalf of the shortcut owner. All
// granted permissions are revoked when the default launcher changes, or when
// device is rebooted.
mUriGrantsManager.grantUriPermissionFromOwner(mUriPermissionOwner, packageUid,
launcherPackage, Uri.parse(uri), Intent.FLAG_GRANT_READ_URI_PERMISSION,
userId, launcherUserId);
} catch (Exception e) {
Slog.e(TAG, "Failed to grant uri access to " + launcherPackage + " for " + uri,
e);
uri = null;
} finally {
Binder.restoreCallingIdentity(token);
}
return uri;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getShortcutIconUriInternal
File: services/core/java/com/android/server/pm/ShortcutService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40079
|
HIGH
| 7.8
|
android
|
getShortcutIconUriInternal
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
public String generateValidationKey(int size)
{
return generateRandomString(size);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: generateValidationKey
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
|
generateValidationKey
|
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 int getDefaultVerificationResponse() {
return android.provider.Settings.Global.getInt(mContext.getContentResolver(),
android.provider.Settings.Global.PACKAGE_VERIFIER_DEFAULT_RESPONSE,
DEFAULT_VERIFICATION_RESPONSE);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDefaultVerificationResponse
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
|
getDefaultVerificationResponse
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isLessCssFile(String filename)
{
return filename.toLowerCase().endsWith(".less.vm");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isLessCssFile
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/SkinAction.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2022-36092
|
HIGH
| 7.5
|
xwiki/xwiki-platform
|
isLessCssFile
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/SkinAction.java
|
71a6d0bb6f8ab718fcfaae0e9b8c16c2d69cd4bb
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onActivated(ActivatableNotificationView view) {
mLockscreenGestureLogger.write(
MetricsEvent.ACTION_LS_NOTE,
0 /* lengthDp - N/A */, 0 /* velocityDp - N/A */);
mKeyguardIndicationController.showTransientIndication(R.string.notification_tap_again);
ActivatableNotificationView previousView = mStackScroller.getActivatedChild();
if (previousView != null) {
previousView.makeInactive(true /* animate */);
}
mStackScroller.setActivatedChild(view);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onActivated
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
|
onActivated
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public java.lang.Object getValue(String fieldName)
{
Object object;
if (this.currentObj == null) {
object = new Object(this.getDoc().getFirstObject(fieldName, getXWikiContext()), getXWikiContext());
} else {
object = this.currentObj;
}
return getValue(fieldName, object);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getValue
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-23615
|
MEDIUM
| 5.5
|
xwiki/xwiki-platform
|
getValue
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
|
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
| 0
|
Analyze the following code function for security vulnerabilities
|
public SerializationConfig addDataSerializableFactoryClass(int factoryId, Class<?
extends DataSerializableFactory> dataSerializableFactoryClass) {
String factoryClassName = isNotNull(dataSerializableFactoryClass, "dataSerializableFactoryClass").getName();
return addDataSerializableFactoryClass(factoryId, factoryClassName);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addDataSerializableFactoryClass
File: hazelcast/src/main/java/com/hazelcast/config/SerializationConfig.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
addDataSerializableFactoryClass
|
hazelcast/src/main/java/com/hazelcast/config/SerializationConfig.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean makeRoomForOutgoingCall(Call call, boolean isEmergency) {
if (hasMaximumLiveCalls()) {
// NOTE: If the amount of live calls changes beyond 1, this logic will probably
// have to change.
Call liveCall = getFirstCallWithState(call, LIVE_CALL_STATES);
Log.i(this, "makeRoomForOutgoingCall call = " + call + " livecall = " +
liveCall);
if (call == liveCall) {
// If the call is already the foreground call, then we are golden.
// This can happen after the user selects an account in the PRE_DIAL_WAIT
// state since the call was already populated into the list.
return true;
}
if (hasMaximumOutgoingCalls()) {
// Disconnect the current outgoing call if it's not an emergency call. If the user
// tries to make two outgoing calls to different emergency call numbers, we will try
// to connect the first outgoing call.
if (isEmergency) {
Call outgoingCall = getFirstCallWithState(OUTGOING_CALL_STATES);
if (!outgoingCall.isEmergencyCall()) {
outgoingCall.disconnect();
return true;
}
}
return false;
}
if (hasMaximumHoldingCalls()) {
// There is no more room for any more calls, unless it's an emergency.
if (isEmergency) {
// Kill the current active call, this is easier then trying to disconnect a
// holding call and hold an active call.
liveCall.disconnect();
return true;
}
return false; // No more room!
}
// We have room for at least one more holding call at this point.
// First thing, if we are trying to make a call with the same phone account as the live
// call, then allow it so that the connection service can make its own decision about
// how to handle the new call relative to the current one.
if (Objects.equals(liveCall.getTargetPhoneAccount(), call.getTargetPhoneAccount())) {
return true;
} else if (call.getTargetPhoneAccount() == null) {
// Without a phone account, we can't say reliably that the call will fail.
// If the user chooses the same phone account as the live call, then it's
// still possible that the call can be made (like with CDMA calls not supporting
// hold but they still support adding a call by going immediately into conference
// mode). Return true here and we'll run this code again after user chooses an
// account.
return true;
}
// Try to hold the live call before attempting the new outgoing call.
if (liveCall.can(Connection.CAPABILITY_HOLD)) {
liveCall.hold();
return true;
}
// The live call cannot be held so we're out of luck here. There's no room.
return false;
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: makeRoomForOutgoingCall
File: src/com/android/server/telecom/CallsManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2423
|
MEDIUM
| 6.6
|
android
|
makeRoomForOutgoingCall
|
src/com/android/server/telecom/CallsManager.java
|
a06c9a4aef69ae27b951523cf72bf72412bf48fa
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public @NonNull List<UserHandle> getBindDeviceAdminTargetUsers(@NonNull ComponentName admin) {
if (!mHasFeature) {
return Collections.emptyList();
}
Objects.requireNonNull(admin);
final CallerIdentity caller = getCallerIdentity(admin);
Preconditions.checkCallAuthorization(
isProfileOwner(caller) || isDefaultDeviceOwner(caller));
synchronized (getLockObject()) {
final int callingUserId = caller.getUserId();
return mInjector.binderWithCleanCallingIdentity(() -> {
ArrayList<UserHandle> targetUsers = new ArrayList<>();
if (!isDeviceOwner(admin, callingUserId)) {
// Profile owners can only bind to the device owner.
if (canUserBindToDeviceOwnerLocked(callingUserId)) {
targetUsers.add(UserHandle.of(mOwners.getDeviceOwnerUserId()));
}
} else {
// Caller is the device owner: Look for profile owners that it can bind to.
final List<UserInfo> userInfos = mUserManager.getAliveUsers();
for (int i = 0; i < userInfos.size(); i++) {
final int userId = userInfos.get(i).id;
if (userId != callingUserId && canUserBindToDeviceOwnerLocked(userId)) {
targetUsers.add(UserHandle.of(userId));
}
}
}
return targetUsers;
});
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getBindDeviceAdminTargetUsers
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
|
getBindDeviceAdminTargetUsers
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
static boolean hasViewAboveBelow(){
return viewBelow != null || viewAbove != null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasViewAboveBelow
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
|
hasViewAboveBelow
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getWhereStatement(Delete delete) {
return "WHERE";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getWhereStatement
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
|
getWhereStatement
|
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
|
@Override
public int size() {
return chunks.size() + submissions.size();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: size
File: worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/SingleThreadQueueExtent.java
Repository: IntellectualSites/FastAsyncWorldEdit
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-35925
|
MEDIUM
| 5.5
|
IntellectualSites/FastAsyncWorldEdit
|
size
|
worldedit-core/src/main/java/com/fastasyncworldedit/core/queue/implementation/SingleThreadQueueExtent.java
|
3a8dfb4f7b858a439c35f7af1d56d21f796f61f5
| 0
|
Analyze the following code function for security vulnerabilities
|
public void unregisterReceiver(IIntentReceiver receiver) {
if (DEBUG_BROADCAST) Slog.v(TAG_BROADCAST, "Unregister receiver: " + receiver);
final long origId = Binder.clearCallingIdentity();
try {
boolean doTrim = false;
synchronized(this) {
ReceiverList rl = mRegisteredReceivers.get(receiver.asBinder());
if (rl != null) {
final BroadcastRecord r = rl.curBroadcast;
if (r != null && r == r.queue.getMatchingOrderedReceiver(r)) {
final boolean doNext = r.queue.finishReceiverLocked(
r, r.resultCode, r.resultData, r.resultExtras,
r.resultAbort, false);
if (doNext) {
doTrim = true;
r.queue.processNextBroadcast(false);
}
}
if (rl.app != null) {
rl.app.receivers.remove(rl);
}
removeReceiverLocked(rl);
if (rl.linkedToDeath) {
rl.linkedToDeath = false;
rl.receiver.asBinder().unlinkToDeath(rl, 0);
}
}
}
// If we actually concluded any broadcasts, we might now be able
// to trim the recipients' apps from our working set
if (doTrim) {
trimApplications();
return;
}
} finally {
Binder.restoreCallingIdentity(origId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unregisterReceiver
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
|
unregisterReceiver
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getParam(String name) {
return request.getQueryParams().getFirst(name);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getParam
File: sa-token-starter/sa-token-reactor-spring-boot-starter/src/main/java/cn/dev33/satoken/reactor/model/SaRequestForReactor.java
Repository: dromara/Sa-Token
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-44794
|
CRITICAL
| 9.8
|
dromara/Sa-Token
|
getParam
|
sa-token-starter/sa-token-reactor-spring-boot-starter/src/main/java/cn/dev33/satoken/reactor/model/SaRequestForReactor.java
|
954efeb73277f924f836da2a25322ea35ee1bfa3
| 0
|
Analyze the following code function for security vulnerabilities
|
public Page<E> setPageSize(int pageSize) {
this.pageSize = pageSize;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setPageSize
File: src/main/java/com/github/pagehelper/Page.java
Repository: pagehelper/Mybatis-PageHelper
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-28111
|
HIGH
| 7.5
|
pagehelper/Mybatis-PageHelper
|
setPageSize
|
src/main/java/com/github/pagehelper/Page.java
|
554a524af2d2b30d09505516adc412468a84d8fa
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean canUseCache(String url) {
return isUseCache() && URIUtils.isRemoteResource(url);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: canUseCache
File: org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/uriresolver/CacheResourcesManager.java
Repository: eclipse/lemminx
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2019-18212
|
MEDIUM
| 4
|
eclipse/lemminx
|
canUseCache
|
org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/uriresolver/CacheResourcesManager.java
|
e37c399aa266be1b7a43061d4afc43dc230410d2
| 0
|
Analyze the following code function for security vulnerabilities
|
private void notifyFinishedGoingToSleep() {
if (DEBUG) Log.d(TAG, "notifyFinishedGoingToSleep");
mHandler.sendEmptyMessage(NOTIFY_FINISHED_GOING_TO_SLEEP);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: notifyFinishedGoingToSleep
File: packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21267
|
MEDIUM
| 5.5
|
android
|
notifyFinishedGoingToSleep
|
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
|
d18d8b350756b0e89e051736c1f28744ed31e93a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public @Nullable String transform(String commandLine, String source) throws TransformationException {
if (commandLine == null || source == null) {
throw new TransformationException("the given parameters 'commandLine' and 'source' must not be null");
}
logger.debug("about to transform '{}' by the commandline '{}'", source, commandLine);
long startTime = System.currentTimeMillis();
String formattedCommandLine = String.format(commandLine, source);
String result = ExecUtil.executeCommandLineAndWaitResponse(formattedCommandLine, 5000);
logger.trace("command line execution elapsed {} ms", System.currentTimeMillis() - startTime);
return result;
}
|
Vulnerability Classification:
- CWE: CWE-863
- CVE: CVE-2020-5242
- Severity: HIGH
- CVSS Score: 9.3
Description: Merge pull request from GHSA-w698-693g-23hv
* fix arbitrary code execution vulnerability
Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
* Update bundles/org.openhab.binding.exec/src/main/java/org/openhab/binding/exec/internal/handler/ExecHandler.java
Co-Authored-By: Christoph Weitkamp <github@christophweitkamp.de>
* address review comments
Signed-off-by: Jan N. Klug <jan.n.klug@rub.de>
Co-authored-by: Christoph Weitkamp <github@christophweitkamp.de>
Function: transform
File: bundles/org.openhab.transform.exec/src/main/java/org/openhab/transform/exec/internal/ExecTransformationService.java
Repository: openhab/openhab-addons
Fixed Code:
@Override
public @Nullable String transform(String commandLine, String source) throws TransformationException {
if (commandLine == null || source == null) {
throw new TransformationException("the given parameters 'commandLine' and 'source' must not be null");
}
if (!execTransformationWhitelistWatchService.isWhitelisted(commandLine)) {
logger.warn("Tried to execute '{}', but it is not contained in whitelist.", commandLine);
return null;
}
logger.debug("about to transform '{}' by the commandline '{}'", source, commandLine);
long startTime = System.currentTimeMillis();
String formattedCommandLine = String.format(commandLine, source);
String result = ExecUtil.executeCommandLineAndWaitResponse(formattedCommandLine, 5000);
logger.trace("command line execution elapsed {} ms", System.currentTimeMillis() - startTime);
return result;
}
|
[
"CWE-863"
] |
CVE-2020-5242
|
HIGH
| 9.3
|
openhab/openhab-addons
|
transform
|
bundles/org.openhab.transform.exec/src/main/java/org/openhab/transform/exec/internal/ExecTransformationService.java
|
4c4cb664f2e2c3866aadf117d22fb54aa8dd0031
| 1
|
Analyze the following code function for security vulnerabilities
|
private boolean canCallPhone(String callingPackage, String message) {
return canCallPhone(callingPackage, null /* featureId */, message);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: canCallPhone
File: src/com/android/server/telecom/TelecomServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21394
|
MEDIUM
| 5.5
|
android
|
canCallPhone
|
src/com/android/server/telecom/TelecomServiceImpl.java
|
68dca62035c49e14ad26a54f614199cb29a3393f
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void unregisterListeners() {
if (this instanceof XmppConnectionService.OnConversationUpdate) {
this.xmppConnectionService.removeOnConversationListChangedListener((XmppConnectionService.OnConversationUpdate) this);
}
if (this instanceof XmppConnectionService.OnAccountUpdate) {
this.xmppConnectionService.removeOnAccountListChangedListener((XmppConnectionService.OnAccountUpdate) this);
}
if (this instanceof XmppConnectionService.OnCaptchaRequested) {
this.xmppConnectionService.removeOnCaptchaRequestedListener((XmppConnectionService.OnCaptchaRequested) this);
}
if (this instanceof XmppConnectionService.OnRosterUpdate) {
this.xmppConnectionService.removeOnRosterUpdateListener((XmppConnectionService.OnRosterUpdate) this);
}
if (this instanceof XmppConnectionService.OnMucRosterUpdate) {
this.xmppConnectionService.removeOnMucRosterUpdateListener((XmppConnectionService.OnMucRosterUpdate) this);
}
if (this instanceof OnUpdateBlocklist) {
this.xmppConnectionService.removeOnUpdateBlocklistListener((OnUpdateBlocklist) this);
}
if (this instanceof XmppConnectionService.OnShowErrorToast) {
this.xmppConnectionService.removeOnShowErrorToastListener((XmppConnectionService.OnShowErrorToast) this);
}
if (this instanceof OnKeyStatusUpdated) {
this.xmppConnectionService.removeOnNewKeysAvailableListener((OnKeyStatusUpdated) this);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unregisterListeners
File: src/main/java/eu/siacs/conversations/ui/XmppActivity.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
unregisterListeners
|
src/main/java/eu/siacs/conversations/ui/XmppActivity.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void putIfNotNull(Map<String, Object> hdrs, String key, Object val) {
if (val!=null) hdrs.put(key, val);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: putIfNotNull
File: src/main/java/com/rabbitmq/jms/client/RMQMessage.java
Repository: rabbitmq/rabbitmq-jms-client
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2020-36282
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-jms-client
|
putIfNotNull
|
src/main/java/com/rabbitmq/jms/client/RMQMessage.java
|
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
| 0
|
Analyze the following code function for security vulnerabilities
|
private void migrate109(File dataDir, Stack<Integer> versions) {
var updateIds = new HashSet<>();
for (File file: dataDir.listFiles()) {
if (file.getName().startsWith("Projects.xml")) {
VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file);
for (Element element: dom.getRootElement().elements()) {
Element updateElement = element.element("update");
updateIds.add(updateElement.getTextTrim());
updateElement.setName("dynamics");
}
dom.writeToFile(file, false);
}
}
for (File file: dataDir.listFiles()) {
if (file.getName().startsWith("ProjectUpdates.xml")) {
VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file);
for (Element element: dom.getRootElement().elements()) {
if (!updateIds.contains(element.elementTextTrim("id"))) {
element.detach();
} else {
element.element("date").setName("lastActivityDate");
element.setName("io.onedev.server.model.ProjectDynamics");
}
}
FileUtils.deleteFile(file);
String newFileName = file.getName().replace("Update", "Dynamics");
dom.writeToFile(new File(file.getParent(), newFileName), false);
} else if (file.getName().startsWith("Issues.xml")
|| file.getName().startsWith("CodeComments.xml")
|| file.getName().startsWith("PullRequests.xml")) {
VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file);
for (Element element: dom.getRootElement().elements()) {
Element lastUpdateElement = element.element("lastUpdate");
lastUpdateElement.setName("lastActivity");
lastUpdateElement.element("activity").setName("description");
}
dom.writeToFile(file, false);
}
}
for (File file: dataDir.listFiles()) {
if (file.getName().contains(".xml")) {
VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file);
List<Node> selectedNodes = new ArrayList<>();
selectedNodes.addAll(dom.selectNodes("//io.onedev.server.model.support.pullrequest.NamedPullRequestQuery"));
selectedNodes.addAll(dom.selectNodes("//io.onedev.server.model.support.issue.NamedIssueQuery"));
selectedNodes.addAll(dom.selectNodes("//io.onedev.server.model.support.NamedCodeCommentQuery"));
selectedNodes.addAll(dom.selectNodes("//io.onedev.server.model.support.NamedProjectQuery"));
for (Node node : selectedNodes) {
if (node instanceof Element) {
Element element = (Element) node;
Element queryElement = element.element("query");
if (queryElement != null)
queryElement.setText(queryElement.getText().trim().replace("\"Update Date\"", "\"Last Activity Date\""));
}
}
dom.writeToFile(file, false);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: migrate109
File: server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-338"
] |
CVE-2023-24828
|
HIGH
| 8.8
|
theonedev/onedev
|
migrate109
|
server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
|
d67dd9686897fe5e4ab881d749464aa7c06a68e5
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setResourceManager(OLATResourceManager resourceManager) {
this.resourceManager = resourceManager;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setResourceManager
File: src/main/java/org/olat/modules/wiki/WikiManager.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-39180
|
HIGH
| 9
|
OpenOLAT
|
setResourceManager
|
src/main/java/org/olat/modules/wiki/WikiManager.java
|
699490be8e931af0ef1f135c55384db1f4232637
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void unzip(String zipFilePath) throws IOException {
unzip(zipFilePath, zipFilePath.substring(0, zipFilePath.lastIndexOf(DOT)), true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unzip
File: publiccms-parent/publiccms-common/src/main/java/com/publiccms/common/tools/ZipUtils.java
Repository: sanluan/PublicCMS
The code follows secure coding practices.
|
[
"CWE-434"
] |
CVE-2018-12914
|
HIGH
| 7.5
|
sanluan/PublicCMS
|
unzip
|
publiccms-parent/publiccms-common/src/main/java/com/publiccms/common/tools/ZipUtils.java
|
c19fe66378c75725f3e3a380a6cb9f8b8a7dcb71
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean isGravatarEnabled() {
return CONF.gravatarsEnabled();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isGravatarEnabled
File: src/main/java/com/erudika/scoold/utils/ScooldUtils.java
Repository: Erudika/scoold
The code follows secure coding practices.
|
[
"CWE-130"
] |
CVE-2022-1543
|
MEDIUM
| 6.5
|
Erudika/scoold
|
isGravatarEnabled
|
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected float getOpeningHeight() {
return mNotificationStackScroller.getOpeningHeight();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getOpeningHeight
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
|
getOpeningHeight
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean setComposingText(CharSequence text, int newCursorPosition) {
Editable currentText = getText();
int autoCompleteSpanStart = currentText.getSpanStart(mAutocompleteSpan);
if (autoCompleteSpanStart >= 0) {
int composingEnd = BaseInputConnection.getComposingSpanEnd(currentText);
// On certain device/keyboard combinations, the composing regions are specified
// with a noticeable delay after the initial character is typed, and in certain
// circumstances it does not check that the current state of the text matches the
// expectations of it's composing region.
// For example, you can be typing:
// chrome://f
// Chrome will autocomplete to:
// chrome://f[lags]
// And after the autocomplete has been set, the keyboard will set the composing
// region to the last character and it assumes it is 'f' as it was the last
// character the keyboard sent. If we commit this composition, the text will
// look like:
// chrome://flag[f]
// And if we use the autocomplete clearing logic below, it will look like:
// chrome://f[f]
// To work around this, we see if the composition matches all the characters prior
// to the autocomplete and just readjust the composing region to be that subset.
//
// See crbug.com/366732
if (composingEnd == currentText.length()
&& autoCompleteSpanStart >= text.length()
&& TextUtils.equals(
currentText.subSequence(
autoCompleteSpanStart - text.length(),
autoCompleteSpanStart),
text)) {
setComposingRegion(
autoCompleteSpanStart - text.length(), autoCompleteSpanStart);
}
// Once composing text is being modified, the autocomplete text has been accepted
// or has to be deleted.
mAutocompleteSpan.clearSpan();
Selection.setSelection(currentText, autoCompleteSpanStart);
currentText.delete(autoCompleteSpanStart, currentText.length());
}
return super.setComposingText(text, newCursorPosition);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setComposingText
File: chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-254"
] |
CVE-2016-5163
|
MEDIUM
| 4.3
|
chromium
|
setComposingText
|
chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java
|
3bd33fee094e863e5496ac24714c558bd58d28ef
| 0
|
Analyze the following code function for security vulnerabilities
|
void showStartingWindow(boolean taskSwitch) {
showStartingWindow(null /* prev */, false /* newTask */, taskSwitch,
false /* startActivity */, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: showStartingWindow
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
|
showStartingWindow
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
private float getNotificationsTopY() {
if (mNotificationStackScroller.getNotGoneChildCount() == 0) {
return getExpandedHeight();
}
return mNotificationStackScroller.getNotificationsTopY();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNotificationsTopY
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
|
getNotificationsTopY
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
private void showWarningNotification() {
final int textRes = mSaver ? R.string.battery_low_percent_format_saver_started
: R.string.battery_low_percent_format;
final String percentage = NumberFormat.getPercentInstance().format((double) mBatteryLevel / 100.0);
final Notification.Builder nb = new Notification.Builder(mContext)
.setSmallIcon(R.drawable.ic_power_low)
// Bump the notification when the bucket dropped.
.setWhen(mBucketDroppedNegativeTimeMs)
.setShowWhen(false)
.setContentTitle(mContext.getString(R.string.battery_low_title))
.setContentText(mContext.getString(textRes, percentage))
.setOnlyAlertOnce(true)
.setDeleteIntent(pendingBroadcast(ACTION_DISMISSED_WARNING))
.setPriority(Notification.PRIORITY_MAX)
.setVisibility(Notification.VISIBILITY_PUBLIC)
.setColor(mContext.getColor(
com.android.internal.R.color.battery_saver_mode_color));
if (hasBatterySettings()) {
nb.setContentIntent(pendingBroadcast(ACTION_SHOW_BATTERY_SETTINGS));
}
if (!mSaver) {
nb.addAction(0,
mContext.getString(R.string.battery_saver_start_action),
pendingBroadcast(ACTION_START_SAVER));
} else {
addStopSaverAction(nb);
}
if (mPlaySound) {
attachLowBatterySound(nb);
mPlaySound = false;
}
final Notification n = nb.build();
if (n.headsUpContentView != null) {
n.headsUpContentView.setViewVisibility(com.android.internal.R.id.right_icon, View.GONE);
}
mNoMan.notifyAsUser(TAG_NOTIFICATION, R.id.notification_power, n, UserHandle.ALL);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: showWarningNotification
File: packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3854
|
MEDIUM
| 5
|
android
|
showWarningNotification
|
packages/SystemUI/src/com/android/systemui/power/PowerNotificationWarnings.java
|
05e0705177d2078fa9f940ce6df723312cfab976
| 0
|
Analyze the following code function for security vulnerabilities
|
private void configureSsh() {
bind(KeyPairProvider.class).to(DefaultKeyPairProvider.class);
bind(SshAuthenticator.class).to(DefaultSshAuthenticator.class);
bind(SshServerLauncher.class);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: configureSsh
File: server-core/src/main/java/io/onedev/server/CoreModule.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2021-21242
|
HIGH
| 7.5
|
theonedev/onedev
|
configureSsh
|
server-core/src/main/java/io/onedev/server/CoreModule.java
|
f864053176c08f59ef2d97fea192ceca46a4d9be
| 0
|
Analyze the following code function for security vulnerabilities
|
public abstract boolean isUpdateNeeded();
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isUpdateNeeded
File: opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
Repository: OpenNMS/opennms
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2021-25931
|
MEDIUM
| 6.8
|
OpenNMS/opennms
|
isUpdateNeeded
|
opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
|
607151ea8f90212a3fb37c977fa57c7d58d26a84
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isIntentSenderAnActivity(IIntentSender sender) throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isIntentSenderAnActivity
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
isIntentSenderAnActivity
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected Mono<Void> doNotify(InstanceEvent event, Instance instance) {
Message message;
StandardEvaluationContext context = createEvaluationContext(event, instance);
if (event instanceof InstanceRegisteredEvent) {
message = getRegisteredMessage(instance, context);
}
else if (event instanceof InstanceDeregisteredEvent) {
message = getDeregisteredMessage(instance, context);
}
else if (event instanceof InstanceStatusChangedEvent) {
message = getStatusChangedMessage(instance, context);
}
else {
return Mono.empty();
}
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
if (webhookUrl == null) {
return Mono.error(new IllegalStateException("'webhookUrl' must not be null."));
}
return Mono.fromRunnable(() -> this.restTemplate.postForEntity(webhookUrl,
new HttpEntity<Object>(message, headers), Void.class));
}
|
Vulnerability Classification:
- CWE: CWE-94
- CVE: CVE-2022-46166
- Severity: CRITICAL
- CVSS Score: 9.8
Description: feat: improve notifiers
Function: doNotify
File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/MicrosoftTeamsNotifier.java
Repository: codecentric/spring-boot-admin
Fixed Code:
@Override
protected Mono<Void> doNotify(InstanceEvent event, Instance instance) {
Message message;
EvaluationContext context = createEvaluationContext(event, instance);
if (event instanceof InstanceRegisteredEvent) {
message = getRegisteredMessage(instance, context);
}
else if (event instanceof InstanceDeregisteredEvent) {
message = getDeregisteredMessage(instance, context);
}
else if (event instanceof InstanceStatusChangedEvent) {
message = getStatusChangedMessage(instance, context);
}
else {
return Mono.empty();
}
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
if (webhookUrl == null) {
return Mono.error(new IllegalStateException("'webhookUrl' must not be null."));
}
return Mono.fromRunnable(() -> this.restTemplate.postForEntity(webhookUrl,
new HttpEntity<Object>(message, headers), Void.class));
}
|
[
"CWE-94"
] |
CVE-2022-46166
|
CRITICAL
| 9.8
|
codecentric/spring-boot-admin
|
doNotify
|
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/MicrosoftTeamsNotifier.java
|
c14c3ec12533f71f84de9ce3ce5ceb7991975f75
| 1
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("ConstantConditions") // Only called when isFormEncoded was true.
void addFormField(String name, String value, boolean encoded) {
if (encoded) {
formBuilder.addEncoded(name, value);
} else {
formBuilder.add(name, value);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addFormField
File: retrofit/src/main/java/retrofit2/RequestBuilder.java
Repository: square/retrofit
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-1000850
|
MEDIUM
| 6.4
|
square/retrofit
|
addFormField
|
retrofit/src/main/java/retrofit2/RequestBuilder.java
|
b9a7f6ad72073ddd40254c0058710e87a073047d
| 0
|
Analyze the following code function for security vulnerabilities
|
void createWatermarkInTransaction() {
if (mWatermark != null) {
return;
}
File file = new File("/system/etc/setup.conf");
FileInputStream in = null;
DataInputStream ind = null;
try {
in = new FileInputStream(file);
ind = new DataInputStream(in);
String line = ind.readLine();
if (line != null) {
String[] toks = line.split("%");
if (toks != null && toks.length > 0) {
mWatermark = new Watermark(getDefaultDisplayContentLocked().getDisplay(),
mRealDisplayMetrics, mFxSession, toks);
}
}
} catch (FileNotFoundException e) {
} catch (IOException e) {
} finally {
if (ind != null) {
try {
ind.close();
} catch (IOException e) {
}
} else if (in != null) {
try {
in.close();
} catch (IOException e) {
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createWatermarkInTransaction
File: services/core/java/com/android/server/wm/WindowManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3875
|
HIGH
| 7.2
|
android
|
createWatermarkInTransaction
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean pathEndsWithFile(String pathString) {
Matcher m = endFilePattern.matcher(pathString);
return m.matches();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: pathEndsWithFile
File: org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/utils/FilesUtils.java
Repository: eclipse/lemminx
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2019-18212
|
MEDIUM
| 4
|
eclipse/lemminx
|
pathEndsWithFile
|
org.eclipse.lsp4xml/src/main/java/org/eclipse/lsp4xml/utils/FilesUtils.java
|
e37c399aa266be1b7a43061d4afc43dc230410d2
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<String> getWikiNames()
{
List<String> result = new ArrayList<String>();
try {
result = this.xwiki.getVirtualWikisDatabaseNames(getXWikiContext());
} catch (Exception e) {
LOGGER.error("Failed to get the list of all wiki names", e);
}
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getWikiNames
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2023-37911
|
MEDIUM
| 6.5
|
xwiki/xwiki-platform
|
getWikiNames
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
|
f471f2a392aeeb9e51d59fdfe1d76fccf532523f
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getPlainUserName(DocumentReference userReference, XWikiContext context)
{
return getUserName(userReference, null, false, false, context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPlainUserName
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
|
getPlainUserName
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setBrowserAccessibilityManager(BrowserAccessibilityManager manager) {
mBrowserAccessibilityManager = manager;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setBrowserAccessibilityManager
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
|
setBrowserAccessibilityManager
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
static long getInputDispatchingTimeoutMillisLocked(ActivityRecord r) {
if (r == null || !r.hasProcess()) {
return DEFAULT_DISPATCHING_TIMEOUT_MILLIS;
}
return getInputDispatchingTimeoutMillisLocked(r.app);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInputDispatchingTimeoutMillisLocked
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
|
getInputDispatchingTimeoutMillisLocked
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
public List json() {
return materials;
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2023-28629
- Severity: MEDIUM
- CVSS Score: 5.4
Description: Improve escaping on legacy Freemarker templates
Function: json
File: server/src/main/java/com/thoughtworks/go/server/presentation/models/MaterialRevisionsJsonBuilder.java
Repository: gocd
Fixed Code:
public List<Object> json() {
return materials;
}
|
[
"CWE-79"
] |
CVE-2023-28629
|
MEDIUM
| 5.4
|
gocd
|
json
|
server/src/main/java/com/thoughtworks/go/server/presentation/models/MaterialRevisionsJsonBuilder.java
|
95f758229d419411a38577608709d8552cccf193
| 1
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
public Editable getEditableForTest() {
return mEditable;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getEditableForTest
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
|
getEditableForTest
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
private static DocumentBuilderFactory createDocumentBuilderFactoryInstance() throws ParserConfigurationException {
final DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
String FEATURE;
System.out.println(">>>>" + dbf.getFeature("http://apache.org/xml/features/disallow-doctype-decl"));
// This is the PRIMARY defense. If DTDs (doctypes) are disallowed, almost all XML entity attacks are prevented
// Xerces 2 only - http://xerces.apache.org/xerces2-j/features.html#disallow-doctype-decl
FEATURE = "http://apache.org/xml/features/disallow-doctype-decl";
dbf.setFeature(FEATURE, true);
// If you can't completely disable DTDs, then at least do the following:
// Xerces 1 - http://xerces.apache.org/xerces-j/features.html#external-general-entities
// Xerces 2 - http://xerces.apache.org/xerces2-j/features.html#external-general-entities
// JDK7+ - http://xml.org/sax/features/external-general-entities
FEATURE = "http://xml.org/sax/features/external-general-entities";
dbf.setFeature(FEATURE, false);
// Xerces 1 - http://xerces.apache.org/xerces-j/features.html#external-parameter-entities
// Xerces 2 - http://xerces.apache.org/xerces2-j/features.html#external-parameter-entities
// JDK7+ - http://xml.org/sax/features/external-parameter-entities
FEATURE = "http://xml.org/sax/features/external-parameter-entities";
dbf.setFeature(FEATURE, false);
// Disable external DTDs as well
FEATURE = "http://apache.org/xml/features/nonvalidating/load-external-dtd";
dbf.setFeature(FEATURE, false);
// and these as well, per Timothy Morgan's 2014 paper: "XML Schema, DTD, and Entity Attacks"
dbf.setXIncludeAware(false);
dbf.setExpandEntityReferences(false);
// And, per Timothy Morgan: "If for some reason support for inline DOCTYPEs are a requirement, then
// ensure the entity settings are disabled (as shown above) and beware that SSRF attacks
// (http://cwe.mitre.org/data/definitions/918.html) and denial
// of service attacks (such as billion laughs or decompression bombs via "jar:") are a risk."
return dbf;
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2018-12544
- Severity: HIGH
- CVSS Score: 7.5
Description: Added a test to verify XXE
Function: createDocumentBuilderFactoryInstance
File: vertx-web-api-contract/src/main/java/io/vertx/ext/web/api/validation/impl/XMLTypeValidator.java
Repository: vert-x3/vertx-web
Fixed Code:
private static DocumentBuilderFactory createDocumentBuilderFactoryInstance() throws ParserConfigurationException {
final DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
String FEATURE;
// This is the PRIMARY defense. If DTDs (doctypes) are disallowed, almost all XML entity attacks are prevented
// Xerces 2 only - http://xerces.apache.org/xerces2-j/features.html#disallow-doctype-decl
FEATURE = "http://apache.org/xml/features/disallow-doctype-decl";
dbf.setFeature(FEATURE, true);
// If you can't completely disable DTDs, then at least do the following:
// Xerces 1 - http://xerces.apache.org/xerces-j/features.html#external-general-entities
// Xerces 2 - http://xerces.apache.org/xerces2-j/features.html#external-general-entities
// JDK7+ - http://xml.org/sax/features/external-general-entities
FEATURE = "http://xml.org/sax/features/external-general-entities";
dbf.setFeature(FEATURE, false);
// Xerces 1 - http://xerces.apache.org/xerces-j/features.html#external-parameter-entities
// Xerces 2 - http://xerces.apache.org/xerces2-j/features.html#external-parameter-entities
// JDK7+ - http://xml.org/sax/features/external-parameter-entities
FEATURE = "http://xml.org/sax/features/external-parameter-entities";
dbf.setFeature(FEATURE, false);
// Disable external DTDs as well
FEATURE = "http://apache.org/xml/features/nonvalidating/load-external-dtd";
dbf.setFeature(FEATURE, false);
// and these as well, per Timothy Morgan's 2014 paper: "XML Schema, DTD, and Entity Attacks"
dbf.setXIncludeAware(false);
dbf.setExpandEntityReferences(false);
// And, per Timothy Morgan: "If for some reason support for inline DOCTYPEs are a requirement, then
// ensure the entity settings are disabled (as shown above) and beware that SSRF attacks
// (http://cwe.mitre.org/data/definitions/918.html) and denial
// of service attacks (such as billion laughs or decompression bombs via "jar:") are a risk."
return dbf;
}
|
[
"CWE-611"
] |
CVE-2018-12544
|
HIGH
| 7.5
|
vert-x3/vertx-web
|
createDocumentBuilderFactoryInstance
|
vertx-web-api-contract/src/main/java/io/vertx/ext/web/api/validation/impl/XMLTypeValidator.java
|
26db16c7b32e655b489d1a71605f9a785f788e41
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public IBinder newUriPermissionOwner(String name) {
enforceNotIsolatedCaller("newUriPermissionOwner");
synchronized(this) {
UriPermissionOwner owner = new UriPermissionOwner(this, name);
return owner.getExternalTokenLocked();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: newUriPermissionOwner
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
|
newUriPermissionOwner
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
public SelectActionModeCallback.ActionHandler getSelectActionHandler() {
return mActionHandler;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSelectActionHandler
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-1021"
] |
CVE-2015-1241
|
MEDIUM
| 4.3
|
chromium
|
getSelectActionHandler
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
9d343ad2ea6ec395c377a4efa266057155bfa9c1
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void read(ChannelHandlerContext ctx) throws Exception {
if (suppressRead) {
readPending = true;
} else {
ctx.read();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: read
File: handler/src/main/java/io/netty/handler/ssl/SslClientHelloHandler.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-34462
|
MEDIUM
| 6.5
|
netty
|
read
|
handler/src/main/java/io/netty/handler/ssl/SslClientHelloHandler.java
|
535da17e45201ae4278c0479e6162bb4127d4c32
| 0
|
Analyze the following code function for security vulnerabilities
|
void cleanUpPipes(ParcelFileDescriptor[] pipes) {
if (pipes != null) {
if (pipes[0] != null) {
ParcelFileDescriptor fd = pipes[0];
pipes[0] = null;
try {
fd.close();
} catch (IOException e) {
Slog.w(TAG, "Unable to close pipe!");
}
}
if (pipes[1] != null) {
ParcelFileDescriptor fd = pipes[1];
pipes[1] = null;
try {
fd.close();
} catch (IOException e) {
Slog.w(TAG, "Unable to close pipe!");
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cleanUpPipes
File: services/backup/java/com/android/server/backup/BackupManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3759
|
MEDIUM
| 5
|
android
|
cleanUpPipes
|
services/backup/java/com/android/server/backup/BackupManagerService.java
|
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
| 0
|
Analyze the following code function for security vulnerabilities
|
public String displayRendered(com.xpn.xwiki.api.PropertyClass pclass, String prefix, Collection object)
throws XWikiException
{
if ((pclass == null) || (object == null)) {
return "";
}
return this.doc.displayRendered(pclass.getBasePropertyClass(), prefix, object.getCollection(),
getXWikiContext());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: displayRendered
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-23615
|
MEDIUM
| 5.5
|
xwiki/xwiki-platform
|
displayRendered
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
|
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected Spanned doInBackground(String... input) {
return HtmlUtils.htmlToSpan(input[0], mSpanConverterFactory);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doInBackground
File: src/com/android/mail/compose/ComposeActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2425
|
MEDIUM
| 4.3
|
android
|
doInBackground
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
private void dumpActivity(String prefix, FileDescriptor fd, PrintWriter pw,
final ActivityRecord r, String[] args, boolean dumpAll) {
String innerPrefix = prefix + " ";
synchronized (this) {
pw.print(prefix); pw.print("ACTIVITY "); pw.print(r.shortComponentName);
pw.print(" "); pw.print(Integer.toHexString(System.identityHashCode(r)));
pw.print(" pid=");
if (r.app != null) pw.println(r.app.pid);
else pw.println("(not running)");
if (dumpAll) {
r.dump(pw, innerPrefix);
}
}
if (r.app != null && r.app.thread != null) {
// flush anything that is already in the PrintWriter since the thread is going
// to write to the file descriptor directly
pw.flush();
try {
TransferPipe tp = new TransferPipe();
try {
r.app.thread.dumpActivity(tp.getWriteFd(),
r.appToken, innerPrefix, args);
tp.go(fd);
} finally {
tp.kill();
}
} catch (IOException e) {
pw.println(innerPrefix + "Failure while dumping the activity: " + e);
} catch (RemoteException e) {
pw.println(innerPrefix + "Got a RemoteException while dumping the activity");
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpActivity
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
|
dumpActivity
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<MetaDataDiff> getMetaDataDiff(String fromRev, String toRev, XWikiContext context) throws XWikiException
{
XWikiDocument fromDoc = context.getWiki().getDocument(this, fromRev, context);
XWikiDocument toDoc = context.getWiki().getDocument(this, toRev, context);
return getMetaDataDiff(fromDoc, toDoc, context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMetaDataDiff
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
|
getMetaDataDiff
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
public @ColorInt int getOnAccentTextColor() {
return mOnAccentTextColor;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getOnAccentTextColor
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
getOnAccentTextColor
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean getAsBoolean(@NonNull Bundle extras,
@NonNull String key, boolean def) {
return parseBoolean(extras.get(key), def);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAsBoolean
File: src/com/android/providers/media/util/DatabaseUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2023-35683
|
MEDIUM
| 5.5
|
android
|
getAsBoolean
|
src/com/android/providers/media/util/DatabaseUtils.java
|
23d156ed1bed6d2c2b325f0be540d0afca510c49
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void batterySendBroadcast(Intent intent) {
synchronized (this) {
broadcastIntentLocked(null, null, intent, null, null, 0, null, null, null,
OP_NONE, null, false, false,
-1, SYSTEM_UID, UserHandle.USER_ALL);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: batterySendBroadcast
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
|
batterySendBroadcast
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public @Nullable Object getObject(@Positive int i, @Nullable Map<String, Class<?>> map) throws SQLException {
return getObjectImpl(i, map);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getObject
File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
Repository: pgjdbc
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-31197
|
HIGH
| 8
|
pgjdbc
|
getObject
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String get(CharSequence name) {
return HeadersUtils.getAsString(headers, name);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: get
File: codec-http/src/main/java/io/netty/handler/codec/http/DefaultHttpHeaders.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-444"
] |
CVE-2021-43797
|
MEDIUM
| 4.3
|
netty
|
get
|
codec-http/src/main/java/io/netty/handler/codec/http/DefaultHttpHeaders.java
|
07aa6b5938a8b6ed7a6586e066400e2643897323
| 0
|
Analyze the following code function for security vulnerabilities
|
public AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principals) {
Object principal = principals.getPrimaryPrincipal();
Set<String> groups = getGroups(principal);
SimpleAuthorizationInfo info = new SimpleAuthorizationInfo(groups);
if(groups.contains(SecurityLogic.getAdministratorsGroup(portofinoConfiguration))) {
info.addStringPermission("*");
}
Permission permission = new GroupPermission(groups);
info.setObjectPermissions(Collections.singleton(permission));
return info;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: doGetAuthorizationInfo
File: portofino-core/src/main/java/com/manydesigns/portofino/shiro/AbstractPortofinoRealm.java
Repository: ManyDesigns/Portofino
The code follows secure coding practices.
|
[
"CWE-347"
] |
CVE-2021-29451
|
MEDIUM
| 6.4
|
ManyDesigns/Portofino
|
doGetAuthorizationInfo
|
portofino-core/src/main/java/com/manydesigns/portofino/shiro/AbstractPortofinoRealm.java
|
8c754a0ad234555e813dcbf9e57d637f9f23d8fb
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getStatusActivitySubtitle() {
return statusActivitySubtitle.getExpressionString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStatusActivitySubtitle
File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/MicrosoftTeamsNotifier.java
Repository: codecentric/spring-boot-admin
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2022-46166
|
CRITICAL
| 9.8
|
codecentric/spring-boot-admin
|
getStatusActivitySubtitle
|
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/MicrosoftTeamsNotifier.java
|
c14c3ec12533f71f84de9ce3ce5ceb7991975f75
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<ProfileParameter> getParams() {
return params;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getParams
File: base/common/src/main/java/com/netscape/certsrv/profile/PolicyDefault.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
getParams
|
base/common/src/main/java/com/netscape/certsrv/profile/PolicyDefault.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
private AttachmentReferenceResolver<EntityReference> getCurrentAttachmentResolver()
{
if (this.currentAttachmentReferenceResolver == null) {
this.currentAttachmentReferenceResolver =
Utils.getComponent(AttachmentReferenceResolver.TYPE_REFERENCE, "current");
}
return this.currentAttachmentReferenceResolver;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCurrentAttachmentResolver
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
|
getCurrentAttachmentResolver
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
static void writeAttr(TypedXmlSerializer out, String name, Intent intent) throws IOException {
if (intent == null) return;
writeAttr(out, name, intent.toUri(/* flags =*/ 0));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeAttr
File: services/core/java/com/android/server/pm/ShortcutService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40079
|
HIGH
| 7.8
|
android
|
writeAttr
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Produces(MediaType.APPLICATION_JSON)
@RequestMapping(value = "/api/v1/forms/migrate/run", method = RequestMethod.POST)
public @ResponseBody String runMigration(HttpServletRequest request, HttpServletResponse response) throws Exception {
TransferObject transferObject = getUIComponents(request);
String crfId = request.getParameter("crfId");
ResponseEntity<HelperObject> res = runPreviewTest(transferObject, request);
HelperObject helperObject = res.getBody();
fillHelperObject(helperObject);
helperObject.setRequest(request);
ReportLog reportLog = helperObject.getReportLog();
String pageMessages = null;
if (reportLog.getSubjectCount() != 0 && reportLog.getEventCrfCount() != 0 && reportLog.getErrors().size() == 0) {
BatchCRFMigrationController bcmController = new BatchCRFMigrationController(helperObject);
Thread thread = new Thread(bcmController);
thread.start();
pageMessages = resterms.getString("Batch_CRF_version_migration_is_running_You_will_receive_an_email_once_the_process_is_complete");
return (String) redirect(request, response, "/ListCRF?module=manage" + "&isFromCRFVersionBatchChange=" + pageMessages);
} else {
pageMessages = resterms.getString("Error_in_Running_Migration_Please_try_again");
return (String) redirect(request, response, "/BatchCRFMigration?module=manage&crfId=" + crfId + "&isFromCRFVersionBatchChange=" + pageMessages);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: runMigration
File: web/src/main/java/org/akaza/openclinica/controller/BatchCRFMigrationController.java
Repository: OpenClinica
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-24830
|
HIGH
| 7.5
|
OpenClinica
|
runMigration
|
web/src/main/java/org/akaza/openclinica/controller/BatchCRFMigrationController.java
|
6f864e86543f903bd20d6f9fc7056115106441f3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean handlePinMmi(String dialString, String callingPackage) {
synchronized (mLock) {
enforcePermissionOrPrivilegedDialer(MODIFY_PHONE_STATE, callingPackage);
// Switch identity so that TelephonyManager checks Telecom's permissions instead.
long token = Binder.clearCallingIdentity();
boolean retval = false;
try {
retval = getTelephonyManager().handlePinMmi(dialString);
} finally {
Binder.restoreCallingIdentity(token);
}
return retval;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handlePinMmi
File: src/com/android/server/telecom/TelecomServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-0847
|
HIGH
| 7.2
|
android
|
handlePinMmi
|
src/com/android/server/telecom/TelecomServiceImpl.java
|
2750faaa1ec819eed9acffea7bd3daf867fda444
| 0
|
Analyze the following code function for security vulnerabilities
|
public synchronized Document getResponseXML() {
byte[] bytes = this.responseBytes;
if (bytes == null) {
return null;
}
InputStream in = new ByteArrayInputStream(bytes);
try {
return DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(in);
} catch (Exception err) {
logger.error("Unable to parse response as XML.", err);
return null;
}
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2018-1000540
- Severity: MEDIUM
- CVSS Score: 6.8
Description: Fixed XXE Security Vulnerability #38
Function: getResponseXML
File: Testing/src/main/java/org/loboevolution/html/test/SimpleHttpRequest.java
Repository: LoboEvolution
Fixed Code:
public synchronized Document getResponseXML() {
byte[] bytes = this.responseBytes;
if (bytes == null) {
return null;
}
InputStream in = new ByteArrayInputStream(bytes);
String FEATURE = "";
try {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
FEATURE = "http://apache.org/xml/features/disallow-doctype-decl";
factory.setFeature(FEATURE, true);
FEATURE = "http://xml.org/sax/features/external-general-entities";
factory.setFeature(FEATURE, false);
FEATURE = "http://xml.org/sax/features/external-parameter-entities";
factory.setFeature(FEATURE, false);
FEATURE = "http://apache.org/xml/features/nonvalidating/load-external-dtd";
factory.setFeature(FEATURE, false);
factory.setXIncludeAware(false);
factory.setExpandEntityReferences(false);
DocumentBuilder builder = factory.newDocumentBuilder();
return builder.parse(in);
} catch (ParserConfigurationException e) {
logger.info(FEATURE + " is not supported");
return null;
} catch (SAXException e) {
logger.warn("A DOCTYPE was passed into the XML document");
return null;
} catch (IOException e) {
logger.error("IOException occurred, XXE may still possible: " + e.getMessage());
return null;
}
}
|
[
"CWE-611"
] |
CVE-2018-1000540
|
MEDIUM
| 6.8
|
LoboEvolution
|
getResponseXML
|
Testing/src/main/java/org/loboevolution/html/test/SimpleHttpRequest.java
|
9b75694cedfa4825d4a2330abf2719d470c654cd
| 1
|
Analyze the following code function for security vulnerabilities
|
public static File fromFuseFile(File file) {
return new File(file.getPath().replaceFirst(FUSE_FS_PREFIX, LOWER_FS_PREFIX));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fromFuseFile
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
|
fromFuseFile
|
src/com/android/providers/media/util/FileUtils.java
|
db3c69afcb0a45c8aa2f333fcde36217889899fe
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void connectionServiceFocusLost(Session.Info sessionInfo) throws RemoteException {
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: connectionServiceFocusLost
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
|
connectionServiceFocusLost
|
tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
CharSequence getDescription(Context context) {
// TODO: create more descriptive string
StringBuilder sb = new StringBuilder();
String newline = "<br>";
if (mUserKey != null) {
sb.append(context.getString(R.string.one_userkey)).append(newline);
}
if (mUserCert != null) {
sb.append(context.getString(R.string.one_usercrt)).append(newline);
}
int n = mCaCerts.size();
if (n > 0) {
if (n == 1) {
sb.append(context.getString(R.string.one_cacrt));
} else {
sb.append(context.getString(R.string.n_cacrts, n));
}
}
return Html.fromHtml(sb.toString());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDescription
File: src/com/android/certinstaller/CredentialHelper.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2422
|
HIGH
| 9.3
|
android
|
getDescription
|
src/com/android/certinstaller/CredentialHelper.java
|
70dde9870e9450e10418a32206ac1bb30f036b2c
| 0
|
Analyze the following code function for security vulnerabilities
|
@GuardedBy("getLockObject()")
private void enforceCanSetProfileOwnerLocked(
CallerIdentity caller, @Nullable ComponentName owner, @UserIdInt int userId,
boolean hasIncompatibleAccountsOrNonAdb) {
UserInfo info = getUserInfo(userId);
if (info == null) {
// User doesn't exist.
throw new IllegalArgumentException(
"Attempted to set profile owner for invalid userId: " + userId);
}
if (info.isGuest()) {
throw new IllegalStateException("Cannot set a profile owner on a guest");
}
if (mOwners.hasProfileOwner(userId)) {
StringBuilder errorMessage = new StringBuilder("Trying to set the profile owner");
if (!hasIncompatibleAccountsOrNonAdb) {
append(errorMessage, owner).append(" on user ").append(userId);
}
errorMessage.append(", but profile owner");
if (!hasIncompatibleAccountsOrNonAdb) {
appendProfileOwnerLocked(errorMessage, userId);
}
throw new IllegalStateException(errorMessage.append(" is already set.").toString());
}
if (mOwners.hasDeviceOwner() && mOwners.getDeviceOwnerUserId() == userId) {
StringBuilder errorMessage = new StringBuilder("Trying to set the profile owner");
if (!hasIncompatibleAccountsOrNonAdb) {
append(errorMessage, owner).append(" on user ").append(userId);
}
errorMessage.append(", but the user already has a device owner");
if (!hasIncompatibleAccountsOrNonAdb) {
appendDeviceOwnerLocked(errorMessage);
}
throw new IllegalStateException(errorMessage.append('.').toString());
}
if (isAdb(caller)) {
if ((mIsWatch || hasUserSetupCompleted(userId))
&& hasIncompatibleAccountsOrNonAdb) {
StringBuilder errorMessage = new StringBuilder("Not allowed to set the profile "
+ "owner");
if (!hasIncompatibleAccountsOrNonAdb) {
append(errorMessage, owner).append(" on user ").append(userId).append(' ');
}
throw new IllegalStateException(errorMessage.append(" because there are already "
+ "some accounts on the profile.").toString());
}
return;
}
Preconditions.checkCallAuthorization(
hasCallingOrSelfPermission(MANAGE_PROFILE_AND_DEVICE_OWNERS));
if ((mIsWatch || hasUserSetupCompleted(userId))) {
Preconditions.checkState(isSystemUid(caller),
"Cannot set the profile owner on a user which is already set-up");
if (!mIsWatch) {
if (!isSupervisionComponentLocked(owner)) {
throw new IllegalStateException("Unable to set non-default profile owner"
+ " post-setup " + owner);
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: enforceCanSetProfileOwnerLocked
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
|
enforceCanSetProfileOwnerLocked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.