instruction
string | input
string | output
string | cwe_ids
list | cve_id
string | severity
string | cvss_score
float64 | repo_name
string | func_name
string | file_path
string | commit_hash
string | is_vulnerable
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Analyze the following code function for security vulnerabilities
|
public DescribableList<NodeProperty<?>, NodePropertyDescriptor> getNodeProperties() {
return nodeProperties;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNodeProperties
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
|
getNodeProperties
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
public AssetHandler maxAge(final String maxAge) {
Try.apply(() -> Long.parseLong(maxAge))
.recover(x -> ConfigFactory.empty()
.withValue("v", ConfigValueFactory.fromAnyRef(maxAge))
.getDuration("v")
.getSeconds())
.onSuccess(this::maxAge);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: maxAge
File: jooby/src/main/java/org/jooby/handlers/AssetHandler.java
Repository: jooby-project/jooby
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-7647
|
MEDIUM
| 5
|
jooby-project/jooby
|
maxAge
|
jooby/src/main/java/org/jooby/handlers/AssetHandler.java
|
34f526028e6cd0652125baa33936ffb6a8a4a009
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onPropertiesChanged(DeviceConfig.Properties properties) {
synchronized (mLock) {
mEnforceBroadcastReceiverRestrictions = properties.getBoolean(
ENFORCE_BROADCAST_RECEIVER_RESTRICTIONS, false);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onPropertiesChanged
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
|
onPropertiesChanged
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public ProfileOutput getOutput(String name) {
return getOutputByName(name);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getOutput
File: base/common/src/main/java/com/netscape/certsrv/cert/CertEnrollmentRequest.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
getOutput
|
base/common/src/main/java/com/netscape/certsrv/cert/CertEnrollmentRequest.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getStartX() {
return mStartX;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStartX
File: core/java/android/app/ActivityOptions.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-20918
|
CRITICAL
| 9.8
|
android
|
getStartX
|
core/java/android/app/ActivityOptions.java
|
51051de4eb40bb502db448084a83fd6cbfb7d3cf
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String getFullServiceURL(String shortUrl) {
String result = null;
try {
URL u = new URL(shortUrl);
URL weburl = SystemConfigurationUtil.getServiceURL(
SAMLConstants.SAML_AM_NAMING, u.getProtocol(), u.getHost(),
u.getPort(), u.getPath());
result = weburl.toString();
if (SAMLUtils.debug.messageEnabled()) {
SAMLUtils.debug.message("SAMLUtils.getFullServiceURL:" +
"full remote URL is: " + result);
}
} catch (Exception e) {
if (SAMLUtils.debug.warningEnabled()) {
SAMLUtils.debug.warning("SAMLUtils.getFullServiceURL:" +
"Exception:", e);
}
}
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFullServiceURL
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
|
getFullServiceURL
|
openam-federation/openam-federation-library/src/main/java/com/sun/identity/saml/common/SAMLUtils.java
|
7c18543d126e8a567b83bb4535631825aaa9d742
| 0
|
Analyze the following code function for security vulnerabilities
|
public static List<Triple<String, Element, String>> getTagElementTriplesFromFileNumBoundedSAXException(
File f, String tag, int numIncludedSiblings) throws SAXException {
List<Triple<String, Element, String>> sents = Generics.newArrayList();
try {
DocumentBuilderFactory dbf = safeDocumentBuilderFactory();
DocumentBuilder db = dbf.newDocumentBuilder();
Document doc = db.parse(f);
doc.getDocumentElement().normalize();
NodeList nodeList=doc.getElementsByTagName(tag);
for (int i = 0; i < nodeList.getLength(); i++) {
// Get element
Node prevNode = nodeList.item(i).getPreviousSibling();
String prev = "";
int count = 0;
while (prevNode != null && count <= numIncludedSiblings) {
prev = prevNode.getTextContent() + prev;
prevNode = prevNode.getPreviousSibling();
count++;
}
Node nextNode = nodeList.item(i).getNextSibling();
String next = "";
count = 0;
while (nextNode != null && count <= numIncludedSiblings) {
next = next + nextNode.getTextContent();
nextNode = nextNode.getNextSibling();
count++;
}
Element element = (Element)nodeList.item(i);
Triple<String, Element, String> t = new Triple<>(prev, element, next);
sents.add(t);
}
} catch (IOException | ParserConfigurationException e) {
log.warn(e);
}
return sents;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTagElementTriplesFromFileNumBoundedSAXException
File: src/edu/stanford/nlp/util/XMLUtils.java
Repository: stanfordnlp/CoreNLP
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-0239
|
HIGH
| 7.5
|
stanfordnlp/CoreNLP
|
getTagElementTriplesFromFileNumBoundedSAXException
|
src/edu/stanford/nlp/util/XMLUtils.java
|
1940ffb938dc4f3f5bc5f2a2fd8b35aabbbae3dd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated // Only actually passes the first stage. Use newPipelineWithAllStagesPassed instead
public Pipeline passPipeline(Pipeline pipeline) {
for (Stage stage : pipeline.getStages()) {
passStage(stage);
}
Stages loadedStages = new Stages();
for (Stage stage : pipeline.getStages()) {
loadedStages.add(stageDao.stageById(stage.getId()));
}
Pipeline loadedPipeline = this.pipelineDao.loadPipeline(pipeline.getId());
loadedPipeline.setStages(loadedStages);
return loadedPipeline;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: passPipeline
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
|
passPipeline
|
server/src/test-shared/java/com/thoughtworks/go/server/dao/DatabaseAccessHelper.java
|
236d4baf92e6607f2841c151c855adcc477238b8
| 0
|
Analyze the following code function for security vulnerabilities
|
public static Path getDataFolder(String pi, String dataFolderName) throws PresentationException, IndexUnreachableException {
if (pi == null) {
throw new IllegalArgumentException("pi may not be null");
}
String dataRepository = DataManager.getInstance().getSearchIndex().findDataRepositoryName(pi);
return getDataFolder(pi, dataFolderName, dataRepository);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDataFolder
File: goobi-viewer-core/src/main/java/io/goobi/viewer/controller/DataFileTools.java
Repository: intranda/goobi-viewer-core
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-15124
|
MEDIUM
| 4
|
intranda/goobi-viewer-core
|
getDataFolder
|
goobi-viewer-core/src/main/java/io/goobi/viewer/controller/DataFileTools.java
|
44ceb8e2e7e888391e8a941127171d6366770df3
| 0
|
Analyze the following code function for security vulnerabilities
|
native boolean getRemoteServicesNative(byte[] address);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRemoteServicesNative
File: src/com/android/bluetooth/btservice/AdapterService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-362",
"CWE-20"
] |
CVE-2016-3760
|
MEDIUM
| 5.4
|
android
|
getRemoteServicesNative
|
src/com/android/bluetooth/btservice/AdapterService.java
|
122feb9a0b04290f55183ff2f0384c6c53756bd8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void notifyAppTransitionCancelled() {
synchronized (ActivityManagerService.this) {
mStackSupervisor.notifyAppTransitionDone();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: notifyAppTransitionCancelled
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2018-9492
|
HIGH
| 7.2
|
android
|
notifyAppTransitionCancelled
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setMacAlgorithm(String macAlgorithm) {
this.macAlgorithm = macAlgorithm;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setMacAlgorithm
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
|
setMacAlgorithm
|
ratpack-session/src/main/java/ratpack/session/clientside/ClientSideSessionConfig.java
|
60302fae7ef26897b9a0ec0def6281a9425344cf
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setIssuerDN(String issuerDN) {
this.issuerDN = issuerDN;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setIssuerDN
File: base/common/src/main/java/com/netscape/certsrv/cert/CertData.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
setIssuerDN
|
base/common/src/main/java/com/netscape/certsrv/cert/CertData.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public ServerBuilder https(int port) {
return port(new ServerPort(port, HTTPS));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: https
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
|
https
|
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
|
df7f85824a62e997b910b5d6194a3335841065fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setSpec(XGBoostJobSpec spec) {
this.spec = spec;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSpec
File: submarine-server/server-submitter/submitter-k8s/src/main/java/org/apache/submarine/server/submitter/k8s/model/xgboostjob/XGBoostJob.java
Repository: apache/submarine
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2023-46302
|
CRITICAL
| 9.8
|
apache/submarine
|
setSpec
|
submarine-server/server-submitter/submitter-k8s/src/main/java/org/apache/submarine/server/submitter/k8s/model/xgboostjob/XGBoostJob.java
|
ed5ad3b824ba388259e0d1ea137d7fca5f0c288e
| 0
|
Analyze the following code function for security vulnerabilities
|
private void requireFileExistence(File jar) {
if (!Objects.requireNonNull(jar).isFile()) {
throw new IllegalArgumentException(
String.format("Expect '%s' to be an existing file", jar));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: requireFileExistence
File: flow-server/src/main/java/com/vaadin/flow/server/frontend/JarContentsManager.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-379"
] |
CVE-2021-31411
|
MEDIUM
| 4.6
|
vaadin/flow
|
requireFileExistence
|
flow-server/src/main/java/com/vaadin/flow/server/frontend/JarContentsManager.java
|
82cea56045b8430f7a26f037c01486b1feffa51d
| 0
|
Analyze the following code function for security vulnerabilities
|
public void clear() {
mUidMap.clear();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: clear
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
|
clear
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
public static boolean deleteDirAndContents(File dir)
{
if (dir.isDirectory())
{
String[] children = dir.list();
for (int i = 0; i < children.length; i++)
{
boolean success = deleteDirAndContents(new File(dir, children[i]));
if (!success)
return false;
}
}
return dir.delete();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: deleteDirAndContents
File: src/main/java/bspkrs/mmv/RemoteZipHandler.java
Repository: bspkrs/MCPMappingViewer
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-4494
|
CRITICAL
| 9.8
|
bspkrs/MCPMappingViewer
|
deleteDirAndContents
|
src/main/java/bspkrs/mmv/RemoteZipHandler.java
|
6e602746c96b4756c271d080dae7d22ad804a1bd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String toString() {
return "ActivityOptions(" + hashCode() + "), mPackageName=" + mPackageName
+ ", mAnimationType=" + mAnimationType + ", mStartX=" + mStartX + ", mStartY="
+ mStartY + ", mWidth=" + mWidth + ", mHeight=" + mHeight;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toString
File: core/java/android/app/ActivityOptions.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-20918
|
CRITICAL
| 9.8
|
android
|
toString
|
core/java/android/app/ActivityOptions.java
|
51051de4eb40bb502db448084a83fd6cbfb7d3cf
| 0
|
Analyze the following code function for security vulnerabilities
|
void onUserInitialized(UserState uss, boolean foreground, int oldUserId, int newUserId) {
synchronized (this) {
if (foreground) {
moveUserToForeground(uss, oldUserId, newUserId);
}
}
completeSwitchAndInitialize(uss, newUserId, true, false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onUserInitialized
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
|
onUserInitialized
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
9878bb99b77c3681f0fda116e2964bac26f349c3
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String vsm(String materialFingerprint, String revision) {
return StrSubstitutor.replace("/materials/value_stream_map/${material_fingerprint}/${revision}", of(
"material_fingerprint", materialFingerprint,
"revision", revision));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: vsm
File: spark/spark-base/src/main/java/com/thoughtworks/go/spark/Routes.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-697"
] |
CVE-2022-39308
|
MEDIUM
| 5.9
|
gocd
|
vsm
|
spark/spark-base/src/main/java/com/thoughtworks/go/spark/Routes.java
|
236d4baf92e6607f2841c151c855adcc477238b8
| 0
|
Analyze the following code function for security vulnerabilities
|
private void readConfigurationDependentBehaviors() {
mLongPressOnHomeBehavior = mContext.getResources().getInteger(
com.android.internal.R.integer.config_longPressOnHomeBehavior);
if (mLongPressOnHomeBehavior < LONG_PRESS_HOME_NOTHING ||
mLongPressOnHomeBehavior > LONG_PRESS_HOME_ASSIST) {
mLongPressOnHomeBehavior = LONG_PRESS_HOME_NOTHING;
}
mDoubleTapOnHomeBehavior = mContext.getResources().getInteger(
com.android.internal.R.integer.config_doubleTapOnHomeBehavior);
if (mDoubleTapOnHomeBehavior < DOUBLE_TAP_HOME_NOTHING ||
mDoubleTapOnHomeBehavior > DOUBLE_TAP_HOME_RECENT_SYSTEM_UI) {
mDoubleTapOnHomeBehavior = LONG_PRESS_HOME_NOTHING;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readConfigurationDependentBehaviors
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
|
readConfigurationDependentBehaviors
|
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
|
84669ca8de55d38073a0dcb01074233b0a417541
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onGuildMemberRemove(@NotNull GuildMemberRemoveEvent event) {
super.onGuildMemberRemove(event);
SQLResponse sqlResponse = Main.getInstance().getSqlConnector().getSqlWorker().getEntity(ChannelStats.class, "SELECT * FROM ChannelStats WHERE GID=?", event.getGuild().getId());
if (sqlResponse.isSuccess()) {
ChannelStats channelStats = (ChannelStats) sqlResponse.getEntity();
if (channelStats.getMemberStatsChannelId() != null) {
GuildChannel guildChannel = event.getGuild().getGuildChannelById(channelStats.getMemberStatsChannelId());
if (guildChannel != null) {
guildChannel.getManager().setName("Overall Members: " + event.getGuild().getMemberCount()).queue();
}
}
event.getGuild().loadMembers().onSuccess(members -> {
if (channelStats.getRealMemberStatsChannelId() != null) {
GuildChannel guildChannel = event.getGuild().getGuildChannelById(channelStats.getRealMemberStatsChannelId());
if (guildChannel != null) {
guildChannel.getManager().setName("Real Members: " + members.stream().filter(member -> !member.getUser().isBot()).count()).queue();
}
}
if (channelStats.getBotMemberStatsChannelId() != null) {
GuildChannel guildChannel = event.getGuild().getGuildChannelById(channelStats.getBotMemberStatsChannelId());
if (guildChannel != null) {
guildChannel.getManager().setName("Bot Members: " + members.stream().filter(member -> member.getUser().isBot()).count()).queue();
}
}
});
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onGuildMemberRemove
File: src/main/java/de/presti/ree6/events/OtherEvents.java
Repository: Ree6-Applications/Ree6
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-39302
|
MEDIUM
| 5.4
|
Ree6-Applications/Ree6
|
onGuildMemberRemove
|
src/main/java/de/presti/ree6/events/OtherEvents.java
|
459b5bc24f0ea27e50031f563373926e94b9aa0a
| 0
|
Analyze the following code function for security vulnerabilities
|
public static int getTotals(Structure structure,String typeField)
{
List fields = structure.getFields();
int total = 0;
for(int i = 0; i < fields.size();i++)
{
Field field = (Field) fields.get(i);
if(field.getFieldType().equals(typeField))
{
total++;
}
}
return total;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTotals
File: src/com/dotmarketing/portlets/structure/factories/StructureFactory.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2016-2355
|
HIGH
| 7.5
|
dotCMS/core
|
getTotals
|
src/com/dotmarketing/portlets/structure/factories/StructureFactory.java
|
897f3632d7e471b7a73aabed5b19f6f53d4e5562
| 0
|
Analyze the following code function for security vulnerabilities
|
public Intent getResultData() { return mResultData; }
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getResultData
File: core/java/android/app/ActivityOptions.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-20918
|
CRITICAL
| 9.8
|
android
|
getResultData
|
core/java/android/app/ActivityOptions.java
|
51051de4eb40bb502db448084a83fd6cbfb7d3cf
| 0
|
Analyze the following code function for security vulnerabilities
|
public void broadcastAuxiliarySupplicantEvent(String iface, @SupplicantEventCode int eventCode,
MacAddress bssid, String reasonString) {
sendMessage(iface, AUXILIARY_SUPPLICANT_EVENT, 0, 0,
new SupplicantEventInfo(eventCode, bssid, reasonString));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: broadcastAuxiliarySupplicantEvent
File: service/java/com/android/server/wifi/WifiMonitor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
broadcastAuxiliarySupplicantEvent
|
service/java/com/android/server/wifi/WifiMonitor.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void resetTimeouts() throws RemoteException {
NfcPermissions.enforceUserPermissions(mContext);
mDeviceHost.resetTimeouts();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: resetTimeouts
File: src/com/android/nfc/NfcService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3761
|
LOW
| 2.1
|
android
|
resetTimeouts
|
src/com/android/nfc/NfcService.java
|
9ea802b5456a36f1115549b645b65c791eff3c2c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<Block> execute(LiveDataMacroParameters parameters, String content, MacroTransformationContext context)
throws MacroExecutionException
{
// Load the JavaScript code of the Live Data widget.
Map<String, Object> skinExtensionParameters = Collections.singletonMap("forceSkinAction", Boolean.TRUE);
this.jsfx.use("uicomponents/widgets/liveData.js", skinExtensionParameters);
GroupBlock output = new GroupBlock();
output.setParameter("class", "liveData loading");
if (parameters.getId() != null) {
output.setParameter("id", parameters.getId());
}
try {
// Compute the live data configuration based on the macro parameters.
LiveDataConfiguration liveDataConfig = getLiveDataConfiguration(content, parameters);
// Add the default values.
liveDataConfig = this.defaultLiveDataConfigResolver.resolve(liveDataConfig);
// Serialize as JSON.
ObjectMapper objectMapper = new ObjectMapper();
output.setParameter("data-config", objectMapper.writeValueAsString(liveDataConfig));
} catch (Exception e) {
throw new MacroExecutionException("Failed to generate live data configuration from macro parameters.", e);
}
return Collections.singletonList(output);
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2023-26480
- Severity: MEDIUM
- CVSS Score: 5.4
Description: XWIKI-20143: Improved Live Data escaping
Function: execute
File: xwiki-platform-core/xwiki-platform-livedata/xwiki-platform-livedata-macro/src/main/java/org/xwiki/livedata/internal/macro/LiveDataMacro.java
Repository: xwiki/xwiki-platform
Fixed Code:
@Override
public List<Block> execute(LiveDataMacroParameters parameters, String content, MacroTransformationContext context)
throws MacroExecutionException
{
// Load the JavaScript code of the Live Data widget.
Map<String, Object> skinExtensionParameters = singletonMap("forceSkinAction", Boolean.TRUE);
this.jsfx.use("uicomponents/widgets/liveData.js", skinExtensionParameters);
GroupBlock output = new GroupBlock();
output.setParameter("class", "liveData loading");
if (parameters.getId() != null) {
output.setParameter("id", parameters.getId());
}
try {
// Compute the live data configuration based on the macro parameters.
LiveDataConfiguration liveDataConfig = this.liveDataMacroConfiguration.getLiveDataConfiguration(content,
parameters);
// Add the default values.
liveDataConfig = this.defaultLiveDataConfigResolver.resolve(liveDataConfig);
// Serialize as JSON.
ObjectMapper objectMapper = new ObjectMapper();
output.setParameter("data-config", objectMapper.writeValueAsString(liveDataConfig));
// The content is trusted if the author has script right, or if no advanced configuration is used (i.e.,
// no macro content), and we are running in a trusted context.
boolean trustedContent =
StringUtils.isBlank(content) || (this.liveDataMacroRights.authorHasScriptRight()
&& !context.getTransformationContext().isRestricted());
output.setParameter("data-config-content-trusted", Boolean.toString(trustedContent));
} catch (Exception e) {
throw new MacroExecutionException("Failed to generate live data configuration from macro parameters.", e);
}
return singletonList(output);
}
|
[
"CWE-79"
] |
CVE-2023-26480
|
MEDIUM
| 5.4
|
xwiki/xwiki-platform
|
execute
|
xwiki-platform-core/xwiki-platform-livedata/xwiki-platform-livedata-macro/src/main/java/org/xwiki/livedata/internal/macro/LiveDataMacro.java
|
556e7823260b826f344c1a6e95d935774587e028
| 1
|
Analyze the following code function for security vulnerabilities
|
static Html4SaxParserContext
newInstance(final Ruby runtime, final RubyClass klazz)
{
Html4SaxParserContext instance = new Html4SaxParserContext(runtime, klazz);
instance.initialize(runtime);
return instance;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: newInstance
File: ext/java/nokogiri/Html4SaxParserContext.java
Repository: sparklemotion/nokogiri
The code follows secure coding practices.
|
[
"CWE-241"
] |
CVE-2022-29181
|
MEDIUM
| 6.4
|
sparklemotion/nokogiri
|
newInstance
|
ext/java/nokogiri/Html4SaxParserContext.java
|
db05ba9a1bd4b90aa6c76742cf6102a7c7297267
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Properties getProperties() {
return properties;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProperties
File: services/src/main/java/org/keycloak/theme/ClassLoaderTheme.java
Repository: keycloak
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-3856
|
MEDIUM
| 4.3
|
keycloak
|
getProperties
|
services/src/main/java/org/keycloak/theme/ClassLoaderTheme.java
|
73f0474008e1bebd0733e62a22aceda9e5de6743
| 0
|
Analyze the following code function for security vulnerabilities
|
void tempWhitelistAppForPowerSave(int callerPid, int callerUid, int targetUid, long duration) {
if (DEBUG_WHITELISTS) {
Slog.d(TAG, "tempWhitelistAppForPowerSave(" + callerPid + ", " + callerUid + ", "
+ targetUid + ", " + duration + ")");
}
synchronized (mPidsSelfLocked) {
final ProcessRecord pr = mPidsSelfLocked.get(callerPid);
if (pr == null) {
Slog.w(TAG, "tempWhitelistAppForPowerSave() no ProcessRecord for pid " + callerPid);
return;
}
if (!pr.whitelistManager) {
if (DEBUG_WHITELISTS) {
Slog.d(TAG, "tempWhitelistAppForPowerSave() for target " + targetUid + ": pid "
+ callerPid + " is not allowed");
}
return;
}
}
final long token = Binder.clearCallingIdentity();
try {
mLocalDeviceIdleController.addPowerSaveTempWhitelistAppDirect(targetUid, duration,
true, "pe from uid:" + callerUid);
} finally {
Binder.restoreCallingIdentity(token);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: tempWhitelistAppForPowerSave
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3912
|
HIGH
| 9.3
|
android
|
tempWhitelistAppForPowerSave
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
6c049120c2d749f0c0289d822ec7d0aa692f55c5
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean containsLong(K name, long value) {
return contains(name, fromLong(name, value));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: containsLong
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
|
containsLong
|
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
|
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
| 0
|
Analyze the following code function for security vulnerabilities
|
private void outputChars() throws SAXException {
final char[] ch = content.toString().toCharArray();
super.characters(ch, 0, ch.length);
content.setLength(0);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: outputChars
File: stroom-pipeline/src/test/java/stroom/util/UniqueXMLEvents.java
Repository: gchq/stroom
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000651
|
HIGH
| 7.5
|
gchq/stroom
|
outputChars
|
stroom-pipeline/src/test/java/stroom/util/UniqueXMLEvents.java
|
ba30ffd415bd7d32ee40ba4b04035267ce80b499
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setConfigurationsPriorToIpClientProvisioning(WifiConfiguration config) {
mIpClient.setHttpProxy(config.getHttpProxy());
if (!TextUtils.isEmpty(mContext.getResources().getString(
R.string.config_wifi_tcp_buffers))) {
mIpClient.setTcpBufferSizes(mContext.getResources().getString(
R.string.config_wifi_tcp_buffers));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setConfigurationsPriorToIpClientProvisioning
File: service/java/com/android/server/wifi/ClientModeImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
setConfigurationsPriorToIpClientProvisioning
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
private Properties jpaProperties() {
Properties extraProperties = new Properties();
if (CommonConfig.isLocalTestMode()) {
extraProperties.put("hibernate.dialect", DerbyTenSevenHapiFhirDialect.class.getName());
} else {
extraProperties.put("hibernate.dialect", PostgreSQL94Dialect.class.getName());
}
extraProperties.put("hibernate.format_sql", "false");
extraProperties.put("hibernate.show_sql", "false");
extraProperties.put("hibernate.hbm2ddl.auto", "update");
extraProperties.put("hibernate.jdbc.batch_size", "20");
extraProperties.put("hibernate.cache.use_query_cache", "false");
extraProperties.put("hibernate.cache.use_second_level_cache", "false");
extraProperties.put("hibernate.cache.use_structured_entries", "false");
extraProperties.put("hibernate.cache.use_minimal_puts", "false");
extraProperties.put(BackendSettings.backendKey(BackendSettings.TYPE), "lucene");
extraProperties.put(BackendSettings.backendKey(LuceneBackendSettings.ANALYSIS_CONFIGURER), HapiLuceneAnalysisConfigurer.class.getName());
extraProperties.put(BackendSettings.backendKey(LuceneIndexSettings.DIRECTORY_TYPE), "local-filesystem");
extraProperties.put(BackendSettings.backendKey(LuceneIndexSettings.DIRECTORY_ROOT), myFhirLuceneLocation);
extraProperties.put(BackendSettings.backendKey(LuceneBackendSettings.LUCENE_VERSION), "LUCENE_CURRENT");
return extraProperties;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: jpaProperties
File: hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestDstu2Config.java
Repository: hapifhir/hapi-fhir
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-32053
|
MEDIUM
| 5
|
hapifhir/hapi-fhir
|
jpaProperties
|
hapi-fhir-jpaserver-uhnfhirtest/src/main/java/ca/uhn/fhirtest/config/TestDstu2Config.java
|
a5e4f56e1c6f55093ff334cf698ffdeea2f33960
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setDisallowEnterPictureInPictureWhileLaunching(boolean disallow) {
mDisallowEnterPictureInPictureWhileLaunching = disallow;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDisallowEnterPictureInPictureWhileLaunching
File: core/java/android/app/ActivityOptions.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-20918
|
CRITICAL
| 9.8
|
android
|
setDisallowEnterPictureInPictureWhileLaunching
|
core/java/android/app/ActivityOptions.java
|
51051de4eb40bb502db448084a83fd6cbfb7d3cf
| 0
|
Analyze the following code function for security vulnerabilities
|
private @Nullable List<String> getPermittedInputMethodsUnchecked(@UserIdInt int userId) {
List<String> result = null;
if (isPolicyEngineForFinanceFlagEnabled()) {
Set<String> policy = mDevicePolicyEngine.getResolvedPolicy(
PolicyDefinition.PERMITTED_INPUT_METHODS, userId);
result = policy == null ? null : new ArrayList<>(policy);
} else {
synchronized (getLockObject()) {
// Only device or profile owners can have permitted lists set.
List<ActiveAdmin> admins =
getActiveAdminsForAffectedUserInclPermissionBasedAdminLocked(
userId);
for (ActiveAdmin admin : admins) {
List<String> fromAdmin = admin.permittedInputMethods;
if (fromAdmin != null) {
if (result == null) {
result = new ArrayList<String>(fromAdmin);
} else {
result.retainAll(fromAdmin);
}
}
}
}
}
// If we have a permitted list add all system input methods.
if (result != null) {
List<InputMethodInfo> imes = InputMethodManagerInternal
.get().getInputMethodListAsUser(userId);
if (imes != null) {
for (InputMethodInfo ime : imes) {
ServiceInfo serviceInfo = ime.getServiceInfo();
ApplicationInfo applicationInfo = serviceInfo.applicationInfo;
if ((applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0) {
result.add(serviceInfo.packageName);
}
}
}
}
return result;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPermittedInputMethodsUnchecked
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40089
|
HIGH
| 7.8
|
android
|
getPermittedInputMethodsUnchecked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public Builder withIndex(long val)
{
index = val;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: withIndex
File: core/src/main/java/org/bouncycastle/pqc/crypto/xmss/XMSSMTPrivateKeyParameters.java
Repository: bcgit/bc-java
The code follows secure coding practices.
|
[
"CWE-470"
] |
CVE-2018-1000613
|
HIGH
| 7.5
|
bcgit/bc-java
|
withIndex
|
core/src/main/java/org/bouncycastle/pqc/crypto/xmss/XMSSMTPrivateKeyParameters.java
|
4092ede58da51af9a21e4825fbad0d9a3ef5a223
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public View focusSearch(int direction) {
if (direction == View.FOCUS_BACKWARD
&& mUrlBarDelegate.getCurrentTab().getView() != null) {
return mUrlBarDelegate.getCurrentTab().getView();
} else {
return super.focusSearch(direction);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: focusSearch
File: chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-254"
] |
CVE-2016-5163
|
MEDIUM
| 4.3
|
chromium
|
focusSearch
|
chrome/android/java/src/org/chromium/chrome/browser/omnibox/UrlBar.java
|
3bd33fee094e863e5496ac24714c558bd58d28ef
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public JsonDeserializer<?> createCollectionLikeDeserializer(DeserializationContext ctxt,
CollectionLikeType type, final BeanDescription beanDesc)
throws JsonMappingException
{
JavaType contentType = type.getContentType();
// Very first thing: is deserializer hard-coded for elements?
JsonDeserializer<Object> contentDeser = contentType.getValueHandler();
final DeserializationConfig config = ctxt.getConfig();
// Then optional type info (1.5): if type has been resolved, we may already know type deserializer:
TypeDeserializer contentTypeDeser = contentType.getTypeHandler();
// but if not, may still be possible to find:
if (contentTypeDeser == null) {
contentTypeDeser = findTypeDeserializer(config, contentType);
}
JsonDeserializer<?> deser = _findCustomCollectionLikeDeserializer(type, config, beanDesc,
contentTypeDeser, contentDeser);
if (deser != null) {
// and then new with 2.2: ability to post-process it too (Issue#120)
if (_factoryConfig.hasDeserializerModifiers()) {
for (BeanDeserializerModifier mod : _factoryConfig.deserializerModifiers()) {
deser = mod.modifyCollectionLikeDeserializer(config, type, beanDesc, deser);
}
}
}
return deser;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createCollectionLikeDeserializer
File: src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2019-16942
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
createCollectionLikeDeserializer
|
src/main/java/com/fasterxml/jackson/databind/deser/BasicDeserializerFactory.java
|
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getBasePath() {
return basePath;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getBasePath
File: samples/client/petstore/java/okhttp-gson-dynamicOperations/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
|
getBasePath
|
samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getName()
{
return "xwiki-core";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getName
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
|
getName
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
static long parseLongAttribute(TypedXmlPullParser parser, String attribute, long def) {
final String value = parseStringAttribute(parser, attribute);
if (TextUtils.isEmpty(value)) {
return def;
}
try {
return Long.parseLong(value);
} catch (NumberFormatException e) {
Slog.e(TAG, "Error parsing long " + value);
return def;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseLongAttribute
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
|
parseLongAttribute
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
private void checkRestrictedClass(Object o, Object method) {
if (o instanceof Class || o instanceof ClassLoader || o instanceof Thread) {
throw new MethodNotFoundException(
"Cannot find method '" + method + "' in " + o.getClass()
);
}
}
|
Vulnerability Classification:
- CWE: CWE-863
- CVE: CVE-2020-12668
- Severity: MEDIUM
- CVSS Score: 6.8
Description: add method to blacklist
Function: checkRestrictedClass
File: src/main/java/com/hubspot/jinjava/el/ext/JinjavaBeanELResolver.java
Repository: HubSpot/jinjava
Fixed Code:
private void checkRestrictedClass(Object o, Object method) {
if (
o instanceof Class ||
o instanceof ClassLoader ||
o instanceof Thread ||
o instanceof Method
) {
throw new MethodNotFoundException(
"Cannot find method '" + method + "' in " + o.getClass()
);
}
}
|
[
"CWE-863"
] |
CVE-2020-12668
|
MEDIUM
| 6.8
|
HubSpot/jinjava
|
checkRestrictedClass
|
src/main/java/com/hubspot/jinjava/el/ext/JinjavaBeanELResolver.java
|
5dfa5b87318744a4d020b66d5f7747acc36b213b
| 1
|
Analyze the following code function for security vulnerabilities
|
public String getExecutable()
{
return executable;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getExecutable
File: src/main/java/org/codehaus/plexus/util/cli/shell/Shell.java
Repository: codehaus-plexus/plexus-utils
The code follows secure coding practices.
|
[
"CWE-78"
] |
CVE-2017-1000487
|
HIGH
| 7.5
|
codehaus-plexus/plexus-utils
|
getExecutable
|
src/main/java/org/codehaus/plexus/util/cli/shell/Shell.java
|
b38a1b3a4352303e4312b2bb601a0d7ec6e28f41
| 0
|
Analyze the following code function for security vulnerabilities
|
public void unhandledBack() throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unhandledBack
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
unhandledBack
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
public <T> PageInfo<T> toPageInfo(Function<E, T> function) {
List<T> list = new ArrayList<T>(this.size());
for (E e : this) {
list.add(function.apply(e));
}
PageInfo<T> pageInfo = new PageInfo<T>(list);
pageInfo.setTotal(this.getTotal());
pageInfo.setPageNum(this.getPageNum());
pageInfo.setPageSize(this.getPageSize());
pageInfo.setPages(this.getPages());
pageInfo.setStartRow(this.getStartRow());
pageInfo.setEndRow(this.getEndRow());
pageInfo.calcByNavigatePages(PageInfo.DEFAULT_NAVIGATE_PAGES);
return pageInfo;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toPageInfo
File: src/main/java/com/github/pagehelper/Page.java
Repository: pagehelper/Mybatis-PageHelper
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-28111
|
HIGH
| 7.5
|
pagehelper/Mybatis-PageHelper
|
toPageInfo
|
src/main/java/com/github/pagehelper/Page.java
|
554a524af2d2b30d09505516adc412468a84d8fa
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setHeaderVisible(boolean headerVisible) {
getHeader().setVisible(headerVisible);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setHeaderVisible
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
|
setHeaderVisible
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setLifecycleForAllControllers() {
if (mProxySubscriptionMgr == null) {
mProxySubscriptionMgr = ProxySubscriptionManager.getInstance(getContext());
}
mProxySubscriptionMgr.setLifecycle(getLifecycle());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setLifecycleForAllControllers
File: src/com/android/settings/network/apn/ApnEditor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40125
|
HIGH
| 7.8
|
android
|
setLifecycleForAllControllers
|
src/com/android/settings/network/apn/ApnEditor.java
|
63d464c3fa5c7b9900448fef3844790756e557eb
| 0
|
Analyze the following code function for security vulnerabilities
|
void updateAppOpsState() {
if (mAppOp == OP_NONE) {
return;
}
final int uid = getOwningUid();
final String packageName = getOwningPackage();
if (mAppOpVisibility) {
// There is a race between the check and the finish calls but this is fine
// as this would mean we will get another change callback and will reconcile.
int mode = mWmService.mAppOps.checkOpNoThrow(mAppOp, uid, packageName);
if (mode != MODE_ALLOWED && mode != MODE_DEFAULT) {
mWmService.mAppOps.finishOp(mAppOp, uid, packageName, null /* featureId */);
setAppOpVisibilityLw(false);
}
} else {
final int mode = mWmService.mAppOps.startOpNoThrow(mAppOp, uid, packageName,
true /* startIfModeDefault */, null /* featureId */, "attempt-to-be-visible");
if (mode == MODE_ALLOWED || mode == MODE_DEFAULT) {
setAppOpVisibilityLw(true);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateAppOpsState
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
|
updateAppOpsState
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void test() throws Exception {
final Path input = StroomPipelineTestFileUtil.getTestResourcesFile(INPUT);
final SAXParser parser = PARSER_FACTORY.newSAXParser();
final XMLReader xmlReader = parser.getXMLReader();
final SAXEventRecorder steppingFilter = new SAXEventRecorder(null, null);
steppingFilter.clear(null);
xmlReader.setContentHandler(steppingFilter);
xmlReader.parse(new InputSource(Files.newBufferedReader(input)));
testPathExists("/records", steppingFilter);
testPathExists("records", steppingFilter);
testPathExists("records/record", steppingFilter);
testPathExists("records/record/data", steppingFilter);
testPathExists("records/record/data[@name]", steppingFilter);
testPathExists("records/record/data[@name = 'FileNo']", steppingFilter);
testPathExists("records/record/data[@name = 'FileNo' and @value]", steppingFilter);
testPathExists("records/record/data[@name = 'FileNo' and @value = '1']", steppingFilter);
testPathExists("records/record", steppingFilter);
testPathExists("records/record", steppingFilter);
testPathEquals("records/record/data[@name = 'FileNo']/@value", "1", steppingFilter);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: test
File: stroom-pipeline/src/test/java/stroom/pipeline/server/filter/TestXPathFilter.java
Repository: gchq/stroom
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000651
|
HIGH
| 7.5
|
gchq/stroom
|
test
|
stroom-pipeline/src/test/java/stroom/pipeline/server/filter/TestXPathFilter.java
|
ba30ffd415bd7d32ee40ba4b04035267ce80b499
| 0
|
Analyze the following code function for security vulnerabilities
|
public ServerBuilder gracefulShutdownTimeoutMillis(long quietPeriodMillis, long timeoutMillis) {
return gracefulShutdownTimeout(
Duration.ofMillis(quietPeriodMillis), Duration.ofMillis(timeoutMillis));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: gracefulShutdownTimeoutMillis
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
|
gracefulShutdownTimeoutMillis
|
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
|
df7f85824a62e997b910b5d6194a3335841065fd
| 0
|
Analyze the following code function for security vulnerabilities
|
private static boolean shouldUseSystemProxy() {
return "true".equals(System.getProperty("java.net.useSystemProxies"))
&& (!System.getProperty("http.proxyHost", "").isEmpty() || !System.getProperty("https.proxyHost", "").isEmpty());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: shouldUseSystemProxy
File: app/server/appsmith-interfaces/src/main/java/com/appsmith/util/WebClientUtils.java
Repository: appsmithorg/appsmith
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2022-4096
|
MEDIUM
| 6.5
|
appsmithorg/appsmith
|
shouldUseSystemProxy
|
app/server/appsmith-interfaces/src/main/java/com/appsmith/util/WebClientUtils.java
|
769719ccfe667f059fe0b107a19ec9feb90f2e40
| 0
|
Analyze the following code function for security vulnerabilities
|
private ActivityManager.ProcessErrorStateInfo generateProcessError(ProcessRecord app,
int condition, String activity, String shortMsg, String longMsg, String stackTrace) {
ActivityManager.ProcessErrorStateInfo report = new ActivityManager.ProcessErrorStateInfo();
report.condition = condition;
report.processName = app.processName;
report.pid = app.pid;
report.uid = app.info.uid;
report.tag = activity;
report.shortMsg = shortMsg;
report.longMsg = longMsg;
report.stackTrace = stackTrace;
return report;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: generateProcessError
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
|
generateProcessError
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
9878bb99b77c3681f0fda116e2964bac26f349c3
| 0
|
Analyze the following code function for security vulnerabilities
|
public long getSupportedFeatures() {
return mWifiNative.getSupportedFeatureSet(mInterfaceName);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSupportedFeatures
File: service/java/com/android/server/wifi/ClientModeImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21242
|
CRITICAL
| 9.8
|
android
|
getSupportedFeatures
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isColorized() {
return extras.getBoolean(EXTRA_COLORIZED)
&& (hasColorizedPermission() || isForegroundService());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isColorized
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
isColorized
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
boolean check(AwsConfig c1, AwsConfig c2) {
boolean c1Disabled = c1 == null || !c1.isEnabled();
boolean c2Disabled = c2 == null || !c2.isEnabled();
return c1 == c2 || (c1Disabled && c2Disabled) || (c1 != null && c2 != null
&& nullSafeEqual(c1.getAccessKey(), c2.getAccessKey())
&& nullSafeEqual(c1.getSecretKey(), c2.getSecretKey())
&& nullSafeEqual(c1.getRegion(), c2.getRegion())
&& nullSafeEqual(c1.getSecurityGroupName(), c2.getSecurityGroupName())
&& nullSafeEqual(c1.getTagKey(), c2.getTagKey())
&& nullSafeEqual(c1.getTagValue(), c2.getTagValue())
&& nullSafeEqual(c1.getHostHeader(), c2.getHostHeader())
&& nullSafeEqual(c1.getIamRole(), c2.getIamRole())
&& nullSafeEqual(c1.getConnectionTimeoutSeconds(), c2.getConnectionTimeoutSeconds()));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: check
File: hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
check
|
hazelcast/src/test/java/com/hazelcast/config/ConfigCompatibilityChecker.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setChildModal(Component child) {
if (modalComponentStack == null) {
modalComponentStack = new ArrayDeque<>();
} else if (isTopMostModal(child)) {
return;
}
ElementUtil.setIgnoreParentInert(child.getElement(), true);
if (modalComponentStack.isEmpty()) {
ElementUtil.setInert(ui.getElement(), true);
} else {
// disable previous top most modal component
ElementUtil.setIgnoreParentInert(
modalComponentStack.peek().getElement(), false);
}
final boolean needsListener = !modalComponentStack.remove(child);
modalComponentStack.push(child);
if (needsListener) {
/*
* Handle removal automatically on element level always due to
* possible component.getElement().removeFromParent() usage.
*/
AtomicReference<Registration> registrationCombination = new AtomicReference<>();
final Registration componentRemoval = () -> setChildModeless(child);
final Registration listenerRegistration = child.getElement()
.addDetachListener(
event -> registrationCombination.get().remove());
registrationCombination.set(Registration.combine(componentRemoval,
listenerRegistration));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setChildModal
File: flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2023-25499
|
MEDIUM
| 6.5
|
vaadin/flow
|
setChildModal
|
flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
|
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getStringValue(EntityReference classReference, String fieldName)
{
return getStringValue(resolveClassReference(classReference), fieldName);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStringValue
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
|
getStringValue
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
public void captureAudio(final ActionListener response) {
if(!checkForPermission(Manifest.permission.RECORD_AUDIO, "This is required to record the audio")){
return;
}
try {
final Form current = Display.getInstance().getCurrent();
final File temp = File.createTempFile("mtmp", ".3gpp");
temp.deleteOnExit();
if (recorder != null) {
recorder.release();
}
recorder = new MediaRecorder();
recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_WB);
recorder.setOutputFile(temp.getAbsolutePath());
final Form recording = new Form("Recording");
recording.setTransitionInAnimator(CommonTransitions.createEmpty());
recording.setTransitionOutAnimator(CommonTransitions.createEmpty());
recording.setLayout(new BorderLayout());
recorder.prepare();
recorder.start();
final Label time = new Label("00:00");
time.getAllStyles().setAlignment(Component.CENTER);
Font f = Font.createSystemFont(Font.FACE_SYSTEM, Font.STYLE_PLAIN, Font.SIZE_LARGE);
f = f.derive(getDisplayHeight() / 10, Font.STYLE_PLAIN);
time.getAllStyles().setFont(f);
recording.addComponent(BorderLayout.CENTER, time);
recording.registerAnimated(new Animation() {
long current = System.currentTimeMillis();
long zero = current;
int sec = 0;
public boolean animate() {
long now = System.currentTimeMillis();
if (now - current > 1000) {
current = now;
sec++;
return true;
}
return false;
}
public void paint(Graphics g) {
int seconds = sec % 60;
int minutes = sec / 60;
String secStr = seconds < 10 ? "0" + seconds : "" + seconds;
String minStr = minutes < 10 ? "0" + minutes : "" + minutes;
String txt = minStr + ":" + secStr;
time.setText(txt);
}
});
Container south = new Container(new com.codename1.ui.layouts.GridLayout(1, 2));
Command cancel = new Command("Cancel") {
@Override
public void actionPerformed(ActionEvent evt) {
if (recorder != null) {
recorder.stop();
recorder.release();
recorder = null;
}
current.showBack();
response.actionPerformed(null);
}
};
recording.setBackCommand(cancel);
south.add(new com.codename1.ui.Button(cancel));
south.add(new com.codename1.ui.Button(new Command("Save") {
@Override
public void actionPerformed(ActionEvent evt) {
if (recorder != null) {
recorder.stop();
recorder.release();
recorder = null;
}
current.showBack();
response.actionPerformed(new ActionEvent(temp.getAbsolutePath()));
}
}));
recording.addComponent(BorderLayout.SOUTH, south);
recording.show();
} catch (IOException ex) {
ex.printStackTrace();
throw new RuntimeException("failed to start audio recording");
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: captureAudio
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
|
captureAudio
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("unchecked")
public <T> T getScriptableObject() {
if (scriptObject_ == null) {
final SgmlPage page = getPage();
if (this == page) {
final StringBuilder msg = new StringBuilder("No script object associated with the Page.");
// because this is a strange case we like to provide as much info as possible
msg.append(" class: '")
.append(page.getClass().getName())
.append('\'');
try {
msg.append(" url: '")
.append(page.getUrl()).append("' content: ")
.append(page.getWebResponse().getContentAsString());
}
catch (final Exception e) {
// ok bad luck with detail
msg.append(" no details: '").append(e).append('\'');
}
throw new IllegalStateException(msg.toString());
}
final Object o = page.getScriptableObject();
if (o instanceof HtmlUnitScriptable) {
scriptObject_ = ((HtmlUnitScriptable) o).makeScriptableFor(this);
}
}
return (T) scriptObject_;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getScriptableObject
File: src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
Repository: HtmlUnit/htmlunit
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-2798
|
HIGH
| 7.5
|
HtmlUnit/htmlunit
|
getScriptableObject
|
src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
|
940dc7fd
| 0
|
Analyze the following code function for security vulnerabilities
|
private static int findJavaHome(JavaConfig javaConfig, JavaFinder javaFinder,
JavaFilter javaFilter, boolean save) throws IOException {
File javaHomeDir;
LaunchProperties launchProperties = javaConfig.getLaunchProperties();
// PRIORITY 1: JAVA_HOME_OVERRIDE property
// If a valid java home override is specified in the launch properties, use that.
// Someone presumably wants to force that specific version.
javaHomeDir = launchProperties.getJavaHomeOverride();
if (javaConfig.isSupportedJavaHomeDir(javaHomeDir, javaFilter)) {
if (save) {
javaConfig.saveJavaHome(javaHomeDir);
}
System.out.println(javaHomeDir);
return EXIT_SUCCESS;
}
// PRIORITY 2: Java on PATH
// This program (LaunchSupport) was started with the Java on the PATH. Try to use this one
// next because it is most likely the one that is being upgraded on the user's system.
javaHomeDir = javaFinder.findSupportedJavaHomeFromCurrentJavaHome(javaConfig, javaFilter);
if (javaHomeDir != null) {
if (save) {
javaConfig.saveJavaHome(javaHomeDir);
}
System.out.println(javaHomeDir);
return EXIT_SUCCESS;
}
// PRIORITY 3: Last used Java
// Check to see if a prior launch resulted in that Java being saved. If so, try to use that.
javaHomeDir = javaConfig.getSavedJavaHome();
if (javaConfig.isSupportedJavaHomeDir(javaHomeDir, javaFilter)) {
System.out.println(javaHomeDir);
return EXIT_SUCCESS;
}
// PRIORITY 4: Find all supported Java installations, and use the newest.
List<File> javaHomeDirs =
javaFinder.findSupportedJavaHomeFromInstallations(javaConfig, javaFilter);
if (!javaHomeDirs.isEmpty()) {
javaHomeDir = javaHomeDirs.iterator().next();
if (save) {
javaConfig.saveJavaHome(javaHomeDir);
}
System.out.println(javaHomeDir);
return EXIT_SUCCESS;
}
return EXIT_FAILURE;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findJavaHome
File: GhidraBuild/LaunchSupport/src/main/java/LaunchSupport.java
Repository: NationalSecurityAgency/ghidra
The code follows secure coding practices.
|
[
"CWE-77"
] |
CVE-2023-22671
|
CRITICAL
| 9.8
|
NationalSecurityAgency/ghidra
|
findJavaHome
|
GhidraBuild/LaunchSupport/src/main/java/LaunchSupport.java
|
1640b544c3d99b5ce8a89d9ca4b540da22be3a0e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void writeRecords(final Object iRecords) throws IOException {
writeRecords(iRecords, null, null, null, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeRecords
File: server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/OHttpResponse.java
Repository: orientechnologies/orientdb
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2015-2912
|
MEDIUM
| 6.8
|
orientechnologies/orientdb
|
writeRecords
|
server/src/main/java/com/orientechnologies/orient/server/network/protocol/http/OHttpResponse.java
|
d5a45e608ba8764fd817c1bdd7cf966564e828e9
| 0
|
Analyze the following code function for security vulnerabilities
|
public long[] getProcessPss(int[] pids) throws RemoteException {
Parcel data = Parcel.obtain();
Parcel reply = Parcel.obtain();
data.writeInterfaceToken(IActivityManager.descriptor);
data.writeIntArray(pids);
mRemote.transact(GET_PROCESS_PSS_TRANSACTION, data, reply, 0);
reply.readException();
long[] res = reply.createLongArray();
data.recycle();
reply.recycle();
return res;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProcessPss
File: core/java/android/app/ActivityManagerNative.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
getProcessPss
|
core/java/android/app/ActivityManagerNative.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setOrganizationId(@NonNull String enterpriseId) {
throwIfParentInstance("setOrganizationId");
setOrganizationIdForUser(mContext.getPackageName(), enterpriseId, myUserId());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setOrganizationId
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
|
setOrganizationId
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void shutdown() {
if (connection != null) {
try {
connection.close();
} catch (SQLException e) {
logger.warn("Non-Managed connection could not be closed. Whoops!", e);
}
}
}
|
Vulnerability Classification:
- CWE: CWE-89
- CVE: CVE-2023-41887
- Severity: CRITICAL
- CVSS Score: 9.8
Description: Properly escape JDBC URL components in database extension
Function: shutdown
File: extensions/database/src/com/google/refine/extension/database/mariadb/MariaDBConnectionManager.java
Repository: OpenRefine
Fixed Code:
public void shutdown() {
if (connection != null) {
try {
connection.close();
} catch (SQLException e) {
logger.warn("Non-Managed connection could not be closed. Whoops!", e);
}
}
}
|
[
"CWE-89"
] |
CVE-2023-41887
|
CRITICAL
| 9.8
|
OpenRefine
|
shutdown
|
extensions/database/src/com/google/refine/extension/database/mariadb/MariaDBConnectionManager.java
|
693fde606d4b5b78b16391c29d110389eb605511
| 1
|
Analyze the following code function for security vulnerabilities
|
static byte[] hashSignature(Signature sig) {
try {
MessageDigest digest = MessageDigest.getInstance("SHA-256");
digest.update(sig.toByteArray());
return digest.digest();
} catch (NoSuchAlgorithmException e) {
Slog.w(TAG, "No SHA-256 algorithm found!");
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hashSignature
File: services/backup/java/com/android/server/backup/BackupManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-3759
|
MEDIUM
| 5
|
android
|
hashSignature
|
services/backup/java/com/android/server/backup/BackupManagerService.java
|
9b8c6d2df35455ce9e67907edded1e4a2ecb9e28
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void close(ServerSocket serverSocket) {
if (serverSocket == null) {
return;
}
try {
serverSocket.close();
} catch (IOException e) {
Logger.getLogger(IOUtil.class).finest("closeResource failed", e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: close
File: hazelcast/src/main/java/com/hazelcast/nio/IOUtil.java
Repository: hazelcast
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2016-10750
|
MEDIUM
| 6.8
|
hazelcast
|
close
|
hazelcast/src/main/java/com/hazelcast/nio/IOUtil.java
|
c1c31359a1df953e79a9ca9b6c54b3cdbfef11e9
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setApiKeyPrefix(String apiKeyPrefix) {
for (Authentication auth : authentications.values()) {
if (auth instanceof ApiKeyAuth) {
((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix);
return this;
}
}
throw new RuntimeException("No API key authentication configured!");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setApiKeyPrefix
File: samples/client/petstore/java/okhttp-gson-dynamicOperations/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
|
setApiKeyPrefix
|
samples/client/petstore/java/okhttp-gson-dynamicOperations/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void printNode(OutputStream out, Node node, boolean prettyPrint, boolean includeXmlDeclaration) {
try {
Transformer serializer = tFactory.newTransformer();
if (prettyPrint) {
//Setup indenting to "pretty print"
serializer.setOutputProperty(OutputKeys.INDENT, "yes");
serializer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
}
if ( ! includeXmlDeclaration) {
serializer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
}
DOMSource xmlSource = new DOMSource(node);
StreamResult outputTarget = new StreamResult(out);
serializer.transform(xmlSource, outputTarget);
} catch (TransformerException e) {
throw new RuntimeException(e);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: printNode
File: src/edu/stanford/nlp/time/XMLUtils.java
Repository: stanfordnlp/CoreNLP
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-3869
|
MEDIUM
| 5
|
stanfordnlp/CoreNLP
|
printNode
|
src/edu/stanford/nlp/time/XMLUtils.java
|
5d83f1e8482ca304db8be726cad89554c88f136a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public StaticHandler setDirectoryListing(boolean directoryListing) {
this.directoryListing = directoryListing;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDirectoryListing
File: vertx-web/src/main/java/io/vertx/ext/web/handler/impl/StaticHandlerImpl.java
Repository: vert-x3/vertx-web
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-12542
|
HIGH
| 7.5
|
vert-x3/vertx-web
|
setDirectoryListing
|
vertx-web/src/main/java/io/vertx/ext/web/handler/impl/StaticHandlerImpl.java
|
57a65dce6f4c5aa5e3ce7288685e7f3447eb8f3b
| 0
|
Analyze the following code function for security vulnerabilities
|
public ModalDialog addContent(final AjaxRequestTarget target)
{
target.add(gridContentContainer);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addContent
File: src/main/java/org/projectforge/web/dialog/ModalDialog.java
Repository: micromata/projectforge-webapp
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2013-7251
|
MEDIUM
| 6.8
|
micromata/projectforge-webapp
|
addContent
|
src/main/java/org/projectforge/web/dialog/ModalDialog.java
|
422de35e3c3141e418a73bfb39b430d5fd74077e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isRestricted() {
synchronized (mPackagesLock) {
return getUserInfoLocked(UserHandle.getCallingUserId()).isRestricted();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isRestricted
File: services/core/java/com/android/server/pm/UserManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2457
|
LOW
| 2.1
|
android
|
isRestricted
|
services/core/java/com/android/server/pm/UserManagerService.java
|
12332e05f632794e18ea8c4ac52c98e82532e5db
| 0
|
Analyze the following code function for security vulnerabilities
|
public String elementAsString() throws TransformerException {
Properties outputProperties = new Properties();
outputProperties.put(javax.xml.transform.OutputKeys.OMIT_XML_DECLARATION, "yes");
return elementAsString(outputProperties);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: elementAsString
File: src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
Repository: jmurty/java-xmlbuilder
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2014-125087
|
MEDIUM
| 5.2
|
jmurty/java-xmlbuilder
|
elementAsString
|
src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java
|
e6fddca201790abab4f2c274341c0bb8835c3e73
| 0
|
Analyze the following code function for security vulnerabilities
|
private JsonObject readObject(int depth) throws IOException {
read();
JsonObject object=new JsonObject();
skipWhiteSpace();
if (readIf('}')) {
return object;
}
do {
skipWhiteSpace();
String name=readName();
skipWhiteSpace();
if (!readIf(':')) {
throw expected("':'");
}
skipWhiteSpace();
object.add(name, readValue(depth));
skipWhiteSpace();
} while (readIf(','));
if (!readIf('}')) {
throw expected("',' or '}'");
}
return object;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readObject
File: src/main/org/hjson/JsonParser.java
Repository: hjson/hjson-java
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-34620
|
HIGH
| 7.5
|
hjson/hjson-java
|
readObject
|
src/main/org/hjson/JsonParser.java
|
91bef056d56bf968451887421c89a44af1d692ff
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setFeature(final String featureId, final boolean state) {
if (featureId.equals(AUGMENTATIONS)) {
fAugmentations = state;
}
else if (featureId.equals(IGNORE_SPECIFIED_CHARSET)) {
fIgnoreSpecifiedCharset = state;
}
else if (featureId.equals(NOTIFY_CHAR_REFS)) {
fNotifyCharRefs = state;
}
else if (featureId.equals(NOTIFY_XML_BUILTIN_REFS)) {
fNotifyXmlBuiltinRefs = state;
}
else if (featureId.equals(NOTIFY_HTML_BUILTIN_REFS)) {
fNotifyHtmlBuiltinRefs = state;
}
else if (featureId.equals(FIX_MSWINDOWS_REFS)) {
fFixWindowsCharRefs = state;
}
else if (featureId.equals(SCRIPT_STRIP_CDATA_DELIMS)) {
fScriptStripCDATADelims = state;
}
else if (featureId.equals(SCRIPT_STRIP_COMMENT_DELIMS)) {
fScriptStripCommentDelims = state;
}
else if (featureId.equals(STYLE_STRIP_CDATA_DELIMS)) {
fStyleStripCDATADelims = state;
}
else if (featureId.equals(STYLE_STRIP_COMMENT_DELIMS)) {
fStyleStripCommentDelims = state;
}
else if (featureId.equals(PARSE_NOSCRIPT_CONTENT)) {
fParseNoScriptContent = state;
}
else if (featureId.equals(ALLOW_SELFCLOSING_IFRAME)) {
fAllowSelfclosingIframe = state;
}
else if (featureId.equals(ALLOW_SELFCLOSING_TAGS)) {
fAllowSelfclosingTags = state;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setFeature
File: src/org/cyberneko/html/HTMLScanner.java
Repository: sparklemotion/nekohtml
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2022-24839
|
MEDIUM
| 5
|
sparklemotion/nekohtml
|
setFeature
|
src/org/cyberneko/html/HTMLScanner.java
|
a800fce3b079def130ed42a408ff1d09f89e773d
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void collectProfileClaims(final OidcProfileDefinition profileDefinition,
final OidcProfile profile,
final Map<String, Object> claims) {
claims.forEach((name, value) -> {
if (configuration.getMappedClaims().containsKey(name)) {
var actualName = configuration.getMappedClaims().get(name);
logger.debug("Mapping claim {} as {} with values {} to profile", name, actualName, value);
profileDefinition.convertAndAdd(profile, PROFILE_ATTRIBUTE, actualName, value);
} else {
logger.debug("Adding claim {} to profile with values {}", name, value);
profileDefinition.convertAndAdd(profile, PROFILE_ATTRIBUTE, name, value);
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: collectProfileClaims
File: pac4j-oidc/src/main/java/org/pac4j/oidc/credentials/authenticator/UserInfoOidcAuthenticator.java
Repository: pac4j
The code follows secure coding practices.
|
[
"CWE-347"
] |
CVE-2021-44878
|
MEDIUM
| 5
|
pac4j
|
collectProfileClaims
|
pac4j-oidc/src/main/java/org/pac4j/oidc/credentials/authenticator/UserInfoOidcAuthenticator.java
|
22b82ffd702a132d9f09da60362fc6264fc281ae
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isUserOriginated() {
return userOriginated;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isUserOriginated
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
|
isUserOriginated
|
server/src/main/java/com/vaadin/ui/Grid.java
|
c40bed109c3723b38694ed160ea647fef5b28593
| 0
|
Analyze the following code function for security vulnerabilities
|
public static File getLogDirectory() {
String neo4jHome = apocConfig().getString("dbms.directories.neo4j_home", "");
String logDir = apocConfig().getString("dbms.directories.logs", "");
File logs = logDir.isEmpty() ? new File(neo4jHome, "logs") : new File(logDir);
if (logs.exists() && logs.canRead() && logs.isDirectory()) {
return logs;
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLogDirectory
File: core/src/main/java/apoc/util/FileUtils.java
Repository: neo4j-contrib/neo4j-apoc-procedures
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-23532
|
MEDIUM
| 6.5
|
neo4j-contrib/neo4j-apoc-procedures
|
getLogDirectory
|
core/src/main/java/apoc/util/FileUtils.java
|
01e63ed2d187cd2a8aa1d78bf831ef0fdd69b522
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void initRvisByGene(String geneName) throws Exception {
String sql = "SELECT * "
+ "FROM rvis "
+ "WHERE gene_name='" + geneName + "'";
ResultSet rset = DBManager.executeQuery(sql);
if (rset.next()) {
float f = FormatManager.getFloat(rset.getObject("rvis_percent"));
String value = FormatManager.getString(f);
if (value.equals("-")) {
Output.rvisPercentile = "NA";
}
Output.rvisPercentile = value + "%";
}
rset.close();
}
|
Vulnerability Classification:
- CWE: CWE-89
- CVE: CVE-2016-15021
- Severity: MEDIUM
- CVSS Score: 5.2
Description: fixed sql injection vulnerability
Function: initRvisByGene
File: src/main/java/model/Input.java
Repository: nickzren/alsdb
Fixed Code:
private static void initRvisByGene(String geneName) throws Exception {
String sql = "SELECT * FROM rvis WHERE gene_name=?";
PreparedStatement stmt = DBManager.prepareStatement(sql);
stmt.setString(1, geneName);
ResultSet rset = stmt.executeQuery();
if (rset.next()) {
float f = FormatManager.getFloat(rset.getObject("rvis_percent"));
String value = FormatManager.getString(f);
if (value.equals("-")) {
Output.rvisPercentile = "NA";
}
Output.rvisPercentile = value + "%";
}
rset.close();
}
|
[
"CWE-89"
] |
CVE-2016-15021
|
MEDIUM
| 5.2
|
nickzren/alsdb
|
initRvisByGene
|
src/main/java/model/Input.java
|
cbc79a68145e845f951113d184b4de207c341599
| 1
|
Analyze the following code function for security vulnerabilities
|
private HibernateConfiguration getHibernateConfiguration()
{
if (this.hibernateConfiguration == null) {
this.hibernateConfiguration = Utils.getComponent(HibernateConfiguration.class);
}
return this.hibernateConfiguration;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getHibernateConfiguration
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
|
getHibernateConfiguration
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
MethodSignature that = (MethodSignature) o;
return Objects.equals(name, that.name) && Arrays.equals(paramTypes, that.paramTypes);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: equals
File: server/src/main/java/com/thoughtworks/go/remote/AgentRemoteInvokerServiceExporter.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2022-39310
|
MEDIUM
| 6.5
|
gocd
|
equals
|
server/src/main/java/com/thoughtworks/go/remote/AgentRemoteInvokerServiceExporter.java
|
a644a7e5ed75d7b9e46f164fb83445f778077cf9
| 0
|
Analyze the following code function for security vulnerabilities
|
public javax.xml.rpc.Service loadService(Class serviceInterface) throws ServiceException {
if (serviceInterface == null) {
throw new IllegalArgumentException(
Messages.getMessage("serviceFactoryIllegalServiceInterface"));
}
if (!(javax.xml.rpc.Service.class).isAssignableFrom(serviceInterface))
{
throw new ServiceException(
Messages.getMessage("serviceFactoryServiceInterfaceRequirement", serviceInterface.getName()));
} else {
String serviceImplementationName = serviceInterface.getName() + SERVICE_IMPLEMENTATION_SUFFIX;
Service service = createService(serviceImplementationName);
return service;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: loadService
File: axis-rt-core/src/main/java/org/apache/axis/client/ServiceFactory.java
Repository: apache/axis-axis1-java
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2023-51441
|
HIGH
| 7.2
|
apache/axis-axis1-java
|
loadService
|
axis-rt-core/src/main/java/org/apache/axis/client/ServiceFactory.java
|
685c309febc64aa393b2d64a05f90e7eb9f73e06
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isForwardingCompleted() {
if (mForwardingChangeResults == null) {
return true;
}
for (Integer reason : mExpectedChangeResultReasons) {
if (mForwardingChangeResults.get(reason) == null) {
return false;
}
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isForwardingCompleted
File: src/com/android/phone/settings/VoicemailSettingsActivity.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other",
"CWE-862"
] |
CVE-2023-35665
|
HIGH
| 7.8
|
android
|
isForwardingCompleted
|
src/com/android/phone/settings/VoicemailSettingsActivity.java
|
674039e70e1c5bf29b808899ac80c709acc82290
| 0
|
Analyze the following code function for security vulnerabilities
|
public void updateScanDetailCacheFromWifiInfo(WifiInfo info) {
WifiConfiguration config = getInternalConfiguredNetwork(info.getNetworkId());
ScanDetailCache scanDetailCache = getScanDetailCacheForNetwork(info.getNetworkId());
if (config != null && scanDetailCache != null) {
ScanDetail scanDetail = scanDetailCache.getScanDetail(info.getBSSID());
if (scanDetail != null) {
ScanResult result = scanDetail.getScanResult();
long previousSeen = result.seen;
int previousRssi = result.level;
// Update the scan result
scanDetail.setSeen();
result.level = info.getRssi();
// Average the RSSI value
long maxAge = SCAN_RESULT_MAXIMUM_AGE_MS;
long age = result.seen - previousSeen;
if (previousSeen > 0 && age > 0 && age < maxAge / 2) {
// Average the RSSI with previously seen instances of this scan result
double alpha = 0.5 - (double) age / (double) maxAge;
result.level = (int) ((double) result.level * (1 - alpha)
+ (double) previousRssi * alpha);
}
if (mVerboseLoggingEnabled) {
Log.v(TAG, "Updating scan detail cache freq=" + result.frequency
+ " BSSID=" + result.BSSID
+ " RSSI=" + result.level
+ " for " + config.getProfileKey());
}
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateScanDetailCacheFromWifiInfo
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
|
updateScanDetailCacheFromWifiInfo
|
service/java/com/android/server/wifi/WifiConfigManager.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
public final boolean isAllowSpecialCharsInStrings ()
{
return m_bAllowSpecialCharsInStrings;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isAllowSpecialCharsInStrings
File: ph-json/src/main/java/com/helger/json/parser/JsonParser.java
Repository: phax/ph-commons
The code follows secure coding practices.
|
[
"CWE-787"
] |
CVE-2023-34612
|
HIGH
| 7.5
|
phax/ph-commons
|
isAllowSpecialCharsInStrings
|
ph-json/src/main/java/com/helger/json/parser/JsonParser.java
|
02a4d034dcfb2b6e1796b25f519bf57a6796edce
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean sendMediaButton(String packageName, int pid, int uid,
boolean asSystemService, KeyEvent keyEvent, int sequenceId, ResultReceiver cb) {
try {
if (KeyEvent.isMediaSessionKey(keyEvent.getKeyCode())) {
final String reason = "action=" + KeyEvent.actionToString(keyEvent.getAction())
+ ";code=" + KeyEvent.keyCodeToString(keyEvent.getKeyCode());
mService.tempAllowlistTargetPkgIfPossible(getUid(), getPackageName(),
pid, uid, packageName, reason);
}
if (asSystemService) {
mCb.onMediaButton(mContext.getPackageName(), Process.myPid(),
Process.SYSTEM_UID, createMediaButtonIntent(keyEvent), sequenceId, cb);
} else {
mCb.onMediaButton(packageName, pid, uid,
createMediaButtonIntent(keyEvent), sequenceId, cb);
}
return true;
} catch (RemoteException e) {
Log.e(TAG, "Remote failure in sendMediaRequest.", e);
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendMediaButton
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
|
sendMediaButton
|
services/core/java/com/android/server/media/MediaSessionRecord.java
|
06e772e05514af4aa427641784c5eec39a892ed3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int[] getSoftkeyCode(int index) {
if (index == 0) {
return leftSK;
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSoftkeyCode
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
|
getSoftkeyCode
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
void startAnimation(Animation anim) {
// If we are an inset provider, all our animations are driven by the inset client.
if (mControllableInsetProvider != null) {
return;
}
final DisplayInfo displayInfo = getDisplayInfo();
anim.initialize(mWindowFrames.mFrame.width(), mWindowFrames.mFrame.height(),
displayInfo.appWidth, displayInfo.appHeight);
anim.restrictDuration(MAX_ANIMATION_DURATION);
anim.scaleCurrentDuration(mWmService.getWindowAnimationScaleLocked());
final AnimationAdapter adapter = new LocalAnimationAdapter(
new WindowAnimationSpec(anim, mSurfacePosition, false /* canSkipFirstFrame */,
0 /* windowCornerRadius */),
mWmService.mSurfaceAnimationRunner);
startAnimation(getPendingTransaction(), adapter);
commitPendingTransaction();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startAnimation
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
|
startAnimation
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isDeviceOrProfileOwnerInCallingUser(String packageName) {
return isDeviceOwnerInCallingUser(packageName)
|| isProfileOwnerInCallingUser(packageName);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isDeviceOrProfileOwnerInCallingUser
File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2023-21284
|
MEDIUM
| 5.5
|
android
|
isDeviceOrProfileOwnerInCallingUser
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean bindSdkSandboxService(Intent service, ServiceConnection conn,
int clientAppUid, String clientAppPackage, String processName, int flags)
throws RemoteException {
if (service == null) {
throw new IllegalArgumentException("intent is null");
}
if (conn == null) {
throw new IllegalArgumentException("connection is null");
}
if (clientAppPackage == null) {
throw new IllegalArgumentException("clientAppPackage is null");
}
if (processName == null) {
throw new IllegalArgumentException("processName is null");
}
if (service.getComponent() == null) {
throw new IllegalArgumentException("service must specify explicit component");
}
if (!UserHandle.isApp(clientAppUid)) {
throw new IllegalArgumentException("uid is not within application range");
}
if (mAppOpsService.checkPackage(clientAppUid, clientAppPackage) != MODE_ALLOWED) {
throw new IllegalArgumentException("uid does not belong to provided package");
}
Handler handler = mContext.getMainThreadHandler();
final IServiceConnection sd = mContext.getServiceDispatcher(conn, handler, flags);
service.prepareToLeaveProcess(mContext);
return ActivityManagerService.this.bindServiceInstance(
mContext.getIApplicationThread(), mContext.getActivityToken(), service,
service.resolveTypeIfNeeded(mContext.getContentResolver()), sd, flags,
processName, /*isSdkSandboxService*/ true, clientAppUid, clientAppPackage,
mContext.getOpPackageName(), UserHandle.getUserId(clientAppUid)) != 0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: bindSdkSandboxService
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
|
bindSdkSandboxService
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean setMeteredOverride(@NonNull String fqdn, @MeteredOverride int meteredOverride) {
ArrayList<PasspointProvider> passpointProviders = new ArrayList<>(mProviders.values());
boolean found = false;
// Loop through all profiles with matching FQDN
for (PasspointProvider provider : passpointProviders) {
if (TextUtils.equals(provider.getConfig().getHomeSp().getFqdn(), fqdn)) {
if (provider.setMeteredOverride(meteredOverride)) {
mWifiMetrics.logUserActionEvent(
WifiMetrics.convertMeteredOverrideEnumToUserActionEventType(
meteredOverride),
provider.isFromSuggestion(), true);
}
found = true;
}
}
if (found) {
mWifiConfigManager.saveToStore(true);
}
return found;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setMeteredOverride
File: service/java/com/android/server/wifi/hotspot2/PasspointManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-120"
] |
CVE-2023-21243
|
MEDIUM
| 5.5
|
android
|
setMeteredOverride
|
service/java/com/android/server/wifi/hotspot2/PasspointManager.java
|
5b49b8711efaadadf5052ba85288860c2d7ca7a6
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
if (!super.equals(o)) {
return false;
}
ScmMaterial that = (ScmMaterial) o;
return folder != null ? folder.equals(that.folder) : that.folder == null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: equals
File: domain/src/main/java/com/thoughtworks/go/config/materials/ScmMaterial.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-39309
|
MEDIUM
| 6.5
|
gocd
|
equals
|
domain/src/main/java/com/thoughtworks/go/config/materials/ScmMaterial.java
|
691b479f1310034992da141760e9c5d1f5b60e8a
| 0
|
Analyze the following code function for security vulnerabilities
|
private int getMaxMultiPressPowerCount() {
if (mTriplePressOnPowerBehavior != MULTI_PRESS_POWER_NOTHING) {
return 3;
}
if (mDoublePressOnPowerBehavior != MULTI_PRESS_POWER_NOTHING) {
return 2;
}
return 1;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMaxMultiPressPowerCount
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
|
getMaxMultiPressPowerCount
|
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
|
84669ca8de55d38073a0dcb01074233b0a417541
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String writeToString(SsurgeonPattern pattern) {
try {
List<SsurgeonPattern> patterns = new LinkedList<>();
patterns.add(pattern);
Document domDoc = createPatternXMLDoc(patterns);
if (domDoc != null) {
Transformer tformer = TransformerFactory.newInstance().newTransformer();
tformer.setOutputProperty(OutputKeys.INDENT, "yes");
StringWriter sw = new StringWriter();
tformer.transform(new DOMSource(domDoc), new StreamResult(sw));
return sw.toString();
} else {
log.warning("Was not able to create XML document for pattern list.");
}
} catch (Exception e) {
log.info("Error in writeToString, could not process pattern="+pattern);
log.info(e);
return null;
}
return "";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeToString
File: src/edu/stanford/nlp/semgraph/semgrex/ssurgeon/Ssurgeon.java
Repository: stanfordnlp/CoreNLP
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-3878
|
HIGH
| 7.5
|
stanfordnlp/CoreNLP
|
writeToString
|
src/edu/stanford/nlp/semgraph/semgrex/ssurgeon/Ssurgeon.java
|
e5bbe135a02a74b952396751ed3015e8b8252e99
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public SyncNotedAppOp startOperation(IBinder token, int code, int uid,
@Nullable String packageName, @Nullable String attributionTag,
boolean startIfModeDefault, boolean shouldCollectAsyncNotedOp,
@Nullable String message, boolean shouldCollectMessage,
@AttributionFlags int attributionFlags, int attributionChainId,
@NonNull UndecFunction<IBinder, Integer, Integer, String, String, Boolean,
Boolean, String, Boolean, Integer, Integer, SyncNotedAppOp> superImpl) {
if (uid == mTargetUid && isTargetOp(code)) {
final int shellUid = UserHandle.getUid(UserHandle.getUserId(uid),
Process.SHELL_UID);
final long identity = Binder.clearCallingIdentity();
try {
return superImpl.apply(token, code, shellUid, "com.android.shell",
attributionTag, startIfModeDefault, shouldCollectAsyncNotedOp, message,
shouldCollectMessage, attributionFlags, attributionChainId);
} finally {
Binder.restoreCallingIdentity(identity);
}
}
return superImpl.apply(token, code, uid, packageName, attributionTag,
startIfModeDefault, shouldCollectAsyncNotedOp, message, shouldCollectMessage,
attributionFlags, attributionChainId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startOperation
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
|
startOperation
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void event(UserRequest ureq, Controller source, Event event) {
if(source == emailCalloutCtrl) {
if (event instanceof SingleIdentityChosenEvent) {
addIdentity((SingleIdentityChosenEvent)event);
}
calloutCtrl.deactivate();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: event
File: src/main/java/org/olat/core/util/mail/ui/SendDocumentsByEMailController.java
Repository: OpenOLAT
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-41152
|
MEDIUM
| 4
|
OpenOLAT
|
event
|
src/main/java/org/olat/core/util/mail/ui/SendDocumentsByEMailController.java
|
418bb509ffcb0e25ab4390563c6c47f0458583eb
| 0
|
Analyze the following code function for security vulnerabilities
|
@android.support.annotation.RequiresApi(Build.VERSION_CODES.O)
static void createChannelStatic(Context ctx) {
NotificationManager
mNotificationManager =
(NotificationManager) ctx
.getSystemService(Context.NOTIFICATION_SERVICE);
// The id of the channel.
String id = CHANNEL_ID;
// The user-visible name of the channel.
CharSequence name = "Media playback";
// The user-visible description of the channel.
String description = "Media playback controls";
int importance = NotificationManager.IMPORTANCE_LOW;
NotificationChannel mChannel = new NotificationChannel(id, name, importance);
// Configure the notification channel.
mChannel.setDescription(description);
mChannel.setShowBadge(false);
mChannel.setLockscreenVisibility(Notification.VISIBILITY_PUBLIC);
mNotificationManager.createNotificationChannel(mChannel);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createChannelStatic
File: Ports/Android/src/com/codename1/media/BackgroundAudioService.java
Repository: codenameone/CodenameOne
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2022-4903
|
MEDIUM
| 5.1
|
codenameone/CodenameOne
|
createChannelStatic
|
Ports/Android/src/com/codename1/media/BackgroundAudioService.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public List<External> perform() throws IOException, InterruptedException {
return delegateTo(task);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: perform
File: src/main/java/hudson/scm/SubversionSCM.java
Repository: jenkinsci/subversion-plugin
The code follows secure coding practices.
|
[
"CWE-255"
] |
CVE-2013-6372
|
LOW
| 2.1
|
jenkinsci/subversion-plugin
|
perform
|
src/main/java/hudson/scm/SubversionSCM.java
|
7d4562d6f7e40de04bbe29577b51c79f07d05ba6
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getTempFolderPath() {
return tempFolderPath;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTempFolderPath
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
|
getTempFolderPath
|
samples/client/petstore/java/okhttp-gson-parcelableModel/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.