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
|
@Override
public void removeWindowLw(WindowState win) {
if (mStatusBar == win) {
mStatusBar = null;
mStatusBarController.setWindow(null);
mKeyguardDelegate.showScrim();
} else if (mKeyguardScrim == win) {
Log.v(TAG, "Removing keyguard scrim");
mKeyguardScrim = null;
} if (mNavigationBar == win) {
mNavigationBar = null;
mNavigationBarController.setWindow(null);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeWindowLw
File: policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-0812
|
MEDIUM
| 6.6
|
android
|
removeWindowLw
|
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
|
84669ca8de55d38073a0dcb01074233b0a417541
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getVisibilityOverride(String pkg, int uid) {
checkCallerIsSystem();
return mRankingHelper.getVisibilityOverride(pkg, uid);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getVisibilityOverride
File: services/core/java/com/android/server/notification/NotificationManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3884
|
MEDIUM
| 4.3
|
android
|
getVisibilityOverride
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public WireFormat.Utf8Validation getUtf8Validation(Descriptors.FieldDescriptor descriptor) {
if (descriptor.needsUtf8Check()) {
return WireFormat.Utf8Validation.STRICT;
}
// TODO(b/248145492): support lazy strings for ExtesnsionSet.
return WireFormat.Utf8Validation.LOOSE;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUtf8Validation
File: java/core/src/main/java/com/google/protobuf/MessageReflection.java
Repository: protocolbuffers/protobuf
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2022-3509
|
HIGH
| 7.5
|
protocolbuffers/protobuf
|
getUtf8Validation
|
java/core/src/main/java/com/google/protobuf/MessageReflection.java
|
a3888f53317a8018e7a439bac4abeb8f3425d5e9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public short getShortAndRemove(K name, short defaultValue) {
Short v = getShortAndRemove(name);
return v != null ? v : defaultValue;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getShortAndRemove
File: codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-436",
"CWE-113"
] |
CVE-2022-41915
|
MEDIUM
| 6.5
|
netty
|
getShortAndRemove
|
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
|
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
| 0
|
Analyze the following code function for security vulnerabilities
|
private Version getVersion(String versionUrl) throws IOException {
String txtContent = HttpUtil.getInstance().getTextByUrl(versionUrl + "?_" + System.currentTimeMillis() + "&v=" + BlogBuildInfoUtil.getBuildId()).trim();
Version tLastVersion = new Gson().fromJson(txtContent, Version.class);
//手动设置对应ChangeLog
tLastVersion.setChangeLog(UpdateVersionPlugin.getChangeLog(tLastVersion.getVersion(), tLastVersion.getBuildId()));
return tLastVersion;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getVersion
File: web/src/main/java/com/zrlog/web/plugin/UpdateVersionTimerTask.java
Repository: 94fzb/zrlog
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-16643
|
LOW
| 3.5
|
94fzb/zrlog
|
getVersion
|
web/src/main/java/com/zrlog/web/plugin/UpdateVersionTimerTask.java
|
4a91c83af669e31a22297c14f089d8911d353fa1
| 0
|
Analyze the following code function for security vulnerabilities
|
private <T> T runAsAuthenticated( Callable<T> runnable )
{
final AuthenticationInfo authInfo = AuthenticationInfo.create().principals( RoleKeys.AUTHENTICATED ).user( User.ANONYMOUS ).build();
return ContextBuilder.from( this.context.get() ).
authInfo( authInfo ).
repositoryId( SystemConstants.SYSTEM_REPO_ID ).
branch( SecurityConstants.BRANCH_SECURITY ).build().
callWith( runnable );
}
|
Vulnerability Classification:
- CWE: CWE-384
- CVE: CVE-2024-23679
- Severity: CRITICAL
- CVSS Score: 9.8
Description: Invalidate old session after login #9253
Function: runAsAuthenticated
File: modules/lib/lib-auth/src/main/java/com/enonic/xp/lib/auth/LoginHandler.java
Repository: enonic/xp
Fixed Code:
private <T> T runAsAuthenticated( Callable<T> runnable )
{
final AuthenticationInfo authInfo = AuthenticationInfo.create().principals( RoleKeys.AUTHENTICATED ).user( User.ANONYMOUS ).build();
return ContextBuilder.from( this.context.get() )
.authInfo( authInfo )
.repositoryId( SystemConstants.SYSTEM_REPO_ID )
.branch( SecurityConstants.BRANCH_SECURITY )
.build()
.callWith( runnable );
}
|
[
"CWE-384"
] |
CVE-2024-23679
|
CRITICAL
| 9.8
|
enonic/xp
|
runAsAuthenticated
|
modules/lib/lib-auth/src/main/java/com/enonic/xp/lib/auth/LoginHandler.java
|
0189975691e9e6407a9fee87006f730e84f734ff
| 1
|
Analyze the following code function for security vulnerabilities
|
private void processCancelOrSave(Context context,
HttpServletRequest request, HttpServletResponse response,
SubmissionInfo subInfo, SubmissionStepConfig currentStepConfig) throws ServletException, IOException,
SQLException, AuthorizeException
{
String buttonPressed = UIUtil.getSubmitButton(request, "submit_back");
if (buttonPressed.equals("submit_back"))
{
// re-load current step at beginning
setBeginningOfStep(request, true);
doStep(context, request, response, subInfo, currentStepConfig
.getStepNumber());
}
else if (buttonPressed.equals("submit_remove"))
{
// User wants to cancel and remove
// Cancellation page only applies to workspace items
WorkspaceItem wi = (WorkspaceItem) subInfo.getSubmissionItem();
wi.deleteAll();
JSPManager.showJSP(request, response,
"/submit/cancelled-removed.jsp");
context.complete();
}
else if (buttonPressed.equals("submit_keep"))
{
// Save submission for later - just show message
JSPManager.showJSP(request, response, "/submit/saved.jsp");
}
else
{
doStepJump(context, request, response, subInfo, currentStepConfig);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: processCancelOrSave
File: dspace-jspui/src/main/java/org/dspace/app/webui/servlet/SubmissionController.java
Repository: DSpace
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-31194
|
HIGH
| 7.2
|
DSpace
|
processCancelOrSave
|
dspace-jspui/src/main/java/org/dspace/app/webui/servlet/SubmissionController.java
|
d1dd7d23329ef055069759df15cfa200c8e3
| 0
|
Analyze the following code function for security vulnerabilities
|
public Server build() {
final Server server = new Server(buildServerConfig(ports));
serverListeners.forEach(server::addListener);
return server;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: build
File: core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-44487
|
HIGH
| 7.5
|
line/armeria
|
build
|
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
|
df7f85824a62e997b910b5d6194a3335841065fd
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void handleResponse(HttpURLConnection conn, String orgName, String moduleName, String version) {
try {
int statusCode = getStatusCode(conn);
// 200 - Module pushed successfully
// Other - Error occurred, json returned with the error message
if (statusCode == HttpURLConnection.HTTP_OK) {
outStream.println(orgName + "/" + moduleName + ":" + version + " pushed to central successfully");
} else if (statusCode == HttpURLConnection.HTTP_UNAUTHORIZED) {
errStream.println("unauthorized access token for organization: " + orgName);
} else if (statusCode == HttpURLConnection.HTTP_BAD_REQUEST) {
try (BufferedReader reader = new BufferedReader(
new InputStreamReader(conn.getErrorStream(), Charset.defaultCharset()))) {
StringBuilder result = new StringBuilder();
String line;
while ((line = reader.readLine()) != null) {
result.append(line);
}
MapValue payload = (MapValue) JSONParser.parse(result.toString());
String message = payload.getStringValue("message");
if (message.contains("module md file cannot be empty")) {
errStream.println(message);
} else {
throw ErrorUtil.createCommandException(message);
}
} catch (IOException e) {
throw ErrorUtil.createCommandException(
"failed to push the module '" + orgName + "/" + moduleName + ":" + version
+ "' to the remote repository '" + conn.getURL() + "'");
}
} else {
throw ErrorUtil.createCommandException(
"failed to push the module '" + orgName + "/" + moduleName + ":" + version
+ "' to the remote repository '" + conn.getURL() + "'");
}
} finally {
conn.disconnect();
}
}
|
Vulnerability Classification:
- CWE: CWE-306
- CVE: CVE-2021-32700
- Severity: MEDIUM
- CVSS Score: 5.8
Description: Fix central connection
Function: handleResponse
File: cli/ballerina-cli-module/src/main/java/org/ballerinalang/cli/module/Push.java
Repository: ballerina-platform/ballerina-lang
Fixed Code:
private static void handleResponse(HttpsURLConnection conn, String orgName, String moduleName, String version) {
try {
int statusCode = getStatusCode(conn);
// 200 - Module pushed successfully
// Other - Error occurred, json returned with the error message
if (statusCode == HttpsURLConnection.HTTP_OK) {
outStream.println(orgName + "/" + moduleName + ":" + version + " pushed to central successfully");
} else if (statusCode == HttpsURLConnection.HTTP_UNAUTHORIZED) {
errStream.println("unauthorized access token for organization: " + orgName);
} else if (statusCode == HttpsURLConnection.HTTP_BAD_REQUEST) {
try (BufferedReader reader = new BufferedReader(
new InputStreamReader(conn.getErrorStream(), Charset.defaultCharset()))) {
StringBuilder result = new StringBuilder();
String line;
while ((line = reader.readLine()) != null) {
result.append(line);
}
MapValue payload = (MapValue) JSONParser.parse(result.toString());
String message = payload.getStringValue("message");
if (message.contains("module md file cannot be empty")) {
errStream.println(message);
} else {
throw ErrorUtil.createCommandException(message);
}
} catch (IOException e) {
throw ErrorUtil.createCommandException(
"failed to push the module '" + orgName + "/" + moduleName + ":" + version
+ "' to the remote repository '" + conn.getURL() + "'");
}
} else {
throw ErrorUtil.createCommandException(
"failed to push the module '" + orgName + "/" + moduleName + ":" + version
+ "' to the remote repository '" + conn.getURL() + "'");
}
} finally {
conn.disconnect();
}
}
|
[
"CWE-306"
] |
CVE-2021-32700
|
MEDIUM
| 5.8
|
ballerina-platform/ballerina-lang
|
handleResponse
|
cli/ballerina-cli-module/src/main/java/org/ballerinalang/cli/module/Push.java
|
4609ffee1744ecd16aac09303b1783bf0a525816
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
protected boolean isFirstChildWindowGreaterThanSecond(WindowState newWindow,
WindowState existingWindow) {
final int type1 = newWindow.mAttrs.type;
final int type2 = existingWindow.mAttrs.type;
// Base application windows should be z-ordered BELOW all other windows in the app token.
if (type1 == TYPE_BASE_APPLICATION && type2 != TYPE_BASE_APPLICATION) {
return false;
} else if (type1 != TYPE_BASE_APPLICATION && type2 == TYPE_BASE_APPLICATION) {
return true;
}
// Starting windows should be z-ordered ABOVE all other windows in the app token.
if (type1 == TYPE_APPLICATION_STARTING && type2 != TYPE_APPLICATION_STARTING) {
return true;
} else if (type1 != TYPE_APPLICATION_STARTING && type2 == TYPE_APPLICATION_STARTING) {
return false;
}
// Otherwise the new window is greater than the existing window.
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isFirstChildWindowGreaterThanSecond
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
|
isFirstChildWindowGreaterThanSecond
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
static String arrayToString(int[] array) {
StringBuffer buf = new StringBuffer(128);
buf.append('[');
if (array != null) {
for (int i=0; i<array.length; i++) {
if (i > 0) buf.append(", ");
buf.append(array[i]);
}
}
buf.append(']');
return buf.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: arrayToString
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
|
arrayToString
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected StreamSinkConduit getSinkConduit(HttpServerExchange exchange, StreamSinkConduit conduit) {
return conduit;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSinkConduit
File: servlet/src/main/java/io/undertow/servlet/handlers/ServletInitialHandler.java
Repository: undertow-io/undertow
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2019-10184
|
MEDIUM
| 5
|
undertow-io/undertow
|
getSinkConduit
|
servlet/src/main/java/io/undertow/servlet/handlers/ServletInitialHandler.java
|
d2715e3afa13f50deaa19643676816ce391551e9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void preNavNode(StringBuffer sb, int depth) {
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: preNavNode
File: java/code/src/com/redhat/rhn/frontend/nav/DialognavRenderer.java
Repository: spacewalkproject/spacewalk
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2016-3079
|
MEDIUM
| 4.3
|
spacewalkproject/spacewalk
|
preNavNode
|
java/code/src/com/redhat/rhn/frontend/nav/DialognavRenderer.java
|
7b9ff9ad
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setUrl(final String url)
{
Log.v(TAG, "load url: " + url);
// Try to Get a Referrer and then Load the URL with it
m_referrer.startConnection(new InstallReferrerStateListener() {
@Override
public void onInstallReferrerSetupFinished(int responseCode) {
String referrerValue ="";
if( responseCode == InstallReferrerClient.InstallReferrerResponse.OK){
try {
ReferrerDetails response = m_referrer.getInstallReferrer();
referrerValue = "&" + response.getInstallReferrer();
Log.v(TAG, "Recived - referrer: " + referrerValue);
} catch (RemoteException e) {
Log.v(TAG, "Failed - referrer - " + e.toString());
}
}else{
Log.v(TAG, "Failed - referrer not available ");
}
m_referrer.endConnection();
// We now have a referrer - Load the URI
final String refUrl = url + referrerValue;
nativeOnPageStarted(refUrl, null);
m_activity.runOnUiThread(new Runnable() {
@Override
public void run() { m_webView.loadUrl(refUrl); }
});
}
@Override
public void onInstallReferrerServiceDisconnected() {}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setUrl
File: android/src/org/mozilla/firefox/vpn/qt/VPNWebView.java
Repository: mozilla-mobile/mozilla-vpn-client
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2021-29978
|
HIGH
| 10
|
mozilla-mobile/mozilla-vpn-client
|
setUrl
|
android/src/org/mozilla/firefox/vpn/qt/VPNWebView.java
|
c8440f464a2f5c4e7d4990152ee5850df8b23f42
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public HttpHeaders addInt(CharSequence name, int value) {
headers.addInt(name, value);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addInt
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
|
addInt
|
codec-http/src/main/java/io/netty/handler/codec/http/DefaultHttpHeaders.java
|
07aa6b5938a8b6ed7a6586e066400e2643897323
| 0
|
Analyze the following code function for security vulnerabilities
|
public void updateAsciiStream(String columnName,
@Nullable InputStream inputStream) throws SQLException {
updateAsciiStream(findColumn(columnName), inputStream);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateAsciiStream
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
|
updateAsciiStream
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
public List<Cliente> buscarClienteNome(String nome) throws SQLException, ClassNotFoundException {
Connection con = null;
PreparedStatement stmt = null;
ResultSet rs = null;
try {
con = ConnectionFactory.getConnection();
stmt = con.prepareStatement(stmtBuscarNome + "'%" + nome + "%' 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: buscarClienteNome
File: src/java/br/com/magazine/dao/ClienteDAO.java
Repository: evandro-machado/Trabalho-Web2
Fixed Code:
public List<Cliente> buscarClienteNome(String nome) throws SQLException, ClassNotFoundException {
Connection con = null;
PreparedStatement stmt = null;
ResultSet rs = null;
try {
con = ConnectionFactory.getConnection();
nome = "%"+nome+"%";
stmt = con.prepareStatement(stmtBuscarNomeCliente);
stmt.setString(1,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());
}
}
}
|
[
"CWE-89"
] |
CVE-2015-10061
|
MEDIUM
| 5.2
|
evandro-machado/Trabalho-Web2
|
buscarClienteNome
|
src/java/br/com/magazine/dao/ClienteDAO.java
|
f59ac954625d0a4f6d34f069a2e26686a7a20aeb
| 1
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("unchecked")
public void sendUpdatedFavTagsNotifications(Post question, List<String> addedTags, HttpServletRequest req) {
if (!isFavTagsNotificationAllowed()) {
return;
}
// sends a notification to subscibers of a tag if that tag was added to an existing question
if (question != null && !question.isReply() && addedTags != null && !addedTags.isEmpty()) {
Profile postAuthor = question.getAuthor(); // the current user - same as utils.getAuthUser(req)
Map<String, Object> model = new HashMap<String, Object>();
Map<String, String> lang = getLang(req);
String name = postAuthor.getName();
String body = Utils.markdownToHtml(question.getBody());
String picture = Utils.formatMessage("<img src='{0}' width='25'>", escapeHtmlAttribute(avatarRepository.
getLink(postAuthor, AvatarFormat.Square25)));
String postURL = CONF.serverUrl() + question.getPostLink(false, false);
String tagsString = Optional.ofNullable(question.getTags()).orElse(Collections.emptyList()).stream().
map(t -> "<span class=\"tag\">" +
(addedTags.contains(t) ? "<b>" + escapeHtml(t) + "<b>" : escapeHtml(t)) + "</span>").
collect(Collectors.joining(" "));
String subject = Utils.formatMessage(lang.get("notification.favtags.subject"), name,
Utils.abbreviate(question.getTitle(), 255));
model.put("subject", escapeHtml(subject));
model.put("logourl", getSmallLogoUrl());
model.put("heading", Utils.formatMessage(lang.get("notification.favtags.heading"), picture, escapeHtml(name)));
model.put("body", Utils.formatMessage("<h2><a href='{0}'>{1}</a></h2><div>{2}</div><br>{3}",
postURL, escapeHtml(question.getTitle()), body, tagsString));
Set<String> emails = getFavTagsSubscribers(addedTags);
sendEmailsToSubscribersInSpace(emails, question.getSpace(), subject, compileEmailTemplate(model));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendUpdatedFavTagsNotifications
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
|
sendUpdatedFavTagsNotifications
|
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void convertNumberToFloat() throws IOException
{
// Note: this MUST start with more accurate representations, since we don't know which
// value is the original one (others get generated when requested)
if ((_numTypesValid & NR_BIGDECIMAL) != 0) {
_numberFloat = _numberBigDecimal.floatValue();
} else if ((_numTypesValid & NR_BIGINT) != 0) {
_numberFloat = _numberBigInt.floatValue();
} else if ((_numTypesValid & NR_DOUBLE) != 0) {
_numberFloat = (float) _numberDouble;
} else if ((_numTypesValid & NR_LONG) != 0) {
_numberFloat = (float) _numberLong;
} else if ((_numTypesValid & NR_INT) != 0) {
_numberFloat = (float) _numberInt;
} else {
_throwInternal();
}
_numTypesValid |= NR_FLOAT;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: convertNumberToFloat
File: cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
Repository: FasterXML/jackson-dataformats-binary
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2020-28491
|
MEDIUM
| 5
|
FasterXML/jackson-dataformats-binary
|
convertNumberToFloat
|
cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
|
de072d314af8f5f269c8abec6930652af67bc8e6
| 0
|
Analyze the following code function for security vulnerabilities
|
public JSON getJSON() {
return json;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getJSON
File: samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
getJSON
|
samples/client/petstore/java/jersey2-java8-localdatetime/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
public static Descriptor find(String className) {
return find(Jenkins.getInstance().getExtensionList(Descriptor.class),className);
}
|
Vulnerability Classification:
- CWE: CWE-264
- CVE: CVE-2013-7330
- Severity: MEDIUM
- CVSS Score: 4.0
Description: [SECURITY-55]
This patch makes standard post-build action refuse to let you configure a downstream project you cannot currently build.
The one from parameterized-trigger will show an error in the configure screen but still lets you save the configuration; needs an analogous patch to that plugin.
Does not yet protect against POSTing config.xml with the trigger.
(cherry picked from commit 757bc8a53956e6fbab267214e6e0896f03c3c262)
Conflicts:
core/src/main/java/hudson/model/Descriptor.java
Function: find
File: core/src/main/java/hudson/model/Descriptor.java
Repository: jenkinsci/jenkins
Fixed Code:
public static @CheckForNull Descriptor find(String className) {
return find(Jenkins.getInstance().getExtensionList(Descriptor.class),className);
}
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
find
|
core/src/main/java/hudson/model/Descriptor.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public MediaPackage getMediaPackage(String mediaPackageId) throws NotFoundException, SearchServiceDatabaseException {
EntityManager em = null;
EntityTransaction tx = null;
try {
em = emf.createEntityManager();
tx = em.getTransaction();
tx.begin();
SearchEntity episodeEntity = getSearchEntity(mediaPackageId, em);
if (episodeEntity == null)
throw new NotFoundException("No episode with id=" + mediaPackageId + " exists");
// Ensure this user is allowed to read this episode
String accessControlXml = episodeEntity.getAccessControl();
if (accessControlXml != null) {
AccessControlList acl = AccessControlParser.parseAcl(accessControlXml);
User currentUser = securityService.getUser();
Organization currentOrg = securityService.getOrganization();
// There are several reasons a user may need to load a episode: to read content, to edit it, or add content
if (!AccessControlUtil.isAuthorized(acl, currentUser, currentOrg, READ.toString())
&& !AccessControlUtil.isAuthorized(acl, currentUser, currentOrg, CONTRIBUTE.toString())
&& !AccessControlUtil.isAuthorized(acl, currentUser, currentOrg, WRITE.toString())) {
throw new UnauthorizedException(currentUser + " is not authorized to see episode " + mediaPackageId);
}
}
return MediaPackageParser.getFromXml(episodeEntity.getMediaPackageXML());
} catch (NotFoundException e) {
throw e;
} catch (Exception e) {
logger.error("Could not get episode {} from database: {} ", mediaPackageId, e.getMessage());
if (tx.isActive()) {
tx.rollback();
}
throw new SearchServiceDatabaseException(e);
} finally {
if (em != null)
em.close();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMediaPackage
File: modules/search-service-impl/src/main/java/org/opencastproject/search/impl/persistence/SearchServiceDatabaseImpl.java
Repository: opencast
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2021-21318
|
MEDIUM
| 5.5
|
opencast
|
getMediaPackage
|
modules/search-service-impl/src/main/java/org/opencastproject/search/impl/persistence/SearchServiceDatabaseImpl.java
|
b18c6a7f81f08ed14884592a6c14c9ab611ad450
| 0
|
Analyze the following code function for security vulnerabilities
|
public void unsubscribeFromNewPosts(User u) {
if (u != null) {
unsubscribeFromNotifications(u.getEmail(), EMAIL_ALERTS_PREFIX + "new_post_subscribers");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unsubscribeFromNewPosts
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
|
unsubscribeFromNewPosts
|
src/main/java/com/erudika/scoold/utils/ScooldUtils.java
|
62a0e92e1486ddc17676a7ead2c07ff653d167ce
| 0
|
Analyze the following code function for security vulnerabilities
|
public Label getLabel(String expr) {
if(expr==null) return null;
expr = hudson.util.QuotedStringTokenizer.unquote(expr);
while(true) {
Label l = labels.get(expr);
if(l!=null)
return l;
// non-existent
try {
labels.putIfAbsent(expr,Label.parseExpression(expr));
} catch (ANTLRException e) {
// laxly accept it as a single label atom for backward compatibility
return getLabelAtom(expr);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLabel
File: core/src/main/java/jenkins/model/Jenkins.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-2065
|
MEDIUM
| 4.3
|
jenkinsci/jenkins
|
getLabel
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
public String[] list() {
return internal.list();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: list
File: src/net/sourceforge/plantuml/security/SFile.java
Repository: plantuml
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2023-3431
|
MEDIUM
| 5.3
|
plantuml
|
list
|
src/net/sourceforge/plantuml/security/SFile.java
|
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
| 0
|
Analyze the following code function for security vulnerabilities
|
protected abstract void readAmqpBody(byte[] barr);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readAmqpBody
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
|
readAmqpBody
|
src/main/java/com/rabbitmq/jms/client/RMQMessage.java
|
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean saveToStore(boolean forceWrite) {
if (mPendingStoreRead) {
Log.e(TAG, "Cannot save to store before store is read!");
return false;
}
ArrayList<WifiConfiguration> sharedConfigurations = new ArrayList<>();
ArrayList<WifiConfiguration> userConfigurations = new ArrayList<>();
// List of network IDs for legacy Passpoint configuration to be removed.
List<Integer> legacyPasspointNetId = new ArrayList<>();
for (WifiConfiguration config : mConfiguredNetworks.valuesForAllUsers()) {
// Ignore ephemeral networks and non-legacy Passpoint configurations.
if (config.ephemeral || (config.isPasspoint() && !config.isLegacyPasspointConfig)) {
continue;
}
// Migrate the legacy Passpoint configurations owned by the current user to
// {@link PasspointManager}.
if (config.isLegacyPasspointConfig && mWifiPermissionsUtil
.doesUidBelongToUser(config.creatorUid, mCurrentUserId)) {
legacyPasspointNetId.add(config.networkId);
// Migrate the legacy Passpoint configuration and add it to PasspointManager.
if (!PasspointManager.addLegacyPasspointConfig(config)) {
Log.e(TAG, "Failed to migrate legacy Passpoint config: " + config.FQDN);
}
// This will prevent adding |config| to the |sharedConfigurations|.
continue;
}
config.isMostRecentlyConnected =
mLruConnectionTracker.isMostRecentlyConnected(config);
// We push all shared networks & private networks not belonging to the current
// user to the shared store. Ideally, private networks for other users should
// not even be in memory,
// But, this logic is in place to deal with store migration from N to O
// because all networks were previously stored in a central file. We cannot
// write these private networks to the user specific store until the corresponding
// user logs in.
if (config.shared || !mWifiPermissionsUtil
.doesUidBelongToUser(config.creatorUid, mCurrentUserId)) {
sharedConfigurations.add(config);
} else {
userConfigurations.add(config);
}
}
// Remove the configurations for migrated Passpoint configurations.
for (int networkId : legacyPasspointNetId) {
mConfiguredNetworks.remove(networkId);
}
// Setup store data for write.
mNetworkListSharedStoreData.setConfigurations(sharedConfigurations);
mNetworkListUserStoreData.setConfigurations(userConfigurations);
mRandomizedMacStoreData.setMacMapping(mRandomizedMacAddressMapping);
try {
mWifiConfigStore.write(forceWrite);
} catch (IOException | IllegalStateException e) {
Log.wtf(TAG, "Writing to store failed. Saved networks maybe lost!", e);
return false;
} catch (XmlPullParserException e) {
Log.wtf(TAG, "XML serialization for store failed. Saved networks maybe lost!", e);
return false;
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: saveToStore
File: service/java/com/android/server/wifi/WifiConfigManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
saveToStore
|
service/java/com/android/server/wifi/WifiConfigManager.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
public static byte getByte(long address) {
return PlatformDependent0.getByte(address);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getByte
File: common/src/main/java/io/netty/util/internal/PlatformDependent.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-668",
"CWE-378",
"CWE-379"
] |
CVE-2022-24823
|
LOW
| 1.9
|
netty
|
getByte
|
common/src/main/java/io/netty/util/internal/PlatformDependent.java
|
185f8b2756a36aaa4f973f1a2a025e7d981823f1
| 0
|
Analyze the following code function for security vulnerabilities
|
private static String makePropertiesSafe(Object in, Set<Character> toEscape) {
if (in == null) { return "null"; }
String str = in.toString();
StringBuilder result = null;
for (int i = 0; i < str.length(); i++) {
char c = str.charAt(i);
final boolean isAscii = CharMatcher.ascii().matches(c);
final boolean requiresEscape = !isAscii || (toEscape != null && toEscape.contains(c));
if (requiresEscape && result == null) {
result = new StringBuilder(str.length() * 2);
result.append(str, 0, i);
}
if (!isAscii) {
result.append(JavaSourceEscaper.escapeChar(c));
} else {
if (requiresEscape) {
result.append('\\');
}
if (result != null) {
result.append(c);
}
}
}
return result == null ? str : result.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: makePropertiesSafe
File: varexport/src/main/java/com/indeed/util/varexport/Variable.java
Repository: indeedeng/util
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-36634
|
MEDIUM
| 5.4
|
indeedeng/util
|
makePropertiesSafe
|
varexport/src/main/java/com/indeed/util/varexport/Variable.java
|
c0952a9db51a880e9544d9fac2a2218a6bfc9c63
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void handleTapOutsideFocusOutsideSelf() {
// Nothing to do here since raising the other window will naturally take care of
// us loosing focus
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleTapOutsideFocusOutsideSelf
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
|
handleTapOutsideFocusOutsideSelf
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Vector getCookiesForURL(String url) {
if (isUseNativeCookieStore()) {
try {
URI uri = new URI(url);
CookieManager mgr = getCookieManager();
mgr.removeExpiredCookie();
String domain = uri.getHost();
String cookieStr = mgr.getCookie(url);
if (cookieStr != null) {
String[] cookies = cookieStr.split(";");
int len = cookies.length;
Vector out = new Vector();
for (int i = 0; i < len; i++) {
Cookie c = new Cookie();
String[] parts = cookies[i].split("=");
c.setName(parts[0].trim());
if (parts.length > 1) {
c.setValue(parts[1].trim());
} else {
c.setValue("");
}
c.setDomain(domain);
out.add(c);
}
return out;
}
} catch (Exception ex) {
com.codename1.io.Log.e(ex);
}
return new Vector();
}
return super.getCookiesForURL(url);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCookiesForURL
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
|
getCookiesForURL
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@GetMapping(value = "/exposed/{keyDate}", produces = "application/zip")
@Loggable
@Operation(description = "Request the exposed key from a given date")
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "zipped export.bin and export.sig of all keys in that interval"),
@ApiResponse(responseCode = "400", description =
"- invalid starting key date, doesn't point to midnight UTC" +
"- _publishedAfter_ is not at the beginning of a batch release time, currently 2h")})
public @ResponseBody ResponseEntity<byte[]> getExposedKeys(
@PathVariable @Parameter(description = "Requested date for Exposed Keys retrieval, in milliseconds since Unix epoch (1970-01-01). It must indicate the beginning of a TEKRollingPeriod, currently midnight UTC.", example = "1593043200000") long keyDate,
@RequestParam(required = false) @Parameter(description = "Restrict returned Exposed Keys to dates after this parameter. Given in milliseconds since Unix epoch (1970-01-01).", example = "1593043200000") Long publishedafter)
throws BadBatchReleaseTimeException, IOException, InvalidKeyException, SignatureException,
NoSuchAlgorithmException {
if (!validationUtils.isValidKeyDate(keyDate)) {
return ResponseEntity.notFound().build();
}
if (publishedafter != null && !validationUtils.isValidBatchReleaseTime(publishedafter)) {
return ResponseEntity.notFound().build();
}
long now = System.currentTimeMillis();
// calculate exposed until bucket
long publishedUntil = now - (now % releaseBucketDuration.toMillis());
DateTime dateTime = new DateTime(publishedUntil + releaseBucketDuration.toMillis() - 1, DateTimeZone.UTC);
var exposedKeys = dataService.getSortedExposedForKeyDate(keyDate, publishedafter, publishedUntil);
exposedKeys = fakeKeyService.fillUpKeys(exposedKeys, publishedafter, keyDate);
if (exposedKeys.isEmpty()) {
return ResponseEntity.noContent()//.cacheControl(CacheControl.maxAge(exposedListCacheControl))
.header("X-PUBLISHED-UNTIL", Long.toString(publishedUntil))
.header("Expires", RFC1123_DATE_TIME_FORMATTER.print(dateTime))
.build();
}
ProtoSignatureWrapper payload = gaenSigner.getPayload(exposedKeys);
return ResponseEntity.ok()//.cacheControl(CacheControl.maxAge(exposedListCacheControl))
.header("X-PUBLISHED-UNTIL", Long.toString(publishedUntil))
.header("Expires", RFC1123_DATE_TIME_FORMATTER.print(dateTime))
.body(payload.getZip());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getExposedKeys
File: dpppt-backend-sdk/dpppt-backend-sdk-ws/src/main/java/org/dpppt/backend/sdk/ws/controller/GaenController.java
Repository: RadarCOVID/radar-covid-backend-dp3t-server
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2020-26230
|
LOW
| 2.6
|
RadarCOVID/radar-covid-backend-dp3t-server
|
getExposedKeys
|
dpppt-backend-sdk/dpppt-backend-sdk-ws/src/main/java/org/dpppt/backend/sdk/ws/controller/GaenController.java
|
6d30c92cc8fcbde3ded7e9518853ef278080344d
| 0
|
Analyze the following code function for security vulnerabilities
|
public final GoCipher getGoCipher() {
return goCipher;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getGoCipher
File: config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-77"
] |
CVE-2021-43286
|
MEDIUM
| 6.5
|
gocd
|
getGoCipher
|
config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
|
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void handlePhoneStateChanged(String newState) {
if (DEBUG) Log.d(TAG, "handlePhoneStateChanged(" + newState + ")");
if (TelephonyManager.EXTRA_STATE_IDLE.equals(newState)) {
mPhoneState = TelephonyManager.CALL_STATE_IDLE;
} else if (TelephonyManager.EXTRA_STATE_OFFHOOK.equals(newState)) {
mPhoneState = TelephonyManager.CALL_STATE_OFFHOOK;
} else if (TelephonyManager.EXTRA_STATE_RINGING.equals(newState)) {
mPhoneState = TelephonyManager.CALL_STATE_RINGING;
}
for (int i = 0; i < mCallbacks.size(); i++) {
KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get();
if (cb != null) {
cb.onPhoneStateChanged(mPhoneState);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handlePhoneStateChanged
File: packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
handlePhoneStateChanged
|
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
private void sendErrorResult(long deviceId, int errMsgId) {
if (mEnrollmentCallback != null) {
mEnrollmentCallback.onEnrollmentError(errMsgId, getErrorString(errMsgId));
} else if (mAuthenticationCallback != null) {
mAuthenticationCallback.onAuthenticationError(errMsgId, getErrorString(errMsgId));
} else if (mRemovalCallback != null) {
mRemovalCallback.onRemovalError(mRemovalFingerprint, errMsgId,
getErrorString(errMsgId));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendErrorResult
File: core/java/android/hardware/fingerprint/FingerprintManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3917
|
HIGH
| 7.2
|
android
|
sendErrorResult
|
core/java/android/hardware/fingerprint/FingerprintManager.java
|
f5334952131afa835dd3f08601fb3bced7b781cd
| 0
|
Analyze the following code function for security vulnerabilities
|
public void destroy() {
if (log.isDebugEnabled()) {
log.debug(internal.getMessage("finalizing"));
}
destroyModules();
destroyInternal();
getServletContext().removeAttribute(Globals.ACTION_SERVLET_KEY);
// Release our LogFactory and Log instances (if any)
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
if (classLoader == null) {
classLoader = ActionServlet.class.getClassLoader();
}
try {
LogFactory.release(classLoader);
} catch (Throwable t) {
; // Servlet container doesn't have the latest version
; // of commons-logging-api.jar installed
// :FIXME: Why is this dependent on the container's version of commons-logging?
// Shouldn't this depend on the version packaged with Struts?
/*
Reason: LogFactory.release(classLoader); was added as
an attempt to investigate the OutOfMemory error reported on Bugzilla #14042.
It was committed for version 1.136 by craigmcc
*/
}
PropertyUtils.clearDescriptors();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: destroy
File: src/share/org/apache/struts/action/ActionServlet.java
Repository: kawasima/struts1-forever
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-20"
] |
CVE-2016-1181
|
MEDIUM
| 6.8
|
kawasima/struts1-forever
|
destroy
|
src/share/org/apache/struts/action/ActionServlet.java
|
eda3a79907ed8fcb0387a0496d0cb14332f250e8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
@Deprecated
public String encodeUrl(String arg0) {
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: encodeUrl
File: h2/src/test/org/h2/test/server/TestWeb.java
Repository: h2database
The code follows secure coding practices.
|
[
"CWE-312"
] |
CVE-2022-45868
|
HIGH
| 7.8
|
h2database
|
encodeUrl
|
h2/src/test/org/h2/test/server/TestWeb.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 0
|
Analyze the following code function for security vulnerabilities
|
public TriggerDescriptor getTrigger(String shortClassName) {
return (TriggerDescriptor) findDescriptor(shortClassName, Trigger.all());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTrigger
File: core/src/main/java/jenkins/model/Jenkins.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-2065
|
MEDIUM
| 4.3
|
jenkinsci/jenkins
|
getTrigger
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setDescription(String description) {
this.description = parser.parseExpression(description, ParserContext.TEMPLATE_EXPRESSION);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDescription
File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/OpsGenieNotifier.java
Repository: codecentric/spring-boot-admin
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2022-46166
|
CRITICAL
| 9.8
|
codecentric/spring-boot-admin
|
setDescription
|
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/OpsGenieNotifier.java
|
c14c3ec12533f71f84de9ce3ce5ceb7991975f75
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isAdminActive(@NonNull ComponentName admin) {
throwIfParentInstance("isAdminActive");
return isAdminActiveAsUser(admin, myUserId());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isAdminActive
File: core/java/android/app/admin/DevicePolicyManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
isAdminActive
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void call(Ruby runtime, RubyHash data, ByteList buffer, int field, int flen, int value, int vlen);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: call
File: ext/puma_http11/org/jruby/puma/Http11Parser.java
Repository: puma
The code follows secure coding practices.
|
[
"CWE-444"
] |
CVE-2021-41136
|
LOW
| 3.6
|
puma
|
call
|
ext/puma_http11/org/jruby/puma/Http11Parser.java
|
acdc3ae571dfae0e045cf09a295280127db65c7f
| 0
|
Analyze the following code function for security vulnerabilities
|
public static AndroidImplementation getInstance() {
return instance;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getInstance
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
|
getInstance
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public FF4jConfiguration parseConfiguration(Map<String, String> mapProperties) {
Util.assertNotNull(mapProperties, "Cannot parse null properties");
FF4jConfiguration ff4jConfig = new FF4jConfiguration();
// Audit
if (mapProperties.containsKey(FF4J_TAG + "." + GLOBAL_AUDIT_TAG)) {
ff4jConfig.setAudit(Boolean.valueOf(mapProperties.get(FF4J_TAG + "." + GLOBAL_AUDIT_TAG)));
}
// AutoCreate
if (mapProperties.containsKey(FF4J_TAG + "." + GLOBAL_AUTOCREATE)) {
ff4jConfig.setAutoCreate(Boolean.valueOf(mapProperties.get(FF4J_TAG + "." + GLOBAL_AUTOCREATE)));
}
// Properties
ff4jConfig.getProperties().putAll(parseProperties(FF4J_TAG + "." + PROPERTIES_TAG, mapProperties));
// Features
parseFeatures(ff4jConfig, mapProperties);
return ff4jConfig;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseConfiguration
File: ff4j-config-properties/src/main/java/org/ff4j/parser/properties/PropertiesParser.java
Repository: ff4j
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2022-44262
|
CRITICAL
| 9.8
|
ff4j
|
parseConfiguration
|
ff4j-config-properties/src/main/java/org/ff4j/parser/properties/PropertiesParser.java
|
991df72725f78adbc413d9b0fbb676201f1882e0
| 0
|
Analyze the following code function for security vulnerabilities
|
private native void nativeSetTextHandlesTemporarilyHidden(
long nativeContentViewCoreImpl, boolean hidden);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nativeSetTextHandlesTemporarilyHidden
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
|
nativeSetTextHandlesTemporarilyHidden
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
9d343ad2ea6ec395c377a4efa266057155bfa9c1
| 0
|
Analyze the following code function for security vulnerabilities
|
protected CompletableFuture<Void> internalSetMaxConsumersPerSubscription(Integer maxConsumersPerSubscription) {
if (maxConsumersPerSubscription != null && maxConsumersPerSubscription < 0) {
throw new RestException(Status.PRECONDITION_FAILED, "Invalid value for maxConsumersPerSubscription");
}
return getTopicPoliciesAsyncWithRetry(topicName)
.thenCompose(op -> {
TopicPolicies topicPolicies = op.orElseGet(TopicPolicies::new);
topicPolicies.setMaxConsumersPerSubscription(maxConsumersPerSubscription);
return pulsar().getTopicPoliciesService().updateTopicPoliciesAsync(topicName, topicPolicies);
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: internalSetMaxConsumersPerSubscription
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
|
internalSetMaxConsumersPerSubscription
|
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
|
5b35bb81c31f1bc2ad98c9fde5b39ec68110ca52
| 0
|
Analyze the following code function for security vulnerabilities
|
private void forceStopUserLocked(int userId, String reason) {
forceStopPackageLocked(null, -1, false, false, true, false, false, userId, reason);
Intent intent = new Intent(Intent.ACTION_USER_STOPPED);
intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY
| Intent.FLAG_RECEIVER_FOREGROUND);
intent.putExtra(Intent.EXTRA_USER_HANDLE, userId);
broadcastIntentLocked(null, null, intent,
null, null, 0, null, null, null, AppOpsManager.OP_NONE,
null, false, false, MY_PID, Process.SYSTEM_UID, UserHandle.USER_ALL);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: forceStopUserLocked
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2500
|
MEDIUM
| 4.3
|
android
|
forceStopUserLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
9878bb99b77c3681f0fda116e2964bac26f349c3
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("deprecation")
@Override
public DomainBareJid getServiceName() {
return getXMPPServiceDomain();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getServiceName
File: smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
Repository: igniterealtime/Smack
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2016-10027
|
MEDIUM
| 4.3
|
igniterealtime/Smack
|
getServiceName
|
smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
|
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getMACLength() {
return haskey ? 16 : 0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMACLength
File: src/main/java/com/southernstorm/noise/protocol/ChaChaPolyCipherState.java
Repository: rweather/noise-java
The code follows secure coding practices.
|
[
"CWE-125",
"CWE-787"
] |
CVE-2020-25021
|
HIGH
| 7.5
|
rweather/noise-java
|
getMACLength
|
src/main/java/com/southernstorm/noise/protocol/ChaChaPolyCipherState.java
|
18e86b6f8bea7326934109aa9ffa705ebf4bde90
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getSecretToken() {
return secretToken;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSecretToken
File: ratpack-session/src/main/java/ratpack/session/clientside/ClientSideSessionConfig.java
Repository: ratpack
The code follows secure coding practices.
|
[
"CWE-312"
] |
CVE-2021-29481
|
MEDIUM
| 5
|
ratpack
|
getSecretToken
|
ratpack-session/src/main/java/ratpack/session/clientside/ClientSideSessionConfig.java
|
60302fae7ef26897b9a0ec0def6281a9425344cf
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void createConnectionFailed(PhoneAccountHandle connectionManagerPhoneAccount,
String callId, ConnectionRequest request, boolean isIncoming,
Session.Info sessionInfo) throws RemoteException {
Log.i(ConnectionServiceFixture.this, "createConnectionFailed --> " + callId);
if (mConnectionById.containsKey(callId)) {
throw new RuntimeException("Connection already exists: " + callId);
}
// TODO(3p-calls): Implement this.
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createConnectionFailed
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
|
createConnectionFailed
|
tests/src/com/android/server/telecom/tests/ConnectionServiceFixture.java
|
9b41a963f352fdb3da1da8c633d45280badfcb24
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequestMapping("/services/public/products/{store}/{language}/{category}")
@ResponseBody
public ProductList getProducts(@PathVariable final String store, @PathVariable final String language, @PathVariable final String category, Model model, HttpServletRequest request, HttpServletResponse response) throws Exception {
try {
/**
* How to Spring MVC Rest web service - ajax / jquery
* http://codetutr.com/2013/04/09/spring-mvc-easy-rest-based-json-services-with-responsebody/
*/
MerchantStore merchantStore = (MerchantStore)request.getAttribute(Constants.MERCHANT_STORE);
Map<String,Language> langs = languageService.getLanguagesMap();
if(merchantStore!=null) {
if(!merchantStore.getCode().equals(store)) {
merchantStore = null; //reset for the current request
}
}
if(merchantStore== null) {
merchantStore = merchantStoreService.getByCode(store);
}
if(merchantStore==null) {
LOGGER.error("Merchant store is null for code " + store);
response.sendError(503, "Merchant store is null for code " + store);//TODO localized message
return null;
}
//get the category by code
Category cat = categoryService.getBySeUrl(merchantStore, category);
if(cat==null) {
LOGGER.error("Category with friendly url " + category + " is null");
response.sendError(503, "Category is null");//TODO localized message
}
String lineage = new StringBuilder().append(cat.getLineage()).append(cat.getId()).append("/").toString();
List<Category> categories = categoryService.getListByLineage(store, lineage);
List<Long> ids = new ArrayList<Long>();
if(categories!=null && categories.size()>0) {
for(Category c : categories) {
ids.add(c.getId());
}
}
ids.add(cat.getId());
Language lang = langs.get(language);
if(lang==null) {
lang = langs.get(Constants.DEFAULT_LANGUAGE);
}
List<com.salesmanager.core.model.catalog.product.Product> products = productService.getProducts(ids, lang);
ProductList productList = new ProductList();
ReadableProductPopulator populator = new ReadableProductPopulator();
populator.setPricingService(pricingService);
populator.setimageUtils(imageUtils);
for(Product product : products) {
//create new proxy product
ReadableProduct p = populator.populate(product, new ReadableProduct(), merchantStore, lang);
productList.getProducts().add(p);
}
productList.setProductCount(productList.getProducts().size());
return productList;
} catch (Exception e) {
LOGGER.error("Error while getting category",e);
response.sendError(503, "Error while getting category");
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProducts
File: sm-shop/src/main/java/com/salesmanager/shop/store/controller/category/ShoppingCategoryController.java
Repository: shopizer-ecommerce/shopizer
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2021-33561
|
LOW
| 3.5
|
shopizer-ecommerce/shopizer
|
getProducts
|
sm-shop/src/main/java/com/salesmanager/shop/store/controller/category/ShoppingCategoryController.java
|
197f8c78c8f673b957e41ca2c823afc654c19271
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void configure() {
bind(SessionStore.class).to(ClientSideSessionStore.class).in(Scopes.SINGLETON);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: configure
File: ratpack-session/src/main/java/ratpack/session/clientside/ClientSideSessionModule.java
Repository: ratpack
The code follows secure coding practices.
|
[
"CWE-312"
] |
CVE-2021-29481
|
MEDIUM
| 5
|
ratpack
|
configure
|
ratpack-session/src/main/java/ratpack/session/clientside/ClientSideSessionModule.java
|
d7d240c06536a8b89a917e4ac842c337f7ea31f0
| 0
|
Analyze the following code function for security vulnerabilities
|
public PipelineDao getPipelineDao() {
return pipelineDao;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPipelineDao
File: server/src/test-shared/java/com/thoughtworks/go/server/dao/DatabaseAccessHelper.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-697"
] |
CVE-2022-39308
|
MEDIUM
| 5.9
|
gocd
|
getPipelineDao
|
server/src/test-shared/java/com/thoughtworks/go/server/dao/DatabaseAccessHelper.java
|
236d4baf92e6607f2841c151c855adcc477238b8
| 0
|
Analyze the following code function for security vulnerabilities
|
public void clearCacheOnUiThread(
final AwContents awContents,
final boolean includeDiskFiles) throws Exception {
getInstrumentation().runOnMainSync(new Runnable() {
@Override
public void run() {
awContents.clearCache(includeDiskFiles);
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clearCacheOnUiThread
File: android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-254"
] |
CVE-2016-5155
|
MEDIUM
| 4.3
|
chromium
|
clearCacheOnUiThread
|
android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java
|
b8dcfeb065bbfd777cdc5f5433da9a87f25e6ec6
| 0
|
Analyze the following code function for security vulnerabilities
|
public void hang(IBinder who, boolean allowRestart) throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hang
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
hang
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
public ModuleClassLoader getModuleClassLoader() {
return moduleClassLoader;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getModuleClassLoader
File: api/src/main/java/org/openmrs/ui/framework/resource/ModuleResourceProvider.java
Repository: openmrs/openmrs-module-uiframework
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-24621
|
MEDIUM
| 6.5
|
openmrs/openmrs-module-uiframework
|
getModuleClassLoader
|
api/src/main/java/org/openmrs/ui/framework/resource/ModuleResourceProvider.java
|
0422fa52c7eba3d96cce2936cb92897dca4b680a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void loadAttachments(XWikiContext context) throws XWikiException
{
for (XWikiAttachment attachment : getAttachmentList()) {
attachment.loadAttachmentContent(context);
attachment.loadArchive(context);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: loadAttachments
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
|
loadAttachments
|
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
|
@Override
public boolean equals(Object obj) {
if (obj instanceof JSONArray) {
return myArrayList.equals(((JSONArray)obj).myArrayList);
} else {
return false;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: equals
File: src/main/java/org/codehaus/jettison/json/JSONArray.java
Repository: jettison-json/jettison
The code follows secure coding practices.
|
[
"CWE-674",
"CWE-787"
] |
CVE-2022-45693
|
HIGH
| 7.5
|
jettison-json/jettison
|
equals
|
src/main/java/org/codehaus/jettison/json/JSONArray.java
|
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void before() throws Throwable {
create();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: before
File: src/main/java/org/junit/rules/TemporaryFolder.java
Repository: junit-team/junit4
The code follows secure coding practices.
|
[
"CWE-732"
] |
CVE-2020-15250
|
LOW
| 1.9
|
junit-team/junit4
|
before
|
src/main/java/org/junit/rules/TemporaryFolder.java
|
610155b8c22138329f0723eec22521627dbc52ae
| 0
|
Analyze the following code function for security vulnerabilities
|
public void addStructuresByType(List<Structure> structures, int structureType){
cache.put(structuresByTypeGroup + structureType, structures, structuresByTypeGroup);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addStructuresByType
File: src/com/dotmarketing/cache/ContentTypeCacheImpl.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-2355
|
HIGH
| 7.5
|
dotCMS/core
|
addStructuresByType
|
src/com/dotmarketing/cache/ContentTypeCacheImpl.java
|
897f3632d7e471b7a73aabed5b19f6f53d4e5562
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Byte getByte(K name) {
V v = get(name);
try {
return v != null ? toByte(name, v) : null;
} catch (RuntimeException ignore) {
return null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getByte
File: codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-436",
"CWE-113"
] |
CVE-2022-41915
|
MEDIUM
| 6.5
|
netty
|
getByte
|
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
|
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
long injectCurrentTimeMillis() {
return System.currentTimeMillis();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: injectCurrentTimeMillis
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
|
injectCurrentTimeMillis
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
private void loadSupportedLocales() {
String rawLocales = Config.get().getString("java.supported_locales");
if (rawLocales == null) {
return;
}
List<String> compoundLocales = new LinkedList<String>();
for (Enumeration<Object> locales = new StringTokenizer(rawLocales, ","); locales
.hasMoreElements();) {
String locale = (String) locales.nextElement();
if (locale.indexOf('_') > -1) {
compoundLocales.add(locale);
}
LocaleInfo li = new LocaleInfo(locale);
this.supportedLocales.put(locale, li);
}
for (Iterator<String> iter = compoundLocales.iterator(); iter.hasNext();) {
String cl = iter.next();
String[] parts = cl.split("_");
LocaleInfo li = new LocaleInfo(parts[0], cl);
if (this.supportedLocales.get(parts[0]) == null) {
this.supportedLocales.put(parts[0], li);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: loadSupportedLocales
File: java/code/src/com/redhat/rhn/common/localization/LocalizationService.java
Repository: spacewalkproject/spacewalk
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2016-3079
|
MEDIUM
| 4.3
|
spacewalkproject/spacewalk
|
loadSupportedLocales
|
java/code/src/com/redhat/rhn/common/localization/LocalizationService.java
|
7b9ff9ad
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void readDesign(Element cellElement,
DesignContext designContext) {
if (!cellElement.hasAttr("plain-text")) {
if (cellElement.children().size() > 0
&& cellElement.child(0).tagName().contains("-")) {
setComponent(
designContext.readDesign(cellElement.child(0)));
} else {
setHtml(cellElement.html());
}
} else {
// text – need to unescape HTML entities
setText(DesignFormatter
.decodeFromTextNode(cellElement.html()));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readDesign
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
|
readDesign
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings({ "PMD.AvoidCatchingThrowable", "PMD.AvoidInstanceofChecksInCatchClause" })
private void handle(ServletRequestHandler pReqHandler,HttpServletRequest pReq, HttpServletResponse pResp) throws IOException {
JSONAware json = null;
try {
// Check access policy
requestHandler.checkClientIPAccess(pReq.getRemoteHost(),pReq.getRemoteAddr());
// Remember the agent URL upon the first request. Needed for discovery
updateAgentUrlIfNeeded(pReq);
// Dispatch for the proper HTTP request method
json = pReqHandler.handleRequest(pReq,pResp);
} catch (Throwable exp) {
json = requestHandler.handleThrowable(
exp instanceof RuntimeMBeanException ? ((RuntimeMBeanException) exp).getTargetException() : exp);
} finally {
setCorsHeader(pReq, pResp);
String callback = pReq.getParameter(ConfigKey.CALLBACK.getKeyValue());
String answer = json != null ?
json.toJSONString() :
requestHandler.handleThrowable(new Exception("Internal error while handling an exception")).toJSONString();
if (callback != null) {
// Send a JSONP response
sendResponse(pResp, "text/javascript", callback + "(" + answer + ");");
} else {
sendResponse(pResp, getMimeType(pReq),answer);
}
}
}
|
Vulnerability Classification:
- CWE: CWE-352
- CVE: CVE-2014-0168
- Severity: MEDIUM
- CVSS Score: 6.8
Description: Enchanced policy wr to origin handling. The Origin: can now be checked on the server side, too.
Function: handle
File: agent/core/src/main/java/org/jolokia/http/AgentServlet.java
Repository: jolokia
Fixed Code:
@SuppressWarnings({ "PMD.AvoidCatchingThrowable", "PMD.AvoidInstanceofChecksInCatchClause" })
private void handle(ServletRequestHandler pReqHandler,HttpServletRequest pReq, HttpServletResponse pResp) throws IOException {
JSONAware json = null;
try {
// Check access policy
requestHandler.checkAccess(pReq.getRemoteHost(), pReq.getRemoteAddr(),
getOriginOrReferer(pReq));
// Remember the agent URL upon the first request. Needed for discovery
updateAgentUrlIfNeeded(pReq);
// Dispatch for the proper HTTP request method
json = pReqHandler.handleRequest(pReq,pResp);
} catch (Throwable exp) {
json = requestHandler.handleThrowable(
exp instanceof RuntimeMBeanException ? ((RuntimeMBeanException) exp).getTargetException() : exp);
} finally {
setCorsHeader(pReq, pResp);
String callback = pReq.getParameter(ConfigKey.CALLBACK.getKeyValue());
String answer = json != null ?
json.toJSONString() :
requestHandler.handleThrowable(new Exception("Internal error while handling an exception")).toJSONString();
if (callback != null) {
// Send a JSONP response
sendResponse(pResp, "text/javascript", callback + "(" + answer + ");");
} else {
sendResponse(pResp, getMimeType(pReq),answer);
}
}
}
|
[
"CWE-352"
] |
CVE-2014-0168
|
MEDIUM
| 6.8
|
jolokia
|
handle
|
agent/core/src/main/java/org/jolokia/http/AgentServlet.java
|
2d9b168cfbbf5a6d16fa6e8a5b34503e3dc42364
| 1
|
Analyze the following code function for security vulnerabilities
|
@UnsupportedAppUsage
public boolean isGroupSummary() {
return mGroupKey != null && (flags & FLAG_GROUP_SUMMARY) != 0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isGroupSummary
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
isGroupSummary
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getAttachmentURL(String fullname, String filename, XWikiContext context) throws XWikiException
{
return getAttachmentURL(fullname, filename, null, context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAttachmentURL
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
|
getAttachmentURL
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public BigInteger bigIntegerValue() {
BigDecimal bd = bigDecimalValue();
if (bd.scale() <= bigIntegerScaleLimit) {
return bd.toBigInteger();
}
throw new UnsupportedOperationException(
String.format(
"Scale value %d of this BigInteger exceeded maximal allowed value of %d",
bd.scale(), bigIntegerScaleLimit));
}
|
Vulnerability Classification:
- CWE: CWE-834
- CVE: CVE-2023-4043
- Severity: HIGH
- CVSS Score: 7.5
Description: BigInteger scale limit counts absolute value now.
Signed-off-by: Tomáš Kraus <tomas.kraus@oracle.com>
Function: bigIntegerValue
File: impl/src/main/java/org/eclipse/parsson/JsonNumberImpl.java
Repository: eclipse-ee4j/parsson
Fixed Code:
@Override
public BigInteger bigIntegerValue() {
BigDecimal bd = bigDecimalValue();
if (Math.abs(bd.scale()) <= bigIntegerScaleLimit) {
return bd.toBigInteger();
}
throw new UnsupportedOperationException(
String.format(SCALE_LIMIT_EXCEPTION_MESSAGE, bd.scale(), bigIntegerScaleLimit));
}
|
[
"CWE-834"
] |
CVE-2023-4043
|
HIGH
| 7.5
|
eclipse-ee4j/parsson
|
bigIntegerValue
|
impl/src/main/java/org/eclipse/parsson/JsonNumberImpl.java
|
85fe45ca2da6d7b79ec03014c928075bca01e588
| 1
|
Analyze the following code function for security vulnerabilities
|
default <T extends DataModel> void create(UUID jobId, String key, T model) throws IOException {
throw new UnsupportedOperationException();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: create
File: portability-spi-cloud/src/main/java/org/datatransferproject/spi/cloud/storage/TemporaryPerJobDataStore.java
Repository: google/data-transfer-project
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-22572
|
LOW
| 2.1
|
google/data-transfer-project
|
create
|
portability-spi-cloud/src/main/java/org/datatransferproject/spi/cloud/storage/TemporaryPerJobDataStore.java
|
013edb6c2d5a4e472988ea29a7cb5b1fdaf9c635
| 0
|
Analyze the following code function for security vulnerabilities
|
protected boolean handleFirstKexPacketFollows(int cmd, Buffer buffer, boolean followFlag) {
if (!followFlag) {
return true; // if 1st KEX packet does not follow then process the command
}
/*
* According to RFC4253 section 7.1:
*
* If the other party's guess was wrong, and this field was TRUE, the next packet MUST be silently ignored
*/
boolean debugEnabled = log.isDebugEnabled();
for (KexProposalOption option : KexProposalOption.FIRST_KEX_PACKET_GUESS_MATCHES) {
Map.Entry<String, String> result = comparePreferredKexProposalOption(option);
if (result != null) {
if (debugEnabled) {
log.debug(
"handleFirstKexPacketFollows({})[{}] 1st follow KEX packet {} option mismatch: client={}, server={}",
this, SshConstants.getCommandMessageName(cmd), option, result.getKey(), result.getValue());
}
return false;
}
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleFirstKexPacketFollows
File: sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
Repository: apache/mina-sshd
The code follows secure coding practices.
|
[
"CWE-354"
] |
CVE-2023-48795
|
MEDIUM
| 5.9
|
apache/mina-sshd
|
handleFirstKexPacketFollows
|
sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
|
6b0fd46f64bcb75eeeee31d65f10242660aad7c1
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public synchronized SSLSession getHandshakeSession() {
// Javadocs state return value should be:
// null if this instance is not currently handshaking, or if the current handshake has not
// progressed far enough to create a basic SSLSession. Otherwise, this method returns the
// SSLSession currently being negotiated.
switch(handshakeState) {
case NOT_STARTED:
case FINISHED:
return null;
default:
return session;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getHandshakeSession
File: handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-835"
] |
CVE-2016-4970
|
HIGH
| 7.8
|
netty
|
getHandshakeSession
|
handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java
|
bc8291c80912a39fbd2303e18476d15751af0bf1
| 0
|
Analyze the following code function for security vulnerabilities
|
public ProcessList getProcessList(ActivityManagerService service) {
return new ProcessList();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProcessList
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21292
|
MEDIUM
| 5.5
|
android
|
getProcessList
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public Session.Definition session(final Session.Store store) {
this.session = new Session.Definition(requireNonNull(store, "A session store is required."));
return this.session;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: session
File: jooby/src/main/java/org/jooby/Jooby.java
Repository: jooby-project/jooby
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-7647
|
MEDIUM
| 5
|
jooby-project/jooby
|
session
|
jooby/src/main/java/org/jooby/Jooby.java
|
34f526028e6cd0652125baa33936ffb6a8a4a009
| 0
|
Analyze the following code function for security vulnerabilities
|
private float calculateQsTopPadding() {
if (mKeyguardShowing
&& (mQsExpandImmediate || mIsExpanding && mQsExpandedWhenExpandingStarted)) {
// Either QS pushes the notifications down when fully expanded, or QS is fully above the
// notifications (mostly on tablets). maxNotifications denotes the normal top padding
// on Keyguard, maxQs denotes the top padding from the quick settings panel. We need to
// take the maximum and linearly interpolate with the panel expansion for a nice motion.
int maxNotifications = mClockPositionResult.stackScrollerPadding
- mClockPositionResult.stackScrollerPaddingAdjustment;
int maxQs = getTempQsMaxExpansion();
int max = mStatusBarState == StatusBarState.KEYGUARD
? Math.max(maxNotifications, maxQs)
: maxQs;
return (int) interpolate(getExpandedFraction(),
mQsMinExpansionHeight, max);
} else if (mQsSizeChangeAnimator != null) {
return (int) mQsSizeChangeAnimator.getAnimatedValue();
} else if (mKeyguardShowing) {
// We can only do the smoother transition on Keyguard when we also are not collapsing
// from a scrolled quick settings.
return interpolate(getQsExpansionFraction(),
mNotificationStackScroller.getIntrinsicPadding(),
mQsMaxExpansionHeight);
} else {
return mQsExpansionHeight;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: calculateQsTopPadding
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
|
calculateQsTopPadding
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String addSwaRefAttachment(DataHandler dataHandler) {
String contentId = UUID.randomUUID() + "@" + dataHandler.getName();
this.mimeContainer.addAttachment(contentId, dataHandler);
return contentId;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addSwaRefAttachment
File: spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java
Repository: spring-projects/spring-framework
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-4152
|
MEDIUM
| 6.8
|
spring-projects/spring-framework
|
addSwaRefAttachment
|
spring-oxm/src/main/java/org/springframework/oxm/jaxb/Jaxb2Marshaller.java
|
2843b7d2ee12e3f9c458f6f816befd21b402e3b9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void beginDefinitionList(Map<String, String> parameters)
{
getXHTMLWikiPrinter().printXMLStartElement("dl", parameters);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: beginDefinitionList
File: xwiki-rendering-syntaxes/xwiki-rendering-syntax-xhtml/src/main/java/org/xwiki/rendering/internal/renderer/xhtml/XHTMLChainingRenderer.java
Repository: xwiki/xwiki-rendering
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-32070
|
MEDIUM
| 6.1
|
xwiki/xwiki-rendering
|
beginDefinitionList
|
xwiki-rendering-syntaxes/xwiki-rendering-syntax-xhtml/src/main/java/org/xwiki/rendering/internal/renderer/xhtml/XHTMLChainingRenderer.java
|
c40e2f5f9482ec6c3e71dbf1fff5ba8a5e44cdc1
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Pair<String, String> getAppProfileStatsForDebugging(long time, int lines) {
return mAppProfiler.getAppProfileStatsForDebugging(time, lines);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAppProfileStatsForDebugging
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21292
|
MEDIUM
| 5.5
|
android
|
getAppProfileStatsForDebugging
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isIncognito() {
return mIncognito;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isIncognito
File: chrome/android/java/src/org/chromium/chrome/browser/Tab.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
isIncognito
|
chrome/android/java/src/org/chromium/chrome/browser/Tab.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getPathInfo(HttpServletRequest request) {
String pathInfo = request.getRequestURI().substring(request.getContextPath().length());
return StringUtils.stripStart(pathInfo, "/");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPathInfo
File: server-core/src/main/java/io/onedev/server/git/GitFilter.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2022-39205
|
CRITICAL
| 9.8
|
theonedev/onedev
|
getPathInfo
|
server-core/src/main/java/io/onedev/server/git/GitFilter.java
|
f1e97688e4e19d6de1dfa1d00e04655209d39f8e
| 0
|
Analyze the following code function for security vulnerabilities
|
private void pushExtrasUpdate() {
Bundle extras;
synchronized (mLock) {
if (mDestroyed) {
return;
}
extras = mExtras;
}
Collection<ISessionControllerCallbackHolder> deadCallbackHolders = null;
for (ISessionControllerCallbackHolder holder : mControllerCallbackHolders) {
try {
holder.mCallback.onExtrasChanged(extras);
} catch (DeadObjectException e) {
if (deadCallbackHolders == null) {
deadCallbackHolders = new ArrayList<>();
}
deadCallbackHolders.add(holder);
logCallbackException("Removing dead callback in pushExtrasUpdate", holder, e);
} catch (RemoteException e) {
logCallbackException("unexpected exception in pushExtrasUpdate", holder, e);
}
}
if (deadCallbackHolders != null) {
mControllerCallbackHolders.removeAll(deadCallbackHolders);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: pushExtrasUpdate
File: services/core/java/com/android/server/media/MediaSessionRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-21280
|
MEDIUM
| 5.5
|
android
|
pushExtrasUpdate
|
services/core/java/com/android/server/media/MediaSessionRecord.java
|
06e772e05514af4aa427641784c5eec39a892ed3
| 0
|
Analyze the following code function for security vulnerabilities
|
public Record checkout(Record record, Cell[] row) {
for (Map.Entry<Field, Integer> e : this.fieldsMapping.entrySet()) {
int cellIndex = e.getValue();
if (cellIndex >= row.length) continue;
Cell cellValue = row[cellIndex];
if (cellValue == Cell.NULL || cellValue.isEmpty()) {
continue;
}
Field field = e.getKey();
Object value = checkoutFieldValue(field, cellValue, true);
if (value != null) {
if (field.getName().equalsIgnoreCase(EntityHelper.OwningUser)) {
User owning = Application.getUserStore().getUser((ID) value);
if (owning.getOwningDept() == null) {
putTraceLog(cellValue, Language.L(EasyMetaFactory.getDisplayType(field)));
} else {
// 用户部门联动
record.setObjectValue(field.getName(), value);
record.setID(EntityHelper.OwningDept, (ID) owning.getOwningDept().getIdentity());
}
} else {
record.setObjectValue(field.getName(), value);
}
} else {
putTraceLog(cellValue, Language.L(EasyMetaFactory.getDisplayType(field)));
}
}
return record;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkout
File: src/main/java/com/rebuild/core/service/dataimport/RecordCheckout.java
Repository: getrebuild/rebuild
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2023-1495
|
MEDIUM
| 6.5
|
getrebuild/rebuild
|
checkout
|
src/main/java/com/rebuild/core/service/dataimport/RecordCheckout.java
|
c9474f84e5f376dd2ade2078e3039961a9425da7
| 0
|
Analyze the following code function for security vulnerabilities
|
void setPort(int port) {
this.port = port;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setPort
File: h2/src/main/org/h2/server/web/WebServer.java
Repository: h2database
The code follows secure coding practices.
|
[
"CWE-312"
] |
CVE-2022-45868
|
HIGH
| 7.8
|
h2database
|
setPort
|
h2/src/main/org/h2/server/web/WebServer.java
|
23ee3d0b973923c135fa01356c8eaed40b895393
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setParamTitle(String value) {
m_paramTitle = value;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setParamTitle
File: src/org/opencms/workplace/CmsDialog.java
Repository: alkacon/opencms-core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2013-4600
|
MEDIUM
| 4.3
|
alkacon/opencms-core
|
setParamTitle
|
src/org/opencms/workplace/CmsDialog.java
|
72a05e3ea1cf692e2efce002687272e63f98c14a
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setOauthScope(String scope) {
for (Authentication auth : authentications.values()) {
if (auth instanceof OAuth) {
((OAuth) auth).setScope(scope);
return this;
}
}
throw new RuntimeException("No OAuth2 authentication configured!");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setOauthScope
File: samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
setOauthScope
|
samples/client/petstore/java/okhttp-gson-parcelableModel/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
public ConverterLookup getConverterLookup() {
return converterLookup;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getConverterLookup
File: xstream/src/java/com/thoughtworks/xstream/XStream.java
Repository: x-stream/xstream
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-43859
|
MEDIUM
| 5
|
x-stream/xstream
|
getConverterLookup
|
xstream/src/java/com/thoughtworks/xstream/XStream.java
|
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
| 0
|
Analyze the following code function for security vulnerabilities
|
public IBinder newUriPermissionOwner(String name) throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: newUriPermissionOwner
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
newUriPermissionOwner
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean shouldIncludeState(List<String> states, String type) {
boolean r = false;
if (!states.isEmpty()) {
if (states.contains("any")) {
r = true;
} else {
if (type.equals(Recording.STATE_PUBLISHED) && states.contains(Recording.STATE_PUBLISHED)) {
r = true;
} else if (type.equals(Recording.STATE_UNPUBLISHED) && states.contains(Recording.STATE_UNPUBLISHED)) {
r = true;
} else if (type.equals(Recording.STATE_DELETED) && states.contains(Recording.STATE_DELETED)) {
r = true;
} else if (type.equals(Recording.STATE_PROCESSING) && states.contains(Recording.STATE_PROCESSING)) {
r = true;
} else if (type.equals(Recording.STATE_PROCESSED) && states.contains(Recording.STATE_PROCESSED)) {
r = true;
}
}
} else {
if (type.equals(Recording.STATE_PUBLISHED) || type.equals(Recording.STATE_UNPUBLISHED)) {
r = true;
}
}
return r;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: shouldIncludeState
File: bbb-common-web/src/main/java/org/bigbluebutton/api/RecordingService.java
Repository: bigbluebutton
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-12443
|
HIGH
| 7.5
|
bigbluebutton
|
shouldIncludeState
|
bbb-common-web/src/main/java/org/bigbluebutton/api/RecordingService.java
|
b21ca8355a57286a1e6df96984b3a4c57679a463
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getMaxTotalConnections() {
return maxTotalConnections;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMaxTotalConnections
File: api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java
Repository: AsyncHttpClient/async-http-client
The code follows secure coding practices.
|
[
"CWE-345"
] |
CVE-2013-7397
|
MEDIUM
| 4.3
|
AsyncHttpClient/async-http-client
|
getMaxTotalConnections
|
api/src/main/java/org/asynchttpclient/AsyncHttpClientConfig.java
|
df6ed70e86c8fc340ed75563e016c8baa94d7e72
| 0
|
Analyze the following code function for security vulnerabilities
|
public String createContact(String firstName, String surname, String officePhone, String homePhone, String cellPhone, String email) {
if(!checkForPermission(Manifest.permission.WRITE_CONTACTS, "This is required to create a contact")){
return null;
}
return AndroidContactsManager.getInstance().createContact(getContext(), firstName, surname, officePhone, homePhone, cellPhone, email);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createContact
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
|
createContact
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
public @PrivateDnsModeErrorCodes int setGlobalPrivateDnsModeOpportunistic(
@NonNull ComponentName admin) {
throwIfParentInstance("setGlobalPrivateDnsModeOpportunistic");
if (mService == null) {
return PRIVATE_DNS_SET_ERROR_FAILURE_SETTING;
}
try {
return mService.setGlobalPrivateDns(admin, PRIVATE_DNS_MODE_OPPORTUNISTIC, null);
} catch (RemoteException re) {
throw re.rethrowFromSystemServer();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setGlobalPrivateDnsModeOpportunistic
File: core/java/android/app/admin/DevicePolicyManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
setGlobalPrivateDnsModeOpportunistic
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@NonNull
List<ResolveInfo> queryActivities(@NonNull Intent intent, int userId,
boolean exportedOnly) {
final List<ResolveInfo> resolved;
final long token = injectClearCallingIdentity();
try {
resolved = mContext.getPackageManager().queryIntentActivitiesAsUser(intent,
PACKAGE_MATCH_FLAGS | PackageManager.MATCH_DISABLED_COMPONENTS, userId);
} finally {
injectRestoreCallingIdentity(token);
}
if (resolved == null || resolved.size() == 0) {
return EMPTY_RESOLVE_INFO;
}
// Make sure the package is installed.
resolved.removeIf(ACTIVITY_NOT_INSTALLED);
resolved.removeIf((ri) -> {
final ActivityInfo ai = ri.activityInfo;
return !isSystem(ai) && !isEnabled(ai, userId);
});
if (exportedOnly) {
resolved.removeIf(ACTIVITY_NOT_EXPORTED);
}
return resolved;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: queryActivities
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
|
queryActivities
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isAttributeAllowed(String attributeName)
{
boolean result = this.extraAllowedAttributes.contains(attributeName);
result = result || this.htmlDefinitions.isAllowedAttribute(attributeName);
result = result || this.svgDefinitions.isAllowedAttribute(attributeName);
result = result || this.mathMLDefinitions.isAllowedAttribute(attributeName);
result = result || this.xmlAttributes.contains(attributeName);
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isAttributeAllowed
File: xwiki-commons-core/xwiki-commons-xml/src/main/java/org/xwiki/xml/internal/html/SecureHTMLElementSanitizer.java
Repository: xwiki/xwiki-commons
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-31126
|
CRITICAL
| 9.6
|
xwiki/xwiki-commons
|
isAttributeAllowed
|
xwiki-commons-core/xwiki-commons-xml/src/main/java/org/xwiki/xml/internal/html/SecureHTMLElementSanitizer.java
|
0b8e9c45b7e7457043938f35265b2aa5adc76a68
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getURL(String action)
{
return this.doc.getURL(action, getXWikiContext());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getURL
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
|
getURL
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
|
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String fixUTF8(String input) {
if (input != null) {
return input.replace('\u0000', '\u0020');
} else {
return null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fixUTF8
File: src/main/java/com/openkm/util/FormatUtil.java
Repository: openkm/document-management-system
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-40317
|
MEDIUM
| 5.4
|
openkm/document-management-system
|
fixUTF8
|
src/main/java/com/openkm/util/FormatUtil.java
|
870d518f7de349c3fa4c7b9883789fdca4590c4e
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isInputRestricted() {
return mShowing || mNeedToReshowWhenReenabled;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isInputRestricted
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
|
isInputRestricted
|
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
|
d18d8b350756b0e89e051736c1f28744ed31e93a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void getMemoryInfo(ActivityManager.MemoryInfo outInfo) {
final long homeAppMem = mProcessList.getMemLevel(ProcessList.HOME_APP_ADJ);
final long cachedAppMem = mProcessList.getMemLevel(ProcessList.CACHED_APP_MIN_ADJ);
outInfo.availMem = Process.getFreeMemory();
outInfo.totalMem = Process.getTotalMemory();
outInfo.threshold = homeAppMem;
outInfo.lowMemory = outInfo.availMem < (homeAppMem + ((cachedAppMem-homeAppMem)/2));
outInfo.hiddenAppThreshold = cachedAppMem;
outInfo.secondaryServerThreshold = mProcessList.getMemLevel(
ProcessList.SERVICE_ADJ);
outInfo.visibleAppThreshold = mProcessList.getMemLevel(
ProcessList.VISIBLE_APP_ADJ);
outInfo.foregroundAppThreshold = mProcessList.getMemLevel(
ProcessList.FOREGROUND_APP_ADJ);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMemoryInfo
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-3833
|
MEDIUM
| 4.3
|
android
|
getMemoryInfo
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean isAuthNAssertion(Assertion assertion) {
if (assertion == null) {
return false;
}
if ((!assertion.isTimeValid()) || (!assertion.isSignatureValid())) {
return false;
}
Set statements = assertion.getStatement();
Statement statement = null;
Iterator iterator = statements.iterator();
while (iterator.hasNext()) {
statement = (Statement) iterator.next();
if (statement.getStatementType() ==
Statement.AUTHENTICATION_STATEMENT) {
return true;
}
} // loop through statements
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isAuthNAssertion
File: openam-federation/openam-federation-library/src/main/java/com/sun/identity/saml/common/SAMLUtils.java
Repository: OpenIdentityPlatform/OpenAM
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2023-37471
|
CRITICAL
| 9.8
|
OpenIdentityPlatform/OpenAM
|
isAuthNAssertion
|
openam-federation/openam-federation-library/src/main/java/com/sun/identity/saml/common/SAMLUtils.java
|
7c18543d126e8a567b83bb4535631825aaa9d742
| 0
|
Analyze the following code function for security vulnerabilities
|
private native void nativeSendOrientationChangeEvent(
long nativeContentViewCoreImpl, int orientation);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nativeSendOrientationChangeEvent
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
|
nativeSendOrientationChangeEvent
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getRequestAbsoluteUri() {
return request.absoluteURI();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRequestAbsoluteUri
File: independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/VertxResteasyReactiveRequestContext.java
Repository: quarkusio/quarkus
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-0981
|
MEDIUM
| 6.5
|
quarkusio/quarkus
|
getRequestAbsoluteUri
|
independent-projects/resteasy-reactive/server/vertx/src/main/java/org/jboss/resteasy/reactive/server/vertx/VertxResteasyReactiveRequestContext.java
|
96c64fd8f09c02a497e2db366c64dd9196582442
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setReadTimeout(int readTimeout) {
this.readTimeout = readTimeout;
httpClient.property(ClientProperties.READ_TIMEOUT, readTimeout);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setReadTimeout
File: samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
Repository: OpenAPITools/openapi-generator
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2021-21430
|
LOW
| 2.1
|
OpenAPITools/openapi-generator
|
setReadTimeout
|
samples/client/petstore/java/jersey2-java8/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.